lowlander 0.4.0 → 0.6.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.
Files changed (71) hide show
  1. package/README.md +108 -78
  2. package/build/client/client.d.ts +8 -1
  3. package/build/client/client.js +44 -22
  4. package/build/client/client.js.map +1 -1
  5. package/build/dashboard/client/crud.d.ts +16 -0
  6. package/build/dashboard/client/crud.js +525 -0
  7. package/build/dashboard/client/crud.js.map +1 -0
  8. package/build/dashboard/client/main.d.ts +1 -0
  9. package/build/dashboard/client/main.js +615 -0
  10. package/build/dashboard/client/main.js.map +1 -0
  11. package/build/dashboard/client/shim-server.d.ts +3 -0
  12. package/build/dashboard/client/shim-server.js +2 -0
  13. package/build/dashboard/client/shim-server.js.map +1 -0
  14. package/build/dashboard/dashboard.html +20 -0
  15. package/build/dashboard/index.d.ts +18 -0
  16. package/build/dashboard/index.d.ts.map +1 -0
  17. package/build/dashboard/index.js +50 -0
  18. package/build/dashboard/index.js.map +1 -0
  19. package/build/dashboard/serve.d.ts +18 -0
  20. package/build/dashboard/serve.d.ts.map +1 -0
  21. package/build/dashboard/serve.js +53 -0
  22. package/build/dashboard/serve.js.map +1 -0
  23. package/build/dashboard/server.d.ts +93 -0
  24. package/build/dashboard/server.d.ts.map +1 -0
  25. package/build/dashboard/server.js +384 -0
  26. package/build/dashboard/server.js.map +1 -0
  27. package/build/examples/helloworld/.edinburgh/commit_worker.log +4927 -0
  28. package/build/examples/helloworld/.edinburgh/data.mdb +0 -0
  29. package/build/examples/helloworld/.edinburgh/lock.mdb +0 -0
  30. package/build/examples/helloworld/client/assets/style.css +0 -45
  31. package/build/examples/helloworld/client/index.html +3 -14
  32. package/build/examples/helloworld/client/js/base.css +1 -0
  33. package/build/examples/helloworld/client/js/base.d.ts +1 -4
  34. package/build/examples/helloworld/client/js/base.js +8 -71
  35. package/build/examples/helloworld/client/js/base.js.map +1 -1
  36. package/build/examples/helloworld/server/api.d.ts +8 -2
  37. package/build/examples/helloworld/server/api.d.ts.map +1 -1
  38. package/build/examples/helloworld/server/api.js +29 -8
  39. package/build/examples/helloworld/server/api.js.map +1 -1
  40. package/build/examples/helloworld/server/main.d.ts +1 -1
  41. package/build/examples/helloworld/server/main.d.ts.map +1 -1
  42. package/build/examples/helloworld/server/main.js +6 -17
  43. package/build/examples/helloworld/server/main.js.map +1 -1
  44. package/build/server/password.d.ts +10 -0
  45. package/build/server/password.d.ts.map +1 -0
  46. package/build/server/password.js +38 -0
  47. package/build/server/password.js.map +1 -0
  48. package/build/server/server.d.ts +5 -3
  49. package/build/server/server.d.ts.map +1 -1
  50. package/build/server/server.js +65 -7
  51. package/build/server/server.js.map +1 -1
  52. package/build/server/wshandler.d.ts +7 -1
  53. package/build/server/wshandler.d.ts.map +1 -1
  54. package/build/server/wshandler.js +54 -14
  55. package/build/server/wshandler.js.map +1 -1
  56. package/build/tsconfig.client.tsbuildinfo +1 -1
  57. package/build/tsconfig.server.tsbuildinfo +1 -1
  58. package/client/client.ts +47 -24
  59. package/dashboard/build-bundle.ts +44 -0
  60. package/dashboard/client/crud.ts +634 -0
  61. package/dashboard/client/index.html +12 -0
  62. package/dashboard/client/main.ts +554 -0
  63. package/dashboard/client/shim-server.ts +5 -0
  64. package/dashboard/index.ts +49 -0
  65. package/dashboard/server.ts +399 -0
  66. package/package.json +26 -11
  67. package/server/server.ts +61 -10
  68. package/server/wshandler.ts +57 -13
  69. package/skill/SKILL.md +82 -51
  70. package/skill/getStreamTypesForModel.md +7 -0
  71. package/skill/Connection_pruneCommitIds.md +0 -8
@@ -0,0 +1,525 @@
1
+ /**
2
+ * CRUD row editor for the Lowlander dashboard.
3
+ *
4
+ * Provides openEditModal, openCreateModal, and openDeleteConfirm, each of
5
+ * which opens a Staffa modal to let the user create, edit or delete a record.
6
+ * Field editors are chosen recursively based on Edinburgh TypeInfo descriptors.
7
+ */
8
+ import A from 'aberdeen';
9
+ import S from 'staffa';
10
+ // ─── Value conversion helpers ─────────────────────────────────────────────
11
+ /**
12
+ * Convert a display-serialised value (from serializeValue on the server) into
13
+ * an editor-friendly form. The editor sends these back to the server, which
14
+ * runs parseValueFromJson to reconstruct the Edinburgh value.
15
+ */
16
+ function toEditValue(type, value) {
17
+ if (value === null || value === undefined)
18
+ return null;
19
+ switch (type.kind) {
20
+ case 'dateTime':
21
+ // ISO → datetime-local (slice to "YYYY-MM-DDTHH:MM")
22
+ if (typeof value === 'string')
23
+ return value.slice(0, 16);
24
+ return value;
25
+ case 'link':
26
+ // { __ref, pk } → just pk (server knows the type)
27
+ return value?.__ref != null ? value.pk : value;
28
+ case 'array':
29
+ case 'set':
30
+ if (!Array.isArray(value))
31
+ return [];
32
+ return value.map((v) => toEditValue(type.inner, v));
33
+ case 'record':
34
+ if (!value || typeof value !== 'object')
35
+ return {};
36
+ const out = {};
37
+ for (const [k, v] of Object.entries(value))
38
+ out[k] = toEditValue(type.innerValue, v);
39
+ return out;
40
+ case 'or':
41
+ if (type.isOptional && type.inner) {
42
+ return value === null ? null : toEditValue(type.inner, value);
43
+ }
44
+ return value;
45
+ default:
46
+ return value;
47
+ }
48
+ }
49
+ /** Default edit value for a type when creating a new record. */
50
+ function defaultEditValue(type) {
51
+ if (type.isOptional)
52
+ return null;
53
+ switch (type.kind) {
54
+ case 'string': return '';
55
+ case 'number': return 0;
56
+ case 'boolean': return false;
57
+ case 'dateTime': return new Date().toISOString().slice(0, 16);
58
+ case 'array':
59
+ case 'set': return [];
60
+ case 'record': return {};
61
+ case 'link': return null;
62
+ case 'or':
63
+ case 'literal': return null;
64
+ default: return '';
65
+ }
66
+ }
67
+ // ─── Inline field editors ─────────────────────────────────────────────────
68
+ /**
69
+ * Draw the standard Staffa field chrome (a `.s-field` wrapper with a label)
70
+ * around a caller-supplied control. Composite editors (link/collection/record/
71
+ * optional/enum) use this so their labels match Staffa's own form fields.
72
+ *
73
+ * Staffa doesn't export its internal `drawField`, but the `.s-field` CSS class
74
+ * (and its `> label` rule) is registered globally, so reusing the class gives us
75
+ * the exact same styling.
76
+ */
77
+ function drawFieldChrome(label, drawControl) {
78
+ A('div.s-field', () => {
79
+ if (label != null)
80
+ A('label', () => A('#', label));
81
+ drawControl();
82
+ });
83
+ }
84
+ /**
85
+ * Render an appropriate input widget for the given TypeInfo.
86
+ * $bind.value holds/receives the edit-format value.
87
+ */
88
+ function renderFieldEditor(type, $bind, proxy, label, readOnly = false) {
89
+ // Unwrap opt(T) → checkbox + inner editor
90
+ if (type.isOptional && type.inner) {
91
+ renderOptionalEditor(type.inner, $bind, proxy, label, readOnly);
92
+ return;
93
+ }
94
+ switch (type.kind) {
95
+ case 'string':
96
+ S.textline({ label, disabled: readOnly, bind: $bind });
97
+ return;
98
+ case 'id':
99
+ S.textline({ label, disabled: true, bind: $bind,
100
+ help: readOnly ? 'auto-generated' : undefined });
101
+ return;
102
+ case 'number':
103
+ S.textline({ label, type: 'number', disabled: readOnly, bind: $bind });
104
+ return;
105
+ case 'boolean':
106
+ S.checkbox({ label: label ?? 'Yes', disabled: readOnly, bind: $bind });
107
+ return;
108
+ case 'dateTime':
109
+ S.textline({ label, type: 'datetime-local', disabled: readOnly, bind: $bind });
110
+ return;
111
+ case 'link':
112
+ renderLinkEditor(type, $bind, proxy, label, readOnly);
113
+ return;
114
+ case 'array':
115
+ case 'set':
116
+ renderCollectionEditor(type, $bind, proxy, label, readOnly);
117
+ return;
118
+ case 'record':
119
+ renderRecordEditor(type, $bind, proxy, label, readOnly);
120
+ return;
121
+ case 'or': {
122
+ // A union of literals is an enum → render as a segmented chooser.
123
+ const choices = type.choices ?? [];
124
+ if (choices.length && choices.every(c => c.kind === 'literal')) {
125
+ renderEnumEditor(choices, $bind, label, readOnly);
126
+ return;
127
+ }
128
+ // General union: fall back to raw JSON textarea
129
+ renderJsonEditor($bind, label, readOnly);
130
+ return;
131
+ }
132
+ case 'literal':
133
+ // Read-only — show value as disabled text
134
+ S.textline({ label, disabled: true, value: type.literalValue ?? '' });
135
+ return;
136
+ default:
137
+ renderJsonEditor($bind, label, readOnly);
138
+ }
139
+ }
140
+ function renderOptionalEditor(innerType, $bind, proxy, label, readOnly = false) {
141
+ // $mode ('set' | 'undefined') tracks enabled state independently from $bind so
142
+ // the inner editor scope doesn't re-run (and lose focus) on every value change.
143
+ // Peek the initial value so the enclosing scope doesn't subscribe to it.
144
+ const initiallySet = A.peek(() => $bind.value !== null && $bind.value !== undefined);
145
+ const $mode = A.proxy({ v: initiallySet ? 'set' : 'undefined' });
146
+ // One-way sync: $mode.v → $bind.value.
147
+ // Uses A.peek to read $bind.value without subscribing (avoids circular loop).
148
+ A(() => {
149
+ if ($mode.v === 'set') {
150
+ if (A.peek(() => $bind.value) === null || A.peek(() => $bind.value) === undefined) {
151
+ $bind.value = defaultEditValue(innerType);
152
+ }
153
+ }
154
+ else {
155
+ $bind.value = null;
156
+ }
157
+ });
158
+ drawFieldChrome(label, () => {
159
+ S.buttonChooser({
160
+ attrs: readOnly ? 'pointer-events:none opacity:0.6' : undefined,
161
+ options: { set: 'set', undefined: 'undefined' },
162
+ bind: A.ref($mode, 'v'),
163
+ });
164
+ // Inner editor: depends on $mode.v, NOT on $bind.value — so typing
165
+ // in a text field inside the optional editor won't recreate the DOM.
166
+ A(() => {
167
+ if ($mode.v !== 'set')
168
+ return;
169
+ renderFieldEditor(innerType, $bind, proxy, undefined, readOnly);
170
+ });
171
+ });
172
+ }
173
+ /**
174
+ * Render a union of literal values (an enum) as a segmented buttonChooser.
175
+ * Each literal's JSON-serialised form (TypeInfo.literalValue) is used as the
176
+ * button id; the `undefined` literal becomes a "(none)" choice.
177
+ */
178
+ function renderEnumEditor(choices, $bind, label, readOnly = false) {
179
+ const idForValue = (v) => v === null || v === undefined ? 'undefined' : JSON.stringify(v);
180
+ const valueForId = (id) => id === null || id === 'undefined' ? null : JSON.parse(id);
181
+ const options = {};
182
+ let hasNone = false;
183
+ for (const c of choices) {
184
+ const id = c.literalValue ?? 'undefined';
185
+ if (id === 'undefined') {
186
+ hasNone = true;
187
+ options[id] = '(none)';
188
+ }
189
+ else
190
+ options[id] = String(valueForId(id));
191
+ }
192
+ const $sel = A.proxy({ v: idForValue(A.peek(() => $bind.value)) });
193
+ // One-way: $sel.v → $bind.value (reads $sel only, so no circular loop).
194
+ A(() => { $bind.value = valueForId($sel.v); });
195
+ drawFieldChrome(label, () => {
196
+ S.buttonChooser({
197
+ attrs: readOnly ? 'pointer-events:none opacity:0.6' : undefined,
198
+ options,
199
+ bind: A.ref($sel, 'v'),
200
+ // Without an explicit "(none)" choice, allow clearing back to null.
201
+ allowDeselect: !hasNone,
202
+ });
203
+ });
204
+ }
205
+ function renderLinkEditor(type, $bind, proxy, label, readOnly = false) {
206
+ const linkedModel = type.linkedModel;
207
+ if (!linkedModel) {
208
+ renderJsonEditor($bind, label, readOnly);
209
+ return;
210
+ }
211
+ // The autocomplete needs a real proxy Bindable holding a string. We keep a
212
+ // display proxy ($acStr) and one-way sync it back to $bind (string → pk).
213
+ const initial = A.peek(() => $bind.value);
214
+ const $acStr = A.proxy({ v: initial === null || initial === undefined ? '' : String(initial) });
215
+ // One-way: $acStr.v → $bind.value. Reads $acStr only (writes $bind), no loop.
216
+ A(() => {
217
+ const s = $acStr.v;
218
+ if (s === '') {
219
+ $bind.value = null;
220
+ }
221
+ else {
222
+ const asNum = Number(s);
223
+ $bind.value = !isNaN(asNum) && !/[^0-9.\-]/.test(s) ? asNum : s;
224
+ }
225
+ });
226
+ // Load candidate records ONCE into a stable proxy. The outer scope has no
227
+ // reactive dependencies, so findRecords runs a single time; the inner scope
228
+ // copies the rows over once the RPC resolves. (Calling findRecords directly
229
+ // inside the autocomplete's reactive options() refetched on every settle and
230
+ // never produced a stable result — hence the perpetual "No matches".)
231
+ const $opts = A.proxy({ rows: [] });
232
+ A(() => {
233
+ const result = proxy.serverProxy.findRecords(linkedModel, '(primary)', { limit: 100 });
234
+ A(() => { if (result.value)
235
+ $opts.rows = result.value.rows; });
236
+ });
237
+ S.autocomplete({
238
+ label,
239
+ disabled: readOnly,
240
+ allowCustom: false,
241
+ placeholder: `Search ${linkedModel}…`,
242
+ bind: A.ref($acStr, 'v'),
243
+ // The autocomplete filters these client-side by label as the user types.
244
+ options: () => $opts.rows.map((row) => ({
245
+ value: jsonStringify(row.pk),
246
+ label: jsonStringify(row.pk),
247
+ })),
248
+ });
249
+ }
250
+ function renderCollectionEditor(type, $bind, proxy, label, readOnly = false) {
251
+ const innerType = type.inner;
252
+ // Build the local state WITHOUT subscribing the enclosing scope. Every read
253
+ // here (the initial value, its elements, the new proxy's length) must happen
254
+ // inside A.peek — otherwise, when this editor renders inside a reactive scope
255
+ // such as S.form's content, reading $items.length would subscribe that scope
256
+ // and pushing/removing items would re-run it, wiping this local state.
257
+ const [$items, $len] = A.peek(() => {
258
+ const initVal = $bind.value;
259
+ const initArr = Array.isArray(initVal) ? initVal : [];
260
+ // Stable per-item proxies: the item editors write to $items[i].v, which
261
+ // syncs back to $bind.value via a one-way reactive block.
262
+ const items = A.proxy(initArr.map((v) => ({ v })));
263
+ // Count proxy: drives add/remove re-renders without coupling to item values.
264
+ const len = A.proxy({ v: items.length });
265
+ return [items, len];
266
+ });
267
+ // One-way sync: item proxies → $bind.value (never reads $bind.value so no loop)
268
+ A(() => { $bind.value = $items.map((item) => item.v); });
269
+ drawFieldChrome(label, () => {
270
+ A('div.s-s.raised', 'display:flex flex-direction:column gap:$2 p:$2 r:$s-radius-lg border: 1px solid $s-border;', () => {
271
+ A(() => {
272
+ const len = $len.v;
273
+ if (len === 0) {
274
+ A('span', 'fg:$s-fg-faint font-size:0.9em', '#(empty)');
275
+ }
276
+ for (let i = 0; i < len; i++) {
277
+ const idx = i;
278
+ A('div', 'display:flex gap:$2 align-items:flex-start', () => {
279
+ A('div', 'flex:1', () => {
280
+ // A.ref gives Aberdeen's bind= an actual proxy Bindable
281
+ const $item = A.ref($items[idx], 'v');
282
+ renderFieldEditor(innerType, $item, proxy, undefined, readOnly);
283
+ });
284
+ if (!readOnly) {
285
+ S.button({
286
+ text: '×',
287
+ attrs: '.outlined.danger .small flex-shrink:0 mt:$3',
288
+ click: () => {
289
+ $items.splice(idx, 1);
290
+ $len.v = $items.length;
291
+ },
292
+ });
293
+ }
294
+ });
295
+ }
296
+ });
297
+ if (!readOnly) {
298
+ S.button({
299
+ text: `+ Add ${innerType.display}`,
300
+ attrs: '.tonal .small',
301
+ click: () => {
302
+ $items.push({ v: defaultEditValue(innerType) });
303
+ $len.v = $items.length;
304
+ },
305
+ });
306
+ }
307
+ });
308
+ });
309
+ }
310
+ function renderRecordEditor(type, $bind, proxy, label, readOnly = false) {
311
+ const valueType = type.innerValue;
312
+ // Build local state without subscribing the enclosing scope (see
313
+ // renderCollectionEditor for why every read must be inside A.peek).
314
+ const [$entries, $eLen] = A.peek(() => {
315
+ const initVal = $bind.value;
316
+ const initObj = initVal && typeof initVal === 'object' && !Array.isArray(initVal) ? initVal : {};
317
+ // Stable per-entry proxies (same pattern as renderCollectionEditor).
318
+ const entries = A.proxy(Object.entries(initObj).map(([k, v]) => ({ k, v })));
319
+ const len = A.proxy({ v: entries.length });
320
+ return [entries, len];
321
+ });
322
+ // Entries with a blank key are skipped; on duplicate keys the last one wins.
323
+ A(() => {
324
+ const obj = {};
325
+ for (const e of $entries) {
326
+ if (e.k === '')
327
+ continue;
328
+ obj[e.k] = e.v;
329
+ }
330
+ $bind.value = obj;
331
+ });
332
+ drawFieldChrome(label, () => {
333
+ A('div.s-s.raised', 'display:flex flex-direction:column gap:$4 p:$2 r:$s-radius-lg border: 1px solid $s-border;', () => {
334
+ A(() => {
335
+ const len = $eLen.v;
336
+ if (len === 0)
337
+ A('span', 'fg:$s-fg-faint font-size:0.9em', '#(empty)');
338
+ for (let i = 0; i < len; i++) {
339
+ const idx = i;
340
+ A('div', 'display:flex flex-direction:column gap:$1', () => {
341
+ // Key row: key field + delete button
342
+ A('div', 'display:flex gap:$2 align-items:center', () => {
343
+ if (readOnly) {
344
+ A('code', 'flex:1 font-size:0.85em fg:$s-fg-muted', '#', A.peek(() => $entries[idx].k));
345
+ }
346
+ else {
347
+ A('div', 'flex:1', () => {
348
+ S.textline({ placeholder: 'key', bind: A.ref($entries[idx], 'k') });
349
+ });
350
+ }
351
+ if (!readOnly) {
352
+ S.button({
353
+ text: '×', attrs: '.outlined.danger .small flex-shrink:0', click: () => {
354
+ $entries.splice(idx, 1);
355
+ $eLen.v = $entries.length;
356
+ }
357
+ });
358
+ }
359
+ });
360
+ // Value row
361
+ A('div', () => {
362
+ const $item = A.ref($entries[idx], 'v');
363
+ renderFieldEditor(valueType, $item, proxy, undefined, readOnly);
364
+ });
365
+ });
366
+ }
367
+ });
368
+ if (!readOnly) {
369
+ S.button({
370
+ text: '+ Add entry',
371
+ attrs: '.tonal .small',
372
+ click: () => {
373
+ $entries.push({ k: '', v: defaultEditValue(valueType) });
374
+ $eLen.v = $entries.length;
375
+ },
376
+ });
377
+ }
378
+ });
379
+ });
380
+ }
381
+ function renderJsonEditor($bind, label, readOnly = false) {
382
+ const initial = A.peek(() => $bind.value);
383
+ const $str = A.proxy({ v: initial === undefined ? '' : jsonStringify(initial) });
384
+ const $error = A.proxy({ v: '' });
385
+ // One-way: $str.v → $bind.value. Writes $bind only, so no circular loop.
386
+ A(() => {
387
+ const s = $str.v;
388
+ if (s.trim() === '') {
389
+ $bind.value = undefined;
390
+ $error.v = '';
391
+ return;
392
+ }
393
+ try {
394
+ $bind.value = JSON.parse(s);
395
+ $error.v = '';
396
+ }
397
+ catch {
398
+ $error.v = 'Invalid JSON';
399
+ }
400
+ });
401
+ // Textarea binds to a real proxy ref; error shown in its own scope so the
402
+ // textarea is never recreated (which would lose focus on each keystroke).
403
+ S.textarea({ label, disabled: readOnly, rows: 3, bind: A.ref($str, 'v') });
404
+ A(() => {
405
+ if ($error.v)
406
+ A('div', 'fg:$s-danger font-size:0.82em mt:$1', '#', $error.v);
407
+ });
408
+ }
409
+ // ─── Public API ─────────────────────────────────────────────────────────────
410
+ function openFormDialog(proxy, header, fields, initValue, isReadOnly, submitText, onSubmit) {
411
+ const boxes = {};
412
+ for (const f of fields) {
413
+ boxes[f.name] = A.proxy({ v: initValue(f) });
414
+ }
415
+ const $status = A.proxy({ saving: false });
416
+ S.dialog({
417
+ header,
418
+ attrs: "width:800px",
419
+ content: (close) => {
420
+ S.form({
421
+ content: () => {
422
+ for (const f of fields) {
423
+ renderFieldEditor(f.type, A.ref(boxes[f.name], 'v'), proxy, f.name, isReadOnly(f));
424
+ }
425
+ },
426
+ layout: "grid",
427
+ actions: () => {
428
+ S.button({ text: 'Cancel', attrs: '.outlined.neutral', click: close });
429
+ A(() => {
430
+ S.button({
431
+ text: submitText,
432
+ type: 'button',
433
+ disabled: $status.saving,
434
+ click: async () => {
435
+ $status.saving = true;
436
+ try {
437
+ await onSubmit(boxes, close);
438
+ }
439
+ catch (err) {
440
+ S.toast({ message: err?.message ?? String(err), type: 'danger' });
441
+ }
442
+ finally {
443
+ $status.saving = false;
444
+ }
445
+ },
446
+ });
447
+ });
448
+ },
449
+ });
450
+ },
451
+ });
452
+ }
453
+ export function openCreateModal(proxy, modelName, fields, onCreated) {
454
+ const editableFields = fields.filter(f => f.type.kind !== 'id');
455
+ openFormDialog(proxy, `New ${modelName}`, editableFields, (f) => defaultEditValue(f.type), () => false, 'Create', async (boxes, close) => {
456
+ const payload = {};
457
+ for (const f of editableFields)
458
+ payload[f.name] = boxes[f.name].v;
459
+ const pk = await proxy.serverProxy.createRecord(modelName, payload).promise;
460
+ close();
461
+ onCreated?.(pk);
462
+ });
463
+ }
464
+ export function openEditModal(proxy, modelName, fields, pk, currentValues, onSaved) {
465
+ openFormDialog(proxy, `Edit ${modelName}`, fields, (f) => toEditValue(f.type, currentValues[f.name]), (f) => f.isPk, 'Save', async (boxes, close) => {
466
+ const payload = {};
467
+ for (const f of fields) {
468
+ if (!f.isPk)
469
+ payload[f.name] = boxes[f.name].v;
470
+ }
471
+ await proxy.serverProxy.updateRecord(modelName, pk, payload).promise;
472
+ close();
473
+ onSaved?.();
474
+ });
475
+ }
476
+ export function openDeleteConfirm(proxy, modelName, pk, displayLabel, onDeleted) {
477
+ const $status = A.proxy({ deleting: false, error: '' });
478
+ S.dialog({
479
+ header: `Delete ${modelName}`,
480
+ content: (close) => {
481
+ A('p', 'fg:$s-fg m:0', () => {
482
+ A('#Delete ');
483
+ A('strong', '#', displayLabel);
484
+ A('#? This cannot be undone.');
485
+ });
486
+ A(() => {
487
+ if ($status.error)
488
+ A('p', 'fg:$s-danger m:0', '#', $status.error);
489
+ });
490
+ A('div', 'display:flex gap:$2 mt:$3', () => {
491
+ S.button({
492
+ text: 'Delete',
493
+ attrs: '.danger',
494
+ disabled: A.peek(() => $status.deleting),
495
+ click: async () => {
496
+ $status.deleting = true;
497
+ $status.error = '';
498
+ try {
499
+ await proxy.serverProxy.deleteRecord(modelName, pk).promise;
500
+ close();
501
+ onDeleted?.();
502
+ }
503
+ catch (err) {
504
+ $status.error = err?.message ?? String(err);
505
+ $status.deleting = false;
506
+ }
507
+ },
508
+ });
509
+ S.button({ text: 'Cancel', attrs: '.outlined.neutral', click: close });
510
+ });
511
+ },
512
+ });
513
+ }
514
+ // ─── Helpers ─────────────────────────────────────────────────────────────────
515
+ function jsonStringify(v) {
516
+ if (typeof v === 'string')
517
+ return v;
518
+ try {
519
+ return JSON.stringify(v);
520
+ }
521
+ catch {
522
+ return String(v);
523
+ }
524
+ }
525
+ //# sourceMappingURL=crud.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"crud.js","sourceRoot":"","sources":["../../../dashboard/client/crud.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AACH,OAAO,CAAC,MAAM,UAAU,CAAC;AACzB,OAAO,CAAC,MAAM,QAAQ,CAAC;AAgBvB,6EAA6E;AAE7E;;;;GAIG;AACH,SAAS,WAAW,CAAC,IAAc,EAAE,KAAU;IAC3C,IAAI,KAAK,KAAK,IAAI,IAAI,KAAK,KAAK,SAAS;QAAE,OAAO,IAAI,CAAC;IACvD,QAAQ,IAAI,CAAC,I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