@gov-design-system-ce/components 4.6.3 → 4.6.4
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/dist/cjs/app-globals-V2Kpy_OQ.js.map +1 -1
- package/dist/cjs/core.cjs.js +1 -1
- package/dist/cjs/gov-banner.cjs.entry.js +3 -3
- package/dist/cjs/gov-banner.cjs.entry.js.map +1 -1
- package/dist/cjs/gov-banner.entry.cjs.js.map +1 -1
- package/dist/cjs/gov-flex_3.cjs.entry.js +1 -1
- package/dist/cjs/gov-form-autocomplete.cjs.entry.js +67 -23
- package/dist/cjs/gov-form-autocomplete.cjs.entry.js.map +1 -1
- package/dist/cjs/gov-form-autocomplete.entry.cjs.js.map +1 -1
- package/dist/cjs/gov-form-file.cjs.entry.js +32 -3
- package/dist/cjs/gov-form-file.cjs.entry.js.map +1 -1
- package/dist/cjs/gov-form-file.entry.cjs.js.map +1 -1
- package/dist/cjs/gov-form-search.cjs.entry.js +1 -1
- package/dist/cjs/gov-form-search.cjs.entry.js.map +1 -1
- package/dist/cjs/gov-form-search.entry.cjs.js.map +1 -1
- package/dist/cjs/gov-form-select.cjs.entry.js +8 -15
- package/dist/cjs/gov-form-select.cjs.entry.js.map +1 -1
- package/dist/cjs/gov-form-select.entry.cjs.js.map +1 -1
- package/dist/cjs/gov-tooltip.gov-tooltip-content.entry.cjs.js.map +1 -1
- package/dist/cjs/gov-tooltip_2.cjs.entry.js +34 -9
- package/dist/cjs/gov-tooltip_2.cjs.entry.js.map +1 -1
- package/dist/cjs/gov-wizard-item.cjs.entry.js +2 -2
- package/dist/cjs/gov-wizard.cjs.entry.js +1 -1
- package/dist/cjs/index-BEF5cZxd.js +4 -4
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/collection/components/gov-banner/gov-banner.js +4 -4
- package/dist/collection/components/gov-banner/gov-banner.js.map +1 -1
- package/dist/collection/components/gov-form/autocomplete/autocomplete.utils.js +14 -0
- package/dist/collection/components/gov-form/autocomplete/autocomplete.utils.js.map +1 -0
- package/dist/collection/components/gov-form/autocomplete/gov-form-autocomplete.js +76 -22
- package/dist/collection/components/gov-form/autocomplete/gov-form-autocomplete.js.map +1 -1
- package/dist/collection/components/gov-form/file/gov-form-file.js +34 -3
- package/dist/collection/components/gov-form/file/gov-form-file.js.map +1 -1
- package/dist/collection/components/gov-form/search/gov-form-search.js +2 -2
- package/dist/collection/components/gov-form/search/gov-form-search.js.map +1 -1
- package/dist/collection/components/gov-form/select/gov-form-select.js +8 -15
- package/dist/collection/components/gov-form/select/gov-form-select.js.map +1 -1
- package/dist/collection/components/gov-tooltip/gov-tooltip-content.js +22 -1
- package/dist/collection/components/gov-tooltip/gov-tooltip-content.js.map +1 -1
- package/dist/collection/components/gov-tooltip/gov-tooltip.js +31 -8
- package/dist/collection/components/gov-tooltip/gov-tooltip.js.map +1 -1
- package/dist/collection/components/gov-wizard/gov-wizard-item.js +2 -2
- package/dist/collection/components/gov-wizard/gov-wizard.js +1 -1
- package/dist/components/gov-accordion-item.js +1 -1
- package/dist/components/gov-accordion.js +1 -1
- package/dist/components/gov-attachments-item.js +1 -1
- package/dist/components/gov-attachments.js +1 -1
- package/dist/components/gov-backdrop.js +1 -1
- package/dist/components/gov-banner.js +1 -1
- package/dist/components/gov-banner.js.map +1 -1
- package/dist/components/gov-blockquote.js +1 -1
- package/dist/components/gov-breadcrumbs.js +1 -1
- package/dist/components/gov-breadcrumbs.js.map +1 -1
- package/dist/components/gov-button.js +1 -1
- package/dist/components/gov-card.js +1 -1
- package/dist/components/gov-chip.js +1 -1
- package/dist/components/gov-collapsible.js +1 -1
- package/dist/components/gov-collapsible.js.map +1 -1
- package/dist/components/gov-container.js +1 -1
- package/dist/components/gov-control-group.js +1 -1
- package/dist/components/gov-cookiebar.js +1 -1
- package/dist/components/gov-dialog.js +1 -1
- package/dist/components/gov-dropdown.js +1 -1
- package/dist/components/gov-empty.js +1 -1
- package/dist/components/gov-error-code.js +1 -1
- package/dist/components/gov-flex.js +1 -1
- package/dist/components/gov-form-autocomplete.js +1 -1
- package/dist/components/gov-form-checkbox-group.js +1 -1
- package/dist/components/gov-form-checkbox.js +1 -1
- package/dist/components/gov-form-control.js +1 -1
- package/dist/components/gov-form-file.js +1 -1
- package/dist/components/gov-form-file.js.map +1 -1
- package/dist/components/gov-form-group.js +1 -1
- package/dist/components/gov-form-input.js +1 -1
- package/dist/components/gov-form-message.js +1 -1
- package/dist/components/gov-form-multi-select.js +1 -1
- package/dist/components/gov-form-multi-select.js.map +1 -1
- package/dist/components/gov-form-radio-group.js +1 -1
- package/dist/components/gov-form-radio.js +1 -1
- package/dist/components/gov-form-range.js +1 -1
- package/dist/components/gov-form-range.js.map +1 -1
- package/dist/components/gov-form-search.js +1 -1
- package/dist/components/gov-form-search.js.map +1 -1
- package/dist/components/gov-form-select.js +1 -1
- package/dist/components/gov-form-switch.js +1 -1
- package/dist/components/gov-grid-item.js +1 -1
- package/dist/components/gov-grid.js +1 -1
- package/dist/components/gov-icon.js +1 -1
- package/dist/components/gov-infobar.js +1 -1
- package/dist/components/gov-layout-column.js +1 -1
- package/dist/components/gov-layout.js +1 -1
- package/dist/components/gov-link.js +1 -1
- package/dist/components/gov-loading.js +1 -1
- package/dist/components/gov-message.js +1 -1
- package/dist/components/gov-pagination.js +1 -1
- package/dist/components/gov-skeleton.js +1 -1
- package/dist/components/gov-spacer.js +1 -1
- package/dist/components/gov-stepper-item.js +1 -1
- package/dist/components/gov-stepper.js +1 -1
- package/dist/components/gov-tabs-item.js +1 -1
- package/dist/components/gov-tabs.js +1 -1
- package/dist/components/gov-tag.js +1 -1
- package/dist/components/gov-theme-switch.js +1 -1
- package/dist/components/gov-tile.js +1 -1
- package/dist/components/gov-toast.js +1 -1
- package/dist/components/gov-tooltip-content.js +1 -1
- package/dist/components/gov-tooltip.js +1 -1
- package/dist/components/gov-wizard-item.js +1 -1
- package/dist/components/gov-wizard.js +1 -1
- package/dist/components/{p-DKo9A5gq.js → p-BHRF-5cf.js} +2 -2
- package/dist/components/{p-9imLQpxb.js → p-BSr8e18S.js} +2 -2
- package/dist/components/{p-BNnuBQvo.js → p-BxS4InzB.js} +2 -2
- package/dist/components/{p-CfaJM4SA.js → p-CMmyR4-k.js} +2 -2
- package/dist/components/{p-B0KFtEn3.js → p-CU0plGZP.js} +2 -2
- package/dist/components/{p-BrdXh0mI.js → p-CXPP9vec.js} +2 -2
- package/dist/components/{p-djqfSbq-.js → p-C_URF9Su.js} +2 -2
- package/dist/components/{p-yqJEurSE.js → p-CnKqUwf9.js} +2 -2
- package/dist/components/p-DEthsMuE.js +2 -0
- package/dist/components/p-DEthsMuE.js.map +1 -0
- package/dist/components/{p-Bv5L0j6n.js → p-DN5pb9xA.js} +2 -2
- package/dist/components/{p-DesycS6d.js → p-iTwUkISB.js} +2 -2
- package/dist/components/{p-BZTY3MxF.js → p-ibUK7mfI.js} +2 -2
- package/dist/components/p-keC6luw7.js +2 -0
- package/dist/components/p-keC6luw7.js.map +1 -0
- package/dist/components/p-pJ_vPAO0.js +2 -0
- package/dist/components/p-pJ_vPAO0.js.map +1 -0
- package/dist/components/p-yIpIIG5A.js +2 -0
- package/dist/components/p-yIpIIG5A.js.map +1 -0
- package/dist/core/core.css +47 -47
- package/dist/core/core.esm.js +1 -1
- package/dist/core/gov-banner.entry.esm.js.map +1 -1
- package/dist/core/gov-form-autocomplete.entry.esm.js.map +1 -1
- package/dist/core/gov-form-file.entry.esm.js.map +1 -1
- package/dist/core/gov-form-search.entry.esm.js.map +1 -1
- package/dist/core/gov-form-select.entry.esm.js.map +1 -1
- package/dist/core/gov-tooltip.gov-tooltip-content.entry.esm.js.map +1 -1
- package/dist/core/{p-4da8ac1d.entry.js → p-10991f00.entry.js} +2 -2
- package/dist/core/p-19300834.entry.js +2 -0
- package/dist/core/{p-bd389bfd.entry.js.map → p-19300834.entry.js.map} +1 -1
- package/dist/core/p-4e2faea7.entry.js +2 -0
- package/dist/core/p-4e2faea7.entry.js.map +1 -0
- package/dist/core/p-7f513718.entry.js +2 -0
- package/dist/core/p-7f513718.entry.js.map +1 -0
- package/dist/core/p-8d47e346.entry.js +2 -0
- package/dist/core/p-8d47e346.entry.js.map +1 -0
- package/dist/core/p-DQuL1Twl.js.map +1 -1
- package/dist/core/p-afe254cb.entry.js +2 -0
- package/dist/core/p-afe254cb.entry.js.map +1 -0
- package/dist/core/{p-469f14db.entry.js → p-bec959c4.entry.js} +2 -2
- package/dist/core/p-d9d29f50.entry.js +2 -0
- package/dist/core/p-d9d29f50.entry.js.map +1 -0
- package/dist/core/{p-4d365881.entry.js → p-f75ad657.entry.js} +2 -2
- package/dist/esm/app-globals-DQuL1Twl.js.map +1 -1
- package/dist/esm/core.js +1 -1
- package/dist/esm/gov-banner.entry.js +3 -3
- package/dist/esm/gov-banner.entry.js.map +1 -1
- package/dist/esm/gov-flex_3.entry.js +1 -1
- package/dist/esm/gov-form-autocomplete.entry.js +68 -24
- package/dist/esm/gov-form-autocomplete.entry.js.map +1 -1
- package/dist/esm/gov-form-file.entry.js +32 -3
- package/dist/esm/gov-form-file.entry.js.map +1 -1
- package/dist/esm/gov-form-search.entry.js +1 -1
- package/dist/esm/gov-form-search.entry.js.map +1 -1
- package/dist/esm/gov-form-select.entry.js +8 -15
- package/dist/esm/gov-form-select.entry.js.map +1 -1
- package/dist/esm/gov-tooltip.gov-tooltip-content.entry.js.map +1 -1
- package/dist/esm/gov-tooltip_2.entry.js +34 -9
- package/dist/esm/gov-tooltip_2.entry.js.map +1 -1
- package/dist/esm/gov-wizard-item.entry.js +2 -2
- package/dist/esm/gov-wizard.entry.js +1 -1
- package/dist/esm/index-ClISz4NF.js +4 -4
- package/dist/esm/loader.js +1 -1
- package/dist/hydrate/index.js +154 -60
- package/dist/hydrate/index.mjs +154 -60
- package/dist/types/Users/jf/dev/designSystem/gov-design-system/packages/core/.stencil/packages/core/stencil.config.d.ts +2 -0
- package/dist/types/components/gov-form/autocomplete/autocomplete.utils.d.ts +2 -0
- package/dist/types/components/gov-form/autocomplete/gov-form-autocomplete.d.ts +9 -0
- package/dist/types/components/gov-form/file/gov-form-file.d.ts +1 -0
- package/dist/types/components/gov-form/select/gov-form-select.d.ts +1 -1
- package/dist/types/components/gov-tooltip/gov-tooltip-content.d.ts +4 -0
- package/dist/types/components/gov-tooltip/gov-tooltip.d.ts +3 -0
- package/dist/types/components.d.ts +20 -2
- package/package.json +2 -2
- package/readme.md +9 -0
- package/dist/components/p-DFu5UVoP.js +0 -2
- package/dist/components/p-DFu5UVoP.js.map +0 -1
- package/dist/components/p-DMVQRz4f.js +0 -2
- package/dist/components/p-DMVQRz4f.js.map +0 -1
- package/dist/components/p-UDT3DloZ.js +0 -2
- package/dist/components/p-UDT3DloZ.js.map +0 -1
- package/dist/components/p-x3w8Mun_.js +0 -2
- package/dist/components/p-x3w8Mun_.js.map +0 -1
- package/dist/core/p-11fc3899.entry.js +0 -2
- package/dist/core/p-11fc3899.entry.js.map +0 -1
- package/dist/core/p-33b462c9.entry.js +0 -2
- package/dist/core/p-33b462c9.entry.js.map +0 -1
- package/dist/core/p-3e5ae012.entry.js +0 -2
- package/dist/core/p-3e5ae012.entry.js.map +0 -1
- package/dist/core/p-bd389bfd.entry.js +0 -2
- package/dist/core/p-c21bc8f9.entry.js +0 -2
- package/dist/core/p-c21bc8f9.entry.js.map +0 -1
- package/dist/core/p-def34832.entry.js +0 -2
- package/dist/core/p-def34832.entry.js.map +0 -1
- package/dist/types/work/packages/core/.stencil/packages/core/stencil.config.d.ts +0 -2
- /package/dist/components/{p-DKo9A5gq.js.map → p-BHRF-5cf.js.map} +0 -0
- /package/dist/components/{p-9imLQpxb.js.map → p-BSr8e18S.js.map} +0 -0
- /package/dist/components/{p-BNnuBQvo.js.map → p-BxS4InzB.js.map} +0 -0
- /package/dist/components/{p-CfaJM4SA.js.map → p-CMmyR4-k.js.map} +0 -0
- /package/dist/components/{p-B0KFtEn3.js.map → p-CU0plGZP.js.map} +0 -0
- /package/dist/components/{p-BrdXh0mI.js.map → p-CXPP9vec.js.map} +0 -0
- /package/dist/components/{p-djqfSbq-.js.map → p-C_URF9Su.js.map} +0 -0
- /package/dist/components/{p-yqJEurSE.js.map → p-CnKqUwf9.js.map} +0 -0
- /package/dist/components/{p-Bv5L0j6n.js.map → p-DN5pb9xA.js.map} +0 -0
- /package/dist/components/{p-DesycS6d.js.map → p-iTwUkISB.js.map} +0 -0
- /package/dist/components/{p-BZTY3MxF.js.map → p-ibUK7mfI.js.map} +0 -0
- /package/dist/core/{p-4da8ac1d.entry.js.map → p-10991f00.entry.js.map} +0 -0
- /package/dist/core/{p-469f14db.entry.js.map → p-bec959c4.entry.js.map} +0 -0
- /package/dist/core/{p-4d365881.entry.js.map → p-f75ad657.entry.js.map} +0 -0
package/dist/hydrate/index.mjs
CHANGED
|
@@ -3433,7 +3433,7 @@ class GovBanner {
|
|
|
3433
3433
|
/**
|
|
3434
3434
|
* Banner’s foreground
|
|
3435
3435
|
*/
|
|
3436
|
-
this.foreground = BannerForeground.
|
|
3436
|
+
this.foreground = BannerForeground.IMAGE;
|
|
3437
3437
|
/**
|
|
3438
3438
|
* XL Banner’s text color
|
|
3439
3439
|
*/
|
|
@@ -3459,10 +3459,10 @@ class GovBanner {
|
|
|
3459
3459
|
this.validateTextColor(this.textColor);
|
|
3460
3460
|
}
|
|
3461
3461
|
render() {
|
|
3462
|
-
return (hAsync(Host, Object.assign({ key: '
|
|
3462
|
+
return (hAsync(Host, Object.assign({ key: '142c906194083f6c186d1f1d9033c4f2c9be9bff', class: this.h.classes(BannerClass.root), role: "region", size: this.size }, (this.size !== "xl" ? {
|
|
3463
3463
|
background: this.background,
|
|
3464
3464
|
foreground: this.foreground
|
|
3465
|
-
} : { 'text-color': this.textColor })), hAsync("div", { key: '
|
|
3465
|
+
} : { 'text-color': this.textColor })), hAsync("div", { key: '0b52a8859b6cdcd92d0f5e97b460a3e0a899bd44' }, hAsync("div", { key: 'a36ed5ad57c878d70770ccfeccd172749a555b22', class: BannerClass.content }, hAsync("slot", { key: '57f52bfb0189450e77c00f4d9904712e555a3125', name: "headline" }), hAsync("slot", { key: '91629f1bf0605ae28d694d044d19bbef9ebb69da' })), this.h.hasSlot('button') && (hAsync("slot", { key: '458a59c73e9bdf02d6cdb1e8c5caea0dcfec526a', name: "button" }))), hAsync("slot", { key: 'f1d60077313455ed78c78b56c7741b4b593cf7cc', name: "image" })));
|
|
3466
3466
|
}
|
|
3467
3467
|
get host() { return getElement(this); }
|
|
3468
3468
|
static get watchers() { return {
|
|
@@ -4757,6 +4757,19 @@ const propsValueToArray = (value) => {
|
|
|
4757
4757
|
return [];
|
|
4758
4758
|
};
|
|
4759
4759
|
|
|
4760
|
+
const normalize = (value) => typeof value === 'string' ? removeDiacritics(value).toLowerCase() : '';
|
|
4761
|
+
const filterAutocompleteOptions = (options, query, nameKey, maxOptions) => {
|
|
4762
|
+
const source = Array.isArray(options) ? options : [];
|
|
4763
|
+
const normalizedQuery = normalize(query);
|
|
4764
|
+
const matches = normalizedQuery.length === 0
|
|
4765
|
+
? source
|
|
4766
|
+
: source.filter(item => {
|
|
4767
|
+
const text = item === null || item === void 0 ? void 0 : item[nameKey];
|
|
4768
|
+
return typeof text === 'string' && normalize(text).includes(normalizedQuery);
|
|
4769
|
+
});
|
|
4770
|
+
return Number.isInteger(maxOptions) && maxOptions > 0 ? matches.slice(0, maxOptions) : matches;
|
|
4771
|
+
};
|
|
4772
|
+
|
|
4760
4773
|
class GovFormAutocomplete {
|
|
4761
4774
|
constructor(hostRef) {
|
|
4762
4775
|
registerInstance(this, hostRef);
|
|
@@ -4764,6 +4777,7 @@ class GovFormAutocomplete {
|
|
|
4764
4777
|
this.govBlur = createEvent(this, "gov-blur");
|
|
4765
4778
|
this.govInput = createEvent(this, "gov-input");
|
|
4766
4779
|
this.govSelect = createEvent(this, "gov-select");
|
|
4780
|
+
this.fullOptions = [];
|
|
4767
4781
|
this.templateResolver = item => item[this.nameKey];
|
|
4768
4782
|
/**
|
|
4769
4783
|
* Value of input
|
|
@@ -4791,6 +4805,11 @@ class GovFormAutocomplete {
|
|
|
4791
4805
|
* Minimum length (number of characters) of value
|
|
4792
4806
|
*/
|
|
4793
4807
|
this.minlength = 3;
|
|
4808
|
+
/**
|
|
4809
|
+
* Maximum number of items shown from a static `options` list (0 = unlimited).
|
|
4810
|
+
* Applies only when no async search callback is set.
|
|
4811
|
+
*/
|
|
4812
|
+
this.maxOptions = 10;
|
|
4794
4813
|
/**
|
|
4795
4814
|
* Input throttle in milliseconds
|
|
4796
4815
|
*/
|
|
@@ -4803,13 +4822,33 @@ class GovFormAutocomplete {
|
|
|
4803
4822
|
this.arrowCounter = -1;
|
|
4804
4823
|
this.list = [];
|
|
4805
4824
|
this.inheritedAttributes = {};
|
|
4825
|
+
this.emitAndSearch = (e) => {
|
|
4826
|
+
this.govInput.emit({
|
|
4827
|
+
originalEvent: e,
|
|
4828
|
+
component: FormAutocompleteClass.root,
|
|
4829
|
+
value: this.value,
|
|
4830
|
+
selected: null,
|
|
4831
|
+
});
|
|
4832
|
+
this.doSearch();
|
|
4833
|
+
};
|
|
4834
|
+
this.onInputHandler = (e) => {
|
|
4835
|
+
e.stopPropagation();
|
|
4836
|
+
this.value = e.detail.value;
|
|
4837
|
+
this.debouncedSearch(e);
|
|
4838
|
+
};
|
|
4806
4839
|
this.listBoxId = createID('GovListBox');
|
|
4807
4840
|
}
|
|
4808
4841
|
validateSize(newValue) {
|
|
4809
4842
|
validateProp(FormAutocompleteSizes, newValue, FormAutocompleteClass.root);
|
|
4810
4843
|
}
|
|
4811
4844
|
watchOptions(newValue) {
|
|
4812
|
-
this.
|
|
4845
|
+
this.fullOptions = propsValueToArray(newValue);
|
|
4846
|
+
if (this.searchCallback) {
|
|
4847
|
+
this.setOptions(this.fullOptions).catch();
|
|
4848
|
+
}
|
|
4849
|
+
else {
|
|
4850
|
+
this.list = filterAutocompleteOptions(this.fullOptions, this.value, this.nameKey, this.maxOptions);
|
|
4851
|
+
}
|
|
4813
4852
|
}
|
|
4814
4853
|
onArrowUp() {
|
|
4815
4854
|
if (this.arrowCounter > 0) {
|
|
@@ -4833,13 +4872,13 @@ class GovFormAutocomplete {
|
|
|
4833
4872
|
}
|
|
4834
4873
|
}
|
|
4835
4874
|
doSearch() {
|
|
4836
|
-
if (Number.isInteger(this.minlength) && this.isValueAccepted === false && this.minlength) {
|
|
4837
|
-
this.list = [];
|
|
4838
|
-
this.arrowCounter = -1;
|
|
4839
|
-
this.processing = false;
|
|
4840
|
-
return;
|
|
4841
|
-
}
|
|
4842
4875
|
if (this.searchCallback) {
|
|
4876
|
+
if (Number.isInteger(this.minlength) && this.isValueAccepted === false && this.minlength) {
|
|
4877
|
+
this.list = [];
|
|
4878
|
+
this.arrowCounter = -1;
|
|
4879
|
+
this.processing = false;
|
|
4880
|
+
return;
|
|
4881
|
+
}
|
|
4843
4882
|
this.processing = true;
|
|
4844
4883
|
this.searchCallback(this.value)
|
|
4845
4884
|
.then(response => (this.list = response))
|
|
@@ -4848,11 +4887,13 @@ class GovFormAutocomplete {
|
|
|
4848
4887
|
this.arrowCounter = -1;
|
|
4849
4888
|
this.processing = false;
|
|
4850
4889
|
});
|
|
4890
|
+
return;
|
|
4851
4891
|
}
|
|
4892
|
+
this.list = filterAutocompleteOptions(this.fullOptions, this.value, this.nameKey, this.maxOptions);
|
|
4893
|
+
this.arrowCounter = -1;
|
|
4852
4894
|
}
|
|
4853
4895
|
clearList() {
|
|
4854
|
-
|
|
4855
|
-
if (areOptions.length === 0) {
|
|
4896
|
+
if (this.fullOptions.length === 0) {
|
|
4856
4897
|
this.list = [];
|
|
4857
4898
|
}
|
|
4858
4899
|
}
|
|
@@ -4873,6 +4914,14 @@ class GovFormAutocomplete {
|
|
|
4873
4914
|
componentWillLoad() {
|
|
4874
4915
|
this.validateSize(this.size);
|
|
4875
4916
|
this.inheritedAttributes = inheritAriaAttributes(this.host);
|
|
4917
|
+
this.debouncedSearch = throttle(this.emitAndSearch, this.throttleTime);
|
|
4918
|
+
this.fullOptions = propsValueToArray(this.options);
|
|
4919
|
+
if (!this.searchCallback) {
|
|
4920
|
+
this.list = filterAutocompleteOptions(this.fullOptions, this.value, this.nameKey, this.maxOptions);
|
|
4921
|
+
}
|
|
4922
|
+
}
|
|
4923
|
+
watchThrottleTime() {
|
|
4924
|
+
this.debouncedSearch = throttle(this.emitAndSearch, this.throttleTime);
|
|
4876
4925
|
}
|
|
4877
4926
|
disconnectedCallback() {
|
|
4878
4927
|
var _a;
|
|
@@ -4883,7 +4932,7 @@ class GovFormAutocomplete {
|
|
|
4883
4932
|
this.inheritedAttributes = Object.assign(Object.assign({}, this.inheritedAttributes), { [attributeName]: newValue });
|
|
4884
4933
|
}
|
|
4885
4934
|
render() {
|
|
4886
|
-
return (hAsync(Host, { key: '
|
|
4935
|
+
return (hAsync(Host, { key: '0cdbf770359115b24432e9d533b4e17ab2c65e18', class: FormAutocompleteClass.root, size: this.size }, hAsync("gov-form-input", Object.assign({ key: '5724ed153e3f2384725badbafdb0c19e67b69538', placeholder: this.placeholder, name: this.name, disabled: this.disabled, readonly: this.readonly, autocomplete: false, size: this.size, required: this.required, invalid: this.invalid, success: this.success, role: 'searchbox', value: this.value, minlength: this.minlength, maxlength: this.maxlength, "on-gov-input": this.onInputHandler, "on-gov-keyup": this.onKeyUpHandler.bind(this), "on-gov-keydown": this.onKeyDownHandler.bind(this), "on-gov-focus": this.onFocusHandler.bind(this), "on-gov-blur": this.onBlurHandler.bind(this) }, this.inheritedAttributes, { "aria-autocomplete": 'list', "aria-owns": [this.listBoxId, this.inheritedAttributes['aria-owns']].join(' '), "aria-expanded": booleanString(this.list.length && this.focused ? true : false), ref: el => (this.inputRef = el) }), hAsync("slot", { key: 'ab6f37982f3d13adc2473a744b5697ac8bc651f5', name: "validation-icon" }), hAsync("slot", { key: '1961a029eceee169b5be12fa4ba8c2e9072bb9de', name: "icon-end" })), hAsync("ul", { key: '61b9b6929be4816e93e1b5fb778c3861b4f8631b', class: FormAutocompleteClass.list, role: 'listbox', "aria-hidden": toBoolAttr(!this.focused), hidden: !this.focused, id: this.listBoxId, ref: el => (this.listRef = el) }, this.focused && this.list.length === 0 && this.processing === false && (this.isValueAccepted || (!this.searchCallback && this.fullOptions.length > 0)) && this.messageEmpty ? (hAsync("li", { class: FormAutocompleteClass.empty }, this.messageEmpty)) : null, this.focused && this.processing === true && this.isValueAccepted ? (hAsync("li", { class: FormAutocompleteClass.loading }, hAsync("gov-skeleton", { size: "m" }))) : null, this.focused ? this.list.map((item, index) => {
|
|
4887
4936
|
const isSelected = this.arrowCounter === index;
|
|
4888
4937
|
return (hAsync("li", { class: FormAutocompleteClass.item, innerHTML: this.templateResolver(item, isSelected), role: 'option', "aria-posinset": index, tabindex: isSelected ? 0 : -1, "aria-setsize": this.list.length, onTouchStart: (e) => this.onSelectHandler(e, index), onMouseDown: (e) => this.onSelectHandler(e, index), "aria-selected": toBoolAttr(isSelected) }, hAsync("slot", { name: "list-item-left" }), hAsync("slot", { name: "list-item-right" })));
|
|
4889
4938
|
}) : null)));
|
|
@@ -4891,7 +4940,12 @@ class GovFormAutocomplete {
|
|
|
4891
4940
|
onFocusHandler(e) {
|
|
4892
4941
|
this.focused = true;
|
|
4893
4942
|
this.arrowCounter = -1;
|
|
4894
|
-
if (this.
|
|
4943
|
+
if (this.searchCallback) {
|
|
4944
|
+
if (this.isValueAccepted) {
|
|
4945
|
+
this.doSearch();
|
|
4946
|
+
}
|
|
4947
|
+
}
|
|
4948
|
+
else {
|
|
4895
4949
|
this.doSearch();
|
|
4896
4950
|
}
|
|
4897
4951
|
e.stopPropagation();
|
|
@@ -4914,17 +4968,6 @@ class GovFormAutocomplete {
|
|
|
4914
4968
|
selected: null,
|
|
4915
4969
|
});
|
|
4916
4970
|
}
|
|
4917
|
-
onInputHandler(e) {
|
|
4918
|
-
this.value = e.target.value;
|
|
4919
|
-
e.stopPropagation();
|
|
4920
|
-
this.govInput.emit({
|
|
4921
|
-
originalEvent: e,
|
|
4922
|
-
component: FormAutocompleteClass.root,
|
|
4923
|
-
value: this.value,
|
|
4924
|
-
selected: null,
|
|
4925
|
-
});
|
|
4926
|
-
this.doSearch();
|
|
4927
|
-
}
|
|
4928
4971
|
onSelectHandler(e, index = -1) {
|
|
4929
4972
|
let selected = null;
|
|
4930
4973
|
if (index > -1) {
|
|
@@ -5018,7 +5061,8 @@ class GovFormAutocomplete {
|
|
|
5018
5061
|
get host() { return getElement(this); }
|
|
5019
5062
|
static get watchers() { return {
|
|
5020
5063
|
"size": ["validateSize"],
|
|
5021
|
-
"options": ["watchOptions"]
|
|
5064
|
+
"options": ["watchOptions"],
|
|
5065
|
+
"throttleTime": ["watchThrottleTime"]
|
|
5022
5066
|
}; }
|
|
5023
5067
|
static get cmpMeta() { return {
|
|
5024
5068
|
"$flags$": 4,
|
|
@@ -5038,6 +5082,7 @@ class GovFormAutocomplete {
|
|
|
5038
5082
|
"invalid": [4],
|
|
5039
5083
|
"minlength": [2],
|
|
5040
5084
|
"maxlength": [2],
|
|
5085
|
+
"maxOptions": [2, "max-options"],
|
|
5041
5086
|
"throttleTime": [2, "throttle-time"],
|
|
5042
5087
|
"messageEmpty": [1, "message-empty"],
|
|
5043
5088
|
"focused": [32],
|
|
@@ -5688,7 +5733,10 @@ class GovFormFile {
|
|
|
5688
5733
|
}
|
|
5689
5734
|
validateFiles(files) {
|
|
5690
5735
|
let filesBuffer = [];
|
|
5691
|
-
|
|
5736
|
+
if (!this.multiple && this.displayAttachments) {
|
|
5737
|
+
this.files = [];
|
|
5738
|
+
}
|
|
5739
|
+
Array.from(files).forEach(file => {
|
|
5692
5740
|
const isFile = this.files.find(item => item.file.name === file.name && item.file.size === file.size) || null;
|
|
5693
5741
|
if (isFile === null || this.ignoreFileDuplicationCheck) {
|
|
5694
5742
|
const isSizeValid = typeof this.maxFileSize === "number" && this.maxFileSize > 0 ? fileSizeValidation(file, this.maxFileSize) : true;
|
|
@@ -5711,6 +5759,9 @@ class GovFormFile {
|
|
|
5711
5759
|
});
|
|
5712
5760
|
}
|
|
5713
5761
|
});
|
|
5762
|
+
if (this.displayAttachments) {
|
|
5763
|
+
this.syncNativeInputFiles();
|
|
5764
|
+
}
|
|
5714
5765
|
this.govFiles.emit({
|
|
5715
5766
|
component: FormFileClass.root,
|
|
5716
5767
|
files: filesBuffer.length ? filesBuffer : this.files,
|
|
@@ -5719,6 +5770,25 @@ class GovFormFile {
|
|
|
5719
5770
|
this.reset().finally();
|
|
5720
5771
|
}
|
|
5721
5772
|
}
|
|
5773
|
+
// Keep native <input type="file"> in sync with the visible attachments list so
|
|
5774
|
+
// that a native form submit / FormData carries exactly the files shown in the UI.
|
|
5775
|
+
// Invalid items (wrong type or oversize) are intentionally excluded.
|
|
5776
|
+
syncNativeInputFiles() {
|
|
5777
|
+
if (!this.inputRef || typeof DataTransfer === "undefined") {
|
|
5778
|
+
return;
|
|
5779
|
+
}
|
|
5780
|
+
try {
|
|
5781
|
+
const dt = new DataTransfer();
|
|
5782
|
+
this.files
|
|
5783
|
+
.filter(item => item.acceptValid === true && item.sizeValid === true)
|
|
5784
|
+
.forEach(item => dt.items.add(item.file));
|
|
5785
|
+
this.inputRef.files = dt.files;
|
|
5786
|
+
}
|
|
5787
|
+
catch (e) {
|
|
5788
|
+
// Safari < 14.1 / older browsers may reject assigning to .files; nothing safe to fall back to.
|
|
5789
|
+
if (typeof process !== "undefined" && process.env && "production" !== "production") ;
|
|
5790
|
+
}
|
|
5791
|
+
}
|
|
5722
5792
|
componentDidLoad() {
|
|
5723
5793
|
this.attributeObserver = new AttributeObserver(this.host, (attributeName, newValue) => {
|
|
5724
5794
|
this.onAriaAttributeChange(attributeName, newValue);
|
|
@@ -5742,7 +5812,7 @@ class GovFormFile {
|
|
|
5742
5812
|
this.inheritedAttributes = Object.assign(Object.assign({}, this.inheritedAttributes), { [attributeName]: newValue });
|
|
5743
5813
|
}
|
|
5744
5814
|
render() {
|
|
5745
|
-
return (hAsync(Host, { key: '
|
|
5815
|
+
return (hAsync(Host, { key: '6709aba5a796ccb9cf712dd5f962d5f903050d26', class: this.h.classes([FormFileClass.root]), invalid: toBoolAttrIfDefined(this.invalid), expanded: toBoolAttrIfDefined(this.expanded) }, hAsync("div", { key: '668f6959ca55220ed2543dbbeddeb98f1b6c19ba', class: FormFileClass.area, ref: el => (this.areaRef = el) }, hAsync("slot", { key: '5f12f12d074163b525e2200e23f61e6d0fb34c74' }), hAsync("input", Object.assign({ key: '7cf43884dad3c28be956b9897862ff5a1fa22e75', class: FormFileClass.input, ref: el => (this.inputRef = el), id: this.identifier || this.fileId, type: "file", name: this.name, accept: this.accept, multiple: this.multiple, onChange: this.onChangeHandler.bind(this), onFocus: this.onFocusHandler.bind(this), onBlur: this.onBlurHandler.bind(this), required: this.required, disabled: this.disabled }, this.inheritedAttributes, { "aria-required": toBoolAttrIfDefined(this.required), "aria-invalid": toBoolAttrIfDefined(this.invalid), "aria-disabled": toBoolAttrIfDefined(this.disabled) })), hAsync("div", { key: 'ec717f584bcd4d74416821736fb4bdcea517bc83', class: FormFileClass.inputFocus })), this.h.hasSlot("attachments") ? (hAsync("div", { class: FormFileClass.attachments }, hAsync("slot", { name: "attachments" }))) : null, this.files.length && this.displayAttachments ? (hAsync("div", { class: FormFileClass.attachments }, hAsync("gov-attachments", { label: this.accessibleAttachmentsLabel, "accessible-label": this.accessibleAttachmentsLabel }, this.files.map(item => (hAsync("gov-attachments-item", { "accessible-remove-labelledby": item.id, "on-gov-remove": () => this.onRemoveFileHandler(item) }, item.file.name, hAsync("span", { slot: "name" }, item.file.name), item.acceptValid === false ? (hAsync("gov-form-message", { slot: "message", color: "error" }, hAsync("gov-icon", { slot: "icon", name: "exclamation-triangle-fill", type: "components" }), item.acceptValid === false ? this.errorAccept : null)) : null, item.sizeValid === false ? (hAsync("gov-form-message", { slot: "message", color: "error" }, hAsync("gov-icon", { slot: "icon", name: "exclamation-triangle-fill", type: "components" }), this.errorSize.replace("{FILE_SIZE}", formatBytes(this.maxFileSize)))) : null, hAsync("span", { slot: "info" }, "(", formatBytes(item.file.size), ")"))))))) : null));
|
|
5746
5816
|
}
|
|
5747
5817
|
onRemoveFileHandler(file) {
|
|
5748
5818
|
const index = this.files.findIndex(item => item.id === file.id);
|
|
@@ -5751,6 +5821,7 @@ class GovFormFile {
|
|
|
5751
5821
|
const removeFile = this.files[index];
|
|
5752
5822
|
files.splice(index, 1);
|
|
5753
5823
|
this.files = [...files];
|
|
5824
|
+
this.syncNativeInputFiles();
|
|
5754
5825
|
this.govRemoveFile.emit({
|
|
5755
5826
|
component: FormFileClass.root,
|
|
5756
5827
|
file: removeFile,
|
|
@@ -5795,7 +5866,10 @@ class GovFormFile {
|
|
|
5795
5866
|
*/
|
|
5796
5867
|
async reset() {
|
|
5797
5868
|
this.files = [];
|
|
5798
|
-
this.inputRef
|
|
5869
|
+
if (this.inputRef) {
|
|
5870
|
+
this.inputRef.value = '';
|
|
5871
|
+
this.syncNativeInputFiles();
|
|
5872
|
+
}
|
|
5799
5873
|
}
|
|
5800
5874
|
get host() { return getElement(this); }
|
|
5801
5875
|
static get watchers() { return {
|
|
@@ -6934,19 +7008,19 @@ class GovFormSearch {
|
|
|
6934
7008
|
this.color = 'neutral';
|
|
6935
7009
|
}
|
|
6936
7010
|
render() {
|
|
6937
|
-
return (hAsync(Host, { key: '
|
|
7011
|
+
return (hAsync(Host, { key: 'c901368f70213c3be37b44b472002ce0872209d0', class: FormSearchClass.root, color: this.color, size: this.size }, hAsync("slot", { key: '4ca581f75ccd75f785f94c1f93500c914b129cc8', name: "input" }), hAsync("slot", { key: '10a34b30a9496b0d9a82b0baaf10b66ac5a2679f', name: "button-erase" }), hAsync("slot", { key: '2888491da6babe4e7586abdda1863850ed67f8a9', name: "button" })));
|
|
6938
7012
|
}
|
|
6939
7013
|
get host() { return getElement(this); }
|
|
6940
7014
|
static get cmpMeta() { return {
|
|
6941
7015
|
"$flags$": 4,
|
|
6942
7016
|
"$tagName$": "gov-form-search",
|
|
6943
7017
|
"$members$": {
|
|
6944
|
-
"size": [
|
|
7018
|
+
"size": [513],
|
|
6945
7019
|
"color": [513]
|
|
6946
7020
|
},
|
|
6947
7021
|
"$listeners$": undefined,
|
|
6948
7022
|
"$lazyBundleId$": "-",
|
|
6949
|
-
"$attrsToReflect$": [["color", "color"]]
|
|
7023
|
+
"$attrsToReflect$": [["size", "size"], ["color", "color"]]
|
|
6950
7024
|
}; }
|
|
6951
7025
|
}
|
|
6952
7026
|
|
|
@@ -6986,7 +7060,7 @@ class GovFormSelect {
|
|
|
6986
7060
|
this.passControlAttrs();
|
|
6987
7061
|
}
|
|
6988
7062
|
watchValue() {
|
|
6989
|
-
this.
|
|
7063
|
+
this.syncSelectValue();
|
|
6990
7064
|
}
|
|
6991
7065
|
passControlAttrs() {
|
|
6992
7066
|
this.f.passAttrToControl('size', this.size);
|
|
@@ -7000,6 +7074,7 @@ class GovFormSelect {
|
|
|
7000
7074
|
this.onAriaAttributeChange(attributeName, newValue);
|
|
7001
7075
|
});
|
|
7002
7076
|
this.attributeObserver.startObserving(ariaAttributes);
|
|
7077
|
+
this.syncSelectValue();
|
|
7003
7078
|
}
|
|
7004
7079
|
disconnectedCallback() {
|
|
7005
7080
|
var _a;
|
|
@@ -7007,34 +7082,27 @@ class GovFormSelect {
|
|
|
7007
7082
|
}
|
|
7008
7083
|
componentWillLoad() {
|
|
7009
7084
|
this.validateSize(this.size);
|
|
7010
|
-
this.markSelectedValue();
|
|
7011
7085
|
this.optionsState = propsValueToArray(this.options);
|
|
7012
7086
|
this.inheritedAttributes = inheritAriaAttributes(this.host);
|
|
7013
7087
|
}
|
|
7014
7088
|
async componentDidRender() {
|
|
7015
7089
|
this.passControlAttrs();
|
|
7016
7090
|
this.f.passAttrToLabel('required', String(this.required));
|
|
7017
|
-
tick(() => this.markSelectedValue());
|
|
7018
7091
|
}
|
|
7019
7092
|
onAriaAttributeChange(attributeName, newValue) {
|
|
7020
7093
|
this.host.removeAttribute(attributeName);
|
|
7021
7094
|
this.inheritedAttributes = Object.assign(Object.assign({}, this.inheritedAttributes), { [attributeName]: newValue });
|
|
7022
7095
|
}
|
|
7023
|
-
|
|
7024
|
-
this.
|
|
7025
|
-
|
|
7026
|
-
|
|
7027
|
-
}
|
|
7028
|
-
else {
|
|
7029
|
-
option.removeAttribute('selected');
|
|
7030
|
-
}
|
|
7031
|
-
});
|
|
7096
|
+
syncSelectValue() {
|
|
7097
|
+
if (this.selectRef && this.value !== undefined && this.selectRef.value !== this.value) {
|
|
7098
|
+
this.selectRef.value = this.value;
|
|
7099
|
+
}
|
|
7032
7100
|
}
|
|
7033
7101
|
render() {
|
|
7034
|
-
return (hAsync(Host, { key: '
|
|
7102
|
+
return (hAsync(Host, { key: 'd29638f5868731a2324971d197dcd636364a4f6c', class: FormSelectClass.root, size: this.size }, this.h.hasSlot('prefix') && hAsync("slot", { key: '41cc14ee33022a4cf6d10c3d86c8915551221e94', name: "prefix" }), hAsync("span", { key: 'f9c167589fa81f0a060a13d9a31d16ab642d5ad2', class: "element" }, hAsync("select", Object.assign({ key: '2dd5c948ccc7b65674e7d7f730cb2c9567287668', id: this.identifier || this.selectId, onFocus: this.onFocusHandler.bind(this), onChange: this.onChangeHandler.bind(this), onBlur: this.onBlurHandler.bind(this), required: this.required, name: this.name, disabled: this.disabled, ref: el => (this.selectRef = el) }, this.inheritedAttributes, { "aria-disabled": toBoolAttrIfDefined(this.disabled), "aria-required": toBoolAttrIfDefined(this.required), "aria-invalid": toBoolAttrIfDefined(this.invalid) }), hAsync("slot", { key: 'f6f0b21c9e43e1216446bce09c57a757a40d7b7b' }), Array.isArray(this.optionsState) && this.optionsState.map((option) => {
|
|
7035
7103
|
var _a;
|
|
7036
7104
|
return (hAsync("option", { value: option.value, selected: option.value === this.value, disabled: option === null || option === void 0 ? void 0 : option.disabled }, (_a = option.label) !== null && _a !== void 0 ? _a : option.value));
|
|
7037
|
-
})), this.success && hAsync("gov-icon", { key: '
|
|
7105
|
+
})), this.success && hAsync("gov-icon", { key: 'd94a0191bc7d02d55450dfad627457101226ad22', class: "validation-icon", name: "check-lg", type: "components" }), this.invalid && hAsync("gov-icon", { key: '84ecf7197313c8a145efa54730d22068679df3f5', class: "validation-icon", name: "exclamation-lg", type: "components" }), hAsync("gov-icon", { key: '1a219d4d230466ac15e316eee16d4a55db1889fe', class: "arrow-icon", name: "chevron-down", type: "components" })), this.h.hasSlot('sufix') && hAsync("slot", { key: 'c7f4816548e3494de94f7ff0dd33f6c904acc14b', name: "sufix" })));
|
|
7038
7106
|
}
|
|
7039
7107
|
onFocusHandler(e) {
|
|
7040
7108
|
this.focused = true;
|
|
@@ -7343,7 +7411,7 @@ var Types;
|
|
|
7343
7411
|
const IconClass = {
|
|
7344
7412
|
root: 'gov-icon'};
|
|
7345
7413
|
|
|
7346
|
-
const version = "4.6.
|
|
7414
|
+
const version = "4.6.4";
|
|
7347
7415
|
|
|
7348
7416
|
const dsVersion = () => {
|
|
7349
7417
|
return version;
|
|
@@ -9175,6 +9243,12 @@ class GovTooltip {
|
|
|
9175
9243
|
*/
|
|
9176
9244
|
this.icon = undefined;
|
|
9177
9245
|
this.persist = false;
|
|
9246
|
+
this.repositionListenersAttached = false;
|
|
9247
|
+
this.reposition = () => {
|
|
9248
|
+
if (this.tooltipContent) {
|
|
9249
|
+
this.verifyPositionSpace();
|
|
9250
|
+
}
|
|
9251
|
+
};
|
|
9178
9252
|
this.h = govHost(this.host);
|
|
9179
9253
|
this.tooltipId = createID("GovTooltip");
|
|
9180
9254
|
this.tooltipContentId = createID("GovContentTooltip");
|
|
@@ -9204,16 +9278,18 @@ class GovTooltip {
|
|
|
9204
9278
|
this.createContentWrapper();
|
|
9205
9279
|
}
|
|
9206
9280
|
disconnectedCallback() {
|
|
9281
|
+
var _a;
|
|
9282
|
+
(_a = this.resizeObserver) === null || _a === void 0 ? void 0 : _a.disconnect();
|
|
9283
|
+
this.resizeObserver = undefined;
|
|
9284
|
+
window.removeEventListener("resize", this.reposition);
|
|
9285
|
+
this.repositionListenersAttached = false;
|
|
9207
9286
|
this.removeContent();
|
|
9208
9287
|
}
|
|
9209
9288
|
createContentWrapper() {
|
|
9210
9289
|
var _a;
|
|
9211
9290
|
if (this.tooltipContent) {
|
|
9212
|
-
if (this.message) {
|
|
9213
|
-
this.tooltipContent.
|
|
9214
|
-
}
|
|
9215
|
-
else if (this.insideContent) {
|
|
9216
|
-
this.tooltipContent.innerHTML = this.insideContent.innerHTML;
|
|
9291
|
+
if (this.message != null) {
|
|
9292
|
+
this.tooltipContent.setAttribute("message", this.message);
|
|
9217
9293
|
}
|
|
9218
9294
|
return;
|
|
9219
9295
|
}
|
|
@@ -9223,7 +9299,9 @@ class GovTooltip {
|
|
|
9223
9299
|
}
|
|
9224
9300
|
else {
|
|
9225
9301
|
content = documentNode().createElement(TooltipContentClass.root);
|
|
9226
|
-
|
|
9302
|
+
if (this.message != null) {
|
|
9303
|
+
content.setAttribute("message", this.message);
|
|
9304
|
+
}
|
|
9227
9305
|
}
|
|
9228
9306
|
content.setAttribute("id", (_a = this.identifier) !== null && _a !== void 0 ? _a : this.tooltipContentId);
|
|
9229
9307
|
content.setAttribute("parent-id", this.tooltipId);
|
|
@@ -9338,14 +9416,27 @@ class GovTooltip {
|
|
|
9338
9416
|
tick(() => {
|
|
9339
9417
|
this.verifyPositionSpace();
|
|
9340
9418
|
});
|
|
9419
|
+
if (!this.repositionListenersAttached) {
|
|
9420
|
+
this.repositionListenersAttached = true;
|
|
9421
|
+
if (typeof ResizeObserver !== "undefined") {
|
|
9422
|
+
this.resizeObserver = new ResizeObserver(this.reposition);
|
|
9423
|
+
this.resizeObserver.observe(this.tooltipContent);
|
|
9424
|
+
}
|
|
9425
|
+
window.addEventListener("resize", this.reposition);
|
|
9426
|
+
}
|
|
9341
9427
|
}
|
|
9342
9428
|
}
|
|
9343
9429
|
hideTooltip() {
|
|
9430
|
+
var _a;
|
|
9344
9431
|
if (this.tooltipContent) {
|
|
9345
9432
|
this.tooltipContent.setAttribute("is-visible", "false");
|
|
9346
9433
|
this.tooltipContent.setAttribute("persist", "false");
|
|
9347
9434
|
this.tooltipContent.removeAttribute('style');
|
|
9348
9435
|
}
|
|
9436
|
+
(_a = this.resizeObserver) === null || _a === void 0 ? void 0 : _a.disconnect();
|
|
9437
|
+
this.resizeObserver = undefined;
|
|
9438
|
+
window.removeEventListener("resize", this.reposition);
|
|
9439
|
+
this.repositionListenersAttached = false;
|
|
9349
9440
|
}
|
|
9350
9441
|
removeContent() {
|
|
9351
9442
|
const contentEl = document.getElementById(this.tooltipContentId);
|
|
@@ -9355,11 +9446,11 @@ class GovTooltip {
|
|
|
9355
9446
|
}
|
|
9356
9447
|
render() {
|
|
9357
9448
|
var _a;
|
|
9358
|
-
return (hAsync(Host, { key: '
|
|
9449
|
+
return (hAsync(Host, { key: '20ebe5eea59967e8681fd0e35fc7aff53b5915dd', id: this.tooltipId, class: this.h.classes(TooltipClass.root), position: this.position }, hAsync("span", { key: '847b78886907d683425013227eb78bbf9261b709', role: 'button', tabindex: 0, onKeyPress: () => this.showTooltip(), onBlur: () => {
|
|
9359
9450
|
if (this.persist === false) {
|
|
9360
9451
|
this.hideTooltip();
|
|
9361
9452
|
}
|
|
9362
|
-
}, "aria-describedby": (_a = this.identifier) !== null && _a !== void 0 ? _a : this.tooltipContentId }, hAsync("slot", { key: '
|
|
9453
|
+
}, "aria-describedby": (_a = this.identifier) !== null && _a !== void 0 ? _a : this.tooltipContentId }, hAsync("slot", { key: '84c4c02ee11e05166fca208b82ef54298dcaa6ee' }))));
|
|
9363
9454
|
}
|
|
9364
9455
|
/**
|
|
9365
9456
|
* Showing the modal
|
|
@@ -9445,7 +9536,9 @@ class GovTooltipContent {
|
|
|
9445
9536
|
}
|
|
9446
9537
|
}
|
|
9447
9538
|
render() {
|
|
9448
|
-
return (hAsync(Host, { key: '
|
|
9539
|
+
return (hAsync(Host, { key: '121b5cd3878956618a7a917511e6d8d76edf6672', class: TooltipContentClass.root, role: "tooltip", hidden: !this.isVisible, "aria-hidden": !toBoolAttr(this.isVisible), "is-visible": this.isVisible }, this.message
|
|
9540
|
+
? hAsync("span", { class: "gov-tooltip-content__message", innerHTML: this.message })
|
|
9541
|
+
: hAsync("slot", null), this.persist ? (hAsync("gov-button", { "on-gov-click": this.hideContent.bind(this), color: this.color, size: this.size, type: "base" }, hAsync("gov-icon", { slot: "icon-start", name: "x-lg", type: "components" }))) : null));
|
|
9449
9542
|
}
|
|
9450
9543
|
get host() { return getElement(this); }
|
|
9451
9544
|
static get watchers() { return {
|
|
@@ -9459,7 +9552,8 @@ class GovTooltipContent {
|
|
|
9459
9552
|
"size": [1],
|
|
9460
9553
|
"persist": [4],
|
|
9461
9554
|
"isVisible": [1028, "is-visible"],
|
|
9462
|
-
"parentId": [1, "parent-id"]
|
|
9555
|
+
"parentId": [1, "parent-id"],
|
|
9556
|
+
"message": [1025]
|
|
9463
9557
|
},
|
|
9464
9558
|
"$listeners$": undefined,
|
|
9465
9559
|
"$lazyBundleId$": "-",
|
|
@@ -9520,7 +9614,7 @@ class GovWizard {
|
|
|
9520
9614
|
this.hydrated = true;
|
|
9521
9615
|
}
|
|
9522
9616
|
render() {
|
|
9523
|
-
return (hAsync(Host, { key: '
|
|
9617
|
+
return (hAsync(Host, { key: 'd1957fc0c0058c107769e3cc5390ef986fc9b921', class: this.h.classes(WizardClass.root), role: "list", size: this.size, hydrated: this.hydrated }, hAsync("slot", { key: 'a34323c408d790c5945ca0d80db62de2433db438' })));
|
|
9524
9618
|
}
|
|
9525
9619
|
/**
|
|
9526
9620
|
* Validate the WCAG attributes of the component
|
|
@@ -9596,8 +9690,8 @@ class GovWizardItem {
|
|
|
9596
9690
|
render() {
|
|
9597
9691
|
const triggerId = this.identifier || this.triggerId;
|
|
9598
9692
|
const Tag = this.collapsible ? Tags.BUTTON : Tags.DIV;
|
|
9599
|
-
const prefixSlot = this.h.hasSlot("prefix") && (hAsync("span", { key: '
|
|
9600
|
-
return (hAsync(Host, { key: '
|
|
9693
|
+
const prefixSlot = this.h.hasSlot("prefix") && (hAsync("span", { key: '3f00516020337fc142713c6edb468d0007eba3c5', class: WizardItemClass.prefix }, hAsync("slot", { key: '05aa42bc8241f53bb3664dc3d06798cb0344f92f', name: "prefix" })));
|
|
9694
|
+
return (hAsync(Host, { key: '863700f5087e86d1f8d4e22b40108dfbc0cb96f5', class: this.h.classes(WizardItemClass.root), "is-expanded": this.isExpanded, color: this.color, size: this.size, role: "listitem", collapsible: this.collapsible, hydrated: this.hydrated }, hAsync("div", { key: '6d93a5bb12dbe2fc2e308059ffd5d63ed915f16d', class: WizardItemClass.header }, prefixSlot, this.collapsible ? (hAsync(Tag, { id: triggerId, class: this.h.classes(WizardItemClass.label), "aria-expanded": booleanString(this.isExpanded), "aria-controls": this.contentId, disabled: this.disabled, "aria-disabled": toBoolAttrIfDefined(this.disabled), onClick: (e) => {
|
|
9601
9695
|
e.preventDefault();
|
|
9602
9696
|
e.stopPropagation();
|
|
9603
9697
|
this.toggle();
|
|
@@ -7,8 +7,10 @@ export declare class GovFormAutocomplete {
|
|
|
7
7
|
private listRef?;
|
|
8
8
|
private readonly listBoxId;
|
|
9
9
|
private searchCallback;
|
|
10
|
+
private fullOptions;
|
|
10
11
|
private templateResolver;
|
|
11
12
|
private attributeObserver;
|
|
13
|
+
private debouncedSearch;
|
|
12
14
|
constructor();
|
|
13
15
|
host: HTMLGovFormInputElement;
|
|
14
16
|
/**
|
|
@@ -69,6 +71,11 @@ export declare class GovFormAutocomplete {
|
|
|
69
71
|
* Maximum length (number of characters) of value
|
|
70
72
|
*/
|
|
71
73
|
readonly maxlength: number;
|
|
74
|
+
/**
|
|
75
|
+
* Maximum number of items shown from a static `options` list (0 = unlimited).
|
|
76
|
+
* Applies only when no async search callback is set.
|
|
77
|
+
*/
|
|
78
|
+
readonly maxOptions: number;
|
|
72
79
|
/**
|
|
73
80
|
* Input throttle in milliseconds
|
|
74
81
|
*/
|
|
@@ -108,6 +115,8 @@ export declare class GovFormAutocomplete {
|
|
|
108
115
|
get isValueAccepted(): boolean;
|
|
109
116
|
componentDidLoad(): void;
|
|
110
117
|
componentWillLoad(): void;
|
|
118
|
+
watchThrottleTime(): void;
|
|
119
|
+
private emitAndSearch;
|
|
111
120
|
disconnectedCallback(): void;
|
|
112
121
|
onAriaAttributeChange(attributeName: string, newValue: string): void;
|
|
113
122
|
render(): any;
|
|
@@ -104,6 +104,7 @@ export declare class GovFormFile {
|
|
|
104
104
|
preventDefaults(e: any): void;
|
|
105
105
|
handleDrop(e: DragEvent): void;
|
|
106
106
|
private validateFiles;
|
|
107
|
+
private syncNativeInputFiles;
|
|
107
108
|
componentDidLoad(): void;
|
|
108
109
|
componentWillLoad(): void;
|
|
109
110
|
componentDidRender(): Promise<void>;
|
|
@@ -73,7 +73,7 @@ export declare class GovFormSelect {
|
|
|
73
73
|
componentWillLoad(): void;
|
|
74
74
|
componentDidRender(): Promise<void>;
|
|
75
75
|
onAriaAttributeChange(attributeName: string, newValue: string): void;
|
|
76
|
-
private
|
|
76
|
+
private syncSelectValue;
|
|
77
77
|
render(): any;
|
|
78
78
|
private onFocusHandler;
|
|
79
79
|
private onBlurHandler;
|
|
@@ -22,6 +22,10 @@ export declare class GovTooltipContent {
|
|
|
22
22
|
* Indicates display of tooltip content
|
|
23
23
|
*/
|
|
24
24
|
parentId: string;
|
|
25
|
+
/**
|
|
26
|
+
* Tooltip text. When set, renders the HTML message; otherwise the default `<slot/>` is used.
|
|
27
|
+
*/
|
|
28
|
+
message?: string;
|
|
25
29
|
visibleContent(newValue: boolean): void;
|
|
26
30
|
hideContent(): void;
|
|
27
31
|
render(): any;
|
|
@@ -43,6 +43,9 @@ export declare class GovTooltip {
|
|
|
43
43
|
private get insideContent();
|
|
44
44
|
private registerListeners;
|
|
45
45
|
private verifyPositionSpace;
|
|
46
|
+
private resizeObserver?;
|
|
47
|
+
private repositionListenersAttached;
|
|
48
|
+
private readonly reposition;
|
|
46
49
|
private showTooltip;
|
|
47
50
|
private hideTooltip;
|
|
48
51
|
private removeContent;
|