@zealsolutions/zeal-ui 1.0.0-alpha.345 → 1.0.0-alpha.346

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.
@@ -28,26 +28,26 @@ function N(e) {
28
28
  return t && n.push(t), n;
29
29
  }
30
30
  function j(e, i, t, n, l, r, a) {
31
- let u = n, s = r, d = 0, c = {}, p;
31
+ let d = n, s = r, u = 0, c = {}, b;
32
32
  for (let o = n; o < l; o++) {
33
33
  const _ = {}, g = e[o], y = t[g];
34
34
  for (let v = 0, O = y.length; v < O; v++) {
35
- const b = y[v];
36
- if (b < r)
35
+ const p = y[v];
36
+ if (p < r)
37
37
  continue;
38
- if (b >= a)
38
+ if (p >= a)
39
39
  break;
40
- c[b - 1] == null && (c[b - 1] = 0);
41
- const k = c[b - 1] + 1;
42
- _[b] = k, k > d && (u = o - k + 1, s = b - k + 1, d = k);
40
+ c[p - 1] == null && (c[p - 1] = 0);
41
+ const k = c[p - 1] + 1;
42
+ _[p] = k, k > u && (d = o - k + 1, s = p - k + 1, u = k);
43
43
  }
44
44
  c = _;
45
45
  }
46
- return d !== 0 && (p = new E(u, s, d)), p;
46
+ return u !== 0 && (b = new E(d, s, u)), b;
47
47
  }
48
- function C(e, i, t, n, l, r, a, u) {
48
+ function C(e, i, t, n, l, r, a, d) {
49
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, u), u.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, u)), u;
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
51
  }
52
52
  function H(e) {
53
53
  if (e.find_these == null)
@@ -81,7 +81,7 @@ function $(e, i) {
81
81
  "true,true": "none"
82
82
  }, a = W(e, i);
83
83
  a.push(new E(e.length, i.length, 0));
84
- for (let c = 0, p = a.length; c < p; c++) {
84
+ for (let c = 0, b = a.length; c < b; c++) {
85
85
  const o = a[c], _ = t === o.start_in_before, g = n === o.start_in_after, y = r[[_, g].toString()];
86
86
  y !== "none" && l.push({
87
87
  action: y,
@@ -97,21 +97,21 @@ function $(e, i) {
97
97
  end_in_after: o.end_in_after
98
98
  }), t = o.end_in_before + 1, n = o.end_in_after + 1;
99
99
  }
100
- const u = [];
100
+ const d = [];
101
101
  let s = { action: "none" };
102
- const d = (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++) {
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, b = l.length; c < b; c++) {
104
104
  const o = l[c];
105
- d(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) : (u.push(o), s = o);
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
106
  }
107
- return u;
107
+ return d;
108
108
  }
109
109
  function G(e, i, t) {
110
110
  i = i.slice(e, +i.length + 1 || 9e9);
111
111
  let n;
112
112
  for (let l = 0, r = i.length; l < r; l++) {
113
- const a = i[l], u = t(a);
114
- if (u === !0 && (n = l), u === !1)
113
+ const a = i[l], d = t(a);
114
+ if (d === !0 && (n = l), d === !1)
115
115
  break;
116
116
  }
117
117
  return n != null ? i.slice(0, +n + 1 || 9e9) : [];
@@ -331,30 +331,30 @@ const J = {
331
331
  function w(e) {
332
332
  return e == null ? !1 : String(e).replace(/<[^>]*>/g, "").replace(/&nbsp;/g, " ").trim().length > 0;
333
333
  }
334
- function de(e, i, t = {}, n = null) {
334
+ function ue(e, i, t = {}, n = null) {
335
335
  const l = J[e];
336
336
  if (!l || !i)
337
337
  return { title: "", sections: [] };
338
- const r = { ...i, ...t }, a = n ? { ...n, ...t } : null, u = l.fields.map((s) => {
339
- const d = r[s.key];
338
+ const r = { ...i, ...t }, a = n ? { ...n, ...t } : null, d = l.fields.map((s) => {
339
+ const u = r[s.key];
340
340
  if (!a)
341
- return w(d) ? { label: s.label, value: d, rich: !!s.rich } : null;
341
+ return w(u) ? { label: s.label, value: u, rich: !!s.rich } : null;
342
342
  const c = a[s.key];
343
- return !w(d) && !w(c) ? null : {
343
+ return !w(u) && !w(c) ? null : {
344
344
  label: s.label,
345
- value: Q(String(d ?? ""), String(c ?? "")),
345
+ value: Q(String(u ?? ""), String(c ?? "")),
346
346
  rich: !!s.rich,
347
347
  // original field richness — the modal uses it to pre-wrap plain diffs
348
348
  diff: !0
349
349
  };
350
350
  }).filter(Boolean);
351
- return { title: l.title(n || i), sections: u };
351
+ return { title: l.title(n || i), sections: d };
352
352
  }
353
353
  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 = {
354
354
  key: 0,
355
355
  "data-testid": "preview-diff-legend",
356
356
  class: "border-b-[1px] border-steel-300 px-6 py-[10px] flex items-center gap-[16px] text-[12px] text-[#697277] shrink-0"
357
- }, Z = /* @__PURE__ */ V('<span class="font-semibold" data-v-1931b465>Unpublished draft changes</span><span class="flex items-center gap-[5px]" data-v-1931b465><span class="inline-block w-[14px] h-[10px] rounded-[2px]" style="background-color:#d4fcbc;" data-v-1931b465></span>Added</span><span class="flex items-center gap-[5px]" data-v-1931b465><span class="inline-block w-[14px] h-[10px] rounded-[2px]" style="background-color:#fbb6c2;" data-v-1931b465></span>Removed</span>', 3), ee = {
357
+ }, Z = /* @__PURE__ */ V('<span class="font-semibold" data-v-781d71ec>Unpublished draft changes</span><span class="flex items-center gap-[5px]" data-v-781d71ec><span class="inline-block w-[14px] h-[10px] rounded-[2px]" style="background-color:#d4fcbc;" data-v-781d71ec></span>Added</span><span class="flex items-center gap-[5px]" data-v-781d71ec><span class="inline-block w-[14px] h-[10px] rounded-[2px]" style="background-color:#fbb6c2;" data-v-781d71ec></span>Removed</span>', 3), ee = {
358
358
  key: 0,
359
359
  "data-testid": "preview-diff-loading",
360
360
  class: "italic"
@@ -365,7 +365,7 @@ const K = { class: "flex flex-col h-full overflow-hidden" }, X = { class: "text-
365
365
  }, ne = {
366
366
  key: 1,
367
367
  class: "flex flex-col gap-6"
368
- }, le = { class: "font-semibold text-[13px] text-[#326d68] leading-[1.2] mb-[6px]" }, ae = ["innerHTML"], re = ["innerHTML"], se = {
368
+ }, le = { class: "font-semibold text-[13px] text-[#326d68] dark:text-proclusteal-950 leading-[1.2] mb-[6px]" }, ae = ["innerHTML"], re = ["innerHTML"], se = {
369
369
  key: 2,
370
370
  class: "text-[15px] text-black-950 leading-[1.5] whitespace-pre-wrap"
371
371
  }, oe = {
@@ -404,10 +404,10 @@ const K = { class: "flex flex-col h-full overflow-hidden" }, X = { class: "text-
404
404
  ])
405
405
  ]));
406
406
  }
407
- }, fe = /* @__PURE__ */ B(oe, [["__scopeId", "data-v-1931b465"]]);
407
+ }, fe = /* @__PURE__ */ B(oe, [["__scopeId", "data-v-781d71ec"]]);
408
408
  export {
409
409
  fe as SopCompare,
410
- de as buildPreview,
410
+ ue as buildPreview,
411
411
  w as hasContent,
412
412
  Q as htmlDiff
413
413
  };