@weng-lab/ui-components 1.0.11 → 1.0.12
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/{get-context-CEzl7GxY.js → get-context-AqmrovR2.js} +2 -2
- package/dist/{get-context-CEzl7GxY.js.map → get-context-AqmrovR2.js.map} +1 -1
- package/dist/{index-DgtxGmbU.js → index-DcWKaNIZ.js} +25 -25
- package/dist/{index-DgtxGmbU.js.map → index-DcWKaNIZ.js.map} +1 -1
- package/dist/src/components/Table/CustomToolbar.d.ts +3 -3
- package/dist/src/components/Table/CustomToolbar.d.ts.map +1 -1
- package/dist/src/components/Table/Table.d.ts.map +1 -1
- package/dist/ui-components.es.js +1 -1
- package/package.json +1 -1
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { _ as f } from "./index-
|
|
1
|
+
import { _ as f } from "./index-DcWKaNIZ.js";
|
|
2
2
|
const o = {
|
|
3
3
|
config: {
|
|
4
4
|
isInitialized: !1
|
|
@@ -75,4 +75,4 @@ async function I() {
|
|
|
75
75
|
export {
|
|
76
76
|
I as default
|
|
77
77
|
};
|
|
78
|
-
//# sourceMappingURL=get-context-
|
|
78
|
+
//# sourceMappingURL=get-context-AqmrovR2.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"get-context-
|
|
1
|
+
{"version":3,"file":"get-context-AqmrovR2.js","sources":["../../../node_modules/.pnpm/@mui+x-telemetry@8.5.3/node_modules/@mui/x-telemetry/esm/context.js","../../../node_modules/.pnpm/@mui+x-telemetry@8.5.3/node_modules/@mui/x-telemetry/esm/runtime/window-storage.js","../../../node_modules/.pnpm/@mui+x-telemetry@8.5.3/node_modules/@mui/x-telemetry/esm/runtime/get-context.js"],"sourcesContent":["// This file will be modified by the `postinstall` script.\n// See postinstall/index.ts for more information.\n\nconst defaultValue = {\n config: {\n isInitialized: false\n },\n traits: {}\n};\nexport default defaultValue;","const prefix = '__mui_x_telemetry_';\nfunction getStorageKey(key) {\n return prefix + btoa(key);\n}\nexport function setWindowStorageItem(type, key, value) {\n try {\n if (typeof window !== 'undefined' && window[type]) {\n window[type].setItem(getStorageKey(key), value);\n return true;\n }\n } catch (_) {\n // Storage is unavailable, skip it\n }\n return false;\n}\nexport function getWindowStorageItem(type, key) {\n try {\n if (typeof window !== 'undefined' && window[type]) {\n return window[type].getItem(getStorageKey(key));\n }\n } catch (_) {\n // Storage is unavailable, skip it\n }\n return null;\n}","import _extends from \"@babel/runtime/helpers/esm/extends\";\nimport telemetryContext from \"../context.js\";\nimport { getWindowStorageItem, setWindowStorageItem } from \"./window-storage.js\";\nfunction generateId(length) {\n let result = '';\n const characters = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789';\n const charactersLength = characters.length;\n let counter = 0;\n while (counter < length) {\n result += characters.charAt(Math.floor(Math.random() * charactersLength));\n counter += 1;\n }\n return result;\n}\nfunction pick(obj, keys) {\n return keys.reduce((acc, key) => {\n acc[key] = obj[key];\n return acc;\n }, {});\n}\nconst getBrowserFingerprint = typeof window === 'undefined' || process.env.NODE_ENV === 'test' ? () => undefined : async () => {\n const fingerprintLCKey = 'fingerprint';\n try {\n const existingFingerprint = getWindowStorageItem('localStorage', fingerprintLCKey);\n if (existingFingerprint) {\n return JSON.parse(existingFingerprint);\n }\n const FingerprintJS = await import('@fingerprintjs/fingerprintjs');\n const fp = await FingerprintJS.load({\n monitoring: false\n });\n const fpResult = await fp.get();\n const components = _extends({}, fpResult.components);\n delete components.cookiesEnabled;\n const fullHash = FingerprintJS.hashComponents(components);\n const coreHash = FingerprintJS.hashComponents(_extends({}, pick(components, ['fonts', 'audio', 'languages', 'deviceMemory', 'timezone', 'sessionStorage', 'localStorage', 'indexedDB', 'openDatabase', 'platform', 'canvas', 'vendor', 'vendorFlavors', 'colorGamut', 'forcedColors', 'monochrome', 'contrast', 'reducedMotion', 'math', 'videoCard', 'architecture'])));\n const result = {\n fullHash,\n coreHash\n };\n setWindowStorageItem('localStorage', fingerprintLCKey, JSON.stringify(result));\n return result;\n } catch (_) {\n return null;\n }\n};\nfunction getAnonymousId() {\n const localStorageKey = 'anonymous_id';\n const existingAnonymousId = getWindowStorageItem('localStorage', localStorageKey);\n if (existingAnonymousId) {\n return existingAnonymousId;\n }\n const generated = `anid_${generateId(32)}`;\n if (setWindowStorageItem('localStorage', localStorageKey, generated)) {\n return generated;\n }\n return '';\n}\nfunction getSessionId() {\n const localStorageKey = 'session_id';\n const existingSessionId = getWindowStorageItem('sessionStorage', localStorageKey);\n if (existingSessionId) {\n return existingSessionId;\n }\n const generated = `sesid_${generateId(32)}`;\n if (setWindowStorageItem('sessionStorage', localStorageKey, generated)) {\n return generated;\n }\n return `sestp_${generateId(32)}`;\n}\nasync function getTelemetryContext() {\n telemetryContext.traits.sessionId = getSessionId();\n\n // Initialize the context if it hasn't been initialized yet\n // (e.g. postinstall not run)\n if (!telemetryContext.config.isInitialized) {\n telemetryContext.traits.anonymousId = getAnonymousId();\n telemetryContext.config.isInitialized = true;\n }\n if (!telemetryContext.traits.fingerprint) {\n telemetryContext.traits.fingerprint = await getBrowserFingerprint();\n }\n return telemetryContext;\n}\nexport default getTelemetryContext;"],"names":["defaultValue","prefix","getStorageKey","key","setWindowStorageItem","type","value","getWindowStorageItem","generateId","length","result","characters","charactersLength","counter","pick","obj","keys","acc","getBrowserFingerprint","fingerprintLCKey","existingFingerprint","FingerprintJS","fpResult","components","_extends","fullHash","coreHash","getAnonymousId","localStorageKey","existingAnonymousId","generated","getSessionId","existingSessionId","getTelemetryContext","telemetryContext"],"mappings":";AAGA,MAAMA,IAAe;AAAA,EACnB,QAAQ;AAAA,IACN,eAAe;AAAA,EACnB;AAAA,EACE,QAAQ,CAAA;AACV,GCRMC,IAAS;AACf,SAASC,EAAcC,GAAK;AAC1B,SAAOF,IAAS,KAAKE,CAAG;AAC1B;AACO,SAASC,EAAqBC,GAAMF,GAAKG,GAAO;AACrD,MAAI;AACF,QAAI,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AAgB,YAAY,kBAAkB,gBAAgB,aAAa,gBAAgB,YAAY,UAAU,UAAU,iBAAiB,cAAc,gBAAgB,cAAc,YAAY,iBAAiB,QAAQ,aAAa,cAAc,CAAC,CAAC,CAAC,GACjWb,IAAS;AAAA,MACb,UAAAe;AAAA,MACA,UAAAC;AAAA,IACN;AACI,WAAAtB,EAAqB,gBAAgBe,GAAkB,KAAK,UAAUT,CAAM,CAAC,GACtEA;AAAA,EACT,QAAY;AACV,WAAO;AAAA,EACT;AACF;AACA,SAASiB,IAAiB;AACxB,QAAMC,IAAkB,gBAClBC,IAAsBtB,EAAqB,gBAAgBqB,CAAe;AAChF,MAAIC;AACF,WAAOA;AAET,QAAMC,IAAY,QAAQtB,EAAW,EAAE,CAAC;AACxC,SAAIJ,EAAqB,gBAAgBwB,GAAiBE,CAAS,IAC1DA,IAEF;AACT;AACA,SAASC,IAAe;AACtB,QAAMH,IAAkB,cAClBI,IAAoBzB,EAAqB,kBAAkBqB,CAAe;AAChF,MAAII;AACF,WAAOA;AAET,QAAMF,IAAY,SAAStB,EAAW,EAAE,CAAC;AACzC,SAAIJ,EAAqB,kBAAkBwB,GAAiBE,CAAS,IAC5DA,IAEF,SAAStB,EAAW,EAAE,CAAC;AAChC;AACA,eAAeyB,IAAsB;AACnCC,SAAAA,EAAiB,OAAO,YAAYH,EAAY,GAI3CG,EAAiB,OAAO,kBAC3BA,EAAiB,OAAO,cAAcP,EAAc,GACpDO,EAAiB,OAAO,gBAAgB,KAErCA,EAAiB,OAAO,gBAC3BA,EAAiB,OAAO,cAAc,MAAMhB,EAAqB,IAE5DgB;AACT;","x_google_ignoreList":[0,1,2]}
|
|
@@ -33342,7 +33342,7 @@ async function gj(e) {
|
|
|
33342
33342
|
return;
|
|
33343
33343
|
const {
|
|
33344
33344
|
default: t
|
|
33345
|
-
} = await import("./get-context-
|
|
33345
|
+
} = await import("./get-context-AqmrovR2.js"), o = await t();
|
|
33346
33346
|
if (!e || !hj(o))
|
|
33347
33347
|
return;
|
|
33348
33348
|
const r = E({}, e, {
|
|
@@ -47797,8 +47797,8 @@ const EG = mV, Dm = ({ message: e, variant: t }) => /* @__PURE__ */ b.jsxs(fu, {
|
|
|
47797
47797
|
opacity: t.expanded ? 1 : 0,
|
|
47798
47798
|
transition: e.transitions.create(["width", "opacity"])
|
|
47799
47799
|
}));
|
|
47800
|
-
function DG({ label: e, labelTooltip: t, toolbarSlot: o }) {
|
|
47801
|
-
const [
|
|
47800
|
+
function DG({ label: e, labelTooltip: t, toolbarSlot: o, ...r }) {
|
|
47801
|
+
const [s, i] = p.useState(!1), l = p.useRef(null);
|
|
47802
47802
|
return /* @__PURE__ */ b.jsxs(pl, { children: [
|
|
47803
47803
|
/* @__PURE__ */ b.jsxs(wn, { fontWeight: "medium", sx: { flex: 1, mx: 0.5, display: "flex", alignItems: "center", gap: 1 }, children: [
|
|
47804
47804
|
e,
|
|
@@ -47812,19 +47812,19 @@ function DG({ label: e, labelTooltip: t, toolbarSlot: o }) {
|
|
|
47812
47812
|
/* @__PURE__ */ b.jsx(Io, { title: "Filters", children: /* @__PURE__ */ b.jsx(
|
|
47813
47813
|
wc,
|
|
47814
47814
|
{
|
|
47815
|
-
render: (
|
|
47815
|
+
render: (a, c) => /* @__PURE__ */ b.jsx(mo, { ...a, color: "default", children: /* @__PURE__ */ b.jsx(nf, { badgeContent: c.filterCount, color: "primary", variant: "dot", children: /* @__PURE__ */ b.jsx(TG, { fontSize: "small" }) }) })
|
|
47816
47816
|
}
|
|
47817
47817
|
) }),
|
|
47818
47818
|
/* @__PURE__ */ b.jsx(Ps, { orientation: "vertical", variant: "middle", flexItem: !0, sx: { mx: 0.5 } }),
|
|
47819
47819
|
/* @__PURE__ */ b.jsx(Io, { title: "Export", children: /* @__PURE__ */ b.jsx(
|
|
47820
47820
|
mo,
|
|
47821
47821
|
{
|
|
47822
|
-
ref:
|
|
47822
|
+
ref: l,
|
|
47823
47823
|
id: "export-menu-trigger",
|
|
47824
47824
|
"aria-controls": "export-menu",
|
|
47825
47825
|
"aria-haspopup": "true",
|
|
47826
|
-
"aria-expanded":
|
|
47827
|
-
onClick: () =>
|
|
47826
|
+
"aria-expanded": s ? "true" : void 0,
|
|
47827
|
+
onClick: () => i(!0),
|
|
47828
47828
|
children: /* @__PURE__ */ b.jsx(IG, { fontSize: "small" })
|
|
47829
47829
|
}
|
|
47830
47830
|
) }),
|
|
@@ -47832,9 +47832,9 @@ function DG({ label: e, labelTooltip: t, toolbarSlot: o }) {
|
|
|
47832
47832
|
Od,
|
|
47833
47833
|
{
|
|
47834
47834
|
id: "export-menu",
|
|
47835
|
-
anchorEl:
|
|
47836
|
-
open:
|
|
47837
|
-
onClose: () =>
|
|
47835
|
+
anchorEl: l.current,
|
|
47836
|
+
open: s,
|
|
47837
|
+
onClose: () => i(!1),
|
|
47838
47838
|
anchorOrigin: { vertical: "bottom", horizontal: "right" },
|
|
47839
47839
|
transformOrigin: { vertical: "top", horizontal: "right" },
|
|
47840
47840
|
slotProps: {
|
|
@@ -47843,8 +47843,8 @@ function DG({ label: e, labelTooltip: t, toolbarSlot: o }) {
|
|
|
47843
47843
|
}
|
|
47844
47844
|
},
|
|
47845
47845
|
children: [
|
|
47846
|
-
/* @__PURE__ */ b.jsx(Ec, { render: /* @__PURE__ */ b.jsx(Ts, {}), onClick: () =>
|
|
47847
|
-
/* @__PURE__ */ b.jsx(Sc, { render: /* @__PURE__ */ b.jsx(Ts, {}), onClick: () =>
|
|
47846
|
+
/* @__PURE__ */ b.jsx(Ec, { options: { ...r.printOptions }, render: /* @__PURE__ */ b.jsx(Ts, {}), onClick: () => i(!1), children: "Print" }),
|
|
47847
|
+
/* @__PURE__ */ b.jsx(Sc, { options: { fileName: e, ...r.csvOptions }, render: /* @__PURE__ */ b.jsx(Ts, {}), onClick: () => i(!1), children: "Download as CSV" })
|
|
47848
47848
|
]
|
|
47849
47849
|
}
|
|
47850
47850
|
),
|
|
@@ -47852,13 +47852,13 @@ function DG({ label: e, labelTooltip: t, toolbarSlot: o }) {
|
|
|
47852
47852
|
/* @__PURE__ */ b.jsx(
|
|
47853
47853
|
vc,
|
|
47854
47854
|
{
|
|
47855
|
-
render: (
|
|
47855
|
+
render: (a, c) => /* @__PURE__ */ b.jsx(Io, { title: "Search", enterDelay: 0, children: /* @__PURE__ */ b.jsx(
|
|
47856
47856
|
MG,
|
|
47857
47857
|
{
|
|
47858
|
-
...
|
|
47859
|
-
ownerState: { expanded:
|
|
47858
|
+
...a,
|
|
47859
|
+
ownerState: { expanded: c.expanded },
|
|
47860
47860
|
color: "default",
|
|
47861
|
-
"aria-disabled":
|
|
47861
|
+
"aria-disabled": c.expanded,
|
|
47862
47862
|
children: /* @__PURE__ */ b.jsx(Iu, { fontSize: "small" })
|
|
47863
47863
|
}
|
|
47864
47864
|
) })
|
|
@@ -47867,19 +47867,19 @@ function DG({ label: e, labelTooltip: t, toolbarSlot: o }) {
|
|
|
47867
47867
|
/* @__PURE__ */ b.jsx(
|
|
47868
47868
|
yc,
|
|
47869
47869
|
{
|
|
47870
|
-
render: ({ ref:
|
|
47870
|
+
render: ({ ref: a, ...c }, u) => /* @__PURE__ */ b.jsx(
|
|
47871
47871
|
kG,
|
|
47872
47872
|
{
|
|
47873
|
-
...
|
|
47874
|
-
ownerState: { expanded:
|
|
47875
|
-
inputRef:
|
|
47873
|
+
...c,
|
|
47874
|
+
ownerState: { expanded: u.expanded },
|
|
47875
|
+
inputRef: a,
|
|
47876
47876
|
"aria-label": "Search",
|
|
47877
47877
|
placeholder: "Search...",
|
|
47878
47878
|
size: "small",
|
|
47879
47879
|
slotProps: {
|
|
47880
47880
|
input: {
|
|
47881
47881
|
startAdornment: /* @__PURE__ */ b.jsx(Pa, { position: "start", children: /* @__PURE__ */ b.jsx(Iu, { fontSize: "small" }) }),
|
|
47882
|
-
endAdornment:
|
|
47882
|
+
endAdornment: u.value ? /* @__PURE__ */ b.jsx(Pa, { position: "end", children: /* @__PURE__ */ b.jsx(
|
|
47883
47883
|
Cc,
|
|
47884
47884
|
{
|
|
47885
47885
|
edge: "end",
|
|
@@ -47889,9 +47889,9 @@ function DG({ label: e, labelTooltip: t, toolbarSlot: o }) {
|
|
|
47889
47889
|
children: /* @__PURE__ */ b.jsx(OG, { fontSize: "small" })
|
|
47890
47890
|
}
|
|
47891
47891
|
) }) : null,
|
|
47892
|
-
...
|
|
47892
|
+
...c.slotProps?.input
|
|
47893
47893
|
},
|
|
47894
|
-
...
|
|
47894
|
+
...c.slotProps
|
|
47895
47895
|
}
|
|
47896
47896
|
}
|
|
47897
47897
|
)
|
|
@@ -47963,7 +47963,7 @@ const r2 = (e) => {
|
|
|
47963
47963
|
...d
|
|
47964
47964
|
},
|
|
47965
47965
|
slots: {
|
|
47966
|
-
toolbar: () => /* @__PURE__ */ b.jsx(DG, { ...x }),
|
|
47966
|
+
toolbar: (T) => /* @__PURE__ */ b.jsx(DG, { ...T, ...x }),
|
|
47967
47967
|
...h
|
|
47968
47968
|
},
|
|
47969
47969
|
...w
|
|
@@ -50457,4 +50457,4 @@ export {
|
|
|
50457
50457
|
KN as y,
|
|
50458
50458
|
Tp as z
|
|
50459
50459
|
};
|
|
50460
|
-
//# sourceMappingURL=index-
|
|
50460
|
+
//# sourceMappingURL=index-DcWKaNIZ.js.map
|