@economic/taco 2.54.1 → 2.54.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/taco.js +19 -42
- package/dist/taco.js.map +1 -1
- package/dist/taco.umd.cjs +19 -42
- package/dist/taco.umd.cjs.map +1 -1
- package/package.json +5 -6
- package/tailwind.config.js +550 -0
package/dist/taco.umd.cjs
CHANGED
@@ -12736,40 +12736,17 @@
|
|
12736
12736
|
}
|
12737
12737
|
const $e698a72e93240346$export$be92b6f5f03c0fe9 = $e698a72e93240346$export$48513f6b9f8ce62d;
|
12738
12738
|
const $e698a72e93240346$export$adb584737d712b70 = $e698a72e93240346$export$59aad738f51d1c05;
|
12739
|
-
|
12740
|
-
|
12741
|
-
|
12742
|
-
|
12743
|
-
|
12744
|
-
|
12745
|
-
throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");
|
12746
|
-
}
|
12739
|
+
const urlAlphabet = "useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict";
|
12740
|
+
let nanoid = (size2 = 21) => {
|
12741
|
+
let id2 = "";
|
12742
|
+
let bytes = crypto.getRandomValues(new Uint8Array(size2 |= 0));
|
12743
|
+
while (size2--) {
|
12744
|
+
id2 += urlAlphabet[bytes[size2] & 63];
|
12747
12745
|
}
|
12748
|
-
return
|
12749
|
-
}
|
12750
|
-
const byteToHex = [];
|
12751
|
-
for (let i2 = 0; i2 < 256; ++i2) {
|
12752
|
-
byteToHex.push((i2 + 256).toString(16).slice(1));
|
12753
|
-
}
|
12754
|
-
function unsafeStringify(arr, offset2 = 0) {
|
12755
|
-
return byteToHex[arr[offset2 + 0]] + byteToHex[arr[offset2 + 1]] + byteToHex[arr[offset2 + 2]] + byteToHex[arr[offset2 + 3]] + "-" + byteToHex[arr[offset2 + 4]] + byteToHex[arr[offset2 + 5]] + "-" + byteToHex[arr[offset2 + 6]] + byteToHex[arr[offset2 + 7]] + "-" + byteToHex[arr[offset2 + 8]] + byteToHex[arr[offset2 + 9]] + "-" + byteToHex[arr[offset2 + 10]] + byteToHex[arr[offset2 + 11]] + byteToHex[arr[offset2 + 12]] + byteToHex[arr[offset2 + 13]] + byteToHex[arr[offset2 + 14]] + byteToHex[arr[offset2 + 15]];
|
12756
|
-
}
|
12757
|
-
const randomUUID = typeof crypto !== "undefined" && crypto.randomUUID && crypto.randomUUID.bind(crypto);
|
12758
|
-
const native = {
|
12759
|
-
randomUUID
|
12746
|
+
return id2;
|
12760
12747
|
};
|
12761
|
-
function v4(options2, buf, offset2) {
|
12762
|
-
if (native.randomUUID && true && !options2) {
|
12763
|
-
return native.randomUUID();
|
12764
|
-
}
|
12765
|
-
options2 = options2 || {};
|
12766
|
-
const rnds = options2.random || (options2.rng || rng)();
|
12767
|
-
rnds[6] = rnds[6] & 15 | 64;
|
12768
|
-
rnds[8] = rnds[8] & 63 | 128;
|
12769
|
-
return unsafeStringify(rnds);
|
12770
|
-
}
|
12771
12748
|
const useId$1 = (nativeId) => {
|
12772
|
-
return React.useMemo(() => nativeId ??
|
12749
|
+
return React.useMemo(() => nativeId ?? nanoid(), []);
|
12773
12750
|
};
|
12774
12751
|
const Spinner = React.forwardRef(function Spinner2(props, ref) {
|
12775
12752
|
const { delay = 350, label, ...otherProps } = props;
|
@@ -13961,7 +13938,7 @@
|
|
13961
13938
|
const buttonRef = React__namespace.useRef(null);
|
13962
13939
|
const listRef = React__namespace.useRef(null);
|
13963
13940
|
const [open, setOpen] = React__namespace.useState(false);
|
13964
|
-
const listId = React__namespace.useMemo(() =>
|
13941
|
+
const listId = React__namespace.useMemo(() => nanoid(), []);
|
13965
13942
|
const [inputValue, setInputValue] = React__namespace.useState(convertToInputValue(value));
|
13966
13943
|
const shouldFilterData = !onSearch && (!inline || inline && inputValue !== convertToInputValue(value));
|
13967
13944
|
const flattenedData = useFlattenedData(unfilteredData);
|
@@ -24981,7 +24958,7 @@
|
|
24981
24958
|
...otherProps
|
24982
24959
|
}, ref) => {
|
24983
24960
|
const data = useFlattenedData(emptyValue !== void 0 ? [{ text: "", value: emptyValue }, ...externalData] : externalData);
|
24984
|
-
const id2 = React__namespace.useMemo(() => nativeId ||
|
24961
|
+
const id2 = React__namespace.useMemo(() => nativeId || nanoid(), [nativeId]);
|
24985
24962
|
const inputRef = useMergedRef(ref);
|
24986
24963
|
const currentIndex = value !== void 0 ? getIndexFromValue(data, value) : void 0;
|
24987
24964
|
const { getNextIndex: getNextIndex2 } = useTypeahead({ data, currentIndex });
|
@@ -25087,7 +25064,7 @@
|
|
25087
25064
|
...otherProps
|
25088
25065
|
}, ref) => {
|
25089
25066
|
const { texts } = useLocalization();
|
25090
|
-
const id2 = React__namespace.useMemo(() => nativeId ||
|
25067
|
+
const id2 = React__namespace.useMemo(() => nativeId || nanoid(), [nativeId]);
|
25091
25068
|
const inputRef = useMergedRef(ref);
|
25092
25069
|
const data = React__namespace.useMemo(() => {
|
25093
25070
|
return [{ text: texts.listbox.allOption, value: "#ALL-OPTIONS#" }, ...externalData];
|
@@ -27430,7 +27407,7 @@
|
|
27430
27407
|
const flattenedData = useFlattenedData(data);
|
27431
27408
|
const listboxInputRef = useMergedRef(ref);
|
27432
27409
|
const [open, setOpen] = React__namespace.useState(false);
|
27433
|
-
const id2 = React__namespace.useMemo(() => nativeId || `select_${
|
27410
|
+
const id2 = React__namespace.useMemo(() => nativeId || `select_${nanoid()}`, [nativeId]);
|
27434
27411
|
const inputRef = React__namespace.useRef(null);
|
27435
27412
|
const buttonId = `${id2}-button`;
|
27436
27413
|
const [lastValue, setLastValue] = React__namespace.useState(value);
|
@@ -27894,7 +27871,7 @@
|
|
27894
27871
|
setToasts((currentToasts) => currentToasts.filter((toast) => toast.id !== id2));
|
27895
27872
|
};
|
27896
27873
|
const toaster = React__namespace.useCallback((content, options2) => {
|
27897
|
-
const id2 =
|
27874
|
+
const id2 = nanoid();
|
27898
27875
|
const close = () => handleClose(id2);
|
27899
27876
|
setToasts((currentToasts) => insertToastWithoutDuplicates(currentToasts, id2, content, options2, close));
|
27900
27877
|
const update2 = (content2, options22) => {
|
@@ -27905,7 +27882,7 @@
|
|
27905
27882
|
}
|
27906
27883
|
return toast.id !== id2;
|
27907
27884
|
});
|
27908
|
-
return insertToastWithoutDuplicates(nextToasts,
|
27885
|
+
return insertToastWithoutDuplicates(nextToasts, nanoid(), content2, options22, close);
|
27909
27886
|
});
|
27910
27887
|
};
|
27911
27888
|
const success = (content2, options22) => {
|
@@ -43108,7 +43085,7 @@ table[data-taco^='table'][data-table-horizontally-scrolled="true"]#${tableId} >
|
|
43108
43085
|
});
|
43109
43086
|
var g5 = e6[u4], v3 = d3(i4, g5);
|
43110
43087
|
return Object.entries(v3).map(function(r3, i5) {
|
43111
|
-
var d4 = r3[0],
|
43088
|
+
var d4 = r3[0], v4 = r3[1], h3 = g5 + ":" + d4, y4 = o4(v4, u4 + 1, h3 = p4 ? p4 + ">" + h3 : h3), w3 = u4 ? G(v4, "leafRows") : v4, R4 = function(t4, n5, o5) {
|
43112
43089
|
var r4 = {};
|
43113
43090
|
return s3.forEach(function(i6) {
|
43114
43091
|
if (e6.includes(i6.id)) r4[i6.id] = n5[0] ? n5[0].values[i6.id] : null;
|
@@ -43133,7 +43110,7 @@ table[data-taco^='table'][data-table-horizontally-scrolled="true"]#${tableId} >
|
|
43133
43110
|
}
|
43134
43111
|
}
|
43135
43112
|
}), r4;
|
43136
|
-
}(w3,
|
43113
|
+
}(w3, v4, u4), b4 = { id: h3, isGrouped: true, groupByID: g5, groupByVal: d4, values: R4, subRows: y4, leafRows: w3, depth: u4, index: i5 };
|
43137
43114
|
return y4.forEach(function(e7) {
|
43138
43115
|
t3.push(e7), n4[e7.id] = e7, e7.isGrouped ? (l3.push(e7), a4[e7.id] = e7) : (c4.push(e7), f3[e7.id] = e7);
|
43139
43116
|
}), b4;
|
@@ -50486,7 +50463,7 @@ This usually means you need to need to name your plugin hook by setting the 'plu
|
|
50486
50463
|
}
|
50487
50464
|
}, [JSON.stringify(data)]);
|
50488
50465
|
const create = (rowIndexPath = void 0, values = {}) => {
|
50489
|
-
const _createKey =
|
50466
|
+
const _createKey = nanoid();
|
50490
50467
|
const [nexTRow, newRowIndexPath] = insertChildTableRow(internalData, rowIndexPath, { ...values, _createKey });
|
50491
50468
|
setActiveRowIndexPath(newRowIndexPath);
|
50492
50469
|
setInternalData(nexTRow);
|
@@ -51888,7 +51865,7 @@ This usually means you need to need to name your plugin hook by setting the 'plu
|
|
51888
51865
|
});
|
51889
51866
|
}
|
51890
51867
|
function insertTemporaryRow(data, rowIndex) {
|
51891
|
-
const newRowId = `${TEMPORARY_ROW_ID_PREFIX}${
|
51868
|
+
const newRowId = `${TEMPORARY_ROW_ID_PREFIX}${nanoid()}`;
|
51892
51869
|
const value = {
|
51893
51870
|
...data,
|
51894
51871
|
[rowIdentityAccessor]: newRowId
|
@@ -84964,7 +84941,7 @@ This usually means you need to need to name your plugin hook by setting the 'plu
|
|
84964
84941
|
if (data.cache[pageIndex] && data.cache[pageIndex][0] && !hasChangedData && !reset) {
|
84965
84942
|
return;
|
84966
84943
|
}
|
84967
|
-
const requestId =
|
84944
|
+
const requestId = nanoid();
|
84968
84945
|
_pendingPageRequests.current[pageIndex] = true;
|
84969
84946
|
try {
|
84970
84947
|
_lastRequestId.current = requestId;
|