@mulmoclaude/collection-plugin 0.13.2 → 0.14.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/style.css +4 -0
- package/dist/vue/components/CollectionOntologyGraphView.vue.d.ts +8 -0
- package/dist/vue/components/CollectionOntologyGraphView.vue.d.ts.map +1 -0
- package/dist/vue/components/CollectionsIndexView.vue.d.ts.map +1 -1
- package/dist/vue/lang/de.d.ts.map +1 -1
- package/dist/vue/lang/en.d.ts +5 -0
- package/dist/vue/lang/en.d.ts.map +1 -1
- package/dist/vue/lang/es.d.ts.map +1 -1
- package/dist/vue/lang/fr.d.ts.map +1 -1
- package/dist/vue/lang/index.d.ts +5 -0
- package/dist/vue/lang/index.d.ts.map +1 -1
- package/dist/vue/lang/ja.d.ts.map +1 -1
- package/dist/vue/lang/ko.d.ts.map +1 -1
- package/dist/vue/lang/ptBR.d.ts.map +1 -1
- package/dist/vue/lang/zh.d.ts.map +1 -1
- package/dist/vue/uiContext.d.ts +6 -1
- package/dist/vue/uiContext.d.ts.map +1 -1
- package/dist/vue.cjs +329 -113
- package/dist/vue.cjs.map +1 -1
- package/dist/vue.js +329 -114
- package/dist/vue.js.map +1 -1
- package/package.json +5 -3
package/dist/vue.cjs
CHANGED
|
@@ -27,6 +27,9 @@ let vue_i18n = require("vue-i18n");
|
|
|
27
27
|
let vuedraggable = require("vuedraggable");
|
|
28
28
|
vuedraggable = __toESM(vuedraggable, 1);
|
|
29
29
|
let _mulmoclaude_core_remote_view = require("@mulmoclaude/core/remote-view");
|
|
30
|
+
let echarts = require("echarts");
|
|
31
|
+
echarts = __toESM(echarts, 1);
|
|
32
|
+
let _mulmoclaude_core_wiki = require("@mulmoclaude/core/wiki");
|
|
30
33
|
let _mulmoclaude_core_translation_client = require("@mulmoclaude/core/translation/client");
|
|
31
34
|
//#region src/vue/uiContext.ts
|
|
32
35
|
var current = null;
|
|
@@ -99,6 +102,11 @@ var i18n = (0, vue_i18n.createI18n)({
|
|
|
99
102
|
editable: "Editable",
|
|
100
103
|
data: "Data"
|
|
101
104
|
},
|
|
105
|
+
mapTab: "Map",
|
|
106
|
+
mapEmpty: "Nothing to map yet — the map draws itself as collections and the links between them appear.",
|
|
107
|
+
mapRecordCount: "{count} records",
|
|
108
|
+
mapRecordCountUnknown: "record count unavailable",
|
|
109
|
+
mapMissingHint: "No collection with this slug — a relation points at it.",
|
|
102
110
|
notFound: "Collection not found",
|
|
103
111
|
loadFailed: "Failed to load",
|
|
104
112
|
requiredField: "This field is required",
|
|
@@ -247,6 +255,11 @@ var i18n = (0, vue_i18n.createI18n)({
|
|
|
247
255
|
editable: "編集可能",
|
|
248
256
|
data: "データ"
|
|
249
257
|
},
|
|
258
|
+
mapTab: "マップ",
|
|
259
|
+
mapEmpty: "まだ表示するものがありません。コレクションとその間のリンクが増えると、マップが自動的に描かれます。",
|
|
260
|
+
mapRecordCount: "{count} 件のレコード",
|
|
261
|
+
mapRecordCountUnknown: "レコード数を取得できません",
|
|
262
|
+
mapMissingHint: "このスラッグのコレクションは存在しません。リレーションが参照しています。",
|
|
250
263
|
notFound: "コレクションが見つかりません",
|
|
251
264
|
loadFailed: "読み込みに失敗しました",
|
|
252
265
|
requiredField: "この項目は必須です",
|
|
@@ -395,6 +408,11 @@ var i18n = (0, vue_i18n.createI18n)({
|
|
|
395
408
|
editable: "可编辑",
|
|
396
409
|
data: "数据"
|
|
397
410
|
},
|
|
411
|
+
mapTab: "地图",
|
|
412
|
+
mapEmpty: "暂无可显示的内容。随着集合及其之间的链接增多,地图会自动绘制。",
|
|
413
|
+
mapRecordCount: "{count} 条记录",
|
|
414
|
+
mapRecordCountUnknown: "无法获取记录数",
|
|
415
|
+
mapMissingHint: "不存在此 slug 的集合,但有关系指向它。",
|
|
398
416
|
notFound: "未找到集合",
|
|
399
417
|
loadFailed: "加载失败",
|
|
400
418
|
requiredField: "此字段为必填项",
|
|
@@ -543,6 +561,11 @@ var i18n = (0, vue_i18n.createI18n)({
|
|
|
543
561
|
editable: "편집 가능",
|
|
544
562
|
data: "데이터"
|
|
545
563
|
},
|
|
564
|
+
mapTab: "맵",
|
|
565
|
+
mapEmpty: "아직 표시할 내용이 없습니다. 컬렉션과 그 사이의 링크가 생기면 맵이 자동으로 그려집니다.",
|
|
566
|
+
mapRecordCount: "레코드 {count}개",
|
|
567
|
+
mapRecordCountUnknown: "레코드 수를 가져올 수 없음",
|
|
568
|
+
mapMissingHint: "이 슬러그의 컬렉션이 없습니다. 관계가 이를 참조하고 있습니다.",
|
|
546
569
|
notFound: "컬렉션을 찾을 수 없습니다",
|
|
547
570
|
loadFailed: "불러오기에 실패했습니다",
|
|
548
571
|
requiredField: "이 필드는 필수입니다",
|
|
@@ -691,6 +714,11 @@ var i18n = (0, vue_i18n.createI18n)({
|
|
|
691
714
|
editable: "Editables",
|
|
692
715
|
data: "Datos"
|
|
693
716
|
},
|
|
717
|
+
mapTab: "Mapa",
|
|
718
|
+
mapEmpty: "Nada que mostrar todavía: el mapa se dibuja solo a medida que aparecen colecciones y los enlaces entre ellas.",
|
|
719
|
+
mapRecordCount: "{count} registros",
|
|
720
|
+
mapRecordCountUnknown: "recuento de registros no disponible",
|
|
721
|
+
mapMissingHint: "No existe una colección con este slug; una relación apunta a ella.",
|
|
694
722
|
notFound: "Colección no encontrada",
|
|
695
723
|
loadFailed: "Error al cargar",
|
|
696
724
|
requiredField: "Este campo es obligatorio",
|
|
@@ -839,6 +867,11 @@ var i18n = (0, vue_i18n.createI18n)({
|
|
|
839
867
|
editable: "Editáveis",
|
|
840
868
|
data: "Dados"
|
|
841
869
|
},
|
|
870
|
+
mapTab: "Mapa",
|
|
871
|
+
mapEmpty: "Nada para mostrar ainda — o mapa se desenha sozinho conforme coleções e os vínculos entre elas aparecem.",
|
|
872
|
+
mapRecordCount: "{count} registros",
|
|
873
|
+
mapRecordCountUnknown: "contagem de registros indisponível",
|
|
874
|
+
mapMissingHint: "Nenhuma coleção com este slug — uma relação aponta para ela.",
|
|
842
875
|
notFound: "Coleção não encontrada",
|
|
843
876
|
loadFailed: "Falha ao carregar",
|
|
844
877
|
requiredField: "Este campo é obrigatório",
|
|
@@ -987,6 +1020,11 @@ var i18n = (0, vue_i18n.createI18n)({
|
|
|
987
1020
|
editable: "Modifiables",
|
|
988
1021
|
data: "Données"
|
|
989
1022
|
},
|
|
1023
|
+
mapTab: "Carte",
|
|
1024
|
+
mapEmpty: "Rien à afficher pour l'instant — la carte se dessine d'elle-même à mesure que les collections et leurs liens apparaissent.",
|
|
1025
|
+
mapRecordCount: "{count} enregistrements",
|
|
1026
|
+
mapRecordCountUnknown: "nombre d'enregistrements indisponible",
|
|
1027
|
+
mapMissingHint: "Aucune collection avec ce slug — une relation pointe vers elle.",
|
|
990
1028
|
notFound: "Collection introuvable",
|
|
991
1029
|
loadFailed: "Échec du chargement",
|
|
992
1030
|
requiredField: "Ce champ est obligatoire",
|
|
@@ -1135,6 +1173,11 @@ var i18n = (0, vue_i18n.createI18n)({
|
|
|
1135
1173
|
editable: "Bearbeitbar",
|
|
1136
1174
|
data: "Daten"
|
|
1137
1175
|
},
|
|
1176
|
+
mapTab: "Karte",
|
|
1177
|
+
mapEmpty: "Noch nichts zu zeigen — die Karte entsteht von selbst, sobald Sammlungen und ihre Verknüpfungen entstehen.",
|
|
1178
|
+
mapRecordCount: "{count} Einträge",
|
|
1179
|
+
mapRecordCountUnknown: "Anzahl der Datensätze nicht verfügbar",
|
|
1180
|
+
mapMissingHint: "Keine Sammlung mit diesem Slug — eine Relation verweist darauf.",
|
|
1138
1181
|
notFound: "Sammlung nicht gefunden",
|
|
1139
1182
|
loadFailed: "Laden fehlgeschlagen",
|
|
1140
1183
|
requiredField: "Dieses Feld ist erforderlich",
|
|
@@ -1349,8 +1392,8 @@ function isExternalUrl(value) {
|
|
|
1349
1392
|
return typeof value === "string" && /^https?:\/\//i.test(value);
|
|
1350
1393
|
}
|
|
1351
1394
|
function detailText(value) {
|
|
1352
|
-
|
|
1353
|
-
return
|
|
1395
|
+
const text = (0, _mulmoclaude_core_collection.fieldText)(value, EM_DASH);
|
|
1396
|
+
return text === "" ? EM_DASH : text;
|
|
1354
1397
|
}
|
|
1355
1398
|
function formatCell(value, type) {
|
|
1356
1399
|
if (value === void 0 || value === null || value === "") return EM_DASH;
|
|
@@ -1374,7 +1417,7 @@ function resolveCurrency(field, record) {
|
|
|
1374
1417
|
function formatMoney(value, currency, displayLocale) {
|
|
1375
1418
|
if (value === void 0 || value === "") return EM_DASH;
|
|
1376
1419
|
const amount = typeof value === "number" ? value : Number(value);
|
|
1377
|
-
if (!Number.isFinite(amount)) return
|
|
1420
|
+
if (!Number.isFinite(amount)) return (0, _mulmoclaude_core_collection.fieldText)(value, EM_DASH);
|
|
1378
1421
|
const currencyCode = currency && currency.length > 0 ? currency : DEFAULT_CURRENCY;
|
|
1379
1422
|
try {
|
|
1380
1423
|
return new Intl.NumberFormat(displayLocale, {
|
|
@@ -1477,7 +1520,7 @@ function buildEmbedOptions(schema, items) {
|
|
|
1477
1520
|
const { fields, primaryKey } = schema;
|
|
1478
1521
|
const displayField = displayFieldFor(fields, primaryKey);
|
|
1479
1522
|
return items.map((item) => {
|
|
1480
|
-
const slug =
|
|
1523
|
+
const slug = (0, _mulmoclaude_core_collection.fieldText)(item[primaryKey]);
|
|
1481
1524
|
const labelRaw = item[displayField];
|
|
1482
1525
|
return {
|
|
1483
1526
|
slug,
|
|
@@ -1487,13 +1530,13 @@ function buildEmbedOptions(schema, items) {
|
|
|
1487
1530
|
}
|
|
1488
1531
|
//#endregion
|
|
1489
1532
|
//#region src/vue/components/CollectionMutateParamsModal.vue?vue&type=script&setup=true&lang.ts
|
|
1490
|
-
var _hoisted_1$
|
|
1491
|
-
var _hoisted_2$
|
|
1492
|
-
var _hoisted_3$
|
|
1533
|
+
var _hoisted_1$17 = { class: "flex items-center justify-between px-6 pt-5 pb-3" };
|
|
1534
|
+
var _hoisted_2$16 = { class: "text-sm font-bold text-slate-800 flex items-center gap-1.5" };
|
|
1535
|
+
var _hoisted_3$16 = {
|
|
1493
1536
|
key: 0,
|
|
1494
1537
|
class: "material-icons text-base text-indigo-600"
|
|
1495
1538
|
};
|
|
1496
|
-
var _hoisted_4$
|
|
1539
|
+
var _hoisted_4$16 = ["aria-label"];
|
|
1497
1540
|
var _hoisted_5$14 = { class: "flex flex-col gap-4 px-6 pb-2" };
|
|
1498
1541
|
var _hoisted_6$13 = ["for"];
|
|
1499
1542
|
var _hoisted_7$11 = {
|
|
@@ -1591,13 +1634,13 @@ var CollectionMutateParamsModal_default = /* @__PURE__ */ (0, vue.defineComponen
|
|
|
1591
1634
|
"data-testid": "collections-mutate-modal",
|
|
1592
1635
|
onSubmit: (0, vue.withModifiers)(submit, ["prevent"])
|
|
1593
1636
|
}, [
|
|
1594
|
-
(0, vue.createElementVNode)("div", _hoisted_1$
|
|
1637
|
+
(0, vue.createElementVNode)("div", _hoisted_1$17, [(0, vue.createElementVNode)("h2", _hoisted_2$16, [__props.action.icon ? ((0, vue.openBlock)(), (0, vue.createElementBlock)("span", _hoisted_3$16, (0, vue.toDisplayString)(__props.action.icon), 1)) : (0, vue.createCommentVNode)("", true), (0, vue.createElementVNode)("span", null, (0, vue.toDisplayString)(__props.action.label), 1)]), (0, vue.createElementVNode)("button", {
|
|
1595
1638
|
type: "button",
|
|
1596
1639
|
class: "h-8 w-8 flex items-center justify-center rounded text-slate-400 hover:bg-slate-100 hover:text-slate-600 transition-colors",
|
|
1597
1640
|
"aria-label": (0, vue.unref)(t)("common.close"),
|
|
1598
1641
|
"data-testid": "collections-mutate-close",
|
|
1599
1642
|
onClick: _cache[0] || (_cache[0] = ($event) => emit("close"))
|
|
1600
|
-
}, [..._cache[3] || (_cache[3] = [(0, vue.createElementVNode)("span", { class: "material-icons text-lg" }, "close", -1)])], 8, _hoisted_4$
|
|
1643
|
+
}, [..._cache[3] || (_cache[3] = [(0, vue.createElementVNode)("span", { class: "material-icons text-lg" }, "close", -1)])], 8, _hoisted_4$16)]),
|
|
1601
1644
|
(0, vue.createElementVNode)("div", _hoisted_5$14, [((0, vue.openBlock)(true), (0, vue.createElementBlock)(vue.Fragment, null, (0, vue.renderList)(__props.action.params, (spec, key) => {
|
|
1602
1645
|
return (0, vue.openBlock)(), (0, vue.createElementBlock)("div", {
|
|
1603
1646
|
key,
|
|
@@ -1662,13 +1705,13 @@ var CollectionMutateParamsModal_default = /* @__PURE__ */ (0, vue.defineComponen
|
|
|
1662
1705
|
});
|
|
1663
1706
|
//#endregion
|
|
1664
1707
|
//#region src/vue/components/CollectionCalendarView.vue?vue&type=script&setup=true&lang.ts
|
|
1665
|
-
var _hoisted_1$
|
|
1708
|
+
var _hoisted_1$16 = {
|
|
1666
1709
|
class: "flex flex-col gap-3",
|
|
1667
1710
|
"data-testid": "collection-calendar"
|
|
1668
1711
|
};
|
|
1669
|
-
var _hoisted_2$
|
|
1670
|
-
var _hoisted_3$
|
|
1671
|
-
var _hoisted_4$
|
|
1712
|
+
var _hoisted_2$15 = { class: "flex items-center gap-2" };
|
|
1713
|
+
var _hoisted_3$15 = ["aria-label"];
|
|
1714
|
+
var _hoisted_4$15 = ["aria-label"];
|
|
1672
1715
|
var _hoisted_5$13 = {
|
|
1673
1716
|
class: "text-sm font-bold text-slate-800 flex-1",
|
|
1674
1717
|
"data-testid": "collection-calendar-month"
|
|
@@ -1803,22 +1846,22 @@ var CollectionCalendarView_default = /* @__PURE__ */ (0, vue.defineComponent)({
|
|
|
1803
1846
|
viewMonth.value = now.getMonth() + 1;
|
|
1804
1847
|
}
|
|
1805
1848
|
return (_ctx, _cache) => {
|
|
1806
|
-
return (0, vue.openBlock)(), (0, vue.createElementBlock)("div", _hoisted_1$
|
|
1807
|
-
(0, vue.createElementVNode)("div", _hoisted_2$
|
|
1849
|
+
return (0, vue.openBlock)(), (0, vue.createElementBlock)("div", _hoisted_1$16, [
|
|
1850
|
+
(0, vue.createElementVNode)("div", _hoisted_2$15, [
|
|
1808
1851
|
(0, vue.createElementVNode)("button", {
|
|
1809
1852
|
type: "button",
|
|
1810
1853
|
class: "h-8 w-8 flex items-center justify-center rounded text-slate-500 hover:bg-slate-100 transition-colors",
|
|
1811
1854
|
"aria-label": (0, vue.unref)(t)("collectionsView.calendarPrevMonth"),
|
|
1812
1855
|
"data-testid": "collection-calendar-prev",
|
|
1813
1856
|
onClick: _cache[0] || (_cache[0] = ($event) => stepMonth(-1))
|
|
1814
|
-
}, [..._cache[2] || (_cache[2] = [(0, vue.createElementVNode)("span", { class: "material-icons text-lg" }, "chevron_left", -1)])], 8, _hoisted_3$
|
|
1857
|
+
}, [..._cache[2] || (_cache[2] = [(0, vue.createElementVNode)("span", { class: "material-icons text-lg" }, "chevron_left", -1)])], 8, _hoisted_3$15),
|
|
1815
1858
|
(0, vue.createElementVNode)("button", {
|
|
1816
1859
|
type: "button",
|
|
1817
1860
|
class: "h-8 w-8 flex items-center justify-center rounded text-slate-500 hover:bg-slate-100 transition-colors",
|
|
1818
1861
|
"aria-label": (0, vue.unref)(t)("collectionsView.calendarNextMonth"),
|
|
1819
1862
|
"data-testid": "collection-calendar-next",
|
|
1820
1863
|
onClick: _cache[1] || (_cache[1] = ($event) => stepMonth(1))
|
|
1821
|
-
}, [..._cache[3] || (_cache[3] = [(0, vue.createElementVNode)("span", { class: "material-icons text-lg" }, "chevron_right", -1)])], 8, _hoisted_4$
|
|
1864
|
+
}, [..._cache[3] || (_cache[3] = [(0, vue.createElementVNode)("span", { class: "material-icons text-lg" }, "chevron_right", -1)])], 8, _hoisted_4$15),
|
|
1822
1865
|
(0, vue.createElementVNode)("h3", _hoisted_5$13, (0, vue.toDisplayString)(monthLabel.value), 1),
|
|
1823
1866
|
(0, vue.createElementVNode)("button", {
|
|
1824
1867
|
type: "button",
|
|
@@ -1868,13 +1911,13 @@ var CollectionCalendarView_default = /* @__PURE__ */ (0, vue.defineComponent)({
|
|
|
1868
1911
|
});
|
|
1869
1912
|
//#endregion
|
|
1870
1913
|
//#region src/vue/components/CollectionDayView.vue?vue&type=script&setup=true&lang.ts
|
|
1871
|
-
var _hoisted_1$
|
|
1872
|
-
var _hoisted_2$
|
|
1914
|
+
var _hoisted_1$15 = { class: "flex items-center gap-2 border-b border-slate-200 px-4 py-3" };
|
|
1915
|
+
var _hoisted_2$14 = {
|
|
1873
1916
|
class: "flex-1 text-sm font-bold text-slate-800",
|
|
1874
1917
|
"data-testid": "collection-day-view-title"
|
|
1875
1918
|
};
|
|
1876
|
-
var _hoisted_3$
|
|
1877
|
-
var _hoisted_4$
|
|
1919
|
+
var _hoisted_3$14 = ["aria-label"];
|
|
1920
|
+
var _hoisted_4$14 = ["aria-label"];
|
|
1878
1921
|
var _hoisted_5$12 = {
|
|
1879
1922
|
key: 0,
|
|
1880
1923
|
class: "px-4 py-10 text-center text-sm text-slate-400"
|
|
@@ -2062,8 +2105,8 @@ var CollectionDayView_default = /* @__PURE__ */ (0, vue.defineComponent)({
|
|
|
2062
2105
|
role: "dialog",
|
|
2063
2106
|
"aria-modal": "true"
|
|
2064
2107
|
}, [(0, vue.createElementVNode)("div", { class: (0, vue.normalizeClass)(["flex min-h-0 flex-col", __props.showDetail ? "w-80 shrink-0 border-r border-slate-200" : "w-full"]) }, [
|
|
2065
|
-
(0, vue.createElementVNode)("div", _hoisted_1$
|
|
2066
|
-
(0, vue.createElementVNode)("h3", _hoisted_2$
|
|
2108
|
+
(0, vue.createElementVNode)("div", _hoisted_1$15, [
|
|
2109
|
+
(0, vue.createElementVNode)("h3", _hoisted_2$14, (0, vue.toDisplayString)(dayLabel.value), 1),
|
|
2067
2110
|
__props.canCreate ? ((0, vue.openBlock)(), (0, vue.createElementBlock)("button", {
|
|
2068
2111
|
key: 0,
|
|
2069
2112
|
type: "button",
|
|
@@ -2071,14 +2114,14 @@ var CollectionDayView_default = /* @__PURE__ */ (0, vue.defineComponent)({
|
|
|
2071
2114
|
"aria-label": (0, vue.unref)(t)("collectionsView.calendarCreateOn", { date: dayKey.value }),
|
|
2072
2115
|
"data-testid": "collection-day-view-create",
|
|
2073
2116
|
onClick: onCreate
|
|
2074
|
-
}, [..._cache[3] || (_cache[3] = [(0, vue.createElementVNode)("span", { class: "material-icons text-lg" }, "add", -1)])], 8, _hoisted_3$
|
|
2117
|
+
}, [..._cache[3] || (_cache[3] = [(0, vue.createElementVNode)("span", { class: "material-icons text-lg" }, "add", -1)])], 8, _hoisted_3$14)) : (0, vue.createCommentVNode)("", true),
|
|
2075
2118
|
(0, vue.createElementVNode)("button", {
|
|
2076
2119
|
type: "button",
|
|
2077
2120
|
class: "h-8 w-8 flex items-center justify-center rounded text-slate-500 hover:bg-slate-100 transition-colors",
|
|
2078
2121
|
"aria-label": (0, vue.unref)(t)("collectionsView.dayViewClose"),
|
|
2079
2122
|
"data-testid": "collection-day-view-close",
|
|
2080
2123
|
onClick: _cache[0] || (_cache[0] = ($event) => emit("close"))
|
|
2081
|
-
}, [..._cache[4] || (_cache[4] = [(0, vue.createElementVNode)("span", { class: "material-icons text-lg" }, "close", -1)])], 8, _hoisted_4$
|
|
2124
|
+
}, [..._cache[4] || (_cache[4] = [(0, vue.createElementVNode)("span", { class: "material-icons text-lg" }, "close", -1)])], 8, _hoisted_4$14)
|
|
2082
2125
|
]),
|
|
2083
2126
|
timedEntries.value.length === 0 && allDayEntries.value.length === 0 ? ((0, vue.openBlock)(), (0, vue.createElementBlock)("div", _hoisted_5$12, (0, vue.toDisplayString)((0, vue.unref)(t)("collectionsView.dayViewEmpty")), 1)) : ((0, vue.openBlock)(), (0, vue.createElementBlock)("div", {
|
|
2084
2127
|
key: 1,
|
|
@@ -2129,13 +2172,13 @@ var CollectionDayView_default = /* @__PURE__ */ (0, vue.defineComponent)({
|
|
|
2129
2172
|
});
|
|
2130
2173
|
//#endregion
|
|
2131
2174
|
//#region src/vue/components/CollectionKanbanView.vue?vue&type=script&setup=true&lang.ts
|
|
2132
|
-
var _hoisted_1$
|
|
2175
|
+
var _hoisted_1$14 = {
|
|
2133
2176
|
class: "h-full overflow-x-auto overflow-y-hidden",
|
|
2134
2177
|
"data-testid": "collection-kanban"
|
|
2135
2178
|
};
|
|
2136
|
-
var _hoisted_2$
|
|
2137
|
-
var _hoisted_3$
|
|
2138
|
-
var _hoisted_4$
|
|
2179
|
+
var _hoisted_2$13 = { class: "flex gap-3 h-full p-1 min-w-max" };
|
|
2180
|
+
var _hoisted_3$13 = ["data-testid"];
|
|
2181
|
+
var _hoisted_4$13 = { class: "flex items-center justify-between px-3 py-2 border-b border-slate-200" };
|
|
2139
2182
|
var _hoisted_5$11 = { class: "flex items-center gap-2 min-w-0" };
|
|
2140
2183
|
var _hoisted_6$10 = ["title"];
|
|
2141
2184
|
var _hoisted_7$8 = { class: "text-[11px] text-slate-400 shrink-0" };
|
|
@@ -2257,12 +2300,12 @@ var CollectionKanbanView_default = /* @__PURE__ */ (0, vue.defineComponent)({
|
|
|
2257
2300
|
emit("move", itemId(item), next);
|
|
2258
2301
|
}
|
|
2259
2302
|
return (_ctx, _cache) => {
|
|
2260
|
-
return (0, vue.openBlock)(), (0, vue.createElementBlock)("div", _hoisted_1$
|
|
2303
|
+
return (0, vue.openBlock)(), (0, vue.createElementBlock)("div", _hoisted_1$14, [(0, vue.createElementVNode)("div", _hoisted_2$13, [((0, vue.openBlock)(true), (0, vue.createElementBlock)(vue.Fragment, null, (0, vue.renderList)(columns.value, (column) => {
|
|
2261
2304
|
return (0, vue.openBlock)(), (0, vue.createElementBlock)("div", {
|
|
2262
2305
|
key: column.value,
|
|
2263
2306
|
"data-testid": `collection-kanban-column-${column.value || "uncategorized"}`,
|
|
2264
2307
|
class: "w-72 shrink-0 flex flex-col bg-slate-100 rounded-lg"
|
|
2265
|
-
}, [(0, vue.createElementVNode)("div", _hoisted_4$
|
|
2308
|
+
}, [(0, vue.createElementVNode)("div", _hoisted_4$13, [(0, vue.createElementVNode)("div", _hoisted_5$11, [(0, vue.createElementVNode)("span", { class: (0, vue.normalizeClass)(["w-2 h-2 rounded-full shrink-0", (0, vue.unref)(_mulmoclaude_core_collection.resolveEnumColor)(__props.schema, __props.groupField, column.value).dot]) }, null, 2), (0, vue.createElementVNode)("span", {
|
|
2266
2309
|
class: "font-semibold text-xs text-slate-600 truncate",
|
|
2267
2310
|
title: column.label
|
|
2268
2311
|
}, (0, vue.toDisplayString)(column.label), 9, _hoisted_6$10)]), (0, vue.createElementVNode)("span", _hoisted_7$8, (0, vue.toDisplayString)(itemsByColumn(column.value).length), 1)]), (0, vue.createVNode)((0, vue.unref)(vuedraggable.default), {
|
|
@@ -2298,7 +2341,7 @@ var CollectionKanbanView_default = /* @__PURE__ */ (0, vue.defineComponent)({
|
|
|
2298
2341
|
"item-key",
|
|
2299
2342
|
"disabled",
|
|
2300
2343
|
"onChange"
|
|
2301
|
-
])], 8, _hoisted_3$
|
|
2344
|
+
])], 8, _hoisted_3$13);
|
|
2302
2345
|
}), 128))])]);
|
|
2303
2346
|
};
|
|
2304
2347
|
}
|
|
@@ -2328,10 +2371,10 @@ function activatePathLink(event, path, stop = false) {
|
|
|
2328
2371
|
}
|
|
2329
2372
|
//#endregion
|
|
2330
2373
|
//#region src/vue/components/CollectionBacklinksView.vue?vue&type=script&setup=true&lang.ts
|
|
2331
|
-
var _hoisted_1$
|
|
2332
|
-
var _hoisted_2$
|
|
2333
|
-
var _hoisted_3$
|
|
2334
|
-
var _hoisted_4$
|
|
2374
|
+
var _hoisted_1$13 = ["data-testid"];
|
|
2375
|
+
var _hoisted_2$12 = { class: "w-full text-[11px] text-slate-600 bg-white" };
|
|
2376
|
+
var _hoisted_3$12 = { class: "bg-slate-50 border-b border-slate-200 text-slate-500 font-bold uppercase tracking-wider" };
|
|
2377
|
+
var _hoisted_4$12 = { class: "divide-y divide-slate-100" };
|
|
2335
2378
|
var _hoisted_5$10 = [
|
|
2336
2379
|
"data-testid",
|
|
2337
2380
|
"onClick",
|
|
@@ -2353,12 +2396,12 @@ var CollectionBacklinksView_default = /* @__PURE__ */ (0, vue.defineComponent)({
|
|
|
2353
2396
|
key: 0,
|
|
2354
2397
|
class: "border border-slate-200/80 rounded-xl overflow-hidden shadow-sm mt-1",
|
|
2355
2398
|
"data-testid": `collections-backlinks-${__props.fieldKey}`
|
|
2356
|
-
}, [(0, vue.createElementVNode)("table", _hoisted_2$
|
|
2399
|
+
}, [(0, vue.createElementVNode)("table", _hoisted_2$12, [(0, vue.createElementVNode)("thead", _hoisted_3$12, [(0, vue.createElementVNode)("tr", null, [((0, vue.openBlock)(true), (0, vue.createElementBlock)(vue.Fragment, null, (0, vue.renderList)(__props.view.columns, (column) => {
|
|
2357
2400
|
return (0, vue.openBlock)(), (0, vue.createElementBlock)("th", {
|
|
2358
2401
|
key: column.key,
|
|
2359
2402
|
class: "text-left px-4 py-2 font-bold"
|
|
2360
2403
|
}, (0, vue.toDisplayString)(column.label), 1);
|
|
2361
|
-
}), 128))])]), (0, vue.createElementVNode)("tbody", _hoisted_4$
|
|
2404
|
+
}), 128))])]), (0, vue.createElementVNode)("tbody", _hoisted_4$12, [((0, vue.openBlock)(true), (0, vue.createElementBlock)(vue.Fragment, null, (0, vue.renderList)(__props.view.rows, (row) => {
|
|
2362
2405
|
return (0, vue.openBlock)(), (0, vue.createElementBlock)("tr", {
|
|
2363
2406
|
key: row.id,
|
|
2364
2407
|
class: "group hover:bg-indigo-50/30 cursor-pointer transition-colors",
|
|
@@ -2373,7 +2416,7 @@ var CollectionBacklinksView_default = /* @__PURE__ */ (0, vue.defineComponent)({
|
|
|
2373
2416
|
class: "px-4 py-2 align-middle font-medium"
|
|
2374
2417
|
}, [(0, vue.createElementVNode)("span", { class: (0, vue.normalizeClass)(cellIdx === 0 ? "text-indigo-600 group-hover:text-indigo-800 font-bold" : "") }, (0, vue.toDisplayString)(cell), 3)]);
|
|
2375
2418
|
}), 128))], 40, _hoisted_5$10);
|
|
2376
|
-
}), 128))])])], 8, _hoisted_1$
|
|
2419
|
+
}), 128))])])], 8, _hoisted_1$13)) : ((0, vue.openBlock)(), (0, vue.createElementBlock)("span", {
|
|
2377
2420
|
key: 1,
|
|
2378
2421
|
class: "text-slate-400 italic",
|
|
2379
2422
|
"data-testid": `collections-backlinks-${__props.fieldKey}`
|
|
@@ -2383,14 +2426,14 @@ var CollectionBacklinksView_default = /* @__PURE__ */ (0, vue.defineComponent)({
|
|
|
2383
2426
|
});
|
|
2384
2427
|
//#endregion
|
|
2385
2428
|
//#region src/vue/components/CollectionEmbedView.vue?vue&type=script&setup=true&lang.ts
|
|
2386
|
-
var _hoisted_1$
|
|
2429
|
+
var _hoisted_1$12 = [
|
|
2387
2430
|
"href",
|
|
2388
2431
|
"tabindex",
|
|
2389
2432
|
"data-testid"
|
|
2390
2433
|
];
|
|
2391
|
-
var _hoisted_2$
|
|
2392
|
-
var _hoisted_3$
|
|
2393
|
-
var _hoisted_4$
|
|
2434
|
+
var _hoisted_2$11 = { class: "flex items-center justify-between text-[10px] font-bold text-indigo-600/90 tracking-wider uppercase" };
|
|
2435
|
+
var _hoisted_3$11 = { class: "flex items-center gap-1.5" };
|
|
2436
|
+
var _hoisted_4$11 = { class: "bg-indigo-100/60 text-indigo-700 px-1.5 py-0.5 rounded font-mono font-medium lowercase" };
|
|
2394
2437
|
var _hoisted_5$9 = { class: "grid gap-x-4 gap-y-3 grid-cols-2" };
|
|
2395
2438
|
var _hoisted_6$8 = { class: "text-[10px] font-semibold text-slate-400 uppercase tracking-wide" };
|
|
2396
2439
|
var _hoisted_7$7 = ["data-testid"];
|
|
@@ -2436,7 +2479,7 @@ var CollectionEmbedView_default = /* @__PURE__ */ (0, vue.defineComponent)({
|
|
|
2436
2479
|
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"]))]
|
|
2437
2480
|
}, [
|
|
2438
2481
|
_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)),
|
|
2439
|
-
(0, vue.createElementVNode)("div", _hoisted_2$
|
|
2482
|
+
(0, vue.createElementVNode)("div", _hoisted_2$11, [(0, vue.createElementVNode)("div", _hoisted_3$11, [_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$11, (0, vue.toDisplayString)(__props.view.recordId), 1)]),
|
|
2440
2483
|
(0, vue.createElementVNode)("div", _hoisted_5$9, [((0, vue.openBlock)(true), (0, vue.createElementBlock)(vue.Fragment, null, (0, vue.renderList)(__props.view.rows, (row) => {
|
|
2441
2484
|
return (0, vue.openBlock)(), (0, vue.createElementBlock)("div", {
|
|
2442
2485
|
key: row.key,
|
|
@@ -2446,7 +2489,7 @@ var CollectionEmbedView_default = /* @__PURE__ */ (0, vue.defineComponent)({
|
|
|
2446
2489
|
"data-testid": `collections-embed-${__props.fieldKey}-${row.key}`
|
|
2447
2490
|
}, [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$7, "check_circle")) : ((0, vue.openBlock)(), (0, vue.createElementBlock)("span", _hoisted_9$7, "—"))], 64)) : row.type === "markdown" ? ((0, vue.openBlock)(), (0, vue.createElementBlock)("p", _hoisted_10$7, (0, vue.toDisplayString)(row.display), 1)) : ((0, vue.openBlock)(), (0, vue.createElementBlock)("span", _hoisted_11$7, (0, vue.toDisplayString)(row.display), 1))], 8, _hoisted_7$7)]);
|
|
2448
2491
|
}), 128))])
|
|
2449
|
-
], 40, _hoisted_1$
|
|
2492
|
+
], 40, _hoisted_1$12)) : ((0, vue.openBlock)(), (0, vue.createElementBlock)("div", {
|
|
2450
2493
|
key: 1,
|
|
2451
2494
|
class: "relative rounded-xl border border-red-100 bg-red-50/30 p-4 pl-5 shadow-sm",
|
|
2452
2495
|
"data-testid": `collections-embed-${__props.fieldKey}`
|
|
@@ -2474,10 +2517,10 @@ var CollectionEmbedView_default = /* @__PURE__ */ (0, vue.defineComponent)({
|
|
|
2474
2517
|
});
|
|
2475
2518
|
//#endregion
|
|
2476
2519
|
//#region src/vue/components/CollectionRecordPanel.vue?vue&type=script&setup=true&lang.ts
|
|
2477
|
-
var _hoisted_1$
|
|
2478
|
-
var _hoisted_2$
|
|
2479
|
-
var _hoisted_3$
|
|
2480
|
-
var _hoisted_4$
|
|
2520
|
+
var _hoisted_1$11 = { class: "flex items-center gap-2 mb-4" };
|
|
2521
|
+
var _hoisted_2$10 = { class: "flex-1 min-w-0" };
|
|
2522
|
+
var _hoisted_3$10 = { class: "block text-[9px] font-bold text-slate-400 uppercase tracking-wider" };
|
|
2523
|
+
var _hoisted_4$10 = ["data-testid"];
|
|
2481
2524
|
var _hoisted_5$8 = ["disabled"];
|
|
2482
2525
|
var _hoisted_6$7 = {
|
|
2483
2526
|
key: 1,
|
|
@@ -2855,10 +2898,10 @@ var CollectionRecordPanel_default = /* @__PURE__ */ (0, vue.defineComponent)({
|
|
|
2855
2898
|
onSubmit: _cache[5] || (_cache[5] = (0, vue.withModifiers)(($event) => emit("submit"), ["prevent"]))
|
|
2856
2899
|
}, {
|
|
2857
2900
|
default: (0, vue.withCtx)(() => [
|
|
2858
|
-
(0, vue.createElementVNode)("div", _hoisted_1$
|
|
2901
|
+
(0, vue.createElementVNode)("div", _hoisted_1$11, [(0, vue.createElementVNode)("div", _hoisted_2$10, [(0, vue.createElementVNode)("span", _hoisted_3$10, (0, vue.toDisplayString)(__props.collection.title), 1), (0, vue.createElementVNode)("h2", {
|
|
2859
2902
|
class: "text-base font-bold text-slate-800 truncate",
|
|
2860
2903
|
"data-testid": editing.value ? "collections-edit-title" : "collections-detail-title"
|
|
2861
|
-
}, (0, vue.toDisplayString)(headerTitle.value), 9, _hoisted_4$
|
|
2904
|
+
}, (0, vue.toDisplayString)(headerTitle.value), 9, _hoisted_4$10)]), editing.value ? ((0, vue.openBlock)(), (0, vue.createElementBlock)(vue.Fragment, { key: 0 }, [(0, vue.createElementVNode)("button", {
|
|
2862
2905
|
type: "button",
|
|
2863
2906
|
class: "h-8 px-2.5 rounded text-xs font-bold text-slate-500 hover:bg-slate-200/50 transition-colors",
|
|
2864
2907
|
"data-testid": "collections-editor-cancel",
|
|
@@ -3167,13 +3210,13 @@ var CollectionRecordPanel_default = /* @__PURE__ */ (0, vue.defineComponent)({
|
|
|
3167
3210
|
});
|
|
3168
3211
|
//#endregion
|
|
3169
3212
|
//#region src/vue/components/CollectionViewConfigModal.vue?vue&type=script&setup=true&lang.ts
|
|
3170
|
-
var _hoisted_1$
|
|
3213
|
+
var _hoisted_1$10 = {
|
|
3171
3214
|
"data-testid": "collection-config-modal",
|
|
3172
3215
|
class: "flex flex-col overflow-hidden"
|
|
3173
3216
|
};
|
|
3174
|
-
var _hoisted_2$
|
|
3175
|
-
var _hoisted_3$
|
|
3176
|
-
var _hoisted_4$
|
|
3217
|
+
var _hoisted_2$9 = { class: "flex items-center justify-between gap-2 border-b border-slate-100 px-5 py-3" };
|
|
3218
|
+
var _hoisted_3$9 = { class: "text-sm font-bold text-slate-700" };
|
|
3219
|
+
var _hoisted_4$9 = ["title", "aria-label"];
|
|
3177
3220
|
var _hoisted_5$7 = { class: "overflow-y-auto px-5 py-4" };
|
|
3178
3221
|
var _hoisted_6$6 = { class: "mb-2 text-[10px] font-bold uppercase tracking-wider text-slate-400" };
|
|
3179
3222
|
var _hoisted_7$5 = {
|
|
@@ -3239,14 +3282,14 @@ var CollectionViewConfigModal_default = /* @__PURE__ */ (0, vue.defineComponent)
|
|
|
3239
3282
|
}
|
|
3240
3283
|
return (_ctx, _cache) => {
|
|
3241
3284
|
return (0, vue.openBlock)(), (0, vue.createBlock)(CollectionRecordModal_default, { onClose: _cache[1] || (_cache[1] = ($event) => emit("close")) }, {
|
|
3242
|
-
default: (0, vue.withCtx)(() => [(0, vue.createElementVNode)("div", _hoisted_1$
|
|
3285
|
+
default: (0, vue.withCtx)(() => [(0, vue.createElementVNode)("div", _hoisted_1$10, [(0, vue.createElementVNode)("header", _hoisted_2$9, [(0, vue.createElementVNode)("h2", _hoisted_3$9, (0, vue.toDisplayString)((0, vue.unref)(t)("collectionsView.config.title", { title: __props.title })), 1), (0, vue.createElementVNode)("button", {
|
|
3243
3286
|
type: "button",
|
|
3244
3287
|
class: "h-8 w-8 flex items-center justify-center rounded text-slate-400 hover:bg-slate-50 hover:text-slate-600",
|
|
3245
3288
|
title: (0, vue.unref)(t)("common.close"),
|
|
3246
3289
|
"aria-label": (0, vue.unref)(t)("common.close"),
|
|
3247
3290
|
"data-testid": "collection-config-close",
|
|
3248
3291
|
onClick: _cache[0] || (_cache[0] = ($event) => emit("close"))
|
|
3249
|
-
}, [..._cache[2] || (_cache[2] = [(0, vue.createElementVNode)("span", { class: "material-icons text-sm" }, "close", -1)])], 8, _hoisted_4$
|
|
3292
|
+
}, [..._cache[2] || (_cache[2] = [(0, vue.createElementVNode)("span", { class: "material-icons text-sm" }, "close", -1)])], 8, _hoisted_4$9)]), (0, vue.createElementVNode)("div", _hoisted_5$7, [
|
|
3250
3293
|
(0, vue.createElementVNode)("h3", _hoisted_6$6, (0, vue.toDisplayString)((0, vue.unref)(t)("collectionsView.config.viewsHeading")), 1),
|
|
3251
3294
|
error.value ? ((0, vue.openBlock)(), (0, vue.createElementBlock)("p", _hoisted_7$5, (0, vue.toDisplayString)(error.value), 1)) : (0, vue.createCommentVNode)("", true),
|
|
3252
3295
|
__props.views.length > 0 ? ((0, vue.openBlock)(), (0, vue.createElementBlock)("ul", _hoisted_8$5, [((0, vue.openBlock)(true), (0, vue.createElementBlock)(vue.Fragment, null, (0, vue.renderList)(__props.views, (view) => {
|
|
@@ -3275,19 +3318,19 @@ var CollectionViewConfigModal_default = /* @__PURE__ */ (0, vue.defineComponent)
|
|
|
3275
3318
|
});
|
|
3276
3319
|
//#endregion
|
|
3277
3320
|
//#region src/vue/components/CollectionCustomView.vue?vue&type=script&setup=true&lang.ts
|
|
3278
|
-
var _hoisted_1$
|
|
3279
|
-
var _hoisted_2$
|
|
3321
|
+
var _hoisted_1$9 = { class: "custom-view-container" };
|
|
3322
|
+
var _hoisted_2$8 = {
|
|
3280
3323
|
key: 0,
|
|
3281
3324
|
class: "custom-view-message",
|
|
3282
3325
|
role: "alert",
|
|
3283
3326
|
"data-testid": "collection-custom-view-error"
|
|
3284
3327
|
};
|
|
3285
|
-
var _hoisted_3$
|
|
3328
|
+
var _hoisted_3$8 = {
|
|
3286
3329
|
key: 1,
|
|
3287
3330
|
class: "custom-view-message",
|
|
3288
3331
|
"data-testid": "collection-custom-view-loading"
|
|
3289
3332
|
};
|
|
3290
|
-
var _hoisted_4$
|
|
3333
|
+
var _hoisted_4$8 = ["title", "srcdoc"];
|
|
3291
3334
|
var REMINT_LEAD_MS = 6e4;
|
|
3292
3335
|
var MIN_REMINT_DELAY_MS = 1e4;
|
|
3293
3336
|
var CollectionCustomView_vue_vue_type_script_setup_true_lang_default = /*@__PURE__*/ (0, vue.defineComponent)({
|
|
@@ -3409,7 +3452,7 @@ var CollectionCustomView_vue_vue_type_script_setup_true_lang_default = /*@__PURE
|
|
|
3409
3452
|
window.removeEventListener("message", onWindowMessage);
|
|
3410
3453
|
});
|
|
3411
3454
|
return (_ctx, _cache) => {
|
|
3412
|
-
return (0, vue.openBlock)(), (0, vue.createElementBlock)("div", _hoisted_1$
|
|
3455
|
+
return (0, vue.openBlock)(), (0, vue.createElementBlock)("div", _hoisted_1$9, [error.value ? ((0, vue.openBlock)(), (0, vue.createElementBlock)("div", _hoisted_2$8, (0, vue.toDisplayString)((0, vue.unref)(t)("collectionsView.customViewError", { error: error.value })), 1)) : loading.value ? ((0, vue.openBlock)(), (0, vue.createElementBlock)("div", _hoisted_3$8, (0, vue.toDisplayString)((0, vue.unref)(t)("collectionsView.customViewLoading")), 1)) : srcdoc.value ? ((0, vue.openBlock)(), (0, vue.createElementBlock)("iframe", {
|
|
3413
3456
|
ref_key: "iframeEl",
|
|
3414
3457
|
ref: iframeEl,
|
|
3415
3458
|
key: __props.view.id,
|
|
@@ -3418,7 +3461,7 @@ var CollectionCustomView_vue_vue_type_script_setup_true_lang_default = /*@__PURE
|
|
|
3418
3461
|
srcdoc: srcdoc.value,
|
|
3419
3462
|
sandbox: "allow-scripts allow-popups allow-popups-to-escape-sandbox allow-downloads",
|
|
3420
3463
|
class: "w-full h-full border-0"
|
|
3421
|
-
}, null, 8, _hoisted_4$
|
|
3464
|
+
}, null, 8, _hoisted_4$8)) : (0, vue.createCommentVNode)("", true)]);
|
|
3422
3465
|
};
|
|
3423
3466
|
}
|
|
3424
3467
|
});
|
|
@@ -3434,22 +3477,22 @@ var _plugin_vue_export_helper_default = (sfc, props) => {
|
|
|
3434
3477
|
var CollectionCustomView_default = /*#__PURE__*/ _plugin_vue_export_helper_default(CollectionCustomView_vue_vue_type_script_setup_true_lang_default, [["__scopeId", "data-v-02ff1e01"]]);
|
|
3435
3478
|
//#endregion
|
|
3436
3479
|
//#region src/vue/components/CollectionRemoteViewPreview.vue?vue&type=script&setup=true&lang.ts
|
|
3437
|
-
var _hoisted_1$
|
|
3480
|
+
var _hoisted_1$8 = {
|
|
3438
3481
|
class: "remote-preview-container",
|
|
3439
3482
|
"data-testid": "collection-remote-view-preview"
|
|
3440
3483
|
};
|
|
3441
|
-
var _hoisted_2$
|
|
3484
|
+
var _hoisted_2$7 = {
|
|
3442
3485
|
key: 0,
|
|
3443
3486
|
class: "remote-preview-message",
|
|
3444
3487
|
role: "alert",
|
|
3445
3488
|
"data-testid": "collection-remote-view-error"
|
|
3446
3489
|
};
|
|
3447
|
-
var _hoisted_3$
|
|
3490
|
+
var _hoisted_3$7 = {
|
|
3448
3491
|
key: 1,
|
|
3449
3492
|
class: "remote-preview-message",
|
|
3450
3493
|
"data-testid": "collection-remote-view-loading"
|
|
3451
3494
|
};
|
|
3452
|
-
var _hoisted_4$
|
|
3495
|
+
var _hoisted_4$7 = { class: "phone-frame" };
|
|
3453
3496
|
var _hoisted_5$6 = ["title", "srcdoc"];
|
|
3454
3497
|
var _hoisted_6$5 = {
|
|
3455
3498
|
class: "remote-preview-caption",
|
|
@@ -3546,7 +3589,7 @@ var CollectionRemoteViewPreview_default = /*#__PURE__*/ _plugin_vue_export_helpe
|
|
|
3546
3589
|
(0, vue.onMounted)(() => window.addEventListener("message", onWindowMessage));
|
|
3547
3590
|
(0, vue.onBeforeUnmount)(() => window.removeEventListener("message", onWindowMessage));
|
|
3548
3591
|
return (_ctx, _cache) => {
|
|
3549
|
-
return (0, vue.openBlock)(), (0, vue.createElementBlock)("div", _hoisted_1$
|
|
3592
|
+
return (0, vue.openBlock)(), (0, vue.createElementBlock)("div", _hoisted_1$8, [error.value ? ((0, vue.openBlock)(), (0, vue.createElementBlock)("div", _hoisted_2$7, (0, vue.toDisplayString)((0, vue.unref)(t)("collectionsView.customViewError", { error: error.value })), 1)) : loading.value ? ((0, vue.openBlock)(), (0, vue.createElementBlock)("div", _hoisted_3$7, (0, vue.toDisplayString)((0, vue.unref)(t)("collectionsView.customViewLoading")), 1)) : srcdoc.value ? ((0, vue.openBlock)(), (0, vue.createElementBlock)(vue.Fragment, { key: 2 }, [(0, vue.createElementVNode)("div", _hoisted_4$7, [((0, vue.openBlock)(), (0, vue.createElementBlock)("iframe", {
|
|
3550
3593
|
ref_key: "iframeEl",
|
|
3551
3594
|
ref: iframeEl,
|
|
3552
3595
|
key: __props.view.id,
|
|
@@ -3673,7 +3716,7 @@ function resolveEmbed(field, record, embedCache) {
|
|
|
3673
3716
|
schema: null,
|
|
3674
3717
|
item: null
|
|
3675
3718
|
};
|
|
3676
|
-
const item = data.items.find((entry) =>
|
|
3719
|
+
const item = data.items.find((entry) => (0, _mulmoclaude_core_collection.fieldText)(entry[data.schema.primaryKey]) === targetId) ?? null;
|
|
3677
3720
|
return {
|
|
3678
3721
|
schema: data.schema,
|
|
3679
3722
|
item
|
|
@@ -3755,8 +3798,8 @@ function buildBacklinksViews(schema, embedCache, record, locale) {
|
|
|
3755
3798
|
out[key] = {
|
|
3756
3799
|
found: true,
|
|
3757
3800
|
columns,
|
|
3758
|
-
rows: (0, _mulmoclaude_core_collection.backlinkRows)(field,
|
|
3759
|
-
id:
|
|
3801
|
+
rows: (0, _mulmoclaude_core_collection.backlinkRows)(field, (0, _mulmoclaude_core_collection.fieldText)(record?.[schema.primaryKey]), derivedSourceItems(embedCache, field.from) ?? []).map((row) => ({
|
|
3802
|
+
id: (0, _mulmoclaude_core_collection.fieldText)(row[data.schema.primaryKey]),
|
|
3760
3803
|
cells: columns.map((column) => formatBacklinkCell(data.schema.fields[column.key], row[column.key], row, locale))
|
|
3761
3804
|
})),
|
|
3762
3805
|
fromSlug: field.from
|
|
@@ -3789,7 +3832,7 @@ function rollupValueFor(field, record, schema, embedCache) {
|
|
|
3789
3832
|
if (field.type !== "rollup" || !schema || !record) return null;
|
|
3790
3833
|
const items = derivedSourceItems(embedCache, field.from);
|
|
3791
3834
|
if (items === null) return null;
|
|
3792
|
-
return (0, _mulmoclaude_core_collection.rollupValue)(field,
|
|
3835
|
+
return (0, _mulmoclaude_core_collection.rollupValue)(field, (0, _mulmoclaude_core_collection.fieldText)(record[schema.primaryKey]), items);
|
|
3793
3836
|
}
|
|
3794
3837
|
/** Display string for a rollup cell: the aggregate as a plain number,
|
|
3795
3838
|
* em-dash when the source collection couldn't be resolved. */
|
|
@@ -3987,13 +4030,13 @@ function writeCollectionFlagFilters(slug, filters) {
|
|
|
3987
4030
|
}
|
|
3988
4031
|
//#endregion
|
|
3989
4032
|
//#region src/vue/components/CollectionView.vue?vue&type=script&setup=true&lang.ts
|
|
3990
|
-
var _hoisted_1$
|
|
3991
|
-
var _hoisted_2$
|
|
4033
|
+
var _hoisted_1$7 = { class: "h-full flex flex-col bg-slate-50/30" };
|
|
4034
|
+
var _hoisted_2$6 = {
|
|
3992
4035
|
key: 0,
|
|
3993
4036
|
class: "flex items-center gap-3 px-6 py-2 border-b border-slate-200 bg-white"
|
|
3994
4037
|
};
|
|
3995
|
-
var _hoisted_3$
|
|
3996
|
-
var _hoisted_4$
|
|
4038
|
+
var _hoisted_3$6 = ["title", "aria-label"];
|
|
4039
|
+
var _hoisted_4$6 = {
|
|
3997
4040
|
key: 1,
|
|
3998
4041
|
class: "h-9 w-9 flex items-center justify-center rounded-xl bg-indigo-50 text-indigo-600 border border-indigo-100"
|
|
3999
4042
|
};
|
|
@@ -5598,8 +5641,8 @@ var CollectionView_default = /* @__PURE__ */ (0, vue.defineComponent)({
|
|
|
5598
5641
|
openDay.value = viewing.value ? dayOfItem(viewing.value) : null;
|
|
5599
5642
|
});
|
|
5600
5643
|
return (_ctx, _cache) => {
|
|
5601
|
-
return (0, vue.openBlock)(), (0, vue.createElementBlock)("div", _hoisted_1$
|
|
5602
|
-
!__props.hideHeader ? ((0, vue.openBlock)(), (0, vue.createElementBlock)("header", _hoisted_2$
|
|
5644
|
+
return (0, vue.openBlock)(), (0, vue.createElementBlock)("div", _hoisted_1$7, [
|
|
5645
|
+
!__props.hideHeader ? ((0, vue.openBlock)(), (0, vue.createElementBlock)("header", _hoisted_2$6, [
|
|
5603
5646
|
!embedded.value ? ((0, vue.openBlock)(), (0, vue.createElementBlock)("button", {
|
|
5604
5647
|
key: 0,
|
|
5605
5648
|
type: "button",
|
|
@@ -5608,8 +5651,8 @@ var CollectionView_default = /* @__PURE__ */ (0, vue.defineComponent)({
|
|
|
5608
5651
|
"aria-label": (0, vue.unref)(t)("collectionsView.backToIndex"),
|
|
5609
5652
|
"data-testid": "collections-back",
|
|
5610
5653
|
onClick: goBack
|
|
5611
|
-
}, [..._cache[28] || (_cache[28] = [(0, vue.createElementVNode)("span", { class: "material-icons text-lg" }, "arrow_back", -1)])], 8, _hoisted_3$
|
|
5612
|
-
collection.value ? ((0, vue.openBlock)(), (0, vue.createElementBlock)("div", _hoisted_4$
|
|
5654
|
+
}, [..._cache[28] || (_cache[28] = [(0, vue.createElementVNode)("span", { class: "material-icons text-lg" }, "arrow_back", -1)])], 8, _hoisted_3$6)) : (0, vue.createCommentVNode)("", true),
|
|
5655
|
+
collection.value ? ((0, vue.openBlock)(), (0, vue.createElementBlock)("div", _hoisted_4$6, [(0, vue.createElementVNode)("span", _hoisted_5$5, (0, vue.toDisplayString)(collection.value.icon), 1)])) : (0, vue.createCommentVNode)("", true),
|
|
5613
5656
|
(0, vue.createElementVNode)("div", _hoisted_6$4, [(0, vue.createElementVNode)("h1", _hoisted_7$4, (0, vue.toDisplayString)(collection.value?.title ?? (0, vue.unref)(t)("collectionsView.title")), 1), collection.value ? ((0, vue.openBlock)(), (0, vue.createElementBlock)("span", _hoisted_8$4, [(0, vue.createTextVNode)((0, vue.toDisplayString)(collection.value.slug) + " ", 1), isReadOnly.value ? ((0, vue.openBlock)(), (0, vue.createElementBlock)(vue.Fragment, { key: 0 }, [(0, vue.createElementVNode)("span", _hoisted_9$4, [_cache[29] || (_cache[29] = (0, vue.createElementVNode)("span", { class: "material-icons text-[11px]" }, "lock", -1)), (0, vue.createTextVNode)(" " + (0, vue.toDisplayString)((0, vue.unref)(t)("collectionsView.readonlyChip")), 1)]), dataSourceRoute.value ? ((0, vue.openBlock)(), (0, vue.createElementBlock)("a", {
|
|
5614
5657
|
key: 0,
|
|
5615
5658
|
href: dataSourceRoute.value ?? void 0,
|
|
@@ -6226,7 +6269,7 @@ var CollectionView_default = /* @__PURE__ */ (0, vue.defineComponent)({
|
|
|
6226
6269
|
});
|
|
6227
6270
|
//#endregion
|
|
6228
6271
|
//#region src/vue/chat/View.vue?vue&type=script&setup=true&lang.ts
|
|
6229
|
-
var _hoisted_1$
|
|
6272
|
+
var _hoisted_1$6 = {
|
|
6230
6273
|
class: "w-full h-full",
|
|
6231
6274
|
"data-testid": "present-collection"
|
|
6232
6275
|
};
|
|
@@ -6278,7 +6321,7 @@ var View_default = /* @__PURE__ */ (0, vue.defineComponent)({
|
|
|
6278
6321
|
});
|
|
6279
6322
|
}
|
|
6280
6323
|
return (_ctx, _cache) => {
|
|
6281
|
-
return (0, vue.openBlock)(), (0, vue.createElementBlock)("div", _hoisted_1$
|
|
6324
|
+
return (0, vue.openBlock)(), (0, vue.createElementBlock)("div", _hoisted_1$6, [slug.value ? ((0, vue.openBlock)(), (0, vue.createBlock)(CollectionView_default, {
|
|
6282
6325
|
key: 0,
|
|
6283
6326
|
slug: slug.value,
|
|
6284
6327
|
selected: selected.value,
|
|
@@ -6301,10 +6344,10 @@ var View_default = /* @__PURE__ */ (0, vue.defineComponent)({
|
|
|
6301
6344
|
});
|
|
6302
6345
|
//#endregion
|
|
6303
6346
|
//#region src/vue/chat/Preview.vue?vue&type=script&setup=true&lang.ts
|
|
6304
|
-
var _hoisted_1$
|
|
6305
|
-
var _hoisted_2$
|
|
6306
|
-
var _hoisted_3$
|
|
6307
|
-
var _hoisted_4$
|
|
6347
|
+
var _hoisted_1$5 = { class: "w-full h-full flex flex-col items-center justify-center p-4 bg-gradient-to-br from-indigo-50 to-slate-50 rounded-lg border-2 border-gray-200" };
|
|
6348
|
+
var _hoisted_2$5 = { class: "text-center" };
|
|
6349
|
+
var _hoisted_3$5 = { class: "text-gray-900 font-bold text-lg mb-1 line-clamp-2" };
|
|
6350
|
+
var _hoisted_4$5 = {
|
|
6308
6351
|
key: 0,
|
|
6309
6352
|
class: "text-gray-600 text-sm"
|
|
6310
6353
|
};
|
|
@@ -6324,26 +6367,26 @@ var Preview_default = /* @__PURE__ */ (0, vue.defineComponent)({
|
|
|
6324
6367
|
const collectionSlug = (0, vue.computed)(() => data.value?.collectionSlug ?? "");
|
|
6325
6368
|
const itemId = (0, vue.computed)(() => data.value?.itemId);
|
|
6326
6369
|
return (_ctx, _cache) => {
|
|
6327
|
-
return (0, vue.openBlock)(), (0, vue.createElementBlock)("div", _hoisted_1$
|
|
6370
|
+
return (0, vue.openBlock)(), (0, vue.createElementBlock)("div", _hoisted_1$5, [(0, vue.createElementVNode)("div", _hoisted_2$5, [
|
|
6328
6371
|
_cache[0] || (_cache[0] = (0, vue.createElementVNode)("span", { class: "material-icons text-4xl text-indigo-600 mb-2" }, "collections_bookmark", -1)),
|
|
6329
|
-
(0, vue.createElementVNode)("h3", _hoisted_3$
|
|
6330
|
-
itemId.value ? ((0, vue.openBlock)(), (0, vue.createElementBlock)("p", _hoisted_4$
|
|
6372
|
+
(0, vue.createElementVNode)("h3", _hoisted_3$5, (0, vue.toDisplayString)(collectionSlug.value || (0, vue.unref)(t)("pluginPresentCollection.fallbackTitle")), 1),
|
|
6373
|
+
itemId.value ? ((0, vue.openBlock)(), (0, vue.createElementBlock)("p", _hoisted_4$5, (0, vue.toDisplayString)((0, vue.unref)(t)("pluginPresentCollection.itemLabel", { id: itemId.value })), 1)) : ((0, vue.openBlock)(), (0, vue.createElementBlock)("p", _hoisted_5$4, (0, vue.toDisplayString)((0, vue.unref)(t)("pluginPresentCollection.listLabel")), 1))
|
|
6331
6374
|
])]);
|
|
6332
6375
|
};
|
|
6333
6376
|
}
|
|
6334
6377
|
});
|
|
6335
6378
|
//#endregion
|
|
6336
6379
|
//#region src/vue/components/DiscoverPanel.vue?vue&type=script&setup=true&lang.ts
|
|
6337
|
-
var _hoisted_1$
|
|
6338
|
-
var _hoisted_2$
|
|
6380
|
+
var _hoisted_1$4 = { "data-testid": "discover-panel" };
|
|
6381
|
+
var _hoisted_2$4 = {
|
|
6339
6382
|
key: 0,
|
|
6340
6383
|
class: "flex flex-col items-center justify-center py-20 text-sm text-slate-500 gap-3"
|
|
6341
6384
|
};
|
|
6342
|
-
var _hoisted_3$
|
|
6385
|
+
var _hoisted_3$4 = {
|
|
6343
6386
|
key: 1,
|
|
6344
6387
|
class: "rounded-xl border border-red-200 bg-red-50/50 p-4 text-sm text-red-800 shadow-sm flex items-center gap-3"
|
|
6345
6388
|
};
|
|
6346
|
-
var _hoisted_4$
|
|
6389
|
+
var _hoisted_4$4 = {
|
|
6347
6390
|
key: 2,
|
|
6348
6391
|
class: "rounded-xl border border-slate-200 bg-white px-6 py-12 text-center text-sm text-slate-500 shadow-sm"
|
|
6349
6392
|
};
|
|
@@ -6453,7 +6496,7 @@ var DiscoverPanel_default = /* @__PURE__ */ (0, vue.defineComponent)({
|
|
|
6453
6496
|
}
|
|
6454
6497
|
(0, vue.onMounted)(load);
|
|
6455
6498
|
return (_ctx, _cache) => {
|
|
6456
|
-
return (0, vue.openBlock)(), (0, vue.createElementBlock)("div", _hoisted_1$
|
|
6499
|
+
return (0, vue.openBlock)(), (0, vue.createElementBlock)("div", _hoisted_1$4, [loading.value ? ((0, vue.openBlock)(), (0, vue.createElementBlock)("div", _hoisted_2$4, [_cache[0] || (_cache[0] = (0, vue.createElementVNode)("div", { class: "h-8 w-8 border-2 border-teal-600/20 border-t-teal-600 rounded-full animate-spin" }, null, -1)), (0, vue.createElementVNode)("span", null, (0, vue.toDisplayString)((0, vue.unref)(t)("common.loading")), 1)])) : loadError.value ? ((0, vue.openBlock)(), (0, vue.createElementBlock)("div", _hoisted_3$4, [_cache[1] || (_cache[1] = (0, vue.createElementVNode)("span", { class: "material-icons text-red-600" }, "error", -1)), (0, vue.createElementVNode)("span", null, (0, vue.toDisplayString)((0, vue.unref)(t)("collectionsView.discover.loadFailed")) + ": " + (0, vue.toDisplayString)(loadError.value), 1)])) : entries.value.length === 0 ? ((0, vue.openBlock)(), (0, vue.createElementBlock)("div", _hoisted_4$4, [_cache[2] || (_cache[2] = (0, vue.createElementVNode)("span", { class: "material-icons text-4xl text-slate-300 mb-2" }, "travel_explore", -1)), (0, vue.createElementVNode)("p", _hoisted_5$3, (0, vue.toDisplayString)((0, vue.unref)(t)("collectionsView.discover.empty")), 1)])) : ((0, vue.openBlock)(), (0, vue.createElementBlock)("div", _hoisted_6$3, [((0, vue.openBlock)(true), (0, vue.createElementBlock)(vue.Fragment, null, (0, vue.renderList)(entries.value, (entry) => {
|
|
6457
6500
|
return (0, vue.openBlock)(), (0, vue.createElementBlock)("div", {
|
|
6458
6501
|
key: entryKey(entry),
|
|
6459
6502
|
class: "relative rounded-xl border border-slate-200 bg-white p-5 shadow-sm flex flex-col gap-3",
|
|
@@ -6500,6 +6543,165 @@ var DiscoverPanel_default = /* @__PURE__ */ (0, vue.defineComponent)({
|
|
|
6500
6543
|
}
|
|
6501
6544
|
});
|
|
6502
6545
|
//#endregion
|
|
6546
|
+
//#region src/vue/components/CollectionOntologyGraphView.vue?vue&type=script&setup=true&lang.ts
|
|
6547
|
+
var _hoisted_1$3 = {
|
|
6548
|
+
class: "rounded-xl border border-slate-200 bg-white shadow-sm overflow-hidden",
|
|
6549
|
+
"data-testid": "collections-map-panel"
|
|
6550
|
+
};
|
|
6551
|
+
var _hoisted_2$3 = {
|
|
6552
|
+
key: 0,
|
|
6553
|
+
class: "flex flex-col items-center justify-center py-20 text-sm text-slate-500 gap-3"
|
|
6554
|
+
};
|
|
6555
|
+
var _hoisted_3$3 = {
|
|
6556
|
+
key: 1,
|
|
6557
|
+
class: "flex items-center gap-3 p-4 text-sm text-red-800"
|
|
6558
|
+
};
|
|
6559
|
+
var _hoisted_4$3 = {
|
|
6560
|
+
key: 2,
|
|
6561
|
+
class: "px-6 py-12 text-center text-sm text-slate-500",
|
|
6562
|
+
"data-testid": "collections-map-empty"
|
|
6563
|
+
};
|
|
6564
|
+
//#endregion
|
|
6565
|
+
//#region src/vue/components/CollectionOntologyGraphView.vue
|
|
6566
|
+
var CollectionOntologyGraphView_default = /* @__PURE__ */ (0, vue.defineComponent)({
|
|
6567
|
+
__name: "CollectionOntologyGraphView",
|
|
6568
|
+
emits: ["open"],
|
|
6569
|
+
setup(__props, { emit: __emit }) {
|
|
6570
|
+
const emit = __emit;
|
|
6571
|
+
const { t } = useCollectionI18n();
|
|
6572
|
+
const cui = collectionUi();
|
|
6573
|
+
const container = (0, vue.ref)(null);
|
|
6574
|
+
const loading = (0, vue.ref)(true);
|
|
6575
|
+
const loadError = (0, vue.ref)(false);
|
|
6576
|
+
const graph = (0, vue.ref)({
|
|
6577
|
+
nodes: [],
|
|
6578
|
+
edges: []
|
|
6579
|
+
});
|
|
6580
|
+
let instance = null;
|
|
6581
|
+
const nodeSize = (node) => node.missing ? 14 : Math.min(40, 20 + Math.round(Math.log2((node.recordCount ?? 0) + 1) * 4));
|
|
6582
|
+
const nodeItem = (node) => ({
|
|
6583
|
+
id: node.slug,
|
|
6584
|
+
name: node.title,
|
|
6585
|
+
symbolSize: nodeSize(node),
|
|
6586
|
+
itemStyle: node.missing ? {
|
|
6587
|
+
color: "#e2e8f0",
|
|
6588
|
+
borderColor: "#94a3b8",
|
|
6589
|
+
borderType: "dashed",
|
|
6590
|
+
borderWidth: 1
|
|
6591
|
+
} : { color: "#4f46e5" },
|
|
6592
|
+
label: node.missing ? { color: "#94a3b8" } : void 0,
|
|
6593
|
+
missing: node.missing === true,
|
|
6594
|
+
recordCount: node.recordCount
|
|
6595
|
+
});
|
|
6596
|
+
const edgeItem = (edge) => ({
|
|
6597
|
+
source: edge.from,
|
|
6598
|
+
target: edge.to,
|
|
6599
|
+
lineStyle: edge.kind === "ref" ? void 0 : { type: "dashed" },
|
|
6600
|
+
label: {
|
|
6601
|
+
show: true,
|
|
6602
|
+
formatter: edge.field,
|
|
6603
|
+
fontSize: 9,
|
|
6604
|
+
color: "#64748b"
|
|
6605
|
+
},
|
|
6606
|
+
field: edge.field,
|
|
6607
|
+
kind: edge.kind,
|
|
6608
|
+
reverseFields: edge.reverseFields
|
|
6609
|
+
});
|
|
6610
|
+
const nodeTooltip = (data) => {
|
|
6611
|
+
if (data.missing) return `<b>${(0, _mulmoclaude_core_wiki.escapeHtml)(data.id)}</b><br>${(0, _mulmoclaude_core_wiki.escapeHtml)(t("collectionsView.mapMissingHint"))}`;
|
|
6612
|
+
const count = data.recordCount === null ? t("collectionsView.mapRecordCountUnknown") : t("collectionsView.mapRecordCount", { count: data.recordCount });
|
|
6613
|
+
return `<b>${(0, _mulmoclaude_core_wiki.escapeHtml)(data.name)}</b><br>${(0, _mulmoclaude_core_wiki.escapeHtml)(data.id)} · ${(0, _mulmoclaude_core_wiki.escapeHtml)(count)}`;
|
|
6614
|
+
};
|
|
6615
|
+
const edgeTooltip = (data) => {
|
|
6616
|
+
const reverse = data.reverseFields?.length ? ` ⇄ ${data.reverseFields.join(", ")}` : "";
|
|
6617
|
+
return `${(0, _mulmoclaude_core_wiki.escapeHtml)(data.source)} —${(0, _mulmoclaude_core_wiki.escapeHtml)(data.field)}→ ${(0, _mulmoclaude_core_wiki.escapeHtml)(data.target)}<br><span style="color:#64748b">${(0, _mulmoclaude_core_wiki.escapeHtml)(data.kind)}${(0, _mulmoclaude_core_wiki.escapeHtml)(reverse)}</span>`;
|
|
6618
|
+
};
|
|
6619
|
+
const tooltipFormatter = (params) => {
|
|
6620
|
+
const { dataType, data } = params;
|
|
6621
|
+
return dataType === "edge" ? edgeTooltip(data) : nodeTooltip(data);
|
|
6622
|
+
};
|
|
6623
|
+
const buildOption = (value) => ({
|
|
6624
|
+
tooltip: {
|
|
6625
|
+
show: true,
|
|
6626
|
+
formatter: tooltipFormatter
|
|
6627
|
+
},
|
|
6628
|
+
series: [{
|
|
6629
|
+
type: "graph",
|
|
6630
|
+
layout: "force",
|
|
6631
|
+
roam: true,
|
|
6632
|
+
draggable: true,
|
|
6633
|
+
label: {
|
|
6634
|
+
show: true,
|
|
6635
|
+
position: "right",
|
|
6636
|
+
fontSize: 11
|
|
6637
|
+
},
|
|
6638
|
+
force: {
|
|
6639
|
+
repulsion: 180,
|
|
6640
|
+
edgeLength: 120,
|
|
6641
|
+
gravity: .08
|
|
6642
|
+
},
|
|
6643
|
+
emphasis: { focus: "adjacency" },
|
|
6644
|
+
lineStyle: {
|
|
6645
|
+
color: "#cbd5e1",
|
|
6646
|
+
width: 1.5,
|
|
6647
|
+
curveness: .1
|
|
6648
|
+
},
|
|
6649
|
+
edgeSymbol: ["none", "arrow"],
|
|
6650
|
+
edgeSymbolSize: 7,
|
|
6651
|
+
data: value.nodes.map(nodeItem),
|
|
6652
|
+
links: value.edges.map(edgeItem)
|
|
6653
|
+
}]
|
|
6654
|
+
});
|
|
6655
|
+
const render = () => {
|
|
6656
|
+
const element = container.value;
|
|
6657
|
+
if (!element) return;
|
|
6658
|
+
if (!instance) {
|
|
6659
|
+
instance = echarts.init(element);
|
|
6660
|
+
instance.on("click", (params) => {
|
|
6661
|
+
if (params.dataType !== "node") return;
|
|
6662
|
+
const data = params.data;
|
|
6663
|
+
if (typeof data?.id === "string" && data.missing !== true) emit("open", data.id);
|
|
6664
|
+
});
|
|
6665
|
+
}
|
|
6666
|
+
instance.setOption(buildOption(graph.value), true);
|
|
6667
|
+
};
|
|
6668
|
+
const load = async () => {
|
|
6669
|
+
loading.value = true;
|
|
6670
|
+
loadError.value = false;
|
|
6671
|
+
const result = await cui.fetchOntology?.();
|
|
6672
|
+
loading.value = false;
|
|
6673
|
+
if (!result?.ok) {
|
|
6674
|
+
loadError.value = true;
|
|
6675
|
+
return;
|
|
6676
|
+
}
|
|
6677
|
+
graph.value = (0, _mulmoclaude_core_collection.buildOntologyGraph)(result.data.entries);
|
|
6678
|
+
await (0, vue.nextTick)();
|
|
6679
|
+
render();
|
|
6680
|
+
};
|
|
6681
|
+
const handleResize = () => {
|
|
6682
|
+
instance?.resize();
|
|
6683
|
+
};
|
|
6684
|
+
(0, vue.onMounted)(() => {
|
|
6685
|
+
load();
|
|
6686
|
+
window.addEventListener("resize", handleResize);
|
|
6687
|
+
});
|
|
6688
|
+
(0, vue.onBeforeUnmount)(() => {
|
|
6689
|
+
window.removeEventListener("resize", handleResize);
|
|
6690
|
+
instance?.dispose();
|
|
6691
|
+
instance = null;
|
|
6692
|
+
});
|
|
6693
|
+
return (_ctx, _cache) => {
|
|
6694
|
+
return (0, vue.openBlock)(), (0, vue.createElementBlock)("div", _hoisted_1$3, [loading.value ? ((0, vue.openBlock)(), (0, vue.createElementBlock)("div", _hoisted_2$3, [_cache[0] || (_cache[0] = (0, vue.createElementVNode)("div", { class: "h-8 w-8 border-2 border-indigo-600/20 border-t-indigo-600 rounded-full animate-spin" }, null, -1)), (0, vue.createElementVNode)("span", null, (0, vue.toDisplayString)((0, vue.unref)(t)("common.loading")), 1)])) : loadError.value ? ((0, vue.openBlock)(), (0, vue.createElementBlock)("div", _hoisted_3$3, [_cache[1] || (_cache[1] = (0, vue.createElementVNode)("span", { class: "material-icons text-red-600" }, "error", -1)), (0, vue.createElementVNode)("span", null, (0, vue.toDisplayString)((0, vue.unref)(t)("collectionsView.loadFailed")), 1)])) : graph.value.nodes.length === 0 ? ((0, vue.openBlock)(), (0, vue.createElementBlock)("div", _hoisted_4$3, [_cache[2] || (_cache[2] = (0, vue.createElementVNode)("span", { class: "material-icons text-4xl text-slate-300 mb-2" }, "hub", -1)), (0, vue.createElementVNode)("p", null, (0, vue.toDisplayString)((0, vue.unref)(t)("collectionsView.mapEmpty")), 1)])) : ((0, vue.openBlock)(), (0, vue.createElementBlock)("div", {
|
|
6695
|
+
key: 3,
|
|
6696
|
+
ref_key: "container",
|
|
6697
|
+
ref: container,
|
|
6698
|
+
class: "w-full h-[32rem]",
|
|
6699
|
+
"data-testid": "collections-map-canvas"
|
|
6700
|
+
}, null, 512))]);
|
|
6701
|
+
};
|
|
6702
|
+
}
|
|
6703
|
+
});
|
|
6704
|
+
//#endregion
|
|
6503
6705
|
//#region src/vue/starters.ts
|
|
6504
6706
|
var COLLECTION_STARTERS = [
|
|
6505
6707
|
{
|
|
@@ -6762,6 +6964,7 @@ var CollectionsIndexView_default = /* @__PURE__ */ (0, vue.defineComponent)({
|
|
|
6762
6964
|
const cui = collectionUi();
|
|
6763
6965
|
const { pinToggle, reconcileShortcuts } = cui;
|
|
6764
6966
|
const tab = (0, vue.ref)("installed");
|
|
6967
|
+
const hasOntology = cui.fetchOntology !== void 0;
|
|
6765
6968
|
const showNewCollectionModal = (0, vue.ref)(false);
|
|
6766
6969
|
const collections = (0, vue.ref)([]);
|
|
6767
6970
|
const loading = (0, vue.ref)(true);
|
|
@@ -6816,31 +7019,44 @@ var CollectionsIndexView_default = /* @__PURE__ */ (0, vue.defineComponent)({
|
|
|
6816
7019
|
(0, vue.onMounted)(loadCollections);
|
|
6817
7020
|
return (_ctx, _cache) => {
|
|
6818
7021
|
return (0, vue.openBlock)(), (0, vue.createElementBlock)("div", _hoisted_1$1, [(0, vue.createElementVNode)("div", _hoisted_2$1, [
|
|
6819
|
-
(0, vue.createElementVNode)("div", _hoisted_3$1, [(0, vue.createElementVNode)("div", _hoisted_4$1, [(0, vue.createElementVNode)("h1", _hoisted_5$1, (0, vue.toDisplayString)((0, vue.unref)(t)("collectionsView.title")), 1), (0, vue.createElementVNode)("div", _hoisted_6$1, [
|
|
6820
|
-
|
|
6821
|
-
|
|
6822
|
-
|
|
6823
|
-
|
|
6824
|
-
|
|
6825
|
-
|
|
6826
|
-
|
|
6827
|
-
|
|
6828
|
-
|
|
6829
|
-
|
|
7022
|
+
(0, vue.createElementVNode)("div", _hoisted_3$1, [(0, vue.createElementVNode)("div", _hoisted_4$1, [(0, vue.createElementVNode)("h1", _hoisted_5$1, (0, vue.toDisplayString)((0, vue.unref)(t)("collectionsView.title")), 1), (0, vue.createElementVNode)("div", _hoisted_6$1, [
|
|
7023
|
+
(0, vue.createElementVNode)("button", {
|
|
7024
|
+
type: "button",
|
|
7025
|
+
class: (0, vue.normalizeClass)(["px-3 h-7 rounded-md text-xs font-semibold transition-colors", tab.value === "installed" ? "bg-white text-indigo-700 shadow-sm" : "text-slate-500 hover:text-slate-700"]),
|
|
7026
|
+
"data-testid": "collections-tab-installed",
|
|
7027
|
+
onClick: _cache[0] || (_cache[0] = ($event) => tab.value = "installed")
|
|
7028
|
+
}, (0, vue.toDisplayString)((0, vue.unref)(t)("collectionsView.discover.installedTab")), 3),
|
|
7029
|
+
(0, vue.createElementVNode)("button", {
|
|
7030
|
+
type: "button",
|
|
7031
|
+
class: (0, vue.normalizeClass)(["px-3 h-7 rounded-md text-xs font-semibold transition-colors", tab.value === "discover" ? "bg-white text-teal-700 shadow-sm" : "text-slate-500 hover:text-slate-700"]),
|
|
7032
|
+
"data-testid": "collections-tab-discover",
|
|
7033
|
+
onClick: _cache[1] || (_cache[1] = ($event) => tab.value = "discover")
|
|
7034
|
+
}, (0, vue.toDisplayString)((0, vue.unref)(t)("collectionsView.discover.tab")), 3),
|
|
7035
|
+
hasOntology ? ((0, vue.openBlock)(), (0, vue.createElementBlock)("button", {
|
|
7036
|
+
key: 0,
|
|
7037
|
+
type: "button",
|
|
7038
|
+
class: (0, vue.normalizeClass)(["px-3 h-7 rounded-md text-xs font-semibold transition-colors", tab.value === "map" ? "bg-white text-indigo-700 shadow-sm" : "text-slate-500 hover:text-slate-700"]),
|
|
7039
|
+
"data-testid": "collections-tab-map",
|
|
7040
|
+
onClick: _cache[2] || (_cache[2] = ($event) => tab.value = "map")
|
|
7041
|
+
}, (0, vue.toDisplayString)((0, vue.unref)(t)("collectionsView.mapTab")), 3)) : (0, vue.createCommentVNode)("", true)
|
|
7042
|
+
])]), tab.value === "installed" ? ((0, vue.openBlock)(), (0, vue.createElementBlock)("button", {
|
|
6830
7043
|
key: 0,
|
|
6831
7044
|
type: "button",
|
|
6832
7045
|
class: "h-8 px-2.5 flex items-center gap-1 rounded bg-indigo-600 hover:bg-indigo-700 text-white font-bold text-xs transition-colors shadow-sm",
|
|
6833
7046
|
"data-testid": "collections-add-collection",
|
|
6834
|
-
onClick: _cache[
|
|
6835
|
-
}, [_cache[
|
|
7047
|
+
onClick: _cache[3] || (_cache[3] = ($event) => showNewCollectionModal.value = true)
|
|
7048
|
+
}, [_cache[5] || (_cache[5] = (0, vue.createElementVNode)("span", { class: "material-icons text-sm" }, "add", -1)), (0, vue.createElementVNode)("span", null, (0, vue.toDisplayString)((0, vue.unref)(t)("collectionsView.addCollectionLabel")), 1)])) : (0, vue.createCommentVNode)("", true)]),
|
|
6836
7049
|
showNewCollectionModal.value ? ((0, vue.openBlock)(), (0, vue.createBlock)(NewCollectionModal_default, {
|
|
6837
7050
|
key: 0,
|
|
6838
|
-
onClose: _cache[
|
|
7051
|
+
onClose: _cache[4] || (_cache[4] = ($event) => showNewCollectionModal.value = false)
|
|
6839
7052
|
})) : (0, vue.createCommentVNode)("", true),
|
|
6840
7053
|
tab.value === "discover" ? ((0, vue.openBlock)(), (0, vue.createBlock)(DiscoverPanel_default, {
|
|
6841
7054
|
key: 1,
|
|
6842
7055
|
onImported: loadCollections
|
|
6843
|
-
})) :
|
|
7056
|
+
})) : tab.value === "map" ? ((0, vue.openBlock)(), (0, vue.createBlock)(CollectionOntologyGraphView_default, {
|
|
7057
|
+
key: 2,
|
|
7058
|
+
onOpen: openCollection
|
|
7059
|
+
})) : ((0, vue.openBlock)(), (0, vue.createElementBlock)(vue.Fragment, { key: 3 }, [loading.value ? ((0, vue.openBlock)(), (0, vue.createElementBlock)("div", _hoisted_7$1, [_cache[6] || (_cache[6] = (0, vue.createElementVNode)("div", { class: "h-8 w-8 border-2 border-indigo-600/20 border-t-indigo-600 rounded-full animate-spin" }, null, -1)), (0, vue.createElementVNode)("span", null, (0, vue.toDisplayString)((0, vue.unref)(t)("common.loading")), 1)])) : loadError.value ? ((0, vue.openBlock)(), (0, vue.createElementBlock)("div", _hoisted_8$1, [_cache[7] || (_cache[7] = (0, vue.createElementVNode)("span", { class: "material-icons text-red-600" }, "error", -1)), (0, vue.createElementVNode)("span", null, (0, vue.toDisplayString)((0, vue.unref)(t)("collectionsView.loadFailed")) + ": " + (0, vue.toDisplayString)(loadError.value), 1)])) : collections.value.length === 0 ? ((0, vue.openBlock)(), (0, vue.createElementBlock)("div", _hoisted_9$1, [_cache[8] || (_cache[8] = (0, vue.createElementVNode)("span", { class: "material-icons text-4xl text-slate-300 mb-2" }, "dashboard_customize", -1)), (0, vue.createElementVNode)("p", _hoisted_10$1, (0, vue.toDisplayString)((0, vue.unref)(t)("collectionsView.indexEmpty")), 1)])) : ((0, vue.openBlock)(), (0, vue.createElementBlock)("div", _hoisted_11$1, [hasReadonlyCollections.value ? ((0, vue.openBlock)(), (0, vue.createElementBlock)("div", _hoisted_12$1, [((0, vue.openBlock)(), (0, vue.createElementBlock)(vue.Fragment, null, (0, vue.renderList)(FILTER_CHIPS, (chip) => {
|
|
6844
7060
|
return (0, vue.createElementVNode)("button", {
|
|
6845
7061
|
key: chip,
|
|
6846
7062
|
type: "button",
|
|
@@ -6869,7 +7085,7 @@ var CollectionsIndexView_default = /* @__PURE__ */ (0, vue.defineComponent)({
|
|
|
6869
7085
|
key: 0,
|
|
6870
7086
|
class: "inline-flex items-center gap-0.5 px-1.5 py-px rounded bg-amber-50 text-amber-700 border border-amber-200 normal-case tracking-normal",
|
|
6871
7087
|
"data-testid": `collections-readonly-badge-${collection.slug}`
|
|
6872
|
-
}, [_cache[
|
|
7088
|
+
}, [_cache[9] || (_cache[9] = (0, vue.createElementVNode)("span", { class: "material-icons text-[11px]" }, "lock", -1)), (0, vue.createTextVNode)(" " + (0, vue.toDisplayString)((0, vue.unref)(t)("collectionsView.readonlyChip")), 1)], 8, _hoisted_21$1)) : (0, vue.createCommentVNode)("", true)
|
|
6873
7089
|
])]),
|
|
6874
7090
|
((0, vue.openBlock)(), (0, vue.createBlock)((0, vue.resolveDynamicComponent)((0, vue.unref)(pinToggle)), {
|
|
6875
7091
|
kind: "collection",
|
|
@@ -6889,8 +7105,8 @@ var CollectionsIndexView_default = /* @__PURE__ */ (0, vue.defineComponent)({
|
|
|
6889
7105
|
"aria-label": (0, vue.unref)(t)("collectionsView.contribute"),
|
|
6890
7106
|
"data-testid": `collections-contribute-${collection.slug}`,
|
|
6891
7107
|
onClick: (0, vue.withModifiers)(($event) => startContributeChat(collection), ["stop"])
|
|
6892
|
-
}, [..._cache[
|
|
6893
|
-
_cache[
|
|
7108
|
+
}, [..._cache[10] || (_cache[10] = [(0, vue.createElementVNode)("span", { class: "material-icons text-lg" }, "ios_share", -1)])], 8, _hoisted_22$1)) : (0, vue.createCommentVNode)("", true),
|
|
7109
|
+
_cache[11] || (_cache[11] = (0, vue.createElementVNode)("div", { class: "h-8 w-8 flex items-center justify-center rounded-lg bg-slate-50 group-hover:bg-indigo-50 text-slate-400 group-hover:text-indigo-600 transition-all duration-300" }, [(0, vue.createElementVNode)("span", { class: "material-icons text-lg transition-transform duration-300 group-hover:translate-x-0.5" }, "chevron_right")], -1))
|
|
6894
7110
|
], 40, _hoisted_15$1);
|
|
6895
7111
|
}), 128))])]))], 64))
|
|
6896
7112
|
])]);
|