@nice2dev/ui-enterprise 1.2.1 → 1.2.2
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.cjs +3 -3
- package/dist/index.mjs +539 -542
- package/package.json +3 -3
package/dist/index.mjs
CHANGED
|
@@ -1,29 +1,29 @@
|
|
|
1
|
-
import { jsxs as c, jsx as e, Fragment as
|
|
2
|
-
import { NtdClipboard as Ge, NtdFile as Ke, NtdBrackets as Re, NtdBarChart as We, NtdFileText as xe, NtdList as Xe, NtdGrid as Ze, NtdSearch as ge, NtdDownload as ve, NtdChevronDown as Se, NtdChevronRight as Fe, NtdCircle as De, NtdSettings as $e, NtdKey as fe, NtdLogOut as Me, NtdLogIn as Qe, NtdError as he, NtdCheck as se, NtdUpload as ec, NtdEye as cc, NtdClose as be, NtdEdit as je, NtdPlus as Te, NtdArrowRight as
|
|
3
|
-
import { useNiceTranslation as
|
|
1
|
+
import { jsxs as c, jsx as e, Fragment as te } from "react/jsx-runtime";
|
|
2
|
+
import { NtdClipboard as Ge, NtdFile as Ke, NtdBrackets as Re, NtdBarChart as We, NtdFileText as xe, NtdList as Xe, NtdGrid as Ze, NtdSearch as ge, NtdDownload as ve, NtdChevronDown as Se, NtdChevronRight as Fe, NtdCircle as De, NtdSettings as $e, NtdKey as fe, NtdLogOut as Me, NtdLogIn as Qe, NtdError as he, NtdCheck as se, NtdUpload as ec, NtdEye as cc, NtdClose as be, NtdEdit as je, NtdPlus as Te, NtdArrowRight as tc, NtdBook as ac, NtdClock as Ee, NtdArrowUp as ic, NtdArrowDown as sc, NtdLock as Ye, NtdOctagon as nc, NtdDollar as lc, NtdWarning as Ue, NtdCookieConsent as rc, NtdArrowLeft as oc, NtdTrash as dc, NtdZap as qe, NtdHelp as Ve, NtdFolder as hc, NtdUser as Be, NtdRefresh as ye, NtdMinus as pc, NtdTable as uc, NtdCalendar as mc, NtdMap as ze, NtdShield as He, NtdSlash as gc, NtdFlag as vc, NtdUnlock as bc, NtdSmartphone as we, NtdMonitor as Nc } from "@nice2dev/icons";
|
|
3
|
+
import { useNiceTranslation as K, NiceAppShell as fc, NiceTutorialButton as yc, resolveTutorial as wc, NiceIcon as Ae } from "@nice2dev/ui";
|
|
4
4
|
import kc, { forwardRef as le, useState as k, useCallback as R, useImperativeHandle as re, useEffect as me, useRef as ke, useId as Cc, useMemo as ue } from "react";
|
|
5
|
-
function xc(
|
|
6
|
-
const i = s.csvDelimiter || ",",
|
|
7
|
-
return s.includeHeaders !== !1 &&
|
|
5
|
+
function xc(t, n, s) {
|
|
6
|
+
const i = s.csvDelimiter || ",", a = [];
|
|
7
|
+
return s.includeHeaders !== !1 && a.push(
|
|
8
8
|
n.filter((l) => l.include).map((l) => `"${l.label}"`).join(i)
|
|
9
|
-
),
|
|
9
|
+
), t.forEach((l) => {
|
|
10
10
|
const h = n.filter((r) => r.include).map((r) => {
|
|
11
11
|
let o = l[r.field];
|
|
12
12
|
return r.transform && (o = r.transform(o)), o == null ? "" : typeof o == "string" ? `"${o.replace(/"/g, '""')}"` : String(o);
|
|
13
13
|
});
|
|
14
|
-
|
|
15
|
-
}),
|
|
14
|
+
a.push(h.join(i));
|
|
15
|
+
}), a.join(`
|
|
16
16
|
`);
|
|
17
17
|
}
|
|
18
|
-
function Sc(
|
|
19
|
-
const i = n.filter((l) => l.include),
|
|
18
|
+
function Sc(t, n, s) {
|
|
19
|
+
const i = n.filter((l) => l.include), a = t.map((l) => {
|
|
20
20
|
const h = {};
|
|
21
21
|
return i.forEach((r) => {
|
|
22
22
|
let o = l[r.field];
|
|
23
23
|
r.transform && (o = r.transform(o)), h[r.field] = o;
|
|
24
24
|
}), h;
|
|
25
25
|
});
|
|
26
|
-
return JSON.stringify(
|
|
26
|
+
return JSON.stringify(a, null, 2);
|
|
27
27
|
}
|
|
28
28
|
const Ce = {
|
|
29
29
|
csv: { label: "CSV", icon: /* @__PURE__ */ e(xe, { size: 20 }), description: "Comma-separated values" },
|
|
@@ -39,51 +39,45 @@ const Ce = {
|
|
|
39
39
|
icon: /* @__PURE__ */ e(Ge, { size: 20 }),
|
|
40
40
|
description: "Extensible Markup Language"
|
|
41
41
|
}
|
|
42
|
-
}, Dc = ({ formats:
|
|
43
|
-
const
|
|
42
|
+
}, Dc = ({ formats: t, selected: n, onChange: s }) => /* @__PURE__ */ e("div", { className: "nice-export-formats", children: t.map((i) => {
|
|
43
|
+
const a = Ce[i];
|
|
44
44
|
return /* @__PURE__ */ c(
|
|
45
45
|
"button",
|
|
46
46
|
{
|
|
47
47
|
type: "button",
|
|
48
48
|
className: `nice-export-format ${n === i ? "nice-export-format--selected" : ""}`,
|
|
49
49
|
onClick: () => s(i),
|
|
50
|
-
title:
|
|
50
|
+
title: a.description,
|
|
51
51
|
children: [
|
|
52
|
-
/* @__PURE__ */ e("span", { className: "nice-export-format-icon", children:
|
|
53
|
-
/* @__PURE__ */ e("span", { className: "nice-export-format-label", children:
|
|
52
|
+
/* @__PURE__ */ e("span", { className: "nice-export-format-icon", children: a.icon }),
|
|
53
|
+
/* @__PURE__ */ e("span", { className: "nice-export-format-label", children: a.label })
|
|
54
54
|
]
|
|
55
55
|
},
|
|
56
56
|
i
|
|
57
57
|
);
|
|
58
|
-
}) }), Tc = ({ fields:
|
|
59
|
-
const { t: s } =
|
|
60
|
-
const r = [...
|
|
58
|
+
}) }), Tc = ({ fields: t, onChange: n }) => {
|
|
59
|
+
const { t: s } = K(), i = (h) => {
|
|
60
|
+
const r = [...t];
|
|
61
61
|
r[h] = { ...r[h], include: !r[h].include }, n(r);
|
|
62
|
-
},
|
|
63
|
-
n(
|
|
64
|
-
}, l =
|
|
62
|
+
}, a = (h) => {
|
|
63
|
+
n(t.map((r) => ({ ...r, include: h })));
|
|
64
|
+
}, l = t.filter((h) => h.include).length;
|
|
65
65
|
return /* @__PURE__ */ c("div", { className: "nice-export-fields", children: [
|
|
66
66
|
/* @__PURE__ */ c("div", { className: "nice-export-fields-header", children: [
|
|
67
|
-
/* @__PURE__ */
|
|
68
|
-
"Fields to export (",
|
|
69
|
-
l,
|
|
70
|
-
"/",
|
|
71
|
-
a.length,
|
|
72
|
-
")"
|
|
73
|
-
] }),
|
|
67
|
+
/* @__PURE__ */ e("span", { children: s("dataExportCenter.fieldsToExport", "Fields to export ({selectedCount}/{fields})").replace("{selectedCount}", String(l)).replace("{fields}", String(t.length)) }),
|
|
74
68
|
/* @__PURE__ */ c("div", { className: "nice-export-fields-actions", children: [
|
|
75
|
-
/* @__PURE__ */ e("button", { type: "button", onClick: () =>
|
|
76
|
-
/* @__PURE__ */ e("button", { type: "button", onClick: () =>
|
|
69
|
+
/* @__PURE__ */ e("button", { type: "button", onClick: () => a(!0), children: s("dataExportCenter.selectAll", "Select all") }),
|
|
70
|
+
/* @__PURE__ */ e("button", { type: "button", onClick: () => a(!1), children: s("dataExportCenter.deselectAll", "Deselect all") })
|
|
77
71
|
] })
|
|
78
72
|
] }),
|
|
79
|
-
/* @__PURE__ */ e("div", { className: "nice-export-fields-list", children:
|
|
73
|
+
/* @__PURE__ */ e("div", { className: "nice-export-fields-list", children: t.map((h, r) => /* @__PURE__ */ c("label", { className: "nice-export-field", children: [
|
|
80
74
|
/* @__PURE__ */ e("input", { type: "checkbox", checked: h.include, onChange: () => i(r) }),
|
|
81
75
|
/* @__PURE__ */ e("span", { className: "nice-export-field-label", children: h.label }),
|
|
82
76
|
/* @__PURE__ */ e("span", { className: "nice-export-field-name", children: h.field })
|
|
83
77
|
] }, h.field)) })
|
|
84
78
|
] });
|
|
85
|
-
},
|
|
86
|
-
const { t: i } =
|
|
79
|
+
}, Ec = ({ format: t, options: n, onChange: s }) => {
|
|
80
|
+
const { t: i } = K(), a = (l, h) => {
|
|
87
81
|
s({ ...n, [l]: h });
|
|
88
82
|
};
|
|
89
83
|
return /* @__PURE__ */ c("div", { className: "nice-export-options", children: [
|
|
@@ -94,50 +88,50 @@ const Ce = {
|
|
|
94
88
|
{
|
|
95
89
|
type: "checkbox",
|
|
96
90
|
checked: n.includeHeaders !== !1,
|
|
97
|
-
onChange: (l) =>
|
|
91
|
+
onChange: (l) => a("includeHeaders", l.target.checked)
|
|
98
92
|
}
|
|
99
93
|
),
|
|
100
94
|
i("dataExportCenter.includeHeaders", "Include headers")
|
|
101
95
|
] }),
|
|
102
|
-
|
|
103
|
-
/* @__PURE__ */ e("span", { children: "Delimiter:" }),
|
|
96
|
+
t === "csv" && /* @__PURE__ */ c("label", { className: "nice-export-option", children: [
|
|
97
|
+
/* @__PURE__ */ e("span", { children: i("dataExportCenter.delimiter", "Delimiter:") }),
|
|
104
98
|
/* @__PURE__ */ c(
|
|
105
99
|
"select",
|
|
106
100
|
{
|
|
107
101
|
value: n.csvDelimiter || ",",
|
|
108
|
-
onChange: (l) =>
|
|
102
|
+
onChange: (l) => a("csvDelimiter", l.target.value),
|
|
109
103
|
children: [
|
|
110
|
-
/* @__PURE__ */ e("option", { value: ",", children: "Comma (,)" }),
|
|
111
|
-
/* @__PURE__ */ e("option", { value: ";", children: "Semicolon (;)" }),
|
|
112
|
-
/* @__PURE__ */ e("option", { value: "\\t", children: "Tab" }),
|
|
113
|
-
/* @__PURE__ */ e("option", { value: "|", children: "Pipe (|)" })
|
|
104
|
+
/* @__PURE__ */ e("option", { value: ",", children: i("dataExportCenter.comma", "Comma (,)") }),
|
|
105
|
+
/* @__PURE__ */ e("option", { value: ";", children: i("dataExportCenter.semicolon", "Semicolon (;)") }),
|
|
106
|
+
/* @__PURE__ */ e("option", { value: "\\t", children: i("dataExportCenter.tab", "Tab") }),
|
|
107
|
+
/* @__PURE__ */ e("option", { value: "|", children: i("dataExportCenter.pipe", "Pipe (|)") })
|
|
114
108
|
]
|
|
115
109
|
}
|
|
116
110
|
)
|
|
117
111
|
] }),
|
|
118
112
|
/* @__PURE__ */ c("label", { className: "nice-export-option", children: [
|
|
119
|
-
/* @__PURE__ */ e("span", { children: "Date format:" }),
|
|
113
|
+
/* @__PURE__ */ e("span", { children: i("dataExportCenter.dateFormat", "Date format:") }),
|
|
120
114
|
/* @__PURE__ */ c(
|
|
121
115
|
"select",
|
|
122
116
|
{
|
|
123
117
|
value: n.dateFormat || "YYYY-MM-DD",
|
|
124
|
-
onChange: (l) =>
|
|
118
|
+
onChange: (l) => a("dateFormat", l.target.value),
|
|
125
119
|
children: [
|
|
126
120
|
/* @__PURE__ */ e("option", { value: "YYYY-MM-DD", children: i("dataExportCenter.yyyyMmDd", "YYYY-MM-DD") }),
|
|
127
|
-
/* @__PURE__ */ e("option", { value: "DD/MM/YYYY", children: "DD/MM/YYYY" }),
|
|
128
|
-
/* @__PURE__ */ e("option", { value: "MM/DD/YYYY", children: "MM/DD/YYYY" }),
|
|
121
|
+
/* @__PURE__ */ e("option", { value: "DD/MM/YYYY", children: i("dataExportCenter.ddMmYyyy", "DD/MM/YYYY") }),
|
|
122
|
+
/* @__PURE__ */ e("option", { value: "MM/DD/YYYY", children: i("dataExportCenter.mmDdYyyy", "MM/DD/YYYY") }),
|
|
129
123
|
/* @__PURE__ */ e("option", { value: "ISO", children: i("dataExportCenter.iso8601", "ISO 8601") })
|
|
130
124
|
]
|
|
131
125
|
}
|
|
132
126
|
)
|
|
133
127
|
] }),
|
|
134
128
|
/* @__PURE__ */ c("label", { className: "nice-export-option", children: [
|
|
135
|
-
/* @__PURE__ */ e("span", { children: "Encoding:" }),
|
|
129
|
+
/* @__PURE__ */ e("span", { children: i("dataExportCenter.encoding", "Encoding:") }),
|
|
136
130
|
/* @__PURE__ */ c(
|
|
137
131
|
"select",
|
|
138
132
|
{
|
|
139
133
|
value: n.encoding || "utf-8",
|
|
140
|
-
onChange: (l) =>
|
|
134
|
+
onChange: (l) => a("encoding", l.target.value),
|
|
141
135
|
children: [
|
|
142
136
|
/* @__PURE__ */ e("option", { value: "utf-8", children: i("dataExportCenter.utf8", "UTF-8") }),
|
|
143
137
|
/* @__PURE__ */ e("option", { value: "utf-16", children: i("dataExportCenter.utf16", "UTF-16") }),
|
|
@@ -146,14 +140,14 @@ const Ce = {
|
|
|
146
140
|
}
|
|
147
141
|
)
|
|
148
142
|
] }),
|
|
149
|
-
(
|
|
150
|
-
/* @__PURE__ */ e("span", { children: "Password protect:" }),
|
|
143
|
+
(t === "xlsx" || t === "pdf") && /* @__PURE__ */ c("label", { className: "nice-export-option", children: [
|
|
144
|
+
/* @__PURE__ */ e("span", { children: i("dataExportCenter.passwordProtect", "Password protect:") }),
|
|
151
145
|
/* @__PURE__ */ e(
|
|
152
146
|
"input",
|
|
153
147
|
{
|
|
154
148
|
type: "password",
|
|
155
149
|
value: n.password || "",
|
|
156
|
-
onChange: (l) =>
|
|
150
|
+
onChange: (l) => a("password", l.target.value || void 0),
|
|
157
151
|
placeholder: i(
|
|
158
152
|
"dataExportCenter.leaveEmptyForNoPassword",
|
|
159
153
|
"Leave empty for no password"
|
|
@@ -162,68 +156,68 @@ const Ce = {
|
|
|
162
156
|
)
|
|
163
157
|
] })
|
|
164
158
|
] });
|
|
165
|
-
},
|
|
166
|
-
const { t: s } =
|
|
167
|
-
if (
|
|
159
|
+
}, Lc = ({ jobs: t, onDownload: n }) => {
|
|
160
|
+
const { t: s } = K();
|
|
161
|
+
if (t.length === 0)
|
|
168
162
|
return /* @__PURE__ */ e("div", { className: "nice-export-history-empty", children: s("dataExportCenter.noExportHistory", "No export history") });
|
|
169
|
-
const i = (
|
|
163
|
+
const i = (a) => a ? a < 1024 ? `${a} B` : a < 1024 * 1024 ? `${(a / 1024).toFixed(1)} KB` : `${(a / 1024 / 1024).toFixed(1)} MB` : "-";
|
|
170
164
|
return /* @__PURE__ */ c("div", { className: "nice-export-history", children: [
|
|
171
165
|
/* @__PURE__ */ e("h4", { children: s("dataExportCenter.exportHistory", "Export History") }),
|
|
172
|
-
/* @__PURE__ */ e("div", { className: "nice-export-history-list", children:
|
|
166
|
+
/* @__PURE__ */ e("div", { className: "nice-export-history-list", children: t.map((a) => /* @__PURE__ */ c("div", { className: `nice-export-job nice-export-job--${a.status}`, children: [
|
|
173
167
|
/* @__PURE__ */ c("div", { className: "nice-export-job-info", children: [
|
|
174
|
-
/* @__PURE__ */ e("span", { className: "nice-export-job-name", children:
|
|
175
|
-
/* @__PURE__ */ e("span", { className: "nice-export-job-format", children:
|
|
176
|
-
/* @__PURE__ */ e("span", { className: "nice-export-job-date", children: new Date(
|
|
168
|
+
/* @__PURE__ */ e("span", { className: "nice-export-job-name", children: a.name }),
|
|
169
|
+
/* @__PURE__ */ e("span", { className: "nice-export-job-format", children: a.format.toUpperCase() }),
|
|
170
|
+
/* @__PURE__ */ e("span", { className: "nice-export-job-date", children: new Date(a.createdAt).toLocaleString() })
|
|
177
171
|
] }),
|
|
178
172
|
/* @__PURE__ */ c("div", { className: "nice-export-job-meta", children: [
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
173
|
+
a.rowCount && /* @__PURE__ */ e("span", { children: s("dataExportCenter.rows", "{rowCount} rows").replace(
|
|
174
|
+
"{rowCount}",
|
|
175
|
+
String(a.rowCount)
|
|
176
|
+
) }),
|
|
177
|
+
a.fileSize && /* @__PURE__ */ e("span", { children: i(a.fileSize) })
|
|
184
178
|
] }),
|
|
185
179
|
/* @__PURE__ */ c("div", { className: "nice-export-job-status", children: [
|
|
186
|
-
|
|
180
|
+
a.status === "processing" && /* @__PURE__ */ e("div", { className: "nice-export-job-progress", children: /* @__PURE__ */ e(
|
|
187
181
|
"div",
|
|
188
182
|
{
|
|
189
183
|
className: "nice-export-job-progress-bar",
|
|
190
|
-
style: { width: `${
|
|
184
|
+
style: { width: `${a.progress}%` }
|
|
191
185
|
}
|
|
192
186
|
) }),
|
|
193
|
-
|
|
187
|
+
a.status === "completed" && a.downloadUrl && /* @__PURE__ */ e(
|
|
194
188
|
"button",
|
|
195
189
|
{
|
|
196
190
|
type: "button",
|
|
197
191
|
className: "nice-export-job-download",
|
|
198
|
-
onClick: () => n == null ? void 0 : n(
|
|
192
|
+
onClick: () => n == null ? void 0 : n(a),
|
|
199
193
|
children: s("dataExportCenter.download", "Download")
|
|
200
194
|
}
|
|
201
195
|
),
|
|
202
|
-
|
|
196
|
+
a.status === "failed" && /* @__PURE__ */ e("span", { className: "nice-export-job-error", title: a.error, children: s("dataExportCenter.failed", "Failed") })
|
|
203
197
|
] })
|
|
204
|
-
] },
|
|
198
|
+
] }, a.id)) })
|
|
205
199
|
] });
|
|
206
|
-
},
|
|
200
|
+
}, at = /* @__PURE__ */ Object.assign(
|
|
207
201
|
/* @__PURE__ */ le(
|
|
208
202
|
({
|
|
209
|
-
dataSource:
|
|
203
|
+
dataSource: t,
|
|
210
204
|
formats: n = ["csv", "xlsx", "json", "pdf"],
|
|
211
205
|
templates: s = [],
|
|
212
206
|
enableScheduling: i = !1,
|
|
213
|
-
exportHistory:
|
|
207
|
+
exportHistory: a = [],
|
|
214
208
|
onExportStart: l,
|
|
215
209
|
onExportComplete: h,
|
|
216
210
|
onExportError: r,
|
|
217
211
|
onSaveTemplate: o,
|
|
218
212
|
onDeleteTemplate: w,
|
|
219
|
-
onSchedule:
|
|
213
|
+
onSchedule: A,
|
|
220
214
|
customExportHandler: I,
|
|
221
215
|
title: C,
|
|
222
|
-
description:
|
|
216
|
+
description: L,
|
|
223
217
|
className: F = "",
|
|
224
218
|
style: U
|
|
225
|
-
},
|
|
226
|
-
const { t:
|
|
219
|
+
}, E) => {
|
|
220
|
+
const { t: $ } = K(), ce = C ?? $("dataExportCenter.title", "Data Export"), [M, q] = k(n[0]), [z, m] = k(t.getFields()), [N, g] = k({
|
|
227
221
|
includeHeaders: !0,
|
|
228
222
|
dateFormat: "YYYY-MM-DD",
|
|
229
223
|
encoding: "utf-8"
|
|
@@ -231,36 +225,36 @@ const Ce = {
|
|
|
231
225
|
const b = {
|
|
232
226
|
id: Date.now().toString(),
|
|
233
227
|
name: `Export ${(/* @__PURE__ */ new Date()).toISOString()}`,
|
|
234
|
-
format:
|
|
228
|
+
format: M,
|
|
235
229
|
status: "processing",
|
|
236
230
|
progress: 0,
|
|
237
231
|
createdAt: /* @__PURE__ */ new Date()
|
|
238
232
|
};
|
|
239
233
|
u(!0), O(0), l == null || l(b);
|
|
240
234
|
try {
|
|
241
|
-
const S = await
|
|
242
|
-
fields:
|
|
235
|
+
const S = await t.fetchData({
|
|
236
|
+
fields: z,
|
|
243
237
|
filters: void 0,
|
|
244
238
|
sorting: void 0
|
|
245
239
|
});
|
|
246
240
|
O(50);
|
|
247
|
-
let
|
|
241
|
+
let _;
|
|
248
242
|
if (I)
|
|
249
|
-
|
|
243
|
+
_ = await I(M, S, N);
|
|
250
244
|
else
|
|
251
|
-
switch (
|
|
245
|
+
switch (M) {
|
|
252
246
|
case "csv":
|
|
253
|
-
|
|
247
|
+
_ = xc(S, z, N);
|
|
254
248
|
break;
|
|
255
249
|
case "json":
|
|
256
|
-
|
|
250
|
+
_ = Sc(S, z, N);
|
|
257
251
|
break;
|
|
258
252
|
default:
|
|
259
|
-
throw new Error(`Format ${
|
|
253
|
+
throw new Error(`Format ${M} requires a custom export handler`);
|
|
260
254
|
}
|
|
261
255
|
O(100);
|
|
262
|
-
const J = typeof
|
|
263
|
-
T.href = f, T.download = `export-${Date.now()}.${
|
|
256
|
+
const J = typeof _ == "string" ? new Blob([_], { type: "text/plain" }) : _, f = URL.createObjectURL(J), T = document.createElement("a");
|
|
257
|
+
T.href = f, T.download = `export-${Date.now()}.${M}`, document.body.appendChild(T), T.click(), document.body.removeChild(T), URL.revokeObjectURL(f);
|
|
264
258
|
const X = {
|
|
265
259
|
...b,
|
|
266
260
|
status: "completed",
|
|
@@ -271,41 +265,41 @@ const Ce = {
|
|
|
271
265
|
};
|
|
272
266
|
h == null || h(X);
|
|
273
267
|
} catch (S) {
|
|
274
|
-
const
|
|
268
|
+
const _ = {
|
|
275
269
|
...b,
|
|
276
270
|
status: "failed",
|
|
277
271
|
error: S instanceof Error ? S.message : "Unknown error"
|
|
278
272
|
};
|
|
279
|
-
r == null || r(
|
|
273
|
+
r == null || r(_, S instanceof Error ? S : new Error("Export failed"));
|
|
280
274
|
} finally {
|
|
281
275
|
u(!1), O(0);
|
|
282
276
|
}
|
|
283
277
|
}, [
|
|
284
|
-
|
|
285
|
-
|
|
278
|
+
M,
|
|
279
|
+
z,
|
|
286
280
|
N,
|
|
287
|
-
|
|
281
|
+
t,
|
|
288
282
|
I,
|
|
289
283
|
l,
|
|
290
284
|
h,
|
|
291
285
|
r
|
|
292
|
-
]),
|
|
286
|
+
]), Y = R(
|
|
293
287
|
(b) => {
|
|
294
|
-
const S = s.find((
|
|
288
|
+
const S = s.find((_) => _.id === b);
|
|
295
289
|
S && (q(S.format), m(S.fields), S.options && g(S.options));
|
|
296
290
|
},
|
|
297
291
|
[s]
|
|
298
292
|
);
|
|
299
|
-
return re(
|
|
293
|
+
return re(E, () => ({
|
|
300
294
|
exportNow: async (b) => {
|
|
301
295
|
q(b), await H();
|
|
302
296
|
},
|
|
303
|
-
getSelectedFields: () =>
|
|
304
|
-
loadTemplate:
|
|
297
|
+
getSelectedFields: () => z,
|
|
298
|
+
loadTemplate: Y
|
|
305
299
|
})), /* @__PURE__ */ c("div", { className: `nice-export-center ${F}`, style: U, children: [
|
|
306
300
|
/* @__PURE__ */ e("div", { className: "nice-export-header", children: /* @__PURE__ */ c("div", { className: "nice-export-title-area", children: [
|
|
307
301
|
/* @__PURE__ */ e("h3", { className: "nice-export-title", children: ce }),
|
|
308
|
-
|
|
302
|
+
L && /* @__PURE__ */ e("p", { className: "nice-export-description", children: L })
|
|
309
303
|
] }) }),
|
|
310
304
|
/* @__PURE__ */ c("div", { className: "nice-export-tabs", children: [
|
|
311
305
|
/* @__PURE__ */ e(
|
|
@@ -314,44 +308,43 @@ const Ce = {
|
|
|
314
308
|
type: "button",
|
|
315
309
|
className: `nice-export-tab ${P === "export" ? "nice-export-tab--active" : ""}`,
|
|
316
310
|
onClick: () => x("export"),
|
|
317
|
-
children:
|
|
311
|
+
children: $("dataExportCenter.export", "Export")
|
|
318
312
|
}
|
|
319
313
|
),
|
|
320
|
-
s.length > 0 && /* @__PURE__ */
|
|
314
|
+
s.length > 0 && /* @__PURE__ */ e(
|
|
321
315
|
"button",
|
|
322
316
|
{
|
|
323
317
|
type: "button",
|
|
324
318
|
className: `nice-export-tab ${P === "templates" ? "nice-export-tab--active" : ""}`,
|
|
325
319
|
onClick: () => x("templates"),
|
|
326
|
-
children:
|
|
327
|
-
"
|
|
328
|
-
s.length
|
|
329
|
-
|
|
330
|
-
]
|
|
320
|
+
children: $("dataExportCenter.templates", "Templates ({templates})").replace(
|
|
321
|
+
"{templates}",
|
|
322
|
+
String(s.length)
|
|
323
|
+
)
|
|
331
324
|
}
|
|
332
325
|
),
|
|
333
|
-
|
|
326
|
+
a.length > 0 && /* @__PURE__ */ e(
|
|
334
327
|
"button",
|
|
335
328
|
{
|
|
336
329
|
type: "button",
|
|
337
330
|
className: `nice-export-tab ${P === "history" ? "nice-export-tab--active" : ""}`,
|
|
338
331
|
onClick: () => x("history"),
|
|
339
|
-
children:
|
|
332
|
+
children: $("dataExportCenter.history", "History")
|
|
340
333
|
}
|
|
341
334
|
)
|
|
342
335
|
] }),
|
|
343
336
|
/* @__PURE__ */ c("div", { className: "nice-export-content", children: [
|
|
344
|
-
P === "export" && /* @__PURE__ */ c(
|
|
337
|
+
P === "export" && /* @__PURE__ */ c(te, { children: [
|
|
345
338
|
/* @__PURE__ */ e(
|
|
346
339
|
Dc,
|
|
347
340
|
{
|
|
348
341
|
formats: n,
|
|
349
|
-
selected:
|
|
342
|
+
selected: M,
|
|
350
343
|
onChange: q
|
|
351
344
|
}
|
|
352
345
|
),
|
|
353
|
-
/* @__PURE__ */ e(Tc, { fields:
|
|
354
|
-
/* @__PURE__ */ e(
|
|
346
|
+
/* @__PURE__ */ e(Tc, { fields: z, onChange: m }),
|
|
347
|
+
/* @__PURE__ */ e(Ec, { format: M, options: N, onChange: g }),
|
|
355
348
|
/* @__PURE__ */ c("div", { className: "nice-export-actions", children: [
|
|
356
349
|
/* @__PURE__ */ e(
|
|
357
350
|
"button",
|
|
@@ -359,8 +352,11 @@ const Ce = {
|
|
|
359
352
|
type: "button",
|
|
360
353
|
className: "nice-export-btn nice-export-btn--primary",
|
|
361
354
|
onClick: H,
|
|
362
|
-
disabled: V ||
|
|
363
|
-
children: V ?
|
|
355
|
+
disabled: V || z.filter((b) => b.include).length === 0,
|
|
356
|
+
children: V ? $("dataExportCenter.exporting", "Exporting... {progress}%").replace(
|
|
357
|
+
"{progress}",
|
|
358
|
+
String(B)
|
|
359
|
+
) : $("dataExportCenter.exportNow", "Export Now")
|
|
364
360
|
}
|
|
365
361
|
),
|
|
366
362
|
o && /* @__PURE__ */ e(
|
|
@@ -371,11 +367,11 @@ const Ce = {
|
|
|
371
367
|
onClick: () => o({
|
|
372
368
|
id: Date.now().toString(),
|
|
373
369
|
name: `Template ${s.length + 1}`,
|
|
374
|
-
format:
|
|
375
|
-
fields:
|
|
370
|
+
format: M,
|
|
371
|
+
fields: z,
|
|
376
372
|
options: N
|
|
377
373
|
}),
|
|
378
|
-
children:
|
|
374
|
+
children: $("dataExportCenter.saveAsTemplate", "Save as Template")
|
|
379
375
|
}
|
|
380
376
|
)
|
|
381
377
|
] })
|
|
@@ -396,18 +392,18 @@ const Ce = {
|
|
|
396
392
|
{
|
|
397
393
|
type: "button",
|
|
398
394
|
onClick: () => {
|
|
399
|
-
|
|
395
|
+
Y(b.id), x("export");
|
|
400
396
|
},
|
|
401
|
-
children: "Use"
|
|
397
|
+
children: $("dataExportCenter.use", "Use")
|
|
402
398
|
}
|
|
403
399
|
),
|
|
404
|
-
w && /* @__PURE__ */ e("button", { type: "button", onClick: () => w(b.id), children:
|
|
400
|
+
w && /* @__PURE__ */ e("button", { type: "button", onClick: () => w(b.id), children: $("dataExportCenter.delete", "Delete") })
|
|
405
401
|
] })
|
|
406
402
|
] }, b.id)) }),
|
|
407
403
|
P === "history" && /* @__PURE__ */ e(
|
|
408
|
-
|
|
404
|
+
Lc,
|
|
409
405
|
{
|
|
410
|
-
jobs:
|
|
406
|
+
jobs: a,
|
|
411
407
|
onDownload: (b) => {
|
|
412
408
|
b.downloadUrl && window.open(b.downloadUrl, "_blank");
|
|
413
409
|
}
|
|
@@ -480,14 +476,14 @@ const Ce = {
|
|
|
480
476
|
label: "Action",
|
|
481
477
|
color: "var(--nice-text-muted, #6b7280)"
|
|
482
478
|
}
|
|
483
|
-
},
|
|
484
|
-
filter:
|
|
479
|
+
}, zc = ({
|
|
480
|
+
filter: t,
|
|
485
481
|
onChange: n,
|
|
486
482
|
availableFilters: s
|
|
487
483
|
}) => {
|
|
488
484
|
var l, h;
|
|
489
|
-
const { t: i } =
|
|
490
|
-
n({ ...
|
|
485
|
+
const { t: i } = K(), a = (r, o) => {
|
|
486
|
+
n({ ...t, [r]: o });
|
|
491
487
|
};
|
|
492
488
|
return /* @__PURE__ */ c("div", { className: "nice-audit-filters", children: [
|
|
493
489
|
/* @__PURE__ */ c("div", { className: "nice-audit-filter-group", children: [
|
|
@@ -497,17 +493,17 @@ const Ce = {
|
|
|
497
493
|
"input",
|
|
498
494
|
{
|
|
499
495
|
type: "date",
|
|
500
|
-
value: ((l =
|
|
501
|
-
onChange: (r) =>
|
|
496
|
+
value: ((l = t.startDate) == null ? void 0 : l.toISOString().split("T")[0]) || "",
|
|
497
|
+
onChange: (r) => a("startDate", r.target.value ? new Date(r.target.value) : void 0)
|
|
502
498
|
}
|
|
503
499
|
),
|
|
504
|
-
/* @__PURE__ */ e("span", { children: "to" }),
|
|
500
|
+
/* @__PURE__ */ e("span", { children: i("auditTrail.to", "to") }),
|
|
505
501
|
/* @__PURE__ */ e(
|
|
506
502
|
"input",
|
|
507
503
|
{
|
|
508
504
|
type: "date",
|
|
509
|
-
value: ((h =
|
|
510
|
-
onChange: (r) =>
|
|
505
|
+
value: ((h = t.endDate) == null ? void 0 : h.toISOString().split("T")[0]) || "",
|
|
506
|
+
onChange: (r) => a("endDate", r.target.value ? new Date(r.target.value) : void 0)
|
|
511
507
|
}
|
|
512
508
|
)
|
|
513
509
|
] })
|
|
@@ -515,8 +511,8 @@ const Ce = {
|
|
|
515
511
|
/* @__PURE__ */ c("div", { className: "nice-audit-filter-group", children: [
|
|
516
512
|
/* @__PURE__ */ e("label", { children: i("auditTrail.actions", "Actions") }),
|
|
517
513
|
/* @__PURE__ */ e("div", { className: "nice-audit-action-chips", children: Object.keys(ne).slice(0, 8).map((r) => {
|
|
518
|
-
var
|
|
519
|
-
const o = ne[r], w = (
|
|
514
|
+
var A;
|
|
515
|
+
const o = ne[r], w = (A = t.actions) == null ? void 0 : A.includes(r);
|
|
520
516
|
return /* @__PURE__ */ c(
|
|
521
517
|
"button",
|
|
522
518
|
{
|
|
@@ -524,8 +520,8 @@ const Ce = {
|
|
|
524
520
|
className: `nice-audit-chip ${w ? "nice-audit-chip--selected" : ""}`,
|
|
525
521
|
style: { "--chip-color": o.color },
|
|
526
522
|
onClick: () => {
|
|
527
|
-
const I =
|
|
528
|
-
|
|
523
|
+
const I = t.actions || [];
|
|
524
|
+
a(
|
|
529
525
|
"actions",
|
|
530
526
|
w ? I.filter((C) => C !== r) : [...I, r]
|
|
531
527
|
);
|
|
@@ -547,65 +543,65 @@ const Ce = {
|
|
|
547
543
|
type: "text",
|
|
548
544
|
className: "nice-audit-search",
|
|
549
545
|
placeholder: i("auditTrail.searchEntries", "Search entries..."),
|
|
550
|
-
value:
|
|
551
|
-
onChange: (r) =>
|
|
546
|
+
value: t.searchQuery || "",
|
|
547
|
+
onChange: (r) => a("searchQuery", r.target.value || void 0)
|
|
552
548
|
}
|
|
553
549
|
)
|
|
554
550
|
] })
|
|
555
551
|
] });
|
|
556
|
-
},
|
|
557
|
-
if (!
|
|
552
|
+
}, Ac = ({ changes: t }) => {
|
|
553
|
+
if (!t.length)
|
|
558
554
|
return null;
|
|
559
555
|
const n = (s, i) => i || (s == null ? "(empty)" : typeof s == "object" ? JSON.stringify(s, null, 2) : String(s));
|
|
560
|
-
return /* @__PURE__ */ e("div", { className: "nice-audit-diff", children:
|
|
556
|
+
return /* @__PURE__ */ e("div", { className: "nice-audit-diff", children: t.map((s, i) => /* @__PURE__ */ c("div", { className: "nice-audit-diff-row", children: [
|
|
561
557
|
/* @__PURE__ */ e("span", { className: "nice-audit-diff-field", children: s.field }),
|
|
562
558
|
/* @__PURE__ */ c("div", { className: "nice-audit-diff-values", children: [
|
|
563
559
|
/* @__PURE__ */ e("span", { className: "nice-audit-diff-old", children: n(s.oldValue, s.displayOldValue) }),
|
|
564
|
-
/* @__PURE__ */ e("span", { className: "nice-audit-diff-arrow", children: /* @__PURE__ */ e(
|
|
560
|
+
/* @__PURE__ */ e("span", { className: "nice-audit-diff-arrow", children: /* @__PURE__ */ e(tc, { size: 14 }) }),
|
|
565
561
|
/* @__PURE__ */ e("span", { className: "nice-audit-diff-new", children: n(s.newValue, s.displayNewValue) })
|
|
566
562
|
] })
|
|
567
563
|
] }, i)) });
|
|
568
|
-
},
|
|
569
|
-
entry:
|
|
564
|
+
}, _c = ({
|
|
565
|
+
entry: t,
|
|
570
566
|
showDiff: n,
|
|
571
567
|
renderActionIcon: s,
|
|
572
568
|
renderUser: i,
|
|
573
|
-
onClick:
|
|
569
|
+
onClick: a
|
|
574
570
|
}) => {
|
|
575
|
-
const { t: l } =
|
|
571
|
+
const { t: l } = K(), [h, r] = k(!1), o = ne[t.action] || ne.custom;
|
|
576
572
|
return /* @__PURE__ */ c(
|
|
577
573
|
"div",
|
|
578
574
|
{
|
|
579
|
-
className: `nice-audit-timeline-entry nice-audit-timeline-entry--${
|
|
580
|
-
onClick:
|
|
581
|
-
role:
|
|
582
|
-
tabIndex:
|
|
575
|
+
className: `nice-audit-timeline-entry nice-audit-timeline-entry--${t.severity || "info"}`,
|
|
576
|
+
onClick: a,
|
|
577
|
+
role: a ? "button" : void 0,
|
|
578
|
+
tabIndex: a ? 0 : void 0,
|
|
583
579
|
children: [
|
|
584
580
|
/* @__PURE__ */ e(
|
|
585
581
|
"div",
|
|
586
582
|
{
|
|
587
583
|
className: "nice-audit-timeline-marker",
|
|
588
584
|
style: { "--marker-color": o.color },
|
|
589
|
-
children: s ? s(
|
|
585
|
+
children: s ? s(t.action) : o.icon
|
|
590
586
|
}
|
|
591
587
|
),
|
|
592
588
|
/* @__PURE__ */ c("div", { className: "nice-audit-timeline-content", children: [
|
|
593
589
|
/* @__PURE__ */ c("div", { className: "nice-audit-timeline-header", children: [
|
|
594
|
-
/* @__PURE__ */ e("span", { className: "nice-audit-timeline-action", children:
|
|
590
|
+
/* @__PURE__ */ e("span", { className: "nice-audit-timeline-action", children: t.actionLabel || o.label }),
|
|
595
591
|
/* @__PURE__ */ c("span", { className: "nice-audit-timeline-entity", children: [
|
|
596
|
-
|
|
592
|
+
t.entityType,
|
|
597
593
|
" ",
|
|
598
|
-
|
|
594
|
+
t.entityName && `"${t.entityName}"`
|
|
599
595
|
] }),
|
|
600
|
-
/* @__PURE__ */ e("span", { className: "nice-audit-timeline-time", children: new Date(
|
|
596
|
+
/* @__PURE__ */ e("span", { className: "nice-audit-timeline-time", children: new Date(t.timestamp).toLocaleString() })
|
|
601
597
|
] }),
|
|
602
|
-
/* @__PURE__ */ e("div", { className: "nice-audit-timeline-user", children: i ? i(
|
|
603
|
-
|
|
604
|
-
/* @__PURE__ */ e("span", { className: "nice-audit-username", children:
|
|
605
|
-
|
|
598
|
+
/* @__PURE__ */ e("div", { className: "nice-audit-timeline-user", children: i ? i(t) : /* @__PURE__ */ c(te, { children: [
|
|
599
|
+
t.userAvatar && /* @__PURE__ */ e("img", { src: t.userAvatar, alt: "", className: "nice-audit-avatar" }),
|
|
600
|
+
/* @__PURE__ */ e("span", { className: "nice-audit-username", children: t.userName }),
|
|
601
|
+
t.userRole && /* @__PURE__ */ e("span", { className: "nice-audit-role", children: t.userRole })
|
|
606
602
|
] }) }),
|
|
607
|
-
|
|
608
|
-
n &&
|
|
603
|
+
t.notes && /* @__PURE__ */ e("div", { className: "nice-audit-timeline-notes", children: t.notes }),
|
|
604
|
+
n && t.changes && t.changes.length > 0 && /* @__PURE__ */ c(te, { children: [
|
|
609
605
|
/* @__PURE__ */ e(
|
|
610
606
|
"button",
|
|
611
607
|
{
|
|
@@ -614,38 +610,38 @@ const Ce = {
|
|
|
614
610
|
onClick: (w) => {
|
|
615
611
|
w.stopPropagation(), r(!h);
|
|
616
612
|
},
|
|
617
|
-
children: h ? /* @__PURE__ */ c(
|
|
613
|
+
children: h ? /* @__PURE__ */ c(te, { children: [
|
|
618
614
|
/* @__PURE__ */ e(Se, { size: 14 }),
|
|
619
615
|
" ",
|
|
620
616
|
l("auditTrail.hideChanges", "Hide changes")
|
|
621
|
-
] }) : /* @__PURE__ */ c(
|
|
617
|
+
] }) : /* @__PURE__ */ c(te, { children: [
|
|
622
618
|
/* @__PURE__ */ e(Fe, { size: 14 }),
|
|
623
619
|
" ",
|
|
624
620
|
l("auditTrail.showChanges", "Show {changes} changes").replace(
|
|
625
621
|
"{changes}",
|
|
626
|
-
String(
|
|
622
|
+
String(t.changes.length)
|
|
627
623
|
)
|
|
628
624
|
] })
|
|
629
625
|
}
|
|
630
626
|
),
|
|
631
|
-
h && /* @__PURE__ */ e(
|
|
627
|
+
h && /* @__PURE__ */ e(Ac, { changes: t.changes })
|
|
632
628
|
] }),
|
|
633
|
-
|
|
634
|
-
/* @__PURE__ */
|
|
635
|
-
"
|
|
636
|
-
|
|
637
|
-
|
|
638
|
-
|
|
629
|
+
t.ipAddress && /* @__PURE__ */ c("div", { className: "nice-audit-timeline-meta", children: [
|
|
630
|
+
/* @__PURE__ */ e("span", { children: l("auditTrail.ip", "IP: {ipAddress}").replace(
|
|
631
|
+
"{ipAddress}",
|
|
632
|
+
String(t.ipAddress)
|
|
633
|
+
) }),
|
|
634
|
+
t.location && /* @__PURE__ */ c("span", { children: [
|
|
639
635
|
"• ",
|
|
640
|
-
|
|
636
|
+
t.location
|
|
641
637
|
] })
|
|
642
638
|
] })
|
|
643
639
|
] })
|
|
644
640
|
]
|
|
645
641
|
}
|
|
646
642
|
);
|
|
647
|
-
}, Ic = ({ entries:
|
|
648
|
-
const { t: i } =
|
|
643
|
+
}, Ic = ({ entries: t, showDiff: n, onEntryClick: s }) => {
|
|
644
|
+
const { t: i } = K();
|
|
649
645
|
return /* @__PURE__ */ c("table", { className: "nice-audit-table", children: [
|
|
650
646
|
/* @__PURE__ */ e("thead", { children: /* @__PURE__ */ c("tr", { children: [
|
|
651
647
|
/* @__PURE__ */ e("th", { children: i("auditTrail.timestamp", "Timestamp") }),
|
|
@@ -655,16 +651,16 @@ const Ce = {
|
|
|
655
651
|
/* @__PURE__ */ e("th", { children: i("auditTrail.changes", "Changes") }),
|
|
656
652
|
/* @__PURE__ */ e("th", { children: i("auditTrail.ipAddress", "IP Address") })
|
|
657
653
|
] }) }),
|
|
658
|
-
/* @__PURE__ */ e("tbody", { children:
|
|
659
|
-
const l = ne[
|
|
654
|
+
/* @__PURE__ */ e("tbody", { children: t.map((a) => {
|
|
655
|
+
const l = ne[a.action] || ne.custom;
|
|
660
656
|
return /* @__PURE__ */ c(
|
|
661
657
|
"tr",
|
|
662
658
|
{
|
|
663
|
-
className: `nice-audit-row nice-audit-row--${
|
|
664
|
-
onClick: () => s == null ? void 0 : s(
|
|
659
|
+
className: `nice-audit-row nice-audit-row--${a.severity || "info"}`,
|
|
660
|
+
onClick: () => s == null ? void 0 : s(a),
|
|
665
661
|
role: s ? "button" : void 0,
|
|
666
662
|
children: [
|
|
667
|
-
/* @__PURE__ */ e("td", { className: "nice-audit-cell-time", children: new Date(
|
|
663
|
+
/* @__PURE__ */ e("td", { className: "nice-audit-cell-time", children: new Date(a.timestamp).toLocaleString() }),
|
|
668
664
|
/* @__PURE__ */ e("td", { children: /* @__PURE__ */ c(
|
|
669
665
|
"span",
|
|
670
666
|
{
|
|
@@ -673,66 +669,66 @@ const Ce = {
|
|
|
673
669
|
children: [
|
|
674
670
|
l.icon,
|
|
675
671
|
" ",
|
|
676
|
-
|
|
672
|
+
a.actionLabel || l.label
|
|
677
673
|
]
|
|
678
674
|
}
|
|
679
675
|
) }),
|
|
680
676
|
/* @__PURE__ */ c("td", { className: "nice-audit-cell-user", children: [
|
|
681
|
-
|
|
682
|
-
|
|
677
|
+
a.userAvatar && /* @__PURE__ */ e("img", { src: a.userAvatar, alt: "", className: "nice-audit-avatar-sm" }),
|
|
678
|
+
a.userName
|
|
683
679
|
] }),
|
|
684
680
|
/* @__PURE__ */ c("td", { children: [
|
|
685
|
-
|
|
686
|
-
|
|
681
|
+
a.entityType,
|
|
682
|
+
a.entityName && `: ${a.entityName}`
|
|
687
683
|
] }),
|
|
688
|
-
/* @__PURE__ */ e("td", { children:
|
|
689
|
-
|
|
690
|
-
|
|
691
|
-
|
|
692
|
-
/* @__PURE__ */ e("td", { className: "nice-audit-cell-ip", children:
|
|
684
|
+
/* @__PURE__ */ e("td", { children: a.changes && a.changes.length > 0 ? /* @__PURE__ */ e("span", { className: "nice-audit-changes-count", children: i("auditTrail.fieldS", "{changes} field(s)").replace(
|
|
685
|
+
"{changes}",
|
|
686
|
+
String(a.changes.length)
|
|
687
|
+
) }) : "-" }),
|
|
688
|
+
/* @__PURE__ */ e("td", { className: "nice-audit-cell-ip", children: a.ipAddress || "-" })
|
|
693
689
|
]
|
|
694
690
|
},
|
|
695
|
-
|
|
691
|
+
a.id
|
|
696
692
|
);
|
|
697
693
|
}) })
|
|
698
694
|
] });
|
|
699
|
-
},
|
|
695
|
+
}, it = /* @__PURE__ */ Object.assign(
|
|
700
696
|
/* @__PURE__ */ le(
|
|
701
697
|
({
|
|
702
|
-
dataSource:
|
|
698
|
+
dataSource: t,
|
|
703
699
|
initialFilter: n = {},
|
|
704
700
|
pageSize: s = 50,
|
|
705
701
|
viewMode: i = "timeline",
|
|
706
|
-
enableExport:
|
|
702
|
+
enableExport: a = !0,
|
|
707
703
|
showDiffs: l = !0,
|
|
708
704
|
renderActionIcon: h,
|
|
709
705
|
renderUser: r,
|
|
710
706
|
onEntryClick: o,
|
|
711
707
|
onExport: w,
|
|
712
|
-
title:
|
|
708
|
+
title: A,
|
|
713
709
|
className: I = "",
|
|
714
710
|
style: C
|
|
715
|
-
},
|
|
716
|
-
const { t: F } =
|
|
711
|
+
}, L) => {
|
|
712
|
+
const { t: F } = K(), U = A ?? F("auditTrail.title", "Audit Trail"), [E, $] = k([]), [ce, M] = k(0), [q, z] = k(n), [m, N] = k(1), [g, V] = k(!1), [u, B] = k(i), [O, P] = k(!1), x = R(async () => {
|
|
717
713
|
V(!0);
|
|
718
714
|
try {
|
|
719
|
-
const b = await
|
|
720
|
-
|
|
715
|
+
const b = await t.fetchEntries(q, { page: m, pageSize: s });
|
|
716
|
+
$(b.entries), M(b.totalCount);
|
|
721
717
|
} finally {
|
|
722
718
|
V(!1);
|
|
723
719
|
}
|
|
724
|
-
}, [
|
|
720
|
+
}, [t, q, m, s]);
|
|
725
721
|
kc.useEffect(() => {
|
|
726
722
|
x();
|
|
727
723
|
}, [x]);
|
|
728
724
|
const H = R(
|
|
729
725
|
(b) => {
|
|
730
726
|
if (w)
|
|
731
|
-
w(
|
|
727
|
+
w(E, b);
|
|
732
728
|
else {
|
|
733
|
-
let S,
|
|
729
|
+
let S, _;
|
|
734
730
|
if (b === "json")
|
|
735
|
-
S = JSON.stringify(
|
|
731
|
+
S = JSON.stringify(E, null, 2), _ = "application/json";
|
|
736
732
|
else {
|
|
737
733
|
const X = [
|
|
738
734
|
"Timestamp",
|
|
@@ -742,7 +738,7 @@ const Ce = {
|
|
|
742
738
|
"Entity",
|
|
743
739
|
"IP",
|
|
744
740
|
"Changes"
|
|
745
|
-
], Z =
|
|
741
|
+
], Z = E.map((G) => {
|
|
746
742
|
var v;
|
|
747
743
|
return [
|
|
748
744
|
new Date(G.timestamp).toISOString(),
|
|
@@ -755,22 +751,22 @@ const Ce = {
|
|
|
755
751
|
];
|
|
756
752
|
});
|
|
757
753
|
S = [X.join(","), ...Z.map((G) => G.join(","))].join(`
|
|
758
|
-
`),
|
|
754
|
+
`), _ = "text/csv";
|
|
759
755
|
}
|
|
760
|
-
const J = new Blob([S], { type:
|
|
756
|
+
const J = new Blob([S], { type: _ }), f = URL.createObjectURL(J), T = document.createElement("a");
|
|
761
757
|
T.href = f, T.download = `audit-trail-${Date.now()}.${b}`, T.click(), URL.revokeObjectURL(f);
|
|
762
758
|
}
|
|
763
759
|
},
|
|
764
|
-
[
|
|
760
|
+
[E, w]
|
|
765
761
|
);
|
|
766
|
-
re(
|
|
762
|
+
re(L, () => ({
|
|
767
763
|
refresh: x,
|
|
768
764
|
setFilter: (b) => {
|
|
769
|
-
|
|
765
|
+
z(b), N(1);
|
|
770
766
|
},
|
|
771
|
-
getEntries: () =>
|
|
767
|
+
getEntries: () => E
|
|
772
768
|
}));
|
|
773
|
-
const
|
|
769
|
+
const Y = Math.ceil(ce / s);
|
|
774
770
|
return /* @__PURE__ */ c("div", { className: `nice-audit-trail ${I}`, style: C, children: [
|
|
775
771
|
/* @__PURE__ */ c("div", { className: "nice-audit-header", children: [
|
|
776
772
|
/* @__PURE__ */ e("h3", { className: "nice-audit-title", children: U }),
|
|
@@ -808,7 +804,7 @@ const Ce = {
|
|
|
808
804
|
]
|
|
809
805
|
}
|
|
810
806
|
),
|
|
811
|
-
|
|
807
|
+
a && /* @__PURE__ */ c("div", { className: "nice-audit-export-dropdown", children: [
|
|
812
808
|
/* @__PURE__ */ c("button", { type: "button", className: "nice-audit-export-btn", children: [
|
|
813
809
|
/* @__PURE__ */ e(ve, { size: 16 }),
|
|
814
810
|
" ",
|
|
@@ -821,9 +817,9 @@ const Ce = {
|
|
|
821
817
|
] })
|
|
822
818
|
] })
|
|
823
819
|
] }),
|
|
824
|
-
O && /* @__PURE__ */ e(
|
|
820
|
+
O && /* @__PURE__ */ e(zc, { filter: q, onChange: z }),
|
|
825
821
|
/* @__PURE__ */ c("div", { className: "nice-audit-stats", children: [
|
|
826
|
-
/* @__PURE__ */ e("span", { children: F("auditTrail.showingOfEntries", "Showing {entries} of {totalCount} entries").replace("{entries}", String(
|
|
822
|
+
/* @__PURE__ */ e("span", { children: F("auditTrail.showingOfEntries", "Showing {entries} of {totalCount} entries").replace("{entries}", String(E.length)).replace("{totalCount}", String(ce)) }),
|
|
827
823
|
q.startDate && q.endDate && /* @__PURE__ */ c("span", { className: "nice-audit-date-indicator", children: [
|
|
828
824
|
q.startDate.toLocaleDateString(),
|
|
829
825
|
" - ",
|
|
@@ -832,8 +828,8 @@ const Ce = {
|
|
|
832
828
|
] }),
|
|
833
829
|
/* @__PURE__ */ c("div", { className: `nice-audit-content ${g ? "nice-audit-content--loading" : ""}`, children: [
|
|
834
830
|
g && /* @__PURE__ */ e("div", { className: "nice-audit-loader", children: /* @__PURE__ */ e("div", { className: "nice-audit-spinner" }) }),
|
|
835
|
-
u === "timeline" ? /* @__PURE__ */ e("div", { className: "nice-audit-timeline", children:
|
|
836
|
-
|
|
831
|
+
u === "timeline" ? /* @__PURE__ */ e("div", { className: "nice-audit-timeline", children: E.map((b) => /* @__PURE__ */ e(
|
|
832
|
+
_c,
|
|
837
833
|
{
|
|
838
834
|
entry: b,
|
|
839
835
|
showDiff: l,
|
|
@@ -842,20 +838,20 @@ const Ce = {
|
|
|
842
838
|
onClick: o ? () => o(b) : void 0
|
|
843
839
|
},
|
|
844
840
|
b.id
|
|
845
|
-
)) }) : /* @__PURE__ */ e(Ic, { entries:
|
|
846
|
-
|
|
841
|
+
)) }) : /* @__PURE__ */ e(Ic, { entries: E, showDiff: l, onEntryClick: o }),
|
|
842
|
+
E.length === 0 && !g && /* @__PURE__ */ e("div", { className: "nice-audit-empty", children: F(
|
|
847
843
|
"auditTrail.noAuditEntriesFoundMatching",
|
|
848
844
|
"No audit entries found matching the current filters."
|
|
849
845
|
) })
|
|
850
846
|
] }),
|
|
851
|
-
|
|
847
|
+
Y > 1 && /* @__PURE__ */ c("div", { className: "nice-audit-pagination", children: [
|
|
852
848
|
/* @__PURE__ */ e("button", { type: "button", disabled: m === 1, onClick: () => N(m - 1), children: F("auditTrail.previous", "Previous") }),
|
|
853
|
-
/* @__PURE__ */ e("span", { children: F("auditTrail.pageOf", "Page {page} of {totalPages}").replace("{page}", String(m)).replace("{totalPages}", String(
|
|
849
|
+
/* @__PURE__ */ e("span", { children: F("auditTrail.pageOf", "Page {page} of {totalPages}").replace("{page}", String(m)).replace("{totalPages}", String(Y)) }),
|
|
854
850
|
/* @__PURE__ */ e(
|
|
855
851
|
"button",
|
|
856
852
|
{
|
|
857
853
|
type: "button",
|
|
858
|
-
disabled: m ===
|
|
854
|
+
disabled: m === Y,
|
|
859
855
|
onClick: () => N(m + 1),
|
|
860
856
|
children: F("auditTrail.next", "Next")
|
|
861
857
|
}
|
|
@@ -883,7 +879,7 @@ const Ce = {
|
|
|
883
879
|
liability: {
|
|
884
880
|
label: "Liability",
|
|
885
881
|
color: "var(--nice-color-error, #ef4444)",
|
|
886
|
-
icon: /* @__PURE__ */ e(
|
|
882
|
+
icon: /* @__PURE__ */ e(Ue, { size: 16 })
|
|
887
883
|
},
|
|
888
884
|
payment: {
|
|
889
885
|
label: "Payment",
|
|
@@ -898,7 +894,7 @@ const Ce = {
|
|
|
898
894
|
confidentiality: {
|
|
899
895
|
label: "Confidentiality",
|
|
900
896
|
color: "var(--nice-color-accent, #8b5cf6)",
|
|
901
|
-
icon: /* @__PURE__ */ e(
|
|
897
|
+
icon: /* @__PURE__ */ e(Ye, { size: 16 })
|
|
902
898
|
},
|
|
903
899
|
compliance: {
|
|
904
900
|
label: "Compliance",
|
|
@@ -916,10 +912,10 @@ const Ce = {
|
|
|
916
912
|
approved: { label: "Approved", color: "var(--nice-color-success, #10b981)" },
|
|
917
913
|
rejected: { label: "Rejected", color: "var(--nice-color-error, #ef4444)" },
|
|
918
914
|
signed: { label: "Signed", color: "var(--nice-color-accent, #8b5cf6)" }
|
|
919
|
-
}, Rc = ({ clauses:
|
|
920
|
-
const { t: s } =
|
|
921
|
-
const w = i === "" || o.name.toLowerCase().includes(i.toLowerCase()) || o.content.toLowerCase().includes(i.toLowerCase()),
|
|
922
|
-
return w &&
|
|
915
|
+
}, Rc = ({ clauses: t, onInsert: n }) => {
|
|
916
|
+
const { t: s } = K(), [i, a] = k(""), [l, h] = k("all"), r = t.filter((o) => {
|
|
917
|
+
const w = i === "" || o.name.toLowerCase().includes(i.toLowerCase()) || o.content.toLowerCase().includes(i.toLowerCase()), A = l === "all" || o.category === l;
|
|
918
|
+
return w && A;
|
|
923
919
|
});
|
|
924
920
|
return /* @__PURE__ */ c("div", { className: "nice-contract-library", children: [
|
|
925
921
|
/* @__PURE__ */ c("div", { className: "nice-contract-library-header", children: [
|
|
@@ -930,7 +926,7 @@ const Ce = {
|
|
|
930
926
|
type: "text",
|
|
931
927
|
placeholder: s("contractEditor.searchClauses", "Search clauses..."),
|
|
932
928
|
value: i,
|
|
933
|
-
onChange: (o) =>
|
|
929
|
+
onChange: (o) => a(o.target.value),
|
|
934
930
|
className: "nice-contract-library-search"
|
|
935
931
|
}
|
|
936
932
|
)
|
|
@@ -942,7 +938,7 @@ const Ce = {
|
|
|
942
938
|
type: "button",
|
|
943
939
|
className: `nice-contract-category-btn ${l === "all" ? "nice-contract-category-btn--active" : ""}`,
|
|
944
940
|
onClick: () => h("all"),
|
|
945
|
-
children: "All"
|
|
941
|
+
children: s("contractEditor.all", "All")
|
|
946
942
|
}
|
|
947
943
|
),
|
|
948
944
|
Object.keys(ie).map((o) => /* @__PURE__ */ c(
|
|
@@ -992,67 +988,67 @@ const Ce = {
|
|
|
992
988
|
r.length === 0 && /* @__PURE__ */ e("div", { className: "nice-contract-library-empty", children: s("contractEditor.noMatchingClauses", "No matching clauses") })
|
|
993
989
|
] })
|
|
994
990
|
] });
|
|
995
|
-
}, Fc = ({ variables:
|
|
996
|
-
const { t: i } =
|
|
991
|
+
}, Fc = ({ variables: t, definitions: n, onChange: s }) => {
|
|
992
|
+
const { t: i } = K();
|
|
997
993
|
return /* @__PURE__ */ c("div", { className: "nice-contract-variables", children: [
|
|
998
994
|
/* @__PURE__ */ e("h4", { children: i("contractEditor.variables", "Variables") }),
|
|
999
|
-
/* @__PURE__ */ e("div", { className: "nice-contract-variables-list", children: n.map((
|
|
995
|
+
/* @__PURE__ */ e("div", { className: "nice-contract-variables-list", children: n.map((a) => /* @__PURE__ */ c("div", { className: "nice-contract-variable", children: [
|
|
1000
996
|
/* @__PURE__ */ c("label", { children: [
|
|
1001
|
-
|
|
1002
|
-
|
|
997
|
+
a.name,
|
|
998
|
+
a.required && /* @__PURE__ */ e("span", { className: "nice-contract-required", children: "*" })
|
|
1003
999
|
] }),
|
|
1004
|
-
|
|
1000
|
+
a.type === "select" && a.options ? /* @__PURE__ */ c(
|
|
1005
1001
|
"select",
|
|
1006
1002
|
{
|
|
1007
|
-
value: a
|
|
1008
|
-
onChange: (l) => s(
|
|
1003
|
+
value: t[a.name] || a.defaultValue || "",
|
|
1004
|
+
onChange: (l) => s(a.name, l.target.value),
|
|
1009
1005
|
children: [
|
|
1010
1006
|
/* @__PURE__ */ e("option", { value: "", children: i("contractEditor.select", "Select...") }),
|
|
1011
|
-
|
|
1007
|
+
a.options.map((l) => /* @__PURE__ */ e("option", { value: l, children: l }, l))
|
|
1012
1008
|
]
|
|
1013
1009
|
}
|
|
1014
|
-
) :
|
|
1010
|
+
) : a.type === "date" ? /* @__PURE__ */ e(
|
|
1015
1011
|
"input",
|
|
1016
1012
|
{
|
|
1017
1013
|
type: "date",
|
|
1018
|
-
value: a
|
|
1019
|
-
onChange: (l) => s(
|
|
1014
|
+
value: t[a.name] || a.defaultValue || "",
|
|
1015
|
+
onChange: (l) => s(a.name, l.target.value)
|
|
1020
1016
|
}
|
|
1021
1017
|
) : /* @__PURE__ */ e(
|
|
1022
1018
|
"input",
|
|
1023
1019
|
{
|
|
1024
|
-
type:
|
|
1025
|
-
value: a
|
|
1026
|
-
placeholder:
|
|
1027
|
-
onChange: (l) => s(
|
|
1020
|
+
type: a.type === "number" || a.type === "currency" ? "number" : "text",
|
|
1021
|
+
value: t[a.name] || a.defaultValue || "",
|
|
1022
|
+
placeholder: a.placeholder,
|
|
1023
|
+
onChange: (l) => s(a.name, l.target.value)
|
|
1028
1024
|
}
|
|
1029
1025
|
)
|
|
1030
|
-
] },
|
|
1026
|
+
] }, a.name)) })
|
|
1031
1027
|
] });
|
|
1032
1028
|
}, $c = ({
|
|
1033
|
-
section:
|
|
1029
|
+
section: t,
|
|
1034
1030
|
variables: n,
|
|
1035
1031
|
readOnly: s,
|
|
1036
1032
|
onToggle: i,
|
|
1037
|
-
onRemoveClause:
|
|
1033
|
+
onRemoveClause: a,
|
|
1038
1034
|
onMoveClause: l
|
|
1039
1035
|
}) => {
|
|
1040
|
-
const { t: h } =
|
|
1036
|
+
const { t: h } = K(), r = (o) => o.replace(/\{\{(\w+)\}\}/g, (w, A) => n[A] || `[${A}]`);
|
|
1041
1037
|
return /* @__PURE__ */ c(
|
|
1042
1038
|
"div",
|
|
1043
1039
|
{
|
|
1044
|
-
className: `nice-contract-section ${
|
|
1040
|
+
className: `nice-contract-section ${t.collapsed ? "nice-contract-section--collapsed" : ""}`,
|
|
1045
1041
|
children: [
|
|
1046
1042
|
/* @__PURE__ */ c("div", { className: "nice-contract-section-header", onClick: i, children: [
|
|
1047
|
-
/* @__PURE__ */ e("span", { className: "nice-contract-section-toggle", children:
|
|
1048
|
-
/* @__PURE__ */ e("h3", { children:
|
|
1049
|
-
/* @__PURE__ */
|
|
1050
|
-
|
|
1051
|
-
|
|
1052
|
-
|
|
1043
|
+
/* @__PURE__ */ e("span", { className: "nice-contract-section-toggle", children: t.collapsed ? /* @__PURE__ */ e(Fe, { size: 14 }) : /* @__PURE__ */ e(Se, { size: 14 }) }),
|
|
1044
|
+
/* @__PURE__ */ e("h3", { children: t.title }),
|
|
1045
|
+
/* @__PURE__ */ e("span", { className: "nice-contract-section-count", children: h("contractEditor.clauseS", "{clauses} clause(s)").replace(
|
|
1046
|
+
"{clauses}",
|
|
1047
|
+
String(t.clauses.length)
|
|
1048
|
+
) })
|
|
1053
1049
|
] }),
|
|
1054
|
-
!
|
|
1055
|
-
|
|
1050
|
+
!t.collapsed && /* @__PURE__ */ c("div", { className: "nice-contract-section-content", children: [
|
|
1051
|
+
t.clauses.map((o, w) => /* @__PURE__ */ c("div", { className: "nice-contract-clause", children: [
|
|
1056
1052
|
/* @__PURE__ */ c("div", { className: "nice-contract-clause-header", children: [
|
|
1057
1053
|
/* @__PURE__ */ e(
|
|
1058
1054
|
"span",
|
|
@@ -1079,11 +1075,11 @@ const Ce = {
|
|
|
1079
1075
|
{
|
|
1080
1076
|
type: "button",
|
|
1081
1077
|
onClick: () => l(o.id, "down"),
|
|
1082
|
-
disabled: w ===
|
|
1078
|
+
disabled: w === t.clauses.length - 1,
|
|
1083
1079
|
children: /* @__PURE__ */ e(sc, { size: 14 })
|
|
1084
1080
|
}
|
|
1085
1081
|
),
|
|
1086
|
-
/* @__PURE__ */ e("button", { type: "button", onClick: () =>
|
|
1082
|
+
/* @__PURE__ */ e("button", { type: "button", onClick: () => a(o.id), children: /* @__PURE__ */ e(be, { size: 14 }) })
|
|
1087
1083
|
] })
|
|
1088
1084
|
] }),
|
|
1089
1085
|
/* @__PURE__ */ e(
|
|
@@ -1094,7 +1090,7 @@ const Ce = {
|
|
|
1094
1090
|
}
|
|
1095
1091
|
)
|
|
1096
1092
|
] }, o.id)),
|
|
1097
|
-
|
|
1093
|
+
t.clauses.length === 0 && /* @__PURE__ */ e("div", { className: "nice-contract-section-empty", children: h(
|
|
1098
1094
|
"contractEditor.noClausesInThisSection",
|
|
1099
1095
|
"No clauses in this section. Drag clauses here or use the library."
|
|
1100
1096
|
) })
|
|
@@ -1102,11 +1098,11 @@ const Ce = {
|
|
|
1102
1098
|
]
|
|
1103
1099
|
}
|
|
1104
1100
|
);
|
|
1105
|
-
}, Mc = ({ workflow:
|
|
1106
|
-
const { t: s } =
|
|
1101
|
+
}, Mc = ({ workflow: t, onAction: n }) => {
|
|
1102
|
+
const { t: s } = K(), [i, a] = k(null), [l, h] = k("");
|
|
1107
1103
|
return /* @__PURE__ */ c("div", { className: "nice-contract-workflow", children: [
|
|
1108
1104
|
/* @__PURE__ */ e("h4", { children: s("contractEditor.approvalWorkflow", "Approval Workflow") }),
|
|
1109
|
-
/* @__PURE__ */ e("div", { className: "nice-contract-workflow-steps", children:
|
|
1105
|
+
/* @__PURE__ */ e("div", { className: "nice-contract-workflow-steps", children: t.steps.map((r, o) => /* @__PURE__ */ c(
|
|
1110
1106
|
"div",
|
|
1111
1107
|
{
|
|
1112
1108
|
className: `nice-contract-workflow-step nice-contract-workflow-step--${r.status}`,
|
|
@@ -1127,7 +1123,7 @@ const Ce = {
|
|
|
1127
1123
|
/* @__PURE__ */ e("span", { children: w.name }),
|
|
1128
1124
|
/* @__PURE__ */ e("span", { className: "nice-contract-approver-role", children: w.role })
|
|
1129
1125
|
] }, w.id)) }),
|
|
1130
|
-
r.status === "pending" &&
|
|
1126
|
+
r.status === "pending" && t.currentStep === o && /* @__PURE__ */ e("div", { className: "nice-contract-workflow-actions", children: i === r.id ? /* @__PURE__ */ c(te, { children: [
|
|
1131
1127
|
/* @__PURE__ */ e(
|
|
1132
1128
|
"textarea",
|
|
1133
1129
|
{
|
|
@@ -1143,7 +1139,7 @@ const Ce = {
|
|
|
1143
1139
|
type: "button",
|
|
1144
1140
|
className: "nice-contract-btn nice-contract-btn--approve",
|
|
1145
1141
|
onClick: () => {
|
|
1146
|
-
n(r.id, "approve", l),
|
|
1142
|
+
n(r.id, "approve", l), a(null), h("");
|
|
1147
1143
|
},
|
|
1148
1144
|
children: [
|
|
1149
1145
|
/* @__PURE__ */ e(se, { size: 14 }),
|
|
@@ -1158,7 +1154,7 @@ const Ce = {
|
|
|
1158
1154
|
type: "button",
|
|
1159
1155
|
className: "nice-contract-btn nice-contract-btn--reject",
|
|
1160
1156
|
onClick: () => {
|
|
1161
|
-
n(r.id, "reject", l),
|
|
1157
|
+
n(r.id, "reject", l), a(null), h("");
|
|
1162
1158
|
},
|
|
1163
1159
|
children: [
|
|
1164
1160
|
/* @__PURE__ */ e(he, { size: 14 }),
|
|
@@ -1167,14 +1163,14 @@ const Ce = {
|
|
|
1167
1163
|
]
|
|
1168
1164
|
}
|
|
1169
1165
|
),
|
|
1170
|
-
/* @__PURE__ */ e("button", { type: "button", onClick: () =>
|
|
1166
|
+
/* @__PURE__ */ e("button", { type: "button", onClick: () => a(null), children: s("contractEditor.cancel", "Cancel") })
|
|
1171
1167
|
] })
|
|
1172
1168
|
] }) : /* @__PURE__ */ e(
|
|
1173
1169
|
"button",
|
|
1174
1170
|
{
|
|
1175
1171
|
type: "button",
|
|
1176
1172
|
className: "nice-contract-btn",
|
|
1177
|
-
onClick: () =>
|
|
1173
|
+
onClick: () => a(r.id),
|
|
1178
1174
|
children: s("contractEditor.review", "Review")
|
|
1179
1175
|
}
|
|
1180
1176
|
) })
|
|
@@ -1183,37 +1179,37 @@ const Ce = {
|
|
|
1183
1179
|
r.id
|
|
1184
1180
|
)) })
|
|
1185
1181
|
] });
|
|
1186
|
-
},
|
|
1182
|
+
}, st = /* @__PURE__ */ Object.assign(
|
|
1187
1183
|
/* @__PURE__ */ le(
|
|
1188
1184
|
({
|
|
1189
|
-
document:
|
|
1185
|
+
document: t,
|
|
1190
1186
|
clauseLibrary: n = [],
|
|
1191
1187
|
readOnly: s = !1,
|
|
1192
1188
|
showClauseLibrary: i = !0,
|
|
1193
|
-
showVersionHistory:
|
|
1189
|
+
showVersionHistory: a = !1,
|
|
1194
1190
|
showComments: l = !1,
|
|
1195
1191
|
showWorkflow: h = !0,
|
|
1196
1192
|
currentUser: r,
|
|
1197
1193
|
onChange: o,
|
|
1198
1194
|
onAddClause: w,
|
|
1199
|
-
onRemoveClause:
|
|
1195
|
+
onRemoveClause: A,
|
|
1200
1196
|
onVariableChange: I,
|
|
1201
1197
|
onAddComment: C,
|
|
1202
|
-
onApprovalAction:
|
|
1198
|
+
onApprovalAction: L,
|
|
1203
1199
|
onRestoreVersion: F,
|
|
1204
1200
|
onSave: U,
|
|
1205
|
-
onExport:
|
|
1206
|
-
className:
|
|
1201
|
+
onExport: E,
|
|
1202
|
+
className: $ = "",
|
|
1207
1203
|
style: ce,
|
|
1208
|
-
tutorial:
|
|
1204
|
+
tutorial: M
|
|
1209
1205
|
}, q) => {
|
|
1210
1206
|
var G;
|
|
1211
|
-
const { t:
|
|
1207
|
+
const { t: z } = K(), [m, N] = k(t), [g, V] = k(i ? "library" : null), [u, B] = k(
|
|
1212
1208
|
((G = m.sections[0]) == null ? void 0 : G.id) || null
|
|
1213
1209
|
), P = m.sections.flatMap(
|
|
1214
1210
|
(v) => v.clauses.flatMap((D) => D.variables || [])
|
|
1215
1211
|
).filter(
|
|
1216
|
-
(v, D,
|
|
1212
|
+
(v, D, j) => j.findIndex((W) => W.name === v.name) === D
|
|
1217
1213
|
), x = R(
|
|
1218
1214
|
(v) => {
|
|
1219
1215
|
const D = { ...m, ...v, updatedAt: /* @__PURE__ */ new Date() };
|
|
@@ -1222,46 +1218,46 @@ const Ce = {
|
|
|
1222
1218
|
[m, o]
|
|
1223
1219
|
), H = R(
|
|
1224
1220
|
(v, D) => {
|
|
1225
|
-
const
|
|
1226
|
-
(
|
|
1221
|
+
const j = m.sections.map(
|
|
1222
|
+
(W) => W.id === D ? { ...W, clauses: [...W.clauses, { ...v, id: `${v.id}-${Date.now()}` }] } : W
|
|
1227
1223
|
);
|
|
1228
|
-
x({ sections:
|
|
1224
|
+
x({ sections: j }), w == null || w(v, D);
|
|
1229
1225
|
},
|
|
1230
1226
|
[m, x, w]
|
|
1231
|
-
),
|
|
1227
|
+
), Y = R(
|
|
1232
1228
|
(v, D) => {
|
|
1233
|
-
const
|
|
1234
|
-
(
|
|
1229
|
+
const j = m.sections.map(
|
|
1230
|
+
(W) => W.id === D ? { ...W, clauses: W.clauses.filter((Q) => Q.id !== v) } : W
|
|
1235
1231
|
);
|
|
1236
|
-
x({ sections:
|
|
1232
|
+
x({ sections: j }), A == null || A(v, D);
|
|
1237
1233
|
},
|
|
1238
|
-
[m, x,
|
|
1234
|
+
[m, x, A]
|
|
1239
1235
|
), b = R(
|
|
1240
|
-
(v, D,
|
|
1241
|
-
const
|
|
1236
|
+
(v, D, j) => {
|
|
1237
|
+
const W = m.sections.map((Q) => {
|
|
1242
1238
|
if (Q.id !== v)
|
|
1243
1239
|
return Q;
|
|
1244
1240
|
const d = Q.clauses.findIndex((ee) => ee.id === D);
|
|
1245
1241
|
if (d === -1)
|
|
1246
1242
|
return Q;
|
|
1247
|
-
const p =
|
|
1243
|
+
const p = j === "up" ? d - 1 : d + 1;
|
|
1248
1244
|
if (p < 0 || p >= Q.clauses.length)
|
|
1249
1245
|
return Q;
|
|
1250
1246
|
const y = [...Q.clauses];
|
|
1251
1247
|
return [y[d], y[p]] = [y[p], y[d]], { ...Q, clauses: y };
|
|
1252
1248
|
});
|
|
1253
|
-
x({ sections:
|
|
1249
|
+
x({ sections: W });
|
|
1254
1250
|
},
|
|
1255
1251
|
[m, x]
|
|
1256
1252
|
), S = R(
|
|
1257
1253
|
(v) => {
|
|
1258
1254
|
const D = m.sections.map(
|
|
1259
|
-
(
|
|
1255
|
+
(j) => j.id === v ? { ...j, collapsed: !j.collapsed } : j
|
|
1260
1256
|
);
|
|
1261
1257
|
x({ sections: D });
|
|
1262
1258
|
},
|
|
1263
1259
|
[m, x]
|
|
1264
|
-
),
|
|
1260
|
+
), _ = R(
|
|
1265
1261
|
(v, D) => {
|
|
1266
1262
|
x({ variables: { ...m.variables, [v]: D } }), I == null || I(v, D);
|
|
1267
1263
|
},
|
|
@@ -1271,16 +1267,16 @@ const Ce = {
|
|
|
1271
1267
|
return P.forEach((D) => {
|
|
1272
1268
|
D.required && !m.variables[D.name] && v.push(`Missing required variable: ${D.name}`);
|
|
1273
1269
|
}), m.sections.forEach((D) => {
|
|
1274
|
-
D.clauses.forEach((
|
|
1275
|
-
|
|
1270
|
+
D.clauses.forEach((j) => {
|
|
1271
|
+
j.isRequired && !j.content && v.push(`Required clause "${j.name}" is empty`);
|
|
1276
1272
|
});
|
|
1277
1273
|
}), { valid: v.length === 0, errors: v };
|
|
1278
1274
|
}, [m, P]);
|
|
1279
1275
|
re(q, () => ({
|
|
1280
1276
|
getDocument: () => m,
|
|
1281
1277
|
insertClause: H,
|
|
1282
|
-
setVariable:
|
|
1283
|
-
exportDocument: (v) =>
|
|
1278
|
+
setVariable: _,
|
|
1279
|
+
exportDocument: (v) => E == null ? void 0 : E(v),
|
|
1284
1280
|
validate: J
|
|
1285
1281
|
}));
|
|
1286
1282
|
const f = Pc[m.status], T = /* @__PURE__ */ c("div", { className: "nice-contract-header", children: [
|
|
@@ -1302,19 +1298,19 @@ const Ce = {
|
|
|
1302
1298
|
type: "button",
|
|
1303
1299
|
className: "nice-contract-btn nice-contract-btn--primary",
|
|
1304
1300
|
onClick: () => U(m),
|
|
1305
|
-
children:
|
|
1301
|
+
children: z("contractEditor.save", "Save")
|
|
1306
1302
|
}
|
|
1307
1303
|
),
|
|
1308
|
-
|
|
1304
|
+
E && /* @__PURE__ */ c("div", { className: "nice-contract-export-dropdown", children: [
|
|
1309
1305
|
/* @__PURE__ */ c("button", { type: "button", className: "nice-contract-btn", children: [
|
|
1310
|
-
|
|
1306
|
+
z("contractEditor.export", "Export"),
|
|
1311
1307
|
" ",
|
|
1312
1308
|
/* @__PURE__ */ e(Se, { size: 14 })
|
|
1313
1309
|
] }),
|
|
1314
1310
|
/* @__PURE__ */ c("div", { className: "nice-contract-export-menu", children: [
|
|
1315
|
-
/* @__PURE__ */ e("button", { type: "button", onClick: () =>
|
|
1316
|
-
/* @__PURE__ */ e("button", { type: "button", onClick: () =>
|
|
1317
|
-
/* @__PURE__ */ e("button", { type: "button", onClick: () =>
|
|
1311
|
+
/* @__PURE__ */ e("button", { type: "button", onClick: () => E("pdf"), children: "PDF" }),
|
|
1312
|
+
/* @__PURE__ */ e("button", { type: "button", onClick: () => E("docx"), children: "Word (.docx)" }),
|
|
1313
|
+
/* @__PURE__ */ e("button", { type: "button", onClick: () => E("html"), children: z("contractEditor.html", "HTML") })
|
|
1318
1314
|
] })
|
|
1319
1315
|
] })
|
|
1320
1316
|
] })
|
|
@@ -1326,9 +1322,9 @@ const Ce = {
|
|
|
1326
1322
|
className: `nice-contract-toolbar-btn ${g === "library" ? "nice-contract-toolbar-btn--active" : ""}`,
|
|
1327
1323
|
onClick: () => V(g === "library" ? null : "library"),
|
|
1328
1324
|
children: [
|
|
1329
|
-
/* @__PURE__ */ e(
|
|
1325
|
+
/* @__PURE__ */ e(ac, { size: 16 }),
|
|
1330
1326
|
" ",
|
|
1331
|
-
|
|
1327
|
+
z("contractEditor.library", "Library")
|
|
1332
1328
|
]
|
|
1333
1329
|
}
|
|
1334
1330
|
),
|
|
@@ -1341,7 +1337,7 @@ const Ce = {
|
|
|
1341
1337
|
children: [
|
|
1342
1338
|
/* @__PURE__ */ e(Re, { size: 16 }),
|
|
1343
1339
|
" ",
|
|
1344
|
-
|
|
1340
|
+
z("contractEditor.variables", "Variables")
|
|
1345
1341
|
]
|
|
1346
1342
|
}
|
|
1347
1343
|
),
|
|
@@ -1354,20 +1350,20 @@ const Ce = {
|
|
|
1354
1350
|
children: [
|
|
1355
1351
|
/* @__PURE__ */ e(se, { size: 16 }),
|
|
1356
1352
|
" ",
|
|
1357
|
-
|
|
1353
|
+
z("contractEditor.workflow", "Workflow")
|
|
1358
1354
|
]
|
|
1359
1355
|
}
|
|
1360
1356
|
),
|
|
1361
|
-
|
|
1357
|
+
a && /* @__PURE__ */ c(
|
|
1362
1358
|
"button",
|
|
1363
1359
|
{
|
|
1364
1360
|
type: "button",
|
|
1365
1361
|
className: `nice-contract-toolbar-btn ${g === "history" ? "nice-contract-toolbar-btn--active" : ""}`,
|
|
1366
1362
|
onClick: () => V(g === "history" ? null : "history"),
|
|
1367
1363
|
children: [
|
|
1368
|
-
/* @__PURE__ */ e(
|
|
1364
|
+
/* @__PURE__ */ e(Ee, { size: 16 }),
|
|
1369
1365
|
" ",
|
|
1370
|
-
|
|
1366
|
+
z("contractEditor.history", "History")
|
|
1371
1367
|
]
|
|
1372
1368
|
}
|
|
1373
1369
|
)
|
|
@@ -1384,14 +1380,14 @@ const Ce = {
|
|
|
1384
1380
|
{
|
|
1385
1381
|
variables: m.variables,
|
|
1386
1382
|
definitions: P,
|
|
1387
|
-
onChange:
|
|
1383
|
+
onChange: _
|
|
1388
1384
|
}
|
|
1389
1385
|
),
|
|
1390
1386
|
g === "workflow" && m.workflow && /* @__PURE__ */ e(
|
|
1391
1387
|
Mc,
|
|
1392
1388
|
{
|
|
1393
1389
|
workflow: m.workflow,
|
|
1394
|
-
onAction: (v, D,
|
|
1390
|
+
onAction: (v, D, j) => L == null ? void 0 : L(v, D, j)
|
|
1395
1391
|
}
|
|
1396
1392
|
)
|
|
1397
1393
|
] }) : void 0;
|
|
@@ -1399,13 +1395,13 @@ const Ce = {
|
|
|
1399
1395
|
fc,
|
|
1400
1396
|
{
|
|
1401
1397
|
flush: !0,
|
|
1402
|
-
className: `nice-contract-editor ${
|
|
1398
|
+
className: `nice-contract-editor ${$}`,
|
|
1403
1399
|
style: ce,
|
|
1404
1400
|
menubar: T,
|
|
1405
1401
|
toolbar: X,
|
|
1406
1402
|
sidebar: Z,
|
|
1407
1403
|
children: /* @__PURE__ */ c("div", { className: "nice-contract-document", children: [
|
|
1408
|
-
/* @__PURE__ */ e("span", { style: { position: "absolute", top: 6, right: 6, zIndex: 30 }, children: /* @__PURE__ */ e(yc, { steps: wc(
|
|
1404
|
+
/* @__PURE__ */ e("span", { style: { position: "absolute", top: 6, right: 6, zIndex: 30 }, children: /* @__PURE__ */ e(yc, { steps: wc(M, Oc) }) }),
|
|
1409
1405
|
m.sections.map((v) => /* @__PURE__ */ e(
|
|
1410
1406
|
$c,
|
|
1411
1407
|
{
|
|
@@ -1413,8 +1409,8 @@ const Ce = {
|
|
|
1413
1409
|
variables: m.variables,
|
|
1414
1410
|
readOnly: s,
|
|
1415
1411
|
onToggle: () => S(v.id),
|
|
1416
|
-
onRemoveClause: (D) =>
|
|
1417
|
-
onMoveClause: (D,
|
|
1412
|
+
onRemoveClause: (D) => Y(D, v.id),
|
|
1413
|
+
onMoveClause: (D, j) => b(v.id, D, j)
|
|
1418
1414
|
},
|
|
1419
1415
|
v.id
|
|
1420
1416
|
))
|
|
@@ -1464,7 +1460,7 @@ const Ce = {
|
|
|
1464
1460
|
cookies: ["social_session"],
|
|
1465
1461
|
partners: ["Twitter", "YouTube", "Instagram"]
|
|
1466
1462
|
}
|
|
1467
|
-
],
|
|
1463
|
+
], Yc = {
|
|
1468
1464
|
title: "Cookie Preferences",
|
|
1469
1465
|
description: "We use cookies to enhance your experience. Choose which types of cookies you allow.",
|
|
1470
1466
|
acceptAll: "Accept All",
|
|
@@ -1483,8 +1479,8 @@ const Ce = {
|
|
|
1483
1479
|
processing: "Processing",
|
|
1484
1480
|
completed: "Completed",
|
|
1485
1481
|
close: "Close"
|
|
1486
|
-
},
|
|
1487
|
-
const { t: i } =
|
|
1482
|
+
}, Uc = ({ option: t, enabled: n, onChange: s }) => {
|
|
1483
|
+
const { t: i } = K();
|
|
1488
1484
|
return /* @__PURE__ */ c("div", { className: "nice-gdpr-option", children: [
|
|
1489
1485
|
/* @__PURE__ */ c("div", { className: "nice-gdpr-option-header", children: [
|
|
1490
1486
|
/* @__PURE__ */ c("label", { className: "nice-gdpr-option-toggle", children: [
|
|
@@ -1493,35 +1489,38 @@ const Ce = {
|
|
|
1493
1489
|
{
|
|
1494
1490
|
type: "checkbox",
|
|
1495
1491
|
checked: n,
|
|
1496
|
-
onChange: (
|
|
1497
|
-
disabled:
|
|
1492
|
+
onChange: (a) => s(a.target.checked),
|
|
1493
|
+
disabled: t.required
|
|
1498
1494
|
}
|
|
1499
1495
|
),
|
|
1500
1496
|
/* @__PURE__ */ e("span", { className: "nice-gdpr-toggle-slider" })
|
|
1501
1497
|
] }),
|
|
1502
1498
|
/* @__PURE__ */ c("div", { className: "nice-gdpr-option-info", children: [
|
|
1503
1499
|
/* @__PURE__ */ c("span", { className: "nice-gdpr-option-label", children: [
|
|
1504
|
-
|
|
1505
|
-
|
|
1500
|
+
t.label,
|
|
1501
|
+
t.required && /* @__PURE__ */ e("span", { className: "nice-gdpr-required", children: i("gdprConsent.required", "Required") })
|
|
1506
1502
|
] }),
|
|
1507
|
-
/* @__PURE__ */ e("span", { className: "nice-gdpr-option-desc", children:
|
|
1503
|
+
/* @__PURE__ */ e("span", { className: "nice-gdpr-option-desc", children: t.description })
|
|
1508
1504
|
] })
|
|
1509
1505
|
] }),
|
|
1510
|
-
|
|
1511
|
-
/* @__PURE__ */
|
|
1512
|
-
|
|
1506
|
+
t.partners && t.partners.length > 0 && /* @__PURE__ */ c("div", { className: "nice-gdpr-option-partners", children: [
|
|
1507
|
+
/* @__PURE__ */ c("span", { children: [
|
|
1508
|
+
i("gdprConsent.partners", "Partners:"),
|
|
1509
|
+
" "
|
|
1510
|
+
] }),
|
|
1511
|
+
t.partners.join(", ")
|
|
1513
1512
|
] })
|
|
1514
1513
|
] });
|
|
1515
1514
|
}, qc = ({
|
|
1516
|
-
requests:
|
|
1515
|
+
requests: t,
|
|
1517
1516
|
policies: n,
|
|
1518
1517
|
onRequest: s,
|
|
1519
1518
|
onDownload: i,
|
|
1520
|
-
labels:
|
|
1519
|
+
labels: a
|
|
1521
1520
|
}) => {
|
|
1522
|
-
const { t: l } =
|
|
1521
|
+
const { t: l } = K();
|
|
1523
1522
|
return /* @__PURE__ */ c("div", { className: "nice-gdpr-rights", children: [
|
|
1524
|
-
/* @__PURE__ */ e("h4", { children:
|
|
1523
|
+
/* @__PURE__ */ e("h4", { children: a.dataRights }),
|
|
1525
1524
|
/* @__PURE__ */ c("div", { className: "nice-gdpr-rights-actions", children: [
|
|
1526
1525
|
/* @__PURE__ */ c(
|
|
1527
1526
|
"button",
|
|
@@ -1532,7 +1531,7 @@ const Ce = {
|
|
|
1532
1531
|
children: [
|
|
1533
1532
|
/* @__PURE__ */ e(ve, { size: 16 }),
|
|
1534
1533
|
" ",
|
|
1535
|
-
|
|
1534
|
+
a.exportData
|
|
1536
1535
|
]
|
|
1537
1536
|
}
|
|
1538
1537
|
),
|
|
@@ -1545,14 +1544,14 @@ const Ce = {
|
|
|
1545
1544
|
children: [
|
|
1546
1545
|
/* @__PURE__ */ e(dc, { size: 16 }),
|
|
1547
1546
|
" ",
|
|
1548
|
-
|
|
1547
|
+
a.deleteData
|
|
1549
1548
|
]
|
|
1550
1549
|
}
|
|
1551
1550
|
)
|
|
1552
1551
|
] }),
|
|
1553
|
-
|
|
1552
|
+
t.length > 0 && /* @__PURE__ */ c("div", { className: "nice-gdpr-requests", children: [
|
|
1554
1553
|
/* @__PURE__ */ e("h5", { children: l("gdprConsent.previousRequests", "Previous Requests") }),
|
|
1555
|
-
|
|
1554
|
+
t.map((h) => /* @__PURE__ */ c("div", { className: `nice-gdpr-request nice-gdpr-request--${h.status}`, children: [
|
|
1556
1555
|
/* @__PURE__ */ e("span", { className: "nice-gdpr-request-type", children: h.type }),
|
|
1557
1556
|
/* @__PURE__ */ e("span", { className: "nice-gdpr-request-date", children: new Date(h.requestedAt).toLocaleDateString() }),
|
|
1558
1557
|
/* @__PURE__ */ e("span", { className: "nice-gdpr-request-status", children: h.status }),
|
|
@@ -1577,40 +1576,40 @@ const Ce = {
|
|
|
1577
1576
|
] }) }),
|
|
1578
1577
|
/* @__PURE__ */ e("tbody", { children: n.map((h, r) => /* @__PURE__ */ c("tr", { children: [
|
|
1579
1578
|
/* @__PURE__ */ e("td", { children: h.category }),
|
|
1580
|
-
/* @__PURE__ */
|
|
1581
|
-
|
|
1582
|
-
|
|
1583
|
-
|
|
1579
|
+
/* @__PURE__ */ e("td", { children: l("gdprConsent.days", "{retentionDays} days").replace(
|
|
1580
|
+
"{retentionDays}",
|
|
1581
|
+
String(h.retentionDays)
|
|
1582
|
+
) }),
|
|
1584
1583
|
/* @__PURE__ */ e("td", { children: h.legalBasis })
|
|
1585
1584
|
] }, r)) })
|
|
1586
1585
|
] })
|
|
1587
1586
|
] })
|
|
1588
1587
|
] });
|
|
1589
|
-
},
|
|
1588
|
+
}, nt = /* @__PURE__ */ Object.assign(
|
|
1590
1589
|
/* @__PURE__ */ le(
|
|
1591
1590
|
({
|
|
1592
|
-
appName:
|
|
1591
|
+
appName: t,
|
|
1593
1592
|
companyName: n,
|
|
1594
1593
|
options: s = jc,
|
|
1595
1594
|
currentConsent: i = null,
|
|
1596
|
-
retentionPolicies:
|
|
1595
|
+
retentionPolicies: a = [],
|
|
1597
1596
|
dataRequests: l = [],
|
|
1598
1597
|
privacyPolicy: h = [],
|
|
1599
1598
|
storageKey: r = "nice_gdpr_consent",
|
|
1600
1599
|
consentVersion: o = "1.0",
|
|
1601
1600
|
variant: w = "banner",
|
|
1602
|
-
position:
|
|
1601
|
+
position: A = "bottom",
|
|
1603
1602
|
onConsentChange: I,
|
|
1604
1603
|
onDataRequest: C,
|
|
1605
|
-
onDownloadExport:
|
|
1604
|
+
onDownloadExport: L,
|
|
1606
1605
|
privacyPolicyUrl: F,
|
|
1607
1606
|
cookiePolicyUrl: U,
|
|
1608
|
-
termsUrl:
|
|
1609
|
-
labels:
|
|
1607
|
+
termsUrl: E,
|
|
1608
|
+
labels: $,
|
|
1610
1609
|
className: ce = "",
|
|
1611
|
-
style:
|
|
1610
|
+
style: M
|
|
1612
1611
|
}, q) => {
|
|
1613
|
-
const { t:
|
|
1612
|
+
const { t: z } = K(), m = { ...Yc, ...$ }, [N, g] = k(!1), [V, u] = k(!1), [B, O] = k(!1), [P, x] = k(() => {
|
|
1614
1613
|
const f = {};
|
|
1615
1614
|
return s.forEach((T) => {
|
|
1616
1615
|
f[T.id] = (i == null ? void 0 : i.categories[T.id]) ?? T.enabled;
|
|
@@ -1636,7 +1635,7 @@ const Ce = {
|
|
|
1636
1635
|
x(X), g(!1), u(!1), I == null || I(Z);
|
|
1637
1636
|
},
|
|
1638
1637
|
[P, o, r, I]
|
|
1639
|
-
),
|
|
1638
|
+
), Y = R(() => {
|
|
1640
1639
|
const f = {};
|
|
1641
1640
|
s.forEach((T) => {
|
|
1642
1641
|
f[T.id] = !0;
|
|
@@ -1675,12 +1674,12 @@ const Ce = {
|
|
|
1675
1674
|
}
|
|
1676
1675
|
})), !N && w !== "embedded")
|
|
1677
1676
|
return null;
|
|
1678
|
-
const
|
|
1677
|
+
const _ = /* @__PURE__ */ c("div", { className: "nice-gdpr-content", children: [
|
|
1679
1678
|
/* @__PURE__ */ c("div", { className: "nice-gdpr-header", children: [
|
|
1680
1679
|
/* @__PURE__ */ e("div", { className: "nice-gdpr-icon", children: /* @__PURE__ */ e(rc, { size: 32 }) }),
|
|
1681
1680
|
/* @__PURE__ */ c("div", { className: "nice-gdpr-header-text", children: [
|
|
1682
1681
|
/* @__PURE__ */ e("h3", { children: m.title }),
|
|
1683
|
-
/* @__PURE__ */ e("p", { children: m.description.replace("{app}",
|
|
1682
|
+
/* @__PURE__ */ e("p", { children: m.description.replace("{app}", t).replace("{company}", n) })
|
|
1684
1683
|
] })
|
|
1685
1684
|
] }),
|
|
1686
1685
|
!V && !B && /* @__PURE__ */ c("div", { className: "nice-gdpr-quick-actions", children: [
|
|
@@ -1689,7 +1688,7 @@ const Ce = {
|
|
|
1689
1688
|
{
|
|
1690
1689
|
type: "button",
|
|
1691
1690
|
className: "nice-gdpr-btn nice-gdpr-btn--primary",
|
|
1692
|
-
onClick:
|
|
1691
|
+
onClick: Y,
|
|
1693
1692
|
children: m.acceptAll
|
|
1694
1693
|
}
|
|
1695
1694
|
),
|
|
@@ -1714,7 +1713,7 @@ const Ce = {
|
|
|
1714
1713
|
] }),
|
|
1715
1714
|
V && !B && /* @__PURE__ */ c("div", { className: "nice-gdpr-preferences", children: [
|
|
1716
1715
|
/* @__PURE__ */ e("div", { className: "nice-gdpr-options", children: s.map((f) => /* @__PURE__ */ e(
|
|
1717
|
-
|
|
1716
|
+
Uc,
|
|
1718
1717
|
{
|
|
1719
1718
|
option: f,
|
|
1720
1719
|
enabled: P[f.id],
|
|
@@ -1743,14 +1742,14 @@ const Ce = {
|
|
|
1743
1742
|
)
|
|
1744
1743
|
] })
|
|
1745
1744
|
] }),
|
|
1746
|
-
B && /* @__PURE__ */ c(
|
|
1745
|
+
B && /* @__PURE__ */ c(te, { children: [
|
|
1747
1746
|
/* @__PURE__ */ e(
|
|
1748
1747
|
qc,
|
|
1749
1748
|
{
|
|
1750
1749
|
requests: l,
|
|
1751
|
-
policies:
|
|
1750
|
+
policies: a,
|
|
1752
1751
|
onRequest: S,
|
|
1753
|
-
onDownload: (f) =>
|
|
1752
|
+
onDownload: (f) => L == null ? void 0 : L(f),
|
|
1754
1753
|
labels: m
|
|
1755
1754
|
}
|
|
1756
1755
|
),
|
|
@@ -1763,18 +1762,18 @@ const Ce = {
|
|
|
1763
1762
|
children: [
|
|
1764
1763
|
/* @__PURE__ */ e(oc, { size: 14 }),
|
|
1765
1764
|
" ",
|
|
1766
|
-
|
|
1765
|
+
z("gdprConsent.backToPreferences", "Back to preferences")
|
|
1767
1766
|
]
|
|
1768
1767
|
}
|
|
1769
1768
|
)
|
|
1770
1769
|
] }),
|
|
1771
1770
|
/* @__PURE__ */ c("div", { className: "nice-gdpr-footer", children: [
|
|
1772
|
-
F && /* @__PURE__ */ e("a", { href: F, target: "_blank", rel: "noopener noreferrer", children:
|
|
1773
|
-
U && /* @__PURE__ */ e("a", { href: U, target: "_blank", rel: "noopener noreferrer", children:
|
|
1774
|
-
|
|
1771
|
+
F && /* @__PURE__ */ e("a", { href: F, target: "_blank", rel: "noopener noreferrer", children: z("gdprConsent.privacyPolicy", "Privacy Policy") }),
|
|
1772
|
+
U && /* @__PURE__ */ e("a", { href: U, target: "_blank", rel: "noopener noreferrer", children: z("gdprConsent.cookiePolicy", "Cookie Policy") }),
|
|
1773
|
+
E && /* @__PURE__ */ e("a", { href: E, target: "_blank", rel: "noopener noreferrer", children: z("gdprConsent.termsOfService", "Terms of Service") })
|
|
1775
1774
|
] })
|
|
1776
|
-
] }), J = `nice-gdpr-consent nice-gdpr-consent--${w} nice-gdpr-consent--${
|
|
1777
|
-
return w === "modal" ? /* @__PURE__ */ e("div", { className: "nice-gdpr-overlay", children: /* @__PURE__ */ e("div", { className: J, style:
|
|
1775
|
+
] }), J = `nice-gdpr-consent nice-gdpr-consent--${w} nice-gdpr-consent--${A} ${ce}`;
|
|
1776
|
+
return w === "modal" ? /* @__PURE__ */ e("div", { className: "nice-gdpr-overlay", children: /* @__PURE__ */ e("div", { className: J, style: M, role: "dialog", "aria-modal": "true", children: _ }) }) : /* @__PURE__ */ e("div", { className: J, style: M, children: _ });
|
|
1778
1777
|
}
|
|
1779
1778
|
),
|
|
1780
1779
|
{ displayName: "NiceGDPRConsent" }
|
|
@@ -1788,14 +1787,14 @@ const Ce = {
|
|
|
1788
1787
|
action: /* @__PURE__ */ e(qe, { size: 16 }),
|
|
1789
1788
|
custom: /* @__PURE__ */ e(De, { size: 16 })
|
|
1790
1789
|
}, Bc = ({
|
|
1791
|
-
value:
|
|
1790
|
+
value: t,
|
|
1792
1791
|
onChange: n,
|
|
1793
1792
|
onKeyDown: s,
|
|
1794
1793
|
placeholder: i,
|
|
1795
|
-
isLoading:
|
|
1794
|
+
isLoading: a,
|
|
1796
1795
|
inputRef: l
|
|
1797
1796
|
}) => {
|
|
1798
|
-
const { t: h } =
|
|
1797
|
+
const { t: h } = K();
|
|
1799
1798
|
return /* @__PURE__ */ c("div", { className: "nice-search-input-container", children: [
|
|
1800
1799
|
/* @__PURE__ */ e("span", { className: "nice-search-icon", children: /* @__PURE__ */ e(ge, { size: 16 }) }),
|
|
1801
1800
|
/* @__PURE__ */ e(
|
|
@@ -1805,14 +1804,14 @@ const Ce = {
|
|
|
1805
1804
|
type: "text",
|
|
1806
1805
|
className: "nice-search-input",
|
|
1807
1806
|
placeholder: i,
|
|
1808
|
-
value:
|
|
1807
|
+
value: t,
|
|
1809
1808
|
onChange: (r) => n(r.target.value),
|
|
1810
1809
|
onKeyDown: s,
|
|
1811
1810
|
"aria-label": h("globalSearch.search", "Search")
|
|
1812
1811
|
}
|
|
1813
1812
|
),
|
|
1814
|
-
|
|
1815
|
-
|
|
1813
|
+
a && /* @__PURE__ */ e("span", { className: "nice-search-loader" }),
|
|
1814
|
+
t && !a && /* @__PURE__ */ e(
|
|
1816
1815
|
"button",
|
|
1817
1816
|
{
|
|
1818
1817
|
type: "button",
|
|
@@ -1823,7 +1822,7 @@ const Ce = {
|
|
|
1823
1822
|
}
|
|
1824
1823
|
)
|
|
1825
1824
|
] });
|
|
1826
|
-
}, Hc = ({ result:
|
|
1825
|
+
}, Hc = ({ result: t, isSelected: n, onSelect: s, renderResult: i }) => i ? /* @__PURE__ */ e("div", { onClick: s, children: i(t, n) }) : /* @__PURE__ */ c(
|
|
1827
1826
|
"div",
|
|
1828
1827
|
{
|
|
1829
1828
|
className: `nice-search-result ${n ? "nice-search-result--selected" : ""}`,
|
|
@@ -1831,74 +1830,77 @@ const Ce = {
|
|
|
1831
1830
|
role: "option",
|
|
1832
1831
|
"aria-selected": n,
|
|
1833
1832
|
children: [
|
|
1834
|
-
/* @__PURE__ */ e("div", { className: "nice-search-result-icon", children:
|
|
1833
|
+
/* @__PURE__ */ e("div", { className: "nice-search-result-icon", children: t.icon || (t.image ? /* @__PURE__ */ e("img", { src: t.image, alt: "" }) : Je[t.type]) }),
|
|
1835
1834
|
/* @__PURE__ */ c("div", { className: "nice-search-result-content", children: [
|
|
1836
|
-
/* @__PURE__ */ e("span", { className: "nice-search-result-title", children:
|
|
1837
|
-
|
|
1838
|
-
|
|
1835
|
+
/* @__PURE__ */ e("span", { className: "nice-search-result-title", children: t.title }),
|
|
1836
|
+
t.subtitle && /* @__PURE__ */ e("span", { className: "nice-search-result-subtitle", children: t.subtitle }),
|
|
1837
|
+
t.description && /* @__PURE__ */ e("span", { className: "nice-search-result-desc", children: t.description })
|
|
1839
1838
|
] }),
|
|
1840
1839
|
/* @__PURE__ */ c("div", { className: "nice-search-result-meta", children: [
|
|
1841
|
-
/* @__PURE__ */ e("span", { className: "nice-search-result-source", children:
|
|
1842
|
-
/* @__PURE__ */ e("span", { className: "nice-search-result-type", children:
|
|
1840
|
+
/* @__PURE__ */ e("span", { className: "nice-search-result-source", children: t.source }),
|
|
1841
|
+
/* @__PURE__ */ e("span", { className: "nice-search-result-type", children: t.type })
|
|
1843
1842
|
] }),
|
|
1844
|
-
|
|
1843
|
+
t.actions && t.actions.length > 0 && /* @__PURE__ */ e("div", { className: "nice-search-result-actions", children: t.actions.map((a) => /* @__PURE__ */ e(
|
|
1845
1844
|
"button",
|
|
1846
1845
|
{
|
|
1847
1846
|
type: "button",
|
|
1848
1847
|
className: "nice-search-action-btn",
|
|
1849
1848
|
onClick: (l) => {
|
|
1850
|
-
l.stopPropagation(),
|
|
1849
|
+
l.stopPropagation(), a.onClick();
|
|
1851
1850
|
},
|
|
1852
|
-
title:
|
|
1853
|
-
children:
|
|
1851
|
+
title: a.label,
|
|
1852
|
+
children: a.icon || a.label
|
|
1854
1853
|
},
|
|
1855
|
-
|
|
1854
|
+
a.id
|
|
1856
1855
|
)) })
|
|
1857
1856
|
]
|
|
1858
1857
|
}
|
|
1859
|
-
), Jc = ({ categories:
|
|
1860
|
-
|
|
1861
|
-
|
|
1862
|
-
|
|
1863
|
-
|
|
1864
|
-
|
|
1865
|
-
|
|
1866
|
-
|
|
1867
|
-
|
|
1868
|
-
|
|
1869
|
-
|
|
1870
|
-
|
|
1871
|
-
|
|
1872
|
-
|
|
1873
|
-
|
|
1874
|
-
|
|
1875
|
-
|
|
1876
|
-
|
|
1877
|
-
|
|
1878
|
-
|
|
1879
|
-
|
|
1880
|
-
|
|
1881
|
-
|
|
1882
|
-
|
|
1883
|
-
|
|
1884
|
-
|
|
1858
|
+
), Jc = ({ categories: t, selected: n, onSelect: s }) => {
|
|
1859
|
+
const { t: i } = K();
|
|
1860
|
+
return /* @__PURE__ */ c("div", { className: "nice-search-categories", children: [
|
|
1861
|
+
/* @__PURE__ */ e(
|
|
1862
|
+
"button",
|
|
1863
|
+
{
|
|
1864
|
+
type: "button",
|
|
1865
|
+
className: `nice-search-category ${n === null ? "nice-search-category--active" : ""}`,
|
|
1866
|
+
onClick: () => s(null),
|
|
1867
|
+
children: i("globalSearch.all", "All")
|
|
1868
|
+
}
|
|
1869
|
+
),
|
|
1870
|
+
t.map((a) => /* @__PURE__ */ c(
|
|
1871
|
+
"button",
|
|
1872
|
+
{
|
|
1873
|
+
type: "button",
|
|
1874
|
+
className: `nice-search-category ${n === a.id ? "nice-search-category--active" : ""}`,
|
|
1875
|
+
onClick: () => s(a.id),
|
|
1876
|
+
children: [
|
|
1877
|
+
a.icon && /* @__PURE__ */ e("span", { className: "nice-search-category-icon", children: a.icon }),
|
|
1878
|
+
a.label,
|
|
1879
|
+
a.count !== void 0 && /* @__PURE__ */ e("span", { className: "nice-search-category-count", children: a.count })
|
|
1880
|
+
]
|
|
1881
|
+
},
|
|
1882
|
+
a.id
|
|
1883
|
+
))
|
|
1884
|
+
] });
|
|
1885
|
+
}, Gc = ({
|
|
1886
|
+
searches: t,
|
|
1885
1887
|
onSelect: n,
|
|
1886
1888
|
onClear: s,
|
|
1887
1889
|
label: i,
|
|
1888
|
-
clearLabel:
|
|
1890
|
+
clearLabel: a
|
|
1889
1891
|
}) => /* @__PURE__ */ c("div", { className: "nice-search-recent", children: [
|
|
1890
1892
|
/* @__PURE__ */ c("div", { className: "nice-search-recent-header", children: [
|
|
1891
1893
|
/* @__PURE__ */ e("span", { children: i }),
|
|
1892
|
-
/* @__PURE__ */ e("button", { type: "button", onClick: s, children:
|
|
1894
|
+
/* @__PURE__ */ e("button", { type: "button", onClick: s, children: a })
|
|
1893
1895
|
] }),
|
|
1894
|
-
/* @__PURE__ */ e("div", { className: "nice-search-recent-list", children:
|
|
1896
|
+
/* @__PURE__ */ e("div", { className: "nice-search-recent-list", children: t.map((l, h) => /* @__PURE__ */ c(
|
|
1895
1897
|
"button",
|
|
1896
1898
|
{
|
|
1897
1899
|
type: "button",
|
|
1898
1900
|
className: "nice-search-recent-item",
|
|
1899
1901
|
onClick: () => n(l.query),
|
|
1900
1902
|
children: [
|
|
1901
|
-
/* @__PURE__ */ e("span", { className: "nice-search-recent-icon", children: /* @__PURE__ */ e(
|
|
1903
|
+
/* @__PURE__ */ e("span", { className: "nice-search-recent-icon", children: /* @__PURE__ */ e(Ee, { size: 14 }) }),
|
|
1902
1904
|
/* @__PURE__ */ e("span", { className: "nice-search-recent-query", children: l.query })
|
|
1903
1905
|
]
|
|
1904
1906
|
},
|
|
@@ -1912,32 +1914,32 @@ const Ce = {
|
|
|
1912
1914
|
clearRecent: "Clear",
|
|
1913
1915
|
categories: "Categories",
|
|
1914
1916
|
filters: "Filters"
|
|
1915
|
-
},
|
|
1917
|
+
}, lt = /* @__PURE__ */ Object.assign(
|
|
1916
1918
|
/* @__PURE__ */ le(
|
|
1917
1919
|
({
|
|
1918
|
-
sources:
|
|
1920
|
+
sources: t = Vc,
|
|
1919
1921
|
placeholder: n,
|
|
1920
1922
|
minQueryLength: s = 2,
|
|
1921
1923
|
debounceMs: i = 300,
|
|
1922
|
-
showCategories:
|
|
1924
|
+
showCategories: a = !0,
|
|
1923
1925
|
filters: l = [],
|
|
1924
1926
|
showRecent: h = !0,
|
|
1925
1927
|
maxRecent: r = 5,
|
|
1926
1928
|
showShortcuts: o = !0,
|
|
1927
1929
|
hotkey: w = "k",
|
|
1928
|
-
onResultSelect:
|
|
1930
|
+
onResultSelect: A,
|
|
1929
1931
|
onSearch: I,
|
|
1930
1932
|
onClose: C,
|
|
1931
|
-
renderResult:
|
|
1933
|
+
renderResult: L,
|
|
1932
1934
|
renderEmpty: F,
|
|
1933
1935
|
defaultOpen: U = !1,
|
|
1934
|
-
open:
|
|
1935
|
-
variant:
|
|
1936
|
+
open: E,
|
|
1937
|
+
variant: $ = "modal",
|
|
1936
1938
|
labels: ce,
|
|
1937
|
-
className:
|
|
1939
|
+
className: M = "",
|
|
1938
1940
|
style: q
|
|
1939
|
-
},
|
|
1940
|
-
const { t: m } =
|
|
1941
|
+
}, z) => {
|
|
1942
|
+
const { t: m } = K(), N = { ...Kc, ...ce }, g = ke(null), V = ke(void 0), [u, B] = k(U), [O, P] = k(""), [x, H] = k([]), [Y, b] = k(!1), [S, _] = k(0), [J, f] = k(null), [T, X] = k([]), Z = E !== void 0 ? E : u;
|
|
1941
1943
|
me(() => {
|
|
1942
1944
|
try {
|
|
1943
1945
|
const p = localStorage.getItem("nice_recent_searches");
|
|
@@ -1947,7 +1949,7 @@ const Ce = {
|
|
|
1947
1949
|
}, []);
|
|
1948
1950
|
const G = R(
|
|
1949
1951
|
(p, y) => {
|
|
1950
|
-
const
|
|
1952
|
+
const ae = [
|
|
1951
1953
|
{
|
|
1952
1954
|
query: p,
|
|
1953
1955
|
timestamp: /* @__PURE__ */ new Date(),
|
|
@@ -1955,9 +1957,9 @@ const Ce = {
|
|
|
1955
1957
|
},
|
|
1956
1958
|
...T.filter((pe) => pe.query !== p)
|
|
1957
1959
|
].slice(0, r);
|
|
1958
|
-
X(
|
|
1960
|
+
X(ae);
|
|
1959
1961
|
try {
|
|
1960
|
-
localStorage.setItem("nice_recent_searches", JSON.stringify(
|
|
1962
|
+
localStorage.setItem("nice_recent_searches", JSON.stringify(ae));
|
|
1961
1963
|
} catch {
|
|
1962
1964
|
}
|
|
1963
1965
|
},
|
|
@@ -1970,23 +1972,23 @@ const Ce = {
|
|
|
1970
1972
|
}
|
|
1971
1973
|
b(!0);
|
|
1972
1974
|
try {
|
|
1973
|
-
const y =
|
|
1975
|
+
const y = t.map(async (ae) => {
|
|
1974
1976
|
try {
|
|
1975
|
-
return (await
|
|
1976
|
-
...
|
|
1977
|
-
source:
|
|
1978
|
-
relevanceScore:
|
|
1977
|
+
return (await ae.search(p)).map((Le) => ({
|
|
1978
|
+
...Le,
|
|
1979
|
+
source: ae.name,
|
|
1980
|
+
relevanceScore: Le.relevanceScore * (ae.priority || 1)
|
|
1979
1981
|
}));
|
|
1980
1982
|
} catch {
|
|
1981
1983
|
return [];
|
|
1982
1984
|
}
|
|
1983
1985
|
}), ee = (await Promise.all(y)).flat();
|
|
1984
|
-
ee.sort((
|
|
1986
|
+
ee.sort((ae, pe) => pe.relevanceScore - ae.relevanceScore), H(ee), _(0), I == null || I(p, ee), ee.length > 0 && G(p, ee.length);
|
|
1985
1987
|
} finally {
|
|
1986
1988
|
b(!1);
|
|
1987
1989
|
}
|
|
1988
1990
|
},
|
|
1989
|
-
[
|
|
1991
|
+
[t, s, I, G]
|
|
1990
1992
|
), D = R(
|
|
1991
1993
|
(p) => {
|
|
1992
1994
|
P(p), V.current && clearTimeout(V.current), V.current = setTimeout(() => {
|
|
@@ -1994,24 +1996,24 @@ const Ce = {
|
|
|
1994
1996
|
}, i);
|
|
1995
1997
|
},
|
|
1996
1998
|
[v, i]
|
|
1997
|
-
),
|
|
1999
|
+
), j = R(
|
|
1998
2000
|
(p) => {
|
|
1999
2001
|
switch (p.key) {
|
|
2000
2002
|
case "ArrowDown":
|
|
2001
|
-
p.preventDefault(),
|
|
2003
|
+
p.preventDefault(), _((y) => Math.min(y + 1, x.length - 1));
|
|
2002
2004
|
break;
|
|
2003
2005
|
case "ArrowUp":
|
|
2004
|
-
p.preventDefault(),
|
|
2006
|
+
p.preventDefault(), _((y) => Math.max(y - 1, 0));
|
|
2005
2007
|
break;
|
|
2006
2008
|
case "Enter":
|
|
2007
|
-
p.preventDefault(), x[S] && (
|
|
2009
|
+
p.preventDefault(), x[S] && (A == null || A(x[S]), B(!1), C == null || C());
|
|
2008
2010
|
break;
|
|
2009
2011
|
case "Escape":
|
|
2010
2012
|
p.preventDefault(), B(!1), C == null || C();
|
|
2011
2013
|
break;
|
|
2012
2014
|
}
|
|
2013
2015
|
},
|
|
2014
|
-
[x, S,
|
|
2016
|
+
[x, S, A, C]
|
|
2015
2017
|
);
|
|
2016
2018
|
me(() => {
|
|
2017
2019
|
const p = (y) => {
|
|
@@ -2027,7 +2029,7 @@ const Ce = {
|
|
|
2027
2029
|
return (p = g.current) == null ? void 0 : p.focus();
|
|
2028
2030
|
}, 0);
|
|
2029
2031
|
}, [Z]);
|
|
2030
|
-
const
|
|
2032
|
+
const W = J ? x.filter((p) => p.type === J) : x, Q = Array.from(new Set(x.map((p) => p.type))).map(
|
|
2031
2033
|
(p) => ({
|
|
2032
2034
|
id: p,
|
|
2033
2035
|
label: p.charAt(0).toUpperCase() + p.slice(1),
|
|
@@ -2035,7 +2037,7 @@ const Ce = {
|
|
|
2035
2037
|
count: x.filter((y) => y.type === p).length
|
|
2036
2038
|
})
|
|
2037
2039
|
);
|
|
2038
|
-
if (re(
|
|
2040
|
+
if (re(z, () => ({
|
|
2039
2041
|
open: () => B(!0),
|
|
2040
2042
|
close: () => {
|
|
2041
2043
|
B(!1), C == null || C();
|
|
@@ -2050,7 +2052,7 @@ const Ce = {
|
|
|
2050
2052
|
search: async (p) => {
|
|
2051
2053
|
P(p), await v(p);
|
|
2052
2054
|
}
|
|
2053
|
-
})), !Z &&
|
|
2055
|
+
})), !Z && $ !== "inline")
|
|
2054
2056
|
return null;
|
|
2055
2057
|
const d = /* @__PURE__ */ c("div", { className: "nice-search-content", children: [
|
|
2056
2058
|
/* @__PURE__ */ e(
|
|
@@ -2058,13 +2060,13 @@ const Ce = {
|
|
|
2058
2060
|
{
|
|
2059
2061
|
value: O,
|
|
2060
2062
|
onChange: D,
|
|
2061
|
-
onKeyDown:
|
|
2063
|
+
onKeyDown: j,
|
|
2062
2064
|
placeholder: n || N.placeholder,
|
|
2063
|
-
isLoading:
|
|
2065
|
+
isLoading: Y,
|
|
2064
2066
|
inputRef: g
|
|
2065
2067
|
}
|
|
2066
2068
|
),
|
|
2067
|
-
|
|
2069
|
+
a && Q.length > 1 && O.length >= s && /* @__PURE__ */ e(
|
|
2068
2070
|
Jc,
|
|
2069
2071
|
{
|
|
2070
2072
|
categories: Q,
|
|
@@ -2073,8 +2075,8 @@ const Ce = {
|
|
|
2073
2075
|
}
|
|
2074
2076
|
),
|
|
2075
2077
|
/* @__PURE__ */ c("div", { className: "nice-search-results", role: "listbox", children: [
|
|
2076
|
-
|
|
2077
|
-
!
|
|
2078
|
+
Y && O.length >= s && /* @__PURE__ */ e("div", { className: "nice-search-loading", children: N.searching }),
|
|
2079
|
+
!Y && O.length >= s && W.length === 0 && /* @__PURE__ */ e("div", { className: "nice-search-empty", children: F ? F(O) : /* @__PURE__ */ c(te, { children: [
|
|
2078
2080
|
/* @__PURE__ */ e("span", { className: "nice-search-empty-icon", children: /* @__PURE__ */ e(ge, { size: 32 }) }),
|
|
2079
2081
|
/* @__PURE__ */ c("span", { children: [
|
|
2080
2082
|
N.noResults,
|
|
@@ -2083,15 +2085,15 @@ const Ce = {
|
|
|
2083
2085
|
'"'
|
|
2084
2086
|
] })
|
|
2085
2087
|
] }) }),
|
|
2086
|
-
|
|
2088
|
+
W.map((p, y) => /* @__PURE__ */ e(
|
|
2087
2089
|
Hc,
|
|
2088
2090
|
{
|
|
2089
2091
|
result: p,
|
|
2090
2092
|
isSelected: y === S,
|
|
2091
2093
|
onSelect: () => {
|
|
2092
|
-
|
|
2094
|
+
A == null || A(p), B(!1), C == null || C();
|
|
2093
2095
|
},
|
|
2094
|
-
renderResult:
|
|
2096
|
+
renderResult: L
|
|
2095
2097
|
},
|
|
2096
2098
|
p.id
|
|
2097
2099
|
))
|
|
@@ -2112,8 +2114,8 @@ const Ce = {
|
|
|
2112
2114
|
),
|
|
2113
2115
|
o && /* @__PURE__ */ c("div", { className: "nice-search-shortcuts", children: [
|
|
2114
2116
|
/* @__PURE__ */ c("span", { children: [
|
|
2115
|
-
/* @__PURE__ */ e("kbd", { children: /* @__PURE__ */ e(
|
|
2116
|
-
/* @__PURE__ */ e("kbd", { children: /* @__PURE__ */ e(
|
|
2117
|
+
/* @__PURE__ */ e("kbd", { children: /* @__PURE__ */ e(Ae, { name: "arrow-up", size: 12 }) }),
|
|
2118
|
+
/* @__PURE__ */ e("kbd", { children: /* @__PURE__ */ e(Ae, { name: "arrow-down", size: 12 }) }),
|
|
2117
2119
|
" ",
|
|
2118
2120
|
m("globalSearch.navigate", "Navigate")
|
|
2119
2121
|
] }),
|
|
@@ -2129,7 +2131,7 @@ const Ce = {
|
|
|
2129
2131
|
] })
|
|
2130
2132
|
] })
|
|
2131
2133
|
] });
|
|
2132
|
-
return
|
|
2134
|
+
return $ === "modal" ? /* @__PURE__ */ e(
|
|
2133
2135
|
"div",
|
|
2134
2136
|
{
|
|
2135
2137
|
className: "nice-search-overlay",
|
|
@@ -2139,7 +2141,7 @@ const Ce = {
|
|
|
2139
2141
|
children: /* @__PURE__ */ e(
|
|
2140
2142
|
"div",
|
|
2141
2143
|
{
|
|
2142
|
-
className: `nice-global-search nice-global-search--modal ${
|
|
2144
|
+
className: `nice-global-search nice-global-search--modal ${M}`,
|
|
2143
2145
|
style: q,
|
|
2144
2146
|
onClick: (p) => p.stopPropagation(),
|
|
2145
2147
|
role: "dialog",
|
|
@@ -2151,7 +2153,7 @@ const Ce = {
|
|
|
2151
2153
|
) : /* @__PURE__ */ e(
|
|
2152
2154
|
"div",
|
|
2153
2155
|
{
|
|
2154
|
-
className: `nice-global-search nice-global-search--${
|
|
2156
|
+
className: `nice-global-search nice-global-search--${$} ${M}`,
|
|
2155
2157
|
style: q,
|
|
2156
2158
|
children: d
|
|
2157
2159
|
}
|
|
@@ -2218,11 +2220,11 @@ const Ce = {
|
|
|
2218
2220
|
password_change: /* @__PURE__ */ e(fe, { size: 16 }),
|
|
2219
2221
|
password_reset: /* @__PURE__ */ e(ye, { size: 16 }),
|
|
2220
2222
|
mfa_enabled: /* @__PURE__ */ e(He, { size: 16 }),
|
|
2221
|
-
mfa_disabled: /* @__PURE__ */ e(
|
|
2223
|
+
mfa_disabled: /* @__PURE__ */ e(Ue, { size: 16 }),
|
|
2222
2224
|
mfa_challenged: /* @__PURE__ */ e(we, { size: 16 }),
|
|
2223
2225
|
permission_change: /* @__PURE__ */ e(Be, { size: 16 }),
|
|
2224
|
-
session_expired: /* @__PURE__ */ e(
|
|
2225
|
-
account_locked: /* @__PURE__ */ e(
|
|
2226
|
+
session_expired: /* @__PURE__ */ e(Ee, { size: 16 }),
|
|
2227
|
+
account_locked: /* @__PURE__ */ e(Ye, { size: 16 }),
|
|
2226
2228
|
account_unlocked: /* @__PURE__ */ e(bc, { size: 16 }),
|
|
2227
2229
|
api_key_created: /* @__PURE__ */ e(fe, { size: 16 }),
|
|
2228
2230
|
api_key_revoked: /* @__PURE__ */ e(he, { size: 16 }),
|
|
@@ -2233,108 +2235,108 @@ const Ce = {
|
|
|
2233
2235
|
medium: "var(--nice-color-warning, #f59e0b)",
|
|
2234
2236
|
high: "var(--nice-color-error, #ef4444)",
|
|
2235
2237
|
critical: "var(--nice-color-accent-hover, #7c3aed)"
|
|
2236
|
-
},
|
|
2238
|
+
}, _e = {
|
|
2237
2239
|
desktop: /* @__PURE__ */ e(Nc, { size: 16 }),
|
|
2238
2240
|
mobile: /* @__PURE__ */ e(we, { size: 16 }),
|
|
2239
2241
|
tablet: /* @__PURE__ */ e(we, { size: 16 }),
|
|
2240
2242
|
unknown: /* @__PURE__ */ e(Ve, { size: 16 })
|
|
2241
|
-
}, Ie = (
|
|
2243
|
+
}, Ie = (t) => (typeof t == "string" ? new Date(t) : t).toLocaleString("en-US", {
|
|
2242
2244
|
month: "short",
|
|
2243
2245
|
day: "numeric",
|
|
2244
2246
|
hour: "2-digit",
|
|
2245
2247
|
minute: "2-digit",
|
|
2246
2248
|
second: "2-digit"
|
|
2247
|
-
}), Oe = (
|
|
2248
|
-
if (!
|
|
2249
|
+
}), Oe = (t) => {
|
|
2250
|
+
if (!t)
|
|
2249
2251
|
return "Unknown";
|
|
2250
2252
|
const n = [];
|
|
2251
|
-
return
|
|
2252
|
-
}, Xc = (
|
|
2253
|
-
if (!
|
|
2253
|
+
return t.city && n.push(t.city), t.country && n.push(t.country), n.length > 0 ? n.join(", ") : "Unknown";
|
|
2254
|
+
}, Xc = (t) => {
|
|
2255
|
+
if (!t)
|
|
2254
2256
|
return "Unknown";
|
|
2255
2257
|
const n = [];
|
|
2256
|
-
return
|
|
2257
|
-
}, Pe = (
|
|
2258
|
-
var s, i,
|
|
2258
|
+
return t.browser && n.push(t.browser), t.os && n.push(t.os), n.length > 0 ? n.join(" / ") : t.type;
|
|
2259
|
+
}, Pe = (t) => t >= 80 ? de.critical : t >= 60 ? de.high : t >= 40 ? de.medium : de.low, Zc = (t, n) => {
|
|
2260
|
+
var s, i, a, l, h;
|
|
2259
2261
|
if (n.startDate) {
|
|
2260
2262
|
const r = typeof n.startDate == "string" ? new Date(n.startDate) : n.startDate;
|
|
2261
|
-
if ((typeof
|
|
2263
|
+
if ((typeof t.timestamp == "string" ? new Date(t.timestamp) : t.timestamp) < r)
|
|
2262
2264
|
return !1;
|
|
2263
2265
|
}
|
|
2264
2266
|
if (n.endDate) {
|
|
2265
2267
|
const r = typeof n.endDate == "string" ? new Date(n.endDate) : n.endDate;
|
|
2266
|
-
if ((typeof
|
|
2268
|
+
if ((typeof t.timestamp == "string" ? new Date(t.timestamp) : t.timestamp) > r)
|
|
2267
2269
|
return !1;
|
|
2268
2270
|
}
|
|
2269
|
-
if ((s = n.eventTypes) != null && s.length && !n.eventTypes.includes(
|
|
2271
|
+
if ((s = n.eventTypes) != null && s.length && !n.eventTypes.includes(t.eventType) || (i = n.riskLevels) != null && i.length && !n.riskLevels.includes(t.riskLevel) || n.userId && t.userId !== n.userId || n.ipAddress && !t.ipAddress.includes(n.ipAddress) || n.country && ((a = t.location) == null ? void 0 : a.country) !== n.country || n.successOnly && !t.success || n.failedOnly && t.success)
|
|
2270
2272
|
return !1;
|
|
2271
2273
|
if (n.searchQuery) {
|
|
2272
2274
|
const r = n.searchQuery.toLowerCase();
|
|
2273
2275
|
if (![
|
|
2274
|
-
|
|
2275
|
-
|
|
2276
|
-
|
|
2277
|
-
|
|
2278
|
-
(l =
|
|
2279
|
-
(h =
|
|
2276
|
+
t.userName,
|
|
2277
|
+
t.userEmail,
|
|
2278
|
+
t.userId,
|
|
2279
|
+
t.ipAddress,
|
|
2280
|
+
(l = t.location) == null ? void 0 : l.city,
|
|
2281
|
+
(h = t.location) == null ? void 0 : h.country
|
|
2280
2282
|
].filter(Boolean).join(" ").toLowerCase().includes(r))
|
|
2281
2283
|
return !1;
|
|
2282
2284
|
}
|
|
2283
2285
|
return !0;
|
|
2284
|
-
},
|
|
2286
|
+
}, rt = /* @__PURE__ */ Object.assign(
|
|
2285
2287
|
/* @__PURE__ */ le(
|
|
2286
2288
|
function(n, s) {
|
|
2287
|
-
var
|
|
2288
|
-
const { t: i } =
|
|
2289
|
-
entries:
|
|
2289
|
+
var W, Q;
|
|
2290
|
+
const { t: i } = K(), {
|
|
2291
|
+
entries: a = Wc,
|
|
2290
2292
|
filter: l = {},
|
|
2291
2293
|
stats: h,
|
|
2292
2294
|
realtime: r = !1,
|
|
2293
2295
|
pollingInterval: o = 3e4,
|
|
2294
2296
|
showMap: w = !1,
|
|
2295
|
-
showStats:
|
|
2297
|
+
showStats: A = !0,
|
|
2296
2298
|
showDetails: I = !0,
|
|
2297
2299
|
pageSize: C = 50,
|
|
2298
|
-
labels:
|
|
2300
|
+
labels: L,
|
|
2299
2301
|
loading: F = !1,
|
|
2300
2302
|
onFilterChange: U,
|
|
2301
|
-
onExport:
|
|
2302
|
-
onEntrySelect:
|
|
2303
|
+
onExport: E,
|
|
2304
|
+
onEntrySelect: $,
|
|
2303
2305
|
onBlockIP: ce,
|
|
2304
|
-
onRefresh:
|
|
2306
|
+
onRefresh: M,
|
|
2305
2307
|
className: q = "",
|
|
2306
|
-
...
|
|
2308
|
+
...z
|
|
2307
2309
|
} = n, m = ke(null);
|
|
2308
2310
|
Cc();
|
|
2309
2311
|
const N = ue(
|
|
2310
2312
|
() => ({
|
|
2311
2313
|
...oe,
|
|
2312
|
-
...
|
|
2313
|
-
eventTypes: { ...oe.eventTypes, ...
|
|
2314
|
-
riskLevels: { ...oe.riskLevels, ...
|
|
2315
|
-
deviceTypes: { ...oe.deviceTypes, ...
|
|
2316
|
-
columns: { ...oe.columns, ...
|
|
2314
|
+
...L,
|
|
2315
|
+
eventTypes: { ...oe.eventTypes, ...L == null ? void 0 : L.eventTypes },
|
|
2316
|
+
riskLevels: { ...oe.riskLevels, ...L == null ? void 0 : L.riskLevels },
|
|
2317
|
+
deviceTypes: { ...oe.deviceTypes, ...L == null ? void 0 : L.deviceTypes },
|
|
2318
|
+
columns: { ...oe.columns, ...L == null ? void 0 : L.columns }
|
|
2317
2319
|
}),
|
|
2318
|
-
[
|
|
2319
|
-
), [g, V] = k(l), [u, B] = k(null), [O, P] = k(C), [x, H] = k(!1), [
|
|
2320
|
+
[L]
|
|
2321
|
+
), [g, V] = k(l), [u, B] = k(null), [O, P] = k(C), [x, H] = k(!1), [Y, b] = k("table"), S = ue(() => a.filter((d) => Zc(d, g)), [a, g]), _ = ue(() => S.slice(0, O), [S, O]), J = ue(() => {
|
|
2320
2322
|
if (h)
|
|
2321
2323
|
return h;
|
|
2322
|
-
const d = new Set(
|
|
2324
|
+
const d = new Set(a.map((y) => y.ipAddress)), p = new Set(a.map((y) => {
|
|
2323
2325
|
var ee;
|
|
2324
2326
|
return (ee = y.location) == null ? void 0 : ee.country;
|
|
2325
2327
|
}).filter(Boolean));
|
|
2326
2328
|
return {
|
|
2327
|
-
totalEvents:
|
|
2328
|
-
successfulLogins:
|
|
2329
|
-
failedLogins:
|
|
2329
|
+
totalEvents: a.length,
|
|
2330
|
+
successfulLogins: a.filter((y) => y.eventType === "login_success").length,
|
|
2331
|
+
failedLogins: a.filter((y) => y.eventType === "login_failed").length,
|
|
2330
2332
|
uniqueIPs: d.size,
|
|
2331
2333
|
uniqueCountries: p.size,
|
|
2332
|
-
highRiskEvents:
|
|
2334
|
+
highRiskEvents: a.filter(
|
|
2333
2335
|
(y) => y.riskLevel === "high" || y.riskLevel === "critical"
|
|
2334
2336
|
).length,
|
|
2335
|
-
suspiciousActivities:
|
|
2337
|
+
suspiciousActivities: a.filter((y) => y.eventType === "suspicious_activity").length
|
|
2336
2338
|
};
|
|
2337
|
-
}, [
|
|
2339
|
+
}, [a, h]), f = R(
|
|
2338
2340
|
(d) => {
|
|
2339
2341
|
const p = { ...g, ...d };
|
|
2340
2342
|
V(p), P(C), U == null || U(p);
|
|
@@ -2344,17 +2346,17 @@ const Ce = {
|
|
|
2344
2346
|
V({}), P(C), U == null || U({});
|
|
2345
2347
|
}, [U, C]), X = R(
|
|
2346
2348
|
(d) => {
|
|
2347
|
-
B(d),
|
|
2349
|
+
B(d), $ == null || $(d);
|
|
2348
2350
|
},
|
|
2349
|
-
[
|
|
2351
|
+
[$]
|
|
2350
2352
|
), Z = R(
|
|
2351
2353
|
(d) => {
|
|
2352
|
-
|
|
2354
|
+
E == null || E(d);
|
|
2353
2355
|
},
|
|
2354
|
-
[
|
|
2356
|
+
[E]
|
|
2355
2357
|
), G = R(() => {
|
|
2356
|
-
|
|
2357
|
-
}, [
|
|
2358
|
+
M == null || M();
|
|
2359
|
+
}, [M]), v = R(() => {
|
|
2358
2360
|
P((d) => d + C);
|
|
2359
2361
|
}, [C]);
|
|
2360
2362
|
re(
|
|
@@ -2407,7 +2409,7 @@ const Ce = {
|
|
|
2407
2409
|
Oe(d.location)
|
|
2408
2410
|
] }),
|
|
2409
2411
|
/* @__PURE__ */ e("td", { className: "nice-accesslog-cell nice-accesslog-cell--device", children: /* @__PURE__ */ c("span", { className: "nice-accesslog-device", children: [
|
|
2410
|
-
|
|
2412
|
+
_e[((y = d.device) == null ? void 0 : y.type) || "unknown"],
|
|
2411
2413
|
Xc(d.device)
|
|
2412
2414
|
] }) }),
|
|
2413
2415
|
/* @__PURE__ */ e("td", { className: "nice-accesslog-cell nice-accesslog-cell--risk", children: /* @__PURE__ */ c(
|
|
@@ -2432,7 +2434,7 @@ const Ce = {
|
|
|
2432
2434
|
},
|
|
2433
2435
|
d.id
|
|
2434
2436
|
);
|
|
2435
|
-
},
|
|
2437
|
+
}, j = (d) => /* @__PURE__ */ c(
|
|
2436
2438
|
"div",
|
|
2437
2439
|
{
|
|
2438
2440
|
className: `nice-accesslog-timeline-item nice-accesslog-timeline-item--${d.riskLevel}`,
|
|
@@ -2467,7 +2469,7 @@ const Ce = {
|
|
|
2467
2469
|
},
|
|
2468
2470
|
d.id
|
|
2469
2471
|
);
|
|
2470
|
-
return /* @__PURE__ */ c("div", { ref: m, className: `nice-accesslog ${q}`, ...
|
|
2472
|
+
return /* @__PURE__ */ c("div", { ref: m, className: `nice-accesslog ${q}`, ...z, children: [
|
|
2471
2473
|
/* @__PURE__ */ c("div", { className: "nice-accesslog-header", children: [
|
|
2472
2474
|
/* @__PURE__ */ c("div", { className: "nice-accesslog-header-left", children: [
|
|
2473
2475
|
/* @__PURE__ */ e("h2", { className: "nice-accesslog-title", children: N.title }),
|
|
@@ -2506,7 +2508,7 @@ const Ce = {
|
|
|
2506
2508
|
] })
|
|
2507
2509
|
] })
|
|
2508
2510
|
] }),
|
|
2509
|
-
|
|
2511
|
+
A && /* @__PURE__ */ c("div", { className: "nice-accesslog-stats", children: [
|
|
2510
2512
|
/* @__PURE__ */ c("div", { className: "nice-accesslog-stat", children: [
|
|
2511
2513
|
/* @__PURE__ */ e("span", { className: "nice-accesslog-stat-value", children: J.totalEvents }),
|
|
2512
2514
|
/* @__PURE__ */ e("span", { className: "nice-accesslog-stat-label", children: i("accessLog.totalEvents", "Total Events") })
|
|
@@ -2560,7 +2562,7 @@ const Ce = {
|
|
|
2560
2562
|
"button",
|
|
2561
2563
|
{
|
|
2562
2564
|
type: "button",
|
|
2563
|
-
className: `nice-accesslog-filter-chip ${(
|
|
2565
|
+
className: `nice-accesslog-filter-chip ${(W = g.riskLevels) != null && W.includes("high") || (Q = g.riskLevels) != null && Q.includes("critical") ? "nice-accesslog-filter-chip--active" : ""}`,
|
|
2564
2566
|
onClick: () => {
|
|
2565
2567
|
var d;
|
|
2566
2568
|
return f({
|
|
@@ -2576,11 +2578,11 @@ const Ce = {
|
|
|
2576
2578
|
type: "button",
|
|
2577
2579
|
className: "nice-accesslog-filter-toggle",
|
|
2578
2580
|
onClick: () => H(!x),
|
|
2579
|
-
children: x ? /* @__PURE__ */ c(
|
|
2581
|
+
children: x ? /* @__PURE__ */ c(te, { children: [
|
|
2580
2582
|
/* @__PURE__ */ e(pc, { size: 14 }),
|
|
2581
2583
|
" ",
|
|
2582
2584
|
i("accessLog.less", "Less")
|
|
2583
|
-
] }) : /* @__PURE__ */ c(
|
|
2585
|
+
] }) : /* @__PURE__ */ c(te, { children: [
|
|
2584
2586
|
/* @__PURE__ */ e(Te, { size: 14 }),
|
|
2585
2587
|
" ",
|
|
2586
2588
|
i("accessLog.more", "More")
|
|
@@ -2619,7 +2621,7 @@ const Ce = {
|
|
|
2619
2621
|
onChange: (d) => f({ startDate: d.target.value || void 0 })
|
|
2620
2622
|
}
|
|
2621
2623
|
),
|
|
2622
|
-
/* @__PURE__ */ e("span", { children: "to" }),
|
|
2624
|
+
/* @__PURE__ */ e("span", { children: i("accessLog.to", "to") }),
|
|
2623
2625
|
/* @__PURE__ */ e(
|
|
2624
2626
|
"input",
|
|
2625
2627
|
{
|
|
@@ -2658,7 +2660,7 @@ const Ce = {
|
|
|
2658
2660
|
"button",
|
|
2659
2661
|
{
|
|
2660
2662
|
type: "button",
|
|
2661
|
-
className: `nice-accesslog-tab ${
|
|
2663
|
+
className: `nice-accesslog-tab ${Y === "table" ? "nice-accesslog-tab--active" : ""}`,
|
|
2662
2664
|
onClick: () => b("table"),
|
|
2663
2665
|
children: [
|
|
2664
2666
|
/* @__PURE__ */ e(uc, { size: 16 }),
|
|
@@ -2671,7 +2673,7 @@ const Ce = {
|
|
|
2671
2673
|
"button",
|
|
2672
2674
|
{
|
|
2673
2675
|
type: "button",
|
|
2674
|
-
className: `nice-accesslog-tab ${
|
|
2676
|
+
className: `nice-accesslog-tab ${Y === "timeline" ? "nice-accesslog-tab--active" : ""}`,
|
|
2675
2677
|
onClick: () => b("timeline"),
|
|
2676
2678
|
children: [
|
|
2677
2679
|
/* @__PURE__ */ e(mc, { size: 16 }),
|
|
@@ -2684,19 +2686,19 @@ const Ce = {
|
|
|
2684
2686
|
"button",
|
|
2685
2687
|
{
|
|
2686
2688
|
type: "button",
|
|
2687
|
-
className: `nice-accesslog-tab ${
|
|
2689
|
+
className: `nice-accesslog-tab ${Y === "map" ? "nice-accesslog-tab--active" : ""}`,
|
|
2688
2690
|
onClick: () => b("map"),
|
|
2689
2691
|
children: [
|
|
2690
|
-
/* @__PURE__ */ e(
|
|
2692
|
+
/* @__PURE__ */ e(ze, { size: 16 }),
|
|
2691
2693
|
" ",
|
|
2692
2694
|
N.map
|
|
2693
2695
|
]
|
|
2694
2696
|
}
|
|
2695
2697
|
),
|
|
2696
|
-
/* @__PURE__ */
|
|
2697
|
-
|
|
2698
|
-
|
|
2699
|
-
|
|
2698
|
+
/* @__PURE__ */ e("span", { className: "nice-accesslog-count", children: i("accessLog.entries", "{filteredEntries} entries").replace(
|
|
2699
|
+
"{filteredEntries}",
|
|
2700
|
+
String(S.length)
|
|
2701
|
+
) })
|
|
2700
2702
|
] }),
|
|
2701
2703
|
/* @__PURE__ */ e("div", { className: "nice-accesslog-content", children: F ? /* @__PURE__ */ c("div", { className: "nice-accesslog-loading", children: [
|
|
2702
2704
|
/* @__PURE__ */ e("div", { className: "nice-accesslog-spinner" }),
|
|
@@ -2704,8 +2706,8 @@ const Ce = {
|
|
|
2704
2706
|
] }) : S.length === 0 ? /* @__PURE__ */ c("div", { className: "nice-accesslog-empty", children: [
|
|
2705
2707
|
/* @__PURE__ */ e("span", { className: "nice-accesslog-empty-icon", children: /* @__PURE__ */ e(He, { size: 32 }) }),
|
|
2706
2708
|
/* @__PURE__ */ e("span", { children: N.noResults })
|
|
2707
|
-
] }) : /* @__PURE__ */ c(
|
|
2708
|
-
|
|
2709
|
+
] }) : /* @__PURE__ */ c(te, { children: [
|
|
2710
|
+
Y === "table" && /* @__PURE__ */ e("div", { className: "nice-accesslog-table-wrapper", children: /* @__PURE__ */ c("table", { className: "nice-accesslog-table", children: [
|
|
2709
2711
|
/* @__PURE__ */ e("thead", { children: /* @__PURE__ */ c("tr", { children: [
|
|
2710
2712
|
/* @__PURE__ */ e("th", { children: N.columns.timestamp }),
|
|
2711
2713
|
/* @__PURE__ */ e("th", { children: N.columns.user }),
|
|
@@ -2716,29 +2718,24 @@ const Ce = {
|
|
|
2716
2718
|
/* @__PURE__ */ e("th", { children: N.columns.risk }),
|
|
2717
2719
|
/* @__PURE__ */ e("th", { children: N.columns.status })
|
|
2718
2720
|
] }) }),
|
|
2719
|
-
/* @__PURE__ */ e("tbody", { children:
|
|
2721
|
+
/* @__PURE__ */ e("tbody", { children: _.map(D) })
|
|
2720
2722
|
] }) }),
|
|
2721
|
-
|
|
2722
|
-
|
|
2723
|
-
/* @__PURE__ */ e(
|
|
2723
|
+
Y === "timeline" && /* @__PURE__ */ e("div", { className: "nice-accesslog-timeline", children: _.map(j) }),
|
|
2724
|
+
Y === "map" && /* @__PURE__ */ e("div", { className: "nice-accesslog-map", children: /* @__PURE__ */ c("div", { className: "nice-accesslog-map-placeholder", children: [
|
|
2725
|
+
/* @__PURE__ */ e(ze, { size: 16 }),
|
|
2724
2726
|
" ",
|
|
2725
2727
|
i(
|
|
2726
2728
|
"accessLog.geographicVisualizationWouldRenderHere",
|
|
2727
2729
|
"Geographic visualization would render here"
|
|
2728
2730
|
)
|
|
2729
2731
|
] }) }),
|
|
2730
|
-
O < S.length && /* @__PURE__ */
|
|
2732
|
+
O < S.length && /* @__PURE__ */ e(
|
|
2731
2733
|
"button",
|
|
2732
2734
|
{
|
|
2733
2735
|
type: "button",
|
|
2734
2736
|
className: "nice-accesslog-show-more",
|
|
2735
2737
|
onClick: v,
|
|
2736
|
-
children:
|
|
2737
|
-
N.showMore,
|
|
2738
|
-
" (",
|
|
2739
|
-
S.length - O,
|
|
2740
|
-
" remaining)"
|
|
2741
|
-
]
|
|
2738
|
+
children: i("accessLog.remaining", "{showMore} ({filteredEntries} remaining)").replace("{showMore}", String(N.showMore)).replace("{filteredEntries}", String(S.length - O))
|
|
2742
2739
|
}
|
|
2743
2740
|
)
|
|
2744
2741
|
] }) }),
|
|
@@ -2807,7 +2804,7 @@ const Ce = {
|
|
|
2807
2804
|
u.device && /* @__PURE__ */ c("div", { className: "nice-accesslog-detail-row", children: [
|
|
2808
2805
|
/* @__PURE__ */ e("span", { className: "nice-accesslog-detail-label", children: i("accessLog.device", "Device") }),
|
|
2809
2806
|
/* @__PURE__ */ c("span", { className: "nice-accesslog-detail-value", children: [
|
|
2810
|
-
|
|
2807
|
+
_e[u.device.type],
|
|
2811
2808
|
" ",
|
|
2812
2809
|
u.device.os,
|
|
2813
2810
|
" ",
|
|
@@ -2817,10 +2814,10 @@ const Ce = {
|
|
|
2817
2814
|
" ",
|
|
2818
2815
|
u.device.browserVersion
|
|
2819
2816
|
] }),
|
|
2820
|
-
u.device.fingerprint && /* @__PURE__ */
|
|
2821
|
-
"
|
|
2822
|
-
u.device.fingerprint
|
|
2823
|
-
|
|
2817
|
+
u.device.fingerprint && /* @__PURE__ */ e("div", { className: "nice-accesslog-fingerprint", children: i("accessLog.fingerprint", "Fingerprint: {fingerprint}").replace(
|
|
2818
|
+
"{fingerprint}",
|
|
2819
|
+
String(u.device.fingerprint)
|
|
2820
|
+
) })
|
|
2824
2821
|
] })
|
|
2825
2822
|
] }),
|
|
2826
2823
|
/* @__PURE__ */ c("div", { className: "nice-accesslog-detail-row", children: [
|
|
@@ -2848,10 +2845,10 @@ const Ce = {
|
|
|
2848
2845
|
{ displayName: "NiceAccessLog" }
|
|
2849
2846
|
);
|
|
2850
2847
|
export {
|
|
2851
|
-
|
|
2852
|
-
|
|
2853
|
-
|
|
2854
|
-
|
|
2855
|
-
|
|
2856
|
-
|
|
2848
|
+
rt as NiceAccessLog,
|
|
2849
|
+
it as NiceAuditTrail,
|
|
2850
|
+
st as NiceContractEditor,
|
|
2851
|
+
at as NiceDataExportCenter,
|
|
2852
|
+
nt as NiceGDPRConsent,
|
|
2853
|
+
lt as NiceGlobalSearch
|
|
2857
2854
|
};
|