@fieldia/core 0.31.1 → 0.32.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 +9 -1
- package/src/lib/format/page.d.mts +6 -1
- package/src/lib/format/page.d.ts +6 -1
- package/src/lib/format/phone.d.mts +8 -0
- package/src/lib/format/phone.d.ts +8 -0
- package/src/lib/format/phone.js +7 -2
- package/src/lib/format/phone.js.map +1 -1
- package/src/lib/format/phone.mjs +7 -2
- package/src/lib/format/phone.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/README.md
CHANGED
|
@@ -28,7 +28,7 @@ list of records — that your app implements;
|
|
|
28
28
|
The page format is also a JSON Schema, for editors and other languages:
|
|
29
29
|
`@fieldia/core/page.schema.json`.
|
|
30
30
|
|
|
31
|
-
A page says which format it is written in (`"fieldia": "0.
|
|
31
|
+
A page says which format it is written in (`"fieldia": "0.11"`, `FORMAT_VERSION`; a page in 0.1, 0.2, 0.3, 0.4, 0.5, 0.6, 0.7, 0.8, 0.9 or 0.10 is read as it is).
|
|
32
32
|
One in an older format is brought up to date as it is read — by `checkPage`,
|
|
33
33
|
`validatePage` and `createForm`, so by the viewer and the designer too — and
|
|
34
34
|
`upgradePage` does it for the pages your app keeps. One newer than this Fieldia
|
package/package.json
CHANGED
package/schema/page.schema.json
CHANGED
|
@@ -14,7 +14,8 @@
|
|
|
14
14
|
"0.7",
|
|
15
15
|
"0.8",
|
|
16
16
|
"0.9",
|
|
17
|
-
"0.10"
|
|
17
|
+
"0.10",
|
|
18
|
+
"0.11"
|
|
18
19
|
]
|
|
19
20
|
},
|
|
20
21
|
"id": {
|
|
@@ -10955,6 +10956,13 @@
|
|
|
10955
10956
|
"international",
|
|
10956
10957
|
"national"
|
|
10957
10958
|
]
|
|
10959
|
+
},
|
|
10960
|
+
"countries": {
|
|
10961
|
+
"type": "string",
|
|
10962
|
+
"enum": [
|
|
10963
|
+
"list",
|
|
10964
|
+
"native"
|
|
10965
|
+
]
|
|
10958
10966
|
}
|
|
10959
10967
|
},
|
|
10960
10968
|
"additionalProperties": false
|
|
@@ -301,7 +301,7 @@ export declare const PageDataSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
|
301
301
|
}, z.core.$strict>], "kind">;
|
|
302
302
|
export declare const PageSchema: z.ZodObject<{
|
|
303
303
|
fieldia: z.ZodEnum<{
|
|
304
|
-
|
|
304
|
+
0.11: "0.11";
|
|
305
305
|
0.1: "0.1";
|
|
306
306
|
0.2: "0.2";
|
|
307
307
|
0.3: "0.3";
|
|
@@ -311,6 +311,7 @@ export declare const PageSchema: z.ZodObject<{
|
|
|
311
311
|
0.7: "0.7";
|
|
312
312
|
0.8: "0.8";
|
|
313
313
|
0.9: "0.9";
|
|
314
|
+
"0.10": "0.10";
|
|
314
315
|
}>;
|
|
315
316
|
id: z.ZodString;
|
|
316
317
|
title: z.ZodOptional<z.ZodString>;
|
|
@@ -9363,6 +9364,10 @@ export declare const PageSchema: z.ZodObject<{
|
|
|
9363
9364
|
international: "international";
|
|
9364
9365
|
national: "national";
|
|
9365
9366
|
}>>;
|
|
9367
|
+
countries: z.ZodOptional<z.ZodEnum<{
|
|
9368
|
+
list: "list";
|
|
9369
|
+
native: "native";
|
|
9370
|
+
}>>;
|
|
9366
9371
|
}, z.core.$strict>>;
|
|
9367
9372
|
timeZone: z.ZodOptional<z.ZodString & z.ZodType<string, string, z.core.$ZodTypeInternals<string, string>>>;
|
|
9368
9373
|
print: z.ZodOptional<z.ZodObject<{
|
package/src/lib/format/page.d.ts
CHANGED
|
@@ -301,7 +301,7 @@ export declare const PageDataSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
|
301
301
|
}, z.z.core.$strict>], "kind">;
|
|
302
302
|
export declare const PageSchema: z.ZodObject<{
|
|
303
303
|
fieldia: z.ZodEnum<{
|
|
304
|
-
|
|
304
|
+
0.11: "0.11";
|
|
305
305
|
0.1: "0.1";
|
|
306
306
|
0.2: "0.2";
|
|
307
307
|
0.3: "0.3";
|
|
@@ -311,6 +311,7 @@ export declare const PageSchema: z.ZodObject<{
|
|
|
311
311
|
0.7: "0.7";
|
|
312
312
|
0.8: "0.8";
|
|
313
313
|
0.9: "0.9";
|
|
314
|
+
"0.10": "0.10";
|
|
314
315
|
}>;
|
|
315
316
|
id: z.ZodString;
|
|
316
317
|
title: z.ZodOptional<z.ZodString>;
|
|
@@ -9363,6 +9364,10 @@ export declare const PageSchema: z.ZodObject<{
|
|
|
9363
9364
|
international: "international";
|
|
9364
9365
|
national: "national";
|
|
9365
9366
|
}>>;
|
|
9367
|
+
countries: z.ZodOptional<z.ZodEnum<{
|
|
9368
|
+
list: "list";
|
|
9369
|
+
native: "native";
|
|
9370
|
+
}>>;
|
|
9366
9371
|
}, z.z.core.$strict>>;
|
|
9367
9372
|
timeZone: z.ZodOptional<z.ZodString & z.ZodType<string, string, z.z.core.$ZodTypeInternals<string, string>>>;
|
|
9368
9373
|
print: z.ZodOptional<z.ZodObject<{
|
|
@@ -6,6 +6,10 @@ export declare const PagePhoneSchema: z.ZodObject<{
|
|
|
6
6
|
international: "international";
|
|
7
7
|
national: "national";
|
|
8
8
|
}>>;
|
|
9
|
+
countries: z.ZodOptional<z.ZodEnum<{
|
|
10
|
+
list: "list";
|
|
11
|
+
native: "native";
|
|
12
|
+
}>>;
|
|
9
13
|
}, z.core.$strict>;
|
|
10
14
|
export type PagePhone = z.infer<typeof PagePhoneSchema>;
|
|
11
15
|
/** A phone field's own: the page's settings, for this field. Its other options stay as they are. */
|
|
@@ -15,6 +19,10 @@ export declare const PhoneOptionsSchema: z.ZodObject<{
|
|
|
15
19
|
international: "international";
|
|
16
20
|
national: "national";
|
|
17
21
|
}>>;
|
|
22
|
+
countries: z.ZodOptional<z.ZodEnum<{
|
|
23
|
+
list: "list";
|
|
24
|
+
native: "native";
|
|
25
|
+
}>>;
|
|
18
26
|
}, z.core.$strip>;
|
|
19
27
|
export type PhoneOptions = z.infer<typeof PhoneOptionsSchema>;
|
|
20
28
|
/** The issues of a phone field's settings, each at its path under `options`. */
|
|
@@ -6,6 +6,10 @@ export declare const PagePhoneSchema: z.ZodObject<{
|
|
|
6
6
|
international: "international";
|
|
7
7
|
national: "national";
|
|
8
8
|
}>>;
|
|
9
|
+
countries: z.ZodOptional<z.ZodEnum<{
|
|
10
|
+
list: "list";
|
|
11
|
+
native: "native";
|
|
12
|
+
}>>;
|
|
9
13
|
}, z.z.core.$strict>;
|
|
10
14
|
export type PagePhone = z.infer<typeof PagePhoneSchema>;
|
|
11
15
|
/** A phone field's own: the page's settings, for this field. Its other options stay as they are. */
|
|
@@ -15,6 +19,10 @@ export declare const PhoneOptionsSchema: z.ZodObject<{
|
|
|
15
19
|
international: "international";
|
|
16
20
|
national: "national";
|
|
17
21
|
}>>;
|
|
22
|
+
countries: z.ZodOptional<z.ZodEnum<{
|
|
23
|
+
list: "list";
|
|
24
|
+
native: "native";
|
|
25
|
+
}>>;
|
|
18
26
|
}, z.z.core.$strip>;
|
|
19
27
|
export type PhoneOptions = z.infer<typeof PhoneOptionsSchema>;
|
|
20
28
|
/** The issues of a phone field's settings, each at its path under `options`. */
|
package/src/lib/format/phone.js
CHANGED
|
@@ -15,19 +15,23 @@ const jitless_1 = require("./jitless");
|
|
|
15
15
|
* neither keeps its phone fields as text boxes, as before. `country` is the one a number typed without its + is read
|
|
16
16
|
* in, by its ISO code — never assumed: left out, a number is written with its + and country code, or its country
|
|
17
17
|
* picked beside it. `shown` writes a number at rest abroad's way ("+20 10 1234 5678", the default) or at home's
|
|
18
|
-
* ("010 1234 5678") — a number of another country always abroad's.
|
|
18
|
+
* ("010 1234 5678") — a number of another country always abroad's. `countries` says how the country is picked: from
|
|
19
|
+
* Fieldia's own list, found by typing a country's name, its code or its dialling code ("list", the default), or from
|
|
20
|
+
* the browser's own list of every country ("native"), for an app that would rather have the system's picker.
|
|
19
21
|
*
|
|
20
22
|
* "phone": { "country": "EG", "shown": "national" }
|
|
21
|
-
* { "field": "mobile", "widget": "phone", "options": { "country": "AE" } }
|
|
23
|
+
* { "field": "mobile", "widget": "phone", "options": { "country": "AE", "countries": "native" } }
|
|
22
24
|
*/
|
|
23
25
|
const COUNTRY = /^[A-Z]{2}$/;
|
|
24
26
|
const country = z.string().regex(COUNTRY, 'a country is its ISO code in capitals, such as "EG"');
|
|
25
27
|
const shown = z.enum(['international', 'national'], { error: 'shown is "international" (+20 10 1234 5678) or "national" (010 1234 5678)' });
|
|
28
|
+
const countries = z.enum(['list', 'native'], { error: 'countries is "list" (Fieldia’s own, found by typing) or "native" (the browser’s own list)' });
|
|
26
29
|
/** A page's phone numbers: the country a number typed without its + is read in, and how a number is shown at rest. */
|
|
27
30
|
exports.PagePhoneSchema = z
|
|
28
31
|
.strictObject({
|
|
29
32
|
country: country.optional(),
|
|
30
33
|
shown: shown.optional(),
|
|
34
|
+
countries: countries.optional(),
|
|
31
35
|
})
|
|
32
36
|
.meta({ id: 'PagePhone' });
|
|
33
37
|
/** A phone field's own: the page's settings, for this field. Its other options stay as they are. */
|
|
@@ -35,6 +39,7 @@ exports.PhoneOptionsSchema = z
|
|
|
35
39
|
.object({
|
|
36
40
|
country: country.optional(),
|
|
37
41
|
shown: shown.optional(),
|
|
42
|
+
countries: countries.optional(),
|
|
38
43
|
})
|
|
39
44
|
.meta({ id: 'PhoneOptions' });
|
|
40
45
|
/** The issues of a phone field's settings, each at its path under `options`. */
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"phone.js","sourceRoot":"","sources":["../../../../../../libs/core/src/lib/format/phone.ts"],"names":[],"mappings":";;;
|
|
1
|
+
{"version":3,"file":"phone.js","sourceRoot":"","sources":["../../../../../../libs/core/src/lib/format/phone.ts"],"names":[],"mappings":";;;AAmDA,8CAGC;AAtDD,yBAAyB;AACzB,uCAA+C;AAE/C,oGAAoG;AACpG,IAAA,4BAAkB,GAAE,CAAC;AAErB;;;;;;;;;;;;;;;GAeG;AAEH,MAAM,OAAO,GAAG,YAAY,CAAC;AAC7B,MAAM,OAAO,GAAG,CAAC,CAAC,MAAM,EAAE,CAAC,KAAK,CAAC,OAAO,EAAE,qDAAqD,CAAC,CAAC;AACjG,MAAM,KAAK,GAAG,CAAC,CAAC,IAAI,CAAC,CAAC,eAAe,EAAE,UAAU,CAAC,EAAE,EAAE,KAAK,EAAE,2EAA2E,EAAE,CAAC,CAAC;AAC5I,MAAM,SAAS,GAAG,CAAC,CAAC,IAAI,CAAC,CAAC,MAAM,EAAE,QAAQ,CAAC,EAAE,EAAE,KAAK,EAAE,2FAA2F,EAAE,CAAC,CAAC;AAErJ,sHAAsH;AACzG,QAAA,eAAe,GAAG,CAAC;KAC7B,YAAY,CAAC;IACZ,OAAO,EAAE,OAAO,CAAC,QAAQ,EAAE;IAC3B,KAAK,EAAE,KAAK,CAAC,QAAQ,EAAE;IACvB,SAAS,EAAE,SAAS,CAAC,QAAQ,EAAE;CAChC,CAAC;KACD,IAAI,CAAC,EAAE,EAAE,EAAE,WAAW,EAAE,CAAC,CAAC;AAI7B,oGAAoG;AACvF,QAAA,kBAAkB,GAAG,CAAC;KAChC,MAAM,CAAC;IACN,OAAO,EAAE,OAAO,CAAC,QAAQ,EAAE;IAC3B,KAAK,EAAE,KAAK,CAAC,QAAQ,EAAE;IACvB,SAAS,EAAE,SAAS,CAAC,QAAQ,EAAE;CAChC,CAAC;KACD,IAAI,CAAC,EAAE,EAAE,EAAE,cAAc,EAAE,CAAC,CAAC;AAIhC,gFAAgF;AAChF,SAAgB,iBAAiB,CAAC,IAA4D;IAC5F,IAAI,IAAI,CAAC,MAAM,KAAK,OAAO;QAAE,OAAO,EAAE,CAAC;IACvC,OAAO,CAAC,0BAAkB,CAAC,SAAS,CAAC,IAAI,CAAC,OAAO,IAAI,EAAE,CAAC,CAAC,KAAK,EAAE,MAAM,IAAI,EAAE,CAAC,CAAC,GAAG,CAAC,CAAC,KAAK,EAAE,EAAE,CAAC,CAAC,EAAE,OAAO,EAAE,KAAK,CAAC,OAAO,EAAE,IAAI,EAAE,CAAC,SAAS,EAAE,GAAG,KAAK,CAAC,IAAI,CAAwB,EAAE,CAAC,CAAC,CAAC;AACtL,CAAC"}
|
package/src/lib/format/phone.mjs
CHANGED
|
@@ -11,19 +11,23 @@ makeSchemasJitless();
|
|
|
11
11
|
* neither keeps its phone fields as text boxes, as before. `country` is the one a number typed without its + is read
|
|
12
12
|
* in, by its ISO code — never assumed: left out, a number is written with its + and country code, or its country
|
|
13
13
|
* picked beside it. `shown` writes a number at rest abroad's way ("+20 10 1234 5678", the default) or at home's
|
|
14
|
-
* ("010 1234 5678") — a number of another country always abroad's.
|
|
14
|
+
* ("010 1234 5678") — a number of another country always abroad's. `countries` says how the country is picked: from
|
|
15
|
+
* Fieldia's own list, found by typing a country's name, its code or its dialling code ("list", the default), or from
|
|
16
|
+
* the browser's own list of every country ("native"), for an app that would rather have the system's picker.
|
|
15
17
|
*
|
|
16
18
|
* "phone": { "country": "EG", "shown": "national" }
|
|
17
|
-
* { "field": "mobile", "widget": "phone", "options": { "country": "AE" } }
|
|
19
|
+
* { "field": "mobile", "widget": "phone", "options": { "country": "AE", "countries": "native" } }
|
|
18
20
|
*/
|
|
19
21
|
const COUNTRY = /^[A-Z]{2}$/;
|
|
20
22
|
const country = z.string().regex(COUNTRY, 'a country is its ISO code in capitals, such as "EG"');
|
|
21
23
|
const shown = z.enum(['international', 'national'], { error: 'shown is "international" (+20 10 1234 5678) or "national" (010 1234 5678)' });
|
|
24
|
+
const countries = z.enum(['list', 'native'], { error: 'countries is "list" (Fieldia’s own, found by typing) or "native" (the browser’s own list)' });
|
|
22
25
|
/** A page's phone numbers: the country a number typed without its + is read in, and how a number is shown at rest. */
|
|
23
26
|
export const PagePhoneSchema = z
|
|
24
27
|
.strictObject({
|
|
25
28
|
country: country.optional(),
|
|
26
29
|
shown: shown.optional(),
|
|
30
|
+
countries: countries.optional(),
|
|
27
31
|
})
|
|
28
32
|
.meta({ id: 'PagePhone' });
|
|
29
33
|
/** A phone field's own: the page's settings, for this field. Its other options stay as they are. */
|
|
@@ -31,6 +35,7 @@ export const PhoneOptionsSchema = z
|
|
|
31
35
|
.object({
|
|
32
36
|
country: country.optional(),
|
|
33
37
|
shown: shown.optional(),
|
|
38
|
+
countries: countries.optional(),
|
|
34
39
|
})
|
|
35
40
|
.meta({ id: 'PhoneOptions' });
|
|
36
41
|
/** The issues of a phone field's settings, each at its path under `options`. */
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"phone.mjs","sourceRoot":"","sources":["../../../../../../libs/core/src/lib/format/phone.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,CAAC,MAAM,KAAK,CAAC;AACzB,OAAO,EAAE,kBAAkB,EAAE,MAAM,WAAW,CAAC;AAE/C,oGAAoG;AACpG,kBAAkB,EAAE,CAAC;AAErB
|
|
1
|
+
{"version":3,"file":"phone.mjs","sourceRoot":"","sources":["../../../../../../libs/core/src/lib/format/phone.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,CAAC,MAAM,KAAK,CAAC;AACzB,OAAO,EAAE,kBAAkB,EAAE,MAAM,WAAW,CAAC;AAE/C,oGAAoG;AACpG,kBAAkB,EAAE,CAAC;AAErB;;;;;;;;;;;;;;;GAeG;AAEH,MAAM,OAAO,GAAG,YAAY,CAAC;AAC7B,MAAM,OAAO,GAAG,CAAC,CAAC,MAAM,EAAE,CAAC,KAAK,CAAC,OAAO,EAAE,qDAAqD,CAAC,CA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AAC,CAAC,CAAC;AACtL,CAAC"}
|
|
@@ -39,7 +39,9 @@ export interface PageUpgrade {
|
|
|
39
39
|
* `loadChildren` and `gantt`, a date's `precision` and `hijri`, an option's `caption`, `icon` and `color`, a page's
|
|
40
40
|
* `quiz`, `review`, `flow`, `timeLimit`, `prefill`, `payment`, `outbox` and `templates`, a question's own `quiz`, a
|
|
41
41
|
* step's and a group's `order`, `draw` and `fixed`, a button's `undo` — so a 0.9 page is a 0.10 page as it
|
|
42
|
-
* is (and 0.10 is after 0.9: versions compare as numbers, `compareFormats`)
|
|
42
|
+
* is (and 0.10 is after 0.9: versions compare as numbers, `compareFormats`); and 0.11 (Fieldia 0.32) only added — how a
|
|
43
|
+
* phone's country is picked, a page's `phone.countries` and a phone field's `options.countries` ("list" or "native") —
|
|
44
|
+
* so a 0.10 page is a 0.11 page as it is. A release that renames or reshapes a setting adds a step here, with its example; one that only adds needs
|
|
43
45
|
* none: the page is the same, and upgradePage writes the new version in it.
|
|
44
46
|
*/
|
|
45
47
|
export declare const PAGE_UPGRADES: readonly PageUpgrade[];
|
|
@@ -39,7 +39,9 @@ export interface PageUpgrade {
|
|
|
39
39
|
* `loadChildren` and `gantt`, a date's `precision` and `hijri`, an option's `caption`, `icon` and `color`, a page's
|
|
40
40
|
* `quiz`, `review`, `flow`, `timeLimit`, `prefill`, `payment`, `outbox` and `templates`, a question's own `quiz`, a
|
|
41
41
|
* step's and a group's `order`, `draw` and `fixed`, a button's `undo` — so a 0.9 page is a 0.10 page as it
|
|
42
|
-
* is (and 0.10 is after 0.9: versions compare as numbers, `compareFormats`)
|
|
42
|
+
* is (and 0.10 is after 0.9: versions compare as numbers, `compareFormats`); and 0.11 (Fieldia 0.32) only added — how a
|
|
43
|
+
* phone's country is picked, a page's `phone.countries` and a phone field's `options.countries` ("list" or "native") —
|
|
44
|
+
* so a 0.10 page is a 0.11 page as it is. A release that renames or reshapes a setting adds a step here, with its example; one that only adds needs
|
|
43
45
|
* none: the page is the same, and upgradePage writes the new version in it.
|
|
44
46
|
*/
|
|
45
47
|
export declare const PAGE_UPGRADES: readonly PageUpgrade[];
|
|
@@ -26,7 +26,9 @@ const version_1 = require("./version");
|
|
|
26
26
|
* `loadChildren` and `gantt`, a date's `precision` and `hijri`, an option's `caption`, `icon` and `color`, a page's
|
|
27
27
|
* `quiz`, `review`, `flow`, `timeLimit`, `prefill`, `payment`, `outbox` and `templates`, a question's own `quiz`, a
|
|
28
28
|
* step's and a group's `order`, `draw` and `fixed`, a button's `undo` — so a 0.9 page is a 0.10 page as it
|
|
29
|
-
* is (and 0.10 is after 0.9: versions compare as numbers, `compareFormats`)
|
|
29
|
+
* is (and 0.10 is after 0.9: versions compare as numbers, `compareFormats`); and 0.11 (Fieldia 0.32) only added — how a
|
|
30
|
+
* phone's country is picked, a page's `phone.countries` and a phone field's `options.countries` ("list" or "native") —
|
|
31
|
+
* so a 0.10 page is a 0.11 page as it is. A release that renames or reshapes a setting adds a step here, with its example; one that only adds needs
|
|
30
32
|
* none: the page is the same, and upgradePage writes the new version in it.
|
|
31
33
|
*/
|
|
32
34
|
exports.PAGE_UPGRADES = [];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"upgrade.js","sourceRoot":"","sources":["../../../../../../libs/core/src/lib/format/upgrade.ts"],"names":[],"mappings":";;;
|
|
1
|
+
{"version":3,"file":"upgrade.js","sourceRoot":"","sources":["../../../../../../libs/core/src/lib/format/upgrade.ts"],"names":[],"mappings":";;;AAiEA,kCAYC;AA7ED,uCAA4D;AAiB5D;;;;;;;;;;;;;;;;;;;;;;;;;;;GA2BG;AACU,QAAA,aAAa,GAA2B,EAAE,CAAC;AAQxD,MAAM,QAAQ,GAAG,CAAC,KAAc,EAAqB,EAAE,CAAC,KAAK,KAAK,IAAI,IAAI,OAAO,KAAK,KAAK,QAAQ,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC;AAE7H;;;;;;;;;GASG;AACH,SAAgB,WAAW,CAA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 import { compareFormats, FORMAT_VERSIONS } from './version.mjs';
|
|
|
22
22
|
* `loadChildren` and `gantt`, a date's `precision` and `hijri`, an option's `caption`, `icon` and `color`, a page's
|
|
23
23
|
* `quiz`, `review`, `flow`, `timeLimit`, `prefill`, `payment`, `outbox` and `templates`, a question's own `quiz`, a
|
|
24
24
|
* step's and a group's `order`, `draw` and `fixed`, a button's `undo` — so a 0.9 page is a 0.10 page as it
|
|
25
|
-
* is (and 0.10 is after 0.9: versions compare as numbers, `compareFormats`)
|
|
25
|
+
* is (and 0.10 is after 0.9: versions compare as numbers, `compareFormats`); and 0.11 (Fieldia 0.32) only added — how a
|
|
26
|
+
* phone's country is picked, a page's `phone.countries` and a phone field's `options.countries` ("list" or "native") —
|
|
27
|
+
* so a 0.10 page is a 0.11 page as it is. A release that renames or reshapes a setting adds a step here, with its example; one that only adds needs
|
|
26
28
|
* none: the page is the same, and upgradePage writes the new version in it.
|
|
27
29
|
*/
|
|
28
30
|
export const PAGE_UPGRADES = [];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"upgrade.mjs","sourceRoot":"","sources":["../../../../../../libs/core/src/lib/format/upgrade.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,eAAe,EAAE,MAAM,WAAW,CAAC;AAiB5D
|
|
1
|
+
{"version":3,"file":"upgrade.mjs","sourceRoot":"","sources":["../../../../../../libs/core/src/lib/format/upgrade.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,eAAe,EAAE,MAAM,WAAW,CAAC;AAiB5D;;;;;;;;;;;;;;;;;;;;;;;;;;;GA2BG;AACH,MAAM,CAAC,MAAM,aAAa,GAA2B,EAAE,CAAC;AAQxD,MAAM,QAAQ,GAAG,CAAC,KAAc,EAAqB,EAAE,CAAC,KAAK,KAAK,IAAI,IAAI,OAAO,KAAK,KAAK,QAAQ,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC;AAE7H;;;;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|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
/** The page format version this build reads and writes. */
|
|
2
|
-
export declare const FORMAT_VERSION: "0.
|
|
2
|
+
export declare const FORMAT_VERSION: "0.11";
|
|
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 declare const FORMAT_VERSIONS: readonly ["0.1", "0.2", "0.3", "0.4", "0.5", "0.6", "0.7", "0.8", "0.9", "0.10"];
|
|
8
|
+
export declare const FORMAT_VERSIONS: readonly ["0.1", "0.2", "0.3", "0.4", "0.5", "0.6", "0.7", "0.8", "0.9", "0.10", "0.11"];
|
|
9
9
|
/** A format Fieldia has had: a page may say any of them, and is read in the current one. */
|
|
10
10
|
export type FormatVersion = (typeof FORMAT_VERSIONS)[number];
|
|
11
11
|
/** Which of two format versions is newer: below 0 when `a` is older, 0 when they are the same, null when either is not a version. */
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
/** The page format version this build reads and writes. */
|
|
2
|
-
export declare const FORMAT_VERSION: "0.
|
|
2
|
+
export declare const FORMAT_VERSION: "0.11";
|
|
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 declare const FORMAT_VERSIONS: readonly ["0.1", "0.2", "0.3", "0.4", "0.5", "0.6", "0.7", "0.8", "0.9", "0.10"];
|
|
8
|
+
export declare const FORMAT_VERSIONS: readonly ["0.1", "0.2", "0.3", "0.4", "0.5", "0.6", "0.7", "0.8", "0.9", "0.10", "0.11"];
|
|
9
9
|
/** A format Fieldia has had: a page may say any of them, and is read in the current one. */
|
|
10
10
|
export type FormatVersion = (typeof FORMAT_VERSIONS)[number];
|
|
11
11
|
/** Which of two format versions is newer: below 0 when `a` is older, 0 when they are the same, null when either is not a version. */
|
|
@@ -4,13 +4,13 @@ exports.FORMAT_VERSIONS = exports.FORMAT_VERSION = void 0;
|
|
|
4
4
|
exports.compareFormats = compareFormats;
|
|
5
5
|
exports.formatProblem = formatProblem;
|
|
6
6
|
/** The page format version this build reads and writes. */
|
|
7
|
-
exports.FORMAT_VERSION = '0.
|
|
7
|
+
exports.FORMAT_VERSION = '0.11';
|
|
8
8
|
/**
|
|
9
9
|
* Every format Fieldia has had, oldest first; the last is FORMAT_VERSION. A page in an older one is brought up to date
|
|
10
10
|
* by `upgradePage`, step by step (`PAGE_UPGRADES`), wherever it is read: `checkPage`, `validatePage`, the viewer, the
|
|
11
11
|
* designer. A release that changes what a page may say adds its version here (see the format's docs, "Versions").
|
|
12
12
|
*/
|
|
13
|
-
exports.FORMAT_VERSIONS = ['0.1', '0.2', '0.3', '0.4', '0.5', '0.6', '0.7', '0.8', '0.9', '0.10'];
|
|
13
|
+
exports.FORMAT_VERSIONS = ['0.1', '0.2', '0.3', '0.4', '0.5', '0.6', '0.7', '0.8', '0.9', '0.10', '0.11'];
|
|
14
14
|
/** `major.minor` as two numbers, or null when it is not a version at all. */
|
|
15
15
|
function parts(version) {
|
|
16
16
|
const match = typeof version === 'string' ? /^(\d+)\.(\d+)$/.exec(version) : null;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"version.js","sourceRoot":"","sources":["../../../../../../libs/core/src/lib/format/version.ts"],"names":[],"mappings":";;;AAoBA,wCAIC;AAMD,sCAQC;AAtCD,2DAA2D;AAC9C,QAAA,cAAc,GAAG,MAAe,CAAC;AAE9C;;;;GAIG;AACU,QAAA,eAAe,GAAG,CAAC,K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,CAAC;AAED;;;GAGG;AACH,SAAgB,aAAa,CAAC,OAAgB,EAAE,WAA8B,uBAAe;IAC3F,MAAM,OAAO,GAAG,QAAQ,CAAC,QAAQ,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC;IAC9C,IAAI,OAAO,KAAK,OAAO;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"}
|
|
@@ -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.11';
|
|
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', '0.9', '0.10'];
|
|
8
|
+
export const FORMAT_VERSIONS = ['0.1', '0.2', '0.3', '0.4', '0.5', '0.6', '0.7', '0.8', '0.9', '0.10', '0.11'];
|
|
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,MAAe,CAAC;AAE9C;;;;GAIG;AACH,MAAM,CAAC,MAAM,eAAe,GAAG,CAAC,KAAK,EAAE,KAAK,EAAE,KAAK,EAAE,KAAK,EAAE,KAAK,EAAE,KAAK,EAAE,KAAK,EAAE,KAAK,EAAE,KAAK,EAAE,MAAM,CAAsC,CAAC;
|
|
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,MAAe,CAAC;AAE9C;;;;GAIG;AACH,MAAM,CAAC,MAAM,eAAe,GAAG,CAAC,KAAK,EAAE,KAAK,EAAE,KAAK,EAAE,KAAK,EAAE,KAAK,EAAE,KAAK,EAAE,KAAK,EAAE,KAAK,EAAE,KAAK,EAAE,MAAM,EAAE,MAAM,CAAsC,CAAC;AAKpJ,6EAA6E;AAC7E,SAAS,KAAK,CAAC,OAAgB;IAC7B,MAAM,KAAK,GAAG,OAAO,OAAO,KAAK,QAAQ,CAAC,CAAC,CAAC,gBAAgB,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC;IAClF,OAAO,KAAK,CAAC,CAAC,CAAC,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,EAAE,MAAM,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC;AAC7D,CAAC;AAED,qIAAqI;AACrI,MAAM,UAAU,cAAc,CAAC,CAAU,EAAE,CAAU;IACnD,MAAM,CAAC,CAAC,EAAE,CAAC,CAA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