@mulmoclaude/collection-plugin 0.14.0 → 0.15.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/vue/components/CollectionOntologyGraphView.vue.d.ts.map +1 -1
- package/dist/vue/components/CollectionView.vue.d.ts.map +1 -1
- package/dist/vue/lang/de.d.ts.map +1 -1
- package/dist/vue/lang/en.d.ts +6 -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 +6 -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/relatedCollections.d.ts +15 -0
- package/dist/vue/relatedCollections.d.ts.map +1 -0
- package/dist/vue.cjs +371 -165
- package/dist/vue.cjs.map +1 -1
- package/dist/vue.js +371 -165
- package/dist/vue.js.map +1 -1
- package/package.json +3 -3
package/dist/vue.js
CHANGED
|
@@ -80,6 +80,7 @@ var i18n = createI18n({
|
|
|
80
80
|
mapTab: "Map",
|
|
81
81
|
mapEmpty: "Nothing to map yet — the map draws itself as collections and the links between them appear.",
|
|
82
82
|
mapRecordCount: "{count} records",
|
|
83
|
+
mapRecordCountUnknown: "record count unavailable",
|
|
83
84
|
mapMissingHint: "No collection with this slug — a relation points at it.",
|
|
84
85
|
notFound: "Collection not found",
|
|
85
86
|
loadFailed: "Failed to load",
|
|
@@ -107,6 +108,11 @@ var i18n = createI18n({
|
|
|
107
108
|
derivedLabel: "Derived",
|
|
108
109
|
embedMissingTitle: "Embedded reference missing",
|
|
109
110
|
chat: "Chat",
|
|
111
|
+
related: "Related",
|
|
112
|
+
relatedEmpty: "No related collections",
|
|
113
|
+
relatedOut: "This collection links to it",
|
|
114
|
+
relatedIn: "It links to this collection",
|
|
115
|
+
relatedBoth: "Linked both ways",
|
|
110
116
|
refreshFeed: "Refresh",
|
|
111
117
|
refreshFailed: "Refresh failed: {error}",
|
|
112
118
|
refreshDispatched: "Refresh started in the background.",
|
|
@@ -232,6 +238,7 @@ var i18n = createI18n({
|
|
|
232
238
|
mapTab: "マップ",
|
|
233
239
|
mapEmpty: "まだ表示するものがありません。コレクションとその間のリンクが増えると、マップが自動的に描かれます。",
|
|
234
240
|
mapRecordCount: "{count} 件のレコード",
|
|
241
|
+
mapRecordCountUnknown: "レコード数を取得できません",
|
|
235
242
|
mapMissingHint: "このスラッグのコレクションは存在しません。リレーションが参照しています。",
|
|
236
243
|
notFound: "コレクションが見つかりません",
|
|
237
244
|
loadFailed: "読み込みに失敗しました",
|
|
@@ -259,6 +266,11 @@ var i18n = createI18n({
|
|
|
259
266
|
derivedLabel: "計算値",
|
|
260
267
|
embedMissingTitle: "埋め込み参照が見つかりません",
|
|
261
268
|
chat: "チャット",
|
|
269
|
+
related: "関連",
|
|
270
|
+
relatedEmpty: "関連するコレクションはありません",
|
|
271
|
+
relatedOut: "このコレクションからのリンク",
|
|
272
|
+
relatedIn: "このコレクションへのリンク",
|
|
273
|
+
relatedBoth: "相互にリンク",
|
|
262
274
|
refreshFeed: "更新",
|
|
263
275
|
refreshFailed: "更新に失敗しました: {error}",
|
|
264
276
|
refreshDispatched: "バックグラウンドで更新を開始しました。",
|
|
@@ -384,6 +396,7 @@ var i18n = createI18n({
|
|
|
384
396
|
mapTab: "地图",
|
|
385
397
|
mapEmpty: "暂无可显示的内容。随着集合及其之间的链接增多,地图会自动绘制。",
|
|
386
398
|
mapRecordCount: "{count} 条记录",
|
|
399
|
+
mapRecordCountUnknown: "无法获取记录数",
|
|
387
400
|
mapMissingHint: "不存在此 slug 的集合,但有关系指向它。",
|
|
388
401
|
notFound: "未找到集合",
|
|
389
402
|
loadFailed: "加载失败",
|
|
@@ -411,6 +424,11 @@ var i18n = createI18n({
|
|
|
411
424
|
derivedLabel: "派生",
|
|
412
425
|
embedMissingTitle: "缺少嵌入引用",
|
|
413
426
|
chat: "对话",
|
|
427
|
+
related: "关联",
|
|
428
|
+
relatedEmpty: "没有关联的集合",
|
|
429
|
+
relatedOut: "此集合链接到它",
|
|
430
|
+
relatedIn: "它链接到此集合",
|
|
431
|
+
relatedBoth: "双向关联",
|
|
414
432
|
refreshFeed: "刷新",
|
|
415
433
|
refreshFailed: "刷新失败:{error}",
|
|
416
434
|
refreshDispatched: "已在后台开始刷新。",
|
|
@@ -536,6 +554,7 @@ var i18n = createI18n({
|
|
|
536
554
|
mapTab: "맵",
|
|
537
555
|
mapEmpty: "아직 표시할 내용이 없습니다. 컬렉션과 그 사이의 링크가 생기면 맵이 자동으로 그려집니다.",
|
|
538
556
|
mapRecordCount: "레코드 {count}개",
|
|
557
|
+
mapRecordCountUnknown: "레코드 수를 가져올 수 없음",
|
|
539
558
|
mapMissingHint: "이 슬러그의 컬렉션이 없습니다. 관계가 이를 참조하고 있습니다.",
|
|
540
559
|
notFound: "컬렉션을 찾을 수 없습니다",
|
|
541
560
|
loadFailed: "불러오기에 실패했습니다",
|
|
@@ -563,6 +582,11 @@ var i18n = createI18n({
|
|
|
563
582
|
derivedLabel: "파생",
|
|
564
583
|
embedMissingTitle: "임베드된 참조 없음",
|
|
565
584
|
chat: "채팅",
|
|
585
|
+
related: "관련",
|
|
586
|
+
relatedEmpty: "관련 컬렉션이 없습니다",
|
|
587
|
+
relatedOut: "이 컬렉션이 링크함",
|
|
588
|
+
relatedIn: "이 컬렉션으로 링크함",
|
|
589
|
+
relatedBoth: "양방향 링크",
|
|
566
590
|
refreshFeed: "새로고침",
|
|
567
591
|
refreshFailed: "새로고침 실패: {error}",
|
|
568
592
|
refreshDispatched: "백그라운드에서 새로고침을 시작했습니다.",
|
|
@@ -688,6 +712,7 @@ var i18n = createI18n({
|
|
|
688
712
|
mapTab: "Mapa",
|
|
689
713
|
mapEmpty: "Nada que mostrar todavía: el mapa se dibuja solo a medida que aparecen colecciones y los enlaces entre ellas.",
|
|
690
714
|
mapRecordCount: "{count} registros",
|
|
715
|
+
mapRecordCountUnknown: "recuento de registros no disponible",
|
|
691
716
|
mapMissingHint: "No existe una colección con este slug; una relación apunta a ella.",
|
|
692
717
|
notFound: "Colección no encontrada",
|
|
693
718
|
loadFailed: "Error al cargar",
|
|
@@ -715,6 +740,11 @@ var i18n = createI18n({
|
|
|
715
740
|
derivedLabel: "Derivado",
|
|
716
741
|
embedMissingTitle: "Falta la referencia incrustada",
|
|
717
742
|
chat: "Chat",
|
|
743
|
+
related: "Relacionadas",
|
|
744
|
+
relatedEmpty: "No hay colecciones relacionadas",
|
|
745
|
+
relatedOut: "Esta colección enlaza con ella",
|
|
746
|
+
relatedIn: "Enlaza con esta colección",
|
|
747
|
+
relatedBoth: "Enlazadas en ambos sentidos",
|
|
718
748
|
refreshFeed: "Actualizar",
|
|
719
749
|
refreshFailed: "Error al actualizar: {error}",
|
|
720
750
|
refreshDispatched: "Actualización iniciada en segundo plano.",
|
|
@@ -840,6 +870,7 @@ var i18n = createI18n({
|
|
|
840
870
|
mapTab: "Mapa",
|
|
841
871
|
mapEmpty: "Nada para mostrar ainda — o mapa se desenha sozinho conforme coleções e os vínculos entre elas aparecem.",
|
|
842
872
|
mapRecordCount: "{count} registros",
|
|
873
|
+
mapRecordCountUnknown: "contagem de registros indisponível",
|
|
843
874
|
mapMissingHint: "Nenhuma coleção com este slug — uma relação aponta para ela.",
|
|
844
875
|
notFound: "Coleção não encontrada",
|
|
845
876
|
loadFailed: "Falha ao carregar",
|
|
@@ -867,6 +898,11 @@ var i18n = createI18n({
|
|
|
867
898
|
derivedLabel: "Derivado",
|
|
868
899
|
embedMissingTitle: "Referência incorporada ausente",
|
|
869
900
|
chat: "Chat",
|
|
901
|
+
related: "Relacionadas",
|
|
902
|
+
relatedEmpty: "Nenhuma coleção relacionada",
|
|
903
|
+
relatedOut: "Esta coleção faz referência a ela",
|
|
904
|
+
relatedIn: "Faz referência a esta coleção",
|
|
905
|
+
relatedBoth: "Vinculadas nos dois sentidos",
|
|
870
906
|
refreshFeed: "Atualizar",
|
|
871
907
|
refreshFailed: "Falha ao atualizar: {error}",
|
|
872
908
|
refreshDispatched: "Atualização iniciada em segundo plano.",
|
|
@@ -992,6 +1028,7 @@ var i18n = createI18n({
|
|
|
992
1028
|
mapTab: "Carte",
|
|
993
1029
|
mapEmpty: "Rien à afficher pour l'instant — la carte se dessine d'elle-même à mesure que les collections et leurs liens apparaissent.",
|
|
994
1030
|
mapRecordCount: "{count} enregistrements",
|
|
1031
|
+
mapRecordCountUnknown: "nombre d'enregistrements indisponible",
|
|
995
1032
|
mapMissingHint: "Aucune collection avec ce slug — une relation pointe vers elle.",
|
|
996
1033
|
notFound: "Collection introuvable",
|
|
997
1034
|
loadFailed: "Échec du chargement",
|
|
@@ -1019,6 +1056,11 @@ var i18n = createI18n({
|
|
|
1019
1056
|
derivedLabel: "Calculé",
|
|
1020
1057
|
embedMissingTitle: "Référence intégrée manquante",
|
|
1021
1058
|
chat: "Discussion",
|
|
1059
|
+
related: "Associées",
|
|
1060
|
+
relatedEmpty: "Aucune collection associée",
|
|
1061
|
+
relatedOut: "Cette collection y renvoie",
|
|
1062
|
+
relatedIn: "Renvoie à cette collection",
|
|
1063
|
+
relatedBoth: "Liées dans les deux sens",
|
|
1022
1064
|
refreshFeed: "Actualiser",
|
|
1023
1065
|
refreshFailed: "Échec de l'actualisation : {error}",
|
|
1024
1066
|
refreshDispatched: "Actualisation lancée en arrière-plan.",
|
|
@@ -1144,6 +1186,7 @@ var i18n = createI18n({
|
|
|
1144
1186
|
mapTab: "Karte",
|
|
1145
1187
|
mapEmpty: "Noch nichts zu zeigen — die Karte entsteht von selbst, sobald Sammlungen und ihre Verknüpfungen entstehen.",
|
|
1146
1188
|
mapRecordCount: "{count} Einträge",
|
|
1189
|
+
mapRecordCountUnknown: "Anzahl der Datensätze nicht verfügbar",
|
|
1147
1190
|
mapMissingHint: "Keine Sammlung mit diesem Slug — eine Relation verweist darauf.",
|
|
1148
1191
|
notFound: "Sammlung nicht gefunden",
|
|
1149
1192
|
loadFailed: "Laden fehlgeschlagen",
|
|
@@ -1171,6 +1214,11 @@ var i18n = createI18n({
|
|
|
1171
1214
|
derivedLabel: "Abgeleitet",
|
|
1172
1215
|
embedMissingTitle: "Eingebettete Referenz fehlt",
|
|
1173
1216
|
chat: "Chat",
|
|
1217
|
+
related: "Verwandt",
|
|
1218
|
+
relatedEmpty: "Keine verwandten Sammlungen",
|
|
1219
|
+
relatedOut: "Diese Sammlung verweist darauf",
|
|
1220
|
+
relatedIn: "Verweist auf diese Sammlung",
|
|
1221
|
+
relatedBoth: "In beide Richtungen verknüpft",
|
|
1174
1222
|
refreshFeed: "Aktualisieren",
|
|
1175
1223
|
refreshFailed: "Aktualisierung fehlgeschlagen: {error}",
|
|
1176
1224
|
refreshDispatched: "Aktualisierung im Hintergrund gestartet.",
|
|
@@ -3996,6 +4044,55 @@ function writeCollectionFlagFilters(slug, filters) {
|
|
|
3996
4044
|
} catch {}
|
|
3997
4045
|
}
|
|
3998
4046
|
//#endregion
|
|
4047
|
+
//#region src/vue/relatedCollections.ts
|
|
4048
|
+
/** Fold a new direction observation into the one already recorded for a
|
|
4049
|
+
* neighbor: same direction is idempotent, opposing directions become `both`. */
|
|
4050
|
+
var mergeDirection = (prev, next) => prev === void 0 || prev === next ? next : "both";
|
|
4051
|
+
/** Walk the graph edges touching `slug` and record each neighbor's direction.
|
|
4052
|
+
* Skips self-edges (a collection ref-ing itself) and ghost nodes (a relation
|
|
4053
|
+
* target no discovered collection backs — nothing to navigate to). An edge
|
|
4054
|
+
* carrying `reverseFields` is a bidirectional pair collapsed to one edge, so
|
|
4055
|
+
* it contributes BOTH directions to its neighbor. */
|
|
4056
|
+
function collectDirections(graph, slug) {
|
|
4057
|
+
const nodeBySlug = new Map(graph.nodes.map((node) => [node.slug, node]));
|
|
4058
|
+
const directions = /* @__PURE__ */ new Map();
|
|
4059
|
+
const add = (neighbor, direction) => {
|
|
4060
|
+
if (neighbor === slug) return;
|
|
4061
|
+
const node = nodeBySlug.get(neighbor);
|
|
4062
|
+
if (!node || node.missing) return;
|
|
4063
|
+
directions.set(neighbor, mergeDirection(directions.get(neighbor), direction));
|
|
4064
|
+
};
|
|
4065
|
+
for (const edge of graph.edges) {
|
|
4066
|
+
const bidirectional = (edge.reverseFields?.length ?? 0) > 0;
|
|
4067
|
+
if (edge.from === slug) {
|
|
4068
|
+
add(edge.to, "out");
|
|
4069
|
+
if (bidirectional) add(edge.to, "in");
|
|
4070
|
+
}
|
|
4071
|
+
if (edge.to === slug) {
|
|
4072
|
+
add(edge.from, "in");
|
|
4073
|
+
if (bidirectional) add(edge.from, "out");
|
|
4074
|
+
}
|
|
4075
|
+
}
|
|
4076
|
+
return directions;
|
|
4077
|
+
}
|
|
4078
|
+
/** Collections related to `slug`, in graph node order (title/icon from the
|
|
4079
|
+
* node), empty when it has no navigable relations. */
|
|
4080
|
+
function relatedCollections(entries, slug) {
|
|
4081
|
+
const graph = buildOntologyGraph(entries);
|
|
4082
|
+
const directions = collectDirections(graph, slug);
|
|
4083
|
+
const related = [];
|
|
4084
|
+
for (const node of graph.nodes) {
|
|
4085
|
+
const direction = directions.get(node.slug);
|
|
4086
|
+
if (direction !== void 0) related.push({
|
|
4087
|
+
slug: node.slug,
|
|
4088
|
+
title: node.title,
|
|
4089
|
+
icon: node.icon,
|
|
4090
|
+
direction
|
|
4091
|
+
});
|
|
4092
|
+
}
|
|
4093
|
+
return related;
|
|
4094
|
+
}
|
|
4095
|
+
//#endregion
|
|
3999
4096
|
//#region src/vue/components/CollectionView.vue?vue&type=script&setup=true&lang.ts
|
|
4000
4097
|
var _hoisted_1$7 = { class: "h-full flex flex-col bg-slate-50/30" };
|
|
4001
4098
|
var _hoisted_2$6 = {
|
|
@@ -4021,233 +4118,253 @@ var _hoisted_9$4 = {
|
|
|
4021
4118
|
var _hoisted_10$4 = ["href"];
|
|
4022
4119
|
var _hoisted_11$4 = ["disabled"];
|
|
4023
4120
|
var _hoisted_12$4 = { class: "material-icons text-sm" };
|
|
4024
|
-
var _hoisted_13$4 = [
|
|
4121
|
+
var _hoisted_13$4 = ["aria-expanded"];
|
|
4122
|
+
var _hoisted_14$4 = {
|
|
4123
|
+
key: 0,
|
|
4124
|
+
class: "absolute right-0 top-full mt-1 z-20 min-w-max rounded border border-slate-200 bg-white shadow-lg py-1",
|
|
4125
|
+
"data-testid": "collections-related-menu-panel"
|
|
4126
|
+
};
|
|
4127
|
+
var _hoisted_15$4 = {
|
|
4128
|
+
key: 0,
|
|
4129
|
+
class: "w-full h-8 px-3 flex items-center gap-2 text-xs text-slate-400",
|
|
4130
|
+
"data-testid": "collections-related-loading"
|
|
4131
|
+
};
|
|
4132
|
+
var _hoisted_16$4 = {
|
|
4133
|
+
key: 1,
|
|
4134
|
+
class: "w-full h-8 px-3 flex items-center text-xs text-slate-400",
|
|
4135
|
+
"data-testid": "collections-related-empty"
|
|
4136
|
+
};
|
|
4137
|
+
var _hoisted_17$4 = ["data-testid", "onClick"];
|
|
4138
|
+
var _hoisted_18$4 = { class: "material-symbols-outlined text-base" };
|
|
4139
|
+
var _hoisted_19$3 = { class: "flex-1 text-left" };
|
|
4140
|
+
var _hoisted_20$3 = ["title", "aria-label"];
|
|
4141
|
+
var _hoisted_21$3 = [
|
|
4025
4142
|
"disabled",
|
|
4026
4143
|
"data-testid",
|
|
4027
4144
|
"onClick"
|
|
4028
4145
|
];
|
|
4029
|
-
var
|
|
4146
|
+
var _hoisted_22$3 = {
|
|
4030
4147
|
key: 0,
|
|
4031
4148
|
class: "material-icons text-sm animate-spin"
|
|
4032
4149
|
};
|
|
4033
|
-
var
|
|
4150
|
+
var _hoisted_23$2 = {
|
|
4034
4151
|
key: 1,
|
|
4035
4152
|
class: "material-icons text-sm"
|
|
4036
4153
|
};
|
|
4037
|
-
var
|
|
4038
|
-
var
|
|
4039
|
-
var
|
|
4154
|
+
var _hoisted_24$1 = ["title", "aria-label"];
|
|
4155
|
+
var _hoisted_25$1 = ["title", "aria-label"];
|
|
4156
|
+
var _hoisted_26$1 = {
|
|
4040
4157
|
key: 1,
|
|
4041
4158
|
class: "mx-6 mt-2 rounded-lg border border-indigo-200 bg-indigo-50/60 px-4 py-2 text-sm text-indigo-800 flex items-center gap-2",
|
|
4042
4159
|
"data-testid": "collections-refresh-note"
|
|
4043
4160
|
};
|
|
4044
|
-
var
|
|
4045
|
-
var
|
|
4161
|
+
var _hoisted_27$1 = { class: "flex-1" };
|
|
4162
|
+
var _hoisted_28 = {
|
|
4046
4163
|
key: 2,
|
|
4047
4164
|
class: "px-6 py-3 bg-white border-b border-slate-100 flex items-center justify-between gap-4"
|
|
4048
4165
|
};
|
|
4049
|
-
var
|
|
4166
|
+
var _hoisted_29 = {
|
|
4050
4167
|
key: 0,
|
|
4051
4168
|
class: "relative flex-1 max-w-md"
|
|
4052
4169
|
};
|
|
4053
|
-
var
|
|
4054
|
-
var
|
|
4055
|
-
var
|
|
4056
|
-
var
|
|
4057
|
-
var
|
|
4170
|
+
var _hoisted_30 = ["placeholder", "aria-label"];
|
|
4171
|
+
var _hoisted_31 = ["aria-label"];
|
|
4172
|
+
var _hoisted_32 = { class: "flex items-center gap-2" };
|
|
4173
|
+
var _hoisted_33 = ["aria-label", "aria-expanded"];
|
|
4174
|
+
var _hoisted_34 = {
|
|
4058
4175
|
key: 0,
|
|
4059
4176
|
class: "min-w-4 h-4 px-1 flex items-center justify-center rounded-full bg-indigo-600 text-white text-[10px] font-bold"
|
|
4060
4177
|
};
|
|
4061
|
-
var
|
|
4062
|
-
var
|
|
4178
|
+
var _hoisted_35 = ["aria-label"];
|
|
4179
|
+
var _hoisted_36 = [
|
|
4063
4180
|
"title",
|
|
4064
4181
|
"aria-label",
|
|
4065
4182
|
"aria-pressed",
|
|
4066
4183
|
"data-testid",
|
|
4067
4184
|
"onClick"
|
|
4068
4185
|
];
|
|
4069
|
-
var
|
|
4070
|
-
var
|
|
4071
|
-
var
|
|
4072
|
-
var
|
|
4073
|
-
var
|
|
4074
|
-
var
|
|
4186
|
+
var _hoisted_37 = { class: "flex-1 text-left" };
|
|
4187
|
+
var _hoisted_38 = ["aria-label"];
|
|
4188
|
+
var _hoisted_39 = ["aria-pressed"];
|
|
4189
|
+
var _hoisted_40 = ["aria-pressed"];
|
|
4190
|
+
var _hoisted_41 = ["aria-pressed"];
|
|
4191
|
+
var _hoisted_42 = [
|
|
4075
4192
|
"aria-pressed",
|
|
4076
4193
|
"data-testid",
|
|
4077
4194
|
"onClick"
|
|
4078
4195
|
];
|
|
4079
|
-
var
|
|
4080
|
-
var
|
|
4196
|
+
var _hoisted_43 = { class: "material-icons text-sm" };
|
|
4197
|
+
var _hoisted_44 = [
|
|
4081
4198
|
"title",
|
|
4082
4199
|
"aria-label",
|
|
4083
4200
|
"aria-expanded"
|
|
4084
4201
|
];
|
|
4085
|
-
var
|
|
4202
|
+
var _hoisted_45 = {
|
|
4086
4203
|
key: 0,
|
|
4087
4204
|
class: "absolute left-0 top-full mt-1 z-20 min-w-max rounded border border-slate-200 bg-white shadow-lg py-1",
|
|
4088
4205
|
"data-testid": "collection-view-add-menu"
|
|
4089
4206
|
};
|
|
4090
|
-
var
|
|
4091
|
-
var
|
|
4092
|
-
var
|
|
4093
|
-
var
|
|
4094
|
-
var
|
|
4095
|
-
var
|
|
4207
|
+
var _hoisted_46 = ["title", "aria-label"];
|
|
4208
|
+
var _hoisted_47 = ["value", "aria-label"];
|
|
4209
|
+
var _hoisted_48 = ["value"];
|
|
4210
|
+
var _hoisted_49 = ["value", "aria-label"];
|
|
4211
|
+
var _hoisted_50 = ["value"];
|
|
4212
|
+
var _hoisted_51 = {
|
|
4096
4213
|
key: 4,
|
|
4097
4214
|
class: "text-[10px] text-slate-400 font-bold uppercase tracking-wider select-none"
|
|
4098
4215
|
};
|
|
4099
|
-
var
|
|
4216
|
+
var _hoisted_52 = {
|
|
4100
4217
|
key: 3,
|
|
4101
4218
|
class: "mx-6 mt-4 rounded-xl border border-amber-200 bg-amber-50/60 p-4 text-sm text-amber-900 shadow-sm flex items-center gap-3",
|
|
4102
4219
|
"data-testid": "collections-data-issues"
|
|
4103
4220
|
};
|
|
4104
|
-
var
|
|
4105
|
-
var
|
|
4106
|
-
var
|
|
4221
|
+
var _hoisted_53 = { class: "flex-1" };
|
|
4222
|
+
var _hoisted_54 = { class: "flex-1 overflow-auto" };
|
|
4223
|
+
var _hoisted_55 = {
|
|
4107
4224
|
key: 0,
|
|
4108
4225
|
class: "flex flex-col items-center justify-center py-20 text-sm text-slate-500 gap-3"
|
|
4109
4226
|
};
|
|
4110
|
-
var
|
|
4227
|
+
var _hoisted_56 = {
|
|
4111
4228
|
key: 1,
|
|
4112
4229
|
class: "m-6 rounded-xl border border-red-200 bg-red-50/50 p-4 text-sm text-red-800 shadow-sm flex items-center gap-3"
|
|
4113
4230
|
};
|
|
4114
|
-
var
|
|
4115
|
-
var
|
|
4231
|
+
var _hoisted_57 = { key: 2 };
|
|
4232
|
+
var _hoisted_58 = {
|
|
4116
4233
|
key: 3,
|
|
4117
4234
|
class: "p-4"
|
|
4118
4235
|
};
|
|
4119
|
-
var
|
|
4236
|
+
var _hoisted_59 = {
|
|
4120
4237
|
key: 4,
|
|
4121
4238
|
class: "h-full flex flex-col"
|
|
4122
4239
|
};
|
|
4123
|
-
var
|
|
4240
|
+
var _hoisted_60 = {
|
|
4124
4241
|
key: 0,
|
|
4125
4242
|
class: "m-3 mb-0 rounded-xl border border-red-200 bg-red-50/50 p-4 text-sm text-red-800 shadow-sm flex items-center gap-3",
|
|
4126
4243
|
"data-testid": "collections-inline-error"
|
|
4127
4244
|
};
|
|
4128
|
-
var
|
|
4129
|
-
var
|
|
4130
|
-
var
|
|
4131
|
-
var
|
|
4245
|
+
var _hoisted_61 = { class: "flex-1" };
|
|
4246
|
+
var _hoisted_62 = ["aria-label"];
|
|
4247
|
+
var _hoisted_63 = { class: "flex-1 min-h-0 px-3 py-2" };
|
|
4248
|
+
var _hoisted_64 = {
|
|
4132
4249
|
key: 5,
|
|
4133
4250
|
class: "h-full",
|
|
4134
4251
|
"data-testid": "collection-custom-view-body"
|
|
4135
4252
|
};
|
|
4136
|
-
var
|
|
4253
|
+
var _hoisted_65 = {
|
|
4137
4254
|
key: 6,
|
|
4138
4255
|
class: "flex flex-col items-center justify-center py-20 text-sm text-slate-400 gap-2"
|
|
4139
4256
|
};
|
|
4140
|
-
var
|
|
4141
|
-
var
|
|
4257
|
+
var _hoisted_66 = { class: "font-semibold text-slate-600" };
|
|
4258
|
+
var _hoisted_67 = {
|
|
4142
4259
|
key: 7,
|
|
4143
4260
|
class: "flex flex-col items-center justify-center py-20 text-sm text-slate-400 gap-2"
|
|
4144
4261
|
};
|
|
4145
|
-
var
|
|
4146
|
-
var
|
|
4262
|
+
var _hoisted_68 = { class: "font-semibold text-slate-600" };
|
|
4263
|
+
var _hoisted_69 = {
|
|
4147
4264
|
key: 8,
|
|
4148
4265
|
class: "overflow-x-auto [container-type:inline-size]"
|
|
4149
4266
|
};
|
|
4150
|
-
var
|
|
4267
|
+
var _hoisted_70 = {
|
|
4151
4268
|
key: 0,
|
|
4152
4269
|
class: "m-4 rounded-xl border border-red-200 bg-red-50/50 p-4 text-sm text-red-800 shadow-sm flex items-center gap-3",
|
|
4153
4270
|
"data-testid": "collections-inline-error"
|
|
4154
4271
|
};
|
|
4155
|
-
var
|
|
4156
|
-
var
|
|
4157
|
-
var
|
|
4158
|
-
var
|
|
4159
|
-
var
|
|
4160
|
-
var
|
|
4161
|
-
var
|
|
4162
|
-
var
|
|
4272
|
+
var _hoisted_71 = { class: "flex-1" };
|
|
4273
|
+
var _hoisted_72 = ["aria-label"];
|
|
4274
|
+
var _hoisted_73 = { class: "min-w-full text-xs" };
|
|
4275
|
+
var _hoisted_74 = { class: "bg-slate-50 border-b border-slate-200" };
|
|
4276
|
+
var _hoisted_75 = ["aria-sort"];
|
|
4277
|
+
var _hoisted_76 = { class: "flex items-center gap-1" };
|
|
4278
|
+
var _hoisted_77 = ["title"];
|
|
4279
|
+
var _hoisted_78 = [
|
|
4163
4280
|
"data-testid",
|
|
4164
4281
|
"aria-label",
|
|
4165
4282
|
"onClick",
|
|
4166
4283
|
"onPointerenter"
|
|
4167
4284
|
];
|
|
4168
|
-
var
|
|
4169
|
-
var
|
|
4170
|
-
var
|
|
4285
|
+
var _hoisted_79 = { class: "material-icons text-base align-middle" };
|
|
4286
|
+
var _hoisted_80 = { class: "divide-y divide-slate-100 bg-white" };
|
|
4287
|
+
var _hoisted_81 = [
|
|
4171
4288
|
"aria-label",
|
|
4172
4289
|
"data-testid",
|
|
4173
4290
|
"onClick",
|
|
4174
4291
|
"onKeydown"
|
|
4175
4292
|
];
|
|
4176
|
-
var
|
|
4293
|
+
var _hoisted_82 = [
|
|
4177
4294
|
"checked",
|
|
4178
4295
|
"disabled",
|
|
4179
4296
|
"data-testid",
|
|
4180
4297
|
"aria-label",
|
|
4181
4298
|
"onChange"
|
|
4182
4299
|
];
|
|
4183
|
-
var
|
|
4300
|
+
var _hoisted_83 = [
|
|
4184
4301
|
"checked",
|
|
4185
4302
|
"disabled",
|
|
4186
4303
|
"data-testid",
|
|
4187
4304
|
"aria-label",
|
|
4188
4305
|
"onChange"
|
|
4189
4306
|
];
|
|
4190
|
-
var
|
|
4191
|
-
var
|
|
4307
|
+
var _hoisted_84 = ["data-testid", "aria-label"];
|
|
4308
|
+
var _hoisted_85 = {
|
|
4192
4309
|
key: 3,
|
|
4193
4310
|
class: "block truncate"
|
|
4194
4311
|
};
|
|
4195
|
-
var
|
|
4312
|
+
var _hoisted_86 = [
|
|
4196
4313
|
"href",
|
|
4197
4314
|
"tabindex",
|
|
4198
4315
|
"data-testid",
|
|
4199
4316
|
"onClick",
|
|
4200
4317
|
"onKeydown"
|
|
4201
4318
|
];
|
|
4202
|
-
var
|
|
4319
|
+
var _hoisted_87 = [
|
|
4203
4320
|
"value",
|
|
4204
4321
|
"disabled",
|
|
4205
4322
|
"data-testid",
|
|
4206
4323
|
"aria-label",
|
|
4207
4324
|
"onChange"
|
|
4208
4325
|
];
|
|
4209
|
-
var
|
|
4326
|
+
var _hoisted_88 = {
|
|
4210
4327
|
key: 0,
|
|
4211
4328
|
value: ""
|
|
4212
4329
|
};
|
|
4213
|
-
var
|
|
4214
|
-
var
|
|
4330
|
+
var _hoisted_89 = ["value"];
|
|
4331
|
+
var _hoisted_90 = {
|
|
4215
4332
|
key: 5,
|
|
4216
4333
|
class: "block truncate tabular-nums font-semibold text-slate-900"
|
|
4217
4334
|
};
|
|
4218
|
-
var
|
|
4335
|
+
var _hoisted_91 = {
|
|
4219
4336
|
key: 6,
|
|
4220
4337
|
class: "inline-flex items-center gap-1 px-2 py-0.5 rounded-lg text-[10px] font-bold bg-slate-100 text-slate-600 border border-slate-200/40"
|
|
4221
4338
|
};
|
|
4222
|
-
var
|
|
4339
|
+
var _hoisted_92 = {
|
|
4223
4340
|
key: 7,
|
|
4224
4341
|
class: "inline-block truncate tabular-nums font-bold text-indigo-900 bg-indigo-50/50 px-1.5 py-0.5 rounded border border-indigo-100/50"
|
|
4225
4342
|
};
|
|
4226
|
-
var
|
|
4227
|
-
var
|
|
4228
|
-
var
|
|
4229
|
-
var
|
|
4343
|
+
var _hoisted_93 = ["data-testid"];
|
|
4344
|
+
var _hoisted_94 = ["href", "data-testid"];
|
|
4345
|
+
var _hoisted_95 = ["href", "data-testid"];
|
|
4346
|
+
var _hoisted_96 = [
|
|
4230
4347
|
"href",
|
|
4231
4348
|
"data-testid",
|
|
4232
4349
|
"onClick"
|
|
4233
4350
|
];
|
|
4234
|
-
var
|
|
4351
|
+
var _hoisted_97 = {
|
|
4235
4352
|
key: 12,
|
|
4236
4353
|
class: "block truncate text-slate-600"
|
|
4237
4354
|
};
|
|
4238
|
-
var
|
|
4239
|
-
var
|
|
4240
|
-
var
|
|
4241
|
-
var
|
|
4355
|
+
var _hoisted_98 = { class: "bg-white rounded-2xl shadow-2xl w-full max-w-xl flex flex-col border border-slate-200 overflow-hidden" };
|
|
4356
|
+
var _hoisted_99 = { class: "px-6 py-4 border-b border-slate-100 flex items-center gap-3 bg-slate-50/50" };
|
|
4357
|
+
var _hoisted_100 = { class: "flex-1" };
|
|
4358
|
+
var _hoisted_101 = {
|
|
4242
4359
|
id: "collections-chat-title",
|
|
4243
4360
|
class: "text-sm font-bold text-slate-800 uppercase tracking-wide"
|
|
4244
4361
|
};
|
|
4245
|
-
var
|
|
4246
|
-
var
|
|
4247
|
-
var
|
|
4248
|
-
var
|
|
4249
|
-
var
|
|
4250
|
-
var
|
|
4362
|
+
var _hoisted_102 = { class: "text-xs text-slate-400 font-semibold" };
|
|
4363
|
+
var _hoisted_103 = ["aria-label"];
|
|
4364
|
+
var _hoisted_104 = { class: "px-6 py-5" };
|
|
4365
|
+
var _hoisted_105 = ["placeholder", "onKeydown"];
|
|
4366
|
+
var _hoisted_106 = { class: "px-6 py-3.5 border-t border-slate-100 flex items-center justify-end gap-2 bg-slate-50/50" };
|
|
4367
|
+
var _hoisted_107 = ["disabled"];
|
|
4251
4368
|
/** `slug` / `selected` are supplied only in EMBEDDED mode (the
|
|
4252
4369
|
* `presentCollection` chat card mounts this component and drives both
|
|
4253
4370
|
* from the tool result). In standalone route mode (the
|
|
@@ -4817,6 +4934,60 @@ var CollectionView_default = /* @__PURE__ */ defineComponent({
|
|
|
4817
4934
|
function closeChat() {
|
|
4818
4935
|
chatOpen.value = false;
|
|
4819
4936
|
}
|
|
4937
|
+
const relatedMenuOpen = ref(false);
|
|
4938
|
+
const relatedMenuRef = ref(null);
|
|
4939
|
+
const relatedLoading = ref(false);
|
|
4940
|
+
/** Derived neighbors for `relatedFetchedSlug` (null until first fetched). */
|
|
4941
|
+
const relatedList = ref(null);
|
|
4942
|
+
/** Slug the cached `relatedList` was built for — a mismatch on open forces
|
|
4943
|
+
* a re-fetch (e.g. after navigating to a different collection). */
|
|
4944
|
+
const relatedFetchedSlug = ref(null);
|
|
4945
|
+
const showRelatedMenu = computed(() => Boolean(collection.value) && !embedded.value && cui.fetchOntology !== void 0);
|
|
4946
|
+
const relatedItems = computed(() => relatedList.value ?? []);
|
|
4947
|
+
function relatedDirectionIcon(direction) {
|
|
4948
|
+
if (direction === "out") return "arrow_outward";
|
|
4949
|
+
if (direction === "in") return "arrow_back";
|
|
4950
|
+
return "sync_alt";
|
|
4951
|
+
}
|
|
4952
|
+
function relatedDirectionLabel(direction) {
|
|
4953
|
+
if (direction === "out") return t("collectionsView.relatedOut");
|
|
4954
|
+
if (direction === "in") return t("collectionsView.relatedIn");
|
|
4955
|
+
return t("collectionsView.relatedBoth");
|
|
4956
|
+
}
|
|
4957
|
+
/** Fetch the ontology and derive this slug's neighbors. Fail-soft: a
|
|
4958
|
+
* non-ok result (the `apiGet` wrapper already caught the network/HTTP
|
|
4959
|
+
* error) leaves an empty list, which the panel shows as its empty row.
|
|
4960
|
+
*
|
|
4961
|
+
* Sets `relatedFetchedSlug` synchronously (before the await) so a rapid
|
|
4962
|
+
* re-open can't kick a duplicate fetch, and DROPS a stale response whose
|
|
4963
|
+
* slug no longer matches the active collection — otherwise a slower fetch
|
|
4964
|
+
* for a since-abandoned slug, resolving after a fast switch, would apply
|
|
4965
|
+
* the wrong collection's neighbors (Codex / CodeRabbit on PR #2251). */
|
|
4966
|
+
async function loadRelated(slug) {
|
|
4967
|
+
relatedFetchedSlug.value = slug;
|
|
4968
|
+
relatedLoading.value = true;
|
|
4969
|
+
const result = await cui.fetchOntology?.();
|
|
4970
|
+
if (collection.value?.slug !== slug) return;
|
|
4971
|
+
relatedLoading.value = false;
|
|
4972
|
+
relatedList.value = result?.ok ? relatedCollections(result.data.entries, slug) : [];
|
|
4973
|
+
}
|
|
4974
|
+
function toggleRelatedMenu() {
|
|
4975
|
+
relatedMenuOpen.value = !relatedMenuOpen.value;
|
|
4976
|
+
const slug = collection.value?.slug;
|
|
4977
|
+
if (relatedMenuOpen.value && slug && relatedFetchedSlug.value !== slug) loadRelated(slug);
|
|
4978
|
+
}
|
|
4979
|
+
function closeRelatedMenuOnOutsideClick(event) {
|
|
4980
|
+
if (!eventInsideElement(event, relatedMenuRef.value)) relatedMenuOpen.value = false;
|
|
4981
|
+
}
|
|
4982
|
+
watch(relatedMenuOpen, (open) => {
|
|
4983
|
+
if (open) document.addEventListener("mousedown", closeRelatedMenuOnOutsideClick);
|
|
4984
|
+
else document.removeEventListener("mousedown", closeRelatedMenuOnOutsideClick);
|
|
4985
|
+
});
|
|
4986
|
+
/** Hop to a related collection's detail page (same nav as the index cards). */
|
|
4987
|
+
function gotoRelated(slug) {
|
|
4988
|
+
relatedMenuOpen.value = false;
|
|
4989
|
+
cui.gotoDetail("collection", slug);
|
|
4990
|
+
}
|
|
4820
4991
|
/** Build the chat seed text for the current view.
|
|
4821
4992
|
*
|
|
4822
4993
|
* A collection IS a skill, so its slug doubles as a slash command:
|
|
@@ -5531,6 +5702,10 @@ var CollectionView_default = /* @__PURE__ */ defineComponent({
|
|
|
5531
5702
|
kanbanOverride.value = null;
|
|
5532
5703
|
addMenuOpen.value = false;
|
|
5533
5704
|
filterMenuOpen.value = false;
|
|
5705
|
+
relatedMenuOpen.value = false;
|
|
5706
|
+
relatedList.value = null;
|
|
5707
|
+
relatedFetchedSlug.value = null;
|
|
5708
|
+
relatedLoading.value = false;
|
|
5534
5709
|
sortState.value = storedSortFor(slug);
|
|
5535
5710
|
flagFilters.value = storedFlagFiltersFor(slug);
|
|
5536
5711
|
}
|
|
@@ -5582,6 +5757,7 @@ var CollectionView_default = /* @__PURE__ */ defineComponent({
|
|
|
5582
5757
|
if (refreshNoteTimer !== void 0) clearTimeout(refreshNoteTimer);
|
|
5583
5758
|
document.removeEventListener("mousedown", closeAddMenuOnOutsideClick);
|
|
5584
5759
|
document.removeEventListener("mousedown", closeFilterMenuOnOutsideClick);
|
|
5760
|
+
document.removeEventListener("mousedown", closeRelatedMenuOnOutsideClick);
|
|
5585
5761
|
});
|
|
5586
5762
|
watch([
|
|
5587
5763
|
activeView,
|
|
@@ -5654,6 +5830,35 @@ var CollectionView_default = /* @__PURE__ */ defineComponent({
|
|
|
5654
5830
|
"data-testid": "collections-chat",
|
|
5655
5831
|
onClick: openChat
|
|
5656
5832
|
}, [_cache[30] || (_cache[30] = createElementVNode("span", { class: "material-icons text-sm" }, "forum", -1)), createElementVNode("span", null, toDisplayString(unref(t)("collectionsView.chat")), 1)])) : createCommentVNode("", true),
|
|
5833
|
+
showRelatedMenu.value ? (openBlock(), createElementBlock("div", {
|
|
5834
|
+
key: 5,
|
|
5835
|
+
ref_key: "relatedMenuRef",
|
|
5836
|
+
ref: relatedMenuRef,
|
|
5837
|
+
class: "relative"
|
|
5838
|
+
}, [createElementVNode("button", {
|
|
5839
|
+
type: "button",
|
|
5840
|
+
class: "h-8 px-2.5 flex items-center gap-1 rounded border border-indigo-200 bg-white hover:bg-indigo-50 text-indigo-600 font-bold text-xs transition-colors",
|
|
5841
|
+
"aria-expanded": relatedMenuOpen.value,
|
|
5842
|
+
"data-testid": "collections-related-menu",
|
|
5843
|
+
onClick: toggleRelatedMenu
|
|
5844
|
+
}, [_cache[31] || (_cache[31] = createElementVNode("span", { class: "material-icons text-sm" }, "hub", -1)), createElementVNode("span", null, toDisplayString(unref(t)("collectionsView.related")), 1)], 8, _hoisted_13$4), relatedMenuOpen.value ? (openBlock(), createElementBlock("div", _hoisted_14$4, [relatedLoading.value ? (openBlock(), createElementBlock("div", _hoisted_15$4, [_cache[32] || (_cache[32] = createElementVNode("span", { class: "material-icons text-sm animate-spin" }, "hourglass_empty", -1)), createElementVNode("span", null, toDisplayString(unref(t)("common.loading")), 1)])) : relatedItems.value.length === 0 ? (openBlock(), createElementBlock("div", _hoisted_16$4, toDisplayString(unref(t)("collectionsView.relatedEmpty")), 1)) : createCommentVNode("", true), (openBlock(true), createElementBlock(Fragment, null, renderList(relatedItems.value, (related) => {
|
|
5845
|
+
return openBlock(), createElementBlock("button", {
|
|
5846
|
+
key: related.slug,
|
|
5847
|
+
type: "button",
|
|
5848
|
+
class: "w-full h-8 px-3 flex items-center gap-2 text-xs text-slate-600 hover:bg-slate-50 transition-colors",
|
|
5849
|
+
"data-testid": `collections-related-item-${related.slug}`,
|
|
5850
|
+
onClick: ($event) => gotoRelated(related.slug)
|
|
5851
|
+
}, [
|
|
5852
|
+
createElementVNode("span", _hoisted_18$4, toDisplayString(related.icon), 1),
|
|
5853
|
+
createElementVNode("span", _hoisted_19$3, toDisplayString(related.title), 1),
|
|
5854
|
+
createElementVNode("span", {
|
|
5855
|
+
class: "material-icons text-sm text-slate-400",
|
|
5856
|
+
title: relatedDirectionLabel(related.direction),
|
|
5857
|
+
"aria-label": relatedDirectionLabel(related.direction),
|
|
5858
|
+
role: "img"
|
|
5859
|
+
}, toDisplayString(relatedDirectionIcon(related.direction)), 9, _hoisted_20$3)
|
|
5860
|
+
], 8, _hoisted_17$4);
|
|
5861
|
+
}), 128))])) : createCommentVNode("", true)], 512)) : createCommentVNode("", true),
|
|
5657
5862
|
(openBlock(true), createElementBlock(Fragment, null, renderList(collectionActions.value, (action) => {
|
|
5658
5863
|
return openBlock(), createElementBlock("button", {
|
|
5659
5864
|
key: action.id,
|
|
@@ -5662,52 +5867,52 @@ var CollectionView_default = /* @__PURE__ */ defineComponent({
|
|
|
5662
5867
|
disabled: collectionActionPending.value || isActionRunning(action.id),
|
|
5663
5868
|
"data-testid": `collections-action-${action.id}`,
|
|
5664
5869
|
onClick: ($event) => runCollectionAction(action)
|
|
5665
|
-
}, [isActionRunning(action.id) ? (openBlock(), createElementBlock("span",
|
|
5870
|
+
}, [isActionRunning(action.id) ? (openBlock(), createElementBlock("span", _hoisted_22$3, "progress_activity")) : action.icon ? (openBlock(), createElementBlock("span", _hoisted_23$2, toDisplayString(action.icon), 1)) : createCommentVNode("", true), createElementVNode("span", null, toDisplayString(action.label), 1)], 8, _hoisted_21$3);
|
|
5666
5871
|
}), 128)),
|
|
5667
5872
|
canCreate.value && !calendarActive.value ? (openBlock(), createElementBlock("button", {
|
|
5668
|
-
key:
|
|
5873
|
+
key: 6,
|
|
5669
5874
|
type: "button",
|
|
5670
5875
|
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",
|
|
5671
5876
|
"data-testid": "collections-add-item",
|
|
5672
5877
|
onClick: openCreate
|
|
5673
|
-
}, [_cache[
|
|
5878
|
+
}, [_cache[33] || (_cache[33] = createElementVNode("span", { class: "material-icons text-sm" }, "add", -1)), createElementVNode("span", null, toDisplayString(unref(t)("common.add")), 1)])) : createCommentVNode("", true),
|
|
5674
5879
|
canDeleteCollection.value && !embedded.value ? (openBlock(), createElementBlock("button", {
|
|
5675
|
-
key:
|
|
5880
|
+
key: 7,
|
|
5676
5881
|
type: "button",
|
|
5677
5882
|
class: "h-8 w-8 flex items-center justify-center rounded border border-rose-200 bg-white text-rose-600 hover:bg-rose-50 transition-colors",
|
|
5678
5883
|
title: unref(t)("collectionsView.deleteCollection"),
|
|
5679
5884
|
"aria-label": unref(t)("collectionsView.deleteCollection"),
|
|
5680
5885
|
"data-testid": "collections-delete",
|
|
5681
5886
|
onClick: confirmCollectionDelete
|
|
5682
|
-
}, [..._cache[
|
|
5887
|
+
}, [..._cache[34] || (_cache[34] = [createElementVNode("span", { class: "material-icons text-sm" }, "delete_forever", -1)])], 8, _hoisted_24$1)) : createCommentVNode("", true),
|
|
5683
5888
|
canDeleteFeed.value && !embedded.value ? (openBlock(), createElementBlock("button", {
|
|
5684
|
-
key:
|
|
5889
|
+
key: 8,
|
|
5685
5890
|
type: "button",
|
|
5686
5891
|
class: "h-8 w-8 flex items-center justify-center rounded border border-rose-200 bg-white text-rose-600 hover:bg-rose-50 transition-colors",
|
|
5687
5892
|
title: unref(t)("collectionsView.deleteFeed"),
|
|
5688
5893
|
"aria-label": unref(t)("collectionsView.deleteFeed"),
|
|
5689
5894
|
"data-testid": "feeds-delete",
|
|
5690
5895
|
onClick: confirmFeedDelete
|
|
5691
|
-
}, [..._cache[
|
|
5896
|
+
}, [..._cache[35] || (_cache[35] = [createElementVNode("span", { class: "material-icons text-sm" }, "delete_forever", -1)])], 8, _hoisted_25$1)) : createCommentVNode("", true)
|
|
5692
5897
|
])) : createCommentVNode("", true),
|
|
5693
|
-
refreshNote.value ? (openBlock(), createElementBlock("div",
|
|
5694
|
-
collection.value && (!__props.hideSearch && items.value.length > 0 || !__props.hideViewToggle && (hasCalendar.value || hasKanban.value || hasCustomViews.value || canAddCustomView.value)) ? (openBlock(), createElementBlock("div",
|
|
5695
|
-
_cache[
|
|
5898
|
+
refreshNote.value ? (openBlock(), createElementBlock("div", _hoisted_26$1, [_cache[36] || (_cache[36] = createElementVNode("span", { class: "material-icons text-base text-indigo-600" }, "hourglass_top", -1)), createElementVNode("span", _hoisted_27$1, toDisplayString(refreshNote.value), 1)])) : createCommentVNode("", true),
|
|
5899
|
+
collection.value && (!__props.hideSearch && items.value.length > 0 || !__props.hideViewToggle && (hasCalendar.value || hasKanban.value || hasCustomViews.value || canAddCustomView.value)) ? (openBlock(), createElementBlock("div", _hoisted_28, [!__props.hideSearch && items.value.length > 0 ? (openBlock(), createElementBlock("div", _hoisted_29, [
|
|
5900
|
+
_cache[38] || (_cache[38] = createElementVNode("span", { class: "absolute inset-y-0 left-0 flex items-center pl-3 text-slate-400 pointer-events-none" }, [createElementVNode("span", { class: "material-icons text-lg" }, "search")], -1)),
|
|
5696
5901
|
withDirectives(createElementVNode("input", {
|
|
5697
5902
|
"onUpdate:modelValue": _cache[1] || (_cache[1] = ($event) => searchQuery.value = $event),
|
|
5698
5903
|
type: "text",
|
|
5699
5904
|
placeholder: unref(t)("collectionsView.searchPlaceholder"),
|
|
5700
5905
|
"aria-label": unref(t)("collectionsView.searchPlaceholder"),
|
|
5701
5906
|
class: "w-full bg-slate-50 border border-slate-200/80 rounded-xl pl-9 pr-8 py-1.5 text-xs placeholder-slate-400 focus:outline-none focus:ring-2 focus:ring-indigo-500/20 focus:border-indigo-500 focus:bg-white transition-all font-medium"
|
|
5702
|
-
}, null, 8,
|
|
5907
|
+
}, null, 8, _hoisted_30), [[vModelText, searchQuery.value]]),
|
|
5703
5908
|
searchQuery.value ? (openBlock(), createElementBlock("button", {
|
|
5704
5909
|
key: 0,
|
|
5705
5910
|
type: "button",
|
|
5706
5911
|
"aria-label": unref(t)("collectionsView.clearSearch"),
|
|
5707
5912
|
class: "absolute inset-y-0 right-0 flex items-center pr-2.5 text-slate-400 hover:text-slate-600",
|
|
5708
5913
|
onClick: _cache[2] || (_cache[2] = ($event) => searchQuery.value = "")
|
|
5709
|
-
}, [..._cache[
|
|
5710
|
-
])) : createCommentVNode("", true), createElementVNode("div",
|
|
5914
|
+
}, [..._cache[37] || (_cache[37] = [createElementVNode("span", { class: "material-icons text-sm" }, "close", -1)])], 8, _hoisted_31)) : createCommentVNode("", true)
|
|
5915
|
+
])) : createCommentVNode("", true), createElementVNode("div", _hoisted_32, [
|
|
5711
5916
|
activeView.value === "table" && flagChips.value.length > 0 && items.value.length > 0 ? (openBlock(), createElementBlock("div", {
|
|
5712
5917
|
key: 0,
|
|
5713
5918
|
ref_key: "filterMenuRef",
|
|
@@ -5721,13 +5926,13 @@ var CollectionView_default = /* @__PURE__ */ defineComponent({
|
|
|
5721
5926
|
"data-testid": "collections-filter-menu",
|
|
5722
5927
|
onClick: _cache[3] || (_cache[3] = ($event) => filterMenuOpen.value = !filterMenuOpen.value)
|
|
5723
5928
|
}, [
|
|
5724
|
-
_cache[
|
|
5929
|
+
_cache[39] || (_cache[39] = createElementVNode("span", {
|
|
5725
5930
|
class: "material-icons text-sm",
|
|
5726
5931
|
"aria-hidden": "true"
|
|
5727
5932
|
}, "filter_alt", -1)),
|
|
5728
5933
|
createElementVNode("span", null, toDisplayString(unref(t)("collectionsView.flagFilterButton")), 1),
|
|
5729
|
-
activeFlagFilterCount.value > 0 ? (openBlock(), createElementBlock("span",
|
|
5730
|
-
], 10,
|
|
5934
|
+
activeFlagFilterCount.value > 0 ? (openBlock(), createElementBlock("span", _hoisted_34, toDisplayString(activeFlagFilterCount.value), 1)) : createCommentVNode("", true)
|
|
5935
|
+
], 10, _hoisted_33), filterMenuOpen.value ? (openBlock(), createElementBlock("div", {
|
|
5731
5936
|
key: 0,
|
|
5732
5937
|
class: "absolute left-0 top-full mt-1 z-20 min-w-max rounded border border-slate-200 bg-white shadow-lg py-1",
|
|
5733
5938
|
role: "group",
|
|
@@ -5746,8 +5951,8 @@ var CollectionView_default = /* @__PURE__ */ defineComponent({
|
|
|
5746
5951
|
}, [createElementVNode("span", {
|
|
5747
5952
|
class: normalizeClass(["material-icons text-sm", flagChipIconClass(chip.key)]),
|
|
5748
5953
|
"aria-hidden": "true"
|
|
5749
|
-
}, toDisplayString(flagChipIcon(chip.key)), 3), createElementVNode("span",
|
|
5750
|
-
}), 128))], 8,
|
|
5954
|
+
}, toDisplayString(flagChipIcon(chip.key)), 3), createElementVNode("span", _hoisted_37, toDisplayString(chip.label), 1)], 10, _hoisted_36);
|
|
5955
|
+
}), 128))], 8, _hoisted_35)) : createCommentVNode("", true)], 512)) : createCommentVNode("", true),
|
|
5751
5956
|
!__props.hideViewToggle && (hasCalendar.value || hasKanban.value || hasCustomViews.value || canAddCustomView.value) ? (openBlock(), createElementBlock("div", {
|
|
5752
5957
|
key: 1,
|
|
5753
5958
|
class: "flex gap-0.5",
|
|
@@ -5760,7 +5965,7 @@ var CollectionView_default = /* @__PURE__ */ defineComponent({
|
|
|
5760
5965
|
"aria-pressed": activeView.value === "table",
|
|
5761
5966
|
"data-testid": "collection-view-toggle-table",
|
|
5762
5967
|
onClick: _cache[4] || (_cache[4] = ($event) => setView("table"))
|
|
5763
|
-
}, [_cache[
|
|
5968
|
+
}, [_cache[40] || (_cache[40] = createElementVNode("span", { class: "material-icons text-sm" }, "table_rows", -1)), createElementVNode("span", null, toDisplayString(unref(t)("collectionsView.viewTable")), 1)], 10, _hoisted_39),
|
|
5764
5969
|
hasCalendar.value ? (openBlock(), createElementBlock("button", {
|
|
5765
5970
|
key: 0,
|
|
5766
5971
|
type: "button",
|
|
@@ -5768,7 +5973,7 @@ var CollectionView_default = /* @__PURE__ */ defineComponent({
|
|
|
5768
5973
|
"aria-pressed": activeView.value === "calendar",
|
|
5769
5974
|
"data-testid": "collection-view-toggle-calendar",
|
|
5770
5975
|
onClick: _cache[5] || (_cache[5] = ($event) => setView("calendar"))
|
|
5771
|
-
}, [_cache[
|
|
5976
|
+
}, [_cache[41] || (_cache[41] = createElementVNode("span", { class: "material-icons text-sm" }, "calendar_month", -1)), createElementVNode("span", null, toDisplayString(unref(t)("collectionsView.viewCalendar")), 1)], 10, _hoisted_40)) : createCommentVNode("", true),
|
|
5772
5977
|
hasKanban.value ? (openBlock(), createElementBlock("button", {
|
|
5773
5978
|
key: 1,
|
|
5774
5979
|
type: "button",
|
|
@@ -5776,7 +5981,7 @@ var CollectionView_default = /* @__PURE__ */ defineComponent({
|
|
|
5776
5981
|
"aria-pressed": activeView.value === "kanban",
|
|
5777
5982
|
"data-testid": "collection-view-toggle-kanban",
|
|
5778
5983
|
onClick: _cache[6] || (_cache[6] = ($event) => setView("kanban"))
|
|
5779
|
-
}, [_cache[
|
|
5984
|
+
}, [_cache[42] || (_cache[42] = createElementVNode("span", { class: "material-icons text-sm" }, "view_kanban", -1)), createElementVNode("span", null, toDisplayString(unref(t)("collectionsView.viewKanban")), 1)], 10, _hoisted_41)) : createCommentVNode("", true),
|
|
5780
5985
|
(openBlock(true), createElementBlock(Fragment, null, renderList(customViews.value, (cv) => {
|
|
5781
5986
|
return openBlock(), createElementBlock("button", {
|
|
5782
5987
|
key: cv.id,
|
|
@@ -5785,7 +5990,7 @@ var CollectionView_default = /* @__PURE__ */ defineComponent({
|
|
|
5785
5990
|
"aria-pressed": activeView.value === unref(customViewKey)(cv.id),
|
|
5786
5991
|
"data-testid": `collection-view-custom-${cv.id}`,
|
|
5787
5992
|
onClick: ($event) => setCustomView(cv.id)
|
|
5788
|
-
}, [createElementVNode("span",
|
|
5993
|
+
}, [createElementVNode("span", _hoisted_43, toDisplayString(cv.icon || (cv.target === "mobile" ? "smartphone" : "dashboard_customize")), 1), createElementVNode("span", null, toDisplayString(cv.label), 1)], 10, _hoisted_42);
|
|
5789
5994
|
}), 128)),
|
|
5790
5995
|
canAddCustomView.value ? (openBlock(), createElementBlock("div", {
|
|
5791
5996
|
key: 2,
|
|
@@ -5800,17 +6005,17 @@ var CollectionView_default = /* @__PURE__ */ defineComponent({
|
|
|
5800
6005
|
"aria-expanded": addMenuOpen.value,
|
|
5801
6006
|
"data-testid": "collection-view-add",
|
|
5802
6007
|
onClick: onAddViewClick
|
|
5803
|
-
}, [..._cache[
|
|
6008
|
+
}, [..._cache[43] || (_cache[43] = [createElementVNode("span", { class: "material-icons text-sm" }, "add", -1)])], 8, _hoisted_44), addMenuOpen.value ? (openBlock(), createElementBlock("div", _hoisted_45, [createElementVNode("button", {
|
|
5804
6009
|
type: "button",
|
|
5805
6010
|
class: "w-full h-8 px-3 flex items-center gap-2 text-xs font-bold text-slate-600 hover:bg-slate-50",
|
|
5806
6011
|
"data-testid": "collection-view-add-desktop",
|
|
5807
6012
|
onClick: _cache[7] || (_cache[7] = ($event) => addCustomView("desktop"))
|
|
5808
|
-
}, [_cache[
|
|
6013
|
+
}, [_cache[44] || (_cache[44] = createElementVNode("span", { class: "material-icons text-sm" }, "dashboard_customize", -1)), createElementVNode("span", null, toDisplayString(unref(t)("collectionsView.addViewDesktop")), 1)]), createElementVNode("button", {
|
|
5809
6014
|
type: "button",
|
|
5810
6015
|
class: "w-full h-8 px-3 flex items-center gap-2 text-xs font-bold text-slate-600 hover:bg-slate-50",
|
|
5811
6016
|
"data-testid": "collection-view-add-mobile",
|
|
5812
6017
|
onClick: _cache[8] || (_cache[8] = ($event) => addCustomView("mobile"))
|
|
5813
|
-
}, [_cache[
|
|
6018
|
+
}, [_cache[45] || (_cache[45] = createElementVNode("span", { class: "material-icons text-sm" }, "smartphone", -1)), createElementVNode("span", null, toDisplayString(unref(t)("collectionsView.addViewMobile")), 1)])])) : createCommentVNode("", true)], 512)) : createCommentVNode("", true),
|
|
5814
6019
|
canConfigureViews.value ? (openBlock(), createElementBlock("button", {
|
|
5815
6020
|
key: 3,
|
|
5816
6021
|
type: "button",
|
|
@@ -5819,8 +6024,8 @@ var CollectionView_default = /* @__PURE__ */ defineComponent({
|
|
|
5819
6024
|
"aria-label": unref(t)("collectionsView.config.open"),
|
|
5820
6025
|
"data-testid": "collection-config-open",
|
|
5821
6026
|
onClick: _cache[9] || (_cache[9] = ($event) => configOpen.value = true)
|
|
5822
|
-
}, [..._cache[
|
|
5823
|
-
], 8,
|
|
6027
|
+
}, [..._cache[46] || (_cache[46] = [createElementVNode("span", { class: "material-icons text-sm" }, "settings", -1)])], 8, _hoisted_46)) : createCommentVNode("", true)
|
|
6028
|
+
], 8, _hoisted_38)) : createCommentVNode("", true),
|
|
5824
6029
|
calendarActive.value && dateFields.value.length > 1 ? (openBlock(), createElementBlock("select", {
|
|
5825
6030
|
key: 2,
|
|
5826
6031
|
value: calendarAnchorField.value,
|
|
@@ -5832,8 +6037,8 @@ var CollectionView_default = /* @__PURE__ */ defineComponent({
|
|
|
5832
6037
|
return openBlock(), createElementBlock("option", {
|
|
5833
6038
|
key,
|
|
5834
6039
|
value: key
|
|
5835
|
-
}, toDisplayString(collection.value?.schema.fields[key]?.label ?? key), 9,
|
|
5836
|
-
}), 128))], 40,
|
|
6040
|
+
}, toDisplayString(collection.value?.schema.fields[key]?.label ?? key), 9, _hoisted_48);
|
|
6041
|
+
}), 128))], 40, _hoisted_47)) : createCommentVNode("", true),
|
|
5837
6042
|
kanbanActive.value && enumFields.value.length > 1 ? (openBlock(), createElementBlock("select", {
|
|
5838
6043
|
key: 3,
|
|
5839
6044
|
value: kanbanGroupField.value,
|
|
@@ -5845,24 +6050,24 @@ var CollectionView_default = /* @__PURE__ */ defineComponent({
|
|
|
5845
6050
|
return openBlock(), createElementBlock("option", {
|
|
5846
6051
|
key,
|
|
5847
6052
|
value: key
|
|
5848
|
-
}, toDisplayString(collection.value?.schema.fields[key]?.label ?? key), 9,
|
|
5849
|
-
}), 128))], 40,
|
|
5850
|
-
items.value.length > 0 ? (openBlock(), createElementBlock("div",
|
|
6053
|
+
}, toDisplayString(collection.value?.schema.fields[key]?.label ?? key), 9, _hoisted_50);
|
|
6054
|
+
}), 128))], 40, _hoisted_49)) : createCommentVNode("", true),
|
|
6055
|
+
items.value.length > 0 ? (openBlock(), createElementBlock("div", _hoisted_51, toDisplayString(unref(t)("collectionsView.searchSummary", {
|
|
5851
6056
|
shown: activeView.value === "table" ? tableFilteredItems.value.length : filteredItems.value.length,
|
|
5852
6057
|
total: items.value.length
|
|
5853
6058
|
})), 1)) : createCommentVNode("", true)
|
|
5854
6059
|
])])) : createCommentVNode("", true),
|
|
5855
|
-
collection.value && dataIssues.value.length > 0 ? (openBlock(), createElementBlock("div",
|
|
5856
|
-
_cache[
|
|
5857
|
-
createElementVNode("span",
|
|
6060
|
+
collection.value && dataIssues.value.length > 0 ? (openBlock(), createElementBlock("div", _hoisted_52, [
|
|
6061
|
+
_cache[48] || (_cache[48] = createElementVNode("span", { class: "material-icons text-amber-600" }, "warning", -1)),
|
|
6062
|
+
createElementVNode("span", _hoisted_53, toDisplayString(unref(t)("collectionsView.dataIssuesDetected", { count: dataIssues.value.length })), 1),
|
|
5858
6063
|
createElementVNode("button", {
|
|
5859
6064
|
type: "button",
|
|
5860
6065
|
class: "h-8 px-2.5 flex items-center gap-1 rounded border border-amber-300 bg-white hover:bg-amber-100 text-amber-700 font-bold text-xs transition-colors",
|
|
5861
6066
|
"data-testid": "collections-repair",
|
|
5862
6067
|
onClick: repairCollection
|
|
5863
|
-
}, [_cache[
|
|
6068
|
+
}, [_cache[47] || (_cache[47] = createElementVNode("span", { class: "material-icons text-sm" }, "build", -1)), createElementVNode("span", null, toDisplayString(unref(t)("collectionsView.repair")), 1)])
|
|
5864
6069
|
])) : createCommentVNode("", true),
|
|
5865
|
-
createElementVNode("div",
|
|
6070
|
+
createElementVNode("div", _hoisted_54, [loading.value ? (openBlock(), createElementBlock("div", _hoisted_55, [_cache[49] || (_cache[49] = 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_56, [_cache[50] || (_cache[50] = createElementVNode("span", { class: "material-icons text-red-600" }, "error", -1)), createElementVNode("span", null, toDisplayString(loadError.value === "not-found" ? unref(t)("collectionsView.notFound") : `${unref(t)("collectionsView.loadFailed")}: ${loadError.value}`), 1)])) : !collection.value ? (openBlock(), createElementBlock("div", _hoisted_57)) : calendarActive.value ? (openBlock(), createElementBlock("div", _hoisted_58, [createVNode(CollectionCalendarView_default, {
|
|
5866
6071
|
schema: collection.value.schema,
|
|
5867
6072
|
items: filteredItems.value,
|
|
5868
6073
|
"anchor-field": calendarAnchorField.value,
|
|
@@ -5951,16 +6156,16 @@ var CollectionView_default = /* @__PURE__ */ defineComponent({
|
|
|
5951
6156
|
"selected",
|
|
5952
6157
|
"can-create",
|
|
5953
6158
|
"show-detail"
|
|
5954
|
-
])) : createCommentVNode("", true)])) : kanbanActive.value ? (openBlock(), createElementBlock("div",
|
|
5955
|
-
_cache[
|
|
5956
|
-
createElementVNode("span",
|
|
6159
|
+
])) : createCommentVNode("", true)])) : kanbanActive.value ? (openBlock(), createElementBlock("div", _hoisted_59, [inlineError.value ? (openBlock(), createElementBlock("div", _hoisted_60, [
|
|
6160
|
+
_cache[52] || (_cache[52] = createElementVNode("span", { class: "material-icons text-red-600" }, "error", -1)),
|
|
6161
|
+
createElementVNode("span", _hoisted_61, toDisplayString(unref(t)("collectionsView.inlineSaveFailed", { error: inlineError.value })), 1),
|
|
5957
6162
|
createElementVNode("button", {
|
|
5958
6163
|
type: "button",
|
|
5959
6164
|
class: "h-8 w-8 flex items-center justify-center rounded text-red-600 hover:bg-red-100",
|
|
5960
6165
|
"aria-label": unref(t)("common.close"),
|
|
5961
6166
|
onClick: _cache[14] || (_cache[14] = ($event) => inlineError.value = null)
|
|
5962
|
-
}, [..._cache[
|
|
5963
|
-
])) : createCommentVNode("", true), createElementVNode("div",
|
|
6167
|
+
}, [..._cache[51] || (_cache[51] = [createElementVNode("span", { class: "material-icons text-base" }, "close", -1)])], 8, _hoisted_62)
|
|
6168
|
+
])) : createCommentVNode("", true), createElementVNode("div", _hoisted_63, [createVNode(CollectionKanbanView_default, {
|
|
5964
6169
|
schema: collection.value.schema,
|
|
5965
6170
|
items: filteredItems.value,
|
|
5966
6171
|
"group-field": kanbanGroupField.value,
|
|
@@ -5976,7 +6181,7 @@ var CollectionView_default = /* @__PURE__ */ defineComponent({
|
|
|
5976
6181
|
"selected",
|
|
5977
6182
|
"notified",
|
|
5978
6183
|
"readonly"
|
|
5979
|
-
])])])) : activeCustomView.value ? (openBlock(), createElementBlock("div",
|
|
6184
|
+
])])])) : activeCustomView.value ? (openBlock(), createElementBlock("div", _hoisted_64, [activeCustomView.value.target === "mobile" ? (openBlock(), createBlock(CollectionRemoteViewPreview_default, {
|
|
5980
6185
|
key: 0,
|
|
5981
6186
|
slug: collection.value.slug,
|
|
5982
6187
|
view: activeCustomView.value,
|
|
@@ -5987,32 +6192,32 @@ var CollectionView_default = /* @__PURE__ */ defineComponent({
|
|
|
5987
6192
|
view: activeCustomView.value,
|
|
5988
6193
|
onOpenItem: onCustomViewOpenItem,
|
|
5989
6194
|
onStartChat: onCustomViewStartChat
|
|
5990
|
-
}, null, 8, ["slug", "view"]))])) : items.value.length === 0 && editing.value?.mode !== "create" ? (openBlock(), createElementBlock("div",
|
|
5991
|
-
_cache[
|
|
5992
|
-
createElementVNode("p",
|
|
6195
|
+
}, null, 8, ["slug", "view"]))])) : items.value.length === 0 && editing.value?.mode !== "create" ? (openBlock(), createElementBlock("div", _hoisted_65, [_cache[53] || (_cache[53] = createElementVNode("span", { class: "material-icons text-4xl text-slate-300" }, "folder_open", -1)), createElementVNode("p", _hoisted_66, toDisplayString(unref(t)(isReadOnly.value ? "collectionsView.itemsEmptyReadonly" : "collectionsView.itemsEmpty")), 1)])) : tableFilteredItems.value.length === 0 && editing.value?.mode !== "create" ? (openBlock(), createElementBlock("div", _hoisted_67, [
|
|
6196
|
+
_cache[54] || (_cache[54] = createElementVNode("span", { class: "material-icons text-4xl text-slate-300" }, "search_off", -1)),
|
|
6197
|
+
createElementVNode("p", _hoisted_68, toDisplayString(unref(t)("collectionsView.noMatchingItems")), 1),
|
|
5993
6198
|
createElementVNode("button", {
|
|
5994
6199
|
type: "button",
|
|
5995
6200
|
class: "text-xs text-indigo-600 font-semibold hover:underline",
|
|
5996
6201
|
onClick: _cache[15] || (_cache[15] = ($event) => (searchQuery.value = "", flagFilters.value = {}))
|
|
5997
6202
|
}, toDisplayString(unref(t)("collectionsView.clearSearch")), 1)
|
|
5998
|
-
])) : (openBlock(), createElementBlock("div",
|
|
5999
|
-
_cache[
|
|
6000
|
-
createElementVNode("span",
|
|
6203
|
+
])) : (openBlock(), createElementBlock("div", _hoisted_69, [inlineError.value ? (openBlock(), createElementBlock("div", _hoisted_70, [
|
|
6204
|
+
_cache[56] || (_cache[56] = createElementVNode("span", { class: "material-icons text-red-600" }, "error", -1)),
|
|
6205
|
+
createElementVNode("span", _hoisted_71, toDisplayString(unref(t)("collectionsView.inlineSaveFailed", { error: inlineError.value })), 1),
|
|
6001
6206
|
createElementVNode("button", {
|
|
6002
6207
|
type: "button",
|
|
6003
6208
|
class: "h-8 w-8 flex items-center justify-center rounded text-red-600 hover:bg-red-100",
|
|
6004
6209
|
"aria-label": unref(t)("common.close"),
|
|
6005
6210
|
onClick: _cache[16] || (_cache[16] = ($event) => inlineError.value = null)
|
|
6006
|
-
}, [..._cache[
|
|
6007
|
-
])) : createCommentVNode("", true), createElementVNode("table",
|
|
6211
|
+
}, [..._cache[55] || (_cache[55] = [createElementVNode("span", { class: "material-icons text-base" }, "close", -1)])], 8, _hoisted_72)
|
|
6212
|
+
])) : createCommentVNode("", true), createElementVNode("table", _hoisted_73, [createElementVNode("thead", null, [createElementVNode("tr", _hoisted_74, [(openBlock(true), createElementBlock(Fragment, null, renderList(listColumnFields.value, ([key, field]) => {
|
|
6008
6213
|
return openBlock(), createElementBlock("th", {
|
|
6009
6214
|
key,
|
|
6010
6215
|
"aria-sort": unref(isSortableField)(field) ? sortAriaValue(key) : void 0,
|
|
6011
6216
|
class: "px-5 py-3 font-bold text-slate-500 text-left uppercase tracking-wider whitespace-nowrap"
|
|
6012
|
-
}, [createElementVNode("div",
|
|
6217
|
+
}, [createElementVNode("div", _hoisted_76, [createElementVNode("span", {
|
|
6013
6218
|
class: "truncate max-w-[14rem]",
|
|
6014
6219
|
title: field.label
|
|
6015
|
-
}, toDisplayString(field.label), 9,
|
|
6220
|
+
}, toDisplayString(field.label), 9, _hoisted_77), unref(isSortableField)(field) ? (openBlock(), createElementBlock("button", {
|
|
6016
6221
|
key: 0,
|
|
6017
6222
|
type: "button",
|
|
6018
6223
|
class: normalizeClass(["inline-flex items-center justify-center rounded p-0.5 -my-1 leading-none transition-colors", sortButtonClass(key)]),
|
|
@@ -6021,8 +6226,8 @@ var CollectionView_default = /* @__PURE__ */ defineComponent({
|
|
|
6021
6226
|
onClick: withModifiers(($event) => cycleSort(key), ["stop"]),
|
|
6022
6227
|
onPointerenter: ($event) => hoveredSortKey.value = key,
|
|
6023
6228
|
onPointerleave: _cache[17] || (_cache[17] = ($event) => hoveredSortKey.value = null)
|
|
6024
|
-
}, [createElementVNode("span",
|
|
6025
|
-
}), 128))])]), createElementVNode("tbody",
|
|
6229
|
+
}, [createElementVNode("span", _hoisted_79, toDisplayString(sortIconName(key)), 1)], 42, _hoisted_78)) : createCommentVNode("", true)])], 8, _hoisted_75);
|
|
6230
|
+
}), 128))])]), createElementVNode("tbody", _hoisted_80, [(openBlock(true), createElementBlock(Fragment, null, renderList(sortedItems.value, (item) => {
|
|
6026
6231
|
return openBlock(), createElementBlock("tr", {
|
|
6027
6232
|
key: String(item[collection.value.schema.primaryKey] ?? ""),
|
|
6028
6233
|
class: normalizeClass(["hover:bg-slate-50/70 cursor-pointer transition-colors focus:outline-none focus:bg-indigo-50/30", isRowOpen(item) || isEditingRow(item) ? "bg-indigo-50/40" : ""]),
|
|
@@ -6046,7 +6251,7 @@ var CollectionView_default = /* @__PURE__ */ defineComponent({
|
|
|
6046
6251
|
"aria-label": field.label,
|
|
6047
6252
|
onClick: _cache[18] || (_cache[18] = withModifiers(() => {}, ["stop"])),
|
|
6048
6253
|
onChange: ($event) => commitToggle(item, field)
|
|
6049
|
-
}, null, 40,
|
|
6254
|
+
}, null, 40, _hoisted_82)) : field.type === "boolean" ? (openBlock(), createElementBlock("input", {
|
|
6050
6255
|
key: 1,
|
|
6051
6256
|
type: "checkbox",
|
|
6052
6257
|
checked: item[key] === true,
|
|
@@ -6056,13 +6261,13 @@ var CollectionView_default = /* @__PURE__ */ defineComponent({
|
|
|
6056
6261
|
"aria-label": field.label,
|
|
6057
6262
|
onClick: _cache[19] || (_cache[19] = withModifiers(() => {}, ["stop"])),
|
|
6058
6263
|
onChange: ($event) => commitInlineEdit(item, String(key), field, $event.target.checked)
|
|
6059
|
-
}, null, 40,
|
|
6264
|
+
}, null, 40, _hoisted_83)) : field.type === "flag" ? (openBlock(), createElementBlock("span", {
|
|
6060
6265
|
key: 2,
|
|
6061
6266
|
class: normalizeClass(["material-icons text-lg align-middle", flagValueOf(String(key), item) ? "text-emerald-600" : "text-slate-300"]),
|
|
6062
6267
|
"data-testid": `collections-flag-${key}-${item[collection.value.schema.primaryKey]}`,
|
|
6063
6268
|
"aria-label": `${field.label}: ${unref(t)(flagValueOf(String(key), item) ? "common.yes" : "common.no")}`,
|
|
6064
6269
|
role: "img"
|
|
6065
|
-
}, toDisplayString(flagValueOf(String(key), item) ? "check_circle" : "radio_button_unchecked"), 11,
|
|
6270
|
+
}, toDisplayString(flagValueOf(String(key), item) ? "check_circle" : "radio_button_unchecked"), 11, _hoisted_84)) : field.type === "ref" && field.to && typeof item[key] === "string" && item[key] ? (openBlock(), createElementBlock("span", _hoisted_85, [createElementVNode("a", {
|
|
6066
6271
|
href: unref(cui).recordHref?.(field.to, String(item[key])),
|
|
6067
6272
|
tabindex: unref(cui).recordHref?.(field.to, String(item[key])) ? void 0 : 0,
|
|
6068
6273
|
role: "link",
|
|
@@ -6070,7 +6275,7 @@ var CollectionView_default = /* @__PURE__ */ defineComponent({
|
|
|
6070
6275
|
"data-testid": `collections-ref-link-${key}-${item[key]}`,
|
|
6071
6276
|
onClick: ($event) => unref(activateRefLink)($event, field.to, String(item[key]), true),
|
|
6072
6277
|
onKeydown: [withKeys(($event) => unref(activateRefLink)($event, field.to, String(item[key]), true), ["enter"]), withKeys(($event) => unref(activateRefLink)($event, field.to, String(item[key]), true), ["space"])]
|
|
6073
|
-
}, toDisplayString(unref(refDisplay)(field.to, String(item[key]))), 41,
|
|
6278
|
+
}, toDisplayString(unref(refDisplay)(field.to, String(item[key]))), 41, _hoisted_86)])) : field.type === "enum" && Array.isArray(field.values) && field.values.length > 0 ? (openBlock(), createElementBlock("select", {
|
|
6074
6279
|
key: 4,
|
|
6075
6280
|
value: item[key] == null ? "" : String(item[key]),
|
|
6076
6281
|
disabled: isReadOnly.value || isRowInlineSaving(item),
|
|
@@ -6079,16 +6284,16 @@ var CollectionView_default = /* @__PURE__ */ defineComponent({
|
|
|
6079
6284
|
"aria-label": field.label,
|
|
6080
6285
|
onClick: _cache[20] || (_cache[20] = withModifiers(() => {}, ["stop"])),
|
|
6081
6286
|
onChange: ($event) => commitInlineEdit(item, String(key), field, $event.target.value)
|
|
6082
|
-
}, [showEnumPlaceholder(item, String(key)) ? (openBlock(), createElementBlock("option",
|
|
6287
|
+
}, [showEnumPlaceholder(item, String(key)) ? (openBlock(), createElementBlock("option", _hoisted_88, toDisplayString(unref(t)("collectionsView.selectPlaceholder")), 1)) : createCommentVNode("", true), (openBlock(true), createElementBlock(Fragment, null, renderList(field.values, (value) => {
|
|
6083
6288
|
return openBlock(), createElementBlock("option", {
|
|
6084
6289
|
key: value,
|
|
6085
6290
|
value
|
|
6086
|
-
}, toDisplayString(value), 9,
|
|
6087
|
-
}), 128))], 42,
|
|
6291
|
+
}, toDisplayString(value), 9, _hoisted_89);
|
|
6292
|
+
}), 128))], 42, _hoisted_87)) : field.type === "money" ? (openBlock(), createElementBlock("span", _hoisted_90, toDisplayString(unref(formatMoney)(item[key], unref(resolveCurrency)(field, item), unref(locale))), 1)) : field.type === "table" ? (openBlock(), createElementBlock("span", _hoisted_91, [_cache[57] || (_cache[57] = createElementVNode("span", { class: "material-icons text-[11px]" }, "list", -1)), createElementVNode("span", null, toDisplayString(tableSummary(item[key])), 1)])) : field.type === "derived" ? (openBlock(), createElementBlock("span", _hoisted_92, toDisplayString(unref(derivedDisplay)(field, unref(evaluateDerivedAgainstItem)(field, String(key), item), item)), 1)) : field.type === "rollup" ? (openBlock(), createElementBlock("span", {
|
|
6088
6293
|
key: 8,
|
|
6089
6294
|
class: "inline-block truncate tabular-nums font-bold text-indigo-900 bg-indigo-50/50 px-1.5 py-0.5 rounded border border-indigo-100/50",
|
|
6090
6295
|
"data-testid": `collections-rollup-${key}-${item[collection.value.schema.primaryKey]}`
|
|
6091
|
-
}, toDisplayString(unref(render).rollupDisplay(field, item)), 9,
|
|
6296
|
+
}, toDisplayString(unref(render).rollupDisplay(field, item)), 9, _hoisted_93)) : field.type !== "file" && unref(isExternalUrl)(item[key]) ? (openBlock(), createElementBlock("a", {
|
|
6092
6297
|
key: 9,
|
|
6093
6298
|
href: String(item[key]),
|
|
6094
6299
|
target: "_blank",
|
|
@@ -6096,7 +6301,7 @@ var CollectionView_default = /* @__PURE__ */ defineComponent({
|
|
|
6096
6301
|
class: "block truncate text-blue-600 hover:text-blue-800 hover:underline font-semibold",
|
|
6097
6302
|
"data-testid": `collections-url-link-${key}-${item[collection.value.schema.primaryKey]}`,
|
|
6098
6303
|
onClick: _cache[21] || (_cache[21] = withModifiers(() => {}, ["stop"]))
|
|
6099
|
-
}, toDisplayString(String(item[key])), 9,
|
|
6304
|
+
}, toDisplayString(String(item[key])), 9, _hoisted_94)) : field.type === "file" && unref(artifactUrl)(item[key]) ? (openBlock(), createElementBlock("a", {
|
|
6100
6305
|
key: 10,
|
|
6101
6306
|
href: unref(artifactUrl)(item[key]) ?? void 0,
|
|
6102
6307
|
target: "_blank",
|
|
@@ -6104,14 +6309,14 @@ var CollectionView_default = /* @__PURE__ */ defineComponent({
|
|
|
6104
6309
|
class: "block truncate text-blue-600 hover:text-blue-800 hover:underline font-semibold",
|
|
6105
6310
|
"data-testid": `collections-file-link-${key}-${item[collection.value.schema.primaryKey]}`,
|
|
6106
6311
|
onClick: _cache[22] || (_cache[22] = withModifiers(() => {}, ["stop"]))
|
|
6107
|
-
}, toDisplayString(String(item[key])), 9,
|
|
6312
|
+
}, toDisplayString(String(item[key])), 9, _hoisted_95)) : field.type === "file" && unref(fileRoutePath)(item[key]) ? (openBlock(), createElementBlock("a", {
|
|
6108
6313
|
key: 11,
|
|
6109
6314
|
href: unref(fileRoutePath)(item[key]) ?? void 0,
|
|
6110
6315
|
class: "block truncate text-blue-600 hover:text-blue-800 hover:underline font-semibold",
|
|
6111
6316
|
"data-testid": `collections-file-link-${key}-${item[collection.value.schema.primaryKey]}`,
|
|
6112
6317
|
onClick: ($event) => unref(activatePathLink)($event, unref(fileRoutePath)(item[key]) ?? "", true)
|
|
6113
|
-
}, toDisplayString(String(item[key])), 9,
|
|
6114
|
-
}), 128))], 42,
|
|
6318
|
+
}, toDisplayString(String(item[key])), 9, _hoisted_96)) : (openBlock(), createElementBlock("span", _hoisted_97, toDisplayString(unref(formatCell)(item[key], field.type)), 1))], 64)) : createCommentVNode("", true)]);
|
|
6319
|
+
}), 128))], 42, _hoisted_81);
|
|
6115
6320
|
}), 128))])])]))]),
|
|
6116
6321
|
collection.value && (viewing.value || editing.value) && !(calendarActive.value && openDay.value) ? (openBlock(), createBlock(CollectionRecordModal_default, {
|
|
6117
6322
|
key: 4,
|
|
@@ -6195,19 +6400,19 @@ var CollectionView_default = /* @__PURE__ */ defineComponent({
|
|
|
6195
6400
|
"data-testid": "collections-chat-modal",
|
|
6196
6401
|
onClick: withModifiers(closeChat, ["self"]),
|
|
6197
6402
|
onKeydown: withKeys(closeChat, ["esc"])
|
|
6198
|
-
}, [createElementVNode("div",
|
|
6199
|
-
createElementVNode("header",
|
|
6200
|
-
_cache[
|
|
6201
|
-
createElementVNode("div",
|
|
6403
|
+
}, [createElementVNode("div", _hoisted_98, [
|
|
6404
|
+
createElementVNode("header", _hoisted_99, [
|
|
6405
|
+
_cache[59] || (_cache[59] = createElementVNode("div", { class: "h-9 w-9 flex items-center justify-center rounded-xl bg-indigo-50 text-indigo-600 border border-indigo-100/50" }, [createElementVNode("span", { class: "material-icons text-lg" }, "forum")], -1)),
|
|
6406
|
+
createElementVNode("div", _hoisted_100, [createElementVNode("h2", _hoisted_101, toDisplayString(unref(t)("collectionsView.chatTitle")), 1), createElementVNode("span", _hoisted_102, toDisplayString(collection.value.title), 1)]),
|
|
6202
6407
|
createElementVNode("button", {
|
|
6203
6408
|
type: "button",
|
|
6204
6409
|
class: "h-8 w-8 flex items-center justify-center rounded text-slate-400 hover:bg-slate-200/50 hover:text-slate-600 transition-colors",
|
|
6205
6410
|
"aria-label": unref(t)("common.close"),
|
|
6206
6411
|
"data-testid": "collections-chat-close",
|
|
6207
6412
|
onClick: closeChat
|
|
6208
|
-
}, [..._cache[
|
|
6413
|
+
}, [..._cache[58] || (_cache[58] = [createElementVNode("span", { class: "material-icons text-lg" }, "close", -1)])], 8, _hoisted_103)
|
|
6209
6414
|
]),
|
|
6210
|
-
createElementVNode("div",
|
|
6415
|
+
createElementVNode("div", _hoisted_104, [withDirectives(createElementVNode("textarea", {
|
|
6211
6416
|
ref_key: "chatInputEl",
|
|
6212
6417
|
ref: chatInputEl,
|
|
6213
6418
|
"onUpdate:modelValue": _cache[27] || (_cache[27] = ($event) => chatMessage.value = $event),
|
|
@@ -6216,8 +6421,8 @@ var CollectionView_default = /* @__PURE__ */ defineComponent({
|
|
|
6216
6421
|
class: "w-full bg-slate-50 border border-slate-200/80 rounded-xl px-3 py-2.5 text-sm placeholder-slate-400 focus:outline-none focus:ring-2 focus:ring-indigo-500/20 focus:border-indigo-500 focus:bg-white transition-all resize-none",
|
|
6217
6422
|
"data-testid": "collections-chat-input",
|
|
6218
6423
|
onKeydown: [withKeys(withModifiers(submitChat, ["meta"]), ["enter"]), withKeys(withModifiers(submitChat, ["ctrl"]), ["enter"])]
|
|
6219
|
-
}, null, 40,
|
|
6220
|
-
createElementVNode("footer",
|
|
6424
|
+
}, null, 40, _hoisted_105), [[vModelText, chatMessage.value]])]),
|
|
6425
|
+
createElementVNode("footer", _hoisted_106, [createElementVNode("button", {
|
|
6221
6426
|
type: "button",
|
|
6222
6427
|
class: "h-8 px-2.5 rounded text-xs font-bold text-slate-500 hover:bg-slate-200/50 transition-colors",
|
|
6223
6428
|
"data-testid": "collections-chat-cancel",
|
|
@@ -6228,7 +6433,7 @@ var CollectionView_default = /* @__PURE__ */ defineComponent({
|
|
|
6228
6433
|
disabled: !chatMessage.value.trim(),
|
|
6229
6434
|
"data-testid": "collections-chat-send",
|
|
6230
6435
|
onClick: submitChat
|
|
6231
|
-
}, toDisplayString(unref(t)("collectionsView.chatStart")), 9,
|
|
6436
|
+
}, toDisplayString(unref(t)("collectionsView.chatStart")), 9, _hoisted_107)])
|
|
6232
6437
|
])], 32)) : createCommentVNode("", true)
|
|
6233
6438
|
]);
|
|
6234
6439
|
};
|
|
@@ -6545,7 +6750,7 @@ var CollectionOntologyGraphView_default = /* @__PURE__ */ defineComponent({
|
|
|
6545
6750
|
edges: []
|
|
6546
6751
|
});
|
|
6547
6752
|
let instance = null;
|
|
6548
|
-
const nodeSize = (node) => node.missing ? 14 : Math.min(40, 20 + Math.round(Math.log2(node.recordCount + 1) * 4));
|
|
6753
|
+
const nodeSize = (node) => node.missing ? 14 : Math.min(40, 20 + Math.round(Math.log2((node.recordCount ?? 0) + 1) * 4));
|
|
6549
6754
|
const nodeItem = (node) => ({
|
|
6550
6755
|
id: node.slug,
|
|
6551
6756
|
name: node.title,
|
|
@@ -6576,7 +6781,8 @@ var CollectionOntologyGraphView_default = /* @__PURE__ */ defineComponent({
|
|
|
6576
6781
|
});
|
|
6577
6782
|
const nodeTooltip = (data) => {
|
|
6578
6783
|
if (data.missing) return `<b>${escapeHtml(data.id)}</b><br>${escapeHtml(t("collectionsView.mapMissingHint"))}`;
|
|
6579
|
-
|
|
6784
|
+
const count = data.recordCount === null ? t("collectionsView.mapRecordCountUnknown") : t("collectionsView.mapRecordCount", { count: data.recordCount });
|
|
6785
|
+
return `<b>${escapeHtml(data.name)}</b><br>${escapeHtml(data.id)} · ${escapeHtml(count)}`;
|
|
6580
6786
|
};
|
|
6581
6787
|
const edgeTooltip = (data) => {
|
|
6582
6788
|
const reverse = data.reverseFields?.length ? ` ⇄ ${data.reverseFields.join(", ")}` : "";
|