@assemblyvoting/ui-library 1.3.35 → 1.3.36

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.js CHANGED
@@ -1,4 +1,4 @@
1
- import { unref as Z2, getCurrentScope as nk, onScopeDispose as rk, watch as e2, ref as F, computed as g, onMounted as v2, onUnmounted as lk, h as j2, Transition as N2, withDirectives as S2, vShow as X2, defineComponent as P, openBlock as u, createElementBlock as d, createBlock as q, resolveDynamicComponent as Oa, withCtx as $, renderSlot as K, resolveComponent as M, normalizeClass as j, createCommentVNode as x, createTextVNode as c2, toDisplayString as V, createElementVNode as o, createVNode as z, normalizeStyle as H2, reactive as T9, provide as D9, Fragment as R, renderList as X, inject as I9, pushScopeId as T2, popScopeId as D2, useCssVars as ok, mergeProps as fk, withModifiers as A2, withKeys as B9, getCurrentInstance as uk, nextTick as mk, vModelText as P9 } from "vue";
1
+ import { unref as Z2, getCurrentScope as nk, onScopeDispose as rk, watch as c2, ref as F, computed as g, onMounted as v2, onUnmounted as lk, h as j2, Transition as N2, withDirectives as S2, vShow as X2, defineComponent as P, openBlock as u, createElementBlock as d, createBlock as q, resolveDynamicComponent as Oa, withCtx as $, renderSlot as K, resolveComponent as M, normalizeClass as j, createCommentVNode as x, createTextVNode as e2, toDisplayString as V, createElementVNode as o, createVNode as z, normalizeStyle as H2, reactive as T9, provide as D9, Fragment as R, renderList as X, inject as I9, pushScopeId as T2, popScopeId as D2, useCssVars as ok, mergeProps as fk, withModifiers as A2, withKeys as B9, getCurrentInstance as uk, nextTick as mk, vModelText as P9 } from "vue";
2
2
  var n2 = "top", m2 = "bottom", d2 = "right", r2 = "left", B4 = "auto", x1 = [n2, m2, d2, r2], J2 = "start", z1 = "end", dk = "clippingParents", O9 = "viewport", u1 = "popper", vk = "reference", ja = /* @__PURE__ */ x1.reduce(function(c, a) {
3
3
  return c.concat([a + "-" + J2, a + "-" + z1]);
4
4
  }, []), j9 = /* @__PURE__ */ [].concat(x1, [B4]).reduce(function(c, a) {
@@ -954,7 +954,7 @@ function V4(...c) {
954
954
  Array.isArray(e) || (e = [e]), Array.isArray(i) || (i = [i]);
955
955
  const s = [], n = () => {
956
956
  s.forEach((f) => f()), s.length = 0;
957
- }, r = (f, v, p, h) => (f.addEventListener(v, p, h), () => f.removeEventListener(v, p, h)), l = e2(() => [m1(a), f3(t)], ([f, v]) => {
957
+ }, r = (f, v, p, h) => (f.addEventListener(v, p, h), () => f.removeEventListener(v, p, h)), l = c2(() => [m1(a), f3(t)], ([f, v]) => {
958
958
  n(), f && s.push(...e.flatMap((p) => i.map((h) => r(f, p, h, v))));
959
959
  }, { immediate: !0, flush: "post" }), m = () => {
960
960
  l(), n();
@@ -1275,7 +1275,7 @@ const a9 = {
1275
1275
  }), lk(() => {
1276
1276
  var H;
1277
1277
  (H = s.value) == null || H.destroy(), s.value = void 0;
1278
- }), e2(n, (H) => {
1278
+ }), c2(n, (H) => {
1279
1279
  var y;
1280
1280
  if (H === !1) {
1281
1281
  e.onClosed !== void 0 && e.onClosed();
@@ -13467,7 +13467,7 @@ const VD = P({
13467
13467
  title: s.value
13468
13468
  })
13469
13469
  );
13470
- e2(
13470
+ c2(
13471
13471
  n,
13472
13472
  (l) => {
13473
13473
  if (!l)
@@ -13539,7 +13539,7 @@ const VD = P({
13539
13539
  "data-test": "btn-icon"
13540
13540
  }, null, 8, ["icon"])) : x("", !0),
13541
13541
  K(i.$slots, "default", {}, () => [
13542
- c2(V(c.label), 1)
13542
+ e2(V(c.label), 1)
13543
13543
  ], !0),
13544
13544
  c.iconRight ? (u(), q(s, {
13545
13545
  key: 1,
@@ -14762,15 +14762,15 @@ const PI = /* @__PURE__ */ I(BI, [["__scopeId", "data-v-0cc3f6d1"]]), OI = {
14762
14762
  ])) : (u(), d("div", WI, [
14763
14763
  o("div", GI, V(n.value.primary), 1),
14764
14764
  o("div", YI, [
14765
- c2(V(n.value.secondary.start) + " ", 1),
14765
+ e2(V(n.value.secondary.start) + " ", 1),
14766
14766
  o("strong", null, V(n.value.secondary.strong), 1),
14767
- c2(" " + V(n.value.secondary.end), 1)
14767
+ e2(" " + V(n.value.secondary.end), 1)
14768
14768
  ])
14769
14769
  ]))
14770
14770
  ], 8, $I)
14771
14771
  ], 34),
14772
14772
  c.disableAcceptedFormats ? x("", !0) : (u(), d("p", QI, [
14773
- c2(V(n.value.acceptedFormats) + " ", 1),
14773
+ e2(V(n.value.acceptedFormats) + " ", 1),
14774
14774
  o("em", ZI, V(p.value), 1)
14775
14775
  ])),
14776
14776
  s.value.length ? (u(), d("div", XI, [
@@ -14793,7 +14793,7 @@ const PI = /* @__PURE__ */ I(BI, [["__scopeId", "data-v-0cc3f6d1"]]), OI = {
14793
14793
  }))
14794
14794
  ]),
14795
14795
  o("p", aB, [
14796
- c2(V(E.name) + " ", 1),
14796
+ e2(V(E.name) + " ", 1),
14797
14797
  o("em", null, V(Math.round(E.size / 1e3) + "kb"), 1)
14798
14798
  ])
14799
14799
  ]),
@@ -14884,7 +14884,7 @@ const vB = /* @__PURE__ */ I(dB, [["__scopeId", "data-v-3122c494"]]), pB = (c) =
14884
14884
  }, s = () => {
14885
14885
  a("update", e.value, i.value);
14886
14886
  };
14887
- return e2(
14887
+ return c2(
14888
14888
  () => e.checked,
14889
14889
  () => {
14890
14890
  i.value = e.checked;
@@ -14901,7 +14901,7 @@ const vB = /* @__PURE__ */ I(dB, [["__scopeId", "data-v-3122c494"]]), pB = (c) =
14901
14901
  disabled: c.disabled
14902
14902
  }, null, 40, VB),
14903
14903
  zB,
14904
- c2(" " + V(c.value), 1)
14904
+ e2(" " + V(c.value), 1)
14905
14905
  ], 10, hB));
14906
14906
  }
14907
14907
  });
@@ -15338,7 +15338,7 @@ const GB = /* @__PURE__ */ I(WB, [["__scopeId", "data-v-e8fb623b"]]), YB = ["hre
15338
15338
  icon: `fa-solid fa-${c.icon}`,
15339
15339
  "data-test": "option-icon"
15340
15340
  }, null, 8, ["icon"])) : x("", !0),
15341
- c2(" " + V(c.optionLabel), 1)
15341
+ e2(" " + V(c.optionLabel), 1)
15342
15342
  ], 10, YB);
15343
15343
  };
15344
15344
  }
@@ -15384,7 +15384,7 @@ const ZB = /* @__PURE__ */ I(QB, [["__scopeId", "data-v-f770cea1"]]), XB = ["dis
15384
15384
  emits: ["update:waiting"],
15385
15385
  setup(c, { emit: a }) {
15386
15386
  const e = c, i = F(!1);
15387
- e2(i, (r) => a("update:waiting", r));
15387
+ c2(i, (r) => a("update:waiting", r));
15388
15388
  const t = g(() => {
15389
15389
  if (!i.value)
15390
15390
  switch (e.variant) {
@@ -15427,7 +15427,7 @@ const ZB = /* @__PURE__ */ I(QB, [["__scopeId", "data-v-f770cea1"]]), XB = ["dis
15427
15427
  })
15428
15428
  ], !0),
15429
15429
  K(r.$slots, "waitingLabel", {}, () => [
15430
- c2("Working...")
15430
+ e2("Working...")
15431
15431
  ], !0)
15432
15432
  ], 64)) : K(r.$slots, "default", { key: 0 }, () => [
15433
15433
  z(m, {
@@ -15485,15 +15485,15 @@ const KB = /* @__PURE__ */ I(JB, [["__scopeId", "data-v-11042fa9"]]), cP = { cla
15485
15485
  }, f = () => {
15486
15486
  a("update", t.value, i.value);
15487
15487
  };
15488
- return e2(
15488
+ return c2(
15489
15489
  () => e.options,
15490
15490
  () => n()
15491
- ), e2(
15491
+ ), c2(
15492
15492
  () => e.selected,
15493
15493
  () => {
15494
15494
  t.value = e.selected, r(e.selected);
15495
15495
  }
15496
- ), e2(
15496
+ ), c2(
15497
15497
  () => e.disabled,
15498
15498
  () => l()
15499
15499
  ), (v, p) => (u(), d("div", cP, [
@@ -15623,7 +15623,7 @@ const lP = /* @__PURE__ */ I(rP, [["__scopeId", "data-v-607d90fc"]]), oP = {
15623
15623
  class: j(`AVTimedCard--help-text ${c.timeout - i.value <= c.customWarningTime && "AVTimedCard--help-text-warning"}`),
15624
15624
  "data-test": "help-text"
15625
15625
  }, [
15626
- c2(V(c.expirationMessage), 1),
15626
+ e2(V(c.expirationMessage), 1),
15627
15627
  o("strong", null, V(m.value), 1)
15628
15628
  ], 2)
15629
15629
  ], 64));
@@ -15705,13 +15705,13 @@ const zP = /* @__PURE__ */ I(VP, [["__scopeId", "data-v-9a6218e9"]]), HP = { cla
15705
15705
  }, t = (n) => a.done ? a.done.includes(n) : !1;
15706
15706
  v2(() => {
15707
15707
  i();
15708
- }), e2(
15708
+ }), c2(
15709
15709
  () => a.steps,
15710
15710
  () => i()
15711
- ), e2(
15711
+ ), c2(
15712
15712
  () => a.active,
15713
15713
  () => i()
15714
- ), e2(
15714
+ ), c2(
15715
15715
  () => a.done,
15716
15716
  () => i()
15717
15717
  );
@@ -16072,12 +16072,12 @@ const $P = /* @__PURE__ */ I(FP, [["__scopeId", "data-v-823fd4bf"]]), RP = { cla
16072
16072
  }, l = () => {
16073
16073
  a("update", i.value, t.value);
16074
16074
  };
16075
- return e2(
16075
+ return c2(
16076
16076
  () => e.initialValue,
16077
16077
  () => {
16078
16078
  i.value = e.initialValue, s(e.initialValue);
16079
16079
  }
16080
- ), e2(
16080
+ ), c2(
16081
16081
  () => e.disabled,
16082
16082
  () => {
16083
16083
  n();
@@ -16265,7 +16265,7 @@ const eO = /* @__PURE__ */ I(cO, [["__scopeId", "data-v-71e09fe3"]]), aO = ["hre
16265
16265
  z(r, { icon: "fa-solid fa-location-pin" })
16266
16266
  ]),
16267
16267
  o("span", fO, [
16268
- c2(V(c.countyNameLabel), 1),
16268
+ e2(V(c.countyNameLabel), 1),
16269
16269
  o("strong", null, V(c.countyName), 1)
16270
16270
  ])
16271
16271
  ]),
@@ -16274,7 +16274,7 @@ const eO = /* @__PURE__ */ I(cO, [["__scopeId", "data-v-71e09fe3"]]), aO = ["hre
16274
16274
  z(r, { icon: "fa-solid fa-file-circle-plus" })
16275
16275
  ]),
16276
16276
  o("span", dO, [
16277
- c2(V(c.createdAtLabel), 1),
16277
+ e2(V(c.createdAtLabel), 1),
16278
16278
  o("strong", null, V(c.createdAt), 1)
16279
16279
  ])
16280
16280
  ]),
@@ -16283,7 +16283,7 @@ const eO = /* @__PURE__ */ I(cO, [["__scopeId", "data-v-71e09fe3"]]), aO = ["hre
16283
16283
  z(r, { icon: "fa-solid fa-pen-to-square" })
16284
16284
  ]),
16285
16285
  o("span", hO, [
16286
- c2(V(c.lastUpdatedLabel), 1),
16286
+ e2(V(c.lastUpdatedLabel), 1),
16287
16287
  o("strong", null, V(c.lastUpdated), 1)
16288
16288
  ])
16289
16289
  ])
@@ -16762,7 +16762,7 @@ const PO = {
16762
16762
  t.value = !0, n.value.scrollIntoView({ behavior: "smooth", block: "center" });
16763
16763
  }));
16764
16764
  };
16765
- return e2(
16765
+ return c2(
16766
16766
  () => i.value.get("highlight-option"),
16767
16767
  (A) => {
16768
16768
  const [O] = A ?? [];
@@ -17470,7 +17470,7 @@ const Hj = /* @__PURE__ */ I(zj, [["__scopeId", "data-v-083c32ae"]]), Mj = {
17470
17470
  o("div", Aj, [
17471
17471
  c.minMarks === c.maxMarks ? (u(), d("div", Nj, V(`${e.value.select_exactly.before} ${c.minMarks} ${e.value.select_exactly.after}`), 1)) : (u(), d("div", Sj, V(`${e.value.select_multiple.before} ${c.minMarks} ${e.value.select_multiple.mid} ${c.maxMarks} ${e.value.select_exactly.after}`), 1)),
17472
17472
  c.chosenCount > 0 ? (u(), d("div", wj, [
17473
- c2(V(e.value.selected) + " ", 1),
17473
+ e2(V(e.value.selected) + " ", 1),
17474
17474
  o("b", null, V(c.chosenCount), 1)
17475
17475
  ])) : x("", !0)
17476
17476
  ])
@@ -17770,19 +17770,19 @@ const Gj = /* @__PURE__ */ I(Wj, [["__scopeId", "data-v-3516a383"]]), Yj = {
17770
17770
  return (i, t) => (u(), d("div", Qj, [
17771
17771
  o("div", Zj, [
17772
17772
  o("span", null, [
17773
- c2(V(e.value.total) + " ", 1),
17773
+ e2(V(e.value.total) + " ", 1),
17774
17774
  o("strong", null, V(c.assignedWeight + c.unusedWeight), 1)
17775
17775
  ])
17776
17776
  ]),
17777
17777
  o("div", Xj, [
17778
17778
  o("span", null, [
17779
- c2(V(e.value.assigned) + " ", 1),
17779
+ e2(V(e.value.assigned) + " ", 1),
17780
17780
  o("strong", null, V(c.assignedWeight), 1)
17781
17781
  ])
17782
17782
  ]),
17783
17783
  o("div", Jj, [
17784
17784
  o("span", null, [
17785
- c2(V(e.value.unused) + " ", 1),
17785
+ e2(V(e.value.unused) + " ", 1),
17786
17786
  o("strong", null, V(c.unusedWeight), 1)
17787
17787
  ])
17788
17788
  ])
@@ -18135,7 +18135,7 @@ const AE = /* @__PURE__ */ I(CE, [["render", yE], ["__scopeId", "data-v-1923eca8
18135
18135
  },
18136
18136
  setup(c) {
18137
18137
  const a = c;
18138
- return e2(
18138
+ return c2(
18139
18139
  () => a.modalActive,
18140
18140
  () => {
18141
18141
  a.modalActive && (document.body.style.overflowY = "hidden"), a.modalActive || (document.body.style.overflowY = "scroll");
@@ -18324,7 +18324,7 @@ const DE = {
18324
18324
  var _;
18325
18325
  return (_ = e.contest.question) == null ? void 0 : _[e.locale];
18326
18326
  }), p = g(() => e.contest.options), h = g(() => e.contest), L = g(() => DE[e.locale]);
18327
- e2(h, (_, C) => {
18327
+ c2(h, (_, C) => {
18328
18328
  var N;
18329
18329
  C && _ && _.reference !== C.reference && ((N = document.getElementById("content")) == null || N.focus(), C.searchForm && (n.value.value = ""));
18330
18330
  });
@@ -19044,11 +19044,7 @@ const lq = {
19044
19044
  "setContestSelection"
19045
19045
  ],
19046
19046
  setup(c, { emit: a }) {
19047
- const e = c, i = F(null), t = F({
19048
- optionSelections: [],
19049
- multiplier: 0,
19050
- explicitBlank: !1
19051
- }), s = g(() => lq[e.locale]), n = g(() => e.ballotActiveState), r = g(() => e.contestSelection.piles), l = g(
19047
+ const e = c, i = F(null), t = F(null), s = g(() => lq[e.locale]), n = g(() => e.ballotActiveState), r = g(() => e.contestSelection.piles), l = g(
19052
19048
  () => r.value.reduce((H, y) => H - y.multiplier, e.weight)
19053
19049
  ), m = g(
19054
19050
  () => {
@@ -19096,17 +19092,23 @@ const lq = {
19096
19092
  }, E = (H) => {
19097
19093
  t.value = { ...r.value[H] }, i.value = H, a("setBallotActiveState", "ballot");
19098
19094
  };
19099
- return e2(p, (H) => a("update:complete", H)), e2(n, (H) => a("setBallotActiveState", H)), e2(L, () => {
19095
+ return c2(p, (H) => a("update:complete", H)), c2(n, (H) => a("setBallotActiveState", H)), c2(L, () => {
19100
19096
  t.value && (t.value.multiplier = Math.max(
19101
19097
  0,
19102
19098
  Math.min(L.value, m.value)
19103
19099
  ));
19100
+ }), c2(m, () => {
19101
+ t.value = {
19102
+ optionSelections: [],
19103
+ multiplier: m.value,
19104
+ explicitBlank: !1
19105
+ }, console.log("watch", t.value);
19104
19106
  }), v2(() => {
19105
- console.log("pre", t.value), t.value = {
19107
+ t.value = {
19106
19108
  optionSelections: [],
19107
19109
  multiplier: m.value,
19108
19110
  explicitBlank: !1
19109
- }, console.log("pos", t.value), b.value || N();
19111
+ }, console.log("mount", t.value), b.value || N();
19110
19112
  }), (H, y) => {
19111
19113
  var f2;
19112
19114
  const A = M("AVSplitWizardHeader"), O = M("AVBallot"), Q = M("AVPileSummary"), U = M("AVSplitWeightHelper"), t2 = M("AVIcon");
@@ -19216,11 +19218,11 @@ const lq = {
19216
19218
  icon: "circle-check",
19217
19219
  class: "AVSplitHelper--overview-success-icon"
19218
19220
  }),
19219
- c2(" " + V(s.value.overview.all_ballots_assigned), 1)
19221
+ e2(" " + V(s.value.overview.all_ballots_assigned), 1)
19220
19222
  ])) : (u(), d("div", Aq, [
19221
19223
  o("p", Nq, [
19222
19224
  o("strong", null, V(l.value), 1),
19223
- c2(" " + V(s.value.overview.ballots_left), 1)
19225
+ e2(" " + V(s.value.overview.ballots_left), 1)
19224
19226
  ]),
19225
19227
  o("button", {
19226
19228
  key: "newSelection",
@@ -19229,7 +19231,7 @@ const lq = {
19229
19231
  onClick: D
19230
19232
  }, [
19231
19233
  z(t2, { icon: "file-circle-plus" }),
19232
- c2(" " + V(s.value.overview.new_ballot_selection), 1)
19234
+ e2(" " + V(s.value.overview.new_ballot_selection), 1)
19233
19235
  ], 8, Sq)
19234
19236
  ])),
19235
19237
  (u(!0), d(R, null, X(r.value, (W, i2) => (u(), d("article", {
@@ -19266,7 +19268,7 @@ const lq = {
19266
19268
  };
19267
19269
  }
19268
19270
  });
19269
- const Tq = /* @__PURE__ */ I(_q, [["__scopeId", "data-v-aa6aed5c"]]);
19271
+ const Tq = /* @__PURE__ */ I(_q, [["__scopeId", "data-v-88420d3b"]]);
19270
19272
  var Dq = {}, Iq = /* @__PURE__ */ o("a", { href: "#" }, "LOGO", -1), Bq = { class: "flex items-center" }, Pq = { class: "flex flex-col items-center justify-center p-3 w-full" }, Oq = /* @__PURE__ */ o("h2", { class: "mb-4" }, "Election Name", -1), jq = /* @__PURE__ */ o("div", null, [
19271
19273
  /* @__PURE__ */ o("p", null, " Curabitur et augue in nibh mollis faucibus. Mauris semper cursus felis, vitae porta dui faucibus eu. Suspendisse potenti. Ut sit amet arcu non quam eleifend interdum. Sed vitae sagittis nunc. Nullam faucibus mattis mauris sed tincidunt. Nulla convallis lobortis semper. Curabitur varius neque vel sapien mattis mattis. Integer mollis fringilla nibh, facilisis rutrum risus. In volutpat sem in lacus vestibulum, sollicitudin efficitur dui luctus. Donec fringilla diam tortor, posuere lacinia erat consequat ut. Mauris nec nibh tortor. "),
19272
19274
  /* @__PURE__ */ o("br"),