@mulmoclaude/collection-plugin 0.5.8 → 0.5.9
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/style.css +3 -250
- package/dist/vue/collectionViewMode.d.ts +1 -1
- package/dist/vue/collectionViewMode.d.ts.map +1 -1
- package/dist/vue/components/CollectionCalendarView.vue.d.ts +1 -2
- package/dist/vue/components/CollectionCalendarView.vue.d.ts.map +1 -1
- package/dist/vue/components/CollectionCustomView.vue.d.ts +1 -1
- package/dist/vue/components/CollectionCustomView.vue.d.ts.map +1 -1
- package/dist/vue/components/CollectionDayView.vue.d.ts +1 -2
- package/dist/vue/components/CollectionDayView.vue.d.ts.map +1 -1
- package/dist/vue/components/CollectionEmbedView.vue.d.ts +1 -1
- package/dist/vue/components/CollectionEmbedView.vue.d.ts.map +1 -1
- package/dist/vue/components/CollectionKanbanView.vue.d.ts +1 -2
- package/dist/vue/components/CollectionKanbanView.vue.d.ts.map +1 -1
- package/dist/vue/components/CollectionRecordPanel.vue.d.ts +5 -6
- package/dist/vue/components/CollectionRecordPanel.vue.d.ts.map +1 -1
- package/dist/vue/components/CollectionView.vue.d.ts.map +1 -1
- package/dist/vue/components/CollectionViewConfigModal.vue.d.ts +1 -1
- package/dist/vue/components/CollectionViewConfigModal.vue.d.ts.map +1 -1
- package/dist/vue/index.d.ts +1 -1
- package/dist/vue/index.d.ts.map +1 -1
- package/dist/vue/uiContext.d.ts +1 -2
- package/dist/vue/uiContext.d.ts.map +1 -1
- package/dist/vue/useCollectionRendering.d.ts +1 -2
- package/dist/vue/useCollectionRendering.d.ts.map +1 -1
- package/dist/vue.cjs +86 -66
- package/dist/vue.cjs.map +1 -1
- package/dist/vue.js +3 -4
- package/dist/vue.js.map +1 -1
- package/package.json +7 -17
- package/dist/chunk-CKQMccvm.cjs +0 -28
- package/dist/core/actionVisible.d.ts +0 -35
- package/dist/core/actionVisible.d.ts.map +0 -1
- package/dist/core/calendarGrid.d.ts +0 -121
- package/dist/core/calendarGrid.d.ts.map +0 -1
- package/dist/core/deriveAll.d.ts +0 -39
- package/dist/core/deriveAll.d.ts.map +0 -1
- package/dist/core/derivedFormula.d.ts +0 -19
- package/dist/core/derivedFormula.d.ts.map +0 -1
- package/dist/core/draft.d.ts +0 -19
- package/dist/core/draft.d.ts.map +0 -1
- package/dist/core/enumColors.d.ts +0 -34
- package/dist/core/enumColors.d.ts.map +0 -1
- package/dist/core/errorMessage.d.ts +0 -5
- package/dist/core/errorMessage.d.ts.map +0 -1
- package/dist/core/itemLabel.d.ts +0 -13
- package/dist/core/itemLabel.d.ts.map +0 -1
- package/dist/core/presentCollection.d.ts +0 -14
- package/dist/core/presentCollection.d.ts.map +0 -1
- package/dist/core/promptSafety.d.ts +0 -2
- package/dist/core/promptSafety.d.ts.map +0 -1
- package/dist/core/schema.d.ts +0 -356
- package/dist/core/schema.d.ts.map +0 -1
- package/dist/core/shortHexId.d.ts +0 -9
- package/dist/core/shortHexId.d.ts.map +0 -1
- package/dist/core/sortItems.d.ts +0 -30
- package/dist/core/sortItems.d.ts.map +0 -1
- package/dist/core/uiTypes.d.ts +0 -107
- package/dist/core/uiTypes.d.ts.map +0 -1
- package/dist/deriveAll-BHcs1erT.js +0 -342
- package/dist/deriveAll-BHcs1erT.js.map +0 -1
- package/dist/deriveAll-BJ0Lvm1Q.cjs +0 -359
- package/dist/deriveAll-BJ0Lvm1Q.cjs.map +0 -1
- package/dist/index.cjs +0 -57
- package/dist/index.d.ts +0 -15
- package/dist/index.d.ts.map +0 -1
- package/dist/index.js +0 -4
- package/dist/promptSafety-B0pPJkfQ.cjs +0 -1020
- package/dist/promptSafety-B0pPJkfQ.cjs.map +0 -1
- package/dist/promptSafety-DIQ2yDca.js +0 -739
- package/dist/promptSafety-DIQ2yDca.js.map +0 -1
- package/dist/schema-5P5ZJPrY.cjs +0 -42
- package/dist/schema-5P5ZJPrY.cjs.map +0 -1
- package/dist/schema-BcnitlL8.js +0 -25
- package/dist/schema-BcnitlL8.js.map +0 -1
- package/dist/server/atomic.d.ts +0 -2
- package/dist/server/atomic.d.ts.map +0 -1
- package/dist/server/delete.d.ts +0 -39
- package/dist/server/delete.d.ts.map +0 -1
- package/dist/server/derive.d.ts +0 -9
- package/dist/server/derive.d.ts.map +0 -1
- package/dist/server/discoveredCollection.d.ts +0 -19
- package/dist/server/discoveredCollection.d.ts.map +0 -1
- package/dist/server/discovery.d.ts +0 -228
- package/dist/server/discovery.d.ts.map +0 -1
- package/dist/server/host.d.ts +0 -78
- package/dist/server/host.d.ts.map +0 -1
- package/dist/server/index.d.ts +0 -12
- package/dist/server/index.d.ts.map +0 -1
- package/dist/server/io.d.ts +0 -115
- package/dist/server/io.d.ts.map +0 -1
- package/dist/server/paths.d.ts +0 -53
- package/dist/server/paths.d.ts.map +0 -1
- package/dist/server/spawn.d.ts +0 -56
- package/dist/server/spawn.d.ts.map +0 -1
- package/dist/server/templatePath.d.ts +0 -26
- package/dist/server/templatePath.d.ts.map +0 -1
- package/dist/server/util.d.ts +0 -4
- package/dist/server/util.d.ts.map +0 -1
- package/dist/server/validate.d.ts +0 -20
- package/dist/server/validate.d.ts.map +0 -1
- package/dist/server/views.d.ts +0 -21
- package/dist/server/views.d.ts.map +0 -1
- package/dist/server.cjs +0 -1759
- package/dist/server.cjs.map +0 -1
- package/dist/server.js +0 -1709
- package/dist/server.js.map +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"uiContext.d.ts","sourceRoot":"","sources":["../../src/vue/uiContext.ts"],"names":[],"mappings":"AASA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,KAAK,CAAC;AACrC,OAAO,KAAK,EACV,wBAAwB,EACxB,oBAAoB,EACpB,wBAAwB,EACxB,uBAAuB,EACvB,iBAAiB,EACjB,sBAAsB,
|
|
1
|
+
{"version":3,"file":"uiContext.d.ts","sourceRoot":"","sources":["../../src/vue/uiContext.ts"],"names":[],"mappings":"AASA,OAAO,KAAK,EAAE,SA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AE,IAAI,EAAE,MAAM,KAAK,IAAI,CAAC;IAClD;;;gCAG4B;IAC5B,iBAAiB,EAAE,CAAC,MAAM,EAAE,MAAM,EAAE,IAAI,CAAC,EAAE,MAAM,KAAK,IAAI,CAAC;IAC3D;mEAC+D;IAC/D,SAAS,EAAE,MAAM,MAAM,CAAC;IACxB,8EAA8E;IAC9E,aAAa,EAAE,MAAM,CAAC;IACtB,uEAAuE;IACvE,cAAc,EAAE,MAAM,CAAC;IACvB;oCACgC;IAChC,KAAK,EAAE,CAAC,IAAI,EAAE,YAAY,GAAG,MAAM,EAAE,IAAI,EAAE,MAAM,KAAK,OAAO,CAAC,OAAO,CAAC,CAAC;IACvE;kFAC8E;IAC9E,kBAAkB,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,GAAG,CAAC,MAAM,EAAE,wBAAwB,CAAC,CAAC;IAC5E;;;;;uEAKmE;IACnE,gBAAgB,CAAC,EAAE,CAAC,IAAI,EAAE,MAAM,EAAE,EAAE,EAAE,MAAM,IAAI,KAAK,MAAM,IAAI,CAAC;IAGhE;;qEAEiE;IACjE,SAAS,EAAE,SAAS,CAAC;IAGrB;;+CAE2C;IAC3C,mBAAmB,CAAC,EAAE,MAAM,MAAM,GAAG,WAAW,CAAC;CAClD;AAID,0EAA0E;AAC1E,wBAAgB,qBAAqB,CAAC,YAAY,EAAE,YAAY,GAAG,IAAI,CAEtE;AAED,wBAAgB,YAAY,IAAI,YAAY,CAK3C"}
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import { type ComputedRef, type Ref } from "vue";
|
|
2
|
-
import type { CollectionDetail, CollectionItem, CollectionSchema, CollectionFieldSpec as FieldSpec, CollectionFieldType as FieldType } from "
|
|
3
|
-
import type { EmbedCache, EmbedView, RefCache, RefOption, RefRecordCache } from "../core/uiTypes";
|
|
2
|
+
import type { CollectionDetail, CollectionItem, CollectionSchema, CollectionFieldSpec as FieldSpec, CollectionFieldType as FieldType, EmbedCache, EmbedView, RefCache, RefOption, RefRecordCache } from "@mulmoclaude/core/collection";
|
|
4
3
|
export interface CollectionRendering {
|
|
5
4
|
refCache: Ref<RefCache>;
|
|
6
5
|
refRecordCache: Ref<RefRecordCache>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useCollectionRendering.d.ts","sourceRoot":"","sources":["../../src/vue/useCollectionRendering.ts"],"names":[],"mappings":"AASA,OAAO,EAAiB,KAAK,WAAW,EAAE,KAAK,GAAG,EAAE,MAAM,KAAK,CAAC;AAGhE,OAAO,KAAK,
|
|
1
|
+
{"version":3,"file":"useCollectionRendering.d.ts","sourceRoot":"","sources":["../../src/vue/useCollectionRendering.ts"],"names":[],"mappings":"AASA,OAAO,EAAiB,KAAK,WAAW,EAAE,KAAK,GAAG,EAAE,MAAM,KAAK,CAAC;AAGhE,OAAO,KAAK,EACV,gBAAgB,EAChB,cAAc,EACd,gBAAgB,EAChB,mBAAmB,IAAI,SAAS,EAChC,mBAAmB,IAAI,SAAS,EAEhC,UAAU,EAEV,SAAS,EACT,QAAQ,EAER,SAAS,EACT,cAAc,EAEf,MAAM,8BAA8B,CAAC;AAEtC,MAAM,WAAW,mBAAmB;IAClC,QAAQ,EAAE,GAAG,CAAC,QAAQ,CAAC,CAAC;IACxB,cAAc,EAAE,GAAG,CAAC,cAAc,CAAC,CAAC;IACpC,UAAU,EAAE,GAAG,CAAC,UAAU,CAAC,CAAC;IAC5B,iBAAiB,EAAE,MAAM,IAAI,CAAC;IAC9B,qBAAqB,EAAE,CAAC,MAAM,EAAE,gBAAgB,EAAE,YAAY,EAAE,MAAM,KAAK,OAAO,CAAC,IAAI,CAAC,CAAC;IACzF,UAAU,EAAE,CAAC,UAAU,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,KAAK,MAAM,CAAC;IAC7D,UAAU,EAAE,CAAC,UAAU,EAAE,MAAM,KAAK,SAAS,EAAE,CAAC;IAChD,UAAU,EAAE,WAAW,CAAC,MAAM,CAAC,MAAM,EAAE,SAAS,CA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AC,KAAK,EAAE,SAAS,EAAE,QAAQ,EAAE,MAAM,EAAE,IAAI,EAAE,cAAc,KAAK,MAAM,GAAG,IAAI,CAAC;IACxG,cAAc,EAAE,CAAC,KAAK,EAAE,SAAS,EAAE,aAAa,EAAE,OAAO,EAAE,MAAM,EAAE,cAAc,GAAG,IAAI,KAAK,MAAM,CAAC;CACrG;AAKD,wBAAgB,gBAAgB,CAAC,IAAI,EAAE,SAAS,GAAG,MAAM,GAAG,SAAS,CAIpE;AAED,wBAAgB,sBAAsB,CAAC,UAAU,EAAE,GAAG,CAAC,gBAAgB,GAAG,IAAI,CAAC,EAAE,MAAM,EAAE,GAAG,CAAC,MAAM,CAAC,GAAG,mBAAmB,CAoRzH"}
|
package/dist/vue.cjs
CHANGED
|
@@ -1,11 +1,31 @@
|
|
|
1
1
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
2
|
+
//#region \0rolldown/runtime.js
|
|
3
|
+
var __create = Object.create;
|
|
4
|
+
var __defProp = Object.defineProperty;
|
|
5
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
6
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
7
|
+
var __getProtoOf = Object.getPrototypeOf;
|
|
8
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
9
|
+
var __copyProps = (to, from, except, desc) => {
|
|
10
|
+
if (from && typeof from === "object" || typeof from === "function") for (var keys = __getOwnPropNames(from), i = 0, n = keys.length, key; i < n; i++) {
|
|
11
|
+
key = keys[i];
|
|
12
|
+
if (!__hasOwnProp.call(to, key) && key !== except) __defProp(to, key, {
|
|
13
|
+
get: ((k) => from[k]).bind(null, key),
|
|
14
|
+
enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
|
|
15
|
+
});
|
|
16
|
+
}
|
|
17
|
+
return to;
|
|
18
|
+
};
|
|
19
|
+
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", {
|
|
20
|
+
value: mod,
|
|
21
|
+
enumerable: true
|
|
22
|
+
}) : target, mod));
|
|
23
|
+
//#endregion
|
|
24
|
+
let _mulmoclaude_core_collection = require("@mulmoclaude/core/collection");
|
|
5
25
|
let vue = require("vue");
|
|
6
26
|
let vue_i18n = require("vue-i18n");
|
|
7
27
|
let vuedraggable = require("vuedraggable");
|
|
8
|
-
vuedraggable =
|
|
28
|
+
vuedraggable = __toESM(vuedraggable, 1);
|
|
9
29
|
//#region src/vue/uiContext.ts
|
|
10
30
|
var current = null;
|
|
11
31
|
/** Wire the collection view layer to a host. Call once at app startup. */
|
|
@@ -1001,29 +1021,29 @@ var CollectionCalendarView_default = /* @__PURE__ */ (0, vue.defineComponent)({
|
|
|
1001
1021
|
const now = /* @__PURE__ */ new Date();
|
|
1002
1022
|
const viewYear = (0, vue.ref)(now.getFullYear());
|
|
1003
1023
|
const viewMonth = (0, vue.ref)(now.getMonth() + 1);
|
|
1004
|
-
const todayKey =
|
|
1024
|
+
const todayKey = (0, _mulmoclaude_core_collection.ymdKey)({
|
|
1005
1025
|
year: now.getFullYear(),
|
|
1006
1026
|
month: now.getMonth() + 1,
|
|
1007
1027
|
day: now.getDate()
|
|
1008
1028
|
});
|
|
1009
|
-
const grid = (0, vue.computed)(() =>
|
|
1010
|
-
const bucketed = (0, vue.computed)(() =>
|
|
1011
|
-
const labelField = (0, vue.computed)(() =>
|
|
1029
|
+
const grid = (0, vue.computed)(() => (0, _mulmoclaude_core_collection.buildMonthGrid)(viewYear.value, viewMonth.value));
|
|
1030
|
+
const bucketed = (0, vue.computed)(() => (0, _mulmoclaude_core_collection.bucketRecords)(props.items, props.anchorField, props.endField, props.timeField));
|
|
1031
|
+
const labelField = (0, vue.computed)(() => (0, _mulmoclaude_core_collection.labelFieldFor)(props.schema));
|
|
1012
1032
|
function colorOf(item) {
|
|
1013
|
-
return props.colorField ?
|
|
1033
|
+
return props.colorField ? (0, _mulmoclaude_core_collection.resolveEnumColor)(props.schema, props.colorField, item[props.colorField]) : null;
|
|
1014
1034
|
}
|
|
1015
1035
|
function sliceStartKey(slice) {
|
|
1016
|
-
return slice.kind === "allDay" ?
|
|
1036
|
+
return slice.kind === "allDay" ? _mulmoclaude_core_collection.MINUTES_PER_DAY + 1 : slice.startMin;
|
|
1017
1037
|
}
|
|
1018
1038
|
/** Records whose span covers a given day, ordered by start time so the month
|
|
1019
1039
|
* grid stacks chips the same way the day (time-allocation) view does. */
|
|
1020
1040
|
function recordsOnDay(day) {
|
|
1021
1041
|
return bucketed.value.spans.map((span) => ({
|
|
1022
1042
|
span,
|
|
1023
|
-
slice:
|
|
1043
|
+
slice: (0, _mulmoclaude_core_collection.daySlice)(span, day)
|
|
1024
1044
|
})).filter((pair) => pair.slice !== null).sort((left, right) => sliceStartKey(left.slice) - sliceStartKey(right.slice)).map(({ span }) => ({
|
|
1025
|
-
id:
|
|
1026
|
-
label:
|
|
1045
|
+
id: (0, _mulmoclaude_core_collection.itemIdOf)(span.item, props.schema),
|
|
1046
|
+
label: (0, _mulmoclaude_core_collection.itemLabelOf)(span.item, props.schema, labelField.value),
|
|
1027
1047
|
color: colorOf(span.item)
|
|
1028
1048
|
}));
|
|
1029
1049
|
}
|
|
@@ -1034,8 +1054,8 @@ var CollectionCalendarView_default = /* @__PURE__ */ (0, vue.defineComponent)({
|
|
|
1034
1054
|
entries: recordsOnDay(cell.ymd)
|
|
1035
1055
|
})));
|
|
1036
1056
|
const undatedEntries = (0, vue.computed)(() => bucketed.value.noDate.map((item) => ({
|
|
1037
|
-
id:
|
|
1038
|
-
label:
|
|
1057
|
+
id: (0, _mulmoclaude_core_collection.itemIdOf)(item, props.schema),
|
|
1058
|
+
label: (0, _mulmoclaude_core_collection.itemLabelOf)(item, props.schema, labelField.value),
|
|
1039
1059
|
color: colorOf(item)
|
|
1040
1060
|
})));
|
|
1041
1061
|
function chipClass(entry, uncolored) {
|
|
@@ -1228,7 +1248,7 @@ var CollectionDayView_default = /* @__PURE__ */ (0, vue.defineComponent)({
|
|
|
1228
1248
|
const PX_PER_MIN = HOUR_PX / 60;
|
|
1229
1249
|
const scrollEl = (0, vue.ref)(null);
|
|
1230
1250
|
const dialogEl = (0, vue.ref)(null);
|
|
1231
|
-
const dayKey = (0, vue.computed)(() =>
|
|
1251
|
+
const dayKey = (0, vue.computed)(() => (0, _mulmoclaude_core_collection.ymdKey)(props.day));
|
|
1232
1252
|
const dayLabel = (0, vue.computed)(() => {
|
|
1233
1253
|
try {
|
|
1234
1254
|
return new Intl.DateTimeFormat(locale.value, {
|
|
@@ -1245,7 +1265,7 @@ var CollectionDayView_default = /* @__PURE__ */ (0, vue.defineComponent)({
|
|
|
1245
1265
|
function hourLabel(hour) {
|
|
1246
1266
|
return `${String(hour).padStart(2, "0")}:00`;
|
|
1247
1267
|
}
|
|
1248
|
-
const labelField = (0, vue.computed)(() =>
|
|
1268
|
+
const labelField = (0, vue.computed)(() => (0, _mulmoclaude_core_collection.labelFieldFor)(props.schema));
|
|
1249
1269
|
const CHIP_SKIP_TYPES = new Set([
|
|
1250
1270
|
"date",
|
|
1251
1271
|
"datetime",
|
|
@@ -1269,17 +1289,17 @@ var CollectionDayView_default = /* @__PURE__ */ (0, vue.defineComponent)({
|
|
|
1269
1289
|
return out;
|
|
1270
1290
|
}
|
|
1271
1291
|
function colorOf(item) {
|
|
1272
|
-
return props.colorField ?
|
|
1292
|
+
return props.colorField ? (0, _mulmoclaude_core_collection.resolveEnumColor)(props.schema, props.colorField, item[props.colorField]) : null;
|
|
1273
1293
|
}
|
|
1274
1294
|
const dayEntries = (0, vue.computed)(() => {
|
|
1275
|
-
const { spans } =
|
|
1295
|
+
const { spans } = (0, _mulmoclaude_core_collection.bucketRecords)(props.items, props.anchorField, props.endField, props.timeField);
|
|
1276
1296
|
const entries = [];
|
|
1277
1297
|
for (const span of spans) {
|
|
1278
|
-
const slice =
|
|
1298
|
+
const slice = (0, _mulmoclaude_core_collection.daySlice)(span, props.day);
|
|
1279
1299
|
if (!slice) continue;
|
|
1280
1300
|
entries.push({
|
|
1281
|
-
id:
|
|
1282
|
-
label:
|
|
1301
|
+
id: (0, _mulmoclaude_core_collection.itemIdOf)(span.item, props.schema),
|
|
1302
|
+
label: (0, _mulmoclaude_core_collection.itemLabelOf)(span.item, props.schema, labelField.value),
|
|
1283
1303
|
secondary: secondaryFieldsOf(span.item),
|
|
1284
1304
|
color: colorOf(span.item),
|
|
1285
1305
|
slice
|
|
@@ -1290,7 +1310,7 @@ var CollectionDayView_default = /* @__PURE__ */ (0, vue.defineComponent)({
|
|
|
1290
1310
|
const allDayEntries = (0, vue.computed)(() => dayEntries.value.filter((entry) => entry.slice.kind === "allDay"));
|
|
1291
1311
|
const timedEntries = (0, vue.computed)(() => {
|
|
1292
1312
|
const timed = dayEntries.value.filter((entry) => entry.slice.kind !== "allDay");
|
|
1293
|
-
const lanes =
|
|
1313
|
+
const lanes = (0, _mulmoclaude_core_collection.assignLanes)(timed.map((entry) => ({
|
|
1294
1314
|
startMin: entry.slice.startMin,
|
|
1295
1315
|
endMin: Math.max(entry.slice.endMin, entry.slice.startMin + LANE_MIN_MINUTES)
|
|
1296
1316
|
})));
|
|
@@ -1328,8 +1348,8 @@ var CollectionDayView_default = /* @__PURE__ */ (0, vue.defineComponent)({
|
|
|
1328
1348
|
(0, vue.onMounted)(async () => {
|
|
1329
1349
|
await (0, vue.nextTick)();
|
|
1330
1350
|
dialogEl.value?.focus();
|
|
1331
|
-
const earliest = timedEntries.value.reduce((min, entry) => Math.min(min, entry.slice.startMin),
|
|
1332
|
-
if (earliest >=
|
|
1351
|
+
const earliest = timedEntries.value.reduce((min, entry) => Math.min(min, entry.slice.startMin), _mulmoclaude_core_collection.MINUTES_PER_DAY);
|
|
1352
|
+
if (earliest >= _mulmoclaude_core_collection.MINUTES_PER_DAY) return;
|
|
1333
1353
|
if (scrollEl.value) scrollEl.value.scrollTop = Math.max(0, (earliest - 60) * PX_PER_MIN);
|
|
1334
1354
|
});
|
|
1335
1355
|
return (_ctx, _cache) => {
|
|
@@ -1502,7 +1522,7 @@ var CollectionKanbanView_default = /* @__PURE__ */ (0, vue.defineComponent)({
|
|
|
1502
1522
|
const value = String(raw);
|
|
1503
1523
|
return (groupSpec.value?.values ?? []).includes(value) ? value : UNCATEGORIZED;
|
|
1504
1524
|
}
|
|
1505
|
-
const visibleItems = (0, vue.computed)(() => groupSpec.value ? props.items.filter((item) =>
|
|
1525
|
+
const visibleItems = (0, vue.computed)(() => groupSpec.value ? props.items.filter((item) => (0, _mulmoclaude_core_collection.fieldVisible)(groupSpec.value, item)) : []);
|
|
1506
1526
|
const itemsByColumnMap = (0, vue.computed)(() => {
|
|
1507
1527
|
const map = /* @__PURE__ */ new Map();
|
|
1508
1528
|
for (const column of columns.value) map.set(column.value, []);
|
|
@@ -1539,7 +1559,7 @@ var CollectionKanbanView_default = /* @__PURE__ */ (0, vue.defineComponent)({
|
|
|
1539
1559
|
key: column.value,
|
|
1540
1560
|
"data-testid": `collection-kanban-column-${column.value || "uncategorized"}`,
|
|
1541
1561
|
class: "w-72 shrink-0 flex flex-col bg-slate-100 rounded-lg"
|
|
1542
|
-
}, [(0, vue.createElementVNode)("div", _hoisted_4$8, [(0, vue.createElementVNode)("div", _hoisted_5$7, [(0, vue.createElementVNode)("span", { class: (0, vue.normalizeClass)(["w-2 h-2 rounded-full shrink-0", (0, vue.unref)(
|
|
1562
|
+
}, [(0, vue.createElementVNode)("div", _hoisted_4$8, [(0, vue.createElementVNode)("div", _hoisted_5$7, [(0, vue.createElementVNode)("span", { class: (0, vue.normalizeClass)(["w-2 h-2 rounded-full shrink-0", (0, vue.unref)(_mulmoclaude_core_collection.resolveEnumColor)(__props.schema, __props.groupField, column.value).dot]) }, null, 2), (0, vue.createElementVNode)("span", {
|
|
1543
1563
|
class: "font-semibold text-xs text-slate-600 truncate",
|
|
1544
1564
|
title: column.label
|
|
1545
1565
|
}, (0, vue.toDisplayString)(column.label), 9, _hoisted_6$6)]), (0, vue.createElementVNode)("span", _hoisted_7$6, (0, vue.toDisplayString)(itemsByColumn(column.value).length), 1)]), (0, vue.createVNode)((0, vue.unref)(vuedraggable.default), {
|
|
@@ -1994,7 +2014,7 @@ var CollectionRecordPanel_default = /* @__PURE__ */ (0, vue.defineComponent)({
|
|
|
1994
2014
|
* creating. */
|
|
1995
2015
|
function cellVisible(field) {
|
|
1996
2016
|
if (field.primary && editing.value?.mode !== "create") return false;
|
|
1997
|
-
return
|
|
2017
|
+
return (0, _mulmoclaude_core_collection.fieldVisible)(field, detailRecord.value);
|
|
1998
2018
|
}
|
|
1999
2019
|
/** Mirror of the create-mode primary-key carve-out: drop the HTML5
|
|
2000
2020
|
* `required` flag on the primary field while creating so the browser
|
|
@@ -2008,7 +2028,7 @@ var CollectionRecordPanel_default = /* @__PURE__ */ (0, vue.defineComponent)({
|
|
|
2008
2028
|
* value's colour (palette, or notification red/amber/grey when the field is
|
|
2009
2029
|
* the schema's notifyWhen target). */
|
|
2010
2030
|
function enumControlClass(fieldKey, value) {
|
|
2011
|
-
const cls =
|
|
2031
|
+
const cls = (0, _mulmoclaude_core_collection.resolveEnumColor)(props.collection.schema, fieldKey, value);
|
|
2012
2032
|
return `${cls.badge} ${cls.border}`;
|
|
2013
2033
|
}
|
|
2014
2034
|
function markBoolTouched(key) {
|
|
@@ -2020,7 +2040,7 @@ var CollectionRecordPanel_default = /* @__PURE__ */ (0, vue.defineComponent)({
|
|
|
2020
2040
|
function addTableRow(key, subFields) {
|
|
2021
2041
|
if (!editing.value) return;
|
|
2022
2042
|
const rows = editing.value.table[key] ?? [];
|
|
2023
|
-
rows.push(
|
|
2043
|
+
rows.push((0, _mulmoclaude_core_collection.emptyRow)(subFields));
|
|
2024
2044
|
editing.value.table[key] = rows;
|
|
2025
2045
|
}
|
|
2026
2046
|
function removeTableRow(key, index) {
|
|
@@ -2373,7 +2393,7 @@ var CollectionViewConfigModal_default = /* @__PURE__ */ (0, vue.defineComponent)
|
|
|
2373
2393
|
}
|
|
2374
2394
|
emit("changed");
|
|
2375
2395
|
} catch (err) {
|
|
2376
|
-
error.value =
|
|
2396
|
+
error.value = (0, _mulmoclaude_core_collection.errorMessage)(err);
|
|
2377
2397
|
} finally {
|
|
2378
2398
|
deleting.value = null;
|
|
2379
2399
|
}
|
|
@@ -2488,7 +2508,7 @@ var CollectionCustomView_vue_vue_type_script_setup_true_lang_default = /* @__PUR
|
|
|
2488
2508
|
origin: window.location.origin
|
|
2489
2509
|
});
|
|
2490
2510
|
} catch (err) {
|
|
2491
|
-
if (!stale()) error.value =
|
|
2511
|
+
if (!stale()) error.value = (0, _mulmoclaude_core_collection.errorMessage)(err);
|
|
2492
2512
|
} finally {
|
|
2493
2513
|
if (!stale()) loading.value = false;
|
|
2494
2514
|
}
|
|
@@ -2560,7 +2580,7 @@ var _plugin_vue_export_helper_default = (sfc, props) => {
|
|
|
2560
2580
|
};
|
|
2561
2581
|
//#endregion
|
|
2562
2582
|
//#region src/vue/components/CollectionCustomView.vue
|
|
2563
|
-
var CollectionCustomView_default = /* @__PURE__ */ _plugin_vue_export_helper_default(CollectionCustomView_vue_vue_type_script_setup_true_lang_default, [["__scopeId", "data-v-
|
|
2583
|
+
var CollectionCustomView_default = /* @__PURE__ */ _plugin_vue_export_helper_default(CollectionCustomView_vue_vue_type_script_setup_true_lang_default, [["__scopeId", "data-v-aa6e6c2d"]]);
|
|
2564
2584
|
//#endregion
|
|
2565
2585
|
//#region src/vue/useCollectionRendering.ts
|
|
2566
2586
|
function stepForFieldType(type) {
|
|
@@ -2609,7 +2629,7 @@ function useCollectionRendering(collection, locale) {
|
|
|
2609
2629
|
const map = {};
|
|
2610
2630
|
for (const item of detail.items) {
|
|
2611
2631
|
const slugRaw = item[schema.primaryKey];
|
|
2612
|
-
if (typeof slugRaw === "string" && slugRaw.length > 0) map[slugRaw] =
|
|
2632
|
+
if (typeof slugRaw === "string" && slugRaw.length > 0) map[slugRaw] = (0, _mulmoclaude_core_collection.deriveAll)(schema, item, {});
|
|
2613
2633
|
}
|
|
2614
2634
|
return map;
|
|
2615
2635
|
}
|
|
@@ -2784,7 +2804,7 @@ function useCollectionRendering(collection, locale) {
|
|
|
2784
2804
|
const stepFor = stepForFieldType;
|
|
2785
2805
|
function evaluateDerivedAgainstItem(field, fieldKey, item) {
|
|
2786
2806
|
if (!field.formula || !collection.value) return null;
|
|
2787
|
-
const result =
|
|
2807
|
+
const result = (0, _mulmoclaude_core_collection.deriveAll)(collection.value.schema, item, refRecordCache.value)[fieldKey];
|
|
2788
2808
|
return typeof result === "number" && Number.isFinite(result) ? result : null;
|
|
2789
2809
|
}
|
|
2790
2810
|
function derivedDisplay(field, computedValue, record) {
|
|
@@ -2814,7 +2834,7 @@ function useCollectionRendering(collection, locale) {
|
|
|
2814
2834
|
formatSubCell,
|
|
2815
2835
|
inputTypeFor,
|
|
2816
2836
|
stepFor,
|
|
2817
|
-
deriveAll:
|
|
2837
|
+
deriveAll: _mulmoclaude_core_collection.deriveAll,
|
|
2818
2838
|
evaluateDerivedAgainstItem,
|
|
2819
2839
|
derivedDisplay
|
|
2820
2840
|
};
|
|
@@ -3221,11 +3241,11 @@ var CollectionView_default = /* @__PURE__ */ (0, vue.defineComponent)({
|
|
|
3221
3241
|
* click's state; otherwise show the column's actual state. */
|
|
3222
3242
|
function effectiveSortDir(key) {
|
|
3223
3243
|
const current = sortDirectionFor(key);
|
|
3224
|
-
return hoveredSortKey.value === key ?
|
|
3244
|
+
return hoveredSortKey.value === key ? (0, _mulmoclaude_core_collection.nextSortDirection)(current) : current;
|
|
3225
3245
|
}
|
|
3226
3246
|
/** Cycle a column none → asc → desc → none; activating one clears the rest. */
|
|
3227
3247
|
function cycleSort(key) {
|
|
3228
|
-
const next =
|
|
3248
|
+
const next = (0, _mulmoclaude_core_collection.nextSortDirection)(sortDirectionFor(key));
|
|
3229
3249
|
sortState.value = next ? {
|
|
3230
3250
|
field: key,
|
|
3231
3251
|
direction: next
|
|
@@ -3246,19 +3266,19 @@ var CollectionView_default = /* @__PURE__ */ (0, vue.defineComponent)({
|
|
|
3246
3266
|
function scalarSortValue(field, raw) {
|
|
3247
3267
|
switch (field.type) {
|
|
3248
3268
|
case "number":
|
|
3249
|
-
case "money": return
|
|
3269
|
+
case "money": return (0, _mulmoclaude_core_collection.numericSortValue)(raw);
|
|
3250
3270
|
case "date":
|
|
3251
|
-
case "datetime": return
|
|
3252
|
-
case "enum": return
|
|
3253
|
-
case "boolean": return
|
|
3254
|
-
case "ref": return field.to && typeof raw === "string" && raw ?
|
|
3255
|
-
default: return
|
|
3271
|
+
case "datetime": return (0, _mulmoclaude_core_collection.dateSortValue)(raw);
|
|
3272
|
+
case "enum": return (0, _mulmoclaude_core_collection.enumSortValue)(field.values, raw);
|
|
3273
|
+
case "boolean": return (0, _mulmoclaude_core_collection.boolSortValue)(raw === true);
|
|
3274
|
+
case "ref": return field.to && typeof raw === "string" && raw ? (0, _mulmoclaude_core_collection.stringSortValue)(refDisplay(field.to, raw)) : (0, _mulmoclaude_core_collection.stringSortValue)(raw);
|
|
3275
|
+
default: return (0, _mulmoclaude_core_collection.stringSortValue)(raw);
|
|
3256
3276
|
}
|
|
3257
3277
|
}
|
|
3258
3278
|
/** Comparable value for one row under the active field. Toggle and derived
|
|
3259
3279
|
* need the whole record; every other type keys off the raw cell. */
|
|
3260
3280
|
function sortValueOf(field, key, item) {
|
|
3261
|
-
if (field.type === "toggle") return
|
|
3281
|
+
if (field.type === "toggle") return (0, _mulmoclaude_core_collection.boolSortValue)(toggleChecked(item, field));
|
|
3262
3282
|
if (field.type === "derived") return derivedSortValue(field, key, item);
|
|
3263
3283
|
return scalarSortValue(field, item[key]);
|
|
3264
3284
|
}
|
|
@@ -3266,16 +3286,16 @@ var CollectionView_default = /* @__PURE__ */ (0, vue.defineComponent)({
|
|
|
3266
3286
|
* date/datetime → epoch, anything else → the enriched value as a string. */
|
|
3267
3287
|
function derivedSortValue(field, key, item) {
|
|
3268
3288
|
const { display } = field;
|
|
3269
|
-
if (display === void 0 || display === "number" || display === "money") return
|
|
3289
|
+
if (display === void 0 || display === "number" || display === "money") return (0, _mulmoclaude_core_collection.numericSortValue)(evaluateDerivedAgainstItem(field, key, item));
|
|
3270
3290
|
const enriched = collection.value ? render.deriveAll(collection.value.schema, item, render.refRecordCache.value) : item;
|
|
3271
|
-
if (display === "date" || display === "datetime") return
|
|
3272
|
-
return
|
|
3291
|
+
if (display === "date" || display === "datetime") return (0, _mulmoclaude_core_collection.dateSortValue)(enriched[key]);
|
|
3292
|
+
return (0, _mulmoclaude_core_collection.stringSortValue)(enriched[key]);
|
|
3273
3293
|
}
|
|
3274
3294
|
const sortedItems = (0, vue.computed)(() => {
|
|
3275
3295
|
const state = sortState.value;
|
|
3276
3296
|
const field = state ? collection.value?.schema.fields[state.field] : void 0;
|
|
3277
3297
|
if (!state || !field) return filteredItems.value;
|
|
3278
|
-
return
|
|
3298
|
+
return (0, _mulmoclaude_core_collection.sortItems)(filteredItems.value, state.direction, (item) => sortValueOf(field, state.field, item));
|
|
3279
3299
|
});
|
|
3280
3300
|
/** Stringified primary-key value for a row (the row's stable identity). */
|
|
3281
3301
|
function rowId(item) {
|
|
@@ -3309,7 +3329,7 @@ var CollectionView_default = /* @__PURE__ */ (0, vue.defineComponent)({
|
|
|
3309
3329
|
function enumControlClass(fieldKey, value) {
|
|
3310
3330
|
const schema = collection.value?.schema;
|
|
3311
3331
|
if (!schema) return "";
|
|
3312
|
-
const cls =
|
|
3332
|
+
const cls = (0, _mulmoclaude_core_collection.resolveEnumColor)(schema, fieldKey, value);
|
|
3313
3333
|
return `${cls.badge} ${cls.border}`;
|
|
3314
3334
|
}
|
|
3315
3335
|
/** This row is the one open in read-only detail. */
|
|
@@ -3369,7 +3389,7 @@ var CollectionView_default = /* @__PURE__ */ (0, vue.defineComponent)({
|
|
|
3369
3389
|
function repairCollection() {
|
|
3370
3390
|
const current = collection.value;
|
|
3371
3391
|
if (!current || dataIssues.value.length === 0) return;
|
|
3372
|
-
const lines = dataIssues.value.map((issue) => `- ${
|
|
3392
|
+
const lines = dataIssues.value.map((issue) => `- ${(0, _mulmoclaude_core_collection.defangForPrompt)(issue.file)}: ${(0, _mulmoclaude_core_collection.defangForPrompt)(issue.problem)}`).join("\n");
|
|
3373
3393
|
const prompt = t("collectionsView.repairPrompt", {
|
|
3374
3394
|
title: current.title,
|
|
3375
3395
|
count: dataIssues.value.length,
|
|
@@ -3387,7 +3407,7 @@ var CollectionView_default = /* @__PURE__ */ (0, vue.defineComponent)({
|
|
|
3387
3407
|
const visibleActions = (0, vue.computed)(() => {
|
|
3388
3408
|
const record = viewing.value;
|
|
3389
3409
|
if (!record) return [];
|
|
3390
|
-
return (collection.value?.schema.actions ?? []).filter((action) =>
|
|
3410
|
+
return (collection.value?.schema.actions ?? []).filter((action) => (0, _mulmoclaude_core_collection.actionVisible)(action, record));
|
|
3391
3411
|
});
|
|
3392
3412
|
/** Run a schema-declared action on the open record: ask the server to
|
|
3393
3413
|
* assemble the seed prompt, then start a new chat in the action's
|
|
@@ -3673,8 +3693,8 @@ var CollectionView_default = /* @__PURE__ */ (0, vue.defineComponent)({
|
|
|
3673
3693
|
* candidate (the server's overwrite guard is the final backstop). */
|
|
3674
3694
|
function generateUniqueItemId(primaryKey) {
|
|
3675
3695
|
const existing = new Set(items.value.map((item) => String(item[primaryKey] ?? "")));
|
|
3676
|
-
let candidate =
|
|
3677
|
-
for (let attempt = 0; attempt < 8 && existing.has(candidate); attempt++) candidate =
|
|
3696
|
+
let candidate = (0, _mulmoclaude_core_collection.shortHexId)();
|
|
3697
|
+
for (let attempt = 0; attempt < 8 && existing.has(candidate); attempt++) candidate = (0, _mulmoclaude_core_collection.shortHexId)();
|
|
3678
3698
|
return candidate;
|
|
3679
3699
|
}
|
|
3680
3700
|
function openCreate() {
|
|
@@ -3720,7 +3740,7 @@ var CollectionView_default = /* @__PURE__ */ (0, vue.defineComponent)({
|
|
|
3720
3740
|
boolTouched[key] = false;
|
|
3721
3741
|
} else if (field.type === "table" && field.of) {
|
|
3722
3742
|
const sub = field.of;
|
|
3723
|
-
table[key] = (Array.isArray(raw) ? raw : []).filter((row) => Boolean(row) && typeof row === "object" && !Array.isArray(row)).map((row) =>
|
|
3743
|
+
table[key] = (Array.isArray(raw) ? raw : []).filter((row) => Boolean(row) && typeof row === "object" && !Array.isArray(row)).map((row) => (0, _mulmoclaude_core_collection.rowFromItem)(row, sub));
|
|
3724
3744
|
} else if (field.type !== "derived" && field.type !== "embed" && field.type !== "toggle") text[key] = raw === void 0 || raw === null ? "" : String(raw);
|
|
3725
3745
|
}
|
|
3726
3746
|
const primaryRaw = item[collection.value.schema.primaryKey];
|
|
@@ -3840,7 +3860,7 @@ var CollectionView_default = /* @__PURE__ */ (0, vue.defineComponent)({
|
|
|
3840
3860
|
* the user edits line items. */
|
|
3841
3861
|
const liveRecord = (0, vue.computed)(() => {
|
|
3842
3862
|
if (!collection.value || !editing.value) return null;
|
|
3843
|
-
return
|
|
3863
|
+
return (0, _mulmoclaude_core_collection.draftToRecord)(editing.value, collection.value.schema);
|
|
3844
3864
|
});
|
|
3845
3865
|
/** Live record with derived fields resolved (drives the form's
|
|
3846
3866
|
* read-only derived inputs). Derivation lives in the shared
|
|
@@ -3862,13 +3882,13 @@ var CollectionView_default = /* @__PURE__ */ (0, vue.defineComponent)({
|
|
|
3862
3882
|
const { slug, schema } = collection.value;
|
|
3863
3883
|
const draft = editing.value;
|
|
3864
3884
|
saveError.value = null;
|
|
3865
|
-
const missing =
|
|
3885
|
+
const missing = (0, _mulmoclaude_core_collection.firstMissingRequiredField)(draft, schema);
|
|
3866
3886
|
if (missing) {
|
|
3867
3887
|
saveError.value = `${missing}: ${t("collectionsView.requiredField")}`;
|
|
3868
3888
|
return;
|
|
3869
3889
|
}
|
|
3870
3890
|
saving.value = true;
|
|
3871
|
-
const record =
|
|
3891
|
+
const record = (0, _mulmoclaude_core_collection.draftToRecord)(draft, schema);
|
|
3872
3892
|
const result = draft.mode === "create" ? await cui.createItem(slug, record) : await cui.updateItem(slug, draft.originalId ?? "", record);
|
|
3873
3893
|
saving.value = false;
|
|
3874
3894
|
if (!result.ok) {
|
|
@@ -3903,11 +3923,11 @@ var CollectionView_default = /* @__PURE__ */ (0, vue.defineComponent)({
|
|
|
3903
3923
|
const itemId = rowId(item);
|
|
3904
3924
|
if (!itemId || inlineSavingRows.value.has(itemId)) return;
|
|
3905
3925
|
const previous = item[key];
|
|
3906
|
-
const coerced =
|
|
3926
|
+
const coerced = (0, _mulmoclaude_core_collection.coerceInlineValue)(field, raw);
|
|
3907
3927
|
applyInlineValue(item, key, coerced);
|
|
3908
3928
|
inlineError.value = null;
|
|
3909
3929
|
inlineSavingRows.value.add(itemId);
|
|
3910
|
-
const result = await cui.updateItem(slug, itemId,
|
|
3930
|
+
const result = await cui.updateItem(slug, itemId, (0, _mulmoclaude_core_collection.buildUpdatedRecord)(item, key, coerced));
|
|
3911
3931
|
inlineSavingRows.value.delete(itemId);
|
|
3912
3932
|
if (!result.ok) {
|
|
3913
3933
|
applyInlineValue(item, key, previous);
|
|
@@ -4004,7 +4024,7 @@ var CollectionView_default = /* @__PURE__ */ (0, vue.defineComponent)({
|
|
|
4004
4024
|
/** The civil day a record sits on, from its calendar anchor field (handles
|
|
4005
4025
|
* both `date` and `datetime`). Null for undated records. */
|
|
4006
4026
|
function dayOfItem(item) {
|
|
4007
|
-
return
|
|
4027
|
+
return (0, _mulmoclaude_core_collection.dateOf)(item[calendarAnchorField.value]);
|
|
4008
4028
|
}
|
|
4009
4029
|
/** Mirror the open record into the `?selected=<id>` query (standalone mode)
|
|
4010
4030
|
* so the calendar's day-view + selection is a copy-pasteable link. In-app
|
|
@@ -4493,12 +4513,12 @@ var CollectionView_default = /* @__PURE__ */ (0, vue.defineComponent)({
|
|
|
4493
4513
|
])) : (0, vue.createCommentVNode)("", true), (0, vue.createElementVNode)("table", _hoisted_54, [(0, vue.createElementVNode)("thead", null, [(0, vue.createElementVNode)("tr", _hoisted_55, [((0, vue.openBlock)(true), (0, vue.createElementBlock)(vue.Fragment, null, (0, vue.renderList)(listColumnFields.value, ([key, field]) => {
|
|
4494
4514
|
return (0, vue.openBlock)(), (0, vue.createElementBlock)("th", {
|
|
4495
4515
|
key,
|
|
4496
|
-
"aria-sort": (0, vue.unref)(
|
|
4516
|
+
"aria-sort": (0, vue.unref)(_mulmoclaude_core_collection.isSortableField)(field) ? sortAriaValue(key) : void 0,
|
|
4497
4517
|
class: "px-5 py-3 font-bold text-slate-500 text-left uppercase tracking-wider whitespace-nowrap"
|
|
4498
4518
|
}, [(0, vue.createElementVNode)("div", _hoisted_57, [(0, vue.createElementVNode)("span", {
|
|
4499
4519
|
class: "truncate max-w-[14rem]",
|
|
4500
4520
|
title: field.label
|
|
4501
|
-
}, (0, vue.toDisplayString)(field.label), 9, _hoisted_58), (0, vue.unref)(
|
|
4521
|
+
}, (0, vue.toDisplayString)(field.label), 9, _hoisted_58), (0, vue.unref)(_mulmoclaude_core_collection.isSortableField)(field) ? ((0, vue.openBlock)(), (0, vue.createElementBlock)("button", {
|
|
4502
4522
|
key: 0,
|
|
4503
4523
|
type: "button",
|
|
4504
4524
|
class: (0, vue.normalizeClass)(["inline-flex items-center justify-center rounded p-0.5 -my-1 leading-none transition-colors", sortButtonClass(key)]),
|
|
@@ -4522,7 +4542,7 @@ var CollectionView_default = /* @__PURE__ */ (0, vue.defineComponent)({
|
|
|
4522
4542
|
return (0, vue.openBlock)(), (0, vue.createElementBlock)("td", {
|
|
4523
4543
|
key,
|
|
4524
4544
|
class: "px-5 py-2 text-slate-700 align-middle max-w-xs font-medium"
|
|
4525
|
-
}, [(0, vue.unref)(
|
|
4545
|
+
}, [(0, vue.unref)(_mulmoclaude_core_collection.fieldVisible)(field, item) ? ((0, vue.openBlock)(), (0, vue.createElementBlock)(vue.Fragment, { key: 0 }, [field.type === "toggle" ? ((0, vue.openBlock)(), (0, vue.createElementBlock)("input", {
|
|
4526
4546
|
key: 0,
|
|
4527
4547
|
type: "checkbox",
|
|
4528
4548
|
checked: toggleChecked(item, field),
|
|
@@ -5112,8 +5132,8 @@ var FeedsView_default = /* @__PURE__ */ (0, vue.defineComponent)({
|
|
|
5112
5132
|
//#endregion
|
|
5113
5133
|
//#region src/vue/index.ts
|
|
5114
5134
|
var plugin = {
|
|
5115
|
-
toolDefinition:
|
|
5116
|
-
execute:
|
|
5135
|
+
toolDefinition: _mulmoclaude_core_collection.TOOL_DEFINITION,
|
|
5136
|
+
execute: _mulmoclaude_core_collection.executePresentCollection,
|
|
5117
5137
|
generatingMessage: "Loading collection...",
|
|
5118
5138
|
isEnabled: () => true,
|
|
5119
5139
|
viewComponent: View_default,
|