@dubai-design-system/components-js 5.1.1 → 5.3.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/CHANGELOG.md +116 -0
- package/MIGRATION.md +196 -15
- package/dist/cjs/dda-accordion.cjs.entry.js +3 -3
- package/dist/cjs/dda-alert.cjs.entry.js +3 -3
- package/dist/cjs/dda-attach-file.cjs.entry.js +3 -3
- package/dist/cjs/dda-avatar.cjs.entry.js +7 -7
- package/dist/cjs/dda-banner-card.cjs.entry.js +26 -0
- package/dist/cjs/dda-banner.cjs.entry.js +3 -3
- package/dist/cjs/dda-breadcrumb.cjs.entry.js +2 -2
- package/dist/cjs/dda-button.cjs.entry.js +3 -3
- package/dist/cjs/dda-checkbox.cjs.entry.js +3 -3
- package/dist/cjs/dda-chip.cjs.entry.js +3 -3
- package/dist/cjs/dda-credit-card.cjs.entry.js +3 -3
- package/dist/cjs/dda-creditcard-field.cjs.entry.js +3 -3
- package/dist/cjs/dda-dropdown.cjs.entry.js +3 -3
- package/dist/cjs/dda-footer.cjs.entry.js +3 -3
- package/dist/cjs/dda-header.cjs.entry.js +201 -14
- package/dist/cjs/dda-home-banner.cjs.entry.js +5 -5
- package/dist/cjs/dda-home-carousel.cjs.entry.js +28 -0
- package/dist/cjs/dda-horizontal-stepper.cjs.entry.js +3 -3
- package/dist/cjs/dda-input.cjs.entry.js +3 -3
- package/dist/cjs/dda-link-button_2.cjs.entry.js +6 -6
- package/dist/cjs/dda-number-field.cjs.entry.js +3 -3
- package/dist/cjs/dda-pagination.cjs.entry.js +3 -3
- package/dist/cjs/dda-phonefield.cjs.entry.js +3 -3
- package/dist/cjs/dda-progressbar.cjs.entry.js +3 -3
- package/dist/cjs/dda-range-slider.cjs.entry.js +3 -3
- package/dist/cjs/dda-search-input.cjs.entry.js +3 -3
- package/dist/cjs/dda-segmented-tabs.cjs.entry.js +4 -4
- package/dist/cjs/dda-select.cjs.entry.js +3 -3
- package/dist/cjs/dda-sticky-footer.cjs.entry.js +52 -4
- package/dist/cjs/dda-tabs.cjs.entry.js +3 -3
- package/dist/cjs/dda-textarea.cjs.entry.js +4 -4
- package/dist/cjs/dda-toggle.cjs.entry.js +3 -3
- package/dist/cjs/dda-tooltip.cjs.entry.js +3 -3
- package/dist/cjs/dda-ui-card.cjs.entry.js +2 -2
- package/dist/cjs/dda-vertical-stepper.cjs.entry.js +2 -2
- package/dist/cjs/dda.cjs.js +2 -2
- package/dist/cjs/{index-Bgd2iAET.js → index-DD8fdSxb.js} +1 -1
- package/dist/cjs/loader.cjs.js +2 -2
- package/dist/cjs/parse-json-prop-B0KWD8qe.js +38 -0
- package/dist/collection/collection-manifest.json +5 -3
- package/dist/collection/components/dda-accordion/dda-accordion.js +1 -1
- package/dist/collection/components/dda-alert/dda-alert.js +1 -1
- package/dist/collection/components/dda-alert/dda-alert.stories.js +27 -20
- package/dist/collection/components/dda-attach-file/dda-attach-file.js +1 -1
- package/dist/collection/components/dda-avatar/dda-avatar.js +5 -5
- package/dist/collection/components/dda-banner/dda-banner.js +1 -1
- package/dist/collection/components/dda-banner-card/dda-banner-card.js +243 -0
- package/dist/collection/components/dda-button/dda-button.js +1 -1
- package/dist/collection/components/dda-checkbox/dda-checkbox.js +1 -1
- package/dist/collection/components/dda-chip/dda-chip.js +1 -1
- package/dist/collection/components/dda-credit-card/dda-credit-card.js +1 -1
- package/dist/collection/components/dda-creditcard-field/dda-creditcard-field.js +1 -1
- package/dist/collection/components/dda-dropdown/dda-dropdown.js +1 -1
- package/dist/collection/components/dda-footer/dda-footer.js +1 -1
- package/dist/collection/components/dda-header/dda-header.js +853 -81
- package/dist/collection/components/dda-header/dda-header.stories.js +219 -33
- package/dist/collection/components/dda-header/nav-model.js +69 -0
- package/dist/collection/components/dda-home-banner/dda-home-banner.js +2 -2
- package/dist/collection/components/dda-home-banner/home-banner.css +12 -2
- package/dist/collection/components/dda-home-carousel/dda-home-carousel.js +164 -0
- package/dist/collection/components/dda-home-carousel/dda-home-carousel.stories.js +24 -0
- package/dist/collection/components/dda-input/dda-input.js +1 -1
- package/dist/collection/components/dda-link-button/dda-link-button.js +2 -2
- package/dist/collection/components/dda-number-field/dda-number-field.js +1 -1
- package/dist/collection/components/dda-pagination/dda-pagination.js +1 -1
- package/dist/collection/components/dda-phonefield/dda-phonefield.js +1 -1
- package/dist/collection/components/dda-progressbar/dda-progressbar.js +1 -1
- package/dist/collection/components/dda-radiobutton/dda-radiobutton.css +355 -9
- package/dist/collection/components/dda-radiobutton/dda-radiobutton.js +1 -1
- package/dist/collection/components/dda-range-slider/dda-range-slider.js +2 -2
- package/dist/collection/components/dda-search-input/dda-search-input.js +1 -1
- package/dist/collection/components/dda-select/dda-select.js +1 -1
- package/dist/collection/components/dda-sticky-footer/dda-sticky-footer.js +511 -9
- package/dist/collection/components/dda-sticky-footer/dda-sticky-footer.stories.js +24 -2
- package/dist/collection/components/dda-tabs/dda-tabs.js +1 -1
- package/dist/collection/components/dda-textarea/dda-textarea.js +2 -2
- package/dist/collection/components/dda-toggle/dda-toggle.js +1 -1
- package/dist/collection/components/dda-tooltip/dda-tooltip.js +1 -1
- package/dist/collection/components/dda-ui-card/dda-ui-card.js +1 -1
- package/dist/collection/components/segmented-groups/dda-segmented-tabs/dda-segmented-tabs.css +29 -9
- package/dist/collection/components/segmented-groups/dda-segmented-tabs/dda-segmented-tabs.js +1 -1
- package/dist/collection/components/stepper/dda-horizontal-stepper/dda-horizontal-stepper.js +1 -1
- package/dist/collection/components/stepper/dda-vertical-stepper/dda-vertical-stepper.js +1 -1
- package/dist/collection/global/global.css +355 -9
- package/dist/collection/utils/parse-json-prop.js +34 -0
- package/dist/components/dda-accordion.js +1 -1
- package/dist/components/dda-alert.js +1 -1
- package/dist/components/dda-attach-file.js +1 -1
- package/dist/components/dda-avatar.js +1 -1
- package/dist/components/dda-banner-card.d.ts +11 -0
- package/dist/components/dda-banner-card.js +1 -0
- package/dist/components/dda-banner.js +1 -1
- package/dist/components/dda-breadcrumb.js +1 -1
- package/dist/components/dda-button.js +1 -1
- package/dist/components/dda-checkbox.js +1 -1
- package/dist/components/dda-chip.js +1 -1
- package/dist/components/dda-credit-card.js +1 -1
- package/dist/components/dda-creditcard-field.js +1 -1
- package/dist/components/dda-dropdown.js +1 -1
- package/dist/components/dda-footer.js +1 -1
- package/dist/components/dda-header.js +1 -1
- package/dist/components/dda-home-banner.js +1 -1
- package/dist/components/dda-home-carousel.d.ts +11 -0
- package/dist/components/dda-home-carousel.js +1 -0
- package/dist/components/dda-horizontal-stepper.js +1 -1
- package/dist/components/dda-input.js +1 -1
- package/dist/components/dda-link-button.js +1 -1
- package/dist/components/dda-number-field.js +1 -1
- package/dist/components/dda-pagination.js +1 -1
- package/dist/components/dda-phonefield.js +1 -1
- package/dist/components/dda-progressbar.js +1 -1
- package/dist/components/dda-radiobutton.js +1 -1
- package/dist/components/dda-range-slider.js +1 -1
- package/dist/components/dda-search-input.js +1 -1
- package/dist/components/dda-segmented-tabs.js +1 -1
- package/dist/components/dda-select.js +1 -1
- package/dist/components/dda-sticky-footer.js +1 -1
- package/dist/components/dda-tabs.js +1 -1
- package/dist/components/dda-textarea.js +1 -1
- package/dist/components/dda-toggle.js +1 -1
- package/dist/components/dda-tooltip.js +1 -1
- package/dist/components/dda-ui-card.js +1 -1
- package/dist/components/dda-vertical-stepper.js +1 -1
- package/dist/components/index.js +1 -1
- package/dist/components/p-BCtBptNq.js +1 -0
- package/dist/components/p-BP6BxgDV.js +1 -0
- package/dist/components/p-BZzFtOHg.js +1 -0
- package/dist/components/p-CvcFE821.js +1 -0
- package/dist/components/p-D3e_hki9.js +1 -0
- package/dist/components/p-DCwxgkNU.js +1 -0
- package/dist/components/p-R9p4F9Pi.js +1 -0
- package/dist/dda/dda.css +1 -53
- package/dist/dda/dda.esm.js +1 -1
- package/dist/dda/p-0480f0a9.entry.js +1 -0
- package/dist/dda/p-06188c4c.entry.js +1 -0
- package/dist/dda/p-08e1892a.entry.js +1 -0
- package/dist/dda/p-10c5a752.entry.js +1 -0
- package/dist/dda/p-169ba650.entry.js +1 -0
- package/dist/dda/p-25058697.entry.js +1 -0
- package/dist/dda/p-32a7c588.entry.js +1 -0
- package/dist/dda/{p-fb4db977.entry.js → p-333205aa.entry.js} +1 -1
- package/dist/dda/p-46df4933.entry.js +1 -0
- package/dist/dda/p-47322b02.entry.js +1 -0
- package/dist/dda/{p-04bcda8a.entry.js → p-4e717a2e.entry.js} +1 -1
- package/dist/dda/p-5840fad9.entry.js +1 -0
- package/dist/dda/p-5bb62ef7.entry.js +1 -0
- package/dist/dda/p-5e757702.entry.js +1 -0
- package/dist/dda/p-6430c363.entry.js +1 -0
- package/dist/dda/p-6d4f5672.entry.js +1 -0
- package/dist/dda/p-6db5588a.entry.js +1 -0
- package/dist/dda/p-76859bf8.entry.js +1 -0
- package/dist/dda/p-7c1abbd2.entry.js +1 -0
- package/dist/dda/p-7ffce954.entry.js +1 -0
- package/dist/dda/p-8108c4ed.entry.js +1 -0
- package/dist/dda/p-8852dafb.entry.js +1 -0
- package/dist/dda/p-8dbbc0ca.entry.js +1 -0
- package/dist/dda/p-95100f73.entry.js +1 -0
- package/dist/dda/p-9a4e34d1.entry.js +1 -0
- package/dist/dda/p-9b234635.entry.js +1 -0
- package/dist/dda/p-9d9834ff.entry.js +1 -0
- package/dist/dda/p-9f01cb56.entry.js +1 -0
- package/dist/dda/p-9ff8dc84.entry.js +1 -0
- package/dist/dda/p-BnrqwGTj.js +2 -0
- package/dist/dda/p-CvcFE821.js +1 -0
- package/dist/dda/p-a8a1ee5d.entry.js +1 -0
- package/dist/dda/p-b37f40a9.entry.js +1 -0
- package/dist/dda/{p-c77282be.entry.js → p-eaffd32d.entry.js} +1 -1
- package/dist/dda/p-f2efc121.entry.js +1 -0
- package/dist/dda/p-faed59dd.entry.js +1 -0
- package/dist/dda/p-fb00dec4.entry.js +1 -0
- package/dist/esm/dda-accordion.entry.js +3 -3
- package/dist/esm/dda-alert.entry.js +3 -3
- package/dist/esm/dda-attach-file.entry.js +3 -3
- package/dist/esm/dda-avatar.entry.js +7 -7
- package/dist/esm/dda-banner-card.entry.js +24 -0
- package/dist/esm/dda-banner.entry.js +3 -3
- package/dist/esm/dda-breadcrumb.entry.js +2 -2
- package/dist/esm/dda-button.entry.js +3 -3
- package/dist/esm/dda-checkbox.entry.js +3 -3
- package/dist/esm/dda-chip.entry.js +3 -3
- package/dist/esm/dda-credit-card.entry.js +3 -3
- package/dist/esm/dda-creditcard-field.entry.js +3 -3
- package/dist/esm/dda-dropdown.entry.js +3 -3
- package/dist/esm/dda-footer.entry.js +3 -3
- package/dist/esm/dda-header.entry.js +201 -14
- package/dist/esm/dda-home-banner.entry.js +5 -5
- package/dist/esm/dda-home-carousel.entry.js +26 -0
- package/dist/esm/dda-horizontal-stepper.entry.js +3 -3
- package/dist/esm/dda-input.entry.js +3 -3
- package/dist/esm/dda-link-button_2.entry.js +6 -6
- package/dist/esm/dda-number-field.entry.js +3 -3
- package/dist/esm/dda-pagination.entry.js +3 -3
- package/dist/esm/dda-phonefield.entry.js +3 -3
- package/dist/esm/dda-progressbar.entry.js +3 -3
- package/dist/esm/dda-range-slider.entry.js +3 -3
- package/dist/esm/dda-search-input.entry.js +3 -3
- package/dist/esm/dda-segmented-tabs.entry.js +4 -4
- package/dist/esm/dda-select.entry.js +3 -3
- package/dist/esm/dda-sticky-footer.entry.js +52 -4
- package/dist/esm/dda-tabs.entry.js +3 -3
- package/dist/esm/dda-textarea.entry.js +4 -4
- package/dist/esm/dda-toggle.entry.js +3 -3
- package/dist/esm/dda-tooltip.entry.js +3 -3
- package/dist/esm/dda-ui-card.entry.js +2 -2
- package/dist/esm/dda-vertical-stepper.entry.js +2 -2
- package/dist/esm/dda.js +3 -3
- package/dist/esm/{index-D6L6zgH9.js → index-BnrqwGTj.js} +1 -1
- package/dist/esm/loader.js +3 -3
- package/dist/esm/parse-json-prop-CvcFE821.js +36 -0
- package/dist/types/components/dda-alert/dda-alert.stories.d.ts +5 -1
- package/dist/types/components/dda-banner-card/dda-banner-card.d.ts +25 -0
- package/dist/types/components/dda-header/dda-header.d.ts +117 -5
- package/dist/types/components/dda-header/dda-header.stories.d.ts +206 -0
- package/dist/types/components/dda-header/nav-model.d.ts +19 -0
- package/dist/types/components/dda-home-carousel/dda-home-carousel.d.ts +29 -0
- package/dist/types/components/dda-home-carousel/dda-home-carousel.stories.d.ts +20 -0
- package/dist/types/components/dda-sticky-footer/dda-sticky-footer.d.ts +75 -5
- package/dist/types/components/dda-sticky-footer/dda-sticky-footer.stories.d.ts +17 -0
- package/dist/types/components.d.ts +747 -21
- package/dist/types/utils/parse-json-prop.d.ts +1 -0
- package/package.json +3 -1
- package/dist/components/p-Bc2V1U4_.js +0 -1
- package/dist/components/p-Bzqf-PpF.js +0 -1
- package/dist/components/p-D-CHT-as.js +0 -1
- package/dist/components/p-DJw8qV7U.js +0 -1
- package/dist/components/p-DpwQ9sGp.js +0 -1
- package/dist/dda/p-03400387.entry.js +0 -1
- package/dist/dda/p-18a3d7b1.entry.js +0 -1
- package/dist/dda/p-1f7b8486.entry.js +0 -1
- package/dist/dda/p-3024288f.entry.js +0 -1
- package/dist/dda/p-41b8ed7d.entry.js +0 -1
- package/dist/dda/p-56f60336.entry.js +0 -1
- package/dist/dda/p-65776d80.entry.js +0 -1
- package/dist/dda/p-73611084.entry.js +0 -1
- package/dist/dda/p-7ad8cde9.entry.js +0 -1
- package/dist/dda/p-8134e59d.entry.js +0 -1
- package/dist/dda/p-8494fd9e.entry.js +0 -1
- package/dist/dda/p-876d55b2.entry.js +0 -1
- package/dist/dda/p-88d884a8.entry.js +0 -1
- package/dist/dda/p-8b25ae94.entry.js +0 -1
- package/dist/dda/p-8f376986.entry.js +0 -1
- package/dist/dda/p-90019b80.entry.js +0 -1
- package/dist/dda/p-92fa4777.entry.js +0 -1
- package/dist/dda/p-97431faf.entry.js +0 -1
- package/dist/dda/p-D6L6zgH9.js +0 -2
- package/dist/dda/p-a5456de2.entry.js +0 -1
- package/dist/dda/p-aa7b4c13.entry.js +0 -1
- package/dist/dda/p-ad40eb27.entry.js +0 -1
- package/dist/dda/p-c055f0d2.entry.js +0 -1
- package/dist/dda/p-c42c8733.entry.js +0 -1
- package/dist/dda/p-ca64abe6.entry.js +0 -1
- package/dist/dda/p-ceca8088.entry.js +0 -1
- package/dist/dda/p-d6786b43.entry.js +0 -1
- package/dist/dda/p-e2113e42.entry.js +0 -1
- package/dist/dda/p-ee862207.entry.js +0 -1
- package/dist/dda/p-ef38e28b.entry.js +0 -1
- package/dist/dda/p-f43fb910.entry.js +0 -1
|
@@ -1,6 +1,76 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var index = require('./index-
|
|
3
|
+
var index = require('./index-DD8fdSxb.js');
|
|
4
|
+
var parseJsonProp = require('./parse-json-prop-B0KWD8qe.js');
|
|
5
|
+
|
|
6
|
+
const clean = (value) => (typeof value === 'string' ? value.trim() : '');
|
|
7
|
+
const optional = (value) => clean(value) || undefined;
|
|
8
|
+
const isPlainObject = (value) => Boolean(value) && typeof value === 'object' && !Array.isArray(value);
|
|
9
|
+
// An array field (children, mega-menu columns/items, 5.x subMenu) may contain a bad entry (null, a
|
|
10
|
+
// number, ...) even when the field itself is a valid array. Each bad entry is skipped, with one
|
|
11
|
+
// warning, rather than reaching a raw.<prop> access on a non-object and throwing.
|
|
12
|
+
const asArray = (value) => {
|
|
13
|
+
if (!Array.isArray(value))
|
|
14
|
+
return [];
|
|
15
|
+
return value.filter(item => {
|
|
16
|
+
if (isPlainObject(item))
|
|
17
|
+
return true;
|
|
18
|
+
console.warn('quick-links: an item is not an object; it is ignored.');
|
|
19
|
+
return false;
|
|
20
|
+
});
|
|
21
|
+
};
|
|
22
|
+
const isLegacy = (raw) => raw.headerMenuLabel !== undefined || raw.type !== undefined;
|
|
23
|
+
function legacyItem(raw) {
|
|
24
|
+
const children = asArray(raw.children);
|
|
25
|
+
const base = {
|
|
26
|
+
label: clean(raw.headerMenuLabel),
|
|
27
|
+
href: clean(raw.url) || '#',
|
|
28
|
+
active: raw.active === 'true' || raw.active === true,
|
|
29
|
+
id: optional(raw.headerMenuId),
|
|
30
|
+
description: optional(raw.description),
|
|
31
|
+
icon: optional(raw.quickLinksIcon),
|
|
32
|
+
kind: 'link',
|
|
33
|
+
submenuTitle: optional(raw.defaultSubMenuTitle),
|
|
34
|
+
children: [],
|
|
35
|
+
columns: [],
|
|
36
|
+
};
|
|
37
|
+
if (children.length === 0)
|
|
38
|
+
return base;
|
|
39
|
+
if (raw.type === 'dda_main_megamenu') {
|
|
40
|
+
return Object.assign(Object.assign({}, base), { kind: 'mega', columns: children.map(col => ({
|
|
41
|
+
title: optional(col.title),
|
|
42
|
+
links: asArray(col.items).map(link => {
|
|
43
|
+
var _a;
|
|
44
|
+
return ({
|
|
45
|
+
label: clean(link.headerMenuLabel),
|
|
46
|
+
href: clean(link.url) || '#',
|
|
47
|
+
description: optional(link.description),
|
|
48
|
+
// 3.x always showed an icon in the mega menu, defaulting to 'sentiment_satisfied' when
|
|
49
|
+
// none was set; the 5.x subMenu shape never had a default, so this fallback stays scoped
|
|
50
|
+
// to the 3.x mapping (see modernItem below, which leaves icon undefined).
|
|
51
|
+
icon: (_a = optional(link.quickLinksIcon)) !== null && _a !== void 0 ? _a : 'sentiment_satisfied',
|
|
52
|
+
active: false,
|
|
53
|
+
});
|
|
54
|
+
}),
|
|
55
|
+
})) });
|
|
56
|
+
}
|
|
57
|
+
return Object.assign(Object.assign({}, base), { kind: 'dropdown', children: children.map(legacyItem) });
|
|
58
|
+
}
|
|
59
|
+
function modernItem(raw) {
|
|
60
|
+
const sub = asArray(raw.subMenu);
|
|
61
|
+
const base = { label: clean(raw.label), href: clean(raw.href) || '#', active: false, kind: 'link', children: [], columns: [] };
|
|
62
|
+
if (sub.length === 0)
|
|
63
|
+
return base;
|
|
64
|
+
return Object.assign(Object.assign({}, base), { kind: 'mega', columns: [
|
|
65
|
+
{
|
|
66
|
+
title: optional(raw.menuLabel),
|
|
67
|
+
links: sub.map(link => ({ label: clean(link.title), href: clean(link.href) || '#', description: optional(link.description), icon: optional(link.icon), active: false })),
|
|
68
|
+
},
|
|
69
|
+
] });
|
|
70
|
+
}
|
|
71
|
+
function normalizeQuickLinks(value) {
|
|
72
|
+
return asArray(parseJsonProp.parseJsonProp(value, 'quick-links')).map(raw => (isLegacy(raw) ? legacyItem(raw) : modernItem(raw)));
|
|
73
|
+
}
|
|
4
74
|
|
|
5
75
|
const ddaHeaderCss = () => `:root{scroll-padding-top:170px}@media screen and (max-width: 767px){:root{scroll-padding-top:100px}}:root.dda-scroll-lock{overflow:hidden;scrollbar-gutter:stable}:root.dda-scroll-lock body{overflow:hidden}`;
|
|
6
76
|
|
|
@@ -9,6 +79,8 @@ let headerInstanceCount = 0;
|
|
|
9
79
|
const DdaHeader = class {
|
|
10
80
|
constructor(hostRef) {
|
|
11
81
|
index.registerInstance(this, hostRef);
|
|
82
|
+
this.accessibilityMenuToggle = index.createEvent(this, "accessibilitymenufunctionality");
|
|
83
|
+
this.searchInput = index.createEvent(this, "searchfunctionality");
|
|
12
84
|
this.languageSwitch = index.createEvent(this, "languageSwitch");
|
|
13
85
|
this.smTextSize = index.createEvent(this, "smTextSize");
|
|
14
86
|
this.baseTextSize = index.createEvent(this, "baseTextSize");
|
|
@@ -22,8 +94,16 @@ const DdaHeader = class {
|
|
|
22
94
|
this.firstLogoHref = '/';
|
|
23
95
|
/** Link URL of the second logo on desktop and mobile. Default: `/`. */
|
|
24
96
|
this.secondLogoHref = '/';
|
|
97
|
+
/** Hides the "other" side-menu links and their title. Default: `false`. */
|
|
98
|
+
this.hideOtherMenu = false;
|
|
99
|
+
/** The contrast option shown as selected. The header updates it when the user picks an option. Default: `normal`. */
|
|
100
|
+
this.selected_contrast = 'normal';
|
|
101
|
+
/** Hides the Login link in the desktop toolbar and the side menu. */
|
|
102
|
+
this.hide_login = false;
|
|
25
103
|
/** `lang` attribute of the language buttons, the language of `language_text`. Default: `ar`. */
|
|
26
104
|
this.language_lang = 'ar';
|
|
105
|
+
/** When `false`, the header renders no accessibility panel; the buttons only emit `accessibilitymenufunctionality`, so the page can open its own panel. Default: `true`. */
|
|
106
|
+
this.usePredesignedAccessibilityMenu = true;
|
|
27
107
|
this.isMenuOpen = false;
|
|
28
108
|
this.isSubMenuOpen = false;
|
|
29
109
|
this.isSideSubMenuOpen = false;
|
|
@@ -36,6 +116,9 @@ const DdaHeader = class {
|
|
|
36
116
|
this.menu_button_label = 'Menu';
|
|
37
117
|
this.openMenus = {};
|
|
38
118
|
this.activeMenuIndex = null;
|
|
119
|
+
this.activeSubIndex = null;
|
|
120
|
+
/** Offset (px) from the top of the open dropdown to the opener of its third-level panel. */
|
|
121
|
+
this.activeSubTop = 0;
|
|
39
122
|
this.toggleEscapeKey = (event) => {
|
|
40
123
|
if (event.key === 'Escape') {
|
|
41
124
|
if (this.isSearchOpen) {
|
|
@@ -46,6 +129,7 @@ const DdaHeader = class {
|
|
|
46
129
|
this.isSubMenuOpen = false;
|
|
47
130
|
this.isSideSubMenuOpen = false;
|
|
48
131
|
this.activeMenuIndex = null;
|
|
132
|
+
this.activeSubIndex = null;
|
|
49
133
|
}
|
|
50
134
|
};
|
|
51
135
|
this.handleSearchSubmit = (event) => {
|
|
@@ -56,6 +140,7 @@ const DdaHeader = class {
|
|
|
56
140
|
input.focus();
|
|
57
141
|
return;
|
|
58
142
|
}
|
|
143
|
+
this.searchInput.emit(query);
|
|
59
144
|
const searchEvent = this.searchSubmit.emit({ query });
|
|
60
145
|
// Without a results URL there is nowhere to go; a cancelled event means the app routes itself.
|
|
61
146
|
if (searchEvent.defaultPrevented || !this.search_action) {
|
|
@@ -95,11 +180,15 @@ const DdaHeader = class {
|
|
|
95
180
|
};
|
|
96
181
|
this.handleOutsideMegaMenuClick = (event) => {
|
|
97
182
|
if (this.activeMenuIndex !== null) {
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
183
|
+
// A click anywhere inside the top-level menu is not an "outside" click: the mega-menu
|
|
184
|
+
// content and the 3.x dropdown's second/third levels both render inside their <li>, which
|
|
185
|
+
// is inside .dda-mega-menu, so this covers every open level without naming a specific one
|
|
186
|
+
// (naming ".megamenu-content" alone, for example, always matches when any mega item exists,
|
|
187
|
+
// open or not, and would never let the 3.x dropdown branch be reached).
|
|
188
|
+
const isClickInsideMenu = event.target.closest('.dda-mega-menu');
|
|
189
|
+
if (!isClickInsideMenu) {
|
|
102
190
|
this.activeMenuIndex = null;
|
|
191
|
+
this.activeSubIndex = null;
|
|
103
192
|
}
|
|
104
193
|
}
|
|
105
194
|
};
|
|
@@ -129,36 +218,46 @@ const DdaHeader = class {
|
|
|
129
218
|
this.isMenuOpen = !this.isMenuOpen;
|
|
130
219
|
};
|
|
131
220
|
this.toggleSubMenu = (index, event) => {
|
|
132
|
-
// this.isSubMenuOpen = !this.isSubMenuOpen;
|
|
133
221
|
if (event)
|
|
134
222
|
event.preventDefault();
|
|
135
223
|
this.activeMenuIndex = this.activeMenuIndex === index ? null : index;
|
|
224
|
+
this.activeSubIndex = null;
|
|
136
225
|
};
|
|
137
226
|
this.toggleAccessibilty = () => {
|
|
138
|
-
this.
|
|
227
|
+
if (this.usePredesignedAccessibilityMenu) {
|
|
228
|
+
this.isAccessibiltyOpen = !this.isAccessibiltyOpen;
|
|
229
|
+
}
|
|
230
|
+
this.accessibilityMenuToggle.emit();
|
|
139
231
|
};
|
|
140
232
|
this.languagehandler = () => {
|
|
141
233
|
this.languageSwitch.emit();
|
|
142
234
|
};
|
|
143
235
|
this.smTexthandler = () => {
|
|
236
|
+
this.selected_text_size = 'small';
|
|
144
237
|
this.smTextSize.emit();
|
|
145
238
|
};
|
|
146
239
|
this.baseTexthandler = () => {
|
|
240
|
+
this.selected_text_size = 'normal';
|
|
147
241
|
this.baseTextSize.emit();
|
|
148
242
|
};
|
|
149
243
|
this.lgTexthandler = () => {
|
|
244
|
+
this.selected_text_size = 'large';
|
|
150
245
|
this.lgTextSize.emit();
|
|
151
246
|
};
|
|
152
247
|
this.normalContrasthandler = () => {
|
|
248
|
+
this.selected_contrast = 'normal';
|
|
153
249
|
this.normalContrast.emit();
|
|
154
250
|
};
|
|
155
251
|
this.blindContrasthandler = () => {
|
|
252
|
+
this.selected_contrast = 'colorblind';
|
|
156
253
|
this.blindContrast.emit();
|
|
157
254
|
};
|
|
158
255
|
this.redContrasthandler = () => {
|
|
256
|
+
this.selected_contrast = 'redweakness';
|
|
159
257
|
this.redContrast.emit();
|
|
160
258
|
};
|
|
161
259
|
this.greenContrasthandler = () => {
|
|
260
|
+
this.selected_contrast = 'greenweakness';
|
|
162
261
|
this.greenContrast.emit();
|
|
163
262
|
};
|
|
164
263
|
this.renderSubMenu = (subMenu, parentLi) => {
|
|
@@ -235,7 +334,7 @@ const DdaHeader = class {
|
|
|
235
334
|
return [
|
|
236
335
|
index.h("label", { htmlFor: id, class: "visually-hidden" }, this.searchText || 'Search'),
|
|
237
336
|
index.h("i", { class: "material-icons material-symbols-outlined", "aria-hidden": "true" }, "search"),
|
|
238
|
-
index.h("input", { name: this.search_input_name || 'q', type: "text", id: id, placeholder: this.searchText || 'Search', enterkeyhint: "search", autocomplete: "off", ref: ref }),
|
|
337
|
+
index.h("input", { name: this.search_input_name || 'q', type: "text", id: id, placeholder: this.text(this.search_input_placeholder, this.searchText || 'Search'), enterkeyhint: "search", autocomplete: "off", ref: ref }),
|
|
239
338
|
];
|
|
240
339
|
}
|
|
241
340
|
// The transparent style (<body class="transparent">) shows only at the top of the page.
|
|
@@ -252,15 +351,96 @@ const DdaHeader = class {
|
|
|
252
351
|
return [];
|
|
253
352
|
}
|
|
254
353
|
}
|
|
354
|
+
// Text-prop rule: an absent attribute uses the English default; an empty one means "show nothing".
|
|
355
|
+
text(value, fallback) {
|
|
356
|
+
return value === undefined || value === null ? fallback : value;
|
|
357
|
+
}
|
|
358
|
+
// The three columns of the accessibility panel. The desktop panel and the side-menu panel show
|
|
359
|
+
// the same content; only the radio group and ids differ, so both panels stay independent forms.
|
|
360
|
+
renderAccessibilityColumns(variant) {
|
|
361
|
+
var _a;
|
|
362
|
+
const suffix = variant === 'mobile' ? 'Mobile' : '';
|
|
363
|
+
const group = variant === 'mobile' ? 'themeselectionmobile' : 'themeselection';
|
|
364
|
+
const contrastTitle = this.text(this.contrast_title, 'Contrast');
|
|
365
|
+
const contrastDescription = this.text(this.contrast_description, 'Select your preferred contrast setting');
|
|
366
|
+
const readSpeakerLink = this.readSpeakerLink || this.read_speaker_link;
|
|
367
|
+
const screenReaderTitle = this.text(this.screen_reader_title, 'Screen Reader');
|
|
368
|
+
const screenReaderDescription = this.text(this.screen_reader_description, 'Listen to the content of the page by clicking play or listen');
|
|
369
|
+
const textSizeTitle = this.text(this.text_size_title, 'Text Size');
|
|
370
|
+
const textSizeDescription = this.text(this.text_size_description, 'Use the buttons below to increase or decrease the text size');
|
|
371
|
+
const options = [
|
|
372
|
+
{ value: 'normal', label: this.text((_a = this.contrast_normal_text) !== null && _a !== void 0 ? _a : this.contrast_noraml_text, 'Normal'), id: 'Normal', handler: this.normalContrasthandler },
|
|
373
|
+
{ value: 'colorblind', label: this.text(this.contrast_color_blind_text, 'Colours Blind'), id: 'ColoursBlind', handler: this.blindContrasthandler },
|
|
374
|
+
{ value: 'redweakness', label: this.text(this.contrast_red_weakness_text, 'Red Weakness'), id: 'RedWeakness', handler: this.redContrasthandler },
|
|
375
|
+
{ value: 'greenweakness', label: this.text(this.contrast_green_weakness_text, 'Green Weakness'), id: 'GreenWeakness', handler: this.greenContrasthandler },
|
|
376
|
+
];
|
|
377
|
+
const sizes = [
|
|
378
|
+
{ value: 'normal', label: 'A', handler: this.baseTexthandler },
|
|
379
|
+
{ value: 'large', label: 'A+', handler: this.lgTexthandler },
|
|
380
|
+
{ value: 'small', label: 'A-', handler: this.smTexthandler },
|
|
381
|
+
];
|
|
382
|
+
return (index.h("div", { class: "dda-row" }, index.h("div", { class: "dda-col-md-4 dda-accessibility-item" }, contrastTitle && index.h("h2", { class: "dda-fs-body-lg dda-fw-700 mb-1" }, contrastTitle), index.h("form", null, index.h("fieldset", { class: "dda-theme-list" }, contrastDescription && (index.h("legend", null, index.h("p", { class: "mb-3" }, contrastDescription))), options.map(option => option.label ? (index.h("dda-radiobutton", { title_text: option.label, checked: this.selected_contrast === option.value, size: "sm", variants: "normal", supporting: "", group_name: group, input_id: `${option.id}${suffix}`, custom_class: "", component_mode: "", onClick: option.handler })) : null)))), readSpeakerLink && (index.h("div", { class: "dda-col-md-4 dda-accessibility-item" }, screenReaderTitle && index.h("h2", { class: "dda-fs-body-lg dda-fw-700 mb-1" }, screenReaderTitle), screenReaderDescription && index.h("p", { class: "mb-3" }, screenReaderDescription), index.h("div", { class: "rs_skip rsbtn rs_preserve", id: `readspeaker_button1${suffix}` }, index.h("a", { href: readSpeakerLink, rel: "nofollow", class: "rsbtn_play circle readspeaker", accessKey: variant === 'desktop' ? 'L' : undefined, "aria-label": this.text(this.screen_reader_link_label, 'Listen to this page using ReadSpeaker') }, index.h("i", { class: "material-icons material-symbols-outlined", "aria-hidden": "true" }, "volume_up"))))), index.h("div", { class: "dda-col-md-4 dda-accessibility-item" }, textSizeTitle && index.h("h2", { class: "dda-fs-body-lg dda-fw-700 mb-1" }, textSizeTitle), textSizeDescription && index.h("p", { class: "mb-3" }, textSizeDescription), index.h("div", { class: "d-flex dda-gap-4 dda-text-size-buttons" }, sizes.map(size => (index.h("dda-button", { button_color: this.selected_text_size === size.value ? 'default-primary' : 'default-secondary', icon_button_shape: "circle", custom_class: "", size: "lg", onClick: size.handler }, size.label)))))));
|
|
383
|
+
}
|
|
384
|
+
// A tooltip must have text, so an empty tooltip attribute falls back to the default.
|
|
385
|
+
tooltip(value, fallback) {
|
|
386
|
+
return value ? value : fallback;
|
|
387
|
+
}
|
|
388
|
+
get loginLabel() {
|
|
389
|
+
return this.text(this.loginText, 'Login');
|
|
390
|
+
}
|
|
391
|
+
// 3.x hid Login when login-text was empty; hide_login is the 5.x switch.
|
|
392
|
+
get showLogin() {
|
|
393
|
+
return !this.hide_login && this.loginLabel !== '';
|
|
394
|
+
}
|
|
395
|
+
get languageLabel() {
|
|
396
|
+
return this.text(this.language_text, 'العربية');
|
|
397
|
+
}
|
|
398
|
+
renderAccessibilityButton(variant) {
|
|
399
|
+
const id = this.accessibility_button_id ? (variant === 'desktop' ? this.accessibility_button_id : `${this.accessibility_button_id}-sidemenu`) : undefined;
|
|
400
|
+
const iconClass = this.accessibility_button_icon_family || 'material-icons material-symbols-outlined';
|
|
401
|
+
const buttonClass = variant === 'desktop' ? 'tool-btn dda-btn btn-color-onsurface-secondary btn-size-sm btn-shape-circle accessibility-btn' : 'tool-btn accessibility-btn';
|
|
402
|
+
return (index.h("button", { id: id, name: variant === 'desktop' ? this.toggle_accessibility_button_name : this.accessibility_button_name, class: buttonClass, type: "button", "aria-expanded": this.usePredesignedAccessibilityMenu ? (this.isAccessibiltyOpen ? 'true' : 'false') : undefined, onClick: this.toggleAccessibilty }, index.h("i", { class: iconClass, "aria-hidden": "true" }, this.accessibility_button_icon_name || 'accessibility'), index.h("span", { class: "visually-hidden" }, this.text(this.accessibility_button_text, 'Accessibility'))));
|
|
403
|
+
}
|
|
404
|
+
renderDropdown(item, index$1) {
|
|
405
|
+
const id = this.menuPanelId(index$1);
|
|
406
|
+
// The third-level panels are siblings of the <ul>, not children of its <li> items. The <ul>
|
|
407
|
+
// scrolls (max-height), and a scroll container clips an absolutely positioned child on both
|
|
408
|
+
// axes, so a fly-out inside it cannot show. The open panel is aligned with its opener.
|
|
409
|
+
return (index.h("div", { id: id, class: { 'dda-default-submenu': true, 'is-visible': this.activeMenuIndex === index$1 } }, index.h("ul", null, item.children.map((child, subIndex) => {
|
|
410
|
+
const hasSub = child.kind === 'dropdown';
|
|
411
|
+
const subId = `${id}-${subIndex}`;
|
|
412
|
+
const isOpen = this.activeSubIndex === subIndex;
|
|
413
|
+
return (index.h("li", { key: subIndex }, index.h("a", { id: child.id, href: hasSub ? '#' : child.href, class: { 'has-submenu': hasSub, active: isOpen || child.active }, "aria-expanded": hasSub ? String(isOpen) : undefined, "aria-controls": hasSub ? subId : undefined, "aria-current": child.active && !hasSub ? 'page' : undefined, onClick: (event) => {
|
|
414
|
+
if (!hasSub)
|
|
415
|
+
return;
|
|
416
|
+
event.preventDefault();
|
|
417
|
+
const opener = event.currentTarget;
|
|
418
|
+
const panel = opener.closest('.dda-default-submenu');
|
|
419
|
+
if (panel)
|
|
420
|
+
this.activeSubTop = opener.getBoundingClientRect().top - panel.getBoundingClientRect().top;
|
|
421
|
+
this.activeSubIndex = isOpen ? null : subIndex;
|
|
422
|
+
} }, child.label)));
|
|
423
|
+
})), item.children.map((child, subIndex) => {
|
|
424
|
+
if (child.kind !== 'dropdown')
|
|
425
|
+
return null;
|
|
426
|
+
const isOpen = this.activeSubIndex === subIndex;
|
|
427
|
+
return (index.h("div", { key: `sub-${subIndex}`, id: `${id}-${subIndex}`, class: { 'dda-default-subsubmenu': true, 'is-visible': isOpen }, style: isOpen ? { top: `${this.activeSubTop}px` } : undefined }, index.h("div", { class: "dda-default-subsubmenu-content" }, index.h("span", { class: "dda-submenu-title" }, child.submenuTitle || child.label), index.h("ul", null, child.children.map((leaf, leafIndex) => (index.h("li", { key: leafIndex }, index.h("a", { id: leaf.id, href: leaf.href, "aria-current": leaf.active ? 'page' : undefined }, leaf.label))))))));
|
|
428
|
+
})));
|
|
429
|
+
}
|
|
430
|
+
/** The id of the dropdown or mega panel that top-level item `index` opens. */
|
|
431
|
+
menuPanelId(index) {
|
|
432
|
+
return `${this.searchId}-submenu-${index}`;
|
|
433
|
+
}
|
|
434
|
+
renderMega(item, index$1) {
|
|
435
|
+
return (index.h("div", { id: this.menuPanelId(index$1), class: `megamenu-content ${this.activeMenuIndex === index$1 ? 'showSubMenu' : ''}`, style: { display: this.activeMenuIndex === index$1 ? 'block' : 'none' } }, index.h("div", { class: "megamenu-item dda-container" }, index.h("div", { class: "dda-row" }, item.columns.map((column, columnIndex) => (index.h("div", { class: "dda-col-md-3", key: columnIndex }, column.title && index.h("h3", { class: "mega-menu-title" }, column.title), index.h("ul", null, column.links.map((link, linkIndex) => (index.h("li", { key: linkIndex }, index.h("a", { class: "megamenu-link", href: link.href }, index.h("span", { class: "dda-btn btn-color-onsurface-secondary btn-size-sm icon-btn-default" }, index.h("i", { class: "material-icons material-symbols-outlined", "aria-hidden": "true" }, link.icon)), index.h("span", { class: "text-wrap" }, index.h("span", { class: "title-text dda-fs-body-lg dda-fw-700" }, link.label), link.description && index.h("span", { class: "dda-fs-tagline-lg dda-fw-400" }, link.description))))))))))), index.h("button", { name: "close-mega-menu", class: "close-btn close_mega-menu", "aria-label": "Close Sidebar", onClick: () => (this.activeMenuIndex = null) }, index.h("i", { class: "material-icons material-symbols-outlined", "aria-hidden": "true" }, "close")))));
|
|
436
|
+
}
|
|
255
437
|
render() {
|
|
256
438
|
const sideMenuItems = this.parseJsonArray(this.sideMenuItems);
|
|
257
|
-
const quickLinks =
|
|
258
|
-
const
|
|
259
|
-
this.activeMenuIndex = index;
|
|
260
|
-
};
|
|
439
|
+
const quickLinks = normalizeQuickLinks(this.quickLinks);
|
|
440
|
+
const otherMenuItems = parseJsonProp.parseJsonProp(this.otherMenuItems, 'other-menu-items');
|
|
261
441
|
// The transparent style is opt-in at page level (<body class="transparent">);
|
|
262
442
|
// CSS shows the white or colored logo to match.
|
|
263
|
-
return (index.h("header", { key: '
|
|
443
|
+
return (index.h("header", { key: '32433ee95f1ae35e0f74ccb5d6b096f589695e98', class: "dda-header" }, index.h("div", { key: '9ad5e7bae10b14edb5e4b425a398f5558d5f9235', class: "dda-head-logo" }, index.h("a", { key: 'eb6b3a1a8a251b36403032991208c6851fe13c8f', href: this.firstLogoHref, class: "govt-logo" }, index.h("img", { key: 'ad7ac43b73cf44d723741de98868bad4dd851671', class: "logo-colored", src: this.firstLogoSrc, alt: this.firstLogoAlt }), index.h("img", { key: '18ea73459cb1872774664b5f462d5ef62aa6797e', class: "logo-white", src: this.firstLogoWhiteSrc || this.firstLogoSrc, alt: this.firstLogoAlt })), index.h("a", { key: '0eefe4a0f33ffdf3985afae932e66913fd13a8f3', href: this.secondLogoHref, class: "entt-logo" }, index.h("img", { key: 'df4932bc5a0f04aeedbc96042eaa45bb8618f6be', class: "logo-colored", src: this.secondLogoSrc, alt: this.secondLogoAlt }), index.h("img", { key: 'ba7c80b44d063cae03ba9383791e6fd3130847e7', class: "logo-white", src: this.secondLogoWhiteSrc || this.secondLogoSrc, alt: this.secondLogoAlt }))), index.h("div", { key: 'f65d90eb129e728b5e2765dc56edb7f810cdfd35', class: "dda-menu-container" }, index.h("div", { key: '0350e48d6b954849223565e1bf7f12ae7412186d', class: "dda-main-navigation" }, index.h("div", { key: '94b7d46db89ebfdaf56e0e42b7e1f169ee5c0ace', class: `dda-menu-overley ${this.isMenuOpen ? 'show-overley' : ''}`, onClick: this.toggleMenu }), index.h("div", { key: 'f9f95ecec3c42ebcf2b19f648aa58e66992d7639', class: "hamburger-menu", onClick: this.toggleMenu }, index.h("dda-tooltip", { key: 'c54f460c9594e0d6419d6be238cef43cf36131d0', title_text: this.tooltip(this.menu_button_label, 'Menu'), position: "top", class: "d-block" }, index.h("button", { key: '5eed1a83dddc0611d452e5b592ce0a94aa4c41e0', type: "button", class: "hamburger-menu-btn", name: this.hamburger_menu_button_name }, index.h("span", { key: 'aed42c584a5bbcc1a06e932d613137d3aea6ba34', class: "hamburger-line" }), index.h("span", { key: 'a77cbf53977e5c6347a3847f2199487870a9dc9e', class: "hamburger-menu-text" }, this.menu_button_label)))), index.h("div", { key: '8da7f3edac3d3ad3cc73e29b6aa794c18b2d4199', class: "dda-sidemenu", style: { display: this.isMenuOpen ? 'block' : '', insetInlineStart: this.isMenuOpen ? '0px' : '' } }, index.h("div", { key: '444bd4291f474d6f50d47e1aab4a4a275d0a5028', class: "dda-sidemenu-content" }, this.text(this.sideMainMenuTitle, 'Quick Links') && index.h("p", { key: '0794f5ea9a0ea1750b5fb7d3f84002368d498177', class: "dda-side-nav-title" }, this.text(this.sideMainMenuTitle, 'Quick Links')), index.h("ul", { key: 'bc0f6a674f6a9aa5ce1678a5942147e615393ee9', class: "main_side_menu" }, sideMenuItems.map((menu, index$1) => {
|
|
264
444
|
const currentIndex = `menu-${index$1}`;
|
|
265
445
|
return (index.h("li", { key: currentIndex }, index.h("a", { href: menu.href, class: menu.subMenu && menu.subMenu.length > 0 ? 'showSub' : '', onClick: (e) => {
|
|
266
446
|
if (menu.subMenu && menu.subMenu.length > 0) {
|
|
@@ -268,7 +448,14 @@ const DdaHeader = class {
|
|
|
268
448
|
this.toggleSidebarSubMenu(currentIndex);
|
|
269
449
|
}
|
|
270
450
|
} }, menu.label), this.renderSubMenu(menu.subMenu, currentIndex)));
|
|
271
|
-
}))), index.h("div", { key: '78c00fb0f772f8ef14f3143005c0c01c43614327', class: "dda-sidemenu-bottom" }, index.h("div", { key: 'd8ec6ff9cd24976246b52f44a21860c44d6fe30e', class: "dda-sidemenu-gov-logo" }, index.h("a", { key: 'afd4079340a3a11ff388776795d8e314027f069e', href: this.firstLogoHref, class: "govt-logo mb-2" }, index.h("img", { key: 'f6a416cb3c51610973098c7141984d77c27c63a8', class: "", src: this.firstLogoSrc, alt: this.firstLogoAlt }))), index.h("div", { key: '8183fe7af2ea534ae6a45fb3b6d6a73aa42a2a44', class: "dda-toolbar-menu-sidemenu" }, index.h("ul", { key: '6dc9b6919682fa07445fc2d4a04b3f00e54a6f13' }, index.h("li", { key: '218db01f3bc3fec795c9f4df86d07a218fd5705c' }, index.h("button", { key: 'd561db307ed92a7c0f5580116ecf1b4c711e92ba', name: this.accessibility_button_name, class: "tool-btn accessibility-btn", type: "button", "aria-expanded": this.isAccessibiltyOpen ? 'true' : 'false', onClick: this.toggleAccessibilty }, index.h("i", { key: '05b9b362a8b2f952c7422406a2e2998615afbde8', class: "material-icons material-symbols-outlined", "aria-hidden": "true" }, "accessibility"), index.h("span", { key: '20c9a8c6397d48999f8295b355c1a76f2a713aea', class: "visually-hidden" }, "Accessibility"))), index.h("li", { key: '219bcada14c3ea43b954972c0ad4d84417e92edb' }, index.h("button", { key: 'e92e67881b846d01eddc32ce40d727c514cf6425', name: this.language_button_name, class: "tool-btn", type: "button", lang: this.language_lang, onClick: this.languagehandler }, this.language_text || 'العربية')), index.h("li", { key: '83ee1defd4c1fbd3b2398ac5a020fa5a5c9760e8' }, index.h("dda-link-button", { key: 'c54639af89c90453d5239e41cdd21d9ac983f52c', button_color: "onsurface-secondary", start_icon: this.loginIcon || "sentiment_satisfied", custom_class: "tool-btn", href: this.loginLink, button_shape: "circle", size: "sm" }, this.loginText || "Login"))))), index.h("button", { key: 'fa0ff380e6640b14e8a68bfd9074fb12521734a3', name: this.close_menu_button_name, class: "close-btn side-nav-close-btn", "aria-label": "Close Sidebar", onClick: this.toggleMenu }, index.h("i", { key: '47bef965ed275a4dd13c640686200d301401888a', class: "material-icons material-symbols-outlined", "aria-hidden": "true" }, "close")), index.h("div", { key: 'e9db953553b8d9ddd6936265a79f332f5cff4a79', class: "dda-accessibility hide-accessibility mobile-accessibility", style: { display: this.isAccessibiltyOpen ? 'block' : 'none' } }, index.h("div", { key: '81369335fb6617ec6475256d4c1f159a0e27d2c4', class: "dda-row" }, index.h("div", { key: 'a3263b292a3be96c226fd39e2a5c3c9789450434', class: "dda-col-md-4 dda-accessibility-item" }, index.h("h2", { key: '4b25cb205d07d0492a4563cee530bce61d7e703a', class: "dda-fs-body-lg dda-fw-700 mb-1" }, "Contrast"), index.h("form", { key: '520a5e581bb4d1897967f5a4f62f763d3b7a900c' }, index.h("fieldset", { key: 'd7da70d546e29966c46b46acc4fc8b9da88bd935', class: "dda-theme-list" }, index.h("legend", { key: '4d5aac066576da67514911218e77c6832d27315b' }, index.h("p", { key: '388d12fda2cafcd65e63797a95006eed854864c4', class: "mb-3" }, "Select your preferred contrast setting ")), index.h("dda-radiobutton", { key: '1ce8acc8b8563785d2aa4784e23073a857831ddd', title_text: "Normal", checked: true, size: "sm", variants: "normal", supporting: "", group_name: "themeselectionmobile", input_id: "NormalMobile", custom_class: "", component_mode: "", aria_label: "radio-button", onClick: this.normalContrasthandler }), index.h("dda-radiobutton", { key: '6d5d24597fef7ed4c44af9b1cb78a81a62106e68', title_text: "Colours Blind", checked: false, size: "sm", variants: "normal", supporting: "", group_name: "themeselectionmobile", input_id: "ColoursBlindMobile", custom_class: "", component_mode: "", aria_label: "radio-button", onClick: this.blindContrasthandler }), index.h("dda-radiobutton", { key: '09b76a180088333990666d9192bfd48f1e3ab106', title_text: "Red Weakness", checked: false, size: "sm", variants: "normal", supporting: "", group_name: "themeselectionmobile", input_id: "RedWeaknessMobile", custom_class: "", component_mode: "", aria_label: "radio-button", onClick: this.redContrasthandler }), index.h("dda-radiobutton", { key: 'fc04f59e26db42c003bc9e747ef45cdb37f939f4', title_text: "Green Weakness", checked: false, size: "sm", variants: "normal", supporting: "", group_name: "themeselectionmobile", input_id: "GreenWeaknessMobile", custom_class: "", component_mode: "", aria_label: "radio-button", onClick: this.greenContrasthandler })))), this.readSpeakerLink && (index.h("div", { key: '2b81244b885a559f63052b0c410712e3413bba07', class: "dda-col-md-4 dda-accessibility-item" }, index.h("h2", { key: '08b480bbcadf295b5e9cddfc8922f501c7257275', class: "dda-fs-body-lg dda-fw-700 mb-1" }, "Screen Reader"), index.h("p", { key: '3367d78424ae9347cca07f396bdbcc9c2d2ae3cc', class: "mb-3" }, "Listen to the content of the page by clicking play or listen"), index.h("div", { key: 'dcfdfabc03228a8047098b4be1e22233a80d13cf', class: "rs_skip rsbtn rs_preserve", id: "readspeaker_button1" }, index.h("a", { key: '9b62bd9de4ae598d8d985fb333890558ebf703e3', href: this.readSpeakerLink, rel: "nofollow", class: "rsbtn_play circle readspeaker", accessKey: "L", "aria-label": "Listen to this page using ReadSpeaker" }, index.h("i", { key: '5790bc76d11a0802a6fa0ff2352180293bbb87b5', class: "material-icons material-symbols-outlined", "aria-hidden": "true" }, "volume_up"))))), index.h("div", { key: '0696385c365f09386911b99e52296861c9a25cc6', class: "dda-col-md-4 dda-accessibility-item" }, index.h("h2", { key: '5ebb37d526d9df77911abfed12bd7526d935fa51', class: "dda-fs-body-lg dda-fw-700 mb-1" }, "Text Size"), index.h("p", { key: '4c51f6441ab4695554a7d6c9173b9be51094bda6', class: "mb-3" }, "Use the buttons below to increase or decrease the text size"), index.h("div", { key: 'fe783a08a7247425af5ef5c45e16f77a1e0dab05', class: "d-flex dda-gap-4" }, index.h("dda-button", { key: '0c25a459f06411d169c2e00b4a7639bf452d7d31', button_color: "default-secondary", icon_button_shape: "circle", custom_class: "", size: "lg", onClick: this.baseTexthandler }, "A"), index.h("dda-button", { key: '6462ea39225b2920f75f1e2d2530a0188b17b269', button_color: "default-secondary", icon_button_shape: "circle", custom_class: "", size: "lg", onClick: this.lgTexthandler }, "A+"), index.h("dda-button", { key: '1e919f8fabcf632b14c6cbb591cc83ad41289bd0', button_color: "default-secondary", icon_button_shape: "circle", custom_class: "", size: "lg", onClick: this.smTexthandler }, "A-")))), index.h("button", { key: 'a3d48453b5a782c79946077128d32247b4a4cbcd', name: this.close_accessibility_button_name, class: "close-btn close_accessibility", "aria-label": "Close Accessibility", onClick: this.toggleAccessibilty }, index.h("i", { key: '9c60683163918bbe155bece05845fd03ce78b424', class: "material-icons material-symbols-outlined", "aria-hidden": "true" }, "close")))), index.h("div", { key: '2d2382de432be40014ff5c85316219e2e7fc8093' }, index.h("ul", { key: '02ae9037c7d1df9304274d8aa89909e19107f6ca', class: "dda-mega-menu" }, quickLinks.map((link, index$1) => (index.h("li", { key: index$1 }, index.h("a", { href: link.subMenu && link.subMenu.length > 0 ? '#' : link.href, onClick: link.subMenu && link.subMenu.length > 0 ? (e) => this.toggleSubMenu(index$1, e) : undefined, class: link.subMenu && link.subMenu.length > 0 ? `showSub ${this.activeMenuIndex === index$1 ? 'icon_arrow' : ''}` : '' }, link.label), link.subMenu && link.subMenu.length > 0 && (index.h("div", { class: `megamenu-content ${this.activeMenuIndex === index$1 ? 'showSubMenu' : ''}`, style: { display: this.activeMenuIndex === index$1 ? 'block' : 'none' } }, index.h("div", { class: "megamenu-item dda-container" }, index.h("div", { class: "dda-row" }, index.h("div", { class: "dda-col-md-3" }, index.h("h3", { class: "mega-menu-title" }, link.menuLabel), index.h("ul", null, link.subMenu.map((subItem, subIndex) => (index.h("li", { key: subIndex }, index.h("a", { class: "megamenu-link", href: subItem.href }, index.h("span", { class: "dda-btn btn-color-onsurface-secondary btn-size-sm icon-btn-default" }, index.h("i", { class: "material-icons material-symbols-outlined", "aria-hidden": "true" }, subItem.icon)), index.h("span", { class: "text-wrap" }, index.h("span", { class: "title-text dda-fs-body-lg dda-fw-700" }, subItem.title), index.h("span", { class: "dda-fs-tagline-lg dda-fw-400" }, subItem.description))))))))), index.h("button", { name: "close-mega-menu", class: "close-btn close_mega-menu", "aria-label": "Close Sidebar", onClick: () => setActiveMenuIndex(null) }, index.h("i", { class: "material-icons material-symbols-outlined", "aria-hidden": "true" }, "close"))))))))))), index.h("div", { key: 'ef459368f5e5fb8cccb7f58f2f8c438244484f9e', class: "dda-mobile-entt-logo" }, index.h("a", { key: '30ef36afb8b646906cbeaf6b00c2e7e15fc4201a', href: this.secondLogoHref, class: "entt-logo" }, index.h("img", { key: '65ff555fb1a8ec62592d3cd1da762406b724aab6', class: "logo-colored", src: this.secondLogoSrc, alt: this.secondLogoAlt }), index.h("img", { key: '45f1bd4d88fef0022720bfaf9bfdcdd0d816da76', class: "logo-white", src: this.secondLogoWhiteSrc, alt: this.secondLogoAlt }))), index.h("div", { key: '83c7b5e5608b40e6ff0826e0cdf0987760ec1850', class: "dda-mobile-search" }, index.h("button", { key: '7fb8234ee06ed486bb214f5ca8c4aa1864ea39a9', name: this.search_button_name, class: "tool-btn", type: "button", "aria-expanded": this.isSearchOpen ? 'true' : 'false', "aria-controls": `${this.searchId}-mobile-panel`, onClick: this.isSearchOpen ? this.closeMobileSearch : this.openMobileSearch, ref: el => (this.mobileSearchButton = el) }, index.h("span", { key: 'cddcc6cbe685ccb1303adf24b8ec6330cfaeb220', class: "visually-hidden" }, "Search"), index.h("i", { key: 'f4eccf210454c85bf799d7de4da22c9a0567070b', class: "material-icons material-symbols-outlined", "aria-hidden": "true" }, "search"))), index.h("div", { key: 'e3ac3313bc39a2cc4c3a2ec31fdf26c3bc954887', id: `${this.searchId}-mobile-panel`, class: "dda-mobile-search-panel", hidden: !this.isSearchOpen }, index.h("form", { key: '0c23afb9213d0f152f503f4249e2e25e7ddc6d71', class: "dda-mobile-search-form", role: "search", method: "get", action: this.search_action, onSubmit: this.handleSearchSubmit }, this.renderSearchInput(`${this.searchId}-mobile`, el => (this.mobileSearchInput = el)), index.h("button", { key: 'eee2d74848571266c1fcc4c43e96cf16fc269cbc', type: "button", class: "dda-mobile-search-close", "aria-label": "Close search", onClick: this.closeMobileSearch }, index.h("i", { key: '8c731144346ca6823d46fda0055e9b59b8acb5ea', class: "material-icons material-symbols-outlined", "aria-hidden": "true" }, "close")))), index.h("div", { key: '0cb03232c422487307c89d3478bb950ebd376496', class: "dda-toolbar-menu" }, index.h("ul", { key: '745548b4dd5232851df4deb31966e2dc4c10e9c0' }, index.h("li", { key: 'c7af1a3b3e163ef9715dfafb4f19589c65b5f229' }, index.h("dda-tooltip", { key: '27215775afa33720398f44fa3ff8b62933b33d2d', title_text: "Search", description: "", position: "top" }, index.h("form", { key: 'cff735205d4eaeadc1cb3164bd693462c67fc5c2', class: "dda-search dda-btn btn-color-onsurface-secondary btn-size-sm btn-shape-circle tool-btn", role: "search", method: "get", action: this.search_action, onSubmit: this.handleSearchSubmit }, this.renderSearchInput(this.searchId)))), index.h("li", { key: 'baa189f8aa60b856189033213783dea5005e0b05' }, index.h("dda-tooltip", { key: 'b80f89423b1994fc6051d0deabef1a54b3a95f07', title_text: "Accessibility", position: "top" }, index.h("button", { key: '9487c51c19b5652f36cd0ac61b10c35caf703aac', name: this.toggle_accessibility_button_name, class: "tool-btn dda-btn btn-color-onsurface-secondary btn-size-sm btn-shape-circle accessibility-btn", type: "button", "aria-expanded": this.isAccessibiltyOpen ? 'true' : 'false', onClick: this.toggleAccessibilty }, index.h("i", { key: 'cc26a3a646b4fe2957496347884f997a2d85ad9e', class: "material-icons material-symbols-outlined", "aria-hidden": "true" }, "accessibility"), index.h("span", { key: '2a39cff99e5b565f8ed6b4144a9114dae197318f', class: "visually-hidden" }, "Accessibility"))), index.h("div", { key: '8c44662a244298438715f0ec3aefaf08aecdbba1', class: "dda-accessibility-wrap" }, index.h("div", { key: 'c249aea4288ff53610b8d724ca9cd11829eaab8e', class: "dda-accessibility hide-accessibility", style: { display: this.isAccessibiltyOpen ? 'block' : 'none' } }, index.h("div", { key: '1cc9cdc5d432463ef8b5be0de1b50dfa5437de47', class: "dda-row" }, index.h("div", { key: 'd6e5722cfe7e80d368fce9492f6158a1428e8156', class: "dda-col-md-4 dda-accessibility-item" }, index.h("h2", { key: '503e6e630db2084b42e8e86a9982e7052cfec46c', class: "dda-fs-body-lg dda-fw-700 mb-1" }, "Contrast"), index.h("form", { key: '3c4f8861e83f89a17594a3ebe645cd8d6e7d6b8d' }, index.h("fieldset", { key: '132f829683b59536b030f8b56f64202817415314', class: "dda-theme-list" }, index.h("legend", { key: 'af8091c21864dc01db098cdc08783a3d94882d48' }, index.h("p", { key: '310afc13ed6f28624e9f08217dd7e95ac985cea8', class: "mb-3" }, "Select your preferred contrast setting ")), index.h("dda-radiobutton", { key: '86edfef83708d41703cf80ed43004fbad68a7c8e', title_text: "Normal", checked: true, size: "sm", variants: "normal", supporting: "", group_name: "themeselection", input_id: "Normal", custom_class: "", component_mode: "", aria_label: "radio-button", onClick: this.normalContrasthandler }), index.h("dda-radiobutton", { key: '82782391a43cac382e5b02b569fe73af2aab5d49', title_text: "Colours Blind", checked: false, size: "sm", variants: "normal", supporting: "", group_name: "themeselection", input_id: "ColoursBlind", custom_class: "", component_mode: "", aria_label: "radio-button", onClick: this.blindContrasthandler }), index.h("dda-radiobutton", { key: '440cdf1a898753e6f3fae2e7f1774d5d9edb30bf', title_text: "Red Weakness", checked: false, size: "sm", variants: "normal", supporting: "", group_name: "themeselection", input_id: "RedWeakness", custom_class: "", component_mode: "", aria_label: "radio-button", onClick: this.redContrasthandler }), index.h("dda-radiobutton", { key: '80902bb590f67aac585efd773428738e6fce71c1', title_text: "Green Weakness", checked: false, size: "sm", variants: "normal", supporting: "", group_name: "themeselection", input_id: "GreenWeakness", custom_class: "", component_mode: "", aria_label: "radio-button", onClick: this.greenContrasthandler })))), this.readSpeakerLink && (index.h("div", { key: '855a0e77f04385eea69ed9fab54909da634b43a7', class: "dda-col-md-4 dda-accessibility-item" }, index.h("h2", { key: '8574c03680b6e976e8d9b6b3a1b14ae2223ca5d1', class: "dda-fs-body-lg dda-fw-700 mb-1" }, "Screen Reader"), index.h("p", { key: 'db6f47a1743f9619676f3b27d7bb07003a626165', class: "mb-3" }, "Listen to the content of the page by clicking play or listen"), index.h("div", { key: '12ae575eb54578f2c3008c4815435ba739e27330', class: "rs_skip rsbtn rs_preserve", id: "readspeaker_button1" }, index.h("a", { key: '8362fc23c0725b831f99604d88e0e86903403471', href: this.readSpeakerLink, rel: "nofollow", class: "rsbtn_play circle readspeaker", accessKey: "L", "aria-label": "Listen to this page using ReadSpeaker" }, index.h("i", { key: '96a4125c6297dca5eb23f87f359a14fa43d031d6', class: "material-icons material-symbols-outlined", "aria-hidden": "true" }, "volume_up"))))), index.h("div", { key: 'ef5b98303627c4b9b856a933d4f5d29938ad60e6', class: "dda-col-md-4 dda-accessibility-item" }, index.h("h2", { key: '9cf8bd9e22720d6f158f813b1481869c4289f07f', class: "dda-fs-body-lg dda-fw-700 mb-1" }, "Text Size"), index.h("p", { key: '3dd60acafd17b9d0b5d5c1ae239c25a168446388', class: "mb-3" }, "Use the buttons below to increase or decrease the text size"), index.h("div", { key: '8117db13ecfab2669f5e65ab99ec2ee7070b04aa', class: "d-flex dda-gap-4" }, index.h("dda-button", { key: '59b41851a6e24b51addb22310cc26103857a95ec', button_color: "default-secondary", icon_button_shape: "circle", custom_class: "", size: "lg", onClick: this.baseTexthandler }, "A"), index.h("dda-button", { key: '947e4e3e63e64b572f83a12ddc9074fd48f7e7a2', button_color: "default-secondary", icon_button_shape: "circle", custom_class: "", size: "lg", onClick: this.lgTexthandler }, "A+"), index.h("dda-button", { key: '28ddf63dd783693650f9e22939560f3e2fe2bb1c', button_color: "default-secondary", icon_button_shape: "circle", custom_class: "", size: "lg", onClick: this.smTexthandler }, "A-")))), index.h("button", { key: 'e645b6fe78752460c88b86652fc4c21a11cd4b10', name: this.close_accessibility_button_name, class: "close-btn close_accessibility", "aria-label": "Close Sidebar", onClick: this.toggleAccessibilty }, index.h("i", { key: '80177be8e24b3c64ba78def6c664a0b9e2b40315', class: "materinal-icons material-symbols-outlined", "aria-hidden": "true" }, "close"))))), index.h("li", { key: '7bed27d22542bd692a91831f49369c7c80b2c6c7' }, index.h("dda-tooltip", { key: 'bd28a2a61744e41f4d229d2005a7133fb055d2c8', title_text: "Language", position: "top" }, index.h("dda-button", { key: 'ba55905380aa73451aea04825cffec1b7b44a9d3', button_color: "onsurface-secondary", custom_class: "tool-btn", button_shape: "circle", size: "sm", lang: this.language_lang, onClick: this.languagehandler }, this.language_text || 'العربية'))), index.h("li", { key: '8d1b8f661abfe0a6b81c65111b5e60c35247b51b' }, index.h("dda-tooltip", { key: 'f4d82247b40136224a38493789ad33a1cde786ef', title_text: "Login", position: "top" }, index.h("dda-link-button", { key: 'cadea908a166989edd355e22060e31fb02b9528d', button_color: "onsurface-secondary", start_icon: "sentiment_satisfied", custom_class: "tool-btn", href: this.loginLink, button_shape: "circle", size: "sm" }, "Login"))))))));
|
|
451
|
+
})), !this.hideOtherMenu && otherMenuItems.length > 0 && [
|
|
452
|
+
this.sideOtherMenuTitle && index.h("p", { key: '9c7b8d1dd2d206f984951cef4dad79551c026dcc', class: "dda-side-nav-title" }, this.sideOtherMenuTitle),
|
|
453
|
+
index.h("ul", { key: '42001d954d19a80a7ad6328aeb13bc8f5adfba8d', class: "main_side_menu" }, otherMenuItems.map((item, index$1) => (index.h("li", { key: `other-${index$1}` }, index.h("a", { href: item.href, class: item.active === 'true' ? 'active' : '', "aria-current": item.active === 'true' ? 'page' : undefined }, item.label))))),
|
|
454
|
+
]), index.h("div", { key: '06f5f6931ad39ec607aa10d97c14dd12ab0d4e01', class: "dda-sidemenu-bottom" }, index.h("div", { key: '108a9c80301683c910cc80e81c2b533b76d821a9', class: "dda-sidemenu-gov-logo" }, index.h("a", { key: '4be0fdf0cd40f5e8cff36bbad4acf63d97935bd8', href: this.firstLogoHref, class: "govt-logo mb-2" }, index.h("img", { key: 'b8b00bf0d624299da3ff2f2b824b951620c40be9', class: "", src: this.firstLogoSrc, alt: this.firstLogoAlt }))), index.h("div", { key: 'b0719b41aad4f75366d54e25a967bc8d67952918', class: "dda-toolbar-menu-sidemenu" }, index.h("ul", { key: '52ee920078fbb73ce827fc65e372d2899568a943' }, index.h("li", { key: '768b6f0f85f1304136dd23d0a3d5a9c213600810' }, this.renderAccessibilityButton('mobile')), this.languageLabel && (index.h("li", { key: 'ae2ee87232999ae08a38378c475c38f742b5bf0c' }, index.h("button", { key: '7c08d026b461becf44c5222a040c2544bb8c6b7c', name: this.language_button_name, class: "tool-btn", type: "button", lang: this.language_lang, onClick: this.languagehandler }, this.languageLabel))), this.showLogin && (index.h("li", { key: '5f4f33fca15860af56e9d9d45149f1c391cd31df' }, index.h("dda-link-button", { key: '4af11a09e4d414677b65707f228d3a8bdf85bc04', button_color: "onsurface-secondary", start_icon: this.loginIcon || 'sentiment_satisfied', custom_class: "tool-btn", href: this.loginLink, button_shape: "circle", size: "sm" }, this.loginLabel)))))), index.h("button", { key: 'a2ff2fbce6f369d570ad25efebf6f8f0de85cc04', name: this.close_menu_button_name, class: "close-btn side-nav-close-btn", "aria-label": "Close Sidebar", onClick: this.toggleMenu }, index.h("i", { key: '0334c91beef504626934e695b555d67a9bedbdf6', class: "material-icons material-symbols-outlined", "aria-hidden": "true" }, "close")), this.usePredesignedAccessibilityMenu && (index.h("div", { key: '6668fd9fa40b85d119100f59bf5055ae7767db23', class: "dda-accessibility hide-accessibility mobile-accessibility", style: { display: this.isAccessibiltyOpen ? 'block' : 'none' } }, this.renderAccessibilityColumns('mobile'), index.h("button", { key: 'bdba830a83267399804cf30efb4b454b6dd0bbe0', name: this.close_accessibility_button_name, class: "close-btn close_accessibility", "aria-label": "Close Accessibility", onClick: this.toggleAccessibilty }, index.h("i", { key: '0b9a6819c1bff1b52662386aca02110c6ab8c131', class: "material-icons material-symbols-outlined", "aria-hidden": "true" }, "close"))))), index.h("div", { key: 'bd9ec32ec674f8738a78ff8f53108fdf682a20e0' }, index.h("ul", { key: '38ba8c0d6525077ebfe88c69b1ecfd0fb43e2608', class: "dda-mega-menu" }, quickLinks.map((link, index$1) => {
|
|
455
|
+
const hasSub = link.kind !== 'link';
|
|
456
|
+
const isOpen = this.activeMenuIndex === index$1;
|
|
457
|
+
return (index.h("li", { key: index$1 }, index.h("a", { href: hasSub ? '#' : link.href, onClick: hasSub ? (e) => this.toggleSubMenu(index$1, e) : undefined, class: { showSub: hasSub, icon_arrow: hasSub && isOpen, active: link.active }, "aria-expanded": hasSub ? String(isOpen) : undefined, "aria-controls": hasSub ? this.menuPanelId(index$1) : undefined, "aria-current": link.active && !hasSub ? 'page' : undefined }, link.label), link.kind === 'dropdown' && this.renderDropdown(link, index$1), link.kind === 'mega' && this.renderMega(link, index$1)));
|
|
458
|
+
})))), index.h("div", { key: '005102cc2dffc29276815160605772370a3bc0cc', class: "dda-mobile-entt-logo" }, index.h("a", { key: 'df6a1b8c76455d114c08500ae6502be62f06858c', href: this.secondLogoHref, class: "entt-logo" }, index.h("img", { key: '9a04ddd255475900f45086120543260bfee0de29', class: "logo-colored", src: this.secondLogoSrc, alt: this.secondLogoAlt }), index.h("img", { key: 'f7b56f89406f1df4d1d64a5bb5b9d7b188b7d423', class: "logo-white", src: this.secondLogoWhiteSrc, alt: this.secondLogoAlt }))), index.h("div", { key: 'e8b285e912a1cb2acc55c11615f07ce6d7e6d337', class: "dda-mobile-search" }, this.mobileMenuSearchUrl ? (index.h("a", { id: this.mobileMenuSearchId, href: this.mobileMenuSearchUrl, class: "tool-btn" }, index.h("span", { class: "visually-hidden" }, this.searchText || 'Search'), index.h("i", { class: "material-icons material-symbols-outlined", "aria-hidden": "true" }, "search"))) : (index.h("button", { id: this.mobileMenuSearchId, name: this.search_button_name, class: "tool-btn", type: "button", "aria-expanded": this.isSearchOpen ? 'true' : 'false', "aria-controls": `${this.searchId}-mobile-panel`, onClick: this.isSearchOpen ? this.closeMobileSearch : this.openMobileSearch, ref: el => (this.mobileSearchButton = el) }, index.h("span", { class: "visually-hidden" }, this.searchText || 'Search'), index.h("i", { class: "material-icons material-symbols-outlined", "aria-hidden": "true" }, "search")))), !this.mobileMenuSearchUrl && (index.h("div", { key: 'edc649b51bdce87a49162dd8e2d29fa1e5525d50', id: `${this.searchId}-mobile-panel`, class: "dda-mobile-search-panel", hidden: !this.isSearchOpen }, index.h("form", { key: 'e6185f22e6d16c3ecdf3837917f6f5ac12483fa4', class: "dda-mobile-search-form", role: "search", method: "get", action: this.search_action, onSubmit: this.handleSearchSubmit }, this.renderSearchInput(`${this.searchId}-mobile`, el => (this.mobileSearchInput = el)), index.h("button", { key: '82ea4559f09115e8790b654d7c270734a436b0be', type: "button", class: "dda-mobile-search-close", "aria-label": "Close search", onClick: this.closeMobileSearch }, index.h("i", { key: 'fc2e02ff9a6d86f99ae0734d5dc77d9d3988af05', class: "material-icons material-symbols-outlined", "aria-hidden": "true" }, "close"))))), index.h("div", { key: 'caba18a60ff73e65bc70ff1ff082c47782e96ecb', class: "dda-toolbar-menu" }, index.h("ul", { key: 'c976f0088fdf1d9b50da2966aa45d8e66aff7e99' }, index.h("li", { key: '4ffb8b7e65c3516dc2619ed90387708701d65a61' }, index.h("dda-tooltip", { key: 'fee68662ada0b681d894fa47f4377a23a63c02d2', title_text: this.tooltip(this.search_tooltip, 'Search'), description: "", position: "top" }, index.h("form", { key: '981fff0a7cbab22cf454855d46d9fe254488607c', class: "dda-search dda-btn btn-color-onsurface-secondary btn-size-sm btn-shape-circle tool-btn", role: "search", method: "get", action: this.search_action, onSubmit: this.handleSearchSubmit }, this.renderSearchInput(this.searchId)))), index.h("li", { key: 'fa034c28c12012c9e080ffa02ba744c1359e3b71' }, index.h("dda-tooltip", { key: '39f7eeaae844e1aaad97894d3ac01dfe68ae5a6d', title_text: this.tooltip(this.accessibility_tooltip, 'Accessibility'), position: "top" }, this.renderAccessibilityButton('desktop')), this.usePredesignedAccessibilityMenu && (index.h("div", { key: '9bd00b640ddb4dd44497d1d665dfcfdc1bd8befc', class: "dda-accessibility-wrap" }, index.h("div", { key: '9743bd582c5705e1ce9602484f24c7fdd1718ac2', class: "dda-accessibility hide-accessibility", style: { display: this.isAccessibiltyOpen ? 'block' : 'none' } }, this.renderAccessibilityColumns('desktop'), index.h("button", { key: '7b2913e38ed3a3c59023de78254ab8de62abc661', name: this.close_accessibility_button_name, class: "close-btn close_accessibility", "aria-label": "Close Sidebar", onClick: this.toggleAccessibilty }, index.h("i", { key: 'b3aa1577875a36b310c9c52ee909c98940e8a81b', class: "material-icons material-symbols-outlined", "aria-hidden": "true" }, "close")))))), this.languageLabel && (index.h("li", { key: '4d500ce6dfa7253a7ec7d8365f7944b0b09d793b' }, index.h("dda-tooltip", { key: 'd3308456b90d849acfef563a5fde1673606d50ca', title_text: this.tooltip(this.language_tooltip, 'Language'), position: "top" }, index.h("dda-button", { key: '40075897d322fd313a5871ec1b91f6efbac1d14b', button_color: "onsurface-secondary", custom_class: "tool-btn", button_shape: "circle", size: "sm", lang: this.language_lang, onClick: this.languagehandler }, this.languageLabel)))), this.showLogin && (index.h("li", { key: 'ceecde91b63d8bca127ac06e98bcef1abaeb2fc6' }, index.h("dda-tooltip", { key: '0e0af0d68680dbd27af3d7a9fee22f05487729d1', title_text: this.tooltip(this.login_tooltip, this.loginLabel), position: "top" }, index.h("dda-link-button", { key: '4acf05721471dd3434c0875986639f2d673fdf98', button_color: "onsurface-secondary", start_icon: this.loginIcon || 'sentiment_satisfied', custom_class: "tool-btn", href: this.loginLink, button_shape: "circle", size: "sm" }, this.loginLabel)))))))));
|
|
272
459
|
}
|
|
273
460
|
get el() { return index.getElement(this); }
|
|
274
461
|
static get watchers() { return {
|