@optionfactory/ful 6.0.6 → 6.0.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/ful.iife.js +20 -11
- package/dist/ful.iife.js.map +1 -1
- package/dist/ful.iife.min.js +1 -1
- package/dist/ful.iife.min.js.map +1 -1
- package/dist/ful.min.mjs +1 -1
- package/dist/ful.min.mjs.map +1 -1
- package/dist/ful.mjs +20 -11
- package/dist/ful.mjs.map +1 -1
- package/package.json +1 -1
package/dist/ful.iife.js
CHANGED
|
@@ -1774,7 +1774,7 @@ var ful = (function (exports, ftl) {
|
|
|
1774
1774
|
<ful-item data-tpl-each="files" data-tpl-var="file" data-tpl-data-name="file.name">
|
|
1775
1775
|
<div>{{ file.name }}</div>
|
|
1776
1776
|
<div>{{ #bytes:format(file.size) }}</div>
|
|
1777
|
-
<button type="button" class="btn btn-sm btn-outline-danger bi bi-x-lg"></button>
|
|
1777
|
+
<button type="button" class="btn btn-sm btn-outline-danger bi bi-x-lg" alt="Rimuovi"></button>
|
|
1778
1778
|
</ful-item>
|
|
1779
1779
|
`,
|
|
1780
1780
|
warning: `<ful-field-warning>{{ #l10n:t(key, args) }}</ful-field-warning>`
|
|
@@ -2023,20 +2023,22 @@ var ful = (function (exports, ftl) {
|
|
|
2023
2023
|
if (this.#data !== null) {
|
|
2024
2024
|
return
|
|
2025
2025
|
}
|
|
2026
|
-
const
|
|
2027
|
-
|
|
2028
|
-
|
|
2026
|
+
const raw = await RemoteLoader.#revisionedData(this.#http, this.#method, this.#url, this.#revision);
|
|
2027
|
+
this.#data = this.#responseMapper(raw);
|
|
2028
|
+
}
|
|
2029
|
+
static async #revisionedData(http, method, url, revision){
|
|
2030
|
+
const storageKey = `${method}@${url}`;
|
|
2031
|
+
if (revision !== null) {
|
|
2032
|
+
const data = VersionedLocalStorage.load(storageKey, revision);
|
|
2029
2033
|
if (data !== undefined) {
|
|
2030
|
-
|
|
2031
|
-
return;
|
|
2034
|
+
return data;
|
|
2032
2035
|
}
|
|
2033
2036
|
}
|
|
2034
|
-
const data = await
|
|
2035
|
-
|
|
2036
|
-
|
|
2037
|
-
if (this.#revision !== null) {
|
|
2038
|
-
VersionedLocalStorage.save(storageKey, this.#revision, this.#data);
|
|
2037
|
+
const data = await http.request(method, url).fetchJson();
|
|
2038
|
+
if (revision !== null) {
|
|
2039
|
+
VersionedLocalStorage.save(storageKey, revision, data);
|
|
2039
2040
|
}
|
|
2041
|
+
return data;
|
|
2040
2042
|
}
|
|
2041
2043
|
}
|
|
2042
2044
|
|
|
@@ -2689,6 +2691,13 @@ var ful = (function (exports, ftl) {
|
|
|
2689
2691
|
return;
|
|
2690
2692
|
}
|
|
2691
2693
|
this.value = !this.value;
|
|
2694
|
+
this.dispatchEvent(new CustomEvent('change', {
|
|
2695
|
+
bubbles: true,
|
|
2696
|
+
cancelable: false,
|
|
2697
|
+
detail: {
|
|
2698
|
+
value: this.value
|
|
2699
|
+
}
|
|
2700
|
+
}));
|
|
2692
2701
|
});
|
|
2693
2702
|
this.#fieldError = fragment.querySelector('ful-field-error');
|
|
2694
2703
|
this.#input.ariaDescribedByElements = [this.#fieldError];
|