@juicemantics/veloiq-ui 0.2.0 → 0.2.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.
package/dist/index.js CHANGED
@@ -8,13 +8,15 @@ var icons = require('@ant-design/icons');
8
8
  var jsxRuntime = require('react/jsx-runtime');
9
9
  var reactRouterDom = require('react-router-dom');
10
10
  var reactDom = require('react-dom');
11
- var dayjs7 = require('dayjs');
11
+ var dayjs8 = require('dayjs');
12
+ var relativeTime = require('dayjs/plugin/relativeTime');
12
13
  var axios = require('axios');
13
14
 
14
15
  function _interopDefault (e) { return e && e.__esModule ? e : { default: e }; }
15
16
 
16
17
  var React6__default = /*#__PURE__*/_interopDefault(React6);
17
- var dayjs7__default = /*#__PURE__*/_interopDefault(dayjs7);
18
+ var dayjs8__default = /*#__PURE__*/_interopDefault(dayjs8);
19
+ var relativeTime__default = /*#__PURE__*/_interopDefault(relativeTime);
18
20
  var axios__default = /*#__PURE__*/_interopDefault(axios);
19
21
 
20
22
  var __typeError = (msg) => {
@@ -866,7 +868,7 @@ var LayoutWrapper = ({
866
868
  label: "Confirm Password",
867
869
  dependencies: ["new_password"],
868
870
  rules: [{ required: true }, ({ getFieldValue }) => ({
869
- validator(_39, value) {
871
+ validator(_41, value) {
870
872
  if (!value || getFieldValue("new_password") === value) return Promise.resolve();
871
873
  return Promise.reject(new Error("Passwords do not match"));
872
874
  }
@@ -2606,19 +2608,19 @@ function Ut({
2606
2608
  const { defaultLayoutDeferred: Y, derivedPanelConstraints: Ee, layout: ce } = j.next;
2607
2609
  if (Y || Ee.length === 0)
2608
2610
  return;
2609
- const ut = R.panels.map(({ id: _39 }) => _39).join(",");
2610
- R.mutableState.layouts[ut] = ce, Ee.forEach((_39) => {
2611
- if (_39.collapsible) {
2611
+ const ut = R.panels.map(({ id: _41 }) => _41).join(",");
2612
+ R.mutableState.layouts[ut] = ce, Ee.forEach((_41) => {
2613
+ if (_41.collapsible) {
2612
2614
  const { layout: ge } = j.prev ?? {};
2613
2615
  if (ge) {
2614
2616
  const ft = I(
2615
- _39.collapsedSize,
2616
- ce[_39.panelId]
2617
+ _41.collapsedSize,
2618
+ ce[_41.panelId]
2617
2619
  ), dt = I(
2618
- _39.collapsedSize,
2619
- ge[_39.panelId]
2620
+ _41.collapsedSize,
2621
+ ge[_41.panelId]
2620
2622
  );
2621
- ft && !dt && (R.mutableState.expandedPanelSizes[_39.panelId] = ge[_39.panelId]);
2623
+ ft && !dt && (R.mutableState.expandedPanelSizes[_41.panelId] = ge[_41.panelId]);
2622
2624
  }
2623
2625
  }
2624
2626
  });
@@ -3287,7 +3289,7 @@ var getRelationLabel = (rel) => {
3287
3289
  const translatedBaseKey = translateRelationKey(baseKey);
3288
3290
  if (translatedBaseKey && translatedBaseKey !== baseKey) return translatedBaseKey;
3289
3291
  }
3290
- return asDisplayText(relationKey, asDisplayText(rel.label, relationKey));
3292
+ return asDisplayText(rel.label, asDisplayText(relationKey, "")) || relationKey;
3291
3293
  };
3292
3294
  var getModelLabel = (model) => {
3293
3295
  const primary = asDisplayText(model.label, "");
@@ -3379,8 +3381,8 @@ var useViewSettings = () => {
3379
3381
  }
3380
3382
  const data = await response.json();
3381
3383
  if (cancelled) return;
3382
- const modulesColorSchema = String(data?.modulesColorSchema || "color-coded");
3383
- const modelsColorSchema = String(data?.modelsColorSchema || "color-coded");
3384
+ const modulesColorSchema = String(data?.modulesColorSchema || "plain-color");
3385
+ const modelsColorSchema = String(data?.modelsColorSchema || "plain-color");
3384
3386
  const plainColorBaseHex = String(data?.plainColorBaseHex || "");
3385
3387
  setColorSchemas({ modulesColorSchema, modelsColorSchema, plainColorBaseHex });
3386
3388
  setSettings({
@@ -3582,7 +3584,10 @@ var getConfigVid = (item, mode) => {
3582
3584
  };
3583
3585
  var isAttributeValueEditable = (item, mode) => {
3584
3586
  if (!item) return true;
3585
- const vid = String(getConfigVid(item, mode) || "").trim().toLowerCase().replace(/[\s_-]/g, "");
3587
+ const raw = String(getConfigVid(item, mode) || "").trim();
3588
+ const fieldToken = normalizeFieldViewType(raw);
3589
+ if (fieldToken) return fieldToken.startsWith("editable-");
3590
+ const vid = raw.toLowerCase().replace(/[\s_-]/g, "");
3586
3591
  if (vid === "readonly") return false;
3587
3592
  return true;
3588
3593
  };
@@ -3593,6 +3598,9 @@ var normalizeRelationViewType = (rawVid) => {
3593
3598
  if (normalized === "editablelist") return "editable-list";
3594
3599
  if (normalized === "list") return "list";
3595
3600
  if (normalized === "csv") return "csv";
3601
+ if (normalized === "readandeditlist") return "read-and-edit-list";
3602
+ if (normalized === "readandeditcsv") return "read-and-edit-csv";
3603
+ if (normalized === "editablecsv") return "editable-csv";
3596
3604
  if (normalized === "gallery" || normalized === "image") return "gallery";
3597
3605
  if (normalized === "calendar" || normalized === "week" || normalized === "month") return "calendar";
3598
3606
  if (normalized === "primary") return "primary";
@@ -3601,6 +3609,47 @@ var normalizeRelationViewType = (rawVid) => {
3601
3609
  if (normalized === "treedetails") return "tree-details";
3602
3610
  return "";
3603
3611
  };
3612
+ var FIELD_VIEW_TYPE_TOKENS = /* @__PURE__ */ new Set([
3613
+ "read-only-field",
3614
+ "editable-field",
3615
+ "read-only-password",
3616
+ "editable-password",
3617
+ "read-only-textarea",
3618
+ "editable-textarea",
3619
+ "read-only-markdown",
3620
+ "editable-markdown",
3621
+ "read-only-json",
3622
+ "editable-json",
3623
+ "read-only-url",
3624
+ "editable-url",
3625
+ "read-only-email",
3626
+ "editable-email",
3627
+ "read-only-currency",
3628
+ "editable-currency",
3629
+ "read-only-percentage",
3630
+ "editable-percentage",
3631
+ "read-only-progress",
3632
+ "editable-progress",
3633
+ "read-only-rating",
3634
+ "editable-rating",
3635
+ "read-only-duration",
3636
+ "editable-duration",
3637
+ "read-only-phone",
3638
+ "editable-phone",
3639
+ "read-only-color",
3640
+ "editable-color",
3641
+ "read-only-code",
3642
+ "editable-code",
3643
+ "read-only-image-url",
3644
+ "editable-image-url",
3645
+ "read-only-qrcode",
3646
+ "read-only-relative",
3647
+ "read-only-truncated-text"
3648
+ ]);
3649
+ var normalizeFieldViewType = (raw) => {
3650
+ const normalized = String(raw || "").trim().toLowerCase().replace(/[\s_]/g, "-").replace(/-+/g, "-");
3651
+ return FIELD_VIEW_TYPE_TOKENS.has(normalized) ? normalized : "";
3652
+ };
3604
3653
  var applyRelationViewOverride = (rel, item, mode) => {
3605
3654
  const rawVid = getConfigVid(item, mode);
3606
3655
  const vid = normalizeRelationViewType(rawVid);
@@ -3997,7 +4046,7 @@ var parseInlineStyle = (styleText) => {
3997
4046
  return styleText.split(";").map((chunk) => chunk.trim()).filter(Boolean).reduce((acc, rule) => {
3998
4047
  const [rawKey, rawValue] = rule.split(":").map((part) => part.trim());
3999
4048
  if (!rawKey || !rawValue) return acc;
4000
- const camelKey = rawKey.replace(/-([a-z])/g, (_39, char) => char.toUpperCase());
4049
+ const camelKey = rawKey.replace(/-([a-z])/g, (_41, char) => char.toUpperCase());
4001
4050
  acc[camelKey] = rawValue;
4002
4051
  return acc;
4003
4052
  }, {});
@@ -5828,7 +5877,7 @@ body, table, th, td, input, button, select, textarea, div, span, p, li, ul, ol {
5828
5877
 
5829
5878
  // src/components/DynamicResource/relations/helpers.ts
5830
5879
  var _9 = window._ || ((text) => text);
5831
- var INLINE_RELATION_VIEW_TYPES = /* @__PURE__ */ new Set(["list", "csv"]);
5880
+ var INLINE_RELATION_VIEW_TYPES = /* @__PURE__ */ new Set(["list", "csv", "read-and-edit-list", "read-and-edit-csv", "editable-csv"]);
5832
5881
  var TABLE_RELATION_VIEW_TYPES = /* @__PURE__ */ new Set(["table", "totals-details"]);
5833
5882
  var isInlineRelationViewType = (viewType) => INLINE_RELATION_VIEW_TYPES.has(viewType);
5834
5883
  var usesTableRelationBehavior = (viewType) => TABLE_RELATION_VIEW_TYPES.has(viewType);
@@ -5843,10 +5892,10 @@ var getRelationViewType = (rel, mode, defaults) => {
5843
5892
  const showFallback = defaults?.show || "totals-details";
5844
5893
  const editFallback = defaults?.edit || "editable-table";
5845
5894
  if (mode === "show") {
5846
- if (rel.showViewTypeFromCsv && rel.showViewType) return rel.showViewType;
5895
+ if (rel.showViewType) return rel.showViewType;
5847
5896
  return showFallback;
5848
5897
  }
5849
- if (rel.editViewTypeFromCsv && rel.editViewType) return rel.editViewType;
5898
+ if (rel.editViewType) return rel.editViewType;
5850
5899
  return editFallback;
5851
5900
  };
5852
5901
  var getRelationTabName = (rel, mode, fallback) => {
@@ -6389,17 +6438,49 @@ var fetchPolymorphicGroups = async ({
6389
6438
  });
6390
6439
  return { groups, unresolved, labelsById };
6391
6440
  };
6441
+
6442
+ // src/components/DynamicResource/utils/navigation.ts
6443
+ var getShowHref = (resource, id, allModels) => {
6444
+ const resourcePath = resolveResourcePath(resource, allModels);
6445
+ return `/${resourcePath}/show/${id}`;
6446
+ };
6447
+ var shouldHandleLinkClick = (event) => {
6448
+ if (event.defaultPrevented) return false;
6449
+ if (event.button !== 0) return false;
6450
+ if (event.metaKey || event.ctrlKey || event.shiftKey || event.altKey) return false;
6451
+ return true;
6452
+ };
6392
6453
  var ReferenceField = ({ id, resource, onLabel }) => {
6393
6454
  const { data, isLoading } = core.useOne({ resource, id, queryOptions: { enabled: !!id } });
6394
6455
  const record = data?.data;
6395
6456
  const label = record?._label || record?.name || record?.description || id;
6457
+ const go = core.useGo();
6458
+ const paneNav = usePaneNavigation();
6459
+ const { token } = antd.theme.useToken();
6396
6460
  React6.useEffect(() => {
6397
6461
  if (onLabel && !isLoading && label !== void 0 && label !== null) {
6398
6462
  onLabel(String(label));
6399
6463
  }
6400
6464
  }, [label, onLabel, isLoading]);
6401
6465
  if (isLoading) return /* @__PURE__ */ jsxRuntime.jsx(antd.Skeleton.Input, { active: true, size: "small", style: { width: 100 } });
6402
- return /* @__PURE__ */ jsxRuntime.jsx("span", { children: label });
6466
+ const href = getShowHref(resource, id);
6467
+ return /* @__PURE__ */ jsxRuntime.jsx(
6468
+ "a",
6469
+ {
6470
+ href,
6471
+ onClick: (e) => {
6472
+ if (!shouldHandleLinkClick(e)) return;
6473
+ e.preventDefault();
6474
+ if (paneNav?.isInMultiPane) {
6475
+ paneNav.openDetail(resource, id);
6476
+ } else {
6477
+ go({ to: { resource, action: "show", id } });
6478
+ }
6479
+ },
6480
+ style: { color: token.colorLink, textDecoration: "none", cursor: "pointer" },
6481
+ children: label
6482
+ }
6483
+ );
6403
6484
  };
6404
6485
  var RelatedObjectPreview = ({ resource, id, model, allModels, fallbackLabel }) => {
6405
6486
  const { data, isLoading } = core.useOne({ resource, id, queryOptions: { enabled: !!id } });
@@ -6972,8 +7053,150 @@ var renderOptionTag = (field, rawValue) => {
6972
7053
  const color = colorMap[String(rawValue)] || getFallbackColor(label);
6973
7054
  return /* @__PURE__ */ jsxRuntime.jsx(antd.Tag, { color, style: { marginInlineEnd: 0, borderRadius: 8, fontWeight: 500 }, children: label });
6974
7055
  };
7056
+ dayjs8__default.default.extend(relativeTime__default.default);
6975
7057
  var _16 = window._ || ((text) => text);
6976
- var CALENDAR_WEEKDAYS = [_16("Sun"), _16("Mon"), _16("Tue"), _16("Wed"), _16("Thu"), _16("Fri"), _16("Sat")];
7058
+ var ReactMarkdown = React6.lazy(() => import('react-markdown').then((m) => ({ default: m.default })));
7059
+ var QRCodeSVG = React6.lazy(() => import('qrcode.react').then((m) => ({ default: m.QRCodeSVG })));
7060
+ function formatDuration(totalSeconds) {
7061
+ const h = Math.floor(totalSeconds / 3600);
7062
+ const m = Math.floor(totalSeconds % 3600 / 60);
7063
+ const s = totalSeconds % 60;
7064
+ const parts = [];
7065
+ if (h) parts.push(`${h}h`);
7066
+ if (m) parts.push(`${m}m`);
7067
+ if (s || !parts.length) parts.push(`${s}s`);
7068
+ return parts.join(" ");
7069
+ }
7070
+ var TALL_VIEW_TYPE_TOKENS = /* @__PURE__ */ new Set([
7071
+ "read-only-markdown",
7072
+ "read-only-json",
7073
+ "read-only-code",
7074
+ "read-only-textarea",
7075
+ "read-only-image-url"
7076
+ ]);
7077
+ var renderFieldViewTypeReadOnly = (token, value, inTable) => {
7078
+ const str = value === null || value === void 0 ? "" : String(value);
7079
+ const isEmpty = str === "" || str === "null" || str === "undefined";
7080
+ if (isEmpty && token !== "read-only-password" && token !== "read-only-progress" && token !== "read-only-rating") return "-";
7081
+ switch (token) {
7082
+ case "read-only-password":
7083
+ return /* @__PURE__ */ jsxRuntime.jsx("span", { style: { letterSpacing: 2 }, children: str ? "\u25CF\u25CF\u25CF\u25CF\u25CF\u25CF" : "-" });
7084
+ case "read-only-textarea":
7085
+ return /* @__PURE__ */ jsxRuntime.jsx(
7086
+ antd.Input.TextArea,
7087
+ {
7088
+ value: str,
7089
+ autoSize: { minRows: 2, maxRows: 12 },
7090
+ readOnly: true,
7091
+ style: { resize: "vertical", background: "transparent", border: "none", padding: 0, boxShadow: "none" }
7092
+ }
7093
+ );
7094
+ case "read-only-markdown":
7095
+ return /* @__PURE__ */ jsxRuntime.jsx(React6.Suspense, { fallback: /* @__PURE__ */ jsxRuntime.jsx(antd.Skeleton.Input, { active: true, size: "small", style: { width: 200 } }), children: /* @__PURE__ */ jsxRuntime.jsx(ReactMarkdown, { children: str }) });
7096
+ case "read-only-json": {
7097
+ let formatted = str;
7098
+ try {
7099
+ formatted = JSON.stringify(JSON.parse(str), null, 2);
7100
+ } catch {
7101
+ }
7102
+ return /* @__PURE__ */ jsxRuntime.jsx("pre", { style: { margin: 0, fontSize: 12, whiteSpace: "pre-wrap", wordBreak: "break-all" }, children: formatted });
7103
+ }
7104
+ case "read-only-url":
7105
+ return /* @__PURE__ */ jsxRuntime.jsx("a", { href: str, target: "_blank", rel: "noopener noreferrer", children: str });
7106
+ case "read-only-email":
7107
+ return /* @__PURE__ */ jsxRuntime.jsx("a", { href: `mailto:${str}`, children: str });
7108
+ case "read-only-currency": {
7109
+ const num = parseFloat(str);
7110
+ if (isNaN(num)) return str || "-";
7111
+ return /* @__PURE__ */ jsxRuntime.jsx(jsxRuntime.Fragment, { children: new Intl.NumberFormat("en-US", { style: "currency", currency: "USD" }).format(num) });
7112
+ }
7113
+ case "read-only-percentage": {
7114
+ const num = parseFloat(str);
7115
+ if (isNaN(num)) return str || "-";
7116
+ return /* @__PURE__ */ jsxRuntime.jsx(jsxRuntime.Fragment, { children: `${num} %` });
7117
+ }
7118
+ case "read-only-progress": {
7119
+ const num = Math.max(0, Math.min(100, parseFloat(str) || 0));
7120
+ return /* @__PURE__ */ jsxRuntime.jsx(antd.Progress, { percent: num, size: "small", style: { marginBottom: 0 } });
7121
+ }
7122
+ case "read-only-rating": {
7123
+ const num = parseFloat(str) || 0;
7124
+ return /* @__PURE__ */ jsxRuntime.jsx(antd.Rate, { disabled: true, value: num });
7125
+ }
7126
+ case "read-only-duration": {
7127
+ const secs = parseInt(str) || 0;
7128
+ return /* @__PURE__ */ jsxRuntime.jsx(jsxRuntime.Fragment, { children: formatDuration(secs) });
7129
+ }
7130
+ case "read-only-phone":
7131
+ return /* @__PURE__ */ jsxRuntime.jsx("a", { href: `tel:${str}`, children: str });
7132
+ case "read-only-color":
7133
+ return /* @__PURE__ */ jsxRuntime.jsxs("span", { style: { display: "inline-flex", alignItems: "center", gap: 6 }, children: [
7134
+ /* @__PURE__ */ jsxRuntime.jsx("span", { style: { display: "inline-block", width: 16, height: 16, background: str, border: "1px solid #d9d9d9", borderRadius: 2, flexShrink: 0 } }),
7135
+ str
7136
+ ] });
7137
+ case "read-only-code":
7138
+ return /* @__PURE__ */ jsxRuntime.jsx("pre", { style: { margin: 0, fontSize: 12, fontFamily: "monospace", whiteSpace: "pre-wrap", wordBreak: "break-all" }, children: str });
7139
+ case "read-only-image-url":
7140
+ return /* @__PURE__ */ jsxRuntime.jsx("a", { href: str, target: "_blank", rel: "noopener noreferrer", children: /* @__PURE__ */ jsxRuntime.jsx("img", { src: str, alt: "", style: { maxWidth: "100%", maxHeight: 200, objectFit: "contain", borderRadius: 4, display: "block" } }) });
7141
+ case "read-only-qrcode":
7142
+ return /* @__PURE__ */ jsxRuntime.jsx(React6.Suspense, { fallback: /* @__PURE__ */ jsxRuntime.jsx(antd.Skeleton.Input, { active: true, size: "small", style: { width: 128 } }), children: /* @__PURE__ */ jsxRuntime.jsx(QRCodeSVG, { value: str, size: 128 }) });
7143
+ case "read-only-relative": {
7144
+ const parsed = dayjs8__default.default(str);
7145
+ if (!parsed.isValid()) return str || "-";
7146
+ return /* @__PURE__ */ jsxRuntime.jsx(jsxRuntime.Fragment, { children: parsed.fromNow() });
7147
+ }
7148
+ case "read-only-truncated-text":
7149
+ return /* @__PURE__ */ jsxRuntime.jsx(antd.Tooltip, { title: str, children: /* @__PURE__ */ jsxRuntime.jsx("span", { style: { display: "block", overflow: "hidden", textOverflow: "ellipsis", whiteSpace: "nowrap", cursor: "default" }, children: str }) });
7150
+ default:
7151
+ return str || "-";
7152
+ }
7153
+ };
7154
+ var wrapForTable = (node) => /* @__PURE__ */ jsxRuntime.jsx("div", { style: { maxHeight: 120, overflowY: "auto", overflowX: "hidden" }, children: node });
7155
+ var renderFieldValue = (field, record, allModels, inTable) => {
7156
+ const value = record?.[field.key];
7157
+ const isNlSentenceField = field.key === "nl_sentence" || field.key === "nl_asks_sentence";
7158
+ if (isNlSentenceField) {
7159
+ return /* @__PURE__ */ jsxRuntime.jsx(
7160
+ antd.Input.TextArea,
7161
+ {
7162
+ value: value === null || value === void 0 ? "" : String(value),
7163
+ autoSize: { minRows: 3, maxRows: 18 },
7164
+ style: { resize: "vertical", background: "#f3f6f9" },
7165
+ placeholder: _16(field.key),
7166
+ readOnly: true
7167
+ }
7168
+ );
7169
+ }
7170
+ const showToken = normalizeFieldViewType(field.showViewType || "");
7171
+ if (showToken && showToken.startsWith("read-only-") && !(showToken === "read-only-field" && field.reference)) {
7172
+ const node = renderFieldViewTypeReadOnly(showToken, value);
7173
+ return inTable && TALL_VIEW_TYPE_TOKENS.has(showToken) ? wrapForTable(node) : node;
7174
+ }
7175
+ if (field.type === "boolean") {
7176
+ return value ? /* @__PURE__ */ jsxRuntime.jsx(icons.CheckCircleOutlined, { style: { color: "green", fontSize: "1.2em" } }) : /* @__PURE__ */ jsxRuntime.jsx(icons.CloseCircleOutlined, { style: { color: "red", fontSize: "1.2em" } });
7177
+ }
7178
+ if (field.reference && value && hasReferenceModel(field.reference, allModels)) {
7179
+ return /* @__PURE__ */ jsxRuntime.jsx(ReferenceField, { id: value, resource: resolveResourcePath(field.referencePath || field.reference, allModels) });
7180
+ }
7181
+ if (field.type === "number") {
7182
+ return formatNumberValue(value) ?? "-";
7183
+ }
7184
+ if (field.type === "date") {
7185
+ return formatDateValue(value) ?? "-";
7186
+ }
7187
+ if (field.type === "datetime") {
7188
+ return formatDateTimeValue(value) ?? "-";
7189
+ }
7190
+ if (field.type === "time") {
7191
+ return formatTimeValue(value);
7192
+ }
7193
+ if (field.options && value !== void 0 && value !== null) {
7194
+ return renderOptionTag(field, value);
7195
+ }
7196
+ return value ?? "-";
7197
+ };
7198
+ var _17 = window._ || ((text) => text);
7199
+ var CALENDAR_WEEKDAYS = [_17("Sun"), _17("Mon"), _17("Tue"), _17("Wed"), _17("Thu"), _17("Fri"), _17("Sat")];
6977
7200
  var CALENDAR_DATE_FOOTER_FIELDS = /* @__PURE__ */ new Set(["creation_date", "modification_date"]);
6978
7201
  var isCalendarDateField = (field) => {
6979
7202
  const rawType = String(field?.type || "").trim().toLowerCase();
@@ -7001,22 +7224,10 @@ var getCalendarDateFieldOptions = (fields) => {
7001
7224
  var getCalendarRecordDate = (record, fieldKey) => {
7002
7225
  const rawValue = record?.[fieldKey];
7003
7226
  if (rawValue === void 0 || rawValue === null || rawValue === "") return null;
7004
- const parsed = dayjs7__default.default(rawValue);
7227
+ const parsed = dayjs8__default.default(rawValue);
7005
7228
  if (!parsed.isValid()) return null;
7006
7229
  return parsed.startOf("day");
7007
7230
  };
7008
-
7009
- // src/components/DynamicResource/utils/navigation.ts
7010
- var getShowHref = (resource, id, allModels) => {
7011
- const resourcePath = resolveResourcePath(resource, allModels);
7012
- return `/${resourcePath}/show/${id}`;
7013
- };
7014
- var shouldHandleLinkClick = (event) => {
7015
- if (event.defaultPrevented) return false;
7016
- if (event.button !== 0) return false;
7017
- if (event.metaKey || event.ctrlKey || event.shiftKey || event.altKey) return false;
7018
- return true;
7019
- };
7020
7231
  var USER_KEY = "jm_user";
7021
7232
  function getCurrentUserRoles() {
7022
7233
  try {
@@ -7041,7 +7252,7 @@ function useRoleFilteredModel(model) {
7041
7252
  return { ...model, fields: filtered };
7042
7253
  }, [model, userRoles]);
7043
7254
  }
7044
- var _17 = window._ || ((text) => text);
7255
+ var _18 = window._ || ((text) => text);
7045
7256
  var DynamicShow = ({ model: modelProp, allModels, idOverride, embedded }) => {
7046
7257
  const model = useRoleFilteredModel(modelProp);
7047
7258
  applyI18nLabelsToModel(model);
@@ -7053,7 +7264,7 @@ var DynamicShow = ({ model: modelProp, allModels, idOverride, embedded }) => {
7053
7264
  const id = idOverride ?? routeId;
7054
7265
  const { formProps, saveButtonProps, record, recordId } = useShowEditableForm(model.resource || model.name, id);
7055
7266
  const { formProps: showFormProps, effectiveFields } = buildShowTabFormOptions(formProps, model, allModels);
7056
- const pageTitle = record?._label ? asDisplayText(record._label, `${_17("Show")} ${modelDisplayLabel}`) : `${_17("Show")} ${modelDisplayLabel}`;
7267
+ const pageTitle = record?._label ? asDisplayText(record._label, `${_18("Show")} ${modelDisplayLabel}`) : `${_18("Show")} ${modelDisplayLabel}`;
7057
7268
  const { actionsState, headerButtons } = useShowActionsPreferences(model, allModels, record, saveButtonProps);
7058
7269
  const [activeTabKey, setActiveTabKey] = React6.useState("details");
7059
7270
  const items = useStandardShowTabs(
@@ -7101,7 +7312,7 @@ var DynamicShow = ({ model: modelProp, allModels, idOverride, embedded }) => {
7101
7312
  title: renderWrappedPageTitle(renderModelHeading({
7102
7313
  model,
7103
7314
  title: pageTitle,
7104
- actionLabel: _17("Show"),
7315
+ actionLabel: _18("Show"),
7105
7316
  moduleLabel: model.module ? getModuleLabel(model.module) : void 0
7106
7317
  })),
7107
7318
  headerButtons,
@@ -7121,7 +7332,7 @@ var DynamicShow = ({ model: modelProp, allModels, idOverride, embedded }) => {
7121
7332
  )
7122
7333
  ] });
7123
7334
  };
7124
- var _18 = window._ || ((text) => text);
7335
+ var _19 = window._ || ((text) => text);
7125
7336
  var RELATION_SELECT_DEFAULT_PAGE_SIZE = 2e3;
7126
7337
  var RelationSelect = ({ field, value, onChange, allModels, multiple, serverSearch, excludeId }) => {
7127
7338
  const optionLabel = "_label";
@@ -7176,7 +7387,7 @@ var RelationSelect = ({ field, value, onChange, allModels, multiple, serverSearc
7176
7387
  }
7177
7388
  ),
7178
7389
  isCapped && /* @__PURE__ */ jsxRuntime.jsxs("div", { style: { display: "flex", alignItems: "center", justifyContent: "space-between", gap: 8, marginTop: 4 }, children: [
7179
- /* @__PURE__ */ jsxRuntime.jsx(antd.Typography.Text, { type: "secondary", style: { fontSize: 11 }, children: _18("Showing N of T \u2014 type to search").replace("N", formatNumberValue(loadedCount)).replace("T", formatNumberValue(serverTotal)) }),
7390
+ /* @__PURE__ */ jsxRuntime.jsx(antd.Typography.Text, { type: "secondary", style: { fontSize: 11 }, children: _19("Showing N of T \u2014 type to search").replace("N", formatNumberValue(loadedCount)).replace("T", formatNumberValue(serverTotal)) }),
7180
7391
  /* @__PURE__ */ jsxRuntime.jsx(
7181
7392
  antd.Button,
7182
7393
  {
@@ -7185,13 +7396,13 @@ var RelationSelect = ({ field, value, onChange, allModels, multiple, serverSearc
7185
7396
  style: { fontSize: 11, padding: 0 },
7186
7397
  loading: queryResult?.isLoading || queryResult?.isFetching,
7187
7398
  onClick: () => setLoadAll(true),
7188
- children: _18("Load all")
7399
+ children: _19("Load all")
7189
7400
  }
7190
7401
  )
7191
7402
  ] })
7192
7403
  ] });
7193
7404
  };
7194
- var _19 = window._ || ((text) => text);
7405
+ var _20 = window._ || ((text) => text);
7195
7406
  var FileUploadInput = ({ value: _value, onChange: _onChange }) => {
7196
7407
  const form = antd.Form.useFormInstance();
7197
7408
  const [uploading, setUploading] = React6.useState(false);
@@ -7200,7 +7411,7 @@ var FileUploadInput = ({ value: _value, onChange: _onChange }) => {
7200
7411
  const handleUpload = async (file) => {
7201
7412
  const recordId = form.getFieldValue("eid") ?? form.getFieldValue("id");
7202
7413
  if (!recordId) {
7203
- antd.message.error(_19("Save the record first before uploading a file."));
7414
+ antd.message.error(_20("Save the record first before uploading a file."));
7204
7415
  return false;
7205
7416
  }
7206
7417
  setUploading(true);
@@ -7224,9 +7435,9 @@ var FileUploadInput = ({ value: _value, onChange: _onChange }) => {
7224
7435
  data_hash: result.data_hash
7225
7436
  });
7226
7437
  setFileName(result.data_name || file.name);
7227
- antd.message.success(_19("File uploaded successfully."));
7438
+ antd.message.success(_20("File uploaded successfully."));
7228
7439
  } catch (err) {
7229
- antd.message.error(err?.message || _19("File upload failed."));
7440
+ antd.message.error(err?.message || _20("File upload failed."));
7230
7441
  } finally {
7231
7442
  setUploading(false);
7232
7443
  }
@@ -7243,9 +7454,9 @@ var FileUploadInput = ({ value: _value, onChange: _onChange }) => {
7243
7454
  style: { padding: "8px 16px" },
7244
7455
  children: [
7245
7456
  /* @__PURE__ */ jsxRuntime.jsx("p", { style: { marginBottom: 4 }, children: uploading ? /* @__PURE__ */ jsxRuntime.jsx(antd.Spin, { size: "small" }) : /* @__PURE__ */ jsxRuntime.jsx(icons.UploadOutlined, { style: { fontSize: 24, color: "#1677ff" } }) }),
7246
- /* @__PURE__ */ jsxRuntime.jsx("p", { style: { fontSize: 13, margin: 0 }, children: uploading ? _19("Uploading...") : _19("Click or drag a file here to upload") }),
7457
+ /* @__PURE__ */ jsxRuntime.jsx("p", { style: { fontSize: 13, margin: 0 }, children: uploading ? _20("Uploading...") : _20("Click or drag a file here to upload") }),
7247
7458
  displayName && !uploading && /* @__PURE__ */ jsxRuntime.jsxs("p", { style: { fontSize: 11, color: "#888", margin: "4px 0 0" }, children: [
7248
- _19("Current"),
7459
+ _20("Current"),
7249
7460
  ": ",
7250
7461
  displayName
7251
7462
  ] })
@@ -7253,7 +7464,7 @@ var FileUploadInput = ({ value: _value, onChange: _onChange }) => {
7253
7464
  }
7254
7465
  ) });
7255
7466
  };
7256
- var _20 = window._ || ((text) => text);
7467
+ var _21 = window._ || ((text) => text);
7257
7468
  var AsyncSelectInput = ({
7258
7469
  optionsUrl,
7259
7470
  placeholder,
@@ -7313,20 +7524,159 @@ var AsyncSelectInput = ({
7313
7524
  options,
7314
7525
  value,
7315
7526
  onChange,
7316
- placeholder: placeholder || _20("Select..."),
7527
+ placeholder: placeholder || _21("Select..."),
7317
7528
  style: { width: "100%" },
7318
7529
  filterOption: (input, option) => String(option?.label ?? "").toLowerCase().includes(input.toLowerCase())
7319
7530
  }
7320
7531
  );
7321
7532
  };
7322
- var _21 = window._ || ((text) => text);
7533
+ var _22 = window._ || ((text) => text);
7534
+ var ReactMarkdown2 = React6.lazy(() => import('react-markdown').then((m) => ({ default: m.default })));
7535
+ var MarkdownEditor = ({ value = "", onChange }) => {
7536
+ const [activeTab, setActiveTab] = React6.useState("edit");
7537
+ return /* @__PURE__ */ jsxRuntime.jsx(
7538
+ antd.Tabs,
7539
+ {
7540
+ activeKey: activeTab,
7541
+ onChange: setActiveTab,
7542
+ size: "small",
7543
+ style: { marginBottom: 0 },
7544
+ items: [
7545
+ {
7546
+ key: "edit",
7547
+ label: _22("Edit"),
7548
+ children: /* @__PURE__ */ jsxRuntime.jsx(
7549
+ antd.Input.TextArea,
7550
+ {
7551
+ value,
7552
+ onChange: (e) => onChange?.(e.target.value),
7553
+ autoSize: { minRows: 3, maxRows: 18 },
7554
+ style: { resize: "vertical" }
7555
+ }
7556
+ )
7557
+ },
7558
+ {
7559
+ key: "preview",
7560
+ label: _22("Preview"),
7561
+ children: /* @__PURE__ */ jsxRuntime.jsx("div", { style: { minHeight: 60, padding: "4px 0" }, children: /* @__PURE__ */ jsxRuntime.jsx(React6.Suspense, { fallback: /* @__PURE__ */ jsxRuntime.jsx(antd.Skeleton.Input, { active: true, size: "small", style: { width: 200 } }), children: /* @__PURE__ */ jsxRuntime.jsx(ReactMarkdown2, { children: value }) }) })
7562
+ }
7563
+ ]
7564
+ }
7565
+ );
7566
+ };
7567
+ var JsonEditor = ({ value = "", onChange }) => {
7568
+ const [error, setError] = React6.useState(null);
7569
+ const handleChange = (e) => {
7570
+ const raw = e.target.value;
7571
+ onChange?.(raw);
7572
+ if (!raw.trim()) {
7573
+ setError(null);
7574
+ return;
7575
+ }
7576
+ try {
7577
+ JSON.parse(raw);
7578
+ setError(null);
7579
+ } catch (ex) {
7580
+ setError(ex.message);
7581
+ }
7582
+ };
7583
+ return /* @__PURE__ */ jsxRuntime.jsxs("div", { children: [
7584
+ /* @__PURE__ */ jsxRuntime.jsx(
7585
+ antd.Input.TextArea,
7586
+ {
7587
+ value,
7588
+ onChange: handleChange,
7589
+ autoSize: { minRows: 3, maxRows: 18 },
7590
+ style: { resize: "vertical", fontFamily: "monospace", fontSize: 12 }
7591
+ }
7592
+ ),
7593
+ error && /* @__PURE__ */ jsxRuntime.jsx(antd.Alert, { type: "error", message: error, showIcon: true, style: { marginTop: 4, padding: "2px 8px", fontSize: 11 } })
7594
+ ] });
7595
+ };
7596
+ var renderEditableFieldViewType = (token, value, onChange) => {
7597
+ const str = value === null || value === void 0 ? "" : String(value);
7598
+ switch (token) {
7599
+ case "editable-password":
7600
+ return /* @__PURE__ */ jsxRuntime.jsx(antd.Input.Password, { value: str, onChange: (e) => onChange?.(e.target.value) });
7601
+ case "editable-textarea":
7602
+ return /* @__PURE__ */ jsxRuntime.jsx(antd.Input.TextArea, { value: str, onChange: (e) => onChange?.(e.target.value), autoSize: { minRows: 3, maxRows: 18 }, style: { resize: "vertical" } });
7603
+ case "editable-markdown":
7604
+ return /* @__PURE__ */ jsxRuntime.jsx(MarkdownEditor, { value: str, onChange });
7605
+ case "editable-json":
7606
+ return /* @__PURE__ */ jsxRuntime.jsx(JsonEditor, { value: str, onChange });
7607
+ case "editable-url":
7608
+ return /* @__PURE__ */ jsxRuntime.jsxs("div", { children: [
7609
+ /* @__PURE__ */ jsxRuntime.jsx(antd.Input, { value: str, onChange: (e) => onChange?.(e.target.value), placeholder: "https://..." }),
7610
+ str && /* @__PURE__ */ jsxRuntime.jsx("div", { style: { marginTop: 2, fontSize: 11 }, children: /* @__PURE__ */ jsxRuntime.jsx("a", { href: str, target: "_blank", rel: "noopener noreferrer", children: str }) })
7611
+ ] });
7612
+ case "editable-email":
7613
+ return /* @__PURE__ */ jsxRuntime.jsx(antd.Input, { type: "email", value: str, onChange: (e) => onChange?.(e.target.value), placeholder: "user@example.com" });
7614
+ case "editable-currency": {
7615
+ const num = value === null || value === void 0 ? void 0 : Number(value);
7616
+ return /* @__PURE__ */ jsxRuntime.jsx(antd.InputNumber, { style: { width: "100%" }, value: isNaN(num) ? void 0 : num, onChange, addonBefore: "$", precision: 2, step: 0.01 });
7617
+ }
7618
+ case "editable-percentage": {
7619
+ const num = value === null || value === void 0 ? void 0 : Number(value);
7620
+ return /* @__PURE__ */ jsxRuntime.jsx(antd.InputNumber, { style: { width: "100%" }, value: isNaN(num) ? void 0 : num, onChange, addonAfter: "%", step: 0.1 });
7621
+ }
7622
+ case "editable-progress": {
7623
+ const num = value === null || value === void 0 ? void 0 : Number(value);
7624
+ return /* @__PURE__ */ jsxRuntime.jsx(antd.InputNumber, { style: { width: "100%" }, value: isNaN(num) ? void 0 : num, onChange, min: 0, max: 100, addonAfter: "%", precision: 0 });
7625
+ }
7626
+ case "editable-rating":
7627
+ return /* @__PURE__ */ jsxRuntime.jsx(antd.Rate, { value: Number(value) || 0, onChange });
7628
+ case "editable-duration": {
7629
+ const num = value === null || value === void 0 ? void 0 : Number(value);
7630
+ return /* @__PURE__ */ jsxRuntime.jsx(antd.InputNumber, { style: { width: "100%" }, value: isNaN(num) ? void 0 : num, onChange, min: 0, precision: 0, addonAfter: "s" });
7631
+ }
7632
+ case "editable-phone":
7633
+ return /* @__PURE__ */ jsxRuntime.jsx(antd.Input, { type: "tel", value: str, onChange: (e) => onChange?.(e.target.value), placeholder: "+1 555 000 0000" });
7634
+ case "editable-color":
7635
+ return /* @__PURE__ */ jsxRuntime.jsxs("div", { style: { display: "flex", alignItems: "center", gap: 8 }, children: [
7636
+ /* @__PURE__ */ jsxRuntime.jsx(
7637
+ "input",
7638
+ {
7639
+ type: "color",
7640
+ value: str || "#000000",
7641
+ onChange: (e) => onChange?.(e.target.value),
7642
+ style: { width: 36, height: 28, border: "1px solid #d9d9d9", borderRadius: 4, padding: 2, cursor: "pointer", flexShrink: 0 }
7643
+ }
7644
+ ),
7645
+ /* @__PURE__ */ jsxRuntime.jsx(antd.Input, { value: str, onChange: (e) => onChange?.(e.target.value), placeholder: "#000000", style: { flex: 1 } })
7646
+ ] });
7647
+ case "editable-code":
7648
+ return /* @__PURE__ */ jsxRuntime.jsx(
7649
+ antd.Input.TextArea,
7650
+ {
7651
+ value: str,
7652
+ onChange: (e) => onChange?.(e.target.value),
7653
+ autoSize: { minRows: 3, maxRows: 18 },
7654
+ style: { resize: "vertical", fontFamily: "monospace", fontSize: 12 }
7655
+ }
7656
+ );
7657
+ case "editable-image-url":
7658
+ return /* @__PURE__ */ jsxRuntime.jsxs("div", { children: [
7659
+ /* @__PURE__ */ jsxRuntime.jsx(antd.Input, { value: str, onChange: (e) => onChange?.(e.target.value), placeholder: "https://..." }),
7660
+ str && /* @__PURE__ */ jsxRuntime.jsx(
7661
+ "img",
7662
+ {
7663
+ src: str,
7664
+ alt: "",
7665
+ style: { marginTop: 4, maxWidth: "100%", maxHeight: 120, objectFit: "contain", borderRadius: 4, display: "block" }
7666
+ }
7667
+ )
7668
+ ] });
7669
+ default:
7670
+ return null;
7671
+ }
7672
+ };
7323
7673
  var renderInput = (field, allModels, model, currentId) => {
7324
7674
  const resolvedField = model && allModels ? applyRelationFieldOverrides(model, allModels).find((item) => item.key === field.key) || field : field;
7325
7675
  if (resolvedField.key === "data" && isFileModel(model)) {
7326
7676
  return /* @__PURE__ */ jsxRuntime.jsx(FileUploadInput, {});
7327
7677
  }
7328
7678
  const isNlSentenceField = resolvedField.key === "nl_sentence" || resolvedField.key === "nl_asks_sentence";
7329
- const sentenceFieldHelper = _21(resolvedField.key);
7679
+ const sentenceFieldHelper = _22(resolvedField.key);
7330
7680
  if (isNlSentenceField) {
7331
7681
  return /* @__PURE__ */ jsxRuntime.jsx(
7332
7682
  antd.Input.TextArea,
@@ -7340,21 +7690,26 @@ var renderInput = (field, allModels, model, currentId) => {
7340
7690
  if (resolvedField.readOnly) {
7341
7691
  return /* @__PURE__ */ jsxRuntime.jsx(antd.Input, { disabled: true });
7342
7692
  }
7693
+ const editToken = normalizeFieldViewType(resolvedField.editViewType || "");
7694
+ if (editToken && editToken.startsWith("editable-")) {
7695
+ const Wrapper = ({ value, onChange }) => renderEditableFieldViewType(editToken, value, onChange);
7696
+ return /* @__PURE__ */ jsxRuntime.jsx(Wrapper, {});
7697
+ }
7343
7698
  if (resolvedField.reference && hasReferenceModel(resolvedField.reference, allModels)) {
7344
7699
  const refResource = resolveResourcePath(resolvedField.reference, allModels);
7345
7700
  const modelResource = model ? resolveResourcePath(model.resource || model.name, allModels) : void 0;
7346
7701
  const isSelfRef = refResource && modelResource && refResource === modelResource;
7347
7702
  return /* @__PURE__ */ jsxRuntime.jsx(RelationSelect, { field: resolvedField, allModels, excludeId: isSelfRef ? currentId : void 0 });
7348
7703
  }
7349
- if (resolvedField.optionsUrl) return /* @__PURE__ */ jsxRuntime.jsx(AsyncSelectInput, { optionsUrl: resolvedField.optionsUrl, placeholder: `${_21("Select")} ${_21(resolvedField.label)}...` });
7704
+ if (resolvedField.optionsUrl) return /* @__PURE__ */ jsxRuntime.jsx(AsyncSelectInput, { optionsUrl: resolvedField.optionsUrl, placeholder: `${_22("Select")} ${_22(resolvedField.label)}...` });
7350
7705
  if (resolvedField.options) return /* @__PURE__ */ jsxRuntime.jsx(antd.Select, { options: resolvedField.options, style: { width: "100%" }, placeholder: `Select ${resolvedField.label}...`, allowClear: true });
7351
7706
  switch (resolvedField.type) {
7352
7707
  case "boolean":
7353
7708
  return /* @__PURE__ */ jsxRuntime.jsx(antd.Checkbox, {});
7354
7709
  case "date":
7355
- return /* @__PURE__ */ jsxRuntime.jsx(antd.DatePicker, { style: { width: "100%" }, placeholder: _21("Select date") });
7710
+ return /* @__PURE__ */ jsxRuntime.jsx(antd.DatePicker, { style: { width: "100%" }, placeholder: _22("Select date") });
7356
7711
  case "datetime":
7357
- return /* @__PURE__ */ jsxRuntime.jsx(antd.DatePicker, { showTime: true, style: { width: "100%" }, placeholder: _21("Select date and time") });
7712
+ return /* @__PURE__ */ jsxRuntime.jsx(antd.DatePicker, { showTime: true, style: { width: "100%" }, placeholder: _22("Select date and time") });
7358
7713
  case "time":
7359
7714
  return /* @__PURE__ */ jsxRuntime.jsx(antd.TimePicker, { style: { width: "100%" } });
7360
7715
  case "number":
@@ -7363,45 +7718,6 @@ var renderInput = (field, allModels, model, currentId) => {
7363
7718
  return /* @__PURE__ */ jsxRuntime.jsx(antd.Input, {});
7364
7719
  }
7365
7720
  };
7366
- var _22 = window._ || ((text) => text);
7367
- var renderFieldValue = (field, record, allModels) => {
7368
- const isNlSentenceField = field.key === "nl_sentence" || field.key === "nl_asks_sentence";
7369
- if (isNlSentenceField) {
7370
- const value = record?.[field.key];
7371
- return /* @__PURE__ */ jsxRuntime.jsx(
7372
- antd.Input.TextArea,
7373
- {
7374
- value: value === null || value === void 0 ? "" : String(value),
7375
- autoSize: { minRows: 3, maxRows: 18 },
7376
- style: { resize: "vertical", background: "#f3f6f9" },
7377
- placeholder: _22(field.key),
7378
- readOnly: true
7379
- }
7380
- );
7381
- }
7382
- if (field.type === "boolean") {
7383
- return record?.[field.key] ? /* @__PURE__ */ jsxRuntime.jsx(icons.CheckCircleOutlined, { style: { color: "green", fontSize: "1.2em" } }) : /* @__PURE__ */ jsxRuntime.jsx(icons.CloseCircleOutlined, { style: { color: "red", fontSize: "1.2em" } });
7384
- }
7385
- if (field.reference && record?.[field.key] && hasReferenceModel(field.reference, allModels)) {
7386
- return /* @__PURE__ */ jsxRuntime.jsx(ReferenceField, { id: record[field.key], resource: resolveResourcePath(field.referencePath || field.reference, allModels) });
7387
- }
7388
- if (field.type === "number") {
7389
- return formatNumberValue(record?.[field.key]) ?? "-";
7390
- }
7391
- if (field.type === "date") {
7392
- return formatDateValue(record?.[field.key]) ?? "-";
7393
- }
7394
- if (field.type === "datetime") {
7395
- return formatDateTimeValue(record?.[field.key]) ?? "-";
7396
- }
7397
- if (field.type === "time") {
7398
- return formatTimeValue(record?.[field.key]);
7399
- }
7400
- if (field.options && record?.[field.key] !== void 0 && record?.[field.key] !== null) {
7401
- return renderOptionTag(field, record[field.key]);
7402
- }
7403
- return record?.[field.key] ?? "-";
7404
- };
7405
7721
  var _23 = window._ || ((text) => text);
7406
7722
  var { Title: Title2 } = antd.Typography;
7407
7723
  var DynamicCreate = ({ model: modelProp, allModels, journeyCallbacks, injectedValues }) => {
@@ -7666,7 +7982,7 @@ var DynamicCreate = ({ model: modelProp, allModels, journeyCallbacks, injectedVa
7666
7982
  name: field.key,
7667
7983
  rules: field.required ? [{ required: true }] : [],
7668
7984
  valuePropName: field.type === "boolean" ? "checked" : void 0,
7669
- getValueProps: (val) => (field.type === "date" || field.type === "datetime") && val ? { value: dayjs7__default.default(val) } : field.type === "time" && val ? { value: dayjs7__default.default("1970-01-01T" + val) } : { value: val },
7985
+ getValueProps: (val) => (field.type === "date" || field.type === "datetime") && val ? { value: dayjs8__default.default(val) } : field.type === "time" && val ? { value: dayjs8__default.default("1970-01-01T" + val) } : { value: val },
7670
7986
  style: { margin: 0 },
7671
7987
  children: renderInput(field, allModels, model)
7672
7988
  }
@@ -7739,7 +8055,7 @@ var DynamicCreate = ({ model: modelProp, allModels, journeyCallbacks, injectedVa
7739
8055
  const prefix = useReadonly ? "pc" : "cr";
7740
8056
  return /* @__PURE__ */ jsxRuntime.jsxs("div", { style: { border: `1px solid ${token.colorBorder}`, borderRadius: 8, padding: "6px 6px", marginBottom: 6 }, children: [
7741
8057
  /* @__PURE__ */ jsxRuntime.jsx(Title2, { level: 5, style: { margin: 0, marginBottom: 6, color: "#1677ff" }, children: _23(section) }),
7742
- /* @__PURE__ */ jsxRuntime.jsx("table", { style: { width: "100%", borderCollapse: "collapse", tableLayout: "fixed" }, children: /* @__PURE__ */ jsxRuntime.jsx("tbody", { children: Array.from({ length: maxRow }).map((_39, rowIdx) => /* @__PURE__ */ jsxRuntime.jsx("tr", { children: Array.from({ length: maxCol }).map((_40, colIdx) => {
8058
+ /* @__PURE__ */ jsxRuntime.jsx("table", { style: { width: "100%", borderCollapse: "collapse", tableLayout: "fixed" }, children: /* @__PURE__ */ jsxRuntime.jsx("tbody", { children: Array.from({ length: maxRow }).map((_41, rowIdx) => /* @__PURE__ */ jsxRuntime.jsx("tr", { children: Array.from({ length: maxCol }).map((_42, colIdx) => {
7743
8059
  const cellItems = normalized.filter((r) => r.row === rowIdx + 1 && r.column === colIdx + 1);
7744
8060
  return /* @__PURE__ */ jsxRuntime.jsx("td", { style: { padding: "0 4px", verticalAlign: "top", width: `${100 / maxCol}%` }, children: cellItems.map(
7745
8061
  (item, idx) => useReadonly ? renderReadonlyCell(item, idx) : renderFormCell(item, idx)
@@ -7758,7 +8074,7 @@ var DynamicCreate = ({ model: modelProp, allModels, journeyCallbacks, injectedVa
7758
8074
  }
7759
8075
  return /* @__PURE__ */ jsxRuntime.jsxs("div", { style: { display: "grid", gridTemplateColumns: "200px 1fr", justifyContent: "start", alignItems: "start", columnGap: 6 }, children: [
7760
8076
  /* @__PURE__ */ jsxRuntime.jsx("span", { style: labelStyle, children: field.label }),
7761
- /* @__PURE__ */ jsxRuntime.jsx("div", { style: { padding: "2px 4px", lineHeight: 1.15, maxWidth: "100%", overflowWrap: "anywhere" }, children: /* @__PURE__ */ jsxRuntime.jsx(antd.Form.Item, { name: field.key, rules: field.required ? [{ required: true }] : [], valuePropName: field.type === "boolean" ? "checked" : void 0, getValueProps: (val) => (field.type === "date" || field.type === "datetime") && val ? { value: dayjs7__default.default(val) } : field.type === "time" && val ? { value: dayjs7__default.default("1970-01-01T" + val) } : { value: val }, style: { margin: 0 }, children: renderInput(field, allModels, model) }) })
8077
+ /* @__PURE__ */ jsxRuntime.jsx("div", { style: { padding: "2px 4px", lineHeight: 1.15, maxWidth: "100%", overflowWrap: "anywhere" }, children: /* @__PURE__ */ jsxRuntime.jsx(antd.Form.Item, { name: field.key, rules: field.required ? [{ required: true }] : [], valuePropName: field.type === "boolean" ? "checked" : void 0, getValueProps: (val) => (field.type === "date" || field.type === "datetime") && val ? { value: dayjs8__default.default(val) } : field.type === "time" && val ? { value: dayjs8__default.default("1970-01-01T" + val) } : { value: val }, style: { margin: 0 }, children: renderInput(field, allModels, model) }) })
7762
8078
  ] }, field.key);
7763
8079
  }) }) })
7764
8080
  ] }),
@@ -8317,7 +8633,7 @@ var DynamicEdit = ({ model: modelProp, allModels, topContent, extraHeaderButtons
8317
8633
  name: field.key,
8318
8634
  rules: field.required && !field.formula ? [{ required: true }] : [],
8319
8635
  valuePropName: field.type === "boolean" ? "checked" : void 0,
8320
- getValueProps: (val) => (field.type === "date" || field.type === "datetime") && val ? { value: dayjs7__default.default(val) } : field.type === "time" && val ? { value: dayjs7__default.default("1970-01-01T" + val) } : { value: val },
8636
+ getValueProps: (val) => (field.type === "date" || field.type === "datetime") && val ? { value: dayjs8__default.default(val) } : field.type === "time" && val ? { value: dayjs8__default.default("1970-01-01T" + val) } : { value: val },
8321
8637
  style: { margin: 0 },
8322
8638
  children: field.formula ? /* @__PURE__ */ jsxRuntime.jsx(antd.Input, { disabled: true }) : renderInput(field, allModels, model, recordId)
8323
8639
  }
@@ -8359,7 +8675,7 @@ var DynamicEdit = ({ model: modelProp, allModels, topContent, extraHeaderButtons
8359
8675
  },
8360
8676
  children: [
8361
8677
  /* @__PURE__ */ jsxRuntime.jsx(Title3, { level: 5, style: { margin: 0, color: "#1677ff" }, children: _24(section) }),
8362
- /* @__PURE__ */ jsxRuntime.jsx("table", { style: { width: "100%", borderCollapse: "collapse", tableLayout: "fixed" }, children: /* @__PURE__ */ jsxRuntime.jsx("tbody", { children: Array.from({ length: maxRow }).map((_39, rowIndex) => /* @__PURE__ */ jsxRuntime.jsx("tr", { children: Array.from({ length: maxCol }).map((_40, colIndex) => {
8678
+ /* @__PURE__ */ jsxRuntime.jsx("table", { style: { width: "100%", borderCollapse: "collapse", tableLayout: "fixed" }, children: /* @__PURE__ */ jsxRuntime.jsx("tbody", { children: Array.from({ length: maxRow }).map((_41, rowIndex) => /* @__PURE__ */ jsxRuntime.jsx("tr", { children: Array.from({ length: maxCol }).map((_42, colIndex) => {
8363
8679
  const cellItems = normalized.filter(
8364
8680
  (item) => item.row === rowIndex + 1 && item.column === colIndex + 1
8365
8681
  );
@@ -8508,7 +8824,7 @@ var DynamicEdit = ({ model: modelProp, allModels, topContent, extraHeaderButtons
8508
8824
  name: field.key,
8509
8825
  rules: field.required && !field.formula ? [{ required: true }] : [],
8510
8826
  valuePropName: field.type === "boolean" ? "checked" : void 0,
8511
- getValueProps: (val) => (field.type === "date" || field.type === "datetime") && val ? { value: dayjs7__default.default(val) } : field.type === "time" && val ? { value: dayjs7__default.default("1970-01-01T" + val) } : { value: val },
8827
+ getValueProps: (val) => (field.type === "date" || field.type === "datetime") && val ? { value: dayjs8__default.default(val) } : field.type === "time" && val ? { value: dayjs8__default.default("1970-01-01T" + val) } : { value: val },
8512
8828
  style: { margin: 0 },
8513
8829
  children: field.formula ? /* @__PURE__ */ jsxRuntime.jsx(antd.Input, { disabled: true }) : renderInput(field, allModels, model, recordId)
8514
8830
  }
@@ -8572,7 +8888,7 @@ var DynamicEdit = ({ model: modelProp, allModels, topContent, extraHeaderButtons
8572
8888
  const maxCol = Math.max(1, ...normalized.map((r) => r.column));
8573
8889
  return /* @__PURE__ */ jsxRuntime.jsxs("div", { style: { flex: 1, minWidth: 0, border: `1px solid ${token.colorBorder}`, borderRadius: 8, padding: "2px 6px" }, children: [
8574
8890
  /* @__PURE__ */ jsxRuntime.jsx(Title3, { level: 5, style: { margin: 0, color: "#1677ff" }, children: _24(section) }),
8575
- /* @__PURE__ */ jsxRuntime.jsx("table", { style: { width: "100%", borderCollapse: "collapse", tableLayout: "fixed" }, children: /* @__PURE__ */ jsxRuntime.jsx("tbody", { children: Array.from({ length: maxRow }).map((_39, ri) => /* @__PURE__ */ jsxRuntime.jsx("tr", { children: Array.from({ length: maxCol }).map((_40, ci) => {
8891
+ /* @__PURE__ */ jsxRuntime.jsx("table", { style: { width: "100%", borderCollapse: "collapse", tableLayout: "fixed" }, children: /* @__PURE__ */ jsxRuntime.jsx("tbody", { children: Array.from({ length: maxRow }).map((_41, ri) => /* @__PURE__ */ jsxRuntime.jsx("tr", { children: Array.from({ length: maxCol }).map((_42, ci) => {
8576
8892
  const cellItems = normalized.filter((item) => item.row === ri + 1 && item.column === ci + 1);
8577
8893
  return /* @__PURE__ */ jsxRuntime.jsx("td", { style: { padding: "0 4px", verticalAlign: "top", width: `${100 / maxCol}%` }, children: cellItems.map((item, idx) => {
8578
8894
  if (item.attribute_or_relation_type === "nlsentence") {
@@ -8622,7 +8938,7 @@ var DynamicEdit = ({ model: modelProp, allModels, topContent, extraHeaderButtons
8622
8938
  name: field.key,
8623
8939
  rules: field.required && !field.formula ? [{ required: true }] : [],
8624
8940
  valuePropName: field.type === "boolean" ? "checked" : void 0,
8625
- getValueProps: (val) => (field.type === "date" || field.type === "datetime") && val ? { value: dayjs7__default.default(val) } : field.type === "time" && val ? { value: dayjs7__default.default("1970-01-01T" + val) } : { value: val },
8941
+ getValueProps: (val) => (field.type === "date" || field.type === "datetime") && val ? { value: dayjs8__default.default(val) } : field.type === "time" && val ? { value: dayjs8__default.default("1970-01-01T" + val) } : { value: val },
8626
8942
  style: { margin: 0 },
8627
8943
  children: field.formula ? /* @__PURE__ */ jsxRuntime.jsx(antd.Input, { disabled: true }) : renderInput(field, allModels, model, recordId)
8628
8944
  }
@@ -8715,6 +9031,55 @@ var DynamicEdit = ({ model: modelProp, allModels, topContent, extraHeaderButtons
8715
9031
  ] });
8716
9032
  };
8717
9033
  var _25 = window._ || ((text) => text);
9034
+ var ReadAndEditReference = ({ value, onChange, field, allModels, model, currentId }) => {
9035
+ const [editing, setEditing] = React6.useState(false);
9036
+ const [draft, setDraft] = React6.useState(void 0);
9037
+ const form = antd.Form.useFormInstance();
9038
+ const resource = field.referencePath ? field.referencePath : field.reference ? resolveResourcePath(field.reference, allModels) : "";
9039
+ const modelResource = model ? resolveResourcePath(model.resource || model.name, allModels) : void 0;
9040
+ const isSelfRef = resource && modelResource && resource === modelResource;
9041
+ const handleEdit = () => {
9042
+ setDraft(value);
9043
+ setEditing(true);
9044
+ };
9045
+ const handleConfirm = () => {
9046
+ onChange?.(draft);
9047
+ if (form) form.setFieldValue(field.key, draft);
9048
+ setEditing(false);
9049
+ };
9050
+ const handleCancel = () => {
9051
+ setDraft(void 0);
9052
+ setEditing(false);
9053
+ };
9054
+ const row = { display: "flex", alignItems: "center", justifyContent: "flex-start", gap: 4 };
9055
+ if (editing) {
9056
+ return /* @__PURE__ */ jsxRuntime.jsxs("div", { style: row, children: [
9057
+ /* @__PURE__ */ jsxRuntime.jsx("div", { style: { flex: 1, minWidth: 0 }, children: /* @__PURE__ */ jsxRuntime.jsx(
9058
+ RelationSelect,
9059
+ {
9060
+ field,
9061
+ value: draft,
9062
+ onChange: setDraft,
9063
+ allModels,
9064
+ excludeId: isSelfRef ? currentId : void 0
9065
+ }
9066
+ ) }),
9067
+ /* @__PURE__ */ jsxRuntime.jsx(antd.Tooltip, { title: _25("Confirm"), children: /* @__PURE__ */ jsxRuntime.jsx(antd.Button, { size: "small", type: "primary", icon: /* @__PURE__ */ jsxRuntime.jsx(icons.CheckOutlined, {}), onClick: handleConfirm }) }),
9068
+ /* @__PURE__ */ jsxRuntime.jsx(antd.Tooltip, { title: _25("Cancel"), children: /* @__PURE__ */ jsxRuntime.jsx(antd.Button, { size: "small", icon: /* @__PURE__ */ jsxRuntime.jsx(icons.CloseOutlined, {}), onClick: handleCancel }) })
9069
+ ] });
9070
+ }
9071
+ if (!value) {
9072
+ return /* @__PURE__ */ jsxRuntime.jsxs("div", { style: row, children: [
9073
+ /* @__PURE__ */ jsxRuntime.jsx("span", { children: "-" }),
9074
+ /* @__PURE__ */ jsxRuntime.jsx(antd.Tooltip, { title: _25("Edit"), children: /* @__PURE__ */ jsxRuntime.jsx(antd.Button, { size: "small", type: "text", icon: /* @__PURE__ */ jsxRuntime.jsx(icons.EditOutlined, {}), onClick: handleEdit, style: { padding: "0 2px", height: "auto" } }) })
9075
+ ] });
9076
+ }
9077
+ return /* @__PURE__ */ jsxRuntime.jsxs("div", { style: row, children: [
9078
+ /* @__PURE__ */ jsxRuntime.jsx(ReferenceField, { id: value, resource }),
9079
+ /* @__PURE__ */ jsxRuntime.jsx(antd.Tooltip, { title: _25("Edit"), children: /* @__PURE__ */ jsxRuntime.jsx(antd.Button, { size: "small", type: "text", icon: /* @__PURE__ */ jsxRuntime.jsx(icons.EditOutlined, {}), onClick: handleEdit, style: { padding: "0 2px", height: "auto" } }) })
9080
+ ] });
9081
+ };
9082
+ var _26 = window._ || ((text) => text);
8718
9083
  var { Title: Title4 } = antd.Typography;
8719
9084
  function coerce(v) {
8720
9085
  if (v && typeof v === "object" && typeof v.valueOf === "function") return v.valueOf();
@@ -8809,22 +9174,44 @@ var useStandardShowTabs = (model, record, allModels, actionsState, editForm, ove
8809
9174
  const renderShowEditableInput = (field, forceReadOnly) => {
8810
9175
  const refResource = field.reference ? resolveResourcePath(field.reference, allModels) : void 0;
8811
9176
  const isSelfRef = refResource && modelResource && refResource === modelResource;
9177
+ const scalarToken = field.showViewType ? normalizeFieldViewType(field.showViewType) : "";
9178
+ const isReadOnlyToken = scalarToken.startsWith("read-only-");
9179
+ const isEditableToken = scalarToken === "editable-field";
9180
+ if (field.formula || forceReadOnly || isReadOnlyToken) {
9181
+ return renderFieldValue(field, record, allModels);
9182
+ }
9183
+ if (field.reference) {
9184
+ if (!isEditableToken) {
9185
+ const fkRelViewType = normalizeRelationViewType(field.showViewType || "") || "read-and-edit-list";
9186
+ if (fkRelViewType === "read-and-edit-list") {
9187
+ return /* @__PURE__ */ jsxRuntime.jsx(antd.Form.Item, { name: field.key, style: { margin: 0 }, noStyle: false, children: /* @__PURE__ */ jsxRuntime.jsx(
9188
+ ReadAndEditReference,
9189
+ {
9190
+ field,
9191
+ allModels,
9192
+ model,
9193
+ currentId: isSelfRef ? currentId : void 0
9194
+ }
9195
+ ) });
9196
+ }
9197
+ }
9198
+ }
8812
9199
  return /* @__PURE__ */ jsxRuntime.jsx(
8813
9200
  antd.Form.Item,
8814
9201
  {
8815
9202
  name: field.key,
8816
- rules: field.required && !field.formula && !forceReadOnly ? [{ required: true }] : [],
9203
+ rules: field.required && !field.formula ? [{ required: true }] : [],
8817
9204
  valuePropName: field.type === "boolean" ? "checked" : void 0,
8818
- getValueProps: (val) => (field.type === "date" || field.type === "datetime") && val ? { value: dayjs7__default.default(val) } : field.type === "time" && val ? { value: dayjs7__default.default("1970-01-01T" + val) } : { value: val },
9205
+ getValueProps: (val) => (field.type === "date" || field.type === "datetime") && val ? { value: dayjs8__default.default(val) } : field.type === "time" && val ? { value: dayjs8__default.default("1970-01-01T" + val) } : { value: val },
8819
9206
  style: { margin: 0 },
8820
9207
  noStyle: false,
8821
- children: field.formula || forceReadOnly ? /* @__PURE__ */ jsxRuntime.jsx(antd.Input, { disabled: true }) : renderInput(field, allModels, model, isSelfRef ? currentId : void 0)
9208
+ children: renderInput(field, allModels, model, isSelfRef ? currentId : void 0)
8822
9209
  }
8823
9210
  );
8824
9211
  };
8825
9212
  const detailsTab = {
8826
9213
  key: "details",
8827
- label: renderToneTabLabel(_25("Details"), modelTone),
9214
+ label: renderToneTabLabel(_26("Details"), modelTone),
8828
9215
  children: /* @__PURE__ */ jsxRuntime.jsxs(
8829
9216
  antd.Form,
8830
9217
  {
@@ -8853,8 +9240,8 @@ var useStandardShowTabs = (model, record, allModels, actionsState, editForm, ove
8853
9240
  flex: "1 0 200px",
8854
9241
  padding: "2px 4px",
8855
9242
  lineHeight: 1.15,
8856
- textAlign: field.type === "number" ? "right" : "left",
8857
- fontVariantNumeric: field.type === "number" ? "tabular-nums" : void 0,
9243
+ textAlign: field.type === "number" && !field.reference ? "right" : "left",
9244
+ fontVariantNumeric: field.type === "number" && !field.reference ? "tabular-nums" : void 0,
8858
9245
  overflowWrap: "anywhere",
8859
9246
  background: valueBackground,
8860
9247
  borderRadius: 6
@@ -8892,8 +9279,8 @@ var useStandardShowTabs = (model, record, allModels, actionsState, editForm, ove
8892
9279
  padding: "6px 6px"
8893
9280
  },
8894
9281
  children: [
8895
- /* @__PURE__ */ jsxRuntime.jsx(Title4, { level: 5, style: { margin: 0, color: "#1677ff" }, children: _25(section) }),
8896
- /* @__PURE__ */ jsxRuntime.jsx("table", { style: { width: "100%", borderCollapse: "collapse", tableLayout: "fixed" }, children: /* @__PURE__ */ jsxRuntime.jsx("tbody", { children: Array.from({ length: maxRow }).map((_39, rowIndex) => /* @__PURE__ */ jsxRuntime.jsx("tr", { children: Array.from({ length: maxCol }).map((_40, colIndex) => {
9282
+ /* @__PURE__ */ jsxRuntime.jsx(Title4, { level: 5, style: { margin: 0, color: "#1677ff" }, children: _26(section) }),
9283
+ /* @__PURE__ */ jsxRuntime.jsx("table", { style: { width: "100%", borderCollapse: "collapse", tableLayout: "fixed" }, children: /* @__PURE__ */ jsxRuntime.jsx("tbody", { children: Array.from({ length: maxRow }).map((_41, rowIndex) => /* @__PURE__ */ jsxRuntime.jsx("tr", { children: Array.from({ length: maxCol }).map((_42, colIndex) => {
8897
9284
  const cellItems = normalized.filter(
8898
9285
  (item) => item.row === rowIndex + 1 && item.column === colIndex + 1
8899
9286
  );
@@ -8970,8 +9357,8 @@ var useStandardShowTabs = (model, record, allModels, actionsState, editForm, ove
8970
9357
  borderRadius: 6,
8971
9358
  maxWidth: "100%",
8972
9359
  overflowWrap: "anywhere",
8973
- textAlign: field.type === "number" ? "right" : "left",
8974
- fontVariantNumeric: field.type === "number" ? "tabular-nums" : void 0,
9360
+ textAlign: field.type === "number" && !field.reference ? "right" : "left",
9361
+ fontVariantNumeric: field.type === "number" && !field.reference ? "tabular-nums" : void 0,
8975
9362
  ...parseInlineStyle(item.html_format)
8976
9363
  };
8977
9364
  return /* @__PURE__ */ jsxRuntime.jsx(VisibilityGate, { condition: item.visibility_condition, children: /* @__PURE__ */ jsxRuntime.jsx("div", { style: { marginBottom: 4 }, children: /* @__PURE__ */ jsxRuntime.jsxs(
@@ -9085,8 +9472,8 @@ var useStandardShowTabs = (model, record, allModels, actionsState, editForm, ove
9085
9472
  const maxRow = Math.max(1, ...normalized.map((r) => r.row));
9086
9473
  const maxCol = Math.max(1, ...normalized.map((r) => r.column));
9087
9474
  return /* @__PURE__ */ jsxRuntime.jsxs("div", { style: { flex: 1, minWidth: 0, border: `1px solid ${token.colorBorder}`, borderRadius: 8, padding: "6px 6px" }, children: [
9088
- /* @__PURE__ */ jsxRuntime.jsx(Title4, { level: 5, style: { margin: 0, color: "#1677ff" }, children: _25(section) }),
9089
- /* @__PURE__ */ jsxRuntime.jsx("table", { style: { width: "100%", borderCollapse: "collapse", tableLayout: "fixed" }, children: /* @__PURE__ */ jsxRuntime.jsx("tbody", { children: Array.from({ length: maxRow }).map((_39, ri) => /* @__PURE__ */ jsxRuntime.jsx("tr", { children: Array.from({ length: maxCol }).map((_40, ci) => {
9475
+ /* @__PURE__ */ jsxRuntime.jsx(Title4, { level: 5, style: { margin: 0, color: "#1677ff" }, children: _26(section) }),
9476
+ /* @__PURE__ */ jsxRuntime.jsx("table", { style: { width: "100%", borderCollapse: "collapse", tableLayout: "fixed" }, children: /* @__PURE__ */ jsxRuntime.jsx("tbody", { children: Array.from({ length: maxRow }).map((_41, ri) => /* @__PURE__ */ jsxRuntime.jsx("tr", { children: Array.from({ length: maxCol }).map((_42, ci) => {
9090
9477
  const cellItems = normalized.filter((item) => item.row === ri + 1 && item.column === ci + 1);
9091
9478
  return /* @__PURE__ */ jsxRuntime.jsx("td", { style: { padding: "0 4px", verticalAlign: "top", width: `${100 / maxCol}%` }, children: cellItems.map((item) => {
9092
9479
  if (item.attribute_or_relation_type === "nlsentence") {
@@ -9143,13 +9530,50 @@ var useStandardShowTabs = (model, record, allModels, actionsState, editForm, ove
9143
9530
  }) }) });
9144
9531
  return {
9145
9532
  key: `custom-tab::${tabName}`,
9146
- label: renderToneTabLabel(_25(tabName), { text: token.colorText, border: token.colorBorder }),
9533
+ label: renderToneTabLabel(_26(tabName), { text: token.colorText, border: token.colorBorder }),
9147
9534
  children: tabChildren
9148
9535
  };
9149
9536
  });
9150
9537
  const items = [detailsTab];
9151
9538
  items.push(...customConfigTabs);
9152
9539
  items.push(...relationTabs);
9540
+ const currentResource = model.resource || model.name.toLowerCase();
9541
+ const namedQueryTabs = (allModels || []).filter((m) => m.isNamedQuery).flatMap((queryModel) => {
9542
+ if (!record) return [];
9543
+ getRecordId(record, model.fields);
9544
+ let filterKey;
9545
+ if (queryModel.primaryResource === currentResource) {
9546
+ filterKey = queryModel.pkField || "id";
9547
+ } else {
9548
+ const fkField = queryModel.fields.find((f) => f.reference === currentResource);
9549
+ filterKey = fkField?.key;
9550
+ }
9551
+ if (!filterKey) return [];
9552
+ const syntheticRel = {
9553
+ resource: queryModel.resource || queryModel.name,
9554
+ targetKey: filterKey,
9555
+ label: queryModel.label,
9556
+ showViewType: queryModel.listViewType || "table"
9557
+ };
9558
+ const relationModel = queryModel;
9559
+ const tone = getModelTone(queryModel.resource || queryModel.name);
9560
+ return [{
9561
+ key: `named-query::${queryModel.name || queryModel.resource}`,
9562
+ label: renderToneTabLabel(queryModel.label, tone),
9563
+ children: /* @__PURE__ */ jsxRuntime.jsx("div", { children: renderRelationBlock({
9564
+ rel: syntheticRel,
9565
+ relationModel,
9566
+ record,
9567
+ mode: "show",
9568
+ parentResource: model.name,
9569
+ allModels,
9570
+ showActions: false,
9571
+ showCreate: false,
9572
+ relationViewTypeDefaults
9573
+ }) })
9574
+ }];
9575
+ });
9576
+ items.push(...namedQueryTabs);
9153
9577
  return items;
9154
9578
  };
9155
9579
  var INLINE_DEFAULT_PAGE_SIZE = 10;
@@ -9468,7 +9892,7 @@ var RelatedObjectsInlineValues = ({ rel, record, viewType, allowedRelatedIds, al
9468
9892
  paginationProps && /* @__PURE__ */ jsxRuntime.jsx(antd.Pagination, { ...paginationProps })
9469
9893
  ] });
9470
9894
  };
9471
- var _26 = window._ || ((text) => text);
9895
+ var _27 = window._ || ((text) => text);
9472
9896
  var RelatedObjectsCalendar = ({ rel, record, relatedModel, allModels }) => {
9473
9897
  core.useGo();
9474
9898
  const { token } = antd.theme.useToken();
@@ -9477,7 +9901,7 @@ var RelatedObjectsCalendar = ({ rel, record, relatedModel, allModels }) => {
9477
9901
  const dateFieldOptions = React6.useMemo(() => getCalendarDateFieldOptions(relatedModel.fields), [relatedModel.fields]);
9478
9902
  const [calendarMode, setCalendarMode] = React6.useState("month");
9479
9903
  const [calendarDateField, setCalendarDateField] = React6.useState(() => dateFieldOptions[0]?.key || "");
9480
- const [calendarAnchorDate, setCalendarAnchorDate] = React6.useState(() => dayjs7__default.default().startOf("month"));
9904
+ const [calendarAnchorDate, setCalendarAnchorDate] = React6.useState(() => dayjs8__default.default().startOf("month"));
9481
9905
  const dateFieldKeySet = React6.useMemo(() => new Set(dateFieldOptions.map((field) => field.key)), [dateFieldOptions]);
9482
9906
  React6.useEffect(() => {
9483
9907
  if (calendarDateField && dateFieldKeySet.has(calendarDateField)) return;
@@ -9515,10 +9939,10 @@ var RelatedObjectsCalendar = ({ rel, record, relatedModel, allModels }) => {
9515
9939
  if (initSignatureRef.current === signature) return;
9516
9940
  initSignatureRef.current = signature;
9517
9941
  if (earliestDateTs === null) {
9518
- setCalendarAnchorDate(dayjs7__default.default().startOf(calendarMode));
9942
+ setCalendarAnchorDate(dayjs8__default.default().startOf(calendarMode));
9519
9943
  return;
9520
9944
  }
9521
- setCalendarAnchorDate(dayjs7__default.default(earliestDateTs).startOf(calendarMode));
9945
+ setCalendarAnchorDate(dayjs8__default.default(earliestDateTs).startOf(calendarMode));
9522
9946
  }, [calendarDateField, calendarMode, earliestDateTs]);
9523
9947
  const entriesByDate = React6.useMemo(() => {
9524
9948
  const grouped = /* @__PURE__ */ new Map();
@@ -9551,8 +9975,8 @@ var RelatedObjectsCalendar = ({ rel, record, relatedModel, allModels }) => {
9551
9975
  }, [calendarAnchorDate, calendarMode]);
9552
9976
  if (loading) return /* @__PURE__ */ jsxRuntime.jsx(antd.Spin, { size: "small" });
9553
9977
  if (error) return /* @__PURE__ */ jsxRuntime.jsx(antd.Alert, { type: "error", message: error, showIcon: true });
9554
- if (dateFieldOptions.length === 0) return /* @__PURE__ */ jsxRuntime.jsx(antd.Empty, { description: _26("No date/datetime fields available for calendar view.") });
9555
- if (!records.length) return /* @__PURE__ */ jsxRuntime.jsx(antd.Empty, { description: _26("No related records available.") });
9978
+ if (dateFieldOptions.length === 0) return /* @__PURE__ */ jsxRuntime.jsx(antd.Empty, { description: _27("No date/datetime fields available for calendar view.") });
9979
+ if (!records.length) return /* @__PURE__ */ jsxRuntime.jsx(antd.Empty, { description: _27("No related records available.") });
9556
9980
  const selectedDateField = relatedModel.fields.find((field) => field.key === calendarDateField);
9557
9981
  const selectedLabel = selectedDateField?.label || calendarDateField;
9558
9982
  return /* @__PURE__ */ jsxRuntime.jsxs("div", { style: { display: "grid", gap: 12 }, children: [
@@ -9565,8 +9989,8 @@ var RelatedObjectsCalendar = ({ rel, record, relatedModel, allModels }) => {
9565
9989
  value: calendarMode,
9566
9990
  onChange: (value) => setCalendarMode(value),
9567
9991
  options: [
9568
- { label: _26("Monthly"), value: "month" },
9569
- { label: _26("Weekly"), value: "week" }
9992
+ { label: _27("Monthly"), value: "month" },
9993
+ { label: _27("Weekly"), value: "week" }
9570
9994
  ],
9571
9995
  style: { minWidth: 120 }
9572
9996
  }
@@ -9579,35 +10003,35 @@ var RelatedObjectsCalendar = ({ rel, record, relatedModel, allModels }) => {
9579
10003
  onChange: (value) => setCalendarDateField(value),
9580
10004
  options: dateFieldOptions.map((field) => ({ label: field.label, value: field.key })),
9581
10005
  style: { minWidth: 220 },
9582
- placeholder: _26("Date field")
10006
+ placeholder: _27("Date field")
9583
10007
  }
9584
10008
  )
9585
10009
  ] }),
9586
10010
  /* @__PURE__ */ jsxRuntime.jsxs(antd.Space, { size: 8, children: [
9587
- /* @__PURE__ */ jsxRuntime.jsx(antd.Tooltip, { title: _26("Previous"), children: /* @__PURE__ */ jsxRuntime.jsx(
10011
+ /* @__PURE__ */ jsxRuntime.jsx(antd.Tooltip, { title: _27("Previous"), children: /* @__PURE__ */ jsxRuntime.jsx(
9588
10012
  antd.Button,
9589
10013
  {
9590
10014
  size: "small",
9591
10015
  icon: /* @__PURE__ */ jsxRuntime.jsx(icons.ArrowLeftOutlined, {}),
9592
- "aria-label": _26("Previous"),
10016
+ "aria-label": _27("Previous"),
9593
10017
  onClick: () => setCalendarAnchorDate((prev) => prev.subtract(1, calendarMode).startOf(calendarMode))
9594
10018
  }
9595
10019
  ) }),
9596
- /* @__PURE__ */ jsxRuntime.jsx(antd.Tooltip, { title: _26("Today"), children: /* @__PURE__ */ jsxRuntime.jsx(
10020
+ /* @__PURE__ */ jsxRuntime.jsx(antd.Tooltip, { title: _27("Today"), children: /* @__PURE__ */ jsxRuntime.jsx(
9597
10021
  antd.Button,
9598
10022
  {
9599
10023
  size: "small",
9600
10024
  icon: /* @__PURE__ */ jsxRuntime.jsx(icons.CalendarOutlined, {}),
9601
- "aria-label": _26("Today"),
9602
- onClick: () => setCalendarAnchorDate(dayjs7__default.default().startOf(calendarMode))
10025
+ "aria-label": _27("Today"),
10026
+ onClick: () => setCalendarAnchorDate(dayjs8__default.default().startOf(calendarMode))
9603
10027
  }
9604
10028
  ) }),
9605
- /* @__PURE__ */ jsxRuntime.jsx(antd.Tooltip, { title: _26("Next"), children: /* @__PURE__ */ jsxRuntime.jsx(
10029
+ /* @__PURE__ */ jsxRuntime.jsx(antd.Tooltip, { title: _27("Next"), children: /* @__PURE__ */ jsxRuntime.jsx(
9606
10030
  antd.Button,
9607
10031
  {
9608
10032
  size: "small",
9609
10033
  icon: /* @__PURE__ */ jsxRuntime.jsx(icons.ArrowRightOutlined, {}),
9610
- "aria-label": _26("Next"),
10034
+ "aria-label": _27("Next"),
9611
10035
  onClick: () => setCalendarAnchorDate((prev) => prev.add(1, calendarMode).startOf(calendarMode))
9612
10036
  }
9613
10037
  ) })
@@ -9648,7 +10072,7 @@ var RelatedObjectsCalendar = ({ rel, record, relatedModel, allModels }) => {
9648
10072
  const dayKey = day.format("YYYY-MM-DD");
9649
10073
  const entries = entriesByDate.get(dayKey) || [];
9650
10074
  const isOutsideCurrentMonth = calendarMode === "month" && day.month() !== calendarAnchorDate.month();
9651
- const isToday = day.isSame(dayjs7__default.default(), "day");
10075
+ const isToday = day.isSame(dayjs8__default.default(), "day");
9652
10076
  return /* @__PURE__ */ jsxRuntime.jsxs(
9653
10077
  "div",
9654
10078
  {
@@ -9726,12 +10150,12 @@ var RelatedObjectPrimaryCard = ({ record, model, allModels, customPageName }) =>
9726
10150
  }
9727
10151
  );
9728
10152
  };
9729
- var _27 = window._ || ((text) => text);
10153
+ var _28 = window._ || ((text) => text);
9730
10154
  var RelatedObjectsPrimaryView = ({ rel, record, model, allModels, customPageName }) => {
9731
10155
  const { records, loading, error } = useRelatedGalleryRecords({ rel, record, allModels });
9732
10156
  if (loading) return /* @__PURE__ */ jsxRuntime.jsx(antd.Spin, { size: "small" });
9733
10157
  if (error) return /* @__PURE__ */ jsxRuntime.jsx(antd.Alert, { type: "error", message: error, showIcon: true });
9734
- if (!records.length) return /* @__PURE__ */ jsxRuntime.jsx(antd.Empty, { description: _27("No related objects.") });
10158
+ if (!records.length) return /* @__PURE__ */ jsxRuntime.jsx(antd.Empty, { description: _28("No related objects.") });
9735
10159
  return /* @__PURE__ */ jsxRuntime.jsx("div", { style: { display: "grid", gap: 8 }, children: records.map((item) => {
9736
10160
  const id = item?.eid ?? item?.id;
9737
10161
  return /* @__PURE__ */ jsxRuntime.jsx(
@@ -9746,7 +10170,7 @@ var RelatedObjectsPrimaryView = ({ rel, record, model, allModels, customPageName
9746
10170
  );
9747
10171
  }) });
9748
10172
  };
9749
- var _28 = window._ || ((text) => text);
10173
+ var _29 = window._ || ((text) => text);
9750
10174
  var RelatedObjectsGallery = ({ rel, record, relatedModel, allModels }) => {
9751
10175
  const apiUrl = core.useApiUrl();
9752
10176
  const go = core.useGo();
@@ -9761,7 +10185,7 @@ var RelatedObjectsGallery = ({ rel, record, relatedModel, allModels }) => {
9761
10185
  if (error) return /* @__PURE__ */ jsxRuntime.jsx(antd.Alert, { type: "error", message: error, showIcon: true });
9762
10186
  if (!records.length) return /* @__PURE__ */ jsxRuntime.jsxs("div", { style: { display: "inline-flex", alignItems: "center", gap: 6, color: "#bfbfbf", fontSize: 12 }, children: [
9763
10187
  /* @__PURE__ */ jsxRuntime.jsx(icons.FileTextOutlined, { style: { fontSize: 16 } }),
9764
- _28("No images available")
10188
+ _29("No images available")
9765
10189
  ] });
9766
10190
  return /* @__PURE__ */ jsxRuntime.jsx("div", { style: { display: "flex", flexWrap: "wrap", gap: 16 }, children: records.map((item) => {
9767
10191
  const id = getGalleryItemId(item);
@@ -9785,7 +10209,7 @@ var RelatedObjectsGallery = ({ rel, record, relatedModel, allModels }) => {
9785
10209
  });
9786
10210
  }) });
9787
10211
  };
9788
- var _29 = window._ || ((text) => text);
10212
+ var _30 = window._ || ((text) => text);
9789
10213
  var RelatedObjectsEditableList = ({ rel, record, allModels }) => {
9790
10214
  const go = core.useGo();
9791
10215
  const paneNav = usePaneNavigation();
@@ -9884,7 +10308,7 @@ var RelatedObjectsEditableList = ({ rel, record, allModels }) => {
9884
10308
  const d = String(body.detail);
9885
10309
  if (d.toLowerCase().includes("unique") || d.toLowerCase().includes("duplicate")) {
9886
10310
  const optLabel = allOptions.find((o) => o.id === id)?.label ?? String(id);
9887
- detail = `"${optLabel}" ${_29("is already linked to another record and cannot be added here.")}`;
10311
+ detail = `"${optLabel}" ${_30("is already linked to another record and cannot be added here.")}`;
9888
10312
  } else {
9889
10313
  detail = d;
9890
10314
  }
@@ -9903,9 +10327,9 @@ var RelatedObjectsEditableList = ({ rel, record, allModels }) => {
9903
10327
  setSelectedIds(new Set(newBaseline));
9904
10328
  if (errors.length > 0) {
9905
10329
  antd.message.error(errors[0], 6);
9906
- if (errors.length > 1) antd.message.warning(`${errors.length - 1} ${_29("other error(s) occurred.")}`, 4);
10330
+ if (errors.length > 1) antd.message.warning(`${errors.length - 1} ${_30("other error(s) occurred.")}`, 4);
9907
10331
  } else {
9908
- antd.message.success(_29("Changes saved."));
10332
+ antd.message.success(_30("Changes saved."));
9909
10333
  setEditing(false);
9910
10334
  setSearchText("");
9911
10335
  }
@@ -9913,7 +10337,7 @@ var RelatedObjectsEditableList = ({ rel, record, allModels }) => {
9913
10337
  const newItems = allOptions.filter((opt) => newBaseline.has(opt.id)).map((opt) => ({ id: opt.id, label: opt.label, resource: otherResource }));
9914
10338
  setLocalItems(newItems);
9915
10339
  } catch (err) {
9916
- antd.message.error(err instanceof Error ? err.message : _29("Failed to save changes."));
10340
+ antd.message.error(err instanceof Error ? err.message : _30("Failed to save changes."));
9917
10341
  } finally {
9918
10342
  setSaving(false);
9919
10343
  }
@@ -9933,7 +10357,7 @@ var RelatedObjectsEditableList = ({ rel, record, allModels }) => {
9933
10357
  const relatedModel = findModelByName(allModels, rel.otherResource || rel.otherResourcePath);
9934
10358
  const relatedResource = relatedModel ? resolveResourcePath(relatedModel.resource || relatedModel.name, allModels) : null;
9935
10359
  if (!relatedResource) {
9936
- antd.message.warning(_29("No create route for the related model. Opening relation create form."));
10360
+ antd.message.warning(_30("No create route for the related model. Opening relation create form."));
9937
10361
  params.append(rel.targetKey, String(recordId));
9938
10362
  const returnTo2 = `${location.pathname}${location.search}${location.hash}`;
9939
10363
  if (returnTo2.startsWith("/")) params.append("returnTo", returnTo2);
@@ -9952,7 +10376,7 @@ var RelatedObjectsEditableList = ({ rel, record, allModels }) => {
9952
10376
  if (error) return /* @__PURE__ */ jsxRuntime.jsx(antd.Alert, { type: "error", message: error, showIcon: true });
9953
10377
  if (!editing) {
9954
10378
  return /* @__PURE__ */ jsxRuntime.jsxs("div", { style: { minHeight: 22 }, children: [
9955
- /* @__PURE__ */ jsxRuntime.jsx("div", { style: { display: "flex", justifyContent: "flex-end", marginBottom: 4 }, children: /* @__PURE__ */ jsxRuntime.jsx(antd.Tooltip, { title: _29("Edit"), children: /* @__PURE__ */ jsxRuntime.jsx(antd.Button, { size: "small", type: "text", icon: /* @__PURE__ */ jsxRuntime.jsx(icons.EditOutlined, {}), onClick: () => setEditing(true) }) }) }),
10379
+ /* @__PURE__ */ jsxRuntime.jsx("div", { style: { display: "flex", justifyContent: "flex-end", marginBottom: 4 }, children: /* @__PURE__ */ jsxRuntime.jsx(antd.Tooltip, { title: _30("Edit"), children: /* @__PURE__ */ jsxRuntime.jsx(antd.Button, { size: "small", type: "text", icon: /* @__PURE__ */ jsxRuntime.jsx(icons.EditOutlined, {}), onClick: () => setEditing(true) }) }) }),
9956
10380
  items.length === 0 && total === 0 ? /* @__PURE__ */ jsxRuntime.jsx("span", { style: { color: token.colorTextSecondary, fontStyle: "italic" }, children: "\u2014" }) : /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
9957
10381
  /* @__PURE__ */ jsxRuntime.jsx("ul", { style: { margin: 0, paddingLeft: 16 }, children: items.map((item, index) => /* @__PURE__ */ jsxRuntime.jsx("li", { children: /* @__PURE__ */ jsxRuntime.jsx(
9958
10382
  "a",
@@ -9991,7 +10415,7 @@ var RelatedObjectsEditableList = ({ rel, record, allModels }) => {
9991
10415
  setPage(p);
9992
10416
  }
9993
10417
  },
9994
- onShowSizeChange: (_39, newPageSize) => {
10418
+ onShowSizeChange: (_41, newPageSize) => {
9995
10419
  setPageSize(newPageSize);
9996
10420
  setPage(1);
9997
10421
  },
@@ -10023,7 +10447,7 @@ var RelatedObjectsEditableList = ({ rel, record, allModels }) => {
10023
10447
  antd.Input,
10024
10448
  {
10025
10449
  prefix: /* @__PURE__ */ jsxRuntime.jsx(icons.SearchOutlined, { style: { color: token.colorTextSecondary } }),
10026
- placeholder: _29("Search..."),
10450
+ placeholder: _30("Search..."),
10027
10451
  value: searchText,
10028
10452
  onChange: (e) => setSearchText(e.target.value),
10029
10453
  allowClear: true,
@@ -10031,9 +10455,9 @@ var RelatedObjectsEditableList = ({ rel, record, allModels }) => {
10031
10455
  style: { flex: 1 }
10032
10456
  }
10033
10457
  ),
10034
- rel.otherResource && rel.otherKey && rel.targetKey && /* @__PURE__ */ jsxRuntime.jsx(antd.Tooltip, { title: _29("Create new and relate"), children: /* @__PURE__ */ jsxRuntime.jsx(antd.Button, { size: "small", icon: /* @__PURE__ */ jsxRuntime.jsx(icons.ShareAltOutlined, {}), onClick: handleCreateNewAndRelate }) })
10458
+ rel.otherResource && rel.otherKey && rel.targetKey && /* @__PURE__ */ jsxRuntime.jsx(antd.Tooltip, { title: _30("Create new and relate"), children: /* @__PURE__ */ jsxRuntime.jsx(antd.Button, { size: "small", icon: /* @__PURE__ */ jsxRuntime.jsx(icons.ShareAltOutlined, {}), onClick: handleCreateNewAndRelate }) })
10035
10459
  ] }),
10036
- /* @__PURE__ */ jsxRuntime.jsx("div", { style: { maxHeight: 280, overflowY: "auto", marginBottom: 8 }, children: optionsLoading ? /* @__PURE__ */ jsxRuntime.jsx("div", { style: { textAlign: "center", padding: 16 }, children: /* @__PURE__ */ jsxRuntime.jsx(antd.Spin, { size: "small" }) }) : sortedOptions.length === 0 ? /* @__PURE__ */ jsxRuntime.jsx(antd.Empty, { image: antd.Empty.PRESENTED_IMAGE_SIMPLE, description: _29("No options") }) : sortedOptions.map((opt) => {
10460
+ /* @__PURE__ */ jsxRuntime.jsx("div", { style: { maxHeight: 280, overflowY: "auto", marginBottom: 8 }, children: optionsLoading ? /* @__PURE__ */ jsxRuntime.jsx("div", { style: { textAlign: "center", padding: 16 }, children: /* @__PURE__ */ jsxRuntime.jsx(antd.Spin, { size: "small" }) }) : sortedOptions.length === 0 ? /* @__PURE__ */ jsxRuntime.jsx(antd.Empty, { image: antd.Empty.PRESENTED_IMAGE_SIMPLE, description: _30("No options") }) : sortedOptions.map((opt) => {
10037
10461
  const checked = selectedIds.has(opt.id);
10038
10462
  return /* @__PURE__ */ jsxRuntime.jsxs(
10039
10463
  "div",
@@ -10070,49 +10494,147 @@ var RelatedObjectsEditableList = ({ rel, record, allModels }) => {
10070
10494
  );
10071
10495
  }) }),
10072
10496
  /* @__PURE__ */ jsxRuntime.jsxs("div", { style: { display: "flex", justifyContent: "flex-end", gap: 8, borderTop: `1px solid ${token.colorBorderSecondary}`, paddingTop: 8 }, children: [
10073
- /* @__PURE__ */ jsxRuntime.jsx(antd.Button, { size: "small", onClick: handleCancel, children: _29("Cancel") }),
10074
- /* @__PURE__ */ jsxRuntime.jsx(antd.Button, { size: "small", type: "primary", icon: /* @__PURE__ */ jsxRuntime.jsx(icons.SaveOutlined, {}), onClick: handleSave, loading: saving, disabled: !hasChanges, children: _29("Save") })
10497
+ /* @__PURE__ */ jsxRuntime.jsx(antd.Button, { size: "small", onClick: handleCancel, children: _30("Cancel") }),
10498
+ /* @__PURE__ */ jsxRuntime.jsx(antd.Button, { size: "small", type: "primary", icon: /* @__PURE__ */ jsxRuntime.jsx(icons.SaveOutlined, {}), onClick: handleSave, loading: saving, disabled: !hasChanges, children: _30("Save") })
10075
10499
  ] })
10076
10500
  ] });
10077
10501
  };
10078
- var _30 = window._ || ((text) => text);
10079
- var { Title: Title5 } = antd.Typography;
10080
- var PolymorphicRelatedObjectsTable = ({ rel, record, relationModel, parentModel, allModels, showActions = false, showCreate = false, allowInlineEdit = false, layoutPreferenceType, viewVariant = "default" }) => {
10081
- const recordId = record?.[parentModel?.pkField ?? "eid"] ?? record?.eid ?? record?.id;
10502
+ var _31 = window._ || ((text) => text);
10503
+ var RelatedObjectsEditableCsv = ({ rel, record, allModels }) => {
10082
10504
  const apiUrl = core.useApiUrl();
10083
- const [loading, setLoading] = React6.useState(false);
10084
- const [error, setError] = React6.useState(null);
10085
- const [groupedIds, setGroupedIds] = React6.useState(/* @__PURE__ */ new Map());
10086
- const [unresolvedIds, setUnresolvedIds] = React6.useState([]);
10087
- const polyInfo = React6.useMemo(
10088
- () => getPolymorphicReferenceInfo(rel, relationModel, allModels),
10089
- [rel.otherKey, rel.otherResource, relationModel, allModels]
10090
- );
10505
+ const { items: fetchedItems, loading, error } = useRelatedInlineItems({ rel, record, allModels });
10506
+ const [saving, setSaving] = React6.useState(false);
10507
+ const [allOptions, setAllOptions] = React6.useState([]);
10508
+ const [optionsLoading, setOptionsLoading] = React6.useState(false);
10509
+ const [selectedIds, setSelectedIds] = React6.useState([]);
10510
+ const [baselineIds, setBaselineIds] = React6.useState(/* @__PURE__ */ new Set());
10091
10511
  React6.useEffect(() => {
10092
- if (!recordId || !rel.otherKey || !polyInfo) {
10093
- setGroupedIds(/* @__PURE__ */ new Map());
10094
- setUnresolvedIds([]);
10095
- return;
10096
- }
10097
- let isMounted = true;
10098
- const fetchGroups = async () => {
10099
- setLoading(true);
10100
- setError(null);
10512
+ const ids = fetchedItems.map((item) => Number(item.id));
10513
+ setSelectedIds(ids);
10514
+ setBaselineIds(new Set(ids));
10515
+ }, [fetchedItems]);
10516
+ React6.useEffect(() => {
10517
+ if (!rel.otherResource) return;
10518
+ let cancelled = false;
10519
+ const fetchOptions = async () => {
10520
+ setOptionsLoading(true);
10101
10521
  try {
10102
- const { groups, unresolved } = await fetchPolymorphicGroups({
10103
- apiUrl,
10104
- rel,
10105
- recordId,
10106
- referenceResource: polyInfo.referenceResource,
10107
- allModels
10108
- });
10109
- if (isMounted) {
10110
- setGroupedIds(groups);
10111
- setUnresolvedIds(unresolved);
10112
- }
10113
- } catch (err) {
10114
- if (isMounted) {
10115
- setError(err instanceof Error ? err.message : "Failed to load related records");
10522
+ const resource = rel.otherResourcePath || resolveResourcePath(rel.otherResource, allModels);
10523
+ const params = new URLSearchParams({ _start: "0", _end: "50000" });
10524
+ const response = await authenticatedFetch(`${apiUrl}/${resource}?${params.toString()}`);
10525
+ if (!response.ok) throw new Error("Failed to load options");
10526
+ const data = await response.json();
10527
+ if (!cancelled && Array.isArray(data)) {
10528
+ setAllOptions(data.map((item) => ({
10529
+ value: item.eid ?? item.id,
10530
+ label: getRecordDisplayLabel(item)
10531
+ })));
10532
+ }
10533
+ } catch {
10534
+ } finally {
10535
+ if (!cancelled) setOptionsLoading(false);
10536
+ }
10537
+ };
10538
+ fetchOptions();
10539
+ return () => {
10540
+ cancelled = true;
10541
+ };
10542
+ }, [apiUrl, rel.otherResource]);
10543
+ const handleChange = React6.useCallback(async (newIds) => {
10544
+ if (!rel.otherKey || !rel.targetKey) return;
10545
+ const recordId = record?.eid ?? record?.id;
10546
+ if (recordId === void 0 || recordId === null) return;
10547
+ const newSet = new Set(newIds);
10548
+ const toAdd = newIds.filter((id) => !baselineIds.has(id));
10549
+ const toRemove = [...baselineIds].filter((id) => !newSet.has(id));
10550
+ setSelectedIds(newIds);
10551
+ setSaving(true);
10552
+ const errors = [];
10553
+ try {
10554
+ const relationResource = rel.resourcePath || resolveResourcePath(rel.resource, allModels);
10555
+ for (const id of toRemove) {
10556
+ const deleteId = rel.targetKey === "eid_from" ? `${recordId}:${id}` : `${id}:${recordId}`;
10557
+ const resp = await authenticatedFetch(`${apiUrl}/${relationResource}/${encodeURIComponent(deleteId)}`, { method: "DELETE" });
10558
+ if (!resp.ok) errors.push(`Failed to remove (${resp.status})`);
10559
+ }
10560
+ for (const id of toAdd) {
10561
+ const payload = { [rel.targetKey]: recordId, [rel.otherKey]: id };
10562
+ const resp = await authenticatedFetch(`${apiUrl}/${relationResource}`, {
10563
+ method: "POST",
10564
+ headers: { "Content-Type": "application/json" },
10565
+ body: JSON.stringify(payload)
10566
+ });
10567
+ if (!resp.ok) errors.push(`Failed to add (${resp.status})`);
10568
+ }
10569
+ if (errors.length === 0) {
10570
+ setBaselineIds(newSet);
10571
+ } else {
10572
+ antd.message.error(errors.join("; "));
10573
+ setSelectedIds([...baselineIds]);
10574
+ }
10575
+ } finally {
10576
+ setSaving(false);
10577
+ }
10578
+ }, [apiUrl, rel, record, allModels, baselineIds]);
10579
+ if (loading) return /* @__PURE__ */ jsxRuntime.jsx(antd.Spin, { size: "small" });
10580
+ if (error) return /* @__PURE__ */ jsxRuntime.jsx(antd.Alert, { type: "error", message: error, showIcon: true });
10581
+ if (!rel.otherResource || !rel.otherKey) {
10582
+ return /* @__PURE__ */ jsxRuntime.jsx(antd.Alert, { type: "warning", message: _31("editable-csv requires a many-to-many relation"), showIcon: true });
10583
+ }
10584
+ return /* @__PURE__ */ jsxRuntime.jsx(
10585
+ antd.Select,
10586
+ {
10587
+ mode: "multiple",
10588
+ value: selectedIds,
10589
+ onChange: handleChange,
10590
+ options: allOptions,
10591
+ loading: optionsLoading || saving,
10592
+ style: { width: "100%" },
10593
+ placeholder: `${_31("Select")} ${_31(rel.label)}...`,
10594
+ optionFilterProp: "label",
10595
+ showSearch: true,
10596
+ allowClear: true
10597
+ }
10598
+ );
10599
+ };
10600
+ var _32 = window._ || ((text) => text);
10601
+ var { Title: Title5 } = antd.Typography;
10602
+ var PolymorphicRelatedObjectsTable = ({ rel, record, relationModel, parentModel, allModels, showActions = false, showCreate = false, allowInlineEdit = false, layoutPreferenceType, viewVariant = "default" }) => {
10603
+ const recordId = record?.[parentModel?.pkField ?? "eid"] ?? record?.eid ?? record?.id;
10604
+ const apiUrl = core.useApiUrl();
10605
+ const [loading, setLoading] = React6.useState(false);
10606
+ const [error, setError] = React6.useState(null);
10607
+ const [groupedIds, setGroupedIds] = React6.useState(/* @__PURE__ */ new Map());
10608
+ const [unresolvedIds, setUnresolvedIds] = React6.useState([]);
10609
+ const polyInfo = React6.useMemo(
10610
+ () => getPolymorphicReferenceInfo(rel, relationModel, allModels),
10611
+ [rel.otherKey, rel.otherResource, relationModel, allModels]
10612
+ );
10613
+ React6.useEffect(() => {
10614
+ if (!recordId || !rel.otherKey || !polyInfo) {
10615
+ setGroupedIds(/* @__PURE__ */ new Map());
10616
+ setUnresolvedIds([]);
10617
+ return;
10618
+ }
10619
+ let isMounted = true;
10620
+ const fetchGroups = async () => {
10621
+ setLoading(true);
10622
+ setError(null);
10623
+ try {
10624
+ const { groups, unresolved } = await fetchPolymorphicGroups({
10625
+ apiUrl,
10626
+ rel,
10627
+ recordId,
10628
+ referenceResource: polyInfo.referenceResource,
10629
+ allModels
10630
+ });
10631
+ if (isMounted) {
10632
+ setGroupedIds(groups);
10633
+ setUnresolvedIds(unresolved);
10634
+ }
10635
+ } catch (err) {
10636
+ if (isMounted) {
10637
+ setError(err instanceof Error ? err.message : "Failed to load related records");
10116
10638
  }
10117
10639
  } finally {
10118
10640
  if (isMounted) setLoading(false);
@@ -10328,9 +10850,9 @@ var RelatedObjectsTable = ({ rel, record, relatedModel, parentModel, showActions
10328
10850
  if (failed) {
10329
10851
  throw new Error(`Save failed (${failed.status})`);
10330
10852
  }
10331
- antd.message.success(_30("Layout preferences saved."));
10853
+ antd.message.success(_32("Layout preferences saved."));
10332
10854
  } catch (error2) {
10333
- antd.message.error(error2 instanceof Error ? error2.message : _30("Failed to save layout preferences."));
10855
+ antd.message.error(error2 instanceof Error ? error2.message : _32("Failed to save layout preferences."));
10334
10856
  } finally {
10335
10857
  setIsSavingLayoutPrefs(false);
10336
10858
  }
@@ -10359,9 +10881,9 @@ var RelatedObjectsTable = ({ rel, record, relatedModel, parentModel, showActions
10359
10881
  if (!response.ok) {
10360
10882
  throw new Error(`Save failed (${response.status})`);
10361
10883
  }
10362
- antd.message.success(_30("Analyze preferences saved."));
10884
+ antd.message.success(_32("Analyze preferences saved."));
10363
10885
  } catch (error2) {
10364
- antd.message.error(error2 instanceof Error ? error2.message : _30("Failed to save analyze preferences."));
10886
+ antd.message.error(error2 instanceof Error ? error2.message : _32("Failed to save analyze preferences."));
10365
10887
  } finally {
10366
10888
  setIsSavingAnalyzePrefs(false);
10367
10889
  }
@@ -10464,11 +10986,11 @@ var RelatedObjectsTable = ({ rel, record, relatedModel, parentModel, showActions
10464
10986
  const viewName = normalizeViewName(saveViewName || currentViewName);
10465
10987
  const viewExists = availableViewNames.includes(viewName);
10466
10988
  if (saveViewAsNew && viewExists) {
10467
- antd.message.error(_30("View name already exists. Choose a new name."));
10989
+ antd.message.error(_32("View name already exists. Choose a new name."));
10468
10990
  return;
10469
10991
  }
10470
10992
  if (!saveViewAsNew && viewName !== currentViewName && viewExists) {
10471
- antd.message.error(_30('Choose a new name or enable "Save as new view".'));
10993
+ antd.message.error(_32('Choose a new name or enable "Save as new view".'));
10472
10994
  return;
10473
10995
  }
10474
10996
  setSaveViewModalOpen(false);
@@ -10524,7 +11046,7 @@ var RelatedObjectsTable = ({ rel, record, relatedModel, parentModel, showActions
10524
11046
  return;
10525
11047
  }
10526
11048
  if (availableViewNames.includes(newName)) {
10527
- antd.message.error(_30("View name already exists."));
11049
+ antd.message.error(_32("View name already exists."));
10528
11050
  return;
10529
11051
  }
10530
11052
  try {
@@ -10537,18 +11059,18 @@ var RelatedObjectsTable = ({ rel, record, relatedModel, parentModel, showActions
10537
11059
  if (!response.ok) {
10538
11060
  throw new Error(`Rename failed (${response.status})`);
10539
11061
  }
10540
- antd.message.success(_30("View renamed."));
11062
+ antd.message.success(_32("View renamed."));
10541
11063
  setRenameViewModalOpen(false);
10542
11064
  await loadViewNames();
10543
11065
  } catch (error2) {
10544
- antd.message.error(error2 instanceof Error ? error2.message : _30("Failed to rename view."));
11066
+ antd.message.error(error2 instanceof Error ? error2.message : _32("Failed to rename view."));
10545
11067
  }
10546
11068
  }, [apiUrl, availableViewNames, currentViewName, relatedModel.name, relatedModel.resource, renameViewName, allModels, loadViewNames]);
10547
11069
  const confirmDeleteView = React6.useCallback(() => {
10548
11070
  antd.Modal.confirm({
10549
- title: _30(_30("Delete view")),
11071
+ title: _32(_32("Delete view")),
10550
11072
  content: `Delete "${currentViewName}" and all its saved preferences?`,
10551
- okText: _30("Delete"),
11073
+ okText: _32("Delete"),
10552
11074
  okButtonProps: { danger: true },
10553
11075
  onOk: async () => {
10554
11076
  try {
@@ -10561,10 +11083,10 @@ var RelatedObjectsTable = ({ rel, record, relatedModel, parentModel, showActions
10561
11083
  if (!response.ok) {
10562
11084
  throw new Error(`Delete failed (${response.status})`);
10563
11085
  }
10564
- antd.message.success(_30("View deleted."));
11086
+ antd.message.success(_32("View deleted."));
10565
11087
  await loadViewNames();
10566
11088
  } catch (error2) {
10567
- antd.message.error(error2 instanceof Error ? error2.message : _30("Failed to delete view."));
11089
+ antd.message.error(error2 instanceof Error ? error2.message : _32("Failed to delete view."));
10568
11090
  }
10569
11091
  }
10570
11092
  });
@@ -10748,7 +11270,7 @@ var RelatedObjectsTable = ({ rel, record, relatedModel, parentModel, showActions
10748
11270
  const direction = value?.direction || "next";
10749
11271
  const unit = value?.unit || "weeks";
10750
11272
  const isQuarter = unit === "quarters";
10751
- const base = dayjs7__default.default();
11273
+ const base = dayjs8__default.default();
10752
11274
  if (asRange || direction === "current") {
10753
11275
  const anchor = direction === "current" ? base : direction === "previous" ? isQuarter ? base.subtract(count * 3, "month") : base.subtract(count, unit) : isQuarter ? base.add(count * 3, "month") : base.add(count, unit);
10754
11276
  if (isQuarter) {
@@ -10821,7 +11343,7 @@ var RelatedObjectsTable = ({ rel, record, relatedModel, parentModel, showActions
10821
11343
  return true;
10822
11344
  }
10823
11345
  if (field.type === "date") {
10824
- const recordDate = dayjs7__default.default(rawValue);
11346
+ const recordDate = dayjs8__default.default(rawValue);
10825
11347
  if (!recordDate.isValid()) return false;
10826
11348
  const mode = rule.value?.mode || "absolute";
10827
11349
  const mode2 = rule.value2?.mode || "absolute";
@@ -10829,7 +11351,7 @@ var RelatedObjectsTable = ({ rel, record, relatedModel, parentModel, showActions
10829
11351
  if (val?.mode === "relative") {
10830
11352
  return resolveRelativeDate(val, asRange);
10831
11353
  }
10832
- const date = dayjs7__default.default(val?.date || val);
11354
+ const date = dayjs8__default.default(val?.date || val);
10833
11355
  return asRange ? { start: date.startOf("day"), end: date.endOf("day") } : { date: date.startOf("day") };
10834
11356
  };
10835
11357
  switch (rule.operator) {
@@ -10840,13 +11362,13 @@ var RelatedObjectsTable = ({ rel, record, relatedModel, parentModel, showActions
10840
11362
  }
10841
11363
  case "after": {
10842
11364
  const dateVal = mode === "relative" ? resolveRelativeDate(rule.value, false).date : getDateValue(rule.value, false).date;
10843
- if (!dateVal || !dayjs7__default.default(dateVal).isValid()) return false;
10844
- return recordDate.valueOf() > dayjs7__default.default(dateVal).endOf("day").valueOf();
11365
+ if (!dateVal || !dayjs8__default.default(dateVal).isValid()) return false;
11366
+ return recordDate.valueOf() > dayjs8__default.default(dateVal).endOf("day").valueOf();
10845
11367
  }
10846
11368
  case "before": {
10847
11369
  const dateVal = mode === "relative" ? resolveRelativeDate(rule.value, false).date : getDateValue(rule.value, false).date;
10848
- if (!dateVal || !dayjs7__default.default(dateVal).isValid()) return false;
10849
- return recordDate.valueOf() < dayjs7__default.default(dateVal).startOf("day").valueOf();
11370
+ if (!dateVal || !dayjs8__default.default(dateVal).isValid()) return false;
11371
+ return recordDate.valueOf() < dayjs8__default.default(dateVal).startOf("day").valueOf();
10850
11372
  }
10851
11373
  case "between": {
10852
11374
  const startRange = mode === "relative" ? resolveRelativeDate(rule.value, true) : getDateValue(rule.value, true);
@@ -10970,9 +11492,9 @@ var RelatedObjectsTable = ({ rel, record, relatedModel, parentModel, showActions
10970
11492
  const deleteId = relationRow && rel.targetKey && rel.otherKey ? `${relationRow["eid_from"]}:${relationRow["eid_to"]}` : relationRow?.id ?? relationRow?.eid;
10971
11493
  if (deleteId === void 0 || deleteId === null) return;
10972
11494
  antd.Modal.confirm({
10973
- title: _30("Delete"),
10974
- content: _30("Are you sure you want to delete this relation?"),
10975
- okText: _30("Delete"),
11495
+ title: _32("Delete"),
11496
+ content: _32("Are you sure you want to delete this relation?"),
11497
+ okText: _32("Delete"),
10976
11498
  okButtonProps: { danger: true },
10977
11499
  onOk: async () => {
10978
11500
  try {
@@ -10993,9 +11515,9 @@ var RelatedObjectsTable = ({ rel, record, relatedModel, parentModel, showActions
10993
11515
  const itemDeleteId = rel.targetKey && rel.otherKey ? `${itemRelationRow[rel.targetKey]}:${itemRelationRow[rel.otherKey]}` : itemRelationRow?.id ?? itemRelationRow?.eid;
10994
11516
  return String(itemDeleteId) !== String(deleteId);
10995
11517
  }));
10996
- antd.message.success(_30("Relation deleted."));
11518
+ antd.message.success(_32("Relation deleted."));
10997
11519
  } catch (err) {
10998
- antd.message.error(err instanceof Error ? err.message : _30("Failed to delete relation."));
11520
+ antd.message.error(err instanceof Error ? err.message : _32("Failed to delete relation."));
10999
11521
  }
11000
11522
  }
11001
11523
  });
@@ -11298,7 +11820,7 @@ var RelatedObjectsTable = ({ rel, record, relatedModel, parentModel, showActions
11298
11820
  }
11299
11821
  }, [numericFields, rankingFieldKey, rankingMode]);
11300
11822
  const formatCategoryValue = React6.useCallback((field, recordRow) => {
11301
- if (!field) return _30("All");
11823
+ if (!field) return _32("All");
11302
11824
  const raw = recordRow?.[field.key];
11303
11825
  if (raw === void 0 || raw === null) return "-";
11304
11826
  if (field.key === "eid" && recordRow?._label) return recordRow._label;
@@ -11309,7 +11831,7 @@ var RelatedObjectsTable = ({ rel, record, relatedModel, parentModel, showActions
11309
11831
  if (field.options) {
11310
11832
  return field.options.find((option) => option.value === raw)?.label || String(raw);
11311
11833
  }
11312
- if (field.type === "boolean") return raw ? _30("Yes") : _30("No");
11834
+ if (field.type === "boolean") return raw ? _32("Yes") : _32("No");
11313
11835
  if (field.type === "date") return formatDateValue(raw);
11314
11836
  return String(raw);
11315
11837
  }, [labelCache]);
@@ -11401,7 +11923,7 @@ var RelatedObjectsTable = ({ rel, record, relatedModel, parentModel, showActions
11401
11923
  const seriesLabels = numericFields.length > 0 ? numericFields.reduce((acc, field) => {
11402
11924
  acc[field.key] = field.label;
11403
11925
  return acc;
11404
- }, { "__count__": _30("Count") }) : { "__count__": _30("Count") };
11926
+ }, { "__count__": _32("Count") }) : { "__count__": _32("Count") };
11405
11927
  let groups = baseGroups;
11406
11928
  if (rankingMode !== "none" && rankingFieldKey) {
11407
11929
  const limit = Math.max(1, Math.floor(rankingN || 10));
@@ -11479,7 +12001,7 @@ var RelatedObjectsTable = ({ rel, record, relatedModel, parentModel, showActions
11479
12001
  if (field.options) {
11480
12002
  return field.options.find((option) => option.value === raw)?.label || String(raw);
11481
12003
  }
11482
- if (field.type === "boolean") return raw ? _30("Yes") : _30("No");
12004
+ if (field.type === "boolean") return raw ? _32("Yes") : _32("No");
11483
12005
  if (field.type === "date") return formatDateValue(raw);
11484
12006
  return String(raw);
11485
12007
  }, [labelCache]);
@@ -11682,7 +12204,7 @@ var RelatedObjectsTable = ({ rel, record, relatedModel, parentModel, showActions
11682
12204
  if (field.options) {
11683
12205
  return field.options.find((option) => option.value === raw)?.label || String(raw);
11684
12206
  }
11685
- if (field.type === "boolean") return raw ? _30("Yes") : _30("No");
12207
+ if (field.type === "boolean") return raw ? _32("Yes") : _32("No");
11686
12208
  if (field.type === "date") return formatDateValue(raw);
11687
12209
  return String(raw);
11688
12210
  }, [labelCache]);
@@ -11754,13 +12276,13 @@ var RelatedObjectsTable = ({ rel, record, relatedModel, parentModel, showActions
11754
12276
  const getSummaryFunctionDisplayText = (fn) => {
11755
12277
  if (!fn) return "";
11756
12278
  const labels = {
11757
- sum: _30("Sum"),
11758
- avg: _30("Average"),
11759
- count: _30("Count"),
11760
- max: _30("Max"),
11761
- min: _30("Min"),
11762
- stddev: _30("Std Dev"),
11763
- distinct: _30("Distinct")
12279
+ sum: _32("Sum"),
12280
+ avg: _32("Average"),
12281
+ count: _32("Count"),
12282
+ max: _32("Max"),
12283
+ min: _32("Min"),
12284
+ stddev: _32("Std Dev"),
12285
+ distinct: _32("Distinct")
11764
12286
  };
11765
12287
  return labels[fn] || fn;
11766
12288
  };
@@ -11836,12 +12358,12 @@ var RelatedObjectsTable = ({ rel, record, relatedModel, parentModel, showActions
11836
12358
  ]
11837
12359
  }
11838
12360
  ) }),
11839
- /* @__PURE__ */ jsxRuntime.jsx(antd.Tooltip, { title: isTotalsDetailsFlipped ? _30("Show totals") : _30("Show details"), children: /* @__PURE__ */ jsxRuntime.jsx(
12361
+ /* @__PURE__ */ jsxRuntime.jsx(antd.Tooltip, { title: isTotalsDetailsFlipped ? _32("Show totals") : _32("Show details"), children: /* @__PURE__ */ jsxRuntime.jsx(
11840
12362
  antd.Button,
11841
12363
  {
11842
12364
  size: "small",
11843
12365
  icon: /* @__PURE__ */ jsxRuntime.jsx(icons.SwapOutlined, { style: { transform: "rotate(90deg)" } }),
11844
- "aria-label": isTotalsDetailsFlipped ? _30("Show totals") : _30("Show details"),
12366
+ "aria-label": isTotalsDetailsFlipped ? _32("Show totals") : _32("Show details"),
11845
12367
  onClick: () => setIsTotalsDetailsFlipped((prev) => !prev),
11846
12368
  style: {
11847
12369
  flexShrink: 0,
@@ -11853,7 +12375,7 @@ var RelatedObjectsTable = ({ rel, record, relatedModel, parentModel, showActions
11853
12375
  ) })
11854
12376
  ] }),
11855
12377
  relationRowsCapped && /* @__PURE__ */ jsxRuntime.jsxs("div", { style: { marginTop: 8, display: "flex", alignItems: "center", justifyContent: "flex-end", gap: 8, flexWrap: "wrap" }, children: [
11856
- /* @__PURE__ */ jsxRuntime.jsx(antd.Typography.Text, { type: "secondary", style: { fontSize: 12 }, children: _30("Only the first N rows are loaded").replace("N", formatNumberValue(loadedRowsCount || relationsMaxRowsToLoad)) }),
12378
+ /* @__PURE__ */ jsxRuntime.jsx(antd.Typography.Text, { type: "secondary", style: { fontSize: 12 }, children: _32("Only the first N rows are loaded").replace("N", formatNumberValue(loadedRowsCount || relationsMaxRowsToLoad)) }),
11857
12379
  /* @__PURE__ */ jsxRuntime.jsx(
11858
12380
  antd.Button,
11859
12381
  {
@@ -11864,7 +12386,7 @@ var RelatedObjectsTable = ({ rel, record, relatedModel, parentModel, showActions
11864
12386
  setFullDataLoaded(false);
11865
12387
  setLoadAllRelatedRequested(true);
11866
12388
  },
11867
- children: _30("Load all related")
12389
+ children: _32("Load all related")
11868
12390
  }
11869
12391
  )
11870
12392
  ] })
@@ -11875,7 +12397,7 @@ var RelatedObjectsTable = ({ rel, record, relatedModel, parentModel, showActions
11875
12397
  /* @__PURE__ */ jsxRuntime.jsxs("div", { style: { display: "flex", alignItems: "center", justifyContent: "space-between", gap: 12, marginBottom: 8 }, children: [
11876
12398
  /* @__PURE__ */ jsxRuntime.jsx("div", { style: { minHeight: 22, display: "flex", alignItems: "center" }, children: title && /* @__PURE__ */ jsxRuntime.jsx(Title5, { level: 5, style: { color: relatedModelTone.text, margin: 0 }, children: title }) }),
11877
12399
  /* @__PURE__ */ jsxRuntime.jsxs("div", { style: { display: "flex", gap: 8 }, children: [
11878
- /* @__PURE__ */ jsxRuntime.jsx(antd.Tooltip, { title: columnsSelectorOpen ? _30("Hide view configuration") : _30("Show view configuration"), children: /* @__PURE__ */ jsxRuntime.jsx(
12400
+ /* @__PURE__ */ jsxRuntime.jsx(antd.Tooltip, { title: columnsSelectorOpen ? _32("Hide view configuration") : _32("Show view configuration"), children: /* @__PURE__ */ jsxRuntime.jsx(
11879
12401
  antd.Button,
11880
12402
  {
11881
12403
  size: "small",
@@ -11887,11 +12409,11 @@ var RelatedObjectsTable = ({ rel, record, relatedModel, parentModel, showActions
11887
12409
  return next;
11888
12410
  });
11889
12411
  },
11890
- "aria-label": columnsSelectorOpen ? _30("Hide view configuration") : _30("Show view configuration")
12412
+ "aria-label": columnsSelectorOpen ? _32("Hide view configuration") : _32("Show view configuration")
11891
12413
  }
11892
12414
  ) }),
11893
12415
  showCreate && recordId !== void 0 && recordId !== null && /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
11894
- /* @__PURE__ */ jsxRuntime.jsx(antd.Tooltip, { title: rel.otherResource && rel.otherKey ? _30("Associate existing") : _30("Add relation"), children: /* @__PURE__ */ jsxRuntime.jsx(
12416
+ /* @__PURE__ */ jsxRuntime.jsx(antd.Tooltip, { title: rel.otherResource && rel.otherKey ? _32("Associate existing") : _32("Add relation"), children: /* @__PURE__ */ jsxRuntime.jsx(
11895
12417
  antd.Button,
11896
12418
  {
11897
12419
  size: "small",
@@ -11924,7 +12446,7 @@ var RelatedObjectsTable = ({ rel, record, relatedModel, parentModel, showActions
11924
12446
  }
11925
12447
  }
11926
12448
  ) }),
11927
- rel.otherResource && rel.otherKey && rel.targetKey && /* @__PURE__ */ jsxRuntime.jsx(antd.Tooltip, { title: _30("Create new and relate"), children: /* @__PURE__ */ jsxRuntime.jsx(
12449
+ rel.otherResource && rel.otherKey && rel.targetKey && /* @__PURE__ */ jsxRuntime.jsx(antd.Tooltip, { title: _32("Create new and relate"), children: /* @__PURE__ */ jsxRuntime.jsx(
11928
12450
  antd.Button,
11929
12451
  {
11930
12452
  size: "small",
@@ -11938,7 +12460,7 @@ var RelatedObjectsTable = ({ rel, record, relatedModel, parentModel, showActions
11938
12460
  const relatedModel2 = findModelByName(allModels, rel.otherResource || rel.otherResourcePath);
11939
12461
  const relatedResource = relatedModel2 ? resolveResourcePath(relatedModel2.resource || relatedModel2.name, allModels) : null;
11940
12462
  if (!relatedResource) {
11941
- antd.message.warning(_30("No create route for the related model. Opening relation create form."));
12463
+ antd.message.warning(_32("No create route for the related model. Opening relation create form."));
11942
12464
  params.append(rel.targetKey, String(recordId));
11943
12465
  if (allowInlineEdit) params.append("inline", "1");
11944
12466
  const returnTo2 = `${location.pathname}${location.search}${location.hash}`;
@@ -11957,7 +12479,7 @@ var RelatedObjectsTable = ({ rel, record, relatedModel, parentModel, showActions
11957
12479
  }
11958
12480
  ) })
11959
12481
  ] }),
11960
- allowInlineEdit && /* @__PURE__ */ jsxRuntime.jsx(antd.Tooltip, { title: _30("Save"), children: /* @__PURE__ */ jsxRuntime.jsx(
12482
+ allowInlineEdit && /* @__PURE__ */ jsxRuntime.jsx(antd.Tooltip, { title: _32("Save"), children: /* @__PURE__ */ jsxRuntime.jsx(
11961
12483
  antd.Button,
11962
12484
  {
11963
12485
  size: "small",
@@ -11965,10 +12487,10 @@ var RelatedObjectsTable = ({ rel, record, relatedModel, parentModel, showActions
11965
12487
  icon: /* @__PURE__ */ jsxRuntime.jsx(icons.SaveOutlined, {}),
11966
12488
  onClick: saveAllEdits,
11967
12489
  loading: savingAll,
11968
- "aria-label": _30("Save")
12490
+ "aria-label": _32("Save")
11969
12491
  }
11970
12492
  ) }),
11971
- /* @__PURE__ */ jsxRuntime.jsx(antd.Tooltip, { title: _30("Export CSV"), children: /* @__PURE__ */ jsxRuntime.jsx(
12493
+ /* @__PURE__ */ jsxRuntime.jsx(antd.Tooltip, { title: _32("Export CSV"), children: /* @__PURE__ */ jsxRuntime.jsx(
11972
12494
  antd.Button,
11973
12495
  {
11974
12496
  size: "small",
@@ -11983,20 +12505,20 @@ var RelatedObjectsTable = ({ rel, record, relatedModel, parentModel, showActions
11983
12505
  antd.Modal,
11984
12506
  {
11985
12507
  open: saveViewModalOpen,
11986
- title: _30("Save view"),
12508
+ title: _32("Save view"),
11987
12509
  onCancel: () => {
11988
12510
  setSaveViewModalOpen(false);
11989
12511
  setPendingSaveTarget(null);
11990
12512
  },
11991
12513
  onOk: handleConfirmSaveView,
11992
- okText: pendingSaveTarget === "layout" ? _30("Save layout") : _30("Save analyze"),
12514
+ okText: pendingSaveTarget === "layout" ? _32("Save layout") : _32("Save analyze"),
11993
12515
  okButtonProps: { disabled: !pendingSaveTarget },
11994
12516
  children: /* @__PURE__ */ jsxRuntime.jsxs("div", { style: { display: "grid", gap: 12 }, children: [
11995
12517
  /* @__PURE__ */ jsxRuntime.jsxs("div", { children: [
11996
- /* @__PURE__ */ jsxRuntime.jsx("div", { style: { fontSize: 12, color: token.colorTextSecondary, marginBottom: 4 }, children: _30("View name") }),
12518
+ /* @__PURE__ */ jsxRuntime.jsx("div", { style: { fontSize: 12, color: token.colorTextSecondary, marginBottom: 4 }, children: _32("View name") }),
11997
12519
  /* @__PURE__ */ jsxRuntime.jsx(antd.Input, { value: saveViewName, onChange: (event) => setSaveViewName(event.target.value) })
11998
12520
  ] }),
11999
- /* @__PURE__ */ jsxRuntime.jsx(antd.Checkbox, { checked: saveViewAsNew, onChange: (event) => setSaveViewAsNew(event.target.checked), children: _30("Save as new view") })
12521
+ /* @__PURE__ */ jsxRuntime.jsx(antd.Checkbox, { checked: saveViewAsNew, onChange: (event) => setSaveViewAsNew(event.target.checked), children: _32("Save as new view") })
12000
12522
  ] })
12001
12523
  }
12002
12524
  ),
@@ -12004,10 +12526,10 @@ var RelatedObjectsTable = ({ rel, record, relatedModel, parentModel, showActions
12004
12526
  antd.Modal,
12005
12527
  {
12006
12528
  open: renameViewModalOpen,
12007
- title: _30("Rename view"),
12529
+ title: _32("Rename view"),
12008
12530
  onCancel: () => setRenameViewModalOpen(false),
12009
12531
  onOk: handleRenameView,
12010
- okText: _30("Rename"),
12532
+ okText: _32("Rename"),
12011
12533
  children: /* @__PURE__ */ jsxRuntime.jsx(antd.Input, { value: renameViewName, onChange: (event) => setRenameViewName(event.target.value) })
12012
12534
  }
12013
12535
  ),
@@ -12017,11 +12539,11 @@ var RelatedObjectsTable = ({ rel, record, relatedModel, parentModel, showActions
12017
12539
  {
12018
12540
  size: "small",
12019
12541
  title: /* @__PURE__ */ jsxRuntime.jsxs("div", { style: { display: "flex", alignItems: "center", justifyContent: "space-between", gap: 12, flexWrap: "wrap" }, children: [
12020
- /* @__PURE__ */ jsxRuntime.jsx("span", { style: { color: token.colorTextSecondary, fontSize: 12, fontWeight: 600 }, children: _30("Filters") }),
12542
+ /* @__PURE__ */ jsxRuntime.jsx("span", { style: { color: token.colorTextSecondary, fontSize: 12, fontWeight: 600 }, children: _32("Filters") }),
12021
12543
  /* @__PURE__ */ jsxRuntime.jsx("div", { style: { display: "flex", alignItems: "center", gap: 8, flex: 1, justifyContent: "flex-end" }, children: /* @__PURE__ */ jsxRuntime.jsx(
12022
12544
  antd.Input,
12023
12545
  {
12024
- placeholder: _30("Search all fields..."),
12546
+ placeholder: _32("Search all fields..."),
12025
12547
  prefix: /* @__PURE__ */ jsxRuntime.jsx(icons.SearchOutlined, {}),
12026
12548
  allowClear: true,
12027
12549
  value: localSearch,
@@ -12039,31 +12561,31 @@ var RelatedObjectsTable = ({ rel, record, relatedModel, parentModel, showActions
12039
12561
  antd.Card,
12040
12562
  {
12041
12563
  size: "small",
12042
- title: /* @__PURE__ */ jsxRuntime.jsx("span", { style: { color: token.colorTextSecondary, fontSize: 12, fontWeight: 600 }, children: _30("View configuration") }),
12564
+ title: /* @__PURE__ */ jsxRuntime.jsx("span", { style: { color: token.colorTextSecondary, fontSize: 12, fontWeight: 600 }, children: _32("View configuration") }),
12043
12565
  style: { marginBottom: 16 },
12044
12566
  styles: { body: { display: "grid", gap: 12 } },
12045
12567
  children: [
12046
12568
  /* @__PURE__ */ jsxRuntime.jsxs("div", { style: { display: "grid", gap: 12 }, children: [
12047
12569
  /* @__PURE__ */ jsxRuntime.jsxs("div", { style: { display: "grid", gap: 8 }, children: [
12048
- /* @__PURE__ */ jsxRuntime.jsx("div", { style: { fontSize: 12, color: token.colorTextSecondary, fontWeight: 600 }, children: _30("Advanced filters") }),
12049
- filterRules.length === 0 ? /* @__PURE__ */ jsxRuntime.jsx("div", { style: { color: token.colorTextSecondary, fontSize: 12 }, children: _30("No filters yet.") }) : filterRules.map((rule) => {
12570
+ /* @__PURE__ */ jsxRuntime.jsx("div", { style: { fontSize: 12, color: token.colorTextSecondary, fontWeight: 600 }, children: _32("Advanced filters") }),
12571
+ filterRules.length === 0 ? /* @__PURE__ */ jsxRuntime.jsx("div", { style: { color: token.colorTextSecondary, fontSize: 12 }, children: _32("No filters yet.") }) : filterRules.map((rule) => {
12050
12572
  const field = relatedModel.fields.find((f) => f.key === rule.fieldKey);
12051
12573
  const type = field?.type || "string";
12052
12574
  const operatorOptions = type === "number" ? [
12053
- { label: _30("="), value: "eq" },
12054
- { label: _30(">"), value: "gt" },
12055
- { label: _30(">="), value: "gte" },
12056
- { label: _30("<"), value: "lt" },
12057
- { label: _30("<="), value: "lte" },
12058
- { label: _30("Between"), value: "between" }
12575
+ { label: _32("="), value: "eq" },
12576
+ { label: _32(">"), value: "gt" },
12577
+ { label: _32(">="), value: "gte" },
12578
+ { label: _32("<"), value: "lt" },
12579
+ { label: _32("<="), value: "lte" },
12580
+ { label: _32("Between"), value: "between" }
12059
12581
  ] : type === "date" ? [
12060
- { label: _30("On"), value: "on" },
12061
- { label: _30("After"), value: "after" },
12062
- { label: _30("Before"), value: "before" },
12063
- { label: _30("Between"), value: "between" }
12064
- ] : type === "boolean" ? [{ label: _30("Is"), value: "is" }] : [
12065
- { label: _30("Contains"), value: "contains" },
12066
- { label: _30("Equals"), value: "equals" }
12582
+ { label: _32("On"), value: "on" },
12583
+ { label: _32("After"), value: "after" },
12584
+ { label: _32("Before"), value: "before" },
12585
+ { label: _32("Between"), value: "between" }
12586
+ ] : type === "boolean" ? [{ label: _32("Is"), value: "is" }] : [
12587
+ { label: _32("Contains"), value: "contains" },
12588
+ { label: _32("Equals"), value: "equals" }
12067
12589
  ];
12068
12590
  const renderDateInput = (value, onChange) => {
12069
12591
  const mode = value?.mode || "absolute";
@@ -12076,9 +12598,9 @@ var RelatedObjectsTable = ({ rel, record, relatedModel, parentModel, showActions
12076
12598
  value: value?.direction || "next",
12077
12599
  onChange: (val) => onChange({ ...value, mode: "relative", direction: val }),
12078
12600
  options: [
12079
- { label: _30("Previous"), value: "previous" },
12080
- { label: _30("Current"), value: "current" },
12081
- { label: _30("Next"), value: "next" }
12601
+ { label: _32("Previous"), value: "previous" },
12602
+ { label: _32("Current"), value: "current" },
12603
+ { label: _32("Next"), value: "next" }
12082
12604
  ]
12083
12605
  }
12084
12606
  ),
@@ -12088,11 +12610,11 @@ var RelatedObjectsTable = ({ rel, record, relatedModel, parentModel, showActions
12088
12610
  value: value?.unit || "weeks",
12089
12611
  onChange: (val) => onChange({ ...value, mode: "relative", unit: val }),
12090
12612
  options: [
12091
- { label: _30("Days"), value: "days" },
12092
- { label: _30("Weeks"), value: "weeks" },
12093
- { label: _30("Months"), value: "months" },
12094
- { label: _30("Quarters"), value: "quarters" },
12095
- { label: _30("Years"), value: "years" }
12613
+ { label: _32("Days"), value: "days" },
12614
+ { label: _32("Weeks"), value: "weeks" },
12615
+ { label: _32("Months"), value: "months" },
12616
+ { label: _32("Quarters"), value: "quarters" },
12617
+ { label: _32("Years"), value: "years" }
12096
12618
  ]
12097
12619
  }
12098
12620
  )
@@ -12101,7 +12623,7 @@ var RelatedObjectsTable = ({ rel, record, relatedModel, parentModel, showActions
12101
12623
  return /* @__PURE__ */ jsxRuntime.jsx(
12102
12624
  antd.DatePicker,
12103
12625
  {
12104
- value: value?.date ? dayjs7__default.default(value.date) : void 0,
12626
+ value: value?.date ? dayjs8__default.default(value.date) : void 0,
12105
12627
  onChange: (val) => onChange({ mode: "absolute", date: val ? val.toISOString() : null })
12106
12628
  }
12107
12629
  );
@@ -12114,7 +12636,7 @@ var RelatedObjectsTable = ({ rel, record, relatedModel, parentModel, showActions
12114
12636
  value: rule.fieldKey,
12115
12637
  onChange: (value) => setFilterRules((prev) => prev.map((item) => item.id === rule.id ? { ...item, fieldKey: value, operator: void 0, value: void 0, value2: void 0 } : item)),
12116
12638
  options: relatedModel.fields.map((f) => ({ label: f.label, value: f.key })),
12117
- placeholder: _30("Field")
12639
+ placeholder: _32("Field")
12118
12640
  }
12119
12641
  ),
12120
12642
  /* @__PURE__ */ jsxRuntime.jsx(
@@ -12124,7 +12646,7 @@ var RelatedObjectsTable = ({ rel, record, relatedModel, parentModel, showActions
12124
12646
  value: rule.operator,
12125
12647
  onChange: (value) => setFilterRules((prev) => prev.map((item) => item.id === rule.id ? { ...item, operator: value } : item)),
12126
12648
  options: operatorOptions,
12127
- placeholder: _30("Operator")
12649
+ placeholder: _32("Operator")
12128
12650
  }
12129
12651
  ),
12130
12652
  type === "number" && rule.operator === "between" && /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
@@ -12157,10 +12679,10 @@ var RelatedObjectsTable = ({ rel, record, relatedModel, parentModel, showActions
12157
12679
  value: rule.value,
12158
12680
  onChange: (value) => setFilterRules((prev) => prev.map((item) => item.id === rule.id ? { ...item, value } : item)),
12159
12681
  options: [
12160
- { label: _30("True"), value: true },
12161
- { label: _30("False"), value: false }
12682
+ { label: _32("True"), value: true },
12683
+ { label: _32("False"), value: false }
12162
12684
  ],
12163
- placeholder: _30("Value")
12685
+ placeholder: _32("Value")
12164
12686
  }
12165
12687
  ),
12166
12688
  type === "date" && rule.operator === "between" && /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
@@ -12173,7 +12695,7 @@ var RelatedObjectsTable = ({ rel, record, relatedModel, parentModel, showActions
12173
12695
  {
12174
12696
  value: rule.value,
12175
12697
  onChange: (event) => setFilterRules((prev) => prev.map((item) => item.id === rule.id ? { ...item, value: event.target.value } : item)),
12176
- placeholder: _30("Value"),
12698
+ placeholder: _32("Value"),
12177
12699
  style: { minWidth: 200 }
12178
12700
  }
12179
12701
  ),
@@ -12186,8 +12708,8 @@ var RelatedObjectsTable = ({ rel, record, relatedModel, parentModel, showActions
12186
12708
  setFilterRules((prev) => prev.map((item) => item.id === rule.id ? { ...item, value: { ...item.value || {}, mode: val } } : item));
12187
12709
  },
12188
12710
  options: [
12189
- { label: _30("Date"), value: "absolute" },
12190
- { label: _30("Relative"), value: "relative" }
12711
+ { label: _32("Date"), value: "absolute" },
12712
+ { label: _32("Relative"), value: "relative" }
12191
12713
  ]
12192
12714
  }
12193
12715
  ),
@@ -12200,8 +12722,8 @@ var RelatedObjectsTable = ({ rel, record, relatedModel, parentModel, showActions
12200
12722
  setFilterRules((prev) => prev.map((item) => item.id === rule.id ? { ...item, value2: { ...item.value2 || {}, mode: val } } : item));
12201
12723
  },
12202
12724
  options: [
12203
- { label: _30("Date"), value: "absolute" },
12204
- { label: _30("Relative"), value: "relative" }
12725
+ { label: _32("Date"), value: "absolute" },
12726
+ { label: _32("Relative"), value: "relative" }
12205
12727
  ]
12206
12728
  }
12207
12729
  ),
@@ -12211,7 +12733,7 @@ var RelatedObjectsTable = ({ rel, record, relatedModel, parentModel, showActions
12211
12733
  size: "small",
12212
12734
  danger: true,
12213
12735
  onClick: () => setFilterRules((prev) => prev.filter((item) => item.id !== rule.id)),
12214
- children: _30("Remove")
12736
+ children: _32("Remove")
12215
12737
  }
12216
12738
  )
12217
12739
  ] }, rule.id);
@@ -12223,14 +12745,14 @@ var RelatedObjectsTable = ({ rel, record, relatedModel, parentModel, showActions
12223
12745
  size: "small",
12224
12746
  icon: /* @__PURE__ */ jsxRuntime.jsx(icons.FilterOutlined, {}),
12225
12747
  onClick: () => setFilterRules((prev) => [...prev, { id: `${Date.now()}-${Math.random()}` }]),
12226
- children: _30("Add Filter")
12748
+ children: _32("Add Filter")
12227
12749
  }
12228
12750
  ),
12229
- filterRules.length > 0 && /* @__PURE__ */ jsxRuntime.jsx(antd.Button, { size: "small", onClick: () => setFilterRules([]), children: _30("Clear filters") })
12751
+ filterRules.length > 0 && /* @__PURE__ */ jsxRuntime.jsx(antd.Button, { size: "small", onClick: () => setFilterRules([]), children: _32("Clear filters") })
12230
12752
  ] })
12231
12753
  ] }),
12232
12754
  /* @__PURE__ */ jsxRuntime.jsxs("div", { style: { display: "grid", gap: 6 }, children: [
12233
- /* @__PURE__ */ jsxRuntime.jsx("div", { style: { fontSize: 12, color: token.colorTextSecondary, fontWeight: 600 }, children: _30("Views shown") }),
12755
+ /* @__PURE__ */ jsxRuntime.jsx("div", { style: { fontSize: 12, color: token.colorTextSecondary, fontWeight: 600 }, children: _32("Views shown") }),
12234
12756
  /* @__PURE__ */ jsxRuntime.jsx(
12235
12757
  antd.Select,
12236
12758
  {
@@ -12251,12 +12773,12 @@ var RelatedObjectsTable = ({ rel, record, relatedModel, parentModel, showActions
12251
12773
  ),
12252
12774
  selectedViewNames.length > 1 && /* @__PURE__ */ jsxRuntime.jsx("div", { style: { display: "grid", gap: 6 }, children: selectedViewNames.map((name, index) => /* @__PURE__ */ jsxRuntime.jsxs("div", { style: { display: "flex", alignItems: "center", gap: 8 }, children: [
12253
12775
  /* @__PURE__ */ jsxRuntime.jsx("div", { style: { flex: 1 }, children: name }),
12254
- /* @__PURE__ */ jsxRuntime.jsx(antd.Tooltip, { title: _30("Move up"), children: /* @__PURE__ */ jsxRuntime.jsx(antd.Button, { size: "small", icon: /* @__PURE__ */ jsxRuntime.jsx(icons.ArrowUpOutlined, {}), disabled: index === 0, onClick: () => moveSelectedView(name, "up") }) }),
12255
- /* @__PURE__ */ jsxRuntime.jsx(antd.Tooltip, { title: _30("Move down"), children: /* @__PURE__ */ jsxRuntime.jsx(antd.Button, { size: "small", icon: /* @__PURE__ */ jsxRuntime.jsx(icons.ArrowDownOutlined, {}), disabled: index === selectedViewNames.length - 1, onClick: () => moveSelectedView(name, "down") }) })
12776
+ /* @__PURE__ */ jsxRuntime.jsx(antd.Tooltip, { title: _32("Move up"), children: /* @__PURE__ */ jsxRuntime.jsx(antd.Button, { size: "small", icon: /* @__PURE__ */ jsxRuntime.jsx(icons.ArrowUpOutlined, {}), disabled: index === 0, onClick: () => moveSelectedView(name, "up") }) }),
12777
+ /* @__PURE__ */ jsxRuntime.jsx(antd.Tooltip, { title: _32("Move down"), children: /* @__PURE__ */ jsxRuntime.jsx(antd.Button, { size: "small", icon: /* @__PURE__ */ jsxRuntime.jsx(icons.ArrowDownOutlined, {}), disabled: index === selectedViewNames.length - 1, onClick: () => moveSelectedView(name, "down") }) })
12256
12778
  ] }, name)) })
12257
12779
  ] }),
12258
12780
  /* @__PURE__ */ jsxRuntime.jsxs("div", { style: { display: "grid", gap: 6 }, children: [
12259
- /* @__PURE__ */ jsxRuntime.jsx("div", { style: { fontSize: 12, color: token.colorTextSecondary, fontWeight: 600 }, children: _30("Active view") }),
12781
+ /* @__PURE__ */ jsxRuntime.jsx("div", { style: { fontSize: 12, color: token.colorTextSecondary, fontWeight: 600 }, children: _32("Active view") }),
12260
12782
  viewSelector
12261
12783
  ] }),
12262
12784
  /* @__PURE__ */ jsxRuntime.jsxs("div", { style: { display: "flex", flexWrap: "wrap", alignItems: "center", gap: 8 }, children: [
@@ -12268,7 +12790,7 @@ var RelatedObjectsTable = ({ rel, record, relatedModel, parentModel, showActions
12268
12790
  setRenameViewName(currentViewName);
12269
12791
  setRenameViewModalOpen(true);
12270
12792
  },
12271
- children: _30("Rename view")
12793
+ children: _32("Rename view")
12272
12794
  }
12273
12795
  ),
12274
12796
  /* @__PURE__ */ jsxRuntime.jsx(
@@ -12279,7 +12801,7 @@ var RelatedObjectsTable = ({ rel, record, relatedModel, parentModel, showActions
12279
12801
  icon: /* @__PURE__ */ jsxRuntime.jsx(icons.DeleteOutlined, {}),
12280
12802
  disabled: availableViewNames.length <= 1,
12281
12803
  onClick: confirmDeleteView,
12282
- children: _30("Delete view")
12804
+ children: _32("Delete view")
12283
12805
  }
12284
12806
  ),
12285
12807
  layoutPreferenceType && /* @__PURE__ */ jsxRuntime.jsx(
@@ -12289,7 +12811,7 @@ var RelatedObjectsTable = ({ rel, record, relatedModel, parentModel, showActions
12289
12811
  icon: /* @__PURE__ */ jsxRuntime.jsx(icons.SaveOutlined, {}),
12290
12812
  onClick: () => openSaveViewModalFor("layout"),
12291
12813
  loading: isSavingLayoutPrefs,
12292
- children: _30("Save layout")
12814
+ children: _32("Save layout")
12293
12815
  }
12294
12816
  ),
12295
12817
  /* @__PURE__ */ jsxRuntime.jsx(
@@ -12301,7 +12823,7 @@ var RelatedObjectsTable = ({ rel, record, relatedModel, parentModel, showActions
12301
12823
  markLayoutPrefsTouched();
12302
12824
  setFiltersCollapsed((prev) => !prev);
12303
12825
  },
12304
- children: filtersCollapsed ? _30("Show Filters") : _30("Hide Filters")
12826
+ children: filtersCollapsed ? _32("Show Filters") : _32("Hide Filters")
12305
12827
  }
12306
12828
  ),
12307
12829
  /* @__PURE__ */ jsxRuntime.jsx(
@@ -12313,7 +12835,7 @@ var RelatedObjectsTable = ({ rel, record, relatedModel, parentModel, showActions
12313
12835
  markLayoutPrefsTouched();
12314
12836
  setListVisible((prev) => !prev);
12315
12837
  },
12316
- children: _30("View list")
12838
+ children: _32("View list")
12317
12839
  }
12318
12840
  ),
12319
12841
  /* @__PURE__ */ jsxRuntime.jsx(
@@ -12327,7 +12849,7 @@ var RelatedObjectsTable = ({ rel, record, relatedModel, parentModel, showActions
12327
12849
  setIsStatsFlipped(false);
12328
12850
  setAnalyzeOpen((prev) => !prev);
12329
12851
  },
12330
- children: _30("Analyze")
12852
+ children: _32("Analyze")
12331
12853
  }
12332
12854
  ),
12333
12855
  /* @__PURE__ */ jsxRuntime.jsx(
@@ -12339,7 +12861,7 @@ var RelatedObjectsTable = ({ rel, record, relatedModel, parentModel, showActions
12339
12861
  markLayoutPrefsTouched();
12340
12862
  setIsAnalyzeVertical((prev) => !prev);
12341
12863
  },
12342
- children: _30("Switch orientation")
12864
+ children: _32("Switch orientation")
12343
12865
  }
12344
12866
  ),
12345
12867
  /* @__PURE__ */ jsxRuntime.jsx(
@@ -12351,21 +12873,21 @@ var RelatedObjectsTable = ({ rel, record, relatedModel, parentModel, showActions
12351
12873
  markLayoutPrefsTouched();
12352
12874
  setIsAnalyzeFirst((prev) => !prev);
12353
12875
  },
12354
- children: _30("Switch positions")
12876
+ children: _32("Switch positions")
12355
12877
  }
12356
12878
  )
12357
12879
  ] })
12358
12880
  ] }),
12359
12881
  /* @__PURE__ */ jsxRuntime.jsxs("div", { style: { display: "grid", gap: 12 }, children: [
12360
12882
  /* @__PURE__ */ jsxRuntime.jsxs("div", { style: { display: "flex", alignItems: "center", justifyContent: "space-between", gap: 12 }, children: [
12361
- /* @__PURE__ */ jsxRuntime.jsx("span", { style: { color: token.colorTextSecondary, fontSize: 12, fontWeight: 600 }, children: _30("Columns") }),
12883
+ /* @__PURE__ */ jsxRuntime.jsx("span", { style: { color: token.colorTextSecondary, fontSize: 12, fontWeight: 600 }, children: _32("Columns") }),
12362
12884
  selectedColumnKeys && selectedColumnKeys.length > 0 && /* @__PURE__ */ jsxRuntime.jsx(antd.Button, { size: "small", onClick: () => {
12363
12885
  setSelectedColumnKeys(null);
12364
12886
  setColumnOrder(null);
12365
- }, children: _30("Reset to default") })
12887
+ }, children: _32("Reset to default") })
12366
12888
  ] }),
12367
12889
  /* @__PURE__ */ jsxRuntime.jsxs("div", { children: [
12368
- /* @__PURE__ */ jsxRuntime.jsx("div", { style: { fontSize: 12, color: token.colorTextSecondary, marginBottom: 6 }, children: _30("Select columns") }),
12890
+ /* @__PURE__ */ jsxRuntime.jsx("div", { style: { fontSize: 12, color: token.colorTextSecondary, marginBottom: 6 }, children: _32("Select columns") }),
12369
12891
  /* @__PURE__ */ jsxRuntime.jsx(
12370
12892
  antd.Checkbox.Group,
12371
12893
  {
@@ -12377,27 +12899,27 @@ var RelatedObjectsTable = ({ rel, record, relatedModel, parentModel, showActions
12377
12899
  (!selectedColumnKeys || selectedColumnKeys.length === 0) && /* @__PURE__ */ jsxRuntime.jsx("div", { style: { fontSize: 12, color: token.colorTextSecondary, marginTop: 6 }, children: "Using default columns. Select fields to customize." })
12378
12900
  ] }),
12379
12901
  /* @__PURE__ */ jsxRuntime.jsxs("div", { children: [
12380
- /* @__PURE__ */ jsxRuntime.jsx("div", { style: { fontSize: 12, color: token.colorTextSecondary, marginBottom: 6 }, children: _30("Column order") }),
12381
- orderedSelectedColumns.length === 0 ? /* @__PURE__ */ jsxRuntime.jsx("div", { style: { fontSize: 12, color: token.colorTextSecondary }, children: _30("No custom order yet.") }) : orderedSelectedColumns.map((key, index) => {
12902
+ /* @__PURE__ */ jsxRuntime.jsx("div", { style: { fontSize: 12, color: token.colorTextSecondary, marginBottom: 6 }, children: _32("Column order") }),
12903
+ orderedSelectedColumns.length === 0 ? /* @__PURE__ */ jsxRuntime.jsx("div", { style: { fontSize: 12, color: token.colorTextSecondary }, children: _32("No custom order yet.") }) : orderedSelectedColumns.map((key, index) => {
12382
12904
  const field = relatedModel.fields.find((item) => item.key === key);
12383
12905
  if (!field) return null;
12384
12906
  return /* @__PURE__ */ jsxRuntime.jsxs("div", { style: { display: "flex", alignItems: "center", gap: 8, marginBottom: 4 }, children: [
12385
12907
  /* @__PURE__ */ jsxRuntime.jsx("div", { style: { flex: 1 }, children: field.label }),
12386
- /* @__PURE__ */ jsxRuntime.jsx(antd.Tooltip, { title: _30("Move left"), children: /* @__PURE__ */ jsxRuntime.jsx(antd.Button, { size: "small", icon: /* @__PURE__ */ jsxRuntime.jsx(icons.ArrowLeftOutlined, {}), disabled: index === 0, onClick: () => moveColumnOrder(key, "left") }) }),
12387
- /* @__PURE__ */ jsxRuntime.jsx(antd.Tooltip, { title: _30("Move right"), children: /* @__PURE__ */ jsxRuntime.jsx(antd.Button, { size: "small", icon: /* @__PURE__ */ jsxRuntime.jsx(icons.ArrowRightOutlined, {}), disabled: index === orderedSelectedColumns.length - 1, onClick: () => moveColumnOrder(key, "right") }) })
12908
+ /* @__PURE__ */ jsxRuntime.jsx(antd.Tooltip, { title: _32("Move left"), children: /* @__PURE__ */ jsxRuntime.jsx(antd.Button, { size: "small", icon: /* @__PURE__ */ jsxRuntime.jsx(icons.ArrowLeftOutlined, {}), disabled: index === 0, onClick: () => moveColumnOrder(key, "left") }) }),
12909
+ /* @__PURE__ */ jsxRuntime.jsx(antd.Tooltip, { title: _32("Move right"), children: /* @__PURE__ */ jsxRuntime.jsx(antd.Button, { size: "small", icon: /* @__PURE__ */ jsxRuntime.jsx(icons.ArrowRightOutlined, {}), disabled: index === orderedSelectedColumns.length - 1, onClick: () => moveColumnOrder(key, "right") }) })
12388
12910
  ] }, key);
12389
12911
  })
12390
12912
  ] }),
12391
12913
  /* @__PURE__ */ jsxRuntime.jsxs("div", { children: [
12392
- /* @__PURE__ */ jsxRuntime.jsx("div", { style: { fontSize: 12, color: token.colorTextSecondary, marginBottom: 6 }, children: _30("Totals summary function") }),
12393
- /* @__PURE__ */ jsxRuntime.jsx("div", { style: { display: "grid", gap: 6 }, children: totalsSummaryConfigFields.length === 0 ? /* @__PURE__ */ jsxRuntime.jsx("div", { style: { fontSize: 12, color: token.colorTextSecondary }, children: _30("No numeric fields available.") }) : totalsSummaryConfigFields.map((field) => {
12914
+ /* @__PURE__ */ jsxRuntime.jsx("div", { style: { fontSize: 12, color: token.colorTextSecondary, marginBottom: 6 }, children: _32("Totals summary function") }),
12915
+ /* @__PURE__ */ jsxRuntime.jsx("div", { style: { display: "grid", gap: 6 }, children: totalsSummaryConfigFields.length === 0 ? /* @__PURE__ */ jsxRuntime.jsx("div", { style: { fontSize: 12, color: token.colorTextSecondary }, children: _32("No numeric fields available.") }) : totalsSummaryConfigFields.map((field) => {
12394
12916
  const options = [
12395
- { label: _30("Sum"), value: "sum" },
12396
- { label: _30("Average"), value: "avg" },
12397
- { label: _30("Count"), value: "count" },
12398
- { label: _30("Max"), value: "max" },
12399
- { label: _30("Min"), value: "min" },
12400
- { label: _30("Std Dev"), value: "stddev" }
12917
+ { label: _32("Sum"), value: "sum" },
12918
+ { label: _32("Average"), value: "avg" },
12919
+ { label: _32("Count"), value: "count" },
12920
+ { label: _32("Max"), value: "max" },
12921
+ { label: _32("Min"), value: "min" },
12922
+ { label: _32("Std Dev"), value: "stddev" }
12401
12923
  ];
12402
12924
  return /* @__PURE__ */ jsxRuntime.jsxs("div", { style: { display: "flex", alignItems: "center", gap: 8 }, children: [
12403
12925
  /* @__PURE__ */ jsxRuntime.jsx("div", { style: { flex: 1 }, children: field.label }),
@@ -12451,7 +12973,7 @@ var RelatedObjectsTable = ({ rel, record, relatedModel, parentModel, showActions
12451
12973
  setCurrentPage(1);
12452
12974
  }
12453
12975
  },
12454
- onShowSizeChange: (_39, newPageSize) => {
12976
+ onShowSizeChange: (_41, newPageSize) => {
12455
12977
  if (newPageSize && newPageSize !== pageSize) {
12456
12978
  setPageSize(newPageSize);
12457
12979
  setCurrentPage(1);
@@ -12460,8 +12982,8 @@ var RelatedObjectsTable = ({ rel, record, relatedModel, parentModel, showActions
12460
12982
  },
12461
12983
  size: "small",
12462
12984
  rowKey: (row) => row?.__relationKey || row?.eid || row?.id || JSON.stringify(row),
12463
- locale: filteredRows.length === 0 ? { emptyText: /* @__PURE__ */ jsxRuntime.jsx("span", { style: { display: "inline-block", fontSize: 12, color: "#8c8c8c" }, children: _30("No related records") }) } : void 0,
12464
- onChange: (_39, filters, sorter, extra) => {
12985
+ locale: filteredRows.length === 0 ? { emptyText: /* @__PURE__ */ jsxRuntime.jsx("span", { style: { display: "inline-block", fontSize: 12, color: "#8c8c8c" }, children: _32("No related records") }) } : void 0,
12986
+ onChange: (_41, filters, sorter, extra) => {
12465
12987
  const nextFilters = {};
12466
12988
  Object.entries(filters || {}).forEach(([key, values]) => {
12467
12989
  if (!values) return;
@@ -12529,7 +13051,7 @@ var RelatedObjectsTable = ({ rel, record, relatedModel, parentModel, showActions
12529
13051
  const recordValue = recordRow?.[field.key];
12530
13052
  return String(recordValue) === String(value);
12531
13053
  },
12532
- align: field.type === "number" && !["eid", "eid_from", "eid_to"].includes(field.key) ? "right" : void 0,
13054
+ align: field.type === "number" && !field.reference && !["eid", "eid_from", "eid_to"].includes(field.key) ? "right" : void 0,
12533
13055
  render: (value, row) => {
12534
13056
  if (allowInlineEdit && field.key !== "eid") {
12535
13057
  const rowId = row?.eid ?? row?.id ?? row?.__relationKey;
@@ -12539,12 +13061,16 @@ var RelatedObjectsTable = ({ rel, record, relatedModel, parentModel, showActions
12539
13061
  name: [rowId, field.key],
12540
13062
  style: { margin: 0 },
12541
13063
  valuePropName: field.type === "boolean" ? "checked" : "value",
12542
- getValueProps: (val) => (field.type === "date" || field.type === "datetime") && val ? { value: dayjs7__default.default(val) } : field.type === "time" && val ? { value: dayjs7__default.default("1970-01-01T" + val) } : { value: val },
13064
+ getValueProps: (val) => (field.type === "date" || field.type === "datetime") && val ? { value: dayjs8__default.default(val) } : field.type === "time" && val ? { value: dayjs8__default.default("1970-01-01T" + val) } : { value: val },
12543
13065
  children: renderEditableInput(field, rowId)
12544
13066
  }
12545
13067
  );
12546
13068
  }
12547
13069
  const renderValue = () => {
13070
+ const showToken = normalizeFieldViewType(field.showViewType || "");
13071
+ if (showToken && !(showToken === "read-only-field" && field.reference)) {
13072
+ return renderFieldValue(field, row, allModels, true);
13073
+ }
12548
13074
  if (field.reference && value) {
12549
13075
  const cacheKey = `${field.reference}:${value}`;
12550
13076
  return labelCache[cacheKey] || value;
@@ -12586,7 +13112,7 @@ var RelatedObjectsTable = ({ rel, record, relatedModel, parentModel, showActions
12586
13112
  showActions && /* @__PURE__ */ jsxRuntime.jsx(
12587
13113
  antd.Table.Column,
12588
13114
  {
12589
- title: _30("Actions"),
13115
+ title: _32("Actions"),
12590
13116
  width: 140,
12591
13117
  render: (_unused, row) => {
12592
13118
  const id = row?.eid ?? row?.id;
@@ -12594,14 +13120,14 @@ var RelatedObjectsTable = ({ rel, record, relatedModel, parentModel, showActions
12594
13120
  const deleteId = relationRow && rel.targetKey && rel.otherKey ? `${relationRow["eid_from"]}:${relationRow["eid_to"]}` : relationRow?.id ?? relationRow?.eid;
12595
13121
  return /* @__PURE__ */ jsxRuntime.jsxs(antd.Space, { children: [
12596
13122
  id && /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
12597
- /* @__PURE__ */ jsxRuntime.jsx(antd.Tooltip, { title: _30("View"), children: /* @__PURE__ */ jsxRuntime.jsx(antd.Button, { size: "small", icon: /* @__PURE__ */ jsxRuntime.jsx(icons.EyeOutlined, {}), onClick: () => {
13123
+ /* @__PURE__ */ jsxRuntime.jsx(antd.Tooltip, { title: _32("View"), children: /* @__PURE__ */ jsxRuntime.jsx(antd.Button, { size: "small", icon: /* @__PURE__ */ jsxRuntime.jsx(icons.EyeOutlined, {}), onClick: () => {
12598
13124
  if (paneNav?.isInMultiPane) {
12599
13125
  paneNav.openDetail(relatedModel.name, id);
12600
13126
  } else {
12601
13127
  go({ to: { resource: relatedModel.name, action: "show", id } });
12602
13128
  }
12603
13129
  } }) }),
12604
- /* @__PURE__ */ jsxRuntime.jsx(antd.Tooltip, { title: _30("Edit"), children: /* @__PURE__ */ jsxRuntime.jsx(antd.Button, { size: "small", icon: /* @__PURE__ */ jsxRuntime.jsx(icons.EditOutlined, {}), onClick: () => {
13130
+ /* @__PURE__ */ jsxRuntime.jsx(antd.Tooltip, { title: _32("Edit"), children: /* @__PURE__ */ jsxRuntime.jsx(antd.Button, { size: "small", icon: /* @__PURE__ */ jsxRuntime.jsx(icons.EditOutlined, {}), onClick: () => {
12605
13131
  if (allowInlineEdit) {
12606
13132
  const params = new URLSearchParams();
12607
13133
  params.append("inline", "1");
@@ -12613,7 +13139,7 @@ var RelatedObjectsTable = ({ rel, record, relatedModel, parentModel, showActions
12613
13139
  }
12614
13140
  } }) })
12615
13141
  ] }),
12616
- deleteId && /* @__PURE__ */ jsxRuntime.jsx(antd.Tooltip, { title: _30("Delete"), children: /* @__PURE__ */ jsxRuntime.jsx(
13142
+ deleteId && /* @__PURE__ */ jsxRuntime.jsx(antd.Tooltip, { title: _32("Delete"), children: /* @__PURE__ */ jsxRuntime.jsx(
12617
13143
  antd.Button,
12618
13144
  {
12619
13145
  size: "small",
@@ -12633,7 +13159,7 @@ var RelatedObjectsTable = ({ rel, record, relatedModel, parentModel, showActions
12633
13159
  }
12634
13160
  ),
12635
13161
  relationRowsCapped && /* @__PURE__ */ jsxRuntime.jsxs("div", { style: { marginTop: 8, display: "flex", alignItems: "center", justifyContent: "flex-end", gap: 8, flexWrap: "wrap" }, children: [
12636
- /* @__PURE__ */ jsxRuntime.jsx(antd.Typography.Text, { type: "secondary", style: { fontSize: 12 }, children: _30("Only the first N rows are loaded").replace("N", formatNumberValue(loadedRowsCount || relationsMaxRowsToLoad)) }),
13162
+ /* @__PURE__ */ jsxRuntime.jsx(antd.Typography.Text, { type: "secondary", style: { fontSize: 12 }, children: _32("Only the first N rows are loaded").replace("N", formatNumberValue(loadedRowsCount || relationsMaxRowsToLoad)) }),
12637
13163
  /* @__PURE__ */ jsxRuntime.jsx(
12638
13164
  antd.Button,
12639
13165
  {
@@ -12643,7 +13169,7 @@ var RelatedObjectsTable = ({ rel, record, relatedModel, parentModel, showActions
12643
13169
  setFullDataLoaded(false);
12644
13170
  setLoadAllRelatedRequested(true);
12645
13171
  },
12646
- children: _30("Load all related")
13172
+ children: _32("Load all related")
12647
13173
  }
12648
13174
  )
12649
13175
  ] })
@@ -12653,7 +13179,7 @@ var RelatedObjectsTable = ({ rel, record, relatedModel, parentModel, showActions
12653
13179
  antd.Card,
12654
13180
  {
12655
13181
  size: "small",
12656
- title: /* @__PURE__ */ jsxRuntime.jsx("span", { style: { color: relatedModelTone.text, fontWeight: 600 }, children: _30("Analyze") }),
13182
+ title: /* @__PURE__ */ jsxRuntime.jsx("span", { style: { color: relatedModelTone.text, fontWeight: 600 }, children: _32("Analyze") }),
12657
13183
  styles: {
12658
13184
  header: {
12659
13185
  background: `linear-gradient(135deg, ${relatedModelTone.solid}18 0%, ${relatedModelTone.solid}0a 100%)`
@@ -12682,10 +13208,10 @@ var RelatedObjectsTable = ({ rel, record, relatedModel, parentModel, showActions
12682
13208
  styles: { body: { display: "grid", gap: 16, position: "relative", paddingTop: 48 } },
12683
13209
  children: [
12684
13210
  /* @__PURE__ */ jsxRuntime.jsxs("div", { style: { position: "absolute", top: 0, right: 0, display: "flex", gap: 8 }, children: [
12685
- /* @__PURE__ */ jsxRuntime.jsx(antd.Tooltip, { title: _30("Save preferences"), children: /* @__PURE__ */ jsxRuntime.jsx(antd.Button, { size: "small", icon: /* @__PURE__ */ jsxRuntime.jsx(icons.SaveOutlined, {}), onClick: () => openSaveViewModalFor("analyze"), loading: isSavingAnalyzePrefs }) }),
12686
- /* @__PURE__ */ jsxRuntime.jsx(antd.Tooltip, { title: _30("Stats"), children: /* @__PURE__ */ jsxRuntime.jsx(antd.Button, { size: "small", icon: /* @__PURE__ */ jsxRuntime.jsx(icons.FileTextOutlined, {}), onClick: () => setIsStatsFlipped(true) }) }),
12687
- /* @__PURE__ */ jsxRuntime.jsx(antd.Tooltip, { title: _30("Export chart PDF"), children: /* @__PURE__ */ jsxRuntime.jsx(antd.Button, { size: "small", icon: /* @__PURE__ */ jsxRuntime.jsx(icons.FilePdfOutlined, {}), onClick: exportChartPdf }) }),
12688
- /* @__PURE__ */ jsxRuntime.jsx(antd.Tooltip, { title: _30("Export chart PNG"), children: /* @__PURE__ */ jsxRuntime.jsx(antd.Button, { size: "small", icon: /* @__PURE__ */ jsxRuntime.jsx(icons.DownloadOutlined, {}), onClick: exportChartImage, "aria-label": _30("Export chart") }) })
13211
+ /* @__PURE__ */ jsxRuntime.jsx(antd.Tooltip, { title: _32("Save preferences"), children: /* @__PURE__ */ jsxRuntime.jsx(antd.Button, { size: "small", icon: /* @__PURE__ */ jsxRuntime.jsx(icons.SaveOutlined, {}), onClick: () => openSaveViewModalFor("analyze"), loading: isSavingAnalyzePrefs }) }),
13212
+ /* @__PURE__ */ jsxRuntime.jsx(antd.Tooltip, { title: _32("Stats"), children: /* @__PURE__ */ jsxRuntime.jsx(antd.Button, { size: "small", icon: /* @__PURE__ */ jsxRuntime.jsx(icons.FileTextOutlined, {}), onClick: () => setIsStatsFlipped(true) }) }),
13213
+ /* @__PURE__ */ jsxRuntime.jsx(antd.Tooltip, { title: _32("Export chart PDF"), children: /* @__PURE__ */ jsxRuntime.jsx(antd.Button, { size: "small", icon: /* @__PURE__ */ jsxRuntime.jsx(icons.FilePdfOutlined, {}), onClick: exportChartPdf }) }),
13214
+ /* @__PURE__ */ jsxRuntime.jsx(antd.Tooltip, { title: _32("Export chart PNG"), children: /* @__PURE__ */ jsxRuntime.jsx(antd.Button, { size: "small", icon: /* @__PURE__ */ jsxRuntime.jsx(icons.DownloadOutlined, {}), onClick: exportChartImage, "aria-label": _32("Export chart") }) })
12689
13215
  ] }),
12690
13216
  /* @__PURE__ */ jsxRuntime.jsx(
12691
13217
  AnalysisChart,
@@ -12716,11 +13242,11 @@ var RelatedObjectsTable = ({ rel, record, relatedModel, parentModel, showActions
12716
13242
  items: [
12717
13243
  {
12718
13244
  key: "configure-chart",
12719
- label: _30("Customize chart"),
13245
+ label: _32("Customize chart"),
12720
13246
  children: /* @__PURE__ */ jsxRuntime.jsxs("div", { style: { display: "grid", gap: 16 }, children: [
12721
13247
  /* @__PURE__ */ jsxRuntime.jsxs("div", { style: { display: "flex", gap: 16, flexWrap: "wrap" }, children: [
12722
13248
  /* @__PURE__ */ jsxRuntime.jsxs("div", { style: { minWidth: 220, flex: 1 }, children: [
12723
- /* @__PURE__ */ jsxRuntime.jsx("div", { style: { fontSize: 12, color: token.colorTextSecondary, marginBottom: 4 }, children: _30("Category 1") }),
13249
+ /* @__PURE__ */ jsxRuntime.jsx("div", { style: { fontSize: 12, color: token.colorTextSecondary, marginBottom: 4 }, children: _32("Category 1") }),
12724
13250
  /* @__PURE__ */ jsxRuntime.jsx(
12725
13251
  antd.Select,
12726
13252
  {
@@ -12731,12 +13257,12 @@ var RelatedObjectsTable = ({ rel, record, relatedModel, parentModel, showActions
12731
13257
  },
12732
13258
  style: { width: "100%" },
12733
13259
  options: categoricalFields.map((field) => ({ label: field.label, value: field.key })),
12734
- placeholder: _30("Select category")
13260
+ placeholder: _32("Select category")
12735
13261
  }
12736
13262
  )
12737
13263
  ] }),
12738
13264
  /* @__PURE__ */ jsxRuntime.jsxs("div", { style: { minWidth: 220, flex: 1 }, children: [
12739
- /* @__PURE__ */ jsxRuntime.jsx("div", { style: { fontSize: 12, color: token.colorTextSecondary, marginBottom: 4 }, children: _30("Category 2") }),
13265
+ /* @__PURE__ */ jsxRuntime.jsx("div", { style: { fontSize: 12, color: token.colorTextSecondary, marginBottom: 4 }, children: _32("Category 2") }),
12740
13266
  /* @__PURE__ */ jsxRuntime.jsx(
12741
13267
  antd.Select,
12742
13268
  {
@@ -12747,14 +13273,14 @@ var RelatedObjectsTable = ({ rel, record, relatedModel, parentModel, showActions
12747
13273
  },
12748
13274
  style: { width: "100%" },
12749
13275
  options: [
12750
- { label: _30("None"), value: "__none__" },
13276
+ { label: _32("None"), value: "__none__" },
12751
13277
  ...categoricalFields.filter((field) => field.key !== categoryField1).map((field) => ({ label: field.label, value: field.key }))
12752
13278
  ]
12753
13279
  }
12754
13280
  )
12755
13281
  ] }),
12756
13282
  /* @__PURE__ */ jsxRuntime.jsxs("div", { style: { minWidth: 160 }, children: [
12757
- /* @__PURE__ */ jsxRuntime.jsx("div", { style: { fontSize: 12, color: token.colorTextSecondary, marginBottom: 4 }, children: _30("Chart Type") }),
13283
+ /* @__PURE__ */ jsxRuntime.jsx("div", { style: { fontSize: 12, color: token.colorTextSecondary, marginBottom: 4 }, children: _32("Chart Type") }),
12758
13284
  /* @__PURE__ */ jsxRuntime.jsx(
12759
13285
  antd.Select,
12760
13286
  {
@@ -12765,30 +13291,30 @@ var RelatedObjectsTable = ({ rel, record, relatedModel, parentModel, showActions
12765
13291
  },
12766
13292
  style: { width: "100%" },
12767
13293
  options: [
12768
- { label: _30("Area"), value: "area" },
12769
- { label: _30("Horizontal Area"), value: "area-horizontal" },
12770
- { label: _30("Bars"), value: "bar" },
12771
- { label: _30("Stacked Bars"), value: "stacked" },
12772
- { label: _30("Horizontal Bars"), value: "bar-horizontal" },
12773
- { label: _30("Horizontal Stacked"), value: "stacked-horizontal" },
12774
- { label: _30("Lines"), value: "line" },
12775
- { label: _30("Pie"), value: "pie" },
12776
- { label: _30("Donut"), value: "donut" },
12777
- { label: _30("Scatter"), value: "scatter" },
12778
- { label: _30("Bubble"), value: "bubble" },
12779
- { label: _30("Histogram"), value: "histogram" },
12780
- { label: _30("Box Plot"), value: "box" },
12781
- { label: _30("Waterfall"), value: "waterfall" },
12782
- { label: _30("Heatmap"), value: "heatmap" },
12783
- { label: _30("Crosstab"), value: "crosstab" },
12784
- { label: _30("Radar"), value: "radar" },
12785
- { label: _30("Combo (Bar + Line)"), value: "combo" }
13294
+ { label: _32("Area"), value: "area" },
13295
+ { label: _32("Horizontal Area"), value: "area-horizontal" },
13296
+ { label: _32("Bars"), value: "bar" },
13297
+ { label: _32("Stacked Bars"), value: "stacked" },
13298
+ { label: _32("Horizontal Bars"), value: "bar-horizontal" },
13299
+ { label: _32("Horizontal Stacked"), value: "stacked-horizontal" },
13300
+ { label: _32("Lines"), value: "line" },
13301
+ { label: _32("Pie"), value: "pie" },
13302
+ { label: _32("Donut"), value: "donut" },
13303
+ { label: _32("Scatter"), value: "scatter" },
13304
+ { label: _32("Bubble"), value: "bubble" },
13305
+ { label: _32("Histogram"), value: "histogram" },
13306
+ { label: _32("Box Plot"), value: "box" },
13307
+ { label: _32("Waterfall"), value: "waterfall" },
13308
+ { label: _32("Heatmap"), value: "heatmap" },
13309
+ { label: _32("Crosstab"), value: "crosstab" },
13310
+ { label: _32("Radar"), value: "radar" },
13311
+ { label: _32("Combo (Bar + Line)"), value: "combo" }
12786
13312
  ]
12787
13313
  }
12788
13314
  )
12789
13315
  ] }),
12790
13316
  /* @__PURE__ */ jsxRuntime.jsxs("div", { style: { minWidth: 200 }, children: [
12791
- /* @__PURE__ */ jsxRuntime.jsx("div", { style: { fontSize: 12, color: token.colorTextSecondary, marginBottom: 4 }, children: _30("Summary") }),
13317
+ /* @__PURE__ */ jsxRuntime.jsx("div", { style: { fontSize: 12, color: token.colorTextSecondary, marginBottom: 4 }, children: _32("Summary") }),
12792
13318
  /* @__PURE__ */ jsxRuntime.jsx(
12793
13319
  antd.Select,
12794
13320
  {
@@ -12799,18 +13325,18 @@ var RelatedObjectsTable = ({ rel, record, relatedModel, parentModel, showActions
12799
13325
  },
12800
13326
  style: { width: "100%" },
12801
13327
  options: [
12802
- { label: _30("Sum"), value: "sum" },
12803
- { label: _30("Average"), value: "avg" },
12804
- { label: _30("Count"), value: "count" },
12805
- { label: _30("Max"), value: "max" },
12806
- { label: _30("Min"), value: "min" },
12807
- { label: _30("Std Dev"), value: "stddev" }
13328
+ { label: _32("Sum"), value: "sum" },
13329
+ { label: _32("Average"), value: "avg" },
13330
+ { label: _32("Count"), value: "count" },
13331
+ { label: _32("Max"), value: "max" },
13332
+ { label: _32("Min"), value: "min" },
13333
+ { label: _32("Std Dev"), value: "stddev" }
12808
13334
  ]
12809
13335
  }
12810
13336
  )
12811
13337
  ] }),
12812
13338
  /* @__PURE__ */ jsxRuntime.jsxs("div", { style: { minWidth: 180 }, children: [
12813
- /* @__PURE__ */ jsxRuntime.jsx("div", { style: { fontSize: 12, color: token.colorTextSecondary, marginBottom: 4 }, children: _30("Ranking Filter") }),
13339
+ /* @__PURE__ */ jsxRuntime.jsx("div", { style: { fontSize: 12, color: token.colorTextSecondary, marginBottom: 4 }, children: _32("Ranking Filter") }),
12814
13340
  /* @__PURE__ */ jsxRuntime.jsx(
12815
13341
  antd.Select,
12816
13342
  {
@@ -12821,15 +13347,15 @@ var RelatedObjectsTable = ({ rel, record, relatedModel, parentModel, showActions
12821
13347
  },
12822
13348
  style: { width: "100%" },
12823
13349
  options: [
12824
- { label: _30("None"), value: "none" },
12825
- { label: _30("Top N"), value: "top" },
12826
- { label: _30("Bottom N"), value: "bottom" }
13350
+ { label: _32("None"), value: "none" },
13351
+ { label: _32("Top N"), value: "top" },
13352
+ { label: _32("Bottom N"), value: "bottom" }
12827
13353
  ]
12828
13354
  }
12829
13355
  )
12830
13356
  ] }),
12831
13357
  /* @__PURE__ */ jsxRuntime.jsxs("div", { style: { minWidth: 220 }, children: [
12832
- /* @__PURE__ */ jsxRuntime.jsx("div", { style: { fontSize: 12, color: token.colorTextSecondary, marginBottom: 4 }, children: _30("Ranking Column") }),
13358
+ /* @__PURE__ */ jsxRuntime.jsx("div", { style: { fontSize: 12, color: token.colorTextSecondary, marginBottom: 4 }, children: _32("Ranking Column") }),
12833
13359
  /* @__PURE__ */ jsxRuntime.jsx(
12834
13360
  antd.Select,
12835
13361
  {
@@ -12840,13 +13366,13 @@ var RelatedObjectsTable = ({ rel, record, relatedModel, parentModel, showActions
12840
13366
  },
12841
13367
  style: { width: "100%" },
12842
13368
  options: numericFields.map((field) => ({ label: field.label, value: field.key })),
12843
- placeholder: _30("Select numeric column"),
13369
+ placeholder: _32("Select numeric column"),
12844
13370
  disabled: rankingMode === "none" || numericFields.length === 0
12845
13371
  }
12846
13372
  )
12847
13373
  ] }),
12848
13374
  /* @__PURE__ */ jsxRuntime.jsxs("div", { style: { minWidth: 120 }, children: [
12849
- /* @__PURE__ */ jsxRuntime.jsx("div", { style: { fontSize: 12, color: token.colorTextSecondary, marginBottom: 4 }, children: _30("N") }),
13375
+ /* @__PURE__ */ jsxRuntime.jsx("div", { style: { fontSize: 12, color: token.colorTextSecondary, marginBottom: 4 }, children: _32("N") }),
12850
13376
  /* @__PURE__ */ jsxRuntime.jsx(
12851
13377
  antd.InputNumber,
12852
13378
  {
@@ -12865,8 +13391,8 @@ var RelatedObjectsTable = ({ rel, record, relatedModel, parentModel, showActions
12865
13391
  ] }),
12866
13392
  /* @__PURE__ */ jsxRuntime.jsxs("div", { children: [
12867
13393
  /* @__PURE__ */ jsxRuntime.jsxs("div", { style: { display: "flex", alignItems: "center", justifyContent: "space-between", gap: 12, marginBottom: 6 }, children: [
12868
- /* @__PURE__ */ jsxRuntime.jsx("div", { style: { fontSize: 12, color: token.colorTextSecondary }, children: _30("Series") }),
12869
- /* @__PURE__ */ jsxRuntime.jsx(antd.Tooltip, { title: _30("Unselect All"), children: /* @__PURE__ */ jsxRuntime.jsx(
13394
+ /* @__PURE__ */ jsxRuntime.jsx("div", { style: { fontSize: 12, color: token.colorTextSecondary }, children: _32("Series") }),
13395
+ /* @__PURE__ */ jsxRuntime.jsx(antd.Tooltip, { title: _32("Unselect All"), children: /* @__PURE__ */ jsxRuntime.jsx(
12870
13396
  antd.Button,
12871
13397
  {
12872
13398
  size: "small",
@@ -12886,7 +13412,7 @@ var RelatedObjectsTable = ({ rel, record, relatedModel, parentModel, showActions
12886
13412
  markAnalyzePrefsTouched();
12887
13413
  setSelectedSeriesKeys(values);
12888
13414
  },
12889
- options: numericFields.length > 0 ? numericFields.map((field) => ({ label: field.label, value: field.key })) : [{ label: _30("Count"), value: "__count__" }]
13415
+ options: numericFields.length > 0 ? numericFields.map((field) => ({ label: field.label, value: field.key })) : [{ label: _32("Count"), value: "__count__" }]
12890
13416
  }
12891
13417
  )
12892
13418
  ] })
@@ -12911,11 +13437,11 @@ var RelatedObjectsTable = ({ rel, record, relatedModel, parentModel, showActions
12911
13437
  styles: { body: { display: "grid", gap: 16, position: "relative", paddingTop: 48 } },
12912
13438
  children: [
12913
13439
  /* @__PURE__ */ jsxRuntime.jsxs("div", { style: { position: "absolute", top: 0, right: 0, display: "flex", gap: 8 }, children: [
12914
- /* @__PURE__ */ jsxRuntime.jsx(antd.Tooltip, { title: _30("Analysis"), children: /* @__PURE__ */ jsxRuntime.jsx(antd.Button, { size: "small", icon: /* @__PURE__ */ jsxRuntime.jsx(icons.BarChartOutlined, {}), onClick: () => setIsStatsFlipped(false) }) }),
12915
- /* @__PURE__ */ jsxRuntime.jsx(antd.Tooltip, { title: _30("Export stats PDF"), children: /* @__PURE__ */ jsxRuntime.jsx(antd.Button, { size: "small", icon: /* @__PURE__ */ jsxRuntime.jsx(icons.FilePdfOutlined, {}), onClick: exportStatsPdf }) })
13440
+ /* @__PURE__ */ jsxRuntime.jsx(antd.Tooltip, { title: _32("Analysis"), children: /* @__PURE__ */ jsxRuntime.jsx(antd.Button, { size: "small", icon: /* @__PURE__ */ jsxRuntime.jsx(icons.BarChartOutlined, {}), onClick: () => setIsStatsFlipped(false) }) }),
13441
+ /* @__PURE__ */ jsxRuntime.jsx(antd.Tooltip, { title: _32("Export stats PDF"), children: /* @__PURE__ */ jsxRuntime.jsx(antd.Button, { size: "small", icon: /* @__PURE__ */ jsxRuntime.jsx(icons.FilePdfOutlined, {}), onClick: exportStatsPdf }) })
12916
13442
  ] }),
12917
13443
  /* @__PURE__ */ jsxRuntime.jsxs("div", { style: { display: "grid", gap: 16 }, children: [
12918
- statsSummary.numericStats.length > 0 && /* @__PURE__ */ jsxRuntime.jsx(antd.Card, { size: "small", title: /* @__PURE__ */ jsxRuntime.jsx("span", { style: statsTitleStyle, children: _30("Numeric columns") }), children: /* @__PURE__ */ jsxRuntime.jsxs(
13444
+ statsSummary.numericStats.length > 0 && /* @__PURE__ */ jsxRuntime.jsx(antd.Card, { size: "small", title: /* @__PURE__ */ jsxRuntime.jsx("span", { style: statsTitleStyle, children: _32("Numeric columns") }), children: /* @__PURE__ */ jsxRuntime.jsxs(
12919
13445
  antd.Table,
12920
13446
  {
12921
13447
  dataSource: statsSummary.numericStats,
@@ -12926,18 +13452,18 @@ var RelatedObjectsTable = ({ rel, record, relatedModel, parentModel, showActions
12926
13452
  /* @__PURE__ */ jsxRuntime.jsx(
12927
13453
  antd.Table.Column,
12928
13454
  {
12929
- title: _30("Field"),
13455
+ title: _32("Field"),
12930
13456
  dataIndex: "label",
12931
13457
  render: (label) => /* @__PURE__ */ jsxRuntime.jsx("span", { style: statsLabelStyle, children: label }),
12932
13458
  onHeaderCell: () => ({ style: statsHeaderStyle })
12933
13459
  },
12934
13460
  "label"
12935
13461
  ),
12936
- /* @__PURE__ */ jsxRuntime.jsx(antd.Table.Column, { title: _30("Sum"), align: "right", render: (_unused, row) => renderStatBar(row.sum, statsNumericMaxes.sum, formatNumberValue), onHeaderCell: () => ({ style: statsHeaderStyle }) }, "sum"),
12937
- /* @__PURE__ */ jsxRuntime.jsx(antd.Table.Column, { title: _30("Average"), align: "right", render: (_unused, row) => renderStatBar(row.avg, statsNumericMaxes.avg, formatNumberValue), onHeaderCell: () => ({ style: statsHeaderStyle }) }, "avg"),
12938
- /* @__PURE__ */ jsxRuntime.jsx(antd.Table.Column, { title: _30("Min"), align: "right", render: (_unused, row) => renderStatBar(row.min, statsNumericMaxes.min, formatNumberValue), onHeaderCell: () => ({ style: statsHeaderStyle }) }, "min"),
12939
- /* @__PURE__ */ jsxRuntime.jsx(antd.Table.Column, { title: _30("Max"), align: "right", render: (_unused, row) => renderStatBar(row.max, statsNumericMaxes.max, formatNumberValue), onHeaderCell: () => ({ style: statsHeaderStyle }) }, "max"),
12940
- /* @__PURE__ */ jsxRuntime.jsx(antd.Table.Column, { title: _30("Std Dev"), align: "right", render: (_unused, row) => renderStatBar(row.stddev, statsNumericMaxes.stddev, formatNumberValue), onHeaderCell: () => ({ style: statsHeaderStyle }) }, "stddev")
13462
+ /* @__PURE__ */ jsxRuntime.jsx(antd.Table.Column, { title: _32("Sum"), align: "right", render: (_unused, row) => renderStatBar(row.sum, statsNumericMaxes.sum, formatNumberValue), onHeaderCell: () => ({ style: statsHeaderStyle }) }, "sum"),
13463
+ /* @__PURE__ */ jsxRuntime.jsx(antd.Table.Column, { title: _32("Average"), align: "right", render: (_unused, row) => renderStatBar(row.avg, statsNumericMaxes.avg, formatNumberValue), onHeaderCell: () => ({ style: statsHeaderStyle }) }, "avg"),
13464
+ /* @__PURE__ */ jsxRuntime.jsx(antd.Table.Column, { title: _32("Min"), align: "right", render: (_unused, row) => renderStatBar(row.min, statsNumericMaxes.min, formatNumberValue), onHeaderCell: () => ({ style: statsHeaderStyle }) }, "min"),
13465
+ /* @__PURE__ */ jsxRuntime.jsx(antd.Table.Column, { title: _32("Max"), align: "right", render: (_unused, row) => renderStatBar(row.max, statsNumericMaxes.max, formatNumberValue), onHeaderCell: () => ({ style: statsHeaderStyle }) }, "max"),
13466
+ /* @__PURE__ */ jsxRuntime.jsx(antd.Table.Column, { title: _32("Std Dev"), align: "right", render: (_unused, row) => renderStatBar(row.stddev, statsNumericMaxes.stddev, formatNumberValue), onHeaderCell: () => ({ style: statsHeaderStyle }) }, "stddev")
12941
13467
  ]
12942
13468
  }
12943
13469
  ) }),
@@ -12949,7 +13475,7 @@ var RelatedObjectsTable = ({ rel, record, relatedModel, parentModel, showActions
12949
13475
  items: [
12950
13476
  {
12951
13477
  key: "categorical-columns",
12952
- label: /* @__PURE__ */ jsxRuntime.jsx("span", { style: statsTitleStyle, children: _30("Categorical columns (distinct < 20)") }),
13478
+ label: /* @__PURE__ */ jsxRuntime.jsx("span", { style: statsTitleStyle, children: _32("Categorical columns (distinct < 20)") }),
12953
13479
  children: statsSummary.categoricalStats.map((field) => /* @__PURE__ */ jsxRuntime.jsxs("div", { style: { marginBottom: 12 }, children: [
12954
13480
  /* @__PURE__ */ jsxRuntime.jsx("div", { style: { fontWeight: 600, marginBottom: 4 }, children: /* @__PURE__ */ jsxRuntime.jsx("span", { style: statsLabelStyle, children: field.label }) }),
12955
13481
  /* @__PURE__ */ jsxRuntime.jsxs(
@@ -12960,11 +13486,11 @@ var RelatedObjectsTable = ({ rel, record, relatedModel, parentModel, showActions
12960
13486
  pagination: false,
12961
13487
  rowKey: (row) => row.value,
12962
13488
  children: [
12963
- /* @__PURE__ */ jsxRuntime.jsx(antd.Table.Column, { title: _30("Value"), dataIndex: "value", onHeaderCell: () => ({ style: statsHeaderStyle }) }, "value"),
13489
+ /* @__PURE__ */ jsxRuntime.jsx(antd.Table.Column, { title: _32("Value"), dataIndex: "value", onHeaderCell: () => ({ style: statsHeaderStyle }) }, "value"),
12964
13490
  /* @__PURE__ */ jsxRuntime.jsx(
12965
13491
  antd.Table.Column,
12966
13492
  {
12967
- title: _30("Count"),
13493
+ title: _32("Count"),
12968
13494
  dataIndex: "count",
12969
13495
  align: "right",
12970
13496
  onHeaderCell: () => ({ style: statsHeaderStyle }),
@@ -13096,7 +13622,7 @@ var RelatedObjectSingleSelect = ({ rel, record, allModels, required }) => {
13096
13622
  }
13097
13623
  );
13098
13624
  };
13099
- var _31 = window._ || ((text) => text);
13625
+ var _33 = window._ || ((text) => text);
13100
13626
  function useMillerColumnItems({
13101
13627
  parentId,
13102
13628
  rel,
@@ -13214,7 +13740,7 @@ function useMillerColumnItems({
13214
13740
  } catch (err) {
13215
13741
  if (err instanceof DOMException && err.name === "AbortError") return;
13216
13742
  if (isMounted) {
13217
- setError(err instanceof Error ? err.message : _31("Failed to load items"));
13743
+ setError(err instanceof Error ? err.message : _33("Failed to load items"));
13218
13744
  }
13219
13745
  } finally {
13220
13746
  if (isMounted) setLoading(false);
@@ -13266,7 +13792,7 @@ var MillerColumn = ({
13266
13792
  antd.Empty,
13267
13793
  {
13268
13794
  image: antd.Empty.PRESENTED_IMAGE_SIMPLE,
13269
- description: _31("No items"),
13795
+ description: _33("No items"),
13270
13796
  style: { margin: "32px 0" }
13271
13797
  }
13272
13798
  ),
@@ -13343,12 +13869,12 @@ var DetailPaneContent = ({ node, allModels }) => {
13343
13869
  const model = allModels?.find((m) => m.name === node.resource);
13344
13870
  const showHref = getShowHref(node.resource, node.id, allModels);
13345
13871
  if (!model) {
13346
- return /* @__PURE__ */ jsxRuntime.jsx(antd.Empty, { description: `${_31("No schema for")} ${node.resource}`, style: { marginTop: 32 } });
13872
+ return /* @__PURE__ */ jsxRuntime.jsx(antd.Empty, { description: `${_33("No schema for")} ${node.resource}`, style: { marginTop: 32 } });
13347
13873
  }
13348
13874
  return /* @__PURE__ */ jsxRuntime.jsxs("div", { children: [
13349
13875
  /* @__PURE__ */ jsxRuntime.jsxs("div", { style: { display: "flex", alignItems: "center", gap: 8, marginBottom: 12 }, children: [
13350
13876
  /* @__PURE__ */ jsxRuntime.jsx(antd.Typography.Title, { level: 5, style: { margin: 0, color: token.colorTextSecondary, fontWeight: 500, flex: 1, minWidth: 0 }, children: node.label }),
13351
- showHref && /* @__PURE__ */ jsxRuntime.jsx(antd.Tooltip, { title: _31("Open in new tab"), children: /* @__PURE__ */ jsxRuntime.jsx(
13877
+ showHref && /* @__PURE__ */ jsxRuntime.jsx(antd.Tooltip, { title: _33("Open in new tab"), children: /* @__PURE__ */ jsxRuntime.jsx(
13352
13878
  antd.Button,
13353
13879
  {
13354
13880
  size: "small",
@@ -13454,7 +13980,7 @@ var MillerBrowserLayout = ({
13454
13980
  }
13455
13981
  };
13456
13982
  if (!rootId) {
13457
- return /* @__PURE__ */ jsxRuntime.jsx(antd.Empty, { description: _31("No record selected") });
13983
+ return /* @__PURE__ */ jsxRuntime.jsx(antd.Empty, { description: _33("No record selected") });
13458
13984
  }
13459
13985
  const columnsAreaStyle = columnsWidth !== null ? { width: columnsWidth, flexShrink: 0, flexGrow: 0, minWidth: 200, overflowX: "auto", display: "flex", height: "100%" } : { width: showDetails ? "fit-content" : "100%", maxWidth: showDetails ? "50%" : "100%", flexShrink: 0, minWidth: 240, overflowX: "auto", display: "flex", height: "100%" };
13460
13986
  return /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
@@ -13517,7 +14043,7 @@ var MillerBrowserLayout = ({
13517
14043
  showDetails && /* @__PURE__ */ jsxRuntime.jsx(
13518
14044
  antd.Drawer,
13519
14045
  {
13520
- title: detailNode?.label ?? _31("Details"),
14046
+ title: detailNode?.label ?? _33("Details"),
13521
14047
  placement: "right",
13522
14048
  open: drawerOpen && !isDesktop,
13523
14049
  onClose: () => setDrawerOpen(false),
@@ -13627,6 +14153,24 @@ var renderRelationBlock = ({
13627
14153
  /* @__PURE__ */ jsxRuntime.jsx("div", { style: resolvedValueStyle, children: /* @__PURE__ */ jsxRuntime.jsx(RelatedObjectsInlineValues, { rel, record, viewType: "csv", allModels }) })
13628
14154
  ] }) });
13629
14155
  }
14156
+ if (viewType === "editable-csv" || viewType === "read-and-edit-csv") {
14157
+ return /* @__PURE__ */ jsxRuntime.jsx("div", { style: { marginBottom: 0 }, children: /* @__PURE__ */ jsxRuntime.jsxs("div", { style: resolvedLayoutStyle, children: [
14158
+ showLabel && /* @__PURE__ */ jsxRuntime.jsx("div", { style: resolvedLabelStyle, children: relationLabel }),
14159
+ /* @__PURE__ */ jsxRuntime.jsx("div", { style: resolvedValueStyle, children: /* @__PURE__ */ jsxRuntime.jsx(RelatedObjectsEditableCsv, { rel, record, allModels }) })
14160
+ ] }) });
14161
+ }
14162
+ if (viewType === "read-and-edit-list") {
14163
+ if (rel.otherResource && rel.otherKey) {
14164
+ return /* @__PURE__ */ jsxRuntime.jsxs("div", { style: { marginBottom: 16, boxShadow: `0 8px 20px -16px ${relationTone.shadow}` }, children: [
14165
+ /* @__PURE__ */ jsxRuntime.jsx("div", { style: { ...resolvedLabelStyle, marginBottom: 4 }, children: showLabel ? relationLabel : null }),
14166
+ /* @__PURE__ */ jsxRuntime.jsx(RelatedObjectsEditableList, { rel, record, allModels })
14167
+ ] });
14168
+ }
14169
+ return /* @__PURE__ */ jsxRuntime.jsx("div", { style: { marginBottom: 0 }, children: /* @__PURE__ */ jsxRuntime.jsxs("div", { style: resolvedLayoutStyle, children: [
14170
+ showLabel && /* @__PURE__ */ jsxRuntime.jsx("div", { style: resolvedLabelStyle, children: relationLabel }),
14171
+ /* @__PURE__ */ jsxRuntime.jsx("div", { style: resolvedValueStyle, children: /* @__PURE__ */ jsxRuntime.jsx(RelatedObjectsInlineValues, { rel, record, viewType: "list", allModels }) })
14172
+ ] }) });
14173
+ }
13630
14174
  if (isInlineListView && !polymorphicInfo) {
13631
14175
  return /* @__PURE__ */ jsxRuntime.jsx("div", { style: { marginBottom: 0 }, children: /* @__PURE__ */ jsxRuntime.jsxs("div", { style: resolvedLayoutStyle, children: [
13632
14176
  showLabel && /* @__PURE__ */ jsxRuntime.jsx("div", { style: resolvedLabelStyle, children: relationLabel }),
@@ -13820,7 +14364,7 @@ var renderRelationBlock = ({
13820
14364
  content
13821
14365
  ] }, rel.resource);
13822
14366
  };
13823
- var _32 = window._ || ((text) => text);
14367
+ var _34 = window._ || ((text) => text);
13824
14368
  var { Title: Title7 } = antd.Typography;
13825
14369
  var DynamicList = ({ model: modelProp, allModels, filter, relationConfig, isEmbedded = false, showActions = true, showCreate = true, layoutPreferenceType, listViewType, rowSelection, extraHeaderButtons, bulkActions, preferencesResourceOverride, defaultListVisible }) => {
13826
14370
  const model = useRoleFilteredModel(modelProp);
@@ -13890,7 +14434,7 @@ var DynamicList = ({ model: modelProp, allModels, filter, relationConfig, isEmbe
13890
14434
  const [galleryPage, setGalleryPage] = React6.useState(1);
13891
14435
  const [calendarMode, setCalendarMode] = React6.useState("month");
13892
14436
  const [calendarDateField, setCalendarDateField] = React6.useState(() => calendarDateFieldOptions[0]?.key || "");
13893
- const [calendarAnchorDate, setCalendarAnchorDate] = React6.useState(() => dayjs7__default.default().startOf("month"));
14437
+ const [calendarAnchorDate, setCalendarAnchorDate] = React6.useState(() => dayjs8__default.default().startOf("month"));
13894
14438
  const [isAnalyzeVertical, setIsAnalyzeVertical] = React6.useState(false);
13895
14439
  const [isAnalyzeFirst, setIsAnalyzeFirst] = React6.useState(false);
13896
14440
  const [filterRules, setFilterRules] = React6.useState([]);
@@ -13900,7 +14444,9 @@ var DynamicList = ({ model: modelProp, allModels, filter, relationConfig, isEmbe
13900
14444
  const [selectedColumnKeys, setSelectedColumnKeys] = React6.useState(null);
13901
14445
  const [columnOrder, setColumnOrder] = React6.useState(null);
13902
14446
  const [columnFiltersSelected, setColumnFiltersSelected] = React6.useState({});
13903
- const [columnSort, setColumnSort] = React6.useState([]);
14447
+ const [columnSort, setColumnSort] = React6.useState(
14448
+ model.defaultSort ? [{ fieldKey: model.defaultSort.field, order: model.defaultSort.order === "desc" ? "descend" : "ascend" }] : []
14449
+ );
13904
14450
  const [totalsSummaryFunctions, setTotalsSummaryFunctions] = React6.useState({});
13905
14451
  const [currentViewName, setCurrentViewName] = React6.useState(getDefaultViewName());
13906
14452
  const [selectedViewNames, setSelectedViewNames] = React6.useState([]);
@@ -13955,6 +14501,7 @@ var DynamicList = ({ model: modelProp, allModels, filter, relationConfig, isEmbe
13955
14501
  const layoutPrefsLoadedRef = React6.useRef(false);
13956
14502
  const layoutPrefsResourceRef = React6.useRef(null);
13957
14503
  const sortIntentRef = React6.useRef(null);
14504
+ const prevViewNameForResetRef = React6.useRef(null);
13958
14505
  const [bulkSelectedRowKeys, setBulkSelectedRowKeys] = React6.useState([]);
13959
14506
  const bulkSelectedRowsMapRef = React6.useRef(/* @__PURE__ */ new Map());
13960
14507
  const [selectModeAssociating, setSelectModeAssociating] = React6.useState(false);
@@ -13983,12 +14530,12 @@ var DynamicList = ({ model: modelProp, allModels, filter, relationConfig, isEmbe
13983
14530
  });
13984
14531
  }
13985
14532
  }
13986
- antd.message.success(_32("Relations added."));
14533
+ antd.message.success(_34("Relations added."));
13987
14534
  if (selectModeReturnTo && selectModeReturnTo.startsWith("/")) {
13988
14535
  navigate(selectModeReturnTo);
13989
14536
  }
13990
14537
  } catch {
13991
- antd.message.error(_32("Failed to add relations."));
14538
+ antd.message.error(_34("Failed to add relations."));
13992
14539
  } finally {
13993
14540
  setSelectModeAssociating(false);
13994
14541
  }
@@ -14086,7 +14633,7 @@ var DynamicList = ({ model: modelProp, allModels, filter, relationConfig, isEmbe
14086
14633
  const direction = value?.direction || "next";
14087
14634
  const unit = value?.unit || "weeks";
14088
14635
  const isQuarter = unit === "quarters";
14089
- const base = dayjs7__default.default();
14636
+ const base = dayjs8__default.default();
14090
14637
  if (asRange || direction === "current") {
14091
14638
  const anchor = direction === "current" ? base : direction === "previous" ? isQuarter ? base.subtract(count * 3, "month") : base.subtract(count, unit) : isQuarter ? base.add(count * 3, "month") : base.add(count, unit);
14092
14639
  if (isQuarter) {
@@ -14147,7 +14694,7 @@ var DynamicList = ({ model: modelProp, allModels, filter, relationConfig, isEmbe
14147
14694
  return true;
14148
14695
  }
14149
14696
  if (field.type === "date" || field.type === "datetime") {
14150
- const recordDate = dayjs7__default.default(rawValue);
14697
+ const recordDate = dayjs8__default.default(rawValue);
14151
14698
  if (!recordDate.isValid()) return false;
14152
14699
  const mode = rule.value?.mode || "absolute";
14153
14700
  const mode2 = rule.value2?.mode || "absolute";
@@ -14155,7 +14702,7 @@ var DynamicList = ({ model: modelProp, allModels, filter, relationConfig, isEmbe
14155
14702
  if (val?.mode === "relative") {
14156
14703
  return resolveRelativeDate(val, asRange);
14157
14704
  }
14158
- const date = dayjs7__default.default(val?.date || val);
14705
+ const date = dayjs8__default.default(val?.date || val);
14159
14706
  return asRange ? { start: date.startOf("day"), end: date.endOf("day") } : { date: date.startOf("day") };
14160
14707
  };
14161
14708
  switch (rule.operator) {
@@ -14166,13 +14713,13 @@ var DynamicList = ({ model: modelProp, allModels, filter, relationConfig, isEmbe
14166
14713
  }
14167
14714
  case "after": {
14168
14715
  const dateVal = mode === "relative" ? resolveRelativeDate(rule.value, false).date : getDateValue(rule.value, false).date;
14169
- if (!dateVal || !dayjs7__default.default(dateVal).isValid()) return false;
14170
- return recordDate.valueOf() > dayjs7__default.default(dateVal).endOf("day").valueOf();
14716
+ if (!dateVal || !dayjs8__default.default(dateVal).isValid()) return false;
14717
+ return recordDate.valueOf() > dayjs8__default.default(dateVal).endOf("day").valueOf();
14171
14718
  }
14172
14719
  case "before": {
14173
14720
  const dateVal = mode === "relative" ? resolveRelativeDate(rule.value, false).date : getDateValue(rule.value, false).date;
14174
- if (!dateVal || !dayjs7__default.default(dateVal).isValid()) return false;
14175
- return recordDate.valueOf() < dayjs7__default.default(dateVal).startOf("day").valueOf();
14721
+ if (!dateVal || !dayjs8__default.default(dateVal).isValid()) return false;
14722
+ return recordDate.valueOf() < dayjs8__default.default(dateVal).startOf("day").valueOf();
14176
14723
  }
14177
14724
  case "between": {
14178
14725
  const startRange = mode === "relative" ? resolveRelativeDate(rule.value, true) : getDateValue(rule.value, true);
@@ -14494,7 +15041,7 @@ var DynamicList = ({ model: modelProp, allModels, filter, relationConfig, isEmbe
14494
15041
  }, [numericFields, rankingFieldKey, rankingMode]);
14495
15042
  const resetLayoutDefaults = React6.useCallback(() => {
14496
15043
  setListVisible(defaultListVisible ?? true);
14497
- setAnalyzeOpen(false);
15044
+ setAnalyzeOpen(isEmbedded);
14498
15045
  setIsAnalyzeVertical(false);
14499
15046
  setIsAnalyzeFirst(false);
14500
15047
  setFiltersCollapsed(isEmbedded);
@@ -14618,7 +15165,7 @@ var DynamicList = ({ model: modelProp, allModels, filter, relationConfig, isEmbe
14618
15165
  return;
14619
15166
  }
14620
15167
  if (availableViewNames.includes(newName)) {
14621
- antd.message.error(_32("View name already exists."));
15168
+ antd.message.error(_34("View name already exists."));
14622
15169
  return;
14623
15170
  }
14624
15171
  try {
@@ -14631,18 +15178,18 @@ var DynamicList = ({ model: modelProp, allModels, filter, relationConfig, isEmbe
14631
15178
  if (!response.ok) {
14632
15179
  throw new Error(`Rename failed (${response.status})`);
14633
15180
  }
14634
- antd.message.success(_32("View renamed."));
15181
+ antd.message.success(_34("View renamed."));
14635
15182
  setRenameViewModalOpen(false);
14636
15183
  await loadViewNames();
14637
15184
  } catch (error) {
14638
- antd.message.error(error instanceof Error ? error.message : _32("Failed to rename view."));
15185
+ antd.message.error(error instanceof Error ? error.message : _34("Failed to rename view."));
14639
15186
  }
14640
15187
  }, [apiUrl, availableViewNames, currentViewName, model.name, model.resource, renameViewName, allModels, loadViewNames]);
14641
15188
  const confirmDeleteView = React6.useCallback(() => {
14642
15189
  antd.Modal.confirm({
14643
- title: _32(_32("Delete view")),
15190
+ title: _34(_34("Delete view")),
14644
15191
  content: `Delete "${currentViewName}" and all its saved preferences?`,
14645
- okText: _32("Delete"),
15192
+ okText: _34("Delete"),
14646
15193
  okButtonProps: { danger: true },
14647
15194
  onOk: async () => {
14648
15195
  try {
@@ -14655,10 +15202,10 @@ var DynamicList = ({ model: modelProp, allModels, filter, relationConfig, isEmbe
14655
15202
  if (!response.ok) {
14656
15203
  throw new Error(`Delete failed (${response.status})`);
14657
15204
  }
14658
- antd.message.success(_32("View deleted."));
15205
+ antd.message.success(_34("View deleted."));
14659
15206
  await loadViewNames();
14660
15207
  } catch (error) {
14661
- antd.message.error(error instanceof Error ? error.message : _32("Failed to delete view."));
15208
+ antd.message.error(error instanceof Error ? error.message : _34("Failed to delete view."));
14662
15209
  }
14663
15210
  }
14664
15211
  });
@@ -14700,9 +15247,9 @@ var DynamicList = ({ model: modelProp, allModels, filter, relationConfig, isEmbe
14700
15247
  if (failed) {
14701
15248
  throw new Error(`Save failed (${failed.status})`);
14702
15249
  }
14703
- antd.message.success(_32("Layout preferences saved."));
15250
+ antd.message.success(_34("Layout preferences saved."));
14704
15251
  } catch (error) {
14705
- antd.message.error(error instanceof Error ? error.message : _32("Failed to save layout preferences."));
15252
+ antd.message.error(error instanceof Error ? error.message : _34("Failed to save layout preferences."));
14706
15253
  } finally {
14707
15254
  setIsSavingLayoutPrefs(false);
14708
15255
  }
@@ -14731,9 +15278,9 @@ var DynamicList = ({ model: modelProp, allModels, filter, relationConfig, isEmbe
14731
15278
  if (!response.ok) {
14732
15279
  throw new Error(`Save failed (${response.status})`);
14733
15280
  }
14734
- antd.message.success(_32("Analyze preferences saved."));
15281
+ antd.message.success(_34("Analyze preferences saved."));
14735
15282
  } catch (error) {
14736
- antd.message.error(error instanceof Error ? error.message : _32("Failed to save analyze preferences."));
15283
+ antd.message.error(error instanceof Error ? error.message : _34("Failed to save analyze preferences."));
14737
15284
  } finally {
14738
15285
  setIsSavingAnalyzePrefs(false);
14739
15286
  }
@@ -14743,11 +15290,11 @@ var DynamicList = ({ model: modelProp, allModels, filter, relationConfig, isEmbe
14743
15290
  const viewName = normalizeViewName(saveViewName || currentViewName);
14744
15291
  const viewExists = availableViewNames.includes(viewName);
14745
15292
  if (saveViewAsNew && viewExists) {
14746
- antd.message.error(_32("View name already exists. Choose a new name."));
15293
+ antd.message.error(_34("View name already exists. Choose a new name."));
14747
15294
  return;
14748
15295
  }
14749
15296
  if (!saveViewAsNew && viewName !== currentViewName && viewExists) {
14750
- antd.message.error(_32('Choose a new name or enable "Save as new view".'));
15297
+ antd.message.error(_34('Choose a new name or enable "Save as new view".'));
14751
15298
  return;
14752
15299
  }
14753
15300
  setSaveViewModalOpen(false);
@@ -14770,6 +15317,8 @@ var DynamicList = ({ model: modelProp, allModels, filter, relationConfig, isEmbe
14770
15317
  }, [loadViewNames]);
14771
15318
  React6.useEffect(() => {
14772
15319
  if (!viewNamesLoaded) return;
15320
+ const viewChanged = prevViewNameForResetRef.current !== null && prevViewNameForResetRef.current !== currentViewName;
15321
+ prevViewNameForResetRef.current = currentViewName;
14773
15322
  analyzePrefsTouchedRef.current = false;
14774
15323
  layoutPrefsTouchedRef.current = false;
14775
15324
  analyzePrefsLoadedRef.current = false;
@@ -14777,8 +15326,11 @@ var DynamicList = ({ model: modelProp, allModels, filter, relationConfig, isEmbe
14777
15326
  setColumnsSelectorOpen(false);
14778
15327
  setSaveViewName(currentViewName);
14779
15328
  setSaveViewAsNew(false);
14780
- resetLayoutDefaults();
14781
- resetAnalyzeDefaults();
15329
+ if (viewChanged) {
15330
+ analyzeTouchedRef.current = false;
15331
+ resetLayoutDefaults();
15332
+ resetAnalyzeDefaults();
15333
+ }
14782
15334
  }, [currentViewName, resetAnalyzeDefaults, resetLayoutDefaults, viewNamesLoaded]);
14783
15335
  React6.useEffect(() => {
14784
15336
  const resourceKey = prefsKey;
@@ -14945,7 +15497,7 @@ var DynamicList = ({ model: modelProp, allModels, filter, relationConfig, isEmbe
14945
15497
  }
14946
15498
  setAllRowsData(allRows2);
14947
15499
  } catch (error) {
14948
- setAllRowsError(error instanceof Error ? error.message : _32("Failed to fetch all rows"));
15500
+ setAllRowsError(error instanceof Error ? error.message : _34("Failed to fetch all rows"));
14949
15501
  } finally {
14950
15502
  setIsAllRowsLoading(false);
14951
15503
  setAllRowsLoaded(true);
@@ -14984,7 +15536,7 @@ var DynamicList = ({ model: modelProp, allModels, filter, relationConfig, isEmbe
14984
15536
  if (forRange) return { start: resolved.start?.toISOString(), end: resolved.end?.toISOString() };
14985
15537
  return { date: resolved.date?.toISOString() };
14986
15538
  }
14987
- const date = dayjs7__default.default(val?.date || val);
15539
+ const date = dayjs8__default.default(val?.date || val);
14988
15540
  if (!date.isValid()) return {};
14989
15541
  if (forRange) return { start: date.startOf("day").toISOString(), end: date.endOf("day").toISOString() };
14990
15542
  return { date: date.startOf("day").toISOString() };
@@ -15040,7 +15592,7 @@ var DynamicList = ({ model: modelProp, allModels, filter, relationConfig, isEmbe
15040
15592
  setFilters(combined, "replace");
15041
15593
  }, [filterRules, hasActiveFilterRules, isClientFiltering, model.fields, setFilters, tableFilters]);
15042
15594
  const formatCategoryValue = React6.useCallback((field, record) => {
15043
- if (!field) return _32("All");
15595
+ if (!field) return _34("All");
15044
15596
  const raw = record?.[field.key];
15045
15597
  if (raw === void 0 || raw === null) return "-";
15046
15598
  if (field.key === "eid" && record?._label) return record._label;
@@ -15051,7 +15603,7 @@ var DynamicList = ({ model: modelProp, allModels, filter, relationConfig, isEmbe
15051
15603
  if (field.options) {
15052
15604
  return field.options.find((option) => option.value === raw)?.label || String(raw);
15053
15605
  }
15054
- if (field.type === "boolean") return raw ? _32("Yes") : _32("No");
15606
+ if (field.type === "boolean") return raw ? _34("Yes") : _34("No");
15055
15607
  if (field.type === "date") return formatDateValue(raw);
15056
15608
  if (field.type === "datetime") return formatDateTimeValue(raw) ?? String(raw);
15057
15609
  if (field.type === "time") return formatTimeValue(raw);
@@ -15136,7 +15688,7 @@ var DynamicList = ({ model: modelProp, allModels, filter, relationConfig, isEmbe
15136
15688
  const seriesLabels = numericFields.length > 0 ? numericFields.reduce((acc, field) => {
15137
15689
  acc[field.key] = field.label;
15138
15690
  return acc;
15139
- }, { "__count__": _32("Count") }) : { "__count__": _32("Count") };
15691
+ }, { "__count__": _34("Count") }) : { "__count__": _34("Count") };
15140
15692
  const baseGroups = Array.from(groupMap.values());
15141
15693
  let groups = baseGroups;
15142
15694
  if (rankingMode !== "none" && rankingFieldKey) {
@@ -15193,7 +15745,7 @@ var DynamicList = ({ model: modelProp, allModels, filter, relationConfig, isEmbe
15193
15745
  } else if (field.options) {
15194
15746
  label = field.options.find((o) => o.value === raw)?.label || String(raw);
15195
15747
  } else if (field.type === "boolean") {
15196
- label = raw ? _32("Yes") : _32("No");
15748
+ label = raw ? _34("Yes") : _34("No");
15197
15749
  } else if (field.type === "date") {
15198
15750
  label = formatDateValue(raw);
15199
15751
  } else if (field.type === "datetime") {
@@ -15255,13 +15807,13 @@ var DynamicList = ({ model: modelProp, allModels, filter, relationConfig, isEmbe
15255
15807
  const getSummaryFunctionDisplayText = React6.useCallback((fn) => {
15256
15808
  if (!fn) return "";
15257
15809
  const labels = {
15258
- sum: _32("Sum"),
15259
- avg: _32("Average"),
15260
- count: _32("Count"),
15261
- max: _32("Max"),
15262
- min: _32("Min"),
15263
- stddev: _32("Std Dev"),
15264
- distinct: _32("Distinct")
15810
+ sum: _34("Sum"),
15811
+ avg: _34("Average"),
15812
+ count: _34("Count"),
15813
+ max: _34("Max"),
15814
+ min: _34("Min"),
15815
+ stddev: _34("Std Dev"),
15816
+ distinct: _34("Distinct")
15265
15817
  };
15266
15818
  return labels[fn] || fn;
15267
15819
  }, []);
@@ -15322,12 +15874,12 @@ var DynamicList = ({ model: modelProp, allModels, filter, relationConfig, isEmbe
15322
15874
  `td-num-${item.key}`
15323
15875
  )) })
15324
15876
  ] }) }),
15325
- /* @__PURE__ */ jsxRuntime.jsx(antd.Tooltip, { title: isTdFlipped ? _32("Show totals") : _32("Show details"), children: /* @__PURE__ */ jsxRuntime.jsx(
15877
+ /* @__PURE__ */ jsxRuntime.jsx(antd.Tooltip, { title: isTdFlipped ? _34("Show totals") : _34("Show details"), children: /* @__PURE__ */ jsxRuntime.jsx(
15326
15878
  antd.Button,
15327
15879
  {
15328
15880
  size: "small",
15329
15881
  icon: /* @__PURE__ */ jsxRuntime.jsx(icons.SwapOutlined, { style: { transform: "rotate(90deg)" } }),
15330
- "aria-label": isTdFlipped ? _32("Show totals") : _32("Show details"),
15882
+ "aria-label": isTdFlipped ? _34("Show totals") : _34("Show details"),
15331
15883
  onClick: () => setIsTdFlipped((prev) => !prev),
15332
15884
  style: {
15333
15885
  flexShrink: 0,
@@ -15402,7 +15954,7 @@ var DynamicList = ({ model: modelProp, allModels, filter, relationConfig, isEmbe
15402
15954
  if (field.options) {
15403
15955
  return field.options.find((option) => option.value === raw)?.label || String(raw);
15404
15956
  }
15405
- if (field.type === "boolean") return raw ? _32("Yes") : _32("No");
15957
+ if (field.type === "boolean") return raw ? _34("Yes") : _34("No");
15406
15958
  if (field.type === "date") return formatDateValue(raw);
15407
15959
  if (field.type === "datetime") return formatDateTimeValue(raw) ?? String(raw);
15408
15960
  if (field.type === "time") return formatTimeValue(raw);
@@ -15494,7 +16046,8 @@ var DynamicList = ({ model: modelProp, allModels, filter, relationConfig, isEmbe
15494
16046
  const exportStatsPdf = () => {
15495
16047
  openPdfWindow(`${model.name}-stats`, buildStatsHtml(statsSummary));
15496
16048
  };
15497
- const getRowKey = (record) => {
16049
+ const getRowKey = (record, index) => {
16050
+ if (model.isNamedQuery && index !== void 0) return String(index);
15498
16051
  if (record?.eid !== void 0 && record?.eid !== null) return record.eid;
15499
16052
  if (record?.id !== void 0 && record?.id !== null) return record.id;
15500
16053
  if (relationConfig?.targetKey || relationConfig?.otherKey) {
@@ -15511,7 +16064,7 @@ var DynamicList = ({ model: modelProp, allModels, filter, relationConfig, isEmbe
15511
16064
  if (relationConfig?.otherResource && relationConfig?.otherKey && record[relationConfig.otherKey]) {
15512
16065
  return { resource: relationConfig.otherResource, id: record[relationConfig.otherKey], isLinkRow: true };
15513
16066
  }
15514
- const resourceName = model.resource || model.name;
16067
+ const resourceName = model.isNamedQuery && model.primaryResource ? model.primaryResource : model.resource || model.name;
15515
16068
  const explicitPk = model.pkField ? record[model.pkField] : void 0;
15516
16069
  const isPkField = model.fields?.find((f) => f.isPk)?.key;
15517
16070
  const pkValue = explicitPk ?? (isPkField ? record[isPkField] : void 0) ?? record.eid ?? record.id ?? null;
@@ -15577,7 +16130,7 @@ var DynamicList = ({ model: modelProp, allModels, filter, relationConfig, isEmbe
15577
16130
  for (const actionKey of apiActionKeys) {
15578
16131
  if (actionKey === "__delete__") {
15579
16132
  const resp = await authenticatedFetch(`${apiUrl}/${resource}/${id}`, { method: "DELETE" });
15580
- if (!resp.ok) throw new Error(`${_32("Delete failed for record")} ${id}`);
16133
+ if (!resp.ok) throw new Error(`${_34("Delete failed for record")} ${id}`);
15581
16134
  } else if (actionKey === "__change_field__") {
15582
16135
  if (!bulkChangeFieldKey) continue;
15583
16136
  const payload = { ...record, [bulkChangeFieldKey]: bulkChangeFieldValue };
@@ -15587,7 +16140,7 @@ var DynamicList = ({ model: modelProp, allModels, filter, relationConfig, isEmbe
15587
16140
  headers: { "Content-Type": "application/json" },
15588
16141
  body: JSON.stringify(payload)
15589
16142
  });
15590
- if (!resp.ok) throw new Error(`${_32("Update failed for record")} ${id}`);
16143
+ if (!resp.ok) throw new Error(`${_34("Update failed for record")} ${id}`);
15591
16144
  } else if (actionKey === "__clone__") {
15592
16145
  const clonePayload = { ...record };
15593
16146
  delete clonePayload.eid;
@@ -15599,7 +16152,7 @@ var DynamicList = ({ model: modelProp, allModels, filter, relationConfig, isEmbe
15599
16152
  headers: { "Content-Type": "application/json" },
15600
16153
  body: JSON.stringify(clonePayload)
15601
16154
  });
15602
- if (!resp.ok) throw new Error(`${_32("Clone failed for record")} ${id}`);
16155
+ if (!resp.ok) throw new Error(`${_34("Clone failed for record")} ${id}`);
15603
16156
  } else if (actionKey === "__pin__") {
15604
16157
  await authenticatedFetch(`${apiUrl}/dashboard/pinned-records`, {
15605
16158
  method: "POST",
@@ -15618,11 +16171,11 @@ var DynamicList = ({ model: modelProp, allModels, filter, relationConfig, isEmbe
15618
16171
  }
15619
16172
  }
15620
16173
  antd.message.success(
15621
- _32("Actions applied successfully to {count} rows").replace("{count}", String(records.length))
16174
+ _34("Actions applied successfully to {count} rows").replace("{count}", String(records.length))
15622
16175
  );
15623
16176
  } catch (e) {
15624
16177
  errorOccurred = true;
15625
- antd.message.error(e?.message || _32("Bulk action failed"));
16178
+ antd.message.error(e?.message || _34("Bulk action failed"));
15626
16179
  } finally {
15627
16180
  setIsBulkExecuting(false);
15628
16181
  setBulkActionModalOpen(false);
@@ -15680,7 +16233,7 @@ var DynamicList = ({ model: modelProp, allModels, filter, relationConfig, isEmbe
15680
16233
  antd.Table.SELECTION_NONE,
15681
16234
  {
15682
16235
  key: "select-all-filtered",
15683
- text: _32("Select all filtered rows"),
16236
+ text: _34("Select all filtered rows"),
15684
16237
  onSelect: handleSelectAllFiltered
15685
16238
  }
15686
16239
  ]
@@ -15689,19 +16242,19 @@ var DynamicList = ({ model: modelProp, allModels, filter, relationConfig, isEmbe
15689
16242
  const bulkActionsAvailable = React6.useMemo(() => {
15690
16243
  const opts = [];
15691
16244
  if (canBulkEdit) {
15692
- opts.push({ label: _32("Change field value"), value: "__change_field__" });
16245
+ opts.push({ label: _34("Change field value"), value: "__change_field__" });
15693
16246
  }
15694
- opts.push({ label: _32("Export selected (CSV)"), value: "__export_csv__" });
16247
+ opts.push({ label: _34("Export selected (CSV)"), value: "__export_csv__" });
15695
16248
  if (canBulkEdit) {
15696
- opts.push({ label: _32("Clone / Duplicate selected"), value: "__clone__" });
16249
+ opts.push({ label: _34("Clone / Duplicate selected"), value: "__clone__" });
15697
16250
  }
15698
16251
  if (bulkActions && bulkActions.length > 0) {
15699
- bulkActions.forEach((a) => opts.push({ label: _32(a.label), value: a.key }));
16252
+ bulkActions.forEach((a) => opts.push({ label: _34(a.label), value: a.key }));
15700
16253
  }
15701
- opts.push({ label: _32("Pin selected"), value: "__pin__" });
15702
- opts.push({ label: _32("Unpin selected"), value: "__unpin__" });
16254
+ opts.push({ label: _34("Pin selected"), value: "__pin__" });
16255
+ opts.push({ label: _34("Unpin selected"), value: "__unpin__" });
15703
16256
  if (canBulkDelete) {
15704
- opts.push({ label: _32("Delete selected"), value: "__delete__" });
16257
+ opts.push({ label: _34("Delete selected"), value: "__delete__" });
15705
16258
  }
15706
16259
  return opts;
15707
16260
  }, [bulkActions, canBulkDelete, canBulkEdit]);
@@ -15718,9 +16271,9 @@ var DynamicList = ({ model: modelProp, allModels, filter, relationConfig, isEmbe
15718
16271
  background: token.colorWarningBg,
15719
16272
  border: `1px solid ${token.colorWarningBorder}`
15720
16273
  }, children: [
15721
- /* @__PURE__ */ jsxRuntime.jsx("span", { style: { fontWeight: 500, color: token.colorWarningText }, children: bulkSelectedRowKeys.length > 0 ? _32("{count} rows selected").replace("{count}", String(bulkSelectedRowKeys.length)) : _32("Select rows to associate") }),
16274
+ /* @__PURE__ */ jsxRuntime.jsx("span", { style: { fontWeight: 500, color: token.colorWarningText }, children: bulkSelectedRowKeys.length > 0 ? _34("{count} rows selected").replace("{count}", String(bulkSelectedRowKeys.length)) : _34("Select rows to associate") }),
15722
16275
  /* @__PURE__ */ jsxRuntime.jsxs("div", { style: { display: "flex", gap: 8 }, children: [
15723
- selectModeReturnTo && /* @__PURE__ */ jsxRuntime.jsx(antd.Button, { size: "small", onClick: () => navigate(selectModeReturnTo), children: _32("Cancel") }),
16276
+ selectModeReturnTo && /* @__PURE__ */ jsxRuntime.jsx(antd.Button, { size: "small", onClick: () => navigate(selectModeReturnTo), children: _34("Cancel") }),
15724
16277
  /* @__PURE__ */ jsxRuntime.jsx(
15725
16278
  antd.Button,
15726
16279
  {
@@ -15729,7 +16282,7 @@ var DynamicList = ({ model: modelProp, allModels, filter, relationConfig, isEmbe
15729
16282
  disabled: bulkSelectedRowKeys.length === 0,
15730
16283
  loading: selectModeAssociating,
15731
16284
  onClick: handleAssociateSelected,
15732
- children: _32("Associate selected")
16285
+ children: _34("Associate selected")
15733
16286
  }
15734
16287
  )
15735
16288
  ] })
@@ -15745,7 +16298,7 @@ var DynamicList = ({ model: modelProp, allModels, filter, relationConfig, isEmbe
15745
16298
  background: token.colorInfoBg,
15746
16299
  border: `1px solid ${token.colorInfoBorder}`
15747
16300
  }, children: [
15748
- /* @__PURE__ */ jsxRuntime.jsx("span", { style: { fontWeight: 500 }, children: _32("{count} rows selected").replace("{count}", String(bulkSelectedRowKeys.length)) }),
16301
+ /* @__PURE__ */ jsxRuntime.jsx("span", { style: { fontWeight: 500 }, children: _34("{count} rows selected").replace("{count}", String(bulkSelectedRowKeys.length)) }),
15749
16302
  bulkSelectedRowKeys.length < filteredTotalCount && /* @__PURE__ */ jsxRuntime.jsx(
15750
16303
  antd.Button,
15751
16304
  {
@@ -15754,16 +16307,16 @@ var DynamicList = ({ model: modelProp, allModels, filter, relationConfig, isEmbe
15754
16307
  loading: selectAllFilteredPending && isAllRowsLoading,
15755
16308
  onClick: handleSelectAllFiltered,
15756
16309
  style: { padding: 0 },
15757
- children: _32("Select all {count} filtered rows").replace("{count}", String(filteredTotalCount))
16310
+ children: _34("Select all {count} filtered rows").replace("{count}", String(filteredTotalCount))
15758
16311
  }
15759
16312
  ),
15760
- /* @__PURE__ */ jsxRuntime.jsx(antd.Button, { type: "link", size: "small", onClick: clearBulkSelection, style: { padding: 0 }, children: _32("Clear selection") }),
16313
+ /* @__PURE__ */ jsxRuntime.jsx(antd.Button, { type: "link", size: "small", onClick: clearBulkSelection, style: { padding: 0 }, children: _34("Clear selection") }),
15761
16314
  /* @__PURE__ */ jsxRuntime.jsx("div", { style: { flex: 1, minWidth: 180 }, children: /* @__PURE__ */ jsxRuntime.jsx(
15762
16315
  antd.Select,
15763
16316
  {
15764
16317
  mode: "multiple",
15765
16318
  size: "small",
15766
- placeholder: _32("Actions"),
16319
+ placeholder: _34("Actions"),
15767
16320
  style: { width: "100%" },
15768
16321
  value: bulkActionsToApply,
15769
16322
  onChange: (values) => {
@@ -15781,7 +16334,7 @@ var DynamicList = ({ model: modelProp, allModels, filter, relationConfig, isEmbe
15781
16334
  antd.Select,
15782
16335
  {
15783
16336
  size: "small",
15784
- placeholder: _32("Select field"),
16337
+ placeholder: _34("Select field"),
15785
16338
  style: { minWidth: 160 },
15786
16339
  value: bulkChangeFieldKey ?? void 0,
15787
16340
  onChange: (v) => {
@@ -15796,7 +16349,7 @@ var DynamicList = ({ model: modelProp, allModels, filter, relationConfig, isEmbe
15796
16349
  antd.Select,
15797
16350
  {
15798
16351
  size: "small",
15799
- placeholder: _32("Select value"),
16352
+ placeholder: _34("Select value"),
15800
16353
  style: { minWidth: 180 },
15801
16354
  value: bulkChangeFieldValue ?? void 0,
15802
16355
  onChange: (v) => setBulkChangeFieldValue(v),
@@ -15807,25 +16360,25 @@ var DynamicList = ({ model: modelProp, allModels, filter, relationConfig, isEmbe
15807
16360
  antd.Select,
15808
16361
  {
15809
16362
  size: "small",
15810
- placeholder: _32("Select value"),
16363
+ placeholder: _34("Select value"),
15811
16364
  style: { minWidth: 120 },
15812
16365
  value: bulkChangeFieldValue ?? void 0,
15813
16366
  onChange: (v) => setBulkChangeFieldValue(v),
15814
- options: [{ label: _32("True"), value: true }, { label: _32("False"), value: false }],
16367
+ options: [{ label: _34("True"), value: true }, { label: _34("False"), value: false }],
15815
16368
  allowClear: true
15816
16369
  }
15817
16370
  ) : bulkChangeField.type === "date" ? /* @__PURE__ */ jsxRuntime.jsx(
15818
16371
  antd.DatePicker,
15819
16372
  {
15820
16373
  size: "small",
15821
- value: bulkChangeFieldValue ? dayjs7__default.default(bulkChangeFieldValue) : null,
16374
+ value: bulkChangeFieldValue ? dayjs8__default.default(bulkChangeFieldValue) : null,
15822
16375
  onChange: (v) => setBulkChangeFieldValue(v ? v.toISOString() : null)
15823
16376
  }
15824
16377
  ) : bulkChangeField.type === "number" ? /* @__PURE__ */ jsxRuntime.jsx(
15825
16378
  antd.InputNumber,
15826
16379
  {
15827
16380
  size: "small",
15828
- placeholder: _32("Value"),
16381
+ placeholder: _34("Value"),
15829
16382
  value: bulkChangeFieldValue,
15830
16383
  onChange: (v) => setBulkChangeFieldValue(v),
15831
16384
  style: { minWidth: 120 }
@@ -15834,7 +16387,7 @@ var DynamicList = ({ model: modelProp, allModels, filter, relationConfig, isEmbe
15834
16387
  antd.Input,
15835
16388
  {
15836
16389
  size: "small",
15837
- placeholder: _32("Value"),
16390
+ placeholder: _34("Value"),
15838
16391
  value: bulkChangeFieldValue ?? "",
15839
16392
  onChange: (e) => setBulkChangeFieldValue(e.target.value),
15840
16393
  style: { minWidth: 160 }
@@ -15848,7 +16401,7 @@ var DynamicList = ({ model: modelProp, allModels, filter, relationConfig, isEmbe
15848
16401
  size: "small",
15849
16402
  disabled: bulkActionsToApply.length === 0,
15850
16403
  onClick: () => setBulkActionModalOpen(true),
15851
- children: _32("Apply")
16404
+ children: _34("Apply")
15852
16405
  }
15853
16406
  )
15854
16407
  ] }) : null;
@@ -15856,16 +16409,16 @@ var DynamicList = ({ model: modelProp, allModels, filter, relationConfig, isEmbe
15856
16409
  antd.Modal,
15857
16410
  {
15858
16411
  open: bulkActionModalOpen,
15859
- title: _32("Confirm bulk action"),
16412
+ title: _34("Confirm bulk action"),
15860
16413
  onCancel: () => {
15861
16414
  if (!isBulkExecuting) setBulkActionModalOpen(false);
15862
16415
  },
15863
16416
  footer: [
15864
- /* @__PURE__ */ jsxRuntime.jsx(antd.Button, { onClick: () => setBulkActionModalOpen(false), disabled: isBulkExecuting, children: _32("Cancel") }, "cancel"),
15865
- /* @__PURE__ */ jsxRuntime.jsx(antd.Button, { type: "primary", loading: isBulkExecuting, onClick: executeBulkActions, children: _32("Confirm") }, "ok")
16417
+ /* @__PURE__ */ jsxRuntime.jsx(antd.Button, { onClick: () => setBulkActionModalOpen(false), disabled: isBulkExecuting, children: _34("Cancel") }, "cancel"),
16418
+ /* @__PURE__ */ jsxRuntime.jsx(antd.Button, { type: "primary", loading: isBulkExecuting, onClick: executeBulkActions, children: _34("Confirm") }, "ok")
15866
16419
  ],
15867
16420
  children: [
15868
- /* @__PURE__ */ jsxRuntime.jsx("p", { children: _32("You are about to apply the following actions to {count} rows:").replace("{count}", String(bulkSelectedRowKeys.length)) }),
16421
+ /* @__PURE__ */ jsxRuntime.jsx("p", { children: _34("You are about to apply the following actions to {count} rows:").replace("{count}", String(bulkSelectedRowKeys.length)) }),
15869
16422
  /* @__PURE__ */ jsxRuntime.jsx("ul", { style: { paddingLeft: 20, marginBottom: 8 }, children: bulkActionsToApply.map((actionKey) => {
15870
16423
  const label = bulkActionsAvailable.find((a) => a.value === actionKey)?.label ?? actionKey;
15871
16424
  const extra = actionKey === "__change_field__" && bulkChangeField ? ` \u2192 ${bulkChangeField.label}: ${String(bulkChangeFieldValue ?? "")}` : "";
@@ -15881,7 +16434,7 @@ var DynamicList = ({ model: modelProp, allModels, filter, relationConfig, isEmbe
15881
16434
  const listTitle = !isEmbedded ? renderModelHeading({
15882
16435
  model,
15883
16436
  title: modelDisplayLabel,
15884
- actionLabel: _32("List"),
16437
+ actionLabel: _34("List"),
15885
16438
  moduleLabel: model.module ? getModuleLabel(model.module) : void 0
15886
16439
  }) : void 0;
15887
16440
  const numericBarColor = modelTone.soft || token.colorPrimaryBg || "rgba(22, 119, 255, 0.16)";
@@ -15905,7 +16458,7 @@ var DynamicList = ({ model: modelProp, allModels, filter, relationConfig, isEmbe
15905
16458
  items: selectedViewNames.map((name) => ({ key: name, label: renderToneTabLabel(name, modelTone) }))
15906
16459
  }
15907
16460
  ) : null;
15908
- const listToggleButton = /* @__PURE__ */ jsxRuntime.jsx(antd.Tooltip, { title: _32("View list"), children: /* @__PURE__ */ jsxRuntime.jsx(
16461
+ const listToggleButton = /* @__PURE__ */ jsxRuntime.jsx(antd.Tooltip, { title: _34("View list"), children: /* @__PURE__ */ jsxRuntime.jsx(
15909
16462
  antd.Button,
15910
16463
  {
15911
16464
  size: "small",
@@ -15916,7 +16469,7 @@ var DynamicList = ({ model: modelProp, allModels, filter, relationConfig, isEmbe
15916
16469
  }
15917
16470
  }
15918
16471
  ) });
15919
- const exportButton = !isEmbedded ? /* @__PURE__ */ jsxRuntime.jsx(antd.Tooltip, { title: _32("Export CSV"), children: /* @__PURE__ */ jsxRuntime.jsx(
16472
+ const exportButton = !isEmbedded ? /* @__PURE__ */ jsxRuntime.jsx(antd.Tooltip, { title: _34("Export CSV"), children: /* @__PURE__ */ jsxRuntime.jsx(
15920
16473
  antd.Button,
15921
16474
  {
15922
16475
  size: "small",
@@ -15925,7 +16478,7 @@ var DynamicList = ({ model: modelProp, allModels, filter, relationConfig, isEmbe
15925
16478
  loading: exportRequested && isAllRowsLoading
15926
16479
  }
15927
16480
  ) }) : null;
15928
- const columnsToggleButton = /* @__PURE__ */ jsxRuntime.jsx(antd.Tooltip, { title: columnsSelectorOpen ? _32("Hide view configuration") : _32("Show view configuration"), children: /* @__PURE__ */ jsxRuntime.jsx(
16481
+ const columnsToggleButton = /* @__PURE__ */ jsxRuntime.jsx(antd.Tooltip, { title: columnsSelectorOpen ? _34("Hide view configuration") : _34("Show view configuration"), children: /* @__PURE__ */ jsxRuntime.jsx(
15929
16482
  antd.Button,
15930
16483
  {
15931
16484
  size: "small",
@@ -15937,10 +16490,10 @@ var DynamicList = ({ model: modelProp, allModels, filter, relationConfig, isEmbe
15937
16490
  return next;
15938
16491
  });
15939
16492
  },
15940
- "aria-label": columnsSelectorOpen ? _32("Hide view configuration") : _32("Show view configuration")
16493
+ "aria-label": columnsSelectorOpen ? _34("Hide view configuration") : _34("Show view configuration")
15941
16494
  }
15942
16495
  ) });
15943
- const createRelationButton = isRelationView && showCreate ? /* @__PURE__ */ jsxRuntime.jsx(antd.Tooltip, { title: _32("Add relation"), children: /* @__PURE__ */ jsxRuntime.jsx(
16496
+ const createRelationButton = isRelationView && showCreate ? /* @__PURE__ */ jsxRuntime.jsx(antd.Tooltip, { title: _34("Add relation"), children: /* @__PURE__ */ jsxRuntime.jsx(
15944
16497
  antd.Button,
15945
16498
  {
15946
16499
  size: "small",
@@ -15956,7 +16509,7 @@ var DynamicList = ({ model: modelProp, allModels, filter, relationConfig, isEmbe
15956
16509
  }
15957
16510
  }
15958
16511
  ) }) : null;
15959
- const associateExistingFkButton = isRelationView && showCreate && filter?.field && filter?.value !== void 0 && filter?.value !== null && !relationConfig?.otherKey ? /* @__PURE__ */ jsxRuntime.jsx(antd.Tooltip, { title: _32("Associate existing"), children: /* @__PURE__ */ jsxRuntime.jsx(
16512
+ const associateExistingFkButton = isRelationView && showCreate && filter?.field && filter?.value !== void 0 && filter?.value !== null && !relationConfig?.otherKey ? /* @__PURE__ */ jsxRuntime.jsx(antd.Tooltip, { title: _34("Associate existing"), children: /* @__PURE__ */ jsxRuntime.jsx(
15960
16513
  antd.Button,
15961
16514
  {
15962
16515
  size: "small",
@@ -15976,7 +16529,7 @@ var DynamicList = ({ model: modelProp, allModels, filter, relationConfig, isEmbe
15976
16529
  }
15977
16530
  }
15978
16531
  ) }) : null;
15979
- const createNewAndRelateButton = isRelationView && showCreate && relationConfig?.otherResource && relationConfig?.otherKey && (relationConfig?.targetKey || filter?.field) && filter?.value !== void 0 && filter?.value !== null ? /* @__PURE__ */ jsxRuntime.jsx(antd.Tooltip, { title: _32("Create new and relate"), children: /* @__PURE__ */ jsxRuntime.jsx(
16532
+ const createNewAndRelateButton = isRelationView && showCreate && relationConfig?.otherResource && relationConfig?.otherKey && (relationConfig?.targetKey || filter?.field) && filter?.value !== void 0 && filter?.value !== null ? /* @__PURE__ */ jsxRuntime.jsx(antd.Tooltip, { title: _34("Create new and relate"), children: /* @__PURE__ */ jsxRuntime.jsx(
15980
16533
  antd.Button,
15981
16534
  {
15982
16535
  size: "small",
@@ -15992,7 +16545,7 @@ var DynamicList = ({ model: modelProp, allModels, filter, relationConfig, isEmbe
15992
16545
  const relatedModel = findModelByName(allModels, relationConfig?.otherResource || relationConfig?.otherResourcePath);
15993
16546
  const relatedResource = relatedModel ? resolveResourcePath(relatedModel.resource || relatedModel.name, allModels) : null;
15994
16547
  if (!relatedResource) {
15995
- antd.message.warning(_32("No create route for the related model. Opening relation create form."));
16548
+ antd.message.warning(_34("No create route for the related model. Opening relation create form."));
15996
16549
  params.append(targetKey, String(targetId));
15997
16550
  const returnTo2 = `${location.pathname}${location.search}${location.hash}`;
15998
16551
  if (returnTo2.startsWith("/")) params.append("returnTo", returnTo2);
@@ -16012,7 +16565,7 @@ var DynamicList = ({ model: modelProp, allModels, filter, relationConfig, isEmbe
16012
16565
  const embeddedActionBar = isEmbedded ? /* @__PURE__ */ jsxRuntime.jsxs("div", { style: { display: "flex", alignItems: "center", justifyContent: "flex-end", gap: 8, marginBottom: 8 }, children: [
16013
16566
  columnsToggleButton,
16014
16567
  listToggleButton,
16015
- /* @__PURE__ */ jsxRuntime.jsx(antd.Tooltip, { title: _32("Analyze"), children: /* @__PURE__ */ jsxRuntime.jsx(
16568
+ /* @__PURE__ */ jsxRuntime.jsx(antd.Tooltip, { title: _34("Analyze"), children: /* @__PURE__ */ jsxRuntime.jsx(
16016
16569
  antd.Button,
16017
16570
  {
16018
16571
  size: "small",
@@ -16025,7 +16578,7 @@ var DynamicList = ({ model: modelProp, allModels, filter, relationConfig, isEmbe
16025
16578
  }
16026
16579
  }
16027
16580
  ) }),
16028
- /* @__PURE__ */ jsxRuntime.jsx(antd.Tooltip, { title: _32("Switch orientation"), children: /* @__PURE__ */ jsxRuntime.jsx(
16581
+ /* @__PURE__ */ jsxRuntime.jsx(antd.Tooltip, { title: _34("Switch orientation"), children: /* @__PURE__ */ jsxRuntime.jsx(
16029
16582
  antd.Button,
16030
16583
  {
16031
16584
  size: "small",
@@ -16036,7 +16589,7 @@ var DynamicList = ({ model: modelProp, allModels, filter, relationConfig, isEmbe
16036
16589
  }
16037
16590
  }
16038
16591
  ) }),
16039
- /* @__PURE__ */ jsxRuntime.jsx(antd.Tooltip, { title: _32("Switch positions"), children: /* @__PURE__ */ jsxRuntime.jsx(
16592
+ /* @__PURE__ */ jsxRuntime.jsx(antd.Tooltip, { title: _34("Switch positions"), children: /* @__PURE__ */ jsxRuntime.jsx(
16040
16593
  antd.Button,
16041
16594
  {
16042
16595
  size: "small",
@@ -16047,7 +16600,7 @@ var DynamicList = ({ model: modelProp, allModels, filter, relationConfig, isEmbe
16047
16600
  }
16048
16601
  }
16049
16602
  ) }),
16050
- resolvedLayoutPreferenceType && /* @__PURE__ */ jsxRuntime.jsx(antd.Tooltip, { title: _32("Save layout"), children: /* @__PURE__ */ jsxRuntime.jsx(
16603
+ resolvedLayoutPreferenceType && /* @__PURE__ */ jsxRuntime.jsx(antd.Tooltip, { title: _34("Save layout"), children: /* @__PURE__ */ jsxRuntime.jsx(
16051
16604
  antd.Button,
16052
16605
  {
16053
16606
  size: "small",
@@ -16059,7 +16612,7 @@ var DynamicList = ({ model: modelProp, allModels, filter, relationConfig, isEmbe
16059
16612
  associateExistingFkButton,
16060
16613
  createRelationButton,
16061
16614
  createNewAndRelateButton,
16062
- /* @__PURE__ */ jsxRuntime.jsx(antd.Tooltip, { title: _32("Export CSV"), children: /* @__PURE__ */ jsxRuntime.jsx(
16615
+ /* @__PURE__ */ jsxRuntime.jsx(antd.Tooltip, { title: _34("Export CSV"), children: /* @__PURE__ */ jsxRuntime.jsx(
16063
16616
  antd.Button,
16064
16617
  {
16065
16618
  size: "small",
@@ -16215,10 +16768,10 @@ var DynamicList = ({ model: modelProp, allModels, filter, relationConfig, isEmbe
16215
16768
  if (calendarInitSignatureRef.current === signature) return;
16216
16769
  calendarInitSignatureRef.current = signature;
16217
16770
  if (calendarEarliestDateTs === null) {
16218
- setCalendarAnchorDate(dayjs7__default.default().startOf(calendarMode));
16771
+ setCalendarAnchorDate(dayjs8__default.default().startOf(calendarMode));
16219
16772
  return;
16220
16773
  }
16221
- setCalendarAnchorDate(dayjs7__default.default(calendarEarliestDateTs).startOf(calendarMode));
16774
+ setCalendarAnchorDate(dayjs8__default.default(calendarEarliestDateTs).startOf(calendarMode));
16222
16775
  }, [calendarDateField, calendarEarliestDateTs, calendarMode, isCalendarView]);
16223
16776
  const calendarEntriesByDate = React6.useMemo(() => {
16224
16777
  const grouped = /* @__PURE__ */ new Map();
@@ -16266,7 +16819,7 @@ var DynamicList = ({ model: modelProp, allModels, filter, relationConfig, isEmbe
16266
16819
  };
16267
16820
  const renderCalendarView = () => {
16268
16821
  if (calendarDateFieldOptions.length === 0) {
16269
- return /* @__PURE__ */ jsxRuntime.jsx(antd.Empty, { description: _32("No date/datetime fields available for calendar view.") });
16822
+ return /* @__PURE__ */ jsxRuntime.jsx(antd.Empty, { description: _34("No date/datetime fields available for calendar view.") });
16270
16823
  }
16271
16824
  const selectedDateField = model.fields.find((field) => field.key === calendarDateField);
16272
16825
  const selectedLabel = selectedDateField?.label || calendarDateField;
@@ -16280,8 +16833,8 @@ var DynamicList = ({ model: modelProp, allModels, filter, relationConfig, isEmbe
16280
16833
  value: calendarMode,
16281
16834
  onChange: (value) => setCalendarMode(value),
16282
16835
  options: [
16283
- { label: _32("Monthly"), value: "month" },
16284
- { label: _32("Weekly"), value: "week" }
16836
+ { label: _34("Monthly"), value: "month" },
16837
+ { label: _34("Weekly"), value: "week" }
16285
16838
  ],
16286
16839
  style: { minWidth: 120 }
16287
16840
  }
@@ -16294,35 +16847,35 @@ var DynamicList = ({ model: modelProp, allModels, filter, relationConfig, isEmbe
16294
16847
  onChange: (value) => setCalendarDateField(value),
16295
16848
  options: calendarDateFieldOptions.map((field) => ({ label: field.label, value: field.key })),
16296
16849
  style: { minWidth: 220 },
16297
- placeholder: _32("Date field")
16850
+ placeholder: _34("Date field")
16298
16851
  }
16299
16852
  )
16300
16853
  ] }),
16301
16854
  /* @__PURE__ */ jsxRuntime.jsxs(antd.Space, { size: 8, children: [
16302
- /* @__PURE__ */ jsxRuntime.jsx(antd.Tooltip, { title: _32("Previous"), children: /* @__PURE__ */ jsxRuntime.jsx(
16855
+ /* @__PURE__ */ jsxRuntime.jsx(antd.Tooltip, { title: _34("Previous"), children: /* @__PURE__ */ jsxRuntime.jsx(
16303
16856
  antd.Button,
16304
16857
  {
16305
16858
  size: "small",
16306
16859
  icon: /* @__PURE__ */ jsxRuntime.jsx(icons.ArrowLeftOutlined, {}),
16307
- "aria-label": _32("Previous"),
16860
+ "aria-label": _34("Previous"),
16308
16861
  onClick: () => setCalendarAnchorDate((prev) => prev.subtract(1, calendarMode).startOf(calendarMode))
16309
16862
  }
16310
16863
  ) }),
16311
- /* @__PURE__ */ jsxRuntime.jsx(antd.Tooltip, { title: _32("Today"), children: /* @__PURE__ */ jsxRuntime.jsx(
16864
+ /* @__PURE__ */ jsxRuntime.jsx(antd.Tooltip, { title: _34("Today"), children: /* @__PURE__ */ jsxRuntime.jsx(
16312
16865
  antd.Button,
16313
16866
  {
16314
16867
  size: "small",
16315
16868
  icon: /* @__PURE__ */ jsxRuntime.jsx(icons.CalendarOutlined, {}),
16316
- "aria-label": _32("Today"),
16317
- onClick: () => setCalendarAnchorDate(dayjs7__default.default().startOf(calendarMode))
16869
+ "aria-label": _34("Today"),
16870
+ onClick: () => setCalendarAnchorDate(dayjs8__default.default().startOf(calendarMode))
16318
16871
  }
16319
16872
  ) }),
16320
- /* @__PURE__ */ jsxRuntime.jsx(antd.Tooltip, { title: _32("Next"), children: /* @__PURE__ */ jsxRuntime.jsx(
16873
+ /* @__PURE__ */ jsxRuntime.jsx(antd.Tooltip, { title: _34("Next"), children: /* @__PURE__ */ jsxRuntime.jsx(
16321
16874
  antd.Button,
16322
16875
  {
16323
16876
  size: "small",
16324
16877
  icon: /* @__PURE__ */ jsxRuntime.jsx(icons.ArrowRightOutlined, {}),
16325
- "aria-label": _32("Next"),
16878
+ "aria-label": _34("Next"),
16326
16879
  onClick: () => setCalendarAnchorDate((prev) => prev.add(1, calendarMode).startOf(calendarMode))
16327
16880
  }
16328
16881
  ) })
@@ -16363,7 +16916,7 @@ var DynamicList = ({ model: modelProp, allModels, filter, relationConfig, isEmbe
16363
16916
  const dayKey = day.format("YYYY-MM-DD");
16364
16917
  const entries = calendarEntriesByDate.get(dayKey) || [];
16365
16918
  const isOutsideCurrentMonth = calendarMode === "month" && day.month() !== calendarAnchorDate.month();
16366
- const isToday = day.isSame(dayjs7__default.default(), "day");
16919
+ const isToday = day.isSame(dayjs8__default.default(), "day");
16367
16920
  return /* @__PURE__ */ jsxRuntime.jsxs(
16368
16921
  "div",
16369
16922
  {
@@ -16407,20 +16960,20 @@ var DynamicList = ({ model: modelProp, allModels, filter, relationConfig, isEmbe
16407
16960
  antd.Modal,
16408
16961
  {
16409
16962
  open: saveViewModalOpen,
16410
- title: _32("Save view"),
16963
+ title: _34("Save view"),
16411
16964
  onCancel: () => {
16412
16965
  setSaveViewModalOpen(false);
16413
16966
  setPendingSaveTarget(null);
16414
16967
  },
16415
16968
  onOk: handleConfirmSaveView,
16416
- okText: pendingSaveTarget === "layout" ? _32("Save layout") : _32("Save analyze"),
16969
+ okText: pendingSaveTarget === "layout" ? _34("Save layout") : _34("Save analyze"),
16417
16970
  okButtonProps: { disabled: !pendingSaveTarget },
16418
16971
  children: /* @__PURE__ */ jsxRuntime.jsxs("div", { style: { display: "grid", gap: 12 }, children: [
16419
16972
  /* @__PURE__ */ jsxRuntime.jsxs("div", { children: [
16420
- /* @__PURE__ */ jsxRuntime.jsx("div", { style: { fontSize: 12, color: token.colorTextSecondary, marginBottom: 4 }, children: _32("View name") }),
16973
+ /* @__PURE__ */ jsxRuntime.jsx("div", { style: { fontSize: 12, color: token.colorTextSecondary, marginBottom: 4 }, children: _34("View name") }),
16421
16974
  /* @__PURE__ */ jsxRuntime.jsx(antd.Input, { value: saveViewName, onChange: (event) => setSaveViewName(event.target.value) })
16422
16975
  ] }),
16423
- /* @__PURE__ */ jsxRuntime.jsx(antd.Checkbox, { checked: saveViewAsNew, onChange: (event) => setSaveViewAsNew(event.target.checked), children: _32("Save as new view") })
16976
+ /* @__PURE__ */ jsxRuntime.jsx(antd.Checkbox, { checked: saveViewAsNew, onChange: (event) => setSaveViewAsNew(event.target.checked), children: _34("Save as new view") })
16424
16977
  ] })
16425
16978
  }
16426
16979
  ),
@@ -16428,10 +16981,10 @@ var DynamicList = ({ model: modelProp, allModels, filter, relationConfig, isEmbe
16428
16981
  antd.Modal,
16429
16982
  {
16430
16983
  open: renameViewModalOpen,
16431
- title: _32("Rename view"),
16984
+ title: _34("Rename view"),
16432
16985
  onCancel: () => setRenameViewModalOpen(false),
16433
16986
  onOk: handleRenameView,
16434
- okText: _32("Rename"),
16987
+ okText: _34("Rename"),
16435
16988
  children: /* @__PURE__ */ jsxRuntime.jsx(antd.Input, { value: renameViewName, onChange: (event) => setRenameViewName(event.target.value) })
16436
16989
  }
16437
16990
  ),
@@ -16441,7 +16994,7 @@ var DynamicList = ({ model: modelProp, allModels, filter, relationConfig, isEmbe
16441
16994
  {
16442
16995
  size: "small",
16443
16996
  title: /* @__PURE__ */ jsxRuntime.jsxs("div", { style: { display: "flex", alignItems: "center", justifyContent: "space-between", gap: 12, flexWrap: "wrap" }, children: [
16444
- /* @__PURE__ */ jsxRuntime.jsx("span", { style: { color: token.colorTextSecondary, fontSize: 12, fontWeight: 600 }, children: _32("Filters") }),
16997
+ /* @__PURE__ */ jsxRuntime.jsx("span", { style: { color: token.colorTextSecondary, fontSize: 12, fontWeight: 600 }, children: _34("Filters") }),
16445
16998
  /* @__PURE__ */ jsxRuntime.jsx("div", { style: { display: "flex", alignItems: "center", gap: 8, flex: 1, justifyContent: "flex-end" }, children: !filtersCollapsed && searchField && /* @__PURE__ */ jsxRuntime.jsx(
16446
16999
  antd.Form,
16447
17000
  {
@@ -16455,7 +17008,7 @@ var DynamicList = ({ model: modelProp, allModels, filter, relationConfig, isEmbe
16455
17008
  }
16456
17009
  searchFormProps.onFinish?.(values);
16457
17010
  },
16458
- children: /* @__PURE__ */ jsxRuntime.jsx(antd.Form.Item, { name: "q", style: { marginBottom: 0, width: "100%" }, children: /* @__PURE__ */ jsxRuntime.jsx(antd.Input, { placeholder: _32("Search all fields..."), prefix: /* @__PURE__ */ jsxRuntime.jsx(icons.SearchOutlined, {}), allowClear: true, style: { width: "100%" } }) })
17011
+ children: /* @__PURE__ */ jsxRuntime.jsx(antd.Form.Item, { name: "q", style: { marginBottom: 0, width: "100%" }, children: /* @__PURE__ */ jsxRuntime.jsx(antd.Input, { placeholder: _34("Search all fields..."), prefix: /* @__PURE__ */ jsxRuntime.jsx(icons.SearchOutlined, {}), allowClear: true, style: { width: "100%" } }) })
16459
17012
  }
16460
17013
  ) })
16461
17014
  ] }),
@@ -16468,31 +17021,31 @@ var DynamicList = ({ model: modelProp, allModels, filter, relationConfig, isEmbe
16468
17021
  antd.Card,
16469
17022
  {
16470
17023
  size: "small",
16471
- title: /* @__PURE__ */ jsxRuntime.jsx("span", { style: { color: token.colorTextSecondary, fontSize: 12, fontWeight: 600 }, children: _32("View configuration") }),
17024
+ title: /* @__PURE__ */ jsxRuntime.jsx("span", { style: { color: token.colorTextSecondary, fontSize: 12, fontWeight: 600 }, children: _34("View configuration") }),
16472
17025
  style: { marginBottom: 16 },
16473
17026
  styles: { body: { display: "grid", gap: 12 } },
16474
17027
  children: [
16475
17028
  /* @__PURE__ */ jsxRuntime.jsxs("div", { style: { display: "grid", gap: 12 }, children: [
16476
17029
  /* @__PURE__ */ jsxRuntime.jsxs("div", { style: { display: "grid", gap: 8 }, children: [
16477
- /* @__PURE__ */ jsxRuntime.jsx("div", { style: { fontSize: 12, color: token.colorTextSecondary, fontWeight: 600 }, children: _32("Advanced filters") }),
16478
- filterRules.length === 0 ? /* @__PURE__ */ jsxRuntime.jsx("div", { style: { color: token.colorTextSecondary, fontSize: 12 }, children: _32("No filters yet.") }) : filterRules.map((rule) => {
17030
+ /* @__PURE__ */ jsxRuntime.jsx("div", { style: { fontSize: 12, color: token.colorTextSecondary, fontWeight: 600 }, children: _34("Advanced filters") }),
17031
+ filterRules.length === 0 ? /* @__PURE__ */ jsxRuntime.jsx("div", { style: { color: token.colorTextSecondary, fontSize: 12 }, children: _34("No filters yet.") }) : filterRules.map((rule) => {
16479
17032
  const field = model.fields.find((f) => f.key === rule.fieldKey);
16480
17033
  const type = field?.type || "string";
16481
17034
  const operatorOptions = type === "number" ? [
16482
- { label: _32("="), value: "eq" },
16483
- { label: _32(">"), value: "gt" },
16484
- { label: _32(">="), value: "gte" },
16485
- { label: _32("<"), value: "lt" },
16486
- { label: _32("<="), value: "lte" },
16487
- { label: _32("Between"), value: "between" }
17035
+ { label: _34("="), value: "eq" },
17036
+ { label: _34(">"), value: "gt" },
17037
+ { label: _34(">="), value: "gte" },
17038
+ { label: _34("<"), value: "lt" },
17039
+ { label: _34("<="), value: "lte" },
17040
+ { label: _34("Between"), value: "between" }
16488
17041
  ] : type === "date" ? [
16489
- { label: _32("On"), value: "on" },
16490
- { label: _32("After"), value: "after" },
16491
- { label: _32("Before"), value: "before" },
16492
- { label: _32("Between"), value: "between" }
16493
- ] : type === "boolean" ? [{ label: _32("Is"), value: "is" }] : [
16494
- { label: _32("Contains"), value: "contains" },
16495
- { label: _32("Equals"), value: "equals" }
17042
+ { label: _34("On"), value: "on" },
17043
+ { label: _34("After"), value: "after" },
17044
+ { label: _34("Before"), value: "before" },
17045
+ { label: _34("Between"), value: "between" }
17046
+ ] : type === "boolean" ? [{ label: _34("Is"), value: "is" }] : [
17047
+ { label: _34("Contains"), value: "contains" },
17048
+ { label: _34("Equals"), value: "equals" }
16496
17049
  ];
16497
17050
  const renderDateInput = (value, onChange) => {
16498
17051
  const mode = value?.mode || "absolute";
@@ -16505,9 +17058,9 @@ var DynamicList = ({ model: modelProp, allModels, filter, relationConfig, isEmbe
16505
17058
  value: value?.direction || "next",
16506
17059
  onChange: (val) => onChange({ ...value, mode: "relative", direction: val }),
16507
17060
  options: [
16508
- { label: _32("Previous"), value: "previous" },
16509
- { label: _32("Current"), value: "current" },
16510
- { label: _32("Next"), value: "next" }
17061
+ { label: _34("Previous"), value: "previous" },
17062
+ { label: _34("Current"), value: "current" },
17063
+ { label: _34("Next"), value: "next" }
16511
17064
  ]
16512
17065
  }
16513
17066
  ),
@@ -16517,11 +17070,11 @@ var DynamicList = ({ model: modelProp, allModels, filter, relationConfig, isEmbe
16517
17070
  value: value?.unit || "weeks",
16518
17071
  onChange: (val) => onChange({ ...value, mode: "relative", unit: val }),
16519
17072
  options: [
16520
- { label: _32("Days"), value: "days" },
16521
- { label: _32("Weeks"), value: "weeks" },
16522
- { label: _32("Months"), value: "months" },
16523
- { label: _32("Quarters"), value: "quarters" },
16524
- { label: _32("Years"), value: "years" }
17073
+ { label: _34("Days"), value: "days" },
17074
+ { label: _34("Weeks"), value: "weeks" },
17075
+ { label: _34("Months"), value: "months" },
17076
+ { label: _34("Quarters"), value: "quarters" },
17077
+ { label: _34("Years"), value: "years" }
16525
17078
  ]
16526
17079
  }
16527
17080
  )
@@ -16530,7 +17083,7 @@ var DynamicList = ({ model: modelProp, allModels, filter, relationConfig, isEmbe
16530
17083
  return /* @__PURE__ */ jsxRuntime.jsx(
16531
17084
  antd.DatePicker,
16532
17085
  {
16533
- value: value?.date ? dayjs7__default.default(value.date) : void 0,
17086
+ value: value?.date ? dayjs8__default.default(value.date) : void 0,
16534
17087
  onChange: (val) => onChange({ mode: "absolute", date: val ? val.toISOString() : null })
16535
17088
  }
16536
17089
  );
@@ -16543,7 +17096,7 @@ var DynamicList = ({ model: modelProp, allModels, filter, relationConfig, isEmbe
16543
17096
  value: rule.fieldKey,
16544
17097
  onChange: (value) => setFilterRules((prev) => prev.map((item) => item.id === rule.id ? { ...item, fieldKey: value, operator: void 0, value: void 0, value2: void 0 } : item)),
16545
17098
  options: model.fields.map((f) => ({ label: f.label, value: f.key })),
16546
- placeholder: _32("Field")
17099
+ placeholder: _34("Field")
16547
17100
  }
16548
17101
  ),
16549
17102
  /* @__PURE__ */ jsxRuntime.jsx(
@@ -16553,7 +17106,7 @@ var DynamicList = ({ model: modelProp, allModels, filter, relationConfig, isEmbe
16553
17106
  value: rule.operator,
16554
17107
  onChange: (value) => setFilterRules((prev) => prev.map((item) => item.id === rule.id ? { ...item, operator: value } : item)),
16555
17108
  options: operatorOptions,
16556
- placeholder: _32("Operator")
17109
+ placeholder: _34("Operator")
16557
17110
  }
16558
17111
  ),
16559
17112
  type === "number" && rule.operator === "between" && /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
@@ -16586,10 +17139,10 @@ var DynamicList = ({ model: modelProp, allModels, filter, relationConfig, isEmbe
16586
17139
  value: rule.value,
16587
17140
  onChange: (value) => setFilterRules((prev) => prev.map((item) => item.id === rule.id ? { ...item, value } : item)),
16588
17141
  options: [
16589
- { label: _32("True"), value: true },
16590
- { label: _32("False"), value: false }
17142
+ { label: _34("True"), value: true },
17143
+ { label: _34("False"), value: false }
16591
17144
  ],
16592
- placeholder: _32("Value")
17145
+ placeholder: _34("Value")
16593
17146
  }
16594
17147
  ),
16595
17148
  type === "date" && rule.operator === "between" && /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
@@ -16602,7 +17155,7 @@ var DynamicList = ({ model: modelProp, allModels, filter, relationConfig, isEmbe
16602
17155
  {
16603
17156
  value: rule.value,
16604
17157
  onChange: (event) => setFilterRules((prev) => prev.map((item) => item.id === rule.id ? { ...item, value: event.target.value } : item)),
16605
- placeholder: _32("Value"),
17158
+ placeholder: _34("Value"),
16606
17159
  style: { minWidth: 200 }
16607
17160
  }
16608
17161
  ),
@@ -16615,8 +17168,8 @@ var DynamicList = ({ model: modelProp, allModels, filter, relationConfig, isEmbe
16615
17168
  setFilterRules((prev) => prev.map((item) => item.id === rule.id ? { ...item, value: { ...item.value || {}, mode: val } } : item));
16616
17169
  },
16617
17170
  options: [
16618
- { label: _32("Date"), value: "absolute" },
16619
- { label: _32("Relative"), value: "relative" }
17171
+ { label: _34("Date"), value: "absolute" },
17172
+ { label: _34("Relative"), value: "relative" }
16620
17173
  ]
16621
17174
  }
16622
17175
  ),
@@ -16629,8 +17182,8 @@ var DynamicList = ({ model: modelProp, allModels, filter, relationConfig, isEmbe
16629
17182
  setFilterRules((prev) => prev.map((item) => item.id === rule.id ? { ...item, value2: { ...item.value2 || {}, mode: val } } : item));
16630
17183
  },
16631
17184
  options: [
16632
- { label: _32("Date"), value: "absolute" },
16633
- { label: _32("Relative"), value: "relative" }
17185
+ { label: _34("Date"), value: "absolute" },
17186
+ { label: _34("Relative"), value: "relative" }
16634
17187
  ]
16635
17188
  }
16636
17189
  ),
@@ -16640,7 +17193,7 @@ var DynamicList = ({ model: modelProp, allModels, filter, relationConfig, isEmbe
16640
17193
  size: "small",
16641
17194
  danger: true,
16642
17195
  onClick: () => setFilterRules((prev) => prev.filter((item) => item.id !== rule.id)),
16643
- children: _32("Remove")
17196
+ children: _34("Remove")
16644
17197
  }
16645
17198
  )
16646
17199
  ] }, rule.id);
@@ -16652,14 +17205,14 @@ var DynamicList = ({ model: modelProp, allModels, filter, relationConfig, isEmbe
16652
17205
  size: "small",
16653
17206
  icon: /* @__PURE__ */ jsxRuntime.jsx(icons.FilterOutlined, {}),
16654
17207
  onClick: () => setFilterRules((prev) => [...prev, { id: `${Date.now()}-${Math.random()}` }]),
16655
- children: _32("Add Filter")
17208
+ children: _34("Add Filter")
16656
17209
  }
16657
17210
  ),
16658
- filterRules.length > 0 && /* @__PURE__ */ jsxRuntime.jsx(antd.Button, { size: "small", onClick: () => setFilterRules([]), children: _32("Clear filters") })
17211
+ filterRules.length > 0 && /* @__PURE__ */ jsxRuntime.jsx(antd.Button, { size: "small", onClick: () => setFilterRules([]), children: _34("Clear filters") })
16659
17212
  ] })
16660
17213
  ] }),
16661
17214
  /* @__PURE__ */ jsxRuntime.jsxs("div", { style: { display: "grid", gap: 6 }, children: [
16662
- /* @__PURE__ */ jsxRuntime.jsx("div", { style: { fontSize: 12, color: token.colorTextSecondary, fontWeight: 600 }, children: _32("Views shown") }),
17215
+ /* @__PURE__ */ jsxRuntime.jsx("div", { style: { fontSize: 12, color: token.colorTextSecondary, fontWeight: 600 }, children: _34("Views shown") }),
16663
17216
  /* @__PURE__ */ jsxRuntime.jsx(
16664
17217
  antd.Select,
16665
17218
  {
@@ -16680,12 +17233,12 @@ var DynamicList = ({ model: modelProp, allModels, filter, relationConfig, isEmbe
16680
17233
  ),
16681
17234
  selectedViewNames.length > 1 && /* @__PURE__ */ jsxRuntime.jsx("div", { style: { display: "grid", gap: 6 }, children: selectedViewNames.map((name, index) => /* @__PURE__ */ jsxRuntime.jsxs("div", { style: { display: "flex", alignItems: "center", gap: 8 }, children: [
16682
17235
  /* @__PURE__ */ jsxRuntime.jsx("div", { style: { flex: 1 }, children: name }),
16683
- /* @__PURE__ */ jsxRuntime.jsx(antd.Tooltip, { title: _32("Move up"), children: /* @__PURE__ */ jsxRuntime.jsx(antd.Button, { size: "small", icon: /* @__PURE__ */ jsxRuntime.jsx(icons.ArrowUpOutlined, {}), disabled: index === 0, onClick: () => moveSelectedView(name, "up") }) }),
16684
- /* @__PURE__ */ jsxRuntime.jsx(antd.Tooltip, { title: _32("Move down"), children: /* @__PURE__ */ jsxRuntime.jsx(antd.Button, { size: "small", icon: /* @__PURE__ */ jsxRuntime.jsx(icons.ArrowDownOutlined, {}), disabled: index === selectedViewNames.length - 1, onClick: () => moveSelectedView(name, "down") }) })
17236
+ /* @__PURE__ */ jsxRuntime.jsx(antd.Tooltip, { title: _34("Move up"), children: /* @__PURE__ */ jsxRuntime.jsx(antd.Button, { size: "small", icon: /* @__PURE__ */ jsxRuntime.jsx(icons.ArrowUpOutlined, {}), disabled: index === 0, onClick: () => moveSelectedView(name, "up") }) }),
17237
+ /* @__PURE__ */ jsxRuntime.jsx(antd.Tooltip, { title: _34("Move down"), children: /* @__PURE__ */ jsxRuntime.jsx(antd.Button, { size: "small", icon: /* @__PURE__ */ jsxRuntime.jsx(icons.ArrowDownOutlined, {}), disabled: index === selectedViewNames.length - 1, onClick: () => moveSelectedView(name, "down") }) })
16685
17238
  ] }, name)) })
16686
17239
  ] }),
16687
17240
  /* @__PURE__ */ jsxRuntime.jsxs("div", { style: { display: "grid", gap: 6 }, children: [
16688
- /* @__PURE__ */ jsxRuntime.jsx("div", { style: { fontSize: 12, color: token.colorTextSecondary, fontWeight: 600 }, children: _32("Active view") }),
17241
+ /* @__PURE__ */ jsxRuntime.jsx("div", { style: { fontSize: 12, color: token.colorTextSecondary, fontWeight: 600 }, children: _34("Active view") }),
16689
17242
  viewSelector
16690
17243
  ] }),
16691
17244
  /* @__PURE__ */ jsxRuntime.jsxs("div", { style: { display: "flex", flexWrap: "wrap", alignItems: "center", gap: 8 }, children: [
@@ -16697,7 +17250,7 @@ var DynamicList = ({ model: modelProp, allModels, filter, relationConfig, isEmbe
16697
17250
  setRenameViewName(currentViewName);
16698
17251
  setRenameViewModalOpen(true);
16699
17252
  },
16700
- children: _32("Rename view")
17253
+ children: _34("Rename view")
16701
17254
  }
16702
17255
  ),
16703
17256
  /* @__PURE__ */ jsxRuntime.jsx(
@@ -16708,7 +17261,7 @@ var DynamicList = ({ model: modelProp, allModels, filter, relationConfig, isEmbe
16708
17261
  icon: /* @__PURE__ */ jsxRuntime.jsx(icons.DeleteOutlined, {}),
16709
17262
  disabled: availableViewNames.length <= 1,
16710
17263
  onClick: confirmDeleteView,
16711
- children: _32("Delete view")
17264
+ children: _34("Delete view")
16712
17265
  }
16713
17266
  ),
16714
17267
  resolvedLayoutPreferenceType && /* @__PURE__ */ jsxRuntime.jsx(
@@ -16718,7 +17271,7 @@ var DynamicList = ({ model: modelProp, allModels, filter, relationConfig, isEmbe
16718
17271
  icon: /* @__PURE__ */ jsxRuntime.jsx(icons.SaveOutlined, {}),
16719
17272
  onClick: () => openSaveViewModalFor("layout"),
16720
17273
  loading: isSavingLayoutPrefs,
16721
- children: _32("Save layout")
17274
+ children: _34("Save layout")
16722
17275
  }
16723
17276
  ),
16724
17277
  /* @__PURE__ */ jsxRuntime.jsx(
@@ -16730,7 +17283,7 @@ var DynamicList = ({ model: modelProp, allModels, filter, relationConfig, isEmbe
16730
17283
  markLayoutPrefsTouched();
16731
17284
  setFiltersCollapsed((prev) => !prev);
16732
17285
  },
16733
- children: filtersCollapsed ? _32("Show Filters") : _32("Hide Filters")
17286
+ children: filtersCollapsed ? _34("Show Filters") : _34("Hide Filters")
16734
17287
  }
16735
17288
  ),
16736
17289
  /* @__PURE__ */ jsxRuntime.jsx(
@@ -16744,7 +17297,7 @@ var DynamicList = ({ model: modelProp, allModels, filter, relationConfig, isEmbe
16744
17297
  setIsStatsFlipped(false);
16745
17298
  setAnalyzeOpen((prev) => !prev);
16746
17299
  },
16747
- children: _32("Analyze")
17300
+ children: _34("Analyze")
16748
17301
  }
16749
17302
  ),
16750
17303
  /* @__PURE__ */ jsxRuntime.jsx(
@@ -16756,7 +17309,7 @@ var DynamicList = ({ model: modelProp, allModels, filter, relationConfig, isEmbe
16756
17309
  markLayoutPrefsTouched();
16757
17310
  setIsAnalyzeVertical((prev) => !prev);
16758
17311
  },
16759
- children: _32("Switch orientation")
17312
+ children: _34("Switch orientation")
16760
17313
  }
16761
17314
  ),
16762
17315
  /* @__PURE__ */ jsxRuntime.jsx(
@@ -16768,21 +17321,21 @@ var DynamicList = ({ model: modelProp, allModels, filter, relationConfig, isEmbe
16768
17321
  markLayoutPrefsTouched();
16769
17322
  setIsAnalyzeFirst((prev) => !prev);
16770
17323
  },
16771
- children: _32("Switch positions")
17324
+ children: _34("Switch positions")
16772
17325
  }
16773
17326
  )
16774
17327
  ] })
16775
17328
  ] }),
16776
17329
  /* @__PURE__ */ jsxRuntime.jsxs("div", { style: { display: "grid", gap: 12 }, children: [
16777
17330
  /* @__PURE__ */ jsxRuntime.jsxs("div", { style: { display: "flex", alignItems: "center", justifyContent: "space-between", gap: 12 }, children: [
16778
- /* @__PURE__ */ jsxRuntime.jsx("span", { style: { color: token.colorTextSecondary, fontSize: 12, fontWeight: 600 }, children: _32("Columns") }),
17331
+ /* @__PURE__ */ jsxRuntime.jsx("span", { style: { color: token.colorTextSecondary, fontSize: 12, fontWeight: 600 }, children: _34("Columns") }),
16779
17332
  selectedColumnKeys && selectedColumnKeys.length > 0 && /* @__PURE__ */ jsxRuntime.jsx(antd.Button, { size: "small", onClick: () => {
16780
17333
  setSelectedColumnKeys(null);
16781
17334
  setColumnOrder(null);
16782
- }, children: _32("Reset to default") })
17335
+ }, children: _34("Reset to default") })
16783
17336
  ] }),
16784
17337
  /* @__PURE__ */ jsxRuntime.jsxs("div", { children: [
16785
- /* @__PURE__ */ jsxRuntime.jsx("div", { style: { fontSize: 12, color: token.colorTextSecondary, marginBottom: 6 }, children: _32("Select columns") }),
17338
+ /* @__PURE__ */ jsxRuntime.jsx("div", { style: { fontSize: 12, color: token.colorTextSecondary, marginBottom: 6 }, children: _34("Select columns") }),
16786
17339
  /* @__PURE__ */ jsxRuntime.jsx(
16787
17340
  antd.Checkbox.Group,
16788
17341
  {
@@ -16794,27 +17347,27 @@ var DynamicList = ({ model: modelProp, allModels, filter, relationConfig, isEmbe
16794
17347
  (!selectedColumnKeys || selectedColumnKeys.length === 0) && /* @__PURE__ */ jsxRuntime.jsx("div", { style: { fontSize: 12, color: token.colorTextSecondary, marginTop: 6 }, children: "Using default columns. Select fields to customize." })
16795
17348
  ] }),
16796
17349
  /* @__PURE__ */ jsxRuntime.jsxs("div", { children: [
16797
- /* @__PURE__ */ jsxRuntime.jsx("div", { style: { fontSize: 12, color: token.colorTextSecondary, marginBottom: 6 }, children: _32("Column order") }),
16798
- orderedSelectedColumns.length === 0 ? /* @__PURE__ */ jsxRuntime.jsx("div", { style: { fontSize: 12, color: token.colorTextSecondary }, children: _32("No custom order yet.") }) : orderedSelectedColumns.map((key, index) => {
17350
+ /* @__PURE__ */ jsxRuntime.jsx("div", { style: { fontSize: 12, color: token.colorTextSecondary, marginBottom: 6 }, children: _34("Column order") }),
17351
+ orderedSelectedColumns.length === 0 ? /* @__PURE__ */ jsxRuntime.jsx("div", { style: { fontSize: 12, color: token.colorTextSecondary }, children: _34("No custom order yet.") }) : orderedSelectedColumns.map((key, index) => {
16799
17352
  const field = model.fields.find((item) => item.key === key);
16800
17353
  if (!field) return null;
16801
17354
  return /* @__PURE__ */ jsxRuntime.jsxs("div", { style: { display: "flex", alignItems: "center", gap: 8, marginBottom: 4 }, children: [
16802
17355
  /* @__PURE__ */ jsxRuntime.jsx("div", { style: { flex: 1 }, children: field.label }),
16803
- /* @__PURE__ */ jsxRuntime.jsx(antd.Tooltip, { title: _32("Move left"), children: /* @__PURE__ */ jsxRuntime.jsx(antd.Button, { size: "small", icon: /* @__PURE__ */ jsxRuntime.jsx(icons.ArrowLeftOutlined, {}), disabled: index === 0, onClick: () => moveColumnOrder(key, "left") }) }),
16804
- /* @__PURE__ */ jsxRuntime.jsx(antd.Tooltip, { title: _32("Move right"), children: /* @__PURE__ */ jsxRuntime.jsx(antd.Button, { size: "small", icon: /* @__PURE__ */ jsxRuntime.jsx(icons.ArrowRightOutlined, {}), disabled: index === orderedSelectedColumns.length - 1, onClick: () => moveColumnOrder(key, "right") }) })
17356
+ /* @__PURE__ */ jsxRuntime.jsx(antd.Tooltip, { title: _34("Move left"), children: /* @__PURE__ */ jsxRuntime.jsx(antd.Button, { size: "small", icon: /* @__PURE__ */ jsxRuntime.jsx(icons.ArrowLeftOutlined, {}), disabled: index === 0, onClick: () => moveColumnOrder(key, "left") }) }),
17357
+ /* @__PURE__ */ jsxRuntime.jsx(antd.Tooltip, { title: _34("Move right"), children: /* @__PURE__ */ jsxRuntime.jsx(antd.Button, { size: "small", icon: /* @__PURE__ */ jsxRuntime.jsx(icons.ArrowRightOutlined, {}), disabled: index === orderedSelectedColumns.length - 1, onClick: () => moveColumnOrder(key, "right") }) })
16805
17358
  ] }, key);
16806
17359
  })
16807
17360
  ] }),
16808
17361
  isTotalsDetailsView && /* @__PURE__ */ jsxRuntime.jsxs("div", { children: [
16809
- /* @__PURE__ */ jsxRuntime.jsx("div", { style: { fontSize: 12, color: token.colorTextSecondary, marginBottom: 6 }, children: _32("Totals summary function") }),
16810
- /* @__PURE__ */ jsxRuntime.jsx("div", { style: { display: "grid", gap: 6 }, children: totalsSummaryConfigFields.length === 0 ? /* @__PURE__ */ jsxRuntime.jsx("div", { style: { fontSize: 12, color: token.colorTextSecondary }, children: _32("No numeric fields available.") }) : totalsSummaryConfigFields.map((field) => {
17362
+ /* @__PURE__ */ jsxRuntime.jsx("div", { style: { fontSize: 12, color: token.colorTextSecondary, marginBottom: 6 }, children: _34("Totals summary function") }),
17363
+ /* @__PURE__ */ jsxRuntime.jsx("div", { style: { display: "grid", gap: 6 }, children: totalsSummaryConfigFields.length === 0 ? /* @__PURE__ */ jsxRuntime.jsx("div", { style: { fontSize: 12, color: token.colorTextSecondary }, children: _34("No numeric fields available.") }) : totalsSummaryConfigFields.map((field) => {
16811
17364
  const options = [
16812
- { label: _32("Sum"), value: "sum" },
16813
- { label: _32("Average"), value: "avg" },
16814
- { label: _32("Count"), value: "count" },
16815
- { label: _32("Max"), value: "max" },
16816
- { label: _32("Min"), value: "min" },
16817
- { label: _32("Std Dev"), value: "stddev" }
17365
+ { label: _34("Sum"), value: "sum" },
17366
+ { label: _34("Average"), value: "avg" },
17367
+ { label: _34("Count"), value: "count" },
17368
+ { label: _34("Max"), value: "max" },
17369
+ { label: _34("Min"), value: "min" },
17370
+ { label: _34("Std Dev"), value: "stddev" }
16818
17371
  ];
16819
17372
  return /* @__PURE__ */ jsxRuntime.jsxs("div", { style: { display: "flex", alignItems: "center", gap: 8 }, children: [
16820
17373
  /* @__PURE__ */ jsxRuntime.jsx("div", { style: { flex: 1 }, children: field.label }),
@@ -16842,7 +17395,7 @@ var DynamicList = ({ model: modelProp, allModels, filter, relationConfig, isEmbe
16842
17395
  listVisible && /* @__PURE__ */ jsxRuntime.jsx("div", { style: listContainerStyle, children: isCalendarView ? renderCalendarView() : isGalleryView ? /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
16843
17396
  galleryRows.length === 0 ? /* @__PURE__ */ jsxRuntime.jsxs("div", { style: { display: "inline-flex", alignItems: "center", gap: 6, color: "#bfbfbf", fontSize: 12 }, children: [
16844
17397
  /* @__PURE__ */ jsxRuntime.jsx(icons.FileTextOutlined, { style: { fontSize: 16 } }),
16845
- _32("No images available")
17398
+ _34("No images available")
16846
17399
  ] }) : /* @__PURE__ */ jsxRuntime.jsx("div", { style: { display: "flex", flexWrap: "wrap", gap: 16 }, children: galleryRows.map((record) => renderGalleryItem(record)) }),
16847
17400
  galleryPaginationProps && /* @__PURE__ */ jsxRuntime.jsx("div", { style: { marginTop: 12, display: "flex", justifyContent: "flex-end" }, children: /* @__PURE__ */ jsxRuntime.jsx(antd.Pagination, { ...galleryPaginationProps }) })
16848
17401
  ] }) : /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
@@ -16911,7 +17464,7 @@ var DynamicList = ({ model: modelProp, allModels, filter, relationConfig, isEmbe
16911
17464
  dataIndex: field.key,
16912
17465
  title: field.label,
16913
17466
  sorter: { compare: (a, b) => compareSortValues(field, a, b), multiple: getSortPriority(columnSort, field.key) },
16914
- align: field.type === "number" && !["eid", "eid_from", "eid_to"].includes(field.key) ? "right" : void 0,
17467
+ align: field.type === "number" && !field.reference && !["eid", "eid_from", "eid_to"].includes(field.key) ? "right" : void 0,
16915
17468
  filters: columnFilters.get(field.key),
16916
17469
  filteredValue: columnFiltersSelected[field.key] || null,
16917
17470
  sortOrder: columnSort.find((item) => item.fieldKey === field.key)?.order ?? null,
@@ -16971,6 +17524,10 @@ var DynamicList = ({ model: modelProp, allModels, filter, relationConfig, isEmbe
16971
17524
  render: (value, record) => {
16972
17525
  const { resource, id } = getTargetInfo(record);
16973
17526
  const renderValue = () => {
17527
+ const showToken = normalizeFieldViewType(field.showViewType || "");
17528
+ if (showToken && !(showToken === "read-only-field" && field.reference)) {
17529
+ return renderFieldValue(field, record, allModels, true);
17530
+ }
16974
17531
  if (field.reference && value && hasReferenceModel(field.reference, allModels)) {
16975
17532
  return /* @__PURE__ */ jsxRuntime.jsx(
16976
17533
  ReferenceField,
@@ -17019,17 +17576,17 @@ var DynamicList = ({ model: modelProp, allModels, filter, relationConfig, isEmbe
17019
17576
  showActions && /* @__PURE__ */ jsxRuntime.jsx(
17020
17577
  antd.Table.Column,
17021
17578
  {
17022
- title: _32("Actions"),
17579
+ title: _34("Actions"),
17023
17580
  width: 140,
17024
17581
  render: (_unused, record) => {
17025
17582
  const { resource, id, isLinkRow } = getTargetInfo(record);
17026
- if (!id || !resource) return /* @__PURE__ */ jsxRuntime.jsx(antd.Tooltip, { title: `${_32("Debug: Cannot find target")}. ID: ${id}, Resource: ${resource}. Keys: ${Object.keys(record).join(",")}`, children: /* @__PURE__ */ jsxRuntime.jsx(antd.Button, { size: "small", danger: true, icon: /* @__PURE__ */ jsxRuntime.jsx(icons.BugOutlined, {}) }) });
17583
+ if (!id || !resource) return /* @__PURE__ */ jsxRuntime.jsx(antd.Tooltip, { title: `${_34("Debug: Cannot find target")}. ID: ${id}, Resource: ${resource}. Keys: ${Object.keys(record).join(",")}`, children: /* @__PURE__ */ jsxRuntime.jsx(antd.Button, { size: "small", danger: true, icon: /* @__PURE__ */ jsxRuntime.jsx(icons.BugOutlined, {}) }) });
17027
17584
  const deleteResource = isLinkRow ? model.name : resource;
17028
17585
  const deleteId = isLinkRow && relationConfig?.targetKey && relationConfig?.otherKey ? `${record[relationConfig.targetKey]}:${record[relationConfig.otherKey]}` : id;
17029
17586
  return /* @__PURE__ */ jsxRuntime.jsxs(antd.Space, { children: [
17030
- /* @__PURE__ */ jsxRuntime.jsx(antd.Tooltip, { title: _32("View"), children: /* @__PURE__ */ jsxRuntime.jsx(antd.Button, { size: "small", icon: /* @__PURE__ */ jsxRuntime.jsx(icons.EyeOutlined, {}), onClick: () => go({ to: { resource, action: "show", id } }) }) }),
17031
- /* @__PURE__ */ jsxRuntime.jsx(antd.Tooltip, { title: _32("Edit"), children: /* @__PURE__ */ jsxRuntime.jsx(antd.Button, { size: "small", icon: /* @__PURE__ */ jsxRuntime.jsx(icons.EditOutlined, {}), onClick: () => go({ to: { resource, action: "edit", id } }) }) }),
17032
- /* @__PURE__ */ jsxRuntime.jsx(antd.Tooltip, { title: _32("Delete"), children: /* @__PURE__ */ jsxRuntime.jsx(antd$1.DeleteButton, { hideText: true, size: "small", recordItemId: deleteId, resource: deleteResource }) })
17587
+ /* @__PURE__ */ jsxRuntime.jsx(antd.Tooltip, { title: _34("View"), children: /* @__PURE__ */ jsxRuntime.jsx(antd.Button, { size: "small", icon: /* @__PURE__ */ jsxRuntime.jsx(icons.EyeOutlined, {}), onClick: () => go({ to: { resource, action: "show", id } }) }) }),
17588
+ /* @__PURE__ */ jsxRuntime.jsx(antd.Tooltip, { title: _34("Edit"), children: /* @__PURE__ */ jsxRuntime.jsx(antd.Button, { size: "small", icon: /* @__PURE__ */ jsxRuntime.jsx(icons.EditOutlined, {}), onClick: () => go({ to: { resource, action: "edit", id } }) }) }),
17589
+ /* @__PURE__ */ jsxRuntime.jsx(antd.Tooltip, { title: _34("Delete"), children: /* @__PURE__ */ jsxRuntime.jsx(antd$1.DeleteButton, { hideText: true, size: "small", recordItemId: deleteId, resource: deleteResource }) })
17033
17590
  ] });
17034
17591
  }
17035
17592
  },
@@ -17043,7 +17600,7 @@ var DynamicList = ({ model: modelProp, allModels, filter, relationConfig, isEmbe
17043
17600
  antd.Card,
17044
17601
  {
17045
17602
  size: "small",
17046
- title: /* @__PURE__ */ jsxRuntime.jsx("span", { style: { color: modelTone.text, fontWeight: 600 }, children: _32("Analyze") }),
17603
+ title: /* @__PURE__ */ jsxRuntime.jsx("span", { style: { color: modelTone.text, fontWeight: 600 }, children: _34("Analyze") }),
17047
17604
  styles: {
17048
17605
  header: {
17049
17606
  background: `linear-gradient(135deg, ${modelTone.solid}18 0%, ${modelTone.solid}0a 100%)`
@@ -17072,10 +17629,10 @@ var DynamicList = ({ model: modelProp, allModels, filter, relationConfig, isEmbe
17072
17629
  styles: { body: { display: "grid", gap: 16, position: "relative", paddingTop: 48 } },
17073
17630
  children: [
17074
17631
  /* @__PURE__ */ jsxRuntime.jsxs("div", { style: { position: "absolute", top: 0, right: 0, display: "flex", gap: 8 }, children: [
17075
- /* @__PURE__ */ jsxRuntime.jsx(antd.Tooltip, { title: _32("Save preferences"), children: /* @__PURE__ */ jsxRuntime.jsx(antd.Button, { size: "small", icon: /* @__PURE__ */ jsxRuntime.jsx(icons.SaveOutlined, {}), onClick: () => openSaveViewModalFor("analyze"), loading: isSavingAnalyzePrefs }) }),
17076
- /* @__PURE__ */ jsxRuntime.jsx(antd.Tooltip, { title: _32("Stats"), children: /* @__PURE__ */ jsxRuntime.jsx(antd.Button, { size: "small", icon: /* @__PURE__ */ jsxRuntime.jsx(icons.FileTextOutlined, {}), onClick: () => setIsStatsFlipped(true) }) }),
17077
- /* @__PURE__ */ jsxRuntime.jsx(antd.Tooltip, { title: _32("Export chart PDF"), children: /* @__PURE__ */ jsxRuntime.jsx(antd.Button, { size: "small", icon: /* @__PURE__ */ jsxRuntime.jsx(icons.FilePdfOutlined, {}), onClick: exportChartPdf }) }),
17078
- /* @__PURE__ */ jsxRuntime.jsx(antd.Tooltip, { title: _32("Export chart PNG"), children: /* @__PURE__ */ jsxRuntime.jsx(antd.Button, { size: "small", icon: /* @__PURE__ */ jsxRuntime.jsx(icons.DownloadOutlined, {}), onClick: exportChartImage, "aria-label": _32("Export chart") }) })
17632
+ /* @__PURE__ */ jsxRuntime.jsx(antd.Tooltip, { title: _34("Save preferences"), children: /* @__PURE__ */ jsxRuntime.jsx(antd.Button, { size: "small", icon: /* @__PURE__ */ jsxRuntime.jsx(icons.SaveOutlined, {}), onClick: () => openSaveViewModalFor("analyze"), loading: isSavingAnalyzePrefs }) }),
17633
+ /* @__PURE__ */ jsxRuntime.jsx(antd.Tooltip, { title: _34("Stats"), children: /* @__PURE__ */ jsxRuntime.jsx(antd.Button, { size: "small", icon: /* @__PURE__ */ jsxRuntime.jsx(icons.FileTextOutlined, {}), onClick: () => setIsStatsFlipped(true) }) }),
17634
+ /* @__PURE__ */ jsxRuntime.jsx(antd.Tooltip, { title: _34("Export chart PDF"), children: /* @__PURE__ */ jsxRuntime.jsx(antd.Button, { size: "small", icon: /* @__PURE__ */ jsxRuntime.jsx(icons.FilePdfOutlined, {}), onClick: exportChartPdf }) }),
17635
+ /* @__PURE__ */ jsxRuntime.jsx(antd.Tooltip, { title: _34("Export chart PNG"), children: /* @__PURE__ */ jsxRuntime.jsx(antd.Button, { size: "small", icon: /* @__PURE__ */ jsxRuntime.jsx(icons.DownloadOutlined, {}), onClick: exportChartImage, "aria-label": _34("Export chart") }) })
17079
17636
  ] }),
17080
17637
  /* @__PURE__ */ jsxRuntime.jsx(
17081
17638
  AnalysisChart,
@@ -17106,11 +17663,11 @@ var DynamicList = ({ model: modelProp, allModels, filter, relationConfig, isEmbe
17106
17663
  items: [
17107
17664
  {
17108
17665
  key: "configure-chart",
17109
- label: _32("Customize chart"),
17666
+ label: _34("Customize chart"),
17110
17667
  children: /* @__PURE__ */ jsxRuntime.jsxs("div", { style: { display: "grid", gap: 16 }, children: [
17111
17668
  /* @__PURE__ */ jsxRuntime.jsxs("div", { style: { display: "flex", gap: 16, flexWrap: "wrap" }, children: [
17112
17669
  /* @__PURE__ */ jsxRuntime.jsxs("div", { style: { minWidth: 220, flex: 1 }, children: [
17113
- /* @__PURE__ */ jsxRuntime.jsx("div", { style: { fontSize: 12, color: token.colorTextSecondary, marginBottom: 4 }, children: _32("Category 1") }),
17670
+ /* @__PURE__ */ jsxRuntime.jsx("div", { style: { fontSize: 12, color: token.colorTextSecondary, marginBottom: 4 }, children: _34("Category 1") }),
17114
17671
  /* @__PURE__ */ jsxRuntime.jsx(
17115
17672
  antd.Select,
17116
17673
  {
@@ -17121,12 +17678,12 @@ var DynamicList = ({ model: modelProp, allModels, filter, relationConfig, isEmbe
17121
17678
  },
17122
17679
  style: { width: "100%" },
17123
17680
  options: categoricalFields.map((field) => ({ label: field.label, value: field.key })),
17124
- placeholder: _32("Select category")
17681
+ placeholder: _34("Select category")
17125
17682
  }
17126
17683
  )
17127
17684
  ] }),
17128
17685
  /* @__PURE__ */ jsxRuntime.jsxs("div", { style: { minWidth: 220, flex: 1 }, children: [
17129
- /* @__PURE__ */ jsxRuntime.jsx("div", { style: { fontSize: 12, color: token.colorTextSecondary, marginBottom: 4 }, children: _32("Category 2") }),
17686
+ /* @__PURE__ */ jsxRuntime.jsx("div", { style: { fontSize: 12, color: token.colorTextSecondary, marginBottom: 4 }, children: _34("Category 2") }),
17130
17687
  /* @__PURE__ */ jsxRuntime.jsx(
17131
17688
  antd.Select,
17132
17689
  {
@@ -17137,14 +17694,14 @@ var DynamicList = ({ model: modelProp, allModels, filter, relationConfig, isEmbe
17137
17694
  },
17138
17695
  style: { width: "100%" },
17139
17696
  options: [
17140
- { label: _32("None"), value: "__none__" },
17697
+ { label: _34("None"), value: "__none__" },
17141
17698
  ...categoricalFields.filter((field) => field.key !== categoryField1).map((field) => ({ label: field.label, value: field.key }))
17142
17699
  ]
17143
17700
  }
17144
17701
  )
17145
17702
  ] }),
17146
17703
  /* @__PURE__ */ jsxRuntime.jsxs("div", { style: { minWidth: 160 }, children: [
17147
- /* @__PURE__ */ jsxRuntime.jsx("div", { style: { fontSize: 12, color: token.colorTextSecondary, marginBottom: 4 }, children: _32("Chart Type") }),
17704
+ /* @__PURE__ */ jsxRuntime.jsx("div", { style: { fontSize: 12, color: token.colorTextSecondary, marginBottom: 4 }, children: _34("Chart Type") }),
17148
17705
  /* @__PURE__ */ jsxRuntime.jsx(
17149
17706
  antd.Select,
17150
17707
  {
@@ -17155,30 +17712,30 @@ var DynamicList = ({ model: modelProp, allModels, filter, relationConfig, isEmbe
17155
17712
  },
17156
17713
  style: { width: "100%" },
17157
17714
  options: [
17158
- { label: _32("Area"), value: "area" },
17159
- { label: _32("Horizontal Area"), value: "area-horizontal" },
17160
- { label: _32("Bars"), value: "bar" },
17161
- { label: _32("Stacked Bars"), value: "stacked" },
17162
- { label: _32("Horizontal Bars"), value: "bar-horizontal" },
17163
- { label: _32("Horizontal Stacked"), value: "stacked-horizontal" },
17164
- { label: _32("Lines"), value: "line" },
17165
- { label: _32("Pie"), value: "pie" },
17166
- { label: _32("Donut"), value: "donut" },
17167
- { label: _32("Scatter"), value: "scatter" },
17168
- { label: _32("Bubble"), value: "bubble" },
17169
- { label: _32("Histogram"), value: "histogram" },
17170
- { label: _32("Box Plot"), value: "box" },
17171
- { label: _32("Waterfall"), value: "waterfall" },
17172
- { label: _32("Heatmap"), value: "heatmap" },
17173
- { label: _32("Crosstab"), value: "crosstab" },
17174
- { label: _32("Radar"), value: "radar" },
17175
- { label: _32("Combo (Bar + Line)"), value: "combo" }
17715
+ { label: _34("Area"), value: "area" },
17716
+ { label: _34("Horizontal Area"), value: "area-horizontal" },
17717
+ { label: _34("Bars"), value: "bar" },
17718
+ { label: _34("Stacked Bars"), value: "stacked" },
17719
+ { label: _34("Horizontal Bars"), value: "bar-horizontal" },
17720
+ { label: _34("Horizontal Stacked"), value: "stacked-horizontal" },
17721
+ { label: _34("Lines"), value: "line" },
17722
+ { label: _34("Pie"), value: "pie" },
17723
+ { label: _34("Donut"), value: "donut" },
17724
+ { label: _34("Scatter"), value: "scatter" },
17725
+ { label: _34("Bubble"), value: "bubble" },
17726
+ { label: _34("Histogram"), value: "histogram" },
17727
+ { label: _34("Box Plot"), value: "box" },
17728
+ { label: _34("Waterfall"), value: "waterfall" },
17729
+ { label: _34("Heatmap"), value: "heatmap" },
17730
+ { label: _34("Crosstab"), value: "crosstab" },
17731
+ { label: _34("Radar"), value: "radar" },
17732
+ { label: _34("Combo (Bar + Line)"), value: "combo" }
17176
17733
  ]
17177
17734
  }
17178
17735
  )
17179
17736
  ] }),
17180
17737
  /* @__PURE__ */ jsxRuntime.jsxs("div", { style: { minWidth: 200 }, children: [
17181
- /* @__PURE__ */ jsxRuntime.jsx("div", { style: { fontSize: 12, color: token.colorTextSecondary, marginBottom: 4 }, children: _32("Summary") }),
17738
+ /* @__PURE__ */ jsxRuntime.jsx("div", { style: { fontSize: 12, color: token.colorTextSecondary, marginBottom: 4 }, children: _34("Summary") }),
17182
17739
  /* @__PURE__ */ jsxRuntime.jsx(
17183
17740
  antd.Select,
17184
17741
  {
@@ -17189,18 +17746,18 @@ var DynamicList = ({ model: modelProp, allModels, filter, relationConfig, isEmbe
17189
17746
  },
17190
17747
  style: { width: "100%" },
17191
17748
  options: [
17192
- { label: _32("Sum"), value: "sum" },
17193
- { label: _32("Average"), value: "avg" },
17194
- { label: _32("Count"), value: "count" },
17195
- { label: _32("Max"), value: "max" },
17196
- { label: _32("Min"), value: "min" },
17197
- { label: _32("Std Dev"), value: "stddev" }
17749
+ { label: _34("Sum"), value: "sum" },
17750
+ { label: _34("Average"), value: "avg" },
17751
+ { label: _34("Count"), value: "count" },
17752
+ { label: _34("Max"), value: "max" },
17753
+ { label: _34("Min"), value: "min" },
17754
+ { label: _34("Std Dev"), value: "stddev" }
17198
17755
  ]
17199
17756
  }
17200
17757
  )
17201
17758
  ] }),
17202
17759
  /* @__PURE__ */ jsxRuntime.jsxs("div", { style: { minWidth: 180 }, children: [
17203
- /* @__PURE__ */ jsxRuntime.jsx("div", { style: { fontSize: 12, color: token.colorTextSecondary, marginBottom: 4 }, children: _32("Ranking Filter") }),
17760
+ /* @__PURE__ */ jsxRuntime.jsx("div", { style: { fontSize: 12, color: token.colorTextSecondary, marginBottom: 4 }, children: _34("Ranking Filter") }),
17204
17761
  /* @__PURE__ */ jsxRuntime.jsx(
17205
17762
  antd.Select,
17206
17763
  {
@@ -17211,15 +17768,15 @@ var DynamicList = ({ model: modelProp, allModels, filter, relationConfig, isEmbe
17211
17768
  },
17212
17769
  style: { width: "100%" },
17213
17770
  options: [
17214
- { label: _32("None"), value: "none" },
17215
- { label: _32("Top N"), value: "top" },
17216
- { label: _32("Bottom N"), value: "bottom" }
17771
+ { label: _34("None"), value: "none" },
17772
+ { label: _34("Top N"), value: "top" },
17773
+ { label: _34("Bottom N"), value: "bottom" }
17217
17774
  ]
17218
17775
  }
17219
17776
  )
17220
17777
  ] }),
17221
17778
  /* @__PURE__ */ jsxRuntime.jsxs("div", { style: { minWidth: 220 }, children: [
17222
- /* @__PURE__ */ jsxRuntime.jsx("div", { style: { fontSize: 12, color: token.colorTextSecondary, marginBottom: 4 }, children: _32("Ranking Column") }),
17779
+ /* @__PURE__ */ jsxRuntime.jsx("div", { style: { fontSize: 12, color: token.colorTextSecondary, marginBottom: 4 }, children: _34("Ranking Column") }),
17223
17780
  /* @__PURE__ */ jsxRuntime.jsx(
17224
17781
  antd.Select,
17225
17782
  {
@@ -17230,13 +17787,13 @@ var DynamicList = ({ model: modelProp, allModels, filter, relationConfig, isEmbe
17230
17787
  },
17231
17788
  style: { width: "100%" },
17232
17789
  options: numericFields.map((field) => ({ label: field.label, value: field.key })),
17233
- placeholder: _32("Select numeric column"),
17790
+ placeholder: _34("Select numeric column"),
17234
17791
  disabled: rankingMode === "none" || numericFields.length === 0
17235
17792
  }
17236
17793
  )
17237
17794
  ] }),
17238
17795
  /* @__PURE__ */ jsxRuntime.jsxs("div", { style: { minWidth: 120 }, children: [
17239
- /* @__PURE__ */ jsxRuntime.jsx("div", { style: { fontSize: 12, color: token.colorTextSecondary, marginBottom: 4 }, children: _32("N") }),
17796
+ /* @__PURE__ */ jsxRuntime.jsx("div", { style: { fontSize: 12, color: token.colorTextSecondary, marginBottom: 4 }, children: _34("N") }),
17240
17797
  /* @__PURE__ */ jsxRuntime.jsx(
17241
17798
  antd.InputNumber,
17242
17799
  {
@@ -17255,8 +17812,8 @@ var DynamicList = ({ model: modelProp, allModels, filter, relationConfig, isEmbe
17255
17812
  ] }),
17256
17813
  /* @__PURE__ */ jsxRuntime.jsxs("div", { children: [
17257
17814
  /* @__PURE__ */ jsxRuntime.jsxs("div", { style: { display: "flex", alignItems: "center", justifyContent: "space-between", gap: 12, marginBottom: 6 }, children: [
17258
- /* @__PURE__ */ jsxRuntime.jsx("div", { style: { fontSize: 12, color: token.colorTextSecondary }, children: _32("Series") }),
17259
- /* @__PURE__ */ jsxRuntime.jsx(antd.Tooltip, { title: _32("Unselect All"), children: /* @__PURE__ */ jsxRuntime.jsx(
17815
+ /* @__PURE__ */ jsxRuntime.jsx("div", { style: { fontSize: 12, color: token.colorTextSecondary }, children: _34("Series") }),
17816
+ /* @__PURE__ */ jsxRuntime.jsx(antd.Tooltip, { title: _34("Unselect All"), children: /* @__PURE__ */ jsxRuntime.jsx(
17260
17817
  antd.Button,
17261
17818
  {
17262
17819
  size: "small",
@@ -17276,11 +17833,11 @@ var DynamicList = ({ model: modelProp, allModels, filter, relationConfig, isEmbe
17276
17833
  markAnalyzePrefsTouched();
17277
17834
  setSelectedSeriesKeys(values);
17278
17835
  },
17279
- options: numericFields.length > 0 ? numericFields.map((field) => ({ label: field.label, value: field.key })) : [{ label: _32("Count"), value: "__count__" }]
17836
+ options: numericFields.length > 0 ? numericFields.map((field) => ({ label: field.label, value: field.key })) : [{ label: _34("Count"), value: "__count__" }]
17280
17837
  }
17281
17838
  )
17282
17839
  ] }),
17283
- isAllRowsLoading && /* @__PURE__ */ jsxRuntime.jsx("div", { style: { color: token.colorTextSecondary, fontSize: 12 }, children: _32("Loading all rows for analysis...") }),
17840
+ isAllRowsLoading && /* @__PURE__ */ jsxRuntime.jsx("div", { style: { color: token.colorTextSecondary, fontSize: 12 }, children: _34("Loading all rows for analysis...") }),
17284
17841
  allRowsError && /* @__PURE__ */ jsxRuntime.jsx("div", { style: { color: token.colorError, fontSize: 12 }, children: allRowsError })
17285
17842
  ] })
17286
17843
  }
@@ -17303,11 +17860,11 @@ var DynamicList = ({ model: modelProp, allModels, filter, relationConfig, isEmbe
17303
17860
  styles: { body: { display: "grid", gap: 16, position: "relative", paddingTop: 48 } },
17304
17861
  children: [
17305
17862
  /* @__PURE__ */ jsxRuntime.jsxs("div", { style: { position: "absolute", top: 0, right: 0, display: "flex", gap: 8 }, children: [
17306
- /* @__PURE__ */ jsxRuntime.jsx(antd.Tooltip, { title: _32("Analysis"), children: /* @__PURE__ */ jsxRuntime.jsx(antd.Button, { size: "small", icon: /* @__PURE__ */ jsxRuntime.jsx(icons.BarChartOutlined, {}), onClick: () => setIsStatsFlipped(false) }) }),
17307
- /* @__PURE__ */ jsxRuntime.jsx(antd.Tooltip, { title: _32("Export stats PDF"), children: /* @__PURE__ */ jsxRuntime.jsx(antd.Button, { size: "small", icon: /* @__PURE__ */ jsxRuntime.jsx(icons.FilePdfOutlined, {}), onClick: exportStatsPdf }) })
17863
+ /* @__PURE__ */ jsxRuntime.jsx(antd.Tooltip, { title: _34("Analysis"), children: /* @__PURE__ */ jsxRuntime.jsx(antd.Button, { size: "small", icon: /* @__PURE__ */ jsxRuntime.jsx(icons.BarChartOutlined, {}), onClick: () => setIsStatsFlipped(false) }) }),
17864
+ /* @__PURE__ */ jsxRuntime.jsx(antd.Tooltip, { title: _34("Export stats PDF"), children: /* @__PURE__ */ jsxRuntime.jsx(antd.Button, { size: "small", icon: /* @__PURE__ */ jsxRuntime.jsx(icons.FilePdfOutlined, {}), onClick: exportStatsPdf }) })
17308
17865
  ] }),
17309
17866
  /* @__PURE__ */ jsxRuntime.jsxs("div", { style: { display: "grid", gap: 16 }, children: [
17310
- statsSummary.numericStats.length > 0 && /* @__PURE__ */ jsxRuntime.jsx(antd.Card, { size: "small", title: /* @__PURE__ */ jsxRuntime.jsx("span", { style: statsTitleStyle, children: _32("Numeric columns") }), children: /* @__PURE__ */ jsxRuntime.jsxs(
17867
+ statsSummary.numericStats.length > 0 && /* @__PURE__ */ jsxRuntime.jsx(antd.Card, { size: "small", title: /* @__PURE__ */ jsxRuntime.jsx("span", { style: statsTitleStyle, children: _34("Numeric columns") }), children: /* @__PURE__ */ jsxRuntime.jsxs(
17311
17868
  antd.Table,
17312
17869
  {
17313
17870
  dataSource: statsSummary.numericStats,
@@ -17318,18 +17875,18 @@ var DynamicList = ({ model: modelProp, allModels, filter, relationConfig, isEmbe
17318
17875
  /* @__PURE__ */ jsxRuntime.jsx(
17319
17876
  antd.Table.Column,
17320
17877
  {
17321
- title: _32("Field"),
17878
+ title: _34("Field"),
17322
17879
  dataIndex: "label",
17323
17880
  render: (label) => /* @__PURE__ */ jsxRuntime.jsx("span", { style: statsLabelStyle, children: label }),
17324
17881
  onHeaderCell: () => ({ style: statsHeaderStyle })
17325
17882
  },
17326
17883
  "label"
17327
17884
  ),
17328
- /* @__PURE__ */ jsxRuntime.jsx(antd.Table.Column, { title: _32("Sum"), align: "right", render: (_unused, row) => renderStatBar(row.sum, statsNumericMaxes.sum, formatNumberValue), onHeaderCell: () => ({ style: statsHeaderStyle }) }, "sum"),
17329
- /* @__PURE__ */ jsxRuntime.jsx(antd.Table.Column, { title: _32("Average"), align: "right", render: (_unused, row) => renderStatBar(row.avg, statsNumericMaxes.avg, formatNumberValue), onHeaderCell: () => ({ style: statsHeaderStyle }) }, "avg"),
17330
- /* @__PURE__ */ jsxRuntime.jsx(antd.Table.Column, { title: _32("Min"), align: "right", render: (_unused, row) => renderStatBar(row.min, statsNumericMaxes.min, formatNumberValue), onHeaderCell: () => ({ style: statsHeaderStyle }) }, "min"),
17331
- /* @__PURE__ */ jsxRuntime.jsx(antd.Table.Column, { title: _32("Max"), align: "right", render: (_unused, row) => renderStatBar(row.max, statsNumericMaxes.max, formatNumberValue), onHeaderCell: () => ({ style: statsHeaderStyle }) }, "max"),
17332
- /* @__PURE__ */ jsxRuntime.jsx(antd.Table.Column, { title: _32("Std Dev"), align: "right", render: (_unused, row) => renderStatBar(row.stddev, statsNumericMaxes.stddev, formatNumberValue), onHeaderCell: () => ({ style: statsHeaderStyle }) }, "stddev")
17885
+ /* @__PURE__ */ jsxRuntime.jsx(antd.Table.Column, { title: _34("Sum"), align: "right", render: (_unused, row) => renderStatBar(row.sum, statsNumericMaxes.sum, formatNumberValue), onHeaderCell: () => ({ style: statsHeaderStyle }) }, "sum"),
17886
+ /* @__PURE__ */ jsxRuntime.jsx(antd.Table.Column, { title: _34("Average"), align: "right", render: (_unused, row) => renderStatBar(row.avg, statsNumericMaxes.avg, formatNumberValue), onHeaderCell: () => ({ style: statsHeaderStyle }) }, "avg"),
17887
+ /* @__PURE__ */ jsxRuntime.jsx(antd.Table.Column, { title: _34("Min"), align: "right", render: (_unused, row) => renderStatBar(row.min, statsNumericMaxes.min, formatNumberValue), onHeaderCell: () => ({ style: statsHeaderStyle }) }, "min"),
17888
+ /* @__PURE__ */ jsxRuntime.jsx(antd.Table.Column, { title: _34("Max"), align: "right", render: (_unused, row) => renderStatBar(row.max, statsNumericMaxes.max, formatNumberValue), onHeaderCell: () => ({ style: statsHeaderStyle }) }, "max"),
17889
+ /* @__PURE__ */ jsxRuntime.jsx(antd.Table.Column, { title: _34("Std Dev"), align: "right", render: (_unused, row) => renderStatBar(row.stddev, statsNumericMaxes.stddev, formatNumberValue), onHeaderCell: () => ({ style: statsHeaderStyle }) }, "stddev")
17333
17890
  ]
17334
17891
  }
17335
17892
  ) }),
@@ -17341,7 +17898,7 @@ var DynamicList = ({ model: modelProp, allModels, filter, relationConfig, isEmbe
17341
17898
  items: [
17342
17899
  {
17343
17900
  key: "categorical-columns",
17344
- label: /* @__PURE__ */ jsxRuntime.jsx("span", { style: statsTitleStyle, children: _32("Categorical columns (distinct < 20)") }),
17901
+ label: /* @__PURE__ */ jsxRuntime.jsx("span", { style: statsTitleStyle, children: _34("Categorical columns (distinct < 20)") }),
17345
17902
  children: statsSummary.categoricalStats.map((field) => /* @__PURE__ */ jsxRuntime.jsxs("div", { style: { marginBottom: 12 }, children: [
17346
17903
  /* @__PURE__ */ jsxRuntime.jsx("div", { style: { fontWeight: 600, marginBottom: 4 }, children: /* @__PURE__ */ jsxRuntime.jsx("span", { style: statsLabelStyle, children: field.label }) }),
17347
17904
  /* @__PURE__ */ jsxRuntime.jsxs(
@@ -17352,11 +17909,11 @@ var DynamicList = ({ model: modelProp, allModels, filter, relationConfig, isEmbe
17352
17909
  pagination: false,
17353
17910
  rowKey: (row) => row.value,
17354
17911
  children: [
17355
- /* @__PURE__ */ jsxRuntime.jsx(antd.Table.Column, { title: _32("Value"), dataIndex: "value", onHeaderCell: () => ({ style: statsHeaderStyle }) }, "value"),
17912
+ /* @__PURE__ */ jsxRuntime.jsx(antd.Table.Column, { title: _34("Value"), dataIndex: "value", onHeaderCell: () => ({ style: statsHeaderStyle }) }, "value"),
17356
17913
  /* @__PURE__ */ jsxRuntime.jsx(
17357
17914
  antd.Table.Column,
17358
17915
  {
17359
- title: _32("Count"),
17916
+ title: _34("Count"),
17360
17917
  dataIndex: "count",
17361
17918
  align: "right",
17362
17919
  onHeaderCell: () => ({ style: statsHeaderStyle }),
@@ -17397,7 +17954,7 @@ var DynamicList = ({ model: modelProp, allModels, filter, relationConfig, isEmbe
17397
17954
  columnsToggleButton,
17398
17955
  listToggleButton,
17399
17956
  exportButton,
17400
- renderIconOnlyButtons(defaultButtons)
17957
+ !model.isNamedQuery && renderIconOnlyButtons(defaultButtons)
17401
17958
  ] });
17402
17959
  return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "jm-tone-scope", style: toneScopeStyle(modelTone), children: [
17403
17960
  /* @__PURE__ */ jsxRuntime.jsx(ToneSharedStyles, {}),
@@ -17439,7 +17996,7 @@ function applyPanesToSearchParams(existing, panes) {
17439
17996
  panes.forEach((p) => next.append("pane", `${p.resource}:${p.id}`));
17440
17997
  return next;
17441
17998
  }
17442
- var _33 = window._ || ((text) => text);
17999
+ var _35 = window._ || ((text) => text);
17443
18000
  var LIST_PANEL_ID = "list-panel";
17444
18001
  var detailPanelId = (idx) => `detail-panel-${idx}`;
17445
18002
  var COLLAPSED_SIZE = 10;
@@ -17481,7 +18038,7 @@ var PaneToolbar = ({ model, pane, allModels, onClose, onMinimize, onMaximize })
17481
18038
  minHeight: PANE_TOOLBAR_HEIGHT
17482
18039
  },
17483
18040
  children: [
17484
- /* @__PURE__ */ jsxRuntime.jsx(antd.Tooltip, { title: _33("Open in full page"), children: /* @__PURE__ */ jsxRuntime.jsx(
18041
+ /* @__PURE__ */ jsxRuntime.jsx(antd.Tooltip, { title: _35("Open in full page"), children: /* @__PURE__ */ jsxRuntime.jsx(
17485
18042
  "a",
17486
18043
  {
17487
18044
  href,
@@ -17491,7 +18048,7 @@ var PaneToolbar = ({ model, pane, allModels, onClose, onMinimize, onMaximize })
17491
18048
  children: /* @__PURE__ */ jsxRuntime.jsx(icons.LinkOutlined, { style: { fontSize: 11 } })
17492
18049
  }
17493
18050
  ) }),
17494
- /* @__PURE__ */ jsxRuntime.jsx(antd.Tooltip, { title: _33("Minimize pane"), children: /* @__PURE__ */ jsxRuntime.jsx(
18051
+ /* @__PURE__ */ jsxRuntime.jsx(antd.Tooltip, { title: _35("Minimize pane"), children: /* @__PURE__ */ jsxRuntime.jsx(
17495
18052
  antd.Button,
17496
18053
  {
17497
18054
  type: "text",
@@ -17501,7 +18058,7 @@ var PaneToolbar = ({ model, pane, allModels, onClose, onMinimize, onMaximize })
17501
18058
  style: { color: token.colorTextTertiary, padding: "0 4px", height: 22, minWidth: 22 }
17502
18059
  }
17503
18060
  ) }),
17504
- /* @__PURE__ */ jsxRuntime.jsx(antd.Tooltip, { title: _33("Maximize pane"), children: /* @__PURE__ */ jsxRuntime.jsx(
18061
+ /* @__PURE__ */ jsxRuntime.jsx(antd.Tooltip, { title: _35("Maximize pane"), children: /* @__PURE__ */ jsxRuntime.jsx(
17505
18062
  antd.Button,
17506
18063
  {
17507
18064
  type: "text",
@@ -17511,7 +18068,7 @@ var PaneToolbar = ({ model, pane, allModels, onClose, onMinimize, onMaximize })
17511
18068
  style: { color: token.colorTextTertiary, padding: "0 4px", height: 22, minWidth: 22 }
17512
18069
  }
17513
18070
  ) }),
17514
- /* @__PURE__ */ jsxRuntime.jsx(antd.Tooltip, { title: _33("Close pane"), children: /* @__PURE__ */ jsxRuntime.jsx(
18071
+ /* @__PURE__ */ jsxRuntime.jsx(antd.Tooltip, { title: _35("Close pane"), children: /* @__PURE__ */ jsxRuntime.jsx(
17515
18072
  antd.Button,
17516
18073
  {
17517
18074
  type: "text",
@@ -17676,7 +18233,7 @@ var MultiPaneLayout = ({ children }) => {
17676
18233
  [openDetail]
17677
18234
  );
17678
18235
  const detailPaneContexts = React6.useMemo(
17679
- () => panes.map((_39, idx) => ({
18236
+ () => panes.map((_41, idx) => ({
17680
18237
  isInMultiPane: true,
17681
18238
  paneIndex: idx + 1,
17682
18239
  openDetail: (resource, id) => openDetail(idx + 1, resource, id)
@@ -17737,7 +18294,7 @@ var MultiPaneLayout = ({ children }) => {
17737
18294
  ) });
17738
18295
  };
17739
18296
  var { Title: Title8 } = antd.Typography;
17740
- var _34 = window._ || ((text) => text);
18297
+ var _36 = window._ || ((text) => text);
17741
18298
  var HierarchyView = ({ resource, recordId, fallback }) => {
17742
18299
  const go = core.useGo();
17743
18300
  const { data: ancestorsData, isLoading: ancestorsLoading, error: ancestorsError } = core.useCustom({
@@ -17790,15 +18347,15 @@ var HierarchyView = ({ resource, recordId, fallback }) => {
17790
18347
  }
17791
18348
  if (ancestorsError || descendantsError) {
17792
18349
  if (fallback) return /* @__PURE__ */ jsxRuntime.jsx(jsxRuntime.Fragment, { children: fallback });
17793
- return /* @__PURE__ */ jsxRuntime.jsx(antd.Alert, { message: _34("Error loading hierarchy data"), type: "error" });
18350
+ return /* @__PURE__ */ jsxRuntime.jsx(antd.Alert, { message: _36("Error loading hierarchy data"), type: "error" });
17794
18351
  }
17795
18352
  return /* @__PURE__ */ jsxRuntime.jsxs("div", { children: [
17796
18353
  ancestorsList.length > 0 && /* @__PURE__ */ jsxRuntime.jsxs("div", { style: { marginBottom: 24 }, children: [
17797
- /* @__PURE__ */ jsxRuntime.jsx(Title8, { level: 5, children: _34("Parent Hierarchy") }),
18354
+ /* @__PURE__ */ jsxRuntime.jsx(Title8, { level: 5, children: _36("Parent Hierarchy") }),
17798
18355
  /* @__PURE__ */ jsxRuntime.jsx(antd.Breadcrumb, { children: ancestorsList.slice().reverse().map((node) => /* @__PURE__ */ jsxRuntime.jsx(antd.Breadcrumb.Item, { children: /* @__PURE__ */ jsxRuntime.jsx("a", { onClick: () => go({ to: { resource, action: "show", id: node.cw_eid } }), children: node._label }) }, node.cw_eid)) })
17799
18356
  ] }),
17800
18357
  treeData.length > 0 && /* @__PURE__ */ jsxRuntime.jsxs("div", { children: [
17801
- /* @__PURE__ */ jsxRuntime.jsx(Title8, { level: 5, children: _34("Sub-hierarchy") }),
18358
+ /* @__PURE__ */ jsxRuntime.jsx(Title8, { level: 5, children: _36("Sub-hierarchy") }),
17802
18359
  /* @__PURE__ */ jsxRuntime.jsx(
17803
18360
  antd.Tree,
17804
18361
  {
@@ -17870,7 +18427,7 @@ var TOKEN_KEY2 = "jm_access_token";
17870
18427
  var USER_KEY2 = "jm_user";
17871
18428
  var ROLE_PERMISSIONS_KEY = "jm_role_permissions";
17872
18429
  var RESOURCE_PERMISSIONS_KEY = "jm_resource_permissions";
17873
- var _35 = window._ || ((text) => text);
18430
+ var _37 = window._ || ((text) => text);
17874
18431
  var authProvider = {
17875
18432
  /**
17876
18433
  * Authenticate by username + password.
@@ -17888,8 +18445,8 @@ var authProvider = {
17888
18445
  return {
17889
18446
  success: false,
17890
18447
  error: {
17891
- name: _35("Login failed"),
17892
- message: body?.detail || _35("Invalid credentials")
18448
+ name: _37("Login failed"),
18449
+ message: body?.detail || _37("Invalid credentials")
17893
18450
  }
17894
18451
  };
17895
18452
  }
@@ -17921,8 +18478,8 @@ var authProvider = {
17921
18478
  return {
17922
18479
  success: false,
17923
18480
  error: {
17924
- name: _35("Login failed"),
17925
- message: err?.message || _35("Network error")
18481
+ name: _37("Login failed"),
18482
+ message: err?.message || _37("Network error")
17926
18483
  }
17927
18484
  };
17928
18485
  }
@@ -18003,7 +18560,7 @@ var authProvider = {
18003
18560
  var USER_KEY3 = "jm_user";
18004
18561
  var ROLE_PERMISSIONS_KEY2 = "jm_role_permissions";
18005
18562
  var RESOURCE_PERMISSIONS_KEY2 = "jm_resource_permissions";
18006
- var _36 = window._ || ((text) => text);
18563
+ var _38 = window._ || ((text) => text);
18007
18564
  var FALLBACK_ROLE_ACTIONS = {
18008
18565
  Admin: ["list", "show", "create", "edit", "delete", "clone", "field"],
18009
18566
  Manager: ["list", "show", "create", "edit", "clone", "field"],
@@ -18035,13 +18592,13 @@ var accessControlProvider = {
18035
18592
  can: async ({ action, resource }) => {
18036
18593
  const cached = localStorage.getItem(USER_KEY3);
18037
18594
  if (!cached) {
18038
- return { can: false, reason: _36("Not authenticated") };
18595
+ return { can: false, reason: _38("Not authenticated") };
18039
18596
  }
18040
18597
  let user;
18041
18598
  try {
18042
18599
  user = JSON.parse(cached);
18043
18600
  } catch {
18044
- return { can: false, reason: _36("Not authenticated") };
18601
+ return { can: false, reason: _38("Not authenticated") };
18045
18602
  }
18046
18603
  const roles = user?.roles ?? [];
18047
18604
  if (roles.some((r) => r.toLowerCase() === "admin")) {
@@ -18067,7 +18624,7 @@ var accessControlProvider = {
18067
18624
  }
18068
18625
  return {
18069
18626
  can: false,
18070
- reason: _36("Access denied \u2014 insufficient role for this action")
18627
+ reason: _38("Access denied \u2014 insufficient role for this action")
18071
18628
  };
18072
18629
  },
18073
18630
  options: {
@@ -18155,7 +18712,7 @@ var ResourceContext = React6.createContext({
18155
18712
  allResources: [],
18156
18713
  allSystemModels: []
18157
18714
  });
18158
- var _37 = window._ || ((text) => text);
18715
+ var _39 = window._ || ((text) => text);
18159
18716
  var LoginPage = ({ appTitle = "VeloIQ", logo }) => {
18160
18717
  const { mutate: login, isLoading, error } = core.useLogin();
18161
18718
  const [form] = antd.Form.useForm();
@@ -18184,14 +18741,14 @@ var LoginPage = ({ appTitle = "VeloIQ", logo }) => {
18184
18741
  /* @__PURE__ */ jsxRuntime.jsxs("div", { style: { textAlign: "center" }, children: [
18185
18742
  logo && /* @__PURE__ */ jsxRuntime.jsx("div", { style: { marginBottom: 8 }, children: typeof logo === "string" ? /* @__PURE__ */ jsxRuntime.jsx("img", { src: logo, alt: appTitle, style: { height: 48, width: "auto" } }) : logo }),
18186
18743
  /* @__PURE__ */ jsxRuntime.jsx(antd.Typography.Title, { level: 3, style: { marginBottom: 4 }, children: appTitle }),
18187
- /* @__PURE__ */ jsxRuntime.jsx(antd.Typography.Text, { type: "secondary", children: _37("Sign in to your account") })
18744
+ /* @__PURE__ */ jsxRuntime.jsx(antd.Typography.Text, { type: "secondary", children: _39("Sign in to your account") })
18188
18745
  ] }),
18189
18746
  error && /* @__PURE__ */ jsxRuntime.jsx(
18190
18747
  antd.Alert,
18191
18748
  {
18192
18749
  type: "error",
18193
- message: error?.name || _37("Login failed"),
18194
- description: error?.message || _37("Invalid credentials"),
18750
+ message: error?.name || _39("Login failed"),
18751
+ description: error?.message || _39("Invalid credentials"),
18195
18752
  showIcon: true
18196
18753
  }
18197
18754
  ),
@@ -18207,13 +18764,13 @@ var LoginPage = ({ appTitle = "VeloIQ", logo }) => {
18207
18764
  antd.Form.Item,
18208
18765
  {
18209
18766
  name: "username",
18210
- label: _37("Username"),
18211
- rules: [{ required: true, message: _37("Please enter your username") }],
18767
+ label: _39("Username"),
18768
+ rules: [{ required: true, message: _39("Please enter your username") }],
18212
18769
  children: /* @__PURE__ */ jsxRuntime.jsx(
18213
18770
  antd.Input,
18214
18771
  {
18215
18772
  prefix: /* @__PURE__ */ jsxRuntime.jsx(icons.UserOutlined, {}),
18216
- placeholder: _37("Username"),
18773
+ placeholder: _39("Username"),
18217
18774
  size: "large"
18218
18775
  }
18219
18776
  )
@@ -18223,13 +18780,13 @@ var LoginPage = ({ appTitle = "VeloIQ", logo }) => {
18223
18780
  antd.Form.Item,
18224
18781
  {
18225
18782
  name: "password",
18226
- label: _37("Password"),
18227
- rules: [{ required: true, message: _37("Please enter your password") }],
18783
+ label: _39("Password"),
18784
+ rules: [{ required: true, message: _39("Please enter your password") }],
18228
18785
  children: /* @__PURE__ */ jsxRuntime.jsx(
18229
18786
  antd.Input.Password,
18230
18787
  {
18231
18788
  prefix: /* @__PURE__ */ jsxRuntime.jsx(icons.LockOutlined, {}),
18232
- placeholder: _37("Password"),
18789
+ placeholder: _39("Password"),
18233
18790
  size: "large"
18234
18791
  }
18235
18792
  )
@@ -18243,7 +18800,7 @@ var LoginPage = ({ appTitle = "VeloIQ", logo }) => {
18243
18800
  loading: isLoading,
18244
18801
  block: true,
18245
18802
  size: "large",
18246
- children: _37("Login")
18803
+ children: _39("Login")
18247
18804
  }
18248
18805
  ) })
18249
18806
  ]
@@ -18382,6 +18939,7 @@ var CellConfigDrawer = ({ open, cell, tabId, config, onClose, onSave }) => {
18382
18939
  onSave({ ...config, tabs: nextTabs });
18383
18940
  onClose();
18384
18941
  };
18942
+ const tabOptions = config.tabs.map((t) => ({ value: t.name, label: t.name }));
18385
18943
  return /* @__PURE__ */ jsxRuntime.jsx(
18386
18944
  antd.Drawer,
18387
18945
  {
@@ -18396,7 +18954,14 @@ var CellConfigDrawer = ({ open, cell, tabId, config, onClose, onSave }) => {
18396
18954
  ] }),
18397
18955
  children: /* @__PURE__ */ jsxRuntime.jsxs(antd.Form, { form, layout: "vertical", size: "small", children: [
18398
18956
  /* @__PURE__ */ jsxRuntime.jsx(antd.Divider, { orientation: "left", children: "Tab" }),
18399
- /* @__PURE__ */ jsxRuntime.jsx(antd.Form.Item, { name: "tabName", label: "Tab name", children: /* @__PURE__ */ jsxRuntime.jsx(antd.Input, {}) }),
18957
+ /* @__PURE__ */ jsxRuntime.jsx(antd.Form.Item, { name: "tabName", label: "Tab name", children: /* @__PURE__ */ jsxRuntime.jsx(
18958
+ antd.AutoComplete,
18959
+ {
18960
+ options: tabOptions,
18961
+ filterOption: false,
18962
+ placeholder: "Select existing or type a new name"
18963
+ }
18964
+ ) }),
18400
18965
  /* @__PURE__ */ jsxRuntime.jsx(antd.Divider, { orientation: "left", children: "Position" }),
18401
18966
  /* @__PURE__ */ jsxRuntime.jsxs(antd.Space, { children: [
18402
18967
  /* @__PURE__ */ jsxRuntime.jsx(antd.Form.Item, { name: "row", label: "Row", style: { marginBottom: 0 }, children: /* @__PURE__ */ jsxRuntime.jsx(antd.InputNumber, { min: 1, style: { width: 80 } }) }),
@@ -18436,10 +19001,12 @@ var CellConfigDrawer = ({ open, cell, tabId, config, onClose, onSave }) => {
18436
19001
  }
18437
19002
  );
18438
19003
  };
18439
- var DashboardGridCell = ({ cell, allModels, isMaximized, isMinimized, onConfigure, onMaximize, onMinimize }) => {
19004
+ var DashboardGridCell = ({ cell, allModels, isMaximized, isMinimized, onConfigure, onMaximize, onMinimize, onResize }) => {
18440
19005
  const { token } = antd.theme.useToken();
18441
19006
  const model = findModelByName(allModels, cell.model);
19007
+ const cellRef = React6.useRef(null);
18442
19008
  const cellStyle = {
19009
+ position: "relative",
18443
19010
  border: `1px solid ${token.colorBorderSecondary}`,
18444
19011
  borderRadius: token.borderRadiusLG,
18445
19012
  overflow: "hidden",
@@ -18468,20 +19035,81 @@ var DashboardGridCell = ({ cell, allModels, isMaximized, isMinimized, onConfigur
18468
19035
  };
18469
19036
  const resource = model?.resource || cell.model;
18470
19037
  const cellTitle = model?.label || cell.model;
18471
- return /* @__PURE__ */ jsxRuntime.jsxs("div", { style: cellStyle, className: "jm-dashboard-cell", children: [
19038
+ const tone = model ? getModelTone(model) : null;
19039
+ const startResize = React6.useCallback((e, dir) => {
19040
+ e.preventDefault();
19041
+ e.stopPropagation();
19042
+ const el = cellRef.current;
19043
+ if (!el) return;
19044
+ const { width: startW, height: startH } = el.getBoundingClientRect();
19045
+ const startX = e.clientX;
19046
+ const startY = e.clientY;
19047
+ const handle = e.currentTarget;
19048
+ handle.setPointerCapture(e.pointerId);
19049
+ const prevCursor = document.body.style.cursor;
19050
+ document.body.style.cursor = dir === "s" ? "ns-resize" : dir === "e" ? "ew-resize" : "nwse-resize";
19051
+ const onMove = (ev) => {
19052
+ if (dir !== "e") el.style.minHeight = `${Math.max(200, Math.round(startH + ev.clientY - startY))}px`;
19053
+ if (dir !== "s") el.style.minWidth = `${Math.max(200, Math.round(startW + ev.clientX - startX))}px`;
19054
+ };
19055
+ const onUp = (ev) => {
19056
+ handle.removeEventListener("pointermove", onMove);
19057
+ handle.removeEventListener("pointerup", onUp);
19058
+ document.body.style.cursor = prevCursor;
19059
+ const newH = dir !== "e" ? `${Math.max(200, Math.round(startH + ev.clientY - startY))}px` : null;
19060
+ const newW = dir !== "s" ? `${Math.max(200, Math.round(startW + ev.clientX - startX))}px` : null;
19061
+ onResize(newW, newH);
19062
+ };
19063
+ handle.addEventListener("pointermove", onMove);
19064
+ handle.addEventListener("pointerup", onUp);
19065
+ }, [onResize]);
19066
+ const handleBase = {
19067
+ position: "absolute",
19068
+ zIndex: 10
19069
+ };
19070
+ return /* @__PURE__ */ jsxRuntime.jsxs("div", { ref: cellRef, style: cellStyle, className: "jm-dashboard-cell", children: [
18472
19071
  /* @__PURE__ */ jsxRuntime.jsx("style", { children: `
18473
- .jm-dashboard-cell .jm-cell-actions { opacity: 0; transition: opacity 0.15s; }
18474
- .jm-dashboard-cell:hover .jm-cell-actions { opacity: 1; }
19072
+ .jm-dashboard-cell .jm-cell-actions { opacity: 0; transition: opacity 0.15s; }
19073
+ .jm-dashboard-cell:hover .jm-cell-actions { opacity: 1; }
19074
+ .jm-dashboard-cell .jm-resize-handle { opacity: 0; transition: opacity 0.15s; background: transparent; }
19075
+ .jm-dashboard-cell:hover .jm-resize-handle { opacity: 1; }
19076
+ .jm-resize-handle:hover { background: rgba(128,128,128,0.25) !important; }
19077
+ .jm-resize-handle:active { background: rgba(128,128,128,0.45) !important; }
18475
19078
  ` }),
19079
+ /* @__PURE__ */ jsxRuntime.jsx(
19080
+ "div",
19081
+ {
19082
+ className: "jm-resize-handle",
19083
+ style: { ...handleBase, bottom: 0, left: 12, right: 12, height: 6, cursor: "ns-resize" },
19084
+ onPointerDown: (e) => startResize(e, "s")
19085
+ }
19086
+ ),
19087
+ /* @__PURE__ */ jsxRuntime.jsx(
19088
+ "div",
19089
+ {
19090
+ className: "jm-resize-handle",
19091
+ style: { ...handleBase, top: 12, right: 0, bottom: 12, width: 6, cursor: "ew-resize" },
19092
+ onPointerDown: (e) => startResize(e, "e")
19093
+ }
19094
+ ),
19095
+ /* @__PURE__ */ jsxRuntime.jsx(
19096
+ "div",
19097
+ {
19098
+ className: "jm-resize-handle",
19099
+ style: { ...handleBase, bottom: 0, right: 0, width: 12, height: 12, cursor: "nwse-resize", borderRadius: `0 0 ${token.borderRadiusLG}px 0` },
19100
+ onPointerDown: (e) => startResize(e, "se")
19101
+ }
19102
+ ),
18476
19103
  /* @__PURE__ */ jsxRuntime.jsxs("div", { style: toolbarStyle, children: [
18477
19104
  /* @__PURE__ */ jsxRuntime.jsx("span", { style: {
18478
- fontSize: token.fontSizeSM,
18479
- fontWeight: token.fontWeightStrong,
18480
- color: token.colorText,
19105
+ fontSize: 14,
19106
+ fontWeight: 700,
19107
+ color: tone ? tone.solid : token.colorText,
18481
19108
  paddingLeft: 4,
18482
19109
  overflow: "hidden",
18483
19110
  textOverflow: "ellipsis",
18484
- whiteSpace: "nowrap"
19111
+ whiteSpace: "nowrap",
19112
+ letterSpacing: "-0.01em"
18485
19113
  }, children: cellTitle }),
18486
19114
  /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "jm-cell-actions", style: { display: "flex", alignItems: "center", gap: 2 }, children: [
18487
19115
  /* @__PURE__ */ jsxRuntime.jsx(antd.Tooltip, { title: "Configure cell", children: /* @__PURE__ */ jsxRuntime.jsx(
@@ -18524,9 +19152,10 @@ var DashboardGridCell = ({ cell, allModels, isMaximized, isMinimized, onConfigur
18524
19152
  allModels,
18525
19153
  isEmbedded: true,
18526
19154
  preferencesResourceOverride: `dashboard:${resource}`,
18527
- defaultListVisible: false,
19155
+ defaultListVisible: Boolean(cell.view_type),
18528
19156
  listViewType: cell.view_type ? cell.view_type : model.listViewType
18529
- }
19157
+ },
19158
+ `${resource}-${cell.view_type ?? ""}`
18530
19159
  ) : /* @__PURE__ */ jsxRuntime.jsx(
18531
19160
  antd.Empty,
18532
19161
  {
@@ -18537,7 +19166,7 @@ var DashboardGridCell = ({ cell, allModels, isMaximized, isMinimized, onConfigur
18537
19166
  ) })
18538
19167
  ] });
18539
19168
  };
18540
- var DashboardTabContent = ({ tab, allModels, maximizedCellId, minimizedCellIds, onMaximize, onMinimize, onConfigure }) => {
19169
+ var DashboardTabContent = ({ tab, allModels, maximizedCellId, minimizedCellIds, onMaximize, onMinimize, onConfigure, onResize }) => {
18541
19170
  const cells = tab.cells;
18542
19171
  const numCols = React6.useMemo(() => {
18543
19172
  if (!cells.length) return 2;
@@ -18576,7 +19205,8 @@ var DashboardTabContent = ({ tab, allModels, maximizedCellId, minimizedCellIds,
18576
19205
  isMinimized: minimizedCellIds.has(cell.id),
18577
19206
  onConfigure: () => onConfigure(cell),
18578
19207
  onMaximize: () => onMaximize(cell.id),
18579
- onMinimize: () => onMinimize(cell.id)
19208
+ onMinimize: () => onMinimize(cell.id),
19209
+ onResize: (w, h) => onResize(cell.id, w, h)
18580
19210
  }
18581
19211
  )
18582
19212
  },
@@ -18608,6 +19238,23 @@ var ViewsGrid = ({ config, allModels, onConfigChange }) => {
18608
19238
  onConfigChange(nextConfig);
18609
19239
  setDrawerSelection(null);
18610
19240
  }, [onConfigChange]);
19241
+ const handleResizeCell = React6.useCallback((tabId, cellId, minWidth, minHeight) => {
19242
+ const nextTabs = config.tabs.map((tab) => {
19243
+ if (tab.id !== tabId) return tab;
19244
+ return {
19245
+ ...tab,
19246
+ cells: tab.cells.map((c) => {
19247
+ if (c.id !== cellId) return c;
19248
+ return {
19249
+ ...c,
19250
+ ...minWidth !== null ? { min_width: minWidth } : {},
19251
+ ...minHeight !== null ? { min_height: minHeight } : {}
19252
+ };
19253
+ })
19254
+ };
19255
+ });
19256
+ onConfigChange({ ...config, tabs: nextTabs });
19257
+ }, [config, onConfigChange]);
18611
19258
  const tabItems = React6.useMemo(
18612
19259
  () => config.tabs.map((tab) => ({
18613
19260
  key: tab.id,
@@ -18621,11 +19268,12 @@ var ViewsGrid = ({ config, allModels, onConfigChange }) => {
18621
19268
  minimizedCellIds,
18622
19269
  onMaximize: handleMaximize,
18623
19270
  onMinimize: handleMinimize,
18624
- onConfigure: (cell) => handleOpenDrawer(tab.id, cell)
19271
+ onConfigure: (cell) => handleOpenDrawer(tab.id, cell),
19272
+ onResize: (cellId, w, h) => handleResizeCell(tab.id, cellId, w, h)
18625
19273
  }
18626
19274
  )
18627
19275
  })),
18628
- [config.tabs, allModels, maximizedCellId, minimizedCellIds, handleMaximize, handleMinimize, handleOpenDrawer]
19276
+ [config.tabs, allModels, maximizedCellId, minimizedCellIds, handleMaximize, handleMinimize, handleOpenDrawer, handleResizeCell]
18629
19277
  );
18630
19278
  if (!config.tabs.length) {
18631
19279
  return /* @__PURE__ */ jsxRuntime.jsx(antd.Empty, { description: "No tabs configured. Run veloiq add-dashboard to add models.", style: { padding: 48 } });
@@ -18664,7 +19312,7 @@ function parseInlineStyle3(cssText) {
18664
19312
  const prop = declaration.slice(0, idx).trim();
18665
19313
  const value = declaration.slice(idx + 1).trim();
18666
19314
  if (!prop || !value) return;
18667
- const camel = prop.replace(/-([a-z])/g, (_39, c) => c.toUpperCase());
19315
+ const camel = prop.replace(/-([a-z])/g, (_41, c) => c.toUpperCase());
18668
19316
  result[camel] = value;
18669
19317
  });
18670
19318
  return result;
@@ -18689,7 +19337,7 @@ function useRecentActivity(days) {
18689
19337
  return { data, loading, reload: load };
18690
19338
  }
18691
19339
  var { Text: Text2, Title: Title9 } = antd.Typography;
18692
- function relativeTime(iso) {
19340
+ function relativeTime2(iso) {
18693
19341
  if (!iso) return "";
18694
19342
  const diff = Date.now() - new Date(iso).getTime();
18695
19343
  const mins = Math.floor(diff / 6e4);
@@ -18798,7 +19446,7 @@ var RecentActivityPanel = () => {
18798
19446
  }
18799
19447
  ),
18800
19448
  isNew && /* @__PURE__ */ jsxRuntime.jsx(antd.Tag, { color: "green", style: { fontSize: 10, padding: "0 4px", lineHeight: "16px" }, children: "new" }),
18801
- /* @__PURE__ */ jsxRuntime.jsx(Text2, { type: "secondary", style: { fontSize: 11, flexShrink: 0 }, children: relativeTime(timestamp) })
19449
+ /* @__PURE__ */ jsxRuntime.jsx(Text2, { type: "secondary", style: { fontSize: 11, flexShrink: 0 }, children: relativeTime2(timestamp) })
18802
19450
  ] })
18803
19451
  ]
18804
19452
  }
@@ -18964,7 +19612,7 @@ var PinnedRecordsPanel = () => {
18964
19612
  ] });
18965
19613
  };
18966
19614
  var { Text: Text3 } = antd.Typography;
18967
- var _38 = window._ || ((text) => text);
19615
+ var _40 = window._ || ((text) => text);
18968
19616
  var DashboardPage = () => {
18969
19617
  const { token } = antd.theme.useToken();
18970
19618
  const allModels = useAllModels();
@@ -18993,7 +19641,7 @@ var DashboardPage = () => {
18993
19641
  const tabs = [
18994
19642
  {
18995
19643
  key: "models_grid",
18996
- label: _38("Models Grid"),
19644
+ label: _40("Models Grid"),
18997
19645
  children: /* @__PURE__ */ jsxRuntime.jsx("div", { style: { height: "calc(100vh - 140px)", overflow: "auto" }, children: /* @__PURE__ */ jsxRuntime.jsx(
18998
19646
  ViewsGrid,
18999
19647
  {
@@ -19005,12 +19653,12 @@ var DashboardPage = () => {
19005
19653
  },
19006
19654
  {
19007
19655
  key: "recent_activity",
19008
- label: _38("Recent Activity"),
19656
+ label: _40("Recent Activity"),
19009
19657
  children: /* @__PURE__ */ jsxRuntime.jsx("div", { style: { height: "calc(100vh - 140px)", overflow: "auto", padding: "0 12px" }, children: /* @__PURE__ */ jsxRuntime.jsx(RecentActivityPanel, {}) })
19010
19658
  },
19011
19659
  {
19012
19660
  key: "pinned_records",
19013
- label: _38("Pinned Records"),
19661
+ label: _40("Pinned Records"),
19014
19662
  children: /* @__PURE__ */ jsxRuntime.jsx("div", { style: { height: "calc(100vh - 140px)", overflow: "auto", padding: "0 12px" }, children: /* @__PURE__ */ jsxRuntime.jsx(PinnedRecordsPanel, {}) })
19015
19663
  }
19016
19664
  ];