@mulmoclaude/collection-plugin 0.13.2 → 0.14.0
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 +4 -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 +4 -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 +320 -113
- package/dist/vue.cjs.map +1 -1
- package/dist/vue.js +320 -114
- package/dist/vue.js.map +1 -1
- package/package.json +5 -3
package/dist/vue.js
CHANGED
|
@@ -1,8 +1,10 @@
|
|
|
1
|
-
import { COMPUTED_TYPES, MINUTES_PER_DAY, TOOL_DEFINITION, actionVisible, agentActionRunKey, assignLanes, backlinkRows, boolSortValue, bucketRecords, buildMonthGrid, buildUpdatedRecord, coerceInlineValue, dateOf, dateSortValue, daySlice, defangForPrompt, deriveAll, draftToRecord, embedTargetId, emptyRow, enumSortValue, errorMessage, executePresentCollection, fieldVisible, firstMissingRequiredField, isSortableField, itemIdOf, itemIsDone, itemLabelOf, labelFieldFor, nextSortDirection, numericSortValue, resolveEnumColor, rollupValue, rowFromItem, shortHexId, sortItems, stringSortValue, ymdKey } from "@mulmoclaude/core/collection";
|
|
1
|
+
import { COMPUTED_TYPES, MINUTES_PER_DAY, TOOL_DEFINITION, actionVisible, agentActionRunKey, assignLanes, backlinkRows, boolSortValue, bucketRecords, buildMonthGrid, buildOntologyGraph, buildUpdatedRecord, coerceInlineValue, dateOf, dateSortValue, daySlice, defangForPrompt, deriveAll, draftToRecord, embedTargetId, emptyRow, enumSortValue, errorMessage, executePresentCollection, fieldText, fieldVisible, firstMissingRequiredField, isSortableField, itemIdOf, itemIsDone, itemLabelOf, labelFieldFor, nextSortDirection, numericSortValue, resolveEnumColor, rollupValue, rowFromItem, shortHexId, sortItems, stringSortValue, ymdKey } from "@mulmoclaude/core/collection";
|
|
2
2
|
import { Fragment, Teleport, computed, createBlock, createCommentVNode, createElementBlock, createElementVNode, createTextVNode, createVNode, defineComponent, effectScope, mergeModels, nextTick, normalizeClass, normalizeStyle, onBeforeUnmount, onMounted, onUnmounted, openBlock, reactive, ref, renderList, renderSlot, resolveDynamicComponent, toDisplayString, unref, useModel, vModelCheckbox, vModelDynamic, vModelSelect, vModelText, watch, watchEffect, withCtx, withDirectives, withKeys, withModifiers } from "vue";
|
|
3
3
|
import { createI18n } from "vue-i18n";
|
|
4
4
|
import draggable from "vuedraggable";
|
|
5
5
|
import { REMOTE_VIEW_MAX_BYTES, handleRemoteViewMessage } from "@mulmoclaude/core/remote-view";
|
|
6
|
+
import * as echarts from "echarts";
|
|
7
|
+
import { escapeHtml } from "@mulmoclaude/core/wiki";
|
|
6
8
|
import { createTranslationCache } from "@mulmoclaude/core/translation/client";
|
|
7
9
|
//#region src/vue/uiContext.ts
|
|
8
10
|
var current = null;
|
|
@@ -75,6 +77,10 @@ var i18n = createI18n({
|
|
|
75
77
|
editable: "Editable",
|
|
76
78
|
data: "Data"
|
|
77
79
|
},
|
|
80
|
+
mapTab: "Map",
|
|
81
|
+
mapEmpty: "Nothing to map yet — the map draws itself as collections and the links between them appear.",
|
|
82
|
+
mapRecordCount: "{count} records",
|
|
83
|
+
mapMissingHint: "No collection with this slug — a relation points at it.",
|
|
78
84
|
notFound: "Collection not found",
|
|
79
85
|
loadFailed: "Failed to load",
|
|
80
86
|
requiredField: "This field is required",
|
|
@@ -223,6 +229,10 @@ var i18n = createI18n({
|
|
|
223
229
|
editable: "編集可能",
|
|
224
230
|
data: "データ"
|
|
225
231
|
},
|
|
232
|
+
mapTab: "マップ",
|
|
233
|
+
mapEmpty: "まだ表示するものがありません。コレクションとその間のリンクが増えると、マップが自動的に描かれます。",
|
|
234
|
+
mapRecordCount: "{count} 件のレコード",
|
|
235
|
+
mapMissingHint: "このスラッグのコレクションは存在しません。リレーションが参照しています。",
|
|
226
236
|
notFound: "コレクションが見つかりません",
|
|
227
237
|
loadFailed: "読み込みに失敗しました",
|
|
228
238
|
requiredField: "この項目は必須です",
|
|
@@ -371,6 +381,10 @@ var i18n = createI18n({
|
|
|
371
381
|
editable: "可编辑",
|
|
372
382
|
data: "数据"
|
|
373
383
|
},
|
|
384
|
+
mapTab: "地图",
|
|
385
|
+
mapEmpty: "暂无可显示的内容。随着集合及其之间的链接增多,地图会自动绘制。",
|
|
386
|
+
mapRecordCount: "{count} 条记录",
|
|
387
|
+
mapMissingHint: "不存在此 slug 的集合,但有关系指向它。",
|
|
374
388
|
notFound: "未找到集合",
|
|
375
389
|
loadFailed: "加载失败",
|
|
376
390
|
requiredField: "此字段为必填项",
|
|
@@ -519,6 +533,10 @@ var i18n = createI18n({
|
|
|
519
533
|
editable: "편집 가능",
|
|
520
534
|
data: "데이터"
|
|
521
535
|
},
|
|
536
|
+
mapTab: "맵",
|
|
537
|
+
mapEmpty: "아직 표시할 내용이 없습니다. 컬렉션과 그 사이의 링크가 생기면 맵이 자동으로 그려집니다.",
|
|
538
|
+
mapRecordCount: "레코드 {count}개",
|
|
539
|
+
mapMissingHint: "이 슬러그의 컬렉션이 없습니다. 관계가 이를 참조하고 있습니다.",
|
|
522
540
|
notFound: "컬렉션을 찾을 수 없습니다",
|
|
523
541
|
loadFailed: "불러오기에 실패했습니다",
|
|
524
542
|
requiredField: "이 필드는 필수입니다",
|
|
@@ -667,6 +685,10 @@ var i18n = createI18n({
|
|
|
667
685
|
editable: "Editables",
|
|
668
686
|
data: "Datos"
|
|
669
687
|
},
|
|
688
|
+
mapTab: "Mapa",
|
|
689
|
+
mapEmpty: "Nada que mostrar todavía: el mapa se dibuja solo a medida que aparecen colecciones y los enlaces entre ellas.",
|
|
690
|
+
mapRecordCount: "{count} registros",
|
|
691
|
+
mapMissingHint: "No existe una colección con este slug; una relación apunta a ella.",
|
|
670
692
|
notFound: "Colección no encontrada",
|
|
671
693
|
loadFailed: "Error al cargar",
|
|
672
694
|
requiredField: "Este campo es obligatorio",
|
|
@@ -815,6 +837,10 @@ var i18n = createI18n({
|
|
|
815
837
|
editable: "Editáveis",
|
|
816
838
|
data: "Dados"
|
|
817
839
|
},
|
|
840
|
+
mapTab: "Mapa",
|
|
841
|
+
mapEmpty: "Nada para mostrar ainda — o mapa se desenha sozinho conforme coleções e os vínculos entre elas aparecem.",
|
|
842
|
+
mapRecordCount: "{count} registros",
|
|
843
|
+
mapMissingHint: "Nenhuma coleção com este slug — uma relação aponta para ela.",
|
|
818
844
|
notFound: "Coleção não encontrada",
|
|
819
845
|
loadFailed: "Falha ao carregar",
|
|
820
846
|
requiredField: "Este campo é obrigatório",
|
|
@@ -963,6 +989,10 @@ var i18n = createI18n({
|
|
|
963
989
|
editable: "Modifiables",
|
|
964
990
|
data: "Données"
|
|
965
991
|
},
|
|
992
|
+
mapTab: "Carte",
|
|
993
|
+
mapEmpty: "Rien à afficher pour l'instant — la carte se dessine d'elle-même à mesure que les collections et leurs liens apparaissent.",
|
|
994
|
+
mapRecordCount: "{count} enregistrements",
|
|
995
|
+
mapMissingHint: "Aucune collection avec ce slug — une relation pointe vers elle.",
|
|
966
996
|
notFound: "Collection introuvable",
|
|
967
997
|
loadFailed: "Échec du chargement",
|
|
968
998
|
requiredField: "Ce champ est obligatoire",
|
|
@@ -1111,6 +1141,10 @@ var i18n = createI18n({
|
|
|
1111
1141
|
editable: "Bearbeitbar",
|
|
1112
1142
|
data: "Daten"
|
|
1113
1143
|
},
|
|
1144
|
+
mapTab: "Karte",
|
|
1145
|
+
mapEmpty: "Noch nichts zu zeigen — die Karte entsteht von selbst, sobald Sammlungen und ihre Verknüpfungen entstehen.",
|
|
1146
|
+
mapRecordCount: "{count} Einträge",
|
|
1147
|
+
mapMissingHint: "Keine Sammlung mit diesem Slug — eine Relation verweist darauf.",
|
|
1114
1148
|
notFound: "Sammlung nicht gefunden",
|
|
1115
1149
|
loadFailed: "Laden fehlgeschlagen",
|
|
1116
1150
|
requiredField: "Dieses Feld ist erforderlich",
|
|
@@ -1325,8 +1359,8 @@ function isExternalUrl(value) {
|
|
|
1325
1359
|
return typeof value === "string" && /^https?:\/\//i.test(value);
|
|
1326
1360
|
}
|
|
1327
1361
|
function detailText(value) {
|
|
1328
|
-
|
|
1329
|
-
return
|
|
1362
|
+
const text = fieldText(value, EM_DASH);
|
|
1363
|
+
return text === "" ? EM_DASH : text;
|
|
1330
1364
|
}
|
|
1331
1365
|
function formatCell(value, type) {
|
|
1332
1366
|
if (value === void 0 || value === null || value === "") return EM_DASH;
|
|
@@ -1350,7 +1384,7 @@ function resolveCurrency(field, record) {
|
|
|
1350
1384
|
function formatMoney(value, currency, displayLocale) {
|
|
1351
1385
|
if (value === void 0 || value === "") return EM_DASH;
|
|
1352
1386
|
const amount = typeof value === "number" ? value : Number(value);
|
|
1353
|
-
if (!Number.isFinite(amount)) return
|
|
1387
|
+
if (!Number.isFinite(amount)) return fieldText(value, EM_DASH);
|
|
1354
1388
|
const currencyCode = currency && currency.length > 0 ? currency : DEFAULT_CURRENCY;
|
|
1355
1389
|
try {
|
|
1356
1390
|
return new Intl.NumberFormat(displayLocale, {
|
|
@@ -1453,7 +1487,7 @@ function buildEmbedOptions(schema, items) {
|
|
|
1453
1487
|
const { fields, primaryKey } = schema;
|
|
1454
1488
|
const displayField = displayFieldFor(fields, primaryKey);
|
|
1455
1489
|
return items.map((item) => {
|
|
1456
|
-
const slug =
|
|
1490
|
+
const slug = fieldText(item[primaryKey]);
|
|
1457
1491
|
const labelRaw = item[displayField];
|
|
1458
1492
|
return {
|
|
1459
1493
|
slug,
|
|
@@ -1463,13 +1497,13 @@ function buildEmbedOptions(schema, items) {
|
|
|
1463
1497
|
}
|
|
1464
1498
|
//#endregion
|
|
1465
1499
|
//#region src/vue/components/CollectionMutateParamsModal.vue?vue&type=script&setup=true&lang.ts
|
|
1466
|
-
var _hoisted_1$
|
|
1467
|
-
var _hoisted_2$
|
|
1468
|
-
var _hoisted_3$
|
|
1500
|
+
var _hoisted_1$17 = { class: "flex items-center justify-between px-6 pt-5 pb-3" };
|
|
1501
|
+
var _hoisted_2$16 = { class: "text-sm font-bold text-slate-800 flex items-center gap-1.5" };
|
|
1502
|
+
var _hoisted_3$16 = {
|
|
1469
1503
|
key: 0,
|
|
1470
1504
|
class: "material-icons text-base text-indigo-600"
|
|
1471
1505
|
};
|
|
1472
|
-
var _hoisted_4$
|
|
1506
|
+
var _hoisted_4$16 = ["aria-label"];
|
|
1473
1507
|
var _hoisted_5$14 = { class: "flex flex-col gap-4 px-6 pb-2" };
|
|
1474
1508
|
var _hoisted_6$13 = ["for"];
|
|
1475
1509
|
var _hoisted_7$11 = {
|
|
@@ -1567,13 +1601,13 @@ var CollectionMutateParamsModal_default = /* @__PURE__ */ defineComponent({
|
|
|
1567
1601
|
"data-testid": "collections-mutate-modal",
|
|
1568
1602
|
onSubmit: withModifiers(submit, ["prevent"])
|
|
1569
1603
|
}, [
|
|
1570
|
-
createElementVNode("div", _hoisted_1$
|
|
1604
|
+
createElementVNode("div", _hoisted_1$17, [createElementVNode("h2", _hoisted_2$16, [__props.action.icon ? (openBlock(), createElementBlock("span", _hoisted_3$16, toDisplayString(__props.action.icon), 1)) : createCommentVNode("", true), createElementVNode("span", null, toDisplayString(__props.action.label), 1)]), createElementVNode("button", {
|
|
1571
1605
|
type: "button",
|
|
1572
1606
|
class: "h-8 w-8 flex items-center justify-center rounded text-slate-400 hover:bg-slate-100 hover:text-slate-600 transition-colors",
|
|
1573
1607
|
"aria-label": unref(t)("common.close"),
|
|
1574
1608
|
"data-testid": "collections-mutate-close",
|
|
1575
1609
|
onClick: _cache[0] || (_cache[0] = ($event) => emit("close"))
|
|
1576
|
-
}, [..._cache[3] || (_cache[3] = [createElementVNode("span", { class: "material-icons text-lg" }, "close", -1)])], 8, _hoisted_4$
|
|
1610
|
+
}, [..._cache[3] || (_cache[3] = [createElementVNode("span", { class: "material-icons text-lg" }, "close", -1)])], 8, _hoisted_4$16)]),
|
|
1577
1611
|
createElementVNode("div", _hoisted_5$14, [(openBlock(true), createElementBlock(Fragment, null, renderList(__props.action.params, (spec, key) => {
|
|
1578
1612
|
return openBlock(), createElementBlock("div", {
|
|
1579
1613
|
key,
|
|
@@ -1638,13 +1672,13 @@ var CollectionMutateParamsModal_default = /* @__PURE__ */ defineComponent({
|
|
|
1638
1672
|
});
|
|
1639
1673
|
//#endregion
|
|
1640
1674
|
//#region src/vue/components/CollectionCalendarView.vue?vue&type=script&setup=true&lang.ts
|
|
1641
|
-
var _hoisted_1$
|
|
1675
|
+
var _hoisted_1$16 = {
|
|
1642
1676
|
class: "flex flex-col gap-3",
|
|
1643
1677
|
"data-testid": "collection-calendar"
|
|
1644
1678
|
};
|
|
1645
|
-
var _hoisted_2$
|
|
1646
|
-
var _hoisted_3$
|
|
1647
|
-
var _hoisted_4$
|
|
1679
|
+
var _hoisted_2$15 = { class: "flex items-center gap-2" };
|
|
1680
|
+
var _hoisted_3$15 = ["aria-label"];
|
|
1681
|
+
var _hoisted_4$15 = ["aria-label"];
|
|
1648
1682
|
var _hoisted_5$13 = {
|
|
1649
1683
|
class: "text-sm font-bold text-slate-800 flex-1",
|
|
1650
1684
|
"data-testid": "collection-calendar-month"
|
|
@@ -1779,22 +1813,22 @@ var CollectionCalendarView_default = /* @__PURE__ */ defineComponent({
|
|
|
1779
1813
|
viewMonth.value = now.getMonth() + 1;
|
|
1780
1814
|
}
|
|
1781
1815
|
return (_ctx, _cache) => {
|
|
1782
|
-
return openBlock(), createElementBlock("div", _hoisted_1$
|
|
1783
|
-
createElementVNode("div", _hoisted_2$
|
|
1816
|
+
return openBlock(), createElementBlock("div", _hoisted_1$16, [
|
|
1817
|
+
createElementVNode("div", _hoisted_2$15, [
|
|
1784
1818
|
createElementVNode("button", {
|
|
1785
1819
|
type: "button",
|
|
1786
1820
|
class: "h-8 w-8 flex items-center justify-center rounded text-slate-500 hover:bg-slate-100 transition-colors",
|
|
1787
1821
|
"aria-label": unref(t)("collectionsView.calendarPrevMonth"),
|
|
1788
1822
|
"data-testid": "collection-calendar-prev",
|
|
1789
1823
|
onClick: _cache[0] || (_cache[0] = ($event) => stepMonth(-1))
|
|
1790
|
-
}, [..._cache[2] || (_cache[2] = [createElementVNode("span", { class: "material-icons text-lg" }, "chevron_left", -1)])], 8, _hoisted_3$
|
|
1824
|
+
}, [..._cache[2] || (_cache[2] = [createElementVNode("span", { class: "material-icons text-lg" }, "chevron_left", -1)])], 8, _hoisted_3$15),
|
|
1791
1825
|
createElementVNode("button", {
|
|
1792
1826
|
type: "button",
|
|
1793
1827
|
class: "h-8 w-8 flex items-center justify-center rounded text-slate-500 hover:bg-slate-100 transition-colors",
|
|
1794
1828
|
"aria-label": unref(t)("collectionsView.calendarNextMonth"),
|
|
1795
1829
|
"data-testid": "collection-calendar-next",
|
|
1796
1830
|
onClick: _cache[1] || (_cache[1] = ($event) => stepMonth(1))
|
|
1797
|
-
}, [..._cache[3] || (_cache[3] = [createElementVNode("span", { class: "material-icons text-lg" }, "chevron_right", -1)])], 8, _hoisted_4$
|
|
1831
|
+
}, [..._cache[3] || (_cache[3] = [createElementVNode("span", { class: "material-icons text-lg" }, "chevron_right", -1)])], 8, _hoisted_4$15),
|
|
1798
1832
|
createElementVNode("h3", _hoisted_5$13, toDisplayString(monthLabel.value), 1),
|
|
1799
1833
|
createElementVNode("button", {
|
|
1800
1834
|
type: "button",
|
|
@@ -1844,13 +1878,13 @@ var CollectionCalendarView_default = /* @__PURE__ */ defineComponent({
|
|
|
1844
1878
|
});
|
|
1845
1879
|
//#endregion
|
|
1846
1880
|
//#region src/vue/components/CollectionDayView.vue?vue&type=script&setup=true&lang.ts
|
|
1847
|
-
var _hoisted_1$
|
|
1848
|
-
var _hoisted_2$
|
|
1881
|
+
var _hoisted_1$15 = { class: "flex items-center gap-2 border-b border-slate-200 px-4 py-3" };
|
|
1882
|
+
var _hoisted_2$14 = {
|
|
1849
1883
|
class: "flex-1 text-sm font-bold text-slate-800",
|
|
1850
1884
|
"data-testid": "collection-day-view-title"
|
|
1851
1885
|
};
|
|
1852
|
-
var _hoisted_3$
|
|
1853
|
-
var _hoisted_4$
|
|
1886
|
+
var _hoisted_3$14 = ["aria-label"];
|
|
1887
|
+
var _hoisted_4$14 = ["aria-label"];
|
|
1854
1888
|
var _hoisted_5$12 = {
|
|
1855
1889
|
key: 0,
|
|
1856
1890
|
class: "px-4 py-10 text-center text-sm text-slate-400"
|
|
@@ -2038,8 +2072,8 @@ var CollectionDayView_default = /* @__PURE__ */ defineComponent({
|
|
|
2038
2072
|
role: "dialog",
|
|
2039
2073
|
"aria-modal": "true"
|
|
2040
2074
|
}, [createElementVNode("div", { class: normalizeClass(["flex min-h-0 flex-col", __props.showDetail ? "w-80 shrink-0 border-r border-slate-200" : "w-full"]) }, [
|
|
2041
|
-
createElementVNode("div", _hoisted_1$
|
|
2042
|
-
createElementVNode("h3", _hoisted_2$
|
|
2075
|
+
createElementVNode("div", _hoisted_1$15, [
|
|
2076
|
+
createElementVNode("h3", _hoisted_2$14, toDisplayString(dayLabel.value), 1),
|
|
2043
2077
|
__props.canCreate ? (openBlock(), createElementBlock("button", {
|
|
2044
2078
|
key: 0,
|
|
2045
2079
|
type: "button",
|
|
@@ -2047,14 +2081,14 @@ var CollectionDayView_default = /* @__PURE__ */ defineComponent({
|
|
|
2047
2081
|
"aria-label": unref(t)("collectionsView.calendarCreateOn", { date: dayKey.value }),
|
|
2048
2082
|
"data-testid": "collection-day-view-create",
|
|
2049
2083
|
onClick: onCreate
|
|
2050
|
-
}, [..._cache[3] || (_cache[3] = [createElementVNode("span", { class: "material-icons text-lg" }, "add", -1)])], 8, _hoisted_3$
|
|
2084
|
+
}, [..._cache[3] || (_cache[3] = [createElementVNode("span", { class: "material-icons text-lg" }, "add", -1)])], 8, _hoisted_3$14)) : createCommentVNode("", true),
|
|
2051
2085
|
createElementVNode("button", {
|
|
2052
2086
|
type: "button",
|
|
2053
2087
|
class: "h-8 w-8 flex items-center justify-center rounded text-slate-500 hover:bg-slate-100 transition-colors",
|
|
2054
2088
|
"aria-label": unref(t)("collectionsView.dayViewClose"),
|
|
2055
2089
|
"data-testid": "collection-day-view-close",
|
|
2056
2090
|
onClick: _cache[0] || (_cache[0] = ($event) => emit("close"))
|
|
2057
|
-
}, [..._cache[4] || (_cache[4] = [createElementVNode("span", { class: "material-icons text-lg" }, "close", -1)])], 8, _hoisted_4$
|
|
2091
|
+
}, [..._cache[4] || (_cache[4] = [createElementVNode("span", { class: "material-icons text-lg" }, "close", -1)])], 8, _hoisted_4$14)
|
|
2058
2092
|
]),
|
|
2059
2093
|
timedEntries.value.length === 0 && allDayEntries.value.length === 0 ? (openBlock(), createElementBlock("div", _hoisted_5$12, toDisplayString(unref(t)("collectionsView.dayViewEmpty")), 1)) : (openBlock(), createElementBlock("div", {
|
|
2060
2094
|
key: 1,
|
|
@@ -2105,13 +2139,13 @@ var CollectionDayView_default = /* @__PURE__ */ defineComponent({
|
|
|
2105
2139
|
});
|
|
2106
2140
|
//#endregion
|
|
2107
2141
|
//#region src/vue/components/CollectionKanbanView.vue?vue&type=script&setup=true&lang.ts
|
|
2108
|
-
var _hoisted_1$
|
|
2142
|
+
var _hoisted_1$14 = {
|
|
2109
2143
|
class: "h-full overflow-x-auto overflow-y-hidden",
|
|
2110
2144
|
"data-testid": "collection-kanban"
|
|
2111
2145
|
};
|
|
2112
|
-
var _hoisted_2$
|
|
2113
|
-
var _hoisted_3$
|
|
2114
|
-
var _hoisted_4$
|
|
2146
|
+
var _hoisted_2$13 = { class: "flex gap-3 h-full p-1 min-w-max" };
|
|
2147
|
+
var _hoisted_3$13 = ["data-testid"];
|
|
2148
|
+
var _hoisted_4$13 = { class: "flex items-center justify-between px-3 py-2 border-b border-slate-200" };
|
|
2115
2149
|
var _hoisted_5$11 = { class: "flex items-center gap-2 min-w-0" };
|
|
2116
2150
|
var _hoisted_6$10 = ["title"];
|
|
2117
2151
|
var _hoisted_7$8 = { class: "text-[11px] text-slate-400 shrink-0" };
|
|
@@ -2233,12 +2267,12 @@ var CollectionKanbanView_default = /* @__PURE__ */ defineComponent({
|
|
|
2233
2267
|
emit("move", itemId(item), next);
|
|
2234
2268
|
}
|
|
2235
2269
|
return (_ctx, _cache) => {
|
|
2236
|
-
return openBlock(), createElementBlock("div", _hoisted_1$
|
|
2270
|
+
return openBlock(), createElementBlock("div", _hoisted_1$14, [createElementVNode("div", _hoisted_2$13, [(openBlock(true), createElementBlock(Fragment, null, renderList(columns.value, (column) => {
|
|
2237
2271
|
return openBlock(), createElementBlock("div", {
|
|
2238
2272
|
key: column.value,
|
|
2239
2273
|
"data-testid": `collection-kanban-column-${column.value || "uncategorized"}`,
|
|
2240
2274
|
class: "w-72 shrink-0 flex flex-col bg-slate-100 rounded-lg"
|
|
2241
|
-
}, [createElementVNode("div", _hoisted_4$
|
|
2275
|
+
}, [createElementVNode("div", _hoisted_4$13, [createElementVNode("div", _hoisted_5$11, [createElementVNode("span", { class: normalizeClass(["w-2 h-2 rounded-full shrink-0", unref(resolveEnumColor)(__props.schema, __props.groupField, column.value).dot]) }, null, 2), createElementVNode("span", {
|
|
2242
2276
|
class: "font-semibold text-xs text-slate-600 truncate",
|
|
2243
2277
|
title: column.label
|
|
2244
2278
|
}, toDisplayString(column.label), 9, _hoisted_6$10)]), createElementVNode("span", _hoisted_7$8, toDisplayString(itemsByColumn(column.value).length), 1)]), createVNode(unref(draggable), {
|
|
@@ -2274,7 +2308,7 @@ var CollectionKanbanView_default = /* @__PURE__ */ defineComponent({
|
|
|
2274
2308
|
"item-key",
|
|
2275
2309
|
"disabled",
|
|
2276
2310
|
"onChange"
|
|
2277
|
-
])], 8, _hoisted_3$
|
|
2311
|
+
])], 8, _hoisted_3$13);
|
|
2278
2312
|
}), 128))])]);
|
|
2279
2313
|
};
|
|
2280
2314
|
}
|
|
@@ -2304,10 +2338,10 @@ function activatePathLink(event, path, stop = false) {
|
|
|
2304
2338
|
}
|
|
2305
2339
|
//#endregion
|
|
2306
2340
|
//#region src/vue/components/CollectionBacklinksView.vue?vue&type=script&setup=true&lang.ts
|
|
2307
|
-
var _hoisted_1$
|
|
2308
|
-
var _hoisted_2$
|
|
2309
|
-
var _hoisted_3$
|
|
2310
|
-
var _hoisted_4$
|
|
2341
|
+
var _hoisted_1$13 = ["data-testid"];
|
|
2342
|
+
var _hoisted_2$12 = { class: "w-full text-[11px] text-slate-600 bg-white" };
|
|
2343
|
+
var _hoisted_3$12 = { class: "bg-slate-50 border-b border-slate-200 text-slate-500 font-bold uppercase tracking-wider" };
|
|
2344
|
+
var _hoisted_4$12 = { class: "divide-y divide-slate-100" };
|
|
2311
2345
|
var _hoisted_5$10 = [
|
|
2312
2346
|
"data-testid",
|
|
2313
2347
|
"onClick",
|
|
@@ -2329,12 +2363,12 @@ var CollectionBacklinksView_default = /* @__PURE__ */ defineComponent({
|
|
|
2329
2363
|
key: 0,
|
|
2330
2364
|
class: "border border-slate-200/80 rounded-xl overflow-hidden shadow-sm mt-1",
|
|
2331
2365
|
"data-testid": `collections-backlinks-${__props.fieldKey}`
|
|
2332
|
-
}, [createElementVNode("table", _hoisted_2$
|
|
2366
|
+
}, [createElementVNode("table", _hoisted_2$12, [createElementVNode("thead", _hoisted_3$12, [createElementVNode("tr", null, [(openBlock(true), createElementBlock(Fragment, null, renderList(__props.view.columns, (column) => {
|
|
2333
2367
|
return openBlock(), createElementBlock("th", {
|
|
2334
2368
|
key: column.key,
|
|
2335
2369
|
class: "text-left px-4 py-2 font-bold"
|
|
2336
2370
|
}, toDisplayString(column.label), 1);
|
|
2337
|
-
}), 128))])]), createElementVNode("tbody", _hoisted_4$
|
|
2371
|
+
}), 128))])]), createElementVNode("tbody", _hoisted_4$12, [(openBlock(true), createElementBlock(Fragment, null, renderList(__props.view.rows, (row) => {
|
|
2338
2372
|
return openBlock(), createElementBlock("tr", {
|
|
2339
2373
|
key: row.id,
|
|
2340
2374
|
class: "group hover:bg-indigo-50/30 cursor-pointer transition-colors",
|
|
@@ -2349,7 +2383,7 @@ var CollectionBacklinksView_default = /* @__PURE__ */ defineComponent({
|
|
|
2349
2383
|
class: "px-4 py-2 align-middle font-medium"
|
|
2350
2384
|
}, [createElementVNode("span", { class: normalizeClass(cellIdx === 0 ? "text-indigo-600 group-hover:text-indigo-800 font-bold" : "") }, toDisplayString(cell), 3)]);
|
|
2351
2385
|
}), 128))], 40, _hoisted_5$10);
|
|
2352
|
-
}), 128))])])], 8, _hoisted_1$
|
|
2386
|
+
}), 128))])])], 8, _hoisted_1$13)) : (openBlock(), createElementBlock("span", {
|
|
2353
2387
|
key: 1,
|
|
2354
2388
|
class: "text-slate-400 italic",
|
|
2355
2389
|
"data-testid": `collections-backlinks-${__props.fieldKey}`
|
|
@@ -2359,14 +2393,14 @@ var CollectionBacklinksView_default = /* @__PURE__ */ defineComponent({
|
|
|
2359
2393
|
});
|
|
2360
2394
|
//#endregion
|
|
2361
2395
|
//#region src/vue/components/CollectionEmbedView.vue?vue&type=script&setup=true&lang.ts
|
|
2362
|
-
var _hoisted_1$
|
|
2396
|
+
var _hoisted_1$12 = [
|
|
2363
2397
|
"href",
|
|
2364
2398
|
"tabindex",
|
|
2365
2399
|
"data-testid"
|
|
2366
2400
|
];
|
|
2367
|
-
var _hoisted_2$
|
|
2368
|
-
var _hoisted_3$
|
|
2369
|
-
var _hoisted_4$
|
|
2401
|
+
var _hoisted_2$11 = { class: "flex items-center justify-between text-[10px] font-bold text-indigo-600/90 tracking-wider uppercase" };
|
|
2402
|
+
var _hoisted_3$11 = { class: "flex items-center gap-1.5" };
|
|
2403
|
+
var _hoisted_4$11 = { class: "bg-indigo-100/60 text-indigo-700 px-1.5 py-0.5 rounded font-mono font-medium lowercase" };
|
|
2370
2404
|
var _hoisted_5$9 = { class: "grid gap-x-4 gap-y-3 grid-cols-2" };
|
|
2371
2405
|
var _hoisted_6$8 = { class: "text-[10px] font-semibold text-slate-400 uppercase tracking-wide" };
|
|
2372
2406
|
var _hoisted_7$7 = ["data-testid"];
|
|
@@ -2412,7 +2446,7 @@ var CollectionEmbedView_default = /* @__PURE__ */ defineComponent({
|
|
|
2412
2446
|
onKeydown: [_cache[1] || (_cache[1] = withKeys(($event) => unref(activateRefLink)($event, __props.view.targetSlug, __props.view.recordId), ["enter"])), _cache[2] || (_cache[2] = withKeys(($event) => unref(activateRefLink)($event, __props.view.targetSlug, __props.view.recordId), ["space"]))]
|
|
2413
2447
|
}, [
|
|
2414
2448
|
_cache[7] || (_cache[7] = 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)),
|
|
2415
|
-
createElementVNode("div", _hoisted_2$
|
|
2449
|
+
createElementVNode("div", _hoisted_2$11, [createElementVNode("div", _hoisted_3$11, [_cache[6] || (_cache[6] = createElementVNode("span", { class: "material-icons text-sm" }, "link", -1)), createElementVNode("span", null, toDisplayString(__props.view.targetSlug), 1)]), createElementVNode("span", _hoisted_4$11, toDisplayString(__props.view.recordId), 1)]),
|
|
2416
2450
|
createElementVNode("div", _hoisted_5$9, [(openBlock(true), createElementBlock(Fragment, null, renderList(__props.view.rows, (row) => {
|
|
2417
2451
|
return openBlock(), createElementBlock("div", {
|
|
2418
2452
|
key: row.key,
|
|
@@ -2422,7 +2456,7 @@ var CollectionEmbedView_default = /* @__PURE__ */ defineComponent({
|
|
|
2422
2456
|
"data-testid": `collections-embed-${__props.fieldKey}-${row.key}`
|
|
2423
2457
|
}, [row.type === "boolean" ? (openBlock(), createElementBlock(Fragment, { key: 0 }, [row.value === true ? (openBlock(), createElementBlock("span", _hoisted_8$7, "check_circle")) : (openBlock(), createElementBlock("span", _hoisted_9$7, "—"))], 64)) : row.type === "markdown" ? (openBlock(), createElementBlock("p", _hoisted_10$7, toDisplayString(row.display), 1)) : (openBlock(), createElementBlock("span", _hoisted_11$7, toDisplayString(row.display), 1))], 8, _hoisted_7$7)]);
|
|
2424
2458
|
}), 128))])
|
|
2425
|
-
], 40, _hoisted_1$
|
|
2459
|
+
], 40, _hoisted_1$12)) : (openBlock(), createElementBlock("div", {
|
|
2426
2460
|
key: 1,
|
|
2427
2461
|
class: "relative rounded-xl border border-red-100 bg-red-50/30 p-4 pl-5 shadow-sm",
|
|
2428
2462
|
"data-testid": `collections-embed-${__props.fieldKey}`
|
|
@@ -2450,10 +2484,10 @@ var CollectionEmbedView_default = /* @__PURE__ */ defineComponent({
|
|
|
2450
2484
|
});
|
|
2451
2485
|
//#endregion
|
|
2452
2486
|
//#region src/vue/components/CollectionRecordPanel.vue?vue&type=script&setup=true&lang.ts
|
|
2453
|
-
var _hoisted_1$
|
|
2454
|
-
var _hoisted_2$
|
|
2455
|
-
var _hoisted_3$
|
|
2456
|
-
var _hoisted_4$
|
|
2487
|
+
var _hoisted_1$11 = { class: "flex items-center gap-2 mb-4" };
|
|
2488
|
+
var _hoisted_2$10 = { class: "flex-1 min-w-0" };
|
|
2489
|
+
var _hoisted_3$10 = { class: "block text-[9px] font-bold text-slate-400 uppercase tracking-wider" };
|
|
2490
|
+
var _hoisted_4$10 = ["data-testid"];
|
|
2457
2491
|
var _hoisted_5$8 = ["disabled"];
|
|
2458
2492
|
var _hoisted_6$7 = {
|
|
2459
2493
|
key: 1,
|
|
@@ -2831,10 +2865,10 @@ var CollectionRecordPanel_default = /* @__PURE__ */ defineComponent({
|
|
|
2831
2865
|
onSubmit: _cache[5] || (_cache[5] = withModifiers(($event) => emit("submit"), ["prevent"]))
|
|
2832
2866
|
}, {
|
|
2833
2867
|
default: withCtx(() => [
|
|
2834
|
-
createElementVNode("div", _hoisted_1$
|
|
2868
|
+
createElementVNode("div", _hoisted_1$11, [createElementVNode("div", _hoisted_2$10, [createElementVNode("span", _hoisted_3$10, toDisplayString(__props.collection.title), 1), createElementVNode("h2", {
|
|
2835
2869
|
class: "text-base font-bold text-slate-800 truncate",
|
|
2836
2870
|
"data-testid": editing.value ? "collections-edit-title" : "collections-detail-title"
|
|
2837
|
-
}, toDisplayString(headerTitle.value), 9, _hoisted_4$
|
|
2871
|
+
}, toDisplayString(headerTitle.value), 9, _hoisted_4$10)]), editing.value ? (openBlock(), createElementBlock(Fragment, { key: 0 }, [createElementVNode("button", {
|
|
2838
2872
|
type: "button",
|
|
2839
2873
|
class: "h-8 px-2.5 rounded text-xs font-bold text-slate-500 hover:bg-slate-200/50 transition-colors",
|
|
2840
2874
|
"data-testid": "collections-editor-cancel",
|
|
@@ -3143,13 +3177,13 @@ var CollectionRecordPanel_default = /* @__PURE__ */ defineComponent({
|
|
|
3143
3177
|
});
|
|
3144
3178
|
//#endregion
|
|
3145
3179
|
//#region src/vue/components/CollectionViewConfigModal.vue?vue&type=script&setup=true&lang.ts
|
|
3146
|
-
var _hoisted_1$
|
|
3180
|
+
var _hoisted_1$10 = {
|
|
3147
3181
|
"data-testid": "collection-config-modal",
|
|
3148
3182
|
class: "flex flex-col overflow-hidden"
|
|
3149
3183
|
};
|
|
3150
|
-
var _hoisted_2$
|
|
3151
|
-
var _hoisted_3$
|
|
3152
|
-
var _hoisted_4$
|
|
3184
|
+
var _hoisted_2$9 = { class: "flex items-center justify-between gap-2 border-b border-slate-100 px-5 py-3" };
|
|
3185
|
+
var _hoisted_3$9 = { class: "text-sm font-bold text-slate-700" };
|
|
3186
|
+
var _hoisted_4$9 = ["title", "aria-label"];
|
|
3153
3187
|
var _hoisted_5$7 = { class: "overflow-y-auto px-5 py-4" };
|
|
3154
3188
|
var _hoisted_6$6 = { class: "mb-2 text-[10px] font-bold uppercase tracking-wider text-slate-400" };
|
|
3155
3189
|
var _hoisted_7$5 = {
|
|
@@ -3215,14 +3249,14 @@ var CollectionViewConfigModal_default = /* @__PURE__ */ defineComponent({
|
|
|
3215
3249
|
}
|
|
3216
3250
|
return (_ctx, _cache) => {
|
|
3217
3251
|
return openBlock(), createBlock(CollectionRecordModal_default, { onClose: _cache[1] || (_cache[1] = ($event) => emit("close")) }, {
|
|
3218
|
-
default: withCtx(() => [createElementVNode("div", _hoisted_1$
|
|
3252
|
+
default: withCtx(() => [createElementVNode("div", _hoisted_1$10, [createElementVNode("header", _hoisted_2$9, [createElementVNode("h2", _hoisted_3$9, toDisplayString(unref(t)("collectionsView.config.title", { title: __props.title })), 1), createElementVNode("button", {
|
|
3219
3253
|
type: "button",
|
|
3220
3254
|
class: "h-8 w-8 flex items-center justify-center rounded text-slate-400 hover:bg-slate-50 hover:text-slate-600",
|
|
3221
3255
|
title: unref(t)("common.close"),
|
|
3222
3256
|
"aria-label": unref(t)("common.close"),
|
|
3223
3257
|
"data-testid": "collection-config-close",
|
|
3224
3258
|
onClick: _cache[0] || (_cache[0] = ($event) => emit("close"))
|
|
3225
|
-
}, [..._cache[2] || (_cache[2] = [createElementVNode("span", { class: "material-icons text-sm" }, "close", -1)])], 8, _hoisted_4$
|
|
3259
|
+
}, [..._cache[2] || (_cache[2] = [createElementVNode("span", { class: "material-icons text-sm" }, "close", -1)])], 8, _hoisted_4$9)]), createElementVNode("div", _hoisted_5$7, [
|
|
3226
3260
|
createElementVNode("h3", _hoisted_6$6, toDisplayString(unref(t)("collectionsView.config.viewsHeading")), 1),
|
|
3227
3261
|
error.value ? (openBlock(), createElementBlock("p", _hoisted_7$5, toDisplayString(error.value), 1)) : createCommentVNode("", true),
|
|
3228
3262
|
__props.views.length > 0 ? (openBlock(), createElementBlock("ul", _hoisted_8$5, [(openBlock(true), createElementBlock(Fragment, null, renderList(__props.views, (view) => {
|
|
@@ -3251,19 +3285,19 @@ var CollectionViewConfigModal_default = /* @__PURE__ */ defineComponent({
|
|
|
3251
3285
|
});
|
|
3252
3286
|
//#endregion
|
|
3253
3287
|
//#region src/vue/components/CollectionCustomView.vue?vue&type=script&setup=true&lang.ts
|
|
3254
|
-
var _hoisted_1$
|
|
3255
|
-
var _hoisted_2$
|
|
3288
|
+
var _hoisted_1$9 = { class: "custom-view-container" };
|
|
3289
|
+
var _hoisted_2$8 = {
|
|
3256
3290
|
key: 0,
|
|
3257
3291
|
class: "custom-view-message",
|
|
3258
3292
|
role: "alert",
|
|
3259
3293
|
"data-testid": "collection-custom-view-error"
|
|
3260
3294
|
};
|
|
3261
|
-
var _hoisted_3$
|
|
3295
|
+
var _hoisted_3$8 = {
|
|
3262
3296
|
key: 1,
|
|
3263
3297
|
class: "custom-view-message",
|
|
3264
3298
|
"data-testid": "collection-custom-view-loading"
|
|
3265
3299
|
};
|
|
3266
|
-
var _hoisted_4$
|
|
3300
|
+
var _hoisted_4$8 = ["title", "srcdoc"];
|
|
3267
3301
|
var REMINT_LEAD_MS = 6e4;
|
|
3268
3302
|
var MIN_REMINT_DELAY_MS = 1e4;
|
|
3269
3303
|
var CollectionCustomView_vue_vue_type_script_setup_true_lang_default = /*@__PURE__*/ defineComponent({
|
|
@@ -3385,7 +3419,7 @@ var CollectionCustomView_vue_vue_type_script_setup_true_lang_default = /*@__PURE
|
|
|
3385
3419
|
window.removeEventListener("message", onWindowMessage);
|
|
3386
3420
|
});
|
|
3387
3421
|
return (_ctx, _cache) => {
|
|
3388
|
-
return openBlock(), createElementBlock("div", _hoisted_1$
|
|
3422
|
+
return openBlock(), createElementBlock("div", _hoisted_1$9, [error.value ? (openBlock(), createElementBlock("div", _hoisted_2$8, toDisplayString(unref(t)("collectionsView.customViewError", { error: error.value })), 1)) : loading.value ? (openBlock(), createElementBlock("div", _hoisted_3$8, toDisplayString(unref(t)("collectionsView.customViewLoading")), 1)) : srcdoc.value ? (openBlock(), createElementBlock("iframe", {
|
|
3389
3423
|
ref_key: "iframeEl",
|
|
3390
3424
|
ref: iframeEl,
|
|
3391
3425
|
key: __props.view.id,
|
|
@@ -3394,7 +3428,7 @@ var CollectionCustomView_vue_vue_type_script_setup_true_lang_default = /*@__PURE
|
|
|
3394
3428
|
srcdoc: srcdoc.value,
|
|
3395
3429
|
sandbox: "allow-scripts allow-popups allow-popups-to-escape-sandbox allow-downloads",
|
|
3396
3430
|
class: "w-full h-full border-0"
|
|
3397
|
-
}, null, 8, _hoisted_4$
|
|
3431
|
+
}, null, 8, _hoisted_4$8)) : createCommentVNode("", true)]);
|
|
3398
3432
|
};
|
|
3399
3433
|
}
|
|
3400
3434
|
});
|
|
@@ -3410,22 +3444,22 @@ var _plugin_vue_export_helper_default = (sfc, props) => {
|
|
|
3410
3444
|
var CollectionCustomView_default = /*#__PURE__*/ _plugin_vue_export_helper_default(CollectionCustomView_vue_vue_type_script_setup_true_lang_default, [["__scopeId", "data-v-02ff1e01"]]);
|
|
3411
3445
|
//#endregion
|
|
3412
3446
|
//#region src/vue/components/CollectionRemoteViewPreview.vue?vue&type=script&setup=true&lang.ts
|
|
3413
|
-
var _hoisted_1$
|
|
3447
|
+
var _hoisted_1$8 = {
|
|
3414
3448
|
class: "remote-preview-container",
|
|
3415
3449
|
"data-testid": "collection-remote-view-preview"
|
|
3416
3450
|
};
|
|
3417
|
-
var _hoisted_2$
|
|
3451
|
+
var _hoisted_2$7 = {
|
|
3418
3452
|
key: 0,
|
|
3419
3453
|
class: "remote-preview-message",
|
|
3420
3454
|
role: "alert",
|
|
3421
3455
|
"data-testid": "collection-remote-view-error"
|
|
3422
3456
|
};
|
|
3423
|
-
var _hoisted_3$
|
|
3457
|
+
var _hoisted_3$7 = {
|
|
3424
3458
|
key: 1,
|
|
3425
3459
|
class: "remote-preview-message",
|
|
3426
3460
|
"data-testid": "collection-remote-view-loading"
|
|
3427
3461
|
};
|
|
3428
|
-
var _hoisted_4$
|
|
3462
|
+
var _hoisted_4$7 = { class: "phone-frame" };
|
|
3429
3463
|
var _hoisted_5$6 = ["title", "srcdoc"];
|
|
3430
3464
|
var _hoisted_6$5 = {
|
|
3431
3465
|
class: "remote-preview-caption",
|
|
@@ -3522,7 +3556,7 @@ var CollectionRemoteViewPreview_default = /*#__PURE__*/ _plugin_vue_export_helpe
|
|
|
3522
3556
|
onMounted(() => window.addEventListener("message", onWindowMessage));
|
|
3523
3557
|
onBeforeUnmount(() => window.removeEventListener("message", onWindowMessage));
|
|
3524
3558
|
return (_ctx, _cache) => {
|
|
3525
|
-
return openBlock(), createElementBlock("div", _hoisted_1$
|
|
3559
|
+
return openBlock(), createElementBlock("div", _hoisted_1$8, [error.value ? (openBlock(), createElementBlock("div", _hoisted_2$7, toDisplayString(unref(t)("collectionsView.customViewError", { error: error.value })), 1)) : loading.value ? (openBlock(), createElementBlock("div", _hoisted_3$7, toDisplayString(unref(t)("collectionsView.customViewLoading")), 1)) : srcdoc.value ? (openBlock(), createElementBlock(Fragment, { key: 2 }, [createElementVNode("div", _hoisted_4$7, [(openBlock(), createElementBlock("iframe", {
|
|
3526
3560
|
ref_key: "iframeEl",
|
|
3527
3561
|
ref: iframeEl,
|
|
3528
3562
|
key: __props.view.id,
|
|
@@ -3649,7 +3683,7 @@ function resolveEmbed(field, record, embedCache) {
|
|
|
3649
3683
|
schema: null,
|
|
3650
3684
|
item: null
|
|
3651
3685
|
};
|
|
3652
|
-
const item = data.items.find((entry) =>
|
|
3686
|
+
const item = data.items.find((entry) => fieldText(entry[data.schema.primaryKey]) === targetId) ?? null;
|
|
3653
3687
|
return {
|
|
3654
3688
|
schema: data.schema,
|
|
3655
3689
|
item
|
|
@@ -3731,8 +3765,8 @@ function buildBacklinksViews(schema, embedCache, record, locale) {
|
|
|
3731
3765
|
out[key] = {
|
|
3732
3766
|
found: true,
|
|
3733
3767
|
columns,
|
|
3734
|
-
rows: backlinkRows(field,
|
|
3735
|
-
id:
|
|
3768
|
+
rows: backlinkRows(field, fieldText(record?.[schema.primaryKey]), derivedSourceItems(embedCache, field.from) ?? []).map((row) => ({
|
|
3769
|
+
id: fieldText(row[data.schema.primaryKey]),
|
|
3736
3770
|
cells: columns.map((column) => formatBacklinkCell(data.schema.fields[column.key], row[column.key], row, locale))
|
|
3737
3771
|
})),
|
|
3738
3772
|
fromSlug: field.from
|
|
@@ -3765,7 +3799,7 @@ function rollupValueFor(field, record, schema, embedCache) {
|
|
|
3765
3799
|
if (field.type !== "rollup" || !schema || !record) return null;
|
|
3766
3800
|
const items = derivedSourceItems(embedCache, field.from);
|
|
3767
3801
|
if (items === null) return null;
|
|
3768
|
-
return rollupValue(field,
|
|
3802
|
+
return rollupValue(field, fieldText(record[schema.primaryKey]), items);
|
|
3769
3803
|
}
|
|
3770
3804
|
/** Display string for a rollup cell: the aggregate as a plain number,
|
|
3771
3805
|
* em-dash when the source collection couldn't be resolved. */
|
|
@@ -3963,13 +3997,13 @@ function writeCollectionFlagFilters(slug, filters) {
|
|
|
3963
3997
|
}
|
|
3964
3998
|
//#endregion
|
|
3965
3999
|
//#region src/vue/components/CollectionView.vue?vue&type=script&setup=true&lang.ts
|
|
3966
|
-
var _hoisted_1$
|
|
3967
|
-
var _hoisted_2$
|
|
4000
|
+
var _hoisted_1$7 = { class: "h-full flex flex-col bg-slate-50/30" };
|
|
4001
|
+
var _hoisted_2$6 = {
|
|
3968
4002
|
key: 0,
|
|
3969
4003
|
class: "flex items-center gap-3 px-6 py-2 border-b border-slate-200 bg-white"
|
|
3970
4004
|
};
|
|
3971
|
-
var _hoisted_3$
|
|
3972
|
-
var _hoisted_4$
|
|
4005
|
+
var _hoisted_3$6 = ["title", "aria-label"];
|
|
4006
|
+
var _hoisted_4$6 = {
|
|
3973
4007
|
key: 1,
|
|
3974
4008
|
class: "h-9 w-9 flex items-center justify-center rounded-xl bg-indigo-50 text-indigo-600 border border-indigo-100"
|
|
3975
4009
|
};
|
|
@@ -5574,8 +5608,8 @@ var CollectionView_default = /* @__PURE__ */ defineComponent({
|
|
|
5574
5608
|
openDay.value = viewing.value ? dayOfItem(viewing.value) : null;
|
|
5575
5609
|
});
|
|
5576
5610
|
return (_ctx, _cache) => {
|
|
5577
|
-
return openBlock(), createElementBlock("div", _hoisted_1$
|
|
5578
|
-
!__props.hideHeader ? (openBlock(), createElementBlock("header", _hoisted_2$
|
|
5611
|
+
return openBlock(), createElementBlock("div", _hoisted_1$7, [
|
|
5612
|
+
!__props.hideHeader ? (openBlock(), createElementBlock("header", _hoisted_2$6, [
|
|
5579
5613
|
!embedded.value ? (openBlock(), createElementBlock("button", {
|
|
5580
5614
|
key: 0,
|
|
5581
5615
|
type: "button",
|
|
@@ -5584,8 +5618,8 @@ var CollectionView_default = /* @__PURE__ */ defineComponent({
|
|
|
5584
5618
|
"aria-label": unref(t)("collectionsView.backToIndex"),
|
|
5585
5619
|
"data-testid": "collections-back",
|
|
5586
5620
|
onClick: goBack
|
|
5587
|
-
}, [..._cache[28] || (_cache[28] = [createElementVNode("span", { class: "material-icons text-lg" }, "arrow_back", -1)])], 8, _hoisted_3$
|
|
5588
|
-
collection.value ? (openBlock(), createElementBlock("div", _hoisted_4$
|
|
5621
|
+
}, [..._cache[28] || (_cache[28] = [createElementVNode("span", { class: "material-icons text-lg" }, "arrow_back", -1)])], 8, _hoisted_3$6)) : createCommentVNode("", true),
|
|
5622
|
+
collection.value ? (openBlock(), createElementBlock("div", _hoisted_4$6, [createElementVNode("span", _hoisted_5$5, toDisplayString(collection.value.icon), 1)])) : createCommentVNode("", true),
|
|
5589
5623
|
createElementVNode("div", _hoisted_6$4, [createElementVNode("h1", _hoisted_7$4, toDisplayString(collection.value?.title ?? unref(t)("collectionsView.title")), 1), collection.value ? (openBlock(), createElementBlock("span", _hoisted_8$4, [createTextVNode(toDisplayString(collection.value.slug) + " ", 1), isReadOnly.value ? (openBlock(), createElementBlock(Fragment, { key: 0 }, [createElementVNode("span", _hoisted_9$4, [_cache[29] || (_cache[29] = createElementVNode("span", { class: "material-icons text-[11px]" }, "lock", -1)), createTextVNode(" " + toDisplayString(unref(t)("collectionsView.readonlyChip")), 1)]), dataSourceRoute.value ? (openBlock(), createElementBlock("a", {
|
|
5590
5624
|
key: 0,
|
|
5591
5625
|
href: dataSourceRoute.value ?? void 0,
|
|
@@ -6202,7 +6236,7 @@ var CollectionView_default = /* @__PURE__ */ defineComponent({
|
|
|
6202
6236
|
});
|
|
6203
6237
|
//#endregion
|
|
6204
6238
|
//#region src/vue/chat/View.vue?vue&type=script&setup=true&lang.ts
|
|
6205
|
-
var _hoisted_1$
|
|
6239
|
+
var _hoisted_1$6 = {
|
|
6206
6240
|
class: "w-full h-full",
|
|
6207
6241
|
"data-testid": "present-collection"
|
|
6208
6242
|
};
|
|
@@ -6254,7 +6288,7 @@ var View_default = /* @__PURE__ */ defineComponent({
|
|
|
6254
6288
|
});
|
|
6255
6289
|
}
|
|
6256
6290
|
return (_ctx, _cache) => {
|
|
6257
|
-
return openBlock(), createElementBlock("div", _hoisted_1$
|
|
6291
|
+
return openBlock(), createElementBlock("div", _hoisted_1$6, [slug.value ? (openBlock(), createBlock(CollectionView_default, {
|
|
6258
6292
|
key: 0,
|
|
6259
6293
|
slug: slug.value,
|
|
6260
6294
|
selected: selected.value,
|
|
@@ -6277,10 +6311,10 @@ var View_default = /* @__PURE__ */ defineComponent({
|
|
|
6277
6311
|
});
|
|
6278
6312
|
//#endregion
|
|
6279
6313
|
//#region src/vue/chat/Preview.vue?vue&type=script&setup=true&lang.ts
|
|
6280
|
-
var _hoisted_1$
|
|
6281
|
-
var _hoisted_2$
|
|
6282
|
-
var _hoisted_3$
|
|
6283
|
-
var _hoisted_4$
|
|
6314
|
+
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" };
|
|
6315
|
+
var _hoisted_2$5 = { class: "text-center" };
|
|
6316
|
+
var _hoisted_3$5 = { class: "text-gray-900 font-bold text-lg mb-1 line-clamp-2" };
|
|
6317
|
+
var _hoisted_4$5 = {
|
|
6284
6318
|
key: 0,
|
|
6285
6319
|
class: "text-gray-600 text-sm"
|
|
6286
6320
|
};
|
|
@@ -6300,26 +6334,26 @@ var Preview_default = /* @__PURE__ */ defineComponent({
|
|
|
6300
6334
|
const collectionSlug = computed(() => data.value?.collectionSlug ?? "");
|
|
6301
6335
|
const itemId = computed(() => data.value?.itemId);
|
|
6302
6336
|
return (_ctx, _cache) => {
|
|
6303
|
-
return openBlock(), createElementBlock("div", _hoisted_1$
|
|
6337
|
+
return openBlock(), createElementBlock("div", _hoisted_1$5, [createElementVNode("div", _hoisted_2$5, [
|
|
6304
6338
|
_cache[0] || (_cache[0] = createElementVNode("span", { class: "material-icons text-4xl text-indigo-600 mb-2" }, "collections_bookmark", -1)),
|
|
6305
|
-
createElementVNode("h3", _hoisted_3$
|
|
6306
|
-
itemId.value ? (openBlock(), createElementBlock("p", _hoisted_4$
|
|
6339
|
+
createElementVNode("h3", _hoisted_3$5, toDisplayString(collectionSlug.value || unref(t)("pluginPresentCollection.fallbackTitle")), 1),
|
|
6340
|
+
itemId.value ? (openBlock(), createElementBlock("p", _hoisted_4$5, toDisplayString(unref(t)("pluginPresentCollection.itemLabel", { id: itemId.value })), 1)) : (openBlock(), createElementBlock("p", _hoisted_5$4, toDisplayString(unref(t)("pluginPresentCollection.listLabel")), 1))
|
|
6307
6341
|
])]);
|
|
6308
6342
|
};
|
|
6309
6343
|
}
|
|
6310
6344
|
});
|
|
6311
6345
|
//#endregion
|
|
6312
6346
|
//#region src/vue/components/DiscoverPanel.vue?vue&type=script&setup=true&lang.ts
|
|
6313
|
-
var _hoisted_1$
|
|
6314
|
-
var _hoisted_2$
|
|
6347
|
+
var _hoisted_1$4 = { "data-testid": "discover-panel" };
|
|
6348
|
+
var _hoisted_2$4 = {
|
|
6315
6349
|
key: 0,
|
|
6316
6350
|
class: "flex flex-col items-center justify-center py-20 text-sm text-slate-500 gap-3"
|
|
6317
6351
|
};
|
|
6318
|
-
var _hoisted_3$
|
|
6352
|
+
var _hoisted_3$4 = {
|
|
6319
6353
|
key: 1,
|
|
6320
6354
|
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"
|
|
6321
6355
|
};
|
|
6322
|
-
var _hoisted_4$
|
|
6356
|
+
var _hoisted_4$4 = {
|
|
6323
6357
|
key: 2,
|
|
6324
6358
|
class: "rounded-xl border border-slate-200 bg-white px-6 py-12 text-center text-sm text-slate-500 shadow-sm"
|
|
6325
6359
|
};
|
|
@@ -6429,7 +6463,7 @@ var DiscoverPanel_default = /* @__PURE__ */ defineComponent({
|
|
|
6429
6463
|
}
|
|
6430
6464
|
onMounted(load);
|
|
6431
6465
|
return (_ctx, _cache) => {
|
|
6432
|
-
return openBlock(), createElementBlock("div", _hoisted_1$
|
|
6466
|
+
return openBlock(), createElementBlock("div", _hoisted_1$4, [loading.value ? (openBlock(), createElementBlock("div", _hoisted_2$4, [_cache[0] || (_cache[0] = createElementVNode("div", { class: "h-8 w-8 border-2 border-teal-600/20 border-t-teal-600 rounded-full animate-spin" }, null, -1)), createElementVNode("span", null, toDisplayString(unref(t)("common.loading")), 1)])) : loadError.value ? (openBlock(), createElementBlock("div", _hoisted_3$4, [_cache[1] || (_cache[1] = createElementVNode("span", { class: "material-icons text-red-600" }, "error", -1)), createElementVNode("span", null, toDisplayString(unref(t)("collectionsView.discover.loadFailed")) + ": " + toDisplayString(loadError.value), 1)])) : entries.value.length === 0 ? (openBlock(), createElementBlock("div", _hoisted_4$4, [_cache[2] || (_cache[2] = createElementVNode("span", { class: "material-icons text-4xl text-slate-300 mb-2" }, "travel_explore", -1)), createElementVNode("p", _hoisted_5$3, toDisplayString(unref(t)("collectionsView.discover.empty")), 1)])) : (openBlock(), createElementBlock("div", _hoisted_6$3, [(openBlock(true), createElementBlock(Fragment, null, renderList(entries.value, (entry) => {
|
|
6433
6467
|
return openBlock(), createElementBlock("div", {
|
|
6434
6468
|
key: entryKey(entry),
|
|
6435
6469
|
class: "relative rounded-xl border border-slate-200 bg-white p-5 shadow-sm flex flex-col gap-3",
|
|
@@ -6476,6 +6510,164 @@ var DiscoverPanel_default = /* @__PURE__ */ defineComponent({
|
|
|
6476
6510
|
}
|
|
6477
6511
|
});
|
|
6478
6512
|
//#endregion
|
|
6513
|
+
//#region src/vue/components/CollectionOntologyGraphView.vue?vue&type=script&setup=true&lang.ts
|
|
6514
|
+
var _hoisted_1$3 = {
|
|
6515
|
+
class: "rounded-xl border border-slate-200 bg-white shadow-sm overflow-hidden",
|
|
6516
|
+
"data-testid": "collections-map-panel"
|
|
6517
|
+
};
|
|
6518
|
+
var _hoisted_2$3 = {
|
|
6519
|
+
key: 0,
|
|
6520
|
+
class: "flex flex-col items-center justify-center py-20 text-sm text-slate-500 gap-3"
|
|
6521
|
+
};
|
|
6522
|
+
var _hoisted_3$3 = {
|
|
6523
|
+
key: 1,
|
|
6524
|
+
class: "flex items-center gap-3 p-4 text-sm text-red-800"
|
|
6525
|
+
};
|
|
6526
|
+
var _hoisted_4$3 = {
|
|
6527
|
+
key: 2,
|
|
6528
|
+
class: "px-6 py-12 text-center text-sm text-slate-500",
|
|
6529
|
+
"data-testid": "collections-map-empty"
|
|
6530
|
+
};
|
|
6531
|
+
//#endregion
|
|
6532
|
+
//#region src/vue/components/CollectionOntologyGraphView.vue
|
|
6533
|
+
var CollectionOntologyGraphView_default = /* @__PURE__ */ defineComponent({
|
|
6534
|
+
__name: "CollectionOntologyGraphView",
|
|
6535
|
+
emits: ["open"],
|
|
6536
|
+
setup(__props, { emit: __emit }) {
|
|
6537
|
+
const emit = __emit;
|
|
6538
|
+
const { t } = useCollectionI18n();
|
|
6539
|
+
const cui = collectionUi();
|
|
6540
|
+
const container = ref(null);
|
|
6541
|
+
const loading = ref(true);
|
|
6542
|
+
const loadError = ref(false);
|
|
6543
|
+
const graph = ref({
|
|
6544
|
+
nodes: [],
|
|
6545
|
+
edges: []
|
|
6546
|
+
});
|
|
6547
|
+
let instance = null;
|
|
6548
|
+
const nodeSize = (node) => node.missing ? 14 : Math.min(40, 20 + Math.round(Math.log2(node.recordCount + 1) * 4));
|
|
6549
|
+
const nodeItem = (node) => ({
|
|
6550
|
+
id: node.slug,
|
|
6551
|
+
name: node.title,
|
|
6552
|
+
symbolSize: nodeSize(node),
|
|
6553
|
+
itemStyle: node.missing ? {
|
|
6554
|
+
color: "#e2e8f0",
|
|
6555
|
+
borderColor: "#94a3b8",
|
|
6556
|
+
borderType: "dashed",
|
|
6557
|
+
borderWidth: 1
|
|
6558
|
+
} : { color: "#4f46e5" },
|
|
6559
|
+
label: node.missing ? { color: "#94a3b8" } : void 0,
|
|
6560
|
+
missing: node.missing === true,
|
|
6561
|
+
recordCount: node.recordCount
|
|
6562
|
+
});
|
|
6563
|
+
const edgeItem = (edge) => ({
|
|
6564
|
+
source: edge.from,
|
|
6565
|
+
target: edge.to,
|
|
6566
|
+
lineStyle: edge.kind === "ref" ? void 0 : { type: "dashed" },
|
|
6567
|
+
label: {
|
|
6568
|
+
show: true,
|
|
6569
|
+
formatter: edge.field,
|
|
6570
|
+
fontSize: 9,
|
|
6571
|
+
color: "#64748b"
|
|
6572
|
+
},
|
|
6573
|
+
field: edge.field,
|
|
6574
|
+
kind: edge.kind,
|
|
6575
|
+
reverseFields: edge.reverseFields
|
|
6576
|
+
});
|
|
6577
|
+
const nodeTooltip = (data) => {
|
|
6578
|
+
if (data.missing) return `<b>${escapeHtml(data.id)}</b><br>${escapeHtml(t("collectionsView.mapMissingHint"))}`;
|
|
6579
|
+
return `<b>${escapeHtml(data.name)}</b><br>${escapeHtml(data.id)} · ${escapeHtml(t("collectionsView.mapRecordCount", { count: data.recordCount }))}`;
|
|
6580
|
+
};
|
|
6581
|
+
const edgeTooltip = (data) => {
|
|
6582
|
+
const reverse = data.reverseFields?.length ? ` ⇄ ${data.reverseFields.join(", ")}` : "";
|
|
6583
|
+
return `${escapeHtml(data.source)} —${escapeHtml(data.field)}→ ${escapeHtml(data.target)}<br><span style="color:#64748b">${escapeHtml(data.kind)}${escapeHtml(reverse)}</span>`;
|
|
6584
|
+
};
|
|
6585
|
+
const tooltipFormatter = (params) => {
|
|
6586
|
+
const { dataType, data } = params;
|
|
6587
|
+
return dataType === "edge" ? edgeTooltip(data) : nodeTooltip(data);
|
|
6588
|
+
};
|
|
6589
|
+
const buildOption = (value) => ({
|
|
6590
|
+
tooltip: {
|
|
6591
|
+
show: true,
|
|
6592
|
+
formatter: tooltipFormatter
|
|
6593
|
+
},
|
|
6594
|
+
series: [{
|
|
6595
|
+
type: "graph",
|
|
6596
|
+
layout: "force",
|
|
6597
|
+
roam: true,
|
|
6598
|
+
draggable: true,
|
|
6599
|
+
label: {
|
|
6600
|
+
show: true,
|
|
6601
|
+
position: "right",
|
|
6602
|
+
fontSize: 11
|
|
6603
|
+
},
|
|
6604
|
+
force: {
|
|
6605
|
+
repulsion: 180,
|
|
6606
|
+
edgeLength: 120,
|
|
6607
|
+
gravity: .08
|
|
6608
|
+
},
|
|
6609
|
+
emphasis: { focus: "adjacency" },
|
|
6610
|
+
lineStyle: {
|
|
6611
|
+
color: "#cbd5e1",
|
|
6612
|
+
width: 1.5,
|
|
6613
|
+
curveness: .1
|
|
6614
|
+
},
|
|
6615
|
+
edgeSymbol: ["none", "arrow"],
|
|
6616
|
+
edgeSymbolSize: 7,
|
|
6617
|
+
data: value.nodes.map(nodeItem),
|
|
6618
|
+
links: value.edges.map(edgeItem)
|
|
6619
|
+
}]
|
|
6620
|
+
});
|
|
6621
|
+
const render = () => {
|
|
6622
|
+
const element = container.value;
|
|
6623
|
+
if (!element) return;
|
|
6624
|
+
if (!instance) {
|
|
6625
|
+
instance = echarts.init(element);
|
|
6626
|
+
instance.on("click", (params) => {
|
|
6627
|
+
if (params.dataType !== "node") return;
|
|
6628
|
+
const data = params.data;
|
|
6629
|
+
if (typeof data?.id === "string" && data.missing !== true) emit("open", data.id);
|
|
6630
|
+
});
|
|
6631
|
+
}
|
|
6632
|
+
instance.setOption(buildOption(graph.value), true);
|
|
6633
|
+
};
|
|
6634
|
+
const load = async () => {
|
|
6635
|
+
loading.value = true;
|
|
6636
|
+
loadError.value = false;
|
|
6637
|
+
const result = await cui.fetchOntology?.();
|
|
6638
|
+
loading.value = false;
|
|
6639
|
+
if (!result?.ok) {
|
|
6640
|
+
loadError.value = true;
|
|
6641
|
+
return;
|
|
6642
|
+
}
|
|
6643
|
+
graph.value = buildOntologyGraph(result.data.entries);
|
|
6644
|
+
await nextTick();
|
|
6645
|
+
render();
|
|
6646
|
+
};
|
|
6647
|
+
const handleResize = () => {
|
|
6648
|
+
instance?.resize();
|
|
6649
|
+
};
|
|
6650
|
+
onMounted(() => {
|
|
6651
|
+
load();
|
|
6652
|
+
window.addEventListener("resize", handleResize);
|
|
6653
|
+
});
|
|
6654
|
+
onBeforeUnmount(() => {
|
|
6655
|
+
window.removeEventListener("resize", handleResize);
|
|
6656
|
+
instance?.dispose();
|
|
6657
|
+
instance = null;
|
|
6658
|
+
});
|
|
6659
|
+
return (_ctx, _cache) => {
|
|
6660
|
+
return openBlock(), createElementBlock("div", _hoisted_1$3, [loading.value ? (openBlock(), createElementBlock("div", _hoisted_2$3, [_cache[0] || (_cache[0] = createElementVNode("div", { class: "h-8 w-8 border-2 border-indigo-600/20 border-t-indigo-600 rounded-full animate-spin" }, null, -1)), createElementVNode("span", null, toDisplayString(unref(t)("common.loading")), 1)])) : loadError.value ? (openBlock(), createElementBlock("div", _hoisted_3$3, [_cache[1] || (_cache[1] = createElementVNode("span", { class: "material-icons text-red-600" }, "error", -1)), createElementVNode("span", null, toDisplayString(unref(t)("collectionsView.loadFailed")), 1)])) : graph.value.nodes.length === 0 ? (openBlock(), createElementBlock("div", _hoisted_4$3, [_cache[2] || (_cache[2] = createElementVNode("span", { class: "material-icons text-4xl text-slate-300 mb-2" }, "hub", -1)), createElementVNode("p", null, toDisplayString(unref(t)("collectionsView.mapEmpty")), 1)])) : (openBlock(), createElementBlock("div", {
|
|
6661
|
+
key: 3,
|
|
6662
|
+
ref_key: "container",
|
|
6663
|
+
ref: container,
|
|
6664
|
+
class: "w-full h-[32rem]",
|
|
6665
|
+
"data-testid": "collections-map-canvas"
|
|
6666
|
+
}, null, 512))]);
|
|
6667
|
+
};
|
|
6668
|
+
}
|
|
6669
|
+
});
|
|
6670
|
+
//#endregion
|
|
6479
6671
|
//#region src/vue/starters.ts
|
|
6480
6672
|
var COLLECTION_STARTERS = [
|
|
6481
6673
|
{
|
|
@@ -6738,6 +6930,7 @@ var CollectionsIndexView_default = /* @__PURE__ */ defineComponent({
|
|
|
6738
6930
|
const cui = collectionUi();
|
|
6739
6931
|
const { pinToggle, reconcileShortcuts } = cui;
|
|
6740
6932
|
const tab = ref("installed");
|
|
6933
|
+
const hasOntology = cui.fetchOntology !== void 0;
|
|
6741
6934
|
const showNewCollectionModal = ref(false);
|
|
6742
6935
|
const collections = ref([]);
|
|
6743
6936
|
const loading = ref(true);
|
|
@@ -6792,31 +6985,44 @@ var CollectionsIndexView_default = /* @__PURE__ */ defineComponent({
|
|
|
6792
6985
|
onMounted(loadCollections);
|
|
6793
6986
|
return (_ctx, _cache) => {
|
|
6794
6987
|
return openBlock(), createElementBlock("div", _hoisted_1$1, [createElementVNode("div", _hoisted_2$1, [
|
|
6795
|
-
createElementVNode("div", _hoisted_3$1, [createElementVNode("div", _hoisted_4$1, [createElementVNode("h1", _hoisted_5$1, toDisplayString(unref(t)("collectionsView.title")), 1), createElementVNode("div", _hoisted_6$1, [
|
|
6796
|
-
|
|
6797
|
-
|
|
6798
|
-
|
|
6799
|
-
|
|
6800
|
-
|
|
6801
|
-
|
|
6802
|
-
|
|
6803
|
-
|
|
6804
|
-
|
|
6805
|
-
|
|
6988
|
+
createElementVNode("div", _hoisted_3$1, [createElementVNode("div", _hoisted_4$1, [createElementVNode("h1", _hoisted_5$1, toDisplayString(unref(t)("collectionsView.title")), 1), createElementVNode("div", _hoisted_6$1, [
|
|
6989
|
+
createElementVNode("button", {
|
|
6990
|
+
type: "button",
|
|
6991
|
+
class: 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"]),
|
|
6992
|
+
"data-testid": "collections-tab-installed",
|
|
6993
|
+
onClick: _cache[0] || (_cache[0] = ($event) => tab.value = "installed")
|
|
6994
|
+
}, toDisplayString(unref(t)("collectionsView.discover.installedTab")), 3),
|
|
6995
|
+
createElementVNode("button", {
|
|
6996
|
+
type: "button",
|
|
6997
|
+
class: 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"]),
|
|
6998
|
+
"data-testid": "collections-tab-discover",
|
|
6999
|
+
onClick: _cache[1] || (_cache[1] = ($event) => tab.value = "discover")
|
|
7000
|
+
}, toDisplayString(unref(t)("collectionsView.discover.tab")), 3),
|
|
7001
|
+
hasOntology ? (openBlock(), createElementBlock("button", {
|
|
7002
|
+
key: 0,
|
|
7003
|
+
type: "button",
|
|
7004
|
+
class: 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"]),
|
|
7005
|
+
"data-testid": "collections-tab-map",
|
|
7006
|
+
onClick: _cache[2] || (_cache[2] = ($event) => tab.value = "map")
|
|
7007
|
+
}, toDisplayString(unref(t)("collectionsView.mapTab")), 3)) : createCommentVNode("", true)
|
|
7008
|
+
])]), tab.value === "installed" ? (openBlock(), createElementBlock("button", {
|
|
6806
7009
|
key: 0,
|
|
6807
7010
|
type: "button",
|
|
6808
7011
|
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",
|
|
6809
7012
|
"data-testid": "collections-add-collection",
|
|
6810
|
-
onClick: _cache[
|
|
6811
|
-
}, [_cache[
|
|
7013
|
+
onClick: _cache[3] || (_cache[3] = ($event) => showNewCollectionModal.value = true)
|
|
7014
|
+
}, [_cache[5] || (_cache[5] = createElementVNode("span", { class: "material-icons text-sm" }, "add", -1)), createElementVNode("span", null, toDisplayString(unref(t)("collectionsView.addCollectionLabel")), 1)])) : createCommentVNode("", true)]),
|
|
6812
7015
|
showNewCollectionModal.value ? (openBlock(), createBlock(NewCollectionModal_default, {
|
|
6813
7016
|
key: 0,
|
|
6814
|
-
onClose: _cache[
|
|
7017
|
+
onClose: _cache[4] || (_cache[4] = ($event) => showNewCollectionModal.value = false)
|
|
6815
7018
|
})) : createCommentVNode("", true),
|
|
6816
7019
|
tab.value === "discover" ? (openBlock(), createBlock(DiscoverPanel_default, {
|
|
6817
7020
|
key: 1,
|
|
6818
7021
|
onImported: loadCollections
|
|
6819
|
-
})) :
|
|
7022
|
+
})) : tab.value === "map" ? (openBlock(), createBlock(CollectionOntologyGraphView_default, {
|
|
7023
|
+
key: 2,
|
|
7024
|
+
onOpen: openCollection
|
|
7025
|
+
})) : (openBlock(), createElementBlock(Fragment, { key: 3 }, [loading.value ? (openBlock(), createElementBlock("div", _hoisted_7$1, [_cache[6] || (_cache[6] = createElementVNode("div", { class: "h-8 w-8 border-2 border-indigo-600/20 border-t-indigo-600 rounded-full animate-spin" }, null, -1)), createElementVNode("span", null, toDisplayString(unref(t)("common.loading")), 1)])) : loadError.value ? (openBlock(), createElementBlock("div", _hoisted_8$1, [_cache[7] || (_cache[7] = createElementVNode("span", { class: "material-icons text-red-600" }, "error", -1)), createElementVNode("span", null, toDisplayString(unref(t)("collectionsView.loadFailed")) + ": " + toDisplayString(loadError.value), 1)])) : collections.value.length === 0 ? (openBlock(), createElementBlock("div", _hoisted_9$1, [_cache[8] || (_cache[8] = createElementVNode("span", { class: "material-icons text-4xl text-slate-300 mb-2" }, "dashboard_customize", -1)), createElementVNode("p", _hoisted_10$1, toDisplayString(unref(t)("collectionsView.indexEmpty")), 1)])) : (openBlock(), createElementBlock("div", _hoisted_11$1, [hasReadonlyCollections.value ? (openBlock(), createElementBlock("div", _hoisted_12$1, [(openBlock(), createElementBlock(Fragment, null, renderList(FILTER_CHIPS, (chip) => {
|
|
6820
7026
|
return createElementVNode("button", {
|
|
6821
7027
|
key: chip,
|
|
6822
7028
|
type: "button",
|
|
@@ -6845,7 +7051,7 @@ var CollectionsIndexView_default = /* @__PURE__ */ defineComponent({
|
|
|
6845
7051
|
key: 0,
|
|
6846
7052
|
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",
|
|
6847
7053
|
"data-testid": `collections-readonly-badge-${collection.slug}`
|
|
6848
|
-
}, [_cache[
|
|
7054
|
+
}, [_cache[9] || (_cache[9] = createElementVNode("span", { class: "material-icons text-[11px]" }, "lock", -1)), createTextVNode(" " + toDisplayString(unref(t)("collectionsView.readonlyChip")), 1)], 8, _hoisted_21$1)) : createCommentVNode("", true)
|
|
6849
7055
|
])]),
|
|
6850
7056
|
(openBlock(), createBlock(resolveDynamicComponent(unref(pinToggle)), {
|
|
6851
7057
|
kind: "collection",
|
|
@@ -6865,8 +7071,8 @@ var CollectionsIndexView_default = /* @__PURE__ */ defineComponent({
|
|
|
6865
7071
|
"aria-label": unref(t)("collectionsView.contribute"),
|
|
6866
7072
|
"data-testid": `collections-contribute-${collection.slug}`,
|
|
6867
7073
|
onClick: withModifiers(($event) => startContributeChat(collection), ["stop"])
|
|
6868
|
-
}, [..._cache[
|
|
6869
|
-
_cache[
|
|
7074
|
+
}, [..._cache[10] || (_cache[10] = [createElementVNode("span", { class: "material-icons text-lg" }, "ios_share", -1)])], 8, _hoisted_22$1)) : createCommentVNode("", true),
|
|
7075
|
+
_cache[11] || (_cache[11] = 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" }, [createElementVNode("span", { class: "material-icons text-lg transition-transform duration-300 group-hover:translate-x-0.5" }, "chevron_right")], -1))
|
|
6870
7076
|
], 40, _hoisted_15$1);
|
|
6871
7077
|
}), 128))])]))], 64))
|
|
6872
7078
|
])]);
|