@nice2dev/ui-enterprise 1.1.6 → 1.1.7

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.mjs CHANGED
@@ -1,24 +1,24 @@
1
1
  import { jsxs as c, jsx as e, Fragment as ee } from "react/jsx-runtime";
2
- import { NtdClipboard as Be, NtdFile as He, NtdBrackets as Fe, NtdBarChart as Je, NtdFileText as we, NtdList as Ge, NtdGrid as Ke, NtdSearch as pe, NtdDownload as me, NtdChevronDown as De, NtdChevronRight as $e, NtdCircle as Ce, NtdSettings as Pe, NtdKey as be, NtdLogOut as Re, NtdLogIn as We, NtdError as oe, NtdCheck as ie, NtdUpload as Xe, NtdEye as Ze, NtdClose as ge, NtdEdit as Oe, NtdPlus as Se, NtdArrowRight as Qe, NtdBook as ec, NtdClock as xe, NtdArrowUp as cc, NtdArrowDown as ac, NtdLock as Ee, NtdOctagon as ic, NtdDollar as sc, NtdWarning as Me, NtdCookieConsent as tc, NtdArrowLeft as nc, NtdTrash as lc, NtdZap as je, NtdHelp as Ue, NtdFolder as rc, NtdUser as Ye, NtdRefresh as Ne, NtdMinus as oc, NtdTable as dc, NtdCalendar as hc, NtdMap as Te, NtdShield as qe, NtdSlash as uc, NtdFlag as pc, NtdUnlock as mc, NtdSmartphone as fe, NtdMonitor as gc } from "@nice2dev/icons";
2
+ import { NtdClipboard as Be, NtdFile as He, NtdBrackets as Fe, NtdBarChart as Je, NtdFileText as we, NtdList as Ge, NtdGrid as Ke, NtdSearch as pe, NtdDownload as me, NtdChevronDown as De, NtdChevronRight as $e, NtdCircle as Ce, NtdSettings as Pe, NtdKey as be, NtdLogOut as Re, NtdLogIn as We, NtdError as oe, NtdCheck as ae, NtdUpload as Xe, NtdEye as Ze, NtdClose as ge, NtdEdit as Oe, NtdPlus as Se, NtdArrowRight as Qe, NtdBook as ec, NtdClock as xe, NtdArrowUp as cc, NtdArrowDown as ic, NtdLock as Ee, NtdOctagon as ac, NtdDollar as sc, NtdWarning as Me, NtdCookieConsent as tc, NtdArrowLeft as nc, NtdTrash as lc, NtdZap as je, NtdHelp as Ue, NtdFolder as rc, NtdUser as Ye, NtdRefresh as Ne, NtdMinus as oc, NtdTable as dc, NtdCalendar as hc, NtdMap as Te, NtdShield as qe, NtdSlash as uc, NtdFlag as pc, NtdUnlock as mc, NtdSmartphone as fe, NtdMonitor as gc } from "@nice2dev/icons";
3
3
  import vc, { forwardRef as te, useState as w, useCallback as $, useImperativeHandle as ne, useEffect as ue, useRef as ye, useId as bc, useMemo as he } from "react";
4
4
  import { NiceAppShell as Nc, NiceTutorialButton as fc, resolveTutorial as yc } from "@nice2dev/ui";
5
- function kc(a, s, t) {
6
- const i = t.csvDelimiter || ",", n = [];
5
+ function kc(i, s, t) {
6
+ const a = t.csvDelimiter || ",", n = [];
7
7
  return t.includeHeaders !== !1 && n.push(
8
- s.filter((l) => l.include).map((l) => `"${l.label}"`).join(i)
9
- ), a.forEach((l) => {
8
+ s.filter((l) => l.include).map((l) => `"${l.label}"`).join(a)
9
+ ), i.forEach((l) => {
10
10
  const h = s.filter((r) => r.include).map((r) => {
11
11
  let u = l[r.field];
12
12
  return r.transform && (u = r.transform(u)), u == null ? "" : typeof u == "string" ? `"${u.replace(/"/g, '""')}"` : String(u);
13
13
  });
14
- n.push(h.join(i));
14
+ n.push(h.join(a));
15
15
  }), n.join(`
16
16
  `);
17
17
  }
18
- function wc(a, s, t) {
19
- const i = s.filter((l) => l.include), n = a.map((l) => {
18
+ function wc(i, s, t) {
19
+ const a = s.filter((l) => l.include), n = i.map((l) => {
20
20
  const h = {};
21
- return i.forEach((r) => {
21
+ return a.forEach((r) => {
22
22
  let u = l[r.field];
23
23
  r.transform && (u = r.transform(u)), h[r.field] = u;
24
24
  }), h;
@@ -39,51 +39,51 @@ const ke = {
39
39
  icon: /* @__PURE__ */ e(Be, { size: 20 }),
40
40
  description: "Extensible Markup Language"
41
41
  }
42
- }, Dc = ({ formats: a, selected: s, onChange: t }) => /* @__PURE__ */ e("div", { className: "nice-export-formats", children: a.map((i) => {
43
- const n = ke[i];
42
+ }, Dc = ({ formats: i, selected: s, onChange: t }) => /* @__PURE__ */ e("div", { className: "nice-export-formats", children: i.map((a) => {
43
+ const n = ke[a];
44
44
  return /* @__PURE__ */ c(
45
45
  "button",
46
46
  {
47
47
  type: "button",
48
- className: `nice-export-format ${s === i ? "nice-export-format--selected" : ""}`,
49
- onClick: () => t(i),
48
+ className: `nice-export-format ${s === a ? "nice-export-format--selected" : ""}`,
49
+ onClick: () => t(a),
50
50
  title: n.description,
51
51
  children: [
52
52
  /* @__PURE__ */ e("span", { className: "nice-export-format-icon", children: n.icon }),
53
53
  /* @__PURE__ */ e("span", { className: "nice-export-format-label", children: n.label })
54
54
  ]
55
55
  },
56
- i
56
+ a
57
57
  );
58
- }) }), Cc = ({ fields: a, onChange: s }) => {
58
+ }) }), Cc = ({ fields: i, onChange: s }) => {
59
59
  const t = (l) => {
60
- const h = [...a];
60
+ const h = [...i];
61
61
  h[l] = { ...h[l], include: !h[l].include }, s(h);
62
- }, i = (l) => {
63
- s(a.map((h) => ({ ...h, include: l })));
64
- }, n = a.filter((l) => l.include).length;
62
+ }, a = (l) => {
63
+ s(i.map((h) => ({ ...h, include: l })));
64
+ }, n = i.filter((l) => l.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
67
  /* @__PURE__ */ c("span", { children: [
68
68
  "Fields to export (",
69
69
  n,
70
70
  "/",
71
- a.length,
71
+ i.length,
72
72
  ")"
73
73
  ] }),
74
74
  /* @__PURE__ */ c("div", { className: "nice-export-fields-actions", children: [
75
- /* @__PURE__ */ e("button", { type: "button", onClick: () => i(!0), children: "Select all" }),
76
- /* @__PURE__ */ e("button", { type: "button", onClick: () => i(!1), children: "Deselect all" })
75
+ /* @__PURE__ */ e("button", { type: "button", onClick: () => a(!0), children: "Select all" }),
76
+ /* @__PURE__ */ e("button", { type: "button", onClick: () => a(!1), children: "Deselect all" })
77
77
  ] })
78
78
  ] }),
79
- /* @__PURE__ */ e("div", { className: "nice-export-fields-list", children: a.map((l, h) => /* @__PURE__ */ c("label", { className: "nice-export-field", children: [
79
+ /* @__PURE__ */ e("div", { className: "nice-export-fields-list", children: i.map((l, h) => /* @__PURE__ */ c("label", { className: "nice-export-field", children: [
80
80
  /* @__PURE__ */ e("input", { type: "checkbox", checked: l.include, onChange: () => t(h) }),
81
81
  /* @__PURE__ */ e("span", { className: "nice-export-field-label", children: l.label }),
82
82
  /* @__PURE__ */ e("span", { className: "nice-export-field-name", children: l.field })
83
83
  ] }, l.field)) })
84
84
  ] });
85
- }, Sc = ({ format: a, options: s, onChange: t }) => {
86
- const i = (n, l) => {
85
+ }, Sc = ({ format: i, options: s, onChange: t }) => {
86
+ const a = (n, l) => {
87
87
  t({ ...s, [n]: l });
88
88
  };
89
89
  return /* @__PURE__ */ c("div", { className: "nice-export-options", children: [
@@ -94,18 +94,18 @@ const ke = {
94
94
  {
95
95
  type: "checkbox",
96
96
  checked: s.includeHeaders !== !1,
97
- onChange: (n) => i("includeHeaders", n.target.checked)
97
+ onChange: (n) => a("includeHeaders", n.target.checked)
98
98
  }
99
99
  ),
100
100
  "Include headers"
101
101
  ] }),
102
- a === "csv" && /* @__PURE__ */ c("label", { className: "nice-export-option", children: [
102
+ i === "csv" && /* @__PURE__ */ c("label", { className: "nice-export-option", children: [
103
103
  /* @__PURE__ */ e("span", { children: "Delimiter:" }),
104
104
  /* @__PURE__ */ c(
105
105
  "select",
106
106
  {
107
107
  value: s.csvDelimiter || ",",
108
- onChange: (n) => i("csvDelimiter", n.target.value),
108
+ onChange: (n) => a("csvDelimiter", n.target.value),
109
109
  children: [
110
110
  /* @__PURE__ */ e("option", { value: ",", children: "Comma (,)" }),
111
111
  /* @__PURE__ */ e("option", { value: ";", children: "Semicolon (;)" }),
@@ -121,7 +121,7 @@ const ke = {
121
121
  "select",
122
122
  {
123
123
  value: s.dateFormat || "YYYY-MM-DD",
124
- onChange: (n) => i("dateFormat", n.target.value),
124
+ onChange: (n) => a("dateFormat", n.target.value),
125
125
  children: [
126
126
  /* @__PURE__ */ e("option", { value: "YYYY-MM-DD", children: "YYYY-MM-DD" }),
127
127
  /* @__PURE__ */ e("option", { value: "DD/MM/YYYY", children: "DD/MM/YYYY" }),
@@ -137,7 +137,7 @@ const ke = {
137
137
  "select",
138
138
  {
139
139
  value: s.encoding || "utf-8",
140
- onChange: (n) => i("encoding", n.target.value),
140
+ onChange: (n) => a("encoding", n.target.value),
141
141
  children: [
142
142
  /* @__PURE__ */ e("option", { value: "utf-8", children: "UTF-8" }),
143
143
  /* @__PURE__ */ e("option", { value: "utf-16", children: "UTF-16" }),
@@ -146,65 +146,65 @@ const ke = {
146
146
  }
147
147
  )
148
148
  ] }),
149
- (a === "xlsx" || a === "pdf") && /* @__PURE__ */ c("label", { className: "nice-export-option", children: [
149
+ (i === "xlsx" || i === "pdf") && /* @__PURE__ */ c("label", { className: "nice-export-option", children: [
150
150
  /* @__PURE__ */ e("span", { children: "Password protect:" }),
151
151
  /* @__PURE__ */ e(
152
152
  "input",
153
153
  {
154
154
  type: "password",
155
155
  value: s.password || "",
156
- onChange: (n) => i("password", n.target.value || void 0),
156
+ onChange: (n) => a("password", n.target.value || void 0),
157
157
  placeholder: "Leave empty for no password"
158
158
  }
159
159
  )
160
160
  ] })
161
161
  ] });
162
- }, xc = ({ jobs: a, onDownload: s }) => {
163
- if (a.length === 0)
162
+ }, xc = ({ jobs: i, onDownload: s }) => {
163
+ if (i.length === 0)
164
164
  return /* @__PURE__ */ e("div", { className: "nice-export-history-empty", children: "No export history" });
165
- const t = (i) => i ? i < 1024 ? `${i} B` : i < 1024 * 1024 ? `${(i / 1024).toFixed(1)} KB` : `${(i / 1024 / 1024).toFixed(1)} MB` : "-";
165
+ const t = (a) => a ? a < 1024 ? `${a} B` : a < 1024 * 1024 ? `${(a / 1024).toFixed(1)} KB` : `${(a / 1024 / 1024).toFixed(1)} MB` : "-";
166
166
  return /* @__PURE__ */ c("div", { className: "nice-export-history", children: [
167
167
  /* @__PURE__ */ e("h4", { children: "Export History" }),
168
- /* @__PURE__ */ e("div", { className: "nice-export-history-list", children: a.map((i) => /* @__PURE__ */ c("div", { className: `nice-export-job nice-export-job--${i.status}`, children: [
168
+ /* @__PURE__ */ e("div", { className: "nice-export-history-list", children: i.map((a) => /* @__PURE__ */ c("div", { className: `nice-export-job nice-export-job--${a.status}`, children: [
169
169
  /* @__PURE__ */ c("div", { className: "nice-export-job-info", children: [
170
- /* @__PURE__ */ e("span", { className: "nice-export-job-name", children: i.name }),
171
- /* @__PURE__ */ e("span", { className: "nice-export-job-format", children: i.format.toUpperCase() }),
172
- /* @__PURE__ */ e("span", { className: "nice-export-job-date", children: new Date(i.createdAt).toLocaleString() })
170
+ /* @__PURE__ */ e("span", { className: "nice-export-job-name", children: a.name }),
171
+ /* @__PURE__ */ e("span", { className: "nice-export-job-format", children: a.format.toUpperCase() }),
172
+ /* @__PURE__ */ e("span", { className: "nice-export-job-date", children: new Date(a.createdAt).toLocaleString() })
173
173
  ] }),
174
174
  /* @__PURE__ */ c("div", { className: "nice-export-job-meta", children: [
175
- i.rowCount && /* @__PURE__ */ c("span", { children: [
176
- i.rowCount,
175
+ a.rowCount && /* @__PURE__ */ c("span", { children: [
176
+ a.rowCount,
177
177
  " rows"
178
178
  ] }),
179
- i.fileSize && /* @__PURE__ */ e("span", { children: t(i.fileSize) })
179
+ a.fileSize && /* @__PURE__ */ e("span", { children: t(a.fileSize) })
180
180
  ] }),
181
181
  /* @__PURE__ */ c("div", { className: "nice-export-job-status", children: [
182
- i.status === "processing" && /* @__PURE__ */ e("div", { className: "nice-export-job-progress", children: /* @__PURE__ */ e(
182
+ a.status === "processing" && /* @__PURE__ */ e("div", { className: "nice-export-job-progress", children: /* @__PURE__ */ e(
183
183
  "div",
184
184
  {
185
185
  className: "nice-export-job-progress-bar",
186
- style: { width: `${i.progress}%` }
186
+ style: { width: `${a.progress}%` }
187
187
  }
188
188
  ) }),
189
- i.status === "completed" && i.downloadUrl && /* @__PURE__ */ e(
189
+ a.status === "completed" && a.downloadUrl && /* @__PURE__ */ e(
190
190
  "button",
191
191
  {
192
192
  type: "button",
193
193
  className: "nice-export-job-download",
194
- onClick: () => s == null ? void 0 : s(i),
194
+ onClick: () => s == null ? void 0 : s(a),
195
195
  children: "Download"
196
196
  }
197
197
  ),
198
- i.status === "failed" && /* @__PURE__ */ e("span", { className: "nice-export-job-error", title: i.error, children: "Failed" })
198
+ a.status === "failed" && /* @__PURE__ */ e("span", { className: "nice-export-job-error", title: a.error, children: "Failed" })
199
199
  ] })
200
- ] }, i.id)) })
200
+ ] }, a.id)) })
201
201
  ] });
202
202
  }, zc = te(
203
203
  ({
204
- dataSource: a,
204
+ dataSource: i,
205
205
  formats: s = ["csv", "xlsx", "json", "pdf"],
206
206
  templates: t = [],
207
- enableScheduling: i = !1,
207
+ enableScheduling: a = !1,
208
208
  exportHistory: n = [],
209
209
  onExportStart: l,
210
210
  onExportComplete: h,
@@ -218,7 +218,7 @@ const ke = {
218
218
  className: _ = "",
219
219
  style: K
220
220
  }, O) => {
221
- const [M, j] = w(s[0]), [U, B] = w(a.getFields()), [m, k] = w({
221
+ const [M, j] = w(s[0]), [U, B] = w(i.getFields()), [m, k] = w({
222
222
  includeHeaders: !0,
223
223
  dateFormat: "YYYY-MM-DD",
224
224
  encoding: "utf-8"
@@ -233,7 +233,7 @@ const ke = {
233
233
  };
234
234
  Y(!0), P(0), l == null || l(v);
235
235
  try {
236
- const x = await a.fetchData({
236
+ const x = await i.fetchData({
237
237
  fields: U,
238
238
  filters: void 0,
239
239
  sorting: void 0
@@ -279,7 +279,7 @@ const ke = {
279
279
  M,
280
280
  U,
281
281
  m,
282
- a,
282
+ i,
283
283
  S,
284
284
  l,
285
285
  h,
@@ -414,47 +414,75 @@ const ke = {
414
414
  );
415
415
  zc.displayName = "NiceDataExportCenter";
416
416
  const se = {
417
- create: { icon: /* @__PURE__ */ e(Se, { size: 16 }), label: "Created", color: "var(--color-success, #10b981)" },
418
- update: { icon: /* @__PURE__ */ e(Oe, { size: 16 }), label: "Updated", color: "var(--color-primary, #3b82f6)" },
419
- delete: { icon: /* @__PURE__ */ e(ge, { size: 16 }), label: "Deleted", color: "var(--color-error, #ef4444)" },
420
- view: { icon: /* @__PURE__ */ e(Ze, { size: 16 }), label: "Viewed", color: "var(--text-muted, #6b7280)" },
417
+ create: {
418
+ icon: /* @__PURE__ */ e(Se, { size: 16 }),
419
+ label: "Created",
420
+ color: "var(--nice-color-success, #10b981)"
421
+ },
422
+ update: {
423
+ icon: /* @__PURE__ */ e(Oe, { size: 16 }),
424
+ label: "Updated",
425
+ color: "var(--nice-color-primary, #3b82f6)"
426
+ },
427
+ delete: {
428
+ icon: /* @__PURE__ */ e(ge, { size: 16 }),
429
+ label: "Deleted",
430
+ color: "var(--nice-color-error, #ef4444)"
431
+ },
432
+ view: { icon: /* @__PURE__ */ e(Ze, { size: 16 }), label: "Viewed", color: "var(--nice-text-muted, #6b7280)" },
421
433
  export: {
422
434
  icon: /* @__PURE__ */ e(me, { size: 16 }),
423
435
  label: "Exported",
424
- color: "var(--color-accent, #8b5cf6)"
436
+ color: "var(--nice-color-accent, #8b5cf6)"
425
437
  },
426
438
  import: {
427
439
  icon: /* @__PURE__ */ e(Xe, { size: 16 }),
428
440
  label: "Imported",
429
- color: "var(--color-accent, #8b5cf6)"
441
+ color: "var(--nice-color-accent, #8b5cf6)"
430
442
  },
431
443
  approve: {
432
- icon: /* @__PURE__ */ e(ie, { size: 16 }),
444
+ icon: /* @__PURE__ */ e(ae, { size: 16 }),
433
445
  label: "Approved",
434
- color: "var(--color-success, #10b981)"
446
+ color: "var(--nice-color-success, #10b981)"
447
+ },
448
+ reject: {
449
+ icon: /* @__PURE__ */ e(oe, { size: 16 }),
450
+ label: "Rejected",
451
+ color: "var(--nice-color-error, #ef4444)"
452
+ },
453
+ login: {
454
+ icon: /* @__PURE__ */ e(We, { size: 16 }),
455
+ label: "Login",
456
+ color: "var(--nice-color-success, #10b981)"
457
+ },
458
+ logout: {
459
+ icon: /* @__PURE__ */ e(Re, { size: 16 }),
460
+ label: "Logout",
461
+ color: "var(--nice-text-muted, #6b7280)"
435
462
  },
436
- reject: { icon: /* @__PURE__ */ e(oe, { size: 16 }), label: "Rejected", color: "var(--color-error, #ef4444)" },
437
- login: { icon: /* @__PURE__ */ e(We, { size: 16 }), label: "Login", color: "var(--color-success, #10b981)" },
438
- logout: { icon: /* @__PURE__ */ e(Re, { size: 16 }), label: "Logout", color: "var(--text-muted, #6b7280)" },
439
463
  permission_change: {
440
464
  icon: /* @__PURE__ */ e(be, { size: 16 }),
441
465
  label: "Permissions",
442
- color: "var(--color-warning, #f59e0b)"
466
+ color: "var(--nice-color-warning, #f59e0b)"
443
467
  },
444
468
  config_change: {
445
469
  icon: /* @__PURE__ */ e(Pe, { size: 16 }),
446
470
  label: "Config",
447
- color: "var(--color-warning, #f59e0b)"
471
+ color: "var(--nice-color-warning, #f59e0b)"
448
472
  },
449
- custom: { icon: /* @__PURE__ */ e(Ce, { size: 16 }), label: "Action", color: "var(--text-muted, #6b7280)" }
473
+ custom: {
474
+ icon: /* @__PURE__ */ e(Ce, { size: 16 }),
475
+ label: "Action",
476
+ color: "var(--nice-text-muted, #6b7280)"
477
+ }
450
478
  }, Tc = ({
451
- filter: a,
479
+ filter: i,
452
480
  onChange: s,
453
481
  availableFilters: t
454
482
  }) => {
455
483
  var n, l;
456
- const i = (h, r) => {
457
- s({ ...a, [h]: r });
484
+ const a = (h, r) => {
485
+ s({ ...i, [h]: r });
458
486
  };
459
487
  return /* @__PURE__ */ c("div", { className: "nice-audit-filters", children: [
460
488
  /* @__PURE__ */ c("div", { className: "nice-audit-filter-group", children: [
@@ -464,8 +492,8 @@ const se = {
464
492
  "input",
465
493
  {
466
494
  type: "date",
467
- value: ((n = a.startDate) == null ? void 0 : n.toISOString().split("T")[0]) || "",
468
- onChange: (h) => i("startDate", h.target.value ? new Date(h.target.value) : void 0)
495
+ value: ((n = i.startDate) == null ? void 0 : n.toISOString().split("T")[0]) || "",
496
+ onChange: (h) => a("startDate", h.target.value ? new Date(h.target.value) : void 0)
469
497
  }
470
498
  ),
471
499
  /* @__PURE__ */ e("span", { children: "to" }),
@@ -473,8 +501,8 @@ const se = {
473
501
  "input",
474
502
  {
475
503
  type: "date",
476
- value: ((l = a.endDate) == null ? void 0 : l.toISOString().split("T")[0]) || "",
477
- onChange: (h) => i("endDate", h.target.value ? new Date(h.target.value) : void 0)
504
+ value: ((l = i.endDate) == null ? void 0 : l.toISOString().split("T")[0]) || "",
505
+ onChange: (h) => a("endDate", h.target.value ? new Date(h.target.value) : void 0)
478
506
  }
479
507
  )
480
508
  ] })
@@ -483,7 +511,7 @@ const se = {
483
511
  /* @__PURE__ */ e("label", { children: "Actions" }),
484
512
  /* @__PURE__ */ e("div", { className: "nice-audit-action-chips", children: Object.keys(se).slice(0, 8).map((h) => {
485
513
  var T;
486
- const r = se[h], u = (T = a.actions) == null ? void 0 : T.includes(h);
514
+ const r = se[h], u = (T = i.actions) == null ? void 0 : T.includes(h);
487
515
  return /* @__PURE__ */ c(
488
516
  "button",
489
517
  {
@@ -491,8 +519,8 @@ const se = {
491
519
  className: `nice-audit-chip ${u ? "nice-audit-chip--selected" : ""}`,
492
520
  style: { "--chip-color": r.color },
493
521
  onClick: () => {
494
- const E = a.actions || [];
495
- i(
522
+ const E = i.actions || [];
523
+ a(
496
524
  "actions",
497
525
  u ? E.filter((S) => S !== h) : [...E, h]
498
526
  );
@@ -514,36 +542,36 @@ const se = {
514
542
  type: "text",
515
543
  className: "nice-audit-search",
516
544
  placeholder: "Search entries...",
517
- value: a.searchQuery || "",
518
- onChange: (h) => i("searchQuery", h.target.value || void 0)
545
+ value: i.searchQuery || "",
546
+ onChange: (h) => a("searchQuery", h.target.value || void 0)
519
547
  }
520
548
  )
521
549
  ] })
522
550
  ] });
523
- }, _c = ({ changes: a }) => {
524
- if (!a.length)
551
+ }, _c = ({ changes: i }) => {
552
+ if (!i.length)
525
553
  return null;
526
- const s = (t, i) => i || (t == null ? "(empty)" : typeof t == "object" ? JSON.stringify(t, null, 2) : String(t));
527
- return /* @__PURE__ */ e("div", { className: "nice-audit-diff", children: a.map((t, i) => /* @__PURE__ */ c("div", { className: "nice-audit-diff-row", children: [
554
+ const s = (t, a) => a || (t == null ? "(empty)" : typeof t == "object" ? JSON.stringify(t, null, 2) : String(t));
555
+ return /* @__PURE__ */ e("div", { className: "nice-audit-diff", children: i.map((t, a) => /* @__PURE__ */ c("div", { className: "nice-audit-diff-row", children: [
528
556
  /* @__PURE__ */ e("span", { className: "nice-audit-diff-field", children: t.field }),
529
557
  /* @__PURE__ */ c("div", { className: "nice-audit-diff-values", children: [
530
558
  /* @__PURE__ */ e("span", { className: "nice-audit-diff-old", children: s(t.oldValue, t.displayOldValue) }),
531
559
  /* @__PURE__ */ e("span", { className: "nice-audit-diff-arrow", children: /* @__PURE__ */ e(Qe, { size: 14 }) }),
532
560
  /* @__PURE__ */ e("span", { className: "nice-audit-diff-new", children: s(t.newValue, t.displayNewValue) })
533
561
  ] })
534
- ] }, i)) });
562
+ ] }, a)) });
535
563
  }, Lc = ({
536
- entry: a,
564
+ entry: i,
537
565
  showDiff: s,
538
566
  renderActionIcon: t,
539
- renderUser: i,
567
+ renderUser: a,
540
568
  onClick: n
541
569
  }) => {
542
- const [l, h] = w(!1), r = se[a.action] || se.custom;
570
+ const [l, h] = w(!1), r = se[i.action] || se.custom;
543
571
  return /* @__PURE__ */ c(
544
572
  "div",
545
573
  {
546
- className: `nice-audit-timeline-entry nice-audit-timeline-entry--${a.severity || "info"}`,
574
+ className: `nice-audit-timeline-entry nice-audit-timeline-entry--${i.severity || "info"}`,
547
575
  onClick: n,
548
576
  role: n ? "button" : void 0,
549
577
  tabIndex: n ? 0 : void 0,
@@ -553,26 +581,26 @@ const se = {
553
581
  {
554
582
  className: "nice-audit-timeline-marker",
555
583
  style: { "--marker-color": r.color },
556
- children: t ? t(a.action) : r.icon
584
+ children: t ? t(i.action) : r.icon
557
585
  }
558
586
  ),
559
587
  /* @__PURE__ */ c("div", { className: "nice-audit-timeline-content", children: [
560
588
  /* @__PURE__ */ c("div", { className: "nice-audit-timeline-header", children: [
561
- /* @__PURE__ */ e("span", { className: "nice-audit-timeline-action", children: a.actionLabel || r.label }),
589
+ /* @__PURE__ */ e("span", { className: "nice-audit-timeline-action", children: i.actionLabel || r.label }),
562
590
  /* @__PURE__ */ c("span", { className: "nice-audit-timeline-entity", children: [
563
- a.entityType,
591
+ i.entityType,
564
592
  " ",
565
- a.entityName && `"${a.entityName}"`
593
+ i.entityName && `"${i.entityName}"`
566
594
  ] }),
567
- /* @__PURE__ */ e("span", { className: "nice-audit-timeline-time", children: new Date(a.timestamp).toLocaleString() })
595
+ /* @__PURE__ */ e("span", { className: "nice-audit-timeline-time", children: new Date(i.timestamp).toLocaleString() })
568
596
  ] }),
569
- /* @__PURE__ */ e("div", { className: "nice-audit-timeline-user", children: i ? i(a) : /* @__PURE__ */ c(ee, { children: [
570
- a.userAvatar && /* @__PURE__ */ e("img", { src: a.userAvatar, alt: "", className: "nice-audit-avatar" }),
571
- /* @__PURE__ */ e("span", { className: "nice-audit-username", children: a.userName }),
572
- a.userRole && /* @__PURE__ */ e("span", { className: "nice-audit-role", children: a.userRole })
597
+ /* @__PURE__ */ e("div", { className: "nice-audit-timeline-user", children: a ? a(i) : /* @__PURE__ */ c(ee, { children: [
598
+ i.userAvatar && /* @__PURE__ */ e("img", { src: i.userAvatar, alt: "", className: "nice-audit-avatar" }),
599
+ /* @__PURE__ */ e("span", { className: "nice-audit-username", children: i.userName }),
600
+ i.userRole && /* @__PURE__ */ e("span", { className: "nice-audit-role", children: i.userRole })
573
601
  ] }) }),
574
- a.notes && /* @__PURE__ */ e("div", { className: "nice-audit-timeline-notes", children: a.notes }),
575
- s && a.changes && a.changes.length > 0 && /* @__PURE__ */ c(ee, { children: [
602
+ i.notes && /* @__PURE__ */ e("div", { className: "nice-audit-timeline-notes", children: i.notes }),
603
+ s && i.changes && i.changes.length > 0 && /* @__PURE__ */ c(ee, { children: [
576
604
  /* @__PURE__ */ e(
577
605
  "button",
578
606
  {
@@ -587,28 +615,28 @@ const se = {
587
615
  ] }) : /* @__PURE__ */ c(ee, { children: [
588
616
  /* @__PURE__ */ e($e, { size: 14 }),
589
617
  " Show ",
590
- a.changes.length,
618
+ i.changes.length,
591
619
  " changes"
592
620
  ] })
593
621
  }
594
622
  ),
595
- l && /* @__PURE__ */ e(_c, { changes: a.changes })
623
+ l && /* @__PURE__ */ e(_c, { changes: i.changes })
596
624
  ] }),
597
- a.ipAddress && /* @__PURE__ */ c("div", { className: "nice-audit-timeline-meta", children: [
625
+ i.ipAddress && /* @__PURE__ */ c("div", { className: "nice-audit-timeline-meta", children: [
598
626
  /* @__PURE__ */ c("span", { children: [
599
627
  "IP: ",
600
- a.ipAddress
628
+ i.ipAddress
601
629
  ] }),
602
- a.location && /* @__PURE__ */ c("span", { children: [
630
+ i.location && /* @__PURE__ */ c("span", { children: [
603
631
  "• ",
604
- a.location
632
+ i.location
605
633
  ] })
606
634
  ] })
607
635
  ] })
608
636
  ]
609
637
  }
610
638
  );
611
- }, Ac = ({ entries: a, showDiff: s, onEntryClick: t }) => /* @__PURE__ */ c("table", { className: "nice-audit-table", children: [
639
+ }, Ac = ({ entries: i, showDiff: s, onEntryClick: t }) => /* @__PURE__ */ c("table", { className: "nice-audit-table", children: [
612
640
  /* @__PURE__ */ e("thead", { children: /* @__PURE__ */ c("tr", { children: [
613
641
  /* @__PURE__ */ e("th", { children: "Timestamp" }),
614
642
  /* @__PURE__ */ e("th", { children: "Action" }),
@@ -617,16 +645,16 @@ const se = {
617
645
  /* @__PURE__ */ e("th", { children: "Changes" }),
618
646
  /* @__PURE__ */ e("th", { children: "IP Address" })
619
647
  ] }) }),
620
- /* @__PURE__ */ e("tbody", { children: a.map((i) => {
621
- const n = se[i.action] || se.custom;
648
+ /* @__PURE__ */ e("tbody", { children: i.map((a) => {
649
+ const n = se[a.action] || se.custom;
622
650
  return /* @__PURE__ */ c(
623
651
  "tr",
624
652
  {
625
- className: `nice-audit-row nice-audit-row--${i.severity || "info"}`,
626
- onClick: () => t == null ? void 0 : t(i),
653
+ className: `nice-audit-row nice-audit-row--${a.severity || "info"}`,
654
+ onClick: () => t == null ? void 0 : t(a),
627
655
  role: t ? "button" : void 0,
628
656
  children: [
629
- /* @__PURE__ */ e("td", { className: "nice-audit-cell-time", children: new Date(i.timestamp).toLocaleString() }),
657
+ /* @__PURE__ */ e("td", { className: "nice-audit-cell-time", children: new Date(a.timestamp).toLocaleString() }),
630
658
  /* @__PURE__ */ e("td", { children: /* @__PURE__ */ c(
631
659
  "span",
632
660
  {
@@ -635,34 +663,34 @@ const se = {
635
663
  children: [
636
664
  n.icon,
637
665
  " ",
638
- i.actionLabel || n.label
666
+ a.actionLabel || n.label
639
667
  ]
640
668
  }
641
669
  ) }),
642
670
  /* @__PURE__ */ c("td", { className: "nice-audit-cell-user", children: [
643
- i.userAvatar && /* @__PURE__ */ e("img", { src: i.userAvatar, alt: "", className: "nice-audit-avatar-sm" }),
644
- i.userName
671
+ a.userAvatar && /* @__PURE__ */ e("img", { src: a.userAvatar, alt: "", className: "nice-audit-avatar-sm" }),
672
+ a.userName
645
673
  ] }),
646
674
  /* @__PURE__ */ c("td", { children: [
647
- i.entityType,
648
- i.entityName && `: ${i.entityName}`
675
+ a.entityType,
676
+ a.entityName && `: ${a.entityName}`
649
677
  ] }),
650
- /* @__PURE__ */ e("td", { children: i.changes && i.changes.length > 0 ? /* @__PURE__ */ c("span", { className: "nice-audit-changes-count", children: [
651
- i.changes.length,
678
+ /* @__PURE__ */ e("td", { children: a.changes && a.changes.length > 0 ? /* @__PURE__ */ c("span", { className: "nice-audit-changes-count", children: [
679
+ a.changes.length,
652
680
  " field(s)"
653
681
  ] }) : "-" }),
654
- /* @__PURE__ */ e("td", { className: "nice-audit-cell-ip", children: i.ipAddress || "-" })
682
+ /* @__PURE__ */ e("td", { className: "nice-audit-cell-ip", children: a.ipAddress || "-" })
655
683
  ]
656
684
  },
657
- i.id
685
+ a.id
658
686
  );
659
687
  }) })
660
688
  ] }), Ic = te(
661
689
  ({
662
- dataSource: a,
690
+ dataSource: i,
663
691
  initialFilter: s = {},
664
692
  pageSize: t = 50,
665
- viewMode: i = "timeline",
693
+ viewMode: a = "timeline",
666
694
  enableExport: n = !0,
667
695
  showDiffs: l = !0,
668
696
  renderActionIcon: h,
@@ -673,15 +701,15 @@ const se = {
673
701
  className: S = "",
674
702
  style: y
675
703
  }, J) => {
676
- const [_, K] = w([]), [O, M] = w(0), [j, U] = w(s), [B, m] = w(1), [k, g] = w(!1), [Y, p] = w(i), [P, A] = w(!1), I = $(async () => {
704
+ const [_, K] = w([]), [O, M] = w(0), [j, U] = w(s), [B, m] = w(1), [k, g] = w(!1), [Y, p] = w(a), [P, A] = w(!1), I = $(async () => {
677
705
  g(!0);
678
706
  try {
679
- const v = await a.fetchEntries(j, { page: B, pageSize: t });
707
+ const v = await i.fetchEntries(j, { page: B, pageSize: t });
680
708
  K(v.entries), M(v.totalCount);
681
709
  } finally {
682
710
  g(!1);
683
711
  }
684
- }, [a, j, B, t]);
712
+ }, [i, j, B, t]);
685
713
  vc.useEffect(() => {
686
714
  I();
687
715
  }, [I]);
@@ -832,46 +860,50 @@ const Fc = [
832
860
  content: "Assemble the contract from the clause library, fill template variables, track versions and approvals, then save or export to PDF/DOCX/HTML.",
833
861
  placement: "auto"
834
862
  }
835
- ], ae = {
863
+ ], ie = {
836
864
  general: {
837
865
  label: "General",
838
- color: "var(--text-muted, #6b7280)",
866
+ color: "var(--nice-text-muted, #6b7280)",
839
867
  icon: /* @__PURE__ */ e(we, { size: 16 })
840
868
  },
841
869
  liability: {
842
870
  label: "Liability",
843
- color: "var(--color-error, #ef4444)",
871
+ color: "var(--nice-color-error, #ef4444)",
844
872
  icon: /* @__PURE__ */ e(Me, { size: 16 })
845
873
  },
846
874
  payment: {
847
875
  label: "Payment",
848
- color: "var(--color-success, #10b981)",
876
+ color: "var(--nice-color-success, #10b981)",
849
877
  icon: /* @__PURE__ */ e(sc, { size: 16 })
850
878
  },
851
879
  termination: {
852
880
  label: "Termination",
853
- color: "var(--color-warning, #f59e0b)",
854
- icon: /* @__PURE__ */ e(ic, { size: 16 })
881
+ color: "var(--nice-color-warning, #f59e0b)",
882
+ icon: /* @__PURE__ */ e(ac, { size: 16 })
855
883
  },
856
884
  confidentiality: {
857
885
  label: "Confidentiality",
858
- color: "var(--color-accent, #8b5cf6)",
886
+ color: "var(--nice-color-accent, #8b5cf6)",
859
887
  icon: /* @__PURE__ */ e(Ee, { size: 16 })
860
888
  },
861
889
  compliance: {
862
890
  label: "Compliance",
863
- color: "var(--color-primary, #3b82f6)",
864
- icon: /* @__PURE__ */ e(ie, { size: 16 })
891
+ color: "var(--nice-color-primary, #3b82f6)",
892
+ icon: /* @__PURE__ */ e(ae, { size: 16 })
865
893
  },
866
- custom: { label: "Custom", color: "var(--text-muted, #64748b)", icon: /* @__PURE__ */ e(Oe, { size: 16 }) }
894
+ custom: {
895
+ label: "Custom",
896
+ color: "var(--nice-text-muted, #64748b)",
897
+ icon: /* @__PURE__ */ e(Oe, { size: 16 })
898
+ }
867
899
  }, $c = {
868
- draft: { label: "Draft", color: "var(--text-muted, #6b7280)" },
869
- pending_review: { label: "Pending Review", color: "var(--color-warning, #f59e0b)" },
870
- approved: { label: "Approved", color: "var(--color-success, #10b981)" },
871
- rejected: { label: "Rejected", color: "var(--color-error, #ef4444)" },
872
- signed: { label: "Signed", color: "var(--color-accent, #8b5cf6)" }
873
- }, Pc = ({ clauses: a, onInsert: s }) => {
874
- const [t, i] = w(""), [n, l] = w("all"), h = a.filter((r) => {
900
+ draft: { label: "Draft", color: "var(--nice-text-muted, #6b7280)" },
901
+ pending_review: { label: "Pending Review", color: "var(--nice-color-warning, #f59e0b)" },
902
+ approved: { label: "Approved", color: "var(--nice-color-success, #10b981)" },
903
+ rejected: { label: "Rejected", color: "var(--nice-color-error, #ef4444)" },
904
+ signed: { label: "Signed", color: "var(--nice-color-accent, #8b5cf6)" }
905
+ }, Pc = ({ clauses: i, onInsert: s }) => {
906
+ const [t, a] = w(""), [n, l] = w("all"), h = i.filter((r) => {
875
907
  const u = t === "" || r.name.toLowerCase().includes(t.toLowerCase()) || r.content.toLowerCase().includes(t.toLowerCase()), T = n === "all" || r.category === n;
876
908
  return u && T;
877
909
  });
@@ -884,7 +916,7 @@ const Fc = [
884
916
  type: "text",
885
917
  placeholder: "Search clauses...",
886
918
  value: t,
887
- onChange: (r) => i(r.target.value),
919
+ onChange: (r) => a(r.target.value),
888
920
  className: "nice-contract-library-search"
889
921
  }
890
922
  )
@@ -899,17 +931,17 @@ const Fc = [
899
931
  children: "All"
900
932
  }
901
933
  ),
902
- Object.keys(ae).map((r) => /* @__PURE__ */ c(
934
+ Object.keys(ie).map((r) => /* @__PURE__ */ c(
903
935
  "button",
904
936
  {
905
937
  type: "button",
906
938
  className: `nice-contract-category-btn ${n === r ? "nice-contract-category-btn--active" : ""}`,
907
939
  onClick: () => l(r),
908
- style: { "--cat-color": ae[r].color },
940
+ style: { "--cat-color": ie[r].color },
909
941
  children: [
910
- ae[r].icon,
942
+ ie[r].icon,
911
943
  " ",
912
- ae[r].label
944
+ ie[r].label
913
945
  ]
914
946
  },
915
947
  r
@@ -923,8 +955,8 @@ const Fc = [
923
955
  "span",
924
956
  {
925
957
  className: "nice-contract-library-item-cat",
926
- style: { "--cat-color": ae[r.category].color },
927
- children: ae[r.category].icon
958
+ style: { "--cat-color": ie[r.category].color },
959
+ children: ie[r.category].icon
928
960
  }
929
961
  )
930
962
  ] }),
@@ -945,45 +977,45 @@ const Fc = [
945
977
  h.length === 0 && /* @__PURE__ */ e("div", { className: "nice-contract-library-empty", children: "No matching clauses" })
946
978
  ] })
947
979
  ] });
948
- }, Rc = ({ variables: a, definitions: s, onChange: t }) => /* @__PURE__ */ c("div", { className: "nice-contract-variables", children: [
980
+ }, Rc = ({ variables: i, definitions: s, onChange: t }) => /* @__PURE__ */ c("div", { className: "nice-contract-variables", children: [
949
981
  /* @__PURE__ */ e("h4", { children: "Variables" }),
950
- /* @__PURE__ */ e("div", { className: "nice-contract-variables-list", children: s.map((i) => /* @__PURE__ */ c("div", { className: "nice-contract-variable", children: [
982
+ /* @__PURE__ */ e("div", { className: "nice-contract-variables-list", children: s.map((a) => /* @__PURE__ */ c("div", { className: "nice-contract-variable", children: [
951
983
  /* @__PURE__ */ c("label", { children: [
952
- i.name,
953
- i.required && /* @__PURE__ */ e("span", { className: "nice-contract-required", children: "*" })
984
+ a.name,
985
+ a.required && /* @__PURE__ */ e("span", { className: "nice-contract-required", children: "*" })
954
986
  ] }),
955
- i.type === "select" && i.options ? /* @__PURE__ */ c(
987
+ a.type === "select" && a.options ? /* @__PURE__ */ c(
956
988
  "select",
957
989
  {
958
- value: a[i.name] || i.defaultValue || "",
959
- onChange: (n) => t(i.name, n.target.value),
990
+ value: i[a.name] || a.defaultValue || "",
991
+ onChange: (n) => t(a.name, n.target.value),
960
992
  children: [
961
993
  /* @__PURE__ */ e("option", { value: "", children: "Select..." }),
962
- i.options.map((n) => /* @__PURE__ */ e("option", { value: n, children: n }, n))
994
+ a.options.map((n) => /* @__PURE__ */ e("option", { value: n, children: n }, n))
963
995
  ]
964
996
  }
965
- ) : i.type === "date" ? /* @__PURE__ */ e(
997
+ ) : a.type === "date" ? /* @__PURE__ */ e(
966
998
  "input",
967
999
  {
968
1000
  type: "date",
969
- value: a[i.name] || i.defaultValue || "",
970
- onChange: (n) => t(i.name, n.target.value)
1001
+ value: i[a.name] || a.defaultValue || "",
1002
+ onChange: (n) => t(a.name, n.target.value)
971
1003
  }
972
1004
  ) : /* @__PURE__ */ e(
973
1005
  "input",
974
1006
  {
975
- type: i.type === "number" || i.type === "currency" ? "number" : "text",
976
- value: a[i.name] || i.defaultValue || "",
977
- placeholder: i.placeholder,
978
- onChange: (n) => t(i.name, n.target.value)
1007
+ type: a.type === "number" || a.type === "currency" ? "number" : "text",
1008
+ value: i[a.name] || a.defaultValue || "",
1009
+ placeholder: a.placeholder,
1010
+ onChange: (n) => t(a.name, n.target.value)
979
1011
  }
980
1012
  )
981
- ] }, i.name)) })
1013
+ ] }, a.name)) })
982
1014
  ] }), Oc = ({
983
- section: a,
1015
+ section: i,
984
1016
  variables: s,
985
1017
  readOnly: t,
986
- onToggle: i,
1018
+ onToggle: a,
987
1019
  onRemoveClause: n,
988
1020
  onMoveClause: l
989
1021
  }) => {
@@ -991,25 +1023,25 @@ const Fc = [
991
1023
  return /* @__PURE__ */ c(
992
1024
  "div",
993
1025
  {
994
- className: `nice-contract-section ${a.collapsed ? "nice-contract-section--collapsed" : ""}`,
1026
+ className: `nice-contract-section ${i.collapsed ? "nice-contract-section--collapsed" : ""}`,
995
1027
  children: [
996
- /* @__PURE__ */ c("div", { className: "nice-contract-section-header", onClick: i, children: [
997
- /* @__PURE__ */ e("span", { className: "nice-contract-section-toggle", children: a.collapsed ? /* @__PURE__ */ e($e, { size: 14 }) : /* @__PURE__ */ e(De, { size: 14 }) }),
998
- /* @__PURE__ */ e("h3", { children: a.title }),
1028
+ /* @__PURE__ */ c("div", { className: "nice-contract-section-header", onClick: a, children: [
1029
+ /* @__PURE__ */ e("span", { className: "nice-contract-section-toggle", children: i.collapsed ? /* @__PURE__ */ e($e, { size: 14 }) : /* @__PURE__ */ e(De, { size: 14 }) }),
1030
+ /* @__PURE__ */ e("h3", { children: i.title }),
999
1031
  /* @__PURE__ */ c("span", { className: "nice-contract-section-count", children: [
1000
- a.clauses.length,
1032
+ i.clauses.length,
1001
1033
  " clause(s)"
1002
1034
  ] })
1003
1035
  ] }),
1004
- !a.collapsed && /* @__PURE__ */ c("div", { className: "nice-contract-section-content", children: [
1005
- a.clauses.map((r, u) => /* @__PURE__ */ c("div", { className: "nice-contract-clause", children: [
1036
+ !i.collapsed && /* @__PURE__ */ c("div", { className: "nice-contract-section-content", children: [
1037
+ i.clauses.map((r, u) => /* @__PURE__ */ c("div", { className: "nice-contract-clause", children: [
1006
1038
  /* @__PURE__ */ c("div", { className: "nice-contract-clause-header", children: [
1007
1039
  /* @__PURE__ */ e(
1008
1040
  "span",
1009
1041
  {
1010
1042
  className: "nice-contract-clause-cat",
1011
- style: { "--cat-color": ae[r.category].color },
1012
- children: ae[r.category].icon
1043
+ style: { "--cat-color": ie[r.category].color },
1044
+ children: ie[r.category].icon
1013
1045
  }
1014
1046
  ),
1015
1047
  /* @__PURE__ */ e("span", { className: "nice-contract-clause-name", children: r.name }),
@@ -1029,8 +1061,8 @@ const Fc = [
1029
1061
  {
1030
1062
  type: "button",
1031
1063
  onClick: () => l(r.id, "down"),
1032
- disabled: u === a.clauses.length - 1,
1033
- children: /* @__PURE__ */ e(ac, { size: 14 })
1064
+ disabled: u === i.clauses.length - 1,
1065
+ children: /* @__PURE__ */ e(ic, { size: 14 })
1034
1066
  }
1035
1067
  ),
1036
1068
  /* @__PURE__ */ e("button", { type: "button", onClick: () => n(r.id), children: /* @__PURE__ */ e(ge, { size: 14 }) })
@@ -1044,16 +1076,16 @@ const Fc = [
1044
1076
  }
1045
1077
  )
1046
1078
  ] }, r.id)),
1047
- a.clauses.length === 0 && /* @__PURE__ */ e("div", { className: "nice-contract-section-empty", children: "No clauses in this section. Drag clauses here or use the library." })
1079
+ i.clauses.length === 0 && /* @__PURE__ */ e("div", { className: "nice-contract-section-empty", children: "No clauses in this section. Drag clauses here or use the library." })
1048
1080
  ] })
1049
1081
  ]
1050
1082
  }
1051
1083
  );
1052
- }, Ec = ({ workflow: a, onAction: s }) => {
1053
- const [t, i] = w(null), [n, l] = w("");
1084
+ }, Ec = ({ workflow: i, onAction: s }) => {
1085
+ const [t, a] = w(null), [n, l] = w("");
1054
1086
  return /* @__PURE__ */ c("div", { className: "nice-contract-workflow", children: [
1055
1087
  /* @__PURE__ */ e("h4", { children: "Approval Workflow" }),
1056
- /* @__PURE__ */ e("div", { className: "nice-contract-workflow-steps", children: a.steps.map((h, r) => /* @__PURE__ */ c(
1088
+ /* @__PURE__ */ e("div", { className: "nice-contract-workflow-steps", children: i.steps.map((h, r) => /* @__PURE__ */ c(
1057
1089
  "div",
1058
1090
  {
1059
1091
  className: `nice-contract-workflow-step nice-contract-workflow-step--${h.status}`,
@@ -1074,7 +1106,7 @@ const Fc = [
1074
1106
  /* @__PURE__ */ e("span", { children: u.name }),
1075
1107
  /* @__PURE__ */ e("span", { className: "nice-contract-approver-role", children: u.role })
1076
1108
  ] }, u.id)) }),
1077
- h.status === "pending" && a.currentStep === r && /* @__PURE__ */ e("div", { className: "nice-contract-workflow-actions", children: t === h.id ? /* @__PURE__ */ c(ee, { children: [
1109
+ h.status === "pending" && i.currentStep === r && /* @__PURE__ */ e("div", { className: "nice-contract-workflow-actions", children: t === h.id ? /* @__PURE__ */ c(ee, { children: [
1078
1110
  /* @__PURE__ */ e(
1079
1111
  "textarea",
1080
1112
  {
@@ -1090,10 +1122,10 @@ const Fc = [
1090
1122
  type: "button",
1091
1123
  className: "nice-contract-btn nice-contract-btn--approve",
1092
1124
  onClick: () => {
1093
- s(h.id, "approve", n), i(null), l("");
1125
+ s(h.id, "approve", n), a(null), l("");
1094
1126
  },
1095
1127
  children: [
1096
- /* @__PURE__ */ e(ie, { size: 14 }),
1128
+ /* @__PURE__ */ e(ae, { size: 14 }),
1097
1129
  " Approve"
1098
1130
  ]
1099
1131
  }
@@ -1104,7 +1136,7 @@ const Fc = [
1104
1136
  type: "button",
1105
1137
  className: "nice-contract-btn nice-contract-btn--reject",
1106
1138
  onClick: () => {
1107
- s(h.id, "reject", n), i(null), l("");
1139
+ s(h.id, "reject", n), a(null), l("");
1108
1140
  },
1109
1141
  children: [
1110
1142
  /* @__PURE__ */ e(oe, { size: 14 }),
@@ -1112,14 +1144,14 @@ const Fc = [
1112
1144
  ]
1113
1145
  }
1114
1146
  ),
1115
- /* @__PURE__ */ e("button", { type: "button", onClick: () => i(null), children: "Cancel" })
1147
+ /* @__PURE__ */ e("button", { type: "button", onClick: () => a(null), children: "Cancel" })
1116
1148
  ] })
1117
1149
  ] }) : /* @__PURE__ */ e(
1118
1150
  "button",
1119
1151
  {
1120
1152
  type: "button",
1121
1153
  className: "nice-contract-btn",
1122
- onClick: () => i(h.id),
1154
+ onClick: () => a(h.id),
1123
1155
  children: "Review"
1124
1156
  }
1125
1157
  ) })
@@ -1130,10 +1162,10 @@ const Fc = [
1130
1162
  ] });
1131
1163
  }, Mc = te(
1132
1164
  ({
1133
- document: a,
1165
+ document: i,
1134
1166
  clauseLibrary: s = [],
1135
1167
  readOnly: t = !1,
1136
- showClauseLibrary: i = !0,
1168
+ showClauseLibrary: a = !0,
1137
1169
  showVersionHistory: n = !1,
1138
1170
  showComments: l = !1,
1139
1171
  showWorkflow: h = !0,
@@ -1152,7 +1184,7 @@ const Fc = [
1152
1184
  tutorial: U
1153
1185
  }, B) => {
1154
1186
  var Q;
1155
- const [m, k] = w(a), [g, Y] = w(i ? "library" : null), [p, P] = w(
1187
+ const [m, k] = w(i), [g, Y] = w(a ? "library" : null), [p, P] = w(
1156
1188
  ((Q = m.sections[0]) == null ? void 0 : Q.id) || null
1157
1189
  ), I = m.sections.flatMap(
1158
1190
  (N) => N.clauses.flatMap((D) => D.variables || [])
@@ -1262,7 +1294,7 @@ const Fc = [
1262
1294
  ] })
1263
1295
  ] })
1264
1296
  ] }), W = /* @__PURE__ */ c("div", { className: "nice-contract-toolbar", children: [
1265
- i && /* @__PURE__ */ c(
1297
+ a && /* @__PURE__ */ c(
1266
1298
  "button",
1267
1299
  {
1268
1300
  type: "button",
@@ -1293,7 +1325,7 @@ const Fc = [
1293
1325
  className: `nice-contract-toolbar-btn ${g === "workflow" ? "nice-contract-toolbar-btn--active" : ""}`,
1294
1326
  onClick: () => Y(g === "workflow" ? null : "workflow"),
1295
1327
  children: [
1296
- /* @__PURE__ */ e(ie, { size: 16 }),
1328
+ /* @__PURE__ */ e(ae, { size: 16 }),
1297
1329
  " Workflow"
1298
1330
  ]
1299
1331
  }
@@ -1422,7 +1454,7 @@ const jc = [
1422
1454
  processing: "Processing",
1423
1455
  completed: "Completed",
1424
1456
  close: "Close"
1425
- }, Yc = ({ option: a, enabled: s, onChange: t }) => /* @__PURE__ */ c("div", { className: "nice-gdpr-option", children: [
1457
+ }, Yc = ({ option: i, enabled: s, onChange: t }) => /* @__PURE__ */ c("div", { className: "nice-gdpr-option", children: [
1426
1458
  /* @__PURE__ */ c("div", { className: "nice-gdpr-option-header", children: [
1427
1459
  /* @__PURE__ */ c("label", { className: "nice-gdpr-option-toggle", children: [
1428
1460
  /* @__PURE__ */ e(
@@ -1430,29 +1462,29 @@ const jc = [
1430
1462
  {
1431
1463
  type: "checkbox",
1432
1464
  checked: s,
1433
- onChange: (i) => t(i.target.checked),
1434
- disabled: a.required
1465
+ onChange: (a) => t(a.target.checked),
1466
+ disabled: i.required
1435
1467
  }
1436
1468
  ),
1437
1469
  /* @__PURE__ */ e("span", { className: "nice-gdpr-toggle-slider" })
1438
1470
  ] }),
1439
1471
  /* @__PURE__ */ c("div", { className: "nice-gdpr-option-info", children: [
1440
1472
  /* @__PURE__ */ c("span", { className: "nice-gdpr-option-label", children: [
1441
- a.label,
1442
- a.required && /* @__PURE__ */ e("span", { className: "nice-gdpr-required", children: "Required" })
1473
+ i.label,
1474
+ i.required && /* @__PURE__ */ e("span", { className: "nice-gdpr-required", children: "Required" })
1443
1475
  ] }),
1444
- /* @__PURE__ */ e("span", { className: "nice-gdpr-option-desc", children: a.description })
1476
+ /* @__PURE__ */ e("span", { className: "nice-gdpr-option-desc", children: i.description })
1445
1477
  ] })
1446
1478
  ] }),
1447
- a.partners && a.partners.length > 0 && /* @__PURE__ */ c("div", { className: "nice-gdpr-option-partners", children: [
1479
+ i.partners && i.partners.length > 0 && /* @__PURE__ */ c("div", { className: "nice-gdpr-option-partners", children: [
1448
1480
  /* @__PURE__ */ e("span", { children: "Partners: " }),
1449
- a.partners.join(", ")
1481
+ i.partners.join(", ")
1450
1482
  ] })
1451
1483
  ] }), qc = ({
1452
- requests: a,
1484
+ requests: i,
1453
1485
  policies: s,
1454
1486
  onRequest: t,
1455
- onDownload: i,
1487
+ onDownload: a,
1456
1488
  labels: n
1457
1489
  }) => /* @__PURE__ */ c("div", { className: "nice-gdpr-rights", children: [
1458
1490
  /* @__PURE__ */ e("h4", { children: n.dataRights }),
@@ -1484,9 +1516,9 @@ const jc = [
1484
1516
  }
1485
1517
  )
1486
1518
  ] }),
1487
- a.length > 0 && /* @__PURE__ */ c("div", { className: "nice-gdpr-requests", children: [
1519
+ i.length > 0 && /* @__PURE__ */ c("div", { className: "nice-gdpr-requests", children: [
1488
1520
  /* @__PURE__ */ e("h5", { children: "Previous Requests" }),
1489
- a.map((l) => /* @__PURE__ */ c("div", { className: `nice-gdpr-request nice-gdpr-request--${l.status}`, children: [
1521
+ i.map((l) => /* @__PURE__ */ c("div", { className: `nice-gdpr-request nice-gdpr-request--${l.status}`, children: [
1490
1522
  /* @__PURE__ */ e("span", { className: "nice-gdpr-request-type", children: l.type }),
1491
1523
  /* @__PURE__ */ e("span", { className: "nice-gdpr-request-date", children: new Date(l.requestedAt).toLocaleDateString() }),
1492
1524
  /* @__PURE__ */ e("span", { className: "nice-gdpr-request-status", children: l.status }),
@@ -1495,7 +1527,7 @@ const jc = [
1495
1527
  {
1496
1528
  type: "button",
1497
1529
  className: "nice-gdpr-download-btn",
1498
- onClick: () => i(l.id),
1530
+ onClick: () => a(l.id),
1499
1531
  children: "Download"
1500
1532
  }
1501
1533
  )
@@ -1521,10 +1553,10 @@ const jc = [
1521
1553
  ] })
1522
1554
  ] }), Vc = te(
1523
1555
  ({
1524
- appName: a,
1556
+ appName: i,
1525
1557
  companyName: s,
1526
1558
  options: t = jc,
1527
- currentConsent: i = null,
1559
+ currentConsent: a = null,
1528
1560
  retentionPolicies: n = [],
1529
1561
  dataRequests: l = [],
1530
1562
  privacyPolicy: h = [],
@@ -1545,12 +1577,12 @@ const jc = [
1545
1577
  const m = { ...Uc, ...M }, [k, g] = w(!1), [Y, p] = w(!1), [P, A] = w(!1), [I, C] = w(() => {
1546
1578
  const b = {};
1547
1579
  return t.forEach((L) => {
1548
- b[L.id] = (i == null ? void 0 : i.categories[L.id]) ?? L.enabled;
1580
+ b[L.id] = (a == null ? void 0 : a.categories[L.id]) ?? L.enabled;
1549
1581
  }), b;
1550
1582
  });
1551
1583
  ue(() => {
1552
- (!i || i.version !== u) && g(!0);
1553
- }, [i, u]);
1584
+ (!a || a.version !== u) && g(!0);
1585
+ }, [a, u]);
1554
1586
  const q = $(
1555
1587
  (b, L) => {
1556
1588
  const W = L || I;
@@ -1612,7 +1644,7 @@ const jc = [
1612
1644
  /* @__PURE__ */ e("div", { className: "nice-gdpr-icon", children: /* @__PURE__ */ e(tc, { size: 32 }) }),
1613
1645
  /* @__PURE__ */ c("div", { className: "nice-gdpr-header-text", children: [
1614
1646
  /* @__PURE__ */ e("h3", { children: m.title }),
1615
- /* @__PURE__ */ e("p", { children: m.description.replace("{app}", a).replace("{company}", s) })
1647
+ /* @__PURE__ */ e("p", { children: m.description.replace("{app}", i).replace("{company}", s) })
1616
1648
  ] })
1617
1649
  ] }),
1618
1650
  !Y && !P && /* @__PURE__ */ c("div", { className: "nice-gdpr-quick-actions", children: [
@@ -1712,17 +1744,17 @@ Vc.displayName = "NiceGDPRConsent";
1712
1744
  const Ve = {
1713
1745
  document: /* @__PURE__ */ e(we, { size: 16 }),
1714
1746
  user: /* @__PURE__ */ e(Ye, { size: 16 }),
1715
- task: /* @__PURE__ */ e(ie, { size: 16 }),
1747
+ task: /* @__PURE__ */ e(ae, { size: 16 }),
1716
1748
  project: /* @__PURE__ */ e(rc, { size: 16 }),
1717
1749
  setting: /* @__PURE__ */ e(Pe, { size: 16 }),
1718
1750
  help: /* @__PURE__ */ e(Ue, { size: 16 }),
1719
1751
  action: /* @__PURE__ */ e(je, { size: 16 }),
1720
1752
  custom: /* @__PURE__ */ e(Ce, { size: 16 })
1721
1753
  }, Bc = ({
1722
- value: a,
1754
+ value: i,
1723
1755
  onChange: s,
1724
1756
  onKeyDown: t,
1725
- placeholder: i,
1757
+ placeholder: a,
1726
1758
  isLoading: n,
1727
1759
  inputRef: l
1728
1760
  }) => /* @__PURE__ */ c("div", { className: "nice-search-input-container", children: [
@@ -1733,15 +1765,15 @@ const Ve = {
1733
1765
  ref: l,
1734
1766
  type: "text",
1735
1767
  className: "nice-search-input",
1736
- placeholder: i,
1737
- value: a,
1768
+ placeholder: a,
1769
+ value: i,
1738
1770
  onChange: (h) => s(h.target.value),
1739
1771
  onKeyDown: t,
1740
1772
  "aria-label": "Search"
1741
1773
  }
1742
1774
  ),
1743
1775
  n && /* @__PURE__ */ e("span", { className: "nice-search-loader" }),
1744
- a && !n && /* @__PURE__ */ e(
1776
+ i && !n && /* @__PURE__ */ e(
1745
1777
  "button",
1746
1778
  {
1747
1779
  type: "button",
@@ -1751,7 +1783,7 @@ const Ve = {
1751
1783
  children: /* @__PURE__ */ e(ge, { size: 16 })
1752
1784
  }
1753
1785
  )
1754
- ] }), Hc = ({ result: a, isSelected: s, onSelect: t, renderResult: i }) => i ? /* @__PURE__ */ e("div", { onClick: t, children: i(a, s) }) : /* @__PURE__ */ c(
1786
+ ] }), Hc = ({ result: i, isSelected: s, onSelect: t, renderResult: a }) => a ? /* @__PURE__ */ e("div", { onClick: t, children: a(i, s) }) : /* @__PURE__ */ c(
1755
1787
  "div",
1756
1788
  {
1757
1789
  className: `nice-search-result ${s ? "nice-search-result--selected" : ""}`,
@@ -1759,17 +1791,17 @@ const Ve = {
1759
1791
  role: "option",
1760
1792
  "aria-selected": s,
1761
1793
  children: [
1762
- /* @__PURE__ */ e("div", { className: "nice-search-result-icon", children: a.icon || (a.image ? /* @__PURE__ */ e("img", { src: a.image, alt: "" }) : Ve[a.type]) }),
1794
+ /* @__PURE__ */ e("div", { className: "nice-search-result-icon", children: i.icon || (i.image ? /* @__PURE__ */ e("img", { src: i.image, alt: "" }) : Ve[i.type]) }),
1763
1795
  /* @__PURE__ */ c("div", { className: "nice-search-result-content", children: [
1764
- /* @__PURE__ */ e("span", { className: "nice-search-result-title", children: a.title }),
1765
- a.subtitle && /* @__PURE__ */ e("span", { className: "nice-search-result-subtitle", children: a.subtitle }),
1766
- a.description && /* @__PURE__ */ e("span", { className: "nice-search-result-desc", children: a.description })
1796
+ /* @__PURE__ */ e("span", { className: "nice-search-result-title", children: i.title }),
1797
+ i.subtitle && /* @__PURE__ */ e("span", { className: "nice-search-result-subtitle", children: i.subtitle }),
1798
+ i.description && /* @__PURE__ */ e("span", { className: "nice-search-result-desc", children: i.description })
1767
1799
  ] }),
1768
1800
  /* @__PURE__ */ c("div", { className: "nice-search-result-meta", children: [
1769
- /* @__PURE__ */ e("span", { className: "nice-search-result-source", children: a.source }),
1770
- /* @__PURE__ */ e("span", { className: "nice-search-result-type", children: a.type })
1801
+ /* @__PURE__ */ e("span", { className: "nice-search-result-source", children: i.source }),
1802
+ /* @__PURE__ */ e("span", { className: "nice-search-result-type", children: i.type })
1771
1803
  ] }),
1772
- a.actions && a.actions.length > 0 && /* @__PURE__ */ e("div", { className: "nice-search-result-actions", children: a.actions.map((n) => /* @__PURE__ */ e(
1804
+ i.actions && i.actions.length > 0 && /* @__PURE__ */ e("div", { className: "nice-search-result-actions", children: i.actions.map((n) => /* @__PURE__ */ e(
1773
1805
  "button",
1774
1806
  {
1775
1807
  type: "button",
@@ -1784,7 +1816,7 @@ const Ve = {
1784
1816
  )) })
1785
1817
  ]
1786
1818
  }
1787
- ), Jc = ({ categories: a, selected: s, onSelect: t }) => /* @__PURE__ */ c("div", { className: "nice-search-categories", children: [
1819
+ ), Jc = ({ categories: i, selected: s, onSelect: t }) => /* @__PURE__ */ c("div", { className: "nice-search-categories", children: [
1788
1820
  /* @__PURE__ */ e(
1789
1821
  "button",
1790
1822
  {
@@ -1794,32 +1826,32 @@ const Ve = {
1794
1826
  children: "All"
1795
1827
  }
1796
1828
  ),
1797
- a.map((i) => /* @__PURE__ */ c(
1829
+ i.map((a) => /* @__PURE__ */ c(
1798
1830
  "button",
1799
1831
  {
1800
1832
  type: "button",
1801
- className: `nice-search-category ${s === i.id ? "nice-search-category--active" : ""}`,
1802
- onClick: () => t(i.id),
1833
+ className: `nice-search-category ${s === a.id ? "nice-search-category--active" : ""}`,
1834
+ onClick: () => t(a.id),
1803
1835
  children: [
1804
- i.icon && /* @__PURE__ */ e("span", { className: "nice-search-category-icon", children: i.icon }),
1805
- i.label,
1806
- i.count !== void 0 && /* @__PURE__ */ e("span", { className: "nice-search-category-count", children: i.count })
1836
+ a.icon && /* @__PURE__ */ e("span", { className: "nice-search-category-icon", children: a.icon }),
1837
+ a.label,
1838
+ a.count !== void 0 && /* @__PURE__ */ e("span", { className: "nice-search-category-count", children: a.count })
1807
1839
  ]
1808
1840
  },
1809
- i.id
1841
+ a.id
1810
1842
  ))
1811
1843
  ] }), Gc = ({
1812
- searches: a,
1844
+ searches: i,
1813
1845
  onSelect: s,
1814
1846
  onClear: t,
1815
- label: i,
1847
+ label: a,
1816
1848
  clearLabel: n
1817
1849
  }) => /* @__PURE__ */ c("div", { className: "nice-search-recent", children: [
1818
1850
  /* @__PURE__ */ c("div", { className: "nice-search-recent-header", children: [
1819
- /* @__PURE__ */ e("span", { children: i }),
1851
+ /* @__PURE__ */ e("span", { children: a }),
1820
1852
  /* @__PURE__ */ e("button", { type: "button", onClick: t, children: n })
1821
1853
  ] }),
1822
- /* @__PURE__ */ e("div", { className: "nice-search-recent-list", children: a.map((l, h) => /* @__PURE__ */ c(
1854
+ /* @__PURE__ */ e("div", { className: "nice-search-recent-list", children: i.map((l, h) => /* @__PURE__ */ c(
1823
1855
  "button",
1824
1856
  {
1825
1857
  type: "button",
@@ -1842,10 +1874,10 @@ const Ve = {
1842
1874
  filters: "Filters"
1843
1875
  }, Wc = te(
1844
1876
  ({
1845
- sources: a,
1877
+ sources: i,
1846
1878
  placeholder: s,
1847
1879
  minQueryLength: t = 2,
1848
- debounceMs: i = 300,
1880
+ debounceMs: a = 300,
1849
1881
  showCategories: n = !0,
1850
1882
  filters: l = [],
1851
1883
  showRecent: h = !0,
@@ -1897,7 +1929,7 @@ const Ve = {
1897
1929
  }
1898
1930
  x(!0);
1899
1931
  try {
1900
- const f = a.map(async (ce) => {
1932
+ const f = i.map(async (ce) => {
1901
1933
  try {
1902
1934
  return (await ce.search(d)).map((ze) => ({
1903
1935
  ...ze,
@@ -1913,14 +1945,14 @@ const Ve = {
1913
1945
  x(!1);
1914
1946
  }
1915
1947
  },
1916
- [a, t, S, Q]
1948
+ [i, t, S, Q]
1917
1949
  ), D = $(
1918
1950
  (d) => {
1919
1951
  I(d), Y.current && clearTimeout(Y.current), Y.current = setTimeout(() => {
1920
1952
  N(d);
1921
- }, i);
1953
+ }, a);
1922
1954
  },
1923
- [N, i]
1955
+ [N, a]
1924
1956
  ), R = $(
1925
1957
  (d) => {
1926
1958
  switch (d.key) {
@@ -2136,7 +2168,7 @@ const le = {
2136
2168
  status: "Status"
2137
2169
  }
2138
2170
  }, ve = {
2139
- login_success: /* @__PURE__ */ e(ie, { size: 16 }),
2171
+ login_success: /* @__PURE__ */ e(ae, { size: 16 }),
2140
2172
  login_failed: /* @__PURE__ */ e(oe, { size: 16 }),
2141
2173
  logout: /* @__PURE__ */ e(Re, { size: 16 }),
2142
2174
  password_change: /* @__PURE__ */ e(be, { size: 16 }),
@@ -2153,54 +2185,54 @@ const le = {
2153
2185
  token_refresh: /* @__PURE__ */ e(Ne, { size: 16 }),
2154
2186
  suspicious_activity: /* @__PURE__ */ e(je, { size: 16 })
2155
2187
  }, re = {
2156
- low: "var(--color-success, #22c55e)",
2157
- medium: "var(--color-warning, #f59e0b)",
2158
- high: "var(--color-error, #ef4444)",
2159
- critical: "var(--color-accent-hover, #7c3aed)"
2188
+ low: "var(--nice-color-success, #22c55e)",
2189
+ medium: "var(--nice-color-warning, #f59e0b)",
2190
+ high: "var(--nice-color-error, #ef4444)",
2191
+ critical: "var(--nice-color-accent-hover, #7c3aed)"
2160
2192
  }, _e = {
2161
2193
  desktop: /* @__PURE__ */ e(gc, { size: 16 }),
2162
2194
  mobile: /* @__PURE__ */ e(fe, { size: 16 }),
2163
2195
  tablet: /* @__PURE__ */ e(fe, { size: 16 }),
2164
2196
  unknown: /* @__PURE__ */ e(Ue, { size: 16 })
2165
- }, Le = (a) => (typeof a == "string" ? new Date(a) : a).toLocaleString("en-US", {
2197
+ }, Le = (i) => (typeof i == "string" ? new Date(i) : i).toLocaleString("en-US", {
2166
2198
  month: "short",
2167
2199
  day: "numeric",
2168
2200
  hour: "2-digit",
2169
2201
  minute: "2-digit",
2170
2202
  second: "2-digit"
2171
- }), Ae = (a) => {
2172
- if (!a)
2203
+ }), Ae = (i) => {
2204
+ if (!i)
2173
2205
  return "Unknown";
2174
2206
  const s = [];
2175
- return a.city && s.push(a.city), a.country && s.push(a.country), s.length > 0 ? s.join(", ") : "Unknown";
2176
- }, Xc = (a) => {
2177
- if (!a)
2207
+ return i.city && s.push(i.city), i.country && s.push(i.country), s.length > 0 ? s.join(", ") : "Unknown";
2208
+ }, Xc = (i) => {
2209
+ if (!i)
2178
2210
  return "Unknown";
2179
2211
  const s = [];
2180
- return a.browser && s.push(a.browser), a.os && s.push(a.os), s.length > 0 ? s.join(" / ") : a.type;
2181
- }, Ie = (a) => a >= 80 ? re.critical : a >= 60 ? re.high : a >= 40 ? re.medium : re.low, Zc = (a, s) => {
2182
- var t, i, n, l, h;
2212
+ return i.browser && s.push(i.browser), i.os && s.push(i.os), s.length > 0 ? s.join(" / ") : i.type;
2213
+ }, Ie = (i) => i >= 80 ? re.critical : i >= 60 ? re.high : i >= 40 ? re.medium : re.low, Zc = (i, s) => {
2214
+ var t, a, n, l, h;
2183
2215
  if (s.startDate) {
2184
2216
  const r = typeof s.startDate == "string" ? new Date(s.startDate) : s.startDate;
2185
- if ((typeof a.timestamp == "string" ? new Date(a.timestamp) : a.timestamp) < r)
2217
+ if ((typeof i.timestamp == "string" ? new Date(i.timestamp) : i.timestamp) < r)
2186
2218
  return !1;
2187
2219
  }
2188
2220
  if (s.endDate) {
2189
2221
  const r = typeof s.endDate == "string" ? new Date(s.endDate) : s.endDate;
2190
- if ((typeof a.timestamp == "string" ? new Date(a.timestamp) : a.timestamp) > r)
2222
+ if ((typeof i.timestamp == "string" ? new Date(i.timestamp) : i.timestamp) > r)
2191
2223
  return !1;
2192
2224
  }
2193
- if ((t = s.eventTypes) != null && t.length && !s.eventTypes.includes(a.eventType) || (i = s.riskLevels) != null && i.length && !s.riskLevels.includes(a.riskLevel) || s.userId && a.userId !== s.userId || s.ipAddress && !a.ipAddress.includes(s.ipAddress) || s.country && ((n = a.location) == null ? void 0 : n.country) !== s.country || s.successOnly && !a.success || s.failedOnly && a.success)
2225
+ if ((t = s.eventTypes) != null && t.length && !s.eventTypes.includes(i.eventType) || (a = s.riskLevels) != null && a.length && !s.riskLevels.includes(i.riskLevel) || s.userId && i.userId !== s.userId || s.ipAddress && !i.ipAddress.includes(s.ipAddress) || s.country && ((n = i.location) == null ? void 0 : n.country) !== s.country || s.successOnly && !i.success || s.failedOnly && i.success)
2194
2226
  return !1;
2195
2227
  if (s.searchQuery) {
2196
2228
  const r = s.searchQuery.toLowerCase();
2197
2229
  if (![
2198
- a.userName,
2199
- a.userEmail,
2200
- a.userId,
2201
- a.ipAddress,
2202
- (l = a.location) == null ? void 0 : l.city,
2203
- (h = a.location) == null ? void 0 : h.country
2230
+ i.userName,
2231
+ i.userEmail,
2232
+ i.userId,
2233
+ i.ipAddress,
2234
+ (l = i.location) == null ? void 0 : l.city,
2235
+ (h = i.location) == null ? void 0 : h.country
2204
2236
  ].filter(Boolean).join(" ").toLowerCase().includes(r))
2205
2237
  return !1;
2206
2238
  }
@@ -2209,7 +2241,7 @@ const le = {
2209
2241
  function(s, t) {
2210
2242
  var H, X;
2211
2243
  const {
2212
- entries: i,
2244
+ entries: a,
2213
2245
  filter: n = {},
2214
2246
  stats: l,
2215
2247
  realtime: h = !1,
@@ -2239,23 +2271,23 @@ const le = {
2239
2271
  columns: { ...le.columns, ...y == null ? void 0 : y.columns }
2240
2272
  }),
2241
2273
  [y]
2242
- ), [g, Y] = w(n), [p, P] = w(null), [A, I] = w(S), [C, q] = w(!1), [v, x] = w("table"), z = he(() => i.filter((o) => Zc(o, g)), [i, g]), G = he(() => z.slice(0, A), [z, A]), V = he(() => {
2274
+ ), [g, Y] = w(n), [p, P] = w(null), [A, I] = w(S), [C, q] = w(!1), [v, x] = w("table"), z = he(() => a.filter((o) => Zc(o, g)), [a, g]), G = he(() => z.slice(0, A), [z, A]), V = he(() => {
2243
2275
  if (l)
2244
2276
  return l;
2245
- const o = new Set(i.map((f) => f.ipAddress)), d = new Set(i.map((f) => {
2277
+ const o = new Set(a.map((f) => f.ipAddress)), d = new Set(a.map((f) => {
2246
2278
  var Z;
2247
2279
  return (Z = f.location) == null ? void 0 : Z.country;
2248
2280
  }).filter(Boolean));
2249
2281
  return {
2250
- totalEvents: i.length,
2251
- successfulLogins: i.filter((f) => f.eventType === "login_success").length,
2252
- failedLogins: i.filter((f) => f.eventType === "login_failed").length,
2282
+ totalEvents: a.length,
2283
+ successfulLogins: a.filter((f) => f.eventType === "login_success").length,
2284
+ failedLogins: a.filter((f) => f.eventType === "login_failed").length,
2253
2285
  uniqueIPs: o.size,
2254
2286
  uniqueCountries: d.size,
2255
- highRiskEvents: i.filter((f) => f.riskLevel === "high" || f.riskLevel === "critical").length,
2256
- suspiciousActivities: i.filter((f) => f.eventType === "suspicious_activity").length
2287
+ highRiskEvents: a.filter((f) => f.riskLevel === "high" || f.riskLevel === "critical").length,
2288
+ suspiciousActivities: a.filter((f) => f.eventType === "suspicious_activity").length
2257
2289
  };
2258
- }, [i, l]), b = $(
2290
+ }, [a, l]), b = $(
2259
2291
  (o) => {
2260
2292
  const d = { ...g, ...o };
2261
2293
  Y(d), I(S), _ == null || _(d);
@@ -2346,7 +2378,7 @@ const le = {
2346
2378
  "span",
2347
2379
  {
2348
2380
  className: `nice-accesslog-status ${o.success ? "nice-accesslog-status--success" : "nice-accesslog-status--failed"}`,
2349
- children: o.success ? /* @__PURE__ */ e(ie, { size: 14 }) : /* @__PURE__ */ e(oe, { size: 14 })
2381
+ children: o.success ? /* @__PURE__ */ e(ae, { size: 14 }) : /* @__PURE__ */ e(oe, { size: 14 })
2350
2382
  }
2351
2383
  ) })
2352
2384
  ]