@krosoft/react 0.0.419 → 0.0.421
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/components/core/changelog/AppChangelog.d.ts.map +1 -1
- package/dist/components/core/changelog/AppChangelog.js +47 -48
- package/dist/components/core/clipboard/AppCodeBlock.d.ts +16 -0
- package/dist/components/core/clipboard/AppCodeBlock.d.ts.map +1 -0
- package/dist/components/core/clipboard/AppCodeBlock.js +30 -0
- package/dist/components/core/clipboard/AppCopyableValue.d.ts +11 -0
- package/dist/components/core/clipboard/AppCopyableValue.d.ts.map +1 -0
- package/dist/components/core/clipboard/AppCopyableValue.js +26 -0
- package/dist/components/core/clipboard/index.d.ts +5 -0
- package/dist/components/core/clipboard/index.d.ts.map +1 -0
- package/dist/components/core/clipboard/index.js +3 -0
- package/dist/components/core/index.d.ts +1 -0
- package/dist/components/core/index.d.ts.map +1 -1
- package/dist/components/core/index.js +55 -53
- package/dist/components/core/markdown/AppMarkdownHeading.d.ts.map +1 -1
- package/dist/components/core/markdown/AppMarkdownHeading.js +13 -14
- package/dist/components/index.js +55 -53
- package/dist/hooks/behavior/index.d.ts +2 -0
- package/dist/hooks/behavior/index.d.ts.map +1 -1
- package/dist/hooks/behavior/index.js +9 -8
- package/dist/hooks/behavior/useCopyToClipboard.d.ts +15 -0
- package/dist/hooks/behavior/useCopyToClipboard.d.ts.map +1 -0
- package/dist/hooks/behavior/useCopyToClipboard.js +14 -0
- package/dist/hooks/index.js +18 -17
- package/dist/i18n/krosoftLocales.d.ts +18 -0
- package/dist/i18n/krosoftLocales.d.ts.map +1 -1
- package/dist/locales/en.json.js +11 -2
- package/dist/locales/fr.json.js +11 -2
- package/package.json +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AppChangelog.d.ts","sourceRoot":"","sources":["../../../../src/components/core/changelog/AppChangelog.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,GAAG,EAAE,MAAM,OAAO,CAAC;AAYjC,MAAM,WAAW,iBAAiB;IAChC;;;OAGG;IACH,OAAO,EAAE,MAAM,CAAC;IAChB,sGAAsG;IACtG,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,0DAA0D;IAC1D,UAAU,CAAC,EAAE,OAAO,CAAC;CACtB;AAKD;;;;GAIG;AACH,eAAO,MAAM,YAAY,GAAI,kCAAgD,iBAAiB,KAAG,GAAG,CAAC,
|
|
1
|
+
{"version":3,"file":"AppChangelog.d.ts","sourceRoot":"","sources":["../../../../src/components/core/changelog/AppChangelog.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,GAAG,EAAE,MAAM,OAAO,CAAC;AAYjC,MAAM,WAAW,iBAAiB;IAChC;;;OAGG;IACH,OAAO,EAAE,MAAM,CAAC;IAChB,sGAAsG;IACtG,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,0DAA0D;IAC1D,UAAU,CAAC,EAAE,OAAO,CAAC;CACtB;AAKD;;;;GAIG;AACH,eAAO,MAAM,YAAY,GAAI,kCAAgD,iBAAiB,KAAG,GAAG,CAAC,OA2IpG,CAAC"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { SearchInput as e } from "../inputs/SearchInput.js";
|
|
2
2
|
import { filterChangelog as t, getChangelogItemAnchors as n, getChangelogTags as r, parseChangelog as i, splitChangelogItems as a } from "../../../helpers/changelog.helper.js";
|
|
3
3
|
import { cn as o } from "../../../helpers/tailwind.helper.js";
|
|
4
|
-
import {
|
|
4
|
+
import { useCopyToClipboard as s } from "../../../hooks/behavior/useCopyToClipboard.js";
|
|
5
5
|
import { useKrosoftTranslation as c } from "../../../i18n/useKrosoftTranslation.js";
|
|
6
6
|
import { AppChangelogEntry as l } from "./AppChangelogEntry.js";
|
|
7
7
|
import { AppChangelogNav as u } from "./AppChangelogNav.js";
|
|
@@ -11,24 +11,27 @@ import { jsx as h, jsxs as g } from "react/jsx-runtime";
|
|
|
11
11
|
import { useLocation as _, useNavigate as v } from "react-router-dom";
|
|
12
12
|
// src/components/core/changelog/AppChangelog.tsx
|
|
13
13
|
var y = "0px 0px -60% 0px", b = ({ content: b, showNav: x = !0, showSearch: S = !0 }) => {
|
|
14
|
-
let { t: C } = c(), {
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
14
|
+
let { t: C } = c(), { copy: w } = s({
|
|
15
|
+
successKey: "markdown.linkCopied",
|
|
16
|
+
errorKey: "markdown.linkCopyError"
|
|
17
|
+
}), T = _(), E = v(), [D, O] = m(""), [k, A] = m([]), [j, M] = m(), N = p(() => i(b), [b]), P = p(() => r(N), [N]), F = p(() => t(N, D, k), [
|
|
18
|
+
N,
|
|
19
|
+
D,
|
|
20
|
+
k
|
|
21
|
+
]), I = (e) => {
|
|
22
|
+
A((t) => t.includes(e) ? t.filter((t) => t !== e) : [...t, e]);
|
|
23
|
+
}, L = p(() => {
|
|
21
24
|
let e = /* @__PURE__ */ new Map();
|
|
22
|
-
return
|
|
25
|
+
return F.forEach((t) => {
|
|
23
26
|
n(t.id, a(t.content)).forEach((n) => {
|
|
24
27
|
n !== void 0 && e.set(n, t.id);
|
|
25
28
|
});
|
|
26
29
|
}), e;
|
|
27
|
-
}, [
|
|
30
|
+
}, [F]), R = decodeURIComponent(T.hash.slice(1)), z = F.some((e) => e.id === R) ? R : L.get(R), B = z === void 0 ? void 0 : R, V = F.some((e) => e.id === j) ? j : z ?? F[0]?.id;
|
|
28
31
|
f(() => {
|
|
29
|
-
if (!
|
|
32
|
+
if (!B) return;
|
|
30
33
|
let e = requestAnimationFrame(() => {
|
|
31
|
-
document.getElementById(
|
|
34
|
+
document.getElementById(B)?.scrollIntoView({
|
|
32
35
|
behavior: "smooth",
|
|
33
36
|
block: "start"
|
|
34
37
|
});
|
|
@@ -36,51 +39,47 @@ var y = "0px 0px -60% 0px", b = ({ content: b, showNav: x = !0, showSearch: S =
|
|
|
36
39
|
return () => {
|
|
37
40
|
cancelAnimationFrame(e);
|
|
38
41
|
};
|
|
39
|
-
}, [
|
|
42
|
+
}, [B]), f(() => {
|
|
40
43
|
let e = /* @__PURE__ */ new Set(), t = new IntersectionObserver((t) => {
|
|
41
44
|
t.forEach((t) => {
|
|
42
45
|
t.isIntersecting ? e.add(t.target.id) : e.delete(t.target.id);
|
|
43
46
|
});
|
|
44
|
-
let n =
|
|
45
|
-
n &&
|
|
47
|
+
let n = F.find((t) => e.has(t.id));
|
|
48
|
+
n && M(n.id);
|
|
46
49
|
}, { rootMargin: y });
|
|
47
|
-
return
|
|
50
|
+
return F.forEach((e) => {
|
|
48
51
|
let n = document.getElementById(e.id);
|
|
49
52
|
n && t.observe(n);
|
|
50
53
|
}), () => {
|
|
51
54
|
t.disconnect();
|
|
52
55
|
};
|
|
53
|
-
}, [
|
|
54
|
-
let
|
|
55
|
-
|
|
56
|
-
search:
|
|
56
|
+
}, [F]);
|
|
57
|
+
let H = (e) => {
|
|
58
|
+
E({
|
|
59
|
+
search: T.search,
|
|
57
60
|
hash: `#${e}`
|
|
58
61
|
}, { replace: !0 });
|
|
59
|
-
},
|
|
60
|
-
|
|
61
|
-
let t = `${window.location.origin}${
|
|
62
|
-
|
|
63
|
-
await navigator.clipboard.writeText(t), w(C("markdown.linkCopied"));
|
|
64
|
-
} catch {
|
|
65
|
-
T(C("markdown.linkCopyError"));
|
|
66
|
-
}
|
|
62
|
+
}, U = async (e) => {
|
|
63
|
+
H(e);
|
|
64
|
+
let t = `${window.location.origin}${T.pathname}${T.search}#${e}`;
|
|
65
|
+
await w(t);
|
|
67
66
|
};
|
|
68
|
-
if (
|
|
67
|
+
if (N.length === 0) return /* @__PURE__ */ h("p", {
|
|
69
68
|
className: "text-sm text-muted-foreground",
|
|
70
69
|
children: C("changelog.empty")
|
|
71
70
|
});
|
|
72
|
-
let
|
|
71
|
+
let W = /* @__PURE__ */ g("div", {
|
|
73
72
|
className: "flex flex-col gap-4",
|
|
74
73
|
children: [/* @__PURE__ */ h(e, {
|
|
75
|
-
search:
|
|
76
|
-
onSearch:
|
|
74
|
+
search: D,
|
|
75
|
+
onSearch: O,
|
|
77
76
|
className: "md:w-full"
|
|
78
|
-
}),
|
|
79
|
-
tags:
|
|
80
|
-
selected:
|
|
81
|
-
onToggle:
|
|
77
|
+
}), P.length > 0 ? /* @__PURE__ */ h(d, {
|
|
78
|
+
tags: P,
|
|
79
|
+
selected: k,
|
|
80
|
+
onToggle: I,
|
|
82
81
|
onClear: () => {
|
|
83
|
-
|
|
82
|
+
A([]);
|
|
84
83
|
}
|
|
85
84
|
}) : null]
|
|
86
85
|
});
|
|
@@ -88,10 +87,10 @@ var y = "0px 0px -60% 0px", b = ({ content: b, showNav: x = !0, showSearch: S =
|
|
|
88
87
|
className: "flex gap-10",
|
|
89
88
|
children: [x ? /* @__PURE__ */ g("aside", {
|
|
90
89
|
className: "sticky top-4 hidden max-h-[calc(100vh-2rem)] w-60 shrink-0 flex-col gap-8 self-start lg:flex",
|
|
91
|
-
children: [S ?
|
|
92
|
-
entries:
|
|
93
|
-
activeId:
|
|
94
|
-
onSelect:
|
|
90
|
+
children: [S ? W : null, F.length > 0 ? /* @__PURE__ */ h(u, {
|
|
91
|
+
entries: F,
|
|
92
|
+
activeId: V,
|
|
93
|
+
onSelect: H,
|
|
95
94
|
className: "min-h-0 flex-1 overflow-y-auto"
|
|
96
95
|
}) : null]
|
|
97
96
|
}) : null, /* @__PURE__ */ g("div", {
|
|
@@ -99,20 +98,20 @@ var y = "0px 0px -60% 0px", b = ({ content: b, showNav: x = !0, showSearch: S =
|
|
|
99
98
|
children: [
|
|
100
99
|
S ? /* @__PURE__ */ h("div", {
|
|
101
100
|
className: o("mb-6 md:max-w-md", x && "lg:hidden"),
|
|
102
|
-
children:
|
|
101
|
+
children: W
|
|
103
102
|
}) : null,
|
|
104
|
-
|
|
103
|
+
F.length === 0 ? /* @__PURE__ */ h("p", {
|
|
105
104
|
className: "text-sm text-muted-foreground",
|
|
106
105
|
children: C("changelog.noResult")
|
|
107
106
|
}) : null,
|
|
108
107
|
/* @__PURE__ */ h("div", {
|
|
109
108
|
className: "divide-y",
|
|
110
|
-
children:
|
|
109
|
+
children: F.map((e) => /* @__PURE__ */ h(l, {
|
|
111
110
|
entry: e,
|
|
112
|
-
onSelect:
|
|
113
|
-
onCopyLink: (e) => void
|
|
114
|
-
selectedTags:
|
|
115
|
-
linkedId:
|
|
111
|
+
onSelect: H,
|
|
112
|
+
onCopyLink: (e) => void U(e),
|
|
113
|
+
selectedTags: k,
|
|
114
|
+
linkedId: B
|
|
116
115
|
}, e.id))
|
|
117
116
|
})
|
|
118
117
|
]
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import type { JSX } from "react";
|
|
2
|
+
export interface AppCodeBlockProps {
|
|
3
|
+
content: string;
|
|
4
|
+
/** Classe de hauteur maximale du bloc, au-delà de laquelle il défile. `max-h-80` par défaut. */
|
|
5
|
+
maxHeightClassName?: string;
|
|
6
|
+
/**
|
|
7
|
+
* Remplit toute la hauteur du parent, sans bordure : pour une dialog dont le bloc est le seul contenu.
|
|
8
|
+
* Le parent doit avoir une hauteur définie ; `maxHeightClassName` est alors ignoré.
|
|
9
|
+
*/
|
|
10
|
+
fill?: boolean;
|
|
11
|
+
/** Retour à la ligne, coupé n'importe où : pour une commande ou une clé à copier, plutôt qu'un défilement horizontal. */
|
|
12
|
+
wrap?: boolean;
|
|
13
|
+
}
|
|
14
|
+
/** Bloc de code monospace défilant (JSON, stack trace) avec un bouton de copie. */
|
|
15
|
+
export declare const AppCodeBlock: ({ content, maxHeightClassName, fill, wrap }: AppCodeBlockProps) => JSX.Element;
|
|
16
|
+
//# sourceMappingURL=AppCodeBlock.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"AppCodeBlock.d.ts","sourceRoot":"","sources":["../../../../src/components/core/clipboard/AppCodeBlock.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,GAAG,EAAE,MAAM,OAAO,CAAC;AAOjC,MAAM,WAAW,iBAAiB;IAChC,OAAO,EAAE,MAAM,CAAC;IAChB,gGAAgG;IAChG,kBAAkB,CAAC,EAAE,MAAM,CAAC;IAC5B;;;OAGG;IACH,IAAI,CAAC,EAAE,OAAO,CAAC;IACf,yHAAyH;IACzH,IAAI,CAAC,EAAE,OAAO,CAAC;CAChB;AAED,mFAAmF;AACnF,eAAO,MAAM,YAAY,GAAI,6CAA0E,iBAAiB,KAAG,GAAG,CAAC,OA4B9H,CAAC"}
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import { Button as e } from "../../ui/button.js";
|
|
2
|
+
import { cn as t } from "../../../helpers/tailwind.helper.js";
|
|
3
|
+
import { useCopyToClipboard as n } from "../../../hooks/behavior/useCopyToClipboard.js";
|
|
4
|
+
import { useKrosoftTranslation as r } from "../../../i18n/useKrosoftTranslation.js";
|
|
5
|
+
import { jsx as i, jsxs as a } from "react/jsx-runtime";
|
|
6
|
+
import { CopyIcon as o } from "lucide-react";
|
|
7
|
+
// src/components/core/clipboard/AppCodeBlock.tsx
|
|
8
|
+
var s = ({ content: s, maxHeightClassName: c = "max-h-80", fill: l = !1, wrap: u = !1 }) => {
|
|
9
|
+
let { t: d } = r(), { copy: f } = n({
|
|
10
|
+
successKey: "codeBlock.copied",
|
|
11
|
+
errorKey: "codeBlock.copyFailed"
|
|
12
|
+
});
|
|
13
|
+
return /* @__PURE__ */ a("div", {
|
|
14
|
+
className: t("relative", l && "h-full"),
|
|
15
|
+
children: [/* @__PURE__ */ i(e, {
|
|
16
|
+
type: "button",
|
|
17
|
+
variant: "outline",
|
|
18
|
+
size: "icon",
|
|
19
|
+
className: "absolute right-2 top-2 size-7",
|
|
20
|
+
title: d("copy.action"),
|
|
21
|
+
"aria-label": d("copy.action"),
|
|
22
|
+
onClick: () => void f(s),
|
|
23
|
+
children: /* @__PURE__ */ i(o, { className: "size-3.5" })
|
|
24
|
+
}), /* @__PURE__ */ i("pre", {
|
|
25
|
+
className: t("overflow-auto rounded-md border bg-muted/50 p-3 pr-12 font-mono text-xs leading-relaxed", u && "whitespace-pre-wrap break-all", l ? "h-full rounded-none border-0" : c),
|
|
26
|
+
children: s
|
|
27
|
+
})]
|
|
28
|
+
});
|
|
29
|
+
};
|
|
30
|
+
export { s as AppCodeBlock };
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import type { JSX, ReactNode } from "react";
|
|
2
|
+
export interface AppCopyableValueProps {
|
|
3
|
+
/** Valeur copiée. */
|
|
4
|
+
value: string;
|
|
5
|
+
/** Contenu affiché (un lien par exemple), la valeur à défaut. */
|
|
6
|
+
children?: ReactNode;
|
|
7
|
+
className?: string;
|
|
8
|
+
}
|
|
9
|
+
/** Valeur (ID, identifiant...) suivie d'un bouton de copie qui apparaît au survol. */
|
|
10
|
+
export declare const AppCopyableValue: ({ value, children, className }: AppCopyableValueProps) => JSX.Element;
|
|
11
|
+
//# sourceMappingURL=AppCopyableValue.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"AppCopyableValue.d.ts","sourceRoot":"","sources":["../../../../src/components/core/clipboard/AppCopyableValue.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,GAAG,EAAc,SAAS,EAAE,MAAM,OAAO,CAAC;AAMxD,MAAM,WAAW,qBAAqB;IACpC,qBAAqB;IACrB,KAAK,EAAE,MAAM,CAAC;IACd,iEAAiE;IACjE,QAAQ,CAAC,EAAE,SAAS,CAAC;IACrB,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAED,sFAAsF;AACtF,eAAO,MAAM,gBAAgB,GAAI,gCAAgC,qBAAqB,KAAG,GAAG,CAAC,OAwB5F,CAAC"}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import { cn as e } from "../../../helpers/tailwind.helper.js";
|
|
2
|
+
import { useCopyToClipboard as t } from "../../../hooks/behavior/useCopyToClipboard.js";
|
|
3
|
+
import { useKrosoftTranslation as n } from "../../../i18n/useKrosoftTranslation.js";
|
|
4
|
+
import { jsx as r, jsxs as i } from "react/jsx-runtime";
|
|
5
|
+
import { CopyIcon as a } from "lucide-react";
|
|
6
|
+
// src/components/core/clipboard/AppCopyableValue.tsx
|
|
7
|
+
var o = ({ value: o, children: s, className: c }) => {
|
|
8
|
+
let { t: l } = n(), { copy: u } = t();
|
|
9
|
+
return /* @__PURE__ */ i("span", {
|
|
10
|
+
className: e("group inline-flex max-w-full items-center gap-1.5", c),
|
|
11
|
+
children: [/* @__PURE__ */ r("span", {
|
|
12
|
+
className: "min-w-0 break-all",
|
|
13
|
+
children: s ?? o
|
|
14
|
+
}), /* @__PURE__ */ r("button", {
|
|
15
|
+
type: "button",
|
|
16
|
+
className: "shrink-0 rounded p-0.5 text-muted-foreground opacity-0 transition-opacity hover:text-foreground focus-visible:opacity-100 group-hover:opacity-100",
|
|
17
|
+
title: l("copy.action"),
|
|
18
|
+
"aria-label": l("copy.action"),
|
|
19
|
+
onClick: (e) => {
|
|
20
|
+
e.stopPropagation(), u(o);
|
|
21
|
+
},
|
|
22
|
+
children: /* @__PURE__ */ r(a, { className: "size-3.5" })
|
|
23
|
+
})]
|
|
24
|
+
});
|
|
25
|
+
};
|
|
26
|
+
export { o as AppCopyableValue };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/core/clipboard/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAC;AAC9C,YAAY,EAAE,iBAAiB,EAAE,MAAM,gBAAgB,CAAC;AACxD,OAAO,EAAE,gBAAgB,EAAE,MAAM,oBAAoB,CAAC;AACtD,YAAY,EAAE,qBAAqB,EAAE,MAAM,oBAAoB,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/core/index.ts"],"names":[],"mappings":"AAAA,cAAc,SAAS,CAAC;AACxB,cAAc,aAAa,CAAC;AAC5B,cAAc,UAAU,CAAC;AACzB,cAAc,WAAW,CAAC;AAC1B,cAAc,WAAW,CAAC;AAC1B,cAAc,SAAS,CAAC;AACxB,cAAc,SAAS,CAAC;AACxB,cAAc,UAAU,CAAC;AACzB,cAAc,YAAY,CAAC;AAC3B,cAAc,WAAW,CAAC;AAC1B,cAAc,UAAU,CAAC;AACzB,cAAc,UAAU,CAAC;AACzB,cAAc,SAAS,CAAC;AACxB,cAAc,QAAQ,CAAC;AACvB,cAAc,SAAS,CAAC;AACxB,cAAc,YAAY,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/core/index.ts"],"names":[],"mappings":"AAAA,cAAc,SAAS,CAAC;AACxB,cAAc,aAAa,CAAC;AAC5B,cAAc,aAAa,CAAC;AAC5B,cAAc,UAAU,CAAC;AACzB,cAAc,WAAW,CAAC;AAC1B,cAAc,WAAW,CAAC;AAC1B,cAAc,SAAS,CAAC;AACxB,cAAc,SAAS,CAAC;AACxB,cAAc,UAAU,CAAC;AACzB,cAAc,YAAY,CAAC;AAC3B,cAAc,WAAW,CAAC;AAC1B,cAAc,UAAU,CAAC;AACzB,cAAc,UAAU,CAAC;AACzB,cAAc,SAAS,CAAC;AACxB,cAAc,QAAQ,CAAC;AACvB,cAAc,SAAS,CAAC;AACxB,cAAc,YAAY,CAAC"}
|
|
@@ -17,56 +17,58 @@ import { ChartCard as T } from "./charts/ChartCard.js";
|
|
|
17
17
|
import { CircularGauge as E } from "./charts/CircularGauge.js";
|
|
18
18
|
import { LineChart as D } from "./charts/LineChart.js";
|
|
19
19
|
import { PieChart as O } from "./charts/PieChart.js";
|
|
20
|
-
import {
|
|
21
|
-
import {
|
|
22
|
-
import {
|
|
23
|
-
import {
|
|
24
|
-
import {
|
|
25
|
-
import {
|
|
26
|
-
import {
|
|
27
|
-
import I from "./
|
|
28
|
-
import {
|
|
29
|
-
import
|
|
30
|
-
import {
|
|
31
|
-
import {
|
|
32
|
-
import {
|
|
33
|
-
import {
|
|
34
|
-
import {
|
|
35
|
-
import {
|
|
36
|
-
import {
|
|
37
|
-
import {
|
|
38
|
-
import {
|
|
39
|
-
import {
|
|
40
|
-
import {
|
|
41
|
-
import {
|
|
42
|
-
import {
|
|
43
|
-
import {
|
|
44
|
-
import {
|
|
45
|
-
import {
|
|
46
|
-
import {
|
|
47
|
-
import {
|
|
48
|
-
import {
|
|
49
|
-
import {
|
|
50
|
-
import {
|
|
51
|
-
import {
|
|
52
|
-
import {
|
|
53
|
-
import {
|
|
54
|
-
import {
|
|
55
|
-
import {
|
|
56
|
-
import {
|
|
57
|
-
import {
|
|
58
|
-
import {
|
|
59
|
-
import {
|
|
60
|
-
import {
|
|
61
|
-
import {
|
|
62
|
-
import {
|
|
63
|
-
import {
|
|
64
|
-
import {
|
|
65
|
-
import {
|
|
66
|
-
import {
|
|
67
|
-
import {
|
|
68
|
-
import {
|
|
69
|
-
import {
|
|
70
|
-
import {
|
|
71
|
-
import {
|
|
72
|
-
|
|
20
|
+
import { AppCodeBlock as k } from "./clipboard/AppCodeBlock.js";
|
|
21
|
+
import { AppCopyableValue as A } from "./clipboard/AppCopyableValue.js";
|
|
22
|
+
import { ErrorAlert as j } from "./states/ErrorAlert.js";
|
|
23
|
+
import { AppDialog as M } from "./dialogs/AppDialog.js";
|
|
24
|
+
import { ImageInput as N } from "./inputs/ImageInput.js";
|
|
25
|
+
import { AppActions as P } from "./layouts/AppActions.js";
|
|
26
|
+
import { AppSubTitle as F } from "./layouts/AppSubTitle.js";
|
|
27
|
+
import { MultiSelect as I } from "./inputs/MultiSelect.js";
|
|
28
|
+
import { GenericForm as L } from "./forms/GenericForm.js";
|
|
29
|
+
import R from "./dialogs/FormDialog.js";
|
|
30
|
+
import { ConfirmationDialog as z } from "./dialogs/ConfirmationDialog.js";
|
|
31
|
+
import { AboutDialog as B } from "./dialogs/AboutDialog.js";
|
|
32
|
+
import { ActiveFilters as V } from "./filters/ActiveFilters.js";
|
|
33
|
+
import { DatePicker as H } from "./inputs/DatePicker.js";
|
|
34
|
+
import { DateRangePicker as U } from "./inputs/DateRangePicker.js";
|
|
35
|
+
import { SingleSelect as W } from "./inputs/SingleSelect.js";
|
|
36
|
+
import { FilterField as G } from "./filters/FilterField.js";
|
|
37
|
+
import { AdvancedFilters as K } from "./filters/AdvancedFilters.js";
|
|
38
|
+
import { FilterPillsGroup as q } from "./filters/FilterPillsGroup.js";
|
|
39
|
+
import { FilterPills as J } from "./filters/FilterPills.js";
|
|
40
|
+
import { FiltersMobileDrawer as Y } from "./filters/FiltersMobileDrawer.js";
|
|
41
|
+
import { FiltersContainer as X } from "./filters/FiltersContainer.js";
|
|
42
|
+
import { TableFilter as Z } from "./filters/TableFilter.js";
|
|
43
|
+
import { ConditionFilter as Q } from "./filters/ConditionFilter.js";
|
|
44
|
+
import { ConditionFilterGroup as $ } from "./filters/ConditionFilterGroup.js";
|
|
45
|
+
import { FlagFrIcon as ee } from "./icons/FlagFrIcon.js";
|
|
46
|
+
import { FlagGbIcon as te } from "./icons/FlagGbIcon.js";
|
|
47
|
+
import { FileDropzone as ne } from "./inputs/FileDropzone.js";
|
|
48
|
+
import { RatingInput as re } from "./inputs/RatingInput.js";
|
|
49
|
+
import { LanguageSelector as ie } from "./language/LanguageSelector.js";
|
|
50
|
+
import { AppTitle as ae } from "./layouts/AppTitle.js";
|
|
51
|
+
import { AppPageHeader as oe } from "./layouts/AppPageHeader.js";
|
|
52
|
+
import { ErrorState as se } from "./states/ErrorState.js";
|
|
53
|
+
import { LoadingState as ce } from "./states/LoadingState.js";
|
|
54
|
+
import { KpiCardsLayout as le } from "./layouts/KpiCardsLayout.js";
|
|
55
|
+
import { GlobalSearch as ue } from "./navbar/GlobalSearch.js";
|
|
56
|
+
import { NotificationsBell as de } from "./navbar/NotificationsBell.js";
|
|
57
|
+
import { SidebarNavItem as fe } from "./navbar/SidebarNavItem.js";
|
|
58
|
+
import { Sidebar as pe } from "./navbar/Sidebar.js";
|
|
59
|
+
import { SidebarHeader as me } from "./navbar/SidebarHeader.js";
|
|
60
|
+
import { Topbar as he } from "./navbar/Topbar.js";
|
|
61
|
+
import { TableActions as ge } from "./table/TableActions.js";
|
|
62
|
+
import { TableBody as _e } from "./table/TableBody.js";
|
|
63
|
+
import { TableBulkActions as ve } from "./table/TableBulkActions.js";
|
|
64
|
+
import { TableHeader as ye } from "./table/TableHeader.js";
|
|
65
|
+
import { TablePagination as be } from "./table/TablePagination.js";
|
|
66
|
+
import { TableSettings as xe } from "./table/TableSettings.js";
|
|
67
|
+
import { DataTable as Se } from "./table/DataTable.js";
|
|
68
|
+
import { JsonTableOutput as Ce } from "./table/JsonTableOutput.js";
|
|
69
|
+
import { AppTabHeader as we } from "./tabs/AppTabHeader.js";
|
|
70
|
+
import { AppTabContainer as Te } from "./tabs/AppTabContainer.js";
|
|
71
|
+
import { AppTabs as Ee } from "./tabs/AppTabs.js";
|
|
72
|
+
import { AppVerticalTabs as De } from "./tabs/AppVerticalTabs.js";
|
|
73
|
+
import { ThemeSelector as Oe } from "./theme/ThemeSelector.js";
|
|
74
|
+
export { B as AboutDialog, V as ActiveFilters, K as AdvancedFilters, P as AppActions, b as AppChangelog, k as AppCodeBlock, A as AppCopyableValue, M as AppDialog, y as AppMarkdown, oe as AppPageHeader, F as AppSubTitle, Te as AppTabContainer, we as AppTabHeader, Ee as AppTabs, ae as AppTitle, De as AppVerticalTabs, x as BarChartHorizontal, S as BarChartVertical, C as CHART_COLORS, T as ChartCard, E as CircularGauge, Q as ConditionFilter, $ as ConditionFilterGroup, z as ConfirmationDialog, e as DashboardCard, Se as DataTable, H as DatePicker, U as DateRangePicker, t as Dialog, n as DialogClose, r as DialogContent, i as DialogDescription, a as DialogFooter, o as DialogHeader, s as DialogOverlay, c as DialogPortal, l as DialogTitle, u as DialogTrigger, j as ErrorAlert, se as ErrorState, ne as FileDropzone, G as FilterField, J as FilterPills, q as FilterPillsGroup, X as FiltersContainer, Y as FiltersMobileDrawer, ee as FlagFrIcon, te as FlagGbIcon, R as FormDialog, L as GenericForm, ue as GlobalSearch, N as ImageInput, Ce as JsonTableOutput, f as KpiCard, p as KpiCards, le as KpiCardsLayout, m as KpiMultiCard, ie as LanguageSelector, D as LineChart, ce as LoadingState, h as MetricCard, I as MultiSelect, de as NotificationsBell, O as PieChart, d as Progress, re as RatingInput, v as SearchInput, pe as Sidebar, me as SidebarHeader, fe as SidebarNavItem, W as SingleSelect, g as SkeletonCard, _ as SkeletonCards, ge as TableActions, _e as TableBody, ve as TableBulkActions, Z as TableFilter, ye as TableHeader, be as TablePagination, xe as TableSettings, Oe as ThemeSelector, he as Topbar, w as getChartColor };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AppMarkdownHeading.d.ts","sourceRoot":"","sources":["../../../../src/components/core/markdown/AppMarkdownHeading.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,GAAG,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAO5C,UAAU,uBAAuB;IAC/B,KAAK,EAAE,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC;IACjB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,EAAE,CAAC,EAAE,MAAM,CAAC;IACZ,0FAA0F;IAC1F,MAAM,CAAC,EAAE,OAAO,CAAC;IACjB,QAAQ,EAAE,SAAS,CAAC;CACrB;AAID;;;;GAIG;AACH,eAAO,MAAM,kBAAkB,GAAI,4CAAmD,uBAAuB,KAAG,GAAG,CAAC,
|
|
1
|
+
{"version":3,"file":"AppMarkdownHeading.d.ts","sourceRoot":"","sources":["../../../../src/components/core/markdown/AppMarkdownHeading.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,GAAG,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAO5C,UAAU,uBAAuB;IAC/B,KAAK,EAAE,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC;IACjB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,EAAE,CAAC,EAAE,MAAM,CAAC;IACZ,0FAA0F;IAC1F,MAAM,CAAC,EAAE,OAAO,CAAC;IACjB,QAAQ,EAAE,SAAS,CAAC;CACrB;AAID;;;;GAIG;AACH,eAAO,MAAM,kBAAkB,GAAI,4CAAmD,uBAAuB,KAAG,GAAG,CAAC,OA0CnH,CAAC"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { cn as e } from "../../../helpers/tailwind.helper.js";
|
|
2
|
-
import {
|
|
2
|
+
import { useCopyToClipboard as t } from "../../../hooks/behavior/useCopyToClipboard.js";
|
|
3
3
|
import { useKrosoftTranslation as n } from "../../../i18n/useKrosoftTranslation.js";
|
|
4
4
|
import { jsx as r, jsxs as i } from "react/jsx-runtime";
|
|
5
5
|
import { LinkIcon as a } from "lucide-react";
|
|
@@ -10,30 +10,29 @@ var c = {
|
|
|
10
10
|
3: "h3",
|
|
11
11
|
4: "h4"
|
|
12
12
|
}, l = ({ level: l, className: u, id: d, anchor: f = !0, children: p }) => {
|
|
13
|
-
let { t: m } = n(), {
|
|
14
|
-
|
|
13
|
+
let { t: m } = n(), { copy: h } = t({
|
|
14
|
+
successKey: "markdown.linkCopied",
|
|
15
|
+
errorKey: "markdown.linkCopyError"
|
|
16
|
+
}), g = o(), _ = s(), v = c[l];
|
|
17
|
+
if (!f || !d) return /* @__PURE__ */ r(v, {
|
|
15
18
|
id: d,
|
|
16
19
|
className: u,
|
|
17
20
|
children: p
|
|
18
21
|
});
|
|
19
|
-
let
|
|
20
|
-
|
|
21
|
-
search:
|
|
22
|
+
let y = async () => {
|
|
23
|
+
_({
|
|
24
|
+
search: g.search,
|
|
22
25
|
hash: `#${d}`
|
|
23
26
|
}, { replace: !0 });
|
|
24
|
-
let e = `${window.location.origin}${
|
|
25
|
-
|
|
26
|
-
await navigator.clipboard.writeText(e), h(m("markdown.linkCopied"));
|
|
27
|
-
} catch {
|
|
28
|
-
g(m("markdown.linkCopyError"));
|
|
29
|
-
}
|
|
27
|
+
let e = `${window.location.origin}${g.pathname}${g.search}#${d}`;
|
|
28
|
+
await h(e);
|
|
30
29
|
};
|
|
31
|
-
return /* @__PURE__ */ i(
|
|
30
|
+
return /* @__PURE__ */ i(v, {
|
|
32
31
|
id: d,
|
|
33
32
|
className: e("group", u),
|
|
34
33
|
children: [p, /* @__PURE__ */ r("button", {
|
|
35
34
|
type: "button",
|
|
36
|
-
onClick: () => void
|
|
35
|
+
onClick: () => void y(),
|
|
37
36
|
title: m("markdown.copyLink"),
|
|
38
37
|
"aria-label": m("markdown.copyLink"),
|
|
39
38
|
className: "ml-2 inline-flex align-middle text-muted-foreground transition-opacity hover:text-primary md:opacity-0 md:group-hover:opacity-100 md:focus-visible:opacity-100",
|
package/dist/components/index.js
CHANGED
|
@@ -63,56 +63,58 @@ import { ChartCard as kr } from "./core/charts/ChartCard.js";
|
|
|
63
63
|
import { CircularGauge as Ar } from "./core/charts/CircularGauge.js";
|
|
64
64
|
import { LineChart as jr } from "./core/charts/LineChart.js";
|
|
65
65
|
import { PieChart as Mr } from "./core/charts/PieChart.js";
|
|
66
|
-
import {
|
|
67
|
-
import {
|
|
68
|
-
import {
|
|
69
|
-
import {
|
|
70
|
-
import {
|
|
71
|
-
import {
|
|
72
|
-
import {
|
|
73
|
-
import Br from "./core/
|
|
74
|
-
import {
|
|
75
|
-
import
|
|
76
|
-
import {
|
|
77
|
-
import {
|
|
78
|
-
import {
|
|
79
|
-
import {
|
|
80
|
-
import {
|
|
81
|
-
import {
|
|
82
|
-
import {
|
|
83
|
-
import {
|
|
84
|
-
import {
|
|
85
|
-
import {
|
|
86
|
-
import {
|
|
87
|
-
import {
|
|
88
|
-
import {
|
|
89
|
-
import {
|
|
90
|
-
import {
|
|
91
|
-
import {
|
|
92
|
-
import {
|
|
93
|
-
import {
|
|
94
|
-
import {
|
|
95
|
-
import {
|
|
96
|
-
import {
|
|
97
|
-
import {
|
|
98
|
-
import {
|
|
99
|
-
import {
|
|
100
|
-
import {
|
|
101
|
-
import {
|
|
102
|
-
import {
|
|
103
|
-
import {
|
|
104
|
-
import {
|
|
105
|
-
import {
|
|
106
|
-
import {
|
|
107
|
-
import {
|
|
108
|
-
import {
|
|
109
|
-
import {
|
|
110
|
-
import {
|
|
111
|
-
import {
|
|
112
|
-
import {
|
|
113
|
-
import {
|
|
114
|
-
import {
|
|
115
|
-
import {
|
|
116
|
-
import {
|
|
117
|
-
import {
|
|
118
|
-
|
|
66
|
+
import { AppCodeBlock as Nr } from "./core/clipboard/AppCodeBlock.js";
|
|
67
|
+
import { AppCopyableValue as Pr } from "./core/clipboard/AppCopyableValue.js";
|
|
68
|
+
import { ErrorAlert as Fr } from "./core/states/ErrorAlert.js";
|
|
69
|
+
import { AppDialog as Ir } from "./core/dialogs/AppDialog.js";
|
|
70
|
+
import { ImageInput as Lr } from "./core/inputs/ImageInput.js";
|
|
71
|
+
import { AppActions as Rr } from "./core/layouts/AppActions.js";
|
|
72
|
+
import { AppSubTitle as zr } from "./core/layouts/AppSubTitle.js";
|
|
73
|
+
import { MultiSelect as Br } from "./core/inputs/MultiSelect.js";
|
|
74
|
+
import { GenericForm as Vr } from "./core/forms/GenericForm.js";
|
|
75
|
+
import Hr from "./core/dialogs/FormDialog.js";
|
|
76
|
+
import { ConfirmationDialog as Ur } from "./core/dialogs/ConfirmationDialog.js";
|
|
77
|
+
import { AboutDialog as Wr } from "./core/dialogs/AboutDialog.js";
|
|
78
|
+
import { ActiveFilters as Gr } from "./core/filters/ActiveFilters.js";
|
|
79
|
+
import { DatePicker as Kr } from "./core/inputs/DatePicker.js";
|
|
80
|
+
import { DateRangePicker as qr } from "./core/inputs/DateRangePicker.js";
|
|
81
|
+
import { SingleSelect as Jr } from "./core/inputs/SingleSelect.js";
|
|
82
|
+
import { FilterField as Yr } from "./core/filters/FilterField.js";
|
|
83
|
+
import { AdvancedFilters as Xr } from "./core/filters/AdvancedFilters.js";
|
|
84
|
+
import { FilterPillsGroup as Zr } from "./core/filters/FilterPillsGroup.js";
|
|
85
|
+
import { FilterPills as Qr } from "./core/filters/FilterPills.js";
|
|
86
|
+
import { FiltersMobileDrawer as $r } from "./core/filters/FiltersMobileDrawer.js";
|
|
87
|
+
import { FiltersContainer as ei } from "./core/filters/FiltersContainer.js";
|
|
88
|
+
import { TableFilter as ti } from "./core/filters/TableFilter.js";
|
|
89
|
+
import { ConditionFilter as ni } from "./core/filters/ConditionFilter.js";
|
|
90
|
+
import { ConditionFilterGroup as ri } from "./core/filters/ConditionFilterGroup.js";
|
|
91
|
+
import { FlagFrIcon as ii } from "./core/icons/FlagFrIcon.js";
|
|
92
|
+
import { FlagGbIcon as ai } from "./core/icons/FlagGbIcon.js";
|
|
93
|
+
import { FileDropzone as oi } from "./core/inputs/FileDropzone.js";
|
|
94
|
+
import { RatingInput as si } from "./core/inputs/RatingInput.js";
|
|
95
|
+
import { LanguageSelector as ci } from "./core/language/LanguageSelector.js";
|
|
96
|
+
import { AppTitle as li } from "./core/layouts/AppTitle.js";
|
|
97
|
+
import { AppPageHeader as ui } from "./core/layouts/AppPageHeader.js";
|
|
98
|
+
import { ErrorState as di } from "./core/states/ErrorState.js";
|
|
99
|
+
import { LoadingState as fi } from "./core/states/LoadingState.js";
|
|
100
|
+
import { KpiCardsLayout as pi } from "./core/layouts/KpiCardsLayout.js";
|
|
101
|
+
import { GlobalSearch as mi } from "./core/navbar/GlobalSearch.js";
|
|
102
|
+
import { NotificationsBell as hi } from "./core/navbar/NotificationsBell.js";
|
|
103
|
+
import { SidebarNavItem as gi } from "./core/navbar/SidebarNavItem.js";
|
|
104
|
+
import { Sidebar as _i } from "./core/navbar/Sidebar.js";
|
|
105
|
+
import { SidebarHeader as vi } from "./core/navbar/SidebarHeader.js";
|
|
106
|
+
import { Topbar as yi } from "./core/navbar/Topbar.js";
|
|
107
|
+
import { TableActions as bi } from "./core/table/TableActions.js";
|
|
108
|
+
import { TableBody as xi } from "./core/table/TableBody.js";
|
|
109
|
+
import { TableBulkActions as Si } from "./core/table/TableBulkActions.js";
|
|
110
|
+
import { TableHeader as Ci } from "./core/table/TableHeader.js";
|
|
111
|
+
import { TablePagination as wi } from "./core/table/TablePagination.js";
|
|
112
|
+
import { TableSettings as Ti } from "./core/table/TableSettings.js";
|
|
113
|
+
import { DataTable as Ei } from "./core/table/DataTable.js";
|
|
114
|
+
import { JsonTableOutput as Di } from "./core/table/JsonTableOutput.js";
|
|
115
|
+
import { AppTabHeader as Oi } from "./core/tabs/AppTabHeader.js";
|
|
116
|
+
import { AppTabContainer as ki } from "./core/tabs/AppTabContainer.js";
|
|
117
|
+
import { AppTabs as Ai } from "./core/tabs/AppTabs.js";
|
|
118
|
+
import { AppVerticalTabs as ji } from "./core/tabs/AppVerticalTabs.js";
|
|
119
|
+
import { ThemeSelector as Mi } from "./core/theme/ThemeSelector.js";
|
|
120
|
+
export { Wr as AboutDialog, s as Accordion, c as AccordionContent, l as AccordionItem, u as AccordionTrigger, Gr as ActiveFilters, Xr as AdvancedFilters, d as Alert, f as AlertDescription, g as AlertDialog, _ as AlertDialogAction, v as AlertDialogCancel, y as AlertDialogContent, b as AlertDialogDescription, x as AlertDialogFooter, S as AlertDialogHeader, C as AlertDialogTitle, w as AlertDialogTrigger, p as AlertTitle, Rr as AppActions, wr as AppChangelog, Nr as AppCodeBlock, Pr as AppCopyableValue, Ir as AppDialog, Cr as AppMarkdown, ui as AppPageHeader, zr as AppSubTitle, ki as AppTabContainer, Oi as AppTabHeader, Ai as AppTabs, li as AppTitle, ji as AppVerticalTabs, T as AspectRatio, E as Avatar, D as AvatarFallback, O as AvatarImage, k as Badge, Tr as BarChartHorizontal, Er as BarChartVertical, j as Breadcrumb, M as BreadcrumbEllipsis, N as BreadcrumbItem, P as BreadcrumbLink, F as BreadcrumbList, I as BreadcrumbPage, L as BreadcrumbSeparator, m as Button, Dr as CHART_COLORS, R as Calendar, e as Card, t as CardContent, n as CardDescription, r as CardFooter, i as CardHeader, a as CardTitle, z as Carousel, B as CarouselContent, V as CarouselItem, H as CarouselNext, U as CarouselPrevious, kr as ChartCard, W as ChartContainer, G as ChartLegend, K as ChartLegendContent, q as ChartStyle, J as ChartTooltip, Y as ChartTooltipContent, X as Checkbox, Ar as CircularGauge, Z as Collapsible, Q as CollapsibleContent, $ as CollapsibleTrigger, pe as Command, me as CommandDialog, he as CommandEmpty, ge as CommandGroup, _e as CommandInput, ve as CommandItem, ye as CommandList, be as CommandSeparator, xe as CommandShortcut, ni as ConditionFilter, ri as ConditionFilterGroup, Ur as ConfirmationDialog, Se as ContextMenu, Ce as ContextMenuCheckboxItem, we as ContextMenuContent, Te as ContextMenuGroup, Ee as ContextMenuItem, De as ContextMenuLabel, Oe as ContextMenuPortal, ke as ContextMenuRadioGroup, Ae as ContextMenuRadioItem, je as ContextMenuSeparator, Me as ContextMenuShortcut, Ne as ContextMenuSub, Pe as ContextMenuSubContent, Fe as ContextMenuSubTrigger, Ie as ContextMenuTrigger, o as DashboardCard, Ei as DataTable, Kr as DatePicker, qr as DateRangePicker, re as Dialog, ie as DialogClose, ae as DialogContent, oe as DialogDescription, se as DialogFooter, ce as DialogHeader, le as DialogOverlay, ue as DialogPortal, de as DialogTitle, fe as DialogTrigger, Le as Drawer, Re as DrawerClose, ze as DrawerContent, Be as DrawerDescription, Ve as DrawerFooter, He as DrawerHeader, Ue as DrawerOverlay, We as DrawerPortal, Ge as DrawerTitle, Ke as DrawerTrigger, qe as DropdownMenu, Je as DropdownMenuCheckboxItem, Ye as DropdownMenuContent, Xe as DropdownMenuGroup, Ze as DropdownMenuItem, Qe as DropdownMenuLabel, $e as DropdownMenuPortal, et as DropdownMenuRadioGroup, tt as DropdownMenuRadioItem, nt as DropdownMenuSeparator, rt as DropdownMenuShortcut, it as DropdownMenuSub, at as DropdownMenuSubContent, ot as DropdownMenuSubTrigger, st as DropdownMenuTrigger, Fr as ErrorAlert, di as ErrorState, oi as FileDropzone, Yr as FilterField, Qr as FilterPills, Zr as FilterPillsGroup, ei as FiltersContainer, $r as FiltersMobileDrawer, ii as FlagFrIcon, ai as FlagGbIcon, lt as Form, ut as FormControl, dt as FormDescription, Hr as FormDialog, ft as FormField, pt as FormItem, mt as FormLabel, ht as FormMessage, Vr as GenericForm, mi as GlobalSearch, _t as HoverCard, vt as HoverCardContent, yt as HoverCardTrigger, Lr as ImageInput, bt as Input, xt as InputOTP, St as InputOTPGroup, Ct as InputOTPSeparator, wt as InputOTPSlot, Di as JsonTableOutput, gr as KpiCard, _r as KpiCards, pi as KpiCardsLayout, vr as KpiMultiCard, ct as Label, ci as LanguageSelector, jr as LineChart, fi as LoadingState, Tt as Menubar, Et as MenubarCheckboxItem, Dt as MenubarContent, Ot as MenubarGroup, kt as MenubarItem, At as MenubarLabel, jt as MenubarMenu, Mt as MenubarPortal, Nt as MenubarRadioGroup, Pt as MenubarRadioItem, Ft as MenubarSeparator, It as MenubarShortcut, Lt as MenubarSub, Rt as MenubarSubContent, zt as MenubarSubTrigger, Bt as MenubarTrigger, yr as MetricCard, Br as MultiSelect, Vt as NavigationMenu, Ht as NavigationMenuContent, Ut as NavigationMenuIndicator, Wt as NavigationMenuItem, Gt as NavigationMenuLink, Kt as NavigationMenuList, qt as NavigationMenuTrigger, Jt as NavigationMenuViewport, hi as NotificationsBell, Xt as Pagination, Zt as PaginationContent, Qt as PaginationEllipsis, $t as PaginationItem, en as PaginationLink, tn as PaginationNext, nn as PaginationPrevious, Mr as PieChart, rn as Popover, an as PopoverContent, on as PopoverTrigger, sn as Progress, cn as RadioGroup, ln as RadioGroupItem, si as RatingInput, un as ResizableHandle, dn as ResizablePanel, fn as ResizablePanelGroup, pn as ScrollArea, mn as ScrollBar, Sr as SearchInput, hn as Select, gn as SelectContent, _n as SelectGroup, vn as SelectItem, yn as SelectLabel, bn as SelectScrollDownButton, xn as SelectScrollUpButton, Sn as SelectSeparator, Cn as SelectTrigger, wn as SelectValue, Tn as Separator, En as Sheet, Dn as SheetClose, On as SheetContent, kn as SheetDescription, An as SheetFooter, jn as SheetHeader, Mn as SheetOverlay, Nn as SheetPortal, Pn as SheetTitle, Fn as SheetTrigger, _i as Sidebar, vi as SidebarHeader, gi as SidebarNavItem, In as SimpleTable, Ln as SimpleTableBody, Rn as SimpleTableCaption, zn as SimpleTableCell, Bn as SimpleTableFooter, Vn as SimpleTableHead, Hn as SimpleTableHeader, Un as SimpleTableRow, Jr as SingleSelect, Wn as Skeleton, br as SkeletonCard, xr as SkeletonCards, Gn as Slider, Kn as Sonner, Jn as Switch, bi as TableActions, xi as TableBody, Si as TableBulkActions, ti as TableFilter, Ci as TableHeader, wi as TablePagination, Ti as TableSettings, Yn as Tabs, Xn as TabsContent, Zn as TabsList, Qn as TabsTrigger, $n as Textarea, Mi as ThemeSelector, er as Toast, tr as ToastAction, nr as ToastClose, rr as ToastDescription, ir as ToastProvider, ar as ToastTitle, or as ToastViewport, sr as Toaster, cr as Toggle, ur as ToggleGroup, dr as ToggleGroupItem, fr as Tooltip, pr as TooltipContent, mr as TooltipProvider, hr as TooltipTrigger, yi as Topbar, A as badgeVariants, h as buttonVariants, ee as controlBaseClass, te as controlFilterWidthClass, ne as controlTriggerClass, Or as getChartColor, Yt as navigationMenuTriggerStyle, qn as toast, lr as toggleVariants, gt as useFormField };
|
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
export { useConfirmationDialog } from "./useConfirmationDialog";
|
|
2
2
|
export { useConfirmDeleteDialog } from "./useConfirmDeleteDialog";
|
|
3
|
+
export { useCopyToClipboard } from "./useCopyToClipboard";
|
|
4
|
+
export type { UseCopyToClipboardOptions, UseCopyToClipboardResult } from "./useCopyToClipboard";
|
|
3
5
|
export { useDebounce } from "./useDebounce";
|
|
4
6
|
export { useDebouncedValue } from "./useDebouncedValue";
|
|
5
7
|
export { useDialog } from "./useDialog";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/hooks/behavior/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,qBAAqB,EAAE,MAAM,yBAAyB,CAAC;AAChE,OAAO,EAAE,sBAAsB,EAAE,MAAM,0BAA0B,CAAC;AAClE,OAAO,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AAC5C,OAAO,EAAE,iBAAiB,EAAE,MAAM,qBAAqB,CAAC;AACxD,OAAO,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AACxC,YAAY,EAAE,WAAW,EAAE,MAAM,aAAa,CAAC;AAC/C,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AACpC,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAC1C,OAAO,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC;AACtC,OAAO,EAAE,cAAc,EAAE,kBAAkB,EAAE,eAAe,EAAE,gBAAgB,EAAE,oBAAoB,EAAE,iBAAiB,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/hooks/behavior/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,qBAAqB,EAAE,MAAM,yBAAyB,CAAC;AAChE,OAAO,EAAE,sBAAsB,EAAE,MAAM,0BAA0B,CAAC;AAClE,OAAO,EAAE,kBAAkB,EAAE,MAAM,sBAAsB,CAAC;AAC1D,YAAY,EAAE,yBAAyB,EAAE,wBAAwB,EAAE,MAAM,sBAAsB,CAAC;AAChG,OAAO,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AAC5C,OAAO,EAAE,iBAAiB,EAAE,MAAM,qBAAqB,CAAC;AACxD,OAAO,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AACxC,YAAY,EAAE,WAAW,EAAE,MAAM,aAAa,CAAC;AAC/C,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AACpC,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAC1C,OAAO,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC;AACtC,OAAO,EAAE,cAAc,EAAE,kBAAkB,EAAE,eAAe,EAAE,gBAAgB,EAAE,oBAAoB,EAAE,iBAAiB,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC"}
|
|
@@ -1,10 +1,11 @@
|
|
|
1
1
|
import { useConfirmationDialog as e } from "./useConfirmationDialog.js";
|
|
2
2
|
import { useConfirmDeleteDialog as t } from "./useConfirmDeleteDialog.js";
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
10
|
-
|
|
3
|
+
import { useCopyToClipboard as n } from "./useCopyToClipboard.js";
|
|
4
|
+
import { useDebounce as r } from "./useDebounce.js";
|
|
5
|
+
import { useDebouncedValue as i } from "./useDebouncedValue.js";
|
|
6
|
+
import { useDialog as a } from "./useDialog.js";
|
|
7
|
+
import { usePage as o } from "./usePage.js";
|
|
8
|
+
import { useSidebar as s } from "./useSidebar.js";
|
|
9
|
+
import { useTable as c } from "./useTable.js";
|
|
10
|
+
import { URL_DATE_FORMAT as l, parseDateRange as u, serializeDateRange as d, useUrlArrayState as f, useUrlDateRangeState as p, useUrlNumberState as m, useUrlState as h } from "./useUrlState.js";
|
|
11
|
+
export { l as URL_DATE_FORMAT, u as parseDateRange, d as serializeDateRange, t as useConfirmDeleteDialog, e as useConfirmationDialog, n as useCopyToClipboard, r as useDebounce, i as useDebouncedValue, a as useDialog, o as usePage, s as useSidebar, c as useTable, f as useUrlArrayState, p as useUrlDateRangeState, m as useUrlNumberState, h as useUrlState };
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
export interface UseCopyToClipboardOptions {
|
|
2
|
+
/** Clé i18n du message de succès. */
|
|
3
|
+
successKey?: string;
|
|
4
|
+
/** Clé i18n du message d'échec. */
|
|
5
|
+
errorKey?: string;
|
|
6
|
+
/** Pas de notification de succès : l'appelant affiche son propre retour (bouton « Copiée »). L'échec reste notifié. */
|
|
7
|
+
silentSuccess?: boolean;
|
|
8
|
+
}
|
|
9
|
+
export interface UseCopyToClipboardResult {
|
|
10
|
+
/** Copie le texte et notifie le résultat ; renvoie vrai si la copie a réussi. */
|
|
11
|
+
copy: (text: string) => Promise<boolean>;
|
|
12
|
+
}
|
|
13
|
+
/** Copie un texte dans le presse-papiers et affiche une notification de succès ou d'échec. */
|
|
14
|
+
export declare const useCopyToClipboard: ({ successKey, errorKey, silentSuccess, }?: UseCopyToClipboardOptions) => UseCopyToClipboardResult;
|
|
15
|
+
//# sourceMappingURL=useCopyToClipboard.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useCopyToClipboard.d.ts","sourceRoot":"","sources":["../../../src/hooks/behavior/useCopyToClipboard.ts"],"names":[],"mappings":"AAGA,MAAM,WAAW,yBAAyB;IACxC,qCAAqC;IACrC,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,mCAAmC;IACnC,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,uHAAuH;IACvH,aAAa,CAAC,EAAE,OAAO,CAAC;CACzB;AAED,MAAM,WAAW,wBAAwB;IACvC,iFAAiF;IACjF,IAAI,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,OAAO,CAAC,OAAO,CAAC,CAAC;CAC1C;AAED,8FAA8F;AAC9F,eAAO,MAAM,kBAAkB,GAAI,2CAIhC,yBAA8B,KAAG,wBAkBnC,CAAC"}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { useNotifications as e } from "../ui/useNotifications.js";
|
|
2
|
+
import { useKrosoftTranslation as t } from "../../i18n/useKrosoftTranslation.js";
|
|
3
|
+
// src/hooks/behavior/useCopyToClipboard.ts
|
|
4
|
+
var n = ({ successKey: n = "copy.copied", errorKey: r = "copy.copyFailed", silentSuccess: i = !1 } = {}) => {
|
|
5
|
+
let { t: a } = t(), { showSuccess: o, showError: s } = e();
|
|
6
|
+
return { copy: async (e) => {
|
|
7
|
+
try {
|
|
8
|
+
return await navigator.clipboard.writeText(e), i || o(a(n)), !0;
|
|
9
|
+
} catch (e) {
|
|
10
|
+
return s(a(r), void 0, e instanceof Error ? e : null), !1;
|
|
11
|
+
}
|
|
12
|
+
} };
|
|
13
|
+
};
|
|
14
|
+
export { n as useCopyToClipboard };
|
package/dist/hooks/index.js
CHANGED
|
@@ -1,20 +1,21 @@
|
|
|
1
1
|
import { useScrollFade as e } from "./ui/useScrollFade.js";
|
|
2
2
|
import { toast as t, useToast as n } from "./ui/useToast.js";
|
|
3
3
|
import { useNotifications as r } from "./ui/useNotifications.js";
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
10
|
-
import {
|
|
11
|
-
import {
|
|
12
|
-
import {
|
|
13
|
-
import {
|
|
14
|
-
import {
|
|
15
|
-
import {
|
|
16
|
-
import {
|
|
17
|
-
import {
|
|
18
|
-
import {
|
|
19
|
-
import {
|
|
20
|
-
|
|
4
|
+
import { useCopyToClipboard as i } from "./behavior/useCopyToClipboard.js";
|
|
5
|
+
import { useMobile as a } from "./ui/useMobile.js";
|
|
6
|
+
import { useDataTable as o } from "./ui/useDataTable.js";
|
|
7
|
+
import { useDocumentTitle as s } from "./ui/useDocumentTitle.js";
|
|
8
|
+
import { useFixedColumns as c } from "./ui/useFixedColumns.js";
|
|
9
|
+
import { useLanguage as l } from "./ui/useLanguage.js";
|
|
10
|
+
import { useServerTable as u } from "./ui/useServerTable.js";
|
|
11
|
+
import { useTheme as d } from "./ui/useTheme.js";
|
|
12
|
+
import { useDialog as f } from "./behavior/useDialog.js";
|
|
13
|
+
import { useConfirmationDialog as p } from "./behavior/useConfirmationDialog.js";
|
|
14
|
+
import { useConfirmDeleteDialog as m } from "./behavior/useConfirmDeleteDialog.js";
|
|
15
|
+
import { useDebounce as h } from "./behavior/useDebounce.js";
|
|
16
|
+
import { useDebouncedValue as g } from "./behavior/useDebouncedValue.js";
|
|
17
|
+
import { usePage as _ } from "./behavior/usePage.js";
|
|
18
|
+
import { useSidebar as v } from "./behavior/useSidebar.js";
|
|
19
|
+
import { useTable as y } from "./behavior/useTable.js";
|
|
20
|
+
import { URL_DATE_FORMAT as b, parseDateRange as x, serializeDateRange as S, useUrlArrayState as C, useUrlDateRangeState as w, useUrlNumberState as T, useUrlState as E } from "./behavior/useUrlState.js";
|
|
21
|
+
export { b as URL_DATE_FORMAT, x as parseDateRange, S as serializeDateRange, t as toast, m as useConfirmDeleteDialog, p as useConfirmationDialog, i as useCopyToClipboard, o as useDataTable, h as useDebounce, g as useDebouncedValue, f as useDialog, s as useDocumentTitle, c as useFixedColumns, l as useLanguage, a as useMobile, r as useNotifications, _ as usePage, e as useScrollFade, u as useServerTable, v as useSidebar, y as useTable, d as useTheme, n as useToast, C as useUrlArrayState, w as useUrlDateRangeState, T as useUrlNumberState, E as useUrlState };
|
|
@@ -180,6 +180,15 @@ export declare const krosoftLocales: {
|
|
|
180
180
|
tagsPlaceholder: string;
|
|
181
181
|
version: string;
|
|
182
182
|
};
|
|
183
|
+
copy: {
|
|
184
|
+
action: string;
|
|
185
|
+
copied: string;
|
|
186
|
+
copyFailed: string;
|
|
187
|
+
};
|
|
188
|
+
codeBlock: {
|
|
189
|
+
copied: string;
|
|
190
|
+
copyFailed: string;
|
|
191
|
+
};
|
|
183
192
|
};
|
|
184
193
|
en: {
|
|
185
194
|
actions: {
|
|
@@ -355,6 +364,15 @@ export declare const krosoftLocales: {
|
|
|
355
364
|
tagsPlaceholder: string;
|
|
356
365
|
version: string;
|
|
357
366
|
};
|
|
367
|
+
copy: {
|
|
368
|
+
action: string;
|
|
369
|
+
copied: string;
|
|
370
|
+
copyFailed: string;
|
|
371
|
+
};
|
|
372
|
+
codeBlock: {
|
|
373
|
+
copied: string;
|
|
374
|
+
copyFailed: string;
|
|
375
|
+
};
|
|
358
376
|
};
|
|
359
377
|
};
|
|
360
378
|
/** Sous-ensemble d'i18next dont on a besoin : évite d'imposer le type complet de l'instance. */
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"krosoftLocales.d.ts","sourceRoot":"","sources":["../../src/i18n/krosoftLocales.ts"],"names":[],"mappings":"AAGA;;;;GAIG;AACH,eAAO,MAAM,iBAAiB,YAAY,CAAC;AAE3C,8FAA8F;AAC9F,eAAO,MAAM,cAAc
|
|
1
|
+
{"version":3,"file":"krosoftLocales.d.ts","sourceRoot":"","sources":["../../src/i18n/krosoftLocales.ts"],"names":[],"mappings":"AAGA;;;;GAIG;AACH,eAAO,MAAM,iBAAiB,YAAY,CAAC;AAE3C,8FAA8F;AAC9F,eAAO,MAAM,cAAc;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAAa,CAAC;AAEzC,gGAAgG;AAChG,UAAU,QAAQ;IAChB,iBAAiB,CAAC,EAAE,CAAC,GAAG,EAAE,MAAM,EAAE,EAAE,EAAE,MAAM,EAAE,SAAS,EAAE,MAAM,EAAE,IAAI,CAAC,EAAE,OAAO,EAAE,SAAS,CAAC,EAAE,OAAO,KAAK,OAAO,CAAC;IACjH,iBAAiB,CAAC,EAAE,CAAC,GAAG,EAAE,MAAM,EAAE,EAAE,EAAE,MAAM,KAAK,OAAO,CAAC;CAC1D;AAED;;;;;;;;;;;;;;;;;GAiBG;AACH,eAAO,MAAM,sBAAsB,GAAI,MAAM,QAAQ,EAAE,gBAAuB;IAAE,SAAS,CAAC,EAAE,OAAO,CAAA;CAAO,KAAG,IAM5G,CAAC"}
|
package/dist/locales/en.json.js
CHANGED
|
@@ -153,6 +153,13 @@ var e = {
|
|
|
153
153
|
tagsPlaceholder: "Categories",
|
|
154
154
|
version: "Version {{version}}"
|
|
155
155
|
}, b = {
|
|
156
|
+
action: "Copy",
|
|
157
|
+
copied: "Copied to clipboard.",
|
|
158
|
+
copyFailed: "Could not copy the value."
|
|
159
|
+
}, x = {
|
|
160
|
+
copied: "Copied to clipboard.",
|
|
161
|
+
copyFailed: "Could not copy the content."
|
|
162
|
+
}, S = {
|
|
156
163
|
actions: e,
|
|
157
164
|
states: t,
|
|
158
165
|
search: n,
|
|
@@ -172,6 +179,8 @@ var e = {
|
|
|
172
179
|
seasonal: g,
|
|
173
180
|
about: _,
|
|
174
181
|
markdown: v,
|
|
175
|
-
changelog: y
|
|
182
|
+
changelog: y,
|
|
183
|
+
copy: b,
|
|
184
|
+
codeBlock: x
|
|
176
185
|
};
|
|
177
|
-
export { _ as about, e as actions, y as changelog, a as date,
|
|
186
|
+
export { _ as about, e as actions, y as changelog, x as codeBlock, b as copy, a as date, S as default, l as dropzone, o as filters, s as form, c as image, f as language, v as markdown, r as notifications, m as pwa, h as query, n as search, g as seasonal, i as select, d as sidebar, t as states, u as table, p as theme };
|
package/dist/locales/fr.json.js
CHANGED
|
@@ -153,6 +153,13 @@ var e = {
|
|
|
153
153
|
tagsPlaceholder: "Catégories",
|
|
154
154
|
version: "Version {{version}}"
|
|
155
155
|
}, b = {
|
|
156
|
+
action: "Copier",
|
|
157
|
+
copied: "Copié dans le presse-papiers.",
|
|
158
|
+
copyFailed: "Impossible de copier la valeur."
|
|
159
|
+
}, x = {
|
|
160
|
+
copied: "Copié dans le presse-papiers.",
|
|
161
|
+
copyFailed: "Impossible de copier le contenu."
|
|
162
|
+
}, S = {
|
|
156
163
|
actions: e,
|
|
157
164
|
states: t,
|
|
158
165
|
search: n,
|
|
@@ -172,6 +179,8 @@ var e = {
|
|
|
172
179
|
seasonal: g,
|
|
173
180
|
about: _,
|
|
174
181
|
markdown: v,
|
|
175
|
-
changelog: y
|
|
182
|
+
changelog: y,
|
|
183
|
+
copy: b,
|
|
184
|
+
codeBlock: x
|
|
176
185
|
};
|
|
177
|
-
export { _ as about, e as actions, y as changelog, a as date,
|
|
186
|
+
export { _ as about, e as actions, y as changelog, x as codeBlock, b as copy, a as date, S as default, l as dropzone, o as filters, s as form, c as image, f as language, v as markdown, r as notifications, m as pwa, h as query, n as search, g as seasonal, i as select, d as sidebar, t as states, u as table, p as theme };
|