@fieldia/core 0.29.0 → 0.30.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 +1 -1
- package/package.json +1 -1
- package/schema/page.schema.json +17 -1
- package/src/lib/format/head-checks.d.mts +10 -2
- package/src/lib/format/head-checks.d.ts +10 -2
- package/src/lib/format/head-checks.js +9 -2
- package/src/lib/format/head-checks.js.map +1 -1
- package/src/lib/format/head-checks.mjs +10 -4
- package/src/lib/format/head-checks.mjs.map +1 -1
- package/src/lib/format/layout.d.mts +29 -0
- package/src/lib/format/layout.d.ts +29 -0
- package/src/lib/format/layout.js +5 -0
- package/src/lib/format/layout.js.map +1 -1
- package/src/lib/format/layout.mjs +5 -0
- package/src/lib/format/layout.mjs.map +1 -1
- package/src/lib/format/page.d.mts +5 -1
- package/src/lib/format/page.d.ts +5 -1
- package/src/lib/format/references.d.mts +3 -1
- package/src/lib/format/references.d.ts +3 -1
- package/src/lib/format/references.js +10 -13
- package/src/lib/format/references.js.map +1 -1
- package/src/lib/format/references.mjs +11 -14
- package/src/lib/format/references.mjs.map +1 -1
- package/src/lib/format/sheet-head-checks.d.mts +10 -2
- package/src/lib/format/sheet-head-checks.d.ts +10 -2
- package/src/lib/format/sheet-head-checks.js +24 -0
- package/src/lib/format/sheet-head-checks.js.map +1 -1
- package/src/lib/format/sheet-head-checks.mjs +23 -0
- package/src/lib/format/sheet-head-checks.mjs.map +1 -1
- package/src/lib/format/upgrade.d.mts +3 -1
- package/src/lib/format/upgrade.d.ts +3 -1
- package/src/lib/format/upgrade.js +3 -1
- package/src/lib/format/upgrade.js.map +1 -1
- package/src/lib/format/upgrade.mjs +3 -1
- package/src/lib/format/upgrade.mjs.map +1 -1
- package/src/lib/format/version.d.mts +2 -2
- package/src/lib/format/version.d.ts +2 -2
- package/src/lib/format/version.js +2 -2
- package/src/lib/format/version.js.map +1 -1
- package/src/lib/format/version.mjs +2 -2
- package/src/lib/format/version.mjs.map +1 -1
- package/src/lib/record/form.js +11 -10
- package/src/lib/record/form.js.map +1 -1
- package/src/lib/record/form.mjs +11 -10
- package/src/lib/record/form.mjs.map +1 -1
- package/src/lib/record/run.d.mts +6 -1
- package/src/lib/record/run.d.ts +6 -1
- package/src/lib/record/run.js.map +1 -1
- package/src/lib/record/run.mjs.map +1 -1
package/src/lib/record/form.mjs
CHANGED
|
@@ -3640,7 +3640,14 @@ function indexLayout(root, functions) {
|
|
|
3640
3640
|
...(does.length ? { does } : {}),
|
|
3641
3641
|
source,
|
|
3642
3642
|
});
|
|
3643
|
-
// A
|
|
3643
|
+
// A menu's built-in Archive shows while the record is active, Unarchive while it is not.
|
|
3644
|
+
const builtin = source.builtin;
|
|
3645
|
+
if (builtin === 'archive' || builtin === 'unarchive') {
|
|
3646
|
+
const own = index.get(source.id);
|
|
3647
|
+
const mine = own.invisible;
|
|
3648
|
+
own.invisible = { ...mine, evaluate: (context, env) => (context['active'] === false) !== (builtin === 'unarchive') || mine.evaluate(context, env) };
|
|
3649
|
+
}
|
|
3650
|
+
// A button's menu, and a menu inside a menu: each item a button of the record, hidden with it.
|
|
3644
3651
|
if (kind === 'button')
|
|
3645
3652
|
for (const item of source.menu ?? [])
|
|
3646
3653
|
add(item, source.id, 'button', { invisible: item.invisible });
|
|
@@ -3749,16 +3756,10 @@ function indexLayout(root, functions) {
|
|
|
3749
3756
|
walk(head?.band?.children ?? [], root.id);
|
|
3750
3757
|
if (root.sidePanel)
|
|
3751
3758
|
add(root.sidePanel, root.id, 'other', { invisible: root.sidePanel.invisible });
|
|
3752
|
-
// The gear menu's items are buttons of the record
|
|
3753
|
-
|
|
3759
|
+
// The gear menu's items are buttons of the record — those of a menu inside it too, hidden with the item that opens
|
|
3760
|
+
// it (add's own); Archive shows while it is active, Unarchive while it is not.
|
|
3761
|
+
for (const item of root.toolbar?.menu ?? [])
|
|
3754
3762
|
add(item, root.id, 'button', { invisible: item.invisible });
|
|
3755
|
-
if (item.builtin === 'archive' || item.builtin === 'unarchive') {
|
|
3756
|
-
const own = index.get(item.id);
|
|
3757
|
-
const mine = own.invisible;
|
|
3758
|
-
const archived = item.builtin === 'unarchive';
|
|
3759
|
-
own.invisible = { ...mine, evaluate: (context, env) => (context['active'] === false) !== archived || mine.evaluate(context, env) };
|
|
3760
|
-
}
|
|
3761
|
-
}
|
|
3762
3763
|
if (root.attachmentPreview)
|
|
3763
3764
|
add({ id: '#preview', ...root.attachmentPreview }, root.id, 'other', { invisible: root.attachmentPreview.invisible });
|
|
3764
3765
|
}
|