@updog/data-editor-wc 0.1.53 → 0.1.55

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.
Files changed (4) hide show
  1. package/index.css +1 -1
  2. package/index.d.ts +2 -0
  3. package/index.js +314 -289
  4. package/package.json +1 -1
package/index.js CHANGED
@@ -783,9 +783,9 @@ var e = Object.create, t = Object.defineProperty, n = Object.getOwnPropertyDescr
783
783
  function H(e, t) {
784
784
  z++, ee[z] = e.current, e.current = t;
785
785
  }
786
- var te = B(null), ne = B(null), re = B(null), ie = B(null);
787
- function ae(e, t) {
788
- switch (H(re, t), H(ne, e), H(te, null), t.nodeType) {
786
+ var te = B(null), ne = B(null), U = B(null), re = B(null);
787
+ function ie(e, t) {
788
+ switch (H(U, t), H(ne, e), H(te, null), t.nodeType) {
789
789
  case 9:
790
790
  case 11:
791
791
  e = (e = t.documentElement) && (e = e.namespaceURI) ? Jd(e) : 0;
@@ -803,16 +803,16 @@ var e = Object.create, t = Object.defineProperty, n = Object.getOwnPropertyDescr
803
803
  }
804
804
  V(te), H(te, e);
805
805
  }
806
- function oe() {
807
- V(te), V(ne), V(re);
806
+ function ae() {
807
+ V(te), V(ne), V(U);
808
808
  }
809
- function U(e) {
810
- e.memoizedState !== null && H(ie, e);
809
+ function oe(e) {
810
+ e.memoizedState !== null && H(re, e);
811
811
  var t = te.current, n = Yd(t, e.type);
812
812
  t !== n && (H(ne, e), H(te, n));
813
813
  }
814
814
  function se(e) {
815
- ne.current === e && (V(te), V(ne)), ie.current === e && (V(ie), ap._currentValue = R);
815
+ ne.current === e && (V(te), V(ne)), re.current === e && (V(re), ap._currentValue = R);
816
816
  }
817
817
  var ce, le;
818
818
  function ue(e) {
@@ -2261,7 +2261,7 @@ var e = Object.create, t = Object.defineProperty, n = Object.getOwnPropertyDescr
2261
2261
  var c = a.type;
2262
2262
  gr(a.pendingProps.value, s.value) || (e === null ? e = [c] : e.push(c));
2263
2263
  }
2264
- } else if (a === ie.current) {
2264
+ } else if (a === re.current) {
2265
2265
  if (s = a.alternate, s === null) throw Error(i(387));
2266
2266
  s.memoizedState.memoizedState !== a.memoizedState.memoizedState && (e === null ? e = [ap] : e.push(ap));
2267
2267
  }
@@ -4135,14 +4135,14 @@ var e = Object.create, t = Object.defineProperty, n = Object.getOwnPropertyDescr
4135
4135
  function kc(e, t, n) {
4136
4136
  switch (t.tag) {
4137
4137
  case 3:
4138
- ae(t, t.stateNode.containerInfo), Ui(t, na, e.memoizedState.cache), Li();
4138
+ ie(t, t.stateNode.containerInfo), Ui(t, na, e.memoizedState.cache), Li();
4139
4139
  break;
4140
4140
  case 27:
4141
4141
  case 5:
4142
- U(t);
4142
+ oe(t);
4143
4143
  break;
4144
4144
  case 4:
4145
- ae(t, t.stateNode.containerInfo);
4145
+ ie(t, t.stateNode.containerInfo);
4146
4146
  break;
4147
4147
  case 10:
4148
4148
  Ui(t, t.type, t.memoizedProps.value);
@@ -4199,7 +4199,7 @@ var e = Object.create, t = Object.defineProperty, n = Object.getOwnPropertyDescr
4199
4199
  case 1: return r = t.type, a = Ws(r, t.pendingProps), hc(e, t, r, a, n);
4200
4200
  case 3:
4201
4201
  a: {
4202
- if (ae(t, t.stateNode.containerInfo), e === null) throw Error(i(387));
4202
+ if (ie(t, t.stateNode.containerInfo), e === null) throw Error(i(387));
4203
4203
  r = t.pendingProps;
4204
4204
  var o = t.memoizedState;
4205
4205
  a = o.element, La(e, t), Wa(t, r, null, n);
@@ -4233,12 +4233,12 @@ var e = Object.create, t = Object.defineProperty, n = Object.getOwnPropertyDescr
4233
4233
  t = t.child;
4234
4234
  }
4235
4235
  return t;
4236
- case 26: return fc(e, t), e === null ? (n = If(t.type, null, t.pendingProps, null)) ? t.memoizedState = n : ki || (n = t.type, e = t.pendingProps, r = qd(re.current).createElement(n), r[et] = t, r[tt] = e, Vd(r, n, e), pt(r), t.stateNode = r) : t.memoizedState = If(t.type, e.memoizedProps, t.pendingProps, e.memoizedState), null;
4237
- case 27: return U(t), e === null && ki && (r = t.stateNode = yf(t.type, t.pendingProps, re.current), Di = t, ji = !0, a = Oi, af(t.type) ? (gf = a, Oi = hf(r.firstChild)) : Oi = a), nc(e, t, t.pendingProps.children, n), fc(e, t), e === null && (t.flags |= 4194304), t.child;
4238
- case 5: return e === null && ki && ((a = r = Oi) && (r = lf(r, t.type, t.pendingProps, ji), r === null ? a = !1 : (t.stateNode = r, Di = t, Oi = hf(r.firstChild), ji = !1, a = !0)), a || Ni(t)), U(t), a = t.type, o = t.pendingProps, s = e === null ? null : e.memoizedProps, r = o.children, Xd(a, o) ? r = null : s !== null && Xd(a, s) && (t.flags |= 32), t.memoizedState !== null && (a = bo(e, t, Co, null, null, n), ap._currentValue = a), fc(e, t), nc(e, t, r, n), t.child;
4236
+ case 26: return fc(e, t), e === null ? (n = If(t.type, null, t.pendingProps, null)) ? t.memoizedState = n : ki || (n = t.type, e = t.pendingProps, r = qd(U.current).createElement(n), r[et] = t, r[tt] = e, Vd(r, n, e), pt(r), t.stateNode = r) : t.memoizedState = If(t.type, e.memoizedProps, t.pendingProps, e.memoizedState), null;
4237
+ case 27: return oe(t), e === null && ki && (r = t.stateNode = yf(t.type, t.pendingProps, U.current), Di = t, ji = !0, a = Oi, af(t.type) ? (gf = a, Oi = hf(r.firstChild)) : Oi = a), nc(e, t, t.pendingProps.children, n), fc(e, t), e === null && (t.flags |= 4194304), t.child;
4238
+ case 5: return e === null && ki && ((a = r = Oi) && (r = lf(r, t.type, t.pendingProps, ji), r === null ? a = !1 : (t.stateNode = r, Di = t, Oi = hf(r.firstChild), ji = !1, a = !0)), a || Ni(t)), oe(t), a = t.type, o = t.pendingProps, s = e === null ? null : e.memoizedProps, r = o.children, Xd(a, o) ? r = null : s !== null && Xd(a, s) && (t.flags |= 32), t.memoizedState !== null && (a = bo(e, t, Co, null, null, n), ap._currentValue = a), fc(e, t), nc(e, t, r, n), t.child;
4239
4239
  case 6: return e === null && ki && ((e = n = Oi) && (n = uf(n, t.pendingProps, ji), n === null ? e = !1 : (t.stateNode = n, Di = t, Oi = null, e = !0)), e || Ni(t)), null;
4240
4240
  case 13: return bc(e, t, n);
4241
- case 4: return ae(t, t.stateNode.containerInfo), r = t.pendingProps, e === null ? t.child = Na(t, null, r, n) : nc(e, t, r, n), t.child;
4241
+ case 4: return ie(t, t.stateNode.containerInfo), r = t.pendingProps, e === null ? t.child = Na(t, null, r, n) : nc(e, t, r, n), t.child;
4242
4242
  case 11: return rc(e, t, t.type, t.pendingProps, n);
4243
4243
  case 7: return nc(e, t, t.pendingProps, n), t.child;
4244
4244
  case 8: return nc(e, t, t.pendingProps.children, n), t.child;
@@ -4311,12 +4311,12 @@ var e = Object.create, t = Object.defineProperty, n = Object.getOwnPropertyDescr
4311
4311
  case 9:
4312
4312
  case 14: return Ic(t), null;
4313
4313
  case 1: return Ic(t), null;
4314
- case 3: return n = t.stateNode, r = null, e !== null && (r = e.memoizedState.cache), t.memoizedState.cache !== r && (t.flags |= 2048), Wi(na), oe(), n.pendingContext && (n.context = n.pendingContext, n.pendingContext = null), (e === null || e.child === null) && (Ii(t) ? jc(t) : e === null || e.memoizedState.isDehydrated && !(t.flags & 256) || (t.flags |= 1024, Ri())), Ic(t), null;
4314
+ case 3: return n = t.stateNode, r = null, e !== null && (r = e.memoizedState.cache), t.memoizedState.cache !== r && (t.flags |= 2048), Wi(na), ae(), n.pendingContext && (n.context = n.pendingContext, n.pendingContext = null), (e === null || e.child === null) && (Ii(t) ? jc(t) : e === null || e.memoizedState.isDehydrated && !(t.flags & 256) || (t.flags |= 1024, Ri())), Ic(t), null;
4315
4315
  case 26:
4316
4316
  var a = t.type, o = t.memoizedState;
4317
4317
  return e === null ? (jc(t), o === null ? (Ic(t), Mc(t, a, null, r, n)) : (Ic(t), Nc(t, o))) : o ? o === e.memoizedState ? (Ic(t), t.flags &= -16777217) : (jc(t), Ic(t), Nc(t, o)) : (e = e.memoizedProps, e !== r && jc(t), Ic(t), Mc(t, a, e, r, n)), null;
4318
4318
  case 27:
4319
- if (se(t), n = re.current, a = t.type, e !== null && t.stateNode != null) e.memoizedProps !== r && jc(t);
4319
+ if (se(t), n = U.current, a = t.type, e !== null && t.stateNode != null) e.memoizedProps !== r && jc(t);
4320
4320
  else {
4321
4321
  if (!r) {
4322
4322
  if (t.stateNode === null) throw Error(i(166));
@@ -4334,7 +4334,7 @@ var e = Object.create, t = Object.defineProperty, n = Object.getOwnPropertyDescr
4334
4334
  }
4335
4335
  if (o = te.current, Ii(t)) Pi(t, o);
4336
4336
  else {
4337
- var s = qd(re.current);
4337
+ var s = qd(U.current);
4338
4338
  switch (o) {
4339
4339
  case 1:
4340
4340
  o = s.createElementNS("http://www.w3.org/2000/svg", a);
@@ -4393,7 +4393,7 @@ var e = Object.create, t = Object.defineProperty, n = Object.getOwnPropertyDescr
4393
4393
  if (e && t.stateNode != null) e.memoizedProps !== r && jc(t);
4394
4394
  else {
4395
4395
  if (typeof r != "string" && t.stateNode === null) throw Error(i(166));
4396
- if (e = re.current, Ii(t)) {
4396
+ if (e = U.current, Ii(t)) {
4397
4397
  if (e = t.stateNode, n = t.memoizedProps, r = null, a = Di, a !== null) switch (a.tag) {
4398
4398
  case 27:
4399
4399
  case 5: r = a.memoizedProps;
@@ -4429,7 +4429,7 @@ var e = Object.create, t = Object.defineProperty, n = Object.getOwnPropertyDescr
4429
4429
  if (!a) return t.flags & 256 ? (io(t), t) : (io(t), null);
4430
4430
  }
4431
4431
  return io(t), t.flags & 128 ? (t.lanes = n, t) : (n = r !== null, e = e !== null && e.memoizedState !== null, n && (r = t.child, a = null, r.alternate !== null && r.alternate.memoizedState !== null && r.alternate.memoizedState.cachePool !== null && (a = r.alternate.memoizedState.cachePool.pool), o = null, r.memoizedState !== null && r.memoizedState.cachePool !== null && (o = r.memoizedState.cachePool.pool), o !== a && (r.flags |= 2048)), n !== e && n && (t.child.flags |= 8192), Pc(t, t.updateQueue), Ic(t), null);
4432
- case 4: return oe(), e === null && Od(t.stateNode.containerInfo), Ic(t), null;
4432
+ case 4: return ae(), e === null && Od(t.stateNode.containerInfo), Ic(t), null;
4433
4433
  case 10: return Wi(t.type), Ic(t), null;
4434
4434
  case 19:
4435
4435
  if (V(ao), r = t.memoizedState, r === null) return Ic(t), null;
@@ -4462,7 +4462,7 @@ var e = Object.create, t = Object.defineProperty, n = Object.getOwnPropertyDescr
4462
4462
  function Rc(e, t) {
4463
4463
  switch (Ti(t), t.tag) {
4464
4464
  case 1: return e = t.flags, e & 65536 ? (t.flags = e & -65537 | 128, t) : null;
4465
- case 3: return Wi(na), oe(), e = t.flags, e & 65536 && !(e & 128) ? (t.flags = e & -65537 | 128, t) : null;
4465
+ case 3: return Wi(na), ae(), e = t.flags, e & 65536 && !(e & 128) ? (t.flags = e & -65537 | 128, t) : null;
4466
4466
  case 26:
4467
4467
  case 27:
4468
4468
  case 5: return se(t), null;
@@ -4479,7 +4479,7 @@ var e = Object.create, t = Object.defineProperty, n = Object.getOwnPropertyDescr
4479
4479
  }
4480
4480
  return e = t.flags, e & 65536 ? (t.flags = e & -65537 | 128, t) : null;
4481
4481
  case 19: return V(ao), null;
4482
- case 4: return oe(), null;
4482
+ case 4: return ae(), null;
4483
4483
  case 10: return Wi(t.type), null;
4484
4484
  case 22:
4485
4485
  case 23: return io(t), Za(), e !== null && V(pa), e = t.flags, e & 65536 ? (t.flags = e & -65537 | 128, t) : null;
@@ -4491,7 +4491,7 @@ var e = Object.create, t = Object.defineProperty, n = Object.getOwnPropertyDescr
4491
4491
  function zc(e, t) {
4492
4492
  switch (Ti(t), t.tag) {
4493
4493
  case 3:
4494
- Wi(na), oe();
4494
+ Wi(na), ae();
4495
4495
  break;
4496
4496
  case 26:
4497
4497
  case 27:
@@ -4499,7 +4499,7 @@ var e = Object.create, t = Object.defineProperty, n = Object.getOwnPropertyDescr
4499
4499
  se(t);
4500
4500
  break;
4501
4501
  case 4:
4502
- oe();
4502
+ ae();
4503
4503
  break;
4504
4504
  case 31:
4505
4505
  t.memoizedState !== null && io(t);
@@ -7337,7 +7337,7 @@ var e = Object.create, t = Object.defineProperty, n = Object.getOwnPropertyDescr
7337
7337
  }
7338
7338
  }
7339
7339
  function If(e, t, n, r) {
7340
- var a = (a = re.current) ? Cf(a) : null;
7340
+ var a = (a = U.current) ? Cf(a) : null;
7341
7341
  if (!a) throw Error(i(446));
7342
7342
  switch (e) {
7343
7343
  case "meta":
@@ -8435,11 +8435,13 @@ var e = Object.create, t = Object.defineProperty, n = Object.getOwnPropertyDescr
8435
8435
  },
8436
8436
  headerSelection: { noHeaderLabel: "My data has no header row" },
8437
8437
  matchColumns: {
8438
+ allMatched: "All columns are matched",
8438
8439
  banner: "Some columns could not be automatically matched",
8439
8440
  importedColumns: "Imported columns",
8440
8441
  matchedCount: "{{matched}}/{{total}} matched",
8441
8442
  targetColumns: "Target columns",
8442
8443
  selectColumnPlaceholder: "Select column",
8444
+ showMatched: "Show matched",
8443
8445
  syntheticColumn: "C{{index}}",
8444
8446
  syntheticColumnValue: "C{{index}}: {{value}}",
8445
8447
  bestMatch: "Best match",
@@ -8694,13 +8696,13 @@ var P = (...e) => e.filter((e, t, n) => !!e && e.trim() !== "" && n.indexOf(e) =
8694
8696
  d: "M15 14h5l-5 6h5",
8695
8697
  key: "ur5jdg"
8696
8698
  }]
8697
- ]), re = B("arrow-up", [["path", {
8699
+ ]), U = B("arrow-up", [["path", {
8698
8700
  d: "m5 12 7-7 7 7",
8699
8701
  key: "hav0vg"
8700
8702
  }], ["path", {
8701
8703
  d: "M12 19V5",
8702
8704
  key: "x0mq9r"
8703
- }]]), ie = B("calendar", [
8705
+ }]]), re = B("calendar", [
8704
8706
  ["path", {
8705
8707
  d: "M8 2v4",
8706
8708
  key: "1cmpym"
@@ -8721,7 +8723,7 @@ var P = (...e) => e.filter((e, t, n) => !!e && e.trim() !== "" && n.indexOf(e) =
8721
8723
  d: "M3 10h18",
8722
8724
  key: "8toen8"
8723
8725
  }]
8724
- ]), ae = B("case-sensitive", [
8726
+ ]), ie = B("case-sensitive", [
8725
8727
  ["path", {
8726
8728
  d: "m2 16 4.039-9.69a.5.5 0 0 1 .923 0L11 16",
8727
8729
  key: "d5nyq2"
@@ -8740,10 +8742,10 @@ var P = (...e) => e.filter((e, t, n) => !!e && e.trim() !== "" && n.indexOf(e) =
8740
8742
  r: "3.5",
8741
8743
  key: "z97x68"
8742
8744
  }]
8743
- ]), oe = B("check", [["path", {
8745
+ ]), ae = B("check", [["path", {
8744
8746
  d: "M20 6 9 17l-5-5",
8745
8747
  key: "1gmf2c"
8746
- }]]), U = B("chevron-down", [["path", {
8748
+ }]]), oe = B("chevron-down", [["path", {
8747
8749
  d: "m6 9 6 6 6-6",
8748
8750
  key: "qrunsl"
8749
8751
  }]]), se = B("chevron-left", [["path", {
@@ -9963,7 +9965,7 @@ var St = () => {
9963
9965
  style: { outlineOffset: 1 },
9964
9966
  children: /* @__PURE__ */ (0, O.jsx)("div", {
9965
9967
  className: "updog-checkbox__icon",
9966
- children: f ? /* @__PURE__ */ (0, O.jsx)(Ee, { size: x }) : /* @__PURE__ */ (0, O.jsx)(oe, { size: x })
9968
+ children: f ? /* @__PURE__ */ (0, O.jsx)(Ee, { size: x }) : /* @__PURE__ */ (0, O.jsx)(ae, { size: x })
9967
9969
  })
9968
9970
  }),
9969
9971
  k
@@ -12051,7 +12053,7 @@ function Do(e) {
12051
12053
  k,
12052
12054
  _
12053
12055
  ]);
12054
- let te = y.useRef(null), ne = y.useRef(null), re = vo([te, N?.beforeInsideRef]), ie = vo([ne, N?.afterInsideRef]);
12056
+ let te = y.useRef(null), ne = y.useRef(null), U = vo([te, N?.beforeInsideRef]), re = vo([ne, N?.afterInsideRef]);
12055
12057
  y.useEffect(() => {
12056
12058
  var e, t;
12057
12059
  if (r || !b) return;
@@ -12171,18 +12173,18 @@ function Do(e) {
12171
12173
  B,
12172
12174
  k
12173
12175
  ]);
12174
- function ae(e) {
12176
+ function ie(e) {
12175
12177
  return r || !u || !l ? null : /* @__PURE__ */ (0, O.jsx)(Eo, {
12176
12178
  ref: e === "start" ? P : F,
12177
12179
  onClick: (e) => h(!1, e.nativeEvent),
12178
12180
  children: typeof u == "string" ? u : "Dismiss"
12179
12181
  });
12180
12182
  }
12181
- let oe = !r && E && (l ? !w : !0) && (z || l);
12183
+ let ae = !r && E && (l ? !w : !0) && (z || l);
12182
12184
  return /* @__PURE__ */ (0, O.jsxs)(O.Fragment, { children: [
12183
- oe && /* @__PURE__ */ (0, O.jsx)(uo, {
12185
+ ae && /* @__PURE__ */ (0, O.jsx)(uo, {
12184
12186
  "data-type": "inside",
12185
- ref: re,
12187
+ ref: U,
12186
12188
  onFocus: (e) => {
12187
12189
  if (l) {
12188
12190
  let e = H();
@@ -12194,12 +12196,12 @@ function Do(e) {
12194
12196
  }
12195
12197
  }
12196
12198
  }),
12197
- !w && ae("start"),
12199
+ !w && ie("start"),
12198
12200
  n,
12199
- ae("end"),
12200
- oe && /* @__PURE__ */ (0, O.jsx)(uo, {
12201
+ ie("end"),
12202
+ ae && /* @__PURE__ */ (0, O.jsx)(uo, {
12201
12203
  "data-type": "inside",
12202
- ref: ie,
12204
+ ref: re,
12203
12205
  onFocus: (e) => {
12204
12206
  if (l) Xa(H()[0]);
12205
12207
  else if (N != null && N.preserveTabOrder && N.portalNode) if (d && (I.current = !0), di(e, N.portalNode)) ui(v)?.focus();
@@ -12703,11 +12705,11 @@ function $o(e, t) {
12703
12705
  }, [e, x]);
12704
12706
  let j = Xr(() => {
12705
12707
  c(P.current === -1 ? null : P.current);
12706
- }), M = Fr(i.domReference), N = y.useRef(g), P = y.useRef(u ?? -1), F = y.useRef(null), I = y.useRef(!0), L = y.useRef(j), R = y.useRef(!!i.floating), ee = y.useRef(n), z = y.useRef(!1), B = y.useRef(!1), V = Jr(b), H = Jr(n), te = Jr(w), ne = Jr(u), [re, ie] = y.useState(), [ae, oe] = y.useState(), U = Xr(() => {
12708
+ }), M = Fr(i.domReference), N = y.useRef(g), P = y.useRef(u ?? -1), F = y.useRef(null), I = y.useRef(!0), L = y.useRef(j), R = y.useRef(!!i.floating), ee = y.useRef(n), z = y.useRef(!1), B = y.useRef(!1), V = Jr(b), H = Jr(n), te = Jr(w), ne = Jr(u), [U, re] = y.useState(), [ie, ae] = y.useState(), oe = Xr(() => {
12707
12709
  function e(e) {
12708
12710
  if (h) {
12709
12711
  var t;
12710
- (t = e.id) != null && t.endsWith("-fui-option") && (e.id = a + "-" + Math.random().toString(16).slice(2, 10)), ie(e.id), A?.events.emit("virtualfocus", e), T && (T.current = e);
12712
+ (t = e.id) != null && t.endsWith("-fui-option") && (e.id = a + "-" + Math.random().toString(16).slice(2, 10)), re(e.id), A?.events.emit("virtualfocus", e), T && (T.current = e);
12711
12713
  } else Xa(e, {
12712
12714
  sync: z.current,
12713
12715
  preventScroll: !0
@@ -12736,13 +12738,13 @@ function $o(e, t) {
12736
12738
  ]), Kr(() => {
12737
12739
  if (l && n && i.floating) if (s == null) {
12738
12740
  if (z.current = !1, ne.current != null) return;
12739
- if (R.current && (P.current = -1, U()), (!ee.current || !R.current) && N.current && (F.current != null || N.current === !0 && F.current == null)) {
12741
+ if (R.current && (P.current = -1, oe()), (!ee.current || !R.current) && N.current && (F.current != null || N.current === !0 && F.current == null)) {
12740
12742
  let e = 0, t = () => {
12741
12743
  o.current[0] == null ? (e < 2 && (e ? requestAnimationFrame : queueMicrotask)(t), e++) : (P.current = F.current == null || Xo(F.current, x, m) || p ? $r(o, V.current) : ei(o, V.current), F.current = null, j());
12742
12744
  };
12743
12745
  t();
12744
12746
  }
12745
- } else Qr(o, s) || (P.current = s, U(), B.current = !1);
12747
+ } else Qr(o, s) || (P.current = s, oe(), B.current = !1);
12746
12748
  }, [
12747
12749
  l,
12748
12750
  n,
@@ -12754,7 +12756,7 @@ function $o(e, t) {
12754
12756
  x,
12755
12757
  m,
12756
12758
  j,
12757
- U,
12759
+ oe,
12758
12760
  V
12759
12761
  ]), Kr(() => {
12760
12762
  var e;
@@ -12770,7 +12772,7 @@ function $o(e, t) {
12770
12772
  ]), Kr(() => {
12771
12773
  if (!l || !A || !h || k) return;
12772
12774
  function e(e) {
12773
- oe(e.id), T && (T.current = e);
12775
+ ae(e.id), T && (T.current = e);
12774
12776
  }
12775
12777
  return A.events.on("virtualfocus", e), () => {
12776
12778
  A.events.off("virtualfocus", e);
@@ -12873,12 +12875,12 @@ function $o(e, t) {
12873
12875
  disabledIndices: b
12874
12876
  })), Qr(o, P.current) && (P.current = -1), j();
12875
12877
  }
12876
- }), de = y.useMemo(() => h && n && se && { "aria-activedescendant": ae || re }, [
12878
+ }), de = y.useMemo(() => h && n && se && { "aria-activedescendant": ie || U }, [
12877
12879
  h,
12878
12880
  n,
12879
12881
  se,
12880
- ae,
12881
- re
12882
+ ie,
12883
+ U
12882
12884
  ]), fe = y.useMemo(() => ({
12883
12885
  "aria-orientation": x === "both" ? void 0 : x,
12884
12886
  ...M ? {} : de,
@@ -12911,8 +12913,8 @@ function $o(e, t) {
12911
12913
  bubbles: !0
12912
12914
  });
12913
12915
  if (s || c) {
12914
- let r = n.context?.elements.domReference === e.currentTarget, i = c && !r ? n.context?.elements.domReference : s ? o.current.find((e) => e?.id === re) : null;
12915
- i && (Vr(e), i.dispatchEvent(t), oe(void 0));
12916
+ let r = n.context?.elements.domReference === e.currentTarget, i = c && !r ? n.context?.elements.domReference : s ? o.current.find((e) => e?.id === U) : null;
12917
+ i && (Vr(e), i.dispatchEvent(t), ae(void 0));
12916
12918
  }
12917
12919
  if ((d || i) && n.context && n.context.open && n.parentId && e.currentTarget !== n.context.elements.domReference) {
12918
12920
  var g;
@@ -12943,7 +12945,7 @@ function $o(e, t) {
12943
12945
  onClick: e
12944
12946
  };
12945
12947
  }, [
12946
- re,
12948
+ U,
12947
12949
  de,
12948
12950
  C,
12949
12951
  ue,
@@ -13505,118 +13507,119 @@ var As = (0, y.forwardRef)(({ children: e, ...t }, n) => {
13505
13507
  if (!e) throw Error("useDropdownContext must be used within a DropdownProvider");
13506
13508
  return e;
13507
13509
  }, Ps = (0, y.createContext)({}), Fs = () => (0, y.useContext)(Ps), Is = (e) => {
13508
- let { open: t, onOpenChange: n, defaultIsOpen: r, disabled: i = !1, animation: a = !0, placement: o = "bottom", offset: s = 8, flip: c = !0, shift: l = !0, autoPlacement: u = !1, interactions: d = ["click", "dismiss"], role: f = "dialog", minWidth: p, maxWidth: m, minHeight: h, maxHeight: g, matchTriggerWidth: _ = !1, typeaheadListRef: v, triggerId: b, contentId: x, middleware: S, clickOptions: C, hoverOptions: w, focusOptions: T, dismissOptions: E, roleOptions: D, listNavigationOptions: O, typeaheadOptions: k } = e, A = (0, y.useId)(), j = `${A}-trigger`, M = `${A}-content`, N = b || j, P = x || M, { value: F, onChange: I } = kt({
13510
+ let { open: t, onOpenChange: n, defaultIsOpen: r, disabled: i = !1, animation: a = !0, placement: o = "bottom", offset: s = 8, flip: c = !0, shift: l = !0, autoPlacement: u = !1, closeOnScroll: d = !0, interactions: f = ["click", "dismiss"], role: p = "dialog", minWidth: m, maxWidth: h, minHeight: g, maxHeight: _, matchTriggerWidth: v = !1, typeaheadListRef: b, triggerId: x, contentId: S, middleware: C, clickOptions: w, hoverOptions: T, focusOptions: E, dismissOptions: D, roleOptions: O, listNavigationOptions: k, typeaheadOptions: A } = e, j = (0, y.useId)(), M = `${j}-trigger`, N = `${j}-content`, P = x || M, F = S || N, { value: I, onChange: L } = kt({
13509
13511
  controlledValue: t,
13510
13512
  controlledOnChange: n,
13511
13513
  defaultValue: r
13512
- }), L = za(), R = (0, y.useCallback)(() => {
13513
- I(!1), L && L.events.emit("dismissAll");
13514
- }, [I, L]);
13514
+ }), R = za(), ee = (0, y.useCallback)(() => {
13515
+ L(!1), R && R.events.emit("dismissAll");
13516
+ }, [L, R]);
13515
13517
  (0, y.useEffect)(() => {
13516
- if (!L) return;
13518
+ if (!R) return;
13517
13519
  let e = () => {
13518
- I(!1);
13520
+ L(!1);
13519
13521
  };
13520
- return L.events.on("dismissAll", e), () => {
13521
- L.events.off("dismissAll", e);
13522
+ return R.events.on("dismissAll", e), () => {
13523
+ R.events.off("dismissAll", e);
13522
13524
  };
13523
- }, [L, I]);
13524
- let ee = (0, y.useRef)([]), z = (0, y.useCallback)((e) => (t) => {
13525
- ee.current[e] = t;
13526
- }, []), [B, V] = (0, y.useState)(null), { refs: H, floatingStyles: te, context: ne, placement: re } = Ho({
13527
- open: F,
13528
- onOpenChange: I,
13525
+ }, [R, L]);
13526
+ let z = (0, y.useRef)([]), B = (0, y.useCallback)((e) => (t) => {
13527
+ z.current[e] = t;
13528
+ }, []), [V, H] = (0, y.useState)(null), { refs: te, floatingStyles: ne, context: U, placement: re } = Ho({
13529
+ open: I,
13530
+ onOpenChange: L,
13529
13531
  placement: o,
13530
- middleware: S ?? [
13532
+ middleware: C ?? [
13531
13533
  ha(s),
13532
13534
  c && _a(),
13533
13535
  l && ga(),
13534
13536
  u && ya(),
13535
13537
  va({ apply({ availableWidth: e, availableHeight: t, elements: n, rects: r }) {
13536
- let i = m ? Math.min(m, e) : e, a = g ? Math.min(g, t) : t, o = _ ? r.reference.width : void 0;
13538
+ let i = h ? Math.min(h, e) : e, a = _ ? Math.min(_, t) : t, o = v ? r.reference.width : void 0;
13537
13539
  Object.assign(n.floating.style, {
13538
13540
  maxWidth: `${i}px`,
13539
13541
  maxHeight: `${a}px`,
13540
- ...p && { minWidth: Ds(p) },
13541
- ...h && { minHeight: Ds(h) },
13542
+ ...m && { minWidth: Ds(m) },
13543
+ ...g && { minHeight: Ds(g) },
13542
13544
  ...o && { width: `${o}px` }
13543
13545
  });
13544
13546
  } })
13545
13547
  ].filter(Boolean),
13546
13548
  whileElementsMounted: na
13547
- }), ie = typeof window < "u" && window.matchMedia("(prefers-reduced-motion: reduce)").matches, { isMounted: ae, styles: oe } = os(ne, {
13549
+ }), ie = typeof window < "u" && window.matchMedia("(prefers-reduced-motion: reduce)").matches, { isMounted: ae, styles: oe } = os(U, {
13548
13550
  duration: !a || ie ? 0 : 100,
13549
13551
  initial: { opacity: 0 }
13550
- }), U = (e) => d.includes(e), { getReferenceProps: se, getFloatingProps: ce, getItemProps: le } = Ko([
13551
- Io(ne, {
13552
- ...C,
13553
- enabled: C?.enabled || U("click") && !i,
13554
- event: C?.event || "click",
13555
- toggle: C?.toggle || !0
13556
- }),
13557
- Ja(ne, {
13552
+ }), se = (e) => f.includes(e), { getReferenceProps: ce, getFloatingProps: le, getItemProps: ue } = Ko([
13553
+ Io(U, {
13558
13554
  ...w,
13559
- enabled: w?.enabled || U("hover") && !i,
13560
- delay: w?.delay,
13561
- handleClose: w?.handleClose || ds()
13555
+ enabled: w?.enabled || se("click") && !i,
13556
+ event: w?.event || "click",
13557
+ toggle: w?.toggle || !0
13562
13558
  }),
13563
- Wo(ne, {
13559
+ Ja(U, {
13564
13560
  ...T,
13565
- enabled: T?.enabled || U("focus") && !i
13561
+ enabled: T?.enabled || se("hover") && !i,
13562
+ delay: T?.delay,
13563
+ handleClose: T?.handleClose || ds()
13566
13564
  }),
13567
- Bo(ne, {
13565
+ Wo(U, {
13568
13566
  ...E,
13569
- enabled: E?.enabled || U("dismiss") && !i,
13570
- outsidePress: E?.outsidePress || ((e) => {
13571
- let t = e.target, n = H.floating.current?.contains(t), r = H.reference.current?.contains?.(t);
13572
- return !n && !r;
13573
- }),
13574
- escapeKey: E?.escapeKey || !0,
13575
- bubbles: E?.bubbles || { escapeKey: !1 }
13567
+ enabled: E?.enabled || se("focus") && !i
13576
13568
  }),
13577
- ts(ne, {
13569
+ Bo(U, {
13578
13570
  ...D,
13579
- role: D?.role || f
13571
+ ancestorScroll: D?.ancestorScroll ?? d,
13572
+ enabled: D?.enabled || se("dismiss") && !i,
13573
+ outsidePress: D?.outsidePress || ((e) => {
13574
+ let t = e.target, n = te.floating.current?.contains(t), r = te.reference.current?.contains?.(t);
13575
+ return !n && !r;
13576
+ }),
13577
+ escapeKey: D?.escapeKey || !0,
13578
+ bubbles: D?.bubbles || { escapeKey: !1 }
13580
13579
  }),
13581
- $o(ne, {
13580
+ ts(U, {
13582
13581
  ...O,
13583
- enabled: O?.enabled || U("listNavigation") && !i,
13584
- listRef: O?.listRef || ee,
13585
- activeIndex: O?.activeIndex || B,
13586
- onNavigate: O?.onNavigate || V,
13587
- loop: O?.loop || !0,
13588
- nested: O?.nested,
13589
- parentOrientation: O?.parentOrientation,
13590
- rtl: O?.rtl
13582
+ role: O?.role || p
13591
13583
  }),
13592
- ss(ne, {
13584
+ $o(U, {
13593
13585
  ...k,
13594
- enabled: k?.enabled || U("typeahead") && !i,
13595
- listRef: k?.listRef || v || { current: [] },
13596
- activeIndex: k?.activeIndex || B,
13597
- onMatch: k?.onMatch || V,
13598
- resetMs: k?.resetMs || 750
13586
+ enabled: k?.enabled || se("listNavigation") && !i,
13587
+ listRef: k?.listRef || z,
13588
+ activeIndex: k?.activeIndex || V,
13589
+ onNavigate: k?.onNavigate || H,
13590
+ loop: k?.loop || !0,
13591
+ nested: k?.nested,
13592
+ parentOrientation: k?.parentOrientation,
13593
+ rtl: k?.rtl
13594
+ }),
13595
+ ss(U, {
13596
+ ...A,
13597
+ enabled: A?.enabled || se("typeahead") && !i,
13598
+ listRef: A?.listRef || b || { current: [] },
13599
+ activeIndex: A?.activeIndex || V,
13600
+ onMatch: A?.onMatch || H,
13601
+ resetMs: A?.resetMs || 750
13599
13602
  })
13600
13603
  ]);
13601
13604
  return {
13602
- refs: H,
13603
- floatingStyles: te,
13604
- context: ne,
13605
- getReferenceProps: se,
13606
- getFloatingProps: ce,
13607
- getItemProps: U("listNavigation") ? le : void 0,
13608
- open: !!F,
13609
- setOpen: I,
13605
+ refs: te,
13606
+ floatingStyles: ne,
13607
+ context: U,
13608
+ getReferenceProps: ce,
13609
+ getFloatingProps: le,
13610
+ getItemProps: se("listNavigation") ? ue : void 0,
13611
+ open: !!I,
13612
+ setOpen: L,
13610
13613
  placement: re,
13611
- activeIndex: B,
13612
- setActiveIndex: V,
13613
- navigationRef: z,
13614
+ activeIndex: V,
13615
+ setActiveIndex: H,
13616
+ navigationRef: B,
13614
13617
  props: e,
13615
- dismiss: R,
13618
+ dismiss: ee,
13616
13619
  isMounted: ae,
13617
13620
  transitionStyles: oe,
13618
- triggerId: N,
13619
- contentId: P
13621
+ triggerId: P,
13622
+ contentId: F
13620
13623
  };
13621
13624
  }, Ls = (e) => {
13622
13625
  let { trigger: t, content: n, floatingFocusManager: r, contentClassName: i, ariaLabel: a, preventDefaultOnTrigger: o, stopPropagationOnTrigger: s, portal: c = !0 } = e, { rtl: l } = j(), { refs: u, floatingStyles: d, context: f, getReferenceProps: p, getFloatingProps: m, getItemProps: h, open: g, setOpen: _, dismiss: v, placement: b, activeIndex: x, setActiveIndex: S, navigationRef: C, isMounted: w, transitionStyles: T, triggerId: E, contentId: D } = Is(e), k = Ba(), A = (0, y.useMemo)(() => ({
@@ -13985,7 +13988,7 @@ var Hs = (0, y.forwardRef)(Vs), Us = (e) => !("type" in e), Ws = (e) => "type" i
13985
13988
  let B = typeof window < "u" && window.matchMedia("(prefers-reduced-motion: reduce)").matches, { isMounted: V, styles: H } = os(ee, {
13986
13989
  duration: !a || B ? 0 : 100,
13987
13990
  initial: { opacity: 0 }
13988
- }), { getReferenceProps: te, getFloatingProps: ne, getItemProps: re } = Ko([
13991
+ }), { getReferenceProps: te, getFloatingProps: ne, getItemProps: U } = Ko([
13989
13992
  Bo(ee, {
13990
13993
  escapeKey: !0,
13991
13994
  outsidePress: !0,
@@ -14006,7 +14009,7 @@ var Hs = (0, y.forwardRef)(Vs), Us = (e) => !("type" in e), Ws = (e) => "type" i
14006
14009
  onMatch: w,
14007
14010
  resetMs: 750
14008
14011
  })
14009
- ]), ie = (0, y.useRef)(null), ae = (0, y.useCallback)((e) => {
14012
+ ]), re = (0, y.useRef)(null), ie = (0, y.useCallback)((e) => {
14010
14013
  i || (p !== !1 && e.preventDefault(), m && e.stopPropagation(), L.setPositionReference({ getBoundingClientRect() {
14011
14014
  return {
14012
14015
  x: e.clientX,
@@ -14024,7 +14027,7 @@ var Hs = (0, y.forwardRef)(Vs), Us = (e) => !("type" in e), Ws = (e) => "type" i
14024
14027
  p,
14025
14028
  m,
14026
14029
  L
14027
- ]), oe = (0, y.useMemo)(() => ({
14030
+ ]), ae = (0, y.useMemo)(() => ({
14028
14031
  open: x ?? !1,
14029
14032
  setOpen: S,
14030
14033
  dismiss: D,
@@ -14036,7 +14039,7 @@ var Hs = (0, y.forwardRef)(Vs), Us = (e) => !("type" in e), Ws = (e) => "type" i
14036
14039
  },
14037
14040
  getReferenceProps: te,
14038
14041
  getFloatingProps: ne,
14039
- getItemProps: re,
14042
+ getItemProps: U,
14040
14043
  activeIndex: C,
14041
14044
  setActiveIndex: w,
14042
14045
  navigationRef: F,
@@ -14055,7 +14058,7 @@ var Hs = (0, y.forwardRef)(Vs), Us = (e) => !("type" in e), Ws = (e) => "type" i
14055
14058
  L.setFloating,
14056
14059
  te,
14057
14060
  ne,
14058
- re,
14061
+ U,
14059
14062
  C,
14060
14063
  F,
14061
14064
  ee,
@@ -14063,11 +14066,11 @@ var Hs = (0, y.forwardRef)(Vs), Us = (e) => !("type" in e), Ws = (e) => "type" i
14063
14066
  H,
14064
14067
  A,
14065
14068
  M
14066
- ]), U = (0, y.useMemo)(() => ({
14069
+ ]), oe = (0, y.useMemo)(() => ({
14067
14070
  onSelect: r,
14068
14071
  options: n,
14069
14072
  rtl: b,
14070
- rootTriggerRef: ie,
14073
+ rootTriggerRef: re,
14071
14074
  portal: s,
14072
14075
  minWidth: c
14073
14076
  }), [
@@ -14106,14 +14109,14 @@ var Hs = (0, y.forwardRef)(Vs), Us = (e) => !("type" in e), Ws = (e) => "type" i
14106
14109
  ee,
14107
14110
  n
14108
14111
  ]), ce = /* @__PURE__ */ (0, O.jsx)(Ms, {
14109
- value: oe,
14112
+ value: ae,
14110
14113
  children: /* @__PURE__ */ (0, O.jsx)(Ps.Provider, {
14111
- value: U,
14114
+ value: oe,
14112
14115
  children: /* @__PURE__ */ (0, O.jsxs)(Va, {
14113
14116
  id: E,
14114
14117
  children: [/* @__PURE__ */ (0, O.jsx)("div", {
14115
- ref: ie,
14116
- onContextMenu: ae,
14118
+ ref: re,
14119
+ onContextMenu: ie,
14117
14120
  style: { display: "contents" },
14118
14121
  children: t
14119
14122
  }), s ? /* @__PURE__ */ (0, O.jsx)(go, {
@@ -14237,7 +14240,7 @@ var Hs = (0, y.forwardRef)(Vs), Us = (e) => !("type" in e), Ws = (e) => "type" i
14237
14240
  color: "neutral",
14238
14241
  tabIndex: -1,
14239
14242
  "aria-label": x("ui.datePicker.openCalendar"),
14240
- children: /* @__PURE__ */ (0, O.jsx)(ie, { className: "updog-datepicker__chevron" })
14243
+ children: /* @__PURE__ */ (0, O.jsx)(re, { className: "updog-datepicker__chevron" })
14241
14244
  })
14242
14245
  ]
14243
14246
  })] })
@@ -14622,18 +14625,18 @@ function dc(e, t) {
14622
14625
  controlledValue: n,
14623
14626
  controlledOnChange: r,
14624
14627
  defaultValue: i
14625
- }), ne = (0, y.useRef)(null), re = (0, y.useId)(), ie = o.props.id || I || `${re}-trigger`, ae = L || (o.props.id ? `${o.props.id}-content` : `${re}-content`), oe = (0, y.useRef)([]);
14628
+ }), ne = (0, y.useRef)(null), U = (0, y.useId)(), re = o.props.id || I || `${U}-trigger`, ie = L || (o.props.id ? `${o.props.id}-content` : `${U}-content`), ae = (0, y.useRef)([]);
14626
14629
  (0, y.useMemo)(() => {
14627
- oe.current = s.filter(Us).map((e) => e.text);
14630
+ ae.current = s.filter(Us).map((e) => e.text);
14628
14631
  }, [s]);
14629
- let U = Os(t, (0, y.useCallback)((e) => {
14632
+ let oe = Os(t, (0, y.useCallback)((e) => {
14630
14633
  ne.current = e;
14631
14634
  }, [])), se = a || o, ce = (0, y.useMemo)(() => /* @__PURE__ */ (0, O.jsx)(As, {
14632
- ref: U,
14635
+ ref: oe,
14633
14636
  ...B,
14634
14637
  children: se
14635
14638
  }), [
14636
- U,
14639
+ oe,
14637
14640
  B,
14638
14641
  se
14639
14642
  ]);
@@ -14650,8 +14653,8 @@ function dc(e, t) {
14650
14653
  portal: z,
14651
14654
  trigger: ce,
14652
14655
  content: /* @__PURE__ */ (0, O.jsx)(Js, { options: s }),
14653
- triggerId: ie,
14654
- contentId: ae,
14656
+ triggerId: re,
14657
+ contentId: ie,
14655
14658
  open: H,
14656
14659
  onOpenChange: te,
14657
14660
  disabled: v,
@@ -14690,7 +14693,7 @@ function dc(e, t) {
14690
14693
  loop: !0,
14691
14694
  ...A
14692
14695
  },
14693
- typeaheadListRef: ee ?? oe,
14696
+ typeaheadListRef: ee ?? ae,
14694
14697
  preventDefaultOnTrigger: f,
14695
14698
  stopPropagationOnTrigger: p,
14696
14699
  minHeight: m,
@@ -14944,20 +14947,20 @@ var vc = () => {
14944
14947
  l?.(), C.current?.focus();
14945
14948
  }, [l, C]), ne = (0, y.useCallback)((e) => {
14946
14949
  T?.(e), C.current?.focus();
14947
- }, [T, C]), re = {
14950
+ }, [T, C]), U = {
14948
14951
  sm: "xs",
14949
14952
  md: "sm",
14950
14953
  lg: "md"
14951
- }, ie = !r && !f && u && /* @__PURE__ */ (0, O.jsx)(ct, {
14954
+ }, re = !r && !f && u && /* @__PURE__ */ (0, O.jsx)(ct, {
14952
14955
  variant: "filled",
14953
14956
  size: bs[i],
14954
14957
  color: "neutral",
14955
14958
  onClick: te,
14956
14959
  content: /* @__PURE__ */ (0, O.jsx)(qe, {}),
14957
14960
  "aria-label": n("ui.comboBox.clearSelection")
14958
- }), ae = !r && f && /* @__PURE__ */ (0, O.jsx)($s, {
14961
+ }), ie = !r && f && /* @__PURE__ */ (0, O.jsx)($s, {
14959
14962
  size: i,
14960
- children: /* @__PURE__ */ (0, O.jsx)($e, { size: re[i] })
14963
+ children: /* @__PURE__ */ (0, O.jsx)($e, { size: U[i] })
14961
14964
  });
14962
14965
  return /* @__PURE__ */ (0, O.jsxs)("div", {
14963
14966
  ref: t,
@@ -15007,7 +15010,7 @@ var vc = () => {
15007
15010
  })]
15008
15011
  }), /* @__PURE__ */ (0, O.jsx)("div", {
15009
15012
  className: "updog-combobox__trigger-actions",
15010
- children: ae || ie
15013
+ children: ie || re
15011
15014
  })]
15012
15015
  });
15013
15016
  }), xc = (0, y.forwardRef)((e = {}, t) => {
@@ -15106,7 +15109,7 @@ var Sc = (0, y.createContext)(void 0), Cc = Sc.Provider, wc = () => {
15106
15109
  ] }), /* @__PURE__ */ (0, O.jsx)("span", {
15107
15110
  "aria-hidden": !0,
15108
15111
  className: N("updog-select__option-checkMark", d ? "updog-select__option-checkMark--visible" : ""),
15109
- children: /* @__PURE__ */ (0, O.jsx)(oe, {
15112
+ children: /* @__PURE__ */ (0, O.jsx)(ae, {
15110
15113
  size: "1rem",
15111
15114
  className: "rtl-mirror"
15112
15115
  })
@@ -15218,7 +15221,7 @@ var Sc = (0, y.createContext)(void 0), Cc = Sc.Provider, wc = () => {
15218
15221
  size: bs[S],
15219
15222
  color: "neutral",
15220
15223
  tabIndex: -1,
15221
- children: /* @__PURE__ */ (0, O.jsx)(U, { className: N("updog-select__chevron", w && "updog-select__chevron--rotate") })
15224
+ children: /* @__PURE__ */ (0, O.jsx)(oe, { className: N("updog-select__chevron", w && "updog-select__chevron--rotate") })
15222
15225
  })
15223
15226
  ]
15224
15227
  })] })
@@ -15319,7 +15322,7 @@ var Sc = (0, y.createContext)(void 0), Cc = Sc.Provider, wc = () => {
15319
15322
  children: t
15320
15323
  }), Lc = ({ index: e, isActive: t, isCompleted: n, isDisabled: r }) => n ? /* @__PURE__ */ (0, O.jsx)(Ic, {
15321
15324
  className: "updog-stepper__indicator--completed",
15322
- children: /* @__PURE__ */ (0, O.jsx)(oe, {
15325
+ children: /* @__PURE__ */ (0, O.jsx)(ae, {
15323
15326
  className: "updog-stepper__indicator-icon",
15324
15327
  size: 12,
15325
15328
  strokeWidth: 3
@@ -17488,7 +17491,7 @@ function Zu() {
17488
17491
  e.dataTransfer.dropEffect = "copy";
17489
17492
  } catch {}
17490
17493
  return t && d && d(e), !1;
17491
- }, [d, w]), re = (0, y.useCallback)(function(e) {
17494
+ }, [d, w]), U = (0, y.useCallback)(function(e) {
17492
17495
  e.preventDefault(), e.persist(), pe(e);
17493
17496
  var t = z.current.filter(function(e) {
17494
17497
  return j.current && j.current.contains(e);
@@ -17503,7 +17506,7 @@ function Zu() {
17503
17506
  j,
17504
17507
  u,
17505
17508
  w
17506
- ]), ie = (0, y.useCallback)(function(e, t) {
17509
+ ]), re = (0, y.useCallback)(function(e, t) {
17507
17510
  var n = [], r = [];
17508
17511
  e.forEach(function(e) {
17509
17512
  var t = Lu(du(e, D), 2), i = t[0], s = t[1], c = Lu(fu(e, o, a), 2), l = c[0], u = c[1], d = E ? E(e) : null;
@@ -17538,18 +17541,18 @@ function Zu() {
17538
17541
  p,
17539
17542
  m,
17540
17543
  E
17541
- ]), ae = (0, y.useCallback)(function(e) {
17544
+ ]), ie = (0, y.useCallback)(function(e) {
17542
17545
  e.preventDefault(), e.persist(), pe(e), z.current = [], gu(e) && Promise.resolve(i(e)).then(function(t) {
17543
- hu(e) && !w || ie(t, e);
17546
+ hu(e) && !w || re(t, e);
17544
17547
  }).catch(function(e) {
17545
17548
  return H(e);
17546
17549
  }), F({ type: "reset" });
17547
17550
  }, [
17548
17551
  i,
17549
- ie,
17552
+ re,
17550
17553
  H,
17551
17554
  w
17552
- ]), oe = (0, y.useCallback)(function() {
17555
+ ]), ae = (0, y.useCallback)(function() {
17553
17556
  if (R.current) {
17554
17557
  F({ type: "openDialog" }), k();
17555
17558
  var e = {
@@ -17559,7 +17562,7 @@ function Zu() {
17559
17562
  window.showOpenFilePicker(e).then(function(e) {
17560
17563
  return i(e);
17561
17564
  }).then(function(e) {
17562
- ie(e, null), F({ type: "closeDialog" });
17565
+ re(e, null), F({ type: "closeDialog" });
17563
17566
  }).catch(function(e) {
17564
17567
  Tu(e) ? (A(e), F({ type: "closeDialog" })) : Eu(e) ? (R.current = !1, M.current ? (M.current.value = null, M.current.click()) : H(/* @__PURE__ */ Error("Cannot open the file picker because the https://developer.mozilla.org/en-US/docs/Web/API/File_System_Access_API is not supported and no <input> was provided."))) : H(e);
17565
17568
  });
@@ -17571,19 +17574,19 @@ function Zu() {
17571
17574
  k,
17572
17575
  A,
17573
17576
  _,
17574
- ie,
17577
+ re,
17575
17578
  H,
17576
17579
  O,
17577
17580
  s
17578
- ]), U = (0, y.useCallback)(function(e) {
17579
- !j.current || !j.current.isEqualNode(e.target) || (e.key === " " || e.key === "Enter" || e.keyCode === 32 || e.keyCode === 13) && (e.preventDefault(), oe());
17580
- }, [j, oe]), se = (0, y.useCallback)(function() {
17581
+ ]), oe = (0, y.useCallback)(function(e) {
17582
+ !j.current || !j.current.isEqualNode(e.target) || (e.key === " " || e.key === "Enter" || e.keyCode === 32 || e.keyCode === 13) && (e.preventDefault(), ae());
17583
+ }, [j, ae]), se = (0, y.useCallback)(function() {
17581
17584
  F({ type: "focus" });
17582
17585
  }, []), ce = (0, y.useCallback)(function() {
17583
17586
  F({ type: "blur" });
17584
17587
  }, []), le = (0, y.useCallback)(function() {
17585
- x || (bu() ? setTimeout(oe, 0) : oe());
17586
- }, [x, oe]), ue = function(e) {
17588
+ x || (bu() ? setTimeout(ae, 0) : ae());
17589
+ }, [x, ae]), ue = function(e) {
17587
17590
  return r ? null : e;
17588
17591
  }, de = function(e) {
17589
17592
  return S ? null : ue(e);
@@ -17595,27 +17598,27 @@ function Zu() {
17595
17598
  return function() {
17596
17599
  var e = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {}, t = e.refKey, n = t === void 0 ? "ref" : t, i = e.role, a = e.onKeyDown, o = e.onFocus, s = e.onBlur, c = e.onClick, l = e.onDragEnter, u = e.onDragOver, d = e.onDragLeave, f = e.onDrop, p = Ku(e, ju);
17597
17600
  return Wu(Wu(Gu({
17598
- onKeyDown: de(xu(a, U)),
17601
+ onKeyDown: de(xu(a, oe)),
17599
17602
  onFocus: de(xu(o, se)),
17600
17603
  onBlur: de(xu(s, ce)),
17601
17604
  onClick: ue(xu(c, le)),
17602
17605
  onDragEnter: fe(xu(l, te)),
17603
17606
  onDragOver: fe(xu(u, ne)),
17604
- onDragLeave: fe(xu(d, re)),
17605
- onDrop: fe(xu(f, ae)),
17607
+ onDragLeave: fe(xu(d, U)),
17608
+ onDrop: fe(xu(f, ie)),
17606
17609
  role: typeof i == "string" && i !== "" ? i : "presentation"
17607
17610
  }, n, j), !r && !S ? { tabIndex: 0 } : {}), p);
17608
17611
  };
17609
17612
  }, [
17610
17613
  j,
17611
- U,
17614
+ oe,
17612
17615
  se,
17613
17616
  ce,
17614
17617
  le,
17615
17618
  te,
17616
17619
  ne,
17617
- re,
17618
- ae,
17620
+ U,
17621
+ ie,
17619
17622
  S,
17620
17623
  C,
17621
17624
  r
@@ -17640,7 +17643,7 @@ function Zu() {
17640
17643
  width: "1px",
17641
17644
  whiteSpace: "nowrap"
17642
17645
  },
17643
- onChange: ue(xu(r, ae)),
17646
+ onChange: ue(xu(r, ie)),
17644
17647
  onClick: ue(xu(i, he)),
17645
17648
  tabIndex: -1
17646
17649
  }, n, M)), a);
@@ -17649,7 +17652,7 @@ function Zu() {
17649
17652
  M,
17650
17653
  n,
17651
17654
  s,
17652
- ae,
17655
+ ie,
17653
17656
  r
17654
17657
  ]);
17655
17658
  return Wu(Wu({}, P), {}, {
@@ -17658,7 +17661,7 @@ function Zu() {
17658
17661
  getInputProps: ge,
17659
17662
  rootRef: j,
17660
17663
  inputRef: M,
17661
- open: ue(oe)
17664
+ open: ue(ae)
17662
17665
  });
17663
17666
  }
17664
17667
  function Qu(e, t) {
@@ -29907,7 +29910,7 @@ function Qm({ columns: e, primaryKey: t, loadData: n, scaleClient: r, onComplete
29907
29910
  A.setSchemaColumns(e);
29908
29911
  let { addDynamicColumns: M, removeDynamicColumn: N, updateColumn: P } = Km(A), F = (0, y.useCallback)((e) => {
29909
29912
  A.setDynamicColumns(e);
29910
- }, [A]), I = (0, y.useSyncExternalStore)(A.subscribe, A.getEffectiveColumns), { navigateToCell: L, navigateByIndex: R, navigateToCellRef: ee, resetScrollRef: z, scrollToGridTop: B } = qm(A), { validator: V, validatorRef: H, findReplace: te } = Zm(A, I, r?.findAndReplace, R), { search: ne, setSearch: re, matchCase: ie, setMatchCase: ae, matchEntireCell: oe, setMatchEntireCell: U, searchMode: se, setSearchMode: ce, filterColumns: le, setFilterColumns: ue, filtersResetKey: de, resetFilters: fe } = Ym(A, te, L, B);
29913
+ }, [A]), I = (0, y.useSyncExternalStore)(A.subscribe, A.getEffectiveColumns), { navigateToCell: L, navigateByIndex: R, navigateToCellRef: ee, resetScrollRef: z, scrollToGridTop: B } = qm(A), { validator: V, validatorRef: H, findReplace: te } = Zm(A, I, r?.findAndReplace, R), { search: ne, setSearch: U, matchCase: re, setMatchCase: ie, matchEntireCell: ae, setMatchEntireCell: oe, searchMode: se, setSearchMode: ce, filterColumns: le, setFilterColumns: ue, filtersResetKey: de, resetFilters: fe } = Ym(A, te, L, B);
29911
29914
  Gm(A, H, n, k);
29912
29915
  let { onVisibleRangeChange: pe } = Xm(A, k), { portalRef: me } = Jm(), [he, ge] = (0, y.useState)(null), [_e, ve] = (0, y.useState)(null), ye = (0, y.useCallback)((e) => {
29913
29916
  ve(e), s(!0);
@@ -29941,11 +29944,11 @@ function Qm({ columns: e, primaryKey: t, loadData: n, scaleClient: r, onComplete
29941
29944
  variant: a ?? "editor",
29942
29945
  isViewer: a === "viewer",
29943
29946
  search: ne,
29944
- setSearch: re,
29945
- matchCase: ie,
29946
- setMatchCase: ae,
29947
- matchEntireCell: oe,
29948
- setMatchEntireCell: U,
29947
+ setSearch: U,
29948
+ matchCase: re,
29949
+ setMatchCase: ie,
29950
+ matchEntireCell: ae,
29951
+ setMatchEntireCell: oe,
29949
29952
  searchMode: se,
29950
29953
  setSearchMode: ce,
29951
29954
  filterColumns: le,
@@ -30984,7 +30987,7 @@ var Yh = ({ open: e, onClose: t, onConfirm: n, loading: r = !1 }) => {
30984
30987
  e,
30985
30988
  t,
30986
30989
  c
30987
- ]), re = s("dataEditor.footer.submit"), ie = !b || S || A || C;
30990
+ ]), U = s("dataEditor.footer.submit"), re = !b || S || A || C;
30988
30991
  return /* @__PURE__ */ (0, O.jsxs)(O.Fragment, { children: [/* @__PURE__ */ (0, O.jsxs)("footer", {
30989
30992
  className: "updog__data-editor-footer",
30990
30993
  children: [/* @__PURE__ */ (0, O.jsx)(Xh, {}), /* @__PURE__ */ (0, O.jsxs)("div", {
@@ -31021,7 +31024,7 @@ var Yh = ({ open: e, onClose: t, onConfirm: n, loading: r = !1 }) => {
31021
31024
  loading: w,
31022
31025
  disabled: x || S,
31023
31026
  spinnerPosition: "end",
31024
- endIcon: /* @__PURE__ */ (0, O.jsx)(U, {}),
31027
+ endIcon: /* @__PURE__ */ (0, O.jsx)(oe, {}),
31025
31028
  children: P
31026
31029
  })
31027
31030
  }),
@@ -31030,9 +31033,9 @@ var Yh = ({ open: e, onClose: t, onConfirm: n, loading: r = !1 }) => {
31030
31033
  content: s("dataEditor.footer.submitBlockedByErrors"),
31031
31034
  placement: "top-end",
31032
31035
  children: /* @__PURE__ */ (0, O.jsx)(ot, {
31033
- disabled: ie,
31036
+ disabled: re,
31034
31037
  onClick: D,
31035
- children: re
31038
+ children: U
31036
31039
  })
31037
31040
  })
31038
31041
  ]
@@ -32613,7 +32616,7 @@ var n_ = ({ editing: e, editingSnapshot: t, style: n, onAfterEdit: r, column: i
32613
32616
  size: u_,
32614
32617
  className: "rtl-mirror"
32615
32618
  }),
32616
- "mark-as-correct": /* @__PURE__ */ (0, O.jsx)(oe, {
32619
+ "mark-as-correct": /* @__PURE__ */ (0, O.jsx)(ae, {
32617
32620
  size: u_,
32618
32621
  className: "rtl-mirror"
32619
32622
  }),
@@ -44328,7 +44331,7 @@ var NA = {
44328
44331
  ...z,
44329
44332
  ...e
44330
44333
  }), B(null);
44331
- }, [z, u]), ne = (0, y.useMemo)(() => P.columns.map((e) => e.title), [P.columns]), { anchor: re, items: ie, handleCanvasContextMenu: ae, handleSelect: oe, handleOpenChange: U, transformModal: se, transformModalColIds: ce, transformModalScope: le, handleApplyMerge: ue, handleApplySplit: de, closeTransformModal: fe, showFormulaModal: pe, closeFormulaModal: me, handleApplyFormula: he, formulaColumnIds: ge, formulaScope: _e } = Jk({
44334
+ }, [z, u]), ne = (0, y.useMemo)(() => P.columns.map((e) => e.title), [P.columns]), { anchor: U, items: re, handleCanvasContextMenu: ie, handleSelect: ae, handleOpenChange: oe, transformModal: se, transformModalColIds: ce, transformModalScope: le, handleApplyMerge: ue, handleApplySplit: de, closeTransformModal: fe, showFormulaModal: pe, closeFormulaModal: me, handleApplyFormula: he, formulaColumnIds: ge, formulaScope: _e } = Jk({
44332
44335
  controller: k,
44333
44336
  store: t,
44334
44337
  columnSnapshot: P,
@@ -44342,25 +44345,25 @@ var NA = {
44342
44345
  onEditColumn: V
44343
44346
  });
44344
44347
  (0, y.useEffect)(() => {
44345
- if (!re) return;
44346
- let e = E.current, t = D.current, n = () => U(!1);
44348
+ if (!U) return;
44349
+ let e = E.current, t = D.current, n = () => oe(!1);
44347
44350
  return e?.addEventListener("scroll", n), t?.addEventListener("scroll", n), () => {
44348
44351
  e?.removeEventListener("scroll", n), t?.removeEventListener("scroll", n);
44349
44352
  };
44350
- }, [re, U]);
44351
- let ve = !M.isEditing && re === null, ye = kA(T, A.focusCell, ve, R, p, L, E, D), be = (0, y.useCallback)((e) => {
44353
+ }, [U, oe]);
44354
+ let ve = !M.isEditing && U === null, ye = kA(T, A.focusCell, ve, R, p, L, E, D), be = (0, y.useCallback)((e) => {
44352
44355
  k.keyboard.handleKeyDown(e.nativeEvent);
44353
44356
  }, [k]);
44354
- MA(T, k, R, p, P.columns.length, n, ae, L, E, D);
44357
+ MA(T, k, R, p, P.columns.length, n, ie, L, E, D);
44355
44358
  let xe = (0, y.useCallback)(() => {
44356
44359
  T.current?.focus();
44357
44360
  }, []);
44358
44361
  return /* @__PURE__ */ (0, O.jsxs)(O.Fragment, { children: [
44359
44362
  /* @__PURE__ */ (0, O.jsx)(p_, {
44360
- anchor: re,
44361
- items: ie,
44362
- onSelect: oe,
44363
- onOpenChange: U,
44363
+ anchor: U,
44364
+ items: re,
44365
+ onSelect: ae,
44366
+ onOpenChange: oe,
44364
44367
  children: /* @__PURE__ */ (0, O.jsxs)("div", {
44365
44368
  ref: T,
44366
44369
  className: N("updog-grid", !(x > 0) && "updog-grid--hidden", C && "updog-grid--rtl"),
@@ -44947,7 +44950,7 @@ var NA = {
44947
44950
  size: "xs",
44948
44951
  onClick: e,
44949
44952
  "aria-label": n,
44950
- children: /* @__PURE__ */ (0, O.jsx)(U, {
44953
+ children: /* @__PURE__ */ (0, O.jsx)(oe, {
44951
44954
  className: N("rtl-mirror", t && "updog__error-filter-section__icon-rotate"),
44952
44955
  size: "1rem"
44953
44956
  })
@@ -45119,7 +45122,7 @@ var NA = {
45119
45122
  t(!e);
45120
45123
  },
45121
45124
  "aria-label": n("dataEditor.filters.matchCase"),
45122
- children: /* @__PURE__ */ (0, O.jsx)(ae, { size: "1.125rem" })
45125
+ children: /* @__PURE__ */ (0, O.jsx)(ie, { size: "1.125rem" })
45123
45126
  })
45124
45127
  });
45125
45128
  }, XA = () => {
@@ -45168,7 +45171,7 @@ var NA = {
45168
45171
  type: "button",
45169
45172
  disabled: n,
45170
45173
  "aria-label": r("dataEditor.filters.replaceAll"),
45171
- children: /* @__PURE__ */ (0, O.jsx)(U, { size: "1rem" })
45174
+ children: /* @__PURE__ */ (0, O.jsx)(oe, { size: "1rem" })
45172
45175
  })
45173
45176
  })
45174
45177
  ]
@@ -45200,7 +45203,7 @@ var NA = {
45200
45203
  className: "updog__search-mode-select__button",
45201
45204
  children: /* @__PURE__ */ (0, O.jsxs)("span", {
45202
45205
  className: "updog__search-mode-select__icon-wrapper",
45203
- children: [a, /* @__PURE__ */ (0, O.jsx)(U, { size: "0.625rem" })]
45206
+ children: [a, /* @__PURE__ */ (0, O.jsx)(oe, { size: "0.625rem" })]
45204
45207
  })
45205
45208
  })
45206
45209
  }), [a, n]),
@@ -45283,7 +45286,7 @@ var NA = {
45283
45286
  size: "sm",
45284
45287
  onClick: E,
45285
45288
  "aria-label": f("dataEditor.filters.previousOccurrence"),
45286
- children: /* @__PURE__ */ (0, O.jsx)(re, {})
45289
+ children: /* @__PURE__ */ (0, O.jsx)(U, {})
45287
45290
  })
45288
45291
  }),
45289
45292
  /* @__PURE__ */ (0, O.jsx)(Hs, {
@@ -46584,27 +46587,27 @@ var gj = ({ text: e, onSelect: t }) => /* @__PURE__ */ (0, O.jsx)(ot, {
46584
46587
  }
46585
46588
  return i;
46586
46589
  }, Qj = () => {
46587
- let { columns: e, enableCreateColumn: t, synonyms: n } = th(), { t: r } = j(), { headers: i, columnMapping: a, updateColumnMapping: o, pendingColumns: s, setPendingColumns: c } = ZN(), [l, u] = (0, y.useState)(null), d = (0, y.useRef)(null), f = (0, y.useMemo)(() => Zj(i, e, n), [
46590
+ let { columns: e, enableCreateColumn: t, synonyms: n } = th(), { t: r } = j(), { headers: i, columnMapping: a, updateColumnMapping: o, pendingColumns: s, setPendingColumns: c } = ZN(), [l, u] = (0, y.useState)(null), [d, f] = (0, y.useState)(!0), p = (0, y.useRef)(null), m = (0, y.useMemo)(() => Zj(i, e, n), [
46588
46591
  i,
46589
46592
  e,
46590
46593
  n
46591
- ]), p = (0, y.useCallback)((e, t) => {
46594
+ ]), h = (0, y.useCallback)((e, t) => {
46592
46595
  if (t === "action:create") {
46593
- d.current = e, u({ title: e });
46596
+ p.current = e, u({ title: e });
46594
46597
  return;
46595
46598
  }
46596
46599
  o(e, t);
46597
- }, [o]), m = (0, y.useCallback)((e) => {
46598
- if (d.current === null) return;
46600
+ }, [o]), g = (0, y.useCallback)((e) => {
46601
+ if (p.current === null) return;
46599
46602
  let t = Math.random().toString(36).slice(2, 7), n = `${ad}${e.title}-${t}`;
46600
46603
  c((t) => [...t, {
46601
46604
  ...e,
46602
46605
  id: n,
46603
46606
  size: 150
46604
- }]), o(d.current, n), d.current = null, u(null);
46605
- }, [o, c]), h = (0, y.useCallback)(() => {
46606
- d.current = null, u(null);
46607
- }, []), g = (0, y.useMemo)(() => [...e.map((e) => e.title), ...s.map((e) => e.title)], [e, s]), _ = (0, y.useMemo)(() => {
46607
+ }]), o(p.current, n), p.current = null, u(null);
46608
+ }, [o, c]), _ = (0, y.useCallback)(() => {
46609
+ p.current = null, u(null);
46610
+ }, []), v = (0, y.useMemo)(() => [...e.map((e) => e.title), ...s.map((e) => e.title)], [e, s]), b = (0, y.useMemo)(() => {
46608
46611
  let n = {
46609
46612
  text: r("dataEditor.uploader.matchColumns.bestMatch"),
46610
46613
  color: "green"
@@ -46613,7 +46616,7 @@ var gj = ({ text: e, onSelect: t }) => /* @__PURE__ */ (0, O.jsx)(ot, {
46613
46616
  color: "blue"
46614
46617
  }, o = r("dataEditor.uploader.matchColumns.createColumn");
46615
46618
  return Object.fromEntries(i.map((r) => {
46616
- let i = f[r], c = e.map((e) => ({
46619
+ let i = m[r], c = e.map((e) => ({
46617
46620
  id: e.id,
46618
46621
  text: e.title,
46619
46622
  ...e.id === i && { tag: n }
@@ -46638,28 +46641,30 @@ var gj = ({ text: e, onSelect: t }) => /* @__PURE__ */ (0, O.jsx)(ot, {
46638
46641
  s,
46639
46642
  r,
46640
46643
  t,
46641
- f
46642
- ]), v = (0, y.useMemo)(() => i.filter((e) => a[e]).length, [i, a]);
46644
+ m
46645
+ ]), x = (0, y.useMemo)(() => i.filter((e) => a[e]).length, [i, a]);
46643
46646
  return {
46644
46647
  headers: i,
46645
- matchedCount: v,
46646
- allMatched: v === i.length,
46648
+ showMatched: d,
46649
+ setShowMatched: f,
46650
+ matchedCount: x,
46651
+ allMatched: x === i.length,
46647
46652
  placeholder: r("dataEditor.uploader.matchColumns.selectColumnPlaceholder"),
46648
- existingNames: g,
46653
+ existingNames: v,
46649
46654
  createModalValues: l,
46650
46655
  getRowData: (0, y.useCallback)((e) => ({
46651
46656
  mappedValue: a[e],
46652
- options: _[e],
46653
- autoMatchId: f[e]
46657
+ options: b[e],
46658
+ autoMatchId: m[e]
46654
46659
  }), [
46655
46660
  a,
46656
- _,
46657
- f
46661
+ b,
46662
+ m
46658
46663
  ]),
46659
- onSelectChange: p,
46664
+ onSelectChange: h,
46660
46665
  onClear: o,
46661
- submitCreate: m,
46662
- closeCreate: h
46666
+ submitCreate: g,
46667
+ closeCreate: _
46663
46668
  };
46664
46669
  }, $j = (0, y.createContext)(null);
46665
46670
  function eM({ children: e }) {
@@ -46674,7 +46679,7 @@ var tM = () => {
46674
46679
  if (!e) throw Error("useColumnMatching must be used within ColumnMatchingProvider");
46675
46680
  return e;
46676
46681
  }, nM = () => {
46677
- let { t: e } = j(), { matchedCount: t, allMatched: n, headers: r } = tM(), i = n ? "green" : "yellow";
46682
+ let { t: e } = j(), { matchedCount: t, allMatched: n, headers: r, showMatched: i, setShowMatched: a } = tM(), o = n ? "green" : "yellow", s = (0, y.useCallback)((e) => a(e), [a]);
46678
46683
  return /* @__PURE__ */ (0, O.jsx)("header", {
46679
46684
  className: "updog__column-matching__header",
46680
46685
  children: /* @__PURE__ */ (0, O.jsxs)("div", {
@@ -46688,7 +46693,7 @@ var tM = () => {
46688
46693
  weight: "medium",
46689
46694
  children: e("dataEditor.uploader.matchColumns.importedColumns")
46690
46695
  }), /* @__PURE__ */ (0, O.jsx)(sc, {
46691
- color: i,
46696
+ color: o,
46692
46697
  text: e("dataEditor.uploader.matchColumns.matchedCount", {
46693
46698
  matched: t,
46694
46699
  total: r.length
@@ -46696,12 +46701,21 @@ var tM = () => {
46696
46701
  })]
46697
46702
  }),
46698
46703
  /* @__PURE__ */ (0, O.jsx)("div", { className: "updog__column-matching__header-spacer" }),
46699
- /* @__PURE__ */ (0, O.jsx)(W, {
46700
- as: "div",
46701
- size: "sm",
46702
- weight: "medium",
46703
- className: "updog__column-matching__header-column",
46704
- children: e("dataEditor.uploader.matchColumns.targetColumns")
46704
+ /* @__PURE__ */ (0, O.jsxs)("div", {
46705
+ className: "updog__column-matching__header-column updog__column-matching__header-column--with-items",
46706
+ children: [/* @__PURE__ */ (0, O.jsx)(W, {
46707
+ as: "div",
46708
+ size: "sm",
46709
+ weight: "medium",
46710
+ children: e("dataEditor.uploader.matchColumns.targetColumns")
46711
+ }), /* @__PURE__ */ (0, O.jsx)(jt, {
46712
+ checked: i,
46713
+ onChange: s,
46714
+ checkboxPosition: "end",
46715
+ label: e("dataEditor.uploader.matchColumns.showMatched"),
46716
+ size: "sm",
46717
+ className: "updog__column-matching__show-matched"
46718
+ })]
46705
46719
  }),
46706
46720
  /* @__PURE__ */ (0, O.jsx)("div", { className: "updog__column-matching__action" })
46707
46721
  ]
@@ -46767,24 +46781,34 @@ var tM = () => {
46767
46781
  ]
46768
46782
  });
46769
46783
  }), iM = () => {
46770
- let { headers: e, placeholder: t, getRowData: n, onSelectChange: r, onClear: i } = tM();
46771
- return /* @__PURE__ */ (0, O.jsx)("div", {
46784
+ let { headers: e, showMatched: t, placeholder: n, getRowData: r, onSelectChange: i, onClear: a } = tM(), { t: o } = j(), s = e.map((e) => ({
46785
+ csvHeader: e,
46786
+ ...r(e)
46787
+ })).filter((e) => t || !e.mappedValue);
46788
+ return s.length === 0 ? /* @__PURE__ */ (0, O.jsx)("div", {
46772
46789
  className: "updog__column-matching__content",
46773
46790
  children: /* @__PURE__ */ (0, O.jsx)("div", {
46774
- className: "updog__column-matching__content-inner",
46775
- children: e.map((e) => {
46776
- let { mappedValue: a, options: o, autoMatchId: s } = n(e);
46777
- return /* @__PURE__ */ (0, O.jsx)(rM, {
46778
- csvHeader: e,
46779
- mappedValue: a,
46780
- options: o,
46781
- autoMatchId: s,
46782
- placeholder: t,
46783
- onSelectChange: r,
46784
- onClear: i
46785
- }, e);
46791
+ className: "updog__column-matching__empty",
46792
+ children: /* @__PURE__ */ (0, O.jsx)(W, {
46793
+ size: "sm",
46794
+ color: "secondary",
46795
+ children: o("dataEditor.uploader.matchColumns.allMatched")
46786
46796
  })
46787
46797
  })
46798
+ }) : /* @__PURE__ */ (0, O.jsx)("div", {
46799
+ className: "updog__column-matching__content",
46800
+ children: /* @__PURE__ */ (0, O.jsx)("div", {
46801
+ className: "updog__column-matching__content-inner",
46802
+ children: s.map(({ csvHeader: e, mappedValue: t, options: r, autoMatchId: o }) => /* @__PURE__ */ (0, O.jsx)(rM, {
46803
+ csvHeader: e,
46804
+ mappedValue: t,
46805
+ options: r,
46806
+ autoMatchId: o,
46807
+ placeholder: n,
46808
+ onSelectChange: i,
46809
+ onClear: a
46810
+ }, e))
46811
+ })
46788
46812
  });
46789
46813
  }, aM = () => {
46790
46814
  let { createModalValues: e, existingNames: t, submitCreate: n, closeCreate: r } = tM();
@@ -47285,7 +47309,8 @@ var $M = () => {
47285
47309
  onChange: c,
47286
47310
  checkboxPosition: "end",
47287
47311
  label: t("dataEditor.uploader.matchValues.showMatched"),
47288
- size: "sm"
47312
+ size: "sm",
47313
+ className: "updog__value-matching__show-matched"
47289
47314
  })]
47290
47315
  })
47291
47316
  }), /* @__PURE__ */ (0, O.jsx)(Hs, {
@@ -47300,7 +47325,7 @@ var $M = () => {
47300
47325
  className: "updog__value-matching__collapse-btn",
47301
47326
  "aria-label": s,
47302
47327
  onClick: l,
47303
- children: /* @__PURE__ */ (0, O.jsx)(U, { className: N("updog__value-matching__collapse-icon", o && "updog__value-matching__collapse-icon--collapsed") })
47328
+ children: /* @__PURE__ */ (0, O.jsx)(oe, { className: N("updog__value-matching__collapse-icon", o && "updog__value-matching__collapse-icon--collapsed") })
47304
47329
  })
47305
47330
  })]
47306
47331
  });
@@ -47695,7 +47720,7 @@ var hN = () => {
47695
47720
  children: n ? /* @__PURE__ */ (0, O.jsx)(bN, {}) : /* @__PURE__ */ (0, O.jsxs)(O.Fragment, { children: [
47696
47721
  /* @__PURE__ */ (0, O.jsx)("div", {
47697
47722
  className: "updog__step-select-files__icon-container",
47698
- children: r ? /* @__PURE__ */ (0, O.jsx)(oe, {
47723
+ children: r ? /* @__PURE__ */ (0, O.jsx)(ae, {
47699
47724
  size: "1rem",
47700
47725
  className: "updog__step-select-files__icon rtl-mirror"
47701
47726
  }) : /* @__PURE__ */ (0, O.jsx)(We, {
@@ -47990,14 +48015,14 @@ function JN() {
47990
48015
  let { store: e, validator: t, columns: n, primaryKey: r, setShowUploader: i, pendingImportFile: a, setPendingImportFile: o, onColumnMatch: s, onValueMatch: c, synonyms: l, addDynamicColumns: u, scaleClient: d } = th(), { t: f } = j(), [p, m] = (0, y.useState)(0), [h, g] = (0, y.useState)(0), [_, v] = (0, y.useState)(null), [b, x] = (0, y.useState)({}), S = (0, y.useMemo)(() => {
47991
48016
  let e = new Set(Object.values(b).filter(Boolean));
47992
48017
  return n.filter((t) => t.unique && e.has(t.id));
47993
- }, [b, n]), [C, w] = (0, y.useState)(() => r), [T, E] = (0, y.useState)(!1), [D, k] = (0, y.useState)(!1), [A, M] = (0, y.useState)(null), [N, P] = (0, y.useState)([]), [F, I] = (0, y.useState)(null), [L, R] = (0, y.useState)([]), [ee, z] = (0, y.useState)({}), [B, V] = (0, y.useState)([]), [H, te] = (0, y.useState)({}), ne = (0, y.useRef)(null), [re, ie] = (0, y.useState)(-1), ae = (0, y.useCallback)((e, t) => t ? f("dataEditor.uploader.matchColumns.syntheticColumnValue", {
48018
+ }, [b, n]), [C, w] = (0, y.useState)(() => r), [T, E] = (0, y.useState)(!1), [D, k] = (0, y.useState)(!1), [A, M] = (0, y.useState)(null), [N, P] = (0, y.useState)([]), [F, I] = (0, y.useState)(null), [L, R] = (0, y.useState)([]), [ee, z] = (0, y.useState)({}), [B, V] = (0, y.useState)([]), [H, te] = (0, y.useState)({}), ne = (0, y.useRef)(null), [U, re] = (0, y.useState)(-1), ie = (0, y.useCallback)((e, t) => t ? f("dataEditor.uploader.matchColumns.syntheticColumnValue", {
47994
48019
  index: e + 1,
47995
48020
  value: t
47996
- }) : f("dataEditor.uploader.matchColumns.syntheticColumn", { index: e + 1 }), [f]), oe = (0, y.useMemo)(() => _ ? HM(_.detection, re) : 0, [_, re]), U = (0, y.useMemo)(() => _ ? UM(_.rawRows, re, oe, ae) : [], [
48021
+ }) : f("dataEditor.uploader.matchColumns.syntheticColumn", { index: e + 1 }), [f]), ae = (0, y.useMemo)(() => _ ? HM(_.detection, U) : 0, [_, U]), oe = (0, y.useMemo)(() => _ ? UM(_.rawRows, U, ae, ie) : [], [
47997
48022
  _,
47998
- re,
47999
- oe,
48000
- ae
48023
+ U,
48024
+ ae,
48025
+ ie
48001
48026
  ]), se = (0, y.useCallback)((e) => {
48002
48027
  D || w(e);
48003
48028
  }, [D]), ce = (0, y.useRef)(null);
@@ -48054,20 +48079,20 @@ function JN() {
48054
48079
  v(e), E(!1);
48055
48080
  }, []), ye = (0, y.useRef)(0);
48056
48081
  (0, y.useEffect)(() => {
48057
- if (!_ || U.length === 0) return;
48082
+ if (!_ || oe.length === 0) return;
48058
48083
  let e = ++ye.current;
48059
- Xj(U, n, s, l).then((t) => {
48084
+ Xj(oe, n, s, l).then((t) => {
48060
48085
  ye.current === e && x(t);
48061
48086
  });
48062
48087
  }, [
48063
48088
  _,
48064
- U,
48089
+ oe,
48065
48090
  n,
48066
48091
  s,
48067
48092
  l
48068
48093
  ]);
48069
48094
  let be = (0, y.useCallback)(() => {
48070
- le.cancel(), v(null), E(!1), x({}), V([]), te({}), ne.current = null, ie(-1), M(null), P([]), I(null), R([]);
48095
+ le.cancel(), v(null), E(!1), x({}), V([]), te({}), ne.current = null, re(-1), M(null), P([]), I(null), R([]);
48071
48096
  }, [le]), xe = (0, y.useCallback)((e, t, n) => {
48072
48097
  M(e), P(t), I(t[0]), R(n), E(!1);
48073
48098
  }, []), Se = (0, y.useCallback)(() => {
@@ -48077,7 +48102,7 @@ function JN() {
48077
48102
  }).then((e) => {
48078
48103
  if (e.kind !== "rows") return;
48079
48104
  let t = TM(e.rows);
48080
- ie(t.headerRowIndex), ve({
48105
+ re(t.headerRowIndex), ve({
48081
48106
  fileName: A.name,
48082
48107
  rawRows: e.rows,
48083
48108
  detection: t,
@@ -48092,7 +48117,7 @@ function JN() {
48092
48117
  le,
48093
48118
  ve,
48094
48119
  me,
48095
- ae
48120
+ ie
48096
48121
  ]), Ce = (0, y.useCallback)(async (t) => {
48097
48122
  try {
48098
48123
  let e = await le.parse(t, { format: "csv" });
@@ -48101,7 +48126,7 @@ function JN() {
48101
48126
  return;
48102
48127
  }
48103
48128
  let n = TM(e.rows);
48104
- if (ie(n.headerRowIndex), ve({
48129
+ if (re(n.headerRowIndex), ve({
48105
48130
  fileName: t.name,
48106
48131
  rawRows: e.rows,
48107
48132
  detection: n,
@@ -48127,12 +48152,12 @@ function JN() {
48127
48152
  E,
48128
48153
  e,
48129
48154
  f,
48130
- ae
48155
+ ie
48131
48156
  ]), we = (0, y.useCallback)(async (t) => {
48132
48157
  try {
48133
48158
  let e = await le.parse(t, { format: "json" });
48134
48159
  if (e.kind !== "records") return;
48135
- ie(0), ve({
48160
+ re(0), ve({
48136
48161
  fileName: t.name,
48137
48162
  rawRows: GM(e.headers, e.rows),
48138
48163
  detection: WM()
@@ -48154,7 +48179,7 @@ function JN() {
48154
48179
  try {
48155
48180
  let e = await le.parse(t, { format: "xml" });
48156
48181
  if (e.kind !== "records") return;
48157
- ie(0), ve({
48182
+ re(0), ve({
48158
48183
  fileName: t.name,
48159
48184
  rawRows: GM(e.headers, e.rows),
48160
48185
  detection: WM()
@@ -48176,7 +48201,7 @@ function JN() {
48176
48201
  le.parse(t, { format: "xlsx" }).then((e) => {
48177
48202
  if (e.kind === "sheets") {
48178
48203
  let n = e.sheets.map((e) => {
48179
- let t = TM(e.rows), n = HM(t, t.headerRowIndex), r = UM(e.rows, t.headerRowIndex, n, ae);
48204
+ let t = TM(e.rows), n = HM(t, t.headerRowIndex), r = UM(e.rows, t.headerRowIndex, n, ie);
48180
48205
  return {
48181
48206
  name: e.name,
48182
48207
  headers: r,
@@ -48189,7 +48214,7 @@ function JN() {
48189
48214
  }
48190
48215
  if (e.kind !== "rows") return;
48191
48216
  let n = TM(e.rows);
48192
- ie(n.headerRowIndex), ve({
48217
+ re(n.headerRowIndex), ve({
48193
48218
  fileName: t.name,
48194
48219
  rawRows: e.rows,
48195
48220
  detection: n,
@@ -48209,7 +48234,7 @@ function JN() {
48209
48234
  xe,
48210
48235
  E,
48211
48236
  e,
48212
- ae
48237
+ ie
48213
48238
  ]), De = (0, y.useCallback)((e) => {
48214
48239
  E(!0), ne.current = e;
48215
48240
  let t = e.name.split(".").pop()?.toLowerCase();
@@ -48248,7 +48273,7 @@ function JN() {
48248
48273
  }
48249
48274
  return t;
48250
48275
  });
48251
- ie(0), ve({
48276
+ re(0), ve({
48252
48277
  fileName: e.label,
48253
48278
  rawRows: GM(n, r),
48254
48279
  detection: WM()
@@ -48279,7 +48304,7 @@ function JN() {
48279
48304
  return;
48280
48305
  }
48281
48306
  if (D) return;
48282
- let e = {}, t = {}, r = KM(U);
48307
+ let e = {}, t = {}, r = KM(oe);
48283
48308
  for (let [i, a] of Object.entries(b)) {
48284
48309
  if (!a) continue;
48285
48310
  let o = n.find((e) => e.id === a);
@@ -48288,7 +48313,7 @@ function JN() {
48288
48313
  if (s !== "select" && s !== "multiselect") continue;
48289
48314
  let c = o.editor.options, l = r.get(i);
48290
48315
  if (l === void 0) continue;
48291
- let u = qM(_.rawRows, oe, l);
48316
+ let u = qM(_.rawRows, ae, l);
48292
48317
  if (s === "multiselect") {
48293
48318
  let n = o.editor.delimiter, r = AN(u, c, n);
48294
48319
  t[a] = r;
@@ -48324,8 +48349,8 @@ function JN() {
48324
48349
  c,
48325
48350
  l,
48326
48351
  D,
48327
- U,
48328
- oe
48352
+ oe,
48353
+ ae
48329
48354
  ]);
48330
48355
  let Be = (0, y.useMemo)(() => {
48331
48356
  let e = {};
@@ -48353,17 +48378,17 @@ function JN() {
48353
48378
  if (!t) return;
48354
48379
  let r = n.find((t) => t.id === e);
48355
48380
  if (r?.editor?.type !== "multiselect") return;
48356
- let i = KM(U).get(t);
48381
+ let i = KM(oe).get(t);
48357
48382
  if (i === void 0) return;
48358
- let a = qM(_.rawRows, oe, i), o = r.editor.delimiter;
48383
+ let a = qM(_.rawRows, ae, i), o = r.editor.delimiter;
48359
48384
  He(e, AN(a, r.editor.options, o));
48360
48385
  }, [
48361
48386
  _,
48362
48387
  b,
48363
48388
  n,
48364
48389
  He,
48365
- U,
48366
- oe
48390
+ oe,
48391
+ ae
48367
48392
  ]), We = (0, y.useCallback)((e, t) => {
48368
48393
  te((n) => {
48369
48394
  let r = n[e] ?? [];
@@ -48377,13 +48402,13 @@ function JN() {
48377
48402
  for (let [r, i] of Object.entries(b)) !i || e.has(i) || n.find((e) => e.id === i)?.editor?.type === "date" && t.push(r);
48378
48403
  return t;
48379
48404
  }, [b, n]), Ke = (0, y.useCallback)(() => {
48380
- let e = new Set(B.map((e) => e.id)), t = EN(b, n, e), i = _ ? YM(_.rawRows, U, oe, 1e3) : [], a = rp(i, DN(t)), o = cp(i, Ge(e));
48405
+ let e = new Set(B.map((e) => e.id)), t = EN(b, n, e), i = _ ? YM(_.rawRows, oe, ae, 1e3) : [], a = rp(i, DN(t)), o = cp(i, Ge(e));
48381
48406
  return {
48382
48407
  columnMapping: b,
48383
48408
  valueMapping: Be,
48384
48409
  primaryKey: C ?? r,
48385
48410
  selectedSheet: F ?? void 0,
48386
- headerRowIndex: re,
48411
+ headerRowIndex: U,
48387
48412
  numberFormat: a,
48388
48413
  dateFormat: o,
48389
48414
  newColumns: B
@@ -48395,9 +48420,9 @@ function JN() {
48395
48420
  C,
48396
48421
  F,
48397
48422
  r,
48398
- re,
48399
48423
  U,
48400
48424
  oe,
48425
+ ae,
48401
48426
  B,
48402
48427
  n,
48403
48428
  Ge
@@ -48424,8 +48449,8 @@ function JN() {
48424
48449
  monthTable: op(f),
48425
48450
  valueMapping: Be,
48426
48451
  multiselectDelimiters: Le
48427
- }, l = U, u = t.rawRows, p = [];
48428
- for (let e = oe; e < u.length; e++) {
48452
+ }, l = oe, u = t.rawRows, p = [];
48453
+ for (let e = ae; e < u.length; e++) {
48429
48454
  let t = u[e];
48430
48455
  t && !RM(t) && p.push(e);
48431
48456
  }
@@ -48458,8 +48483,8 @@ function JN() {
48458
48483
  b,
48459
48484
  B,
48460
48485
  n,
48461
- U,
48462
48486
  oe,
48487
+ ae,
48463
48488
  Be,
48464
48489
  Le,
48465
48490
  e,
@@ -48476,12 +48501,12 @@ function JN() {
48476
48501
  for (let [t, n] of Object.entries(H)) e.addColumnOptions(t, n);
48477
48502
  let o = e.registerSource({ name: i.fileName });
48478
48503
  e.setSourceLoading(o, !0), e.recordLearnedSynonyms(MN(b, Be, [...n, ...B], Mj(jj, l)));
48479
- let s = U, c = i.delimiter ?? ",", d = i.rawRows, p = [];
48480
- for (let e = oe; e < d.length; e++) {
48504
+ let s = oe, c = i.delimiter ?? ",", d = i.rawRows, p = [];
48505
+ for (let e = ae; e < d.length; e++) {
48481
48506
  let t = d[e];
48482
48507
  t && !RM(t) && p.push(e);
48483
48508
  }
48484
- let m = YM(i.rawRows, s, oe, 1e3), h = EN(b, n, a), g = {
48509
+ let m = YM(i.rawRows, s, ae, 1e3), h = EN(b, n, a), g = {
48485
48510
  numberFormat: rp(m, DN(h)),
48486
48511
  dateFormat: cp(m, Ge(a)),
48487
48512
  monthTable: op(f),
@@ -48553,8 +48578,8 @@ function JN() {
48553
48578
  Le,
48554
48579
  l,
48555
48580
  Ge,
48556
- U,
48557
48581
  oe,
48582
+ ae,
48558
48583
  f
48559
48584
  ]);
48560
48585
  return {
@@ -48619,10 +48644,10 @@ function JN() {
48619
48644
  remoteSourceError: Ae,
48620
48645
  clearRemoteSourceError: Me,
48621
48646
  handleRemoteSourceSelect: Ne,
48622
- headerRowIndex: re,
48623
- setHeaderRowIndex: ie,
48624
- headers: U,
48625
- dataStartIndex: oe
48647
+ headerRowIndex: U,
48648
+ setHeaderRowIndex: re,
48649
+ headers: oe,
48650
+ dataStartIndex: ae
48626
48651
  };
48627
48652
  }
48628
48653
  //#endregion