From 1a20c246569368b1ed935ac592efdf18b4f0545c Mon Sep 17 00:00:00 2001 From: Bertrand Zuchuat Date: Mon, 28 Oct 2024 07:40:47 +0100 Subject: [PATCH] chore(schema): update schemas Co-Authored-by: Bertrand Zuchuat --- .../acq_accounts/acq_account-v0.0.1.json | 5 +++- .../acq_invoices/acq_invoice-v0.0.1.json | 2 +- .../acq_order_line-v0.0.1.json | 12 ++++++---- .../acq_receipt_line-v0.0.1.json | 2 +- .../acq_receipts/acq_receipt-v0.0.1.json | 5 +++- .../jsonschemas/budgets/budget-v0.0.1.json | 4 ++-- .../collections/collection-v0.0.1.json | 23 ++++++++++--------- ...ument_contribution_entity_link-v0.0.1.json | 9 ++++++-- .../document_document_relation-v0.0.1.json | 6 +++-- .../document_genre_form_link-v0.0.1.json | 9 ++++++-- .../documents/document_part_of-v0.0.1.json | 5 ++-- .../document_subjects_entity_link-v0.0.1.json | 10 +++++--- .../jsonschemas/holdings/holding-v0.0.1.json | 4 ++-- .../ill_requests/ill_request-v0.0.1.json | 3 ++- .../items/jsonschemas/items/item-v0.0.1.json | 12 +++++----- .../jsonschemas/patrons/patron-v0.0.1.json | 4 ++-- 16 files changed, 72 insertions(+), 43 deletions(-) diff --git a/rero_ils/modules/acquisition/acq_accounts/jsonschemas/acq_accounts/acq_account-v0.0.1.json b/rero_ils/modules/acquisition/acq_accounts/jsonschemas/acq_accounts/acq_account-v0.0.1.json index 6cd37c5a12..59c37ceecd 100644 --- a/rero_ils/modules/acquisition/acq_accounts/jsonschemas/acq_accounts/acq_account-v0.0.1.json +++ b/rero_ils/modules/acquisition/acq_accounts/jsonschemas/acq_accounts/acq_account-v0.0.1.json @@ -107,9 +107,12 @@ "pattern": "^https://bib.rero.ch/api/acq_accounts/.*?$", "widget": { "formlyConfig": { - "hideLabel": true, + "wrappers": [ + "form-field" + ], "type": "account-select", "props": { + "hideLabel": true, "placeholder": "Choose a parent account" } } diff --git a/rero_ils/modules/acquisition/acq_invoices/jsonschemas/acq_invoices/acq_invoice-v0.0.1.json b/rero_ils/modules/acquisition/acq_invoices/jsonschemas/acq_invoices/acq_invoice-v0.0.1.json index 9e766f5c6e..d381790aab 100644 --- a/rero_ils/modules/acquisition/acq_invoices/jsonschemas/acq_invoices/acq_invoice-v0.0.1.json +++ b/rero_ils/modules/acquisition/acq_invoices/jsonschemas/acq_invoices/acq_invoice-v0.0.1.json @@ -165,7 +165,7 @@ "pattern": "^[0-9]{4}-(0[1-9]|1[0-2])-(0[1-9]|[12][0-9]|3[01])$", "widget": { "formlyConfig": { - "type": "datepicker", + "type": "datePicker", "props": { "validation": { "messages": { diff --git a/rero_ils/modules/acquisition/acq_order_lines/jsonschemas/acq_order_lines/acq_order_line-v0.0.1.json b/rero_ils/modules/acquisition/acq_order_lines/jsonschemas/acq_order_lines/acq_order_line-v0.0.1.json index f1f44c4216..f7504d4584 100644 --- a/rero_ils/modules/acquisition/acq_order_lines/jsonschemas/acq_order_lines/acq_order_line-v0.0.1.json +++ b/rero_ils/modules/acquisition/acq_order_lines/jsonschemas/acq_order_lines/acq_order_line-v0.0.1.json @@ -192,7 +192,7 @@ "pattern": "^[0-9]{4}-(0[1-9]|1[0-2])-(0[1-9]|[12][0-9]|3[01])$", "widget": { "formlyConfig": { - "type": "datepicker", + "type": "datePicker", "expressions": { "props.required": "field?.parent?.model?.status === 'ordered' || field?.parent?.model?.status === 'received'", "hide": "field?.parent?.model?.status !== 'ordered' && field?.parent?.model?.status !== 'received'" @@ -215,7 +215,7 @@ "pattern": "^[0-9]{4}-(0[1-9]|1[0-2])-(0[1-9]|[12][0-9]|3[01])$", "widget": { "formlyConfig": { - "type": "datepicker", + "type": "datePicker", "expressions": { "props.required": "field?.parent?.model?.status === 'received'", "hide": "field?.parent?.model?.status !== 'received'" @@ -244,10 +244,13 @@ "pattern": "^https://bib.rero.ch/api/acq_accounts/.*?$", "widget": { "formlyConfig": { - "hideLabel": true, "type": "account-select", + "wrappers": [ + "form-field" + ], "focus": true, "props": { + "hideLabel": true, "placeholder": "Select an account" } } @@ -279,13 +282,14 @@ "pattern": "^https://bib.rero.ch/api/documents/.+?$", "widget": { "formlyConfig": { + "type": "remoteAutoComplete", "props": { "validation": { "messages": { "patternMessage": "Should be in the following format: https://bib.rero.ch/api/documents/." } }, - "remoteTypeahead": { + "queryOptions": { "type": "documents", "filter": "NOT harvested:true" } diff --git a/rero_ils/modules/acquisition/acq_receipt_lines/jsonschemas/acq_receipt_lines/acq_receipt_line-v0.0.1.json b/rero_ils/modules/acquisition/acq_receipt_lines/jsonschemas/acq_receipt_lines/acq_receipt_line-v0.0.1.json index 4714b99462..e9680f2691 100644 --- a/rero_ils/modules/acquisition/acq_receipt_lines/jsonschemas/acq_receipt_lines/acq_receipt_line-v0.0.1.json +++ b/rero_ils/modules/acquisition/acq_receipt_lines/jsonschemas/acq_receipt_lines/acq_receipt_line-v0.0.1.json @@ -119,7 +119,7 @@ "pattern": "^[0-9]{4}-(0[1-9]|1[0-2])-(0[1-9]|[12][0-9]|3[01])$", "widget": { "formlyConfig": { - "type": "datepicker", + "type": "datePicker", "props": { "validation": { "messages": { diff --git a/rero_ils/modules/acquisition/acq_receipts/jsonschemas/acq_receipts/acq_receipt-v0.0.1.json b/rero_ils/modules/acquisition/acq_receipts/jsonschemas/acq_receipts/acq_receipt-v0.0.1.json index 2731a3ab60..2363d2c00d 100644 --- a/rero_ils/modules/acquisition/acq_receipts/jsonschemas/acq_receipts/acq_receipt-v0.0.1.json +++ b/rero_ils/modules/acquisition/acq_receipts/jsonschemas/acq_receipts/acq_receipt-v0.0.1.json @@ -116,9 +116,12 @@ "widget": { "formlyConfig": { "type": "account-select", - "hideLabel": true, + "wrappers": [ + "form-field" + ], "focus": true, "props": { + "hideLabel": true, "placeholder": "Select an account" } } diff --git a/rero_ils/modules/acquisition/budgets/jsonschemas/budgets/budget-v0.0.1.json b/rero_ils/modules/acquisition/budgets/jsonschemas/budgets/budget-v0.0.1.json index d4cf6cbdd8..0dc3aef581 100644 --- a/rero_ils/modules/acquisition/budgets/jsonschemas/budgets/budget-v0.0.1.json +++ b/rero_ils/modules/acquisition/budgets/jsonschemas/budgets/budget-v0.0.1.json @@ -59,7 +59,7 @@ "pattern": "^[0-9]{4}-(0[1-9]|1[0-2])-(0[1-9]|[12][0-9]|3[01])$", "widget": { "formlyConfig": { - "type": "datepicker", + "type": "datePicker", "props": { "validation": { "messages": { @@ -77,7 +77,7 @@ "pattern": "^[0-9]{4}-(0[1-9]|1[0-2])-(0[1-9]|[12][0-9]|3[01])$", "widget": { "formlyConfig": { - "type": "datepicker", + "type": "datePicker", "props": { "validation": { "messages": { diff --git a/rero_ils/modules/collections/jsonschemas/collections/collection-v0.0.1.json b/rero_ils/modules/collections/jsonschemas/collections/collection-v0.0.1.json index e16b6cf89f..1e39bf582d 100644 --- a/rero_ils/modules/collections/jsonschemas/collections/collection-v0.0.1.json +++ b/rero_ils/modules/collections/jsonschemas/collections/collection-v0.0.1.json @@ -159,17 +159,17 @@ "pattern": "^[0-9]{4}-(0[1-9]|1[0-2])-(0[1-9]|[12][0-9]|3[01])$", "widget": { "formlyConfig": { - "type": "datepicker", + "type": "datePicker", "props": { "validation": { "messages": { "patternMessage": "Should be in the following format: 2022-12-31 (YYYY-MM-DD).", - "dateMustBeLessThan": "The start date must be less than the end date." + "datesGreaterThan": "The start date must be less than the end date." }, "validators": { - "dateMustBeLessThan": { - "startDate": "start_date", - "endDate": "end_date", + "datesGreaterThan": { + "dateFirst": "start_date", + "dateLast": "end_date", "strict": true } } @@ -185,17 +185,17 @@ "pattern": "^[0-9]{4}-(0[1-9]|1[0-2])-(0[1-9]|[12][0-9]|3[01])$", "widget": { "formlyConfig": { - "type": "datepicker", + "type": "datePicker", "props": { "validation": { "messages": { "patternMessage": "Should be in the following format: 2022-12-31 (YYYY-MM-DD).", - "datesMustBeGreaterThan": "The end date must be greater than the start date." + "datesGreaterThan": "The end date must be greater than the start date." }, "validators": { - "dateMustBeGreaterThan": { - "startDate": "start_date", - "endDate": "end_date", + "datesGreaterThan": { + "dateFirst": "start_date", + "dateLast": "end_date", "strict": true } } @@ -255,8 +255,9 @@ "pattern": "^https://bib.rero.ch/api/items/.*?$", "widget": { "formlyConfig": { + "type": "remoteAutoComplete", "props": { - "remoteTypeahead": { + "queryOptions": { "type": "items" } } diff --git a/rero_ils/modules/documents/jsonschemas/documents/document_contribution_entity_link-v0.0.1.json b/rero_ils/modules/documents/jsonschemas/documents/document_contribution_entity_link-v0.0.1.json index 446fad8aed..3725a46a71 100644 --- a/rero_ils/modules/documents/jsonschemas/documents/document_contribution_entity_link-v0.0.1.json +++ b/rero_ils/modules/documents/jsonschemas/documents/document_contribution_entity_link-v0.0.1.json @@ -17,9 +17,12 @@ "pattern": "^(https://mef.rero.ch/api/agents/(gnd|idref|rero)/.*|https://bib.rero.ch/api/local_entities/.*?)$", "widget": { "formlyConfig": { - "type": "entityTypeahead", + "type": "entity-autocomplete", "props": { + "scrollHeight": "600px", + "group": true, "filters": { + "selected": "bf:Person", "options": [ { "label": "Person", @@ -31,7 +34,9 @@ } ] }, - "itemCssClass": "col-12" + "queryOptions": { + "type": "mef" + } } } } diff --git a/rero_ils/modules/documents/jsonschemas/documents/document_document_relation-v0.0.1.json b/rero_ils/modules/documents/jsonschemas/documents/document_document_relation-v0.0.1.json index 8878457cdb..e8d83b0774 100644 --- a/rero_ils/modules/documents/jsonschemas/documents/document_document_relation-v0.0.1.json +++ b/rero_ils/modules/documents/jsonschemas/documents/document_document_relation-v0.0.1.json @@ -266,13 +266,15 @@ "pattern": "^https://bib.rero.ch/api/documents/.*?$", "widget": { "formlyConfig": { + "type": "remoteAutoComplete", "props": { + "scrollHeight": "400px", "validation": { "messages": { "patternMessage": "Should be in the following format: https://bib.rero.ch/api/documents/." } }, - "remoteTypeahead": { + "queryOptions": { "type": "documents", "filter": "NOT harvested:true" }, @@ -305,4 +307,4 @@ } } } -} \ No newline at end of file +} diff --git a/rero_ils/modules/documents/jsonschemas/documents/document_genre_form_link-v0.0.1.json b/rero_ils/modules/documents/jsonschemas/documents/document_genre_form_link-v0.0.1.json index 5f01a5ac83..2f8751be5e 100644 --- a/rero_ils/modules/documents/jsonschemas/documents/document_genre_form_link-v0.0.1.json +++ b/rero_ils/modules/documents/jsonschemas/documents/document_genre_form_link-v0.0.1.json @@ -16,9 +16,12 @@ "pattern": "^(https://mef.rero.ch/api/concepts/(gnd|idref|rero)/.*|https://bib.rero.ch/api/local_entities/.*?)$", "widget": { "formlyConfig": { - "type": "entityTypeahead", + "type": "entity-autocomplete", "props": { + "scrollHeight": "600px", + "group": true, "filters": { + "selected": "concepts-genreForm", "options": [ { "label": "Genre, form", @@ -26,7 +29,9 @@ } ] }, - "itemCssClass": "col-12" + "queryOptions": { + "type": "mef" + } } } } diff --git a/rero_ils/modules/documents/jsonschemas/documents/document_part_of-v0.0.1.json b/rero_ils/modules/documents/jsonschemas/documents/document_part_of-v0.0.1.json index 8c8bb6c04a..d341782697 100644 --- a/rero_ils/modules/documents/jsonschemas/documents/document_part_of-v0.0.1.json +++ b/rero_ils/modules/documents/jsonschemas/documents/document_part_of-v0.0.1.json @@ -33,13 +33,14 @@ "pattern": "^https://bib.rero.ch/api/documents/.*?$", "widget": { "formlyConfig": { + "type": "remoteAutoComplete", "props": { "validation": { "messages": { "patternMessage": "Should be in the following format: https://bib.rero.ch/api/documents/." } }, - "remoteTypeahead": { + "queryOptions": { "type": "documents", "filter": "NOT harvested:true" } @@ -147,4 +148,4 @@ } } } -} \ No newline at end of file +} diff --git a/rero_ils/modules/documents/jsonschemas/documents/document_subjects_entity_link-v0.0.1.json b/rero_ils/modules/documents/jsonschemas/documents/document_subjects_entity_link-v0.0.1.json index f00ad2c554..1c3f83ad0d 100644 --- a/rero_ils/modules/documents/jsonschemas/documents/document_subjects_entity_link-v0.0.1.json +++ b/rero_ils/modules/documents/jsonschemas/documents/document_subjects_entity_link-v0.0.1.json @@ -17,10 +17,12 @@ "pattern": "^(https://mef.rero.ch/api/(agents|concepts|places)/(gnd|idref|rero)/.*|https://bib.rero.ch/api/local_entities/.*?)$", "widget": { "formlyConfig": { - "type": "entityTypeahead", + "type": "entity-autocomplete", "props": { + "scrollHeight": "600px", + "group": true, "filters": { - "default": "bf:Topic", + "selected": "bf:Topic", "options": [ { "label": "Topic", @@ -48,7 +50,9 @@ } ] }, - "itemCssClass": "col-12" + "queryOptions": { + "type": "mef" + } } } } diff --git a/rero_ils/modules/holdings/jsonschemas/holdings/holding-v0.0.1.json b/rero_ils/modules/holdings/jsonschemas/holdings/holding-v0.0.1.json index 7b693d7c89..6ba5adceae 100644 --- a/rero_ils/modules/holdings/jsonschemas/holdings/holding-v0.0.1.json +++ b/rero_ils/modules/holdings/jsonschemas/holdings/holding-v0.0.1.json @@ -346,7 +346,7 @@ "validationMessage": "Should be in the following format: 2022-12-31 (YYYY-MM-DD).", "widget": { "formlyConfig": { - "type": "datepicker", + "type": "datePicker", "props": { "validation": { "messages": { @@ -944,7 +944,7 @@ "pattern": "^[0-9]{4}-(0[1-9]|1[0-2])-(0[1-9]|[12][0-9]|3[01])$", "widget": { "formlyConfig": { - "type": "datepicker", + "type": "datePicker", "wrappers": [ "form-field" ], diff --git a/rero_ils/modules/ill_requests/jsonschemas/ill_requests/ill_request-v0.0.1.json b/rero_ils/modules/ill_requests/jsonschemas/ill_requests/ill_request-v0.0.1.json index b211307ac8..8cc361fda5 100644 --- a/rero_ils/modules/ill_requests/jsonschemas/ill_requests/ill_request-v0.0.1.json +++ b/rero_ils/modules/ill_requests/jsonschemas/ill_requests/ill_request-v0.0.1.json @@ -92,6 +92,7 @@ "pattern": "^https://bib.rero.ch/api/patrons/.*?$", "widget": { "formlyConfig": { + "type": "remoteAutoComplete", "props": { "hideLabel": true, "validation": { @@ -99,7 +100,7 @@ "patternMessage": "Should be in the following format: https://bib.rero.ch/api/patrons/." } }, - "remoteTypeahead": { + "queryOptions": { "type": "patrons" } } diff --git a/rero_ils/modules/items/jsonschemas/items/item-v0.0.1.json b/rero_ils/modules/items/jsonschemas/items/item-v0.0.1.json index 56242bafc0..c51e5d64eb 100644 --- a/rero_ils/modules/items/jsonschemas/items/item-v0.0.1.json +++ b/rero_ils/modules/items/jsonschemas/items/item-v0.0.1.json @@ -233,7 +233,7 @@ "pattern": "^[0-9]{4}-(0[1-9]|1[0-2])-(0[1-9]|[12][0-9]|3[01])$", "widget": { "formlyConfig": { - "type": "datepicker", + "type": "datePicker", "expressions": { "hide": "false" }, @@ -292,7 +292,7 @@ "pattern": "^[0-9]{4}-(0[1-9]|1[0-2])-(0[1-9]|[12][0-9]|3[01])$", "widget": { "formlyConfig": { - "type": "datepicker", + "type": "datePicker", "props": { "validation": { "messages": { @@ -400,7 +400,7 @@ "validationMessage": "Should be in the following format: 2022-12-31 (YYYY-MM-DD).", "widget": { "formlyConfig": { - "type": "datepicker", + "type": "datePicker", "expressions": { "props.required": "field?.parent?.model?.status === 'received'", "hide": "field?.parent?.model?.status !== 'received'" @@ -426,7 +426,7 @@ "validationMessage": "Should be in the following format: 2022-12-31 (YYYY-MM-DD).", "widget": { "formlyConfig": { - "type": "datepicker", + "type": "datePicker", "props": { "validation": { "messages": { @@ -446,7 +446,7 @@ "validationMessage": "Should be in the following format: 2022-12-31 (YYYY-MM-DD).", "widget": { "formlyConfig": { - "type": "datepicker", + "type": "datePicker", "props": { "validation": { "messages": { @@ -693,7 +693,7 @@ "validationMessage": "Should be in the following format: 2022-12-31 (YYYY-MM-DD).", "widget": { "formlyConfig": { - "type": "datepicker", + "type": "datePicker", "props": { "hideLabel": true, "defaultValueExpression": "new Date().toISOString().split('T')[0]", diff --git a/rero_ils/modules/patrons/jsonschemas/patrons/patron-v0.0.1.json b/rero_ils/modules/patrons/jsonschemas/patrons/patron-v0.0.1.json index 6f0167bd51..890ba57501 100644 --- a/rero_ils/modules/patrons/jsonschemas/patrons/patron-v0.0.1.json +++ b/rero_ils/modules/patrons/jsonschemas/patrons/patron-v0.0.1.json @@ -251,7 +251,7 @@ "pattern": "\\d{4}-((0[1-9])|(1[0-2]))-(((0[1-9])|[1-2][0-9])|(3[0-1]))$", "widget": { "formlyConfig": { - "type": "datepicker", + "type": "datePicker", "props": { "validation": { "messages": { @@ -492,7 +492,7 @@ }, "widget": { "formlyConfig": { - "type": "multicheckbox", + "type": "multi-checkbox", "wrappers": [ "card" ],