@zealsolutions/zeal-ui 1.0.0-alpha.336 → 1.0.0-alpha.338

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.
@@ -1,6 +1,6 @@
1
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
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);
3
+ const T = (e) => e === ">", A = (e) => e === "<", P = (e) => /^\s+$/.test(e), M = (e) => /^\s*<[^>]+>\s*$/.test(e), U = (e) => !M(e);
4
4
  class E {
5
5
  constructor(i, t, n) {
6
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;
@@ -13,13 +13,13 @@ function N(e) {
13
13
  const a = e[l];
14
14
  switch (i) {
15
15
  case "tag":
16
- T(a) ? (t += ">", n.push(t), t = "", i = A(a) ? "whitespace" : "char") : t += a;
16
+ T(a) ? (t += ">", n.push(t), t = "", i = P(a) ? "whitespace" : "char") : t += a;
17
17
  break;
18
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);
19
+ A(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
20
  break;
21
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");
22
+ A(a) ? (t && n.push(t), t = "<", i = "tag") : P(a) ? t += a : (t && n.push(t), t = a, i = "char");
23
23
  break;
24
24
  default:
25
25
  throw new Error("Unknown mode " + i);
@@ -30,7 +30,7 @@ function N(e) {
30
30
  function j(e, i, t, n, l, r, a) {
31
31
  let d = n, s = r, u = 0, c = {}, p;
32
32
  for (let o = n; o < l; o++) {
33
- const k = {}, g = e[o], y = t[g];
33
+ const _ = {}, g = e[o], y = t[g];
34
34
  for (let v = 0, O = y.length; v < O; v++) {
35
35
  const b = y[v];
36
36
  if (b < r)
@@ -38,10 +38,10 @@ function j(e, i, t, n, l, r, a) {
38
38
  if (b >= a)
39
39
  break;
40
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 = _);
41
+ const k = c[b - 1] + 1;
42
+ _[b] = k, k > u && (d = o - k + 1, s = b - k + 1, u = k);
43
43
  }
44
- c = k;
44
+ c = _;
45
45
  }
46
46
  return u !== 0 && (p = new E(d, s, u)), p;
47
47
  }
@@ -82,7 +82,7 @@ function $(e, i) {
82
82
  }, a = W(e, i);
83
83
  a.push(new E(e.length, i.length, 0));
84
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()];
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,
88
88
  start_in_before: t,
@@ -106,7 +106,7 @@ function $(e, i) {
106
106
  }
107
107
  return d;
108
108
  }
109
- function I(e, i, t) {
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++) {
@@ -116,22 +116,22 @@ function I(e, i, t) {
116
116
  }
117
117
  return n != null ? i.slice(0, +n + 1 || 9e9) : [];
118
118
  }
119
- function M(e, i) {
119
+ function I(e, i) {
120
120
  let t = "", n = 0;
121
121
  const l = i.length;
122
122
  for (; !(n >= l); ) {
123
- const r = I(n, i, U);
123
+ const r = G(n, i, U);
124
124
  if (n += r.length, r.length !== 0 && (t += "<" + e + ">" + r.join("") + "</" + e + ">"), n >= l)
125
125
  break;
126
- const a = I(n, i, G);
126
+ const a = G(n, i, M);
127
127
  n += a.length, t += a.join("");
128
128
  }
129
129
  return t;
130
130
  }
131
131
  const m = {
132
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))
133
+ insert: (e, i, t) => I("ins", t.slice(e.start_in_after, +e.end_in_after + 1 || 9e9)),
134
+ delete: (e, i) => I("del", i.slice(e.start_in_before, +e.end_in_before + 1 || 9e9))
135
135
  };
136
136
  m.replace = (e, i, t) => m.delete(e, i, t) + m.insert(e, i, t);
137
137
  function z(e, i, t) {
@@ -152,11 +152,15 @@ const J = {
152
152
  sop: {
153
153
  title: (e) => [e.SOPCode, e.Name].filter(Boolean).join(" — "),
154
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).
155
+ // Base 11 fields match sop-view-compare.aspx (Name, Code, CoreCapabilities, IsActive, Summary,
156
+ // GenericProvisions, FurtherReading, GRP*). #282: the SOP's own GRA-section fields
157
+ // (GRACode/GRAOverview/GRAInstructions/GRANotes) are editable SOP content on the SOP edit form
158
+ // with NO other diff path (the standalone `gra` recordType is a different entity), so they are
159
+ // (re)included here even though the legacy page didn't diff them — a deliberate correctness
160
+ // deviation from strict legacy parity. `tisName` stays out (resolved-name convenience field,
161
+ // not editable content). ReasonForRevision is shown-but-not-diffed — excluded (bug #5).
162
+ // NOTE: consumers must normalise the single-record base/amend reads' GORA*→GRA* naming before
163
+ // buildPreview (see #282) — some of those reads return GORACode/GORAOverview/etc.
160
164
  { label: "Name", key: "Name" },
161
165
  { label: "Code", key: "SOPCode" },
162
166
  // wire key "SOPCode" (SopReadService.GetSop) — see the draft-mode gap note above
@@ -170,8 +174,16 @@ const J = {
170
174
  // bug #1 — NOT `CoreCapabilities`
171
175
  { label: "GRP summary", key: "GRPSummary", rich: !0 },
172
176
  // bug #2
173
- { label: "GRP further reading", key: "GRPFurtherReading", rich: !0 }
177
+ { label: "GRP further reading", key: "GRPFurtherReading", rich: !0 },
174
178
  // bug #2
179
+ { label: "GRA code", key: "GRACode" },
180
+ // #282
181
+ { label: "GRA overview", key: "GRAOverview", rich: !0 },
182
+ // #282
183
+ { label: "GRA instructions", key: "GRAInstructions", rich: !0 },
184
+ // #282
185
+ { label: "GRA notes", key: "GRANotes", rich: !0 }
186
+ // #282
175
187
  ]
176
188
  },
177
189
  gra: {