@sveltia/cms 0.93.2 → 0.94.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 +25 -13
- package/dist/sveltia-cms.js +141 -141
- package/dist/sveltia-cms.js.map +1 -1
- package/dist/sveltia-cms.mjs +159 -159
- package/dist/sveltia-cms.mjs.map +1 -1
- package/package.json +1 -1
- package/schema/sveltia-cms.json +81 -10
- package/types/public.d.ts +43 -8
package/package.json
CHANGED
package/schema/sveltia-cms.json
CHANGED
|
@@ -832,18 +832,32 @@
|
|
|
832
832
|
"markdownDescription": "Custom sortable fields. Entry collection only. Default: `title`, `name`, `date`, `author` and `description`. For a Git backend, commit author and commit date are also included by default. See our [README](https://github.com/sveltia/sveltia-cms#specifying-default-sort-field-and-direction) for details."
|
|
833
833
|
},
|
|
834
834
|
"view_filters": {
|
|
835
|
-
"
|
|
836
|
-
|
|
837
|
-
|
|
838
|
-
|
|
835
|
+
"anyOf": [
|
|
836
|
+
{
|
|
837
|
+
"type": "array",
|
|
838
|
+
"items": {
|
|
839
|
+
"$ref": "#/definitions/ViewFilter"
|
|
840
|
+
}
|
|
841
|
+
},
|
|
842
|
+
{
|
|
843
|
+
"$ref": "#/definitions/ViewFilters"
|
|
844
|
+
}
|
|
845
|
+
],
|
|
839
846
|
"description": "View filters to be used in the entry list. Entry collection only.",
|
|
840
847
|
"markdownDescription": "View filters to be used in the entry list. Entry collection only."
|
|
841
848
|
},
|
|
842
849
|
"view_groups": {
|
|
843
|
-
"
|
|
844
|
-
|
|
845
|
-
|
|
846
|
-
|
|
850
|
+
"anyOf": [
|
|
851
|
+
{
|
|
852
|
+
"type": "array",
|
|
853
|
+
"items": {
|
|
854
|
+
"$ref": "#/definitions/ViewGroup"
|
|
855
|
+
}
|
|
856
|
+
},
|
|
857
|
+
{
|
|
858
|
+
"$ref": "#/definitions/ViewGroups"
|
|
859
|
+
}
|
|
860
|
+
],
|
|
847
861
|
"description": "View groups to be used in the entry list. Entry collection only.",
|
|
848
862
|
"markdownDescription": "View groups to be used in the entry list. Entry collection only."
|
|
849
863
|
},
|
|
@@ -4400,6 +4414,11 @@
|
|
|
4400
4414
|
"ViewFilter": {
|
|
4401
4415
|
"type": "object",
|
|
4402
4416
|
"properties": {
|
|
4417
|
+
"name": {
|
|
4418
|
+
"type": "string",
|
|
4419
|
+
"description": "Unique identifier for the filter.",
|
|
4420
|
+
"markdownDescription": "Unique identifier for the filter."
|
|
4421
|
+
},
|
|
4403
4422
|
"label": {
|
|
4404
4423
|
"type": "string",
|
|
4405
4424
|
"description": "Label.",
|
|
@@ -4436,9 +4455,38 @@
|
|
|
4436
4455
|
"description": "View filter.",
|
|
4437
4456
|
"markdownDescription": "View filter."
|
|
4438
4457
|
},
|
|
4458
|
+
"ViewFilters": {
|
|
4459
|
+
"type": "object",
|
|
4460
|
+
"properties": {
|
|
4461
|
+
"filters": {
|
|
4462
|
+
"type": "array",
|
|
4463
|
+
"items": {
|
|
4464
|
+
"$ref": "#/definitions/ViewFilter"
|
|
4465
|
+
},
|
|
4466
|
+
"description": "A list of view filters.",
|
|
4467
|
+
"markdownDescription": "A list of view filters."
|
|
4468
|
+
},
|
|
4469
|
+
"default": {
|
|
4470
|
+
"type": "string",
|
|
4471
|
+
"description": "Default filter name.",
|
|
4472
|
+
"markdownDescription": "Default filter name."
|
|
4473
|
+
}
|
|
4474
|
+
},
|
|
4475
|
+
"required": [
|
|
4476
|
+
"filters"
|
|
4477
|
+
],
|
|
4478
|
+
"additionalProperties": false,
|
|
4479
|
+
"description": "A collection’s advanced filter definition, which is compatible with Static CMS.",
|
|
4480
|
+
"markdownDescription": "A collection’s advanced filter definition, which is compatible with Static CMS."
|
|
4481
|
+
},
|
|
4439
4482
|
"ViewGroup": {
|
|
4440
4483
|
"type": "object",
|
|
4441
4484
|
"properties": {
|
|
4485
|
+
"name": {
|
|
4486
|
+
"type": "string",
|
|
4487
|
+
"description": "Unique identifier for the filter.",
|
|
4488
|
+
"markdownDescription": "Unique identifier for the filter."
|
|
4489
|
+
},
|
|
4442
4490
|
"label": {
|
|
4443
4491
|
"type": "string",
|
|
4444
4492
|
"description": "Label.",
|
|
@@ -4468,13 +4516,36 @@
|
|
|
4468
4516
|
},
|
|
4469
4517
|
"required": [
|
|
4470
4518
|
"label",
|
|
4471
|
-
"field"
|
|
4472
|
-
"pattern"
|
|
4519
|
+
"field"
|
|
4473
4520
|
],
|
|
4474
4521
|
"additionalProperties": false,
|
|
4475
4522
|
"description": "View group.",
|
|
4476
4523
|
"markdownDescription": "View group."
|
|
4477
4524
|
},
|
|
4525
|
+
"ViewGroups": {
|
|
4526
|
+
"type": "object",
|
|
4527
|
+
"properties": {
|
|
4528
|
+
"groups": {
|
|
4529
|
+
"type": "array",
|
|
4530
|
+
"items": {
|
|
4531
|
+
"$ref": "#/definitions/ViewGroup"
|
|
4532
|
+
},
|
|
4533
|
+
"description": "A list of view groups.",
|
|
4534
|
+
"markdownDescription": "A list of view groups."
|
|
4535
|
+
},
|
|
4536
|
+
"default": {
|
|
4537
|
+
"type": "string",
|
|
4538
|
+
"description": "Default group name.",
|
|
4539
|
+
"markdownDescription": "Default group name."
|
|
4540
|
+
}
|
|
4541
|
+
},
|
|
4542
|
+
"required": [
|
|
4543
|
+
"groups"
|
|
4544
|
+
],
|
|
4545
|
+
"additionalProperties": false,
|
|
4546
|
+
"description": "A collection’s advanced group definition, which is compatible with Static CMS.",
|
|
4547
|
+
"markdownDescription": "A collection’s advanced group definition, which is compatible with Static CMS."
|
|
4548
|
+
},
|
|
4478
4549
|
"EditorOptions": {
|
|
4479
4550
|
"type": "object",
|
|
4480
4551
|
"properties": {
|
package/types/public.d.ts
CHANGED
|
@@ -1268,6 +1268,10 @@ export type SortableFields = {
|
|
|
1268
1268
|
* View filter.
|
|
1269
1269
|
*/
|
|
1270
1270
|
export type ViewFilter = {
|
|
1271
|
+
/**
|
|
1272
|
+
* Unique identifier for the filter.
|
|
1273
|
+
*/
|
|
1274
|
+
name?: string;
|
|
1271
1275
|
/**
|
|
1272
1276
|
* Label.
|
|
1273
1277
|
*/
|
|
@@ -1281,10 +1285,27 @@ export type ViewFilter = {
|
|
|
1281
1285
|
*/
|
|
1282
1286
|
pattern: string | RegExp | boolean;
|
|
1283
1287
|
};
|
|
1288
|
+
/**
|
|
1289
|
+
* A collection’s advanced filter definition, which is compatible with Static CMS.
|
|
1290
|
+
*/
|
|
1291
|
+
export type ViewFilters = {
|
|
1292
|
+
/**
|
|
1293
|
+
* A list of view filters.
|
|
1294
|
+
*/
|
|
1295
|
+
filters: ViewFilter[];
|
|
1296
|
+
/**
|
|
1297
|
+
* Default filter name.
|
|
1298
|
+
*/
|
|
1299
|
+
default?: string;
|
|
1300
|
+
};
|
|
1284
1301
|
/**
|
|
1285
1302
|
* View group.
|
|
1286
1303
|
*/
|
|
1287
1304
|
export type ViewGroup = {
|
|
1305
|
+
/**
|
|
1306
|
+
* Unique identifier for the filter.
|
|
1307
|
+
*/
|
|
1308
|
+
name?: string;
|
|
1288
1309
|
/**
|
|
1289
1310
|
* Label.
|
|
1290
1311
|
*/
|
|
@@ -1294,9 +1315,23 @@ export type ViewGroup = {
|
|
|
1294
1315
|
*/
|
|
1295
1316
|
field: FieldKeyPath;
|
|
1296
1317
|
/**
|
|
1297
|
-
* Regular expression matching pattern or exact
|
|
1318
|
+
* Regular expression matching pattern or exact
|
|
1319
|
+
* value.
|
|
1298
1320
|
*/
|
|
1299
|
-
pattern
|
|
1321
|
+
pattern?: string | RegExp | boolean;
|
|
1322
|
+
};
|
|
1323
|
+
/**
|
|
1324
|
+
* A collection’s advanced group definition, which is compatible with Static CMS.
|
|
1325
|
+
*/
|
|
1326
|
+
export type ViewGroups = {
|
|
1327
|
+
/**
|
|
1328
|
+
* A list of view groups.
|
|
1329
|
+
*/
|
|
1330
|
+
groups: ViewGroup[];
|
|
1331
|
+
/**
|
|
1332
|
+
* Default group name.
|
|
1333
|
+
*/
|
|
1334
|
+
default?: string;
|
|
1300
1335
|
};
|
|
1301
1336
|
/**
|
|
1302
1337
|
* Editor options.
|
|
@@ -1527,15 +1562,15 @@ export type Collection = {
|
|
|
1527
1562
|
*/
|
|
1528
1563
|
sortable_fields?: FieldKeyPath[] | SortableFields;
|
|
1529
1564
|
/**
|
|
1530
|
-
* View filters to be used in the entry list.
|
|
1531
|
-
* collection only.
|
|
1565
|
+
* View filters to be used in the entry list.
|
|
1566
|
+
* Entry collection only.
|
|
1532
1567
|
*/
|
|
1533
|
-
view_filters?: ViewFilter[];
|
|
1568
|
+
view_filters?: ViewFilter[] | ViewFilters;
|
|
1534
1569
|
/**
|
|
1535
|
-
* View groups to be used in the entry list.
|
|
1536
|
-
* only.
|
|
1570
|
+
* View groups to be used in the entry list.
|
|
1571
|
+
* Entry collection only.
|
|
1537
1572
|
*/
|
|
1538
|
-
view_groups?: ViewGroup[];
|
|
1573
|
+
view_groups?: ViewGroup[] | ViewGroups;
|
|
1539
1574
|
/**
|
|
1540
1575
|
* I18n options. Default: `false`.
|
|
1541
1576
|
*/
|