@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
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
/** The page format version this build reads and writes. */
|
|
2
|
-
export const FORMAT_VERSION = '0.
|
|
2
|
+
export const FORMAT_VERSION = '0.9';
|
|
3
3
|
/**
|
|
4
4
|
* Every format Fieldia has had, oldest first; the last is FORMAT_VERSION. A page in an older one is brought up to date
|
|
5
5
|
* by `upgradePage`, step by step (`PAGE_UPGRADES`), wherever it is read: `checkPage`, `validatePage`, the viewer, the
|
|
6
6
|
* designer. A release that changes what a page may say adds its version here (see the format's docs, "Versions").
|
|
7
7
|
*/
|
|
8
|
-
export const FORMAT_VERSIONS = ['0.1', '0.2', '0.3', '0.4', '0.5', '0.6', '0.7', '0.8'];
|
|
8
|
+
export const FORMAT_VERSIONS = ['0.1', '0.2', '0.3', '0.4', '0.5', '0.6', '0.7', '0.8', '0.9'];
|
|
9
9
|
/** `major.minor` as two numbers, or null when it is not a version at all. */
|
|
10
10
|
function parts(version) {
|
|
11
11
|
const match = typeof version === 'string' ? /^(\d+)\.(\d+)$/.exec(version) : null;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"version.mjs","sourceRoot":"","sources":["../../../../../../libs/core/src/lib/format/version.ts"],"names":[],"mappings":"AAAA,2DAA2D;AAC3D,MAAM,CAAC,MAAM,cAAc,GAAG,KAAc,CAAC;AAE7C;;;;GAIG;AACH,MAAM,CAAC,MAAM,eAAe,GAAG,CAAC,KAAK,EAAE,KAAK,EAAE,KAAK,EAAE,KAAK,EAAE,KAAK,EAAE,KAAK,EAAE,KAAK,EAAE,KAAK,CAAsC,CAAC;
|
|
1
|
+
{"version":3,"file":"version.mjs","sourceR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QAAE,OAAO,IAAI,CAAC;IACrC,MAAM,QAAQ,GAAG,cAAc,CAAC,OAAO,EAAE,OAAO,CAAC,CAAC;IAClD,IAAI,QAAQ,KAAK,IAAI;QAAE,OAAO,wDAAwD,OAAO,oBAAoB,CAAC;IAClH,IAAI,QAAQ,GAAG,CAAC;QAAE,OAAO,0BAA0B,OAAiB,oCAAoC,OAAO,8BAA8B,CAAC;IAC9I,IAAI,QAAQ,CAAC,QAAQ,CAAC,OAAiB,CAAC;QAAE,OAAO,0BAA0B,OAAiB,oCAAoC,OAAO,EAAE,CAAC;IAC1I,OAAO,UAAU,OAAiB,mDAAmD,OAAO,EAAE,CAAC;AACjG,CAAC"}
|
package/src/lib/record/form.js
CHANGED
|
@@ -3646,7 +3646,14 @@ function indexLayout(root, functions) {
|
|
|
3646
3646
|
...(does.length ? { does } : {}),
|
|
3647
3647
|
source,
|
|
3648
3648
|
});
|
|
3649
|
-
// A
|
|
3649
|
+
// A menu's built-in Archive shows while the record is active, Unarchive while it is not.
|
|
3650
|
+
const builtin = source.builtin;
|
|
3651
|
+
if (builtin === 'archive' || builtin === 'unarchive') {
|
|
3652
|
+
const own = index.get(source.id);
|
|
3653
|
+
const mine = own.invisible;
|
|
3654
|
+
own.invisible = { ...mine, evaluate: (context, env) => (context['active'] === false) !== (builtin === 'unarchive') || mine.evaluate(context, env) };
|
|
3655
|
+
}
|
|
3656
|
+
// A button's menu, and a menu inside a menu: each item a button of the record, hidden with it.
|
|
3650
3657
|
if (kind === 'button')
|
|
3651
3658
|
for (const item of source.menu ?? [])
|
|
3652
3659
|
add(item, source.id, 'button', { invisible: item.invisible });
|
|
@@ -3755,16 +3762,10 @@ function indexLayout(root, functions) {
|
|
|
3755
3762
|
walk(head?.band?.children ?? [], root.id);
|
|
3756
3763
|
if (root.sidePanel)
|
|
3757
3764
|
add(root.sidePanel, root.id, 'other', { invisible: root.sidePanel.invisible });
|
|
3758
|
-
// The gear menu's items are buttons of the record
|
|
3759
|
-
|
|
3765
|
+
// The gear menu's items are buttons of the record — those of a menu inside it too, hidden with the item that opens
|
|
3766
|
+
// it (add's own); Archive shows while it is active, Unarchive while it is not.
|
|
3767
|
+
for (const item of root.toolbar?.menu ?? [])
|
|
3760
3768
|
add(item, root.id, 'button', { invisible: item.invisible });
|
|
3761
|
-
if (item.builtin === 'archive' || item.builtin === 'unarchive') {
|
|
3762
|
-
const own = index.get(item.id);
|
|
3763
|
-
const mine = own.invisible;
|
|
3764
|
-
const archived = item.builtin === 'unarchive';
|
|
3765
|
-
own.invisible = { ...mine, evaluate: (context, env) => (context['active'] === false) !== archived || mine.evaluate(context, env) };
|
|
3766
|
-
}
|
|
3767
|
-
}
|
|
3768
3769
|
if (root.attachmentPreview)
|
|
3769
3770
|
add({ id: '#preview', ...root.attachmentPreview }, root.id, 'other', { invisible: root.attachmentPreview.invisible });
|
|
3770
3771
|
}
|