@mulmoclaude/collection-plugin 0.14.1 → 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/CollectionView.vue.d.ts.map +1 -1
- package/dist/vue/lang/de.d.ts.map +1 -1
- package/dist/vue/lang/en.d.ts +5 -0
- package/dist/vue/lang/en.d.ts.map +1 -1
- package/dist/vue/lang/es.d.ts.map +1 -1
- package/dist/vue/lang/fr.d.ts.map +1 -1
- package/dist/vue/lang/index.d.ts +5 -0
- package/dist/vue/lang/index.d.ts.map +1 -1
- package/dist/vue/lang/ja.d.ts.map +1 -1
- package/dist/vue/lang/ko.d.ts.map +1 -1
- package/dist/vue/lang/ptBR.d.ts.map +1 -1
- package/dist/vue/lang/zh.d.ts.map +1 -1
- package/dist/vue/relatedCollections.d.ts +15 -0
- package/dist/vue/relatedCollections.d.ts.map +1 -0
- package/dist/vue.cjs +360 -163
- package/dist/vue.cjs.map +1 -1
- package/dist/vue.js +360 -163
- package/dist/vue.js.map +1 -1
- package/package.json +3 -3
package/dist/vue.cjs
CHANGED
|
@@ -133,6 +133,11 @@ var i18n = (0, vue_i18n.createI18n)({
|
|
|
133
133
|
derivedLabel: "Derived",
|
|
134
134
|
embedMissingTitle: "Embedded reference missing",
|
|
135
135
|
chat: "Chat",
|
|
136
|
+
related: "Related",
|
|
137
|
+
relatedEmpty: "No related collections",
|
|
138
|
+
relatedOut: "This collection links to it",
|
|
139
|
+
relatedIn: "It links to this collection",
|
|
140
|
+
relatedBoth: "Linked both ways",
|
|
136
141
|
refreshFeed: "Refresh",
|
|
137
142
|
refreshFailed: "Refresh failed: {error}",
|
|
138
143
|
refreshDispatched: "Refresh started in the background.",
|
|
@@ -286,6 +291,11 @@ var i18n = (0, vue_i18n.createI18n)({
|
|
|
286
291
|
derivedLabel: "計算値",
|
|
287
292
|
embedMissingTitle: "埋め込み参照が見つかりません",
|
|
288
293
|
chat: "チャット",
|
|
294
|
+
related: "関連",
|
|
295
|
+
relatedEmpty: "関連するコレクションはありません",
|
|
296
|
+
relatedOut: "このコレクションからのリンク",
|
|
297
|
+
relatedIn: "このコレクションへのリンク",
|
|
298
|
+
relatedBoth: "相互にリンク",
|
|
289
299
|
refreshFeed: "更新",
|
|
290
300
|
refreshFailed: "更新に失敗しました: {error}",
|
|
291
301
|
refreshDispatched: "バックグラウンドで更新を開始しました。",
|
|
@@ -439,6 +449,11 @@ var i18n = (0, vue_i18n.createI18n)({
|
|
|
439
449
|
derivedLabel: "派生",
|
|
440
450
|
embedMissingTitle: "缺少嵌入引用",
|
|
441
451
|
chat: "对话",
|
|
452
|
+
related: "关联",
|
|
453
|
+
relatedEmpty: "没有关联的集合",
|
|
454
|
+
relatedOut: "此集合链接到它",
|
|
455
|
+
relatedIn: "它链接到此集合",
|
|
456
|
+
relatedBoth: "双向关联",
|
|
442
457
|
refreshFeed: "刷新",
|
|
443
458
|
refreshFailed: "刷新失败:{error}",
|
|
444
459
|
refreshDispatched: "已在后台开始刷新。",
|
|
@@ -592,6 +607,11 @@ var i18n = (0, vue_i18n.createI18n)({
|
|
|
592
607
|
derivedLabel: "파생",
|
|
593
608
|
embedMissingTitle: "임베드된 참조 없음",
|
|
594
609
|
chat: "채팅",
|
|
610
|
+
related: "관련",
|
|
611
|
+
relatedEmpty: "관련 컬렉션이 없습니다",
|
|
612
|
+
relatedOut: "이 컬렉션이 링크함",
|
|
613
|
+
relatedIn: "이 컬렉션으로 링크함",
|
|
614
|
+
relatedBoth: "양방향 링크",
|
|
595
615
|
refreshFeed: "새로고침",
|
|
596
616
|
refreshFailed: "새로고침 실패: {error}",
|
|
597
617
|
refreshDispatched: "백그라운드에서 새로고침을 시작했습니다.",
|
|
@@ -745,6 +765,11 @@ var i18n = (0, vue_i18n.createI18n)({
|
|
|
745
765
|
derivedLabel: "Derivado",
|
|
746
766
|
embedMissingTitle: "Falta la referencia incrustada",
|
|
747
767
|
chat: "Chat",
|
|
768
|
+
related: "Relacionadas",
|
|
769
|
+
relatedEmpty: "No hay colecciones relacionadas",
|
|
770
|
+
relatedOut: "Esta colección enlaza con ella",
|
|
771
|
+
relatedIn: "Enlaza con esta colección",
|
|
772
|
+
relatedBoth: "Enlazadas en ambos sentidos",
|
|
748
773
|
refreshFeed: "Actualizar",
|
|
749
774
|
refreshFailed: "Error al actualizar: {error}",
|
|
750
775
|
refreshDispatched: "Actualización iniciada en segundo plano.",
|
|
@@ -898,6 +923,11 @@ var i18n = (0, vue_i18n.createI18n)({
|
|
|
898
923
|
derivedLabel: "Derivado",
|
|
899
924
|
embedMissingTitle: "Referência incorporada ausente",
|
|
900
925
|
chat: "Chat",
|
|
926
|
+
related: "Relacionadas",
|
|
927
|
+
relatedEmpty: "Nenhuma coleção relacionada",
|
|
928
|
+
relatedOut: "Esta coleção faz referência a ela",
|
|
929
|
+
relatedIn: "Faz referência a esta coleção",
|
|
930
|
+
relatedBoth: "Vinculadas nos dois sentidos",
|
|
901
931
|
refreshFeed: "Atualizar",
|
|
902
932
|
refreshFailed: "Falha ao atualizar: {error}",
|
|
903
933
|
refreshDispatched: "Atualização iniciada em segundo plano.",
|
|
@@ -1051,6 +1081,11 @@ var i18n = (0, vue_i18n.createI18n)({
|
|
|
1051
1081
|
derivedLabel: "Calculé",
|
|
1052
1082
|
embedMissingTitle: "Référence intégrée manquante",
|
|
1053
1083
|
chat: "Discussion",
|
|
1084
|
+
related: "Associées",
|
|
1085
|
+
relatedEmpty: "Aucune collection associée",
|
|
1086
|
+
relatedOut: "Cette collection y renvoie",
|
|
1087
|
+
relatedIn: "Renvoie à cette collection",
|
|
1088
|
+
relatedBoth: "Liées dans les deux sens",
|
|
1054
1089
|
refreshFeed: "Actualiser",
|
|
1055
1090
|
refreshFailed: "Échec de l'actualisation : {error}",
|
|
1056
1091
|
refreshDispatched: "Actualisation lancée en arrière-plan.",
|
|
@@ -1204,6 +1239,11 @@ var i18n = (0, vue_i18n.createI18n)({
|
|
|
1204
1239
|
derivedLabel: "Abgeleitet",
|
|
1205
1240
|
embedMissingTitle: "Eingebettete Referenz fehlt",
|
|
1206
1241
|
chat: "Chat",
|
|
1242
|
+
related: "Verwandt",
|
|
1243
|
+
relatedEmpty: "Keine verwandten Sammlungen",
|
|
1244
|
+
relatedOut: "Diese Sammlung verweist darauf",
|
|
1245
|
+
relatedIn: "Verweist auf diese Sammlung",
|
|
1246
|
+
relatedBoth: "In beide Richtungen verknüpft",
|
|
1207
1247
|
refreshFeed: "Aktualisieren",
|
|
1208
1248
|
refreshFailed: "Aktualisierung fehlgeschlagen: {error}",
|
|
1209
1249
|
refreshDispatched: "Aktualisierung im Hintergrund gestartet.",
|
|
@@ -4029,6 +4069,55 @@ function writeCollectionFlagFilters(slug, filters) {
|
|
|
4029
4069
|
} catch {}
|
|
4030
4070
|
}
|
|
4031
4071
|
//#endregion
|
|
4072
|
+
//#region src/vue/relatedCollections.ts
|
|
4073
|
+
/** Fold a new direction observation into the one already recorded for a
|
|
4074
|
+
* neighbor: same direction is idempotent, opposing directions become `both`. */
|
|
4075
|
+
var mergeDirection = (prev, next) => prev === void 0 || prev === next ? next : "both";
|
|
4076
|
+
/** Walk the graph edges touching `slug` and record each neighbor's direction.
|
|
4077
|
+
* Skips self-edges (a collection ref-ing itself) and ghost nodes (a relation
|
|
4078
|
+
* target no discovered collection backs — nothing to navigate to). An edge
|
|
4079
|
+
* carrying `reverseFields` is a bidirectional pair collapsed to one edge, so
|
|
4080
|
+
* it contributes BOTH directions to its neighbor. */
|
|
4081
|
+
function collectDirections(graph, slug) {
|
|
4082
|
+
const nodeBySlug = new Map(graph.nodes.map((node) => [node.slug, node]));
|
|
4083
|
+
const directions = /* @__PURE__ */ new Map();
|
|
4084
|
+
const add = (neighbor, direction) => {
|
|
4085
|
+
if (neighbor === slug) return;
|
|
4086
|
+
const node = nodeBySlug.get(neighbor);
|
|
4087
|
+
if (!node || node.missing) return;
|
|
4088
|
+
directions.set(neighbor, mergeDirection(directions.get(neighbor), direction));
|
|
4089
|
+
};
|
|
4090
|
+
for (const edge of graph.edges) {
|
|
4091
|
+
const bidirectional = (edge.reverseFields?.length ?? 0) > 0;
|
|
4092
|
+
if (edge.from === slug) {
|
|
4093
|
+
add(edge.to, "out");
|
|
4094
|
+
if (bidirectional) add(edge.to, "in");
|
|
4095
|
+
}
|
|
4096
|
+
if (edge.to === slug) {
|
|
4097
|
+
add(edge.from, "in");
|
|
4098
|
+
if (bidirectional) add(edge.from, "out");
|
|
4099
|
+
}
|
|
4100
|
+
}
|
|
4101
|
+
return directions;
|
|
4102
|
+
}
|
|
4103
|
+
/** Collections related to `slug`, in graph node order (title/icon from the
|
|
4104
|
+
* node), empty when it has no navigable relations. */
|
|
4105
|
+
function relatedCollections(entries, slug) {
|
|
4106
|
+
const graph = (0, _mulmoclaude_core_collection.buildOntologyGraph)(entries);
|
|
4107
|
+
const directions = collectDirections(graph, slug);
|
|
4108
|
+
const related = [];
|
|
4109
|
+
for (const node of graph.nodes) {
|
|
4110
|
+
const direction = directions.get(node.slug);
|
|
4111
|
+
if (direction !== void 0) related.push({
|
|
4112
|
+
slug: node.slug,
|
|
4113
|
+
title: node.title,
|
|
4114
|
+
icon: node.icon,
|
|
4115
|
+
direction
|
|
4116
|
+
});
|
|
4117
|
+
}
|
|
4118
|
+
return related;
|
|
4119
|
+
}
|
|
4120
|
+
//#endregion
|
|
4032
4121
|
//#region src/vue/components/CollectionView.vue?vue&type=script&setup=true&lang.ts
|
|
4033
4122
|
var _hoisted_1$7 = { class: "h-full flex flex-col bg-slate-50/30" };
|
|
4034
4123
|
var _hoisted_2$6 = {
|
|
@@ -4054,233 +4143,253 @@ var _hoisted_9$4 = {
|
|
|
4054
4143
|
var _hoisted_10$4 = ["href"];
|
|
4055
4144
|
var _hoisted_11$4 = ["disabled"];
|
|
4056
4145
|
var _hoisted_12$4 = { class: "material-icons text-sm" };
|
|
4057
|
-
var _hoisted_13$4 = [
|
|
4146
|
+
var _hoisted_13$4 = ["aria-expanded"];
|
|
4147
|
+
var _hoisted_14$4 = {
|
|
4148
|
+
key: 0,
|
|
4149
|
+
class: "absolute right-0 top-full mt-1 z-20 min-w-max rounded border border-slate-200 bg-white shadow-lg py-1",
|
|
4150
|
+
"data-testid": "collections-related-menu-panel"
|
|
4151
|
+
};
|
|
4152
|
+
var _hoisted_15$4 = {
|
|
4153
|
+
key: 0,
|
|
4154
|
+
class: "w-full h-8 px-3 flex items-center gap-2 text-xs text-slate-400",
|
|
4155
|
+
"data-testid": "collections-related-loading"
|
|
4156
|
+
};
|
|
4157
|
+
var _hoisted_16$4 = {
|
|
4158
|
+
key: 1,
|
|
4159
|
+
class: "w-full h-8 px-3 flex items-center text-xs text-slate-400",
|
|
4160
|
+
"data-testid": "collections-related-empty"
|
|
4161
|
+
};
|
|
4162
|
+
var _hoisted_17$4 = ["data-testid", "onClick"];
|
|
4163
|
+
var _hoisted_18$4 = { class: "material-symbols-outlined text-base" };
|
|
4164
|
+
var _hoisted_19$3 = { class: "flex-1 text-left" };
|
|
4165
|
+
var _hoisted_20$3 = ["title", "aria-label"];
|
|
4166
|
+
var _hoisted_21$3 = [
|
|
4058
4167
|
"disabled",
|
|
4059
4168
|
"data-testid",
|
|
4060
4169
|
"onClick"
|
|
4061
4170
|
];
|
|
4062
|
-
var
|
|
4171
|
+
var _hoisted_22$3 = {
|
|
4063
4172
|
key: 0,
|
|
4064
4173
|
class: "material-icons text-sm animate-spin"
|
|
4065
4174
|
};
|
|
4066
|
-
var
|
|
4175
|
+
var _hoisted_23$2 = {
|
|
4067
4176
|
key: 1,
|
|
4068
4177
|
class: "material-icons text-sm"
|
|
4069
4178
|
};
|
|
4070
|
-
var
|
|
4071
|
-
var
|
|
4072
|
-
var
|
|
4179
|
+
var _hoisted_24$1 = ["title", "aria-label"];
|
|
4180
|
+
var _hoisted_25$1 = ["title", "aria-label"];
|
|
4181
|
+
var _hoisted_26$1 = {
|
|
4073
4182
|
key: 1,
|
|
4074
4183
|
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",
|
|
4075
4184
|
"data-testid": "collections-refresh-note"
|
|
4076
4185
|
};
|
|
4077
|
-
var
|
|
4078
|
-
var
|
|
4186
|
+
var _hoisted_27$1 = { class: "flex-1" };
|
|
4187
|
+
var _hoisted_28 = {
|
|
4079
4188
|
key: 2,
|
|
4080
4189
|
class: "px-6 py-3 bg-white border-b border-slate-100 flex items-center justify-between gap-4"
|
|
4081
4190
|
};
|
|
4082
|
-
var
|
|
4191
|
+
var _hoisted_29 = {
|
|
4083
4192
|
key: 0,
|
|
4084
4193
|
class: "relative flex-1 max-w-md"
|
|
4085
4194
|
};
|
|
4086
|
-
var
|
|
4087
|
-
var
|
|
4088
|
-
var
|
|
4089
|
-
var
|
|
4090
|
-
var
|
|
4195
|
+
var _hoisted_30 = ["placeholder", "aria-label"];
|
|
4196
|
+
var _hoisted_31 = ["aria-label"];
|
|
4197
|
+
var _hoisted_32 = { class: "flex items-center gap-2" };
|
|
4198
|
+
var _hoisted_33 = ["aria-label", "aria-expanded"];
|
|
4199
|
+
var _hoisted_34 = {
|
|
4091
4200
|
key: 0,
|
|
4092
4201
|
class: "min-w-4 h-4 px-1 flex items-center justify-center rounded-full bg-indigo-600 text-white text-[10px] font-bold"
|
|
4093
4202
|
};
|
|
4094
|
-
var
|
|
4095
|
-
var
|
|
4203
|
+
var _hoisted_35 = ["aria-label"];
|
|
4204
|
+
var _hoisted_36 = [
|
|
4096
4205
|
"title",
|
|
4097
4206
|
"aria-label",
|
|
4098
4207
|
"aria-pressed",
|
|
4099
4208
|
"data-testid",
|
|
4100
4209
|
"onClick"
|
|
4101
4210
|
];
|
|
4102
|
-
var
|
|
4103
|
-
var
|
|
4104
|
-
var
|
|
4105
|
-
var
|
|
4106
|
-
var
|
|
4107
|
-
var
|
|
4211
|
+
var _hoisted_37 = { class: "flex-1 text-left" };
|
|
4212
|
+
var _hoisted_38 = ["aria-label"];
|
|
4213
|
+
var _hoisted_39 = ["aria-pressed"];
|
|
4214
|
+
var _hoisted_40 = ["aria-pressed"];
|
|
4215
|
+
var _hoisted_41 = ["aria-pressed"];
|
|
4216
|
+
var _hoisted_42 = [
|
|
4108
4217
|
"aria-pressed",
|
|
4109
4218
|
"data-testid",
|
|
4110
4219
|
"onClick"
|
|
4111
4220
|
];
|
|
4112
|
-
var
|
|
4113
|
-
var
|
|
4221
|
+
var _hoisted_43 = { class: "material-icons text-sm" };
|
|
4222
|
+
var _hoisted_44 = [
|
|
4114
4223
|
"title",
|
|
4115
4224
|
"aria-label",
|
|
4116
4225
|
"aria-expanded"
|
|
4117
4226
|
];
|
|
4118
|
-
var
|
|
4227
|
+
var _hoisted_45 = {
|
|
4119
4228
|
key: 0,
|
|
4120
4229
|
class: "absolute left-0 top-full mt-1 z-20 min-w-max rounded border border-slate-200 bg-white shadow-lg py-1",
|
|
4121
4230
|
"data-testid": "collection-view-add-menu"
|
|
4122
4231
|
};
|
|
4123
|
-
var
|
|
4124
|
-
var
|
|
4125
|
-
var
|
|
4126
|
-
var
|
|
4127
|
-
var
|
|
4128
|
-
var
|
|
4232
|
+
var _hoisted_46 = ["title", "aria-label"];
|
|
4233
|
+
var _hoisted_47 = ["value", "aria-label"];
|
|
4234
|
+
var _hoisted_48 = ["value"];
|
|
4235
|
+
var _hoisted_49 = ["value", "aria-label"];
|
|
4236
|
+
var _hoisted_50 = ["value"];
|
|
4237
|
+
var _hoisted_51 = {
|
|
4129
4238
|
key: 4,
|
|
4130
4239
|
class: "text-[10px] text-slate-400 font-bold uppercase tracking-wider select-none"
|
|
4131
4240
|
};
|
|
4132
|
-
var
|
|
4241
|
+
var _hoisted_52 = {
|
|
4133
4242
|
key: 3,
|
|
4134
4243
|
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",
|
|
4135
4244
|
"data-testid": "collections-data-issues"
|
|
4136
4245
|
};
|
|
4137
|
-
var
|
|
4138
|
-
var
|
|
4139
|
-
var
|
|
4246
|
+
var _hoisted_53 = { class: "flex-1" };
|
|
4247
|
+
var _hoisted_54 = { class: "flex-1 overflow-auto" };
|
|
4248
|
+
var _hoisted_55 = {
|
|
4140
4249
|
key: 0,
|
|
4141
4250
|
class: "flex flex-col items-center justify-center py-20 text-sm text-slate-500 gap-3"
|
|
4142
4251
|
};
|
|
4143
|
-
var
|
|
4252
|
+
var _hoisted_56 = {
|
|
4144
4253
|
key: 1,
|
|
4145
4254
|
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"
|
|
4146
4255
|
};
|
|
4147
|
-
var
|
|
4148
|
-
var
|
|
4256
|
+
var _hoisted_57 = { key: 2 };
|
|
4257
|
+
var _hoisted_58 = {
|
|
4149
4258
|
key: 3,
|
|
4150
4259
|
class: "p-4"
|
|
4151
4260
|
};
|
|
4152
|
-
var
|
|
4261
|
+
var _hoisted_59 = {
|
|
4153
4262
|
key: 4,
|
|
4154
4263
|
class: "h-full flex flex-col"
|
|
4155
4264
|
};
|
|
4156
|
-
var
|
|
4265
|
+
var _hoisted_60 = {
|
|
4157
4266
|
key: 0,
|
|
4158
4267
|
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",
|
|
4159
4268
|
"data-testid": "collections-inline-error"
|
|
4160
4269
|
};
|
|
4161
|
-
var
|
|
4162
|
-
var
|
|
4163
|
-
var
|
|
4164
|
-
var
|
|
4270
|
+
var _hoisted_61 = { class: "flex-1" };
|
|
4271
|
+
var _hoisted_62 = ["aria-label"];
|
|
4272
|
+
var _hoisted_63 = { class: "flex-1 min-h-0 px-3 py-2" };
|
|
4273
|
+
var _hoisted_64 = {
|
|
4165
4274
|
key: 5,
|
|
4166
4275
|
class: "h-full",
|
|
4167
4276
|
"data-testid": "collection-custom-view-body"
|
|
4168
4277
|
};
|
|
4169
|
-
var
|
|
4278
|
+
var _hoisted_65 = {
|
|
4170
4279
|
key: 6,
|
|
4171
4280
|
class: "flex flex-col items-center justify-center py-20 text-sm text-slate-400 gap-2"
|
|
4172
4281
|
};
|
|
4173
|
-
var
|
|
4174
|
-
var
|
|
4282
|
+
var _hoisted_66 = { class: "font-semibold text-slate-600" };
|
|
4283
|
+
var _hoisted_67 = {
|
|
4175
4284
|
key: 7,
|
|
4176
4285
|
class: "flex flex-col items-center justify-center py-20 text-sm text-slate-400 gap-2"
|
|
4177
4286
|
};
|
|
4178
|
-
var
|
|
4179
|
-
var
|
|
4287
|
+
var _hoisted_68 = { class: "font-semibold text-slate-600" };
|
|
4288
|
+
var _hoisted_69 = {
|
|
4180
4289
|
key: 8,
|
|
4181
4290
|
class: "overflow-x-auto [container-type:inline-size]"
|
|
4182
4291
|
};
|
|
4183
|
-
var
|
|
4292
|
+
var _hoisted_70 = {
|
|
4184
4293
|
key: 0,
|
|
4185
4294
|
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",
|
|
4186
4295
|
"data-testid": "collections-inline-error"
|
|
4187
4296
|
};
|
|
4188
|
-
var
|
|
4189
|
-
var
|
|
4190
|
-
var
|
|
4191
|
-
var
|
|
4192
|
-
var
|
|
4193
|
-
var
|
|
4194
|
-
var
|
|
4195
|
-
var
|
|
4297
|
+
var _hoisted_71 = { class: "flex-1" };
|
|
4298
|
+
var _hoisted_72 = ["aria-label"];
|
|
4299
|
+
var _hoisted_73 = { class: "min-w-full text-xs" };
|
|
4300
|
+
var _hoisted_74 = { class: "bg-slate-50 border-b border-slate-200" };
|
|
4301
|
+
var _hoisted_75 = ["aria-sort"];
|
|
4302
|
+
var _hoisted_76 = { class: "flex items-center gap-1" };
|
|
4303
|
+
var _hoisted_77 = ["title"];
|
|
4304
|
+
var _hoisted_78 = [
|
|
4196
4305
|
"data-testid",
|
|
4197
4306
|
"aria-label",
|
|
4198
4307
|
"onClick",
|
|
4199
4308
|
"onPointerenter"
|
|
4200
4309
|
];
|
|
4201
|
-
var
|
|
4202
|
-
var
|
|
4203
|
-
var
|
|
4310
|
+
var _hoisted_79 = { class: "material-icons text-base align-middle" };
|
|
4311
|
+
var _hoisted_80 = { class: "divide-y divide-slate-100 bg-white" };
|
|
4312
|
+
var _hoisted_81 = [
|
|
4204
4313
|
"aria-label",
|
|
4205
4314
|
"data-testid",
|
|
4206
4315
|
"onClick",
|
|
4207
4316
|
"onKeydown"
|
|
4208
4317
|
];
|
|
4209
|
-
var
|
|
4318
|
+
var _hoisted_82 = [
|
|
4210
4319
|
"checked",
|
|
4211
4320
|
"disabled",
|
|
4212
4321
|
"data-testid",
|
|
4213
4322
|
"aria-label",
|
|
4214
4323
|
"onChange"
|
|
4215
4324
|
];
|
|
4216
|
-
var
|
|
4325
|
+
var _hoisted_83 = [
|
|
4217
4326
|
"checked",
|
|
4218
4327
|
"disabled",
|
|
4219
4328
|
"data-testid",
|
|
4220
4329
|
"aria-label",
|
|
4221
4330
|
"onChange"
|
|
4222
4331
|
];
|
|
4223
|
-
var
|
|
4224
|
-
var
|
|
4332
|
+
var _hoisted_84 = ["data-testid", "aria-label"];
|
|
4333
|
+
var _hoisted_85 = {
|
|
4225
4334
|
key: 3,
|
|
4226
4335
|
class: "block truncate"
|
|
4227
4336
|
};
|
|
4228
|
-
var
|
|
4337
|
+
var _hoisted_86 = [
|
|
4229
4338
|
"href",
|
|
4230
4339
|
"tabindex",
|
|
4231
4340
|
"data-testid",
|
|
4232
4341
|
"onClick",
|
|
4233
4342
|
"onKeydown"
|
|
4234
4343
|
];
|
|
4235
|
-
var
|
|
4344
|
+
var _hoisted_87 = [
|
|
4236
4345
|
"value",
|
|
4237
4346
|
"disabled",
|
|
4238
4347
|
"data-testid",
|
|
4239
4348
|
"aria-label",
|
|
4240
4349
|
"onChange"
|
|
4241
4350
|
];
|
|
4242
|
-
var
|
|
4351
|
+
var _hoisted_88 = {
|
|
4243
4352
|
key: 0,
|
|
4244
4353
|
value: ""
|
|
4245
4354
|
};
|
|
4246
|
-
var
|
|
4247
|
-
var
|
|
4355
|
+
var _hoisted_89 = ["value"];
|
|
4356
|
+
var _hoisted_90 = {
|
|
4248
4357
|
key: 5,
|
|
4249
4358
|
class: "block truncate tabular-nums font-semibold text-slate-900"
|
|
4250
4359
|
};
|
|
4251
|
-
var
|
|
4360
|
+
var _hoisted_91 = {
|
|
4252
4361
|
key: 6,
|
|
4253
4362
|
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"
|
|
4254
4363
|
};
|
|
4255
|
-
var
|
|
4364
|
+
var _hoisted_92 = {
|
|
4256
4365
|
key: 7,
|
|
4257
4366
|
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"
|
|
4258
4367
|
};
|
|
4259
|
-
var
|
|
4260
|
-
var
|
|
4261
|
-
var
|
|
4262
|
-
var
|
|
4368
|
+
var _hoisted_93 = ["data-testid"];
|
|
4369
|
+
var _hoisted_94 = ["href", "data-testid"];
|
|
4370
|
+
var _hoisted_95 = ["href", "data-testid"];
|
|
4371
|
+
var _hoisted_96 = [
|
|
4263
4372
|
"href",
|
|
4264
4373
|
"data-testid",
|
|
4265
4374
|
"onClick"
|
|
4266
4375
|
];
|
|
4267
|
-
var
|
|
4376
|
+
var _hoisted_97 = {
|
|
4268
4377
|
key: 12,
|
|
4269
4378
|
class: "block truncate text-slate-600"
|
|
4270
4379
|
};
|
|
4271
|
-
var
|
|
4272
|
-
var
|
|
4273
|
-
var
|
|
4274
|
-
var
|
|
4380
|
+
var _hoisted_98 = { class: "bg-white rounded-2xl shadow-2xl w-full max-w-xl flex flex-col border border-slate-200 overflow-hidden" };
|
|
4381
|
+
var _hoisted_99 = { class: "px-6 py-4 border-b border-slate-100 flex items-center gap-3 bg-slate-50/50" };
|
|
4382
|
+
var _hoisted_100 = { class: "flex-1" };
|
|
4383
|
+
var _hoisted_101 = {
|
|
4275
4384
|
id: "collections-chat-title",
|
|
4276
4385
|
class: "text-sm font-bold text-slate-800 uppercase tracking-wide"
|
|
4277
4386
|
};
|
|
4278
|
-
var
|
|
4279
|
-
var
|
|
4280
|
-
var
|
|
4281
|
-
var
|
|
4282
|
-
var
|
|
4283
|
-
var
|
|
4387
|
+
var _hoisted_102 = { class: "text-xs text-slate-400 font-semibold" };
|
|
4388
|
+
var _hoisted_103 = ["aria-label"];
|
|
4389
|
+
var _hoisted_104 = { class: "px-6 py-5" };
|
|
4390
|
+
var _hoisted_105 = ["placeholder", "onKeydown"];
|
|
4391
|
+
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" };
|
|
4392
|
+
var _hoisted_107 = ["disabled"];
|
|
4284
4393
|
/** `slug` / `selected` are supplied only in EMBEDDED mode (the
|
|
4285
4394
|
* `presentCollection` chat card mounts this component and drives both
|
|
4286
4395
|
* from the tool result). In standalone route mode (the
|
|
@@ -4850,6 +4959,60 @@ var CollectionView_default = /* @__PURE__ */ (0, vue.defineComponent)({
|
|
|
4850
4959
|
function closeChat() {
|
|
4851
4960
|
chatOpen.value = false;
|
|
4852
4961
|
}
|
|
4962
|
+
const relatedMenuOpen = (0, vue.ref)(false);
|
|
4963
|
+
const relatedMenuRef = (0, vue.ref)(null);
|
|
4964
|
+
const relatedLoading = (0, vue.ref)(false);
|
|
4965
|
+
/** Derived neighbors for `relatedFetchedSlug` (null until first fetched). */
|
|
4966
|
+
const relatedList = (0, vue.ref)(null);
|
|
4967
|
+
/** Slug the cached `relatedList` was built for — a mismatch on open forces
|
|
4968
|
+
* a re-fetch (e.g. after navigating to a different collection). */
|
|
4969
|
+
const relatedFetchedSlug = (0, vue.ref)(null);
|
|
4970
|
+
const showRelatedMenu = (0, vue.computed)(() => Boolean(collection.value) && !embedded.value && cui.fetchOntology !== void 0);
|
|
4971
|
+
const relatedItems = (0, vue.computed)(() => relatedList.value ?? []);
|
|
4972
|
+
function relatedDirectionIcon(direction) {
|
|
4973
|
+
if (direction === "out") return "arrow_outward";
|
|
4974
|
+
if (direction === "in") return "arrow_back";
|
|
4975
|
+
return "sync_alt";
|
|
4976
|
+
}
|
|
4977
|
+
function relatedDirectionLabel(direction) {
|
|
4978
|
+
if (direction === "out") return t("collectionsView.relatedOut");
|
|
4979
|
+
if (direction === "in") return t("collectionsView.relatedIn");
|
|
4980
|
+
return t("collectionsView.relatedBoth");
|
|
4981
|
+
}
|
|
4982
|
+
/** Fetch the ontology and derive this slug's neighbors. Fail-soft: a
|
|
4983
|
+
* non-ok result (the `apiGet` wrapper already caught the network/HTTP
|
|
4984
|
+
* error) leaves an empty list, which the panel shows as its empty row.
|
|
4985
|
+
*
|
|
4986
|
+
* Sets `relatedFetchedSlug` synchronously (before the await) so a rapid
|
|
4987
|
+
* re-open can't kick a duplicate fetch, and DROPS a stale response whose
|
|
4988
|
+
* slug no longer matches the active collection — otherwise a slower fetch
|
|
4989
|
+
* for a since-abandoned slug, resolving after a fast switch, would apply
|
|
4990
|
+
* the wrong collection's neighbors (Codex / CodeRabbit on PR #2251). */
|
|
4991
|
+
async function loadRelated(slug) {
|
|
4992
|
+
relatedFetchedSlug.value = slug;
|
|
4993
|
+
relatedLoading.value = true;
|
|
4994
|
+
const result = await cui.fetchOntology?.();
|
|
4995
|
+
if (collection.value?.slug !== slug) return;
|
|
4996
|
+
relatedLoading.value = false;
|
|
4997
|
+
relatedList.value = result?.ok ? relatedCollections(result.data.entries, slug) : [];
|
|
4998
|
+
}
|
|
4999
|
+
function toggleRelatedMenu() {
|
|
5000
|
+
relatedMenuOpen.value = !relatedMenuOpen.value;
|
|
5001
|
+
const slug = collection.value?.slug;
|
|
5002
|
+
if (relatedMenuOpen.value && slug && relatedFetchedSlug.value !== slug) loadRelated(slug);
|
|
5003
|
+
}
|
|
5004
|
+
function closeRelatedMenuOnOutsideClick(event) {
|
|
5005
|
+
if (!eventInsideElement(event, relatedMenuRef.value)) relatedMenuOpen.value = false;
|
|
5006
|
+
}
|
|
5007
|
+
(0, vue.watch)(relatedMenuOpen, (open) => {
|
|
5008
|
+
if (open) document.addEventListener("mousedown", closeRelatedMenuOnOutsideClick);
|
|
5009
|
+
else document.removeEventListener("mousedown", closeRelatedMenuOnOutsideClick);
|
|
5010
|
+
});
|
|
5011
|
+
/** Hop to a related collection's detail page (same nav as the index cards). */
|
|
5012
|
+
function gotoRelated(slug) {
|
|
5013
|
+
relatedMenuOpen.value = false;
|
|
5014
|
+
cui.gotoDetail("collection", slug);
|
|
5015
|
+
}
|
|
4853
5016
|
/** Build the chat seed text for the current view.
|
|
4854
5017
|
*
|
|
4855
5018
|
* A collection IS a skill, so its slug doubles as a slash command:
|
|
@@ -5564,6 +5727,10 @@ var CollectionView_default = /* @__PURE__ */ (0, vue.defineComponent)({
|
|
|
5564
5727
|
kanbanOverride.value = null;
|
|
5565
5728
|
addMenuOpen.value = false;
|
|
5566
5729
|
filterMenuOpen.value = false;
|
|
5730
|
+
relatedMenuOpen.value = false;
|
|
5731
|
+
relatedList.value = null;
|
|
5732
|
+
relatedFetchedSlug.value = null;
|
|
5733
|
+
relatedLoading.value = false;
|
|
5567
5734
|
sortState.value = storedSortFor(slug);
|
|
5568
5735
|
flagFilters.value = storedFlagFiltersFor(slug);
|
|
5569
5736
|
}
|
|
@@ -5615,6 +5782,7 @@ var CollectionView_default = /* @__PURE__ */ (0, vue.defineComponent)({
|
|
|
5615
5782
|
if (refreshNoteTimer !== void 0) clearTimeout(refreshNoteTimer);
|
|
5616
5783
|
document.removeEventListener("mousedown", closeAddMenuOnOutsideClick);
|
|
5617
5784
|
document.removeEventListener("mousedown", closeFilterMenuOnOutsideClick);
|
|
5785
|
+
document.removeEventListener("mousedown", closeRelatedMenuOnOutsideClick);
|
|
5618
5786
|
});
|
|
5619
5787
|
(0, vue.watch)([
|
|
5620
5788
|
activeView,
|
|
@@ -5687,6 +5855,35 @@ var CollectionView_default = /* @__PURE__ */ (0, vue.defineComponent)({
|
|
|
5687
5855
|
"data-testid": "collections-chat",
|
|
5688
5856
|
onClick: openChat
|
|
5689
5857
|
}, [_cache[30] || (_cache[30] = (0, vue.createElementVNode)("span", { class: "material-icons text-sm" }, "forum", -1)), (0, vue.createElementVNode)("span", null, (0, vue.toDisplayString)((0, vue.unref)(t)("collectionsView.chat")), 1)])) : (0, vue.createCommentVNode)("", true),
|
|
5858
|
+
showRelatedMenu.value ? ((0, vue.openBlock)(), (0, vue.createElementBlock)("div", {
|
|
5859
|
+
key: 5,
|
|
5860
|
+
ref_key: "relatedMenuRef",
|
|
5861
|
+
ref: relatedMenuRef,
|
|
5862
|
+
class: "relative"
|
|
5863
|
+
}, [(0, vue.createElementVNode)("button", {
|
|
5864
|
+
type: "button",
|
|
5865
|
+
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",
|
|
5866
|
+
"aria-expanded": relatedMenuOpen.value,
|
|
5867
|
+
"data-testid": "collections-related-menu",
|
|
5868
|
+
onClick: toggleRelatedMenu
|
|
5869
|
+
}, [_cache[31] || (_cache[31] = (0, vue.createElementVNode)("span", { class: "material-icons text-sm" }, "hub", -1)), (0, vue.createElementVNode)("span", null, (0, vue.toDisplayString)((0, vue.unref)(t)("collectionsView.related")), 1)], 8, _hoisted_13$4), relatedMenuOpen.value ? ((0, vue.openBlock)(), (0, vue.createElementBlock)("div", _hoisted_14$4, [relatedLoading.value ? ((0, vue.openBlock)(), (0, vue.createElementBlock)("div", _hoisted_15$4, [_cache[32] || (_cache[32] = (0, vue.createElementVNode)("span", { class: "material-icons text-sm animate-spin" }, "hourglass_empty", -1)), (0, vue.createElementVNode)("span", null, (0, vue.toDisplayString)((0, vue.unref)(t)("common.loading")), 1)])) : relatedItems.value.length === 0 ? ((0, vue.openBlock)(), (0, vue.createElementBlock)("div", _hoisted_16$4, (0, vue.toDisplayString)((0, vue.unref)(t)("collectionsView.relatedEmpty")), 1)) : (0, vue.createCommentVNode)("", true), ((0, vue.openBlock)(true), (0, vue.createElementBlock)(vue.Fragment, null, (0, vue.renderList)(relatedItems.value, (related) => {
|
|
5870
|
+
return (0, vue.openBlock)(), (0, vue.createElementBlock)("button", {
|
|
5871
|
+
key: related.slug,
|
|
5872
|
+
type: "button",
|
|
5873
|
+
class: "w-full h-8 px-3 flex items-center gap-2 text-xs text-slate-600 hover:bg-slate-50 transition-colors",
|
|
5874
|
+
"data-testid": `collections-related-item-${related.slug}`,
|
|
5875
|
+
onClick: ($event) => gotoRelated(related.slug)
|
|
5876
|
+
}, [
|
|
5877
|
+
(0, vue.createElementVNode)("span", _hoisted_18$4, (0, vue.toDisplayString)(related.icon), 1),
|
|
5878
|
+
(0, vue.createElementVNode)("span", _hoisted_19$3, (0, vue.toDisplayString)(related.title), 1),
|
|
5879
|
+
(0, vue.createElementVNode)("span", {
|
|
5880
|
+
class: "material-icons text-sm text-slate-400",
|
|
5881
|
+
title: relatedDirectionLabel(related.direction),
|
|
5882
|
+
"aria-label": relatedDirectionLabel(related.direction),
|
|
5883
|
+
role: "img"
|
|
5884
|
+
}, (0, vue.toDisplayString)(relatedDirectionIcon(related.direction)), 9, _hoisted_20$3)
|
|
5885
|
+
], 8, _hoisted_17$4);
|
|
5886
|
+
}), 128))])) : (0, vue.createCommentVNode)("", true)], 512)) : (0, vue.createCommentVNode)("", true),
|
|
5690
5887
|
((0, vue.openBlock)(true), (0, vue.createElementBlock)(vue.Fragment, null, (0, vue.renderList)(collectionActions.value, (action) => {
|
|
5691
5888
|
return (0, vue.openBlock)(), (0, vue.createElementBlock)("button", {
|
|
5692
5889
|
key: action.id,
|
|
@@ -5695,52 +5892,52 @@ var CollectionView_default = /* @__PURE__ */ (0, vue.defineComponent)({
|
|
|
5695
5892
|
disabled: collectionActionPending.value || isActionRunning(action.id),
|
|
5696
5893
|
"data-testid": `collections-action-${action.id}`,
|
|
5697
5894
|
onClick: ($event) => runCollectionAction(action)
|
|
5698
|
-
}, [isActionRunning(action.id) ? ((0, vue.openBlock)(), (0, vue.createElementBlock)("span",
|
|
5895
|
+
}, [isActionRunning(action.id) ? ((0, vue.openBlock)(), (0, vue.createElementBlock)("span", _hoisted_22$3, "progress_activity")) : action.icon ? ((0, vue.openBlock)(), (0, vue.createElementBlock)("span", _hoisted_23$2, (0, vue.toDisplayString)(action.icon), 1)) : (0, vue.createCommentVNode)("", true), (0, vue.createElementVNode)("span", null, (0, vue.toDisplayString)(action.label), 1)], 8, _hoisted_21$3);
|
|
5699
5896
|
}), 128)),
|
|
5700
5897
|
canCreate.value && !calendarActive.value ? ((0, vue.openBlock)(), (0, vue.createElementBlock)("button", {
|
|
5701
|
-
key:
|
|
5898
|
+
key: 6,
|
|
5702
5899
|
type: "button",
|
|
5703
5900
|
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",
|
|
5704
5901
|
"data-testid": "collections-add-item",
|
|
5705
5902
|
onClick: openCreate
|
|
5706
|
-
}, [_cache[
|
|
5903
|
+
}, [_cache[33] || (_cache[33] = (0, vue.createElementVNode)("span", { class: "material-icons text-sm" }, "add", -1)), (0, vue.createElementVNode)("span", null, (0, vue.toDisplayString)((0, vue.unref)(t)("common.add")), 1)])) : (0, vue.createCommentVNode)("", true),
|
|
5707
5904
|
canDeleteCollection.value && !embedded.value ? ((0, vue.openBlock)(), (0, vue.createElementBlock)("button", {
|
|
5708
|
-
key:
|
|
5905
|
+
key: 7,
|
|
5709
5906
|
type: "button",
|
|
5710
5907
|
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",
|
|
5711
5908
|
title: (0, vue.unref)(t)("collectionsView.deleteCollection"),
|
|
5712
5909
|
"aria-label": (0, vue.unref)(t)("collectionsView.deleteCollection"),
|
|
5713
5910
|
"data-testid": "collections-delete",
|
|
5714
5911
|
onClick: confirmCollectionDelete
|
|
5715
|
-
}, [..._cache[
|
|
5912
|
+
}, [..._cache[34] || (_cache[34] = [(0, vue.createElementVNode)("span", { class: "material-icons text-sm" }, "delete_forever", -1)])], 8, _hoisted_24$1)) : (0, vue.createCommentVNode)("", true),
|
|
5716
5913
|
canDeleteFeed.value && !embedded.value ? ((0, vue.openBlock)(), (0, vue.createElementBlock)("button", {
|
|
5717
|
-
key:
|
|
5914
|
+
key: 8,
|
|
5718
5915
|
type: "button",
|
|
5719
5916
|
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",
|
|
5720
5917
|
title: (0, vue.unref)(t)("collectionsView.deleteFeed"),
|
|
5721
5918
|
"aria-label": (0, vue.unref)(t)("collectionsView.deleteFeed"),
|
|
5722
5919
|
"data-testid": "feeds-delete",
|
|
5723
5920
|
onClick: confirmFeedDelete
|
|
5724
|
-
}, [..._cache[
|
|
5921
|
+
}, [..._cache[35] || (_cache[35] = [(0, vue.createElementVNode)("span", { class: "material-icons text-sm" }, "delete_forever", -1)])], 8, _hoisted_25$1)) : (0, vue.createCommentVNode)("", true)
|
|
5725
5922
|
])) : (0, vue.createCommentVNode)("", true),
|
|
5726
|
-
refreshNote.value ? ((0, vue.openBlock)(), (0, vue.createElementBlock)("div",
|
|
5727
|
-
collection.value && (!__props.hideSearch && items.value.length > 0 || !__props.hideViewToggle && (hasCalendar.value || hasKanban.value || hasCustomViews.value || canAddCustomView.value)) ? ((0, vue.openBlock)(), (0, vue.createElementBlock)("div",
|
|
5728
|
-
_cache[
|
|
5923
|
+
refreshNote.value ? ((0, vue.openBlock)(), (0, vue.createElementBlock)("div", _hoisted_26$1, [_cache[36] || (_cache[36] = (0, vue.createElementVNode)("span", { class: "material-icons text-base text-indigo-600" }, "hourglass_top", -1)), (0, vue.createElementVNode)("span", _hoisted_27$1, (0, vue.toDisplayString)(refreshNote.value), 1)])) : (0, vue.createCommentVNode)("", true),
|
|
5924
|
+
collection.value && (!__props.hideSearch && items.value.length > 0 || !__props.hideViewToggle && (hasCalendar.value || hasKanban.value || hasCustomViews.value || canAddCustomView.value)) ? ((0, vue.openBlock)(), (0, vue.createElementBlock)("div", _hoisted_28, [!__props.hideSearch && items.value.length > 0 ? ((0, vue.openBlock)(), (0, vue.createElementBlock)("div", _hoisted_29, [
|
|
5925
|
+
_cache[38] || (_cache[38] = (0, vue.createElementVNode)("span", { class: "absolute inset-y-0 left-0 flex items-center pl-3 text-slate-400 pointer-events-none" }, [(0, vue.createElementVNode)("span", { class: "material-icons text-lg" }, "search")], -1)),
|
|
5729
5926
|
(0, vue.withDirectives)((0, vue.createElementVNode)("input", {
|
|
5730
5927
|
"onUpdate:modelValue": _cache[1] || (_cache[1] = ($event) => searchQuery.value = $event),
|
|
5731
5928
|
type: "text",
|
|
5732
5929
|
placeholder: (0, vue.unref)(t)("collectionsView.searchPlaceholder"),
|
|
5733
5930
|
"aria-label": (0, vue.unref)(t)("collectionsView.searchPlaceholder"),
|
|
5734
5931
|
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"
|
|
5735
|
-
}, null, 8,
|
|
5932
|
+
}, null, 8, _hoisted_30), [[vue.vModelText, searchQuery.value]]),
|
|
5736
5933
|
searchQuery.value ? ((0, vue.openBlock)(), (0, vue.createElementBlock)("button", {
|
|
5737
5934
|
key: 0,
|
|
5738
5935
|
type: "button",
|
|
5739
5936
|
"aria-label": (0, vue.unref)(t)("collectionsView.clearSearch"),
|
|
5740
5937
|
class: "absolute inset-y-0 right-0 flex items-center pr-2.5 text-slate-400 hover:text-slate-600",
|
|
5741
5938
|
onClick: _cache[2] || (_cache[2] = ($event) => searchQuery.value = "")
|
|
5742
|
-
}, [..._cache[
|
|
5743
|
-
])) : (0, vue.createCommentVNode)("", true), (0, vue.createElementVNode)("div",
|
|
5939
|
+
}, [..._cache[37] || (_cache[37] = [(0, vue.createElementVNode)("span", { class: "material-icons text-sm" }, "close", -1)])], 8, _hoisted_31)) : (0, vue.createCommentVNode)("", true)
|
|
5940
|
+
])) : (0, vue.createCommentVNode)("", true), (0, vue.createElementVNode)("div", _hoisted_32, [
|
|
5744
5941
|
activeView.value === "table" && flagChips.value.length > 0 && items.value.length > 0 ? ((0, vue.openBlock)(), (0, vue.createElementBlock)("div", {
|
|
5745
5942
|
key: 0,
|
|
5746
5943
|
ref_key: "filterMenuRef",
|
|
@@ -5754,13 +5951,13 @@ var CollectionView_default = /* @__PURE__ */ (0, vue.defineComponent)({
|
|
|
5754
5951
|
"data-testid": "collections-filter-menu",
|
|
5755
5952
|
onClick: _cache[3] || (_cache[3] = ($event) => filterMenuOpen.value = !filterMenuOpen.value)
|
|
5756
5953
|
}, [
|
|
5757
|
-
_cache[
|
|
5954
|
+
_cache[39] || (_cache[39] = (0, vue.createElementVNode)("span", {
|
|
5758
5955
|
class: "material-icons text-sm",
|
|
5759
5956
|
"aria-hidden": "true"
|
|
5760
5957
|
}, "filter_alt", -1)),
|
|
5761
5958
|
(0, vue.createElementVNode)("span", null, (0, vue.toDisplayString)((0, vue.unref)(t)("collectionsView.flagFilterButton")), 1),
|
|
5762
|
-
activeFlagFilterCount.value > 0 ? ((0, vue.openBlock)(), (0, vue.createElementBlock)("span",
|
|
5763
|
-
], 10,
|
|
5959
|
+
activeFlagFilterCount.value > 0 ? ((0, vue.openBlock)(), (0, vue.createElementBlock)("span", _hoisted_34, (0, vue.toDisplayString)(activeFlagFilterCount.value), 1)) : (0, vue.createCommentVNode)("", true)
|
|
5960
|
+
], 10, _hoisted_33), filterMenuOpen.value ? ((0, vue.openBlock)(), (0, vue.createElementBlock)("div", {
|
|
5764
5961
|
key: 0,
|
|
5765
5962
|
class: "absolute left-0 top-full mt-1 z-20 min-w-max rounded border border-slate-200 bg-white shadow-lg py-1",
|
|
5766
5963
|
role: "group",
|
|
@@ -5779,8 +5976,8 @@ var CollectionView_default = /* @__PURE__ */ (0, vue.defineComponent)({
|
|
|
5779
5976
|
}, [(0, vue.createElementVNode)("span", {
|
|
5780
5977
|
class: (0, vue.normalizeClass)(["material-icons text-sm", flagChipIconClass(chip.key)]),
|
|
5781
5978
|
"aria-hidden": "true"
|
|
5782
|
-
}, (0, vue.toDisplayString)(flagChipIcon(chip.key)), 3), (0, vue.createElementVNode)("span",
|
|
5783
|
-
}), 128))], 8,
|
|
5979
|
+
}, (0, vue.toDisplayString)(flagChipIcon(chip.key)), 3), (0, vue.createElementVNode)("span", _hoisted_37, (0, vue.toDisplayString)(chip.label), 1)], 10, _hoisted_36);
|
|
5980
|
+
}), 128))], 8, _hoisted_35)) : (0, vue.createCommentVNode)("", true)], 512)) : (0, vue.createCommentVNode)("", true),
|
|
5784
5981
|
!__props.hideViewToggle && (hasCalendar.value || hasKanban.value || hasCustomViews.value || canAddCustomView.value) ? ((0, vue.openBlock)(), (0, vue.createElementBlock)("div", {
|
|
5785
5982
|
key: 1,
|
|
5786
5983
|
class: "flex gap-0.5",
|
|
@@ -5793,7 +5990,7 @@ var CollectionView_default = /* @__PURE__ */ (0, vue.defineComponent)({
|
|
|
5793
5990
|
"aria-pressed": activeView.value === "table",
|
|
5794
5991
|
"data-testid": "collection-view-toggle-table",
|
|
5795
5992
|
onClick: _cache[4] || (_cache[4] = ($event) => setView("table"))
|
|
5796
|
-
}, [_cache[
|
|
5993
|
+
}, [_cache[40] || (_cache[40] = (0, vue.createElementVNode)("span", { class: "material-icons text-sm" }, "table_rows", -1)), (0, vue.createElementVNode)("span", null, (0, vue.toDisplayString)((0, vue.unref)(t)("collectionsView.viewTable")), 1)], 10, _hoisted_39),
|
|
5797
5994
|
hasCalendar.value ? ((0, vue.openBlock)(), (0, vue.createElementBlock)("button", {
|
|
5798
5995
|
key: 0,
|
|
5799
5996
|
type: "button",
|
|
@@ -5801,7 +5998,7 @@ var CollectionView_default = /* @__PURE__ */ (0, vue.defineComponent)({
|
|
|
5801
5998
|
"aria-pressed": activeView.value === "calendar",
|
|
5802
5999
|
"data-testid": "collection-view-toggle-calendar",
|
|
5803
6000
|
onClick: _cache[5] || (_cache[5] = ($event) => setView("calendar"))
|
|
5804
|
-
}, [_cache[
|
|
6001
|
+
}, [_cache[41] || (_cache[41] = (0, vue.createElementVNode)("span", { class: "material-icons text-sm" }, "calendar_month", -1)), (0, vue.createElementVNode)("span", null, (0, vue.toDisplayString)((0, vue.unref)(t)("collectionsView.viewCalendar")), 1)], 10, _hoisted_40)) : (0, vue.createCommentVNode)("", true),
|
|
5805
6002
|
hasKanban.value ? ((0, vue.openBlock)(), (0, vue.createElementBlock)("button", {
|
|
5806
6003
|
key: 1,
|
|
5807
6004
|
type: "button",
|
|
@@ -5809,7 +6006,7 @@ var CollectionView_default = /* @__PURE__ */ (0, vue.defineComponent)({
|
|
|
5809
6006
|
"aria-pressed": activeView.value === "kanban",
|
|
5810
6007
|
"data-testid": "collection-view-toggle-kanban",
|
|
5811
6008
|
onClick: _cache[6] || (_cache[6] = ($event) => setView("kanban"))
|
|
5812
|
-
}, [_cache[
|
|
6009
|
+
}, [_cache[42] || (_cache[42] = (0, vue.createElementVNode)("span", { class: "material-icons text-sm" }, "view_kanban", -1)), (0, vue.createElementVNode)("span", null, (0, vue.toDisplayString)((0, vue.unref)(t)("collectionsView.viewKanban")), 1)], 10, _hoisted_41)) : (0, vue.createCommentVNode)("", true),
|
|
5813
6010
|
((0, vue.openBlock)(true), (0, vue.createElementBlock)(vue.Fragment, null, (0, vue.renderList)(customViews.value, (cv) => {
|
|
5814
6011
|
return (0, vue.openBlock)(), (0, vue.createElementBlock)("button", {
|
|
5815
6012
|
key: cv.id,
|
|
@@ -5818,7 +6015,7 @@ var CollectionView_default = /* @__PURE__ */ (0, vue.defineComponent)({
|
|
|
5818
6015
|
"aria-pressed": activeView.value === (0, vue.unref)(customViewKey)(cv.id),
|
|
5819
6016
|
"data-testid": `collection-view-custom-${cv.id}`,
|
|
5820
6017
|
onClick: ($event) => setCustomView(cv.id)
|
|
5821
|
-
}, [(0, vue.createElementVNode)("span",
|
|
6018
|
+
}, [(0, vue.createElementVNode)("span", _hoisted_43, (0, vue.toDisplayString)(cv.icon || (cv.target === "mobile" ? "smartphone" : "dashboard_customize")), 1), (0, vue.createElementVNode)("span", null, (0, vue.toDisplayString)(cv.label), 1)], 10, _hoisted_42);
|
|
5822
6019
|
}), 128)),
|
|
5823
6020
|
canAddCustomView.value ? ((0, vue.openBlock)(), (0, vue.createElementBlock)("div", {
|
|
5824
6021
|
key: 2,
|
|
@@ -5833,17 +6030,17 @@ var CollectionView_default = /* @__PURE__ */ (0, vue.defineComponent)({
|
|
|
5833
6030
|
"aria-expanded": addMenuOpen.value,
|
|
5834
6031
|
"data-testid": "collection-view-add",
|
|
5835
6032
|
onClick: onAddViewClick
|
|
5836
|
-
}, [..._cache[
|
|
6033
|
+
}, [..._cache[43] || (_cache[43] = [(0, vue.createElementVNode)("span", { class: "material-icons text-sm" }, "add", -1)])], 8, _hoisted_44), addMenuOpen.value ? ((0, vue.openBlock)(), (0, vue.createElementBlock)("div", _hoisted_45, [(0, vue.createElementVNode)("button", {
|
|
5837
6034
|
type: "button",
|
|
5838
6035
|
class: "w-full h-8 px-3 flex items-center gap-2 text-xs font-bold text-slate-600 hover:bg-slate-50",
|
|
5839
6036
|
"data-testid": "collection-view-add-desktop",
|
|
5840
6037
|
onClick: _cache[7] || (_cache[7] = ($event) => addCustomView("desktop"))
|
|
5841
|
-
}, [_cache[
|
|
6038
|
+
}, [_cache[44] || (_cache[44] = (0, vue.createElementVNode)("span", { class: "material-icons text-sm" }, "dashboard_customize", -1)), (0, vue.createElementVNode)("span", null, (0, vue.toDisplayString)((0, vue.unref)(t)("collectionsView.addViewDesktop")), 1)]), (0, vue.createElementVNode)("button", {
|
|
5842
6039
|
type: "button",
|
|
5843
6040
|
class: "w-full h-8 px-3 flex items-center gap-2 text-xs font-bold text-slate-600 hover:bg-slate-50",
|
|
5844
6041
|
"data-testid": "collection-view-add-mobile",
|
|
5845
6042
|
onClick: _cache[8] || (_cache[8] = ($event) => addCustomView("mobile"))
|
|
5846
|
-
}, [_cache[
|
|
6043
|
+
}, [_cache[45] || (_cache[45] = (0, vue.createElementVNode)("span", { class: "material-icons text-sm" }, "smartphone", -1)), (0, vue.createElementVNode)("span", null, (0, vue.toDisplayString)((0, vue.unref)(t)("collectionsView.addViewMobile")), 1)])])) : (0, vue.createCommentVNode)("", true)], 512)) : (0, vue.createCommentVNode)("", true),
|
|
5847
6044
|
canConfigureViews.value ? ((0, vue.openBlock)(), (0, vue.createElementBlock)("button", {
|
|
5848
6045
|
key: 3,
|
|
5849
6046
|
type: "button",
|
|
@@ -5852,8 +6049,8 @@ var CollectionView_default = /* @__PURE__ */ (0, vue.defineComponent)({
|
|
|
5852
6049
|
"aria-label": (0, vue.unref)(t)("collectionsView.config.open"),
|
|
5853
6050
|
"data-testid": "collection-config-open",
|
|
5854
6051
|
onClick: _cache[9] || (_cache[9] = ($event) => configOpen.value = true)
|
|
5855
|
-
}, [..._cache[
|
|
5856
|
-
], 8,
|
|
6052
|
+
}, [..._cache[46] || (_cache[46] = [(0, vue.createElementVNode)("span", { class: "material-icons text-sm" }, "settings", -1)])], 8, _hoisted_46)) : (0, vue.createCommentVNode)("", true)
|
|
6053
|
+
], 8, _hoisted_38)) : (0, vue.createCommentVNode)("", true),
|
|
5857
6054
|
calendarActive.value && dateFields.value.length > 1 ? ((0, vue.openBlock)(), (0, vue.createElementBlock)("select", {
|
|
5858
6055
|
key: 2,
|
|
5859
6056
|
value: calendarAnchorField.value,
|
|
@@ -5865,8 +6062,8 @@ var CollectionView_default = /* @__PURE__ */ (0, vue.defineComponent)({
|
|
|
5865
6062
|
return (0, vue.openBlock)(), (0, vue.createElementBlock)("option", {
|
|
5866
6063
|
key,
|
|
5867
6064
|
value: key
|
|
5868
|
-
}, (0, vue.toDisplayString)(collection.value?.schema.fields[key]?.label ?? key), 9,
|
|
5869
|
-
}), 128))], 40,
|
|
6065
|
+
}, (0, vue.toDisplayString)(collection.value?.schema.fields[key]?.label ?? key), 9, _hoisted_48);
|
|
6066
|
+
}), 128))], 40, _hoisted_47)) : (0, vue.createCommentVNode)("", true),
|
|
5870
6067
|
kanbanActive.value && enumFields.value.length > 1 ? ((0, vue.openBlock)(), (0, vue.createElementBlock)("select", {
|
|
5871
6068
|
key: 3,
|
|
5872
6069
|
value: kanbanGroupField.value,
|
|
@@ -5878,24 +6075,24 @@ var CollectionView_default = /* @__PURE__ */ (0, vue.defineComponent)({
|
|
|
5878
6075
|
return (0, vue.openBlock)(), (0, vue.createElementBlock)("option", {
|
|
5879
6076
|
key,
|
|
5880
6077
|
value: key
|
|
5881
|
-
}, (0, vue.toDisplayString)(collection.value?.schema.fields[key]?.label ?? key), 9,
|
|
5882
|
-
}), 128))], 40,
|
|
5883
|
-
items.value.length > 0 ? ((0, vue.openBlock)(), (0, vue.createElementBlock)("div",
|
|
6078
|
+
}, (0, vue.toDisplayString)(collection.value?.schema.fields[key]?.label ?? key), 9, _hoisted_50);
|
|
6079
|
+
}), 128))], 40, _hoisted_49)) : (0, vue.createCommentVNode)("", true),
|
|
6080
|
+
items.value.length > 0 ? ((0, vue.openBlock)(), (0, vue.createElementBlock)("div", _hoisted_51, (0, vue.toDisplayString)((0, vue.unref)(t)("collectionsView.searchSummary", {
|
|
5884
6081
|
shown: activeView.value === "table" ? tableFilteredItems.value.length : filteredItems.value.length,
|
|
5885
6082
|
total: items.value.length
|
|
5886
6083
|
})), 1)) : (0, vue.createCommentVNode)("", true)
|
|
5887
6084
|
])])) : (0, vue.createCommentVNode)("", true),
|
|
5888
|
-
collection.value && dataIssues.value.length > 0 ? ((0, vue.openBlock)(), (0, vue.createElementBlock)("div",
|
|
5889
|
-
_cache[
|
|
5890
|
-
(0, vue.createElementVNode)("span",
|
|
6085
|
+
collection.value && dataIssues.value.length > 0 ? ((0, vue.openBlock)(), (0, vue.createElementBlock)("div", _hoisted_52, [
|
|
6086
|
+
_cache[48] || (_cache[48] = (0, vue.createElementVNode)("span", { class: "material-icons text-amber-600" }, "warning", -1)),
|
|
6087
|
+
(0, vue.createElementVNode)("span", _hoisted_53, (0, vue.toDisplayString)((0, vue.unref)(t)("collectionsView.dataIssuesDetected", { count: dataIssues.value.length })), 1),
|
|
5891
6088
|
(0, vue.createElementVNode)("button", {
|
|
5892
6089
|
type: "button",
|
|
5893
6090
|
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",
|
|
5894
6091
|
"data-testid": "collections-repair",
|
|
5895
6092
|
onClick: repairCollection
|
|
5896
|
-
}, [_cache[
|
|
6093
|
+
}, [_cache[47] || (_cache[47] = (0, vue.createElementVNode)("span", { class: "material-icons text-sm" }, "build", -1)), (0, vue.createElementVNode)("span", null, (0, vue.toDisplayString)((0, vue.unref)(t)("collectionsView.repair")), 1)])
|
|
5897
6094
|
])) : (0, vue.createCommentVNode)("", true),
|
|
5898
|
-
(0, vue.createElementVNode)("div",
|
|
6095
|
+
(0, vue.createElementVNode)("div", _hoisted_54, [loading.value ? ((0, vue.openBlock)(), (0, vue.createElementBlock)("div", _hoisted_55, [_cache[49] || (_cache[49] = (0, vue.createElementVNode)("div", { class: "h-8 w-8 border-2 border-indigo-600/20 border-t-indigo-600 rounded-full animate-spin" }, null, -1)), (0, vue.createElementVNode)("span", null, (0, vue.toDisplayString)((0, vue.unref)(t)("common.loading")), 1)])) : loadError.value ? ((0, vue.openBlock)(), (0, vue.createElementBlock)("div", _hoisted_56, [_cache[50] || (_cache[50] = (0, vue.createElementVNode)("span", { class: "material-icons text-red-600" }, "error", -1)), (0, vue.createElementVNode)("span", null, (0, vue.toDisplayString)(loadError.value === "not-found" ? (0, vue.unref)(t)("collectionsView.notFound") : `${(0, vue.unref)(t)("collectionsView.loadFailed")}: ${loadError.value}`), 1)])) : !collection.value ? ((0, vue.openBlock)(), (0, vue.createElementBlock)("div", _hoisted_57)) : calendarActive.value ? ((0, vue.openBlock)(), (0, vue.createElementBlock)("div", _hoisted_58, [(0, vue.createVNode)(CollectionCalendarView_default, {
|
|
5899
6096
|
schema: collection.value.schema,
|
|
5900
6097
|
items: filteredItems.value,
|
|
5901
6098
|
"anchor-field": calendarAnchorField.value,
|
|
@@ -5984,16 +6181,16 @@ var CollectionView_default = /* @__PURE__ */ (0, vue.defineComponent)({
|
|
|
5984
6181
|
"selected",
|
|
5985
6182
|
"can-create",
|
|
5986
6183
|
"show-detail"
|
|
5987
|
-
])) : (0, vue.createCommentVNode)("", true)])) : kanbanActive.value ? ((0, vue.openBlock)(), (0, vue.createElementBlock)("div",
|
|
5988
|
-
_cache[
|
|
5989
|
-
(0, vue.createElementVNode)("span",
|
|
6184
|
+
])) : (0, vue.createCommentVNode)("", true)])) : kanbanActive.value ? ((0, vue.openBlock)(), (0, vue.createElementBlock)("div", _hoisted_59, [inlineError.value ? ((0, vue.openBlock)(), (0, vue.createElementBlock)("div", _hoisted_60, [
|
|
6185
|
+
_cache[52] || (_cache[52] = (0, vue.createElementVNode)("span", { class: "material-icons text-red-600" }, "error", -1)),
|
|
6186
|
+
(0, vue.createElementVNode)("span", _hoisted_61, (0, vue.toDisplayString)((0, vue.unref)(t)("collectionsView.inlineSaveFailed", { error: inlineError.value })), 1),
|
|
5990
6187
|
(0, vue.createElementVNode)("button", {
|
|
5991
6188
|
type: "button",
|
|
5992
6189
|
class: "h-8 w-8 flex items-center justify-center rounded text-red-600 hover:bg-red-100",
|
|
5993
6190
|
"aria-label": (0, vue.unref)(t)("common.close"),
|
|
5994
6191
|
onClick: _cache[14] || (_cache[14] = ($event) => inlineError.value = null)
|
|
5995
|
-
}, [..._cache[
|
|
5996
|
-
])) : (0, vue.createCommentVNode)("", true), (0, vue.createElementVNode)("div",
|
|
6192
|
+
}, [..._cache[51] || (_cache[51] = [(0, vue.createElementVNode)("span", { class: "material-icons text-base" }, "close", -1)])], 8, _hoisted_62)
|
|
6193
|
+
])) : (0, vue.createCommentVNode)("", true), (0, vue.createElementVNode)("div", _hoisted_63, [(0, vue.createVNode)(CollectionKanbanView_default, {
|
|
5997
6194
|
schema: collection.value.schema,
|
|
5998
6195
|
items: filteredItems.value,
|
|
5999
6196
|
"group-field": kanbanGroupField.value,
|
|
@@ -6009,7 +6206,7 @@ var CollectionView_default = /* @__PURE__ */ (0, vue.defineComponent)({
|
|
|
6009
6206
|
"selected",
|
|
6010
6207
|
"notified",
|
|
6011
6208
|
"readonly"
|
|
6012
|
-
])])])) : activeCustomView.value ? ((0, vue.openBlock)(), (0, vue.createElementBlock)("div",
|
|
6209
|
+
])])])) : activeCustomView.value ? ((0, vue.openBlock)(), (0, vue.createElementBlock)("div", _hoisted_64, [activeCustomView.value.target === "mobile" ? ((0, vue.openBlock)(), (0, vue.createBlock)(CollectionRemoteViewPreview_default, {
|
|
6013
6210
|
key: 0,
|
|
6014
6211
|
slug: collection.value.slug,
|
|
6015
6212
|
view: activeCustomView.value,
|
|
@@ -6020,32 +6217,32 @@ var CollectionView_default = /* @__PURE__ */ (0, vue.defineComponent)({
|
|
|
6020
6217
|
view: activeCustomView.value,
|
|
6021
6218
|
onOpenItem: onCustomViewOpenItem,
|
|
6022
6219
|
onStartChat: onCustomViewStartChat
|
|
6023
|
-
}, null, 8, ["slug", "view"]))])) : items.value.length === 0 && editing.value?.mode !== "create" ? ((0, vue.openBlock)(), (0, vue.createElementBlock)("div",
|
|
6024
|
-
_cache[
|
|
6025
|
-
(0, vue.createElementVNode)("p",
|
|
6220
|
+
}, null, 8, ["slug", "view"]))])) : items.value.length === 0 && editing.value?.mode !== "create" ? ((0, vue.openBlock)(), (0, vue.createElementBlock)("div", _hoisted_65, [_cache[53] || (_cache[53] = (0, vue.createElementVNode)("span", { class: "material-icons text-4xl text-slate-300" }, "folder_open", -1)), (0, vue.createElementVNode)("p", _hoisted_66, (0, vue.toDisplayString)((0, vue.unref)(t)(isReadOnly.value ? "collectionsView.itemsEmptyReadonly" : "collectionsView.itemsEmpty")), 1)])) : tableFilteredItems.value.length === 0 && editing.value?.mode !== "create" ? ((0, vue.openBlock)(), (0, vue.createElementBlock)("div", _hoisted_67, [
|
|
6221
|
+
_cache[54] || (_cache[54] = (0, vue.createElementVNode)("span", { class: "material-icons text-4xl text-slate-300" }, "search_off", -1)),
|
|
6222
|
+
(0, vue.createElementVNode)("p", _hoisted_68, (0, vue.toDisplayString)((0, vue.unref)(t)("collectionsView.noMatchingItems")), 1),
|
|
6026
6223
|
(0, vue.createElementVNode)("button", {
|
|
6027
6224
|
type: "button",
|
|
6028
6225
|
class: "text-xs text-indigo-600 font-semibold hover:underline",
|
|
6029
6226
|
onClick: _cache[15] || (_cache[15] = ($event) => (searchQuery.value = "", flagFilters.value = {}))
|
|
6030
6227
|
}, (0, vue.toDisplayString)((0, vue.unref)(t)("collectionsView.clearSearch")), 1)
|
|
6031
|
-
])) : ((0, vue.openBlock)(), (0, vue.createElementBlock)("div",
|
|
6032
|
-
_cache[
|
|
6033
|
-
(0, vue.createElementVNode)("span",
|
|
6228
|
+
])) : ((0, vue.openBlock)(), (0, vue.createElementBlock)("div", _hoisted_69, [inlineError.value ? ((0, vue.openBlock)(), (0, vue.createElementBlock)("div", _hoisted_70, [
|
|
6229
|
+
_cache[56] || (_cache[56] = (0, vue.createElementVNode)("span", { class: "material-icons text-red-600" }, "error", -1)),
|
|
6230
|
+
(0, vue.createElementVNode)("span", _hoisted_71, (0, vue.toDisplayString)((0, vue.unref)(t)("collectionsView.inlineSaveFailed", { error: inlineError.value })), 1),
|
|
6034
6231
|
(0, vue.createElementVNode)("button", {
|
|
6035
6232
|
type: "button",
|
|
6036
6233
|
class: "h-8 w-8 flex items-center justify-center rounded text-red-600 hover:bg-red-100",
|
|
6037
6234
|
"aria-label": (0, vue.unref)(t)("common.close"),
|
|
6038
6235
|
onClick: _cache[16] || (_cache[16] = ($event) => inlineError.value = null)
|
|
6039
|
-
}, [..._cache[
|
|
6040
|
-
])) : (0, vue.createCommentVNode)("", true), (0, vue.createElementVNode)("table",
|
|
6236
|
+
}, [..._cache[55] || (_cache[55] = [(0, vue.createElementVNode)("span", { class: "material-icons text-base" }, "close", -1)])], 8, _hoisted_72)
|
|
6237
|
+
])) : (0, vue.createCommentVNode)("", true), (0, vue.createElementVNode)("table", _hoisted_73, [(0, vue.createElementVNode)("thead", null, [(0, vue.createElementVNode)("tr", _hoisted_74, [((0, vue.openBlock)(true), (0, vue.createElementBlock)(vue.Fragment, null, (0, vue.renderList)(listColumnFields.value, ([key, field]) => {
|
|
6041
6238
|
return (0, vue.openBlock)(), (0, vue.createElementBlock)("th", {
|
|
6042
6239
|
key,
|
|
6043
6240
|
"aria-sort": (0, vue.unref)(_mulmoclaude_core_collection.isSortableField)(field) ? sortAriaValue(key) : void 0,
|
|
6044
6241
|
class: "px-5 py-3 font-bold text-slate-500 text-left uppercase tracking-wider whitespace-nowrap"
|
|
6045
|
-
}, [(0, vue.createElementVNode)("div",
|
|
6242
|
+
}, [(0, vue.createElementVNode)("div", _hoisted_76, [(0, vue.createElementVNode)("span", {
|
|
6046
6243
|
class: "truncate max-w-[14rem]",
|
|
6047
6244
|
title: field.label
|
|
6048
|
-
}, (0, vue.toDisplayString)(field.label), 9,
|
|
6245
|
+
}, (0, vue.toDisplayString)(field.label), 9, _hoisted_77), (0, vue.unref)(_mulmoclaude_core_collection.isSortableField)(field) ? ((0, vue.openBlock)(), (0, vue.createElementBlock)("button", {
|
|
6049
6246
|
key: 0,
|
|
6050
6247
|
type: "button",
|
|
6051
6248
|
class: (0, vue.normalizeClass)(["inline-flex items-center justify-center rounded p-0.5 -my-1 leading-none transition-colors", sortButtonClass(key)]),
|
|
@@ -6054,8 +6251,8 @@ var CollectionView_default = /* @__PURE__ */ (0, vue.defineComponent)({
|
|
|
6054
6251
|
onClick: (0, vue.withModifiers)(($event) => cycleSort(key), ["stop"]),
|
|
6055
6252
|
onPointerenter: ($event) => hoveredSortKey.value = key,
|
|
6056
6253
|
onPointerleave: _cache[17] || (_cache[17] = ($event) => hoveredSortKey.value = null)
|
|
6057
|
-
}, [(0, vue.createElementVNode)("span",
|
|
6058
|
-
}), 128))])]), (0, vue.createElementVNode)("tbody",
|
|
6254
|
+
}, [(0, vue.createElementVNode)("span", _hoisted_79, (0, vue.toDisplayString)(sortIconName(key)), 1)], 42, _hoisted_78)) : (0, vue.createCommentVNode)("", true)])], 8, _hoisted_75);
|
|
6255
|
+
}), 128))])]), (0, vue.createElementVNode)("tbody", _hoisted_80, [((0, vue.openBlock)(true), (0, vue.createElementBlock)(vue.Fragment, null, (0, vue.renderList)(sortedItems.value, (item) => {
|
|
6059
6256
|
return (0, vue.openBlock)(), (0, vue.createElementBlock)("tr", {
|
|
6060
6257
|
key: String(item[collection.value.schema.primaryKey] ?? ""),
|
|
6061
6258
|
class: (0, vue.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" : ""]),
|
|
@@ -6079,7 +6276,7 @@ var CollectionView_default = /* @__PURE__ */ (0, vue.defineComponent)({
|
|
|
6079
6276
|
"aria-label": field.label,
|
|
6080
6277
|
onClick: _cache[18] || (_cache[18] = (0, vue.withModifiers)(() => {}, ["stop"])),
|
|
6081
6278
|
onChange: ($event) => commitToggle(item, field)
|
|
6082
|
-
}, null, 40,
|
|
6279
|
+
}, null, 40, _hoisted_82)) : field.type === "boolean" ? ((0, vue.openBlock)(), (0, vue.createElementBlock)("input", {
|
|
6083
6280
|
key: 1,
|
|
6084
6281
|
type: "checkbox",
|
|
6085
6282
|
checked: item[key] === true,
|
|
@@ -6089,13 +6286,13 @@ var CollectionView_default = /* @__PURE__ */ (0, vue.defineComponent)({
|
|
|
6089
6286
|
"aria-label": field.label,
|
|
6090
6287
|
onClick: _cache[19] || (_cache[19] = (0, vue.withModifiers)(() => {}, ["stop"])),
|
|
6091
6288
|
onChange: ($event) => commitInlineEdit(item, String(key), field, $event.target.checked)
|
|
6092
|
-
}, null, 40,
|
|
6289
|
+
}, null, 40, _hoisted_83)) : field.type === "flag" ? ((0, vue.openBlock)(), (0, vue.createElementBlock)("span", {
|
|
6093
6290
|
key: 2,
|
|
6094
6291
|
class: (0, vue.normalizeClass)(["material-icons text-lg align-middle", flagValueOf(String(key), item) ? "text-emerald-600" : "text-slate-300"]),
|
|
6095
6292
|
"data-testid": `collections-flag-${key}-${item[collection.value.schema.primaryKey]}`,
|
|
6096
6293
|
"aria-label": `${field.label}: ${(0, vue.unref)(t)(flagValueOf(String(key), item) ? "common.yes" : "common.no")}`,
|
|
6097
6294
|
role: "img"
|
|
6098
|
-
}, (0, vue.toDisplayString)(flagValueOf(String(key), item) ? "check_circle" : "radio_button_unchecked"), 11,
|
|
6295
|
+
}, (0, vue.toDisplayString)(flagValueOf(String(key), item) ? "check_circle" : "radio_button_unchecked"), 11, _hoisted_84)) : field.type === "ref" && field.to && typeof item[key] === "string" && item[key] ? ((0, vue.openBlock)(), (0, vue.createElementBlock)("span", _hoisted_85, [(0, vue.createElementVNode)("a", {
|
|
6099
6296
|
href: (0, vue.unref)(cui).recordHref?.(field.to, String(item[key])),
|
|
6100
6297
|
tabindex: (0, vue.unref)(cui).recordHref?.(field.to, String(item[key])) ? void 0 : 0,
|
|
6101
6298
|
role: "link",
|
|
@@ -6103,7 +6300,7 @@ var CollectionView_default = /* @__PURE__ */ (0, vue.defineComponent)({
|
|
|
6103
6300
|
"data-testid": `collections-ref-link-${key}-${item[key]}`,
|
|
6104
6301
|
onClick: ($event) => (0, vue.unref)(activateRefLink)($event, field.to, String(item[key]), true),
|
|
6105
6302
|
onKeydown: [(0, vue.withKeys)(($event) => (0, vue.unref)(activateRefLink)($event, field.to, String(item[key]), true), ["enter"]), (0, vue.withKeys)(($event) => (0, vue.unref)(activateRefLink)($event, field.to, String(item[key]), true), ["space"])]
|
|
6106
|
-
}, (0, vue.toDisplayString)((0, vue.unref)(refDisplay)(field.to, String(item[key]))), 41,
|
|
6303
|
+
}, (0, vue.toDisplayString)((0, vue.unref)(refDisplay)(field.to, String(item[key]))), 41, _hoisted_86)])) : field.type === "enum" && Array.isArray(field.values) && field.values.length > 0 ? ((0, vue.openBlock)(), (0, vue.createElementBlock)("select", {
|
|
6107
6304
|
key: 4,
|
|
6108
6305
|
value: item[key] == null ? "" : String(item[key]),
|
|
6109
6306
|
disabled: isReadOnly.value || isRowInlineSaving(item),
|
|
@@ -6112,16 +6309,16 @@ var CollectionView_default = /* @__PURE__ */ (0, vue.defineComponent)({
|
|
|
6112
6309
|
"aria-label": field.label,
|
|
6113
6310
|
onClick: _cache[20] || (_cache[20] = (0, vue.withModifiers)(() => {}, ["stop"])),
|
|
6114
6311
|
onChange: ($event) => commitInlineEdit(item, String(key), field, $event.target.value)
|
|
6115
|
-
}, [showEnumPlaceholder(item, String(key)) ? ((0, vue.openBlock)(), (0, vue.createElementBlock)("option",
|
|
6312
|
+
}, [showEnumPlaceholder(item, String(key)) ? ((0, vue.openBlock)(), (0, vue.createElementBlock)("option", _hoisted_88, (0, vue.toDisplayString)((0, vue.unref)(t)("collectionsView.selectPlaceholder")), 1)) : (0, vue.createCommentVNode)("", true), ((0, vue.openBlock)(true), (0, vue.createElementBlock)(vue.Fragment, null, (0, vue.renderList)(field.values, (value) => {
|
|
6116
6313
|
return (0, vue.openBlock)(), (0, vue.createElementBlock)("option", {
|
|
6117
6314
|
key: value,
|
|
6118
6315
|
value
|
|
6119
|
-
}, (0, vue.toDisplayString)(value), 9,
|
|
6120
|
-
}), 128))], 42,
|
|
6316
|
+
}, (0, vue.toDisplayString)(value), 9, _hoisted_89);
|
|
6317
|
+
}), 128))], 42, _hoisted_87)) : field.type === "money" ? ((0, vue.openBlock)(), (0, vue.createElementBlock)("span", _hoisted_90, (0, vue.toDisplayString)((0, vue.unref)(formatMoney)(item[key], (0, vue.unref)(resolveCurrency)(field, item), (0, vue.unref)(locale))), 1)) : field.type === "table" ? ((0, vue.openBlock)(), (0, vue.createElementBlock)("span", _hoisted_91, [_cache[57] || (_cache[57] = (0, vue.createElementVNode)("span", { class: "material-icons text-[11px]" }, "list", -1)), (0, vue.createElementVNode)("span", null, (0, vue.toDisplayString)(tableSummary(item[key])), 1)])) : field.type === "derived" ? ((0, vue.openBlock)(), (0, vue.createElementBlock)("span", _hoisted_92, (0, vue.toDisplayString)((0, vue.unref)(derivedDisplay)(field, (0, vue.unref)(evaluateDerivedAgainstItem)(field, String(key), item), item)), 1)) : field.type === "rollup" ? ((0, vue.openBlock)(), (0, vue.createElementBlock)("span", {
|
|
6121
6318
|
key: 8,
|
|
6122
6319
|
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",
|
|
6123
6320
|
"data-testid": `collections-rollup-${key}-${item[collection.value.schema.primaryKey]}`
|
|
6124
|
-
}, (0, vue.toDisplayString)((0, vue.unref)(render).rollupDisplay(field, item)), 9,
|
|
6321
|
+
}, (0, vue.toDisplayString)((0, vue.unref)(render).rollupDisplay(field, item)), 9, _hoisted_93)) : field.type !== "file" && (0, vue.unref)(isExternalUrl)(item[key]) ? ((0, vue.openBlock)(), (0, vue.createElementBlock)("a", {
|
|
6125
6322
|
key: 9,
|
|
6126
6323
|
href: String(item[key]),
|
|
6127
6324
|
target: "_blank",
|
|
@@ -6129,7 +6326,7 @@ var CollectionView_default = /* @__PURE__ */ (0, vue.defineComponent)({
|
|
|
6129
6326
|
class: "block truncate text-blue-600 hover:text-blue-800 hover:underline font-semibold",
|
|
6130
6327
|
"data-testid": `collections-url-link-${key}-${item[collection.value.schema.primaryKey]}`,
|
|
6131
6328
|
onClick: _cache[21] || (_cache[21] = (0, vue.withModifiers)(() => {}, ["stop"]))
|
|
6132
|
-
}, (0, vue.toDisplayString)(String(item[key])), 9,
|
|
6329
|
+
}, (0, vue.toDisplayString)(String(item[key])), 9, _hoisted_94)) : field.type === "file" && (0, vue.unref)(artifactUrl)(item[key]) ? ((0, vue.openBlock)(), (0, vue.createElementBlock)("a", {
|
|
6133
6330
|
key: 10,
|
|
6134
6331
|
href: (0, vue.unref)(artifactUrl)(item[key]) ?? void 0,
|
|
6135
6332
|
target: "_blank",
|
|
@@ -6137,14 +6334,14 @@ var CollectionView_default = /* @__PURE__ */ (0, vue.defineComponent)({
|
|
|
6137
6334
|
class: "block truncate text-blue-600 hover:text-blue-800 hover:underline font-semibold",
|
|
6138
6335
|
"data-testid": `collections-file-link-${key}-${item[collection.value.schema.primaryKey]}`,
|
|
6139
6336
|
onClick: _cache[22] || (_cache[22] = (0, vue.withModifiers)(() => {}, ["stop"]))
|
|
6140
|
-
}, (0, vue.toDisplayString)(String(item[key])), 9,
|
|
6337
|
+
}, (0, vue.toDisplayString)(String(item[key])), 9, _hoisted_95)) : field.type === "file" && (0, vue.unref)(fileRoutePath)(item[key]) ? ((0, vue.openBlock)(), (0, vue.createElementBlock)("a", {
|
|
6141
6338
|
key: 11,
|
|
6142
6339
|
href: (0, vue.unref)(fileRoutePath)(item[key]) ?? void 0,
|
|
6143
6340
|
class: "block truncate text-blue-600 hover:text-blue-800 hover:underline font-semibold",
|
|
6144
6341
|
"data-testid": `collections-file-link-${key}-${item[collection.value.schema.primaryKey]}`,
|
|
6145
6342
|
onClick: ($event) => (0, vue.unref)(activatePathLink)($event, (0, vue.unref)(fileRoutePath)(item[key]) ?? "", true)
|
|
6146
|
-
}, (0, vue.toDisplayString)(String(item[key])), 9,
|
|
6147
|
-
}), 128))], 42,
|
|
6343
|
+
}, (0, vue.toDisplayString)(String(item[key])), 9, _hoisted_96)) : ((0, vue.openBlock)(), (0, vue.createElementBlock)("span", _hoisted_97, (0, vue.toDisplayString)((0, vue.unref)(formatCell)(item[key], field.type)), 1))], 64)) : (0, vue.createCommentVNode)("", true)]);
|
|
6344
|
+
}), 128))], 42, _hoisted_81);
|
|
6148
6345
|
}), 128))])])]))]),
|
|
6149
6346
|
collection.value && (viewing.value || editing.value) && !(calendarActive.value && openDay.value) ? ((0, vue.openBlock)(), (0, vue.createBlock)(CollectionRecordModal_default, {
|
|
6150
6347
|
key: 4,
|
|
@@ -6228,19 +6425,19 @@ var CollectionView_default = /* @__PURE__ */ (0, vue.defineComponent)({
|
|
|
6228
6425
|
"data-testid": "collections-chat-modal",
|
|
6229
6426
|
onClick: (0, vue.withModifiers)(closeChat, ["self"]),
|
|
6230
6427
|
onKeydown: (0, vue.withKeys)(closeChat, ["esc"])
|
|
6231
|
-
}, [(0, vue.createElementVNode)("div",
|
|
6232
|
-
(0, vue.createElementVNode)("header",
|
|
6233
|
-
_cache[
|
|
6234
|
-
(0, vue.createElementVNode)("div",
|
|
6428
|
+
}, [(0, vue.createElementVNode)("div", _hoisted_98, [
|
|
6429
|
+
(0, vue.createElementVNode)("header", _hoisted_99, [
|
|
6430
|
+
_cache[59] || (_cache[59] = (0, vue.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" }, [(0, vue.createElementVNode)("span", { class: "material-icons text-lg" }, "forum")], -1)),
|
|
6431
|
+
(0, vue.createElementVNode)("div", _hoisted_100, [(0, vue.createElementVNode)("h2", _hoisted_101, (0, vue.toDisplayString)((0, vue.unref)(t)("collectionsView.chatTitle")), 1), (0, vue.createElementVNode)("span", _hoisted_102, (0, vue.toDisplayString)(collection.value.title), 1)]),
|
|
6235
6432
|
(0, vue.createElementVNode)("button", {
|
|
6236
6433
|
type: "button",
|
|
6237
6434
|
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",
|
|
6238
6435
|
"aria-label": (0, vue.unref)(t)("common.close"),
|
|
6239
6436
|
"data-testid": "collections-chat-close",
|
|
6240
6437
|
onClick: closeChat
|
|
6241
|
-
}, [..._cache[
|
|
6438
|
+
}, [..._cache[58] || (_cache[58] = [(0, vue.createElementVNode)("span", { class: "material-icons text-lg" }, "close", -1)])], 8, _hoisted_103)
|
|
6242
6439
|
]),
|
|
6243
|
-
(0, vue.createElementVNode)("div",
|
|
6440
|
+
(0, vue.createElementVNode)("div", _hoisted_104, [(0, vue.withDirectives)((0, vue.createElementVNode)("textarea", {
|
|
6244
6441
|
ref_key: "chatInputEl",
|
|
6245
6442
|
ref: chatInputEl,
|
|
6246
6443
|
"onUpdate:modelValue": _cache[27] || (_cache[27] = ($event) => chatMessage.value = $event),
|
|
@@ -6249,8 +6446,8 @@ var CollectionView_default = /* @__PURE__ */ (0, vue.defineComponent)({
|
|
|
6249
6446
|
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",
|
|
6250
6447
|
"data-testid": "collections-chat-input",
|
|
6251
6448
|
onKeydown: [(0, vue.withKeys)((0, vue.withModifiers)(submitChat, ["meta"]), ["enter"]), (0, vue.withKeys)((0, vue.withModifiers)(submitChat, ["ctrl"]), ["enter"])]
|
|
6252
|
-
}, null, 40,
|
|
6253
|
-
(0, vue.createElementVNode)("footer",
|
|
6449
|
+
}, null, 40, _hoisted_105), [[vue.vModelText, chatMessage.value]])]),
|
|
6450
|
+
(0, vue.createElementVNode)("footer", _hoisted_106, [(0, vue.createElementVNode)("button", {
|
|
6254
6451
|
type: "button",
|
|
6255
6452
|
class: "h-8 px-2.5 rounded text-xs font-bold text-slate-500 hover:bg-slate-200/50 transition-colors",
|
|
6256
6453
|
"data-testid": "collections-chat-cancel",
|
|
@@ -6261,7 +6458,7 @@ var CollectionView_default = /* @__PURE__ */ (0, vue.defineComponent)({
|
|
|
6261
6458
|
disabled: !chatMessage.value.trim(),
|
|
6262
6459
|
"data-testid": "collections-chat-send",
|
|
6263
6460
|
onClick: submitChat
|
|
6264
|
-
}, (0, vue.toDisplayString)((0, vue.unref)(t)("collectionsView.chatStart")), 9,
|
|
6461
|
+
}, (0, vue.toDisplayString)((0, vue.unref)(t)("collectionsView.chatStart")), 9, _hoisted_107)])
|
|
6265
6462
|
])], 32)) : (0, vue.createCommentVNode)("", true)
|
|
6266
6463
|
]);
|
|
6267
6464
|
};
|