@xaypay/tui 0.0.88 → 0.0.89
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/index.es.js
CHANGED
|
@@ -2209,14 +2209,13 @@ Stepper.propTypes = {
|
|
|
2209
2209
|
// Unique ID creation requires a high quality random # generator. In the browser we therefore
|
|
2210
2210
|
// require the crypto API and do not support built-in fallback to lower quality random number
|
|
2211
2211
|
// generators (like Math.random()).
|
|
2212
|
-
|
|
2213
|
-
|
|
2212
|
+
let getRandomValues;
|
|
2213
|
+
const rnds8 = new Uint8Array(16);
|
|
2214
2214
|
function rng() {
|
|
2215
2215
|
// lazy load so that environments that need to polyfill have a chance to do so
|
|
2216
2216
|
if (!getRandomValues) {
|
|
2217
|
-
// getRandomValues needs to be invoked in a context where "this" is a Crypto implementation.
|
|
2218
|
-
|
|
2219
|
-
getRandomValues = typeof crypto !== 'undefined' && crypto.getRandomValues && crypto.getRandomValues.bind(crypto) || typeof msCrypto !== 'undefined' && typeof msCrypto.getRandomValues === 'function' && msCrypto.getRandomValues.bind(msCrypto);
|
|
2217
|
+
// getRandomValues needs to be invoked in a context where "this" is a Crypto implementation.
|
|
2218
|
+
getRandomValues = typeof crypto !== 'undefined' && crypto.getRandomValues && crypto.getRandomValues.bind(crypto);
|
|
2220
2219
|
|
|
2221
2220
|
if (!getRandomValues) {
|
|
2222
2221
|
throw new Error('crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported');
|
|
@@ -2226,43 +2225,35 @@ function rng() {
|
|
|
2226
2225
|
return getRandomValues(rnds8);
|
|
2227
2226
|
}
|
|
2228
2227
|
|
|
2229
|
-
var REGEX = /^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000)$/i;
|
|
2230
|
-
|
|
2231
|
-
function validate(uuid) {
|
|
2232
|
-
return typeof uuid === 'string' && REGEX.test(uuid);
|
|
2233
|
-
}
|
|
2234
|
-
|
|
2235
2228
|
/**
|
|
2236
2229
|
* Convert array of 16 byte values to UUID string format of the form:
|
|
2237
2230
|
* XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX
|
|
2238
2231
|
*/
|
|
2239
2232
|
|
|
2240
|
-
|
|
2233
|
+
const byteToHex = [];
|
|
2241
2234
|
|
|
2242
|
-
for (
|
|
2243
|
-
byteToHex.push((i + 0x100).toString(16).
|
|
2235
|
+
for (let i = 0; i < 256; ++i) {
|
|
2236
|
+
byteToHex.push((i + 0x100).toString(16).slice(1));
|
|
2244
2237
|
}
|
|
2245
2238
|
|
|
2246
|
-
function
|
|
2247
|
-
var offset = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 0;
|
|
2239
|
+
function unsafeStringify(arr, offset = 0) {
|
|
2248
2240
|
// Note: Be careful editing this code! It's been tuned for performance
|
|
2249
2241
|
// and works in ways you may not expect. See https://github.com/uuidjs/uuid/pull/434
|
|
2250
|
-
|
|
2251
|
-
// of the following:
|
|
2252
|
-
// - One or more input array values don't map to a hex octet (leading to
|
|
2253
|
-
// "undefined" in the uuid)
|
|
2254
|
-
// - Invalid input values for the RFC `version` or `variant` fields
|
|
2255
|
-
|
|
2256
|
-
if (!validate(uuid)) {
|
|
2257
|
-
throw TypeError('Stringified UUID is invalid');
|
|
2258
|
-
}
|
|
2259
|
-
|
|
2260
|
-
return uuid;
|
|
2242
|
+
return (byteToHex[arr[offset + 0]] + byteToHex[arr[offset + 1]] + byteToHex[arr[offset + 2]] + byteToHex[arr[offset + 3]] + '-' + byteToHex[arr[offset + 4]] + byteToHex[arr[offset + 5]] + '-' + byteToHex[arr[offset + 6]] + byteToHex[arr[offset + 7]] + '-' + byteToHex[arr[offset + 8]] + byteToHex[arr[offset + 9]] + '-' + byteToHex[arr[offset + 10]] + byteToHex[arr[offset + 11]] + byteToHex[arr[offset + 12]] + byteToHex[arr[offset + 13]] + byteToHex[arr[offset + 14]] + byteToHex[arr[offset + 15]]).toLowerCase();
|
|
2261
2243
|
}
|
|
2262
2244
|
|
|
2245
|
+
const randomUUID = typeof crypto !== 'undefined' && crypto.randomUUID && crypto.randomUUID.bind(crypto);
|
|
2246
|
+
var native = {
|
|
2247
|
+
randomUUID
|
|
2248
|
+
};
|
|
2249
|
+
|
|
2263
2250
|
function v4(options, buf, offset) {
|
|
2251
|
+
if (native.randomUUID && !buf && !options) {
|
|
2252
|
+
return native.randomUUID();
|
|
2253
|
+
}
|
|
2254
|
+
|
|
2264
2255
|
options = options || {};
|
|
2265
|
-
|
|
2256
|
+
const rnds = options.random || (options.rng || rng)(); // Per 4.4, set bits for version and `clock_seq_hi_and_reserved`
|
|
2266
2257
|
|
|
2267
2258
|
rnds[6] = rnds[6] & 0x0f | 0x40;
|
|
2268
2259
|
rnds[8] = rnds[8] & 0x3f | 0x80; // Copy bytes to buffer, if provided
|
|
@@ -2270,14 +2261,14 @@ function v4(options, buf, offset) {
|
|
|
2270
2261
|
if (buf) {
|
|
2271
2262
|
offset = offset || 0;
|
|
2272
2263
|
|
|
2273
|
-
for (
|
|
2264
|
+
for (let i = 0; i < 16; ++i) {
|
|
2274
2265
|
buf[offset + i] = rnds[i];
|
|
2275
2266
|
}
|
|
2276
2267
|
|
|
2277
2268
|
return buf;
|
|
2278
2269
|
}
|
|
2279
2270
|
|
|
2280
|
-
return
|
|
2271
|
+
return unsafeStringify(rnds);
|
|
2281
2272
|
}
|
|
2282
2273
|
|
|
2283
2274
|
const SvgListItemPdf = ({
|
|
@@ -3995,7 +3986,7 @@ const NewAutocomplete = ({
|
|
|
3995
3986
|
setId('');
|
|
3996
3987
|
setInnerValue('');
|
|
3997
3988
|
}
|
|
3998
|
-
}, []);
|
|
3989
|
+
}, [selected]);
|
|
3999
3990
|
return /*#__PURE__*/React__default.createElement(React__default.Fragment, null, label ? /*#__PURE__*/React__default.createElement("label", {
|
|
4000
3991
|
style: {
|
|
4001
3992
|
color: labelColor ? labelColor : configStyles.NEWAUTOCOMPLETE.labelColor,
|
package/dist/index.js
CHANGED
|
@@ -2239,14 +2239,13 @@ Stepper.propTypes = {
|
|
|
2239
2239
|
// Unique ID creation requires a high quality random # generator. In the browser we therefore
|
|
2240
2240
|
// require the crypto API and do not support built-in fallback to lower quality random number
|
|
2241
2241
|
// generators (like Math.random()).
|
|
2242
|
-
|
|
2243
|
-
|
|
2242
|
+
let getRandomValues;
|
|
2243
|
+
const rnds8 = new Uint8Array(16);
|
|
2244
2244
|
function rng() {
|
|
2245
2245
|
// lazy load so that environments that need to polyfill have a chance to do so
|
|
2246
2246
|
if (!getRandomValues) {
|
|
2247
|
-
// getRandomValues needs to be invoked in a context where "this" is a Crypto implementation.
|
|
2248
|
-
|
|
2249
|
-
getRandomValues = typeof crypto !== 'undefined' && crypto.getRandomValues && crypto.getRandomValues.bind(crypto) || typeof msCrypto !== 'undefined' && typeof msCrypto.getRandomValues === 'function' && msCrypto.getRandomValues.bind(msCrypto);
|
|
2247
|
+
// getRandomValues needs to be invoked in a context where "this" is a Crypto implementation.
|
|
2248
|
+
getRandomValues = typeof crypto !== 'undefined' && crypto.getRandomValues && crypto.getRandomValues.bind(crypto);
|
|
2250
2249
|
|
|
2251
2250
|
if (!getRandomValues) {
|
|
2252
2251
|
throw new Error('crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported');
|
|
@@ -2256,43 +2255,35 @@ function rng() {
|
|
|
2256
2255
|
return getRandomValues(rnds8);
|
|
2257
2256
|
}
|
|
2258
2257
|
|
|
2259
|
-
var REGEX = /^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000)$/i;
|
|
2260
|
-
|
|
2261
|
-
function validate(uuid) {
|
|
2262
|
-
return typeof uuid === 'string' && REGEX.test(uuid);
|
|
2263
|
-
}
|
|
2264
|
-
|
|
2265
2258
|
/**
|
|
2266
2259
|
* Convert array of 16 byte values to UUID string format of the form:
|
|
2267
2260
|
* XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX
|
|
2268
2261
|
*/
|
|
2269
2262
|
|
|
2270
|
-
|
|
2263
|
+
const byteToHex = [];
|
|
2271
2264
|
|
|
2272
|
-
for (
|
|
2273
|
-
byteToHex.push((i + 0x100).toString(16).
|
|
2265
|
+
for (let i = 0; i < 256; ++i) {
|
|
2266
|
+
byteToHex.push((i + 0x100).toString(16).slice(1));
|
|
2274
2267
|
}
|
|
2275
2268
|
|
|
2276
|
-
function
|
|
2277
|
-
var offset = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 0;
|
|
2269
|
+
function unsafeStringify(arr, offset = 0) {
|
|
2278
2270
|
// Note: Be careful editing this code! It's been tuned for performance
|
|
2279
2271
|
// and works in ways you may not expect. See https://github.com/uuidjs/uuid/pull/434
|
|
2280
|
-
|
|
2281
|
-
// of the following:
|
|
2282
|
-
// - One or more input array values don't map to a hex octet (leading to
|
|
2283
|
-
// "undefined" in the uuid)
|
|
2284
|
-
// - Invalid input values for the RFC `version` or `variant` fields
|
|
2285
|
-
|
|
2286
|
-
if (!validate(uuid)) {
|
|
2287
|
-
throw TypeError('Stringified UUID is invalid');
|
|
2288
|
-
}
|
|
2289
|
-
|
|
2290
|
-
return uuid;
|
|
2272
|
+
return (byteToHex[arr[offset + 0]] + byteToHex[arr[offset + 1]] + byteToHex[arr[offset + 2]] + byteToHex[arr[offset + 3]] + '-' + byteToHex[arr[offset + 4]] + byteToHex[arr[offset + 5]] + '-' + byteToHex[arr[offset + 6]] + byteToHex[arr[offset + 7]] + '-' + byteToHex[arr[offset + 8]] + byteToHex[arr[offset + 9]] + '-' + byteToHex[arr[offset + 10]] + byteToHex[arr[offset + 11]] + byteToHex[arr[offset + 12]] + byteToHex[arr[offset + 13]] + byteToHex[arr[offset + 14]] + byteToHex[arr[offset + 15]]).toLowerCase();
|
|
2291
2273
|
}
|
|
2292
2274
|
|
|
2275
|
+
const randomUUID = typeof crypto !== 'undefined' && crypto.randomUUID && crypto.randomUUID.bind(crypto);
|
|
2276
|
+
var native = {
|
|
2277
|
+
randomUUID
|
|
2278
|
+
};
|
|
2279
|
+
|
|
2293
2280
|
function v4(options, buf, offset) {
|
|
2281
|
+
if (native.randomUUID && !buf && !options) {
|
|
2282
|
+
return native.randomUUID();
|
|
2283
|
+
}
|
|
2284
|
+
|
|
2294
2285
|
options = options || {};
|
|
2295
|
-
|
|
2286
|
+
const rnds = options.random || (options.rng || rng)(); // Per 4.4, set bits for version and `clock_seq_hi_and_reserved`
|
|
2296
2287
|
|
|
2297
2288
|
rnds[6] = rnds[6] & 0x0f | 0x40;
|
|
2298
2289
|
rnds[8] = rnds[8] & 0x3f | 0x80; // Copy bytes to buffer, if provided
|
|
@@ -2300,14 +2291,14 @@ function v4(options, buf, offset) {
|
|
|
2300
2291
|
if (buf) {
|
|
2301
2292
|
offset = offset || 0;
|
|
2302
2293
|
|
|
2303
|
-
for (
|
|
2294
|
+
for (let i = 0; i < 16; ++i) {
|
|
2304
2295
|
buf[offset + i] = rnds[i];
|
|
2305
2296
|
}
|
|
2306
2297
|
|
|
2307
2298
|
return buf;
|
|
2308
2299
|
}
|
|
2309
2300
|
|
|
2310
|
-
return
|
|
2301
|
+
return unsafeStringify(rnds);
|
|
2311
2302
|
}
|
|
2312
2303
|
|
|
2313
2304
|
const SvgListItemPdf = ({
|
|
@@ -4025,7 +4016,7 @@ const NewAutocomplete = ({
|
|
|
4025
4016
|
setId('');
|
|
4026
4017
|
setInnerValue('');
|
|
4027
4018
|
}
|
|
4028
|
-
}, []);
|
|
4019
|
+
}, [selected]);
|
|
4029
4020
|
return /*#__PURE__*/React__default["default"].createElement(React__default["default"].Fragment, null, label ? /*#__PURE__*/React__default["default"].createElement("label", {
|
|
4030
4021
|
style: {
|
|
4031
4022
|
color: labelColor ? labelColor : configStyles.NEWAUTOCOMPLETE.labelColor,
|
package/package.json
CHANGED
|
@@ -19,6 +19,7 @@ export default {
|
|
|
19
19
|
|
|
20
20
|
const Template = (args) => {
|
|
21
21
|
const [newOptions, setNewOptions] = useState([]);
|
|
22
|
+
const [sel, setSel] = useState({ "bbb":"0", "name":"gasdfgdsfgdsg" });
|
|
22
23
|
const handleClick = (selected) => {
|
|
23
24
|
console.log(selected, 'selected');
|
|
24
25
|
};
|
|
@@ -42,7 +43,14 @@ const Template = (args) => {
|
|
|
42
43
|
});
|
|
43
44
|
};
|
|
44
45
|
|
|
45
|
-
return
|
|
46
|
+
return (
|
|
47
|
+
<>
|
|
48
|
+
<NewAutocomplete {...args} getItem={handleClick} selected={sel} options={newOptions} change={handleChange} />
|
|
49
|
+
<button style={{ padding: '15px', cursor: 'pointer', margin: '10px 15px 0px 0px', borderRadius: '10px', fontSize: '22px' }} onClick={_ => setSel({ "bbb":"0", "name":"gasdfgdsfgdsg" })}>reset selected</button>
|
|
50
|
+
<button style={{ padding: '15px', cursor: 'pointer', margin: '10px 15px 0px 0px', borderRadius: '10px', fontSize: '22px' }} onClick={_ => setSel({ "dd": "1", "name": "just ok" })}>change selected</button>
|
|
51
|
+
<button style={{ padding: '15px', cursor: 'pointer', margin: '10px 15px 0px 0px', borderRadius: '10px', fontSize: '22px' }} onClick={_ => setSel({ "dd": "", "name": "" })}>empty selected</button>
|
|
52
|
+
</>
|
|
53
|
+
);
|
|
46
54
|
};
|
|
47
55
|
export const Default = Template.bind({});
|
|
48
56
|
Default.args = {
|