@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.js
CHANGED
|
@@ -108,6 +108,11 @@ var i18n = createI18n({
|
|
|
108
108
|
derivedLabel: "Derived",
|
|
109
109
|
embedMissingTitle: "Embedded reference missing",
|
|
110
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",
|
|
111
116
|
refreshFeed: "Refresh",
|
|
112
117
|
refreshFailed: "Refresh failed: {error}",
|
|
113
118
|
refreshDispatched: "Refresh started in the background.",
|
|
@@ -261,6 +266,11 @@ var i18n = createI18n({
|
|
|
261
266
|
derivedLabel: "計算値",
|
|
262
267
|
embedMissingTitle: "埋め込み参照が見つかりません",
|
|
263
268
|
chat: "チャット",
|
|
269
|
+
related: "関連",
|
|
270
|
+
relatedEmpty: "関連するコレクションはありません",
|
|
271
|
+
relatedOut: "このコレクションからのリンク",
|
|
272
|
+
relatedIn: "このコレクションへのリンク",
|
|
273
|
+
relatedBoth: "相互にリンク",
|
|
264
274
|
refreshFeed: "更新",
|
|
265
275
|
refreshFailed: "更新に失敗しました: {error}",
|
|
266
276
|
refreshDispatched: "バックグラウンドで更新を開始しました。",
|
|
@@ -414,6 +424,11 @@ var i18n = createI18n({
|
|
|
414
424
|
derivedLabel: "派生",
|
|
415
425
|
embedMissingTitle: "缺少嵌入引用",
|
|
416
426
|
chat: "对话",
|
|
427
|
+
related: "关联",
|
|
428
|
+
relatedEmpty: "没有关联的集合",
|
|
429
|
+
relatedOut: "此集合链接到它",
|
|
430
|
+
relatedIn: "它链接到此集合",
|
|
431
|
+
relatedBoth: "双向关联",
|
|
417
432
|
refreshFeed: "刷新",
|
|
418
433
|
refreshFailed: "刷新失败:{error}",
|
|
419
434
|
refreshDispatched: "已在后台开始刷新。",
|
|
@@ -567,6 +582,11 @@ var i18n = createI18n({
|
|
|
567
582
|
derivedLabel: "파생",
|
|
568
583
|
embedMissingTitle: "임베드된 참조 없음",
|
|
569
584
|
chat: "채팅",
|
|
585
|
+
related: "관련",
|
|
586
|
+
relatedEmpty: "관련 컬렉션이 없습니다",
|
|
587
|
+
relatedOut: "이 컬렉션이 링크함",
|
|
588
|
+
relatedIn: "이 컬렉션으로 링크함",
|
|
589
|
+
relatedBoth: "양방향 링크",
|
|
570
590
|
refreshFeed: "새로고침",
|
|
571
591
|
refreshFailed: "새로고침 실패: {error}",
|
|
572
592
|
refreshDispatched: "백그라운드에서 새로고침을 시작했습니다.",
|
|
@@ -720,6 +740,11 @@ var i18n = createI18n({
|
|
|
720
740
|
derivedLabel: "Derivado",
|
|
721
741
|
embedMissingTitle: "Falta la referencia incrustada",
|
|
722
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",
|
|
723
748
|
refreshFeed: "Actualizar",
|
|
724
749
|
refreshFailed: "Error al actualizar: {error}",
|
|
725
750
|
refreshDispatched: "Actualización iniciada en segundo plano.",
|
|
@@ -873,6 +898,11 @@ var i18n = createI18n({
|
|
|
873
898
|
derivedLabel: "Derivado",
|
|
874
899
|
embedMissingTitle: "Referência incorporada ausente",
|
|
875
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",
|
|
876
906
|
refreshFeed: "Atualizar",
|
|
877
907
|
refreshFailed: "Falha ao atualizar: {error}",
|
|
878
908
|
refreshDispatched: "Atualização iniciada em segundo plano.",
|
|
@@ -1026,6 +1056,11 @@ var i18n = createI18n({
|
|
|
1026
1056
|
derivedLabel: "Calculé",
|
|
1027
1057
|
embedMissingTitle: "Référence intégrée manquante",
|
|
1028
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",
|
|
1029
1064
|
refreshFeed: "Actualiser",
|
|
1030
1065
|
refreshFailed: "Échec de l'actualisation : {error}",
|
|
1031
1066
|
refreshDispatched: "Actualisation lancée en arrière-plan.",
|
|
@@ -1179,6 +1214,11 @@ var i18n = createI18n({
|
|
|
1179
1214
|
derivedLabel: "Abgeleitet",
|
|
1180
1215
|
embedMissingTitle: "Eingebettete Referenz fehlt",
|
|
1181
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",
|
|
1182
1222
|
refreshFeed: "Aktualisieren",
|
|
1183
1223
|
refreshFailed: "Aktualisierung fehlgeschlagen: {error}",
|
|
1184
1224
|
refreshDispatched: "Aktualisierung im Hintergrund gestartet.",
|
|
@@ -4004,6 +4044,55 @@ function writeCollectionFlagFilters(slug, filters) {
|
|
|
4004
4044
|
} catch {}
|
|
4005
4045
|
}
|
|
4006
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
|
|
4007
4096
|
//#region src/vue/components/CollectionView.vue?vue&type=script&setup=true&lang.ts
|
|
4008
4097
|
var _hoisted_1$7 = { class: "h-full flex flex-col bg-slate-50/30" };
|
|
4009
4098
|
var _hoisted_2$6 = {
|
|
@@ -4029,233 +4118,253 @@ var _hoisted_9$4 = {
|
|
|
4029
4118
|
var _hoisted_10$4 = ["href"];
|
|
4030
4119
|
var _hoisted_11$4 = ["disabled"];
|
|
4031
4120
|
var _hoisted_12$4 = { class: "material-icons text-sm" };
|
|
4032
|
-
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 = [
|
|
4033
4142
|
"disabled",
|
|
4034
4143
|
"data-testid",
|
|
4035
4144
|
"onClick"
|
|
4036
4145
|
];
|
|
4037
|
-
var
|
|
4146
|
+
var _hoisted_22$3 = {
|
|
4038
4147
|
key: 0,
|
|
4039
4148
|
class: "material-icons text-sm animate-spin"
|
|
4040
4149
|
};
|
|
4041
|
-
var
|
|
4150
|
+
var _hoisted_23$2 = {
|
|
4042
4151
|
key: 1,
|
|
4043
4152
|
class: "material-icons text-sm"
|
|
4044
4153
|
};
|
|
4045
|
-
var
|
|
4046
|
-
var
|
|
4047
|
-
var
|
|
4154
|
+
var _hoisted_24$1 = ["title", "aria-label"];
|
|
4155
|
+
var _hoisted_25$1 = ["title", "aria-label"];
|
|
4156
|
+
var _hoisted_26$1 = {
|
|
4048
4157
|
key: 1,
|
|
4049
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",
|
|
4050
4159
|
"data-testid": "collections-refresh-note"
|
|
4051
4160
|
};
|
|
4052
|
-
var
|
|
4053
|
-
var
|
|
4161
|
+
var _hoisted_27$1 = { class: "flex-1" };
|
|
4162
|
+
var _hoisted_28 = {
|
|
4054
4163
|
key: 2,
|
|
4055
4164
|
class: "px-6 py-3 bg-white border-b border-slate-100 flex items-center justify-between gap-4"
|
|
4056
4165
|
};
|
|
4057
|
-
var
|
|
4166
|
+
var _hoisted_29 = {
|
|
4058
4167
|
key: 0,
|
|
4059
4168
|
class: "relative flex-1 max-w-md"
|
|
4060
4169
|
};
|
|
4061
|
-
var
|
|
4062
|
-
var
|
|
4063
|
-
var
|
|
4064
|
-
var
|
|
4065
|
-
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 = {
|
|
4066
4175
|
key: 0,
|
|
4067
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"
|
|
4068
4177
|
};
|
|
4069
|
-
var
|
|
4070
|
-
var
|
|
4178
|
+
var _hoisted_35 = ["aria-label"];
|
|
4179
|
+
var _hoisted_36 = [
|
|
4071
4180
|
"title",
|
|
4072
4181
|
"aria-label",
|
|
4073
4182
|
"aria-pressed",
|
|
4074
4183
|
"data-testid",
|
|
4075
4184
|
"onClick"
|
|
4076
4185
|
];
|
|
4077
|
-
var
|
|
4078
|
-
var
|
|
4079
|
-
var
|
|
4080
|
-
var
|
|
4081
|
-
var
|
|
4082
|
-
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 = [
|
|
4083
4192
|
"aria-pressed",
|
|
4084
4193
|
"data-testid",
|
|
4085
4194
|
"onClick"
|
|
4086
4195
|
];
|
|
4087
|
-
var
|
|
4088
|
-
var
|
|
4196
|
+
var _hoisted_43 = { class: "material-icons text-sm" };
|
|
4197
|
+
var _hoisted_44 = [
|
|
4089
4198
|
"title",
|
|
4090
4199
|
"aria-label",
|
|
4091
4200
|
"aria-expanded"
|
|
4092
4201
|
];
|
|
4093
|
-
var
|
|
4202
|
+
var _hoisted_45 = {
|
|
4094
4203
|
key: 0,
|
|
4095
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",
|
|
4096
4205
|
"data-testid": "collection-view-add-menu"
|
|
4097
4206
|
};
|
|
4098
|
-
var
|
|
4099
|
-
var
|
|
4100
|
-
var
|
|
4101
|
-
var
|
|
4102
|
-
var
|
|
4103
|
-
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 = {
|
|
4104
4213
|
key: 4,
|
|
4105
4214
|
class: "text-[10px] text-slate-400 font-bold uppercase tracking-wider select-none"
|
|
4106
4215
|
};
|
|
4107
|
-
var
|
|
4216
|
+
var _hoisted_52 = {
|
|
4108
4217
|
key: 3,
|
|
4109
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",
|
|
4110
4219
|
"data-testid": "collections-data-issues"
|
|
4111
4220
|
};
|
|
4112
|
-
var
|
|
4113
|
-
var
|
|
4114
|
-
var
|
|
4221
|
+
var _hoisted_53 = { class: "flex-1" };
|
|
4222
|
+
var _hoisted_54 = { class: "flex-1 overflow-auto" };
|
|
4223
|
+
var _hoisted_55 = {
|
|
4115
4224
|
key: 0,
|
|
4116
4225
|
class: "flex flex-col items-center justify-center py-20 text-sm text-slate-500 gap-3"
|
|
4117
4226
|
};
|
|
4118
|
-
var
|
|
4227
|
+
var _hoisted_56 = {
|
|
4119
4228
|
key: 1,
|
|
4120
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"
|
|
4121
4230
|
};
|
|
4122
|
-
var
|
|
4123
|
-
var
|
|
4231
|
+
var _hoisted_57 = { key: 2 };
|
|
4232
|
+
var _hoisted_58 = {
|
|
4124
4233
|
key: 3,
|
|
4125
4234
|
class: "p-4"
|
|
4126
4235
|
};
|
|
4127
|
-
var
|
|
4236
|
+
var _hoisted_59 = {
|
|
4128
4237
|
key: 4,
|
|
4129
4238
|
class: "h-full flex flex-col"
|
|
4130
4239
|
};
|
|
4131
|
-
var
|
|
4240
|
+
var _hoisted_60 = {
|
|
4132
4241
|
key: 0,
|
|
4133
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",
|
|
4134
4243
|
"data-testid": "collections-inline-error"
|
|
4135
4244
|
};
|
|
4136
|
-
var
|
|
4137
|
-
var
|
|
4138
|
-
var
|
|
4139
|
-
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 = {
|
|
4140
4249
|
key: 5,
|
|
4141
4250
|
class: "h-full",
|
|
4142
4251
|
"data-testid": "collection-custom-view-body"
|
|
4143
4252
|
};
|
|
4144
|
-
var
|
|
4253
|
+
var _hoisted_65 = {
|
|
4145
4254
|
key: 6,
|
|
4146
4255
|
class: "flex flex-col items-center justify-center py-20 text-sm text-slate-400 gap-2"
|
|
4147
4256
|
};
|
|
4148
|
-
var
|
|
4149
|
-
var
|
|
4257
|
+
var _hoisted_66 = { class: "font-semibold text-slate-600" };
|
|
4258
|
+
var _hoisted_67 = {
|
|
4150
4259
|
key: 7,
|
|
4151
4260
|
class: "flex flex-col items-center justify-center py-20 text-sm text-slate-400 gap-2"
|
|
4152
4261
|
};
|
|
4153
|
-
var
|
|
4154
|
-
var
|
|
4262
|
+
var _hoisted_68 = { class: "font-semibold text-slate-600" };
|
|
4263
|
+
var _hoisted_69 = {
|
|
4155
4264
|
key: 8,
|
|
4156
4265
|
class: "overflow-x-auto [container-type:inline-size]"
|
|
4157
4266
|
};
|
|
4158
|
-
var
|
|
4267
|
+
var _hoisted_70 = {
|
|
4159
4268
|
key: 0,
|
|
4160
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",
|
|
4161
4270
|
"data-testid": "collections-inline-error"
|
|
4162
4271
|
};
|
|
4163
|
-
var
|
|
4164
|
-
var
|
|
4165
|
-
var
|
|
4166
|
-
var
|
|
4167
|
-
var
|
|
4168
|
-
var
|
|
4169
|
-
var
|
|
4170
|
-
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 = [
|
|
4171
4280
|
"data-testid",
|
|
4172
4281
|
"aria-label",
|
|
4173
4282
|
"onClick",
|
|
4174
4283
|
"onPointerenter"
|
|
4175
4284
|
];
|
|
4176
|
-
var
|
|
4177
|
-
var
|
|
4178
|
-
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 = [
|
|
4179
4288
|
"aria-label",
|
|
4180
4289
|
"data-testid",
|
|
4181
4290
|
"onClick",
|
|
4182
4291
|
"onKeydown"
|
|
4183
4292
|
];
|
|
4184
|
-
var
|
|
4293
|
+
var _hoisted_82 = [
|
|
4185
4294
|
"checked",
|
|
4186
4295
|
"disabled",
|
|
4187
4296
|
"data-testid",
|
|
4188
4297
|
"aria-label",
|
|
4189
4298
|
"onChange"
|
|
4190
4299
|
];
|
|
4191
|
-
var
|
|
4300
|
+
var _hoisted_83 = [
|
|
4192
4301
|
"checked",
|
|
4193
4302
|
"disabled",
|
|
4194
4303
|
"data-testid",
|
|
4195
4304
|
"aria-label",
|
|
4196
4305
|
"onChange"
|
|
4197
4306
|
];
|
|
4198
|
-
var
|
|
4199
|
-
var
|
|
4307
|
+
var _hoisted_84 = ["data-testid", "aria-label"];
|
|
4308
|
+
var _hoisted_85 = {
|
|
4200
4309
|
key: 3,
|
|
4201
4310
|
class: "block truncate"
|
|
4202
4311
|
};
|
|
4203
|
-
var
|
|
4312
|
+
var _hoisted_86 = [
|
|
4204
4313
|
"href",
|
|
4205
4314
|
"tabindex",
|
|
4206
4315
|
"data-testid",
|
|
4207
4316
|
"onClick",
|
|
4208
4317
|
"onKeydown"
|
|
4209
4318
|
];
|
|
4210
|
-
var
|
|
4319
|
+
var _hoisted_87 = [
|
|
4211
4320
|
"value",
|
|
4212
4321
|
"disabled",
|
|
4213
4322
|
"data-testid",
|
|
4214
4323
|
"aria-label",
|
|
4215
4324
|
"onChange"
|
|
4216
4325
|
];
|
|
4217
|
-
var
|
|
4326
|
+
var _hoisted_88 = {
|
|
4218
4327
|
key: 0,
|
|
4219
4328
|
value: ""
|
|
4220
4329
|
};
|
|
4221
|
-
var
|
|
4222
|
-
var
|
|
4330
|
+
var _hoisted_89 = ["value"];
|
|
4331
|
+
var _hoisted_90 = {
|
|
4223
4332
|
key: 5,
|
|
4224
4333
|
class: "block truncate tabular-nums font-semibold text-slate-900"
|
|
4225
4334
|
};
|
|
4226
|
-
var
|
|
4335
|
+
var _hoisted_91 = {
|
|
4227
4336
|
key: 6,
|
|
4228
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"
|
|
4229
4338
|
};
|
|
4230
|
-
var
|
|
4339
|
+
var _hoisted_92 = {
|
|
4231
4340
|
key: 7,
|
|
4232
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"
|
|
4233
4342
|
};
|
|
4234
|
-
var
|
|
4235
|
-
var
|
|
4236
|
-
var
|
|
4237
|
-
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 = [
|
|
4238
4347
|
"href",
|
|
4239
4348
|
"data-testid",
|
|
4240
4349
|
"onClick"
|
|
4241
4350
|
];
|
|
4242
|
-
var
|
|
4351
|
+
var _hoisted_97 = {
|
|
4243
4352
|
key: 12,
|
|
4244
4353
|
class: "block truncate text-slate-600"
|
|
4245
4354
|
};
|
|
4246
|
-
var
|
|
4247
|
-
var
|
|
4248
|
-
var
|
|
4249
|
-
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 = {
|
|
4250
4359
|
id: "collections-chat-title",
|
|
4251
4360
|
class: "text-sm font-bold text-slate-800 uppercase tracking-wide"
|
|
4252
4361
|
};
|
|
4253
|
-
var
|
|
4254
|
-
var
|
|
4255
|
-
var
|
|
4256
|
-
var
|
|
4257
|
-
var
|
|
4258
|
-
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"];
|
|
4259
4368
|
/** `slug` / `selected` are supplied only in EMBEDDED mode (the
|
|
4260
4369
|
* `presentCollection` chat card mounts this component and drives both
|
|
4261
4370
|
* from the tool result). In standalone route mode (the
|
|
@@ -4825,6 +4934,60 @@ var CollectionView_default = /* @__PURE__ */ defineComponent({
|
|
|
4825
4934
|
function closeChat() {
|
|
4826
4935
|
chatOpen.value = false;
|
|
4827
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
|
+
}
|
|
4828
4991
|
/** Build the chat seed text for the current view.
|
|
4829
4992
|
*
|
|
4830
4993
|
* A collection IS a skill, so its slug doubles as a slash command:
|
|
@@ -5539,6 +5702,10 @@ var CollectionView_default = /* @__PURE__ */ defineComponent({
|
|
|
5539
5702
|
kanbanOverride.value = null;
|
|
5540
5703
|
addMenuOpen.value = false;
|
|
5541
5704
|
filterMenuOpen.value = false;
|
|
5705
|
+
relatedMenuOpen.value = false;
|
|
5706
|
+
relatedList.value = null;
|
|
5707
|
+
relatedFetchedSlug.value = null;
|
|
5708
|
+
relatedLoading.value = false;
|
|
5542
5709
|
sortState.value = storedSortFor(slug);
|
|
5543
5710
|
flagFilters.value = storedFlagFiltersFor(slug);
|
|
5544
5711
|
}
|
|
@@ -5590,6 +5757,7 @@ var CollectionView_default = /* @__PURE__ */ defineComponent({
|
|
|
5590
5757
|
if (refreshNoteTimer !== void 0) clearTimeout(refreshNoteTimer);
|
|
5591
5758
|
document.removeEventListener("mousedown", closeAddMenuOnOutsideClick);
|
|
5592
5759
|
document.removeEventListener("mousedown", closeFilterMenuOnOutsideClick);
|
|
5760
|
+
document.removeEventListener("mousedown", closeRelatedMenuOnOutsideClick);
|
|
5593
5761
|
});
|
|
5594
5762
|
watch([
|
|
5595
5763
|
activeView,
|
|
@@ -5662,6 +5830,35 @@ var CollectionView_default = /* @__PURE__ */ defineComponent({
|
|
|
5662
5830
|
"data-testid": "collections-chat",
|
|
5663
5831
|
onClick: openChat
|
|
5664
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),
|
|
5665
5862
|
(openBlock(true), createElementBlock(Fragment, null, renderList(collectionActions.value, (action) => {
|
|
5666
5863
|
return openBlock(), createElementBlock("button", {
|
|
5667
5864
|
key: action.id,
|
|
@@ -5670,52 +5867,52 @@ var CollectionView_default = /* @__PURE__ */ defineComponent({
|
|
|
5670
5867
|
disabled: collectionActionPending.value || isActionRunning(action.id),
|
|
5671
5868
|
"data-testid": `collections-action-${action.id}`,
|
|
5672
5869
|
onClick: ($event) => runCollectionAction(action)
|
|
5673
|
-
}, [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);
|
|
5674
5871
|
}), 128)),
|
|
5675
5872
|
canCreate.value && !calendarActive.value ? (openBlock(), createElementBlock("button", {
|
|
5676
|
-
key:
|
|
5873
|
+
key: 6,
|
|
5677
5874
|
type: "button",
|
|
5678
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",
|
|
5679
5876
|
"data-testid": "collections-add-item",
|
|
5680
5877
|
onClick: openCreate
|
|
5681
|
-
}, [_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),
|
|
5682
5879
|
canDeleteCollection.value && !embedded.value ? (openBlock(), createElementBlock("button", {
|
|
5683
|
-
key:
|
|
5880
|
+
key: 7,
|
|
5684
5881
|
type: "button",
|
|
5685
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",
|
|
5686
5883
|
title: unref(t)("collectionsView.deleteCollection"),
|
|
5687
5884
|
"aria-label": unref(t)("collectionsView.deleteCollection"),
|
|
5688
5885
|
"data-testid": "collections-delete",
|
|
5689
5886
|
onClick: confirmCollectionDelete
|
|
5690
|
-
}, [..._cache[
|
|
5887
|
+
}, [..._cache[34] || (_cache[34] = [createElementVNode("span", { class: "material-icons text-sm" }, "delete_forever", -1)])], 8, _hoisted_24$1)) : createCommentVNode("", true),
|
|
5691
5888
|
canDeleteFeed.value && !embedded.value ? (openBlock(), createElementBlock("button", {
|
|
5692
|
-
key:
|
|
5889
|
+
key: 8,
|
|
5693
5890
|
type: "button",
|
|
5694
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",
|
|
5695
5892
|
title: unref(t)("collectionsView.deleteFeed"),
|
|
5696
5893
|
"aria-label": unref(t)("collectionsView.deleteFeed"),
|
|
5697
5894
|
"data-testid": "feeds-delete",
|
|
5698
5895
|
onClick: confirmFeedDelete
|
|
5699
|
-
}, [..._cache[
|
|
5896
|
+
}, [..._cache[35] || (_cache[35] = [createElementVNode("span", { class: "material-icons text-sm" }, "delete_forever", -1)])], 8, _hoisted_25$1)) : createCommentVNode("", true)
|
|
5700
5897
|
])) : createCommentVNode("", true),
|
|
5701
|
-
refreshNote.value ? (openBlock(), createElementBlock("div",
|
|
5702
|
-
collection.value && (!__props.hideSearch && items.value.length > 0 || !__props.hideViewToggle && (hasCalendar.value || hasKanban.value || hasCustomViews.value || canAddCustomView.value)) ? (openBlock(), createElementBlock("div",
|
|
5703
|
-
_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)),
|
|
5704
5901
|
withDirectives(createElementVNode("input", {
|
|
5705
5902
|
"onUpdate:modelValue": _cache[1] || (_cache[1] = ($event) => searchQuery.value = $event),
|
|
5706
5903
|
type: "text",
|
|
5707
5904
|
placeholder: unref(t)("collectionsView.searchPlaceholder"),
|
|
5708
5905
|
"aria-label": unref(t)("collectionsView.searchPlaceholder"),
|
|
5709
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"
|
|
5710
|
-
}, null, 8,
|
|
5907
|
+
}, null, 8, _hoisted_30), [[vModelText, searchQuery.value]]),
|
|
5711
5908
|
searchQuery.value ? (openBlock(), createElementBlock("button", {
|
|
5712
5909
|
key: 0,
|
|
5713
5910
|
type: "button",
|
|
5714
5911
|
"aria-label": unref(t)("collectionsView.clearSearch"),
|
|
5715
5912
|
class: "absolute inset-y-0 right-0 flex items-center pr-2.5 text-slate-400 hover:text-slate-600",
|
|
5716
5913
|
onClick: _cache[2] || (_cache[2] = ($event) => searchQuery.value = "")
|
|
5717
|
-
}, [..._cache[
|
|
5718
|
-
])) : 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, [
|
|
5719
5916
|
activeView.value === "table" && flagChips.value.length > 0 && items.value.length > 0 ? (openBlock(), createElementBlock("div", {
|
|
5720
5917
|
key: 0,
|
|
5721
5918
|
ref_key: "filterMenuRef",
|
|
@@ -5729,13 +5926,13 @@ var CollectionView_default = /* @__PURE__ */ defineComponent({
|
|
|
5729
5926
|
"data-testid": "collections-filter-menu",
|
|
5730
5927
|
onClick: _cache[3] || (_cache[3] = ($event) => filterMenuOpen.value = !filterMenuOpen.value)
|
|
5731
5928
|
}, [
|
|
5732
|
-
_cache[
|
|
5929
|
+
_cache[39] || (_cache[39] = createElementVNode("span", {
|
|
5733
5930
|
class: "material-icons text-sm",
|
|
5734
5931
|
"aria-hidden": "true"
|
|
5735
5932
|
}, "filter_alt", -1)),
|
|
5736
5933
|
createElementVNode("span", null, toDisplayString(unref(t)("collectionsView.flagFilterButton")), 1),
|
|
5737
|
-
activeFlagFilterCount.value > 0 ? (openBlock(), createElementBlock("span",
|
|
5738
|
-
], 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", {
|
|
5739
5936
|
key: 0,
|
|
5740
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",
|
|
5741
5938
|
role: "group",
|
|
@@ -5754,8 +5951,8 @@ var CollectionView_default = /* @__PURE__ */ defineComponent({
|
|
|
5754
5951
|
}, [createElementVNode("span", {
|
|
5755
5952
|
class: normalizeClass(["material-icons text-sm", flagChipIconClass(chip.key)]),
|
|
5756
5953
|
"aria-hidden": "true"
|
|
5757
|
-
}, toDisplayString(flagChipIcon(chip.key)), 3), createElementVNode("span",
|
|
5758
|
-
}), 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),
|
|
5759
5956
|
!__props.hideViewToggle && (hasCalendar.value || hasKanban.value || hasCustomViews.value || canAddCustomView.value) ? (openBlock(), createElementBlock("div", {
|
|
5760
5957
|
key: 1,
|
|
5761
5958
|
class: "flex gap-0.5",
|
|
@@ -5768,7 +5965,7 @@ var CollectionView_default = /* @__PURE__ */ defineComponent({
|
|
|
5768
5965
|
"aria-pressed": activeView.value === "table",
|
|
5769
5966
|
"data-testid": "collection-view-toggle-table",
|
|
5770
5967
|
onClick: _cache[4] || (_cache[4] = ($event) => setView("table"))
|
|
5771
|
-
}, [_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),
|
|
5772
5969
|
hasCalendar.value ? (openBlock(), createElementBlock("button", {
|
|
5773
5970
|
key: 0,
|
|
5774
5971
|
type: "button",
|
|
@@ -5776,7 +5973,7 @@ var CollectionView_default = /* @__PURE__ */ defineComponent({
|
|
|
5776
5973
|
"aria-pressed": activeView.value === "calendar",
|
|
5777
5974
|
"data-testid": "collection-view-toggle-calendar",
|
|
5778
5975
|
onClick: _cache[5] || (_cache[5] = ($event) => setView("calendar"))
|
|
5779
|
-
}, [_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),
|
|
5780
5977
|
hasKanban.value ? (openBlock(), createElementBlock("button", {
|
|
5781
5978
|
key: 1,
|
|
5782
5979
|
type: "button",
|
|
@@ -5784,7 +5981,7 @@ var CollectionView_default = /* @__PURE__ */ defineComponent({
|
|
|
5784
5981
|
"aria-pressed": activeView.value === "kanban",
|
|
5785
5982
|
"data-testid": "collection-view-toggle-kanban",
|
|
5786
5983
|
onClick: _cache[6] || (_cache[6] = ($event) => setView("kanban"))
|
|
5787
|
-
}, [_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),
|
|
5788
5985
|
(openBlock(true), createElementBlock(Fragment, null, renderList(customViews.value, (cv) => {
|
|
5789
5986
|
return openBlock(), createElementBlock("button", {
|
|
5790
5987
|
key: cv.id,
|
|
@@ -5793,7 +5990,7 @@ var CollectionView_default = /* @__PURE__ */ defineComponent({
|
|
|
5793
5990
|
"aria-pressed": activeView.value === unref(customViewKey)(cv.id),
|
|
5794
5991
|
"data-testid": `collection-view-custom-${cv.id}`,
|
|
5795
5992
|
onClick: ($event) => setCustomView(cv.id)
|
|
5796
|
-
}, [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);
|
|
5797
5994
|
}), 128)),
|
|
5798
5995
|
canAddCustomView.value ? (openBlock(), createElementBlock("div", {
|
|
5799
5996
|
key: 2,
|
|
@@ -5808,17 +6005,17 @@ var CollectionView_default = /* @__PURE__ */ defineComponent({
|
|
|
5808
6005
|
"aria-expanded": addMenuOpen.value,
|
|
5809
6006
|
"data-testid": "collection-view-add",
|
|
5810
6007
|
onClick: onAddViewClick
|
|
5811
|
-
}, [..._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", {
|
|
5812
6009
|
type: "button",
|
|
5813
6010
|
class: "w-full h-8 px-3 flex items-center gap-2 text-xs font-bold text-slate-600 hover:bg-slate-50",
|
|
5814
6011
|
"data-testid": "collection-view-add-desktop",
|
|
5815
6012
|
onClick: _cache[7] || (_cache[7] = ($event) => addCustomView("desktop"))
|
|
5816
|
-
}, [_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", {
|
|
5817
6014
|
type: "button",
|
|
5818
6015
|
class: "w-full h-8 px-3 flex items-center gap-2 text-xs font-bold text-slate-600 hover:bg-slate-50",
|
|
5819
6016
|
"data-testid": "collection-view-add-mobile",
|
|
5820
6017
|
onClick: _cache[8] || (_cache[8] = ($event) => addCustomView("mobile"))
|
|
5821
|
-
}, [_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),
|
|
5822
6019
|
canConfigureViews.value ? (openBlock(), createElementBlock("button", {
|
|
5823
6020
|
key: 3,
|
|
5824
6021
|
type: "button",
|
|
@@ -5827,8 +6024,8 @@ var CollectionView_default = /* @__PURE__ */ defineComponent({
|
|
|
5827
6024
|
"aria-label": unref(t)("collectionsView.config.open"),
|
|
5828
6025
|
"data-testid": "collection-config-open",
|
|
5829
6026
|
onClick: _cache[9] || (_cache[9] = ($event) => configOpen.value = true)
|
|
5830
|
-
}, [..._cache[
|
|
5831
|
-
], 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),
|
|
5832
6029
|
calendarActive.value && dateFields.value.length > 1 ? (openBlock(), createElementBlock("select", {
|
|
5833
6030
|
key: 2,
|
|
5834
6031
|
value: calendarAnchorField.value,
|
|
@@ -5840,8 +6037,8 @@ var CollectionView_default = /* @__PURE__ */ defineComponent({
|
|
|
5840
6037
|
return openBlock(), createElementBlock("option", {
|
|
5841
6038
|
key,
|
|
5842
6039
|
value: key
|
|
5843
|
-
}, toDisplayString(collection.value?.schema.fields[key]?.label ?? key), 9,
|
|
5844
|
-
}), 128))], 40,
|
|
6040
|
+
}, toDisplayString(collection.value?.schema.fields[key]?.label ?? key), 9, _hoisted_48);
|
|
6041
|
+
}), 128))], 40, _hoisted_47)) : createCommentVNode("", true),
|
|
5845
6042
|
kanbanActive.value && enumFields.value.length > 1 ? (openBlock(), createElementBlock("select", {
|
|
5846
6043
|
key: 3,
|
|
5847
6044
|
value: kanbanGroupField.value,
|
|
@@ -5853,24 +6050,24 @@ var CollectionView_default = /* @__PURE__ */ defineComponent({
|
|
|
5853
6050
|
return openBlock(), createElementBlock("option", {
|
|
5854
6051
|
key,
|
|
5855
6052
|
value: key
|
|
5856
|
-
}, toDisplayString(collection.value?.schema.fields[key]?.label ?? key), 9,
|
|
5857
|
-
}), 128))], 40,
|
|
5858
|
-
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", {
|
|
5859
6056
|
shown: activeView.value === "table" ? tableFilteredItems.value.length : filteredItems.value.length,
|
|
5860
6057
|
total: items.value.length
|
|
5861
6058
|
})), 1)) : createCommentVNode("", true)
|
|
5862
6059
|
])])) : createCommentVNode("", true),
|
|
5863
|
-
collection.value && dataIssues.value.length > 0 ? (openBlock(), createElementBlock("div",
|
|
5864
|
-
_cache[
|
|
5865
|
-
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),
|
|
5866
6063
|
createElementVNode("button", {
|
|
5867
6064
|
type: "button",
|
|
5868
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",
|
|
5869
6066
|
"data-testid": "collections-repair",
|
|
5870
6067
|
onClick: repairCollection
|
|
5871
|
-
}, [_cache[
|
|
6068
|
+
}, [_cache[47] || (_cache[47] = createElementVNode("span", { class: "material-icons text-sm" }, "build", -1)), createElementVNode("span", null, toDisplayString(unref(t)("collectionsView.repair")), 1)])
|
|
5872
6069
|
])) : createCommentVNode("", true),
|
|
5873
|
-
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, {
|
|
5874
6071
|
schema: collection.value.schema,
|
|
5875
6072
|
items: filteredItems.value,
|
|
5876
6073
|
"anchor-field": calendarAnchorField.value,
|
|
@@ -5959,16 +6156,16 @@ var CollectionView_default = /* @__PURE__ */ defineComponent({
|
|
|
5959
6156
|
"selected",
|
|
5960
6157
|
"can-create",
|
|
5961
6158
|
"show-detail"
|
|
5962
|
-
])) : createCommentVNode("", true)])) : kanbanActive.value ? (openBlock(), createElementBlock("div",
|
|
5963
|
-
_cache[
|
|
5964
|
-
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),
|
|
5965
6162
|
createElementVNode("button", {
|
|
5966
6163
|
type: "button",
|
|
5967
6164
|
class: "h-8 w-8 flex items-center justify-center rounded text-red-600 hover:bg-red-100",
|
|
5968
6165
|
"aria-label": unref(t)("common.close"),
|
|
5969
6166
|
onClick: _cache[14] || (_cache[14] = ($event) => inlineError.value = null)
|
|
5970
|
-
}, [..._cache[
|
|
5971
|
-
])) : 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, {
|
|
5972
6169
|
schema: collection.value.schema,
|
|
5973
6170
|
items: filteredItems.value,
|
|
5974
6171
|
"group-field": kanbanGroupField.value,
|
|
@@ -5984,7 +6181,7 @@ var CollectionView_default = /* @__PURE__ */ defineComponent({
|
|
|
5984
6181
|
"selected",
|
|
5985
6182
|
"notified",
|
|
5986
6183
|
"readonly"
|
|
5987
|
-
])])])) : activeCustomView.value ? (openBlock(), createElementBlock("div",
|
|
6184
|
+
])])])) : activeCustomView.value ? (openBlock(), createElementBlock("div", _hoisted_64, [activeCustomView.value.target === "mobile" ? (openBlock(), createBlock(CollectionRemoteViewPreview_default, {
|
|
5988
6185
|
key: 0,
|
|
5989
6186
|
slug: collection.value.slug,
|
|
5990
6187
|
view: activeCustomView.value,
|
|
@@ -5995,32 +6192,32 @@ var CollectionView_default = /* @__PURE__ */ defineComponent({
|
|
|
5995
6192
|
view: activeCustomView.value,
|
|
5996
6193
|
onOpenItem: onCustomViewOpenItem,
|
|
5997
6194
|
onStartChat: onCustomViewStartChat
|
|
5998
|
-
}, null, 8, ["slug", "view"]))])) : items.value.length === 0 && editing.value?.mode !== "create" ? (openBlock(), createElementBlock("div",
|
|
5999
|
-
_cache[
|
|
6000
|
-
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),
|
|
6001
6198
|
createElementVNode("button", {
|
|
6002
6199
|
type: "button",
|
|
6003
6200
|
class: "text-xs text-indigo-600 font-semibold hover:underline",
|
|
6004
6201
|
onClick: _cache[15] || (_cache[15] = ($event) => (searchQuery.value = "", flagFilters.value = {}))
|
|
6005
6202
|
}, toDisplayString(unref(t)("collectionsView.clearSearch")), 1)
|
|
6006
|
-
])) : (openBlock(), createElementBlock("div",
|
|
6007
|
-
_cache[
|
|
6008
|
-
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),
|
|
6009
6206
|
createElementVNode("button", {
|
|
6010
6207
|
type: "button",
|
|
6011
6208
|
class: "h-8 w-8 flex items-center justify-center rounded text-red-600 hover:bg-red-100",
|
|
6012
6209
|
"aria-label": unref(t)("common.close"),
|
|
6013
6210
|
onClick: _cache[16] || (_cache[16] = ($event) => inlineError.value = null)
|
|
6014
|
-
}, [..._cache[
|
|
6015
|
-
])) : 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]) => {
|
|
6016
6213
|
return openBlock(), createElementBlock("th", {
|
|
6017
6214
|
key,
|
|
6018
6215
|
"aria-sort": unref(isSortableField)(field) ? sortAriaValue(key) : void 0,
|
|
6019
6216
|
class: "px-5 py-3 font-bold text-slate-500 text-left uppercase tracking-wider whitespace-nowrap"
|
|
6020
|
-
}, [createElementVNode("div",
|
|
6217
|
+
}, [createElementVNode("div", _hoisted_76, [createElementVNode("span", {
|
|
6021
6218
|
class: "truncate max-w-[14rem]",
|
|
6022
6219
|
title: field.label
|
|
6023
|
-
}, toDisplayString(field.label), 9,
|
|
6220
|
+
}, toDisplayString(field.label), 9, _hoisted_77), unref(isSortableField)(field) ? (openBlock(), createElementBlock("button", {
|
|
6024
6221
|
key: 0,
|
|
6025
6222
|
type: "button",
|
|
6026
6223
|
class: normalizeClass(["inline-flex items-center justify-center rounded p-0.5 -my-1 leading-none transition-colors", sortButtonClass(key)]),
|
|
@@ -6029,8 +6226,8 @@ var CollectionView_default = /* @__PURE__ */ defineComponent({
|
|
|
6029
6226
|
onClick: withModifiers(($event) => cycleSort(key), ["stop"]),
|
|
6030
6227
|
onPointerenter: ($event) => hoveredSortKey.value = key,
|
|
6031
6228
|
onPointerleave: _cache[17] || (_cache[17] = ($event) => hoveredSortKey.value = null)
|
|
6032
|
-
}, [createElementVNode("span",
|
|
6033
|
-
}), 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) => {
|
|
6034
6231
|
return openBlock(), createElementBlock("tr", {
|
|
6035
6232
|
key: String(item[collection.value.schema.primaryKey] ?? ""),
|
|
6036
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" : ""]),
|
|
@@ -6054,7 +6251,7 @@ var CollectionView_default = /* @__PURE__ */ defineComponent({
|
|
|
6054
6251
|
"aria-label": field.label,
|
|
6055
6252
|
onClick: _cache[18] || (_cache[18] = withModifiers(() => {}, ["stop"])),
|
|
6056
6253
|
onChange: ($event) => commitToggle(item, field)
|
|
6057
|
-
}, null, 40,
|
|
6254
|
+
}, null, 40, _hoisted_82)) : field.type === "boolean" ? (openBlock(), createElementBlock("input", {
|
|
6058
6255
|
key: 1,
|
|
6059
6256
|
type: "checkbox",
|
|
6060
6257
|
checked: item[key] === true,
|
|
@@ -6064,13 +6261,13 @@ var CollectionView_default = /* @__PURE__ */ defineComponent({
|
|
|
6064
6261
|
"aria-label": field.label,
|
|
6065
6262
|
onClick: _cache[19] || (_cache[19] = withModifiers(() => {}, ["stop"])),
|
|
6066
6263
|
onChange: ($event) => commitInlineEdit(item, String(key), field, $event.target.checked)
|
|
6067
|
-
}, null, 40,
|
|
6264
|
+
}, null, 40, _hoisted_83)) : field.type === "flag" ? (openBlock(), createElementBlock("span", {
|
|
6068
6265
|
key: 2,
|
|
6069
6266
|
class: normalizeClass(["material-icons text-lg align-middle", flagValueOf(String(key), item) ? "text-emerald-600" : "text-slate-300"]),
|
|
6070
6267
|
"data-testid": `collections-flag-${key}-${item[collection.value.schema.primaryKey]}`,
|
|
6071
6268
|
"aria-label": `${field.label}: ${unref(t)(flagValueOf(String(key), item) ? "common.yes" : "common.no")}`,
|
|
6072
6269
|
role: "img"
|
|
6073
|
-
}, 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", {
|
|
6074
6271
|
href: unref(cui).recordHref?.(field.to, String(item[key])),
|
|
6075
6272
|
tabindex: unref(cui).recordHref?.(field.to, String(item[key])) ? void 0 : 0,
|
|
6076
6273
|
role: "link",
|
|
@@ -6078,7 +6275,7 @@ var CollectionView_default = /* @__PURE__ */ defineComponent({
|
|
|
6078
6275
|
"data-testid": `collections-ref-link-${key}-${item[key]}`,
|
|
6079
6276
|
onClick: ($event) => unref(activateRefLink)($event, field.to, String(item[key]), true),
|
|
6080
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"])]
|
|
6081
|
-
}, 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", {
|
|
6082
6279
|
key: 4,
|
|
6083
6280
|
value: item[key] == null ? "" : String(item[key]),
|
|
6084
6281
|
disabled: isReadOnly.value || isRowInlineSaving(item),
|
|
@@ -6087,16 +6284,16 @@ var CollectionView_default = /* @__PURE__ */ defineComponent({
|
|
|
6087
6284
|
"aria-label": field.label,
|
|
6088
6285
|
onClick: _cache[20] || (_cache[20] = withModifiers(() => {}, ["stop"])),
|
|
6089
6286
|
onChange: ($event) => commitInlineEdit(item, String(key), field, $event.target.value)
|
|
6090
|
-
}, [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) => {
|
|
6091
6288
|
return openBlock(), createElementBlock("option", {
|
|
6092
6289
|
key: value,
|
|
6093
6290
|
value
|
|
6094
|
-
}, toDisplayString(value), 9,
|
|
6095
|
-
}), 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", {
|
|
6096
6293
|
key: 8,
|
|
6097
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",
|
|
6098
6295
|
"data-testid": `collections-rollup-${key}-${item[collection.value.schema.primaryKey]}`
|
|
6099
|
-
}, 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", {
|
|
6100
6297
|
key: 9,
|
|
6101
6298
|
href: String(item[key]),
|
|
6102
6299
|
target: "_blank",
|
|
@@ -6104,7 +6301,7 @@ var CollectionView_default = /* @__PURE__ */ defineComponent({
|
|
|
6104
6301
|
class: "block truncate text-blue-600 hover:text-blue-800 hover:underline font-semibold",
|
|
6105
6302
|
"data-testid": `collections-url-link-${key}-${item[collection.value.schema.primaryKey]}`,
|
|
6106
6303
|
onClick: _cache[21] || (_cache[21] = withModifiers(() => {}, ["stop"]))
|
|
6107
|
-
}, toDisplayString(String(item[key])), 9,
|
|
6304
|
+
}, toDisplayString(String(item[key])), 9, _hoisted_94)) : field.type === "file" && unref(artifactUrl)(item[key]) ? (openBlock(), createElementBlock("a", {
|
|
6108
6305
|
key: 10,
|
|
6109
6306
|
href: unref(artifactUrl)(item[key]) ?? void 0,
|
|
6110
6307
|
target: "_blank",
|
|
@@ -6112,14 +6309,14 @@ var CollectionView_default = /* @__PURE__ */ defineComponent({
|
|
|
6112
6309
|
class: "block truncate text-blue-600 hover:text-blue-800 hover:underline font-semibold",
|
|
6113
6310
|
"data-testid": `collections-file-link-${key}-${item[collection.value.schema.primaryKey]}`,
|
|
6114
6311
|
onClick: _cache[22] || (_cache[22] = withModifiers(() => {}, ["stop"]))
|
|
6115
|
-
}, toDisplayString(String(item[key])), 9,
|
|
6312
|
+
}, toDisplayString(String(item[key])), 9, _hoisted_95)) : field.type === "file" && unref(fileRoutePath)(item[key]) ? (openBlock(), createElementBlock("a", {
|
|
6116
6313
|
key: 11,
|
|
6117
6314
|
href: unref(fileRoutePath)(item[key]) ?? void 0,
|
|
6118
6315
|
class: "block truncate text-blue-600 hover:text-blue-800 hover:underline font-semibold",
|
|
6119
6316
|
"data-testid": `collections-file-link-${key}-${item[collection.value.schema.primaryKey]}`,
|
|
6120
6317
|
onClick: ($event) => unref(activatePathLink)($event, unref(fileRoutePath)(item[key]) ?? "", true)
|
|
6121
|
-
}, toDisplayString(String(item[key])), 9,
|
|
6122
|
-
}), 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);
|
|
6123
6320
|
}), 128))])])]))]),
|
|
6124
6321
|
collection.value && (viewing.value || editing.value) && !(calendarActive.value && openDay.value) ? (openBlock(), createBlock(CollectionRecordModal_default, {
|
|
6125
6322
|
key: 4,
|
|
@@ -6203,19 +6400,19 @@ var CollectionView_default = /* @__PURE__ */ defineComponent({
|
|
|
6203
6400
|
"data-testid": "collections-chat-modal",
|
|
6204
6401
|
onClick: withModifiers(closeChat, ["self"]),
|
|
6205
6402
|
onKeydown: withKeys(closeChat, ["esc"])
|
|
6206
|
-
}, [createElementVNode("div",
|
|
6207
|
-
createElementVNode("header",
|
|
6208
|
-
_cache[
|
|
6209
|
-
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)]),
|
|
6210
6407
|
createElementVNode("button", {
|
|
6211
6408
|
type: "button",
|
|
6212
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",
|
|
6213
6410
|
"aria-label": unref(t)("common.close"),
|
|
6214
6411
|
"data-testid": "collections-chat-close",
|
|
6215
6412
|
onClick: closeChat
|
|
6216
|
-
}, [..._cache[
|
|
6413
|
+
}, [..._cache[58] || (_cache[58] = [createElementVNode("span", { class: "material-icons text-lg" }, "close", -1)])], 8, _hoisted_103)
|
|
6217
6414
|
]),
|
|
6218
|
-
createElementVNode("div",
|
|
6415
|
+
createElementVNode("div", _hoisted_104, [withDirectives(createElementVNode("textarea", {
|
|
6219
6416
|
ref_key: "chatInputEl",
|
|
6220
6417
|
ref: chatInputEl,
|
|
6221
6418
|
"onUpdate:modelValue": _cache[27] || (_cache[27] = ($event) => chatMessage.value = $event),
|
|
@@ -6224,8 +6421,8 @@ var CollectionView_default = /* @__PURE__ */ defineComponent({
|
|
|
6224
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",
|
|
6225
6422
|
"data-testid": "collections-chat-input",
|
|
6226
6423
|
onKeydown: [withKeys(withModifiers(submitChat, ["meta"]), ["enter"]), withKeys(withModifiers(submitChat, ["ctrl"]), ["enter"])]
|
|
6227
|
-
}, null, 40,
|
|
6228
|
-
createElementVNode("footer",
|
|
6424
|
+
}, null, 40, _hoisted_105), [[vModelText, chatMessage.value]])]),
|
|
6425
|
+
createElementVNode("footer", _hoisted_106, [createElementVNode("button", {
|
|
6229
6426
|
type: "button",
|
|
6230
6427
|
class: "h-8 px-2.5 rounded text-xs font-bold text-slate-500 hover:bg-slate-200/50 transition-colors",
|
|
6231
6428
|
"data-testid": "collections-chat-cancel",
|
|
@@ -6236,7 +6433,7 @@ var CollectionView_default = /* @__PURE__ */ defineComponent({
|
|
|
6236
6433
|
disabled: !chatMessage.value.trim(),
|
|
6237
6434
|
"data-testid": "collections-chat-send",
|
|
6238
6435
|
onClick: submitChat
|
|
6239
|
-
}, toDisplayString(unref(t)("collectionsView.chatStart")), 9,
|
|
6436
|
+
}, toDisplayString(unref(t)("collectionsView.chatStart")), 9, _hoisted_107)])
|
|
6240
6437
|
])], 32)) : createCommentVNode("", true)
|
|
6241
6438
|
]);
|
|
6242
6439
|
};
|