@mulmoclaude/collection-plugin 0.5.0 → 0.5.2
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/server/discovery.d.ts +29 -1
- package/dist/server/discovery.d.ts.map +1 -1
- package/dist/server/paths.d.ts +6 -0
- package/dist/server/paths.d.ts.map +1 -1
- package/dist/server.cjs +68 -30
- package/dist/server.cjs.map +1 -1
- package/dist/server.js +67 -31
- package/dist/server.js.map +1 -1
- package/dist/vue/components/CollectionEmbedView.vue.d.ts.map +1 -1
- package/dist/vue/components/CollectionRecordPanel.vue.d.ts.map +1 -1
- package/dist/vue/components/CollectionView.vue.d.ts.map +1 -1
- package/dist/vue/refLink.d.ts +7 -0
- package/dist/vue/refLink.d.ts.map +1 -0
- package/dist/vue.cjs +60 -29
- package/dist/vue.cjs.map +1 -1
- package/dist/vue.js +60 -29
- package/dist/vue.js.map +1 -1
- package/package.json +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CollectionEmbedView.vue.d.ts","sourceRoot":"","sources":["../../../src/vue/components/CollectionEmbedView.vue"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"CollectionEmbedView.vue.d.ts","sourceRoot":"","sources":["../../../src/vue/components/CollectionEmbedView.vue"],"names":[],"mappings":"AAoGA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,oBAAoB,CAAC;AAEpD,KAAK,WAAW,GAAG;IAAE,IAAI,EAAE,SAAS,CAAC;IAAC,QAAQ,EAAE,MAAM,CAAA;CAAE,CAAC;AAoSzD,QAAA,MAAM,YAAY,kSAEhB,CAAC;wBACkB,OAAO,YAAY;AAAxC,wBAAyC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CollectionRecordPanel.vue.d.ts","sourceRoot":"","sources":["../../../src/vue/components/CollectionRecordPanel.vue"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"CollectionRecordPanel.vue.d.ts","sourceRoot":"","sources":["../../../src/vue/components/CollectionRecordPanel.vue"],"names":[],"mappings":"AAglBA,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,2BAA2B,CAAC;AACrE,OAAO,KAAK,EAAE,gBAAgB,EAAE,gBAAgB,EAAE,cAAc,EAAoC,MAAM,mBAAmB,CAAC;AAC9H,OAAO,KAAK,EAAE,SAAS,EAAiB,MAAM,oBAAoB,CAAC;AAQnE,KAAK,WAAW,GAAG;IACjB,UAAU,EAAE,gBAAgB,CAAC;IAC7B,8CAA8C;IAC9C,OAAO,EAAE,cAAc,GAAG,IAAI,CAAC;IAC/B,MAAM,EAAE,OAAO,CAAC;IAChB,SAAS,EAAE,MAAM,GAAG,IAAI,CAAC;IACzB,WAAW,EAAE,MAAM,GAAG,IAAI,CAAC;IAC3B,aAAa,EAAE,OAAO,CAAC;IACvB,cAAc,EAAE,gBAAgB,EAAE,CAAC;IACnC,qEAAqE;IACrE,UAAU,EAAE,cAAc,GAAG,IAAI,CAAC;IAClC,gDAAgD;IAChD,WAAW,EAAE,cAAc,GAAG,IAAI,CAAC;IACnC,SAAS,EAAE,MAAM,CAAC;IAClB,WAAW,EAAE,OAAO,CAAC;IACrB,8DAA8D;IAC9D,MAAM,EAAE,mBAAmB,CAAC;IAC5B,MAAM,EAAE,MAAM,CAAC;CAChB,CAAC;AA4GF,KAAK,gBAAgB,GAAG;IACxB,SAAS,EAAE,SAAS,GAAG,IAAI,CAAC;CAC3B,CAAC;AAKF,KAAK,iBAAiB,GAAG,WAAW,GAAG,gBAAgB,CAAC;AAgxCxD,QAAA,MAAM,YAAY;;;;;;;;;;;;;;;;kFAGhB,CAAC;wBACkB,OAAO,YAAY;AAAxC,wBAAyC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CollectionView.vue.d.ts","sourceRoot":"","sources":["../../../src/vue/components/CollectionView.vue"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"CollectionView.vue.d.ts","sourceRoot":"","sources":["../../../src/vue/components/CollectionView.vue"],"names":[],"mappings":"AAujEA,OAAO,EAML,KAAK,eAAe,EACrB,MAAM,uBAAuB,CAAC;AA8B/B;;;;;;;;;6CAS6C;AAC7C,KAAK,WAAW,GAAG;IACjB,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,eAAe,CAAC,EAAE,CAAC,IAAI,CAAC,EAAE,MAAM,KAAK,IAAI,CAAC;IAC1C;;;uEAGmE;IACnE,WAAW,CAAC,EAAE,eAAe,CAAC;IAC9B,kBAAkB,CAAC,EAAE,MAAM,CAAC;IAC5B,iBAAiB,CAAC,EAAE,MAAM,CAAC;CAC5B,CAAC;AA27GF,QAAA,MAAM,YAAY;;;cAh7GiB,eAAe;qBAAe,MAAM;oBAAc,MAAM;;;;;cAAxD,eAAe;qBAAe,MAAM;oBAAc,MAAM;;kFAm7GzF,CAAC;wBACkB,OAAO,YAAY;AAAxC,wBAAyC"}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
/** Activate a ref/embed link → navigate to `targetSlug` (optionally a record). */
|
|
2
|
+
export declare function activateRefLink(event: MouseEvent | KeyboardEvent, targetSlug: string, recordId?: string, stop?: boolean): void;
|
|
3
|
+
/** Activate a `file` cell link → navigate to a host path. When the host has no
|
|
4
|
+
* `navigate` capability, do NOT preventDefault so the `href` still works (or, in
|
|
5
|
+
* a router-less host that also has no path, the link simply isn't rendered). */
|
|
6
|
+
export declare function activatePathLink(event: MouseEvent | KeyboardEvent, path: string, stop?: boolean): void;
|
|
7
|
+
//# sourceMappingURL=refLink.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"refLink.d.ts","sourceRoot":"","sources":["../../src/vue/refLink.ts"],"names":[],"mappings":"AAkBA,kFAAkF;AAClF,wBAAgB,eAAe,CAAC,KAAK,EAAE,UAAU,GAAG,aAAa,EAAE,UAAU,EAAE,MAAM,EAAE,QAAQ,CAAC,EAAE,MAAM,EAAE,IAAI,UAAQ,GAAG,IAAI,CAK5H;AAED;;iFAEiF;AACjF,wBAAgB,gBAAgB,CAAC,KAAK,EAAE,UAAU,GAAG,aAAa,EAAE,IAAI,EAAE,MAAM,EAAE,IAAI,UAAQ,GAAG,IAAI,CAOpG"}
|
package/dist/vue.cjs
CHANGED
|
@@ -1563,8 +1563,35 @@ var CollectionKanbanView_default = /* @__PURE__ */ (0, vue.defineComponent)({
|
|
|
1563
1563
|
}
|
|
1564
1564
|
});
|
|
1565
1565
|
//#endregion
|
|
1566
|
+
//#region src/vue/refLink.ts
|
|
1567
|
+
function isModifiedClick(event) {
|
|
1568
|
+
return event instanceof MouseEvent && (event.metaKey || event.ctrlKey || event.shiftKey || event.altKey);
|
|
1569
|
+
}
|
|
1570
|
+
/** Activate a ref/embed link → navigate to `targetSlug` (optionally a record). */
|
|
1571
|
+
function activateRefLink(event, targetSlug, recordId, stop = false) {
|
|
1572
|
+
if (stop) event.stopPropagation();
|
|
1573
|
+
if (isModifiedClick(event)) return;
|
|
1574
|
+
event.preventDefault();
|
|
1575
|
+
collectionUi().navigateToRecord(targetSlug, recordId);
|
|
1576
|
+
}
|
|
1577
|
+
/** Activate a `file` cell link → navigate to a host path. When the host has no
|
|
1578
|
+
* `navigate` capability, do NOT preventDefault so the `href` still works (or, in
|
|
1579
|
+
* a router-less host that also has no path, the link simply isn't rendered). */
|
|
1580
|
+
function activatePathLink(event, path, stop = false) {
|
|
1581
|
+
if (stop) event.stopPropagation();
|
|
1582
|
+
if (isModifiedClick(event)) return;
|
|
1583
|
+
const nav = collectionUi().navigate;
|
|
1584
|
+
if (!nav) return;
|
|
1585
|
+
event.preventDefault();
|
|
1586
|
+
nav(path);
|
|
1587
|
+
}
|
|
1588
|
+
//#endregion
|
|
1566
1589
|
//#region src/vue/components/CollectionEmbedView.vue?vue&type=script&setup=true&lang.ts
|
|
1567
|
-
var _hoisted_1$8 = [
|
|
1590
|
+
var _hoisted_1$8 = [
|
|
1591
|
+
"href",
|
|
1592
|
+
"tabindex",
|
|
1593
|
+
"data-testid"
|
|
1594
|
+
];
|
|
1568
1595
|
var _hoisted_2$7 = { class: "flex items-center justify-between text-[10px] font-bold text-indigo-600/90 tracking-wider uppercase" };
|
|
1569
1596
|
var _hoisted_3$7 = { class: "flex items-center gap-1.5" };
|
|
1570
1597
|
var _hoisted_4$7 = { class: "bg-indigo-100/60 text-indigo-700 px-1.5 py-0.5 rounded font-mono font-medium lowercase" };
|
|
@@ -1589,7 +1616,7 @@ var _hoisted_13$4 = { class: "flex items-start gap-3" };
|
|
|
1589
1616
|
var _hoisted_14$4 = { class: "flex-1 min-w-0" };
|
|
1590
1617
|
var _hoisted_15$4 = { class: "text-xs font-semibold text-red-800 uppercase tracking-wider mb-1" };
|
|
1591
1618
|
var _hoisted_16$3 = ["data-testid"];
|
|
1592
|
-
var _hoisted_17$3 = ["href"];
|
|
1619
|
+
var _hoisted_17$3 = ["href", "tabindex"];
|
|
1593
1620
|
//#endregion
|
|
1594
1621
|
//#region src/vue/components/CollectionEmbedView.vue
|
|
1595
1622
|
var CollectionEmbedView_default = /* @__PURE__ */ (0, vue.defineComponent)({
|
|
@@ -1605,12 +1632,15 @@ var CollectionEmbedView_default = /* @__PURE__ */ (0, vue.defineComponent)({
|
|
|
1605
1632
|
return __props.view.found ? ((0, vue.openBlock)(), (0, vue.createElementBlock)("a", {
|
|
1606
1633
|
key: 0,
|
|
1607
1634
|
href: (0, vue.unref)(cui).recordHref?.(__props.view.targetSlug, __props.view.recordId),
|
|
1635
|
+
tabindex: (0, vue.unref)(cui).recordHref?.(__props.view.targetSlug, __props.view.recordId) ? void 0 : 0,
|
|
1636
|
+
role: "link",
|
|
1608
1637
|
class: "group block relative rounded-xl border border-slate-200 bg-slate-50/50 p-4 pl-5 space-y-3 hover:bg-indigo-50/20 hover:border-indigo-200 transition-all duration-300 shadow-sm",
|
|
1609
1638
|
"data-testid": `collections-embed-${__props.fieldKey}`,
|
|
1610
|
-
onClick: _cache[0] || (_cache[0] = (
|
|
1639
|
+
onClick: _cache[0] || (_cache[0] = ($event) => (0, vue.unref)(activateRefLink)($event, __props.view.targetSlug, __props.view.recordId)),
|
|
1640
|
+
onKeydown: [_cache[1] || (_cache[1] = (0, vue.withKeys)(($event) => (0, vue.unref)(activateRefLink)($event, __props.view.targetSlug, __props.view.recordId), ["enter"])), _cache[2] || (_cache[2] = (0, vue.withKeys)(($event) => (0, vue.unref)(activateRefLink)($event, __props.view.targetSlug, __props.view.recordId), ["space"]))]
|
|
1611
1641
|
}, [
|
|
1612
|
-
_cache[
|
|
1613
|
-
(0, vue.createElementVNode)("div", _hoisted_2$7, [(0, vue.createElementVNode)("div", _hoisted_3$7, [_cache[
|
|
1642
|
+
_cache[7] || (_cache[7] = (0, vue.createElementVNode)("div", { class: "absolute left-0 top-0 bottom-0 w-1 bg-indigo-500 rounded-l-xl transition-all duration-300 group-hover:w-1.5 group-hover:bg-indigo-600" }, null, -1)),
|
|
1643
|
+
(0, vue.createElementVNode)("div", _hoisted_2$7, [(0, vue.createElementVNode)("div", _hoisted_3$7, [_cache[6] || (_cache[6] = (0, vue.createElementVNode)("span", { class: "material-icons text-sm" }, "link", -1)), (0, vue.createElementVNode)("span", null, (0, vue.toDisplayString)(__props.view.targetSlug), 1)]), (0, vue.createElementVNode)("span", _hoisted_4$7, (0, vue.toDisplayString)(__props.view.recordId), 1)]),
|
|
1614
1644
|
(0, vue.createElementVNode)("div", _hoisted_5$6, [((0, vue.openBlock)(true), (0, vue.createElementBlock)(vue.Fragment, null, (0, vue.renderList)(__props.view.rows, (row) => {
|
|
1615
1645
|
return (0, vue.openBlock)(), (0, vue.createElementBlock)("div", {
|
|
1616
1646
|
key: row.key,
|
|
@@ -1620,11 +1650,11 @@ var CollectionEmbedView_default = /* @__PURE__ */ (0, vue.defineComponent)({
|
|
|
1620
1650
|
"data-testid": `collections-embed-${__props.fieldKey}-${row.key}`
|
|
1621
1651
|
}, [row.type === "boolean" ? ((0, vue.openBlock)(), (0, vue.createElementBlock)(vue.Fragment, { key: 0 }, [row.value === true ? ((0, vue.openBlock)(), (0, vue.createElementBlock)("span", _hoisted_8$5, "check_circle")) : ((0, vue.openBlock)(), (0, vue.createElementBlock)("span", _hoisted_9$5, "—"))], 64)) : row.type === "markdown" ? ((0, vue.openBlock)(), (0, vue.createElementBlock)("p", _hoisted_10$5, (0, vue.toDisplayString)(row.display), 1)) : ((0, vue.openBlock)(), (0, vue.createElementBlock)("span", _hoisted_11$5, (0, vue.toDisplayString)(row.display), 1))], 8, _hoisted_7$5)]);
|
|
1622
1652
|
}), 128))])
|
|
1623
|
-
],
|
|
1653
|
+
], 40, _hoisted_1$8)) : ((0, vue.openBlock)(), (0, vue.createElementBlock)("div", {
|
|
1624
1654
|
key: 1,
|
|
1625
1655
|
class: "relative rounded-xl border border-red-100 bg-red-50/30 p-4 pl-5 shadow-sm",
|
|
1626
1656
|
"data-testid": `collections-embed-${__props.fieldKey}`
|
|
1627
|
-
}, [_cache[
|
|
1657
|
+
}, [_cache[10] || (_cache[10] = (0, vue.createElementVNode)("div", { class: "absolute left-0 top-0 bottom-0 w-1 bg-red-400 rounded-l-xl" }, null, -1)), (0, vue.createElementVNode)("div", _hoisted_13$4, [_cache[9] || (_cache[9] = (0, vue.createElementVNode)("span", { class: "material-icons text-red-500 text-lg mt-0.5" }, "error_outline", -1)), (0, vue.createElementVNode)("div", _hoisted_14$4, [
|
|
1628
1658
|
(0, vue.createElementVNode)("p", _hoisted_15$4, (0, vue.toDisplayString)((0, vue.unref)(t)("collectionsView.embedMissingTitle")), 1),
|
|
1629
1659
|
(0, vue.createElementVNode)("p", {
|
|
1630
1660
|
class: "text-xs text-red-600",
|
|
@@ -1636,9 +1666,12 @@ var CollectionEmbedView_default = /* @__PURE__ */ (0, vue.defineComponent)({
|
|
|
1636
1666
|
__props.view.targetSlug ? ((0, vue.openBlock)(), (0, vue.createElementBlock)("a", {
|
|
1637
1667
|
key: 0,
|
|
1638
1668
|
href: (0, vue.unref)(cui).recordHref?.(__props.view.targetSlug),
|
|
1669
|
+
tabindex: (0, vue.unref)(cui).recordHref?.(__props.view.targetSlug) ? void 0 : 0,
|
|
1670
|
+
role: "link",
|
|
1639
1671
|
class: "inline-flex items-center gap-0.5 text-xs text-indigo-600 hover:text-indigo-800 font-semibold mt-2 hover:underline",
|
|
1640
|
-
onClick: _cache[
|
|
1641
|
-
|
|
1672
|
+
onClick: _cache[3] || (_cache[3] = ($event) => (0, vue.unref)(activateRefLink)($event, __props.view.targetSlug)),
|
|
1673
|
+
onKeydown: [_cache[4] || (_cache[4] = (0, vue.withKeys)(($event) => (0, vue.unref)(activateRefLink)($event, __props.view.targetSlug), ["enter"])), _cache[5] || (_cache[5] = (0, vue.withKeys)(($event) => (0, vue.unref)(activateRefLink)($event, __props.view.targetSlug), ["space"]))]
|
|
1674
|
+
}, [(0, vue.createElementVNode)("span", null, (0, vue.toDisplayString)((0, vue.unref)(t)("collectionsView.embedCreate")), 1), _cache[8] || (_cache[8] = (0, vue.createElementVNode)("span", { class: "material-icons text-xs" }, "arrow_forward", -1))], 40, _hoisted_17$3)) : (0, vue.createCommentVNode)("", true)
|
|
1642
1675
|
])])], 8, _hoisted_12$5));
|
|
1643
1676
|
};
|
|
1644
1677
|
}
|
|
@@ -1787,8 +1820,10 @@ var _hoisted_52$1 = {
|
|
|
1787
1820
|
};
|
|
1788
1821
|
var _hoisted_53$1 = [
|
|
1789
1822
|
"href",
|
|
1823
|
+
"tabindex",
|
|
1790
1824
|
"data-testid",
|
|
1791
|
-
"onClick"
|
|
1825
|
+
"onClick",
|
|
1826
|
+
"onKeydown"
|
|
1792
1827
|
];
|
|
1793
1828
|
var _hoisted_54$1 = {
|
|
1794
1829
|
key: 3,
|
|
@@ -2151,10 +2186,13 @@ var CollectionRecordPanel_default = /* @__PURE__ */ (0, vue.defineComponent)({
|
|
|
2151
2186
|
}, [field.type === "toggle" ? ((0, vue.openBlock)(), (0, vue.createElementBlock)(vue.Fragment, { key: 0 }, [field.field !== void 0 && String(detailRecord.value[field.field] ?? "") === field.onValue ? ((0, vue.openBlock)(), (0, vue.createElementBlock)("span", _hoisted_48$1, [_cache[11] || (_cache[11] = (0, vue.createElementVNode)("span", { class: "h-1.5 w-1.5 rounded-full bg-emerald-500" }, null, -1)), (0, vue.createTextVNode)(" " + (0, vue.toDisplayString)((0, vue.unref)(t)("common.yes")), 1)])) : ((0, vue.openBlock)(), (0, vue.createElementBlock)("span", _hoisted_49$1, (0, vue.toDisplayString)((0, vue.unref)(t)("common.no")), 1))], 64)) : field.type === "boolean" ? ((0, vue.openBlock)(), (0, vue.createElementBlock)(vue.Fragment, { key: 1 }, [detailRecord.value[key] === true ? ((0, vue.openBlock)(), (0, vue.createElementBlock)("span", _hoisted_50$1, [_cache[12] || (_cache[12] = (0, vue.createElementVNode)("span", { class: "h-1.5 w-1.5 rounded-full bg-emerald-500" }, null, -1)), (0, vue.createTextVNode)(" " + (0, vue.toDisplayString)((0, vue.unref)(t)("common.yes")), 1)])) : detailRecord.value[key] === false ? ((0, vue.openBlock)(), (0, vue.createElementBlock)("span", _hoisted_51$1, (0, vue.toDisplayString)((0, vue.unref)(t)("common.no")), 1)) : ((0, vue.openBlock)(), (0, vue.createElementBlock)("span", _hoisted_52$1, "—"))], 64)) : field.type === "ref" && field.to && typeof detailRecord.value[key] === "string" && detailRecord.value[key] ? ((0, vue.openBlock)(), (0, vue.createElementBlock)("a", {
|
|
2152
2187
|
key: 2,
|
|
2153
2188
|
href: (0, vue.unref)(cui).recordHref?.(field.to, String(detailRecord.value[key])),
|
|
2189
|
+
tabindex: (0, vue.unref)(cui).recordHref?.(field.to, String(detailRecord.value[key])) ? void 0 : 0,
|
|
2190
|
+
role: "link",
|
|
2154
2191
|
class: "text-indigo-600 hover:text-indigo-800 font-bold hover:underline",
|
|
2155
2192
|
"data-testid": `collections-detail-ref-${key}`,
|
|
2156
|
-
onClick: (
|
|
2157
|
-
|
|
2193
|
+
onClick: ($event) => (0, vue.unref)(activateRefLink)($event, field.to, String(detailRecord.value[key])),
|
|
2194
|
+
onKeydown: [(0, vue.withKeys)(($event) => (0, vue.unref)(activateRefLink)($event, field.to, String(detailRecord.value[key])), ["enter"]), (0, vue.withKeys)(($event) => (0, vue.unref)(activateRefLink)($event, field.to, String(detailRecord.value[key])), ["space"])]
|
|
2195
|
+
}, (0, vue.toDisplayString)(__props.render.refDisplay(field.to, String(detailRecord.value[key]))), 41, _hoisted_53$1)) : field.type === "money" ? ((0, vue.openBlock)(), (0, vue.createElementBlock)("span", _hoisted_54$1, (0, vue.toDisplayString)(__props.render.formatMoney(detailRecord.value[key], __props.render.resolveCurrency(field, detailRecord.value), __props.locale)), 1)) : field.type === "derived" ? ((0, vue.openBlock)(), (0, vue.createElementBlock)("span", _hoisted_55$1, (0, vue.toDisplayString)(__props.render.derivedDisplay(field, __props.render.evaluateDerivedAgainstItem(field, String(key), detailRecord.value), detailRecord.value)), 1)) : field.type === "table" && field.of && __props.render.hasTableRows(detailRecord.value[key]) ? ((0, vue.openBlock)(), (0, vue.createElementBlock)("div", _hoisted_56$1, [(0, vue.createElementVNode)("table", _hoisted_57$1, [(0, vue.createElementVNode)("thead", _hoisted_58$1, [(0, vue.createElementVNode)("tr", null, [((0, vue.openBlock)(true), (0, vue.createElementBlock)(vue.Fragment, null, (0, vue.renderList)(field.of, (subField, subKey) => {
|
|
2158
2196
|
return (0, vue.openBlock)(), (0, vue.createElementBlock)("th", {
|
|
2159
2197
|
key: subKey,
|
|
2160
2198
|
class: "text-left px-4 py-2 font-bold"
|
|
@@ -2201,7 +2239,7 @@ var CollectionRecordPanel_default = /* @__PURE__ */ (0, vue.defineComponent)({
|
|
|
2201
2239
|
href: __props.render.fileRoutePath(detailRecord.value[key]) ?? void 0,
|
|
2202
2240
|
class: "text-blue-600 hover:text-blue-800 font-semibold hover:underline break-all",
|
|
2203
2241
|
"data-testid": `collections-detail-file-${key}`,
|
|
2204
|
-
onClick: (
|
|
2242
|
+
onClick: ($event) => (0, vue.unref)(activatePathLink)($event, __props.render.fileRoutePath(detailRecord.value[key]) ?? "")
|
|
2205
2243
|
}, (0, vue.toDisplayString)(String(detailRecord.value[key])), 9, _hoisted_67$1)) : ((0, vue.openBlock)(), (0, vue.createElementBlock)("span", _hoisted_68$1, (0, vue.toDisplayString)(__props.render.formatCell(detailRecord.value[key], field.type)), 1))], 8, _hoisted_47$1))], 2)) : (0, vue.createCommentVNode)("", true)], 64);
|
|
2206
2244
|
}), 128)), editing.value && __props.saveError ? ((0, vue.openBlock)(), (0, vue.createElementBlock)("p", _hoisted_69$1, (0, vue.toDisplayString)(__props.saveError), 1)) : (0, vue.createCommentVNode)("", true)])
|
|
2207
2245
|
]),
|
|
@@ -2894,8 +2932,10 @@ var _hoisted_65 = {
|
|
|
2894
2932
|
};
|
|
2895
2933
|
var _hoisted_66 = [
|
|
2896
2934
|
"href",
|
|
2935
|
+
"tabindex",
|
|
2897
2936
|
"data-testid",
|
|
2898
|
-
"onClick"
|
|
2937
|
+
"onClick",
|
|
2938
|
+
"onKeydown"
|
|
2899
2939
|
];
|
|
2900
2940
|
var _hoisted_67 = [
|
|
2901
2941
|
"value",
|
|
@@ -2965,18 +3005,6 @@ var CollectionView_default = /* @__PURE__ */ (0, vue.defineComponent)({
|
|
|
2965
3005
|
const cui = collectionUi();
|
|
2966
3006
|
const { confirm: openConfirm, unpin, pinToggle, startChat } = cui;
|
|
2967
3007
|
const appApi = { startNewChat: startChat };
|
|
2968
|
-
function onRefLinkClick(event, targetSlug, recordId) {
|
|
2969
|
-
event.stopPropagation();
|
|
2970
|
-
if (event.metaKey || event.ctrlKey || event.shiftKey || event.altKey) return;
|
|
2971
|
-
event.preventDefault();
|
|
2972
|
-
cui.navigateToRecord(targetSlug, recordId);
|
|
2973
|
-
}
|
|
2974
|
-
function onFileLinkClick(event, path) {
|
|
2975
|
-
event.stopPropagation();
|
|
2976
|
-
if (event.metaKey || event.ctrlKey || event.shiftKey || event.altKey) return;
|
|
2977
|
-
event.preventDefault();
|
|
2978
|
-
cui.navigate?.(path);
|
|
2979
|
-
}
|
|
2980
3008
|
/** Embedded when a `slug` prop is supplied; standalone (route-driven)
|
|
2981
3009
|
* otherwise. Switches the slug/selected source and the open/close
|
|
2982
3010
|
* navigation behaviour. */
|
|
@@ -4296,10 +4324,13 @@ var CollectionView_default = /* @__PURE__ */ (0, vue.defineComponent)({
|
|
|
4296
4324
|
onChange: ($event) => commitInlineEdit(item, String(key), field, $event.target.checked)
|
|
4297
4325
|
}, null, 40, _hoisted_64)) : field.type === "ref" && field.to && typeof item[key] === "string" && item[key] ? ((0, vue.openBlock)(), (0, vue.createElementBlock)("span", _hoisted_65, [(0, vue.createElementVNode)("a", {
|
|
4298
4326
|
href: (0, vue.unref)(cui).recordHref?.(field.to, String(item[key])),
|
|
4327
|
+
tabindex: (0, vue.unref)(cui).recordHref?.(field.to, String(item[key])) ? void 0 : 0,
|
|
4328
|
+
role: "link",
|
|
4299
4329
|
class: "text-indigo-600 hover:text-indigo-800 hover:underline font-semibold",
|
|
4300
4330
|
"data-testid": `collections-ref-link-${key}-${item[key]}`,
|
|
4301
|
-
onClick: ($event) =>
|
|
4302
|
-
|
|
4331
|
+
onClick: ($event) => (0, vue.unref)(activateRefLink)($event, field.to, String(item[key]), true),
|
|
4332
|
+
onKeydown: [(0, vue.withKeys)(($event) => (0, vue.unref)(activateRefLink)($event, field.to, String(item[key]), true), ["enter"]), (0, vue.withKeys)(($event) => (0, vue.unref)(activateRefLink)($event, field.to, String(item[key]), true), ["space"])]
|
|
4333
|
+
}, (0, vue.toDisplayString)((0, vue.unref)(refDisplay)(field.to, String(item[key]))), 41, _hoisted_66)])) : field.type === "enum" && Array.isArray(field.values) && field.values.length > 0 ? ((0, vue.openBlock)(), (0, vue.createElementBlock)("select", {
|
|
4303
4334
|
key: 3,
|
|
4304
4335
|
value: item[key] == null ? "" : String(item[key]),
|
|
4305
4336
|
disabled: isRowInlineSaving(item),
|
|
@@ -4334,7 +4365,7 @@ var CollectionView_default = /* @__PURE__ */ (0, vue.defineComponent)({
|
|
|
4334
4365
|
href: (0, vue.unref)(fileRoutePath)(item[key]) ?? void 0,
|
|
4335
4366
|
class: "block truncate text-blue-600 hover:text-blue-800 hover:underline font-semibold",
|
|
4336
4367
|
"data-testid": `collections-file-link-${key}-${item[collection.value.schema.primaryKey]}`,
|
|
4337
|
-
onClick: ($event) =>
|
|
4368
|
+
onClick: ($event) => (0, vue.unref)(activatePathLink)($event, (0, vue.unref)(fileRoutePath)(item[key]) ?? "", true)
|
|
4338
4369
|
}, (0, vue.toDisplayString)(String(item[key])), 9, _hoisted_75)) : ((0, vue.openBlock)(), (0, vue.createElementBlock)("span", _hoisted_76, (0, vue.toDisplayString)((0, vue.unref)(formatCell)(item[key], field.type)), 1))], 64)) : (0, vue.createCommentVNode)("", true)]);
|
|
4339
4370
|
}), 128))], 42, _hoisted_62);
|
|
4340
4371
|
}), 128))])])]))]),
|