@nice2dev/ui 1.4.24 → 1.4.26
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/CHANGELOG.md +51 -0
- package/README.md +2 -4
- package/dist/NiceModuleLifecyclePanel-bsHwj1pO.cjs +1 -0
- package/dist/{NiceStreamDashboard.doc-74KUXya1.cjs → NiceStreamDashboard.doc-CdkHFf4Y.cjs} +2 -2
- package/dist/demo/docs/docPreviews.mjs +347 -373
- package/dist/demo/docs/docRegistry.mjs +4 -59
- package/dist/docs/NiceStreamDashboard.doc.json.mjs +1 -1
- package/dist/documentation/utils.mjs +1 -1
- package/dist/index.cjs +94 -113
- package/dist/index.d.ts +5 -45
- package/dist/index.mjs +778 -780
- package/dist/navigation/NiceDock.mjs +55 -48
- package/dist/navigation/NiceMenuTypes.mjs +197 -251
- package/dist/navigation.cjs +1 -1
- package/dist/navigation.d.ts +5 -16
- package/dist/navigation.mjs +53 -54
- package/dist/style.css +2 -2
- package/dist/tools/NiceShowcase.mjs +1 -2
- package/package.json +4 -4
- package/dist/NiceDiagram.doc-CASS0Tnj.cjs +0 -8
- package/dist/NiceModuleLifecyclePanel-jckyVqqt.cjs +0 -1
- package/dist/docs/NiceDiagram.doc.json.mjs +0 -32
- package/dist/tools/NiceChat.mjs +0 -98
|
@@ -1,32 +0,0 @@
|
|
|
1
|
-
const e = "https://nice2dev.com/schemas/component-doc-v1.json", a = "NiceDiagram", i = "Diagram renderer for flowcharts, network diagrams, and graphs.", n = "planning", o = "1.0.0", t = "planned", r = [{ name: "nodes", type: "DiagramNode[]", required: !0, description: "Diagram nodes" }, { name: "edges", type: "DiagramEdge[]", required: !0, description: "Diagram edges" }, { name: "onChange", type: "(nodes: DiagramNode[], edges: DiagramEdge[]) => void", description: "Change callback" }, { name: "layout", type: "'auto' | 'manual' | 'hierarchical' | 'circular'", default: "'auto'", description: "Layout algorithm" }, { name: "interactive", type: "boolean", default: "true", description: "Allow interactions" }, { name: "showMinimap", type: "boolean", default: "false", description: "Show minimap" }, { name: "fitView", type: "boolean", default: "true", description: "Fit diagram to view" }, { name: "onNodeClick", type: "(node: DiagramNode) => void", description: "Node click callback" }], s = [{ title: "Diagram", description: "Render diagram", code: `<NiceDiagram
|
|
2
|
-
nodes={diagramNodes}
|
|
3
|
-
edges={diagramEdges}
|
|
4
|
-
onChange={updateDiagram}
|
|
5
|
-
layout="hierarchical"
|
|
6
|
-
interactive
|
|
7
|
-
showMinimap
|
|
8
|
-
/>` }], c = { keyboard: ["Tab through nodes", "Arrow keys to pan"], aria: ["Diagram region", "Node descriptions"] }, d = ["NiceDiagramDesigner", "NiceFlowChart"], m = {
|
|
9
|
-
$schema: e,
|
|
10
|
-
name: a,
|
|
11
|
-
description: i,
|
|
12
|
-
category: n,
|
|
13
|
-
since: o,
|
|
14
|
-
status: t,
|
|
15
|
-
props: r,
|
|
16
|
-
examples: s,
|
|
17
|
-
accessibility: c,
|
|
18
|
-
seeAlso: d
|
|
19
|
-
};
|
|
20
|
-
export {
|
|
21
|
-
e as $schema,
|
|
22
|
-
c as accessibility,
|
|
23
|
-
n as category,
|
|
24
|
-
m as default,
|
|
25
|
-
i as description,
|
|
26
|
-
s as examples,
|
|
27
|
-
a as name,
|
|
28
|
-
r as props,
|
|
29
|
-
d as seeAlso,
|
|
30
|
-
o as since,
|
|
31
|
-
t as status
|
|
32
|
-
};
|
package/dist/tools/NiceChat.mjs
DELETED
|
@@ -1,98 +0,0 @@
|
|
|
1
|
-
import { jsxs as a, jsx as t } from "react/jsx-runtime";
|
|
2
|
-
import { useControlId as S, useNiceAccessMode as I, useNiceTranslation as R } from "@nice2dev/ui-core";
|
|
3
|
-
import { forwardRef as T, useState as j, useRef as A, useEffect as K } from "react";
|
|
4
|
-
const $ = [], L = /* @__PURE__ */ Object.assign(
|
|
5
|
-
/* @__PURE__ */ T(
|
|
6
|
-
({
|
|
7
|
-
messages: d = $,
|
|
8
|
-
onSend: c,
|
|
9
|
-
placeholder: p,
|
|
10
|
-
title: l,
|
|
11
|
-
disabled: v,
|
|
12
|
-
showTimestamp: N = !0,
|
|
13
|
-
showAvatar: f = !0,
|
|
14
|
-
renderMessage: o,
|
|
15
|
-
className: b,
|
|
16
|
-
style: y,
|
|
17
|
-
id: w,
|
|
18
|
-
accessMode: x,
|
|
19
|
-
"data-testid": O
|
|
20
|
-
}, C) => {
|
|
21
|
-
const D = S(w), i = I(x), { t: h } = R(), [n, u] = j(""), _ = A(null), s = v || i === "disabled", r = i === "readOnly", E = i === "hidden";
|
|
22
|
-
K(() => {
|
|
23
|
-
_.current?.scrollIntoView({ behavior: "smooth" });
|
|
24
|
-
}, [d.length]);
|
|
25
|
-
const m = () => {
|
|
26
|
-
const e = n.trim();
|
|
27
|
-
!e || s || r || !c || (c(e), u(""));
|
|
28
|
-
}, M = (e) => {
|
|
29
|
-
e.key === "Enter" && !e.shiftKey && (e.preventDefault(), m());
|
|
30
|
-
};
|
|
31
|
-
return E ? null : /* @__PURE__ */ a(
|
|
32
|
-
"div",
|
|
33
|
-
{
|
|
34
|
-
ref: C,
|
|
35
|
-
id: D,
|
|
36
|
-
className: `nice-chat ${b || ""}`,
|
|
37
|
-
style: y,
|
|
38
|
-
"data-testid": O,
|
|
39
|
-
children: [
|
|
40
|
-
l && /* @__PURE__ */ t("div", { className: "nice-chat__header", children: l }),
|
|
41
|
-
/* @__PURE__ */ a("div", { className: "nice-chat__messages", children: [
|
|
42
|
-
d.map((e) => /* @__PURE__ */ a(
|
|
43
|
-
"div",
|
|
44
|
-
{
|
|
45
|
-
className: `nice-chat__message ${e.isOwn ? "nice-chat__message--own" : ""}`,
|
|
46
|
-
children: [
|
|
47
|
-
f && !e.isOwn && /* @__PURE__ */ t("div", { className: "nice-chat__avatar", children: e.avatar ? /* @__PURE__ */ t("img", { src: e.avatar, alt: e.author }) : e.author.charAt(0).toUpperCase() }),
|
|
48
|
-
/* @__PURE__ */ a("div", { className: "nice-chat__bubble", children: [
|
|
49
|
-
!e.isOwn && /* @__PURE__ */ t("div", { className: "nice-chat__author", children: e.author }),
|
|
50
|
-
o ? o(e) : /* @__PURE__ */ t("div", { className: "nice-chat__text", children: e.text }),
|
|
51
|
-
N && /* @__PURE__ */ a("div", { className: "nice-chat__time", children: [
|
|
52
|
-
new Date(e.timestamp).toLocaleTimeString([], {
|
|
53
|
-
hour: "2-digit",
|
|
54
|
-
minute: "2-digit"
|
|
55
|
-
}),
|
|
56
|
-
e.status && /* @__PURE__ */ t("span", { className: `nice-chat__status nice-chat__status--${e.status}` })
|
|
57
|
-
] })
|
|
58
|
-
] })
|
|
59
|
-
]
|
|
60
|
-
},
|
|
61
|
-
e.id
|
|
62
|
-
)),
|
|
63
|
-
/* @__PURE__ */ t("div", { ref: _ })
|
|
64
|
-
] }),
|
|
65
|
-
c && /* @__PURE__ */ a("div", { className: "nice-chat__input", children: [
|
|
66
|
-
/* @__PURE__ */ t(
|
|
67
|
-
"textarea",
|
|
68
|
-
{
|
|
69
|
-
value: n,
|
|
70
|
-
onChange: (e) => u(e.target.value),
|
|
71
|
-
onKeyDown: M,
|
|
72
|
-
placeholder: p || h("typeMessage", "Type a message..."),
|
|
73
|
-
disabled: s,
|
|
74
|
-
readOnly: r,
|
|
75
|
-
rows: 1,
|
|
76
|
-
className: "nice-chat__textarea"
|
|
77
|
-
}
|
|
78
|
-
),
|
|
79
|
-
/* @__PURE__ */ t(
|
|
80
|
-
"button",
|
|
81
|
-
{
|
|
82
|
-
className: "nice-btn nice-btn--primary nice-btn--sm",
|
|
83
|
-
onClick: m,
|
|
84
|
-
disabled: s || r || !n.trim(),
|
|
85
|
-
children: h("send", "Send")
|
|
86
|
-
}
|
|
87
|
-
)
|
|
88
|
-
] })
|
|
89
|
-
]
|
|
90
|
-
}
|
|
91
|
-
);
|
|
92
|
-
}
|
|
93
|
-
),
|
|
94
|
-
{ displayName: "NiceChat" }
|
|
95
|
-
);
|
|
96
|
-
export {
|
|
97
|
-
L as NiceChat
|
|
98
|
-
};
|