@4site/engrid-scripts 0.19.6 → 0.19.8
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/auto-country-select.js +5 -3
- package/dist/data-attributes.js +8 -0
- package/dist/version.d.ts +1 -1
- package/dist/version.js +1 -1
- package/package.json +2 -2
|
@@ -42,16 +42,18 @@ export class AutoCountrySelect {
|
|
|
42
42
|
type: "region",
|
|
43
43
|
});
|
|
44
44
|
// We are setting the country by Name because the ISO code is not always the same. They have 2 and 3 letter codes.
|
|
45
|
-
this.setCountryByName(countriesNames.of(this.country));
|
|
45
|
+
this.setCountryByName(countriesNames.of(this.country), this.country);
|
|
46
46
|
}
|
|
47
47
|
}
|
|
48
48
|
}
|
|
49
|
-
setCountryByName(countryName) {
|
|
49
|
+
setCountryByName(countryName, countryCode) {
|
|
50
50
|
if (this.countrySelect) {
|
|
51
51
|
let countrySelectOptions = this.countrySelect.options;
|
|
52
52
|
for (let i = 0; i < countrySelectOptions.length; i++) {
|
|
53
53
|
if (countrySelectOptions[i].innerHTML.toLowerCase() ==
|
|
54
|
-
countryName.toLowerCase()
|
|
54
|
+
countryName.toLowerCase() ||
|
|
55
|
+
countrySelectOptions[i].value.toLowerCase() ==
|
|
56
|
+
countryCode.toLowerCase()) {
|
|
55
57
|
this.countrySelect.selectedIndex = i;
|
|
56
58
|
break;
|
|
57
59
|
}
|
package/dist/data-attributes.js
CHANGED
|
@@ -125,5 +125,13 @@ export class DataAttributes {
|
|
|
125
125
|
if (ENGrid.getPageNumber() === ENGrid.getPageCount()) {
|
|
126
126
|
ENGrid.setBodyData("last-page", "");
|
|
127
127
|
}
|
|
128
|
+
// "Temporary solutions are forever, you know..."
|
|
129
|
+
// - Fernando Santos
|
|
130
|
+
// "I know, but what if we just..."
|
|
131
|
+
// - Bryan Casler
|
|
132
|
+
// Add data attribute if browser does not support :has selector
|
|
133
|
+
if (!CSS.supports("selector(:has(*))")) {
|
|
134
|
+
ENGrid.setBodyData("css-has-selector", "false");
|
|
135
|
+
}
|
|
128
136
|
}
|
|
129
137
|
}
|
package/dist/version.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const AppVersion = "0.19.
|
|
1
|
+
export declare const AppVersion = "0.19.8";
|
package/dist/version.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export const AppVersion = "0.19.
|
|
1
|
+
export const AppVersion = "0.19.8";
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@4site/engrid-scripts",
|
|
3
|
-
"version": "0.19.
|
|
3
|
+
"version": "0.19.8",
|
|
4
4
|
"description": "Scripts for the ENGRID Project",
|
|
5
5
|
"main": "./dist/index.js",
|
|
6
6
|
"types": "./dist/index.d.ts",
|
|
@@ -25,7 +25,7 @@
|
|
|
25
25
|
"strongly-typed-events": "^2.0.9"
|
|
26
26
|
},
|
|
27
27
|
"homepage": "https://github.com/4site-interactive-studios/engrid#readme",
|
|
28
|
-
"gitHead": "
|
|
28
|
+
"gitHead": "f2a4f7b2cda82afc01b97eff1846f868c33bb1a5",
|
|
29
29
|
"devDependencies": {
|
|
30
30
|
"nodemon": "^2.0.20"
|
|
31
31
|
}
|