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