@zealsolutions/zeal-ui 1.0.0-alpha.333 → 1.0.0-alpha.335
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/components/session/index.js +65 -0
- package/dist/components/sop-diff/index.js +401 -0
- package/dist/components/tables/index.js +117 -117
- package/dist/components/tiptap/index.js +7307 -10999
- package/dist/style.css +1 -1
- package/package.json +24 -17
- package/dist/ActionCardsIcon-DVoEt3PI-lR53BdEq.js +0 -23
- package/dist/AddressBookIcon-BgzCF09l-CeLQEb_1.js +0 -23
- package/dist/AlarmClockIcon-DMGjjgG0-Y2nmY7eN.js +0 -23
- package/dist/AmbulanceDashboardIcon-DygVK4uF-U5J8j8yk.js +0 -23
- package/dist/ArrowDownBigSmallIcon-lZ9pk2em-_RU-X9SJ.js +0 -23
- package/dist/ArrowDownShortWideIcon-BLOm1Mre-Cyc3M8DX.js +0 -23
- package/dist/ArrowLeftIcon-Cgsy08pY-YlbqaPD7.js +0 -23
- package/dist/ArrowRightBracketIcon-D_o7oYWm-pMx6EibE.js +0 -23
- package/dist/ArrowRotateLeftIcon-C0xWKiJr-CJezHwRV.js +0 -23
- package/dist/ArrowRotateRightIcon-w1VDxH4v-CrJaVt-5.js +0 -23
- package/dist/ArrowUpShortWideIcon-B12ffThe-ZZ09_lLA.js +0 -23
- package/dist/AssessmentsIcon-gl1lqzM4-CamfpB5u.js +0 -23
- package/dist/AssetManagementIcon-CZpbTi7n-BjMWBL8j.js +0 -23
- package/dist/AtvOpsIcon-CjHLrzoV-D2xp-hBG.js +0 -23
- package/dist/BaOpsIcon-DB-Y_SKE-CCBt1tDq.js +0 -23
- package/dist/BanIcon-CbthmzAX-DKHnr74r.js +0 -23
- package/dist/BarsIcon-CY8KeVq7-C81YUZc0.js +0 -23
- package/dist/BarsSortIcon-C82qc15Z-BBYa8VRf.js +0 -23
- package/dist/BellIcon-lK5EZXNf-C4OlnLw0.js +0 -23
- package/dist/BinaryIcon-tkr7wetP-Ccjo_53O.js +0 -23
- package/dist/BoxArchiveIcon-B4_zsjvg-C37at1kC.js +0 -23
- package/dist/CalendarWeekIcon-CB4Z1TI4-ryzakyt2.js +0 -23
- package/dist/CanvasIcon-DujLyvWA-CaoXBxwq.js +0 -23
- package/dist/CartCirclePlusIcon-G5cxd3cI-BLUA1qMb.js +0 -23
- package/dist/CartCircleXMarkIcon-DzHSQZgf-BupeWT55.js +0 -23
- package/dist/ChangeManagementIcon-BA89LgWl-DFZpZPqo.js +0 -23
- package/dist/ChartMixedUpCircleCurrencyIcon-EQo7EVbb-DzHdliiL.js +0 -23
- package/dist/ChartPieIcon-BqRF_9mq-DWbqVDmY.js +0 -23
- package/dist/ChartScatterBubbleIcon-N_XXIVAy-ByirfAJ3.js +0 -23
- package/dist/CheckToSlotIcon-Cs83T9dM-CoFRDFBg.js +0 -23
- package/dist/CircleCheckIcon-CA15yXgI-CqTYyaAP.js +0 -23
- package/dist/CircleInfoIcon-B6-Jx1og-D6L_u6cS.js +0 -23
- package/dist/CircleUserIcon-BERzSCQL-DnSlBWdz.js +0 -23
- package/dist/ClipboardListCheckIcon-BZlyFoiD-BMS91PIz.js +0 -23
- package/dist/ClockThreeIcon-D836f-XQ-q92aGwt8.js +0 -23
- package/dist/ColumnsThreeIcon-FFmylJtj-877Om7HH.js +0 -20
- package/dist/CommentLinesIcon-vzfGZXs1-DKQymcES.js +0 -23
- package/dist/ConfinedSpaceIcon-B41rnh-F-DY_8PMDC.js +0 -23
- package/dist/CorridorCareIcon-DtlRYipD-D8y-yxmj.js +0 -23
- package/dist/DiagramSubtaskIcon-DCSBGD55-BDzslB1T.js +0 -23
- package/dist/DrawCircleIcon-D8gwcOmI-C6rWsASL.js +0 -23
- package/dist/DroneIcon-BLQyrOAI-C9MaE0S6.js +0 -23
- package/dist/DroneUasIcon-rmUiyuhO-DIqys8YF.js +0 -23
- package/dist/ECUDashboardIcon-njF42ISk-Bw9NsSVQ.js +0 -23
- package/dist/ECUDiaryIcon-Bm5nOSho-BwQPBvUX.js +0 -23
- package/dist/EDSIcon-AMFbBj6R-0IEDOpHb.js +0 -23
- package/dist/ElevatorIcon-DrJ-pkZh-DZaY84GN.js +0 -23
- package/dist/EllipsisStrokeVerticalIcon-Boej-QsH-D44UPPAJ.js +0 -23
- package/dist/EnvelopeIcon-45jlW_J--PXko5y8X.js +0 -23
- package/dist/ExcelIcon-DHy8cDC5-DkkJBlsp.js +0 -18
- package/dist/ExpandIcon-CVoLHHsv-gx4etFrI.js +0 -23
- package/dist/FileChartColumnIcon-CUXA0UIo-BpDmcINk.js +0 -23
- package/dist/FileCirclePlusIcon-BPIUVxNH-QBuEwLhS.js +0 -23
- package/dist/FileExportIcon-BUFrkL8u-CccTXCT8.js +0 -23
- package/dist/FileInvoiceIcon-DTthf77K-DihZUjt3.js +0 -23
- package/dist/FilePdfIcon-DXBoTMfq-nOkPsfTG.js +0 -23
- package/dist/FilesIcon-NLAyR0HT-C_11syHc.js +0 -23
- package/dist/FilmIcon-CE9gVpsG-_JrVhrre.js +0 -23
- package/dist/FilterCircleXMarkIcon-BJDPebzG-CIL3NSwT.js +0 -23
- package/dist/FilterIcon-DRVfA14W-DMjuamBE.js +0 -23
- package/dist/FlagSwallowtailIcon-Cyn4dyNg-DaR5EWSI.js +0 -23
- package/dist/FloppyDiskIcon-Cw0-K5K--D3oZIOkY.js +0 -23
- package/dist/FolderIcon-CqU6uofl-CQB5Q8VR.js +0 -31
- package/dist/FolderPlusIcon-D3qHxSZ_-5dfaTlYJ.js +0 -23
- package/dist/FoldersIcon-nngwhzSc-DyMBHzJE.js +0 -23
- package/dist/GalleryThumbnailsIcon-CafNHt1r-CoTdaG7s.js +0 -23
- package/dist/GearsIcon-BoH1vuST-Ujvp-GFV.js +0 -23
- package/dist/GlobePointerIcon-CTX_aWSw-pjFnoHTw.js +0 -23
- package/dist/GraduationCapIcon-BFBWEjtB-rxoGRQIh.js +0 -23
- package/dist/GridIcon-H6sKXK2d-D1iFsCb5.js +0 -23
- package/dist/HandsBubblesIcon-DFrgWVYR-zP_d33yR.js +0 -23
- package/dist/HazmatIcon-CPLZe_1e-De69CMgk.js +0 -23
- package/dist/HcidIcon-Bl-OeftA-CxWLNBrz.js +0 -23
- package/dist/HouseIcon-BxmNyxvv-DQG3au9o.js +0 -23
- package/dist/ImageIcon-jkYGKPiB-DD3_iIgd.js +0 -23
- package/dist/IncidentCentreIcon-BivSQikQ-_vaYCXvF.js +0 -23
- package/dist/IncidentRecordingIcon-CBZ53akp-DmdwO1j5.js +0 -23
- package/dist/LIDIcon-COK3SSxJ-BzOyxdjp.js +0 -23
- package/dist/LifeRingIcon-BfoL25Bs-CX3DPJP5.js +0 -23
- package/dist/LightEmergencyOnIcon-DapDPOcV-37cnznWO.js +0 -23
- package/dist/LightFilmCirclePlusIcon-BONccXvN-ltHru07t.js +0 -21
- package/dist/ListRadioIcon-gmE_fzgA-CKKMRyHl.js +0 -23
- package/dist/ListTreeIcon-DMhYL_id-CVfxs0Yy.js +0 -23
- package/dist/LockKeyholeIcon-M6F8rvn1-CF-Z9i84.js +0 -23
- package/dist/MapLocationDotIcon-DnfuF78q-DuUFkgSX.js +0 -23
- package/dist/MassCasualtyIcon-BT77dR9v-BPsn_H7O.js +0 -23
- package/dist/McvIcon-BwYxt18h-Cd0_w_VY.js +0 -23
- package/dist/MemoCircleInfoIcon-BlwKM09z-B14ZHy0x.js +0 -23
- package/dist/MtaIcon-Ce1CRjSv-EBAim3v6.js +0 -23
- package/dist/NACCIcon-Dxs2xXhX-z-i7Aen1.js +0 -23
- package/dist/NARUDiaryIcon-BpjRMYLV-XMUkb1XS.js +0 -23
- package/dist/NotebookIcon-SG3po-jP-C94rIme1.js +0 -23
- package/dist/NotificationIcon-BqK4xBPK-Di3p1x7_.js +0 -29
- package/dist/NxgenPpeIcon-Wgryynup-Cx1yQHfd.js +0 -23
- package/dist/ObjectColumnIcon-CxAILX7x-7iDqYh2m.js +0 -23
- package/dist/OperationalIcon-e3NUbsC--DrV0v9qQ.js +0 -23
- package/dist/PdfIcon-C6jEHH_e-C0LmRhAH.js +0 -21
- package/dist/PencilIcon-B-Jl71yl-Cx1b4sEF.js +0 -23
- package/dist/PhoneIcon-CTVTNYc--BhvQ839w.js +0 -23
- package/dist/PodcastIcon-Cb_mKKJA-CG9Gw80i.js +0 -23
- package/dist/PptIcon-DHu5hT4--DNf60FU4.js +0 -33
- package/dist/PresentationIcon-DZCQn354-BO-zI3UF.js +0 -23
- package/dist/PrpsIcon-6Oi2vz3--B5KRzrZt.js +0 -23
- package/dist/PuzzleIcon-CrfUdlft-CqorDqXu.js +0 -23
- package/dist/RadiationIcon-BYbqFtwp-BGHJktmR.js +0 -23
- package/dist/RectangleVerticalHistoryIcon-Bd5aXMEw-D-QqU1sW.js +0 -23
- package/dist/RotateExclamationIcon-DTRbZW-G-J20ZuNAf.js +0 -23
- package/dist/SOPIcon-Bf_kvdnd-CUoetyue.js +0 -23
- package/dist/SafetyAlertSystemIcon-CO2Nfwnt-CSzpCEhF.js +0 -23
- package/dist/SafetyHeightIcon-BaJ_NRPQ-d0s8C5Ba.js +0 -23
- package/dist/ScaleUnbalancedFlipIcon-DU-k-Tep-BlIpnlnh.js +0 -23
- package/dist/ScreenUsersIcon-EddBouXr-CvnCa2_R.js +0 -23
- package/dist/ScrewdriverWrenchIcon-BhtNFcaF-DPc3CbPC.js +0 -23
- package/dist/SealExclamationIcon-D-eOlbgS-Cbkrinhk.js +0 -23
- package/dist/SecuritySupportIcon-DftM1Sex-DbLeg0JN.js +0 -23
- package/dist/ShareFromSquareIcon-C0oKnHP4-HLdCTwQl.js +0 -23
- package/dist/SlidersIcon-DOirWVZO-DzDK5fly.js +0 -23
- package/dist/SquareDashedCirclePlusIcon-CsXEyAth-CgWkz_aI.js +0 -23
- package/dist/SquareSlidersVerticalIcon-Bku5zH2X-E6p9MPuh.js +0 -23
- package/dist/TableIcon-uwPPbqM3-fV8l9-mm.js +0 -20
- package/dist/TableLayoutIcon-DvoDyX-j-BTAZ8jDB.js +0 -20
- package/dist/TacticalIcon-C0YV6OYa-Ddl8rXCp.js +0 -23
- package/dist/TelephoneDirectoryIcon-ByWmavfU-Bz95Z-CZ.js +0 -23
- package/dist/TimelineArrowIcon-DLKL7fEt-DF8SySvy.js +0 -23
- package/dist/TrashCanIcon-DK9reURF-Cxhmucdy.js +0 -23
- package/dist/UnstableTerrainIcon-DEgUJyEe-DNny2zJz.js +0 -23
- package/dist/UploadIcon-DJeF8sKk-CCdu4BpU.js +0 -23
- package/dist/UserGearIcon-AsvyYngF-CR_rEpyi.js +0 -23
- package/dist/UserGroupIcon-CgsxU3om-D07Yx5Fa.js +0 -23
- package/dist/UserIcon-18Fdcxc7-Cx0eL8oz.js +0 -23
- package/dist/UserLockIcon-COP7tSIf-Dj6NsciR.js +0 -23
- package/dist/UserPenIcon-BTz7TA4o-DOr02eOw.js +0 -23
- package/dist/UserSlashIcon-D4F1vuC--BBDhhos3.js +0 -23
- package/dist/UserUnlockIcon-vQKpd81r-DEr43XYL.js +0 -23
- package/dist/UsersGearIcon-B0CALrq_-BZ00cggF.js +0 -23
- package/dist/UsersIcon-DmjMjOOp-DVD0ScCP.js +0 -23
- package/dist/UsersSlashIcon-BZAhqwjK-E_T4834x.js +0 -23
- package/dist/VanShuttleIcon-DCWc9V_R-D38eeSkS.js +0 -23
- package/dist/WaterOpsIcon-DG9LJevA-CdL343BT.js +0 -23
- package/dist/WaveFormLinesIcon-ChpDxryS-BP3mjW9W.js +0 -23
- package/dist/WelfareIcon-C9QQdcfy-L3MvFaHW.js +0 -23
- package/dist/WordIcon-D7lLU9qE-BvkUPcAx.js +0 -33
- package/dist/index-CEnovDXy.js +0 -3937
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
import { ref as p, openBlock as k, createElementBlock as D, createElementVNode as h, toDisplayString as E } from "vue";
|
|
2
|
+
const I = ["mousemove", "keydown", "click", "scroll", "touchstart"], M = 1e3, L = 1e3, R = 60 * 1e3;
|
|
3
|
+
function C({
|
|
4
|
+
idleMinutes: s,
|
|
5
|
+
countdownSeconds: n,
|
|
6
|
+
redirectUrl: a,
|
|
7
|
+
onKeepAlive: o,
|
|
8
|
+
isEnabled: T
|
|
9
|
+
}) {
|
|
10
|
+
const t = p(!1), u = p(n), f = s * 60 * 1e3, x = f - n * 1e3;
|
|
11
|
+
let l = Date.now(), m = 0, r = !1, c = 0, i = null, d = !1;
|
|
12
|
+
function w() {
|
|
13
|
+
if (o)
|
|
14
|
+
try {
|
|
15
|
+
o();
|
|
16
|
+
} catch {
|
|
17
|
+
}
|
|
18
|
+
}
|
|
19
|
+
function g() {
|
|
20
|
+
const e = Date.now();
|
|
21
|
+
e < m || (m = e + L, l = e, r = !0, t.value && (t.value = !1));
|
|
22
|
+
}
|
|
23
|
+
function _() {
|
|
24
|
+
const e = Date.now(), v = e - l;
|
|
25
|
+
if (v >= f) {
|
|
26
|
+
d || (d = !0, y(), window.location.assign(a));
|
|
27
|
+
return;
|
|
28
|
+
}
|
|
29
|
+
v >= x ? (t.value = !0, u.value = Math.max(0, Math.ceil((f - v) / 1e3))) : (t.value = !1, r && o && e - c >= R && (c = e, w())), r = !1;
|
|
30
|
+
}
|
|
31
|
+
function b() {
|
|
32
|
+
!T || i || (l = Date.now(), r = !1, c = 0, d = !1, I.forEach((e) => window.addEventListener(e, g, { passive: !0 })), i = setInterval(_, M));
|
|
33
|
+
}
|
|
34
|
+
function y() {
|
|
35
|
+
i && (clearInterval(i), i = null), I.forEach((e) => window.removeEventListener(e, g));
|
|
36
|
+
}
|
|
37
|
+
function A() {
|
|
38
|
+
l = Date.now(), c = Date.now(), t.value = !1, u.value = n, w();
|
|
39
|
+
}
|
|
40
|
+
return { isWarning: t, secondsRemaining: u, stayActive: A, start: b, stop: y };
|
|
41
|
+
}
|
|
42
|
+
const S = {
|
|
43
|
+
role: "alert",
|
|
44
|
+
class: "fixed inset-x-0 top-0 z-[9999] flex items-center justify-center gap-4 bg-warning-950 px-4 py-3 text-white shadow-lg"
|
|
45
|
+
}, V = { class: "text-sm font-medium" }, N = {
|
|
46
|
+
__name: "IdleWarningBar",
|
|
47
|
+
props: {
|
|
48
|
+
secondsRemaining: { type: Number, required: !0 }
|
|
49
|
+
},
|
|
50
|
+
emits: ["stay-active"],
|
|
51
|
+
setup(s) {
|
|
52
|
+
return (n, a) => (k(), D("div", S, [
|
|
53
|
+
h("span", V, " You will be logged out in " + E(s.secondsRemaining) + " second" + E(s.secondsRemaining === 1 ? "" : "s") + " due to inactivity. ", 1),
|
|
54
|
+
h("button", {
|
|
55
|
+
type: "button",
|
|
56
|
+
class: "rounded-md bg-white/20 px-3 py-1 text-sm font-semibold hover:bg-white/30",
|
|
57
|
+
onClick: a[0] || (a[0] = (o) => n.$emit("stay-active"))
|
|
58
|
+
}, " Stay logged in ")
|
|
59
|
+
]));
|
|
60
|
+
}
|
|
61
|
+
};
|
|
62
|
+
export {
|
|
63
|
+
N as IdleWarningBar,
|
|
64
|
+
C as useIdleTimeout
|
|
65
|
+
};
|
|
@@ -0,0 +1,401 @@
|
|
|
1
|
+
import { computed as q, openBlock as f, createElementBlock as h, createElementVNode as R, toDisplayString as x, createCommentVNode as S, Fragment as L, renderList as D, normalizeClass as F, createStaticVNode as V } from "vue";
|
|
2
|
+
import { _ as B } from "../../_plugin-vue_export-helper-CHgC5LLL.js";
|
|
3
|
+
const T = (e) => e === ">", P = (e) => e === "<", A = (e) => /^\s+$/.test(e), G = (e) => /^\s*<[^>]+>\s*$/.test(e), U = (e) => !G(e);
|
|
4
|
+
class E {
|
|
5
|
+
constructor(i, t, n) {
|
|
6
|
+
this.start_in_before = i, this.start_in_after = t, this.length = n, this.end_in_before = i + n - 1, this.end_in_after = t + n - 1;
|
|
7
|
+
}
|
|
8
|
+
}
|
|
9
|
+
function N(e) {
|
|
10
|
+
let i = "char", t = "";
|
|
11
|
+
const n = [];
|
|
12
|
+
for (let l = 0, r = e.length; l < r; l++) {
|
|
13
|
+
const a = e[l];
|
|
14
|
+
switch (i) {
|
|
15
|
+
case "tag":
|
|
16
|
+
T(a) ? (t += ">", n.push(t), t = "", i = A(a) ? "whitespace" : "char") : t += a;
|
|
17
|
+
break;
|
|
18
|
+
case "char":
|
|
19
|
+
P(a) ? (t && n.push(t), t = "<", i = "tag") : /\s/.test(a) ? (t && n.push(t), t = a, i = "whitespace") : /[\w#@]+/i.test(a) ? t += a : (t && n.push(t), t = a);
|
|
20
|
+
break;
|
|
21
|
+
case "whitespace":
|
|
22
|
+
P(a) ? (t && n.push(t), t = "<", i = "tag") : A(a) ? t += a : (t && n.push(t), t = a, i = "char");
|
|
23
|
+
break;
|
|
24
|
+
default:
|
|
25
|
+
throw new Error("Unknown mode " + i);
|
|
26
|
+
}
|
|
27
|
+
}
|
|
28
|
+
return t && n.push(t), n;
|
|
29
|
+
}
|
|
30
|
+
function j(e, i, t, n, l, r, a) {
|
|
31
|
+
let d = n, s = r, u = 0, c = {}, p;
|
|
32
|
+
for (let o = n; o < l; o++) {
|
|
33
|
+
const k = {}, g = e[o], y = t[g];
|
|
34
|
+
for (let v = 0, O = y.length; v < O; v++) {
|
|
35
|
+
const b = y[v];
|
|
36
|
+
if (b < r)
|
|
37
|
+
continue;
|
|
38
|
+
if (b >= a)
|
|
39
|
+
break;
|
|
40
|
+
c[b - 1] == null && (c[b - 1] = 0);
|
|
41
|
+
const _ = c[b - 1] + 1;
|
|
42
|
+
k[b] = _, _ > u && (d = o - _ + 1, s = b - _ + 1, u = _);
|
|
43
|
+
}
|
|
44
|
+
c = k;
|
|
45
|
+
}
|
|
46
|
+
return u !== 0 && (p = new E(d, s, u)), p;
|
|
47
|
+
}
|
|
48
|
+
function C(e, i, t, n, l, r, a, d) {
|
|
49
|
+
const s = j(e, i, t, n, l, r, a);
|
|
50
|
+
return s != null && (n < s.start_in_before && r < s.start_in_after && C(e, i, t, n, s.start_in_before, r, s.start_in_after, d), d.push(s), s.end_in_before <= l && s.end_in_after <= a && C(e, i, t, s.end_in_before + 1, l, s.end_in_after + 1, a, d)), d;
|
|
51
|
+
}
|
|
52
|
+
function H(e) {
|
|
53
|
+
if (e.find_these == null)
|
|
54
|
+
throw new Error("params must have find_these key");
|
|
55
|
+
if (e.in_these == null)
|
|
56
|
+
throw new Error("params must have in_these key");
|
|
57
|
+
const i = {};
|
|
58
|
+
for (let t = 0, n = e.find_these.length; t < n; t++) {
|
|
59
|
+
const l = e.find_these[t];
|
|
60
|
+
i[l] = [];
|
|
61
|
+
let r = e.in_these.indexOf(l);
|
|
62
|
+
for (; r !== -1; )
|
|
63
|
+
i[l].push(r), r = e.in_these.indexOf(l, r + 1);
|
|
64
|
+
}
|
|
65
|
+
return i;
|
|
66
|
+
}
|
|
67
|
+
function W(e, i) {
|
|
68
|
+
const t = [], n = H({ find_these: e, in_these: i });
|
|
69
|
+
return C(e, i, n, 0, e.length, 0, i.length, t);
|
|
70
|
+
}
|
|
71
|
+
function $(e, i) {
|
|
72
|
+
if (e == null)
|
|
73
|
+
throw new Error("before_tokens?");
|
|
74
|
+
if (i == null)
|
|
75
|
+
throw new Error("after_tokens?");
|
|
76
|
+
let t = 0, n = 0;
|
|
77
|
+
const l = [], r = {
|
|
78
|
+
"false,false": "replace",
|
|
79
|
+
"true,false": "insert",
|
|
80
|
+
"false,true": "delete",
|
|
81
|
+
"true,true": "none"
|
|
82
|
+
}, a = W(e, i);
|
|
83
|
+
a.push(new E(e.length, i.length, 0));
|
|
84
|
+
for (let c = 0, p = a.length; c < p; c++) {
|
|
85
|
+
const o = a[c], k = t === o.start_in_before, g = n === o.start_in_after, y = r[[k, g].toString()];
|
|
86
|
+
y !== "none" && l.push({
|
|
87
|
+
action: y,
|
|
88
|
+
start_in_before: t,
|
|
89
|
+
end_in_before: y !== "insert" ? o.start_in_before - 1 : void 0,
|
|
90
|
+
start_in_after: n,
|
|
91
|
+
end_in_after: y !== "delete" ? o.start_in_after - 1 : void 0
|
|
92
|
+
}), o.length !== 0 && l.push({
|
|
93
|
+
action: "equal",
|
|
94
|
+
start_in_before: o.start_in_before,
|
|
95
|
+
end_in_before: o.end_in_before,
|
|
96
|
+
start_in_after: o.start_in_after,
|
|
97
|
+
end_in_after: o.end_in_after
|
|
98
|
+
}), t = o.end_in_before + 1, n = o.end_in_after + 1;
|
|
99
|
+
}
|
|
100
|
+
const d = [];
|
|
101
|
+
let s = { action: "none" };
|
|
102
|
+
const u = (c) => c.action !== "equal" || c.end_in_before - c.start_in_before !== 0 ? !1 : /^\s$/.test(e.slice(c.start_in_before, +c.end_in_before + 1 || 9e9));
|
|
103
|
+
for (let c = 0, p = l.length; c < p; c++) {
|
|
104
|
+
const o = l[c];
|
|
105
|
+
u(o) && s.action === "replace" || o.action === "replace" && s.action === "replace" ? (s.end_in_before = o.end_in_before, s.end_in_after = o.end_in_after) : (d.push(o), s = o);
|
|
106
|
+
}
|
|
107
|
+
return d;
|
|
108
|
+
}
|
|
109
|
+
function I(e, i, t) {
|
|
110
|
+
i = i.slice(e, +i.length + 1 || 9e9);
|
|
111
|
+
let n;
|
|
112
|
+
for (let l = 0, r = i.length; l < r; l++) {
|
|
113
|
+
const a = i[l], d = t(a);
|
|
114
|
+
if (d === !0 && (n = l), d === !1)
|
|
115
|
+
break;
|
|
116
|
+
}
|
|
117
|
+
return n != null ? i.slice(0, +n + 1 || 9e9) : [];
|
|
118
|
+
}
|
|
119
|
+
function M(e, i) {
|
|
120
|
+
let t = "", n = 0;
|
|
121
|
+
const l = i.length;
|
|
122
|
+
for (; !(n >= l); ) {
|
|
123
|
+
const r = I(n, i, U);
|
|
124
|
+
if (n += r.length, r.length !== 0 && (t += "<" + e + ">" + r.join("") + "</" + e + ">"), n >= l)
|
|
125
|
+
break;
|
|
126
|
+
const a = I(n, i, G);
|
|
127
|
+
n += a.length, t += a.join("");
|
|
128
|
+
}
|
|
129
|
+
return t;
|
|
130
|
+
}
|
|
131
|
+
const m = {
|
|
132
|
+
equal: (e, i) => i.slice(e.start_in_before, +e.end_in_before + 1 || 9e9).join(""),
|
|
133
|
+
insert: (e, i, t) => M("ins", t.slice(e.start_in_after, +e.end_in_after + 1 || 9e9)),
|
|
134
|
+
delete: (e, i) => M("del", i.slice(e.start_in_before, +e.end_in_before + 1 || 9e9))
|
|
135
|
+
};
|
|
136
|
+
m.replace = (e, i, t) => m.delete(e, i, t) + m.insert(e, i, t);
|
|
137
|
+
function z(e, i, t) {
|
|
138
|
+
let n = "";
|
|
139
|
+
for (let l = 0, r = t.length; l < r; l++) {
|
|
140
|
+
const a = t[l];
|
|
141
|
+
n += m[a.action](a, e, i);
|
|
142
|
+
}
|
|
143
|
+
return n;
|
|
144
|
+
}
|
|
145
|
+
function Q(e, i) {
|
|
146
|
+
if (e === i)
|
|
147
|
+
return e;
|
|
148
|
+
const t = N(e ?? ""), n = N(i ?? ""), l = $(t, n);
|
|
149
|
+
return z(t, n, l);
|
|
150
|
+
}
|
|
151
|
+
const J = {
|
|
152
|
+
sop: {
|
|
153
|
+
title: (e) => [e.SOPCode, e.Name].filter(Boolean).join(" — "),
|
|
154
|
+
fields: [
|
|
155
|
+
// sop-view-compare.aspx diffs 11 fields: Name, Code, CoreCapabilities, IsActive, Summary,
|
|
156
|
+
// GenericProvisions, FurtherReading, GRPCode, GRPCoreCapabilities, GRPSummary,
|
|
157
|
+
// GRPFurtherReading. `tisName`/GRA* (the pre-existing 13-field config's other fields) are NOT
|
|
158
|
+
// diffed by the legacy page — removed. ReasonForRevision is shown-but-not-diffed — excluded
|
|
159
|
+
// (bug #5).
|
|
160
|
+
{ label: "Name", key: "Name" },
|
|
161
|
+
{ label: "Code", key: "SOPCode" },
|
|
162
|
+
// wire key "SOPCode" (SopReadService.GetSop) — see the draft-mode gap note above
|
|
163
|
+
{ label: "Core capabilities", key: "CoreCapabilities" },
|
|
164
|
+
{ label: "Active", key: "IsActive" },
|
|
165
|
+
{ label: "Summary", key: "Summary", rich: !0 },
|
|
166
|
+
{ label: "Generic Provisions", key: "GenericProvisions", rich: !0 },
|
|
167
|
+
{ label: "Further reading", key: "FurtherReading", rich: !0 },
|
|
168
|
+
{ label: "GRP code", key: "GRPCode" },
|
|
169
|
+
{ label: "GRP core capabilities", key: "GRPCoreCapabilities" },
|
|
170
|
+
// bug #1 — NOT `CoreCapabilities`
|
|
171
|
+
{ label: "GRP summary", key: "GRPSummary", rich: !0 },
|
|
172
|
+
// bug #2
|
|
173
|
+
{ label: "GRP further reading", key: "GRPFurtherReading", rich: !0 }
|
|
174
|
+
// bug #2
|
|
175
|
+
]
|
|
176
|
+
},
|
|
177
|
+
gra: {
|
|
178
|
+
title: (e) => e.Name || "GRA",
|
|
179
|
+
fields: [
|
|
180
|
+
// sop-goras-view-compare.aspx diffs 11 fields; SOP References (derived, see the gap note
|
|
181
|
+
// above) is the one not resolvable here, landing this config at 10.
|
|
182
|
+
{ label: "Hazards", key: "Name" },
|
|
183
|
+
{ label: "Risks", key: "Risks" },
|
|
184
|
+
{ label: "Persons at Risk", key: "PersonAtRisk" },
|
|
185
|
+
{ label: "Additional Controls Required", key: "AdditionalControlsRequired" },
|
|
186
|
+
{ label: "Risk Score Impact", key: "RiskImpact" },
|
|
187
|
+
// wire key for entity `RiskScoreConsequence` — see the draft-mode gap note above
|
|
188
|
+
{ label: "Risk Score Likelihood", key: "RiskLikelihood" },
|
|
189
|
+
// wire key for entity `RiskScoreLikelihood`
|
|
190
|
+
{ label: "Residual Risk Impact", key: "ResidualImpact" },
|
|
191
|
+
// wire key for entity `ResidualRiskConsequence`
|
|
192
|
+
{ label: "Residual Risk Likelihood", key: "ResidualLikelihood" },
|
|
193
|
+
// wire key for entity `ResidualRiskLikelihood`
|
|
194
|
+
{ label: "Active", key: "IsActive" },
|
|
195
|
+
{ label: "ECU Only", key: "IsNaruOnly" }
|
|
196
|
+
// wire key for entity `IsNARUOnly`
|
|
197
|
+
]
|
|
198
|
+
},
|
|
199
|
+
tis: {
|
|
200
|
+
title: (e) => [e.TISCode, e.Name].filter(Boolean).join(" — "),
|
|
201
|
+
fields: [
|
|
202
|
+
// sop-tis-view-compare.aspx diffs 17 fields; SOP References (derived) is the one not
|
|
203
|
+
// resolvable here, landing this config at 16.
|
|
204
|
+
{ label: "Review Group", key: "ReviewGroup" },
|
|
205
|
+
{ label: "Version", key: "Version" },
|
|
206
|
+
{ label: "Approving Body", key: "ApprovingBody" },
|
|
207
|
+
{ label: "Service Line", key: "ServiceLine" },
|
|
208
|
+
{ label: "Capability", key: "Capability" },
|
|
209
|
+
{ label: "Description", key: "Description", rich: !0 },
|
|
210
|
+
{ label: "Specific Legislative Provisions", key: "LegislativeProvisions", rich: !0 },
|
|
211
|
+
{ label: "Pre-Requisite Training / Dependencies", key: "Dependencies", rich: !0 },
|
|
212
|
+
{ label: "National Guidance References", key: "GuidanceReferences", rich: !0 },
|
|
213
|
+
{ label: "Safe System Interfaces", key: "SafeSystem", rich: !0 },
|
|
214
|
+
{ label: "Name", key: "Name" },
|
|
215
|
+
{ label: "Code", key: "TISCode" },
|
|
216
|
+
{ label: "Review Date", key: "ReviewDue" },
|
|
217
|
+
// wire key for entity `ReviewDate` (stored as String) — see the draft-mode gap note above
|
|
218
|
+
{ label: "Active", key: "IsActive" },
|
|
219
|
+
{ label: "Mandatory Frequency", key: "Frequency" },
|
|
220
|
+
// raw lookup id (SOPTISFrequencyID), NOT resolved display text — legacy resolves it via a DB lookup this record shape doesn't carry
|
|
221
|
+
{ label: "Mandatory Re-certification", key: "Recert" }
|
|
222
|
+
// raw lookup id (SOPTISRecertID), NOT resolved display text — see above
|
|
223
|
+
]
|
|
224
|
+
},
|
|
225
|
+
eds: {
|
|
226
|
+
title: (e) => [e.EDSCode, e.Name].filter(Boolean).join(" — "),
|
|
227
|
+
fields: [
|
|
228
|
+
// sop-eds-view-compare.aspx diffs 30 fields once the Active-row duplicate is collapsed to one
|
|
229
|
+
// and the commented-out IsNaruOnly row is included (bug #3). 14 of the 30 are rich. The last
|
|
230
|
+
// 13 (CorrespondingComponents .. AdditionalNotes) are verified only against the Core.Data
|
|
231
|
+
// entity, not the live API response — see the "eds content fields not yet projected" gap note
|
|
232
|
+
// above.
|
|
233
|
+
{ label: "Name", key: "Name" },
|
|
234
|
+
{ label: "Code", key: "EDSCode" },
|
|
235
|
+
{ label: "Review Group", key: "ReviewGroup" },
|
|
236
|
+
{ label: "Version", key: "Version" },
|
|
237
|
+
{ label: "Approving Body", key: "ApprovingBody" },
|
|
238
|
+
{ label: "Review Due By", key: "ReviewDue" },
|
|
239
|
+
{ label: "Service Line", key: "ServiceLine" },
|
|
240
|
+
{ label: "Summary", key: "Summary", rich: !0 },
|
|
241
|
+
{ label: "Active", key: "IsActive" },
|
|
242
|
+
// bug #3 — appears once, not twice
|
|
243
|
+
{ label: "ECU Only", key: "IsNaruOnly" },
|
|
244
|
+
// bug #3 — legacy comments this row out; included as a real edited field
|
|
245
|
+
{ label: "Personal Issue", key: "PersonalIssue" },
|
|
246
|
+
{ label: "Is Personal Issue - can it be re-issued? Only", key: "PersonalReIssue" },
|
|
247
|
+
{ label: "Is a specific Make and Model required for interoperability?", key: "ReqInteroperability" },
|
|
248
|
+
{ label: "Replacement Schedule/Depreciation", key: "ReplacementSchedule" },
|
|
249
|
+
{ label: "Buying Framework reference", key: "BuyingFramework" },
|
|
250
|
+
{ label: "Approximate Asset Value (per item ex VAT)", key: "AssetValue" },
|
|
251
|
+
{ label: "Minimum Quantity Information", key: "MinimumQuantity" },
|
|
252
|
+
{ label: "Corresponding Components", key: "CorrespondingComponents", rich: !0 },
|
|
253
|
+
{ label: "Conformity Standards", key: "ConformityStandards", rich: !0 },
|
|
254
|
+
// legacy label typo "Confirmity Standards" corrected; key spelling was always correct on the entity
|
|
255
|
+
{ label: "Regulatory Regime", key: "RegulatoryRegime", rich: !0 },
|
|
256
|
+
{ label: "Corresponding PPE", key: "CorrespondingPPE", rich: !0 },
|
|
257
|
+
{ label: "Summary of Training Requirement", key: "TrainingRequirement", rich: !0 },
|
|
258
|
+
{ label: "Summary of Inspection Regime", key: "InspectionRegime", rich: !0 },
|
|
259
|
+
{ label: "Mandatory Maintenance/Servicing Requirements", key: "ServicingRequirements", rich: !0 },
|
|
260
|
+
{ label: "Mandatory Records", key: "MandatoryRecords", rich: !0 },
|
|
261
|
+
{ label: "Failure/Defect Reporting Requirement", key: "FalureReporting", rich: !0 },
|
|
262
|
+
// entity typo "Falure" preserved — see Core.Data/SOP/SOPEquipment.vb
|
|
263
|
+
{ label: "Storage Requirements", key: "StorageRequirements", rich: !0 },
|
|
264
|
+
{ label: "Cleaning/Decontamination Guidance", key: "CleaningGuidance", rich: !0 },
|
|
265
|
+
{ label: "Reference for Manufacturer's Guidance", key: "ManufacturersGuidance", rich: !0 },
|
|
266
|
+
{ label: "Additional Notes", key: "AdditionalNotes", rich: !0 }
|
|
267
|
+
]
|
|
268
|
+
},
|
|
269
|
+
grp: {
|
|
270
|
+
title: (e) => e.Name || "GRP",
|
|
271
|
+
fields: [
|
|
272
|
+
// sop-grp-view-compare.aspx diffs Name/Comments/Active/ECU Only/SOP References (5); SOP
|
|
273
|
+
// References (derived) is not resolvable here. The 4 fields the legacy page comments out
|
|
274
|
+
// (RescuePlan/PotentialTriggers/Competencies/EquipmentPPE) are included per bug #4, landing
|
|
275
|
+
// this config at 8.
|
|
276
|
+
{ label: "Name", key: "Name" },
|
|
277
|
+
{ label: "Comments", key: "Comments", rich: !0 },
|
|
278
|
+
{ label: "Rescue Plan", key: "RescuePlan", rich: !0 },
|
|
279
|
+
// bug #4 — commented out in the legacy page; included for entity parity
|
|
280
|
+
{ label: "Potential Triggers", key: "PotentialTriggers", rich: !0 },
|
|
281
|
+
// bug #4
|
|
282
|
+
{ label: "Competencies", key: "Competencies", rich: !0 },
|
|
283
|
+
// bug #4
|
|
284
|
+
{ label: "Equipment PPE", key: "EquipmentPPE", rich: !0 },
|
|
285
|
+
// bug #4
|
|
286
|
+
{ label: "Active", key: "IsActive" },
|
|
287
|
+
{ label: "ECU Only", key: "IsNARUOnly" }
|
|
288
|
+
]
|
|
289
|
+
},
|
|
290
|
+
activity: {
|
|
291
|
+
title: (e) => e.Name || "Activity",
|
|
292
|
+
fields: [
|
|
293
|
+
// sop-activities-view-compare.aspx diffs 7 fields (Name, Controls, Active, ECU Only, Minimum
|
|
294
|
+
// PPE, Supporting Equipment, SOP References). Minimum PPE/Supporting Equipment (junction-table
|
|
295
|
+
// derived — GetPPEList/GetSupportingEquipmentList) and SOP References (derived) have no
|
|
296
|
+
// equivalent on SOPActivity/SOPActivityAmend (Core.Data/SOP/SOPActivity.vb even has the
|
|
297
|
+
// matching ID-array properties commented out) or on SopReadService's Activity reads — omitted,
|
|
298
|
+
// landing this config at 4.
|
|
299
|
+
{ label: "Name", key: "Name" },
|
|
300
|
+
{ label: "Activity content", key: "ActivityContent", rich: !0 },
|
|
301
|
+
{ label: "Active", key: "IsActive" },
|
|
302
|
+
// not present on the draft/amend read shape — see the draft-mode gap note above
|
|
303
|
+
{ label: "ECU Only", key: "IsNaruOnly" }
|
|
304
|
+
// not present on the draft/amend read shape — see the draft-mode gap note above
|
|
305
|
+
]
|
|
306
|
+
},
|
|
307
|
+
appendix: {
|
|
308
|
+
title: (e) => e.Name || "Appendix",
|
|
309
|
+
fields: [
|
|
310
|
+
// sop-appendix-view-compare.aspx diffs exactly 4 fields: Name, PageContents, Active, ECU Only.
|
|
311
|
+
{ label: "Name", key: "Name" },
|
|
312
|
+
{ label: "Content", key: "PageContents", rich: !0 },
|
|
313
|
+
{ label: "Active", key: "IsActive" },
|
|
314
|
+
{ label: "ECU Only", key: "IsNaruOnly" }
|
|
315
|
+
// wire key for entity `IsNARUOnly` — see the draft-mode gap note above
|
|
316
|
+
]
|
|
317
|
+
}
|
|
318
|
+
};
|
|
319
|
+
function w(e) {
|
|
320
|
+
return e == null ? !1 : String(e).replace(/<[^>]*>/g, "").replace(/ /g, " ").trim().length > 0;
|
|
321
|
+
}
|
|
322
|
+
function ue(e, i, t = {}, n = null) {
|
|
323
|
+
const l = J[e];
|
|
324
|
+
if (!l || !i)
|
|
325
|
+
return { title: "", sections: [] };
|
|
326
|
+
const r = { ...i, ...t }, a = n ? { ...n, ...t } : null, d = l.fields.map((s) => {
|
|
327
|
+
const u = r[s.key];
|
|
328
|
+
if (!a)
|
|
329
|
+
return w(u) ? { label: s.label, value: u, rich: !!s.rich } : null;
|
|
330
|
+
const c = a[s.key];
|
|
331
|
+
return !w(u) && !w(c) ? null : {
|
|
332
|
+
label: s.label,
|
|
333
|
+
value: Q(String(u ?? ""), String(c ?? "")),
|
|
334
|
+
rich: !!s.rich,
|
|
335
|
+
// original field richness — the modal uses it to pre-wrap plain diffs
|
|
336
|
+
diff: !0
|
|
337
|
+
};
|
|
338
|
+
}).filter(Boolean);
|
|
339
|
+
return { title: l.title(n || i), sections: d };
|
|
340
|
+
}
|
|
341
|
+
const K = { class: "flex flex-col h-full overflow-hidden" }, X = { class: "text-style-sub-header font-medium text-app-950 leading-[1.3]" }, Y = {
|
|
342
|
+
key: 0,
|
|
343
|
+
"data-testid": "preview-diff-legend",
|
|
344
|
+
class: "border-b border-steel-300 px-6 py-[10px] flex items-center gap-[16px] text-[12px] text-[#697277] shrink-0"
|
|
345
|
+
}, Z = /* @__PURE__ */ V('<span class="font-semibold" data-v-e4d41bb0>Unpublished draft changes</span><span class="flex items-center gap-[5px]" data-v-e4d41bb0><span class="inline-block w-[14px] h-[10px] rounded-[2px]" style="background-color:#d4fcbc;" data-v-e4d41bb0></span>Added</span><span class="flex items-center gap-[5px]" data-v-e4d41bb0><span class="inline-block w-[14px] h-[10px] rounded-[2px]" style="background-color:#fbb6c2;" data-v-e4d41bb0></span>Removed</span>', 3), ee = {
|
|
346
|
+
key: 0,
|
|
347
|
+
"data-testid": "preview-diff-loading",
|
|
348
|
+
class: "italic"
|
|
349
|
+
}, te = { class: "flex-1 min-h-0 overflow-y-auto px-6 py-5" }, ie = {
|
|
350
|
+
key: 0,
|
|
351
|
+
"data-testid": "preview-empty",
|
|
352
|
+
class: "text-[14px] text-[#697277]"
|
|
353
|
+
}, ne = {
|
|
354
|
+
key: 1,
|
|
355
|
+
class: "flex flex-col gap-6"
|
|
356
|
+
}, le = { class: "font-semibold text-[13px] text-[#326d68] leading-[1.2] mb-[6px]" }, ae = ["innerHTML"], re = ["innerHTML"], se = {
|
|
357
|
+
key: 2,
|
|
358
|
+
class: "text-[15px] text-black-950 leading-[1.5] whitespace-pre-wrap"
|
|
359
|
+
}, oe = {
|
|
360
|
+
__name: "SopCompare",
|
|
361
|
+
props: {
|
|
362
|
+
title: { type: String, default: "" },
|
|
363
|
+
sections: { type: Array, default: () => [] },
|
|
364
|
+
loading: { type: Boolean, default: !1 }
|
|
365
|
+
},
|
|
366
|
+
setup(e) {
|
|
367
|
+
const i = e, t = q(() => i.sections.some((n) => n.diff));
|
|
368
|
+
return (n, l) => (f(), h("div", K, [
|
|
369
|
+
R("p", X, x(e.title), 1),
|
|
370
|
+
t.value || e.loading ? (f(), h("div", Y, [
|
|
371
|
+
Z,
|
|
372
|
+
e.loading ? (f(), h("span", ee, "Loading changes…")) : S("", !0)
|
|
373
|
+
])) : S("", !0),
|
|
374
|
+
R("div", te, [
|
|
375
|
+
e.sections.length ? (f(), h("div", ne, [
|
|
376
|
+
(f(!0), h(L, null, D(e.sections, (r, a) => (f(), h("section", {
|
|
377
|
+
key: a,
|
|
378
|
+
"data-testid": "preview-section"
|
|
379
|
+
}, [
|
|
380
|
+
R("p", le, x(r.label), 1),
|
|
381
|
+
r.diff ? (f(), h("div", {
|
|
382
|
+
key: 0,
|
|
383
|
+
class: F(["preview-content text-[15px] text-black-950 leading-[1.5]", { "whitespace-pre-wrap": !r.rich }]),
|
|
384
|
+
innerHTML: r.value
|
|
385
|
+
}, null, 10, ae)) : r.rich ? (f(), h("div", {
|
|
386
|
+
key: 1,
|
|
387
|
+
class: "preview-content text-[15px] text-black-950 leading-[1.5]",
|
|
388
|
+
innerHTML: r.value
|
|
389
|
+
}, null, 8, re)) : (f(), h("p", se, x(r.value), 1))
|
|
390
|
+
]))), 128))
|
|
391
|
+
])) : (f(), h("p", ie, " There is no content to preview yet. "))
|
|
392
|
+
])
|
|
393
|
+
]));
|
|
394
|
+
}
|
|
395
|
+
}, fe = /* @__PURE__ */ B(oe, [["__scopeId", "data-v-e4d41bb0"]]);
|
|
396
|
+
export {
|
|
397
|
+
fe as SopCompare,
|
|
398
|
+
ue as buildPreview,
|
|
399
|
+
w as hasContent,
|
|
400
|
+
Q as htmlDiff
|
|
401
|
+
};
|