@scottish-government/designsystem-react 0.1.6 → 0.2.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/@types/components/ErrorSummary.d.ts +13 -0
- package/@types/components/SummaryCard.d.ts +8 -0
- package/@types/components/SummaryList.d.ts +27 -0
- package/dist/components/error-summary/error-summary.jsx +27 -0
- package/dist/components/summary-card/summary-card.jsx +67 -0
- package/dist/components/summary-list/summary-list.jsx +78 -0
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/package.json +1 -1
- package/src/components/error-summary/error-summary.test.tsx +106 -0
- package/src/components/error-summary/error-summary.tsx +49 -0
- package/src/components/summary-card/summary-card.test.tsx +129 -0
- package/src/components/summary-card/summary-card.tsx +60 -0
- package/src/components/summary-list/summary-list.test.tsx +221 -0
- package/src/components/summary-list/summary-list.tsx +144 -0
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
declare namespace SGDS.Component {
|
|
2
|
+
namespace ErrorSummary {
|
|
3
|
+
interface Error extends React.AllHTMLAttributes<HTMLElement> {
|
|
4
|
+
fragmentId?: string
|
|
5
|
+
title: string
|
|
6
|
+
}
|
|
7
|
+
}
|
|
8
|
+
|
|
9
|
+
interface ErrorSummary extends React.AllHTMLAttributes<HTMLElement> {
|
|
10
|
+
errors?: ErrorSummary.Error[],
|
|
11
|
+
title: string
|
|
12
|
+
}
|
|
13
|
+
}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
declare namespace SGDS.Component {
|
|
2
|
+
namespace SummaryList {
|
|
3
|
+
interface Action extends React.AllHTMLAttributes<HTMLElement> {
|
|
4
|
+
describedby: string,
|
|
5
|
+
href?: string,
|
|
6
|
+
onclick?: React.EventHandler<any>,
|
|
7
|
+
title: string
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
interface Answer extends React.AllHTMLAttributes<HTMLElement> {
|
|
11
|
+
value: string
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
interface Item extends React.LiHTMLAttributes<HTMLLIElement> {
|
|
15
|
+
actions?: SummaryList.Action[],
|
|
16
|
+
index: number,
|
|
17
|
+
title: string
|
|
18
|
+
value: string | string[]
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
interface SummaryList extends React.OlHTMLAttributes<HTMLOListElement> {
|
|
24
|
+
items: SummaryList.Item[],
|
|
25
|
+
noBorder?: boolean
|
|
26
|
+
}
|
|
27
|
+
}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
const conditional_wrapper_1 = __importDefault(require("../../common/conditional-wrapper"));
|
|
7
|
+
const Error = ({ fragmentId, title }) => {
|
|
8
|
+
return (<li>
|
|
9
|
+
<conditional_wrapper_1.default condition={!!fragmentId} wrapper={() => <a href={`#${fragmentId}`}>{title}</a>}>{title}</conditional_wrapper_1.default>
|
|
10
|
+
</li>);
|
|
11
|
+
};
|
|
12
|
+
const ErrorSummary = ({ className, errors, title = 'There is a problem', ...props }) => {
|
|
13
|
+
return (<>
|
|
14
|
+
{errors && errors.length && (<div className={[
|
|
15
|
+
'ds_error-summary',
|
|
16
|
+
className
|
|
17
|
+
].join(' ')} aria-labelledby="error-summary-title" role="alert" {...props}>
|
|
18
|
+
<h2 className="ds_error-summary__title" id="error-summary-title">{title}</h2>
|
|
19
|
+
|
|
20
|
+
<ul className="ds_error-summary__list">
|
|
21
|
+
{errors && errors.map((error, index) => (<Error fragmentId={error.fragmentId} title={error.title} key={'error' + index}/>))}
|
|
22
|
+
</ul>
|
|
23
|
+
</div>)}
|
|
24
|
+
</>);
|
|
25
|
+
};
|
|
26
|
+
ErrorSummary.displayName = 'ErrorSummary';
|
|
27
|
+
exports.default = ErrorSummary;
|
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
14
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
15
|
+
}) : function(o, v) {
|
|
16
|
+
o["default"] = v;
|
|
17
|
+
});
|
|
18
|
+
var __importStar = (this && this.__importStar) || (function () {
|
|
19
|
+
var ownKeys = function(o) {
|
|
20
|
+
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
21
|
+
var ar = [];
|
|
22
|
+
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
23
|
+
return ar;
|
|
24
|
+
};
|
|
25
|
+
return ownKeys(o);
|
|
26
|
+
};
|
|
27
|
+
return function (mod) {
|
|
28
|
+
if (mod && mod.__esModule) return mod;
|
|
29
|
+
var result = {};
|
|
30
|
+
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
31
|
+
__setModuleDefault(result, mod);
|
|
32
|
+
return result;
|
|
33
|
+
};
|
|
34
|
+
})();
|
|
35
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
36
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
37
|
+
};
|
|
38
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
39
|
+
const summary_list_1 = __importStar(require("../summary-list/summary-list"));
|
|
40
|
+
const wrapper_tag_1 = __importDefault(require("../../common/wrapper-tag"));
|
|
41
|
+
function convertToSlug(string) {
|
|
42
|
+
return string.toLowerCase()
|
|
43
|
+
.replace(/[^\w ]+/g, "")
|
|
44
|
+
.replace(/ +/g, "-");
|
|
45
|
+
}
|
|
46
|
+
const SummaryCard = ({ actions, className, headerLevel = 'h3', items, title, ...props }) => {
|
|
47
|
+
const describedById = `summary-card-${convertToSlug(title)}`;
|
|
48
|
+
return (<div className={[
|
|
49
|
+
'ds_summary-card',
|
|
50
|
+
className
|
|
51
|
+
].join(' ')} {...props}>
|
|
52
|
+
<div className="ds_summary-card__header">
|
|
53
|
+
<wrapper_tag_1.default className="ds_summary-card__header-title" id={describedById} tagName={headerLevel}>{title}</wrapper_tag_1.default>
|
|
54
|
+
|
|
55
|
+
<ul className="ds_summary-card__actions-list">
|
|
56
|
+
{actions && actions.map((action, index) => (<li className="ds_summary-card__actions-list-item" key={'summarylistaction' + index}>
|
|
57
|
+
<summary_list_1.Action describedby={describedById} href={action.href} onclick={action.onclick} title={action.title}/>
|
|
58
|
+
</li>))}
|
|
59
|
+
</ul>
|
|
60
|
+
</div>
|
|
61
|
+
<div className="ds_summary-card__content">
|
|
62
|
+
<summary_list_1.default items={items}/>
|
|
63
|
+
</div>
|
|
64
|
+
</div>);
|
|
65
|
+
};
|
|
66
|
+
SummaryCard.displayName = 'SummaryCard';
|
|
67
|
+
exports.default = SummaryCard;
|
|
@@ -0,0 +1,78 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
exports.Item = exports.Action = exports.Answer = void 0;
|
|
7
|
+
const conditional_wrapper_1 = __importDefault(require("../../common/conditional-wrapper"));
|
|
8
|
+
const wrapper_tag_1 = __importDefault(require("../../common/wrapper-tag"));
|
|
9
|
+
function escapedNewLineToLineBreakTag(string) {
|
|
10
|
+
if (typeof string === 'string') {
|
|
11
|
+
// @ts-ignore
|
|
12
|
+
return string.split('\n').map((item, index) => {
|
|
13
|
+
return (index === 0) ? item : [<br key={index}/>, item];
|
|
14
|
+
});
|
|
15
|
+
}
|
|
16
|
+
}
|
|
17
|
+
function convertToSlug(string) {
|
|
18
|
+
return string.toLowerCase()
|
|
19
|
+
.replace(/[^\w ]+/g, "")
|
|
20
|
+
.replace(/ +/g, "-");
|
|
21
|
+
}
|
|
22
|
+
const Answer = ({ value }) => {
|
|
23
|
+
let processedValue;
|
|
24
|
+
if (typeof value === 'string') {
|
|
25
|
+
processedValue = escapedNewLineToLineBreakTag(value);
|
|
26
|
+
}
|
|
27
|
+
return (<q className="ds_summary-list__answer">{processedValue}</q>);
|
|
28
|
+
};
|
|
29
|
+
exports.Answer = Answer;
|
|
30
|
+
const Action = ({ describedby, href, onclick, title, }) => {
|
|
31
|
+
let tagName = 'button';
|
|
32
|
+
if (href) {
|
|
33
|
+
tagName = 'a';
|
|
34
|
+
}
|
|
35
|
+
return (<wrapper_tag_1.default aria-describedby={describedby} className="ds_link" href={href} onClick={onclick} tagName={tagName} type={tagName === 'button' ? 'button' : undefined}>
|
|
36
|
+
{title}
|
|
37
|
+
</wrapper_tag_1.default>);
|
|
38
|
+
};
|
|
39
|
+
exports.Action = Action;
|
|
40
|
+
const Item = ({ actions, index = 1, title, value }) => {
|
|
41
|
+
let values = [];
|
|
42
|
+
if (typeof value === 'string') {
|
|
43
|
+
values = [value];
|
|
44
|
+
}
|
|
45
|
+
else {
|
|
46
|
+
values = value;
|
|
47
|
+
}
|
|
48
|
+
const describedById = `q${index + 1}-${convertToSlug(title)}`;
|
|
49
|
+
return (<li className="ds_summary-list__item">
|
|
50
|
+
<span className="ds_summary-list__key" id={describedById}>{title}</span>
|
|
51
|
+
<span className="ds_summary-list__value">
|
|
52
|
+
<conditional_wrapper_1.default condition={values.length > 1} wrapper={(children) => <ul className="ds_no-bullets">{children}</ul>}>
|
|
53
|
+
{values && values.map((value, index) => (<conditional_wrapper_1.default condition={values.length > 1} wrapper={(children) => <li>{children}</li>} key={'answer' + index}>
|
|
54
|
+
<exports.Answer value={value}/>
|
|
55
|
+
</conditional_wrapper_1.default>))}
|
|
56
|
+
</conditional_wrapper_1.default>
|
|
57
|
+
</span>
|
|
58
|
+
{actions &&
|
|
59
|
+
<div className="ds_summary-list__actions">
|
|
60
|
+
{actions && actions.map((action, index) => (<exports.Action describedby={describedById} href={action.href} onclick={action.onclick} title={action.title} key={'summarylistaction' + index}/>))}
|
|
61
|
+
</div>}
|
|
62
|
+
</li>);
|
|
63
|
+
};
|
|
64
|
+
exports.Item = Item;
|
|
65
|
+
const SummaryList = ({ className, items, noBorder, ...props }) => {
|
|
66
|
+
return (<ol className={[
|
|
67
|
+
'ds_summary-list',
|
|
68
|
+
noBorder && 'ds_summary-list--no-border',
|
|
69
|
+
className
|
|
70
|
+
].join(' ')} {...props}>
|
|
71
|
+
{items && items.map((item, index) => (<exports.Item actions={item.actions} title={item.title} value={item.value} index={index} key={'summarylistitem' + index}/>))}
|
|
72
|
+
</ol>);
|
|
73
|
+
};
|
|
74
|
+
SummaryList.displayName = 'SummaryList';
|
|
75
|
+
exports.Action.displayName = 'SummaryListAction';
|
|
76
|
+
exports.Answer.displayName = 'SumaryListAnswer';
|
|
77
|
+
exports.Item.displayName = 'SummaryListItem';
|
|
78
|
+
exports.default = SummaryList;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"fileNames":["../node_modules/typescript/lib/lib.es5.d.ts","../node_modules/typescript/lib/lib.es2015.d.ts","../node_modules/typescript/lib/lib.es2016.d.ts","../node_modules/typescript/lib/lib.es2017.d.ts","../node_modules/typescript/lib/lib.es2018.d.ts","../node_modules/typescript/lib/lib.es2019.d.ts","../node_modules/typescript/lib/lib.es2020.d.ts","../node_modules/typescript/lib/lib.es2021.d.ts","../node_modules/typescript/lib/lib.es2022.d.ts","../node_modules/typescript/lib/lib.es2023.d.ts","../node_modules/typescript/lib/lib.es2024.d.ts","../node_modules/typescript/lib/lib.esnext.d.ts","../node_modules/typescript/lib/lib.dom.d.ts","../node_modules/typescript/lib/lib.dom.iterable.d.ts","../node_modules/typescript/lib/lib.es2015.core.d.ts","../node_modules/typescript/lib/lib.es2015.collection.d.ts","../node_modules/typescript/lib/lib.es2015.generator.d.ts","../node_modules/typescript/lib/lib.es2015.iterable.d.ts","../node_modules/typescript/lib/lib.es2015.promise.d.ts","../node_modules/typescript/lib/lib.es2015.proxy.d.ts","../node_modules/typescript/lib/lib.es2015.reflect.d.ts","../node_modules/typescript/lib/lib.es2015.symbol.d.ts","../node_modules/typescript/lib/lib.es2015.symbol.wellknown.d.ts","../node_modules/typescript/lib/lib.es2016.array.include.d.ts","../node_modules/typescript/lib/lib.es2016.intl.d.ts","../node_modules/typescript/lib/lib.es2017.arraybuffer.d.ts","../node_modules/typescript/lib/lib.es2017.date.d.ts","../node_modules/typescript/lib/lib.es2017.object.d.ts","../node_modules/typescript/lib/lib.es2017.sharedmemory.d.ts","../node_modules/typescript/lib/lib.es2017.string.d.ts","../node_modules/typescript/lib/lib.es2017.intl.d.ts","../node_modules/typescript/lib/lib.es2017.typedarrays.d.ts","../node_modules/typescript/lib/lib.es2018.asyncgenerator.d.ts","../node_modules/typescript/lib/lib.es2018.asynciterable.d.ts","../node_modules/typescript/lib/lib.es2018.intl.d.ts","../node_modules/typescript/lib/lib.es2018.promise.d.ts","../node_modules/typescript/lib/lib.es2018.regexp.d.ts","../node_modules/typescript/lib/lib.es2019.array.d.ts","../node_modules/typescript/lib/lib.es2019.object.d.ts","../node_modules/typescript/lib/lib.es2019.string.d.ts","../node_modules/typescript/lib/lib.es2019.symbol.d.ts","../node_modules/typescript/lib/lib.es2019.intl.d.ts","../node_modules/typescript/lib/lib.es2020.bigint.d.ts","../node_modules/typescript/lib/lib.es2020.date.d.ts","../node_modules/typescript/lib/lib.es2020.promise.d.ts","../node_modules/typescript/lib/lib.es2020.sharedmemory.d.ts","../node_modules/typescript/lib/lib.es2020.string.d.ts","../node_modules/typescript/lib/lib.es2020.symbol.wellknown.d.ts","../node_modules/typescript/lib/lib.es2020.intl.d.ts","../node_modules/typescript/lib/lib.es2020.number.d.ts","../node_modules/typescript/lib/lib.es2021.promise.d.ts","../node_modules/typescript/lib/lib.es2021.string.d.ts","../node_modules/typescript/lib/lib.es2021.weakref.d.ts","../node_modules/typescript/lib/lib.es2021.intl.d.ts","../node_modules/typescript/lib/lib.es2022.array.d.ts","../node_modules/typescript/lib/lib.es2022.error.d.ts","../node_modules/typescript/lib/lib.es2022.intl.d.ts","../node_modules/typescript/lib/lib.es2022.object.d.ts","../node_modules/typescript/lib/lib.es2022.string.d.ts","../node_modules/typescript/lib/lib.es2022.regexp.d.ts","../node_modules/typescript/lib/lib.es2023.array.d.ts","../node_modules/typescript/lib/lib.es2023.collection.d.ts","../node_modules/typescript/lib/lib.es2023.intl.d.ts","../node_modules/typescript/lib/lib.es2024.arraybuffer.d.ts","../node_modules/typescript/lib/lib.es2024.collection.d.ts","../node_modules/typescript/lib/lib.es2024.object.d.ts","../node_modules/typescript/lib/lib.es2024.promise.d.ts","../node_modules/typescript/lib/lib.es2024.regexp.d.ts","../node_modules/typescript/lib/lib.es2024.sharedmemory.d.ts","../node_modules/typescript/lib/lib.es2024.string.d.ts","../node_modules/typescript/lib/lib.esnext.array.d.ts","../node_modules/typescript/lib/lib.esnext.collection.d.ts","../node_modules/typescript/lib/lib.esnext.intl.d.ts","../node_modules/typescript/lib/lib.esnext.disposable.d.ts","../node_modules/typescript/lib/lib.esnext.promise.d.ts","../node_modules/typescript/lib/lib.esnext.decorators.d.ts","../node_modules/typescript/lib/lib.esnext.iterator.d.ts","../node_modules/typescript/lib/lib.esnext.float16.d.ts","../node_modules/typescript/lib/lib.decorators.d.ts","../node_modules/typescript/lib/lib.decorators.legacy.d.ts","../node_modules/@types/react/global.d.ts","../node_modules/csstype/index.d.ts","../node_modules/@types/react/index.d.ts","../@types/global.d.ts","../@types/sgds.d.ts","../@types/common/ConditionalWrapper.d.ts","../@types/common/HintText.d.ts","../@types/common/Icon.d.ts","../@types/common/ScreenReaderText.d.ts","../@types/common/WrapperTag.d.ts","../@types/components/Accordion.d.ts","../@types/components/AspectBox.d.ts","../@types/components/BackToTop.d.ts","../@types/components/Breadcrumbs.d.ts","../@types/components/Button.d.ts","../@types/components/Checkbox.d.ts","../@types/components/ConfirmationMessage.d.ts","../@types/components/ContentsNav.d.ts","../@types/components/DatePicker.d.ts","../@types/components/Details.d.ts","../@types/components/ErrorMessage.d.ts","../@types/components/HideThisPage.d.ts","../@types/components/InsetText.d.ts","../@types/components/Metadata.d.ts","../@types/components/NotificationBanner.d.ts","../@types/components/NotificationPanel.d.ts","../@types/components/PageHeader.d.ts","../@types/components/Pagination.d.ts","../@types/components/PhaseBanner.d.ts","../@types/components/Question.d.ts","../@types/components/RadioButton.d.ts","../@types/components/Select.d.ts","../@types/components/SequentialNavigation.d.ts","../@types/components/SideNavigation.d.ts","../@types/components/SiteNavigation.d.ts","../@types/components/SiteSearch.d.ts","../@types/components/SkipLinks.d.ts","../@types/components/Tag.d.ts","../@types/components/TaskList.d.ts","../@types/components/TextInput.d.ts","../@types/components/Textarea.d.ts","../@types/components/WarningText.d.ts","../src/common/conditional-wrapper.tsx","../src/common/hint-text.tsx","../src/icons/ArrowUpward.tsx","../src/icons/CalendarToday.tsx","../src/icons/Cancel.tsx","../src/icons/CheckCircle.tsx","../src/icons/ChevronLeft.tsx","../src/icons/ChevronRight.tsx","../src/icons/Close.tsx","../src/icons/Description.tsx","../src/icons/DoubleChevronLeft.tsx","../src/icons/DoubleChevronRight.tsx","../src/icons/Error.tsx","../src/icons/ExpandLess.tsx","../src/icons/ExpandMore.tsx","../src/icons/List.tsx","../src/icons/Menu.tsx","../src/icons/PriorityHigh.tsx","../src/icons/Search.tsx","../src/icons/index.ts","../src/common/icon.tsx","../src/common/screen-reader-text.tsx","../src/common/wrapper-tag.tsx","../src/components/accordion/accordion.tsx","../src/components/aspect-box/aspect-box.tsx","../src/components/back-to-top/back-to-top.tsx","../src/components/breadcrumbs/breadcrumbs.tsx","../src/components/button/button.tsx","../src/components/checkbox/checkbox.tsx","../src/components/confirmation-message/confirmation-message.tsx","../src/components/contents-nav/contents-nav.tsx","../src/components/error-message/error-message.tsx","../src/components/text-input/text-input.tsx","../src/components/date-picker/date-picker.tsx","../src/components/details/details.tsx","../src/components/hide-this-page/hide-this-page.tsx","../src/components/inset-text/inset-text.tsx","../src/components/notification-banner/notification-banner.tsx","../src/components/notification-panel/notification-panel.tsx","../src/components/page-header/page-header.tsx","../src/components/page-metadata/page-metadata.tsx","../src/components/pagination/pagination.tsx","../src/components/tag/tag.tsx","../src/components/phase-banner/phase-banner.tsx","../src/components/question/question.tsx","../src/components/radio-button/radio-button.tsx","../src/components/select/select.tsx","../src/components/sequential-navigation/sequential-navigation.tsx","../src/components/side-navigation/side-navigation.tsx","../src/components/site-navigation/site-navigation.tsx","../src/components/site-search/site-search.tsx","../src/components/skip-links/skip-links.tsx","../src/components/task-list/task-list.tsx","../src/components/textarea/textarea.tsx","../src/components/warning-text/warning-text.tsx"],"fileIdsList":[[83],[81,82],[83,142],[83,145],[83,143],[143,144,145],[83,124],[143,145],[145],[83,154,155],[83,143,144],[143],[165],[124,145,154],[124],[124,154],[83,150],[83,123,124,144,165],[83,123,124,150,154],[83,123,124,154],[125,126,127,128,129,130,131,132,133,134,135,136,137,138,139,140,141]],"fileInfos":[{"version":"69684132aeb9b5642cbcd9e22dff7818ff0ee1aa831728af0ecf97d3364d5546","affectsGlobalScope":true,"impliedFormat":1},{"version":"45b7ab580deca34ae9729e97c13cfd999df04416a79116c3bfb483804f85ded4","impliedFormat":1},{"version":"3facaf05f0c5fc569c5649dd359892c98a85557e3e0c847964caeb67076f4d75","impliedFormat":1},{"version":"e44bb8bbac7f10ecc786703fe0a6a4b952189f908707980ba8f3c8975a760962","impliedFormat":1},{"version":"5e1c4c362065a6b95ff952c0eab010f04dcd2c3494e813b493ecfd4fcb9fc0d8","impliedFormat":1},{"version":"68d73b4a11549f9c0b7d352d10e91e5dca8faa3322bfb77b661839c42b1ddec7","impliedFormat":1},{"version":"5efce4fc3c29ea84e8928f97adec086e3dc876365e0982cc8479a07954a3efd4","impliedFormat":1},{"version":"feecb1be483ed332fad555aff858affd90a48ab19ba7272ee084704eb7167569","impliedFormat":1},{"version":"ee7bad0c15b58988daa84371e0b89d313b762ab83cb5b31b8a2d1162e8eb41c2","impliedFormat":1},{"version":"27bdc30a0e32783366a5abeda841bc22757c1797de8681bbe81fbc735eeb1c10","impliedFormat":1},{"version":"8fd575e12870e9944c7e1d62e1f5a73fcf23dd8d3a321f2a2c74c20d022283fe","impliedFormat":1},{"version":"8bf8b5e44e3c9c36f98e1007e8b7018c0f38d8adc07aecef42f5200114547c70","impliedFormat":1},{"version":"092c2bfe125ce69dbb1223c85d68d4d2397d7d8411867b5cc03cec902c233763","affectsGlobalScope":true,"impliedFormat":1},{"version":"07f073f19d67f74d732b1adea08e1dc66b1b58d77cb5b43931dee3d798a2fd53","affectsGlobalScope":true,"impliedFormat":1},{"version":"c57796738e7f83dbc4b8e65132f11a377649c00dd3eee333f672b8f0a6bea671","affectsGlobalScope":true,"impliedFormat":1},{"version":"dc2df20b1bcdc8c2d34af4926e2c3ab15ffe1160a63e58b7e09833f616efff44","affectsGlobalScope":true,"impliedFormat":1},{"version":"515d0b7b9bea2e31ea4ec968e9edd2c39d3eebf4a2d5cbd04e88639819ae3b71","affectsGlobalScope":true,"impliedFormat":1},{"version":"0559b1f683ac7505ae451f9a96ce4c3c92bdc71411651ca6ddb0e88baaaad6a3","affectsGlobalScope":true,"impliedFormat":1},{"version":"0dc1e7ceda9b8b9b455c3a2d67b0412feab00bd2f66656cd8850e8831b08b537","affectsGlobalScope":true,"impliedFormat":1},{"version":"ce691fb9e5c64efb9547083e4a34091bcbe5bdb41027e310ebba8f7d96a98671","affectsGlobalScope":true,"impliedFormat":1},{"version":"8d697a2a929a5fcb38b7a65594020fcef05ec1630804a33748829c5ff53640d0","affectsGlobalScope":true,"impliedFormat":1},{"version":"4ff2a353abf8a80ee399af572debb8faab2d33ad38c4b4474cff7f26e7653b8d","affectsGlobalScope":true,"impliedFormat":1},{"version":"936e80ad36a2ee83fc3caf008e7c4c5afe45b3cf3d5c24408f039c1d47bdc1df","affectsGlobalScope":true,"impliedFormat":1},{"version":"d15bea3d62cbbdb9797079416b8ac375ae99162a7fba5de2c6c505446486ac0a","affectsGlobalScope":true,"impliedFormat":1},{"version":"68d18b664c9d32a7336a70235958b8997ebc1c3b8505f4f1ae2b7e7753b87618","affectsGlobalScope":true,"impliedFormat":1},{"version":"eb3d66c8327153d8fa7dd03f9c58d351107fe824c79e9b56b462935176cdf12a","affectsGlobalScope":true,"impliedFormat":1},{"version":"38f0219c9e23c915ef9790ab1d680440d95419ad264816fa15009a8851e79119","affectsGlobalScope":true,"impliedFormat":1},{"version":"69ab18c3b76cd9b1be3d188eaf8bba06112ebbe2f47f6c322b5105a6fbc45a2e","affectsGlobalScope":true,"impliedFormat":1},{"version":"fef8cfad2e2dc5f5b3d97a6f4f2e92848eb1b88e897bb7318cef0e2820bceaab","affectsGlobalScope":true,"impliedFormat":1},{"version":"2f11ff796926e0832f9ae148008138ad583bd181899ab7dd768a2666700b1893","affectsGlobalScope":true,"impliedFormat":1},{"version":"4de680d5bb41c17f7f68e0419412ca23c98d5749dcaaea1896172f06435891fc","affectsGlobalScope":true,"impliedFormat":1},{"version":"954296b30da6d508a104a3a0b5d96b76495c709785c1d11610908e63481ee667","affectsGlobalScope":true,"impliedFormat":1},{"version":"ac9538681b19688c8eae65811b329d3744af679e0bdfa5d842d0e32524c73e1c","affectsGlobalScope":true,"impliedFormat":1},{"version":"0a969edff4bd52585473d24995c5ef223f6652d6ef46193309b3921d65dd4376","affectsGlobalScope":true,"impliedFormat":1},{"version":"9e9fbd7030c440b33d021da145d3232984c8bb7916f277e8ffd3dc2e3eae2bdb","affectsGlobalScope":true,"impliedFormat":1},{"version":"811ec78f7fefcabbda4bfa93b3eb67d9ae166ef95f9bff989d964061cbf81a0c","affectsGlobalScope":true,"impliedFormat":1},{"version":"717937616a17072082152a2ef351cb51f98802fb4b2fdabd32399843875974ca","affectsGlobalScope":true,"impliedFormat":1},{"version":"d7e7d9b7b50e5f22c915b525acc5a49a7a6584cf8f62d0569e557c5cfc4b2ac2","affectsGlobalScope":true,"impliedFormat":1},{"version":"71c37f4c9543f31dfced6c7840e068c5a5aacb7b89111a4364b1d5276b852557","affectsGlobalScope":true,"impliedFormat":1},{"version":"576711e016cf4f1804676043e6a0a5414252560eb57de9faceee34d79798c850","affectsGlobalScope":true,"impliedFormat":1},{"version":"89c1b1281ba7b8a96efc676b11b264de7a8374c5ea1e6617f11880a13fc56dc6","affectsGlobalScope":true,"impliedFormat":1},{"version":"74f7fa2d027d5b33eb0471c8e82a6c87216223181ec31247c357a3e8e2fddc5b","affectsGlobalScope":true,"impliedFormat":1},{"version":"d6d7ae4d1f1f3772e2a3cde568ed08991a8ae34a080ff1151af28b7f798e22ca","affectsGlobalScope":true,"impliedFormat":1},{"version":"063600664504610fe3e99b717a1223f8b1900087fab0b4cad1496a114744f8df","affectsGlobalScope":true,"impliedFormat":1},{"version":"934019d7e3c81950f9a8426d093458b65d5aff2c7c1511233c0fd5b941e608ab","affectsGlobalScope":true,"impliedFormat":1},{"version":"52ada8e0b6e0482b728070b7639ee42e83a9b1c22d205992756fe020fd9f4a47","affectsGlobalScope":true,"impliedFormat":1},{"version":"3bdefe1bfd4d6dee0e26f928f93ccc128f1b64d5d501ff4a8cf3c6371200e5e6","affectsGlobalScope":true,"impliedFormat":1},{"version":"59fb2c069260b4ba00b5643b907ef5d5341b167e7d1dbf58dfd895658bda2867","affectsGlobalScope":true,"impliedFormat":1},{"version":"639e512c0dfc3fad96a84caad71b8834d66329a1f28dc95e3946c9b58176c73a","affectsGlobalScope":true,"impliedFormat":1},{"version":"368af93f74c9c932edd84c58883e736c9e3d53cec1fe24c0b0ff451f529ceab1","affectsGlobalScope":true,"impliedFormat":1},{"version":"af3dd424cf267428f30ccfc376f47a2c0114546b55c44d8c0f1d57d841e28d74","affectsGlobalScope":true,"impliedFormat":1},{"version":"995c005ab91a498455ea8dfb63aa9f83fa2ea793c3d8aa344be4a1678d06d399","affectsGlobalScope":true,"impliedFormat":1},{"version":"959d36cddf5e7d572a65045b876f2956c973a586da58e5d26cde519184fd9b8a","affectsGlobalScope":true,"impliedFormat":1},{"version":"965f36eae237dd74e6cca203a43e9ca801ce38824ead814728a2807b1910117d","affectsGlobalScope":true,"impliedFormat":1},{"version":"3925a6c820dcb1a06506c90b1577db1fdbf7705d65b62b99dce4be75c637e26b","affectsGlobalScope":true,"impliedFormat":1},{"version":"0a3d63ef2b853447ec4f749d3f368ce642264246e02911fcb1590d8c161b8005","affectsGlobalScope":true,"impliedFormat":1},{"version":"b5ce7a470bc3628408429040c4e3a53a27755022a32fd05e2cb694e7015386c7","affectsGlobalScope":true,"impliedFormat":1},{"version":"8444af78980e3b20b49324f4a16ba35024fef3ee069a0eb67616ea6ca821c47a","affectsGlobalScope":true,"impliedFormat":1},{"version":"3287d9d085fbd618c3971944b65b4be57859f5415f495b33a6adc994edd2f004","affectsGlobalScope":true,"impliedFormat":1},{"version":"b4b67b1a91182421f5df999988c690f14d813b9850b40acd06ed44691f6727ad","affectsGlobalScope":true,"impliedFormat":1},{"version":"df83c2a6c73228b625b0beb6669c7ee2a09c914637e2d35170723ad49c0f5cd4","affectsGlobalScope":true,"impliedFormat":1},{"version":"436aaf437562f276ec2ddbee2f2cdedac7664c1e4c1d2c36839ddd582eeb3d0a","affectsGlobalScope":true,"impliedFormat":1},{"version":"8e3c06ea092138bf9fa5e874a1fdbc9d54805d074bee1de31b99a11e2fec239d","affectsGlobalScope":true,"impliedFormat":1},{"version":"87dc0f382502f5bbce5129bdc0aea21e19a3abbc19259e0b43ae038a9fc4e326","affectsGlobalScope":true,"impliedFormat":1},{"version":"b1cb28af0c891c8c96b2d6b7be76bd394fddcfdb4709a20ba05a7c1605eea0f9","affectsGlobalScope":true,"impliedFormat":1},{"version":"2fef54945a13095fdb9b84f705f2b5994597640c46afeb2ce78352fab4cb3279","affectsGlobalScope":true,"impliedFormat":1},{"version":"ac77cb3e8c6d3565793eb90a8373ee8033146315a3dbead3bde8db5eaf5e5ec6","affectsGlobalScope":true,"impliedFormat":1},{"version":"56e4ed5aab5f5920980066a9409bfaf53e6d21d3f8d020c17e4de584d29600ad","affectsGlobalScope":true,"impliedFormat":1},{"version":"4ece9f17b3866cc077099c73f4983bddbcb1dc7ddb943227f1ec070f529dedd1","affectsGlobalScope":true,"impliedFormat":1},{"version":"0a6282c8827e4b9a95f4bf4f5c205673ada31b982f50572d27103df8ceb8013c","affectsGlobalScope":true,"impliedFormat":1},{"version":"1c9319a09485199c1f7b0498f2988d6d2249793ef67edda49d1e584746be9032","affectsGlobalScope":true,"impliedFormat":1},{"version":"e3a2a0cee0f03ffdde24d89660eba2685bfbdeae955a6c67e8c4c9fd28928eeb","affectsGlobalScope":true,"impliedFormat":1},{"version":"811c71eee4aa0ac5f7adf713323a5c41b0cf6c4e17367a34fbce379e12bbf0a4","affectsGlobalScope":true,"impliedFormat":1},{"version":"51ad4c928303041605b4d7ae32e0c1ee387d43a24cd6f1ebf4a2699e1076d4fa","affectsGlobalScope":true,"impliedFormat":1},{"version":"60037901da1a425516449b9a20073aa03386cce92f7a1fd902d7602be3a7c2e9","affectsGlobalScope":true,"impliedFormat":1},{"version":"d4b1d2c51d058fc21ec2629fff7a76249dec2e36e12960ea056e3ef89174080f","affectsGlobalScope":true,"impliedFormat":1},{"version":"22adec94ef7047a6c9d1af3cb96be87a335908bf9ef386ae9fd50eeb37f44c47","affectsGlobalScope":true,"impliedFormat":1},{"version":"4245fee526a7d1754529d19227ecbf3be066ff79ebb6a380d78e41648f2f224d","affectsGlobalScope":true,"impliedFormat":1},{"version":"8e7f8264d0fb4c5339605a15daadb037bf238c10b654bb3eee14208f860a32ea","affectsGlobalScope":true,"impliedFormat":1},{"version":"782dec38049b92d4e85c1585fbea5474a219c6984a35b004963b00beb1aab538","affectsGlobalScope":true,"impliedFormat":1},{"version":"170d4db14678c68178ee8a3d5a990d5afb759ecb6ec44dbd885c50f6da6204f6","affectsGlobalScope":true,"impliedFormat":1},{"version":"8a8eb4ebffd85e589a1cc7c178e291626c359543403d58c9cd22b81fab5b1fb9","impliedFormat":1},{"version":"d4d7d3f832882a4b2d611a7eaaa80c780c3342b5732090130fa9af4a40bd051e","impliedFormat":1},{"version":"19539467bf78201a93c2a00eeb99c728f52b4e623f14a7f20a691137e784c334","impliedFormat":1},{"version":"d488a94b787eea4a3452f0d71858584d75bbe7717c390d4f192e7220eccc9d5e","affectsGlobalScope":true,"impliedFormat":1},{"version":"098d9d86ccf5d87f66dd1aba5edc7a79ac3c743252d0fcfc165f0842bbbbc03d","affectsGlobalScope":true,"impliedFormat":1},{"version":"5c64ea2259c2aca1681436a2c3515bbb8ae5961c9e3b7586599b9ea93d5126bc","affectsGlobalScope":true,"impliedFormat":1},{"version":"8eed310d2db0da3da23118a505eac0b6a44b1b167a3029ca3946ed816d6c6310","affectsGlobalScope":true,"impliedFormat":1},{"version":"a2e5bd2aad7954b25979f0365662427432b417fee161a0143f4b57df59a77bee","affectsGlobalScope":true,"impliedFormat":1},{"version":"9e4b84a1a0cf7e4beddc9fd133eeb16f57be77a743ed54a22a16f2573dd1049c","affectsGlobalScope":true,"impliedFormat":1},{"version":"501194205e656e49eda24bc4cb2991153086ce84f5de2cc6298958780baf5dc0","affectsGlobalScope":true,"impliedFormat":1},{"version":"7d9f663a357c9604e121dbb84c3197397d4cf0a70c632a7bb8ab52ecffb47fe9","affectsGlobalScope":true,"impliedFormat":1},{"version":"795a3344a3c1b9b23670d059e1d787d9b19bf4f5ba95a2bf1bf6d45f68edf879","affectsGlobalScope":true,"impliedFormat":1},{"version":"7a44882e64a6d02f9a1f7a5df840527c880f521f8391b34139bc3e0bc1a01071","affectsGlobalScope":true,"impliedFormat":1},{"version":"859f84766ebee648a181490b4f8ebc29a3f2759f5e42bc208772eccb094c52db","affectsGlobalScope":true,"impliedFormat":1},{"version":"0cbae2256b8da5fa94a91e4588aacdeb0a76fdc4b95f130fd2a52ce14bae56ae","affectsGlobalScope":true,"impliedFormat":1},{"version":"d4b53d63911fa086cb2fe8dd1fd9fa37db0b0461fee2130174948fefab42b615","affectsGlobalScope":true,"impliedFormat":1},{"version":"0d1bbfc37f476714da448da21f0149cb29764dc28cc293860cd869b433bb4faa","affectsGlobalScope":true,"impliedFormat":1},{"version":"ddd452d2f677bf5eb95e1672bc1376a0745531d256f7cceca0d0bdfedabfefa7","affectsGlobalScope":true,"impliedFormat":1},{"version":"2308590a9d9174ba57f30d6cfe8e07756948759df448de60f3f2efd31615c49b","affectsGlobalScope":true,"impliedFormat":1},{"version":"6f933631f0519bd773d97948188b592717de588ecd462f11345d7a37c5df5176","affectsGlobalScope":true,"impliedFormat":1},{"version":"2516bb822c2a7518b292c5ba9eac441fba997a3d1c8b6df7e81a2fe806b6e477","affectsGlobalScope":true,"impliedFormat":1},{"version":"c206b97d5374757c38f36fb1b6c356b4af822ab252d21a3e90c1b467df41ba13","affectsGlobalScope":true,"impliedFormat":1},{"version":"b4a7a40fb52c0bebeeeed3e67e40d02c576daf6d0c568433b1004fbdc281826b","affectsGlobalScope":true,"impliedFormat":1},{"version":"d2bbe44e8ca142c128f00c20f9fe339ae169d7a1ea7cb04c15b9741788663d5a","affectsGlobalScope":true,"impliedFormat":1},{"version":"d8db02e37668444307cf5df8a0acc6c6a7439b51666c97c345abfa4b82bc21bc","affectsGlobalScope":true,"impliedFormat":1},{"version":"98ca85bc6fcc9b784ae5e74a4645a079ea54f01f8ccce536d08d69bf35bee782","affectsGlobalScope":true,"impliedFormat":1},{"version":"53ce3d7076412b563e1c7e54e888b38b0e6045843151079e09467df5e9c5e8cf","affectsGlobalScope":true,"impliedFormat":1},{"version":"6e1bd61a56720b4adb5bb5fca7a7f91ed91cb5afc70860cd652f10cb390a9321","affectsGlobalScope":true,"impliedFormat":1},{"version":"4d00e31abec9e0f86cf5930cb318852dfbdb7249e86a3135cb80d38a9872b142","affectsGlobalScope":true,"impliedFormat":1},{"version":"6e9bd4fd9758ed505ae41d33753a0cdf46e1549c7809f50bcac83a698905b7e7","affectsGlobalScope":true,"impliedFormat":1},{"version":"fe4b9f17452cbf2eb5723458db431366666f7a49547e309b6215cf81abd30e1f","affectsGlobalScope":true,"impliedFormat":1},{"version":"3e4e533ab1cd3bb55d1a4e87645737eb9b1697a0f203d8f87ea749d33e069d44","affectsGlobalScope":true,"impliedFormat":1},{"version":"d26f2ab557b364856451c4b6fe7a13f7bb259502decf8f3c4d05df5ee9e8a495","affectsGlobalScope":true,"impliedFormat":1},{"version":"5dbaaa54ab4b7a06488588a23fad4fb1e29c6698120846421e0748cae042caf5","affectsGlobalScope":true,"impliedFormat":1},{"version":"6fba9b8227813f40a4b1da3b0621a6875ac3a60fb03f716bad5ba35ae31200e7","affectsGlobalScope":true,"impliedFormat":1},{"version":"f79373f20bb8b8a2268e13516a67c003b5f87edd088d49478028031299567fce","affectsGlobalScope":true,"impliedFormat":1},{"version":"f320fba72ee15fdba35a7e57744f432f12d200d4cf4ff8ddfdfe7faee84a8cae","affectsGlobalScope":true,"impliedFormat":1},{"version":"b229c3f876810314bd63b09c469d69aeb2e02c22ca6342dfdccb5202c7874d0d","affectsGlobalScope":true,"impliedFormat":1},{"version":"c3e2bde011912c71f039c03fed5121c804bb49fdd3845f6aef36f620e9d113ed","affectsGlobalScope":true,"impliedFormat":1},{"version":"cc670c5cfaeed3b2362c9addc3b2037c2633f284f6d5d2679d9bcf043a8f21e5","affectsGlobalScope":true,"impliedFormat":1},{"version":"02e9eac7ab6147b04f14766548bdfea780b3e8b662ae95d2f6c855b34bc2de50","affectsGlobalScope":true,"impliedFormat":1},{"version":"68fe33fa82c2dd40de4f5e62d46ff7712a55e5ff11c5a00f45d46e3f4736dd32","impliedFormat":1},{"version":"81196068f2e4f59cc70e5a595b073a5798eef50054ed3807a43e457f78c84c55","impliedFormat":1},{"version":"d48a57bbd0f108b0b823e4b7e504202849565bc7ec3d6152c1edd034085e634d","impliedFormat":1},{"version":"cdc6aa72ff56d7ba4b5663b538499b7a62e28949b90998d9de586efa1f0da6c2","impliedFormat":1},{"version":"fbe469b136d2a63dd6646f4db9fd20a0450fb36669c41b7e0cbfab02e4fd92c9","impliedFormat":1},{"version":"efe87d1b6cb3254e1653596191c4a1fa9b804bdae9698688ba5baf810dbc4023","impliedFormat":1},{"version":"e0342cb84d606a3b91e9784941133d2f13bd165357a1c7dbb2b3601f974e645b","impliedFormat":1},{"version":"1470e989c2de33c13f0fcfa6a474155fe4feae743b159de0c8b083b7dc1b3873","impliedFormat":1},{"version":"857f0ef3de579385929b8000aa19144ecc5832542a4d723c8caa303a0ad8bd9a","impliedFormat":1},{"version":"e0b7f78273174809c37621c93e4afdb6dda2e4c0f40805408f4fa56514e652ae","impliedFormat":1},{"version":"3cc501ddf785b169b74f8e432bde654cd922a754750bb29a576b2a79b8f9618e","impliedFormat":1},{"version":"a971267c48315984df5712dfeb2b281a17a5548caa891a54c2502279b7e2444f","impliedFormat":1},{"version":"3d72a0e2843bcabaf41c6ef01643d13a75e06d76cb3495b48151ef96822c40fb","impliedFormat":1},{"version":"3049d785b956bb9de6260c9c1d5cc58f4226362a7fa82c01351df3531163d906","impliedFormat":1},{"version":"acb8d9e9d696eab779c15c7c8b055222af07080555be8accc9b018cd8d534cba","impliedFormat":1},{"version":"98789e27920c08833bd9ccae41894fb57127b9f4d0477b9b733834126038744b","impliedFormat":1},{"version":"312bbdca0451338ddba6e043ff7b0e00fe1f3e8297e08d043090f8e33ca01201","impliedFormat":1},{"version":"847b85d627fdf793907ca6e4fb9474b97990f3ea74fe11f3f8de11428015812d","impliedFormat":1},{"version":"d1a2785ad9fcef9d68e4a921ee246c013e486f5e1481561f39e46a37e1a5dcd1","impliedFormat":1},{"version":"3dd438650ddd09deba40546d202441b76eb13c472f1629ebe83e08a3b8b0a314","impliedFormat":1},{"version":"b67a2c276be67d499f5e7fcf4e74db7f80e64d5fa81f386ca612037c3221c52d","impliedFormat":1},{"version":"71658a25bc2c1c615459d63c9e1ecc230822572c06112d570f63b2a6352333b1","impliedFormat":1},{"version":"1c1d08289fee4149d7a9b6a71f2d8f622312c642ba23ca6c67dbc182a34a90e6","impliedFormat":1},{"version":"e1773f8ac220dbf2d375272db9402d66c2d1da29587c0247ac9f52751134d8fb","impliedFormat":1},{"version":"68ed7411ba50ebf08ff30d1adb3907f4760f0426fe150d0499ee735a7fb421c3","impliedFormat":1},{"version":"952003a41df47efd4953172b57ae292ec5b07011d3e1c6bd6dbcd03e1ea9d05c","impliedFormat":1},{"version":"a4b009a721caedee5187f0ba1b9bba106e76238727de2f915730607fa22f0df3","impliedFormat":1},{"version":"6a243a02400cfe956a2921089defaac4e24add269cdbd02d34bd89b00e8f33ed","impliedFormat":1},{"version":"ee6fac5b0e386e8d8c31dcaf02b1ebf8e5b19eaa7d36f29f5f1491a139fdb0a3","impliedFormat":1},{"version":"c7fd28b5593005835d464907b9972e0d262e0e3543e61d44faa61a68bdf7a8f5","impliedFormat":1},{"version":"70287ac8ab96b9601995d6325dca0543dd1a650a7f85db613efb5c14be6eb839","impliedFormat":1},{"version":"0416a5fe878ebedc02e06bfe19bd663ecc9c04509dea0e5e3f4bbfc62de890b8","impliedFormat":1},{"version":"7fa59462b792f41759b3582468896930915eac62083db3a13f13952a045113ba","impliedFormat":1},{"version":"18b46142bd8bf3904a662a606816d6dd3af28a78aa20bd6c442b7ddcaff5100b","impliedFormat":1},{"version":"d63b732a10871586e4e10603788a3b4beedd0e4dfcf96e3f9a62e3024d605953","impliedFormat":1},{"version":"168e368aa5c3570939d938550b9d509957ae2ef24894e217691280fac5a89299","impliedFormat":1},{"version":"bb075edab757fa79c11ea29b67ff72f5bf9714314f03959aca0ba98b3b9aec4c","impliedFormat":1},{"version":"fd339668c2b6c235082ada57bd3676472f27824d095441528b34a93aabf1cd14","impliedFormat":1},{"version":"ce42cccbdd55dbfea43e32448bd29252b778bba1e1a4857a3612525f37275185","impliedFormat":1},{"version":"9afd7adbfef5e5cb2c7bf1bc4699e770e3a5322860a681c413b76518f212a8a7","impliedFormat":1},{"version":"72f00bc306c9515ec674649012078c7d282b4eff1e3d5958fa3bce27d8661e6f","impliedFormat":1},{"version":"fc3ddeca79c454884293b639e446fe5dc6c0448a8a01d8593c034161a96b3b3f","impliedFormat":1},{"version":"19ac84ce5462c741d67e99fb788a5f7766bb392f938a9ea6f94534a71d4a7b7a","impliedFormat":1},{"version":"9b1eea31953c44c52a024e203a10763f2477740e6beaff8ae2e57cbad50d8512","impliedFormat":1},{"version":"1d9498d7d5307bd7d44e931893a5024d0f50d13ca16afce3917690603b063744","impliedFormat":1},{"version":"f197bb05cc35c9d3d553ef4db6255c66537928cb1767b35177829e3180224826","impliedFormat":1},{"version":"c2babf2ff10557783429d954b613d5fc8164f14ff7645c939bfd5fe1e7880b19","impliedFormat":1},{"version":"ca9fbca3a40eb55e3566e6b5c67a535faf6c0d50654f0c3d49b9b62cd84650fb","impliedFormat":1},{"version":"5b50fb0a2b3e7d124e4b7547cc1670fa3a6b0430abafa488ec82a45605917b66","impliedFormat":1},{"version":"823be4a3cafb660e571baa2a82240a584304192e83e9d473b34f154235cb9870","impliedFormat":1},{"version":"23425ab5f8c466058835f3b85605196321e479bc39aa121164de50013c603167","impliedFormat":1},{"version":"d8a8326bd7f6c4ec38d06566169e7ad954a8e9cca2faadd1996e9fa6e89653ce","impliedFormat":1},{"version":"6f17fe396319d1eff09115d2c2729a1a42303547d441c6ef4a896396f5d70fdf","impliedFormat":1},{"version":"a1f4efb52cf44b460191d725e11839224bbb3d3ddfa66d72f47bd786d5dedb58","impliedFormat":1},{"version":"651fdffc4aca1129ae4a70228d3171e8acb637307bb6a85b791cd68f33416aaf","impliedFormat":1}],"root":[[84,141],[143,177]],"options":{"allowJs":false,"esModuleInterop":true,"jsx":1,"module":199,"noFallthroughCasesInSwitch":true,"noUnusedLocals":true,"noUnusedParameters":true,"outDir":"./","strict":true,"target":99},"referencedMap":[[84,1],[83,2],[143,3],[146,4],[147,1],[148,5],[150,6],[151,7],[152,8],[153,9],[156,10],[158,1],[160,11],[161,9],[164,12],[166,13],[167,14],[168,15],[169,16],[171,1],[173,17],[175,18],[155,19],[176,20],[125,1],[126,1],[127,1],[128,1],[129,1],[130,1],[131,1],[132,1],[133,1],[134,1],[135,1],[136,1],[137,1],[138,1],[139,1],[140,1],[141,1],[142,21]],"version":"5.8.3"}
|
|
1
|
+
{"fileNames":["../node_modules/typescript/lib/lib.es5.d.ts","../node_modules/typescript/lib/lib.es2015.d.ts","../node_modules/typescript/lib/lib.es2016.d.ts","../node_modules/typescript/lib/lib.es2017.d.ts","../node_modules/typescript/lib/lib.es2018.d.ts","../node_modules/typescript/lib/lib.es2019.d.ts","../node_modules/typescript/lib/lib.es2020.d.ts","../node_modules/typescript/lib/lib.es2021.d.ts","../node_modules/typescript/lib/lib.es2022.d.ts","../node_modules/typescript/lib/lib.es2023.d.ts","../node_modules/typescript/lib/lib.es2024.d.ts","../node_modules/typescript/lib/lib.esnext.d.ts","../node_modules/typescript/lib/lib.dom.d.ts","../node_modules/typescript/lib/lib.dom.iterable.d.ts","../node_modules/typescript/lib/lib.es2015.core.d.ts","../node_modules/typescript/lib/lib.es2015.collection.d.ts","../node_modules/typescript/lib/lib.es2015.generator.d.ts","../node_modules/typescript/lib/lib.es2015.iterable.d.ts","../node_modules/typescript/lib/lib.es2015.promise.d.ts","../node_modules/typescript/lib/lib.es2015.proxy.d.ts","../node_modules/typescript/lib/lib.es2015.reflect.d.ts","../node_modules/typescript/lib/lib.es2015.symbol.d.ts","../node_modules/typescript/lib/lib.es2015.symbol.wellknown.d.ts","../node_modules/typescript/lib/lib.es2016.array.include.d.ts","../node_modules/typescript/lib/lib.es2016.intl.d.ts","../node_modules/typescript/lib/lib.es2017.arraybuffer.d.ts","../node_modules/typescript/lib/lib.es2017.date.d.ts","../node_modules/typescript/lib/lib.es2017.object.d.ts","../node_modules/typescript/lib/lib.es2017.sharedmemory.d.ts","../node_modules/typescript/lib/lib.es2017.string.d.ts","../node_modules/typescript/lib/lib.es2017.intl.d.ts","../node_modules/typescript/lib/lib.es2017.typedarrays.d.ts","../node_modules/typescript/lib/lib.es2018.asyncgenerator.d.ts","../node_modules/typescript/lib/lib.es2018.asynciterable.d.ts","../node_modules/typescript/lib/lib.es2018.intl.d.ts","../node_modules/typescript/lib/lib.es2018.promise.d.ts","../node_modules/typescript/lib/lib.es2018.regexp.d.ts","../node_modules/typescript/lib/lib.es2019.array.d.ts","../node_modules/typescript/lib/lib.es2019.object.d.ts","../node_modules/typescript/lib/lib.es2019.string.d.ts","../node_modules/typescript/lib/lib.es2019.symbol.d.ts","../node_modules/typescript/lib/lib.es2019.intl.d.ts","../node_modules/typescript/lib/lib.es2020.bigint.d.ts","../node_modules/typescript/lib/lib.es2020.date.d.ts","../node_modules/typescript/lib/lib.es2020.promise.d.ts","../node_modules/typescript/lib/lib.es2020.sharedmemory.d.ts","../node_modules/typescript/lib/lib.es2020.string.d.ts","../node_modules/typescript/lib/lib.es2020.symbol.wellknown.d.ts","../node_modules/typescript/lib/lib.es2020.intl.d.ts","../node_modules/typescript/lib/lib.es2020.number.d.ts","../node_modules/typescript/lib/lib.es2021.promise.d.ts","../node_modules/typescript/lib/lib.es2021.string.d.ts","../node_modules/typescript/lib/lib.es2021.weakref.d.ts","../node_modules/typescript/lib/lib.es2021.intl.d.ts","../node_modules/typescript/lib/lib.es2022.array.d.ts","../node_modules/typescript/lib/lib.es2022.error.d.ts","../node_modules/typescript/lib/lib.es2022.intl.d.ts","../node_modules/typescript/lib/lib.es2022.object.d.ts","../node_modules/typescript/lib/lib.es2022.string.d.ts","../node_modules/typescript/lib/lib.es2022.regexp.d.ts","../node_modules/typescript/lib/lib.es2023.array.d.ts","../node_modules/typescript/lib/lib.es2023.collection.d.ts","../node_modules/typescript/lib/lib.es2023.intl.d.ts","../node_modules/typescript/lib/lib.es2024.arraybuffer.d.ts","../node_modules/typescript/lib/lib.es2024.collection.d.ts","../node_modules/typescript/lib/lib.es2024.object.d.ts","../node_modules/typescript/lib/lib.es2024.promise.d.ts","../node_modules/typescript/lib/lib.es2024.regexp.d.ts","../node_modules/typescript/lib/lib.es2024.sharedmemory.d.ts","../node_modules/typescript/lib/lib.es2024.string.d.ts","../node_modules/typescript/lib/lib.esnext.array.d.ts","../node_modules/typescript/lib/lib.esnext.collection.d.ts","../node_modules/typescript/lib/lib.esnext.intl.d.ts","../node_modules/typescript/lib/lib.esnext.disposable.d.ts","../node_modules/typescript/lib/lib.esnext.promise.d.ts","../node_modules/typescript/lib/lib.esnext.decorators.d.ts","../node_modules/typescript/lib/lib.esnext.iterator.d.ts","../node_modules/typescript/lib/lib.esnext.float16.d.ts","../node_modules/typescript/lib/lib.decorators.d.ts","../node_modules/typescript/lib/lib.decorators.legacy.d.ts","../node_modules/@types/react/global.d.ts","../node_modules/csstype/index.d.ts","../node_modules/@types/react/index.d.ts","../@types/global.d.ts","../@types/sgds.d.ts","../@types/common/ConditionalWrapper.d.ts","../@types/common/HintText.d.ts","../@types/common/Icon.d.ts","../@types/common/ScreenReaderText.d.ts","../@types/common/WrapperTag.d.ts","../@types/components/Accordion.d.ts","../@types/components/AspectBox.d.ts","../@types/components/BackToTop.d.ts","../@types/components/Breadcrumbs.d.ts","../@types/components/Button.d.ts","../@types/components/Checkbox.d.ts","../@types/components/ConfirmationMessage.d.ts","../@types/components/ContentsNav.d.ts","../@types/components/DatePicker.d.ts","../@types/components/Details.d.ts","../@types/components/ErrorMessage.d.ts","../@types/components/ErrorSummary.d.ts","../@types/components/HideThisPage.d.ts","../@types/components/InsetText.d.ts","../@types/components/Metadata.d.ts","../@types/components/NotificationBanner.d.ts","../@types/components/NotificationPanel.d.ts","../@types/components/PageHeader.d.ts","../@types/components/Pagination.d.ts","../@types/components/PhaseBanner.d.ts","../@types/components/Question.d.ts","../@types/components/RadioButton.d.ts","../@types/components/Select.d.ts","../@types/components/SequentialNavigation.d.ts","../@types/components/SideNavigation.d.ts","../@types/components/SiteNavigation.d.ts","../@types/components/SiteSearch.d.ts","../@types/components/SkipLinks.d.ts","../@types/components/SummaryCard.d.ts","../@types/components/SummaryList.d.ts","../@types/components/Tag.d.ts","../@types/components/TaskList.d.ts","../@types/components/TextInput.d.ts","../@types/components/Textarea.d.ts","../@types/components/WarningText.d.ts","../src/common/conditional-wrapper.tsx","../src/common/hint-text.tsx","../src/icons/ArrowUpward.tsx","../src/icons/CalendarToday.tsx","../src/icons/Cancel.tsx","../src/icons/CheckCircle.tsx","../src/icons/ChevronLeft.tsx","../src/icons/ChevronRight.tsx","../src/icons/Close.tsx","../src/icons/Description.tsx","../src/icons/DoubleChevronLeft.tsx","../src/icons/DoubleChevronRight.tsx","../src/icons/Error.tsx","../src/icons/ExpandLess.tsx","../src/icons/ExpandMore.tsx","../src/icons/List.tsx","../src/icons/Menu.tsx","../src/icons/PriorityHigh.tsx","../src/icons/Search.tsx","../src/icons/index.ts","../src/common/icon.tsx","../src/common/screen-reader-text.tsx","../src/common/wrapper-tag.tsx","../src/components/accordion/accordion.tsx","../src/components/aspect-box/aspect-box.tsx","../src/components/back-to-top/back-to-top.tsx","../src/components/breadcrumbs/breadcrumbs.tsx","../src/components/button/button.tsx","../src/components/checkbox/checkbox.tsx","../src/components/confirmation-message/confirmation-message.tsx","../src/components/contents-nav/contents-nav.tsx","../src/components/error-message/error-message.tsx","../src/components/text-input/text-input.tsx","../src/components/date-picker/date-picker.tsx","../src/components/details/details.tsx","../src/components/error-summary/error-summary.tsx","../src/components/hide-this-page/hide-this-page.tsx","../src/components/inset-text/inset-text.tsx","../src/components/notification-banner/notification-banner.tsx","../src/components/notification-panel/notification-panel.tsx","../src/components/page-header/page-header.tsx","../src/components/page-metadata/page-metadata.tsx","../src/components/pagination/pagination.tsx","../src/components/tag/tag.tsx","../src/components/phase-banner/phase-banner.tsx","../src/components/question/question.tsx","../src/components/radio-button/radio-button.tsx","../src/components/select/select.tsx","../src/components/sequential-navigation/sequential-navigation.tsx","../src/components/side-navigation/side-navigation.tsx","../src/components/site-navigation/site-navigation.tsx","../src/components/site-search/site-search.tsx","../src/components/skip-links/skip-links.tsx","../src/components/summary-list/summary-list.tsx","../src/components/summary-card/summary-card.tsx","../src/components/task-list/task-list.tsx","../src/components/textarea/textarea.tsx","../src/components/warning-text/warning-text.tsx"],"fileIdsList":[[83],[81,82],[83,145],[83,148],[83,146],[146,147,148],[83,127],[146,148],[148],[83,157,158],[126],[83,146,147],[146],[169],[127,148,157],[127],[127,157],[83,153],[148,179],[126,148],[83,126,127,147,169],[83,126,127,153,157],[83,126,127,157],[128,129,130,131,132,133,134,135,136,137,138,139,140,141,142,143,144]],"fileInfos":[{"version":"69684132aeb9b5642cbcd9e22dff7818ff0ee1aa831728af0ecf97d3364d5546","affectsGlobalScope":true,"impliedFormat":1},{"version":"45b7ab580deca34ae9729e97c13cfd999df04416a79116c3bfb483804f85ded4","impliedFormat":1},{"version":"3facaf05f0c5fc569c5649dd359892c98a85557e3e0c847964caeb67076f4d75","impliedFormat":1},{"version":"e44bb8bbac7f10ecc786703fe0a6a4b952189f908707980ba8f3c8975a760962","impliedFormat":1},{"version":"5e1c4c362065a6b95ff952c0eab010f04dcd2c3494e813b493ecfd4fcb9fc0d8","impliedFormat":1},{"version":"68d73b4a11549f9c0b7d352d10e91e5dca8faa3322bfb77b661839c42b1ddec7","impliedFormat":1},{"version":"5efce4fc3c29ea84e8928f97adec086e3dc876365e0982cc8479a07954a3efd4","impliedFormat":1},{"version":"feecb1be483ed332fad555aff858affd90a48ab19ba7272ee084704eb7167569","impliedFormat":1},{"version":"ee7bad0c15b58988daa84371e0b89d313b762ab83cb5b31b8a2d1162e8eb41c2","impliedFormat":1},{"version":"27bdc30a0e32783366a5abeda841bc22757c1797de8681bbe81fbc735eeb1c10","impliedFormat":1},{"version":"8fd575e12870e9944c7e1d62e1f5a73fcf23dd8d3a321f2a2c74c20d022283fe","impliedFormat":1},{"version":"8bf8b5e44e3c9c36f98e1007e8b7018c0f38d8adc07aecef42f5200114547c70","impliedFormat":1},{"version":"092c2bfe125ce69dbb1223c85d68d4d2397d7d8411867b5cc03cec902c233763","affectsGlobalScope":true,"impliedFormat":1},{"version":"07f073f19d67f74d732b1adea08e1dc66b1b58d77cb5b43931dee3d798a2fd53","affectsGlobalScope":true,"impliedFormat":1},{"version":"c57796738e7f83dbc4b8e65132f11a377649c00dd3eee333f672b8f0a6bea671","affectsGlobalScope":true,"impliedFormat":1},{"version":"dc2df20b1bcdc8c2d34af4926e2c3ab15ffe1160a63e58b7e09833f616efff44","affectsGlobalScope":true,"impliedFormat":1},{"version":"515d0b7b9bea2e31ea4ec968e9edd2c39d3eebf4a2d5cbd04e88639819ae3b71","affectsGlobalScope":true,"impliedFormat":1},{"version":"0559b1f683ac7505ae451f9a96ce4c3c92bdc71411651ca6ddb0e88baaaad6a3","affectsGlobalScope":true,"impliedFormat":1},{"version":"0dc1e7ceda9b8b9b455c3a2d67b0412feab00bd2f66656cd8850e8831b08b537","affectsGlobalScope":true,"impliedFormat":1},{"version":"ce691fb9e5c64efb9547083e4a34091bcbe5bdb41027e310ebba8f7d96a98671","affectsGlobalScope":true,"impliedFormat":1},{"version":"8d697a2a929a5fcb38b7a65594020fcef05ec1630804a33748829c5ff53640d0","affectsGlobalScope":true,"impliedFormat":1},{"version":"4ff2a353abf8a80ee399af572debb8faab2d33ad38c4b4474cff7f26e7653b8d","affectsGlobalScope":true,"impliedFormat":1},{"version":"936e80ad36a2ee83fc3caf008e7c4c5afe45b3cf3d5c24408f039c1d47bdc1df","affectsGlobalScope":true,"impliedFormat":1},{"version":"d15bea3d62cbbdb9797079416b8ac375ae99162a7fba5de2c6c505446486ac0a","affectsGlobalScope":true,"impliedFormat":1},{"version":"68d18b664c9d32a7336a70235958b8997ebc1c3b8505f4f1ae2b7e7753b87618","affectsGlobalScope":true,"impliedFormat":1},{"version":"eb3d66c8327153d8fa7dd03f9c58d351107fe824c79e9b56b462935176cdf12a","affectsGlobalScope":true,"impliedFormat":1},{"version":"38f0219c9e23c915ef9790ab1d680440d95419ad264816fa15009a8851e79119","affectsGlobalScope":true,"impliedFormat":1},{"version":"69ab18c3b76cd9b1be3d188eaf8bba06112ebbe2f47f6c322b5105a6fbc45a2e","affectsGlobalScope":true,"impliedFormat":1},{"version":"fef8cfad2e2dc5f5b3d97a6f4f2e92848eb1b88e897bb7318cef0e2820bceaab","affectsGlobalScope":true,"impliedFormat":1},{"version":"2f11ff796926e0832f9ae148008138ad583bd181899ab7dd768a2666700b1893","affectsGlobalScope":true,"impliedFormat":1},{"version":"4de680d5bb41c17f7f68e0419412ca23c98d5749dcaaea1896172f06435891fc","affectsGlobalScope":true,"impliedFormat":1},{"version":"954296b30da6d508a104a3a0b5d96b76495c709785c1d11610908e63481ee667","affectsGlobalScope":true,"impliedFormat":1},{"version":"ac9538681b19688c8eae65811b329d3744af679e0bdfa5d842d0e32524c73e1c","affectsGlobalScope":true,"impliedFormat":1},{"version":"0a969edff4bd52585473d24995c5ef223f6652d6ef46193309b3921d65dd4376","affectsGlobalScope":true,"impliedFormat":1},{"version":"9e9fbd7030c440b33d021da145d3232984c8bb7916f277e8ffd3dc2e3eae2bdb","affectsGlobalScope":true,"impliedFormat":1},{"version":"811ec78f7fefcabbda4bfa93b3eb67d9ae166ef95f9bff989d964061cbf81a0c","affectsGlobalScope":true,"impliedFormat":1},{"version":"717937616a17072082152a2ef351cb51f98802fb4b2fdabd32399843875974ca","affectsGlobalScope":true,"impliedFormat":1},{"version":"d7e7d9b7b50e5f22c915b525acc5a49a7a6584cf8f62d0569e557c5cfc4b2ac2","affectsGlobalScope":true,"impliedFormat":1},{"version":"71c37f4c9543f31dfced6c7840e068c5a5aacb7b89111a4364b1d5276b852557","affectsGlobalScope":true,"impliedFormat":1},{"version":"576711e016cf4f1804676043e6a0a5414252560eb57de9faceee34d79798c850","affectsGlobalScope":true,"impliedFormat":1},{"version":"89c1b1281ba7b8a96efc676b11b264de7a8374c5ea1e6617f11880a13fc56dc6","affectsGlobalScope":true,"impliedFormat":1},{"version":"74f7fa2d027d5b33eb0471c8e82a6c87216223181ec31247c357a3e8e2fddc5b","affectsGlobalScope":true,"impliedFormat":1},{"version":"d6d7ae4d1f1f3772e2a3cde568ed08991a8ae34a080ff1151af28b7f798e22ca","affectsGlobalScope":true,"impliedFormat":1},{"version":"063600664504610fe3e99b717a1223f8b1900087fab0b4cad1496a114744f8df","affectsGlobalScope":true,"impliedFormat":1},{"version":"934019d7e3c81950f9a8426d093458b65d5aff2c7c1511233c0fd5b941e608ab","affectsGlobalScope":true,"impliedFormat":1},{"version":"52ada8e0b6e0482b728070b7639ee42e83a9b1c22d205992756fe020fd9f4a47","affectsGlobalScope":true,"impliedFormat":1},{"version":"3bdefe1bfd4d6dee0e26f928f93ccc128f1b64d5d501ff4a8cf3c6371200e5e6","affectsGlobalScope":true,"impliedFormat":1},{"version":"59fb2c069260b4ba00b5643b907ef5d5341b167e7d1dbf58dfd895658bda2867","affectsGlobalScope":true,"impliedFormat":1},{"version":"639e512c0dfc3fad96a84caad71b8834d66329a1f28dc95e3946c9b58176c73a","affectsGlobalScope":true,"impliedFormat":1},{"version":"368af93f74c9c932edd84c58883e736c9e3d53cec1fe24c0b0ff451f529ceab1","affectsGlobalScope":true,"impliedFormat":1},{"version":"af3dd424cf267428f30ccfc376f47a2c0114546b55c44d8c0f1d57d841e28d74","affectsGlobalScope":true,"impliedFormat":1},{"version":"995c005ab91a498455ea8dfb63aa9f83fa2ea793c3d8aa344be4a1678d06d399","affectsGlobalScope":true,"impliedFormat":1},{"version":"959d36cddf5e7d572a65045b876f2956c973a586da58e5d26cde519184fd9b8a","affectsGlobalScope":true,"impliedFormat":1},{"version":"965f36eae237dd74e6cca203a43e9ca801ce38824ead814728a2807b1910117d","affectsGlobalScope":true,"impliedFormat":1},{"version":"3925a6c820dcb1a06506c90b1577db1fdbf7705d65b62b99dce4be75c637e26b","affectsGlobalScope":true,"impliedFormat":1},{"version":"0a3d63ef2b853447ec4f749d3f368ce642264246e02911fcb1590d8c161b8005","affectsGlobalScope":true,"impliedFormat":1},{"version":"b5ce7a470bc3628408429040c4e3a53a27755022a32fd05e2cb694e7015386c7","affectsGlobalScope":true,"impliedFormat":1},{"version":"8444af78980e3b20b49324f4a16ba35024fef3ee069a0eb67616ea6ca821c47a","affectsGlobalScope":true,"impliedFormat":1},{"version":"3287d9d085fbd618c3971944b65b4be57859f5415f495b33a6adc994edd2f004","affectsGlobalScope":true,"impliedFormat":1},{"version":"b4b67b1a91182421f5df999988c690f14d813b9850b40acd06ed44691f6727ad","affectsGlobalScope":true,"impliedFormat":1},{"version":"df83c2a6c73228b625b0beb6669c7ee2a09c914637e2d35170723ad49c0f5cd4","affectsGlobalScope":true,"impliedFormat":1},{"version":"436aaf437562f276ec2ddbee2f2cdedac7664c1e4c1d2c36839ddd582eeb3d0a","affectsGlobalScope":true,"impliedFormat":1},{"version":"8e3c06ea092138bf9fa5e874a1fdbc9d54805d074bee1de31b99a11e2fec239d","affectsGlobalScope":true,"impliedFormat":1},{"version":"87dc0f382502f5bbce5129bdc0aea21e19a3abbc19259e0b43ae038a9fc4e326","affectsGlobalScope":true,"impliedFormat":1},{"version":"b1cb28af0c891c8c96b2d6b7be76bd394fddcfdb4709a20ba05a7c1605eea0f9","affectsGlobalScope":true,"impliedFormat":1},{"version":"2fef54945a13095fdb9b84f705f2b5994597640c46afeb2ce78352fab4cb3279","affectsGlobalScope":true,"impliedFormat":1},{"version":"ac77cb3e8c6d3565793eb90a8373ee8033146315a3dbead3bde8db5eaf5e5ec6","affectsGlobalScope":true,"impliedFormat":1},{"version":"56e4ed5aab5f5920980066a9409bfaf53e6d21d3f8d020c17e4de584d29600ad","affectsGlobalScope":true,"impliedFormat":1},{"version":"4ece9f17b3866cc077099c73f4983bddbcb1dc7ddb943227f1ec070f529dedd1","affectsGlobalScope":true,"impliedFormat":1},{"version":"0a6282c8827e4b9a95f4bf4f5c205673ada31b982f50572d27103df8ceb8013c","affectsGlobalScope":true,"impliedFormat":1},{"version":"1c9319a09485199c1f7b0498f2988d6d2249793ef67edda49d1e584746be9032","affectsGlobalScope":true,"impliedFormat":1},{"version":"e3a2a0cee0f03ffdde24d89660eba2685bfbdeae955a6c67e8c4c9fd28928eeb","affectsGlobalScope":true,"impliedFormat":1},{"version":"811c71eee4aa0ac5f7adf713323a5c41b0cf6c4e17367a34fbce379e12bbf0a4","affectsGlobalScope":true,"impliedFormat":1},{"version":"51ad4c928303041605b4d7ae32e0c1ee387d43a24cd6f1ebf4a2699e1076d4fa","affectsGlobalScope":true,"impliedFormat":1},{"version":"60037901da1a425516449b9a20073aa03386cce92f7a1fd902d7602be3a7c2e9","affectsGlobalScope":true,"impliedFormat":1},{"version":"d4b1d2c51d058fc21ec2629fff7a76249dec2e36e12960ea056e3ef89174080f","affectsGlobalScope":true,"impliedFormat":1},{"version":"22adec94ef7047a6c9d1af3cb96be87a335908bf9ef386ae9fd50eeb37f44c47","affectsGlobalScope":true,"impliedFormat":1},{"version":"4245fee526a7d1754529d19227ecbf3be066ff79ebb6a380d78e41648f2f224d","affectsGlobalScope":true,"impliedFormat":1},{"version":"8e7f8264d0fb4c5339605a15daadb037bf238c10b654bb3eee14208f860a32ea","affectsGlobalScope":true,"impliedFormat":1},{"version":"782dec38049b92d4e85c1585fbea5474a219c6984a35b004963b00beb1aab538","affectsGlobalScope":true,"impliedFormat":1},{"version":"170d4db14678c68178ee8a3d5a990d5afb759ecb6ec44dbd885c50f6da6204f6","affectsGlobalScope":true,"impliedFormat":1},{"version":"8a8eb4ebffd85e589a1cc7c178e291626c359543403d58c9cd22b81fab5b1fb9","impliedFormat":1},{"version":"d4d7d3f832882a4b2d611a7eaaa80c780c3342b5732090130fa9af4a40bd051e","impliedFormat":1},{"version":"19539467bf78201a93c2a00eeb99c728f52b4e623f14a7f20a691137e784c334","impliedFormat":1},{"version":"d488a94b787eea4a3452f0d71858584d75bbe7717c390d4f192e7220eccc9d5e","affectsGlobalScope":true,"impliedFormat":1},{"version":"098d9d86ccf5d87f66dd1aba5edc7a79ac3c743252d0fcfc165f0842bbbbc03d","affectsGlobalScope":true,"impliedFormat":1},{"version":"5c64ea2259c2aca1681436a2c3515bbb8ae5961c9e3b7586599b9ea93d5126bc","affectsGlobalScope":true,"impliedFormat":1},{"version":"8eed310d2db0da3da23118a505eac0b6a44b1b167a3029ca3946ed816d6c6310","affectsGlobalScope":true,"impliedFormat":1},{"version":"a2e5bd2aad7954b25979f0365662427432b417fee161a0143f4b57df59a77bee","affectsGlobalScope":true,"impliedFormat":1},{"version":"9e4b84a1a0cf7e4beddc9fd133eeb16f57be77a743ed54a22a16f2573dd1049c","affectsGlobalScope":true,"impliedFormat":1},{"version":"501194205e656e49eda24bc4cb2991153086ce84f5de2cc6298958780baf5dc0","affectsGlobalScope":true,"impliedFormat":1},{"version":"7d9f663a357c9604e121dbb84c3197397d4cf0a70c632a7bb8ab52ecffb47fe9","affectsGlobalScope":true,"impliedFormat":1},{"version":"795a3344a3c1b9b23670d059e1d787d9b19bf4f5ba95a2bf1bf6d45f68edf879","affectsGlobalScope":true,"impliedFormat":1},{"version":"7a44882e64a6d02f9a1f7a5df840527c880f521f8391b34139bc3e0bc1a01071","affectsGlobalScope":true,"impliedFormat":1},{"version":"859f84766ebee648a181490b4f8ebc29a3f2759f5e42bc208772eccb094c52db","affectsGlobalScope":true,"impliedFormat":1},{"version":"0cbae2256b8da5fa94a91e4588aacdeb0a76fdc4b95f130fd2a52ce14bae56ae","affectsGlobalScope":true,"impliedFormat":1},{"version":"d4b53d63911fa086cb2fe8dd1fd9fa37db0b0461fee2130174948fefab42b615","affectsGlobalScope":true,"impliedFormat":1},{"version":"0d1bbfc37f476714da448da21f0149cb29764dc28cc293860cd869b433bb4faa","affectsGlobalScope":true,"impliedFormat":1},{"version":"ddd452d2f677bf5eb95e1672bc1376a0745531d256f7cceca0d0bdfedabfefa7","affectsGlobalScope":true,"impliedFormat":1},{"version":"2308590a9d9174ba57f30d6cfe8e07756948759df448de60f3f2efd31615c49b","affectsGlobalScope":true,"impliedFormat":1},{"version":"6f933631f0519bd773d97948188b592717de588ecd462f11345d7a37c5df5176","affectsGlobalScope":true,"impliedFormat":1},{"version":"c451de37bca08e532fe1b5688fb7c057bf7d96e8045b9f583dd130be97f09024","affectsGlobalScope":true,"impliedFormat":1},{"version":"2516bb822c2a7518b292c5ba9eac441fba997a3d1c8b6df7e81a2fe806b6e477","affectsGlobalScope":true,"impliedFormat":1},{"version":"c206b97d5374757c38f36fb1b6c356b4af822ab252d21a3e90c1b467df41ba13","affectsGlobalScope":true,"impliedFormat":1},{"version":"b4a7a40fb52c0bebeeeed3e67e40d02c576daf6d0c568433b1004fbdc281826b","affectsGlobalScope":true,"impliedFormat":1},{"version":"d2bbe44e8ca142c128f00c20f9fe339ae169d7a1ea7cb04c15b9741788663d5a","affectsGlobalScope":true,"impliedFormat":1},{"version":"d8db02e37668444307cf5df8a0acc6c6a7439b51666c97c345abfa4b82bc21bc","affectsGlobalScope":true,"impliedFormat":1},{"version":"98ca85bc6fcc9b784ae5e74a4645a079ea54f01f8ccce536d08d69bf35bee782","affectsGlobalScope":true,"impliedFormat":1},{"version":"53ce3d7076412b563e1c7e54e888b38b0e6045843151079e09467df5e9c5e8cf","affectsGlobalScope":true,"impliedFormat":1},{"version":"6e1bd61a56720b4adb5bb5fca7a7f91ed91cb5afc70860cd652f10cb390a9321","affectsGlobalScope":true,"impliedFormat":1},{"version":"4d00e31abec9e0f86cf5930cb318852dfbdb7249e86a3135cb80d38a9872b142","affectsGlobalScope":true,"impliedFormat":1},{"version":"6e9bd4fd9758ed505ae41d33753a0cdf46e1549c7809f50bcac83a698905b7e7","affectsGlobalScope":true,"impliedFormat":1},{"version":"fe4b9f17452cbf2eb5723458db431366666f7a49547e309b6215cf81abd30e1f","affectsGlobalScope":true,"impliedFormat":1},{"version":"3e4e533ab1cd3bb55d1a4e87645737eb9b1697a0f203d8f87ea749d33e069d44","affectsGlobalScope":true,"impliedFormat":1},{"version":"d26f2ab557b364856451c4b6fe7a13f7bb259502decf8f3c4d05df5ee9e8a495","affectsGlobalScope":true,"impliedFormat":1},{"version":"5dbaaa54ab4b7a06488588a23fad4fb1e29c6698120846421e0748cae042caf5","affectsGlobalScope":true,"impliedFormat":1},{"version":"6fba9b8227813f40a4b1da3b0621a6875ac3a60fb03f716bad5ba35ae31200e7","affectsGlobalScope":true,"impliedFormat":1},{"version":"f79373f20bb8b8a2268e13516a67c003b5f87edd088d49478028031299567fce","affectsGlobalScope":true,"impliedFormat":1},{"version":"08a0f462dedef2590111bfa9de1d5fa956dedb8c2ca02cb5da93a831961d3f0f","affectsGlobalScope":true,"impliedFormat":1},{"version":"9b17a7f2be7c7fe2a86ff9fc7639aed1c6572731e65ca7652560604ad92813f1","affectsGlobalScope":true,"impliedFormat":1},{"version":"f320fba72ee15fdba35a7e57744f432f12d200d4cf4ff8ddfdfe7faee84a8cae","affectsGlobalScope":true,"impliedFormat":1},{"version":"b229c3f876810314bd63b09c469d69aeb2e02c22ca6342dfdccb5202c7874d0d","affectsGlobalScope":true,"impliedFormat":1},{"version":"c3e2bde011912c71f039c03fed5121c804bb49fdd3845f6aef36f620e9d113ed","affectsGlobalScope":true,"impliedFormat":1},{"version":"cc670c5cfaeed3b2362c9addc3b2037c2633f284f6d5d2679d9bcf043a8f21e5","affectsGlobalScope":true,"impliedFormat":1},{"version":"02e9eac7ab6147b04f14766548bdfea780b3e8b662ae95d2f6c855b34bc2de50","affectsGlobalScope":true,"impliedFormat":1},{"version":"68fe33fa82c2dd40de4f5e62d46ff7712a55e5ff11c5a00f45d46e3f4736dd32","impliedFormat":1},{"version":"81196068f2e4f59cc70e5a595b073a5798eef50054ed3807a43e457f78c84c55","impliedFormat":1},{"version":"d48a57bbd0f108b0b823e4b7e504202849565bc7ec3d6152c1edd034085e634d","impliedFormat":1},{"version":"cdc6aa72ff56d7ba4b5663b538499b7a62e28949b90998d9de586efa1f0da6c2","impliedFormat":1},{"version":"fbe469b136d2a63dd6646f4db9fd20a0450fb36669c41b7e0cbfab02e4fd92c9","impliedFormat":1},{"version":"efe87d1b6cb3254e1653596191c4a1fa9b804bdae9698688ba5baf810dbc4023","impliedFormat":1},{"version":"e0342cb84d606a3b91e9784941133d2f13bd165357a1c7dbb2b3601f974e645b","impliedFormat":1},{"version":"1470e989c2de33c13f0fcfa6a474155fe4feae743b159de0c8b083b7dc1b3873","impliedFormat":1},{"version":"857f0ef3de579385929b8000aa19144ecc5832542a4d723c8caa303a0ad8bd9a","impliedFormat":1},{"version":"e0b7f78273174809c37621c93e4afdb6dda2e4c0f40805408f4fa56514e652ae","impliedFormat":1},{"version":"3cc501ddf785b169b74f8e432bde654cd922a754750bb29a576b2a79b8f9618e","impliedFormat":1},{"version":"a971267c48315984df5712dfeb2b281a17a5548caa891a54c2502279b7e2444f","impliedFormat":1},{"version":"3d72a0e2843bcabaf41c6ef01643d13a75e06d76cb3495b48151ef96822c40fb","impliedFormat":1},{"version":"3049d785b956bb9de6260c9c1d5cc58f4226362a7fa82c01351df3531163d906","impliedFormat":1},{"version":"acb8d9e9d696eab779c15c7c8b055222af07080555be8accc9b018cd8d534cba","impliedFormat":1},{"version":"98789e27920c08833bd9ccae41894fb57127b9f4d0477b9b733834126038744b","impliedFormat":1},{"version":"312bbdca0451338ddba6e043ff7b0e00fe1f3e8297e08d043090f8e33ca01201","impliedFormat":1},{"version":"847b85d627fdf793907ca6e4fb9474b97990f3ea74fe11f3f8de11428015812d","impliedFormat":1},{"version":"d1a2785ad9fcef9d68e4a921ee246c013e486f5e1481561f39e46a37e1a5dcd1","impliedFormat":1},{"version":"3dd438650ddd09deba40546d202441b76eb13c472f1629ebe83e08a3b8b0a314","impliedFormat":1},{"version":"b67a2c276be67d499f5e7fcf4e74db7f80e64d5fa81f386ca612037c3221c52d","impliedFormat":1},{"version":"71658a25bc2c1c615459d63c9e1ecc230822572c06112d570f63b2a6352333b1","impliedFormat":1},{"version":"1c1d08289fee4149d7a9b6a71f2d8f622312c642ba23ca6c67dbc182a34a90e6","impliedFormat":1},{"version":"e1773f8ac220dbf2d375272db9402d66c2d1da29587c0247ac9f52751134d8fb","impliedFormat":1},{"version":"68ed7411ba50ebf08ff30d1adb3907f4760f0426fe150d0499ee735a7fb421c3","impliedFormat":1},{"version":"952003a41df47efd4953172b57ae292ec5b07011d3e1c6bd6dbcd03e1ea9d05c","impliedFormat":1},{"version":"a4b009a721caedee5187f0ba1b9bba106e76238727de2f915730607fa22f0df3","impliedFormat":1},{"version":"6a243a02400cfe956a2921089defaac4e24add269cdbd02d34bd89b00e8f33ed","impliedFormat":1},{"version":"ee6fac5b0e386e8d8c31dcaf02b1ebf8e5b19eaa7d36f29f5f1491a139fdb0a3","impliedFormat":1},{"version":"c7fd28b5593005835d464907b9972e0d262e0e3543e61d44faa61a68bdf7a8f5","impliedFormat":1},{"version":"70287ac8ab96b9601995d6325dca0543dd1a650a7f85db613efb5c14be6eb839","impliedFormat":1},{"version":"0416a5fe878ebedc02e06bfe19bd663ecc9c04509dea0e5e3f4bbfc62de890b8","impliedFormat":1},{"version":"7fa59462b792f41759b3582468896930915eac62083db3a13f13952a045113ba","impliedFormat":1},{"version":"18b46142bd8bf3904a662a606816d6dd3af28a78aa20bd6c442b7ddcaff5100b","impliedFormat":1},{"version":"d63b732a10871586e4e10603788a3b4beedd0e4dfcf96e3f9a62e3024d605953","impliedFormat":1},{"version":"9f7ae44732e9f7076ca40ce78ec819b129412b9bc8f82fd1979662c248a52a1f","impliedFormat":1},{"version":"168e368aa5c3570939d938550b9d509957ae2ef24894e217691280fac5a89299","impliedFormat":1},{"version":"bb075edab757fa79c11ea29b67ff72f5bf9714314f03959aca0ba98b3b9aec4c","impliedFormat":1},{"version":"fd339668c2b6c235082ada57bd3676472f27824d095441528b34a93aabf1cd14","impliedFormat":1},{"version":"ce42cccbdd55dbfea43e32448bd29252b778bba1e1a4857a3612525f37275185","impliedFormat":1},{"version":"9afd7adbfef5e5cb2c7bf1bc4699e770e3a5322860a681c413b76518f212a8a7","impliedFormat":1},{"version":"72f00bc306c9515ec674649012078c7d282b4eff1e3d5958fa3bce27d8661e6f","impliedFormat":1},{"version":"fc3ddeca79c454884293b639e446fe5dc6c0448a8a01d8593c034161a96b3b3f","impliedFormat":1},{"version":"19ac84ce5462c741d67e99fb788a5f7766bb392f938a9ea6f94534a71d4a7b7a","impliedFormat":1},{"version":"9b1eea31953c44c52a024e203a10763f2477740e6beaff8ae2e57cbad50d8512","impliedFormat":1},{"version":"1d9498d7d5307bd7d44e931893a5024d0f50d13ca16afce3917690603b063744","impliedFormat":1},{"version":"f197bb05cc35c9d3d553ef4db6255c66537928cb1767b35177829e3180224826","impliedFormat":1},{"version":"c2babf2ff10557783429d954b613d5fc8164f14ff7645c939bfd5fe1e7880b19","impliedFormat":1},{"version":"ca9fbca3a40eb55e3566e6b5c67a535faf6c0d50654f0c3d49b9b62cd84650fb","impliedFormat":1},{"version":"5b50fb0a2b3e7d124e4b7547cc1670fa3a6b0430abafa488ec82a45605917b66","impliedFormat":1},{"version":"823be4a3cafb660e571baa2a82240a584304192e83e9d473b34f154235cb9870","impliedFormat":1},{"version":"23425ab5f8c466058835f3b85605196321e479bc39aa121164de50013c603167","impliedFormat":1},{"version":"d8a8326bd7f6c4ec38d06566169e7ad954a8e9cca2faadd1996e9fa6e89653ce","impliedFormat":1},{"version":"1ba2a777ae44b18fa7dc8368998a43561ca2b957dd228105f6a02917e0ee682e","impliedFormat":1},{"version":"77236e6487c2775625ceb2878be7a55885535f4bb6b219731b58f484414d8783","impliedFormat":1},{"version":"6f17fe396319d1eff09115d2c2729a1a42303547d441c6ef4a896396f5d70fdf","impliedFormat":1},{"version":"a1f4efb52cf44b460191d725e11839224bbb3d3ddfa66d72f47bd786d5dedb58","impliedFormat":1},{"version":"651fdffc4aca1129ae4a70228d3171e8acb637307bb6a85b791cd68f33416aaf","impliedFormat":1}],"root":[[84,144],[146,183]],"options":{"allowJs":false,"esModuleInterop":true,"jsx":1,"module":199,"noFallthroughCasesInSwitch":true,"noUnusedLocals":true,"noUnusedParameters":true,"outDir":"./","strict":true,"target":99},"referencedMap":[[84,1],[83,2],[146,3],[149,4],[150,1],[151,5],[153,6],[154,7],[155,8],[156,9],[159,10],[161,11],[162,1],[164,12],[165,9],[168,13],[170,14],[171,15],[172,16],[173,17],[175,1],[177,18],[180,19],[179,20],[181,21],[158,22],[182,23],[128,1],[129,1],[130,1],[131,1],[132,1],[133,1],[134,1],[135,1],[136,1],[137,1],[138,1],[139,1],[140,1],[141,1],[142,1],[143,1],[144,1],[145,24]],"version":"5.8.3"}
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@scottish-government/designsystem-react",
|
|
3
3
|
"description": "A React/JSX implementation of the Scottish Government Design System",
|
|
4
|
-
"version": "0.
|
|
4
|
+
"version": "0.2.0",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"author": {
|
|
7
7
|
"name": "Scottish Government Digital Design System team",
|
|
@@ -0,0 +1,106 @@
|
|
|
1
|
+
import { test, expect } from 'vitest';
|
|
2
|
+
import { render, screen, within } from '@testing-library/react';
|
|
3
|
+
import ErrorSummary from './error-summary';
|
|
4
|
+
import { title } from 'process';
|
|
5
|
+
|
|
6
|
+
const errors = [
|
|
7
|
+
{ fragmentId: 'did-resolve', title: 'Did this resolve your issue?' },
|
|
8
|
+
{ fragmentId: 'what-topics', title: 'What topics are you interested in?' },
|
|
9
|
+
{ fragmentId: 'more-detail', title: 'Please provide more detail' }
|
|
10
|
+
];
|
|
11
|
+
|
|
12
|
+
test('error summary renders correctly', () => {
|
|
13
|
+
const titleId = 'error-summary-title';
|
|
14
|
+
|
|
15
|
+
render(
|
|
16
|
+
<ErrorSummary data-testid="errorsummary" errors={errors} />
|
|
17
|
+
);
|
|
18
|
+
|
|
19
|
+
const errorSummaryElement = screen.getByTestId('errorsummary');
|
|
20
|
+
const errorSummaryTitle = within(errorSummaryElement).getByRole('heading');
|
|
21
|
+
const errorSummaryList = within(errorSummaryElement).getByRole('list');
|
|
22
|
+
const errorSummaryItems = within(errorSummaryList).getAllByRole('listitem');
|
|
23
|
+
const errorSummaryLink1 = within(errorSummaryItems[0]).getByRole('link');
|
|
24
|
+
|
|
25
|
+
expect(errorSummaryElement).toHaveClass('ds_error-summary');
|
|
26
|
+
expect(errorSummaryElement).toHaveAttribute('role', 'alert');
|
|
27
|
+
expect(errorSummaryElement).toHaveAttribute('aria-labelledby', errorSummaryTitle.id);
|
|
28
|
+
expect(errorSummaryElement.tagName).toEqual('DIV');
|
|
29
|
+
|
|
30
|
+
expect(errorSummaryTitle).toHaveClass('ds_error-summary__title');
|
|
31
|
+
expect(errorSummaryTitle).toHaveAttribute('id', titleId);
|
|
32
|
+
expect(errorSummaryTitle.tagName).toEqual('H2');
|
|
33
|
+
expect(errorSummaryTitle.textContent).toEqual('There is a problem');
|
|
34
|
+
|
|
35
|
+
expect(errorSummaryList).toHaveClass('ds_error-summary__list');
|
|
36
|
+
expect(errorSummaryList.tagName).toEqual('UL');
|
|
37
|
+
|
|
38
|
+
expect(errorSummaryItems.length).toEqual(errors.length);
|
|
39
|
+
|
|
40
|
+
expect(errorSummaryLink1).toHaveAttribute('href', `#${errors[0].fragmentId}`);
|
|
41
|
+
expect(errorSummaryLink1.textContent).toEqual(errors[0].title);
|
|
42
|
+
});
|
|
43
|
+
|
|
44
|
+
test('error summary with custom title', () => {
|
|
45
|
+
const title = 'Foo';
|
|
46
|
+
|
|
47
|
+
render(
|
|
48
|
+
<ErrorSummary data-testid="errorsummary" errors={errors} title={title} />
|
|
49
|
+
);
|
|
50
|
+
|
|
51
|
+
const errorSummaryElement = screen.getByTestId('errorsummary');
|
|
52
|
+
const errorSummaryTitle = within(errorSummaryElement).getByRole('heading');
|
|
53
|
+
|
|
54
|
+
expect(errorSummaryTitle.textContent).toEqual(title);
|
|
55
|
+
});
|
|
56
|
+
|
|
57
|
+
test('error summary with no errors (empty array) should not display', () => {
|
|
58
|
+
render(
|
|
59
|
+
<ErrorSummary data-testid="errorsummary" errors={[]} />
|
|
60
|
+
);
|
|
61
|
+
|
|
62
|
+
const errorSummaryElement = screen.queryByTestId('errorsummary');
|
|
63
|
+
|
|
64
|
+
expect(errorSummaryElement).not.toBeInTheDocument();
|
|
65
|
+
});
|
|
66
|
+
|
|
67
|
+
test('error summary with no errors (no errors prop) should not display', () => {
|
|
68
|
+
render(
|
|
69
|
+
<ErrorSummary data-testid="errorsummary" />
|
|
70
|
+
);
|
|
71
|
+
|
|
72
|
+
const errorSummaryElement = screen.queryByTestId('errorsummary');
|
|
73
|
+
|
|
74
|
+
expect(errorSummaryElement).not.toBeInTheDocument();
|
|
75
|
+
});
|
|
76
|
+
|
|
77
|
+
test('error sumary item with no link', () => {
|
|
78
|
+
render(
|
|
79
|
+
<ErrorSummary data-testid="errorsummary" errors={[{ title: 'Did this resolve your issue?' }]} />
|
|
80
|
+
);
|
|
81
|
+
|
|
82
|
+
const errorSummaryElement = screen.getByTestId('errorsummary');
|
|
83
|
+
const errorSummaryItems = within(errorSummaryElement).getAllByRole('listitem');
|
|
84
|
+
const errorSummaryLink1 = within(errorSummaryItems[0]).queryByRole('link');
|
|
85
|
+
|
|
86
|
+
expect(errorSummaryItems[0].textContent).toEqual('Did this resolve your issue?')
|
|
87
|
+
expect(errorSummaryLink1).not.toBeInTheDocument();
|
|
88
|
+
});
|
|
89
|
+
|
|
90
|
+
test('passing additional props', () => {
|
|
91
|
+
render(
|
|
92
|
+
<ErrorSummary data-testid="errorsummary" errors={errors} data-test="foo" />
|
|
93
|
+
)
|
|
94
|
+
|
|
95
|
+
const errorSummaryElement = screen.getByTestId('errorsummary');
|
|
96
|
+
expect(errorSummaryElement?.dataset.test).toEqual('foo');
|
|
97
|
+
});
|
|
98
|
+
|
|
99
|
+
test('passing additional CSS classes', () => {
|
|
100
|
+
render(
|
|
101
|
+
<ErrorSummary data-testid="errorsummary" errors={errors} className="foo" />
|
|
102
|
+
)
|
|
103
|
+
|
|
104
|
+
const errorSummaryElement = screen.getByTestId('errorsummary');
|
|
105
|
+
expect(errorSummaryElement).toHaveClass('foo', 'ds_error-summary');
|
|
106
|
+
});
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
import ConditionalWrapper from '../../common/conditional-wrapper';
|
|
2
|
+
|
|
3
|
+
const Error: React.FC<SGDS.Component.ErrorSummary.Error> = ({
|
|
4
|
+
fragmentId,
|
|
5
|
+
title
|
|
6
|
+
}) => {
|
|
7
|
+
return (
|
|
8
|
+
<li>
|
|
9
|
+
<ConditionalWrapper
|
|
10
|
+
condition={!!fragmentId}
|
|
11
|
+
wrapper={() => <a href={`#${fragmentId}`}>{title}</a>}
|
|
12
|
+
>{title}</ConditionalWrapper>
|
|
13
|
+
</li>
|
|
14
|
+
);
|
|
15
|
+
};
|
|
16
|
+
|
|
17
|
+
const ErrorSummary: React.FC<SGDS.Component.ErrorSummary> = ({
|
|
18
|
+
className,
|
|
19
|
+
errors,
|
|
20
|
+
title = 'There is a problem',
|
|
21
|
+
...props
|
|
22
|
+
}) => {
|
|
23
|
+
return (
|
|
24
|
+
<>
|
|
25
|
+
{errors && errors.length && (
|
|
26
|
+
<div className={[
|
|
27
|
+
'ds_error-summary',
|
|
28
|
+
className
|
|
29
|
+
].join(' ')}
|
|
30
|
+
aria-labelledby="error-summary-title"
|
|
31
|
+
role="alert"
|
|
32
|
+
{...props}
|
|
33
|
+
>
|
|
34
|
+
<h2 className="ds_error-summary__title" id="error-summary-title">{title}</h2>
|
|
35
|
+
|
|
36
|
+
<ul className="ds_error-summary__list">
|
|
37
|
+
{errors && errors.map((error, index: number) => (
|
|
38
|
+
<Error fragmentId={error.fragmentId} title={error.title} key={'error' + index} />
|
|
39
|
+
))}
|
|
40
|
+
</ul>
|
|
41
|
+
</div>
|
|
42
|
+
)}
|
|
43
|
+
</>
|
|
44
|
+
);
|
|
45
|
+
};
|
|
46
|
+
|
|
47
|
+
ErrorSummary.displayName = 'ErrorSummary';
|
|
48
|
+
|
|
49
|
+
export default ErrorSummary;
|
|
@@ -0,0 +1,129 @@
|
|
|
1
|
+
import { test, expect, vi } from 'vitest';
|
|
2
|
+
import { render, screen, within, fireEvent } from '@testing-library/react';
|
|
3
|
+
import SummaryCard from './summary-card';
|
|
4
|
+
import SummaryList from '../summary-list/summary-list';
|
|
5
|
+
|
|
6
|
+
const onClickFn = vi.fn();
|
|
7
|
+
|
|
8
|
+
const actions = [
|
|
9
|
+
{
|
|
10
|
+
title: 'Change',
|
|
11
|
+
href: '#foo'
|
|
12
|
+
},
|
|
13
|
+
{
|
|
14
|
+
title: 'Delete',
|
|
15
|
+
onclick: onClickFn
|
|
16
|
+
}
|
|
17
|
+
];
|
|
18
|
+
|
|
19
|
+
const items = [
|
|
20
|
+
{
|
|
21
|
+
title: 'Phone number',
|
|
22
|
+
value: '0123 456 7890'
|
|
23
|
+
},
|
|
24
|
+
{
|
|
25
|
+
title: 'Address',
|
|
26
|
+
value: `Victoria Quay\nEdinburgh\nEH6 6QQ`
|
|
27
|
+
}
|
|
28
|
+
];
|
|
29
|
+
|
|
30
|
+
const titleText = 'Joe Bloggs';
|
|
31
|
+
|
|
32
|
+
test('summary card renders correctly', () => {
|
|
33
|
+
render(
|
|
34
|
+
<>
|
|
35
|
+
<SummaryCard
|
|
36
|
+
data-testid="foo"
|
|
37
|
+
actions={actions}
|
|
38
|
+
items={items}
|
|
39
|
+
title={titleText}
|
|
40
|
+
/>
|
|
41
|
+
|
|
42
|
+
<SummaryList data-testid="bar" items={items}/>
|
|
43
|
+
</>
|
|
44
|
+
);
|
|
45
|
+
|
|
46
|
+
const summaryCard = screen.getByTestId('foo');
|
|
47
|
+
const title = within(summaryCard).getByRole('heading');
|
|
48
|
+
const header = title.parentElement;
|
|
49
|
+
const content = header?.nextSibling;
|
|
50
|
+
const actionsList = within(header).getByRole('list')
|
|
51
|
+
|
|
52
|
+
const thisList = within(content).getByRole('list');
|
|
53
|
+
const comparisonList = screen.getByTestId('bar');
|
|
54
|
+
|
|
55
|
+
const describedById = 'summary-card-joe-bloggs';
|
|
56
|
+
|
|
57
|
+
expect(summaryCard).toHaveClass('ds_summary-card');
|
|
58
|
+
|
|
59
|
+
expect(header).toHaveClass('ds_summary-card__header');
|
|
60
|
+
expect(header?.tagName).toEqual('DIV');
|
|
61
|
+
|
|
62
|
+
expect(title).toHaveClass('ds_summary-card__header-title');
|
|
63
|
+
expect(title).toHaveAttribute('id', describedById);
|
|
64
|
+
expect(title?.tagName).toEqual('H3');
|
|
65
|
+
expect(title.textContent).toEqual(titleText);
|
|
66
|
+
|
|
67
|
+
expect(actionsList?.tagName).toEqual('UL');
|
|
68
|
+
expect(actionsList.children.length).toEqual(actions.length);
|
|
69
|
+
expect(actionsList.children[0]).toHaveClass('ds_summary-card__actions-list-item');
|
|
70
|
+
expect(actionsList.children[0].tagName).toEqual('LI');
|
|
71
|
+
expect(actionsList.children[0].innerHTML).toEqual('<a aria-describedby="summary-card-joe-bloggs" class="ds_link" href="#foo">Change</a>');
|
|
72
|
+
expect(actionsList.children[1].innerHTML).toEqual('<button aria-describedby="summary-card-joe-bloggs" class="ds_link" type="button">Delete</button>');
|
|
73
|
+
|
|
74
|
+
fireEvent.click(actionsList.children[1].children[0]);
|
|
75
|
+
|
|
76
|
+
expect(onClickFn).toHaveBeenCalled();
|
|
77
|
+
|
|
78
|
+
expect(content).toHaveClass('ds_summary-card__content');
|
|
79
|
+
expect(content?.tagName).toEqual('DIV');
|
|
80
|
+
|
|
81
|
+
expect(thisList?.innerHTML).toEqual(comparisonList?.innerHTML);
|
|
82
|
+
});
|
|
83
|
+
|
|
84
|
+
test('custom header level', () => {
|
|
85
|
+
render(
|
|
86
|
+
<SummaryCard
|
|
87
|
+
data-testid="foo"
|
|
88
|
+
actions={actions}
|
|
89
|
+
headerLevel="h2"
|
|
90
|
+
items={items}
|
|
91
|
+
title={titleText}
|
|
92
|
+
/>
|
|
93
|
+
);
|
|
94
|
+
|
|
95
|
+
const summaryCard = screen.getByTestId('foo');
|
|
96
|
+
const title = within(summaryCard).getByRole('heading');
|
|
97
|
+
|
|
98
|
+
expect(title?.tagName).toEqual('H2');
|
|
99
|
+
});
|
|
100
|
+
|
|
101
|
+
test('passing additional props', () => {
|
|
102
|
+
render(
|
|
103
|
+
<SummaryCard
|
|
104
|
+
data-testid="foo"
|
|
105
|
+
actions={actions}
|
|
106
|
+
items={items}
|
|
107
|
+
title={titleText}
|
|
108
|
+
data-test="foo"
|
|
109
|
+
/>
|
|
110
|
+
);
|
|
111
|
+
|
|
112
|
+
const summaryCard = screen.getByTestId('foo');
|
|
113
|
+
expect(summaryCard?.dataset.test).toEqual('foo');
|
|
114
|
+
});
|
|
115
|
+
|
|
116
|
+
test('passing additional CSS classes', () => {
|
|
117
|
+
render(
|
|
118
|
+
<SummaryCard
|
|
119
|
+
data-testid="foo"
|
|
120
|
+
actions={actions}
|
|
121
|
+
items={items}
|
|
122
|
+
title={titleText}
|
|
123
|
+
className="foo"
|
|
124
|
+
/>
|
|
125
|
+
);
|
|
126
|
+
|
|
127
|
+
const summaryCard = screen.getByTestId('foo');
|
|
128
|
+
expect(summaryCard).toHaveClass('foo', 'ds_summary-card');
|
|
129
|
+
});
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
import SummaryList, { Action } from "../summary-list/summary-list";
|
|
2
|
+
import WrapperTag from "../../common/wrapper-tag";
|
|
3
|
+
|
|
4
|
+
function convertToSlug(string: string) {
|
|
5
|
+
return string.toLowerCase()
|
|
6
|
+
.replace(/[^\w ]+/g, "")
|
|
7
|
+
.replace(/ +/g, "-");
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
const SummaryCard: React.FC<SGDS.Component.SummaryCard> = ({
|
|
11
|
+
actions,
|
|
12
|
+
className,
|
|
13
|
+
headerLevel = 'h3',
|
|
14
|
+
items,
|
|
15
|
+
title,
|
|
16
|
+
...props
|
|
17
|
+
}) => {
|
|
18
|
+
const describedById = `summary-card-${convertToSlug(title)}`;
|
|
19
|
+
|
|
20
|
+
return (
|
|
21
|
+
<div
|
|
22
|
+
className={[
|
|
23
|
+
'ds_summary-card',
|
|
24
|
+
className
|
|
25
|
+
].join(' ')}
|
|
26
|
+
{...props}
|
|
27
|
+
>
|
|
28
|
+
<div className="ds_summary-card__header">
|
|
29
|
+
<WrapperTag
|
|
30
|
+
className="ds_summary-card__header-title"
|
|
31
|
+
id={describedById}
|
|
32
|
+
tagName={headerLevel}
|
|
33
|
+
>{title}</WrapperTag>
|
|
34
|
+
|
|
35
|
+
<ul className="ds_summary-card__actions-list">
|
|
36
|
+
{actions && actions.map((action, index: number) => (
|
|
37
|
+
<li
|
|
38
|
+
className="ds_summary-card__actions-list-item"
|
|
39
|
+
key={'summarylistaction' + index}
|
|
40
|
+
>
|
|
41
|
+
<Action
|
|
42
|
+
describedby={describedById}
|
|
43
|
+
href={action.href}
|
|
44
|
+
onclick={action.onclick}
|
|
45
|
+
title={action.title}
|
|
46
|
+
/>
|
|
47
|
+
</li>
|
|
48
|
+
))}
|
|
49
|
+
</ul>
|
|
50
|
+
</div>
|
|
51
|
+
<div className="ds_summary-card__content">
|
|
52
|
+
<SummaryList items={items} />
|
|
53
|
+
</div>
|
|
54
|
+
</div>
|
|
55
|
+
);
|
|
56
|
+
};
|
|
57
|
+
|
|
58
|
+
SummaryCard.displayName = 'SummaryCard';
|
|
59
|
+
|
|
60
|
+
export default SummaryCard;
|
|
@@ -0,0 +1,221 @@
|
|
|
1
|
+
import { test, expect, vi } from 'vitest';
|
|
2
|
+
import { render, screen, fireEvent } from '@testing-library/react';
|
|
3
|
+
import SummaryList, { Item, Action, Answer } from './summary-list';
|
|
4
|
+
|
|
5
|
+
const onClickFn = vi.fn();
|
|
6
|
+
|
|
7
|
+
const items = [
|
|
8
|
+
{
|
|
9
|
+
title: 'Name',
|
|
10
|
+
value: 'Jane Smith',
|
|
11
|
+
actions: [
|
|
12
|
+
{
|
|
13
|
+
title: 'Change',
|
|
14
|
+
href: '#foo'
|
|
15
|
+
},
|
|
16
|
+
{
|
|
17
|
+
title: 'Delete',
|
|
18
|
+
onclick: onClickFn
|
|
19
|
+
}
|
|
20
|
+
]
|
|
21
|
+
},
|
|
22
|
+
{
|
|
23
|
+
title: 'Date of birth',
|
|
24
|
+
value: '13 April 2001',
|
|
25
|
+
actions: [
|
|
26
|
+
{
|
|
27
|
+
title: 'Change',
|
|
28
|
+
href: '#bar'
|
|
29
|
+
}
|
|
30
|
+
]
|
|
31
|
+
},
|
|
32
|
+
{
|
|
33
|
+
title: 'Address',
|
|
34
|
+
value: `Scottish Government\nSt Andrew's House\nRegent Road\nEdinburgh\nEH1 3DG`,
|
|
35
|
+
actions: [
|
|
36
|
+
{
|
|
37
|
+
title: 'Change',
|
|
38
|
+
href: '#baz'
|
|
39
|
+
}
|
|
40
|
+
]
|
|
41
|
+
},
|
|
42
|
+
{
|
|
43
|
+
title: 'Contact details',
|
|
44
|
+
value: [
|
|
45
|
+
'email@gov.scot',
|
|
46
|
+
'0123 456 7890',
|
|
47
|
+
]
|
|
48
|
+
}
|
|
49
|
+
];
|
|
50
|
+
|
|
51
|
+
test('summary list renders correctly', () => {
|
|
52
|
+
render(
|
|
53
|
+
<SummaryList items={items} />
|
|
54
|
+
);
|
|
55
|
+
|
|
56
|
+
const summaryList = screen.getAllByRole('list')[0];
|
|
57
|
+
const summaryListItems = summaryList.children;
|
|
58
|
+
|
|
59
|
+
expect(summaryList).toHaveClass('ds_summary-list');
|
|
60
|
+
expect(summaryList.tagName).toEqual('OL');
|
|
61
|
+
expect(summaryListItems.length).toEqual(items.length);
|
|
62
|
+
});
|
|
63
|
+
|
|
64
|
+
test('summary list without border', () => {
|
|
65
|
+
render(
|
|
66
|
+
<SummaryList noBorder items={items} />
|
|
67
|
+
);
|
|
68
|
+
|
|
69
|
+
const summaryList = screen.getAllByRole('list')[0];
|
|
70
|
+
|
|
71
|
+
expect(summaryList).toHaveClass('ds_summary-list--no-border');
|
|
72
|
+
});
|
|
73
|
+
|
|
74
|
+
test('summary list item renders correctly', () => {
|
|
75
|
+
render(
|
|
76
|
+
<Item
|
|
77
|
+
actions={items[1].actions}
|
|
78
|
+
title={items[1].title}
|
|
79
|
+
value={items[1].value}
|
|
80
|
+
/>
|
|
81
|
+
);
|
|
82
|
+
|
|
83
|
+
const item = screen.getAllByRole('listitem')[0];
|
|
84
|
+
const key = item.querySelector('.ds_summary-list__key');
|
|
85
|
+
const value = item.querySelector('.ds_summary-list__value');
|
|
86
|
+
const answer = value?.children[0];
|
|
87
|
+
const actions = item.querySelector('.ds_summary-list__actions');
|
|
88
|
+
|
|
89
|
+
const describedById = 'q2-date-of-birth';
|
|
90
|
+
|
|
91
|
+
expect(item).toHaveClass('ds_summary-list__item');
|
|
92
|
+
|
|
93
|
+
expect(key?.tagName).toEqual('SPAN');
|
|
94
|
+
expect(key?.textContent).toEqual('Date of birth');
|
|
95
|
+
expect(key).toHaveAttribute('id', describedById);
|
|
96
|
+
|
|
97
|
+
expect(value?.tagName).toEqual('SPAN');
|
|
98
|
+
|
|
99
|
+
expect(answer).toHaveClass('ds_summary-list__answer');
|
|
100
|
+
expect(answer?.tagName).toEqual('Q');
|
|
101
|
+
|
|
102
|
+
expect(actions?.tagName).toEqual('DIV');
|
|
103
|
+
|
|
104
|
+
expect(actions?.querySelector('.ds_link')).toHaveAttribute('aria-describedby', describedById);
|
|
105
|
+
});
|
|
106
|
+
|
|
107
|
+
test('summary list item with multiple values', () => {
|
|
108
|
+
render(
|
|
109
|
+
<Item
|
|
110
|
+
actions={items[3].actions}
|
|
111
|
+
title={items[3].title}
|
|
112
|
+
value={items[3].value}
|
|
113
|
+
/>
|
|
114
|
+
);
|
|
115
|
+
|
|
116
|
+
const item = screen.getAllByRole('listitem')[0];
|
|
117
|
+
const value = item.querySelector('.ds_summary-list__value');
|
|
118
|
+
const valueList = value?.children[0];
|
|
119
|
+
const valueListItems = valueList?.children;
|
|
120
|
+
|
|
121
|
+
expect(valueList).toHaveClass('ds_no-bullets');
|
|
122
|
+
expect(valueList?.tagName).toEqual('UL');
|
|
123
|
+
|
|
124
|
+
expect(valueListItems?.length).toEqual(items[3].value.length);
|
|
125
|
+
|
|
126
|
+
expect(valueListItems[0]?.tagName).toEqual('LI');
|
|
127
|
+
expect(valueListItems[0].innerHTML).toEqual(`<q class="ds_summary-list__answer">${items[3].value[0]}</q>`);
|
|
128
|
+
});
|
|
129
|
+
|
|
130
|
+
test('summary list item with multiple actions', () => {
|
|
131
|
+
render(
|
|
132
|
+
<Item
|
|
133
|
+
actions={items[0].actions}
|
|
134
|
+
title={items[0].title}
|
|
135
|
+
value={items[0].value}
|
|
136
|
+
/>
|
|
137
|
+
);
|
|
138
|
+
|
|
139
|
+
const item = screen.getAllByRole('listitem')[0];
|
|
140
|
+
const actions = item.querySelector('.ds_summary-list__actions');
|
|
141
|
+
|
|
142
|
+
expect(actions.children.length).toEqual(items[0].actions.length);
|
|
143
|
+
expect(actions.children[0].textContent).toEqual(items[0].actions[0].title);
|
|
144
|
+
expect(actions.children[1].textContent).toEqual(items[0].actions[1].title);
|
|
145
|
+
});
|
|
146
|
+
|
|
147
|
+
test('button action', () => {
|
|
148
|
+
const describedById = 'q1-name';
|
|
149
|
+
|
|
150
|
+
render(
|
|
151
|
+
<Action
|
|
152
|
+
describedby={describedById}
|
|
153
|
+
href={items[0].actions[1].href}
|
|
154
|
+
onclick={items[0].actions[1].onclick}
|
|
155
|
+
title={items[0].actions[1].title}
|
|
156
|
+
/>
|
|
157
|
+
);
|
|
158
|
+
|
|
159
|
+
const action = screen.getByRole('button');
|
|
160
|
+
|
|
161
|
+
expect(action).toHaveClass('ds_link');
|
|
162
|
+
expect(action).toHaveAttribute('aria-describedby', describedById);
|
|
163
|
+
expect(action).toHaveAttribute('type', 'button');
|
|
164
|
+
expect(action).not.toHaveAttribute('href');
|
|
165
|
+
expect(action.tagName).toEqual('BUTTON');
|
|
166
|
+
expect(action.textContent).toEqual('Delete');
|
|
167
|
+
|
|
168
|
+
fireEvent.click(action);
|
|
169
|
+
|
|
170
|
+
expect(onClickFn).toHaveBeenCalled();
|
|
171
|
+
});
|
|
172
|
+
|
|
173
|
+
test('link action', () => {
|
|
174
|
+
const describedById = 'q1-name';
|
|
175
|
+
|
|
176
|
+
render(
|
|
177
|
+
<Action
|
|
178
|
+
describedby={describedById}
|
|
179
|
+
href={items[0].actions[0].href}
|
|
180
|
+
onclick={items[0].actions[0].onclick}
|
|
181
|
+
title={items[0].actions[0].title}
|
|
182
|
+
/>
|
|
183
|
+
);
|
|
184
|
+
|
|
185
|
+
const action = screen.getByRole('link');
|
|
186
|
+
|
|
187
|
+
expect(action).toHaveClass('ds_link');
|
|
188
|
+
expect(action).toHaveAttribute('aria-describedby', describedById);
|
|
189
|
+
expect(action).toHaveAttribute('href', items[0].actions[0].href);
|
|
190
|
+
expect(action).not.toHaveAttribute('type');
|
|
191
|
+
expect(action.tagName).toEqual('A');
|
|
192
|
+
expect(action.textContent).toEqual('Change');
|
|
193
|
+
});
|
|
194
|
+
|
|
195
|
+
test('multiline answer', () => {
|
|
196
|
+
render(
|
|
197
|
+
<Answer value={items[2].value} />
|
|
198
|
+
);
|
|
199
|
+
|
|
200
|
+
const answer = document.querySelector('.ds_summary-list__answer');
|
|
201
|
+
|
|
202
|
+
expect(answer?.outerHTML).toEqual('<q class="ds_summary-list__answer">Scottish Government<br>St Andrew\'s House<br>Regent Road<br>Edinburgh<br>EH1 3DG</q>');
|
|
203
|
+
});
|
|
204
|
+
|
|
205
|
+
test('passing additional props', () => {
|
|
206
|
+
render(
|
|
207
|
+
<SummaryList data-test="foo" items={items} />
|
|
208
|
+
);
|
|
209
|
+
|
|
210
|
+
const summaryList = screen.getAllByRole('list')[0];
|
|
211
|
+
expect(summaryList?.dataset.test).toEqual('foo');
|
|
212
|
+
});
|
|
213
|
+
|
|
214
|
+
test('passing additional CSS classes', () => {
|
|
215
|
+
render(
|
|
216
|
+
<SummaryList className="foo" items={items} />
|
|
217
|
+
);
|
|
218
|
+
|
|
219
|
+
const summaryList = screen.getAllByRole('list')[0];
|
|
220
|
+
expect(summaryList).toHaveClass('foo', 'ds_summary-list');
|
|
221
|
+
});
|
|
@@ -0,0 +1,144 @@
|
|
|
1
|
+
import ConditionalWrapper from '../../common/conditional-wrapper';
|
|
2
|
+
import WrapperTag from '../../common/wrapper-tag';
|
|
3
|
+
|
|
4
|
+
function escapedNewLineToLineBreakTag (string: string) {
|
|
5
|
+
if (typeof string === 'string') {
|
|
6
|
+
// @ts-ignore
|
|
7
|
+
return string.split('\n').map((item, index) => {
|
|
8
|
+
return (index === 0) ? item : [<br key={index} />, item]
|
|
9
|
+
});
|
|
10
|
+
}
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
function convertToSlug(string: string) {
|
|
14
|
+
return string.toLowerCase()
|
|
15
|
+
.replace(/[^\w ]+/g, "")
|
|
16
|
+
.replace(/ +/g, "-");
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
export const Answer: React.FC<SGDS.Component.SummaryList.Answer> = ({
|
|
20
|
+
value
|
|
21
|
+
}) => {
|
|
22
|
+
let processedValue;
|
|
23
|
+
if (typeof value === 'string') {
|
|
24
|
+
processedValue = escapedNewLineToLineBreakTag(value);
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
return (
|
|
28
|
+
<q className="ds_summary-list__answer">{processedValue}</q>
|
|
29
|
+
);
|
|
30
|
+
};
|
|
31
|
+
|
|
32
|
+
export const Action: React.FC<SGDS.Component.SummaryList.Action> = ({
|
|
33
|
+
describedby,
|
|
34
|
+
href,
|
|
35
|
+
onclick,
|
|
36
|
+
title,
|
|
37
|
+
}) => {
|
|
38
|
+
let tagName = 'button';
|
|
39
|
+
if (href) {
|
|
40
|
+
tagName = 'a';
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
return (
|
|
44
|
+
<WrapperTag
|
|
45
|
+
aria-describedby={describedby}
|
|
46
|
+
className="ds_link"
|
|
47
|
+
href={href}
|
|
48
|
+
onClick={onclick}
|
|
49
|
+
tagName={tagName}
|
|
50
|
+
type={tagName === 'button' ? 'button' : undefined}
|
|
51
|
+
>
|
|
52
|
+
{title}
|
|
53
|
+
</WrapperTag>
|
|
54
|
+
);
|
|
55
|
+
};
|
|
56
|
+
|
|
57
|
+
export const Item: React.FC<SGDS.Component.SummaryList.Item> = ({
|
|
58
|
+
actions,
|
|
59
|
+
index = 1,
|
|
60
|
+
title,
|
|
61
|
+
value
|
|
62
|
+
}) => {
|
|
63
|
+
let values: string[] = [];
|
|
64
|
+
|
|
65
|
+
if (typeof value === 'string') {
|
|
66
|
+
values = [value];
|
|
67
|
+
} else {
|
|
68
|
+
values = value;
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
const describedById = `q${index+1}-${convertToSlug(title)}`;
|
|
72
|
+
|
|
73
|
+
return (
|
|
74
|
+
<li className="ds_summary-list__item">
|
|
75
|
+
<span className="ds_summary-list__key" id={describedById}>{title}</span>
|
|
76
|
+
<span className="ds_summary-list__value">
|
|
77
|
+
<ConditionalWrapper
|
|
78
|
+
condition={values.length > 1}
|
|
79
|
+
wrapper={(children: React.JSX.Element) => <ul className="ds_no-bullets">{children}</ul>}
|
|
80
|
+
>
|
|
81
|
+
{values && values.map((value, index: number) => (
|
|
82
|
+
<ConditionalWrapper
|
|
83
|
+
condition={values.length > 1}
|
|
84
|
+
wrapper={(children: React.JSX.Element) => <li>{children}</li>}
|
|
85
|
+
key={'answer' + index}
|
|
86
|
+
>
|
|
87
|
+
<Answer
|
|
88
|
+
value={value}
|
|
89
|
+
/>
|
|
90
|
+
</ConditionalWrapper>
|
|
91
|
+
))}
|
|
92
|
+
</ConditionalWrapper>
|
|
93
|
+
</span>
|
|
94
|
+
{actions &&
|
|
95
|
+
<div className="ds_summary-list__actions">
|
|
96
|
+
{actions && actions.map((action, index: number) => (
|
|
97
|
+
<Action
|
|
98
|
+
describedby={describedById}
|
|
99
|
+
href={action.href}
|
|
100
|
+
onclick={action.onclick}
|
|
101
|
+
title={action.title}
|
|
102
|
+
key={'summarylistaction' + index}
|
|
103
|
+
/>
|
|
104
|
+
))}
|
|
105
|
+
</div>
|
|
106
|
+
}
|
|
107
|
+
</li>
|
|
108
|
+
);
|
|
109
|
+
};
|
|
110
|
+
|
|
111
|
+
const SummaryList: React.FC<SGDS.Component.SummaryList> = ({
|
|
112
|
+
className,
|
|
113
|
+
items,
|
|
114
|
+
noBorder,
|
|
115
|
+
...props
|
|
116
|
+
}) => {
|
|
117
|
+
return (
|
|
118
|
+
<ol
|
|
119
|
+
className={[
|
|
120
|
+
'ds_summary-list',
|
|
121
|
+
noBorder && 'ds_summary-list--no-border',
|
|
122
|
+
className
|
|
123
|
+
].join(' ')}
|
|
124
|
+
{...props}
|
|
125
|
+
>
|
|
126
|
+
{items && items.map((item, index: number) => (
|
|
127
|
+
<Item
|
|
128
|
+
actions={item.actions}
|
|
129
|
+
title={item.title}
|
|
130
|
+
value={item.value}
|
|
131
|
+
index={index}
|
|
132
|
+
key={'summarylistitem' + index}
|
|
133
|
+
/>
|
|
134
|
+
))}
|
|
135
|
+
</ol>
|
|
136
|
+
);
|
|
137
|
+
};
|
|
138
|
+
|
|
139
|
+
SummaryList.displayName = 'SummaryList';
|
|
140
|
+
Action.displayName = 'SummaryListAction';
|
|
141
|
+
Answer.displayName = 'SumaryListAnswer';
|
|
142
|
+
Item.displayName = 'SummaryListItem';
|
|
143
|
+
|
|
144
|
+
export default SummaryList;
|