@ttoss/forms 0.31.1 → 0.31.3
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/esm/MultistepForm/index.js +21 -211
- package/package.json +9 -9
|
@@ -148,10 +148,10 @@ var MultistepFormStepper = ({
|
|
|
148
148
|
});
|
|
149
149
|
};
|
|
150
150
|
|
|
151
|
-
// ../../node_modules/.pnpm/@iconify-icon+react@2.
|
|
151
|
+
// ../../node_modules/.pnpm/@iconify-icon+react@2.3.0_react@19.1.1/node_modules/@iconify-icon/react/dist/iconify.mjs
|
|
152
152
|
import React from "react";
|
|
153
153
|
|
|
154
|
-
// ../../node_modules/.pnpm/iconify-icon@2.
|
|
154
|
+
// ../../node_modules/.pnpm/iconify-icon@2.3.0/node_modules/iconify-icon/dist/iconify-icon.mjs
|
|
155
155
|
var defaultIconDimensions = Object.freeze({
|
|
156
156
|
left: 0,
|
|
157
157
|
top: 0,
|
|
@@ -1001,181 +1001,6 @@ function sendAPIQuery(target, query, callback) {
|
|
|
1001
1001
|
}
|
|
1002
1002
|
return redundancy.query(query, send2, callback)().abort;
|
|
1003
1003
|
}
|
|
1004
|
-
var browserCacheVersion = "iconify2";
|
|
1005
|
-
var browserCachePrefix = "iconify";
|
|
1006
|
-
var browserCacheCountKey = browserCachePrefix + "-count";
|
|
1007
|
-
var browserCacheVersionKey = browserCachePrefix + "-version";
|
|
1008
|
-
var browserStorageHour = 36e5;
|
|
1009
|
-
var browserStorageCacheExpiration = 168;
|
|
1010
|
-
var browserStorageLimit = 50;
|
|
1011
|
-
function getStoredItem(func, key) {
|
|
1012
|
-
try {
|
|
1013
|
-
return func.getItem(key);
|
|
1014
|
-
} catch (err) {}
|
|
1015
|
-
}
|
|
1016
|
-
function setStoredItem(func, key, value) {
|
|
1017
|
-
try {
|
|
1018
|
-
func.setItem(key, value);
|
|
1019
|
-
return true;
|
|
1020
|
-
} catch (err) {}
|
|
1021
|
-
}
|
|
1022
|
-
function removeStoredItem(func, key) {
|
|
1023
|
-
try {
|
|
1024
|
-
func.removeItem(key);
|
|
1025
|
-
} catch (err) {}
|
|
1026
|
-
}
|
|
1027
|
-
function setBrowserStorageItemsCount(storage2, value) {
|
|
1028
|
-
return setStoredItem(storage2, browserCacheCountKey, value.toString());
|
|
1029
|
-
}
|
|
1030
|
-
function getBrowserStorageItemsCount(storage2) {
|
|
1031
|
-
return parseInt(getStoredItem(storage2, browserCacheCountKey)) || 0;
|
|
1032
|
-
}
|
|
1033
|
-
var browserStorageConfig = {
|
|
1034
|
-
local: true,
|
|
1035
|
-
session: true
|
|
1036
|
-
};
|
|
1037
|
-
var browserStorageEmptyItems = {
|
|
1038
|
-
local: /* @__PURE__ */new Set(),
|
|
1039
|
-
session: /* @__PURE__ */new Set()
|
|
1040
|
-
};
|
|
1041
|
-
var browserStorageStatus = false;
|
|
1042
|
-
function setBrowserStorageStatus(status) {
|
|
1043
|
-
browserStorageStatus = status;
|
|
1044
|
-
}
|
|
1045
|
-
var _window = typeof window === "undefined" ? {} : window;
|
|
1046
|
-
function getBrowserStorage(key) {
|
|
1047
|
-
const attr = key + "Storage";
|
|
1048
|
-
try {
|
|
1049
|
-
if (_window && _window[attr] && typeof _window[attr].length === "number") {
|
|
1050
|
-
return _window[attr];
|
|
1051
|
-
}
|
|
1052
|
-
} catch (err) {}
|
|
1053
|
-
browserStorageConfig[key] = false;
|
|
1054
|
-
}
|
|
1055
|
-
function iterateBrowserStorage(key, callback) {
|
|
1056
|
-
const func = getBrowserStorage(key);
|
|
1057
|
-
if (!func) {
|
|
1058
|
-
return;
|
|
1059
|
-
}
|
|
1060
|
-
const version = getStoredItem(func, browserCacheVersionKey);
|
|
1061
|
-
if (version !== browserCacheVersion) {
|
|
1062
|
-
if (version) {
|
|
1063
|
-
const total2 = getBrowserStorageItemsCount(func);
|
|
1064
|
-
for (let i = 0; i < total2; i++) {
|
|
1065
|
-
removeStoredItem(func, browserCachePrefix + i.toString());
|
|
1066
|
-
}
|
|
1067
|
-
}
|
|
1068
|
-
setStoredItem(func, browserCacheVersionKey, browserCacheVersion);
|
|
1069
|
-
setBrowserStorageItemsCount(func, 0);
|
|
1070
|
-
return;
|
|
1071
|
-
}
|
|
1072
|
-
const minTime = Math.floor(Date.now() / browserStorageHour) - browserStorageCacheExpiration;
|
|
1073
|
-
const parseItem = index => {
|
|
1074
|
-
const name = browserCachePrefix + index.toString();
|
|
1075
|
-
const item = getStoredItem(func, name);
|
|
1076
|
-
if (typeof item !== "string") {
|
|
1077
|
-
return;
|
|
1078
|
-
}
|
|
1079
|
-
try {
|
|
1080
|
-
const data = JSON.parse(item);
|
|
1081
|
-
if (typeof data === "object" && typeof data.cached === "number" && data.cached > minTime && typeof data.provider === "string" && typeof data.data === "object" && typeof data.data.prefix === "string" &&
|
|
1082
|
-
// Valid item: run callback
|
|
1083
|
-
callback(data, index)) {
|
|
1084
|
-
return true;
|
|
1085
|
-
}
|
|
1086
|
-
} catch (err) {}
|
|
1087
|
-
removeStoredItem(func, name);
|
|
1088
|
-
};
|
|
1089
|
-
let total = getBrowserStorageItemsCount(func);
|
|
1090
|
-
for (let i = total - 1; i >= 0; i--) {
|
|
1091
|
-
if (!parseItem(i)) {
|
|
1092
|
-
if (i === total - 1) {
|
|
1093
|
-
total--;
|
|
1094
|
-
setBrowserStorageItemsCount(func, total);
|
|
1095
|
-
} else {
|
|
1096
|
-
browserStorageEmptyItems[key].add(i);
|
|
1097
|
-
}
|
|
1098
|
-
}
|
|
1099
|
-
}
|
|
1100
|
-
}
|
|
1101
|
-
function initBrowserStorage() {
|
|
1102
|
-
if (browserStorageStatus) {
|
|
1103
|
-
return;
|
|
1104
|
-
}
|
|
1105
|
-
setBrowserStorageStatus(true);
|
|
1106
|
-
for (const key in browserStorageConfig) {
|
|
1107
|
-
iterateBrowserStorage(key, item => {
|
|
1108
|
-
const iconSet = item.data;
|
|
1109
|
-
const provider = item.provider;
|
|
1110
|
-
const prefix = iconSet.prefix;
|
|
1111
|
-
const storage2 = getStorage(provider, prefix);
|
|
1112
|
-
if (!addIconSet(storage2, iconSet).length) {
|
|
1113
|
-
return false;
|
|
1114
|
-
}
|
|
1115
|
-
const lastModified = iconSet.lastModified || -1;
|
|
1116
|
-
storage2.lastModifiedCached = storage2.lastModifiedCached ? Math.min(storage2.lastModifiedCached, lastModified) : lastModified;
|
|
1117
|
-
return true;
|
|
1118
|
-
});
|
|
1119
|
-
}
|
|
1120
|
-
}
|
|
1121
|
-
function updateLastModified(storage2, lastModified) {
|
|
1122
|
-
const lastValue = storage2.lastModifiedCached;
|
|
1123
|
-
if (
|
|
1124
|
-
// Matches or newer
|
|
1125
|
-
lastValue && lastValue >= lastModified) {
|
|
1126
|
-
return lastValue === lastModified;
|
|
1127
|
-
}
|
|
1128
|
-
storage2.lastModifiedCached = lastModified;
|
|
1129
|
-
if (lastValue) {
|
|
1130
|
-
for (const key in browserStorageConfig) {
|
|
1131
|
-
iterateBrowserStorage(key, item => {
|
|
1132
|
-
const iconSet = item.data;
|
|
1133
|
-
return item.provider !== storage2.provider || iconSet.prefix !== storage2.prefix || iconSet.lastModified === lastModified;
|
|
1134
|
-
});
|
|
1135
|
-
}
|
|
1136
|
-
}
|
|
1137
|
-
return true;
|
|
1138
|
-
}
|
|
1139
|
-
function storeInBrowserStorage(storage2, data) {
|
|
1140
|
-
if (!browserStorageStatus) {
|
|
1141
|
-
initBrowserStorage();
|
|
1142
|
-
}
|
|
1143
|
-
function store(key) {
|
|
1144
|
-
let func;
|
|
1145
|
-
if (!browserStorageConfig[key] || !(func = getBrowserStorage(key))) {
|
|
1146
|
-
return;
|
|
1147
|
-
}
|
|
1148
|
-
const set = browserStorageEmptyItems[key];
|
|
1149
|
-
let index;
|
|
1150
|
-
if (set.size) {
|
|
1151
|
-
set.delete(index = Array.from(set).shift());
|
|
1152
|
-
} else {
|
|
1153
|
-
index = getBrowserStorageItemsCount(func);
|
|
1154
|
-
if (index >= browserStorageLimit || !setBrowserStorageItemsCount(func, index + 1)) {
|
|
1155
|
-
return;
|
|
1156
|
-
}
|
|
1157
|
-
}
|
|
1158
|
-
const item = {
|
|
1159
|
-
cached: Math.floor(Date.now() / browserStorageHour),
|
|
1160
|
-
provider: storage2.provider,
|
|
1161
|
-
data
|
|
1162
|
-
};
|
|
1163
|
-
return setStoredItem(func, browserCachePrefix + index.toString(), JSON.stringify(item));
|
|
1164
|
-
}
|
|
1165
|
-
if (data.lastModified && !updateLastModified(storage2, data.lastModified)) {
|
|
1166
|
-
return;
|
|
1167
|
-
}
|
|
1168
|
-
if (!Object.keys(data.icons).length) {
|
|
1169
|
-
return;
|
|
1170
|
-
}
|
|
1171
|
-
if (data.not_found) {
|
|
1172
|
-
data = Object.assign({}, data);
|
|
1173
|
-
delete data.not_found;
|
|
1174
|
-
}
|
|
1175
|
-
if (!store("local")) {
|
|
1176
|
-
store("session");
|
|
1177
|
-
}
|
|
1178
|
-
}
|
|
1179
1004
|
function emptyCallback() {}
|
|
1180
1005
|
function loadedNewIcons(storage2) {
|
|
1181
1006
|
if (!storage2.iconsLoaderFlag) {
|
|
@@ -1197,7 +1022,7 @@ function checkIconNamesForAPI(icons) {
|
|
|
1197
1022
|
invalid
|
|
1198
1023
|
};
|
|
1199
1024
|
}
|
|
1200
|
-
function parseLoaderResponse(storage2, icons, data
|
|
1025
|
+
function parseLoaderResponse(storage2, icons, data) {
|
|
1201
1026
|
function checkMissing() {
|
|
1202
1027
|
const pending = storage2.pendingIcons;
|
|
1203
1028
|
icons.forEach(name => {
|
|
@@ -1216,9 +1041,6 @@ function parseLoaderResponse(storage2, icons, data, isAPIResponse) {
|
|
|
1216
1041
|
checkMissing();
|
|
1217
1042
|
return;
|
|
1218
1043
|
}
|
|
1219
|
-
if (isAPIResponse) {
|
|
1220
|
-
storeInBrowserStorage(storage2, data);
|
|
1221
|
-
}
|
|
1222
1044
|
} catch (err) {
|
|
1223
1045
|
console.error(err);
|
|
1224
1046
|
}
|
|
@@ -1259,7 +1081,7 @@ function loadNewIcons(storage2, icons) {
|
|
|
1259
1081
|
const customIconLoader = storage2.loadIcon;
|
|
1260
1082
|
if (storage2.loadIcons && (icons2.length > 1 || !customIconLoader)) {
|
|
1261
1083
|
parsePossiblyAsyncResponse(storage2.loadIcons(icons2, prefix, provider), data => {
|
|
1262
|
-
parseLoaderResponse(storage2, icons2, data
|
|
1084
|
+
parseLoaderResponse(storage2, icons2, data);
|
|
1263
1085
|
});
|
|
1264
1086
|
return;
|
|
1265
1087
|
}
|
|
@@ -1273,7 +1095,7 @@ function loadNewIcons(storage2, icons) {
|
|
|
1273
1095
|
[name]: data
|
|
1274
1096
|
}
|
|
1275
1097
|
} : null;
|
|
1276
|
-
parseLoaderResponse(storage2, [name], iconSet
|
|
1098
|
+
parseLoaderResponse(storage2, [name], iconSet);
|
|
1277
1099
|
});
|
|
1278
1100
|
});
|
|
1279
1101
|
return;
|
|
@@ -1283,20 +1105,20 @@ function loadNewIcons(storage2, icons) {
|
|
|
1283
1105
|
invalid
|
|
1284
1106
|
} = checkIconNamesForAPI(icons2);
|
|
1285
1107
|
if (invalid.length) {
|
|
1286
|
-
parseLoaderResponse(storage2, invalid, null
|
|
1108
|
+
parseLoaderResponse(storage2, invalid, null);
|
|
1287
1109
|
}
|
|
1288
1110
|
if (!valid.length) {
|
|
1289
1111
|
return;
|
|
1290
1112
|
}
|
|
1291
1113
|
const api = prefix.match(matchIconName) ? getAPIModule(provider) : null;
|
|
1292
1114
|
if (!api) {
|
|
1293
|
-
parseLoaderResponse(storage2, valid, null
|
|
1115
|
+
parseLoaderResponse(storage2, valid, null);
|
|
1294
1116
|
return;
|
|
1295
1117
|
}
|
|
1296
1118
|
const params = api.prepare(provider, prefix, valid);
|
|
1297
1119
|
params.forEach(item => {
|
|
1298
1120
|
sendAPIQuery(provider, item, data => {
|
|
1299
|
-
parseLoaderResponse(storage2, item.icons, data
|
|
1121
|
+
parseLoaderResponse(storage2, item.icons, data);
|
|
1300
1122
|
});
|
|
1301
1123
|
});
|
|
1302
1124
|
});
|
|
@@ -1773,19 +1595,6 @@ function setCustomIconsLoader$1(loader, prefix, provider) {
|
|
|
1773
1595
|
function setCustomIconLoader$1(loader, prefix, provider) {
|
|
1774
1596
|
getStorage(provider || "", prefix).loadIcon = loader;
|
|
1775
1597
|
}
|
|
1776
|
-
function toggleBrowserCache(storage2, value) {
|
|
1777
|
-
switch (storage2) {
|
|
1778
|
-
case "local":
|
|
1779
|
-
case "session":
|
|
1780
|
-
browserStorageConfig[storage2] = value;
|
|
1781
|
-
break;
|
|
1782
|
-
case "all":
|
|
1783
|
-
for (const key in browserStorageConfig) {
|
|
1784
|
-
browserStorageConfig[key] = value;
|
|
1785
|
-
}
|
|
1786
|
-
break;
|
|
1787
|
-
}
|
|
1788
|
-
}
|
|
1789
1598
|
var nodeAttr = "data-style";
|
|
1790
1599
|
var customStyle = "";
|
|
1791
1600
|
function appendCustomStyle(style) {
|
|
@@ -1803,14 +1612,13 @@ function updateStyle(parent, inline) {
|
|
|
1803
1612
|
function exportFunctions() {
|
|
1804
1613
|
setAPIModule("", fetchAPIModule);
|
|
1805
1614
|
allowSimpleNames(true);
|
|
1806
|
-
let
|
|
1615
|
+
let _window;
|
|
1807
1616
|
try {
|
|
1808
|
-
|
|
1617
|
+
_window = window;
|
|
1809
1618
|
} catch (err) {}
|
|
1810
|
-
if (
|
|
1811
|
-
|
|
1812
|
-
|
|
1813
|
-
const preload = _window2.IconifyPreload;
|
|
1619
|
+
if (_window) {
|
|
1620
|
+
if (_window.IconifyPreload !== void 0) {
|
|
1621
|
+
const preload = _window.IconifyPreload;
|
|
1814
1622
|
const err = "Invalid IconifyPreload syntax.";
|
|
1815
1623
|
if (typeof preload === "object" && preload !== null) {
|
|
1816
1624
|
(preload instanceof Array ? preload : [preload]).forEach(item => {
|
|
@@ -1830,8 +1638,8 @@ function exportFunctions() {
|
|
|
1830
1638
|
});
|
|
1831
1639
|
}
|
|
1832
1640
|
}
|
|
1833
|
-
if (
|
|
1834
|
-
const providers =
|
|
1641
|
+
if (_window.IconifyProviders !== void 0) {
|
|
1642
|
+
const providers = _window.IconifyProviders;
|
|
1835
1643
|
if (typeof providers === "object" && providers !== null) {
|
|
1836
1644
|
for (const key in providers) {
|
|
1837
1645
|
const err = "IconifyProviders[" + key + "] is invalid.";
|
|
@@ -1859,8 +1667,10 @@ function exportFunctions() {
|
|
|
1859
1667
|
listAPIProviders
|
|
1860
1668
|
};
|
|
1861
1669
|
return {
|
|
1862
|
-
|
|
1863
|
-
|
|
1670
|
+
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
1671
|
+
enableCache: storage2 => {},
|
|
1672
|
+
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
1673
|
+
disableCache: storage2 => {},
|
|
1864
1674
|
iconLoaded: iconLoaded$1,
|
|
1865
1675
|
iconExists: iconLoaded$1,
|
|
1866
1676
|
// deprecated, kept to avoid breaking changes
|
|
@@ -2374,7 +2184,7 @@ var {
|
|
|
2374
2184
|
_api
|
|
2375
2185
|
} = IconifyIconComponent;
|
|
2376
2186
|
|
|
2377
|
-
// ../../node_modules/.pnpm/@iconify-icon+react@2.
|
|
2187
|
+
// ../../node_modules/.pnpm/@iconify-icon+react@2.3.0_react@19.1.1/node_modules/@iconify-icon/react/dist/iconify.mjs
|
|
2378
2188
|
var Icon = React.forwardRef((props, ref) => {
|
|
2379
2189
|
const newProps = {
|
|
2380
2190
|
...props,
|
|
@@ -2605,6 +2415,6 @@ iconify-icon/dist/iconify-icon.mjs:
|
|
|
2605
2415
|
* Licensed under MIT.
|
|
2606
2416
|
*
|
|
2607
2417
|
* @license MIT
|
|
2608
|
-
* @version 2.
|
|
2418
|
+
* @version 2.3.0
|
|
2609
2419
|
*)
|
|
2610
2420
|
*/
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ttoss/forms",
|
|
3
|
-
"version": "0.31.
|
|
3
|
+
"version": "0.31.3",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"author": "ttoss",
|
|
6
6
|
"contributors": [
|
|
@@ -39,8 +39,8 @@
|
|
|
39
39
|
},
|
|
40
40
|
"peerDependencies": {
|
|
41
41
|
"react": ">=16.8.0",
|
|
42
|
-
"@ttoss/react-i18n": "^2.0.
|
|
43
|
-
"@ttoss/ui": "^5.9.
|
|
42
|
+
"@ttoss/react-i18n": "^2.0.14",
|
|
43
|
+
"@ttoss/ui": "^5.9.2"
|
|
44
44
|
},
|
|
45
45
|
"devDependencies": {
|
|
46
46
|
"@types/jest": "^30.0.0",
|
|
@@ -50,12 +50,12 @@
|
|
|
50
50
|
"react-error-boundary": "^5.0.0",
|
|
51
51
|
"tsup": "^8.5.0",
|
|
52
52
|
"yup": "^1.6.1",
|
|
53
|
-
"@ttoss/config": "^1.35.
|
|
54
|
-
"@ttoss/i18n
|
|
55
|
-
"@ttoss/
|
|
56
|
-
"@ttoss/
|
|
57
|
-
"@ttoss/
|
|
58
|
-
"@ttoss/react-
|
|
53
|
+
"@ttoss/config": "^1.35.6",
|
|
54
|
+
"@ttoss/react-i18n": "^2.0.14",
|
|
55
|
+
"@ttoss/i18n-cli": "^0.7.31",
|
|
56
|
+
"@ttoss/test-utils": "^2.1.26",
|
|
57
|
+
"@ttoss/ui": "^5.9.2",
|
|
58
|
+
"@ttoss/react-icons": "^0.4.15"
|
|
59
59
|
},
|
|
60
60
|
"publishConfig": {
|
|
61
61
|
"access": "public",
|