@wilow_app/design-system 0.0.7 → 0.0.9

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.es.js CHANGED
@@ -1,4 +1,4 @@
1
- import { jsx as O, jsxs as V } from "react/jsx-runtime";
1
+ import { jsx as C, jsxs as V } from "react/jsx-runtime";
2
2
  import * as w from "react";
3
3
  import L, { useRef as B, useEffect as te, useContext as gr, useState as Te, useLayoutEffect as Vo } from "react";
4
4
  import Lo, { flushSync as mr } from "react-dom";
@@ -166,7 +166,7 @@ function In(e, t) {
166
166
  return t(e.apply(this, n));
167
167
  };
168
168
  }
169
- function On(e, t) {
169
+ function Cn(e, t) {
170
170
  if (typeof e == "function")
171
171
  return In(e, t);
172
172
  if (typeof e != "object" || e === null)
@@ -207,10 +207,10 @@ var pt = {};
207
207
  * This source code is licensed under the MIT license found in the
208
208
  * LICENSE file in the root directory of this source tree.
209
209
  */
210
- var Cn;
210
+ var On;
211
211
  function zo() {
212
- if (Cn) return pt;
213
- Cn = 1;
212
+ if (On) return pt;
213
+ On = 1;
214
214
  var e = L;
215
215
  function t(a, d) {
216
216
  return a === d && (a !== 0 || 1 / a === 1 / d) || a !== a && d !== d;
@@ -442,7 +442,7 @@ function si(e) {
442
442
  n = Object.getPrototypeOf(n);
443
443
  return t === n;
444
444
  }
445
- function Or(e, t, n) {
445
+ function Cr(e, t, n) {
446
446
  si(e) || Ht(
447
447
  `${n}() in ${t} must return a plain object. Instead received ${e}.`
448
448
  );
@@ -459,7 +459,7 @@ function Rt(e) {
459
459
  function Sn(e) {
460
460
  return e.dependsOnOwnProps ? !!e.dependsOnOwnProps : e.length !== 1;
461
461
  }
462
- function Cr(e, t) {
462
+ function Or(e, t) {
463
463
  return function(r, { displayName: o }) {
464
464
  const i = function(c, a) {
465
465
  return i.dependsOnOwnProps ? i.mapToProps(c, a) : i.mapToProps(c, void 0);
@@ -467,7 +467,7 @@ function Cr(e, t) {
467
467
  return i.dependsOnOwnProps = !0, i.mapToProps = function(c, a) {
468
468
  i.mapToProps = e, i.dependsOnOwnProps = Sn(e);
469
469
  let d = i(c, a);
470
- return typeof d == "function" && (i.mapToProps = d, i.dependsOnOwnProps = Sn(d), d = i(c, a)), process.env.NODE_ENV !== "production" && Or(d, o, t), d;
470
+ return typeof d == "function" && (i.mapToProps = d, i.dependsOnOwnProps = Sn(d), d = i(c, a)), process.env.NODE_ENV !== "production" && Cr(d, o, t), d;
471
471
  }, i;
472
472
  };
473
473
  }
@@ -486,7 +486,7 @@ function ci(e) {
486
486
  )
487
487
  ) : e ? typeof e == "function" ? (
488
488
  // @ts-ignore
489
- Cr(e, "mapDispatchToProps")
489
+ Or(e, "mapDispatchToProps")
490
490
  ) : zt(e, "mapDispatchToProps") : Rt((t) => ({
491
491
  dispatch: t
492
492
  }));
@@ -494,7 +494,7 @@ function ci(e) {
494
494
  function ai(e) {
495
495
  return e ? typeof e == "function" ? (
496
496
  // @ts-ignore
497
- Cr(e, "mapStateToProps")
497
+ Or(e, "mapStateToProps")
498
498
  ) : zt(e, "mapStateToProps") : Rt(() => ({}));
499
499
  }
500
500
  function li(e, t, n) {
@@ -505,7 +505,7 @@ function di(e) {
505
505
  let i = !1, s;
506
506
  return function(a, d, p) {
507
507
  const l = e(a, d, p);
508
- return i ? o(l, s) || (s = l) : (i = !0, s = l, process.env.NODE_ENV !== "production" && Or(s, r, "mergeProps")), s;
508
+ return i ? o(l, s) || (s = l) : (i = !0, s = l, process.env.NODE_ENV !== "production" && Cr(s, r, "mergeProps")), s;
509
509
  };
510
510
  };
511
511
  }
@@ -650,11 +650,11 @@ var yi = {
650
650
  function Pn(e) {
651
651
  return ti(e) ? Sr : Ni[e.$$typeof] || yi;
652
652
  }
653
- var xi = Object.defineProperty, Ii = Object.getOwnPropertyNames, Rn = Object.getOwnPropertySymbols, Oi = Object.getOwnPropertyDescriptor, Ci = Object.getPrototypeOf, Tn = Object.prototype;
653
+ var xi = Object.defineProperty, Ii = Object.getOwnPropertyNames, Rn = Object.getOwnPropertySymbols, Ci = Object.getOwnPropertyDescriptor, Oi = Object.getPrototypeOf, Tn = Object.prototype;
654
654
  function Tt(e, t) {
655
655
  if (typeof t != "string") {
656
656
  if (Tn) {
657
- const i = Ci(t);
657
+ const i = Oi(t);
658
658
  i && i !== Tn && Tt(e, i);
659
659
  }
660
660
  let n = Ii(t);
@@ -663,7 +663,7 @@ function Tt(e, t) {
663
663
  for (let i = 0; i < n.length; ++i) {
664
664
  const s = n[i];
665
665
  if (!Ei[s] && !(o && o[s]) && !(r && r[s])) {
666
- const c = Oi(t, s);
666
+ const c = Ci(t, s);
667
667
  try {
668
668
  xi(e, s, c);
669
669
  } catch {
@@ -1057,13 +1057,13 @@ function K(e, t, n) {
1057
1057
  };
1058
1058
  }
1059
1059
  const qi = process.env.NODE_ENV === "production", $n = "Invariant failed";
1060
- class Oe extends Error {
1060
+ class Ce extends Error {
1061
1061
  }
1062
- Oe.prototype.toString = function() {
1062
+ Ce.prototype.toString = function() {
1063
1063
  return this.message;
1064
1064
  };
1065
1065
  function g(e, t) {
1066
- throw qi ? new Oe($n) : new Oe(`${$n}: ${t || ""}`);
1066
+ throw qi ? new Ce($n) : new Ce(`${$n}: ${t || ""}`);
1067
1067
  }
1068
1068
  class Yi extends L.Component {
1069
1069
  constructor(...t) {
@@ -1074,7 +1074,7 @@ class Yi extends L.Component {
1074
1074
  The active drag has been aborted.
1075
1075
  `));
1076
1076
  const o = n.error;
1077
- o instanceof Oe && (n.preventDefault(), process.env.NODE_ENV !== "production" && Bt(o.message));
1077
+ o instanceof Ce && (n.preventDefault(), process.env.NODE_ENV !== "production" && Bt(o.message));
1078
1078
  }, this.getCallbacks = () => {
1079
1079
  if (!this.callbacks)
1080
1080
  throw new Error("Unable to find AppCallbacks in <ErrorBoundary/>");
@@ -1090,7 +1090,7 @@ class Yi extends L.Component {
1090
1090
  }]);
1091
1091
  }
1092
1092
  componentDidCatch(t) {
1093
- if (t instanceof Oe) {
1093
+ if (t instanceof Ce) {
1094
1094
  process.env.NODE_ENV !== "production" && Bt(t.message), this.setState({});
1095
1095
  return;
1096
1096
  }
@@ -1170,7 +1170,7 @@ function Lr(e, t) {
1170
1170
  return !1;
1171
1171
  return !0;
1172
1172
  }
1173
- function C(e, t) {
1173
+ function O(e, t) {
1174
1174
  const n = Te(() => ({
1175
1175
  inputs: t,
1176
1176
  result: e()
@@ -1183,7 +1183,7 @@ function C(e, t) {
1183
1183
  }, [s]), s.result;
1184
1184
  }
1185
1185
  function D(e, t) {
1186
- return C(() => e, t);
1186
+ return O(() => e, t);
1187
1187
  }
1188
1188
  const G = {
1189
1189
  x: 0,
@@ -1203,7 +1203,7 @@ const G = {
1203
1203
  } : {
1204
1204
  x: n,
1205
1205
  y: t
1206
- }, Ce = (e, t) => Math.sqrt((t.x - e.x) ** 2 + (t.y - e.y) ** 2), Fn = (e, t) => Math.min(...t.map((n) => Ce(e, n))), Mr = (e) => (t) => ({
1206
+ }, Oe = (e, t) => Math.sqrt((t.x - e.x) ** 2 + (t.y - e.y) ** 2), Fn = (e, t) => Math.min(...t.map((n) => Oe(e, n))), Mr = (e) => (t) => ({
1207
1207
  x: e(t.x),
1208
1208
  y: e(t.y)
1209
1209
  });
@@ -1646,7 +1646,7 @@ const Hr = (e, t) => t.margin[e.start] + t.borderBox[e.size] / 2, xs = (e, t) =>
1646
1646
  moveInto: t,
1647
1647
  isMoving: n
1648
1648
  }) => ae(e.line, t.contentBox[e.start] + Hr(e, n), Zt(e, t.contentBox, n));
1649
- var Os = ({
1649
+ var Cs = ({
1650
1650
  impact: e,
1651
1651
  draggable: t,
1652
1652
  draggables: n,
@@ -1699,7 +1699,7 @@ var Os = ({
1699
1699
  const n = e.frame;
1700
1700
  return n ? F(t, n.scroll.diff.displacement) : t;
1701
1701
  };
1702
- const Cs = ({
1702
+ const Os = ({
1703
1703
  impact: e,
1704
1704
  draggable: t,
1705
1705
  droppable: n,
@@ -1707,7 +1707,7 @@ const Cs = ({
1707
1707
  afterCritical: o
1708
1708
  }) => {
1709
1709
  const i = t.page.borderBox.center, s = e.at;
1710
- return !n || !s ? i : s.type === "REORDER" ? Os({
1710
+ return !n || !s ? i : s.type === "REORDER" ? Cs({
1711
1711
  impact: e,
1712
1712
  draggable: t,
1713
1713
  draggables: r,
@@ -1720,7 +1720,7 @@ const Cs = ({
1720
1720
  });
1721
1721
  };
1722
1722
  var rt = (e) => {
1723
- const t = Cs(e), n = e.droppable;
1723
+ const t = Os(e), n = e.droppable;
1724
1724
  return n ? Vt(n, t) : t;
1725
1725
  }, zr = (e, t) => {
1726
1726
  const n = j(t, e.scroll.initial), r = me(n);
@@ -1934,7 +1934,7 @@ var Ts = ({
1934
1934
  viewport: t.frame,
1935
1935
  withDroppableDisplacement: !0
1936
1936
  })).sort((s, c) => {
1937
- const a = Ce(e, Vt(n, jn(s, o))), d = Ce(e, Vt(n, jn(c, o)));
1937
+ const a = Oe(e, Vt(n, jn(s, o))), d = Oe(e, Vt(n, jn(c, o)));
1938
1938
  return a < d ? -1 : d < a ? 1 : s.descriptor.index - c.descriptor.index;
1939
1939
  })[0] || null, Ve = $(function(t, n) {
1940
1940
  const r = n[t.line];
@@ -2182,7 +2182,7 @@ function ks({
2182
2182
  const s = i.axis, c = ae(i.axis.line, e.center[s.line], i.page.borderBox.center[s.crossAxisLine]);
2183
2183
  return {
2184
2184
  id: i.descriptor.id,
2185
- distance: Ce(r, c)
2185
+ distance: Oe(r, c)
2186
2186
  };
2187
2187
  }).sort((i, s) => s.distance - i.distance);
2188
2188
  return o[0] ? o[0].id : null;
@@ -3007,18 +3007,18 @@ const rn = {
3007
3007
  }, {
3008
3008
  minDropTime: $t,
3009
3009
  maxDropTime: co
3010
- } = so, Ic = co - $t, Xn = 1500, Oc = 0.6;
3011
- var Cc = ({
3010
+ } = so, Ic = co - $t, Xn = 1500, Cc = 0.6;
3011
+ var Oc = ({
3012
3012
  current: e,
3013
3013
  destination: t,
3014
3014
  reason: n
3015
3015
  }) => {
3016
- const r = Ce(e, t);
3016
+ const r = Oe(e, t);
3017
3017
  if (r <= 0)
3018
3018
  return $t;
3019
3019
  if (r >= Xn)
3020
3020
  return co;
3021
- const o = r / Xn, i = $t + Ic * o, s = n === "CANCEL" ? i * Oc : i;
3021
+ const o = r / Xn, i = $t + Ic * o, s = n === "CANCEL" ? i * Cc : i;
3022
3022
  return Number(s.toFixed(2));
3023
3023
  }, wc = ({
3024
3024
  impact: e,
@@ -3123,7 +3123,7 @@ const Ac = ({
3123
3123
  }));
3124
3124
  return;
3125
3125
  }
3126
- const I = Cc({
3126
+ const I = Oc({
3127
3127
  current: o.current.client.offset,
3128
3128
  destination: h,
3129
3129
  reason: i
@@ -4101,7 +4101,7 @@ const Y = typeof window < "u" && typeof window.document < "u" && typeof window.d
4101
4101
  return e && t.setAttribute("nonce", e), t.type = "text/css", t;
4102
4102
  };
4103
4103
  function Da(e, t) {
4104
- const n = C(() => Ea(e), [e]), r = B(null), o = B(null), i = D($((l) => {
4104
+ const n = O(() => Ea(e), [e]), r = B(null), o = B(null), i = D($((l) => {
4105
4105
  const u = o.current;
4106
4106
  u || (process.env.NODE_ENV !== "production" ? g(!1, "Cannot set dynamic style element if it is not set") : g()), u.textContent = l;
4107
4107
  }), []), s = D((l) => {
@@ -4128,7 +4128,7 @@ function Da(e, t) {
4128
4128
  }, [i, n.dropAnimating, n.userCancel]), d = D(() => {
4129
4129
  o.current && i(n.resting);
4130
4130
  }, [i, n.resting]);
4131
- return C(() => ({
4131
+ return O(() => ({
4132
4132
  dragging: c,
4133
4133
  dropping: a,
4134
4134
  resting: d
@@ -4178,7 +4178,7 @@ function Na(e) {
4178
4178
  o.current = !1;
4179
4179
  const u = r.current;
4180
4180
  u && cancelAnimationFrame(u);
4181
- }), []), C(() => ({
4181
+ }), []), O(() => ({
4182
4182
  register: i,
4183
4183
  tryRecordFocus: d,
4184
4184
  tryRestoreFocusRecorded: a,
@@ -4260,7 +4260,7 @@ function xa() {
4260
4260
  };
4261
4261
  }
4262
4262
  function Ia() {
4263
- const e = C(xa, []);
4263
+ const e = O(xa, []);
4264
4264
  return te(() => function() {
4265
4265
  e.clean();
4266
4266
  }, [e]), e;
@@ -4269,7 +4269,7 @@ var ln = L.createContext(null), Pe = () => {
4269
4269
  const e = document.body;
4270
4270
  return e || (process.env.NODE_ENV !== "production" ? g(!1, "Cannot find document.body") : g()), e;
4271
4271
  };
4272
- const Oa = {
4272
+ const Ca = {
4273
4273
  position: "absolute",
4274
4274
  width: "1px",
4275
4275
  height: "1px",
@@ -4279,12 +4279,12 @@ const Oa = {
4279
4279
  overflow: "hidden",
4280
4280
  clip: "rect(0 0 0 0)",
4281
4281
  "clip-path": "inset(100%)"
4282
- }, Ca = (e) => `rfd-announcement-${e}`;
4282
+ }, Oa = (e) => `rfd-announcement-${e}`;
4283
4283
  function wa(e) {
4284
- const t = C(() => Ca(e), [e]), n = B(null);
4284
+ const t = O(() => Oa(e), [e]), n = B(null);
4285
4285
  return te(function() {
4286
4286
  const i = document.createElement("div");
4287
- return n.current = i, i.id = t, i.setAttribute("aria-live", "assertive"), i.setAttribute("aria-atomic", "true"), Xe(i.style, Oa), Pe().appendChild(i), function() {
4287
+ return n.current = i, i.id = t, i.setAttribute("aria-live", "assertive"), i.setAttribute("aria-atomic", "true"), Xe(i.style, Ca), Pe().appendChild(i), function() {
4288
4288
  setTimeout(function() {
4289
4289
  const a = Pe();
4290
4290
  a.contains(i) && a.removeChild(i), i === n.current && (n.current = null);
@@ -4313,7 +4313,7 @@ const Sa = {
4313
4313
  };
4314
4314
  function dn(e, t = Sa) {
4315
4315
  const n = L.useId();
4316
- return C(() => `${e}${t.separator}${n}`, [t.separator, e, n]);
4316
+ return O(() => `${e}${t.separator}${n}`, [t.separator, e, n]);
4317
4317
  }
4318
4318
  function Aa({
4319
4319
  contextId: e,
@@ -4327,7 +4327,7 @@ function _a({
4327
4327
  }) {
4328
4328
  const n = dn("hidden-text", {
4329
4329
  separator: "-"
4330
- }), r = C(() => Aa({
4330
+ }), r = O(() => Aa({
4331
4331
  contextId: e,
4332
4332
  uniqueId: n
4333
4333
  }), [n, e]);
@@ -4362,7 +4362,7 @@ var Ba = (e, t) => {
4362
4362
  This can result in run time bugs, and even fatal crashes
4363
4363
  `);
4364
4364
  };
4365
- const Ot = `
4365
+ const Ct = `
4366
4366
  We expect a html5 doctype: <!doctype html>
4367
4367
  This is to ensure consistent browser layout and measurement
4368
4368
 
@@ -4374,19 +4374,19 @@ var Va = (e) => {
4374
4374
  process.env.NODE_ENV !== "production" && R(`
4375
4375
  No <!doctype html> found.
4376
4376
 
4377
- ${Ot}
4377
+ ${Ct}
4378
4378
  `);
4379
4379
  return;
4380
4380
  }
4381
4381
  t.name.toLowerCase() !== "html" && process.env.NODE_ENV !== "production" && R(`
4382
4382
  Unexpected <!doctype> found: (${t.name})
4383
4383
 
4384
- ${Ot}
4384
+ ${Ct}
4385
4385
  `), t.publicId !== "" && process.env.NODE_ENV !== "production" && R(`
4386
4386
  Unexpected <!doctype> publicId found: (${t.publicId})
4387
4387
  A html5 doctype does not have a publicId
4388
4388
 
4389
- ${Ot}
4389
+ ${Ct}
4390
4390
  `);
4391
4391
  };
4392
4392
  function un(e) {
@@ -4560,7 +4560,7 @@ function Ka({
4560
4560
  }];
4561
4561
  }
4562
4562
  function Ja(e) {
4563
- const t = B(or), n = B(re), r = C(() => ({
4563
+ const t = B(or), n = B(re), r = O(() => ({
4564
4564
  eventName: "mousedown",
4565
4565
  fn: function(l) {
4566
4566
  if (l.defaultPrevented || l.button !== No || l.ctrlKey || l.metaKey || l.shiftKey || l.altKey)
@@ -4580,7 +4580,7 @@ function Ja(e) {
4580
4580
  };
4581
4581
  n.current(), d(f, m);
4582
4582
  }
4583
- }), [e]), o = C(() => ({
4583
+ }), [e]), o = O(() => ({
4584
4584
  eventName: "webkitmouseforcewillbegin",
4585
4585
  fn: (p) => {
4586
4586
  if (p.defaultPrevented)
@@ -4705,7 +4705,7 @@ function el(e, t) {
4705
4705
  }];
4706
4706
  }
4707
4707
  function tl(e) {
4708
- const t = B(Za), n = C(() => ({
4708
+ const t = B(Za), n = O(() => ({
4709
4709
  eventName: "keydown",
4710
4710
  fn: function(i) {
4711
4711
  if (i.defaultPrevented || i.keyCode !== Eo)
@@ -4743,7 +4743,7 @@ function tl(e) {
4743
4743
  };
4744
4744
  }, [r]);
4745
4745
  }
4746
- const Ct = {
4746
+ const Ot = {
4747
4747
  type: "IDLE"
4748
4748
  }, nl = 120, rl = 0.15;
4749
4749
  function ol({
@@ -4851,11 +4851,11 @@ function il({
4851
4851
  }];
4852
4852
  }
4853
4853
  function sl(e) {
4854
- const t = B(Ct), n = B(re), r = D(function() {
4854
+ const t = B(Ot), n = B(re), r = D(function() {
4855
4855
  return t.current;
4856
4856
  }, []), o = D(function(f) {
4857
4857
  t.current = f;
4858
- }, []), i = C(() => ({
4858
+ }, []), i = O(() => ({
4859
4859
  eventName: "touchstart",
4860
4860
  fn: function(f) {
4861
4861
  if (f.defaultPrevented)
@@ -4885,7 +4885,7 @@ function sl(e) {
4885
4885
  n.current = K(window, [i], f);
4886
4886
  }, [i]), c = D(() => {
4887
4887
  const u = t.current;
4888
- u.type !== "IDLE" && (u.type === "PENDING" && clearTimeout(u.longPressTimerId), o(Ct), n.current(), s());
4888
+ u.type !== "IDLE" && (u.type === "PENDING" && clearTimeout(u.longPressTimerId), o(Ot), n.current(), s());
4889
4889
  }, [s, o]), a = D(() => {
4890
4890
  const u = t.current;
4891
4891
  c(), u.type === "DRAGGING" && u.actions.cancel({
@@ -4926,7 +4926,7 @@ function sl(e) {
4926
4926
  return s(), function() {
4927
4927
  n.current();
4928
4928
  const m = r();
4929
- m.type === "PENDING" && (clearTimeout(m.longPressTimerId), o(Ct));
4929
+ m.type === "PENDING" && (clearTimeout(m.longPressTimerId), o(Ot));
4930
4930
  };
4931
4931
  }, [r, s, o]), Y(function() {
4932
4932
  return K(window, [{
@@ -5022,7 +5022,7 @@ function Ue({
5022
5022
  - Check actions.isActive() if you really need to
5023
5023
  `), !1);
5024
5024
  }
5025
- function Oo({
5025
+ function Co({
5026
5026
  lockAPI: e,
5027
5027
  store: t,
5028
5028
  registry: n,
@@ -5042,7 +5042,7 @@ function yl({
5042
5042
  forceSensorStop: i,
5043
5043
  sourceEvent: s
5044
5044
  }) {
5045
- if (!Oo({
5045
+ if (!Co({
5046
5046
  lockAPI: e,
5047
5047
  store: n,
5048
5048
  registry: r,
@@ -5185,7 +5185,7 @@ function Dl({
5185
5185
  c(h, v), h = v;
5186
5186
  });
5187
5187
  }, [s, t, c]), Y(() => s.tryAbandon, [s.tryAbandon]);
5188
- const a = D((b) => Oo({
5188
+ const a = D((b) => Co({
5189
5189
  lockAPI: s,
5190
5190
  registry: n,
5191
5191
  store: t,
@@ -5203,7 +5203,7 @@ function Dl({
5203
5203
  return h ? h.options : null;
5204
5204
  }, [n.draggable]), u = D(function() {
5205
5205
  s.isClaimed() && (s.tryAbandon(), t.getState().phase !== "IDLE" && t.dispatch(tn()));
5206
- }, [s, t]), f = D(() => s.isClaimed(), [s]), m = C(() => ({
5206
+ }, [s, t]), f = D(() => s.isClaimed(), [s]), m = O(() => ({
5207
5207
  canGetLock: a,
5208
5208
  tryGetLock: d,
5209
5209
  findClosestDraggableId: p,
@@ -5250,20 +5250,20 @@ function Il(e) {
5250
5250
  text: i
5251
5251
  }), u = Da(t, o), f = D((T) => {
5252
5252
  De(s).dispatch(T);
5253
- }, []), m = C(() => On({
5253
+ }, []), m = O(() => Cn({
5254
5254
  publishWhileDragging: cc,
5255
5255
  updateDroppableScroll: lc,
5256
5256
  updateDroppableIsEnabled: dc,
5257
5257
  updateDroppableIsCombineEnabled: uc,
5258
5258
  collectionStarting: ac
5259
- }, f), [f]), b = Ia(), h = C(() => Qc(b, m), [b, m]), y = C(() => ha({
5259
+ }, f), [f]), b = Ia(), h = O(() => Qc(b, m), [b, m]), y = O(() => ha({
5260
5260
  scrollWindow: ea,
5261
5261
  scrollDroppable: h.scrollDroppable,
5262
5262
  getAutoScrollerOptions: d,
5263
- ...On({
5263
+ ...Cn({
5264
5264
  move: ro
5265
5265
  }, f)
5266
- }), [h.scrollDroppable, f, d]), v = Na(t), I = C(() => Xc({
5266
+ }), [h.scrollDroppable, f, d]), v = Na(t), I = O(() => Xc({
5267
5267
  announce: p,
5268
5268
  autoScroller: y,
5269
5269
  dimensionMarshal: h,
@@ -5278,12 +5278,12 @@ function Il(e) {
5278
5278
  }, []), E = D(() => {
5279
5279
  const T = De(s).getState();
5280
5280
  return T.phase === "DROP_ANIMATING" ? !0 : T.phase === "IDLE" ? !1 : T.isDragging;
5281
- }, []), x = C(() => ({
5281
+ }, []), x = O(() => ({
5282
5282
  isDragging: E,
5283
5283
  tryAbort: N
5284
5284
  }), [E, N]);
5285
5285
  n(x);
5286
- const A = D((T) => fo(De(s).getState(), T), []), P = D(() => ce(De(s).getState()), []), U = C(() => ({
5286
+ const A = D((T) => fo(De(s).getState(), T), []), P = D(() => ce(De(s).getState()), []), U = O(() => ({
5287
5287
  marshal: h,
5288
5288
  focus: v,
5289
5289
  contextId: t,
@@ -5305,11 +5305,11 @@ function Il(e) {
5305
5305
  store: I
5306
5306
  }, e.children));
5307
5307
  }
5308
- function Ol() {
5308
+ function Cl() {
5309
5309
  return L.useId();
5310
5310
  }
5311
- function Cl(e) {
5312
- const t = Ol(), n = e.dragHandleUsageInstructions || ze.dragHandleUsageInstructions;
5311
+ function Ol(e) {
5312
+ const t = Cl(), n = e.dragHandleUsageInstructions || ze.dragHandleUsageInstructions;
5313
5313
  return L.createElement(Yi, null, (r) => L.createElement(Il, {
5314
5314
  nonce: e.nonce,
5315
5315
  contextId: t,
@@ -5386,14 +5386,14 @@ function Bl(e) {
5386
5386
  canDragInteractiveElements: i,
5387
5387
  shouldRespectForcePress: s,
5388
5388
  isEnabled: c
5389
- } = e, a = C(() => ({
5389
+ } = e, a = O(() => ({
5390
5390
  canDragInteractiveElements: i,
5391
5391
  shouldRespectForcePress: s,
5392
5392
  isEnabled: c
5393
5393
  }), [i, c, s]), d = D((f) => {
5394
5394
  const m = o();
5395
5395
  return m || (process.env.NODE_ENV !== "production" ? g(!1, "Cannot get dimension when no ref is set") : g()), Tl(n, m, f);
5396
- }, [n, o]), p = C(() => ({
5396
+ }, [n, o]), p = O(() => ({
5397
5397
  uniqueId: t,
5398
5398
  descriptor: n,
5399
5399
  options: a,
@@ -5409,7 +5409,7 @@ function Bl(e) {
5409
5409
  }, [p, r.draggable]);
5410
5410
  }
5411
5411
  var gn = L.createContext(null);
5412
- function Co(e) {
5412
+ function Oo(e) {
5413
5413
  e && $e(e) || (process.env.NODE_ENV !== "production" ? g(!1, `
5414
5414
  provided.innerRef has not been provided with a HTMLElement.
5415
5415
 
@@ -5424,7 +5424,7 @@ function Vl(e, t, n) {
5424
5424
  }
5425
5425
  const o = e.draggableId;
5426
5426
  o || (process.env.NODE_ENV !== "production" ? g(!1, "Draggable requires a draggableId") : g(!1)), typeof o != "string" && (process.env.NODE_ENV !== "production" ? g(!1, `Draggable requires a [string] draggableId.
5427
- Provided: [type: ${typeof o}] (value: ${o})`) : g(!1)), Number.isInteger(e.index) || (process.env.NODE_ENV !== "production" ? g(!1, `${r(o)} requires an integer index prop`) : g(!1)), e.mapped.type !== "DRAGGING" && (Co(n()), e.isEnabled && (yo(t, o) || (process.env.NODE_ENV !== "production" ? g(!1, `${r(o)} Unable to find drag handle`) : g(!1))));
5427
+ Provided: [type: ${typeof o}] (value: ${o})`) : g(!1)), Number.isInteger(e.index) || (process.env.NODE_ENV !== "production" ? g(!1, `${r(o)} requires an integer index prop`) : g(!1)), e.mapped.type !== "DRAGGING" && (Oo(n()), e.isEnabled && (yo(t, o) || (process.env.NODE_ENV !== "production" ? g(!1, `${r(o)} Unable to find drag handle`) : g(!1))));
5428
5428
  });
5429
5429
  }
5430
5430
  function Ll(e) {
@@ -5452,7 +5452,7 @@ const $l = (e) => {
5452
5452
  } = Ze(ot), {
5453
5453
  type: c,
5454
5454
  droppableId: a
5455
- } = Ze(gn), d = C(() => ({
5455
+ } = Ze(gn), d = O(() => ({
5456
5456
  id: e.draggableId,
5457
5457
  index: e.index,
5458
5458
  type: c,
@@ -5468,7 +5468,7 @@ const $l = (e) => {
5468
5468
  dropAnimationFinished: y
5469
5469
  } = e;
5470
5470
  if (Vl(e, o, r), Ll(b), !b) {
5471
- const x = C(() => ({
5471
+ const x = O(() => ({
5472
5472
  descriptor: d,
5473
5473
  registry: s,
5474
5474
  getDraggableRef: r,
@@ -5478,7 +5478,7 @@ const $l = (e) => {
5478
5478
  }), [d, s, r, m, f, u]);
5479
5479
  Bl(x);
5480
5480
  }
5481
- const v = C(() => u ? {
5481
+ const v = O(() => u ? {
5482
5482
  tabIndex: 0,
5483
5483
  role: "button",
5484
5484
  "aria-describedby": i,
@@ -5488,7 +5488,7 @@ const $l = (e) => {
5488
5488
  onDragStart: Ml
5489
5489
  } : null, [o, i, l, u]), I = D((x) => {
5490
5490
  h.type === "DRAGGING" && h.dropping && x.propertyName === "transform" && mr(y);
5491
- }, [y, h]), N = C(() => {
5491
+ }, [y, h]), N = O(() => {
5492
5492
  const x = Rl(h), A = h.type === "DRAGGING" && h.dropping ? I : void 0;
5493
5493
  return {
5494
5494
  innerRef: n,
@@ -5500,7 +5500,7 @@ const $l = (e) => {
5500
5500
  },
5501
5501
  dragHandleProps: v
5502
5502
  };
5503
- }, [o, v, l, h, I, n]), E = C(() => ({
5503
+ }, [o, v, l, h, I, n]), E = O(() => ({
5504
5504
  draggableId: d.id,
5505
5505
  type: d.type,
5506
5506
  source: {
@@ -5823,11 +5823,11 @@ function sd(e) {
5823
5823
  const t = B(null), n = Ze(ot), r = dn("droppable"), {
5824
5824
  registry: o,
5825
5825
  marshal: i
5826
- } = n, s = pn(e), c = C(() => ({
5826
+ } = n, s = pn(e), c = O(() => ({
5827
5827
  id: e.droppableId,
5828
5828
  type: e.type,
5829
5829
  mode: e.mode
5830
- }), [e.droppableId, e.mode, e.type]), a = B(c), d = C(() => $((N, E) => {
5830
+ }), [e.droppableId, e.mode, e.type]), a = B(c), d = O(() => $((N, E) => {
5831
5831
  t.current || (process.env.NODE_ENV !== "production" ? g(!1, "Can only update scroll when dragging") : g());
5832
5832
  const x = {
5833
5833
  x: N,
@@ -5840,7 +5840,7 @@ function sd(e) {
5840
5840
  }, []), l = D(() => {
5841
5841
  const N = p();
5842
5842
  d(N.x, N.y);
5843
- }, [p, d]), u = C(() => Ie(l), [l]), f = D(() => {
5843
+ }, [p, d]), u = O(() => Ie(l), [l]), f = D(() => {
5844
5844
  const N = t.current, E = He(N);
5845
5845
  if (N && E || (process.env.NODE_ENV !== "production" ? g(!1, "Could not find scroll options while scrolling") : g()), N.scrollOptions.shouldPublishImmediately) {
5846
5846
  l();
@@ -5882,12 +5882,12 @@ function sd(e) {
5882
5882
  E || (process.env.NODE_ENV !== "production" ? g(!1, "Cannot scroll when there is no drag") : g());
5883
5883
  const x = He(E);
5884
5884
  x || (process.env.NODE_ENV !== "production" ? g(!1, "Cannot scroll a droppable with no closest scrollable") : g()), x.scrollTop += N.y, x.scrollLeft += N.x;
5885
- }, []), v = C(() => ({
5885
+ }, []), v = O(() => ({
5886
5886
  getDimensionAndWatchScroll: m,
5887
5887
  getScrollWhileDragging: b,
5888
5888
  dragStopped: h,
5889
5889
  scroll: y
5890
- }), [h, m, b, y]), I = C(() => ({
5890
+ }), [h, m, b, y]), I = O(() => ({
5891
5891
  uniqueId: r,
5892
5892
  descriptor: c,
5893
5893
  callbacks: v
@@ -5982,7 +5982,7 @@ const ud = [function({
5982
5982
  }, function({
5983
5983
  getDroppableRef: t
5984
5984
  }) {
5985
- Co(t());
5985
+ Oo(t());
5986
5986
  }], pd = [function({
5987
5987
  props: t,
5988
5988
  getPlaceholderRef: n
@@ -6094,7 +6094,7 @@ const hd = (e) => {
6094
6094
  ignoreContainerClipping: l,
6095
6095
  getDroppableRef: v
6096
6096
  });
6097
- const A = C(() => L.createElement(md, {
6097
+ const A = O(() => L.createElement(md, {
6098
6098
  on: e.placeholder,
6099
6099
  shouldAnimate: e.shouldAnimatePlaceholder
6100
6100
  }, ({
@@ -6108,14 +6108,14 @@ const hd = (e) => {
6108
6108
  animate: de,
6109
6109
  contextId: n,
6110
6110
  onTransitionEnd: x
6111
- })), [n, x, e.placeholder, e.shouldAnimatePlaceholder, E]), P = C(() => ({
6111
+ })), [n, x, e.placeholder, e.shouldAnimatePlaceholder, E]), P = O(() => ({
6112
6112
  innerRef: I,
6113
6113
  placeholder: A,
6114
6114
  droppableProps: {
6115
6115
  "data-rfd-droppable-id": c,
6116
6116
  "data-rfd-droppable-context-id": n
6117
6117
  }
6118
- }), [n, c, A, I]), U = b ? b.dragging.draggableId : null, T = C(() => ({
6118
+ }), [n, c, A, I]), U = b ? b.dragging.draggableId : null, T = O(() => ({
6119
6119
  droppableId: c,
6120
6120
  type: a,
6121
6121
  isUsingCloneFor: U
@@ -6266,8 +6266,8 @@ const lr = {
6266
6266
  strokeLinejoin: "round",
6267
6267
  style: { flexShrink: 0 },
6268
6268
  children: [
6269
- /* @__PURE__ */ O("path", { d: "M21 10c0 7-9 13-9 13s-9-6-9-13a9 9 0 0 1 18 0z" }),
6270
- /* @__PURE__ */ O("circle", { cx: "12", cy: "10", r: "3" })
6269
+ /* @__PURE__ */ C("path", { d: "M21 10c0 7-9 13-9 13s-9-6-9-13a9 9 0 0 1 18 0z" }),
6270
+ /* @__PURE__ */ C("circle", { cx: "12", cy: "10", r: "3" })
6271
6271
  ]
6272
6272
  }
6273
6273
  ), Nd = () => /* @__PURE__ */ V(
@@ -6283,8 +6283,8 @@ const lr = {
6283
6283
  strokeLinejoin: "round",
6284
6284
  style: { flexShrink: 0 },
6285
6285
  children: [
6286
- /* @__PURE__ */ O("circle", { cx: "12", cy: "12", r: "10" }),
6287
- /* @__PURE__ */ O("polyline", { points: "12 6 12 12 16 14" })
6286
+ /* @__PURE__ */ C("circle", { cx: "12", cy: "12", r: "10" }),
6287
+ /* @__PURE__ */ C("polyline", { points: "12 6 12 12 16 14" })
6288
6288
  ]
6289
6289
  }
6290
6290
  ), xd = () => /* @__PURE__ */ V(
@@ -6300,16 +6300,16 @@ const lr = {
6300
6300
  strokeLinejoin: "round",
6301
6301
  style: { cursor: "grab" },
6302
6302
  children: [
6303
- /* @__PURE__ */ O("line", { x1: "3", y1: "12", x2: "21", y2: "12" }),
6304
- /* @__PURE__ */ O("line", { x1: "3", y1: "6", x2: "21", y2: "6" }),
6305
- /* @__PURE__ */ O("line", { x1: "3", y1: "18", x2: "21", y2: "18" })
6303
+ /* @__PURE__ */ C("line", { x1: "3", y1: "12", x2: "21", y2: "12" }),
6304
+ /* @__PURE__ */ C("line", { x1: "3", y1: "6", x2: "21", y2: "6" }),
6305
+ /* @__PURE__ */ C("line", { x1: "3", y1: "18", x2: "21", y2: "18" })
6306
6306
  ]
6307
6307
  }
6308
6308
  ), Id = () => /* @__PURE__ */ V(
6309
6309
  "svg",
6310
6310
  {
6311
- width: "16",
6312
- height: "16",
6311
+ width: "25",
6312
+ height: "25",
6313
6313
  viewBox: "0 0 24 24",
6314
6314
  fill: "none",
6315
6315
  stroke: "currentColor",
@@ -6317,17 +6317,17 @@ const lr = {
6317
6317
  strokeLinecap: "round",
6318
6318
  strokeLinejoin: "round",
6319
6319
  children: [
6320
- /* @__PURE__ */ O("polyline", { points: "15 3 21 3 21 9" }),
6321
- /* @__PURE__ */ O("polyline", { points: "9 21 3 21 3 15" }),
6322
- /* @__PURE__ */ O("line", { x1: "21", y1: "3", x2: "14", y2: "10" }),
6323
- /* @__PURE__ */ O("line", { x1: "3", y1: "21", x2: "10", y2: "14" })
6320
+ /* @__PURE__ */ C("polyline", { points: "15 3 21 3 21 9" }),
6321
+ /* @__PURE__ */ C("polyline", { points: "9 21 3 21 3 15" }),
6322
+ /* @__PURE__ */ C("line", { x1: "21", y1: "3", x2: "14", y2: "10" }),
6323
+ /* @__PURE__ */ C("line", { x1: "3", y1: "21", x2: "10", y2: "14" })
6324
6324
  ]
6325
6325
  }
6326
- ), Od = () => /* @__PURE__ */ V(
6326
+ ), Cd = () => /* @__PURE__ */ V(
6327
6327
  "svg",
6328
6328
  {
6329
- width: "16",
6330
- height: "16",
6329
+ width: "25",
6330
+ height: "25",
6331
6331
  viewBox: "0 0 24 24",
6332
6332
  fill: "none",
6333
6333
  stroke: "currentColor",
@@ -6335,20 +6335,23 @@ const lr = {
6335
6335
  strokeLinecap: "round",
6336
6336
  strokeLinejoin: "round",
6337
6337
  children: [
6338
- /* @__PURE__ */ O("polyline", { points: "4 14 10 14 10 20" }),
6339
- /* @__PURE__ */ O("polyline", { points: "20 10 14 10 14 4" }),
6340
- /* @__PURE__ */ O("line", { x1: "14", y1: "10", x2: "21", y2: "3" }),
6341
- /* @__PURE__ */ O("line", { x1: "3", y1: "21", x2: "10", y2: "14" })
6338
+ /* @__PURE__ */ C("polyline", { points: "4 14 10 14 10 20" }),
6339
+ /* @__PURE__ */ C("polyline", { points: "20 10 14 10 14 4" }),
6340
+ /* @__PURE__ */ C("line", { x1: "14", y1: "10", x2: "21", y2: "3" }),
6341
+ /* @__PURE__ */ C("line", { x1: "3", y1: "21", x2: "10", y2: "14" })
6342
6342
  ]
6343
6343
  }
6344
- ), ur = (e) => e ? new Date(e).toLocaleTimeString("en-US", {
6345
- hour: "numeric",
6346
- minute: "2-digit",
6347
- hour12: !0
6348
- }) : "--:--", pr = (e) => typeof e == "object" && (e != null && e.name) ? e.name : e, fr = (e) => {
6344
+ ), ur = (e) => {
6345
+ var s;
6346
+ if (!e) return "--:--";
6347
+ const t = (s = e.split("T")[1]) == null ? void 0 : s.slice(0, 5);
6348
+ if (!t) return "--:--";
6349
+ const [n, r] = t.split(":").map(Number), o = n >= 12 ? "PM" : "AM";
6350
+ return `${n % 12 || 12}:${r.toString().padStart(2, "0")} ${o}`;
6351
+ }, pr = (e) => typeof e == "object" && (e != null && e.name) ? e.name : e, fr = (e) => {
6349
6352
  var t, n;
6350
6353
  return typeof e.status == "string" ? e.status.toLowerCase() === "completed" : ((n = (t = e.status) == null ? void 0 : t.code) == null ? void 0 : n.toLowerCase()) === "completed";
6351
- }, Cd = (e) => {
6354
+ }, Od = (e) => {
6352
6355
  const t = [];
6353
6356
  return [...e].sort((r, o) => r.sequence_rank - o.sequence_rank).forEach((r) => {
6354
6357
  const o = t[t.length - 1];
@@ -6375,28 +6378,28 @@ const lr = {
6375
6378
  /* @__PURE__ */ V("div", { style: S.gridLabel, children: [
6376
6379
  "ORDER",
6377
6380
  " ",
6378
- r && /* @__PURE__ */ O("span", { style: { color: "#16a34a", marginLeft: "4px" }, children: "✓ DONE" })
6381
+ r && /* @__PURE__ */ C("span", { style: { color: "#16a34a", marginLeft: "4px" }, children: "✓ DONE" })
6379
6382
  ] }),
6380
6383
  /* @__PURE__ */ V("div", { style: S.gridValue, children: [
6381
6384
  "#",
6382
6385
  e.order_id
6383
6386
  ] })
6384
6387
  ] }),
6385
- o && /* @__PURE__ */ O(
6388
+ o && /* @__PURE__ */ C(
6386
6389
  "button",
6387
6390
  {
6388
6391
  onClick: () => s(!i),
6389
6392
  style: S.expandButton,
6390
- children: i ? /* @__PURE__ */ O(Od, {}) : /* @__PURE__ */ O(Id, {})
6393
+ children: i ? /* @__PURE__ */ C(Cd, {}) : /* @__PURE__ */ C(Id, {})
6391
6394
  }
6392
6395
  )
6393
6396
  ] }),
6394
6397
  /* @__PURE__ */ V("div", { style: S.detailsGrid, children: [
6395
6398
  /* @__PURE__ */ V("div", { style: S.gridItem, children: [
6396
- /* @__PURE__ */ O("div", { style: S.gridLabel, children: "LOCATION" }),
6399
+ /* @__PURE__ */ C("div", { style: S.gridLabel, children: "LOCATION" }),
6397
6400
  /* @__PURE__ */ V("div", { style: S.gridValueWithIcon, children: [
6398
- /* @__PURE__ */ O(Dd, {}),
6399
- /* @__PURE__ */ O(
6401
+ /* @__PURE__ */ C(Dd, {}),
6402
+ /* @__PURE__ */ C(
6400
6403
  "a",
6401
6404
  {
6402
6405
  href: c,
@@ -6409,13 +6412,13 @@ const lr = {
6409
6412
  ] })
6410
6413
  ] }),
6411
6414
  /* @__PURE__ */ V("div", { style: S.gridItem, children: [
6412
- /* @__PURE__ */ O("div", { style: S.gridLabel, children: "PERIOD" }),
6413
- /* @__PURE__ */ O("div", { style: S.gridValue, children: t })
6415
+ /* @__PURE__ */ C("div", { style: S.gridLabel, children: "PERIOD" }),
6416
+ /* @__PURE__ */ C("div", { style: S.gridValue, children: t })
6414
6417
  ] }),
6415
6418
  /* @__PURE__ */ V("div", { style: S.gridItem, children: [
6416
- /* @__PURE__ */ O("div", { style: S.gridLabel, children: "TIME WINDOW" }),
6419
+ /* @__PURE__ */ C("div", { style: S.gridLabel, children: "TIME WINDOW" }),
6417
6420
  /* @__PURE__ */ V("div", { style: S.gridValueWithIcon, children: [
6418
- /* @__PURE__ */ O(Nd, {}),
6421
+ /* @__PURE__ */ C(Nd, {}),
6419
6422
  " ",
6420
6423
  /* @__PURE__ */ V("span", { children: [
6421
6424
  ur(e.eta_start),
@@ -6425,7 +6428,7 @@ const lr = {
6425
6428
  ] })
6426
6429
  ] })
6427
6430
  ] }),
6428
- i && o && /* @__PURE__ */ O("div", { style: S.extraDataContainer, children: o(e) })
6431
+ i && o && /* @__PURE__ */ C("div", { style: S.extraDataContainer, children: o(e) })
6429
6432
  ]
6430
6433
  }
6431
6434
  );
@@ -6440,7 +6443,7 @@ const lr = {
6440
6443
  renderOrderExtraData: c
6441
6444
  }) => {
6442
6445
  const a = e.orders.every(fr), d = !o || i || a;
6443
- return /* @__PURE__ */ O(
6446
+ return /* @__PURE__ */ C(
6444
6447
  ql,
6445
6448
  {
6446
6449
  draggableId: e.stop_id.toString(),
@@ -6455,7 +6458,7 @@ const lr = {
6455
6458
  ...p.draggableProps,
6456
6459
  style: { ...S.timelineItem, ...p.draggableProps.style },
6457
6460
  children: [
6458
- /* @__PURE__ */ O(
6461
+ /* @__PURE__ */ C(
6459
6462
  "div",
6460
6463
  {
6461
6464
  style: {
@@ -6477,7 +6480,7 @@ const lr = {
6477
6480
  " #",
6478
6481
  e.sequence_rank
6479
6482
  ] }),
6480
- /* @__PURE__ */ O(
6483
+ /* @__PURE__ */ C(
6481
6484
  "span",
6482
6485
  {
6483
6486
  style: a ? S.badgeCompleted : S.badgePending,
@@ -6487,13 +6490,13 @@ const lr = {
6487
6490
  ]
6488
6491
  }
6489
6492
  ),
6490
- !d && /* @__PURE__ */ O("div", { ...p.dragHandleProps, children: /* @__PURE__ */ O(xd, {}) })
6493
+ !d && /* @__PURE__ */ C("div", { ...p.dragHandleProps, children: /* @__PURE__ */ C(xd, {}) })
6491
6494
  ] }),
6492
6495
  /* @__PURE__ */ V("div", { style: S.customerName, children: [
6493
6496
  "Customer: ",
6494
6497
  (u = (l = e.orders[0]) == null ? void 0 : l.customer) == null ? void 0 : u.name
6495
6498
  ] }),
6496
- /* @__PURE__ */ O("div", { style: S.ordersList, children: e.orders.map((f, m) => /* @__PURE__ */ O(
6499
+ /* @__PURE__ */ C("div", { style: S.ordersList, children: e.orders.map((f, m) => /* @__PURE__ */ C(
6497
6500
  wd,
6498
6501
  {
6499
6502
  order: f,
@@ -6504,7 +6507,7 @@ const lr = {
6504
6507
  },
6505
6508
  f.id
6506
6509
  )) }),
6507
- s && /* @__PURE__ */ O("div", { style: S.actionsSlot, children: s(e) })
6510
+ s && /* @__PURE__ */ C("div", { style: S.actionsSlot, children: s(e) })
6508
6511
  ] })
6509
6512
  ]
6510
6513
  }
@@ -6523,7 +6526,7 @@ const lr = {
6523
6526
  var d, p;
6524
6527
  const [i, s] = Te([]);
6525
6528
  te(() => {
6526
- e != null && e.path_orders && s(Cd(e.path_orders));
6529
+ e != null && e.path_orders && s(Od(e.path_orders));
6527
6530
  }, [e]);
6528
6531
  const c = (l) => {
6529
6532
  if (!l.destination) return;
@@ -6533,17 +6536,17 @@ const lr = {
6533
6536
  u.map((m) => m.stop_id)
6534
6537
  );
6535
6538
  };
6536
- if (!e || !i.length) return /* @__PURE__ */ O("div", { children: "No Path Data" });
6539
+ if (!e || !i.length) return /* @__PURE__ */ C("div", { children: "No Path Data" });
6537
6540
  const a = typeof e.status == "string" ? e.status.toLowerCase() === "completed" : ((p = (d = e.status) == null ? void 0 : d.code) == null ? void 0 : p.toLowerCase()) === "completed";
6538
- return /* @__PURE__ */ O("div", { style: S.container, children: /* @__PURE__ */ O(Cl, { onDragEnd: c, children: /* @__PURE__ */ O(Ed, { droppableId: "path-list", children: (l) => /* @__PURE__ */ V(
6541
+ return /* @__PURE__ */ C("div", { style: S.container, children: /* @__PURE__ */ C(Ol, { onDragEnd: c, children: /* @__PURE__ */ C(Ed, { droppableId: "path-list", children: (l) => /* @__PURE__ */ V(
6539
6542
  "div",
6540
6543
  {
6541
6544
  ref: l.innerRef,
6542
6545
  ...l.droppableProps,
6543
6546
  style: S.timelineWrapper,
6544
6547
  children: [
6545
- /* @__PURE__ */ O("div", { style: S.verticalLine }),
6546
- /* @__PURE__ */ O(
6548
+ /* @__PURE__ */ C("div", { style: S.verticalLine }),
6549
+ /* @__PURE__ */ C(
6547
6550
  "div",
6548
6551
  {
6549
6552
  style: {
@@ -6551,7 +6554,7 @@ const lr = {
6551
6554
  flexDirection: "column",
6552
6555
  gap: "24px"
6553
6556
  },
6554
- children: i.map((u, f) => /* @__PURE__ */ O(
6557
+ children: i.map((u, f) => /* @__PURE__ */ C(
6555
6558
  Sd,
6556
6559
  {
6557
6560
  stopGroup: u,
@@ -6669,10 +6672,11 @@ const lr = {
6669
6672
  lineHeight: "1.4"
6670
6673
  },
6671
6674
  expandButton: {
6672
- background: "none",
6675
+ color: "#fff",
6673
6676
  border: "none",
6674
6677
  cursor: "pointer",
6675
- color: "#6b7280",
6678
+ backgroundColor: "#d1d1d1",
6679
+ borderRadius: "5px",
6676
6680
  padding: "4px"
6677
6681
  },
6678
6682
  extraDataContainer: {
package/dist/index.umd.js CHANGED
@@ -181,4 +181,4 @@ ${fn.current.stack}
181
181
 
182
182
  Please be sure to add the {provided.placeholder} React Node as a child of your Droppable.
183
183
  More information: https://github.com/hello-pangea/dnd/blob/main/docs/api/droppable.md
184
- `)}],od=[function({props:t}){t.renderClone||(process.env.NODE_ENV!=="production"?g(!1,"Must provide a clone render function (renderClone) for virtual lists"):g())},function({getPlaceholderRef:t}){t()&&(process.env.NODE_ENV!=="production"?g(!1,"Expected virtual list to not have a placeholder"):g())}];function id(e){Te(()=>{cn(e,nd),e.props.mode==="standard"&&cn(e,rd),e.props.mode==="virtual"&&cn(e,od)})}class sd extends D.PureComponent{constructor(...t){super(...t),this.state={isVisible:!!this.props.on,data:this.props.on,animate:this.props.shouldAnimate&&this.props.on?"open":"none"},this.onClose=()=>{this.state.animate==="close"&&this.setState({isVisible:!1})}}static getDerivedStateFromProps(t,n){return t.shouldAnimate?t.on?{isVisible:!0,data:t.on,animate:"open"}:n.isVisible?{isVisible:!0,data:n.data,animate:"close"}:{isVisible:!1,animate:"close",data:null}:{isVisible:!!t.on,data:t.on,animate:"none"}}render(){if(!this.state.isVisible)return null;const t={onClose:this.onClose,data:this.state.data,animate:this.state.animate};return this.props.children(t)}}const cd=e=>{const t=D.useContext(Ke);t||(process.env.NODE_ENV!=="production"?g(!1,"Could not find app context"):g());const{contextId:n,isMovementAllowed:r}=t,o=D.useRef(null),i=D.useRef(null),{children:s,droppableId:c,type:a,mode:d,direction:p,ignoreContainerClipping:l,isDropDisabled:u,isCombineEnabled:f,snapshot:m,useClone:b,updateViewportMaxScroll:h,getContainerForClone:E}=e,v=x(()=>o.current,[]),C=x((L=null)=>{o.current=L},[]),I=x(()=>i.current,[]),N=x((L=null)=>{i.current=L},[]);id({props:e,getDroppableRef:v,getPlaceholderRef:I});const O=x(()=>{r()&&h({maxScroll:Gr()})},[r,h]);Jl({droppableId:c,type:a,mode:d,direction:p,isDropDisabled:u,isCombineEnabled:f,ignoreContainerClipping:l,getDroppableRef:v});const _=S(()=>D.createElement(sd,{on:e.placeholder,shouldAnimate:e.shouldAnimatePlaceholder},({onClose:L,data:J,animate:fe})=>D.createElement(td,{placeholder:J,onClose:L,innerRef:N,animate:fe,contextId:n,onTransitionEnd:O})),[n,O,e.placeholder,e.shouldAnimatePlaceholder,N]),T=S(()=>({innerRef:C,placeholder:_,droppableProps:{"data-rfd-droppable-id":c,"data-rfd-droppable-context-id":n}}),[n,c,_,C]),H=b?b.dragging.draggableId:null,V=S(()=>({droppableId:c,type:a,isUsingCloneFor:H}),[c,H,a]);function j(){if(!b)return null;const{dragging:L,render:J}=b,fe=D.createElement(go,{draggableId:L.draggableId,index:L.source.index,isClone:!0,isEnabled:!0,shouldRespectForcePress:!1,canDragInteractiveElements:!0},(Z,tt)=>J(Z,tt,L));return rt.createPortal(fe,E())}return D.createElement(en.Provider,{value:V},s(T,m),j())};function ad(){return document.body||(process.env.NODE_ENV!=="production"?g(!1,"document.body is not ready"):g()),document.body}const Eo={mode:"standard",type:"DEFAULT",direction:"vertical",isDropDisabled:!1,isCombineEnabled:!1,ignoreContainerClipping:!1,renderClone:null,getContainerForClone:ad},Do=e=>{let t={...e},n;for(n in Eo)e[n]===void 0&&(t={...t,[n]:Eo[n]});return t},an=(e,t)=>e===t.droppable.type,No=(e,t)=>t.draggables[e.draggable.id],ld=Un(()=>{const e={placeholder:null,shouldAnimatePlaceholder:!0,snapshot:{isDraggingOver:!1,draggingOverWith:null,draggingFromThisWith:null,isUsingPlaceholder:!1},useClone:null},t={...e,shouldAnimatePlaceholder:!1},n=M(i=>({draggableId:i.id,type:i.type,source:{index:i.index,droppableId:i.droppableId}})),r=M((i,s,c,a,d,p)=>{const l=d.descriptor.id;if(d.descriptor.droppableId===i){const m=p?{render:p,dragging:n(d.descriptor)}:null,b={isDraggingOver:c,draggingOverWith:c?l:null,draggingFromThisWith:l,isUsingPlaceholder:!0};return{placeholder:d.placeholder,shouldAnimatePlaceholder:!1,snapshot:b,useClone:m}}if(!s)return t;if(!a)return e;const f={isDraggingOver:c,draggingOverWith:l,draggingFromThisWith:null,isUsingPlaceholder:!0};return{placeholder:d.placeholder,shouldAnimatePlaceholder:!0,snapshot:f,useClone:null}});return(i,s)=>{const c=Do(s),a=c.droppableId,d=c.type,p=!c.isDropDisabled,l=c.renderClone;if(Be(i)){const u=i.critical;if(!an(d,u))return t;const f=No(u,i.dimensions),m=W(i.impact)===a;return r(a,p,m,m,f,l)}if(i.phase==="DROP_ANIMATING"){const u=i.completed;if(!an(d,u.critical))return t;const f=No(u.critical,i.dimensions);return r(a,p,po(u.result)===a,W(u.impact)===a,f,l)}if(i.phase==="IDLE"&&i.completed&&!i.shouldFlush){const u=i.completed;if(!an(d,u.critical))return t;const f=W(u.impact)===a,m=!!(u.impact.at&&u.impact.at.type==="COMBINE"),b=u.critical.droppable.id===a;return f?m?e:t:b?e:t}return t}},{updateViewportMaxScroll:sc},(e,t,n)=>({...Do(n),...e,...t}),{context:qt,areStatePropsEqual:uo})(cd),dd=()=>y.jsxs("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",style:{flexShrink:0},children:[y.jsx("path",{d:"M21 10c0 7-9 13-9 13s-9-6-9-13a9 9 0 0 1 18 0z"}),y.jsx("circle",{cx:"12",cy:"10",r:"3"})]}),ud=()=>y.jsxs("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",style:{flexShrink:0},children:[y.jsx("circle",{cx:"12",cy:"12",r:"10"}),y.jsx("polyline",{points:"12 6 12 12 16 14"})]}),pd=()=>y.jsxs("svg",{width:"20",height:"20",viewBox:"0 0 24 24",fill:"none",stroke:"#9ca3af",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",style:{cursor:"grab"},children:[y.jsx("line",{x1:"3",y1:"12",x2:"21",y2:"12"}),y.jsx("line",{x1:"3",y1:"6",x2:"21",y2:"6"}),y.jsx("line",{x1:"3",y1:"18",x2:"21",y2:"18"})]}),fd=()=>y.jsxs("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[y.jsx("polyline",{points:"15 3 21 3 21 9"}),y.jsx("polyline",{points:"9 21 3 21 3 15"}),y.jsx("line",{x1:"21",y1:"3",x2:"14",y2:"10"}),y.jsx("line",{x1:"3",y1:"21",x2:"10",y2:"14"})]}),gd=()=>y.jsxs("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[y.jsx("polyline",{points:"4 14 10 14 10 20"}),y.jsx("polyline",{points:"20 10 14 10 14 4"}),y.jsx("line",{x1:"14",y1:"10",x2:"21",y2:"3"}),y.jsx("line",{x1:"3",y1:"21",x2:"10",y2:"14"})]}),xo=e=>e?new Date(e).toLocaleTimeString("en-US",{hour:"numeric",minute:"2-digit",hour12:!0}):"--:--",Io=e=>typeof e=="object"&&(e!=null&&e.name)?e.name:e,Oo=e=>{var t,n;return typeof e.status=="string"?e.status.toLowerCase()==="completed":((n=(t=e.status)==null?void 0:t.code)==null?void 0:n.toLowerCase())==="completed"},md=e=>{const t=[];return[...e].sort((r,o)=>r.sequence_rank-o.sequence_rank).forEach(r=>{const o=t[t.length-1];o&&o.stop_id===r.stop_id?o.orders.push(r):t.push({stop_id:r.stop_id,sequence_rank:r.sequence_rank,orders:[r]})}),t},hd=({order:e,pathPeriod:t,isFirst:n,isDone:r,renderOrderExtraData:o})=>{var a,d,p,l,u,f;const[i,s]=D.useState(!1),c=(d=(a=e.customer)==null?void 0:a.address)!=null&&d.lat&&((l=(p=e.customer)==null?void 0:p.address)!=null&&l.long)?`https://maps.google.com/?q=${e.customer.address.lat},${e.customer.address.long}`:"#";return y.jsxs("div",{style:{...A.orderBlock,borderTop:n?"none":"1px solid #f3f4f6",backgroundColor:r?"#fafafa":"transparent"},children:[y.jsxs("div",{style:A.orderHeader,children:[y.jsxs("div",{style:A.gridItem,children:[y.jsxs("div",{style:A.gridLabel,children:["ORDER"," ",r&&y.jsx("span",{style:{color:"#16a34a",marginLeft:"4px"},children:"✓ DONE"})]}),y.jsxs("div",{style:A.gridValue,children:["#",e.order_id]})]}),o&&y.jsx("button",{onClick:()=>s(!i),style:A.expandButton,children:i?y.jsx(gd,{}):y.jsx(fd,{})})]}),y.jsxs("div",{style:A.detailsGrid,children:[y.jsxs("div",{style:A.gridItem,children:[y.jsx("div",{style:A.gridLabel,children:"LOCATION"}),y.jsxs("div",{style:A.gridValueWithIcon,children:[y.jsx(dd,{}),y.jsx("a",{href:c,target:"_blank",rel:"noopener noreferrer",style:A.addressLink,children:((f=(u=e.customer)==null?void 0:u.address)==null?void 0:f.street_area)||"N/A"})]})]}),y.jsxs("div",{style:A.gridItem,children:[y.jsx("div",{style:A.gridLabel,children:"PERIOD"}),y.jsx("div",{style:A.gridValue,children:t})]}),y.jsxs("div",{style:A.gridItem,children:[y.jsx("div",{style:A.gridLabel,children:"TIME WINDOW"}),y.jsxs("div",{style:A.gridValueWithIcon,children:[y.jsx(ud,{})," ",y.jsxs("span",{children:[xo(e.eta_start)," - ",xo(e.eta_end)]})]})]})]}),i&&o&&y.jsx("div",{style:A.extraDataContainer,children:o(e)})]})},bd=({stopGroup:e,index:t,pathType:n,pathPeriod:r,canEditPath:o,isPathCompleted:i,renderStopActions:s,renderOrderExtraData:c})=>{const a=e.orders.every(Oo),d=!o||i||a;return y.jsx($l,{draggableId:e.stop_id.toString(),index:t,isDragDisabled:d,children:p=>{var l,u;return y.jsxs("div",{ref:p.innerRef,...p.draggableProps,style:{...A.timelineItem,...p.draggableProps.style},children:[y.jsx("div",{style:{...A.bubble,...a?A.bubbleCompleted:A.bubblePending},children:t+1}),y.jsxs("div",{style:A.card,children:[y.jsxs("div",{style:A.cardHeader,children:[y.jsxs("div",{style:{display:"flex",alignItems:"center",gap:"8px"},children:[y.jsxs("span",{style:A.title,children:[n," #",e.sequence_rank]}),y.jsx("span",{style:a?A.badgeCompleted:A.badgePending,children:a?"Completed":"Pending"})]}),!d&&y.jsx("div",{...p.dragHandleProps,children:y.jsx(pd,{})})]}),y.jsxs("div",{style:A.customerName,children:["Customer: ",(u=(l=e.orders[0])==null?void 0:l.customer)==null?void 0:u.name]}),y.jsx("div",{style:A.ordersList,children:e.orders.map((f,m)=>y.jsx(hd,{order:f,pathPeriod:r,isFirst:m===0,isDone:Oo(f),renderOrderExtraData:c},f.id))}),s&&y.jsx("div",{style:A.actionsSlot,children:s(e)})]})]})}})},vd=({path:e,onReorder:t,renderStopActions:n,renderOrderExtraData:r,canEditPath:o=!0})=>{var d,p;const[i,s]=D.useState([]);D.useEffect(()=>{e!=null&&e.path_orders&&s(md(e.path_orders))},[e]);const c=l=>{if(!l.destination)return;const u=Array.from(i),[f]=u.splice(l.source.index,1);u.splice(l.destination.index,0,f),s(u),t&&t(e.id,u.map(m=>m.stop_id))};if(!e||!i.length)return y.jsx("div",{children:"No Path Data"});const a=typeof e.status=="string"?e.status.toLowerCase()==="completed":((p=(d=e.status)==null?void 0:d.code)==null?void 0:p.toLowerCase())==="completed";return y.jsx("div",{style:A.container,children:y.jsx(yl,{onDragEnd:c,children:y.jsx(ld,{droppableId:"path-list",children:l=>y.jsxs("div",{ref:l.innerRef,...l.droppableProps,style:A.timelineWrapper,children:[y.jsx("div",{style:A.verticalLine}),y.jsx("div",{style:{display:"flex",flexDirection:"column",gap:"24px"},children:i.map((u,f)=>y.jsx(bd,{stopGroup:u,index:f,pathType:Io(e.type),pathPeriod:Io(e.period),canEditPath:o,isPathCompleted:a,renderStopActions:n,renderOrderExtraData:r},u.stop_id))}),l.placeholder]})})})})},A={container:{fontFamily:"sans-serif",maxWidth:"800px",margin:"0 auto"},timelineWrapper:{position:"relative",padding:"20px 0"},verticalLine:{position:"absolute",left:"19px",top:"40px",bottom:"40px",width:"2px",backgroundColor:"#f3f4f6"},timelineItem:{display:"flex",gap:"16px",marginBottom:"24px",position:"relative",zIndex:1},bubble:{width:"40px",height:"40px",borderRadius:"50%",display:"flex",alignItems:"center",justifyContent:"center",fontWeight:"bold",backgroundColor:"#fff",border:"2px solid",flexShrink:0},bubblePending:{borderColor:"#f3f4f6",color:"#9ca3af"},bubbleCompleted:{borderColor:"#dcfce7",color:"#16a34a",backgroundColor:"#f0fdf4"},card:{flex:1,backgroundColor:"#fff",border:"1px solid #f3f4f6",borderRadius:"12px",padding:"16px",boxShadow:"0 1px 3px rgba(0,0,0,0.1)"},cardHeader:{display:"flex",justifyContent:"space-between",marginBottom:"8px",alignItems:"center"},title:{fontSize:"16px",fontWeight:"bold"},badgePending:{fontSize:"11px",padding:"2px 8px",borderRadius:"12px",backgroundColor:"#f3f4f6",color:"#4b5563",fontWeight:"600"},badgeCompleted:{fontSize:"11px",padding:"2px 8px",borderRadius:"12px",backgroundColor:"#dcfce7",color:"#16a34a",fontWeight:"600"},customerName:{fontSize:"14px",color:"#6b7280",marginBottom:"12px"},ordersList:{backgroundColor:"#f9fafb",borderRadius:"8px",overflow:"hidden"},orderBlock:{padding:"12px",transition:"background-color 0.2s"},orderHeader:{display:"flex",justifyContent:"space-between",alignItems:"flex-start",marginBottom:"8px"},detailsGrid:{display:"grid",gridTemplateColumns:"1fr 1fr",gap:"12px"},gridItem:{display:"flex",flexDirection:"column"},gridLabel:{fontSize:"10px",color:"#9ca3af",fontWeight:"bold"},gridValue:{fontSize:"13px",fontWeight:"600"},gridValueWithIcon:{fontSize:"13px",display:"flex",alignItems:"flex-start",gap:"4px",color:"#374151"},addressLink:{color:"#3b82f6",textDecoration:"underline",wordBreak:"break-word",lineHeight:"1.4"},expandButton:{background:"none",border:"none",cursor:"pointer",color:"#6b7280",padding:"4px"},extraDataContainer:{marginTop:"12px",padding:"12px",borderTop:"1px dashed #e5e7eb",backgroundColor:"#fff",borderRadius:"4px"},actionsSlot:{marginTop:"16px"}};Q.LogisticsDashboard=vd,Object.defineProperty(Q,Symbol.toStringTag,{value:"Module"})});
184
+ `)}],od=[function({props:t}){t.renderClone||(process.env.NODE_ENV!=="production"?g(!1,"Must provide a clone render function (renderClone) for virtual lists"):g())},function({getPlaceholderRef:t}){t()&&(process.env.NODE_ENV!=="production"?g(!1,"Expected virtual list to not have a placeholder"):g())}];function id(e){Te(()=>{cn(e,nd),e.props.mode==="standard"&&cn(e,rd),e.props.mode==="virtual"&&cn(e,od)})}class sd extends D.PureComponent{constructor(...t){super(...t),this.state={isVisible:!!this.props.on,data:this.props.on,animate:this.props.shouldAnimate&&this.props.on?"open":"none"},this.onClose=()=>{this.state.animate==="close"&&this.setState({isVisible:!1})}}static getDerivedStateFromProps(t,n){return t.shouldAnimate?t.on?{isVisible:!0,data:t.on,animate:"open"}:n.isVisible?{isVisible:!0,data:n.data,animate:"close"}:{isVisible:!1,animate:"close",data:null}:{isVisible:!!t.on,data:t.on,animate:"none"}}render(){if(!this.state.isVisible)return null;const t={onClose:this.onClose,data:this.state.data,animate:this.state.animate};return this.props.children(t)}}const cd=e=>{const t=D.useContext(Ke);t||(process.env.NODE_ENV!=="production"?g(!1,"Could not find app context"):g());const{contextId:n,isMovementAllowed:r}=t,o=D.useRef(null),i=D.useRef(null),{children:s,droppableId:c,type:a,mode:d,direction:p,ignoreContainerClipping:l,isDropDisabled:u,isCombineEnabled:f,snapshot:m,useClone:b,updateViewportMaxScroll:h,getContainerForClone:E}=e,v=x(()=>o.current,[]),C=x((L=null)=>{o.current=L},[]),I=x(()=>i.current,[]),N=x((L=null)=>{i.current=L},[]);id({props:e,getDroppableRef:v,getPlaceholderRef:I});const O=x(()=>{r()&&h({maxScroll:Gr()})},[r,h]);Jl({droppableId:c,type:a,mode:d,direction:p,isDropDisabled:u,isCombineEnabled:f,ignoreContainerClipping:l,getDroppableRef:v});const _=S(()=>D.createElement(sd,{on:e.placeholder,shouldAnimate:e.shouldAnimatePlaceholder},({onClose:L,data:J,animate:fe})=>D.createElement(td,{placeholder:J,onClose:L,innerRef:N,animate:fe,contextId:n,onTransitionEnd:O})),[n,O,e.placeholder,e.shouldAnimatePlaceholder,N]),T=S(()=>({innerRef:C,placeholder:_,droppableProps:{"data-rfd-droppable-id":c,"data-rfd-droppable-context-id":n}}),[n,c,_,C]),H=b?b.dragging.draggableId:null,V=S(()=>({droppableId:c,type:a,isUsingCloneFor:H}),[c,H,a]);function j(){if(!b)return null;const{dragging:L,render:J}=b,fe=D.createElement(go,{draggableId:L.draggableId,index:L.source.index,isClone:!0,isEnabled:!0,shouldRespectForcePress:!1,canDragInteractiveElements:!0},(Z,tt)=>J(Z,tt,L));return rt.createPortal(fe,E())}return D.createElement(en.Provider,{value:V},s(T,m),j())};function ad(){return document.body||(process.env.NODE_ENV!=="production"?g(!1,"document.body is not ready"):g()),document.body}const Eo={mode:"standard",type:"DEFAULT",direction:"vertical",isDropDisabled:!1,isCombineEnabled:!1,ignoreContainerClipping:!1,renderClone:null,getContainerForClone:ad},Do=e=>{let t={...e},n;for(n in Eo)e[n]===void 0&&(t={...t,[n]:Eo[n]});return t},an=(e,t)=>e===t.droppable.type,No=(e,t)=>t.draggables[e.draggable.id],ld=Un(()=>{const e={placeholder:null,shouldAnimatePlaceholder:!0,snapshot:{isDraggingOver:!1,draggingOverWith:null,draggingFromThisWith:null,isUsingPlaceholder:!1},useClone:null},t={...e,shouldAnimatePlaceholder:!1},n=M(i=>({draggableId:i.id,type:i.type,source:{index:i.index,droppableId:i.droppableId}})),r=M((i,s,c,a,d,p)=>{const l=d.descriptor.id;if(d.descriptor.droppableId===i){const m=p?{render:p,dragging:n(d.descriptor)}:null,b={isDraggingOver:c,draggingOverWith:c?l:null,draggingFromThisWith:l,isUsingPlaceholder:!0};return{placeholder:d.placeholder,shouldAnimatePlaceholder:!1,snapshot:b,useClone:m}}if(!s)return t;if(!a)return e;const f={isDraggingOver:c,draggingOverWith:l,draggingFromThisWith:null,isUsingPlaceholder:!0};return{placeholder:d.placeholder,shouldAnimatePlaceholder:!0,snapshot:f,useClone:null}});return(i,s)=>{const c=Do(s),a=c.droppableId,d=c.type,p=!c.isDropDisabled,l=c.renderClone;if(Be(i)){const u=i.critical;if(!an(d,u))return t;const f=No(u,i.dimensions),m=W(i.impact)===a;return r(a,p,m,m,f,l)}if(i.phase==="DROP_ANIMATING"){const u=i.completed;if(!an(d,u.critical))return t;const f=No(u.critical,i.dimensions);return r(a,p,po(u.result)===a,W(u.impact)===a,f,l)}if(i.phase==="IDLE"&&i.completed&&!i.shouldFlush){const u=i.completed;if(!an(d,u.critical))return t;const f=W(u.impact)===a,m=!!(u.impact.at&&u.impact.at.type==="COMBINE"),b=u.critical.droppable.id===a;return f?m?e:t:b?e:t}return t}},{updateViewportMaxScroll:sc},(e,t,n)=>({...Do(n),...e,...t}),{context:qt,areStatePropsEqual:uo})(cd),dd=()=>y.jsxs("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",style:{flexShrink:0},children:[y.jsx("path",{d:"M21 10c0 7-9 13-9 13s-9-6-9-13a9 9 0 0 1 18 0z"}),y.jsx("circle",{cx:"12",cy:"10",r:"3"})]}),ud=()=>y.jsxs("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",style:{flexShrink:0},children:[y.jsx("circle",{cx:"12",cy:"12",r:"10"}),y.jsx("polyline",{points:"12 6 12 12 16 14"})]}),pd=()=>y.jsxs("svg",{width:"20",height:"20",viewBox:"0 0 24 24",fill:"none",stroke:"#9ca3af",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",style:{cursor:"grab"},children:[y.jsx("line",{x1:"3",y1:"12",x2:"21",y2:"12"}),y.jsx("line",{x1:"3",y1:"6",x2:"21",y2:"6"}),y.jsx("line",{x1:"3",y1:"18",x2:"21",y2:"18"})]}),fd=()=>y.jsxs("svg",{width:"25",height:"25",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[y.jsx("polyline",{points:"15 3 21 3 21 9"}),y.jsx("polyline",{points:"9 21 3 21 3 15"}),y.jsx("line",{x1:"21",y1:"3",x2:"14",y2:"10"}),y.jsx("line",{x1:"3",y1:"21",x2:"10",y2:"14"})]}),gd=()=>y.jsxs("svg",{width:"25",height:"25",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[y.jsx("polyline",{points:"4 14 10 14 10 20"}),y.jsx("polyline",{points:"20 10 14 10 14 4"}),y.jsx("line",{x1:"14",y1:"10",x2:"21",y2:"3"}),y.jsx("line",{x1:"3",y1:"21",x2:"10",y2:"14"})]}),xo=e=>{var s;if(!e)return"--:--";const t=(s=e.split("T")[1])==null?void 0:s.slice(0,5);if(!t)return"--:--";const[n,r]=t.split(":").map(Number),o=n>=12?"PM":"AM";return`${n%12||12}:${r.toString().padStart(2,"0")} ${o}`},Io=e=>typeof e=="object"&&(e!=null&&e.name)?e.name:e,Oo=e=>{var t,n;return typeof e.status=="string"?e.status.toLowerCase()==="completed":((n=(t=e.status)==null?void 0:t.code)==null?void 0:n.toLowerCase())==="completed"},md=e=>{const t=[];return[...e].sort((r,o)=>r.sequence_rank-o.sequence_rank).forEach(r=>{const o=t[t.length-1];o&&o.stop_id===r.stop_id?o.orders.push(r):t.push({stop_id:r.stop_id,sequence_rank:r.sequence_rank,orders:[r]})}),t},hd=({order:e,pathPeriod:t,isFirst:n,isDone:r,renderOrderExtraData:o})=>{var a,d,p,l,u,f;const[i,s]=D.useState(!1),c=(d=(a=e.customer)==null?void 0:a.address)!=null&&d.lat&&((l=(p=e.customer)==null?void 0:p.address)!=null&&l.long)?`https://maps.google.com/?q=${e.customer.address.lat},${e.customer.address.long}`:"#";return y.jsxs("div",{style:{...A.orderBlock,borderTop:n?"none":"1px solid #f3f4f6",backgroundColor:r?"#fafafa":"transparent"},children:[y.jsxs("div",{style:A.orderHeader,children:[y.jsxs("div",{style:A.gridItem,children:[y.jsxs("div",{style:A.gridLabel,children:["ORDER"," ",r&&y.jsx("span",{style:{color:"#16a34a",marginLeft:"4px"},children:"✓ DONE"})]}),y.jsxs("div",{style:A.gridValue,children:["#",e.order_id]})]}),o&&y.jsx("button",{onClick:()=>s(!i),style:A.expandButton,children:i?y.jsx(gd,{}):y.jsx(fd,{})})]}),y.jsxs("div",{style:A.detailsGrid,children:[y.jsxs("div",{style:A.gridItem,children:[y.jsx("div",{style:A.gridLabel,children:"LOCATION"}),y.jsxs("div",{style:A.gridValueWithIcon,children:[y.jsx(dd,{}),y.jsx("a",{href:c,target:"_blank",rel:"noopener noreferrer",style:A.addressLink,children:((f=(u=e.customer)==null?void 0:u.address)==null?void 0:f.street_area)||"N/A"})]})]}),y.jsxs("div",{style:A.gridItem,children:[y.jsx("div",{style:A.gridLabel,children:"PERIOD"}),y.jsx("div",{style:A.gridValue,children:t})]}),y.jsxs("div",{style:A.gridItem,children:[y.jsx("div",{style:A.gridLabel,children:"TIME WINDOW"}),y.jsxs("div",{style:A.gridValueWithIcon,children:[y.jsx(ud,{})," ",y.jsxs("span",{children:[xo(e.eta_start)," - ",xo(e.eta_end)]})]})]})]}),i&&o&&y.jsx("div",{style:A.extraDataContainer,children:o(e)})]})},bd=({stopGroup:e,index:t,pathType:n,pathPeriod:r,canEditPath:o,isPathCompleted:i,renderStopActions:s,renderOrderExtraData:c})=>{const a=e.orders.every(Oo),d=!o||i||a;return y.jsx($l,{draggableId:e.stop_id.toString(),index:t,isDragDisabled:d,children:p=>{var l,u;return y.jsxs("div",{ref:p.innerRef,...p.draggableProps,style:{...A.timelineItem,...p.draggableProps.style},children:[y.jsx("div",{style:{...A.bubble,...a?A.bubbleCompleted:A.bubblePending},children:t+1}),y.jsxs("div",{style:A.card,children:[y.jsxs("div",{style:A.cardHeader,children:[y.jsxs("div",{style:{display:"flex",alignItems:"center",gap:"8px"},children:[y.jsxs("span",{style:A.title,children:[n," #",e.sequence_rank]}),y.jsx("span",{style:a?A.badgeCompleted:A.badgePending,children:a?"Completed":"Pending"})]}),!d&&y.jsx("div",{...p.dragHandleProps,children:y.jsx(pd,{})})]}),y.jsxs("div",{style:A.customerName,children:["Customer: ",(u=(l=e.orders[0])==null?void 0:l.customer)==null?void 0:u.name]}),y.jsx("div",{style:A.ordersList,children:e.orders.map((f,m)=>y.jsx(hd,{order:f,pathPeriod:r,isFirst:m===0,isDone:Oo(f),renderOrderExtraData:c},f.id))}),s&&y.jsx("div",{style:A.actionsSlot,children:s(e)})]})]})}})},vd=({path:e,onReorder:t,renderStopActions:n,renderOrderExtraData:r,canEditPath:o=!0})=>{var d,p;const[i,s]=D.useState([]);D.useEffect(()=>{e!=null&&e.path_orders&&s(md(e.path_orders))},[e]);const c=l=>{if(!l.destination)return;const u=Array.from(i),[f]=u.splice(l.source.index,1);u.splice(l.destination.index,0,f),s(u),t&&t(e.id,u.map(m=>m.stop_id))};if(!e||!i.length)return y.jsx("div",{children:"No Path Data"});const a=typeof e.status=="string"?e.status.toLowerCase()==="completed":((p=(d=e.status)==null?void 0:d.code)==null?void 0:p.toLowerCase())==="completed";return y.jsx("div",{style:A.container,children:y.jsx(yl,{onDragEnd:c,children:y.jsx(ld,{droppableId:"path-list",children:l=>y.jsxs("div",{ref:l.innerRef,...l.droppableProps,style:A.timelineWrapper,children:[y.jsx("div",{style:A.verticalLine}),y.jsx("div",{style:{display:"flex",flexDirection:"column",gap:"24px"},children:i.map((u,f)=>y.jsx(bd,{stopGroup:u,index:f,pathType:Io(e.type),pathPeriod:Io(e.period),canEditPath:o,isPathCompleted:a,renderStopActions:n,renderOrderExtraData:r},u.stop_id))}),l.placeholder]})})})})},A={container:{fontFamily:"sans-serif",maxWidth:"800px",margin:"0 auto"},timelineWrapper:{position:"relative",padding:"20px 0"},verticalLine:{position:"absolute",left:"19px",top:"40px",bottom:"40px",width:"2px",backgroundColor:"#f3f4f6"},timelineItem:{display:"flex",gap:"16px",marginBottom:"24px",position:"relative",zIndex:1},bubble:{width:"40px",height:"40px",borderRadius:"50%",display:"flex",alignItems:"center",justifyContent:"center",fontWeight:"bold",backgroundColor:"#fff",border:"2px solid",flexShrink:0},bubblePending:{borderColor:"#f3f4f6",color:"#9ca3af"},bubbleCompleted:{borderColor:"#dcfce7",color:"#16a34a",backgroundColor:"#f0fdf4"},card:{flex:1,backgroundColor:"#fff",border:"1px solid #f3f4f6",borderRadius:"12px",padding:"16px",boxShadow:"0 1px 3px rgba(0,0,0,0.1)"},cardHeader:{display:"flex",justifyContent:"space-between",marginBottom:"8px",alignItems:"center"},title:{fontSize:"16px",fontWeight:"bold"},badgePending:{fontSize:"11px",padding:"2px 8px",borderRadius:"12px",backgroundColor:"#f3f4f6",color:"#4b5563",fontWeight:"600"},badgeCompleted:{fontSize:"11px",padding:"2px 8px",borderRadius:"12px",backgroundColor:"#dcfce7",color:"#16a34a",fontWeight:"600"},customerName:{fontSize:"14px",color:"#6b7280",marginBottom:"12px"},ordersList:{backgroundColor:"#f9fafb",borderRadius:"8px",overflow:"hidden"},orderBlock:{padding:"12px",transition:"background-color 0.2s"},orderHeader:{display:"flex",justifyContent:"space-between",alignItems:"flex-start",marginBottom:"8px"},detailsGrid:{display:"grid",gridTemplateColumns:"1fr 1fr",gap:"12px"},gridItem:{display:"flex",flexDirection:"column"},gridLabel:{fontSize:"10px",color:"#9ca3af",fontWeight:"bold"},gridValue:{fontSize:"13px",fontWeight:"600"},gridValueWithIcon:{fontSize:"13px",display:"flex",alignItems:"flex-start",gap:"4px",color:"#374151"},addressLink:{color:"#3b82f6",textDecoration:"underline",wordBreak:"break-word",lineHeight:"1.4"},expandButton:{color:"#fff",border:"none",cursor:"pointer",backgroundColor:"#d1d1d1",borderRadius:"5px",padding:"4px"},extraDataContainer:{marginTop:"12px",padding:"12px",borderTop:"1px dashed #e5e7eb",backgroundColor:"#fff",borderRadius:"4px"},actionsSlot:{marginTop:"16px"}};Q.LogisticsDashboard=vd,Object.defineProperty(Q,Symbol.toStringTag,{value:"Module"})});
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@wilow_app/design-system",
3
- "version": "0.0.7",
3
+ "version": "0.0.9",
4
4
  "type": "module",
5
5
  "files": [
6
6
  "dist"