@ministryofjustice/fb-components-core
Advanced tools
Comparing version 0.0.53-alpha to 0.0.56-alpha
@@ -9,3 +9,3 @@ { | ||
}, | ||
"version": "0.0.53-alpha", | ||
"version": "0.0.56-alpha", | ||
"description": "Form Builder core components", | ||
@@ -12,0 +12,0 @@ "main": "index.js", |
@@ -25,12 +25,2 @@ { | ||
"default": "day-month-year" | ||
}, | ||
"validation": { | ||
"properties": { | ||
"formatMinimum": { | ||
"$ref": "#/definitions/validDate" | ||
}, | ||
"formatMaximum": { | ||
"$ref": "#/definitions/validDate" | ||
} | ||
} | ||
} | ||
@@ -41,2 +31,5 @@ }, | ||
"$ref": "http://gov.uk/schema/v1.0.0/definition/field" | ||
}, | ||
{ | ||
"$ref": "http://gov.uk/schema/v1.0.0/validations#/definitions/dateBundle" | ||
} | ||
@@ -55,16 +48,4 @@ ], | ||
"day-month": "Day / Month" | ||
}, | ||
"validDate": { | ||
"oneOf": [ | ||
{ | ||
"type": "string", | ||
"format": "date" | ||
}, | ||
{ | ||
"type": "string", | ||
"pattern": "^\\d+\\w$" | ||
} | ||
] | ||
} | ||
} | ||
} |
@@ -27,4 +27,4 @@ { | ||
"lede": { | ||
"title": "Lede", | ||
"description": "Comes after the heading (it‘s also known as the ‘lede’) - use [markdown](https://www.gov.uk/guidance/how-to-publish-on-gov-uk/markdown) to format text or add hyperlinks", | ||
"title": "First paragraph", | ||
"description": "Introductory paragraph after the heading (it‘s also known as the ‘lede’) - use [markdown](https://www.gov.uk/guidance/how-to-publish-on-gov-uk/markdown) to format text or add hyperlinks", | ||
"type": "string", | ||
@@ -31,0 +31,0 @@ "content": true, |
@@ -151,2 +151,92 @@ { | ||
}, | ||
"dateBefore": { | ||
"title": "Before date", | ||
"description": "Date which user input must be before - eg. 2000-10-24", | ||
"type": "string", | ||
"format": "date" | ||
}, | ||
"errorsDateBefore": { | ||
"title": "Error messages for ‘Before date’", | ||
"allOf": [ | ||
{ | ||
"$ref": "#/definitions/errorStrings" | ||
} | ||
] | ||
}, | ||
"dateAfter": { | ||
"title": "After date", | ||
"description": "Date which user input must be after - eg. 2000-10-24", | ||
"type": "string", | ||
"format": "date" | ||
}, | ||
"errorsDateAfter": { | ||
"title": "Error messages for ‘After date’", | ||
"allOf": [ | ||
{ | ||
"$ref": "#/definitions/errorStrings" | ||
} | ||
] | ||
}, | ||
"dateWithinNext": { | ||
"title": "Within next", | ||
"description": "Date which user input must be before - eg. 1y, 4Mm, 2w, 100d", | ||
"type": "object", | ||
"properties": { | ||
"amount": { | ||
"type": "number" | ||
}, | ||
"unit": { | ||
"type": "string", | ||
"enum": [ | ||
"years", | ||
"months", | ||
"weeks", | ||
"days" | ||
] | ||
} | ||
}, | ||
"required": [ | ||
"amount", | ||
"unit" | ||
] | ||
}, | ||
"errorsDateWithinNext": { | ||
"title": "Error messages for ‘Within next’", | ||
"allOf": [ | ||
{ | ||
"$ref": "#/definitions/errorStrings" | ||
} | ||
] | ||
}, | ||
"dateWithinLast": { | ||
"title": "Within last", | ||
"description": "Date which user input must be before - eg. 1y, 4Mm, 2w, 100d", | ||
"type": "object", | ||
"properties": { | ||
"amount": { | ||
"type": "number" | ||
}, | ||
"unit": { | ||
"type": "string", | ||
"enum": [ | ||
"years", | ||
"months", | ||
"weeks", | ||
"days" | ||
] | ||
} | ||
}, | ||
"required": [ | ||
"amount", | ||
"unit" | ||
] | ||
}, | ||
"errorsDateWithinLast": { | ||
"title": "Error messages for ‘Within last’", | ||
"allOf": [ | ||
{ | ||
"$ref": "#/definitions/errorStrings" | ||
} | ||
] | ||
}, | ||
"requiredBundle": { | ||
@@ -247,2 +337,38 @@ "properties": { | ||
} | ||
}, | ||
"dateBundle": { | ||
"properties": { | ||
"validation": { | ||
"properties": { | ||
"dateBefore": { | ||
"$ref": "#/definitions/dateBefore" | ||
}, | ||
"dateAfter": { | ||
"$ref": "#/definitions/dateAfter" | ||
}, | ||
"dateWithinNext": { | ||
"$ref": "#/definitions/dateWithinNext" | ||
}, | ||
"dateWithinLast": { | ||
"$ref": "#/definitions/dateWithinLast" | ||
} | ||
} | ||
}, | ||
"errors": { | ||
"properties": { | ||
"dateBefore": { | ||
"$ref": "#/definitions/errorsDateBefore" | ||
}, | ||
"dateAfter": { | ||
"$ref": "#/definitions/errorsDateAfter" | ||
}, | ||
"dateWithinNext": { | ||
"$ref": "#/definitions/errorsDateWithinNext" | ||
}, | ||
"dateWithinLast": { | ||
"$ref": "#/definitions/errorsDateWithinLast" | ||
} | ||
} | ||
} | ||
} | ||
} | ||
@@ -249,0 +375,0 @@ }, |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
122231
262
3578