@kiteapps/lite-ui 0.1.0 → 0.1.1

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,10 +1,11 @@
1
- // src/widgets/Primitives.jsx
2
- import React, { useId, useState } from "react";
1
+ // src/widgets/Primitives.tsx
2
+ import { useId, useState } from "react";
3
3
  import { CircleHelp, Info, X } from "lucide-react";
4
4
  import { jsx, jsxs } from "react/jsx-runtime";
5
5
  function Button({ children, variant = "neutral", icon: Icon, className = "", ...props }) {
6
6
  return /* @__PURE__ */ jsxs("button", { className: `ad-button ad-button--${variant} ${className}`, ...props, children: [
7
7
  Icon && /* @__PURE__ */ jsx(Icon, { size: 13, strokeWidth: 1.8 }),
8
+ " ",
8
9
  children
9
10
  ] });
10
11
  }
@@ -34,9 +35,9 @@ function CheckRow({ children, defaultChecked = false, checked, onChange, disable
34
35
  const [local, setLocal] = useState(defaultChecked);
35
36
  const isChecked = checked === void 0 ? local : checked;
36
37
  return /* @__PURE__ */ jsxs("label", { className: `ad-check-row ${disabled ? "is-disabled" : ""} ${className}`, children: [
37
- /* @__PURE__ */ jsx("input", { type: "checkbox", checked: isChecked, disabled, onChange: (e) => {
38
- setLocal(e.target.checked);
39
- onChange?.(e.target.checked);
38
+ /* @__PURE__ */ jsx("input", { type: "checkbox", checked: isChecked, disabled, onChange: (event) => {
39
+ if (checked === void 0) setLocal(event.target.checked);
40
+ onChange?.(event.target.checked);
40
41
  } }),
41
42
  /* @__PURE__ */ jsx("span", { className: "ad-check-box", "aria-hidden": "true" }),
42
43
  /* @__PURE__ */ jsx("span", { children }),
@@ -103,21 +104,22 @@ function Notice({ children, tone = "info" }) {
103
104
  /* @__PURE__ */ jsx("div", { children })
104
105
  ] });
105
106
  }
106
- function DataTable({ columns = [], rows = [], empty = "No Data Available", onRowClick, getRowId = (row, index) => row.id ?? index }) {
107
+ function DataTable({ columns = [], rows = [], empty = "No Data Available", onRowClick, getRowId = (row, index) => !Array.isArray(row) && row.id != null ? String(row.id) : index }) {
107
108
  return /* @__PURE__ */ jsx("div", { className: "ad-table-wrap", children: /* @__PURE__ */ jsxs("table", { className: "ad-table", children: [
108
109
  /* @__PURE__ */ jsx("thead", { children: /* @__PURE__ */ jsx("tr", { children: columns.map((raw, index) => {
109
- const column = typeof raw === "string" ? { key: index, label: raw } : raw;
110
- return /* @__PURE__ */ jsx("th", { children: column.label }, column.key ?? index);
110
+ const column = typeof raw === "string" ? { key: String(index), label: raw } : raw;
111
+ return /* @__PURE__ */ jsx("th", { children: column.label }, column.key);
111
112
  }) }) }),
112
113
  /* @__PURE__ */ jsx("tbody", { children: rows.length ? rows.map((row, index) => /* @__PURE__ */ jsx("tr", { onClick: () => onRowClick?.(row, index), children: columns.map((raw, columnIndex) => {
113
- const column = typeof raw === "string" ? { key: columnIndex, label: raw } : raw;
114
- return /* @__PURE__ */ jsx("td", { children: column.render ? column.render(row, index) : Array.isArray(row) ? row[columnIndex] : row[column.key] }, column.key ?? columnIndex);
114
+ const column = typeof raw === "string" ? { key: String(columnIndex), label: raw } : raw;
115
+ const value = "render" in column && column.render ? column.render(row, index) : Array.isArray(row) ? row[columnIndex] : row[column.key];
116
+ return /* @__PURE__ */ jsx("td", { children: value }, column.key);
115
117
  }) }, getRowId(row, index))) : /* @__PURE__ */ jsx("tr", { children: /* @__PURE__ */ jsx("td", { className: "ad-empty", colSpan: columns.length, children: empty }) }) })
116
118
  ] }) });
117
119
  }
118
120
  function Modal({ title, children, open, onClose, footer, closeLabel = "Close" }) {
119
121
  if (!open) return null;
120
- return /* @__PURE__ */ jsx("div", { className: "ad-modal-backdrop", onMouseDown: onClose, children: /* @__PURE__ */ jsxs("div", { className: "ad-modal", role: "dialog", "aria-modal": "true", "aria-label": title, onMouseDown: (e) => e.stopPropagation(), children: [
122
+ return /* @__PURE__ */ jsx("div", { className: "ad-modal-backdrop", onMouseDown: onClose, children: /* @__PURE__ */ jsxs("div", { className: "ad-modal", role: "dialog", "aria-modal": "true", "aria-label": title, onMouseDown: (event) => event.stopPropagation(), children: [
121
123
  /* @__PURE__ */ jsxs("div", { className: "ad-modal-head", children: [
122
124
  /* @__PURE__ */ jsx("strong", { children: title }),
123
125
  /* @__PURE__ */ jsx(IconButton, { icon: X, label: closeLabel, onClick: onClose })
@@ -127,8 +129,8 @@ function Modal({ title, children, open, onClose, footer, closeLabel = "Close" })
127
129
  ] }) });
128
130
  }
129
131
 
130
- // src/widgets/Shell.jsx
131
- import React2, { useEffect, useState as useState2 } from "react";
132
+ // src/widgets/Shell.tsx
133
+ import { useEffect, useState as useState2 } from "react";
132
134
  import { Bell, ChevronDown, ChevronRight, Download, Grid3X3, Search, Settings, UserRound } from "lucide-react";
133
135
  import { jsx as jsx2, jsxs as jsxs2 } from "react/jsx-runtime";
134
136
  var MAIN_SECTIONS = ["Dashboard", "Reports", "Configuration", "Admin", "Support"];
@@ -140,16 +142,18 @@ function TopNavigation({ sections = MAIN_SECTIONS, active = "Admin", onChange, a
140
142
  }) });
141
143
  }
142
144
  function ShellHeader({ brand = "ADSelfService Plus", brandIcon, showBrandOrbit = true, sections = MAIN_SECTIONS, navigationLabel = "Main navigation", activeSection = "Admin", onSectionChange, directories = ["Active Directory", "Microsoft Entra ID"], directory, defaultDirectory, onDirectoryChange, showDownload = true, downloadLabel = "Download Now", onDownload, utilityItems = ["License", "Talk Back"], showNotifications = true, notifications = 2, notificationLabel, onNotificationsClick, showUserMenu = true, userMenuLabel = "User menu", onUserClick, showSearch = true, searchPlaceholder = "Search Employee", searchLabel = "Search Employee", searchValue, onSearchChange, showSettings = true, settingsLabel = "Domain Settings", onSettingsClick, rightContent }) {
143
- const [localDirectory, setLocalDirectory] = useState2(defaultDirectory ?? directories[0]);
145
+ const initialDirectory = defaultDirectory ?? (typeof directories[0] === "string" ? directories[0] : directories[0]?.value);
146
+ const [localDirectory, setLocalDirectory] = useState2(initialDirectory);
144
147
  const [localSearch, setLocalSearch] = useState2("");
145
148
  const currentDirectory = directory ?? localDirectory;
146
149
  const directoryItem = directories.find((item) => (typeof item === "string" ? item : item.value) === currentDirectory);
147
150
  const currentDirectoryLabel = typeof directoryItem === "string" ? directoryItem : directoryItem?.label || currentDirectory;
148
151
  const currentSearch = searchValue ?? localSearch;
149
152
  const switchDirectory = () => {
153
+ if (!directories.length) return;
150
154
  const index = directories.findIndex((item) => (typeof item === "string" ? item : item.value) === currentDirectory);
151
155
  const next = directories[(index + 1) % directories.length];
152
- const value = typeof next === "string" ? next : next?.value;
156
+ const value = typeof next === "string" ? next : next.value;
153
157
  if (directory === void 0) setLocalDirectory(value);
154
158
  onDirectoryChange?.(value, next);
155
159
  };
@@ -245,8 +249,8 @@ function AdminShell({ groups = [], screen, onScreenChange, children, activeSecti
245
249
  return /* @__PURE__ */ jsx2(AppShell, { activeSection, onSectionChange, sidebar: sidebar || /* @__PURE__ */ jsx2(CollapsibleSidebar, { groups, selected: screen, onSelect: onScreenChange }), hideSidebar, mainClassName, ...shellProps, children });
246
250
  }
247
251
 
248
- // src/widgets/DashboardWidgets.jsx
249
- import React3, { useState as useState3 } from "react";
252
+ // src/widgets/DashboardWidgets.tsx
253
+ import { useState as useState3 } from "react";
250
254
  import { Clock3, UserRoundPlus, Files, AppWindow, Maximize2, MoreHorizontal, RefreshCw, Settings as Settings2, X as X2 } from "lucide-react";
251
255
  import { Fragment, jsx as jsx3, jsxs as jsxs3 } from "react/jsx-runtime";
252
256
  var DASHBOARD_METRICS = [
@@ -368,7 +372,7 @@ function DashboardToolbar({ domains = ["ADSELFSERVICE"], domain, defaultDomain,
368
372
  return /* @__PURE__ */ jsxs3("div", { className: "dash-toolbar", children: [
369
373
  /* @__PURE__ */ jsx3("label", { htmlFor: "dash-domain", children: domainLabel }),
370
374
  /* @__PURE__ */ jsx3("select", { id: "dash-domain", value: domain, defaultValue: domain === void 0 ? defaultDomain ?? (typeof domains[0] === "string" ? domains[0] : domains[0]?.value) : void 0, onChange: (event) => {
371
- const item = domains.map((raw) => typeof raw === "string" ? { value: raw, label: raw } : raw).find((option) => option.value === event.target.value);
375
+ const item = domains.find((option) => (typeof option === "string" ? option : option.value) === event.target.value);
372
376
  onDomainChange?.(event.target.value, item);
373
377
  }, children: domains.map((option) => {
374
378
  const item = typeof option === "string" ? { value: option, label: option } : option;
@@ -399,7 +403,7 @@ function DashboardLayout({ metrics, charts, shortcuts, showShortcuts = true }) {
399
403
  }
400
404
  function ExpandedWidget({ title, onClose, children, closeLabel = "Close expanded widget" }) {
401
405
  if (!title) return null;
402
- return /* @__PURE__ */ jsx3("div", { className: "dash-overlay", role: "presentation", onMouseDown: onClose, children: /* @__PURE__ */ jsxs3("div", { className: "dash-expanded", role: "dialog", "aria-modal": "true", "aria-label": title, onMouseDown: (e) => e.stopPropagation(), children: [
406
+ return /* @__PURE__ */ jsx3("div", { className: "dash-overlay", role: "presentation", onMouseDown: onClose, children: /* @__PURE__ */ jsxs3("div", { className: "dash-expanded", role: "dialog", "aria-modal": "true", "aria-label": title, onMouseDown: (event) => event.stopPropagation(), children: [
403
407
  /* @__PURE__ */ jsxs3("div", { className: "dash-expanded-heading", children: [
404
408
  /* @__PURE__ */ jsx3("strong", { children: title }),
405
409
  /* @__PURE__ */ jsx3("button", { type: "button", "aria-label": closeLabel, onClick: onClose, children: /* @__PURE__ */ jsx3(X2, { size: 18 }) })
@@ -408,8 +412,8 @@ function ExpandedWidget({ title, onClose, children, closeLabel = "Close expanded
408
412
  ] }) });
409
413
  }
410
414
 
411
- // src/widgets/ReportWidgets.jsx
412
- import React4, { useEffect as useEffect2, useMemo, useState as useState4 } from "react";
415
+ // src/widgets/ReportWidgets.tsx
416
+ import { useEffect as useEffect2, useMemo, useState as useState4 } from "react";
413
417
  import { AlarmClock, ChevronDown as ChevronDown2, ChevronRight as ChevronRight2, CircleHelp as CircleHelp2, Info as Info2, Search as Search2 } from "lucide-react";
414
418
  import { jsx as jsx4, jsxs as jsxs4 } from "react/jsx-runtime";
415
419
  var REPORT_GROUPS = [
@@ -431,9 +435,9 @@ function ReportNavigation({ groups = REPORT_GROUPS, selected, defaultSelected, o
431
435
  return /* @__PURE__ */ jsxs4("div", { className: "report-navigation", children: [
432
436
  /* @__PURE__ */ jsxs4("label", { className: "report-search", children: [
433
437
  /* @__PURE__ */ jsx4(Search2, { size: 15 }),
434
- /* @__PURE__ */ jsx4("input", { "aria-label": searchLabel, placeholder: searchPlaceholder, value: query, onChange: (e) => {
435
- setQuery(e.target.value);
436
- onSearchChange?.(e.target.value);
438
+ /* @__PURE__ */ jsx4("input", { "aria-label": searchLabel, placeholder: searchPlaceholder, value: query, onChange: (event) => {
439
+ setQuery(event.target.value);
440
+ onSearchChange?.(event.target.value);
437
441
  } })
438
442
  ] }),
439
443
  /* @__PURE__ */ jsx4("nav", { "aria-label": ariaLabel, children: visibleGroups.map((group) => /* @__PURE__ */ jsxs4("div", { children: [
@@ -458,13 +462,13 @@ function ReportCategoryBar({ groups = REPORT_GROUPS, selected, defaultSelected,
458
462
  group.label,
459
463
  /* @__PURE__ */ jsx4(ChevronDown2, { size: 10 })
460
464
  ] }),
461
- open === group.label && /* @__PURE__ */ jsx4("div", { className: "report-category-menu", children: group.items.map((raw, i) => {
465
+ open === group.label && /* @__PURE__ */ jsx4("div", { className: "report-category-menu", children: group.items.map((raw, index) => {
462
466
  const item = normalizeReport(raw);
463
467
  return /* @__PURE__ */ jsx4("button", { type: "button", className: currentSelected === item.id ? "is-active" : "", onClick: () => {
464
468
  if (selected === void 0) setLocalSelected(item.id);
465
469
  onSelect?.(item.id, item);
466
470
  setOpen("");
467
- }, children: item.label }, item.id ?? i);
471
+ }, children: item.label }, item.id ?? index);
468
472
  }) })
469
473
  ] }, group.id ?? group.label)) });
470
474
  }
@@ -477,7 +481,7 @@ function ReportFilters({ domains = ["ADSELFSERVICE"], domain, defaultDomain, onD
477
481
  /* @__PURE__ */ jsx4("label", { htmlFor: "report-domain", children: labels.domain || "Select Domain" }),
478
482
  /* @__PURE__ */ jsx4("select", { id: "report-domain", value: domain, defaultValue: domain === void 0 ? defaultDomain ?? (typeof domains[0] === "string" ? domains[0] : domains[0]?.value) : void 0, onChange: (event) => {
479
483
  const value = event.target.value;
480
- const item = domains.map((raw) => typeof raw === "string" ? { value: raw, label: raw } : raw).find((option) => option.value === value);
484
+ const item = domains.find((raw) => (typeof raw === "string" ? raw : raw.value) === value);
481
485
  onDomainChange?.(value, item);
482
486
  }, children: domains.map((raw) => {
483
487
  const item = typeof raw === "string" ? { value: raw, label: raw } : raw;
@@ -495,8 +499,8 @@ function ReportFilters({ domains = ["ADSELFSERVICE"], domain, defaultDomain, onD
495
499
  const item = typeof raw === "string" ? { value: raw, label: raw } : raw;
496
500
  return /* @__PURE__ */ jsxs4("label", { children: [
497
501
  /* @__PURE__ */ jsx4("input", { type: "radio", name: "report-ou", checked: selectedOu === item.value, onChange: () => {
498
- setLocalOu(item.value);
499
- onOuChange?.(item.value, item);
502
+ if (ou === void 0) setLocalOu(item.value);
503
+ onOuChange?.(item.value, raw);
500
504
  setOuOpen(false);
501
505
  } }),
502
506
  " ",
@@ -532,8 +536,8 @@ function ReportPageHeading({ title, onSchedule, scheduleLabel = "Schedule Report
532
536
  ] });
533
537
  }
534
538
 
535
- // src/widgets/ConfigurationWidgets.jsx
536
- import React5, { useState as useState5 } from "react";
539
+ // src/widgets/ConfigurationWidgets.tsx
540
+ import { useState as useState5 } from "react";
537
541
  import { ChevronDown as ChevronDown3, ChevronLeft, ChevronRight as ChevronRight3, ChevronsLeft, ChevronsRight, Copy, KeyRound, LockKeyhole, Pencil, Plus, Search as Search3, Settings as Settings3, Trash2, UserRoundPen } from "lucide-react";
538
542
  import { Fragment as Fragment2, jsx as jsx5, jsxs as jsxs5 } from "react/jsx-runtime";
539
543
  var CONFIG_GROUPS = [
@@ -657,8 +661,8 @@ function PolicyTable({ policies = DEMO_POLICIES, columns = POLICY_COLUMNS, defau
657
661
  ] }) });
658
662
  }
659
663
 
660
- // src/widgets/SettingsWidgets.jsx
661
- import React6, { useState as useState6 } from "react";
664
+ // src/widgets/SettingsWidgets.tsx
665
+ import { useState as useState6 } from "react";
662
666
  import { Fragment as Fragment3, jsx as jsx6, jsxs as jsxs6 } from "react/jsx-runtime";
663
667
  function Frame({ title, tabs, activeTab, defaultTab, onTabChange, children, action, help, className = "" }) {
664
668
  const [localTab, setLocalTab] = useState6(defaultTab ?? (typeof tabs?.[0] === "string" ? tabs[0] : tabs?.[0]?.id));
@@ -698,9 +702,747 @@ function InlineSelect({ options = [], initial, value, onChange, width, ...props
698
702
  return /* @__PURE__ */ jsx6("option", { value: item.value, children: item.label }, item.value);
699
703
  }) });
700
704
  }
705
+
706
+ // src/pages/DashboardPage.tsx
707
+ import { useState as useState7 } from "react";
708
+ import { Fragment as Fragment4, jsx as jsx7, jsxs as jsxs7 } from "react/jsx-runtime";
709
+ function DashboardPage({ metrics = DASHBOARD_METRICS, directoryData = DIRECTORY_REPORT_DATA, mfaData = MFA_REPORT_DATA, selfServiceData = SELF_SERVICE_REPORT_DATA, shortcuts = DASHBOARD_SHORTCUTS, domains, domain, onDomainChange, chartTitles = {}, chartProps = {}, widgetProps = {}, toolbarProps = {}, onMetricSelect, onReportSelect, onShortcutSelect, onToolbarAction, renderMetric, renderShortcuts }) {
710
+ const [showShortcuts, setShowShortcuts] = useState7(true);
711
+ const [expanded, setExpanded] = useState7(null);
712
+ const titles = { directory: "Active Directory Reports", mfa: "MFA Reports", selfService: "Password Self-Service Reports", ...chartTitles };
713
+ const reportAction = (key, id, item) => {
714
+ chartProps[key]?.onSelect?.(id, item);
715
+ onReportSelect?.(id, item);
716
+ };
717
+ const charts = {
718
+ directory: /* @__PURE__ */ jsx7(ActiveDirectoryChart, { ...chartProps.directory, data: directoryData, onSelect: (id, item) => reportAction("directory", id, item) }),
719
+ mfa: /* @__PURE__ */ jsx7(MfaChart, { ...chartProps.mfa, data: mfaData, onSelect: (id, item) => reportAction("mfa", id, item) }),
720
+ selfService: /* @__PURE__ */ jsx7(SelfServiceChart, { ...chartProps.selfService, data: selfServiceData, onSelect: (id, item) => reportAction("selfService", id, item) })
721
+ };
722
+ const frame = (key, className = "") => /* @__PURE__ */ jsx7(WidgetFrame, { ...widgetProps[key], title: titles[key], className: className || widgetProps[key]?.className, onExpand: () => {
723
+ widgetProps[key]?.onExpand?.();
724
+ setExpanded(key);
725
+ }, children: charts[key] });
726
+ return /* @__PURE__ */ jsxs7("div", { className: "dash-page", children: [
727
+ /* @__PURE__ */ jsx7(
728
+ DashboardToolbar,
729
+ {
730
+ ...toolbarProps,
731
+ domains: domains ?? toolbarProps.domains,
732
+ domain: domain ?? toolbarProps.domain,
733
+ onDomainChange: (value, item) => {
734
+ onDomainChange?.(value, item);
735
+ toolbarProps.onDomainChange?.(value, item);
736
+ },
737
+ showShortcuts,
738
+ onToggleShortcuts: () => {
739
+ setShowShortcuts(!showShortcuts);
740
+ toolbarProps.onToggleShortcuts?.(!showShortcuts);
741
+ },
742
+ onExpand: () => {
743
+ toolbarProps.onExpand?.();
744
+ setExpanded("directory");
745
+ },
746
+ onMenuAction: (id, item) => {
747
+ onToolbarAction?.(id, item);
748
+ toolbarProps.onMenuAction?.(id, item);
749
+ }
750
+ }
751
+ ),
752
+ /* @__PURE__ */ jsx7(
753
+ DashboardLayout,
754
+ {
755
+ showShortcuts,
756
+ metrics: metrics.map((item, index) => renderMetric ? renderMetric(item, index) : /* @__PURE__ */ jsx7(MetricWidget, { ...item, onClick: () => {
757
+ item.onClick?.(item);
758
+ onMetricSelect?.(item);
759
+ if (item.report !== void 0) onReportSelect?.(item.report, item);
760
+ } }, item.id ?? item.title ?? index)),
761
+ charts: /* @__PURE__ */ jsxs7(Fragment4, { children: [
762
+ frame("directory"),
763
+ frame("mfa"),
764
+ frame("selfService", "dash-wide-widget")
765
+ ] }),
766
+ shortcuts: renderShortcuts ? renderShortcuts(shortcuts) : /* @__PURE__ */ jsx7(ShortcutRail, { groups: shortcuts, onSelect: onShortcutSelect })
767
+ }
768
+ ),
769
+ /* @__PURE__ */ jsx7(ExpandedWidget, { title: expanded ? titles[expanded] : null, onClose: () => setExpanded(null), children: expanded ? charts[expanded] : null })
770
+ ] });
771
+ }
772
+
773
+ // src/pages/ReportsPage.tsx
774
+ import { useState as useState8 } from "react";
775
+ import { jsx as jsx8, jsxs as jsxs8 } from "react/jsx-runtime";
776
+ function ReportsPage({ groups = REPORT_GROUPS, selected, defaultSelected, onSelect, filtersProps = {}, labels = {}, status: controlledStatus, onGenerate, onStop, onSchedule, results }) {
777
+ const firstReport = groups[0]?.items[0] && normalizeReport(groups[0].items[0]);
778
+ const [localSelected, setLocalSelected] = useState8(defaultSelected ?? firstReport?.id);
779
+ const [localStatus, setLocalStatus] = useState8("empty");
780
+ const [showSchedule, setShowSchedule] = useState8(false);
781
+ const [localDomain, setLocalDomain] = useState8(filtersProps.defaultDomain ?? (typeof filtersProps.domains?.[0] === "string" ? filtersProps.domains[0] : filtersProps.domains?.[0]?.value) ?? "ADSELFSERVICE");
782
+ const [localOu, setLocalOu] = useState8(filtersProps.defaultOu ?? (typeof filtersProps.ouOptions?.[0] === "string" ? filtersProps.ouOptions[0] : filtersProps.ouOptions?.[0]?.value) ?? "All OU");
783
+ const currentSelected = selected ?? localSelected;
784
+ const report = groups.flatMap((group) => group.items.map(normalizeReport)).find((item) => item.id === currentSelected);
785
+ const title = report?.label || firstReport?.label || labels.untitled || "";
786
+ const status = controlledStatus ?? localStatus;
787
+ const domain = filtersProps.domain ?? localDomain;
788
+ const ou = filtersProps.ou ?? localOu;
789
+ const select = (id, item) => {
790
+ if (selected === void 0) setLocalSelected(id);
791
+ onSelect?.(id, item);
792
+ if (controlledStatus === void 0) setLocalStatus("empty");
793
+ };
794
+ const generate = () => {
795
+ if (onGenerate) onGenerate({ selected: currentSelected, report, domain, ou });
796
+ else {
797
+ setLocalStatus("loading");
798
+ window.setTimeout(() => setLocalStatus("empty"), 650);
799
+ }
800
+ };
801
+ const stop = () => {
802
+ onStop?.();
803
+ if (controlledStatus === void 0) setLocalStatus("empty");
804
+ };
805
+ return /* @__PURE__ */ jsxs8("div", { className: "reports-page", children: [
806
+ /* @__PURE__ */ jsx8(ReportCategoryBar, { groups, selected: currentSelected, onSelect: select }),
807
+ /* @__PURE__ */ jsxs8("div", { className: "report-page-body", children: [
808
+ /* @__PURE__ */ jsx8(ReportPageHeading, { title, scheduleLabel: labels.schedule, helpText: labels.help, onSchedule: () => {
809
+ onSchedule?.(report);
810
+ setShowSchedule(!showSchedule);
811
+ } }),
812
+ showSchedule && /* @__PURE__ */ jsx8("div", { className: "report-schedule-note", children: labels.scheduleNote || "Schedule Reports lets you automate delivery of generated reports." }),
813
+ /* @__PURE__ */ jsx8(ReportFilters, { ...filtersProps, domain, ou, onDomainChange: (value, item) => {
814
+ if (filtersProps.domain === void 0) setLocalDomain(value);
815
+ filtersProps.onDomainChange?.(value, item);
816
+ }, onOuChange: (value, item) => {
817
+ if (filtersProps.ou === void 0) setLocalOu(value);
818
+ filtersProps.onOuChange?.(value, item);
819
+ }, generating: status === "loading", onGenerate: generate, onStop: stop }),
820
+ results ?? /* @__PURE__ */ jsx8(ReportResults, { status, emptyMessage: labels.empty, loadingMessage: labels.loading })
821
+ ] })
822
+ ] });
823
+ }
824
+
825
+ // src/pages/ConfigurationPage.tsx
826
+ import { useState as useState9 } from "react";
827
+ import { Fragment as Fragment5, jsx as jsx9, jsxs as jsxs9 } from "react/jsx-runtime";
828
+ function ConfigurationPage({ selected, policyId = "policy", groups = CONFIG_GROUPS, policies, initialPolicies = DEMO_POLICIES, onPoliciesChange, features = POLICY_FEATURES, columns = POLICY_COLUMNS, labels = {}, defaultDomain = "ADSELFSERVICE", onSavePolicy, onDeletePolicy, onCopyPolicy, onFeatureSelect, createPolicy, renderSection, renderPolicyForm, headerProps = {}, featureProps = {}, toolbarProps = {}, tableProps = {} }) {
829
+ const [localPolicies, setLocalPolicies] = useState9(initialPolicies);
830
+ const [query, setQuery] = useState9("");
831
+ const [page, setPage] = useState9(1);
832
+ const [editor, setEditor] = useState9(null);
833
+ const [name, setName] = useState9("");
834
+ const currentSelected = selected ?? policyId;
835
+ const currentPolicies = policies ?? localPolicies;
836
+ const update = (next) => {
837
+ if (policies === void 0) setLocalPolicies(next);
838
+ onPoliciesChange?.(next);
839
+ };
840
+ const item = groups.flatMap((group) => group.items).find((entry) => entry.id === currentSelected);
841
+ const title = item?.label || labels.title || "Policy Configuration";
842
+ const filtered = currentPolicies.filter((policy) => String(policy.name || "").toLowerCase().includes(query.toLowerCase()));
843
+ const pageSize = Math.max(1, toolbarProps.pageSize ?? 25);
844
+ const currentPage = Math.min(page, Math.max(1, Math.ceil(filtered.length / pageSize)));
845
+ const visiblePolicies = filtered.slice((currentPage - 1) * pageSize, currentPage * pageSize);
846
+ const openEditor = (policy) => {
847
+ setEditor(policy || { name: "" });
848
+ setName(policy?.name || "");
849
+ };
850
+ const savePolicy = () => {
851
+ if (!editor || !name.trim()) return;
852
+ const nextPolicy = editor.name ? { ...editor, name: name.trim() } : createPolicy ? createPolicy(name.trim()) : { name: name.trim(), permissions: "", domain: defaultDomain, modifiedBy: "", modified: "" };
853
+ const next = editor.name ? currentPolicies.map((policy) => policy === editor ? nextPolicy : policy) : [...currentPolicies, nextPolicy];
854
+ update(next);
855
+ onSavePolicy?.(nextPolicy, editor);
856
+ setEditor(null);
857
+ };
858
+ const removePolicy = (policy) => {
859
+ update(currentPolicies.filter((item2) => item2 !== policy));
860
+ onDeletePolicy?.(policy);
861
+ };
862
+ const copyPolicy = (policy) => {
863
+ const copy = { ...policy, name: `${policy.name} ${labels.copySuffix || "Copy"}` };
864
+ update([...currentPolicies, copy]);
865
+ onCopyPolicy?.(copy, policy);
866
+ };
867
+ const otherSection = renderSection?.(currentSelected, item);
868
+ return /* @__PURE__ */ jsxs9("div", { className: "config-page", children: [
869
+ /* @__PURE__ */ jsx9(ConfigurationHeader, { title, ...headerProps }),
870
+ currentSelected === policyId ? /* @__PURE__ */ jsxs9(Fragment5, { children: [
871
+ /* @__PURE__ */ jsx9(PolicyFeatureStrip, { ...featureProps, title: labels.featuresTitle ?? featureProps.title, instruction: labels.instruction ?? featureProps.instruction, features, onFeatureSelect: (id, feature) => {
872
+ onFeatureSelect?.(id, feature);
873
+ featureProps.onFeatureSelect?.(id, feature);
874
+ } }),
875
+ /* @__PURE__ */ jsx9(PolicyToolbar, { ...toolbarProps, title: labels.policiesTitle || toolbarProps.title, addLabel: labels.add || toolbarProps.addLabel, count: filtered.length, page: currentPage, onPageChange: (next) => {
876
+ setPage(next);
877
+ toolbarProps.onPageChange?.(next);
878
+ }, query, onQueryChange: (value) => {
879
+ setQuery(value);
880
+ setPage(1);
881
+ toolbarProps.onQueryChange?.(value);
882
+ }, onAdd: () => {
883
+ openEditor();
884
+ toolbarProps.onAdd?.();
885
+ } }),
886
+ /* @__PURE__ */ jsx9(PolicyTable, { ...tableProps, policies: visiblePolicies, columns, defaultDomain, onEdit: (policy) => {
887
+ openEditor(policy);
888
+ tableProps.onEdit?.(policy);
889
+ }, onDelete: (policy) => {
890
+ removePolicy(policy);
891
+ tableProps.onDelete?.(policy);
892
+ }, onCopy: (policy) => {
893
+ copyPolicy(policy);
894
+ tableProps.onCopy?.(policy);
895
+ } })
896
+ ] }) : otherSection !== void 0 ? otherSection : /* @__PURE__ */ jsxs9(Panel, { className: "config-detail-panel", children: [
897
+ /* @__PURE__ */ jsx9("h2", { children: title }),
898
+ /* @__PURE__ */ jsx9(FormRow, { label: labels.domain || "Select Domain", children: /* @__PURE__ */ jsx9("select", { className: "ad-select", defaultValue: defaultDomain, children: /* @__PURE__ */ jsx9("option", { children: defaultDomain }) }) }),
899
+ /* @__PURE__ */ jsxs9(CheckRow, { children: [
900
+ labels.enable || "Enable",
901
+ " ",
902
+ title
903
+ ] }),
904
+ /* @__PURE__ */ jsx9("p", { children: labels.sectionDescription?.(title) || `Configure ${title.toLowerCase()} for the selected domain.` })
905
+ ] }),
906
+ /* @__PURE__ */ jsx9(Modal, { title: editor?.name ? labels.editTitle || "Edit Policy" : labels.addTitle || "Add New Policy", open: !!editor, onClose: () => setEditor(null), footer: /* @__PURE__ */ jsxs9(Fragment5, { children: [
907
+ /* @__PURE__ */ jsx9(Button, { onClick: () => setEditor(null), children: labels.cancel || "Cancel" }),
908
+ /* @__PURE__ */ jsx9(Button, { variant: "primary", onClick: savePolicy, children: labels.save || "Save" })
909
+ ] }), children: renderPolicyForm ? renderPolicyForm({ policy: editor, name, setName }) : /* @__PURE__ */ jsx9(TextField, { label: labels.policyName || "Policy Name", value: name, onChange: (event) => setName(event.target.value) }) })
910
+ ] });
911
+ }
912
+
913
+ // src/admin/screens.jsx
914
+ import React, { useState as useState10 } from "react";
915
+ import { ArrowRight, Database, LaptopMinimal, Network, Server } from "lucide-react";
916
+ import { Fragment as Fragment6, jsx as jsx10, jsxs as jsxs10 } from "react/jsx-runtime";
917
+ var ADMIN_GROUPS = [
918
+ { label: "Customize", items: [{ id: "login", label: "Login Settings" }, { id: "personalize", label: "Personalize" }] },
919
+ { label: "Enterprise Essentials", items: [{ id: "failover", label: "Failover and Secure Gateway" }, { id: "reverse", label: "Reverse Proxy" }] },
920
+ { label: "Product Settings", items: [{ id: "connection", label: "Connection" }, { id: "mail", label: "Mail / SMS Settings" }, { id: "dashboard", label: "Dashboard Updater" }, { id: "backup", label: "Backup Settings" }, { id: "site", label: "Site Based DC Updater" }, { id: "integration", label: "Integration Settings" }, { id: "windows", label: "Windows Service" }, { id: "security", label: "Security and Privacy" }] },
921
+ { label: "License Management", items: [{ id: "restrict", label: "Restrict Users" }] }
922
+ ];
923
+ function RowLink({ children, onClick }) {
924
+ return /* @__PURE__ */ jsx10(TextLink, { onClick, children });
925
+ }
926
+ function LoginSettings() {
927
+ const [modal, setModal] = useState10("");
928
+ const modalItems = modal === "Manage Custom Attributes" ? ["First Name", "Last Name", "Display Name", "Mail Address", "Mobile Number"] : ["ADSELFSERVICE", "Microsoft Entra ID"];
929
+ return /* @__PURE__ */ jsxs10(Fragment6, { children: [
930
+ /* @__PURE__ */ jsx10(Frame, { title: "Login Settings", help: "Configure administrator and directory user login behavior", action: /* @__PURE__ */ jsx10(Button, { onClick: () => setModal("Manage Custom Attributes"), children: "Manage Custom Attributes" }), tabs: ["General", "Single Sign-On", "Smart Card Authentication"], children: (active) => active === "General" ? /* @__PURE__ */ jsxs10(Fragment6, { children: [
931
+ /* @__PURE__ */ jsx10(SectionTitle, { children: "Login Settings" }),
932
+ /* @__PURE__ */ jsxs10("div", { className: "ad-option-list", children: [
933
+ /* @__PURE__ */ jsx10(CheckRow, { help: "Hides the administrator option on the self-service login page", children: "Hide self-service admin login" }),
934
+ /* @__PURE__ */ jsxs10("div", { className: "ad-option-inline", children: [
935
+ /* @__PURE__ */ jsx10(CheckRow, { disabled: true, children: "Allow/Restrict admin portal access based on IP addresses." }),
936
+ /* @__PURE__ */ jsx10(RowLink, { onClick: () => setModal("Configure IP addresses"), children: "Configure now" })
937
+ ] }),
938
+ /* @__PURE__ */ jsxs10("div", { className: "ad-option-inline", children: [
939
+ /* @__PURE__ */ jsx10(CheckRow, { defaultChecked: true, children: "Show the directory selection drop-down menu in the web portal's login page." }),
940
+ /* @__PURE__ */ jsx10(RowLink, { onClick: () => setModal("Configure Directory List"), children: "Configure Directory List" })
941
+ ] }),
942
+ /* @__PURE__ */ jsxs10("div", { className: "ad-option-inline", children: [
943
+ /* @__PURE__ */ jsx10(CheckRow, { defaultChecked: true, children: "Show the directory selection drop-down menu in the mobile app and mobile portal login screen." }),
944
+ /* @__PURE__ */ jsx10(RowLink, { onClick: () => setModal("Configure Directory List"), children: "Configure Directory List" })
945
+ ] }),
946
+ /* @__PURE__ */ jsxs10("div", { className: "ad-option-inline", children: [
947
+ /* @__PURE__ */ jsx10(CheckRow, { help: "Permit configured attributes as alternate login identifiers", children: "Enable other unique attributes to log in to the product." }),
948
+ /* @__PURE__ */ jsx10(RowLink, { onClick: () => setModal("Select attribute list"), children: "Select attribute list" })
949
+ ] }),
950
+ /* @__PURE__ */ jsxs10("div", { className: "ad-option-inline", children: [
951
+ /* @__PURE__ */ jsx10(CheckRow, { children: "Enable user disclaimer" }),
952
+ /* @__PURE__ */ jsx10(RowLink, { onClick: () => setModal("Customize disclaimer"), children: "Customize" })
953
+ ] }),
954
+ /* @__PURE__ */ jsxs10("div", { className: "ad-option-inline", children: [
955
+ /* @__PURE__ */ jsx10(CheckRow, { children: "Prevent hackers from finding out valid users." }),
956
+ /* @__PURE__ */ jsx10(RowLink, { onClick: () => setModal("Configure user protection"), children: "Configure" }),
957
+ /* @__PURE__ */ jsx10(HelpTip, { text: "Use the same message for valid and invalid usernames" })
958
+ ] })
959
+ ] }),
960
+ /* @__PURE__ */ jsx10(SectionTitle, { children: "CAPTCHA settings" }),
961
+ /* @__PURE__ */ jsxs10("div", { className: "ad-option-list", children: [
962
+ /* @__PURE__ */ jsxs10("div", { className: "ad-option-inline", children: [
963
+ /* @__PURE__ */ jsx10(CheckRow, { children: "Show CAPTCHA (word verification image) on login page." }),
964
+ /* @__PURE__ */ jsx10(RowLink, { onClick: () => setModal("CAPTCHA settings"), children: "CAPTCHA settings" })
965
+ ] }),
966
+ /* @__PURE__ */ jsxs10("div", { className: "ad-indent", children: [
967
+ /* @__PURE__ */ jsxs10(CheckRow, { disabled: true, children: [
968
+ "On ",
969
+ /* @__PURE__ */ jsx10("em", { children: "Admin" }),
970
+ " & ",
971
+ /* @__PURE__ */ jsx10("em", { children: "Directory User" }),
972
+ " login page."
973
+ ] }),
974
+ /* @__PURE__ */ jsxs10(CheckRow, { disabled: true, children: [
975
+ "On ",
976
+ /* @__PURE__ */ jsx10("em", { children: "Reset Password" }),
977
+ " & ",
978
+ /* @__PURE__ */ jsx10("em", { children: "Unlock Account" }),
979
+ " login page."
980
+ ] })
981
+ ] }),
982
+ /* @__PURE__ */ jsx10(CheckRow, { help: "Enable an audio alternative for the CAPTCHA", children: "Enable audio CAPTCHA." })
983
+ ] }),
984
+ /* @__PURE__ */ jsx10(SectionTitle, { children: "Other Settings" }),
985
+ /* @__PURE__ */ jsxs10("div", { className: "ad-option-list", children: [
986
+ /* @__PURE__ */ jsxs10(CheckRow, { children: [
987
+ "Hide ",
988
+ /* @__PURE__ */ jsx10("em", { children: "Help" }),
989
+ " button on end users page"
990
+ ] }),
991
+ /* @__PURE__ */ jsxs10(CheckRow, { children: [
992
+ "Hide ",
993
+ /* @__PURE__ */ jsx10("em", { children: "Mobile Access" }),
994
+ " button on end users page"
995
+ ] })
996
+ ] }),
997
+ /* @__PURE__ */ jsxs10("div", { className: "ad-tail-link", children: [
998
+ /* @__PURE__ */ jsx10(RowLink, { onClick: () => setModal("Customize HTML"), children: "Customize" }),
999
+ " end user login page completely as HTML"
1000
+ ] }),
1001
+ /* @__PURE__ */ jsx10(SaveBar, {})
1002
+ ] }) : active === "Single Sign-On" ? /* @__PURE__ */ jsxs10(Fragment6, { children: [
1003
+ /* @__PURE__ */ jsxs10("div", { className: "ad-option-list", children: [
1004
+ /* @__PURE__ */ jsx10(CheckRow, { children: /* @__PURE__ */ jsx10("strong", { children: "Enable SSO" }) }),
1005
+ /* @__PURE__ */ jsx10(RadioRow, { name: "sso", value: "SAML", disabled: true, children: "SAML Authentication" }),
1006
+ /* @__PURE__ */ jsx10(RadioRow, { name: "sso", value: "NTLM", checked: true, disabled: true, children: "NTLM Authentication" })
1007
+ ] }),
1008
+ /* @__PURE__ */ jsxs10(Notice, { children: [
1009
+ "To complete the NTLM SSO configuration, download the latest Jespa JAR file, add it to the /lib folder, and restart ADSelfService Plus. ",
1010
+ /* @__PURE__ */ jsx10(TextLink, { children: "Learn More" })
1011
+ ] }),
1012
+ /* @__PURE__ */ jsx10(DataTable, { columns: ["", "Domain Name", "Computer Account", "Status"], rows: [[/* @__PURE__ */ jsx10(CheckRow, {}), "ADSELFSERVICE", "-", /* @__PURE__ */ jsx10(TextLink, { onClick: () => setModal("Configure SSO"), children: "Configure now" })]] }),
1013
+ /* @__PURE__ */ jsx10(SaveBar, { cancel: false })
1014
+ ] }) : /* @__PURE__ */ jsxs10(Fragment6, { children: [
1015
+ /* @__PURE__ */ jsxs10("div", { className: "ad-form-block", children: [
1016
+ /* @__PURE__ */ jsx10(FormRow, { label: "Import CA Root Certificate", children: /* @__PURE__ */ jsx10("input", { type: "file", "aria-label": "Choose certificate file" }) }),
1017
+ /* @__PURE__ */ jsx10(FormRow, { label: "Mapping Attribute in Certificate", children: /* @__PURE__ */ jsx10(InlineSelect, { options: ["SAN.OtherName", "Subject", "SAN.Email"] }) }),
1018
+ /* @__PURE__ */ jsx10(FormRow, { label: "Mapping Attribute in AD", children: /* @__PURE__ */ jsx10(InlineSelect, { options: ["userPrincipalName", "sAMAccountName", "mail"] }) }),
1019
+ /* @__PURE__ */ jsx10(FormRow, { label: "Linked Domains", children: /* @__PURE__ */ jsx10("input", { className: "ad-input", disabled: true, defaultValue: "adselfservice.com" }) }),
1020
+ /* @__PURE__ */ jsx10(SaveBar, {})
1021
+ ] }),
1022
+ /* @__PURE__ */ jsx10(Notice, { tone: "warning", children: "You must restart ADSelfService Plus for the changes to take effect. Smart Card Authentication is supported only for users in Active Directory." })
1023
+ ] }) }),
1024
+ /* @__PURE__ */ jsx10(Modal, { title: modal, open: !!modal, onClose: () => setModal(""), footer: /* @__PURE__ */ jsxs10(Fragment6, { children: [
1025
+ /* @__PURE__ */ jsx10(Button, { onClick: () => setModal(""), children: "Cancel" }),
1026
+ /* @__PURE__ */ jsx10(Button, { variant: "primary", onClick: () => setModal(""), children: "Done" })
1027
+ ] }), children: modal === "Configure IP addresses" ? /* @__PURE__ */ jsx10(TextField, { label: "Allowed IP address or range", placeholder: "192.168.1.0/24" }) : modal === "Customize disclaimer" || modal === "Customize HTML" ? /* @__PURE__ */ jsx10("textarea", { className: "ad-textarea", rows: "6", "aria-label": "Custom content" }) : /* @__PURE__ */ jsx10("div", { className: "ad-modal-options", children: modalItems.map((item) => /* @__PURE__ */ jsx10(CheckRow, { defaultChecked: true, children: item }, item)) }) })
1028
+ ] });
1029
+ }
1030
+ function Personalize() {
1031
+ return /* @__PURE__ */ jsx10(Frame, { title: "Personalize Settings", tabs: ["Display Settings", "Portal Rebranding", "Mobile Rebranding", "Change Password", "Language Customization"], children: (active) => active === "Display Settings" ? /* @__PURE__ */ jsxs10("div", { className: "ad-form-block", children: [
1032
+ /* @__PURE__ */ jsx10(FormRow, { label: "Choose Language", children: /* @__PURE__ */ jsx10(InlineSelect, { options: ["Browser Default", "English", "Japanese", "Spanish", "German", "French"] }) }),
1033
+ /* @__PURE__ */ jsx10(FormRow, { label: "Choose AD Welcome Name", children: /* @__PURE__ */ jsx10(InlineSelect, { options: ["SamAccountName", "UserPrincipalName", "DisplayName", "FirstName", "LastName"] }) }),
1034
+ /* @__PURE__ */ jsx10(FormRow, { label: "Choose Entra ID Welcome Name", children: /* @__PURE__ */ jsx10(InlineSelect, { options: ["UserPrincipalName", "DisplayName", "FirstName", "Mail Address"] }) }),
1035
+ /* @__PURE__ */ jsx10(FormRow, { label: "Time Format", children: /* @__PURE__ */ jsx10(InlineSelect, { options: ["02:45 PM", "14:45", "14:45:00"] }) }),
1036
+ /* @__PURE__ */ jsx10(FormRow, { label: "Date Format", children: /* @__PURE__ */ jsx10(InlineSelect, { options: ["2016/08/15 (yyyy/MM/dd)", "08/15/2016 (MM/dd/yyyy)", "15-08-2016 (dd-MM-yyyy)"], width: 230 }) }),
1037
+ /* @__PURE__ */ jsx10(FormRow, { label: "Time Zone", children: /* @__PURE__ */ jsx10(InlineSelect, { options: ["(GMT -8:00) Pacific Daylight Time(America/Los_Angeles)", "(GMT +5:30) India Standard Time(Asia/Kolkata)", "(GMT 00:00) UTC"], width: 355 }) }),
1038
+ /* @__PURE__ */ jsx10(SaveBar, { cancelLabel: "Restore" })
1039
+ ] }) : active === "Portal Rebranding" ? /* @__PURE__ */ jsxs10(Fragment6, { children: [
1040
+ /* @__PURE__ */ jsx10(SectionTitle, { children: "General Customization" }),
1041
+ /* @__PURE__ */ jsx10(FormRow, { label: "Choose Theme Color", children: /* @__PURE__ */ jsx10(InlineSelect, { options: ["Dark Gray", "Blue", "Green"] }) }),
1042
+ /* @__PURE__ */ jsx10(FormRow, { label: "Browser Title", children: /* @__PURE__ */ jsx10(TextField, { defaultValue: "ADSelfService Plus" }) }),
1043
+ /* @__PURE__ */ jsx10(FormRow, { label: "Browser Title Image", hint: "Preferred image format is .ico", children: /* @__PURE__ */ jsx10("input", { type: "file", accept: ".ico" }) }),
1044
+ /* @__PURE__ */ jsx10(FormRow, { label: "Change Logo", hint: "Dimension: 200 x 50, Size 2MB", children: /* @__PURE__ */ jsx10("input", { type: "file", accept: "image/*" }) }),
1045
+ /* @__PURE__ */ jsx10(SectionTitle, { children: "Login Customization" }),
1046
+ /* @__PURE__ */ jsx10(FormRow, { label: "Customize Login Page Buttons", children: /* @__PURE__ */ jsxs10("div", { className: "ad-option-list", children: [
1047
+ /* @__PURE__ */ jsx10(CheckRow, { defaultChecked: true, children: "Log In" }),
1048
+ /* @__PURE__ */ jsx10(CheckRow, { defaultChecked: true, children: "Forgot your password?" }),
1049
+ /* @__PURE__ */ jsx10(CheckRow, { defaultChecked: true, children: "Account locked out?" })
1050
+ ] }) }),
1051
+ /* @__PURE__ */ jsx10(FormRow, { label: "Login Screen Background Image", hint: "Dimension: 1300 x 700, Size 2MB", children: /* @__PURE__ */ jsx10("input", { type: "file", accept: "image/*" }) }),
1052
+ /* @__PURE__ */ jsx10(SaveBar, { cancelLabel: "Restore" })
1053
+ ] }) : active === "Mobile Rebranding" ? /* @__PURE__ */ jsxs10(Fragment6, { children: [
1054
+ /* @__PURE__ */ jsx10(FormRow, { label: "Change Logo", hint: "Dimension 1000x400 - Size 2 MB", children: /* @__PURE__ */ jsx10("input", { type: "file", accept: "image/*" }) }),
1055
+ /* @__PURE__ */ jsx10(SectionTitle, { children: "Customize Home Screen" }),
1056
+ /* @__PURE__ */ jsx10("div", { className: "ad-option-list", children: ["Password Reset", "Account Unlock", "Change Password", "Server Settings", "Login", "Help", "Feedback"].map((item) => /* @__PURE__ */ jsx10(CheckRow, { defaultChecked: item !== "Change Password", children: item }, item)) }),
1057
+ /* @__PURE__ */ jsx10(CheckRow, { children: "Restrict Mobile Access" }),
1058
+ /* @__PURE__ */ jsxs10("div", { className: "ad-indent", children: [
1059
+ /* @__PURE__ */ jsx10(CheckRow, { disabled: true, children: "Restrict Mobile site access" }),
1060
+ /* @__PURE__ */ jsx10(CheckRow, { disabled: true, children: "Restrict Mobile app (iOS/android) access" })
1061
+ ] }),
1062
+ /* @__PURE__ */ jsx10(CheckRow, { children: "Remember login in mobile app for auto login." }),
1063
+ /* @__PURE__ */ jsx10(SectionTitle, { children: "Advanced" }),
1064
+ /* @__PURE__ */ jsx10("div", { className: "ad-spaced", children: /* @__PURE__ */ jsx10(Button, { children: "Preview" }) }),
1065
+ /* @__PURE__ */ jsx10(SaveBar, { cancelLabel: "Restore" })
1066
+ ] }) : active === "Change Password" ? /* @__PURE__ */ jsxs10(Fragment6, { children: [
1067
+ /* @__PURE__ */ jsxs10("div", { className: "ad-form-block", children: [
1068
+ /* @__PURE__ */ jsx10(FormRow, { label: "Old Password", required: true, children: /* @__PURE__ */ jsx10(TextField, { type: "password" }) }),
1069
+ /* @__PURE__ */ jsx10(FormRow, { label: "New Password", required: true, children: /* @__PURE__ */ jsx10(TextField, { type: "password" }) }),
1070
+ /* @__PURE__ */ jsx10(FormRow, { label: "Confirm New Password", required: true, children: /* @__PURE__ */ jsx10(TextField, { type: "password" }) })
1071
+ ] }),
1072
+ /* @__PURE__ */ jsxs10("ul", { className: "ad-password-rules", children: [
1073
+ /* @__PURE__ */ jsx10("li", { children: "Minimum length should be at least 8" }),
1074
+ /* @__PURE__ */ jsx10("li", { children: "Number of special characters to include 2" }),
1075
+ /* @__PURE__ */ jsx10("li", { children: "Must contain at least 1 upper case character" }),
1076
+ /* @__PURE__ */ jsx10("li", { children: "Number of numerals to include 1" }),
1077
+ /* @__PURE__ */ jsx10("li", { children: "Must not be a palindrome" })
1078
+ ] }),
1079
+ /* @__PURE__ */ jsx10(SaveBar, { saveLabel: "Change Password" })
1080
+ ] }) : /* @__PURE__ */ jsxs10(Fragment6, { children: [
1081
+ /* @__PURE__ */ jsx10(Notice, { children: "Personalize ADSelfService Plus by modifying text displayed in its web interface. Retain curly braces in sentences that contain them, then reload the web console to view changes." }),
1082
+ /* @__PURE__ */ jsx10(FormRow, { label: "Select Language", children: /* @__PURE__ */ jsx10(InlineSelect, { options: ["English", "Japanese", "Chinese-Simplified", "Spanish", "German", "French"] }) }),
1083
+ /* @__PURE__ */ jsxs10("div", { className: "ad-language-toolbar", children: [
1084
+ /* @__PURE__ */ jsx10(TextField, { placeholder: "Enter text to search" }),
1085
+ /* @__PURE__ */ jsx10(Button, { children: "Find & Replace" }),
1086
+ /* @__PURE__ */ jsx10("span", { children: "1 - 25 of 18324" })
1087
+ ] }),
1088
+ /* @__PURE__ */ jsx10(DataTable, { columns: ["Text", "Action"], rows: ["Force Enrollment using Logon Script", "Mandatory fields cannot be left empty.", "Logon Hours", "Modules", "Trusted IPs", "Embed Widget", "Active Directory account unlock failed.", "Successfully changed the password"].map((text) => [text, /* @__PURE__ */ jsx10(TextLink, { children: "Modify" })]) })
1089
+ ] }) });
1090
+ }
1091
+ function Failover() {
1092
+ const [mode, setMode] = useState10("Load Balancing");
1093
+ const [open, setOpen] = useState10(false);
1094
+ return /* @__PURE__ */ jsxs10(Fragment6, { children: [
1095
+ /* @__PURE__ */ jsx10(PageHeader, { title: "Failover and Secure Gateway", action: /* @__PURE__ */ jsx10(Button, { variant: "outline", onClick: () => setOpen(true), children: "How to configure?" }) }),
1096
+ /* @__PURE__ */ jsx10(Panel, { className: "ad-architecture-panel", children: /* @__PURE__ */ jsxs10("div", { className: "ad-architecture", children: [
1097
+ /* @__PURE__ */ jsx10("h3", { children: "Load Balancer Architecture" }),
1098
+ /* @__PURE__ */ jsx10(Tabs, { tabs: ["Load Balancing", "Failover"], active: mode, onChange: setMode }),
1099
+ /* @__PURE__ */ jsxs10("div", { className: "ad-architecture-diagram", children: [
1100
+ /* @__PURE__ */ jsxs10("div", { className: "ad-architecture-node", children: [
1101
+ /* @__PURE__ */ jsx10(LaptopMinimal, { size: 48 }),
1102
+ /* @__PURE__ */ jsx10("span", { children: "Web Interface" })
1103
+ ] }),
1104
+ /* @__PURE__ */ jsx10(ArrowRight, { size: 23 }),
1105
+ /* @__PURE__ */ jsxs10("div", { className: "ad-architecture-node", children: [
1106
+ /* @__PURE__ */ jsx10(Network, { size: 48 }),
1107
+ /* @__PURE__ */ jsx10("span", { children: "Virtual IP/Hostname" })
1108
+ ] }),
1109
+ /* @__PURE__ */ jsx10(ArrowRight, { size: 23 }),
1110
+ /* @__PURE__ */ jsxs10("div", { className: "ad-server-stack", children: [
1111
+ /* @__PURE__ */ jsxs10("div", { className: "ad-architecture-node", children: [
1112
+ /* @__PURE__ */ jsx10(Server, { size: 45 }),
1113
+ /* @__PURE__ */ jsx10("small", { children: "Primary" })
1114
+ ] }),
1115
+ /* @__PURE__ */ jsxs10("div", { className: "ad-architecture-node", children: [
1116
+ /* @__PURE__ */ jsx10(Server, { size: 45 }),
1117
+ /* @__PURE__ */ jsx10("small", { children: "Secondary" })
1118
+ ] }),
1119
+ /* @__PURE__ */ jsx10("span", { children: "ADSelfService Plus Servers" })
1120
+ ] }),
1121
+ /* @__PURE__ */ jsx10(ArrowRight, { size: 23 }),
1122
+ /* @__PURE__ */ jsxs10("div", { className: "ad-architecture-node", children: [
1123
+ /* @__PURE__ */ jsx10(Database, { size: 48 }),
1124
+ /* @__PURE__ */ jsx10("span", { children: "ADSelfService Plus Database" })
1125
+ ] })
1126
+ ] })
1127
+ ] }) }),
1128
+ /* @__PURE__ */ jsx10("div", { className: "ad-configure-action", children: /* @__PURE__ */ jsx10(Button, { variant: "primary", onClick: () => setOpen(true), children: "Click to Configure" }) }),
1129
+ /* @__PURE__ */ jsxs10(Modal, { title: `${mode} Configuration`, open, onClose: () => setOpen(false), footer: /* @__PURE__ */ jsx10(Button, { variant: "primary", onClick: () => setOpen(false), children: "Close" }), children: [
1130
+ /* @__PURE__ */ jsxs10(Notice, { children: [
1131
+ "Specify the access URL and server details to configure ",
1132
+ mode.toLowerCase(),
1133
+ "."
1134
+ ] }),
1135
+ /* @__PURE__ */ jsx10(TextField, { label: "Access URL", placeholder: "https://adselfservice.example.com" })
1136
+ ] })
1137
+ ] });
1138
+ }
1139
+ function ReverseProxy() {
1140
+ return /* @__PURE__ */ jsxs10(Frame, { title: "Reverse Proxy", children: [
1141
+ /* @__PURE__ */ jsxs10("div", { className: "ad-proxy", children: [
1142
+ /* @__PURE__ */ jsx10("strong", { children: "Context Based" }),
1143
+ /* @__PURE__ */ jsxs10("dl", { children: [
1144
+ /* @__PURE__ */ jsx10("dt", { children: "Protocol" }),
1145
+ /* @__PURE__ */ jsx10("dd", { children: "HTTPS" }),
1146
+ /* @__PURE__ */ jsx10("dt", { children: "Port" }),
1147
+ /* @__PURE__ */ jsx10("dd", { children: "443" }),
1148
+ /* @__PURE__ */ jsx10("dt", { children: "Context" }),
1149
+ /* @__PURE__ */ jsx10("dd", { children: "adssp" }),
1150
+ /* @__PURE__ */ jsx10("dt", { children: "Access URL" }),
1151
+ /* @__PURE__ */ jsx10("dd", { children: "https://WIN-6VQ61ODR35T:443/adssp" }),
1152
+ /* @__PURE__ */ jsx10("dt", { children: "Target URL" }),
1153
+ /* @__PURE__ */ jsx10("dd", { children: "https://ADSSPDEMO1:443" })
1154
+ ] })
1155
+ ] }),
1156
+ /* @__PURE__ */ jsx10(Notice, { tone: "warning", children: "To modify reverse proxy details, navigate to AD360 > Admin > Administration > Reverse Proxy." })
1157
+ ] });
1158
+ }
1159
+ function Connection() {
1160
+ const [port, setPort] = useState10("https");
1161
+ return /* @__PURE__ */ jsx10(Frame, { title: "Connection Settings", action: /* @__PURE__ */ jsx10(TextLink, { children: "Configure Access URL" }), tabs: ["Connection Settings", "Proxy Settings", "General Settings"], children: (active) => active === "Connection Settings" ? /* @__PURE__ */ jsxs10(Fragment6, { children: [
1162
+ /* @__PURE__ */ jsxs10("div", { className: "ad-form-block", children: [
1163
+ /* @__PURE__ */ jsxs10(FormRow, { label: "ADSelfService Plus Port [http]", children: [
1164
+ /* @__PURE__ */ jsx10(RadioRow, { name: "port", value: "http", checked: port === "http", onChange: setPort }),
1165
+ /* @__PURE__ */ jsx10("input", { className: "ad-input ad-short", defaultValue: "8888", disabled: port !== "http" })
1166
+ ] }),
1167
+ /* @__PURE__ */ jsxs10(FormRow, { label: "ADSelfService Plus Port [https]", children: [
1168
+ /* @__PURE__ */ jsx10(RadioRow, { name: "port", value: "https", checked: port === "https", onChange: setPort }),
1169
+ /* @__PURE__ */ jsx10("input", { className: "ad-input ad-short", defaultValue: "443", disabled: port !== "https" }),
1170
+ /* @__PURE__ */ jsx10(TextLink, { children: "Apply SSL Certificate" })
1171
+ ] }),
1172
+ /* @__PURE__ */ jsxs10(FormRow, { label: "Encrypt Keystore Password", children: [
1173
+ /* @__PURE__ */ jsx10(CheckRow, {}),
1174
+ /* @__PURE__ */ jsx10("input", { className: "ad-input", disabled: true, type: "password" })
1175
+ ] }),
1176
+ /* @__PURE__ */ jsx10(FormRow, { label: "", children: /* @__PURE__ */ jsx10(CheckRow, { children: "Use LDAP SSL(LDAPS)" }) }),
1177
+ /* @__PURE__ */ jsx10(FormRow, { label: "", children: /* @__PURE__ */ jsx10(TextLink, { children: "Advanced Settings" }) })
1178
+ ] }),
1179
+ /* @__PURE__ */ jsx10(SaveBar, {}),
1180
+ /* @__PURE__ */ jsx10("p", { className: "ad-footnote", children: "Changes will reflect only on restart of ADSelfService Plus." })
1181
+ ] }) : active === "Proxy Settings" ? /* @__PURE__ */ jsxs10(Fragment6, { children: [
1182
+ /* @__PURE__ */ jsx10(CheckRow, { children: "Enable Proxy Server" }),
1183
+ /* @__PURE__ */ jsxs10("div", { className: "ad-form-block", children: [
1184
+ /* @__PURE__ */ jsx10(FormRow, { label: "Server Name or IP", required: true, children: /* @__PURE__ */ jsx10(TextField, { placeholder: "Server Name or IP" }) }),
1185
+ /* @__PURE__ */ jsx10(FormRow, { label: "Port", children: /* @__PURE__ */ jsx10(TextField, { placeholder: "Port" }) }),
1186
+ /* @__PURE__ */ jsx10(FormRow, { label: "Username", children: /* @__PURE__ */ jsx10(TextField, {}) }),
1187
+ /* @__PURE__ */ jsx10(FormRow, { label: "Password", children: /* @__PURE__ */ jsx10(TextField, { type: "password" }) })
1188
+ ] }),
1189
+ /* @__PURE__ */ jsx10("p", { className: "ad-footnote", children: "Provide username and password if the proxy server requires authentication." }),
1190
+ /* @__PURE__ */ jsx10(SaveBar, { cancelLabel: "Reset" }),
1191
+ /* @__PURE__ */ jsx10("div", { className: "ad-tail-link", children: /* @__PURE__ */ jsx10(TextLink, { children: "Test Connection" }) })
1192
+ ] }) : /* @__PURE__ */ jsxs10(Fragment6, { children: [
1193
+ /* @__PURE__ */ jsx10(SectionTitle, { children: "Session Settings" }),
1194
+ /* @__PURE__ */ jsx10(FormRow, { label: "Session Expiration Time", children: /* @__PURE__ */ jsx10(InlineSelect, { options: ["10 mins", "15 mins", "20 mins", "25 mins", "30 mins", "45 mins", "60 mins", "24 hrs", "Never"] }) }),
1195
+ /* @__PURE__ */ jsx10(CheckRow, { children: "Deny Concurrent Logins" }),
1196
+ /* @__PURE__ */ jsx10(SectionTitle, { children: "Startup & Logging Settings" }),
1197
+ /* @__PURE__ */ jsx10(SaveBar, { saveLabel: "Save Settings" }),
1198
+ /* @__PURE__ */ jsx10("p", { className: "ad-footnote", children: "Changes will reflect only on restart of ADSelfService Plus." })
1199
+ ] }) });
1200
+ }
1201
+ function MailSms() {
1202
+ const [mode, setMode] = useState10("SMTP");
1203
+ const [auth, setAuth] = useState10("basic");
1204
+ const [smsAlert, setSmsAlert] = useState10(false);
1205
+ return /* @__PURE__ */ jsx10(Frame, { title: "Mail / SMS Server Settings", action: /* @__PURE__ */ jsx10(TextLink, { children: "Mail/Mobile Attributes" }), tabs: ["Mail Settings", "SMS Settings", "Notification Settings"], children: (active) => active === "Mail Settings" ? /* @__PURE__ */ jsxs10("div", { className: "ad-form-block", children: [
1206
+ /* @__PURE__ */ jsx10(SectionTitle, { children: "Configure Mail Server" }),
1207
+ /* @__PURE__ */ jsxs10(FormRow, { label: "Mode", children: [
1208
+ /* @__PURE__ */ jsx10(RadioRow, { name: "mailmode", value: "SMTP", checked: mode === "SMTP", onChange: setMode, children: "SMTP" }),
1209
+ /* @__PURE__ */ jsx10(RadioRow, { name: "mailmode", value: "API", checked: mode === "API", onChange: setMode, children: "API" })
1210
+ ] }),
1211
+ /* @__PURE__ */ jsx10(FormRow, { label: "Server Name or IP", required: true, children: /* @__PURE__ */ jsx10(TextField, { defaultValue: "smtp" }) }),
1212
+ /* @__PURE__ */ jsx10(FormRow, { label: "Port", required: true, children: /* @__PURE__ */ jsx10(TextField, { defaultValue: "25" }) }),
1213
+ /* @__PURE__ */ jsx10(FormRow, { label: "From Address", required: true, children: /* @__PURE__ */ jsx10(TextField, { defaultValue: "noreply@adselfserviceplus.com" }) }),
1214
+ /* @__PURE__ */ jsxs10(FormRow, { label: "Admin Mail Address", required: true, hint: "Use comma (,) to separate multiple email addresses.", children: [
1215
+ /* @__PURE__ */ jsx10(TextField, { defaultValue: "noreply@adselfserviceplus.com" }),
1216
+ /* @__PURE__ */ jsx10(TextLink, { children: "Send a test mail" })
1217
+ ] }),
1218
+ /* @__PURE__ */ jsx10(FormRow, { label: "Secure Connection (SSL/TLS)", children: /* @__PURE__ */ jsx10(InlineSelect, { options: ["None", "SSL", "TLS"], initial: "SSL" }) }),
1219
+ /* @__PURE__ */ jsx10(SectionTitle, { children: "Authentication" }),
1220
+ /* @__PURE__ */ jsxs10(FormRow, { label: "Authentication Type", children: [
1221
+ /* @__PURE__ */ jsx10(RadioRow, { name: "auth", value: "basic", checked: auth === "basic", onChange: setAuth, children: "Basic Authentication" }),
1222
+ /* @__PURE__ */ jsx10(RadioRow, { name: "auth", value: "oauth", checked: auth === "oauth", onChange: setAuth, children: "OAuth Authentication" })
1223
+ ] }),
1224
+ /* @__PURE__ */ jsx10(FormRow, { label: "Username", children: /* @__PURE__ */ jsx10(TextField, {}) }),
1225
+ /* @__PURE__ */ jsx10(FormRow, { label: "Password", children: /* @__PURE__ */ jsx10(TextField, { type: "password" }) }),
1226
+ /* @__PURE__ */ jsx10(SaveBar, { saveLabel: "Save Settings" }),
1227
+ /* @__PURE__ */ jsx10("p", { className: "ad-footnote", children: "Once the mail server settings are saved, a test mail will be sent to the Admin Mail Address." })
1228
+ ] }) : active === "SMS Settings" ? /* @__PURE__ */ jsxs10(Fragment6, { children: [
1229
+ /* @__PURE__ */ jsxs10(FormRow, { label: "SMS Provider", children: [
1230
+ /* @__PURE__ */ jsx10(InlineSelect, { options: ["GSMModem", "Clickatell", "Custom"], initial: "Clickatell" }),
1231
+ /* @__PURE__ */ jsx10(TextLink, { children: "Send Test SMS" })
1232
+ ] }),
1233
+ /* @__PURE__ */ jsxs10("div", { className: "ad-option-inline", children: [
1234
+ /* @__PURE__ */ jsx10(CheckRow, { checked: smsAlert, onChange: setSmsAlert, children: "Please notify me when my credit balance reaches" }),
1235
+ /* @__PURE__ */ jsx10("input", { className: "ad-input ad-short", defaultValue: "10", disabled: !smsAlert })
1236
+ ] }),
1237
+ /* @__PURE__ */ jsx10(SaveBar, { saveLabel: "Save Settings" }),
1238
+ /* @__PURE__ */ jsxs10("div", { className: "ad-notes", children: [
1239
+ /* @__PURE__ */ jsx10("strong", { children: "Quick Help" }),
1240
+ /* @__PURE__ */ jsxs10("ul", { children: [
1241
+ /* @__PURE__ */ jsx10("li", { children: "Mobile numbers should use the standard international format with country code." }),
1242
+ /* @__PURE__ */ jsx10("li", { children: "Do not include a leading zero, plus sign, or spaces." }),
1243
+ /* @__PURE__ */ jsx10("li", { children: "1 credit = 1 message of 70 characters." })
1244
+ ] })
1245
+ ] })
1246
+ ] }) : /* @__PURE__ */ jsxs10(Fragment6, { children: [
1247
+ /* @__PURE__ */ jsx10(SectionTitle, { children: "Mail Notification" }),
1248
+ /* @__PURE__ */ jsxs10("div", { className: "ad-option-list", children: [
1249
+ /* @__PURE__ */ jsx10(CheckRow, { children: "Enable License Expiry Notification" }),
1250
+ /* @__PURE__ */ jsx10(CheckRow, { children: "Enable notifications for product startup and downtime events" }),
1251
+ /* @__PURE__ */ jsx10(CheckRow, { children: "Enable notifications for new product updates" }),
1252
+ /* @__PURE__ */ jsx10(CheckRow, { children: "Enable notifications for events and workshops" }),
1253
+ /* @__PURE__ */ jsx10(CheckRow, { children: "Send notifications to the secondary email addresses of all end users" }),
1254
+ /* @__PURE__ */ jsxs10("div", { className: "ad-option-inline", children: [
1255
+ /* @__PURE__ */ jsx10(CheckRow, { children: "Notify when SSL certificate is" }),
1256
+ /* @__PURE__ */ jsx10("input", { className: "ad-input ad-short", disabled: true }),
1257
+ "days before expiration"
1258
+ ] })
1259
+ ] }),
1260
+ /* @__PURE__ */ jsx10(SectionTitle, { children: "SMS Notification" }),
1261
+ /* @__PURE__ */ jsxs10("div", { className: "ad-option-list", children: [
1262
+ /* @__PURE__ */ jsxs10("div", { className: "ad-option-inline", children: [
1263
+ /* @__PURE__ */ jsx10(CheckRow, { children: "Enable product startup and downtime SMS notifications for this mobile number" }),
1264
+ /* @__PURE__ */ jsx10("input", { className: "ad-input", disabled: true, placeholder: "Enter the mobile Number" })
1265
+ ] }),
1266
+ /* @__PURE__ */ jsx10(CheckRow, { children: "Send notifications to the secondary mobile numbers of all end users" })
1267
+ ] }),
1268
+ /* @__PURE__ */ jsx10(SaveBar, { saveLabel: "Save Settings" })
1269
+ ] }) });
1270
+ }
1271
+ function DashboardUpdater() {
1272
+ const [selected, setSelected] = useState10("");
1273
+ const rows = [["AD Synchronizer", "ADSELFSERVICE", "Once in every 1 Hrs 0 Mins.", "Today 09:36 PM", "Success"], ["Locked Out Users", "ADSELFSERVICE", "Once in every 3 Hrs 0 Mins.", "Today 10:36 PM", "Success"], ["Password Expired Users", "ADSELFSERVICE", "Daily at 7 Hrs 0 Mins.", "2026/10/14 06:30 PM", "Success"], ["Soon-To-Expire User Passwords", "ADSELFSERVICE", "Daily at 7 Hrs 0 Mins.", "2026/10/14 06:30 PM", "Success"], ["Microsoft Entra ID Synchronizer", "Zoho", "Once in every 1 Hrs 0 Mins.", "Today 09:52 PM", "Success"]];
1274
+ return /* @__PURE__ */ jsxs10(Fragment6, { children: [
1275
+ /* @__PURE__ */ jsx10(Frame, { title: "Dashboard Updater", children: /* @__PURE__ */ jsx10(DataTable, { columns: ["Actions", "Scheduler Name", "Applies to (Directories)", "Schedule Frequency", "Next Run", "Status"], rows: rows.map((row) => [/* @__PURE__ */ jsx10(TextLink, { onClick: () => setSelected(row[0]), children: "Edit" }), ...row.slice(0, 4), /* @__PURE__ */ jsx10("span", { className: "ad-success", children: row[4] })]) }) }),
1276
+ /* @__PURE__ */ jsx10(Modal, { title: selected, open: !!selected, onClose: () => setSelected(""), footer: /* @__PURE__ */ jsx10(Button, { variant: "primary", onClick: () => setSelected(""), children: "Done" }), children: /* @__PURE__ */ jsx10(FormRow, { label: "Schedule Frequency", children: /* @__PURE__ */ jsx10(InlineSelect, { options: ["Every hour", "Every 3 hours", "Daily"] }) }) })
1277
+ ] });
1278
+ }
1279
+ function Backup() {
1280
+ return /* @__PURE__ */ jsxs10(Frame, { title: "Backup Settings", action: /* @__PURE__ */ jsx10(TextLink, { children: "Backup History" }), tabs: ["Backup Settings"], children: [
1281
+ /* @__PURE__ */ jsxs10("div", { className: "ad-form-block", children: [
1282
+ /* @__PURE__ */ jsxs10(FormRow, { label: "Backup Frequency", children: [
1283
+ /* @__PURE__ */ jsx10(InlineSelect, { options: ["Daily", "Weekly", "Monthly"] }),
1284
+ /* @__PURE__ */ jsx10(InlineSelect, { options: ["00", "01", "02", "03", "04", "05", "06", "07", "08", "09", "10", "11", "12"] }),
1285
+ " hrs ",
1286
+ /* @__PURE__ */ jsx10(InlineSelect, { options: ["00", "05", "10", "15", "20", "25", "30", "35", "40", "45", "50", "55"] }),
1287
+ " mins"
1288
+ ] }),
1289
+ /* @__PURE__ */ jsxs10(FormRow, { label: "Backup Storage Path", required: true, hint: "Path Format: C:\\local-path\\ (or) \\\\network-path\\", children: [
1290
+ /* @__PURE__ */ jsx10(TextField, {}),
1291
+ /* @__PURE__ */ jsx10(TextLink, { children: "Backup Now" })
1292
+ ] }),
1293
+ /* @__PURE__ */ jsx10(FormRow, { label: "Retain Backup Files", children: /* @__PURE__ */ jsx10(InlineSelect, { options: ["Delete files older than 15 days", "Delete files older than 30 days", "Keep last 10 files", "Keep all files"] }) }),
1294
+ /* @__PURE__ */ jsx10("div", { className: "ad-inline-save", children: /* @__PURE__ */ jsx10(SaveBar, { cancel: false }) })
1295
+ ] }),
1296
+ /* @__PURE__ */ jsxs10("div", { className: "ad-notes", children: [
1297
+ /* @__PURE__ */ jsx10("strong", { children: "Note:" }),
1298
+ /* @__PURE__ */ jsxs10("ul", { children: [
1299
+ /* @__PURE__ */ jsx10("li", { children: "If the specified path is wrong or unavailable, backup files will be stored in the default Backup folder." }),
1300
+ /* @__PURE__ */ jsx10("li", { children: "You can protect your backup with a password under Admin > Product Settings > Security and Privacy." }),
1301
+ /* @__PURE__ */ jsx10("li", { children: "Automatic backup can be enabled only if you are using the built-in PostgreSQL database." })
1302
+ ] })
1303
+ ] })
1304
+ ] });
1305
+ }
1306
+ function SiteBased() {
1307
+ const [selected, setSelected] = useState10("adselfservice.com");
1308
+ const [open, setOpen] = useState10(false);
1309
+ const ous = ["adselfservice.com", "Computers", "Demo-Admins", "Demo-Computers", "Demo-Contact", "Demo-Developers", "Demo-Engineering", "Demo-Finance", "Demo-Groups", "Demo-HR", "Demo-Marketing", "Demo-Sales", "Demo-SelfService", "Demo-Technical Support", "Demo-Testing", "Demo-Users", "Domain Controllers", "Users"];
1310
+ return /* @__PURE__ */ jsxs10(Fragment6, { children: [
1311
+ /* @__PURE__ */ jsxs10(Frame, { title: "Site Based DC Updater", help: "Configure site based domain controller selection", children: [
1312
+ /* @__PURE__ */ jsxs10("div", { className: "ad-site-domain", children: [
1313
+ /* @__PURE__ */ jsx10("strong", { children: "Select Domain" }),
1314
+ /* @__PURE__ */ jsx10(InlineSelect, { options: ["ADSELFSERVICE"] })
1315
+ ] }),
1316
+ /* @__PURE__ */ jsxs10("div", { className: "ad-site-picker", children: [
1317
+ /* @__PURE__ */ jsxs10("div", { className: "ad-site-column", children: [
1318
+ /* @__PURE__ */ jsx10("strong", { children: "OUs" }),
1319
+ /* @__PURE__ */ jsx10("div", { className: "ad-ou-tree", children: ous.map((ou, i) => /* @__PURE__ */ jsxs10("label", { className: "ad-ou-row", style: { paddingLeft: i === 0 ? 16 : 36 }, children: [
1320
+ /* @__PURE__ */ jsx10("input", { type: "checkbox", checked: selected === ou, onChange: () => setSelected(ou) }),
1321
+ /* @__PURE__ */ jsx10("span", { children: i === 0 ? "\u25A3" : "\u25B8" }),
1322
+ ou
1323
+ ] }, ou)) })
1324
+ ] }),
1325
+ /* @__PURE__ */ jsxs10("div", { className: "ad-site-column", children: [
1326
+ /* @__PURE__ */ jsxs10("strong", { children: [
1327
+ "Domain Controller (",
1328
+ selected,
1329
+ ")"
1330
+ ] }),
1331
+ /* @__PURE__ */ jsx10("div", { className: "ad-dc-list", children: "\u25A3 \xA0 adsspdemo1.adselfservice.com" }),
1332
+ /* @__PURE__ */ jsx10(TextLink, { onClick: () => setOpen(true), children: "Select More DCs" })
1333
+ ] })
1334
+ ] }),
1335
+ /* @__PURE__ */ jsx10(CheckRow, { children: "Set higher priority to Site-based DC Updater over policy-based DC Updater" }),
1336
+ /* @__PURE__ */ jsx10(SaveBar, {})
1337
+ ] }),
1338
+ /* @__PURE__ */ jsx10(Modal, { title: "Select More DCs", open, onClose: () => setOpen(false), footer: /* @__PURE__ */ jsx10(Button, { variant: "primary", onClick: () => setOpen(false), children: "Done" }), children: /* @__PURE__ */ jsx10(CheckRow, { defaultChecked: true, children: "adsspdemo1.adselfservice.com" }) })
1339
+ ] });
1340
+ }
1341
+ function Integration() {
1342
+ const [selected, setSelected] = useState10("");
1343
+ const apps = [["ADManager Plus", "ADManager Plus"], ["ServiceDesk Plus", "ServiceDesk Plus"], ["splunk>", "Splunk Server"], ["SYSLOG", "Syslog Server"], ["Hibp?", "Have I Been Pwned?"], ["Log360 - EventLog Analyzer", "Log360"], ["ServiceDesk Plus Cloud", "ServiceDesk Plus Cloud"]];
1344
+ return /* @__PURE__ */ jsxs10(Fragment6, { children: [
1345
+ /* @__PURE__ */ jsx10(Frame, { title: "Integration Settings", help: "Configure external integrations", children: /* @__PURE__ */ jsx10("div", { className: "ad-integration-grid", children: apps.map(([logo, label]) => /* @__PURE__ */ jsxs10("button", { className: "ad-integration-tile", onClick: () => setSelected(label), children: [
1346
+ /* @__PURE__ */ jsx10("strong", { children: logo }),
1347
+ /* @__PURE__ */ jsx10("span", { children: label })
1348
+ ] }, label)) }) }),
1349
+ /* @__PURE__ */ jsxs10(Modal, { title: selected, open: !!selected, onClose: () => setSelected(""), footer: /* @__PURE__ */ jsx10(Button, { onClick: () => setSelected(""), children: "Close" }), children: [
1350
+ /* @__PURE__ */ jsxs10(Notice, { children: [
1351
+ "Configure the connection for ",
1352
+ selected,
1353
+ "."
1354
+ ] }),
1355
+ /* @__PURE__ */ jsx10(TextField, { label: "Server URL" })
1356
+ ] })
1357
+ ] });
1358
+ }
1359
+ function WindowsService() {
1360
+ return /* @__PURE__ */ jsx10(Frame, { title: "ADSelfService Plus as Windows Service", children: /* @__PURE__ */ jsxs10("div", { className: "ad-service-instructions", children: [
1361
+ /* @__PURE__ */ jsx10("h2", { children: "To install and start ADSelfService Plus as a service:" }),
1362
+ /* @__PURE__ */ jsxs10("ol", { children: [
1363
+ /* @__PURE__ */ jsx10("li", { children: "Please stop ADSelfService Plus if it is running. (Start-->All Programs-->ADSelfService Plus-->Stop ADSelfService Plus)" }),
1364
+ /* @__PURE__ */ jsx10("li", { children: "Install as a service. (Start-->All Programs-->ADSelfService Plus-->NT Service-->Install ADSelfService Plus as Service)" }),
1365
+ /* @__PURE__ */ jsxs10("li", { children: [
1366
+ "Start as a service:",
1367
+ /* @__PURE__ */ jsxs10("ol", { type: "i", children: [
1368
+ /* @__PURE__ */ jsx10("li", { children: 'Start-->Run and type "services.msc"' }),
1369
+ /* @__PURE__ */ jsx10("li", { children: 'Right-click on "ManageEngine ADSelfService Plus" and Click on Properties.' }),
1370
+ /* @__PURE__ */ jsx10("li", { children: 'Go to Logon Tab and choose "This Account" option. Enter administrative credentials and click OK.' }),
1371
+ /* @__PURE__ */ jsx10("li", { children: 'Right-click on "ManageEngine ADSelfService Plus" and Click on Start.' })
1372
+ ] })
1373
+ ] })
1374
+ ] })
1375
+ ] }) });
1376
+ }
1377
+ function Security() {
1378
+ return /* @__PURE__ */ jsxs10(Frame, { title: "Security and Privacy", tabs: ["Privacy Settings"], children: [
1379
+ /* @__PURE__ */ jsx10(SectionTitle, { children: "Data Security" }),
1380
+ /* @__PURE__ */ jsx10("p", { children: "Enable password protection for" }),
1381
+ /* @__PURE__ */ jsxs10("div", { className: "ad-option-list", children: [
1382
+ /* @__PURE__ */ jsxs10("div", { className: "ad-option-inline", children: [
1383
+ /* @__PURE__ */ jsx10(CheckRow, { children: "Scheduled and exported reports" }),
1384
+ /* @__PURE__ */ jsx10("input", { className: "ad-input", type: "password", disabled: true })
1385
+ ] }),
1386
+ /* @__PURE__ */ jsxs10("div", { className: "ad-option-inline", children: [
1387
+ /* @__PURE__ */ jsx10(CheckRow, { children: "Database backup files" }),
1388
+ /* @__PURE__ */ jsx10("input", { className: "ad-input", type: "password", disabled: true })
1389
+ ] })
1390
+ ] }),
1391
+ /* @__PURE__ */ jsx10(SectionTitle, { children: "Usage Statistics" }),
1392
+ /* @__PURE__ */ jsx10(CheckRow, { defaultChecked: true, children: "Send product usage statistics anonymously" }),
1393
+ /* @__PURE__ */ jsx10(SaveBar, { saveLabel: "Save Settings" })
1394
+ ] });
1395
+ }
1396
+ function RestrictUsers() {
1397
+ const [active, setActive] = useState10("Restrict Users");
1398
+ const [open, setOpen] = useState10(false);
1399
+ return /* @__PURE__ */ jsxs10(Fragment6, { children: [
1400
+ /* @__PURE__ */ jsxs10(Frame, { title: "Restricted Users", action: /* @__PURE__ */ jsxs10("div", { className: "ad-header-links", children: [
1401
+ /* @__PURE__ */ jsx10(TextLink, { children: "Schedule to Restrict/Derestrict" }),
1402
+ /* @__PURE__ */ jsx10(TextLink, { children: "License Info" })
1403
+ ] }), children: [
1404
+ /* @__PURE__ */ jsxs10(Notice, { tone: "warning", children: [
1405
+ /* @__PURE__ */ jsx10("strong", { children: "Note" }),
1406
+ /* @__PURE__ */ jsxs10("ul", { children: [
1407
+ /* @__PURE__ */ jsx10("li", { children: "Prevent licenses being wasted by stale user accounts." }),
1408
+ /* @__PURE__ */ jsx10("li", { children: "Restrict inactive user accounts and prevent them from being exploited." }),
1409
+ /* @__PURE__ */ jsx10("li", { children: "Enrolment data of a restricted user would be deleted automatically." }),
1410
+ /* @__PURE__ */ jsx10("li", { children: "Restricting a user revokes and frees up the Endpoint MFA license they have consumed." })
1411
+ ] })
1412
+ ] }),
1413
+ /* @__PURE__ */ jsx10(Tabs, { tabs: ["Restrict Users", "Derestrict Users"], active, onChange: setActive }),
1414
+ /* @__PURE__ */ jsxs10("div", { className: "ad-restrict-toolbar", children: [
1415
+ /* @__PURE__ */ jsx10("span", { children: "Select Directory" }),
1416
+ /* @__PURE__ */ jsx10(InlineSelect, { options: ["ADSELFSERVICE"] }),
1417
+ /* @__PURE__ */ jsx10("span", { className: "ad-restrict-count", children: "0-0 of 0" }),
1418
+ /* @__PURE__ */ jsx10(InlineSelect, { options: ["25", "50", "100"] })
1419
+ ] }),
1420
+ /* @__PURE__ */ jsx10(DataTable, { columns: [""], empty: `There are no ${active === "Restrict Users" ? "restricted" : "derestricted"} users in this directory. Click ${active} to start.` }),
1421
+ /* @__PURE__ */ jsx10("div", { className: "ad-spaced", children: /* @__PURE__ */ jsx10(Button, { variant: "primary", onClick: () => setOpen(true), children: active }) })
1422
+ ] }),
1423
+ /* @__PURE__ */ jsx10(Modal, { title: active, open, onClose: () => setOpen(false), footer: /* @__PURE__ */ jsx10(Button, { variant: "primary", onClick: () => setOpen(false), children: "Done" }), children: /* @__PURE__ */ jsx10(TextField, { label: "Search Users", placeholder: "Search by name" }) })
1424
+ ] });
1425
+ }
1426
+ var SCREENS = { login: LoginSettings, personalize: Personalize, failover: Failover, reverse: ReverseProxy, connection: Connection, mail: MailSms, dashboard: DashboardUpdater, backup: Backup, site: SiteBased, integration: Integration, windows: WindowsService, security: Security, restrict: RestrictUsers };
1427
+ function AdminScreen({ screen, screens = {}, renderScreen, screenProps = {} }) {
1428
+ const override = renderScreen?.(screen);
1429
+ if (override !== void 0) return override;
1430
+ const Component = screens[screen] || SCREENS[screen] || LoginSettings;
1431
+ return /* @__PURE__ */ jsx10(Component, { ...screenProps }, screen);
1432
+ }
1433
+
1434
+ // src/pages/AdminScreen.tsx
1435
+ import { jsx as jsx11 } from "react/jsx-runtime";
1436
+ var ADMIN_GROUPS2 = ADMIN_GROUPS;
1437
+ function AdminScreen2(props) {
1438
+ const Component = AdminScreen;
1439
+ return /* @__PURE__ */ jsx11(Component, { ...props });
1440
+ }
701
1441
  export {
1442
+ ADMIN_GROUPS2 as ADMIN_GROUPS,
702
1443
  ActionBar,
703
1444
  ActiveDirectoryChart,
1445
+ AdminScreen2 as AdminScreen,
704
1446
  AdminShell,
705
1447
  AppShell,
706
1448
  Button,
@@ -708,12 +1450,14 @@ export {
708
1450
  CheckRow,
709
1451
  CollapsibleSidebar,
710
1452
  ConfigurationHeader,
1453
+ ConfigurationPage,
711
1454
  ConfigurationSidebar,
712
1455
  DASHBOARD_METRICS,
713
1456
  DASHBOARD_SHORTCUTS,
714
1457
  DEMO_POLICIES,
715
1458
  DIRECTORY_REPORT_DATA,
716
1459
  DashboardLayout,
1460
+ DashboardPage,
717
1461
  DashboardToolbar,
718
1462
  DataTable,
719
1463
  ExpandedWidget,
@@ -743,6 +1487,7 @@ export {
743
1487
  ReportNavigation,
744
1488
  ReportPageHeading,
745
1489
  ReportResults,
1490
+ ReportsPage,
746
1491
  SELF_SERVICE_REPORT_DATA,
747
1492
  SaveBar,
748
1493
  SectionTitle,