pgkiln 0.31.0 → 0.36.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/README.md +2 -2
- package/SECURITY.md +10 -0
- package/db/migrations/076_form_lost_update.sql +50 -0
- package/db/migrations/077_warn_unsaved.sql +41 -0
- package/db/migrations/078_url_region.sql +12 -0
- package/db/migrations/079_developer_toolbar.sql +53 -0
- package/db/migrations/080_search.sql +326 -0
- package/db/migrations/081_mail.sql +621 -0
- package/db/migrations/082_app_backups.sql +73 -0
- package/db/migrations/083_availability.sql +156 -0
- package/db/migrations/084_feedback.sql +46 -0
- package/db/migrations/085_page_behaviour.sql +65 -0
- package/db/migrations/086_data_settings.sql +599 -0
- package/db/migrations/087_login_page.sql +175 -0
- package/db/migrations/088_region_templates.sql +18 -0
- package/db/migrations/089_page_groups.sql +330 -0
- package/docs/apex-feature-parity.md +61 -39
- package/docs/guide/01-installation.md +1 -0
- package/docs/guide/03-builder.md +154 -4
- package/docs/guide/04-pages-and-regions.md +157 -3
- package/docs/guide/05-items.md +47 -0
- package/docs/guide/06-processing.md +210 -2
- package/docs/guide/07-dynamic-actions.md +60 -2
- package/docs/guide/08-security.md +56 -4
- package/docs/guide/09-reference.md +21 -0
- package/docs/guide/11-from-apex.md +9 -2
- package/docs/guide/12-development.md +40 -2
- package/docs/guide/14-globalization.md +15 -0
- package/docs/guide/15-extensions.md +1 -1
- package/docs/guide/17-mobile.md +3 -1
- package/docs/guide/18-cli.md +32 -1
- package/docs/guide/20-ai-agents.md +5 -2
- package/examples/hr/hr_50_search.sql +47 -0
- package/examples/hr/hr_51_mail.sql +70 -0
- package/examples/hr/hr_52_feedback.sql +15 -0
- package/examples/hr/hr_53_data_settings.sql +108 -0
- package/examples/hr/hr_54_region_templates.sql +67 -0
- package/examples/hr/hr_55_page_groups.sql +24 -0
- package/package.json +3 -1
- package/public/app.css +122 -3
- package/public/app.js +496 -13
- package/public/builder.css +22 -0
- package/public/builder.js +77 -0
- package/public/code-editor.css +3 -3
- package/public/sw.js +5 -3
- package/src/app.ts +10 -0
- package/src/appfiles.ts +13 -0
- package/src/automations.ts +12 -0
- package/src/builder/advisor.ts +68 -14
- package/src/builder/arrange.ts +2 -2
- package/src/builder/availability.ts +74 -0
- package/src/builder/backups.ts +134 -0
- package/src/builder/components.ts +123 -16
- package/src/builder/ddl-tools.ts +114 -0
- package/src/builder/designer.ts +35 -4
- package/src/builder/feedback.ts +82 -0
- package/src/builder/forms.ts +10 -5
- package/src/builder/home.ts +3 -0
- package/src/builder/locks.ts +15 -5
- package/src/builder/login-page.ts +82 -0
- package/src/builder/mail.ts +425 -0
- package/src/builder/newapp.ts +1 -1
- package/src/builder/region-help.ts +73 -0
- package/src/builder/region-settings.ts +19 -3
- package/src/builder/routes.ts +60 -5
- package/src/builder/search.ts +4 -4
- package/src/builder/shared.ts +3 -2
- package/src/builder/sql.ts +3 -0
- package/src/builder/ui.ts +9 -3
- package/src/cli/apps.ts +46 -5
- package/src/cli/main.ts +66 -5
- package/src/cli/mcp.ts +58 -4
- package/src/cli/replace.ts +40 -4
- package/src/ddl.ts +509 -0
- package/src/geocode.ts +44 -0
- package/src/i18n/ar.ts +56 -0
- package/src/i18n/cs.ts +56 -0
- package/src/i18n/da.ts +56 -0
- package/src/i18n/de.ts +56 -0
- package/src/i18n/el.ts +56 -0
- package/src/i18n/es.ts +56 -0
- package/src/i18n/fi.ts +56 -0
- package/src/i18n/fr.ts +56 -0
- package/src/i18n/he.ts +56 -0
- package/src/i18n/it.ts +56 -0
- package/src/i18n/ja.ts +56 -0
- package/src/i18n/ko.ts +56 -0
- package/src/i18n/nb.ts +56 -0
- package/src/i18n/pl.ts +56 -0
- package/src/i18n/pt.ts +56 -0
- package/src/i18n/ru.ts +56 -0
- package/src/i18n/sv.ts +56 -0
- package/src/i18n/tr.ts +56 -0
- package/src/i18n/uk.ts +56 -0
- package/src/i18n/zh.ts +56 -0
- package/src/i18n.ts +112 -0
- package/src/icons.ts +2 -1
- package/src/layout.ts +3 -2
- package/src/mail/mail.ts +148 -0
- package/src/mail/providers.ts +444 -0
- package/src/metadata.ts +34 -10
- package/src/runtime/ajax.ts +97 -0
- package/src/runtime/authz.ts +1 -1
- package/src/runtime/availability.ts +37 -0
- package/src/runtime/context.ts +46 -6
- package/src/runtime/data-export.ts +94 -0
- package/src/runtime/data-items.ts +194 -0
- package/src/runtime/devbar.ts +184 -0
- package/src/runtime/display-selector.ts +12 -4
- package/src/runtime/engine.ts +26 -1
- package/src/runtime/feedback.ts +128 -0
- package/src/runtime/grid.ts +170 -26
- package/src/runtime/items.ts +8 -0
- package/src/runtime/lists.ts +11 -1
- package/src/runtime/password-reset.ts +171 -0
- package/src/runtime/processes.ts +83 -2
- package/src/runtime/pwa.ts +7 -10
- package/src/runtime/regions.ts +41 -0
- package/src/runtime/render.ts +48 -7
- package/src/runtime/report-views.ts +4 -2
- package/src/runtime/report.ts +36 -22
- package/src/runtime/rest.ts +4 -0
- package/src/runtime/routes.ts +94 -37
- package/src/runtime/search.ts +252 -0
- package/src/runtime/signin.ts +80 -0
- package/src/runtime/url-region.ts +93 -0
- package/src/security.ts +11 -1
- package/src/server.ts +2 -0
- package/src/session.ts +8 -2
- package/src/static-version.ts +34 -0
- package/src/workingcopy.ts +2 -2
package/public/app.js
CHANGED
|
@@ -140,6 +140,68 @@ const pgkilnPush = (() => {
|
|
|
140
140
|
return { supported, subscribe, unsubscribe, isOn, t };
|
|
141
141
|
})();
|
|
142
142
|
|
|
143
|
+
// Warn on unsaved changes (migration 077): a page form with data-warn-unsaved asks
|
|
144
|
+
// before the user leaves the page (a link, a redirect button, another form, closing
|
|
145
|
+
// or reloading the tab, closing a dialog) while one of its items differs from the
|
|
146
|
+
// value the server rendered. Submitting the page doesn't ask. Items inside an
|
|
147
|
+
// element with data-no-warn, and the interactive grid (it has its own check), are
|
|
148
|
+
// left out. data-warn-unsaved="changed": the page came back from a failed submit,
|
|
149
|
+
// so its values are not saved yet.
|
|
150
|
+
const pgkilnUnsaved = (() => {
|
|
151
|
+
const form = document.querySelector('form.page-form[data-warn-unsaved]');
|
|
152
|
+
const metaEl = document.getElementById('pgkiln-meta');
|
|
153
|
+
const meta = (metaEl ? JSON.parse(metaEl.textContent) : null) || {};
|
|
154
|
+
const text = (meta.texts && meta.texts['page.unsaved_changes']) || 'You have unsaved changes. Leave this page anyway?';
|
|
155
|
+
let leaving = false;
|
|
156
|
+
const tracked = (el) =>
|
|
157
|
+
el.name && !el.name.startsWith('__') && (el.type !== 'hidden' || 'initial' in el.dataset) && el.type !== 'submit' && el.type !== 'button' && !el.disabled &&
|
|
158
|
+
!el.closest('[data-no-warn], [data-grid], .grid-template');
|
|
159
|
+
function differs(el) {
|
|
160
|
+
if (el.type === 'hidden') return el.value !== el.dataset.initial;
|
|
161
|
+
if (el.type === 'checkbox' || el.type === 'radio') return el.checked !== el.defaultChecked;
|
|
162
|
+
if (el.type === 'file') return !!(el.files && el.files.length);
|
|
163
|
+
if (el.tagName === 'SELECT') {
|
|
164
|
+
const opts = [...el.options];
|
|
165
|
+
if (el.multiple) return opts.some((o) => o.selected !== o.defaultSelected);
|
|
166
|
+
const def = opts.findIndex((o) => o.defaultSelected);
|
|
167
|
+
return el.selectedIndex !== (def >= 0 ? def : el.size > 1 ? -1 : 0);
|
|
168
|
+
}
|
|
169
|
+
return 'defaultValue' in el && el.value !== el.defaultValue;
|
|
170
|
+
}
|
|
171
|
+
const changed = () => !!form && (form.dataset.warnUnsaved === 'changed' || [...form.elements].some((el) => tracked(el) && differs(el)));
|
|
172
|
+
/** True when the user may leave: nothing changed, or they said so. */
|
|
173
|
+
function mayLeave() {
|
|
174
|
+
if (leaving || !changed()) return true;
|
|
175
|
+
if (!window.confirm(text)) return false;
|
|
176
|
+
leaving = true;
|
|
177
|
+
return true;
|
|
178
|
+
}
|
|
179
|
+
if (form) {
|
|
180
|
+
document.addEventListener('click', (e) => {
|
|
181
|
+
const a = e.target.closest?.('a[href]');
|
|
182
|
+
if (!a || e.defaultPrevented || e.ctrlKey || e.metaKey || e.shiftKey || e.button !== 0) return;
|
|
183
|
+
const href = a.getAttribute('href') || '';
|
|
184
|
+
// a dialog, a new tab, a download or a place on this page doesn't leave it
|
|
185
|
+
if (href.startsWith('#') || /^javascript:/i.test(href) || a.hasAttribute('download') || a.target === '_blank' || a.hasAttribute('data-dialog') || a.hasAttribute('data-dialog-cancel')) return;
|
|
186
|
+
if (!mayLeave()) e.preventDefault();
|
|
187
|
+
});
|
|
188
|
+
// submitting the page saves; another form (a menu, a switch) leaves it
|
|
189
|
+
document.addEventListener('submit', (e) => {
|
|
190
|
+
if (e.target === form) leaving = true;
|
|
191
|
+
else if (!e.defaultPrevented && (e.target.method || '').toLowerCase() === 'post' && !mayLeave()) e.preventDefault();
|
|
192
|
+
}, true);
|
|
193
|
+
window.addEventListener('beforeunload', (e) => {
|
|
194
|
+
if (leaving || !changed()) return;
|
|
195
|
+
e.preventDefault();
|
|
196
|
+
e.returnValue = '';
|
|
197
|
+
});
|
|
198
|
+
// a navigation that was answered "leave" and then cancelled (download, same page) arms the check again
|
|
199
|
+
window.addEventListener('pageshow', () => (leaving = false));
|
|
200
|
+
}
|
|
201
|
+
return { changed, mayLeave, text };
|
|
202
|
+
})();
|
|
203
|
+
|
|
204
|
+
|
|
143
205
|
(() => {
|
|
144
206
|
const body = document.body;
|
|
145
207
|
const base = body.dataset.base;
|
|
@@ -383,6 +445,26 @@ const pgkilnPush = (() => {
|
|
|
383
445
|
},
|
|
384
446
|
}),
|
|
385
447
|
getValue: (name) => itemValue(name),
|
|
448
|
+
// (085) raise a custom event: dynamic actions with event "custom" and this name run
|
|
449
|
+
trigger: (name, value) => runChain(das.filter((da) => da.event === 'custom' && da.trigger.some((t) => String(t).toLowerCase() === String(name).toLowerCase())), value),
|
|
450
|
+
// (085) APEX: apex.server.process. An Ajax callback (a process with point "ajax") by name: posts the items given
|
|
451
|
+
// (a list of names, or {name: value}) and x01 … x10; answers { data, rows, items } and sets the items it changed.
|
|
452
|
+
server: Object.freeze({
|
|
453
|
+
async process(name, opts = {}) {
|
|
454
|
+
const data = {};
|
|
455
|
+
if (Array.isArray(opts.items)) for (const n of opts.items) data[n] = itemValue(n);
|
|
456
|
+
else if (opts.items && typeof opts.items === 'object') Object.assign(data, opts.items);
|
|
457
|
+
for (let i = 1; i <= 10; i++) {
|
|
458
|
+
const k = `x${String(i).padStart(2, '0')}`;
|
|
459
|
+
if (opts[k] !== undefined && opts[k] !== null) data[k] = String(opts[k]);
|
|
460
|
+
}
|
|
461
|
+
const res = await post(`/ajax/${encodeURIComponent(name)}`, data);
|
|
462
|
+
for (const [n, v] of Object.entries(res.items || {})) setItemValue(n, v);
|
|
463
|
+
return res;
|
|
464
|
+
},
|
|
465
|
+
}),
|
|
466
|
+
// (077) APEX: apex.page.isChanged()
|
|
467
|
+
isChanged: () => pgkilnUnsaved.changed(),
|
|
386
468
|
setValue: (name, value) => setItemValue(name, value),
|
|
387
469
|
showSuccess: (message) => showMessage(String(message), 'success'),
|
|
388
470
|
showError: (message, item) => (item ? itemError(item, String(message)) : showMessage(String(message), 'error')),
|
|
@@ -390,6 +472,38 @@ const pgkilnPush = (() => {
|
|
|
390
472
|
page: pageNo,
|
|
391
473
|
});
|
|
392
474
|
|
|
475
|
+
/** (085) what runDa returns to stop the actions after it (a declined confirm) */
|
|
476
|
+
const STOP = Symbol('stop');
|
|
477
|
+
const text = (k) => (meta.texts && meta.texts[k]) || k;
|
|
478
|
+
|
|
479
|
+
/** The actions of one event and trigger, one after the other in sequence order; false when one stopped them. */
|
|
480
|
+
async function runChain(list, value, extra) {
|
|
481
|
+
for (const da of list) if ((await runDa(da, false, value, extra)) === STOP) return false;
|
|
482
|
+
return true;
|
|
483
|
+
}
|
|
484
|
+
|
|
485
|
+
/** (085) The download dynamic action: the file of the download process it names, saved by the browser. */
|
|
486
|
+
async function download(da) {
|
|
487
|
+
const params = new URLSearchParams();
|
|
488
|
+
for (const n of da.submit) params.set(n, itemValue(n));
|
|
489
|
+
params.set('__csrf', meta.csrf);
|
|
490
|
+
try {
|
|
491
|
+
const res = await fetch(`${base}/${pageNo}/da/${da.id}/download`, { method: 'POST', body: params, credentials: 'same-origin' });
|
|
492
|
+
if (!res.ok) throw new Error((await res.json().catch(() => ({}))).error || res.statusText);
|
|
493
|
+
const name = /filename\*?=(?:UTF-8'')?"?([^";]+)"?/i.exec(res.headers.get('content-disposition') || '')?.[1];
|
|
494
|
+
const url = URL.createObjectURL(await res.blob());
|
|
495
|
+
const a = document.createElement('a');
|
|
496
|
+
a.href = url;
|
|
497
|
+
a.download = name ? decodeURIComponent(name) : 'download';
|
|
498
|
+
document.body.appendChild(a);
|
|
499
|
+
a.click();
|
|
500
|
+
a.remove();
|
|
501
|
+
setTimeout(() => URL.revokeObjectURL(url), 60000);
|
|
502
|
+
} catch (e) {
|
|
503
|
+
showError(e.message);
|
|
504
|
+
}
|
|
505
|
+
}
|
|
506
|
+
|
|
393
507
|
async function runDa(da, initial, value, extra) {
|
|
394
508
|
const holds = conditionHolds(da, value);
|
|
395
509
|
switch (da.action) {
|
|
@@ -411,6 +525,58 @@ const pgkilnPush = (() => {
|
|
|
411
525
|
case 'alert':
|
|
412
526
|
window.alert(da.message || '');
|
|
413
527
|
return;
|
|
528
|
+
// (085) a question: No stops the actions after it (and a page submit for before_submit)
|
|
529
|
+
case 'confirm':
|
|
530
|
+
return window.confirm(da.message || '') ? undefined : STOP;
|
|
531
|
+
case 'close_dialog':
|
|
532
|
+
case 'cancel_dialog':
|
|
533
|
+
if (window.parent !== window) window.parent.postMessage({ type: 'pgkiln:close', reload: da.action === 'close_dialog', page: body.dataset.dialogPage || String(pageNo) }, location.origin);
|
|
534
|
+
return;
|
|
535
|
+
case 'clear':
|
|
536
|
+
for (const n of da.items) setItemValue(n, '');
|
|
537
|
+
return;
|
|
538
|
+
case 'open_region':
|
|
539
|
+
case 'close_region':
|
|
540
|
+
for (const el of targets(da)) {
|
|
541
|
+
const details = el.querySelector(':scope > details');
|
|
542
|
+
// (088) an inline dialog or drawer region
|
|
543
|
+
if (el.matches('dialog[data-inline-region]')) {
|
|
544
|
+
if (da.action === 'open_region' && !el.open) el.showModal();
|
|
545
|
+
else if (da.action === 'close_region' && el.open) el.close();
|
|
546
|
+
} else if (details) details.open = da.action === 'open_region';
|
|
547
|
+
else el.hidden = da.action === 'close_region';
|
|
548
|
+
}
|
|
549
|
+
return;
|
|
550
|
+
case 'print':
|
|
551
|
+
window.print();
|
|
552
|
+
return;
|
|
553
|
+
case 'current_position':
|
|
554
|
+
return new Promise((resolve) => {
|
|
555
|
+
if (!navigator.geolocation) return showError(text('item.locate_error')), resolve();
|
|
556
|
+
navigator.geolocation.getCurrentPosition(
|
|
557
|
+
(pos) => {
|
|
558
|
+
if (da.items[0]) setItemValue(da.items[0], `${pos.coords.latitude.toFixed(5)},${pos.coords.longitude.toFixed(5)}`);
|
|
559
|
+
resolve();
|
|
560
|
+
},
|
|
561
|
+
() => (showError(text('item.locate_error')), resolve()),
|
|
562
|
+
{ enableHighAccuracy: true, timeout: 15000 },
|
|
563
|
+
);
|
|
564
|
+
});
|
|
565
|
+
case 'share': {
|
|
566
|
+
const data = { title: document.title, text: da.message || undefined, url: location.href };
|
|
567
|
+
try {
|
|
568
|
+
if (navigator.share) await navigator.share(data);
|
|
569
|
+
else {
|
|
570
|
+
await navigator.clipboard.writeText(location.href);
|
|
571
|
+
showMessage(text('page.link_copied'), 'success');
|
|
572
|
+
}
|
|
573
|
+
} catch {
|
|
574
|
+
// the user closed the share sheet
|
|
575
|
+
}
|
|
576
|
+
return;
|
|
577
|
+
}
|
|
578
|
+
case 'download':
|
|
579
|
+
return download(da);
|
|
414
580
|
case 'set_focus':
|
|
415
581
|
focusTarget(targets(da)[0]);
|
|
416
582
|
return;
|
|
@@ -499,7 +665,7 @@ const pgkilnPush = (() => {
|
|
|
499
665
|
document.addEventListener('change', (e) => {
|
|
500
666
|
const name = e.target.name;
|
|
501
667
|
if (!name) return;
|
|
502
|
-
|
|
668
|
+
runChain(das.filter((da) => da.event === 'change' && da.trigger.includes(name)));
|
|
503
669
|
cascade(name);
|
|
504
670
|
if (e.target.closest('[data-submit-on-change]') && e.target.form === form && depth === 0) form.requestSubmit();
|
|
505
671
|
});
|
|
@@ -511,21 +677,69 @@ const pgkilnPush = (() => {
|
|
|
511
677
|
// (without JavaScript the button submits and the page process runs instead)
|
|
512
678
|
const ai = run.some((da) => da.action === 'ai_generate');
|
|
513
679
|
if (ai && btn.type === 'submit') e.preventDefault();
|
|
514
|
-
const pending = run
|
|
680
|
+
const pending = runChain(run);
|
|
515
681
|
if (ai && btn.tagName === 'BUTTON') {
|
|
516
682
|
// one request at a time: the button waits for the answer
|
|
517
683
|
btn.disabled = true;
|
|
518
684
|
btn.setAttribute('aria-busy', 'true');
|
|
519
|
-
Promise.allSettled(pending).then(() => {
|
|
685
|
+
Promise.allSettled([pending]).then(() => {
|
|
520
686
|
btn.disabled = false;
|
|
521
687
|
btn.removeAttribute('aria-busy');
|
|
522
688
|
});
|
|
523
689
|
}
|
|
524
690
|
});
|
|
525
|
-
for (const da of das)
|
|
526
|
-
|
|
527
|
-
|
|
528
|
-
|
|
691
|
+
for (const da of das) if (da.event !== 'dialog_closed' && ['show', 'hide', 'enable', 'disable'].includes(da.action)) runDa(da, true);
|
|
692
|
+
runChain(das.filter((da) => da.event === 'load'));
|
|
693
|
+
|
|
694
|
+
// (085) more events. Item events: focus, blur, key_release (trigger: item names).
|
|
695
|
+
const itemEvent = (event) => (e) => {
|
|
696
|
+
const name = e.target && e.target.name;
|
|
697
|
+
if (!name) return;
|
|
698
|
+
const run = das.filter((da) => da.event === event && da.trigger.includes(name));
|
|
699
|
+
if (run.length) runChain(run);
|
|
700
|
+
};
|
|
701
|
+
document.addEventListener('focusin', itemEvent('focus'));
|
|
702
|
+
document.addEventListener('focusout', itemEvent('blur'));
|
|
703
|
+
document.addEventListener('keyup', itemEvent('key_release'));
|
|
704
|
+
// region events (trigger: region ids or static ids, case-insensitive)
|
|
705
|
+
const regionRun = (event, region) => {
|
|
706
|
+
if (!region || !/^R\d+$/.test(region.id || '')) return [];
|
|
707
|
+
const keys = [region.id.slice(1), (region.dataset.staticId || '').toLowerCase()].filter(Boolean);
|
|
708
|
+
return das.filter((da) => da.event === event && da.trigger.some((t) => keys.includes(String(t).toLowerCase())));
|
|
709
|
+
};
|
|
710
|
+
// after_refresh: a region replaced by a refresh, a lazy load or a master row
|
|
711
|
+
document.addEventListener('pgkiln:replaced', (e) => {
|
|
712
|
+
const run = regionRun('after_refresh', e.detail);
|
|
713
|
+
if (run.length) runChain(run);
|
|
714
|
+
});
|
|
715
|
+
// selection_change: the row checkboxes of a report (and a grid's selected master row, see selectMaster)
|
|
716
|
+
const selectionChanged = (region) => {
|
|
717
|
+
const run = regionRun('selection_change', region);
|
|
718
|
+
if (!run.length) return;
|
|
719
|
+
const boxes = region.querySelectorAll('td.row-select input[type=checkbox]:checked');
|
|
720
|
+
runChain(run, [...boxes].map((b) => b.value).join(':'));
|
|
721
|
+
};
|
|
722
|
+
document.addEventListener('change', (e) => {
|
|
723
|
+
if (e.target.closest?.('.row-select')) selectionChanged(e.target.closest('section[id^="R"]'));
|
|
724
|
+
});
|
|
725
|
+
document.addEventListener('pgkiln:selection', (e) => selectionChanged(e.detail));
|
|
726
|
+
// before_submit: the page's form; a declined confirm keeps the page
|
|
727
|
+
let submitting = false;
|
|
728
|
+
document.addEventListener('submit', async (e) => {
|
|
729
|
+
if (e.target !== form || submitting) return;
|
|
730
|
+
const run = das.filter((da) => da.event === 'before_submit');
|
|
731
|
+
if (!run.length) return;
|
|
732
|
+
e.preventDefault();
|
|
733
|
+
e.stopImmediatePropagation();
|
|
734
|
+
const submitter = e.submitter;
|
|
735
|
+
if (!(await runChain(run))) return;
|
|
736
|
+
submitting = true;
|
|
737
|
+
try {
|
|
738
|
+
form.requestSubmit(submitter && submitter.form === form ? submitter : undefined);
|
|
739
|
+
} finally {
|
|
740
|
+
submitting = false;
|
|
741
|
+
}
|
|
742
|
+
}, true);
|
|
529
743
|
|
|
530
744
|
// ------------------------------------------------------------ cascading lists of values
|
|
531
745
|
async function cascade(parent) {
|
|
@@ -641,7 +855,19 @@ const pgkilnPush = (() => {
|
|
|
641
855
|
dlg.setAttribute('aria-labelledby', 't-dialog-title');
|
|
642
856
|
dlg.innerHTML = '<div class="t-dialog-head"><h2 id="t-dialog-title"></h2><button type="button" class="icon-button t-dialog-x" aria-label="Close">×</button></div><iframe title="Dialog"></iframe>';
|
|
643
857
|
document.body.appendChild(dlg);
|
|
644
|
-
|
|
858
|
+
// (077) the page in the dialog decides whether its unsaved changes may go
|
|
859
|
+
const mayClose = () => {
|
|
860
|
+
try {
|
|
861
|
+
const w = dlg.querySelector('iframe').contentWindow;
|
|
862
|
+
return !w.pgkiln?.isChanged?.() || window.confirm(pgkilnUnsaved.text);
|
|
863
|
+
} catch {
|
|
864
|
+
return true;
|
|
865
|
+
}
|
|
866
|
+
};
|
|
867
|
+
dlg.querySelector('.t-dialog-x').addEventListener('click', () => mayClose() && dlg.close());
|
|
868
|
+
dlg.addEventListener('cancel', (e) => {
|
|
869
|
+
if (!mayClose()) e.preventDefault();
|
|
870
|
+
});
|
|
645
871
|
dlg.addEventListener('close', () => (dlg.querySelector('iframe').src = 'about:blank'));
|
|
646
872
|
}
|
|
647
873
|
const frame = dlg.querySelector('iframe');
|
|
@@ -790,7 +1016,7 @@ const pgkilnPush = (() => {
|
|
|
790
1016
|
document.addEventListener('click', (e) => {
|
|
791
1017
|
if (!e.target.closest('[data-dialog-cancel]')) return;
|
|
792
1018
|
e.preventDefault();
|
|
793
|
-
tell(false);
|
|
1019
|
+
if (pgkilnUnsaved.mayLeave()) tell(false);
|
|
794
1020
|
});
|
|
795
1021
|
}
|
|
796
1022
|
})();
|
|
@@ -932,17 +1158,18 @@ const pgkilnPush = (() => {
|
|
|
932
1158
|
return;
|
|
933
1159
|
}
|
|
934
1160
|
const leave = e.target.closest('[data-grid-leave]');
|
|
935
|
-
if (leave && dirty && !window.confirm(
|
|
1161
|
+
if (leave && dirty && !window.confirm(pgkilnUnsaved.text)) e.preventDefault();
|
|
936
1162
|
});
|
|
937
1163
|
document.addEventListener('input', (e) => {
|
|
938
|
-
|
|
1164
|
+
// a grid row, or the single row view's form
|
|
1165
|
+
const row = e.target.closest?.('[data-grid] table.grid-table > tbody > tr, [data-grid] .grid-record');
|
|
939
1166
|
if (!row) return;
|
|
940
1167
|
row.classList.add('dirty');
|
|
941
1168
|
dirty = true;
|
|
942
1169
|
});
|
|
943
1170
|
document.addEventListener('change', (e) => {
|
|
944
1171
|
const del = e.target.closest?.('[data-grid] .grid-sel input');
|
|
945
|
-
if (del) del.closest('tr').classList.toggle('deleted', del.checked);
|
|
1172
|
+
if (del) del.closest('tr, .grid-record').classList.toggle('deleted', del.checked);
|
|
946
1173
|
});
|
|
947
1174
|
document.addEventListener('submit', () => (dirty = false));
|
|
948
1175
|
window.addEventListener('beforeunload', (e) => {
|
|
@@ -969,7 +1196,7 @@ const pgkilnPush = (() => {
|
|
|
969
1196
|
const master = link.closest('[data-grid]');
|
|
970
1197
|
const ids = link.dataset.gridSelect.split(',').filter(Boolean);
|
|
971
1198
|
const dirtyDetail = ids.some((id) => document.querySelector(`#R${id} [data-grid] tr.dirty, #R${id} [data-grid] tbody:not(.grid-template) tr.grid-new`));
|
|
972
|
-
if (dirtyDetail && !window.confirm(
|
|
1199
|
+
if (dirtyDetail && !window.confirm(pgkilnUnsaved.text)) return;
|
|
973
1200
|
const query = new URL(link.href, location.href).search.slice(1);
|
|
974
1201
|
for (const id of ids) {
|
|
975
1202
|
const region = document.getElementById(`R${id}`);
|
|
@@ -1003,6 +1230,8 @@ const pgkilnPush = (() => {
|
|
|
1003
1230
|
return;
|
|
1004
1231
|
}
|
|
1005
1232
|
}
|
|
1233
|
+
// (085) the dynamic actions on the master's "selection change"
|
|
1234
|
+
document.dispatchEvent(new CustomEvent('pgkiln:selection', { detail: master.closest('section[id^="R"]') }));
|
|
1006
1235
|
// mark the row, and make the page's other links and forms carry the new selection
|
|
1007
1236
|
for (const a of master.querySelectorAll('a[data-grid-select]')) {
|
|
1008
1237
|
const on = a === link;
|
|
@@ -1320,6 +1549,30 @@ document.addEventListener('input', (e) => {
|
|
|
1320
1549
|
if (custom) custom.checked = true;
|
|
1321
1550
|
});
|
|
1322
1551
|
|
|
1552
|
+
// (088) Inline dialog and drawer regions: a link to #R<id> opens one as a modal dialog (without
|
|
1553
|
+
// JavaScript CSS shows it as the :target), its close button and Esc close it, a click on the
|
|
1554
|
+
// backdrop too.
|
|
1555
|
+
document.addEventListener('click', (e) => {
|
|
1556
|
+
const close = e.target.closest?.('[data-region-close]');
|
|
1557
|
+
if (close) {
|
|
1558
|
+
e.preventDefault();
|
|
1559
|
+
close.closest('dialog')?.close();
|
|
1560
|
+
return;
|
|
1561
|
+
}
|
|
1562
|
+
const a = e.target.closest?.('a[href^="#R"]');
|
|
1563
|
+
const d = a && document.getElementById(a.getAttribute('href').slice(1));
|
|
1564
|
+
if (d?.matches('dialog[data-inline-region]')) {
|
|
1565
|
+
e.preventDefault();
|
|
1566
|
+
if (!d.open) d.showModal();
|
|
1567
|
+
return;
|
|
1568
|
+
}
|
|
1569
|
+
if (e.target.matches?.('dialog[data-inline-region]')) e.target.close();
|
|
1570
|
+
});
|
|
1571
|
+
if (location.hash) {
|
|
1572
|
+
const d = document.getElementById(location.hash.slice(1));
|
|
1573
|
+
if (d?.matches('dialog[data-inline-region]')) d.showModal();
|
|
1574
|
+
}
|
|
1575
|
+
|
|
1323
1576
|
// Region display selector: the links to the regions become ARIA tabs (or a
|
|
1324
1577
|
// select list) that show one tab's regions at a time; "Show all" shows them
|
|
1325
1578
|
// all. The choice follows #R<id> in the URL and is remembered for the session.
|
|
@@ -1393,6 +1646,23 @@ document.querySelectorAll('[data-rds]').forEach((nav) => {
|
|
|
1393
1646
|
const tab = byHash(location.hash.slice(1));
|
|
1394
1647
|
if (tab) show(tab, false);
|
|
1395
1648
|
});
|
|
1649
|
+
// (088) carousel: Previous and Next, and turning by itself every data-rds-interval seconds
|
|
1650
|
+
if (nav.classList.contains('rds-carousel')) {
|
|
1651
|
+
const step = (n) => {
|
|
1652
|
+
const i = tabs.findIndex((t) => t.classList.contains('is-current'));
|
|
1653
|
+
show(tabs[(i + n + tabs.length) % tabs.length], false);
|
|
1654
|
+
};
|
|
1655
|
+
nav.querySelectorAll('[data-rds-step]').forEach((b) => {
|
|
1656
|
+
b.hidden = false;
|
|
1657
|
+
b.addEventListener('click', () => step(Number(b.dataset.rdsStep)));
|
|
1658
|
+
});
|
|
1659
|
+
const seconds = Number(nav.dataset.rdsInterval) || 0;
|
|
1660
|
+
if (seconds && !matchMedia('(prefers-reduced-motion: reduce)').matches) {
|
|
1661
|
+
const area = [nav, ...panels];
|
|
1662
|
+
const busy = () => area.some((el) => el.matches(':hover') || el.contains(document.activeElement));
|
|
1663
|
+
setInterval(() => { if (!busy() && !document.hidden) step(1); }, seconds * 1000);
|
|
1664
|
+
}
|
|
1665
|
+
}
|
|
1396
1666
|
});
|
|
1397
1667
|
|
|
1398
1668
|
// Popup list of values: the select (which works without JavaScript) is hidden
|
|
@@ -1787,6 +2057,58 @@ document.addEventListener('DOMContentLoaded', () => {
|
|
|
1787
2057
|
);
|
|
1788
2058
|
});
|
|
1789
2059
|
|
|
2060
|
+
// (086) address items: the geocoder's addresses for the text; the one chosen replaces it, its position goes into the coordinates item
|
|
2061
|
+
document.addEventListener('click', async (e) => {
|
|
2062
|
+
const btn = e.target.closest && e.target.closest('[data-geocode]');
|
|
2063
|
+
if (!btn) return;
|
|
2064
|
+
const input = document.getElementById(btn.dataset.geocode);
|
|
2065
|
+
const list = document.getElementById(`${btn.dataset.geocode}_places`);
|
|
2066
|
+
if (!input || !list) return;
|
|
2067
|
+
const csrf = (metaEl ? JSON.parse(metaEl.textContent).csrf : '') || '';
|
|
2068
|
+
btn.setAttribute('aria-busy', 'true');
|
|
2069
|
+
let places = null;
|
|
2070
|
+
try {
|
|
2071
|
+
const res = await fetch(btn.dataset.url, { method: 'POST', body: new URLSearchParams({ q: input.value, __csrf: csrf }), headers: { accept: 'application/json' }, credentials: 'same-origin' });
|
|
2072
|
+
const data = await res.json().catch(() => ({}));
|
|
2073
|
+
if (!res.ok) note(data.error || t('item.address_error'), 'error');
|
|
2074
|
+
else places = data.places || [];
|
|
2075
|
+
} catch {
|
|
2076
|
+
note(t('item.address_error'), 'error');
|
|
2077
|
+
}
|
|
2078
|
+
btn.removeAttribute('aria-busy');
|
|
2079
|
+
list.replaceChildren();
|
|
2080
|
+
if (!places) return;
|
|
2081
|
+
if (!places.length) {
|
|
2082
|
+
list.hidden = true;
|
|
2083
|
+
note(t('item.address_none'), 'error');
|
|
2084
|
+
return;
|
|
2085
|
+
}
|
|
2086
|
+
for (const p of places) {
|
|
2087
|
+
const li = document.createElement('li');
|
|
2088
|
+
li.setAttribute('role', 'option');
|
|
2089
|
+
const b = document.createElement('button');
|
|
2090
|
+
b.type = 'button';
|
|
2091
|
+
b.className = 'link-button';
|
|
2092
|
+
b.textContent = p.label;
|
|
2093
|
+
b.addEventListener('click', () => {
|
|
2094
|
+
input.value = p.label;
|
|
2095
|
+
input.dispatchEvent(new Event('change', { bubbles: true }));
|
|
2096
|
+
const target = btn.dataset.coords && document.getElementById(btn.dataset.coords);
|
|
2097
|
+
if (target) {
|
|
2098
|
+
target.value = `${Number(p.lat).toFixed(5)},${Number(p.lon).toFixed(5)}`;
|
|
2099
|
+
target.dispatchEvent(new Event('change', { bubbles: true }));
|
|
2100
|
+
}
|
|
2101
|
+
list.hidden = true;
|
|
2102
|
+
list.replaceChildren();
|
|
2103
|
+
input.focus();
|
|
2104
|
+
});
|
|
2105
|
+
li.append(b);
|
|
2106
|
+
list.append(li);
|
|
2107
|
+
}
|
|
2108
|
+
list.hidden = false;
|
|
2109
|
+
list.querySelector('button').focus();
|
|
2110
|
+
});
|
|
2111
|
+
|
|
1790
2112
|
// scan buttons: only where the browser reads barcodes (BarcodeDetector, e.g. Chrome on Android)
|
|
1791
2113
|
if ('BarcodeDetector' in window && navigator.mediaDevices) {
|
|
1792
2114
|
for (const b of document.querySelectorAll('[data-scan]')) b.hidden = false;
|
|
@@ -2908,6 +3230,8 @@ function areaFilter(map, f) {
|
|
|
2908
3230
|
hidden.type = 'hidden';
|
|
2909
3231
|
hidden.name = input.name;
|
|
2910
3232
|
hidden.value = input.value;
|
|
3233
|
+
// (077) a hidden input's value is its default too: the value to compare with for "unsaved changes"
|
|
3234
|
+
hidden.dataset.initial = input.value;
|
|
2911
3235
|
input.removeAttribute('name');
|
|
2912
3236
|
input.value = '';
|
|
2913
3237
|
const list = document.createElement('ul');
|
|
@@ -3036,3 +3360,162 @@ function areaFilter(map, f) {
|
|
|
3036
3360
|
}
|
|
3037
3361
|
});
|
|
3038
3362
|
})();
|
|
3363
|
+
|
|
3364
|
+
// Search region (migration 080): search as the user types. The field is a GET form that works
|
|
3365
|
+
// without JavaScript; here a pause in typing fetches the region (GET …/region/<id>) and swaps in
|
|
3366
|
+
// its results only, so the field keeps its focus and cursor. Answers that arrive late are dropped.
|
|
3367
|
+
(() => {
|
|
3368
|
+
const base = document.body.dataset.base;
|
|
3369
|
+
const page = document.body.dataset.page;
|
|
3370
|
+
if (!base || !page) return;
|
|
3371
|
+
const timers = new WeakMap();
|
|
3372
|
+
const latest = new WeakMap();
|
|
3373
|
+
async function search(field) {
|
|
3374
|
+
const id = field.dataset.searchRegion;
|
|
3375
|
+
if (!/^\d+$/.test(id || '') || !field.form) return;
|
|
3376
|
+
// (the form keeps the page's own parameters, dialog=1 among them)
|
|
3377
|
+
const params = new URLSearchParams(new FormData(field.form));
|
|
3378
|
+
const n = (latest.get(field) || 0) + 1;
|
|
3379
|
+
latest.set(field, n);
|
|
3380
|
+
try {
|
|
3381
|
+
const res = await fetch(`${base}/${page}/region/${id}?${params}`, { headers: { accept: 'application/json' }, credentials: 'same-origin' });
|
|
3382
|
+
if (!res.ok || latest.get(field) !== n) return;
|
|
3383
|
+
const json = await res.json();
|
|
3384
|
+
const fresh = new DOMParser().parseFromString(json.html || '', 'text/html').getElementById(`R${id}_results`);
|
|
3385
|
+
const results = document.getElementById(`R${id}_results`);
|
|
3386
|
+
if (!fresh || !results) return;
|
|
3387
|
+
results.replaceChildren(...[...fresh.childNodes].map((node) => document.importNode(node, true)));
|
|
3388
|
+
history.replaceState(history.state, '', `${location.pathname}?${params}${location.hash}`);
|
|
3389
|
+
} catch {
|
|
3390
|
+
// offline or the session ended: Enter still submits the form
|
|
3391
|
+
}
|
|
3392
|
+
}
|
|
3393
|
+
document.addEventListener('input', (e) => {
|
|
3394
|
+
const field = e.target.closest?.('input[data-search-region]');
|
|
3395
|
+
if (!field) return;
|
|
3396
|
+
clearTimeout(timers.get(field));
|
|
3397
|
+
timers.set(field, setTimeout(() => search(field), 250));
|
|
3398
|
+
});
|
|
3399
|
+
})();
|
|
3400
|
+
|
|
3401
|
+
// Session timeout warning (migration 085; APEX: Session timeout warning). The page knows when its
|
|
3402
|
+
// session ends: after the idle time since the page was loaded (or since "Stay signed in"), and at
|
|
3403
|
+
// the session's maximum length. A dialog warns `warn` seconds before; "Stay signed in" marks the
|
|
3404
|
+
// session active on the server. At the maximum length the user can only save their work.
|
|
3405
|
+
(() => {
|
|
3406
|
+
const metaEl = document.getElementById('pgkiln-meta');
|
|
3407
|
+
if (!metaEl) return;
|
|
3408
|
+
const meta = JSON.parse(metaEl.textContent);
|
|
3409
|
+
const s = meta.session;
|
|
3410
|
+
if (!s || !s.idle || !s.warn) return;
|
|
3411
|
+
const t = (k) => (meta.texts && meta.texts[k]) || k;
|
|
3412
|
+
let last = Date.now();
|
|
3413
|
+
let timer;
|
|
3414
|
+
let dlg;
|
|
3415
|
+
let shown = '';
|
|
3416
|
+
let dismissed = false;
|
|
3417
|
+
const end = () => Math.min(last + s.idle * 1000, s.maxEnd || Infinity);
|
|
3418
|
+
const atMax = () => s.maxEnd && end() === s.maxEnd;
|
|
3419
|
+
function schedule(ms) {
|
|
3420
|
+
clearTimeout(timer);
|
|
3421
|
+
timer = setTimeout(check, Math.max(500, Math.min(ms, 2 ** 31 - 1)));
|
|
3422
|
+
}
|
|
3423
|
+
function check() {
|
|
3424
|
+
const left = end() - Date.now();
|
|
3425
|
+
if (left <= 0) return show('ended');
|
|
3426
|
+
if (left > s.warn * 1000) return schedule(left - s.warn * 1000);
|
|
3427
|
+
// the idle warning counts down until it is dismissed; the maximum length is said once
|
|
3428
|
+
if (atMax() ? shown !== 'max' : !dismissed) show(atMax() ? 'max' : 'idle', left);
|
|
3429
|
+
schedule(Math.min(left, 30000));
|
|
3430
|
+
}
|
|
3431
|
+
function button(label, cls, onClick) {
|
|
3432
|
+
const b = document.createElement('button');
|
|
3433
|
+
b.type = 'button';
|
|
3434
|
+
b.className = `btn ${cls}`;
|
|
3435
|
+
b.textContent = label;
|
|
3436
|
+
b.addEventListener('click', onClick);
|
|
3437
|
+
return b;
|
|
3438
|
+
}
|
|
3439
|
+
function show(kind, left) {
|
|
3440
|
+
if (!dlg) {
|
|
3441
|
+
dlg = document.createElement('dialog');
|
|
3442
|
+
dlg.className = 'session-dialog';
|
|
3443
|
+
dlg.setAttribute('aria-labelledby', 'session-dialog-text');
|
|
3444
|
+
dlg.innerHTML = '<p id="session-dialog-text"></p><div class="buttons"></div>';
|
|
3445
|
+
document.body.appendChild(dlg);
|
|
3446
|
+
// Escape dismisses the warning like the button
|
|
3447
|
+
dlg.addEventListener('cancel', () => (dismissed = true));
|
|
3448
|
+
}
|
|
3449
|
+
if (kind === 'max' && shown === 'max' && dlg.open) return;
|
|
3450
|
+
shown = kind;
|
|
3451
|
+
const p = dlg.querySelector('p');
|
|
3452
|
+
const buttons = dlg.querySelector('.buttons');
|
|
3453
|
+
buttons.replaceChildren();
|
|
3454
|
+
if (kind === 'ended') {
|
|
3455
|
+
clearTimeout(timer);
|
|
3456
|
+
p.textContent = t('session.ended');
|
|
3457
|
+
buttons.append(button(t('login.sign_in_link'), 'btn-hot', () => (location.href = `${document.body.dataset.base}/login?next=${encodeURIComponent(location.pathname + location.search)}`)));
|
|
3458
|
+
} else if (kind === 'max') {
|
|
3459
|
+
p.textContent = t('session.max').replace('{time}', new Date(s.maxEnd).toLocaleTimeString([], { hour: '2-digit', minute: '2-digit' }));
|
|
3460
|
+
buttons.append(button('OK', 'btn-hot', () => dlg.close()));
|
|
3461
|
+
} else {
|
|
3462
|
+
p.textContent = t('session.warning').replace('{minutes}', String(Math.max(1, Math.ceil(left / 60000))));
|
|
3463
|
+
buttons.append(button(t('session.stay'), 'btn-hot', stay), button(t('common.dismiss'), '', () => ((dismissed = true), dlg.close())));
|
|
3464
|
+
}
|
|
3465
|
+
if (!dlg.open) dlg.showModal();
|
|
3466
|
+
}
|
|
3467
|
+
async function stay() {
|
|
3468
|
+
try {
|
|
3469
|
+
const res = await fetch(s.extend, { method: 'POST', body: new URLSearchParams({ __csrf: meta.csrf }), headers: { accept: 'application/json' }, credentials: 'same-origin' });
|
|
3470
|
+
if (!res.ok) return show('ended');
|
|
3471
|
+
last = Date.now();
|
|
3472
|
+
shown = '';
|
|
3473
|
+
dismissed = false;
|
|
3474
|
+
dlg.close();
|
|
3475
|
+
check();
|
|
3476
|
+
} catch {
|
|
3477
|
+
// offline: try again with the next click
|
|
3478
|
+
}
|
|
3479
|
+
}
|
|
3480
|
+
check();
|
|
3481
|
+
})();
|
|
3482
|
+
|
|
3483
|
+
// (sprint 59) Quick edit from the developer toolbar (APEX: Quick Edit): while it is on, pointing at a
|
|
3484
|
+
// region, item or button outlines it and a click opens it in the Page Designer (in the builder's tab);
|
|
3485
|
+
// Esc or the button again turns it off. The toolbar is only there for developers of the application.
|
|
3486
|
+
(() => {
|
|
3487
|
+
const toggle = document.querySelector('[data-quick-edit]');
|
|
3488
|
+
if (!toggle) return;
|
|
3489
|
+
toggle.hidden = false;
|
|
3490
|
+
const base = toggle.dataset.quickEdit;
|
|
3491
|
+
const pick = (el) => el?.closest?.('[data-item], [data-button], .region[id^="R"]');
|
|
3492
|
+
let on = false;
|
|
3493
|
+
let marked = null;
|
|
3494
|
+
const mark = (el) => {
|
|
3495
|
+
marked?.classList.remove('qe-target');
|
|
3496
|
+
marked = el;
|
|
3497
|
+
el?.classList.add('qe-target');
|
|
3498
|
+
};
|
|
3499
|
+
const set = (v) => {
|
|
3500
|
+
on = v;
|
|
3501
|
+
toggle.setAttribute('aria-pressed', String(v));
|
|
3502
|
+
document.body.classList.toggle('quick-edit', v);
|
|
3503
|
+
if (!v) mark(null);
|
|
3504
|
+
};
|
|
3505
|
+
const urlOf = (el) => {
|
|
3506
|
+
if (el.dataset.item) return `${base}/quick?item=${encodeURIComponent(el.dataset.item)}`;
|
|
3507
|
+
if (el.dataset.button) return `${base}/quick?button=${encodeURIComponent(el.dataset.button)}`;
|
|
3508
|
+
return `${base}?c=region-${el.id.slice(1)}`;
|
|
3509
|
+
};
|
|
3510
|
+
toggle.addEventListener('click', () => set(!on));
|
|
3511
|
+
document.addEventListener('pointerover', (e) => { if (on && !e.target.closest('.devbar')) mark(pick(e.target)); });
|
|
3512
|
+
document.addEventListener('click', (e) => {
|
|
3513
|
+
if (!on || e.target.closest('.devbar')) return;
|
|
3514
|
+
const el = pick(e.target);
|
|
3515
|
+
if (!el) return;
|
|
3516
|
+
e.preventDefault();
|
|
3517
|
+
e.stopPropagation();
|
|
3518
|
+
window.open(urlOf(el), 'pgkiln-builder');
|
|
3519
|
+
}, true);
|
|
3520
|
+
document.addEventListener('keydown', (e) => { if (on && e.key === 'Escape') set(false); });
|
|
3521
|
+
})();
|
package/public/builder.css
CHANGED
|
@@ -676,6 +676,11 @@ details.support-script pre.source { margin-top: 0.4rem; white-space: pre-wrap; o
|
|
|
676
676
|
|
|
677
677
|
/* (sprint 34) working copies: differences and conflicts */
|
|
678
678
|
pre.diff { max-height: 32rem; overflow: auto; background: var(--code-bg); padding: 0.6rem; font-size: 0.82rem; white-space: pre; }
|
|
679
|
+
pre.diff .diff-add { color: var(--success, #1a7f37); }
|
|
680
|
+
pre.diff .diff-del { color: var(--danger, #cf222e); }
|
|
681
|
+
/* (sprint 56) SQL Workshop → Schema Comparison */
|
|
682
|
+
.compare-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 0.35rem; }
|
|
683
|
+
.compare-list summary { cursor: pointer; overflow-wrap: anywhere; }
|
|
679
684
|
tr.row-conflict > td:first-child { border-left: 3px solid var(--warn); }
|
|
680
685
|
.badge.badge-warn { background: var(--warning-soft); color: var(--text); }
|
|
681
686
|
.publish-buttons .btn { white-space: normal; overflow-wrap: anywhere; max-width: 100%; text-align: left; }
|
|
@@ -759,3 +764,20 @@ button.is-busy { opacity: 0.7; cursor: progress; }
|
|
|
759
764
|
.icon-choice .icon { width: 20px; height: 20px; }
|
|
760
765
|
.icon-none { font-size: 18px; line-height: 20px; color: var(--muted); }
|
|
761
766
|
.icon-name { font-size: 10.5px; color: var(--muted); overflow-wrap: anywhere; line-height: 1.2; }
|
|
767
|
+
|
|
768
|
+
/* Mail services: one provider's settings in groups, at a readable width */
|
|
769
|
+
.mail-form-page { max-width: 960px; }
|
|
770
|
+
.mail-service-form .prop-group { margin: 0 0 16px; }
|
|
771
|
+
details.prop-group-more { border: 1px solid var(--border); border-radius: 4px; padding: 8px 12px; margin: 0 0 16px; }
|
|
772
|
+
details.prop-group-more > summary { cursor: pointer; font-weight: 600; }
|
|
773
|
+
details.prop-group-more[open] > summary { margin-bottom: 8px; }
|
|
774
|
+
.provider-switch { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 8px; margin-bottom: 16px; }
|
|
775
|
+
.provider-switch .field { margin: 0; min-width: min(100%, 280px); }
|
|
776
|
+
.mail-check-buttons { margin: 4px 0 14px; }
|
|
777
|
+
.mail-check-result:not(:empty) { margin-top: 8px; }
|
|
778
|
+
/* (sprint 59) Page Designer: the help pane under the properties */
|
|
779
|
+
.pe-help { border-top: 1px solid var(--border); margin-top: 0.75rem; padding: 0.5rem 0.75rem; }
|
|
780
|
+
.pe-help summary { cursor: pointer; font-weight: 600; display: flex; align-items: center; gap: 0.35rem; }
|
|
781
|
+
.pe-help-body { padding-top: 0.4rem; overflow-wrap: anywhere; }
|
|
782
|
+
.pe-help-body h3 { font-size: 0.95rem; margin: 0 0 0.3rem; }
|
|
783
|
+
.pe-help-body p { margin: 0 0 0.4rem; }
|