@fieldia/core 0.18.0 → 0.19.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/package.json +1 -1
- package/schema/page.schema.json +199 -2
- package/src/index.d.mts +2 -1
- package/src/index.d.ts +2 -1
- package/src/index.js +5 -1
- package/src/index.js.map +1 -1
- package/src/index.mjs +2 -1
- package/src/index.mjs.map +1 -1
- package/src/lib/format/address-search.d.mts +12 -0
- package/src/lib/format/address-search.d.ts +12 -0
- package/src/lib/format/address-search.js +32 -0
- package/src/lib/format/address-search.js.map +1 -0
- package/src/lib/format/address-search.mjs +29 -0
- package/src/lib/format/address-search.mjs.map +1 -0
- package/src/lib/format/card-lines.d.mts +16 -0
- package/src/lib/format/card-lines.d.ts +16 -0
- package/src/lib/format/card-lines.js +18 -0
- package/src/lib/format/card-lines.js.map +1 -0
- package/src/lib/format/card-lines.mjs +13 -0
- package/src/lib/format/card-lines.mjs.map +1 -0
- package/src/lib/format/field.d.mts +388 -0
- package/src/lib/format/field.d.ts +388 -0
- package/src/lib/format/field.js +28 -1
- package/src/lib/format/field.js.map +1 -1
- package/src/lib/format/field.mjs +27 -0
- package/src/lib/format/field.mjs.map +1 -1
- package/src/lib/format/layout.d.mts +454 -10
- package/src/lib/format/layout.d.ts +454 -10
- package/src/lib/format/layout.js +34 -3
- package/src/lib/format/layout.js.map +1 -1
- package/src/lib/format/layout.mjs +34 -3
- package/src/lib/format/layout.mjs.map +1 -1
- package/src/lib/format/page.d.mts +206 -1
- package/src/lib/format/page.d.ts +206 -1
- package/src/lib/format/page.js +2 -0
- package/src/lib/format/page.js.map +1 -1
- package/src/lib/format/page.mjs +2 -0
- package/src/lib/format/page.mjs.map +1 -1
- package/src/lib/format/references.d.mts +2 -0
- package/src/lib/format/references.d.ts +2 -0
- package/src/lib/format/references.js +35 -1
- package/src/lib/format/references.js.map +1 -1
- package/src/lib/format/references.mjs +35 -1
- package/src/lib/format/references.mjs.map +1 -1
- package/src/lib/format/themes.d.mts +10 -0
- package/src/lib/format/themes.d.ts +10 -0
- package/src/lib/format/themes.js +10 -1
- package/src/lib/format/themes.js.map +1 -1
- package/src/lib/format/themes.mjs +9 -0
- package/src/lib/format/themes.mjs.map +1 -1
- package/src/lib/format/translate.js +32 -5
- package/src/lib/format/translate.js.map +1 -1
- package/src/lib/format/translate.mjs +32 -5
- package/src/lib/format/translate.mjs.map +1 -1
- package/src/runtime.d.mts +5 -2
- package/src/runtime.d.ts +5 -2
- package/src/runtime.js +7 -1
- package/src/runtime.js.map +1 -1
- package/src/runtime.mjs +2 -0
- package/src/runtime.mjs.map +1 -1
package/package.json
CHANGED
package/schema/page.schema.json
CHANGED
|
@@ -294,6 +294,14 @@
|
|
|
294
294
|
}
|
|
295
295
|
},
|
|
296
296
|
"additionalProperties": false
|
|
297
|
+
},
|
|
298
|
+
"skin": {
|
|
299
|
+
"type": "string",
|
|
300
|
+
"enum": [
|
|
301
|
+
"underline",
|
|
302
|
+
"outlined",
|
|
303
|
+
"quiet"
|
|
304
|
+
]
|
|
297
305
|
}
|
|
298
306
|
},
|
|
299
307
|
"additionalProperties": false
|
|
@@ -666,6 +674,9 @@
|
|
|
666
674
|
"items": false,
|
|
667
675
|
"minItems": 2,
|
|
668
676
|
"maxItems": 2
|
|
677
|
+
},
|
|
678
|
+
"money": {
|
|
679
|
+
"$ref": "#/$defs/MoneyLook"
|
|
669
680
|
}
|
|
670
681
|
},
|
|
671
682
|
"required": [
|
|
@@ -1599,6 +1610,60 @@
|
|
|
1599
1610
|
}
|
|
1600
1611
|
]
|
|
1601
1612
|
},
|
|
1613
|
+
"MoneyLook": {
|
|
1614
|
+
"type": "object",
|
|
1615
|
+
"properties": {
|
|
1616
|
+
"currency": {
|
|
1617
|
+
"type": "string",
|
|
1618
|
+
"enum": [
|
|
1619
|
+
"symbol",
|
|
1620
|
+
"code"
|
|
1621
|
+
]
|
|
1622
|
+
},
|
|
1623
|
+
"at": {
|
|
1624
|
+
"type": "string",
|
|
1625
|
+
"enum": [
|
|
1626
|
+
"before",
|
|
1627
|
+
"after"
|
|
1628
|
+
]
|
|
1629
|
+
},
|
|
1630
|
+
"short": {
|
|
1631
|
+
"type": "boolean"
|
|
1632
|
+
},
|
|
1633
|
+
"home": {
|
|
1634
|
+
"type": "string",
|
|
1635
|
+
"pattern": "^[A-Z]{3}$"
|
|
1636
|
+
},
|
|
1637
|
+
"per": {
|
|
1638
|
+
"minItems": 1,
|
|
1639
|
+
"type": "array",
|
|
1640
|
+
"items": {
|
|
1641
|
+
"type": "object",
|
|
1642
|
+
"properties": {
|
|
1643
|
+
"period": {
|
|
1644
|
+
"type": "string",
|
|
1645
|
+
"enum": [
|
|
1646
|
+
"day",
|
|
1647
|
+
"night",
|
|
1648
|
+
"week",
|
|
1649
|
+
"month",
|
|
1650
|
+
"year"
|
|
1651
|
+
]
|
|
1652
|
+
},
|
|
1653
|
+
"when": {
|
|
1654
|
+
"type": "string",
|
|
1655
|
+
"minLength": 1
|
|
1656
|
+
}
|
|
1657
|
+
},
|
|
1658
|
+
"required": [
|
|
1659
|
+
"period"
|
|
1660
|
+
],
|
|
1661
|
+
"additionalProperties": false
|
|
1662
|
+
}
|
|
1663
|
+
}
|
|
1664
|
+
},
|
|
1665
|
+
"additionalProperties": false
|
|
1666
|
+
},
|
|
1602
1667
|
"Option": {
|
|
1603
1668
|
"type": "object",
|
|
1604
1669
|
"properties": {
|
|
@@ -2034,6 +2099,9 @@
|
|
|
2034
2099
|
"items": false,
|
|
2035
2100
|
"minItems": 2,
|
|
2036
2101
|
"maxItems": 2
|
|
2102
|
+
},
|
|
2103
|
+
"money": {
|
|
2104
|
+
"$ref": "#/$defs/MoneyLook"
|
|
2037
2105
|
}
|
|
2038
2106
|
},
|
|
2039
2107
|
"required": [
|
|
@@ -2673,6 +2741,9 @@
|
|
|
2673
2741
|
"items": false,
|
|
2674
2742
|
"minItems": 2,
|
|
2675
2743
|
"maxItems": 2
|
|
2744
|
+
},
|
|
2745
|
+
"money": {
|
|
2746
|
+
"$ref": "#/$defs/MoneyLook"
|
|
2676
2747
|
}
|
|
2677
2748
|
},
|
|
2678
2749
|
"required": [
|
|
@@ -3844,6 +3915,9 @@
|
|
|
3844
3915
|
"items": false,
|
|
3845
3916
|
"minItems": 2,
|
|
3846
3917
|
"maxItems": 2
|
|
3918
|
+
},
|
|
3919
|
+
"money": {
|
|
3920
|
+
"$ref": "#/$defs/MoneyLook"
|
|
3847
3921
|
}
|
|
3848
3922
|
},
|
|
3849
3923
|
"required": [
|
|
@@ -5752,6 +5826,13 @@
|
|
|
5752
5826
|
},
|
|
5753
5827
|
"required": {
|
|
5754
5828
|
"$ref": "#/$defs/Modifier"
|
|
5829
|
+
},
|
|
5830
|
+
"quiet": {
|
|
5831
|
+
"type": "boolean"
|
|
5832
|
+
},
|
|
5833
|
+
"readonlyReason": {
|
|
5834
|
+
"type": "string",
|
|
5835
|
+
"minLength": 1
|
|
5755
5836
|
}
|
|
5756
5837
|
},
|
|
5757
5838
|
"required": [
|
|
@@ -7024,6 +7105,13 @@
|
|
|
7024
7105
|
"items": {
|
|
7025
7106
|
"$ref": "#/$defs/LayoutNode"
|
|
7026
7107
|
}
|
|
7108
|
+
},
|
|
7109
|
+
"quiet": {
|
|
7110
|
+
"type": "boolean"
|
|
7111
|
+
},
|
|
7112
|
+
"readonlyReason": {
|
|
7113
|
+
"type": "string",
|
|
7114
|
+
"minLength": 1
|
|
7027
7115
|
}
|
|
7028
7116
|
},
|
|
7029
7117
|
"required": [
|
|
@@ -7326,6 +7414,9 @@
|
|
|
7326
7414
|
"widget": {
|
|
7327
7415
|
"type": "string",
|
|
7328
7416
|
"minLength": 1
|
|
7417
|
+
},
|
|
7418
|
+
"money": {
|
|
7419
|
+
"$ref": "#/$defs/MoneyLook"
|
|
7329
7420
|
}
|
|
7330
7421
|
},
|
|
7331
7422
|
"additionalProperties": false
|
|
@@ -7345,14 +7436,95 @@
|
|
|
7345
7436
|
"minItems": 1,
|
|
7346
7437
|
"type": "array",
|
|
7347
7438
|
"items": {
|
|
7348
|
-
"
|
|
7349
|
-
|
|
7439
|
+
"anyOf": [
|
|
7440
|
+
{
|
|
7441
|
+
"$ref": "#/$defs/CardPart"
|
|
7442
|
+
},
|
|
7443
|
+
{
|
|
7444
|
+
"minItems": 1,
|
|
7445
|
+
"type": "array",
|
|
7446
|
+
"items": {
|
|
7447
|
+
"$ref": "#/$defs/CardPart"
|
|
7448
|
+
}
|
|
7449
|
+
}
|
|
7450
|
+
]
|
|
7350
7451
|
}
|
|
7351
7452
|
},
|
|
7352
7453
|
"open": {
|
|
7353
7454
|
"type": "boolean"
|
|
7455
|
+
},
|
|
7456
|
+
"labels": {
|
|
7457
|
+
"type": "boolean"
|
|
7458
|
+
},
|
|
7459
|
+
"lead": {
|
|
7460
|
+
"type": "boolean"
|
|
7461
|
+
},
|
|
7462
|
+
"href": {
|
|
7463
|
+
"type": "string",
|
|
7464
|
+
"pattern": "^[A-Za-z_][A-Za-z0-9_]*$"
|
|
7465
|
+
},
|
|
7466
|
+
"choose": {
|
|
7467
|
+
"type": "boolean"
|
|
7468
|
+
}
|
|
7469
|
+
},
|
|
7470
|
+
"additionalProperties": false
|
|
7471
|
+
},
|
|
7472
|
+
"CardPart": {
|
|
7473
|
+
"anyOf": [
|
|
7474
|
+
{
|
|
7475
|
+
"type": "string",
|
|
7476
|
+
"pattern": "^[A-Za-z_][A-Za-z0-9_]*$"
|
|
7477
|
+
},
|
|
7478
|
+
{
|
|
7479
|
+
"type": "object",
|
|
7480
|
+
"properties": {
|
|
7481
|
+
"field": {
|
|
7482
|
+
"type": "string",
|
|
7483
|
+
"pattern": "^[A-Za-z_][A-Za-z0-9_]*$"
|
|
7484
|
+
},
|
|
7485
|
+
"unit": {
|
|
7486
|
+
"anyOf": [
|
|
7487
|
+
{
|
|
7488
|
+
"type": "string"
|
|
7489
|
+
},
|
|
7490
|
+
{
|
|
7491
|
+
"$ref": "#/$defs/PluralWords"
|
|
7492
|
+
}
|
|
7493
|
+
]
|
|
7494
|
+
}
|
|
7495
|
+
},
|
|
7496
|
+
"required": [
|
|
7497
|
+
"field"
|
|
7498
|
+
],
|
|
7499
|
+
"additionalProperties": false
|
|
7500
|
+
}
|
|
7501
|
+
]
|
|
7502
|
+
},
|
|
7503
|
+
"PluralWords": {
|
|
7504
|
+
"type": "object",
|
|
7505
|
+
"properties": {
|
|
7506
|
+
"zero": {
|
|
7507
|
+
"type": "string"
|
|
7508
|
+
},
|
|
7509
|
+
"one": {
|
|
7510
|
+
"type": "string"
|
|
7511
|
+
},
|
|
7512
|
+
"two": {
|
|
7513
|
+
"type": "string"
|
|
7514
|
+
},
|
|
7515
|
+
"few": {
|
|
7516
|
+
"type": "string"
|
|
7517
|
+
},
|
|
7518
|
+
"many": {
|
|
7519
|
+
"type": "string"
|
|
7520
|
+
},
|
|
7521
|
+
"other": {
|
|
7522
|
+
"type": "string"
|
|
7354
7523
|
}
|
|
7355
7524
|
},
|
|
7525
|
+
"required": [
|
|
7526
|
+
"other"
|
|
7527
|
+
],
|
|
7356
7528
|
"additionalProperties": false
|
|
7357
7529
|
},
|
|
7358
7530
|
"MapRoute": {
|
|
@@ -8088,6 +8260,31 @@
|
|
|
8088
8260
|
"additionalProperties": false
|
|
8089
8261
|
}
|
|
8090
8262
|
]
|
|
8263
|
+
},
|
|
8264
|
+
"height": {
|
|
8265
|
+
"anyOf": [
|
|
8266
|
+
{
|
|
8267
|
+
"type": "integer",
|
|
8268
|
+
"minimum": 160,
|
|
8269
|
+
"maximum": 2000
|
|
8270
|
+
},
|
|
8271
|
+
{
|
|
8272
|
+
"type": "string",
|
|
8273
|
+
"const": "fill"
|
|
8274
|
+
}
|
|
8275
|
+
]
|
|
8276
|
+
},
|
|
8277
|
+
"gestures": {
|
|
8278
|
+
"type": "string",
|
|
8279
|
+
"enum": [
|
|
8280
|
+
"shared",
|
|
8281
|
+
"all"
|
|
8282
|
+
]
|
|
8283
|
+
},
|
|
8284
|
+
"fitZoom": {
|
|
8285
|
+
"type": "integer",
|
|
8286
|
+
"minimum": 1,
|
|
8287
|
+
"maximum": 22
|
|
8091
8288
|
}
|
|
8092
8289
|
},
|
|
8093
8290
|
"additionalProperties": false
|
package/src/index.d.mts
CHANGED
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
export * from './runtime.mjs';
|
|
2
|
-
export { FieldSchema, FieldsSchema, LineFieldSchema, LineKindsSchema, OptionSchema, PropertyDefinitionSchema, FilterConditionSchema, FilterItemSchema, } from './lib/format/field.mjs';
|
|
2
|
+
export { FieldSchema, FieldsSchema, LineFieldSchema, LineKindsSchema, OptionSchema, PropertyDefinitionSchema, FilterConditionSchema, FilterItemSchema, MoneyLookSchema, PERIODS, } from './lib/format/field.mjs';
|
|
3
3
|
export { ModifierSchema, RolesSchema, CellRulesSchema, ToneWhenSchema, LayoutNodeSchema, RootLayoutSchema, ListNodeSchema } from './lib/format/layout.mjs';
|
|
4
4
|
export { PageSchema } from './lib/format/page.mjs';
|
|
5
5
|
export { ActionStepSchema, PageEventsSchema } from './lib/format/actions.mjs';
|
|
6
6
|
export { validatePage } from './lib/format/validate.mjs';
|
|
7
|
+
export { AddressSearchOptionsSchema } from './lib/format/address-search.mjs';
|
|
7
8
|
export { pageJsonSchema } from './lib/format/json-schema.mjs';
|
package/src/index.d.ts
CHANGED
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
export * from './runtime';
|
|
2
|
-
export { FieldSchema, FieldsSchema, LineFieldSchema, LineKindsSchema, OptionSchema, PropertyDefinitionSchema, FilterConditionSchema, FilterItemSchema, } from './lib/format/field';
|
|
2
|
+
export { FieldSchema, FieldsSchema, LineFieldSchema, LineKindsSchema, OptionSchema, PropertyDefinitionSchema, FilterConditionSchema, FilterItemSchema, MoneyLookSchema, PERIODS, } from './lib/format/field';
|
|
3
3
|
export { ModifierSchema, RolesSchema, CellRulesSchema, ToneWhenSchema, LayoutNodeSchema, RootLayoutSchema, ListNodeSchema } from './lib/format/layout';
|
|
4
4
|
export { PageSchema } from './lib/format/page';
|
|
5
5
|
export { ActionStepSchema, PageEventsSchema } from './lib/format/actions';
|
|
6
6
|
export { validatePage } from './lib/format/validate';
|
|
7
|
+
export { AddressSearchOptionsSchema } from './lib/format/address-search';
|
|
7
8
|
export { pageJsonSchema } from './lib/format/json-schema';
|
package/src/index.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.pageJsonSchema = exports.validatePage = exports.PageEventsSchema = exports.ActionStepSchema = exports.PageSchema = exports.ListNodeSchema = exports.RootLayoutSchema = exports.LayoutNodeSchema = exports.ToneWhenSchema = exports.CellRulesSchema = exports.RolesSchema = exports.ModifierSchema = exports.FilterItemSchema = exports.FilterConditionSchema = exports.PropertyDefinitionSchema = exports.OptionSchema = exports.LineKindsSchema = exports.LineFieldSchema = exports.FieldsSchema = exports.FieldSchema = void 0;
|
|
3
|
+
exports.pageJsonSchema = exports.AddressSearchOptionsSchema = exports.validatePage = exports.PageEventsSchema = exports.ActionStepSchema = exports.PageSchema = exports.ListNodeSchema = exports.RootLayoutSchema = exports.LayoutNodeSchema = exports.ToneWhenSchema = exports.CellRulesSchema = exports.RolesSchema = exports.ModifierSchema = exports.PERIODS = exports.MoneyLookSchema = exports.FilterItemSchema = exports.FilterConditionSchema = exports.PropertyDefinitionSchema = exports.OptionSchema = exports.LineKindsSchema = exports.LineFieldSchema = exports.FieldsSchema = exports.FieldSchema = void 0;
|
|
4
4
|
const tslib_1 = require("tslib");
|
|
5
5
|
tslib_1.__exportStar(require("./runtime"), exports);
|
|
6
6
|
var field_1 = require("./lib/format/field");
|
|
@@ -12,6 +12,8 @@ Object.defineProperty(exports, "OptionSchema", { enumerable: true, get: function
|
|
|
12
12
|
Object.defineProperty(exports, "PropertyDefinitionSchema", { enumerable: true, get: function () { return field_1.PropertyDefinitionSchema; } });
|
|
13
13
|
Object.defineProperty(exports, "FilterConditionSchema", { enumerable: true, get: function () { return field_1.FilterConditionSchema; } });
|
|
14
14
|
Object.defineProperty(exports, "FilterItemSchema", { enumerable: true, get: function () { return field_1.FilterItemSchema; } });
|
|
15
|
+
Object.defineProperty(exports, "MoneyLookSchema", { enumerable: true, get: function () { return field_1.MoneyLookSchema; } });
|
|
16
|
+
Object.defineProperty(exports, "PERIODS", { enumerable: true, get: function () { return field_1.PERIODS; } });
|
|
15
17
|
var layout_1 = require("./lib/format/layout");
|
|
16
18
|
Object.defineProperty(exports, "ModifierSchema", { enumerable: true, get: function () { return layout_1.ModifierSchema; } });
|
|
17
19
|
Object.defineProperty(exports, "RolesSchema", { enumerable: true, get: function () { return layout_1.RolesSchema; } });
|
|
@@ -27,6 +29,8 @@ Object.defineProperty(exports, "ActionStepSchema", { enumerable: true, get: func
|
|
|
27
29
|
Object.defineProperty(exports, "PageEventsSchema", { enumerable: true, get: function () { return actions_1.PageEventsSchema; } });
|
|
28
30
|
var validate_1 = require("./lib/format/validate");
|
|
29
31
|
Object.defineProperty(exports, "validatePage", { enumerable: true, get: function () { return validate_1.validatePage; } });
|
|
32
|
+
var address_search_1 = require("./lib/format/address-search");
|
|
33
|
+
Object.defineProperty(exports, "AddressSearchOptionsSchema", { enumerable: true, get: function () { return address_search_1.AddressSearchOptionsSchema; } });
|
|
30
34
|
var json_schema_1 = require("./lib/format/json-schema");
|
|
31
35
|
Object.defineProperty(exports, "pageJsonSchema", { enumerable: true, get: function () { return json_schema_1.pageJsonSchema; } });
|
|
32
36
|
//# sourceMappingURL=index.js.map
|
package/src/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../libs/core/src/index.ts"],"names":[],"mappings":";;;;AAAA,oDAA0B;AAC1B,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../libs/core/src/index.ts"],"names":[],"mappings":";;;;AAAA,oDAA0B;AAC1B,4CAW4B;AAV1B,oGAAA,WAAW,OAAA;AACX,qGAAA,YAAY,OAAA;AACZ,wGAAA,eAAe,OAAA;AACf,wGAAA,eAAe,OAAA;AACf,qGAAA,YAAY,OAAA;AACZ,iHAAA,wBAAwB,OAAA;AACxB,8GAAA,qBAAqB,OAAA;AACrB,yGAAA,gBAAgB,OAAA;AAChB,wGAAA,eAAe,OAAA;AACf,gGAAA,OAAO,OAAA;AAET,8CAAuJ;AAA9I,wGAAA,cAAc,OAAA;AAAE,qGAAA,WAAW,OAAA;AAAE,yGAAA,eAAe,OAAA;AAAE,wGAAA,cAAc,OAAA;AAAE,0GAAA,gBAAgB,OAAA;AAAE,0GAAA,gBAAgB,OAAA;AAAE,wGAAA,cAAc,OAAA;AACzH,0CAA+C;AAAtC,kGAAA,UAAU,OAAA;AACnB,gDAA0E;AAAjE,2GAAA,gBAAgB,OAAA;AAAE,2GAAA,gBAAgB,OAAA;AAC3C,kDAAqD;AAA5C,wGAAA,YAAY,OAAA;AACrB,8DAAyE;AAAhE,4HAAA,0BAA0B,OAAA;AACnC,wDAA0D;AAAjD,6GAAA,cAAc,OAAA"}
|
package/src/index.mjs
CHANGED
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
export * from './runtime.mjs';
|
|
2
|
-
export { FieldSchema, FieldsSchema, LineFieldSchema, LineKindsSchema, OptionSchema, PropertyDefinitionSchema, FilterConditionSchema, FilterItemSchema, } from './lib/format/field.mjs';
|
|
2
|
+
export { FieldSchema, FieldsSchema, LineFieldSchema, LineKindsSchema, OptionSchema, PropertyDefinitionSchema, FilterConditionSchema, FilterItemSchema, MoneyLookSchema, PERIODS, } from './lib/format/field.mjs';
|
|
3
3
|
export { ModifierSchema, RolesSchema, CellRulesSchema, ToneWhenSchema, LayoutNodeSchema, RootLayoutSchema, ListNodeSchema } from './lib/format/layout.mjs';
|
|
4
4
|
export { PageSchema } from './lib/format/page.mjs';
|
|
5
5
|
export { ActionStepSchema, PageEventsSchema } from './lib/format/actions.mjs';
|
|
6
6
|
export { validatePage } from './lib/format/validate.mjs';
|
|
7
|
+
export { AddressSearchOptionsSchema } from './lib/format/address-search.mjs';
|
|
7
8
|
export { pageJsonSchema } from './lib/format/json-schema.mjs';
|
|
8
9
|
//# sourceMappingURL=index.mjs.map
|
package/src/index.mjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.mjs","sourceRoot":"","sources":["../../../../libs/core/src/index.ts"],"names":[],"mappings":"AAAA,cAAc,WAAW,CAAC;AAC1B,OAAO,EACL,WAAW,EACX,YAAY,EACZ,eAAe,EACf,eAAe,EACf,YAAY,EACZ,wBAAwB,EACxB,qBAAqB,EACrB,gBAAgB,
|
|
1
|
+
{"version":3,"file":"index.mjs","sourceRoot":"","sources":["../../../../libs/core/src/index.ts"],"names":[],"mappings":"AAAA,cAAc,WAAW,CAAC;AAC1B,OAAO,EACL,WAAW,EACX,YAAY,EACZ,eAAe,EACf,eAAe,EACf,YAAY,EACZ,wBAAwB,EACxB,qBAAqB,EACrB,gBAAgB,EAChB,eAAe,EACf,OAAO,GACR,MAAM,oBAAoB,CAAC;AAC5B,OAAO,EAAE,cAAc,EAAE,WAAW,EAAE,eAAe,EAAE,cAAc,EAAE,gBAAgB,EAAE,gBAAgB,EAAE,cAAc,EAAE,MAAM,qBAAqB,CAAC;AACvJ,OAAO,EAAE,UAAU,EAAE,MAAM,mBAAmB,CAAC;AAC/C,OAAO,EAAE,gBAAgB,EAAE,gBAAgB,EAAE,MAAM,sBAAsB,CAAC;AAC1E,OAAO,EAAE,YAAY,EAAE,MAAM,uBAAuB,CAAC;AACrD,OAAO,EAAE,0BAA0B,EAAE,MAAM,6BAA6B,CAAC;AACzE,OAAO,EAAE,cAAc,EAAE,MAAM,0BAA0B,CAAC"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import * as z from 'zod';
|
|
2
|
+
export declare const AddressSearchOptionsSchema: z.ZodObject<{
|
|
3
|
+
placeField: z.ZodOptional<z.ZodString>;
|
|
4
|
+
longitudeField: z.ZodOptional<z.ZodString>;
|
|
5
|
+
partsField: z.ZodOptional<z.ZodString>;
|
|
6
|
+
countries: z.ZodOptional<z.ZodUnion<readonly [z.ZodArray<z.ZodString>, z.ZodString]>>;
|
|
7
|
+
near: z.ZodOptional<z.ZodObject<{
|
|
8
|
+
lat: z.ZodNumber;
|
|
9
|
+
lng: z.ZodNumber;
|
|
10
|
+
}, z.core.$strict>>;
|
|
11
|
+
}, z.core.$strict>;
|
|
12
|
+
export type AddressSearchOptions = z.infer<typeof AddressSearchOptionsSchema>;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import * as z from 'zod';
|
|
2
|
+
export declare const AddressSearchOptionsSchema: z.ZodObject<{
|
|
3
|
+
placeField: z.ZodOptional<z.ZodString>;
|
|
4
|
+
longitudeField: z.ZodOptional<z.ZodString>;
|
|
5
|
+
partsField: z.ZodOptional<z.ZodString>;
|
|
6
|
+
countries: z.ZodOptional<z.ZodUnion<readonly [z.ZodArray<z.ZodString>, z.ZodString]>>;
|
|
7
|
+
near: z.ZodOptional<z.ZodObject<{
|
|
8
|
+
lat: z.ZodNumber;
|
|
9
|
+
lng: z.ZodNumber;
|
|
10
|
+
}, z.z.core.$strict>>;
|
|
11
|
+
}, z.z.core.$strict>;
|
|
12
|
+
export type AddressSearchOptions = z.infer<typeof AddressSearchOptionsSchema>;
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.AddressSearchOptionsSchema = void 0;
|
|
4
|
+
const z = require("zod");
|
|
5
|
+
const names_1 = require("./names");
|
|
6
|
+
/**
|
|
7
|
+
* An address typed on one line with the addresses a map's provider suggests
|
|
8
|
+
* (`"widget": "address-search"` on a char field, drawn by @fieldia/map): its
|
|
9
|
+
* options. A suggestion picked can fill a place field (`placeField`, a json
|
|
10
|
+
* field's GeoJSON Point, or a float field's latitude with `longitudeField`
|
|
11
|
+
* for its longitude) and an address in its parts (`partsField`, a json field
|
|
12
|
+
* drawn as an address); `countries` keeps the suggestions to some countries,
|
|
13
|
+
* by their ISO codes, an array or "EG,SA" as the designer writes it; `near`
|
|
14
|
+
* puts those near a point first. The fields they name are checked with the
|
|
15
|
+
* page's references, by kind.
|
|
16
|
+
*
|
|
17
|
+
* { "field": "address", "widget": "address-search",
|
|
18
|
+
* "options": { "placeField": "deliver_to", "partsField": "address_parts", "countries": ["EG"] } }
|
|
19
|
+
*/
|
|
20
|
+
const fieldName = z.string().regex(names_1.FIELD_NAME);
|
|
21
|
+
const COUNTRY = /^[A-Z]{2}$/;
|
|
22
|
+
const country = z.string().regex(COUNTRY, 'a country is its ISO code in capitals, such as "EG"');
|
|
23
|
+
exports.AddressSearchOptionsSchema = z
|
|
24
|
+
.strictObject({
|
|
25
|
+
placeField: fieldName.optional(),
|
|
26
|
+
longitudeField: fieldName.optional(),
|
|
27
|
+
partsField: fieldName.optional(),
|
|
28
|
+
countries: z.union([z.array(country).min(1), z.string().refine((codes) => codes.split(',').every((code) => COUNTRY.test(code.trim())), 'countries are ISO codes in capitals, such as ["EG", "SA"] or "EG,SA"')]).optional(),
|
|
29
|
+
near: z.strictObject({ lat: z.number().min(-90).max(90), lng: z.number().min(-180).max(180) }).optional(),
|
|
30
|
+
})
|
|
31
|
+
.meta({ id: 'AddressSearchOptions' });
|
|
32
|
+
//# sourceMappingURL=address-search.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"address-search.js","sourceRoot":"","sources":["../../../../../../libs/core/src/lib/format/address-search.ts"],"names":[],"mappings":";;;AAAA,yBAAyB;AACzB,mCAAqC;AAErC;;;;;;;;;;;;;GAaG;AAEH,MAAM,SAAS,GAAG,CAAC,CAAC,MAAM,EAAE,CAAC,KAAK,CAAC,kBAAU,CAAC,CAAC;AAC/C,MAAM,OAAO,GAAG,YAAY,CAAC;AAC7B,MAAM,OAAO,GAAG,CAAC,CAAC,MAAM,EAAE,CAAC,KAAK,CAAC,OAAO,EAAE,qDAAqD,CAAC,CAAC;AAEpF,QAAA,0BAA0B,GAAG,CAAC;KACxC,YAAY,CAAC;IACZ,UAAU,EAAE,SAAS,CAAC,QAAQ,EAAE;IAChC,cAAc,EAAE,SAAS,CAAC,QAAQ,EAAE;IACpC,UAAU,EAAE,SAAS,CAAC,QAAQ,EAAE;IAChC,SAAS,EAAE,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,MAAM,CAAC,CAAC,KAAK,EAAE,EAAE,CAAC,KAAK,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,KAAK,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,OAAO,CAAC,IAAI,CAAC,IAAI,CAAC,IAAI,EAAE,CAAC,CAAC,EAAE,sEAAsE,CAAC,CAAC,CAAC,CAAC,QAAQ,EAAE;IAC3N,IAAI,EAAE,CAAC,CAAC,YAAY,CAAC,EAAE,GAAG,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,CAAC,EAAE,CAAC,CAAC,GAAG,CAAC,EAAE,CAAC,EAAE,GAAG,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,CAAC,GAAG,CAAC,CAAC,GAAG,CAAC,GAAG,CAAC,EAAE,CAAC,CAAC,QAAQ,EAAE;CAC1G,CAAC;KACD,IAAI,CAAC,EAAE,EAAE,EAAE,sBAAsB,EAAE,CAAC,CAAC"}
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import * as z from 'zod';
|
|
2
|
+
import { FIELD_NAME } from './names.mjs';
|
|
3
|
+
/**
|
|
4
|
+
* An address typed on one line with the addresses a map's provider suggests
|
|
5
|
+
* (`"widget": "address-search"` on a char field, drawn by @fieldia/map): its
|
|
6
|
+
* options. A suggestion picked can fill a place field (`placeField`, a json
|
|
7
|
+
* field's GeoJSON Point, or a float field's latitude with `longitudeField`
|
|
8
|
+
* for its longitude) and an address in its parts (`partsField`, a json field
|
|
9
|
+
* drawn as an address); `countries` keeps the suggestions to some countries,
|
|
10
|
+
* by their ISO codes, an array or "EG,SA" as the designer writes it; `near`
|
|
11
|
+
* puts those near a point first. The fields they name are checked with the
|
|
12
|
+
* page's references, by kind.
|
|
13
|
+
*
|
|
14
|
+
* { "field": "address", "widget": "address-search",
|
|
15
|
+
* "options": { "placeField": "deliver_to", "partsField": "address_parts", "countries": ["EG"] } }
|
|
16
|
+
*/
|
|
17
|
+
const fieldName = z.string().regex(FIELD_NAME);
|
|
18
|
+
const COUNTRY = /^[A-Z]{2}$/;
|
|
19
|
+
const country = z.string().regex(COUNTRY, 'a country is its ISO code in capitals, such as "EG"');
|
|
20
|
+
export const AddressSearchOptionsSchema = z
|
|
21
|
+
.strictObject({
|
|
22
|
+
placeField: fieldName.optional(),
|
|
23
|
+
longitudeField: fieldName.optional(),
|
|
24
|
+
partsField: fieldName.optional(),
|
|
25
|
+
countries: z.union([z.array(country).min(1), z.string().refine((codes) => codes.split(',').every((code) => COUNTRY.test(code.trim())), 'countries are ISO codes in capitals, such as ["EG", "SA"] or "EG,SA"')]).optional(),
|
|
26
|
+
near: z.strictObject({ lat: z.number().min(-90).max(90), lng: z.number().min(-180).max(180) }).optional(),
|
|
27
|
+
})
|
|
28
|
+
.meta({ id: 'AddressSearchOptions' });
|
|
29
|
+
//# sourceMappingURL=address-search.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"address-search.mjs","sourceRoot":"","sources":["../../../../../../libs/core/src/lib/format/address-search.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,CAAC,MAAM,KAAK,CAAC;AACzB,OAAO,EAAE,UAAU,EAAE,MAAM,SAAS,CAAC;AAErC;;;;;;;;;;;;;GAaG;AAEH,MAAM,SAAS,GAAG,CAAC,CAAC,MAAM,EAAE,CAAC,KAAK,CAAC,UAAU,CAAC,CAAC;AAC/C,MAAM,OAAO,GAAG,YAAY,CAAC;AAC7B,MAAM,OAAO,GAAG,CAAC,CAAC,MAAM,EAAE,CAAC,KAAK,CAAC,OAAO,EAAE,qDAAqD,CAAC,CAAC;AAEjG,MAAM,CAAC,MAAM,0BAA0B,GAAG,CAAC;KACxC,YAAY,CAAC;IACZ,UAAU,EAAE,SAAS,CAAC,QAAQ,EAAE;IAChC,cAAc,EAAE,SAAS,CAAC,QAAQ,EAAE;IACpC,UAAU,EAAE,SAAS,CAAC,QAAQ,EAAE;IAChC,SAAS,EAAE,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,MAAM,CAAC,CAAC,KAAK,EAAE,EAAE,CAAC,KAAK,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,KAAK,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,OAAO,CAAC,IAAI,CAAC,IAAI,CAAC,IAAI,EAAE,CAAC,CAAC,EAAE,sEAAsE,CAAC,CAAC,CAAC,CAAC,QAAQ,EAAE;IAC3N,IAAI,EAAE,CAAC,CAAC,YAAY,CAAC,EAAE,GAAG,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,CAAC,EAAE,CAAC,CAAC,GAAG,CAAC,EAAE,CAAC,EAAE,GAAG,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,CAAC,GAAG,CAAC,CAAC,GAAG,CAAC,GAAG,CAAC,EAAE,CAAC,CAAC,QAAQ,EAAE;CAC1G,CAAC;KACD,IAAI,CAAC,EAAE,EAAE,EAAE,sBAAsB,EAAE,CAAC,CAAC"}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import type { CardPart, MapCard, PluralWords } from './layout.mjs';
|
|
2
|
+
/**
|
|
3
|
+
* A map card's lines, read: each line's parts, each part its field and the
|
|
4
|
+
* words after its value. A line is one part ("price") or several on one
|
|
5
|
+
* line, parted by a dot ("Sheikh Zayed · 4 beds · 280 m²").
|
|
6
|
+
*/
|
|
7
|
+
export interface CardLinePart {
|
|
8
|
+
field: string;
|
|
9
|
+
unit?: string | PluralWords;
|
|
10
|
+
}
|
|
11
|
+
/** One part of a line, the same whether written as a name or with its words. */
|
|
12
|
+
export declare function cardPart(part: CardPart): CardLinePart;
|
|
13
|
+
/** A card's lines, each as its parts. */
|
|
14
|
+
export declare function cardLines(card: Pick<MapCard, 'fields'> | undefined): CardLinePart[][];
|
|
15
|
+
/** Every field a card's lines show, once each, in order. */
|
|
16
|
+
export declare function cardLineFields(card: Pick<MapCard, 'fields'> | undefined): string[];
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import type { CardPart, MapCard, PluralWords } from './layout';
|
|
2
|
+
/**
|
|
3
|
+
* A map card's lines, read: each line's parts, each part its field and the
|
|
4
|
+
* words after its value. A line is one part ("price") or several on one
|
|
5
|
+
* line, parted by a dot ("Sheikh Zayed · 4 beds · 280 m²").
|
|
6
|
+
*/
|
|
7
|
+
export interface CardLinePart {
|
|
8
|
+
field: string;
|
|
9
|
+
unit?: string | PluralWords;
|
|
10
|
+
}
|
|
11
|
+
/** One part of a line, the same whether written as a name or with its words. */
|
|
12
|
+
export declare function cardPart(part: CardPart): CardLinePart;
|
|
13
|
+
/** A card's lines, each as its parts. */
|
|
14
|
+
export declare function cardLines(card: Pick<MapCard, 'fields'> | undefined): CardLinePart[][];
|
|
15
|
+
/** Every field a card's lines show, once each, in order. */
|
|
16
|
+
export declare function cardLineFields(card: Pick<MapCard, 'fields'> | undefined): string[];
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.cardPart = cardPart;
|
|
4
|
+
exports.cardLines = cardLines;
|
|
5
|
+
exports.cardLineFields = cardLineFields;
|
|
6
|
+
/** One part of a line, the same whether written as a name or with its words. */
|
|
7
|
+
function cardPart(part) {
|
|
8
|
+
return typeof part === 'string' ? { field: part } : part;
|
|
9
|
+
}
|
|
10
|
+
/** A card's lines, each as its parts. */
|
|
11
|
+
function cardLines(card) {
|
|
12
|
+
return (card?.fields ?? []).map((line) => (Array.isArray(line) ? line : [line]).map(cardPart));
|
|
13
|
+
}
|
|
14
|
+
/** Every field a card's lines show, once each, in order. */
|
|
15
|
+
function cardLineFields(card) {
|
|
16
|
+
return [...new Set(cardLines(card).flatMap((parts) => parts.map((part) => part.field)))];
|
|
17
|
+
}
|
|
18
|
+
//# sourceMappingURL=card-lines.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"card-lines.js","sourceRoot":"","sources":["../../../../../../libs/core/src/lib/format/card-lines.ts"],"names":[],"mappings":";;AAcA,4BAEC;AAGD,8BAEC;AAGD,wCAEC;AAbD,gFAAgF;AAChF,SAAgB,QAAQ,CAAC,IAAc;IACrC,OAAO,OAAO,IAAI,KAAK,QAAQ,CAAC,CAAC,CAAC,EAAE,KAAK,EAAE,IAAI,EAAE,CAAC,CAAC,CAAC,IAAI,CAAC;AAC3D,CAAC;AAED,yCAAyC;AACzC,SAAgB,SAAS,CAAC,IAAyC;IACjE,OAAO,CAAC,IAAI,EAAE,MAAM,IAAI,EAAE,CAAC,CAAC,GAAG,CAAC,CAAC,IAAc,EAAE,EAAE,CAAC,CAAC,KAAK,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,GAAG,CAAC,QAAQ,CAAC,CAAC,CAAC;AAC3G,CAAC;AAED,4DAA4D;AAC5D,SAAgB,cAAc,CAAC,IAAyC;IACtE,OAAO,CAAC,GAAG,IAAI,GAAG,CAAC,SAAS,CAAC,IAAI,CAAC,CAAC,OAAO,CAAC,CAAC,KAAK,EAAE,EAAE,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC;AAC3F,CAAC"}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
/** One part of a line, the same whether written as a name or with its words. */
|
|
2
|
+
export function cardPart(part) {
|
|
3
|
+
return typeof part === 'string' ? { field: part } : part;
|
|
4
|
+
}
|
|
5
|
+
/** A card's lines, each as its parts. */
|
|
6
|
+
export function cardLines(card) {
|
|
7
|
+
return (card?.fields ?? []).map((line) => (Array.isArray(line) ? line : [line]).map(cardPart));
|
|
8
|
+
}
|
|
9
|
+
/** Every field a card's lines show, once each, in order. */
|
|
10
|
+
export function cardLineFields(card) {
|
|
11
|
+
return [...new Set(cardLines(card).flatMap((parts) => parts.map((part) => part.field)))];
|
|
12
|
+
}
|
|
13
|
+
//# sourceMappingURL=card-lines.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"card-lines.mjs","sourceRoot":"","sources":["../../../../../../libs/core/src/lib/format/card-lines.ts"],"names":[],"mappings":"AAaA,gFAAgF;AAChF,MAAM,UAAU,QAAQ,CAAC,IAAc;IACrC,OAAO,OAAO,IAAI,KAAK,QAAQ,CAAC,CAAC,CAAC,EAAE,KAAK,EAAE,IAAI,EAAE,CAAC,CAAC,CAAC,IAAI,CAAC;AAC3D,CAAC;AAED,yCAAyC;AACzC,MAAM,UAAU,SAAS,CAAC,IAAyC;IACjE,OAAO,CAAC,IAAI,EAAE,MAAM,IAAI,EAAE,CAAC,CAAC,GAAG,CAAC,CAAC,IAAc,EAAE,EAAE,CAAC,CAAC,KAAK,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,GAAG,CAAC,QAAQ,CAAC,CAAC,CAAC;AAC3G,CAAC;AAED,4DAA4D;AAC5D,MAAM,UAAU,cAAc,CAAC,IAAyC;IACtE,OAAO,CAAC,GAAG,IAAI,GAAG,CAAC,SAAS,CAAC,IAAI,CAAC,CAAC,OAAO,CAAC,CAAC,KAAK,EAAE,EAAE,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC;AAC3F,CAAC"}
|