@wilow_app/design-system 0.1.7 → 0.1.8

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
@@ -8,7 +8,7 @@ function W(e) {
8
8
  var Go = typeof Symbol == "function" && Symbol.observable || "@@observable", In = Go, Cn = () => Math.random().toString(36).substring(7).split("").join("."), ko = {
9
9
  INIT: `@@redux/INIT${/* @__PURE__ */ Cn()}`,
10
10
  REPLACE: `@@redux/REPLACE${/* @__PURE__ */ Cn()}`
11
- }, On = ko;
11
+ }, wn = ko;
12
12
  function Fo(e) {
13
13
  if (typeof e != "object" || e === null)
14
14
  return !1;
@@ -121,7 +121,7 @@ function br(e, t, n) {
121
121
  if (typeof m != "function")
122
122
  throw new Error(process.env.NODE_ENV === "production" ? W(10) : `Expected the nextReducer to be a function. Instead, received: '${ne(m)}`);
123
123
  r = m, u({
124
- type: On.REPLACE
124
+ type: wn.REPLACE
125
125
  });
126
126
  }
127
127
  function h() {
@@ -152,7 +152,7 @@ function br(e, t, n) {
152
152
  };
153
153
  }
154
154
  return u({
155
- type: On.INIT
155
+ type: wn.INIT
156
156
  }), {
157
157
  dispatch: u,
158
158
  subscribe: l,
@@ -161,20 +161,20 @@ function br(e, t, n) {
161
161
  [In]: h
162
162
  };
163
163
  }
164
- function wn(e, t) {
164
+ function On(e, t) {
165
165
  return function(...n) {
166
166
  return t(e.apply(this, n));
167
167
  };
168
168
  }
169
169
  function Sn(e, t) {
170
170
  if (typeof e == "function")
171
- return wn(e, t);
171
+ return On(e, t);
172
172
  if (typeof e != "object" || e === null)
173
173
  throw new Error(process.env.NODE_ENV === "production" ? W(16) : `bindActionCreators expected an object or a function, but instead received: '${ne(e)}'. Did you write "import ActionCreators from" instead of "import * as ActionCreators from"?`);
174
174
  const n = {};
175
175
  for (const r in e) {
176
176
  const o = e[r];
177
- typeof o == "function" && (n[r] = wn(o, t));
177
+ typeof o == "function" && (n[r] = On(o, t));
178
178
  }
179
179
  return n;
180
180
  }
@@ -442,7 +442,7 @@ function ai(e) {
442
442
  n = Object.getPrototypeOf(n);
443
443
  return t === n;
444
444
  }
445
- function Or(e, t, n) {
445
+ function wr(e, t, n) {
446
446
  ai(e) || jt(
447
447
  `${n}() in ${t} must return a plain object. Instead received ${e}.`
448
448
  );
@@ -459,7 +459,7 @@ function Bt(e) {
459
459
  function Pn(e) {
460
460
  return e.dependsOnOwnProps ? !!e.dependsOnOwnProps : e.length !== 1;
461
461
  }
462
- function wr(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 wr(e, t) {
467
467
  return i.dependsOnOwnProps = !0, i.mapToProps = function(c, a) {
468
468
  i.mapToProps = e, i.dependsOnOwnProps = Pn(e);
469
469
  let d = i(c, a);
470
- return typeof d == "function" && (i.mapToProps = d, i.dependsOnOwnProps = Pn(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 = Pn(d), d = i(c, a)), process.env.NODE_ENV !== "production" && wr(d, o, t), d;
471
471
  }, i;
472
472
  };
473
473
  }
@@ -486,7 +486,7 @@ function li(e) {
486
486
  )
487
487
  ) : e ? typeof e == "function" ? (
488
488
  // @ts-ignore
489
- wr(e, "mapDispatchToProps")
489
+ Or(e, "mapDispatchToProps")
490
490
  ) : Yt(e, "mapDispatchToProps") : Bt((t) => ({
491
491
  dispatch: t
492
492
  }));
@@ -494,7 +494,7 @@ function li(e) {
494
494
  function di(e) {
495
495
  return e ? typeof e == "function" ? (
496
496
  // @ts-ignore
497
- wr(e, "mapStateToProps")
497
+ Or(e, "mapStateToProps")
498
498
  ) : Yt(e, "mapStateToProps") : Bt(() => ({}));
499
499
  }
500
500
  function ui(e, t, n) {
@@ -505,7 +505,7 @@ function pi(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" && wr(s, r, "mergeProps")), s;
509
509
  };
510
510
  };
511
511
  }
@@ -650,20 +650,20 @@ var Di = {
650
650
  function Bn(e) {
651
651
  return ri(e) ? _r : Ii[e.$$typeof] || Di;
652
652
  }
653
- var Ci = Object.defineProperty, Oi = Object.getOwnPropertyNames, Vn = Object.getOwnPropertySymbols, wi = Object.getOwnPropertyDescriptor, Si = Object.getPrototypeOf, Ln = Object.prototype;
653
+ var Ci = Object.defineProperty, wi = Object.getOwnPropertyNames, Vn = Object.getOwnPropertySymbols, Oi = Object.getOwnPropertyDescriptor, Si = Object.getPrototypeOf, Ln = Object.prototype;
654
654
  function Vt(e, t) {
655
655
  if (typeof t != "string") {
656
656
  if (Ln) {
657
657
  const i = Si(t);
658
658
  i && i !== Ln && Vt(e, i);
659
659
  }
660
- let n = Oi(t);
660
+ let n = wi(t);
661
661
  Vn && (n = n.concat(Vn(t)));
662
662
  const r = Bn(e), o = Bn(t);
663
663
  for (let i = 0; i < n.length; ++i) {
664
664
  const s = n[i];
665
665
  if (!Ni[s] && !(o && o[s]) && !(r && r[s])) {
666
- const c = wi(t, s);
666
+ const c = Oi(t, s);
667
667
  try {
668
668
  Ci(e, s, c);
669
669
  } catch {
@@ -1057,13 +1057,13 @@ function K(e, t, n) {
1057
1057
  };
1058
1058
  }
1059
1059
  const Xi = process.env.NODE_ENV === "production", Fn = "Invariant failed";
1060
- class Oe extends Error {
1060
+ class we extends Error {
1061
1061
  }
1062
- Oe.prototype.toString = function() {
1062
+ we.prototype.toString = function() {
1063
1063
  return this.message;
1064
1064
  };
1065
1065
  function g(e, t) {
1066
- throw Xi ? new Oe(Fn) : new Oe(`${Fn}: ${t || ""}`);
1066
+ throw Xi ? new we(Fn) : new we(`${Fn}: ${t || ""}`);
1067
1067
  }
1068
1068
  class Ki extends L.Component {
1069
1069
  constructor(...t) {
@@ -1074,7 +1074,7 @@ class Ki 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" && Lt(o.message));
1077
+ o instanceof we && (n.preventDefault(), process.env.NODE_ENV !== "production" && Lt(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 Ki extends L.Component {
1090
1090
  }]);
1091
1091
  }
1092
1092
  componentDidCatch(t) {
1093
- if (t instanceof Oe) {
1093
+ if (t instanceof we) {
1094
1094
  process.env.NODE_ENV !== "production" && Lt(t.message), this.setState({});
1095
1095
  return;
1096
1096
  }
@@ -1170,7 +1170,7 @@ function Mr(e, t) {
1170
1170
  return !1;
1171
1171
  return !0;
1172
1172
  }
1173
- function w(e, t) {
1173
+ function O(e, t) {
1174
1174
  const n = me(() => ({
1175
1175
  inputs: t,
1176
1176
  result: e()
@@ -1183,7 +1183,7 @@ function w(e, t) {
1183
1183
  }, [s]), s.result;
1184
1184
  }
1185
1185
  function D(e, t) {
1186
- return w(() => 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
- }, we = (e, t) => Math.sqrt((t.x - e.x) ** 2 + (t.y - e.y) ** 2), Un = (e, t) => Math.min(...t.map((n) => we(e, n))), $r = (e) => (t) => ({
1206
+ }, Oe = (e, t) => Math.sqrt((t.x - e.x) ** 2 + (t.y - e.y) ** 2), Un = (e, t) => Math.min(...t.map((n) => Oe(e, n))), $r = (e) => (t) => ({
1207
1207
  x: e(t.x),
1208
1208
  y: e(t.y)
1209
1209
  });
@@ -1641,12 +1641,12 @@ const zr = (e, t) => t.margin[e.start] + t.borderBox[e.size] / 2, Cs = (e, t) =>
1641
1641
  axis: e,
1642
1642
  moveRelativeTo: t,
1643
1643
  isMoving: n
1644
- }) => ae(e.line, t.marginBox[e.start] - Cs(e, n), tn(e, t.marginBox, n)), Os = ({
1644
+ }) => ae(e.line, t.marginBox[e.start] - Cs(e, n), tn(e, t.marginBox, n)), ws = ({
1645
1645
  axis: e,
1646
1646
  moveInto: t,
1647
1647
  isMoving: n
1648
1648
  }) => ae(e.line, t.contentBox[e.start] + zr(e, n), tn(e, t.contentBox, n));
1649
- var ws = ({
1649
+ var Os = ({
1650
1650
  impact: e,
1651
1651
  draggable: t,
1652
1652
  draggables: n,
@@ -1655,7 +1655,7 @@ var ws = ({
1655
1655
  }) => {
1656
1656
  const i = le(r.descriptor.id, n), s = t.page, c = r.axis;
1657
1657
  if (!i.length)
1658
- return Os({
1658
+ return ws({
1659
1659
  axis: c,
1660
1660
  moveInto: r.page,
1661
1661
  isMoving: s
@@ -1707,7 +1707,7 @@ const Ss = ({
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" ? ws({
1710
+ return !n || !s ? i : s.type === "REORDER" ? Os({
1711
1711
  impact: e,
1712
1712
  draggable: t,
1713
1713
  draggables: r,
@@ -1934,7 +1934,7 @@ var Vs = ({
1934
1934
  viewport: t.frame,
1935
1935
  withDroppableDisplacement: !0
1936
1936
  })).sort((s, c) => {
1937
- const a = we(e, Mt(n, Xn(s, o))), d = we(e, Mt(n, Xn(c, o)));
1937
+ const a = Oe(e, Mt(n, Xn(s, o))), d = Oe(e, Mt(n, Xn(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 Us({
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: we(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 cn = {
3007
3007
  }, {
3008
3008
  minDropTime: kt,
3009
3009
  maxDropTime: ao
3010
- } = co, Oc = ao - kt, Zn = 1500, wc = 0.6;
3010
+ } = co, wc = ao - kt, Zn = 1500, Oc = 0.6;
3011
3011
  var Sc = ({
3012
3012
  current: e,
3013
3013
  destination: t,
3014
3014
  reason: n
3015
3015
  }) => {
3016
- const r = we(e, t);
3016
+ const r = Oe(e, t);
3017
3017
  if (r <= 0)
3018
3018
  return kt;
3019
3019
  if (r >= Zn)
3020
3020
  return ao;
3021
- const o = r / Zn, i = kt + Oc * o, s = n === "CANCEL" ? i * wc : i;
3021
+ const o = r / Zn, i = kt + wc * o, s = n === "CANCEL" ? i * Oc : i;
3022
3022
  return Number(s.toFixed(2));
3023
3023
  }, _c = ({
3024
3024
  impact: e,
@@ -4093,7 +4093,7 @@ var Na = (e) => {
4093
4093
  userCancel: De(s, "userCancel")
4094
4094
  };
4095
4095
  };
4096
- const Y = typeof window < "u" && typeof window.document < "u" && typeof window.document.createElement < "u" ? Mo : te, Ot = () => {
4096
+ const Y = typeof window < "u" && typeof window.document < "u" && typeof window.document.createElement < "u" ? Mo : te, wt = () => {
4097
4097
  const e = document.querySelector("head");
4098
4098
  return e || (process.env.NODE_ENV !== "production" ? g(!1, "Cannot find the head to append a style to") : g()), e;
4099
4099
  }, or = (e) => {
@@ -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 xa(e, t) {
4104
- const n = w(() => Na(e), [e]), r = V(null), o = V(null), i = D($((l) => {
4104
+ const n = O(() => Na(e), [e]), r = V(null), o = V(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) => {
@@ -4111,10 +4111,10 @@ function xa(e, t) {
4111
4111
  Y(() => {
4112
4112
  !r.current && !o.current || (process.env.NODE_ENV !== "production" ? g(!1, "style elements already mounted") : g());
4113
4113
  const l = or(t), u = or(t);
4114
- return r.current = l, o.current = u, l.setAttribute(`${fe}-always`, e), u.setAttribute(`${fe}-dynamic`, e), Ot().appendChild(l), Ot().appendChild(u), s(n.always), i(n.resting), () => {
4114
+ return r.current = l, o.current = u, l.setAttribute(`${fe}-always`, e), u.setAttribute(`${fe}-dynamic`, e), wt().appendChild(l), wt().appendChild(u), s(n.always), i(n.resting), () => {
4115
4115
  const f = (h) => {
4116
4116
  const b = h.current;
4117
- b || (process.env.NODE_ENV !== "production" ? g(!1, "Cannot unmount ref as it is not set") : g()), Ot().removeChild(b), h.current = null;
4117
+ b || (process.env.NODE_ENV !== "production" ? g(!1, "Cannot unmount ref as it is not set") : g()), wt().removeChild(b), h.current = null;
4118
4118
  };
4119
4119
  f(r), f(o);
4120
4120
  };
@@ -4128,7 +4128,7 @@ function xa(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 w(() => ({
4131
+ return O(() => ({
4132
4132
  dragging: c,
4133
4133
  dropping: a,
4134
4134
  resting: d
@@ -4178,7 +4178,7 @@ function Ia(e) {
4178
4178
  o.current = !1;
4179
4179
  const u = r.current;
4180
4180
  u && cancelAnimationFrame(u);
4181
- }), []), w(() => ({
4181
+ }), []), O(() => ({
4182
4182
  register: i,
4183
4183
  tryRecordFocus: d,
4184
4184
  tryRestoreFocusRecorded: a,
@@ -4259,8 +4259,8 @@ function Ca() {
4259
4259
  clean: p
4260
4260
  };
4261
4261
  }
4262
- function Oa() {
4263
- const e = w(Ca, []);
4262
+ function wa() {
4263
+ const e = O(Ca, []);
4264
4264
  return te(() => function() {
4265
4265
  e.clean();
4266
4266
  }, [e]), e;
@@ -4269,7 +4269,7 @@ var pn = L.createContext(null), Re = () => {
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 wa = {
4272
+ const Oa = {
4273
4273
  position: "absolute",
4274
4274
  width: "1px",
4275
4275
  height: "1px",
@@ -4281,10 +4281,10 @@ const wa = {
4281
4281
  "clip-path": "inset(100%)"
4282
4282
  }, Sa = (e) => `rfd-announcement-${e}`;
4283
4283
  function _a(e) {
4284
- const t = w(() => Sa(e), [e]), n = V(null);
4284
+ const t = O(() => Sa(e), [e]), n = V(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"), Je(i.style, wa), Re().appendChild(i), function() {
4287
+ return n.current = i, i.id = t, i.setAttribute("aria-live", "assertive"), i.setAttribute("aria-atomic", "true"), Je(i.style, Oa), Re().appendChild(i), function() {
4288
4288
  setTimeout(function() {
4289
4289
  const a = Re();
4290
4290
  a.contains(i) && a.removeChild(i), i === n.current && (n.current = null);
@@ -4313,7 +4313,7 @@ const Aa = {
4313
4313
  };
4314
4314
  function fn(e, t = Aa) {
4315
4315
  const n = L.useId();
4316
- return w(() => `${e}${t.separator}${n}`, [t.separator, e, n]);
4316
+ return O(() => `${e}${t.separator}${n}`, [t.separator, e, n]);
4317
4317
  }
4318
4318
  function Pa({
4319
4319
  contextId: e,
@@ -4327,7 +4327,7 @@ function Ra({
4327
4327
  }) {
4328
4328
  const n = fn("hidden-text", {
4329
4329
  separator: "-"
4330
- }), r = w(() => Pa({
4330
+ }), r = O(() => Pa({
4331
4331
  contextId: e,
4332
4332
  uniqueId: n
4333
4333
  }), [n, e]);
@@ -4362,7 +4362,7 @@ var La = (e, t) => {
4362
4362
  This can result in run time bugs, and even fatal crashes
4363
4363
  `);
4364
4364
  };
4365
- const wt = `
4365
+ const Ot = `
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 Ma = (e) => {
4374
4374
  process.env.NODE_ENV !== "production" && T(`
4375
4375
  No <!doctype html> found.
4376
4376
 
4377
- ${wt}
4377
+ ${Ot}
4378
4378
  `);
4379
4379
  return;
4380
4380
  }
4381
4381
  t.name.toLowerCase() !== "html" && process.env.NODE_ENV !== "production" && T(`
4382
4382
  Unexpected <!doctype> found: (${t.name})
4383
4383
 
4384
- ${wt}
4384
+ ${Ot}
4385
4385
  `), t.publicId !== "" && process.env.NODE_ENV !== "production" && T(`
4386
4386
  Unexpected <!doctype> publicId found: (${t.publicId})
4387
4387
  A html5 doctype does not have a publicId
4388
4388
 
4389
- ${wt}
4389
+ ${Ot}
4390
4390
  `);
4391
4391
  };
4392
4392
  function gn(e) {
@@ -4560,7 +4560,7 @@ function Za({
4560
4560
  }];
4561
4561
  }
4562
4562
  function Qa(e) {
4563
- const t = V(cr), n = V(re), r = w(() => ({
4563
+ const t = V(cr), n = V(re), r = O(() => ({
4564
4564
  eventName: "mousedown",
4565
4565
  fn: function(l) {
4566
4566
  if (l.defaultPrevented || l.button !== xo || l.ctrlKey || l.metaKey || l.shiftKey || l.altKey)
@@ -4580,7 +4580,7 @@ function Qa(e) {
4580
4580
  };
4581
4581
  n.current(), d(f, h);
4582
4582
  }
4583
- }), [e]), o = w(() => ({
4583
+ }), [e]), o = O(() => ({
4584
4584
  eventName: "webkitmouseforcewillbegin",
4585
4585
  fn: (p) => {
4586
4586
  if (p.defaultPrevented)
@@ -4705,7 +4705,7 @@ function nl(e, t) {
4705
4705
  }];
4706
4706
  }
4707
4707
  function rl(e) {
4708
- const t = V(el), n = w(() => ({
4708
+ const t = V(el), n = O(() => ({
4709
4709
  eventName: "keydown",
4710
4710
  fn: function(i) {
4711
4711
  if (i.defaultPrevented || i.keyCode !== Do)
@@ -4855,7 +4855,7 @@ function al(e) {
4855
4855
  return t.current;
4856
4856
  }, []), o = D(function(f) {
4857
4857
  t.current = f;
4858
- }, []), i = w(() => ({
4858
+ }, []), i = O(() => ({
4859
4859
  eventName: "touchstart",
4860
4860
  fn: function(f) {
4861
4861
  if (f.defaultPrevented)
@@ -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 wo({
5026
5026
  lockAPI: e,
5027
5027
  store: t,
5028
5028
  registry: n,
@@ -5042,7 +5042,7 @@ function Dl({
5042
5042
  forceSensorStop: i,
5043
5043
  sourceEvent: s
5044
5044
  }) {
5045
- if (!Oo({
5045
+ if (!wo({
5046
5046
  lockAPI: e,
5047
5047
  store: n,
5048
5048
  registry: r,
@@ -5185,7 +5185,7 @@ function xl({
5185
5185
  c(m, v), m = v;
5186
5186
  });
5187
5187
  }, [s, t, c]), Y(() => s.tryAbandon, [s.tryAbandon]);
5188
- const a = D((b) => Oo({
5188
+ const a = D((b) => wo({
5189
5189
  lockAPI: s,
5190
5190
  registry: n,
5191
5191
  store: t,
@@ -5203,7 +5203,7 @@ function xl({
5203
5203
  return m ? m.options : null;
5204
5204
  }, [n.draggable]), u = D(function() {
5205
5205
  s.isClaimed() && (s.tryAbandon(), t.getState().phase !== "IDLE" && t.dispatch(on()));
5206
- }, [s, t]), f = D(() => s.isClaimed(), [s]), h = w(() => ({
5206
+ }, [s, t]), f = D(() => s.isClaimed(), [s]), h = O(() => ({
5207
5207
  canGetLock: a,
5208
5208
  tryGetLock: d,
5209
5209
  findClosestDraggableId: p,
@@ -5236,7 +5236,7 @@ const Il = (e) => ({
5236
5236
  function Ne(e) {
5237
5237
  return e.current || (process.env.NODE_ENV !== "production" ? g(!1, "Could not find store from lazy ref") : g()), e.current;
5238
5238
  }
5239
- function Ol(e) {
5239
+ function wl(e) {
5240
5240
  const {
5241
5241
  contextId: t,
5242
5242
  setCallbacks: n,
@@ -5250,20 +5250,20 @@ function Ol(e) {
5250
5250
  text: i
5251
5251
  }), u = xa(t, o), f = D((B) => {
5252
5252
  Ne(s).dispatch(B);
5253
- }, []), h = w(() => Sn({
5253
+ }, []), h = O(() => Sn({
5254
5254
  publishWhileDragging: lc,
5255
5255
  updateDroppableScroll: uc,
5256
5256
  updateDroppableIsEnabled: pc,
5257
5257
  updateDroppableIsCombineEnabled: fc,
5258
5258
  collectionStarting: dc
5259
- }, f), [f]), b = Oa(), m = w(() => ta(b, h), [b, h]), y = w(() => va({
5259
+ }, f), [f]), b = wa(), m = O(() => ta(b, h), [b, h]), y = O(() => va({
5260
5260
  scrollWindow: na,
5261
5261
  scrollDroppable: m.scrollDroppable,
5262
5262
  getAutoScrollerOptions: d,
5263
5263
  ...Sn({
5264
5264
  move: oo
5265
5265
  }, f)
5266
- }), [m.scrollDroppable, f, d]), v = Ia(t), I = w(() => Jc({
5266
+ }), [m.scrollDroppable, f, d]), v = Ia(t), I = O(() => Jc({
5267
5267
  announce: p,
5268
5268
  autoScroller: y,
5269
5269
  dimensionMarshal: m,
@@ -5278,12 +5278,12 @@ function Ol(e) {
5278
5278
  }, []), E = D(() => {
5279
5279
  const B = Ne(s).getState();
5280
5280
  return B.phase === "DROP_ANIMATING" ? !0 : B.phase === "IDLE" ? !1 : B.isDragging;
5281
- }, []), x = w(() => ({
5281
+ }, []), x = O(() => ({
5282
5282
  isDragging: E,
5283
5283
  tryAbort: N
5284
5284
  }), [E, N]);
5285
5285
  n(x);
5286
- const _ = D((B) => go(Ne(s).getState(), B), []), R = D(() => ce(Ne(s).getState()), []), U = w(() => ({
5286
+ const _ = D((B) => go(Ne(s).getState(), B), []), R = D(() => ce(Ne(s).getState()), []), U = O(() => ({
5287
5287
  marshal: m,
5288
5288
  focus: v,
5289
5289
  contextId: t,
@@ -5305,12 +5305,12 @@ function Ol(e) {
5305
5305
  store: I
5306
5306
  }, e.children));
5307
5307
  }
5308
- function wl() {
5308
+ function Ol() {
5309
5309
  return L.useId();
5310
5310
  }
5311
5311
  function Sl(e) {
5312
- const t = wl(), n = e.dragHandleUsageInstructions || ze.dragHandleUsageInstructions;
5313
- return L.createElement(Ki, null, (r) => L.createElement(Ol, {
5312
+ const t = Ol(), n = e.dragHandleUsageInstructions || ze.dragHandleUsageInstructions;
5313
+ return L.createElement(Ki, null, (r) => L.createElement(wl, {
5314
5314
  nonce: e.nonce,
5315
5315
  contextId: t,
5316
5316
  setCallbacks: r,
@@ -5386,14 +5386,14 @@ function Ll(e) {
5386
5386
  canDragInteractiveElements: i,
5387
5387
  shouldRespectForcePress: s,
5388
5388
  isEnabled: c
5389
- } = e, a = w(() => ({
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 h = o();
5395
5395
  return h || (process.env.NODE_ENV !== "production" ? g(!1, "Cannot get dimension when no ref is set") : g()), Vl(n, h, f);
5396
- }, [n, o]), p = w(() => ({
5396
+ }, [n, o]), p = O(() => ({
5397
5397
  uniqueId: t,
5398
5398
  descriptor: n,
5399
5399
  options: a,
@@ -5409,7 +5409,7 @@ function Ll(e) {
5409
5409
  }, [p, r.draggable]);
5410
5410
  }
5411
5411
  var bn = L.createContext(null);
5412
- function wo(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 Ml(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" && (wo(n()), e.isEnabled && (Eo(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 && (Eo(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 $l(e) {
@@ -5452,7 +5452,7 @@ const kl = (e) => {
5452
5452
  } = et(st), {
5453
5453
  type: c,
5454
5454
  droppableId: a
5455
- } = et(bn), d = w(() => ({
5455
+ } = et(bn), d = O(() => ({
5456
5456
  id: e.draggableId,
5457
5457
  index: e.index,
5458
5458
  type: c,
@@ -5468,7 +5468,7 @@ const kl = (e) => {
5468
5468
  dropAnimationFinished: y
5469
5469
  } = e;
5470
5470
  if (Ml(e, o, r), $l(b), !b) {
5471
- const x = w(() => ({
5471
+ const x = O(() => ({
5472
5472
  descriptor: d,
5473
5473
  registry: s,
5474
5474
  getDraggableRef: r,
@@ -5478,7 +5478,7 @@ const kl = (e) => {
5478
5478
  }), [d, s, r, h, f, u]);
5479
5479
  Ll(x);
5480
5480
  }
5481
- const v = w(() => u ? {
5481
+ const v = O(() => u ? {
5482
5482
  tabIndex: 0,
5483
5483
  role: "button",
5484
5484
  "aria-describedby": i,
@@ -5488,7 +5488,7 @@ const kl = (e) => {
5488
5488
  onDragStart: Gl
5489
5489
  } : null, [o, i, l, u]), I = D((x) => {
5490
5490
  m.type === "DRAGGING" && m.dropping && x.propertyName === "transform" && hr(y);
5491
- }, [y, m]), N = w(() => {
5491
+ }, [y, m]), N = O(() => {
5492
5492
  const x = Bl(m), _ = m.type === "DRAGGING" && m.dropping ? I : void 0;
5493
5493
  return {
5494
5494
  innerRef: n,
@@ -5500,7 +5500,7 @@ const kl = (e) => {
5500
5500
  },
5501
5501
  dragHandleProps: v
5502
5502
  };
5503
- }, [o, v, l, m, I, n]), E = w(() => ({
5503
+ }, [o, v, l, m, I, n]), E = O(() => ({
5504
5504
  draggableId: d.id,
5505
5505
  type: d.type,
5506
5506
  source: {
@@ -5823,11 +5823,11 @@ function ad(e) {
5823
5823
  const t = V(null), n = et(st), r = fn("droppable"), {
5824
5824
  registry: o,
5825
5825
  marshal: i
5826
- } = n, s = mn(e), c = w(() => ({
5826
+ } = n, s = mn(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 = V(c), d = w(() => $((N, E) => {
5830
+ }), [e.droppableId, e.mode, e.type]), a = V(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 ad(e) {
5840
5840
  }, []), l = D(() => {
5841
5841
  const N = p();
5842
5842
  d(N.x, N.y);
5843
- }, [p, d]), u = w(() => Ce(l), [l]), f = D(() => {
5843
+ }, [p, d]), u = O(() => Ce(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 ad(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 = w(() => ({
5885
+ }, []), v = O(() => ({
5886
5886
  getDimensionAndWatchScroll: h,
5887
5887
  getScrollWhileDragging: b,
5888
5888
  dragStopped: m,
5889
5889
  scroll: y
5890
- }), [m, h, b, y]), I = w(() => ({
5890
+ }), [m, h, b, y]), I = O(() => ({
5891
5891
  uniqueId: r,
5892
5892
  descriptor: c,
5893
5893
  callbacks: v
@@ -5982,7 +5982,7 @@ const fd = [function({
5982
5982
  }, function({
5983
5983
  getDroppableRef: t
5984
5984
  }) {
5985
- wo(t());
5985
+ Oo(t());
5986
5986
  }], gd = [function({
5987
5987
  props: t,
5988
5988
  getPlaceholderRef: n
@@ -6094,7 +6094,7 @@ const vd = (e) => {
6094
6094
  ignoreContainerClipping: l,
6095
6095
  getDroppableRef: v
6096
6096
  });
6097
- const _ = w(() => L.createElement(bd, {
6097
+ const _ = O(() => L.createElement(bd, {
6098
6098
  on: e.placeholder,
6099
6099
  shouldAnimate: e.shouldAnimatePlaceholder
6100
6100
  }, ({
@@ -6108,14 +6108,14 @@ const vd = (e) => {
6108
6108
  animate: de,
6109
6109
  contextId: n,
6110
6110
  onTransitionEnd: x
6111
- })), [n, x, e.placeholder, e.shouldAnimatePlaceholder, E]), R = w(() => ({
6111
+ })), [n, x, e.placeholder, e.shouldAnimatePlaceholder, E]), R = O(() => ({
6112
6112
  innerRef: I,
6113
6113
  placeholder: _,
6114
6114
  droppableProps: {
6115
6115
  "data-rfd-droppable-id": c,
6116
6116
  "data-rfd-droppable-context-id": n
6117
6117
  }
6118
- }), [n, c, _, I]), U = b ? b.dragging.draggableId : null, B = w(() => ({
6118
+ }), [n, c, _, I]), U = b ? b.dragging.draggableId : null, B = O(() => ({
6119
6119
  droppableId: c,
6120
6120
  type: a,
6121
6121
  isUsingCloneFor: U
@@ -6331,7 +6331,7 @@ const pr = {
6331
6331
  )
6332
6332
  ] })
6333
6333
  }
6334
- ), Od = () => /* @__PURE__ */ A(
6334
+ ), wd = () => /* @__PURE__ */ A(
6335
6335
  "svg",
6336
6336
  {
6337
6337
  width: "25",
@@ -6349,7 +6349,7 @@ const pr = {
6349
6349
  /* @__PURE__ */ C("line", { x1: "3", y1: "21", x2: "10", y2: "14" })
6350
6350
  ]
6351
6351
  }
6352
- ), wd = () => /* @__PURE__ */ A(
6352
+ ), Od = () => /* @__PURE__ */ A(
6353
6353
  "svg",
6354
6354
  {
6355
6355
  width: "25",
@@ -6391,19 +6391,19 @@ const pr = {
6391
6391
  "div",
6392
6392
  {
6393
6393
  style: {
6394
- ...O.orderBlock,
6394
+ ...w.orderBlock,
6395
6395
  borderTop: n ? "none" : "1px solid #f3f4f6",
6396
6396
  backgroundColor: r ? "#fafafa" : "transparent"
6397
6397
  },
6398
6398
  children: [
6399
- /* @__PURE__ */ A("div", { style: O.orderHeader, children: [
6400
- /* @__PURE__ */ A("div", { style: O.gridItem, children: [
6401
- /* @__PURE__ */ A("div", { style: O.gridLabel, children: [
6399
+ /* @__PURE__ */ A("div", { style: w.orderHeader, children: [
6400
+ /* @__PURE__ */ A("div", { style: w.gridItem, children: [
6401
+ /* @__PURE__ */ A("div", { style: w.gridLabel, children: [
6402
6402
  "ORDER",
6403
6403
  " ",
6404
6404
  r && /* @__PURE__ */ C("span", { style: { color: "#16a34a", marginLeft: "4px" }, children: "✓ DONE" })
6405
6405
  ] }),
6406
- /* @__PURE__ */ A("div", { style: O.gridValue, children: [
6406
+ /* @__PURE__ */ A("div", { style: w.gridValue, children: [
6407
6407
  "#",
6408
6408
  e.order_id
6409
6409
  ] })
@@ -6412,15 +6412,15 @@ const pr = {
6412
6412
  "button",
6413
6413
  {
6414
6414
  onClick: () => s(!i),
6415
- style: O.expandButton,
6416
- children: i ? /* @__PURE__ */ C(wd, {}) : /* @__PURE__ */ C(Od, {})
6415
+ style: w.expandButton,
6416
+ children: i ? /* @__PURE__ */ C(Od, {}) : /* @__PURE__ */ C(wd, {})
6417
6417
  }
6418
6418
  )
6419
6419
  ] }),
6420
- /* @__PURE__ */ A("div", { style: O.detailsGrid, children: [
6421
- /* @__PURE__ */ A("div", { style: O.gridItem, children: [
6422
- /* @__PURE__ */ C("div", { style: O.gridLabel, children: "LOCATION" }),
6423
- /* @__PURE__ */ A("div", { style: O.gridValueWithIcon, children: [
6420
+ /* @__PURE__ */ A("div", { style: w.detailsGrid, children: [
6421
+ /* @__PURE__ */ A("div", { style: w.gridItem, children: [
6422
+ /* @__PURE__ */ C("div", { style: w.gridLabel, children: "LOCATION" }),
6423
+ /* @__PURE__ */ A("div", { style: w.gridValueWithIcon, children: [
6424
6424
  /* @__PURE__ */ C(xd, {}),
6425
6425
  /* @__PURE__ */ C(
6426
6426
  "a",
@@ -6428,38 +6428,38 @@ const pr = {
6428
6428
  href: c,
6429
6429
  target: "_blank",
6430
6430
  rel: "noopener noreferrer",
6431
- style: O.addressLink,
6431
+ style: w.addressLink,
6432
6432
  children: ((f = (u = e.customer) == null ? void 0 : u.address) == null ? void 0 : f.street_area) || "N/A"
6433
6433
  }
6434
6434
  )
6435
6435
  ] })
6436
6436
  ] }),
6437
- /* @__PURE__ */ A("div", { style: O.gridItem, children: [
6438
- /* @__PURE__ */ C("div", { style: O.gridLabel, children: "PERIOD" }),
6439
- /* @__PURE__ */ C("div", { style: O.gridValue, children: t })
6437
+ /* @__PURE__ */ A("div", { style: w.gridItem, children: [
6438
+ /* @__PURE__ */ C("div", { style: w.gridLabel, children: "PERIOD" }),
6439
+ /* @__PURE__ */ C("div", { style: w.gridValue, children: t })
6440
6440
  ] }),
6441
- /* @__PURE__ */ A("div", { style: O.gridItem, children: [
6442
- /* @__PURE__ */ C("div", { style: O.gridLabel, children: "TIME WINDOW" }),
6443
- /* @__PURE__ */ A("div", { style: O.gridValueWithIcon, children: [
6441
+ /* @__PURE__ */ A("div", { style: w.gridItem, children: [
6442
+ /* @__PURE__ */ C("div", { style: w.gridLabel, children: "TIME WINDOW" }),
6443
+ /* @__PURE__ */ A("div", { style: w.gridValueWithIcon, children: [
6444
6444
  /* @__PURE__ */ C(gr, {}),
6445
6445
  " ",
6446
- /* @__PURE__ */ A("span", { style: O.direction, children: [
6446
+ /* @__PURE__ */ A("span", { style: w.direction, children: [
6447
6447
  qe(e.eta_start),
6448
6448
  " - ",
6449
6449
  qe(e.eta_end)
6450
6450
  ] })
6451
6451
  ] })
6452
6452
  ] }),
6453
- e.completed_at && /* @__PURE__ */ A("div", { style: O.gridItem, children: [
6454
- /* @__PURE__ */ C("div", { style: O.gridLabel, children: "COMPLETED AT" }),
6455
- /* @__PURE__ */ A("div", { style: O.gridValueWithIcon, children: [
6453
+ e.completed_at && /* @__PURE__ */ A("div", { style: w.gridItem, children: [
6454
+ /* @__PURE__ */ C("div", { style: w.gridLabel, children: "COMPLETED AT" }),
6455
+ /* @__PURE__ */ A("div", { style: w.gridValueWithIcon, children: [
6456
6456
  /* @__PURE__ */ C(gr, {}),
6457
6457
  " ",
6458
- /* @__PURE__ */ C("span", { style: O.direction, children: qe(e.completed_at) })
6458
+ /* @__PURE__ */ C("span", { style: w.direction, children: qe(e.completed_at) })
6459
6459
  ] })
6460
6460
  ] })
6461
6461
  ] }),
6462
- i && o && /* @__PURE__ */ C("div", { style: O.extraDataContainer, children: o(e) })
6462
+ i && o && /* @__PURE__ */ C("div", { style: w.extraDataContainer, children: o(e) })
6463
6463
  ]
6464
6464
  }
6465
6465
  );
@@ -6473,7 +6473,9 @@ const pr = {
6473
6473
  renderStopActions: s,
6474
6474
  renderOrderExtraData: c
6475
6475
  }) => {
6476
- const a = e.status ? je(e.status) : e.orders.every((f) => je(f.status)), [d, p] = me(!a), l = e.status ? Ut(e.status) : a ? "Completed" : "Pending", u = !o || i || a;
6476
+ const a = e.status ? je(e.status) : e.orders.every((f) => je(f.status)), [d, p] = me(
6477
+ !a && !!c
6478
+ ), l = e.status ? Ut(e.status) : a ? "Completed" : "Pending", u = !o || i || a;
6477
6479
  return /* @__PURE__ */ C(
6478
6480
  Xl,
6479
6481
  {
@@ -6487,26 +6489,26 @@ const pr = {
6487
6489
  {
6488
6490
  ref: f.innerRef,
6489
6491
  ...f.draggableProps,
6490
- style: { ...O.timelineItem, ...f.draggableProps.style },
6492
+ style: { ...w.timelineItem, ...f.draggableProps.style },
6491
6493
  children: [
6492
6494
  /* @__PURE__ */ C(
6493
6495
  "div",
6494
6496
  {
6495
6497
  style: {
6496
- ...O.bubble,
6497
- ...a ? O.bubbleCompleted : O.bubblePending
6498
+ ...w.bubble,
6499
+ ...a ? w.bubbleCompleted : w.bubblePending
6498
6500
  },
6499
6501
  children: t + 1
6500
6502
  }
6501
6503
  ),
6502
- /* @__PURE__ */ A("div", { style: O.card, children: [
6503
- /* @__PURE__ */ A("div", { style: O.cardHeader, children: [
6504
+ /* @__PURE__ */ A("div", { style: w.card, children: [
6505
+ /* @__PURE__ */ A("div", { style: w.cardHeader, children: [
6504
6506
  /* @__PURE__ */ A(
6505
6507
  "div",
6506
6508
  {
6507
6509
  style: { display: "flex", alignItems: "center", gap: "8px" },
6508
6510
  children: [
6509
- /* @__PURE__ */ A("span", { style: O.title, children: [
6511
+ /* @__PURE__ */ A("span", { style: w.title, children: [
6510
6512
  n,
6511
6513
  " #",
6512
6514
  e.sequence_rank
@@ -6514,7 +6516,7 @@ const pr = {
6514
6516
  /* @__PURE__ */ C(
6515
6517
  "span",
6516
6518
  {
6517
- style: a ? O.badgeCompleted : O.badgePending,
6519
+ style: a ? w.badgeCompleted : w.badgePending,
6518
6520
  children: l
6519
6521
  }
6520
6522
  ),
@@ -6535,9 +6537,8 @@ const pr = {
6535
6537
  "button",
6536
6538
  {
6537
6539
  onClick: () => {
6538
- a && p((m) => !m);
6540
+ a && c && p((m) => !m);
6539
6541
  },
6540
- style: O.expandButton,
6541
6542
  children: a && /* @__PURE__ */ C(Cd, {})
6542
6543
  }
6543
6544
  ),
@@ -6546,12 +6547,12 @@ const pr = {
6546
6547
  }
6547
6548
  )
6548
6549
  ] }),
6549
- d && /* @__PURE__ */ A(Lo, { children: [
6550
- /* @__PURE__ */ A("div", { style: O.customerName, children: [
6550
+ d && c && /* @__PURE__ */ A(Lo, { children: [
6551
+ /* @__PURE__ */ A("div", { style: w.customerName, children: [
6551
6552
  "Customer: ",
6552
6553
  (b = (h = e.orders[0]) == null ? void 0 : h.customer) == null ? void 0 : b.name
6553
6554
  ] }),
6554
- /* @__PURE__ */ C("div", { style: O.ordersList, children: e.orders.map((m, y) => /* @__PURE__ */ C(
6555
+ /* @__PURE__ */ C("div", { style: w.ordersList, children: e.orders.map((m, y) => /* @__PURE__ */ C(
6555
6556
  _d,
6556
6557
  {
6557
6558
  order: m,
@@ -6562,7 +6563,7 @@ const pr = {
6562
6563
  },
6563
6564
  m.id
6564
6565
  )) }),
6565
- s && /* @__PURE__ */ C("div", { style: O.actionsSlot, children: s(e) })
6566
+ s && /* @__PURE__ */ C("div", { style: w.actionsSlot, children: s(e) })
6566
6567
  ] })
6567
6568
  ] })
6568
6569
  ]
@@ -6603,14 +6604,14 @@ const pr = {
6603
6604
  };
6604
6605
  if (!e || !i.length) return /* @__PURE__ */ C("div", { children: "No Path Data" });
6605
6606
  const a = je(e.status);
6606
- return /* @__PURE__ */ C("div", { style: O.container, children: /* @__PURE__ */ C(Sl, { onDragEnd: c, children: /* @__PURE__ */ C(Nd, { droppableId: "path-list", children: (d) => /* @__PURE__ */ A(
6607
+ return /* @__PURE__ */ C("div", { style: w.container, children: /* @__PURE__ */ C(Sl, { onDragEnd: c, children: /* @__PURE__ */ C(Nd, { droppableId: "path-list", children: (d) => /* @__PURE__ */ A(
6607
6608
  "div",
6608
6609
  {
6609
6610
  ref: d.innerRef,
6610
6611
  ...d.droppableProps,
6611
- style: O.timelineWrapper,
6612
+ style: w.timelineWrapper,
6612
6613
  children: [
6613
- /* @__PURE__ */ C("div", { style: O.verticalLine }),
6614
+ /* @__PURE__ */ C("div", { style: w.verticalLine }),
6614
6615
  /* @__PURE__ */ C(
6615
6616
  "div",
6616
6617
  {
@@ -6639,7 +6640,7 @@ const pr = {
6639
6640
  ]
6640
6641
  }
6641
6642
  ) }) }) });
6642
- }, O = {
6643
+ }, w = {
6643
6644
  container: { fontFamily: "sans-serif", maxWidth: "800px", margin: "0 auto" },
6644
6645
  timelineWrapper: { position: "relative", padding: "20px 0" },
6645
6646
  verticalLine: {
package/dist/index.umd.js CHANGED
@@ -181,4 +181,4 @@ ${hn.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
- `)}],id=[function({props:t}){t.renderClone||(process.env.NODE_ENV!=="production"?f(!1,"Must provide a clone render function (renderClone) for virtual lists"):f())},function({getPlaceholderRef:t}){t()&&(process.env.NODE_ENV!=="production"?f(!1,"Expected virtual list to not have a placeholder"):f())}];function sd(e){Te(()=>{ln(e,rd),e.props.mode==="standard"&&ln(e,od),e.props.mode==="virtual"&&ln(e,id)})}class cd 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 ad=e=>{const t=D.useContext(Ke);t||(process.env.NODE_ENV!=="production"?f(!1,"Could not find app context"):f());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:g,snapshot:h,useClone:b,updateViewportMaxScroll:m,getContainerForClone:E}=e,y=x(()=>o.current,[]),S=x((L=null)=>{o.current=L},[]),I=x(()=>i.current,[]),N=x((L=null)=>{i.current=L},[]);sd({props:e,getDroppableRef:y,getPlaceholderRef:I});const C=x(()=>{r()&&m({maxScroll:Wr()})},[r,m]);Zl({droppableId:c,type:a,mode:d,direction:p,isDropDisabled:u,isCombineEnabled:g,ignoreContainerClipping:l,getDroppableRef:y});const A=w(()=>D.createElement(cd,{on:e.placeholder,shouldAnimate:e.shouldAnimatePlaceholder},({onClose:L,data:J,animate:fe})=>D.createElement(nd,{placeholder:J,onClose:L,innerRef:N,animate:fe,contextId:n,onTransitionEnd:C})),[n,C,e.placeholder,e.shouldAnimatePlaceholder,N]),T=w(()=>({innerRef:S,placeholder:A,droppableProps:{"data-rfd-droppable-id":c,"data-rfd-droppable-context-id":n}}),[n,c,A,S]),H=b?b.dragging.draggableId:null,V=w(()=>({droppableId:c,type:a,isUsingCloneFor:H}),[c,H,a]);function z(){if(!b)return null;const{dragging:L,render:J}=b,fe=D.createElement(bo,{draggableId:L.draggableId,index:L.source.index,isClone:!0,isEnabled:!0,shouldRespectForcePress:!1,canDragInteractiveElements:!0},(Z,rt)=>J(Z,rt,L));return it.createPortal(fe,E())}return D.createElement(nn.Provider,{value:V},s(T,h),z())};function ld(){return document.body||(process.env.NODE_ENV!=="production"?f(!1,"document.body is not ready"):f()),document.body}const xo={mode:"standard",type:"DEFAULT",direction:"vertical",isDropDisabled:!1,isCombineEnabled:!1,ignoreContainerClipping:!1,renderClone:null,getContainerForClone:ld},Io=e=>{let t={...e},n;for(n in xo)e[n]===void 0&&(t={...t,[n]:xo[n]});return t},dn=(e,t)=>e===t.droppable.type,Co=(e,t)=>t.draggables[e.draggable.id],dd=qn(()=>{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 h=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:h}}if(!s)return t;if(!a)return e;const g={isDraggingOver:c,draggingOverWith:l,draggingFromThisWith:null,isUsingPlaceholder:!0};return{placeholder:d.placeholder,shouldAnimatePlaceholder:!0,snapshot:g,useClone:null}});return(i,s)=>{const c=Io(s),a=c.droppableId,d=c.type,p=!c.isDropDisabled,l=c.renderClone;if(Be(i)){const u=i.critical;if(!dn(d,u))return t;const g=Co(u,i.dimensions),h=W(i.impact)===a;return r(a,p,h,h,g,l)}if(i.phase==="DROP_ANIMATING"){const u=i.completed;if(!dn(d,u.critical))return t;const g=Co(u.critical,i.dimensions);return r(a,p,mo(u.result)===a,W(u.impact)===a,g,l)}if(i.phase==="IDLE"&&i.completed&&!i.shouldFlush){const u=i.completed;if(!dn(d,u.critical))return t;const g=W(u.impact)===a,h=!!(u.impact.at&&u.impact.at.type==="COMBINE"),b=u.critical.droppable.id===a;return g?h?e:t:b?e:t}return t}},{updateViewportMaxScroll:cc},(e,t,n)=>({...Io(n),...e,...t}),{context:Xt,areStatePropsEqual:go})(ad),ud=()=>v.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:[v.jsx("path",{d:"M21 10c0 7-9 13-9 13s-9-6-9-13a9 9 0 0 1 18 0z"}),v.jsx("circle",{cx:"12",cy:"10",r:"3"})]}),So=()=>v.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:[v.jsx("circle",{cx:"12",cy:"12",r:"10"}),v.jsx("polyline",{points:"12 6 12 12 16 14"})]}),pd=()=>v.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:[v.jsx("line",{x1:"3",y1:"12",x2:"21",y2:"12"}),v.jsx("line",{x1:"3",y1:"6",x2:"21",y2:"6"}),v.jsx("line",{x1:"3",y1:"18",x2:"21",y2:"18"})]}),fd=()=>v.jsx("svg",{width:"25",height:"25",viewBox:"0 0 90 90",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:v.jsxs("g",{children:[v.jsx("polygon",{points:"37.95,64.44 23.78,50.27 30.85,43.2 37.95,50.3 59.15,29.1 66.22,36.17",fill:"#009E04"}),v.jsx("path",{d:"M45 90C20.187 90 0 69.813 0 45C0 20.187 20.187 0 45 0C69.813 0 90 20.187 90 45C90 69.813 69.813 90 45 90ZM45 10C25.701 10 10 25.701 10 45C10 64.299 25.701 80 45 80C64.299 80 80 64.299 80 45C80 25.701 64.299 10 45 10Z",fill:"#009E04",strokeLinecap:"round"})]})}),gd=()=>v.jsxs("svg",{width:"25",height:"25",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[v.jsx("polyline",{points:"15 3 21 3 21 9"}),v.jsx("polyline",{points:"9 21 3 21 3 15"}),v.jsx("line",{x1:"21",y1:"3",x2:"14",y2:"10"}),v.jsx("line",{x1:"3",y1:"21",x2:"10",y2:"14"})]}),md=()=>v.jsxs("svg",{width:"25",height:"25",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[v.jsx("polyline",{points:"4 14 10 14 10 20"}),v.jsx("polyline",{points:"20 10 14 10 14 4"}),v.jsx("line",{x1:"14",y1:"10",x2:"21",y2:"3"}),v.jsx("line",{x1:"3",y1:"21",x2:"10",y2:"14"})]}),tt=e=>{if(!e)return"--:--";const t=e.split("T")[1],[n,r]=t.split(":"),o=Number(n),i=o>=12?"PM":"AM";return`${o%12||12}:${r} ${i}`},un=e=>typeof e=="object"&&(e!=null&&e.name)?e.name:e,nt=e=>{var t;return e?typeof e=="string"?e.toLowerCase()==="completed":((t=e==null?void 0:e.code)==null?void 0:t.toLowerCase())==="completed":!1},hd=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},bd=({order:e,pathPeriod:t,isFirst:n,isDone:r,renderOrderExtraData:o})=>{var a,d,p,l,u,g;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 v.jsxs("div",{style:{...O.orderBlock,borderTop:n?"none":"1px solid #f3f4f6",backgroundColor:r?"#fafafa":"transparent"},children:[v.jsxs("div",{style:O.orderHeader,children:[v.jsxs("div",{style:O.gridItem,children:[v.jsxs("div",{style:O.gridLabel,children:["ORDER"," ",r&&v.jsx("span",{style:{color:"#16a34a",marginLeft:"4px"},children:"✓ DONE"})]}),v.jsxs("div",{style:O.gridValue,children:["#",e.order_id]})]}),o&&v.jsx("button",{onClick:()=>s(!i),style:O.expandButton,children:i?v.jsx(md,{}):v.jsx(gd,{})})]}),v.jsxs("div",{style:O.detailsGrid,children:[v.jsxs("div",{style:O.gridItem,children:[v.jsx("div",{style:O.gridLabel,children:"LOCATION"}),v.jsxs("div",{style:O.gridValueWithIcon,children:[v.jsx(ud,{}),v.jsx("a",{href:c,target:"_blank",rel:"noopener noreferrer",style:O.addressLink,children:((g=(u=e.customer)==null?void 0:u.address)==null?void 0:g.street_area)||"N/A"})]})]}),v.jsxs("div",{style:O.gridItem,children:[v.jsx("div",{style:O.gridLabel,children:"PERIOD"}),v.jsx("div",{style:O.gridValue,children:t})]}),v.jsxs("div",{style:O.gridItem,children:[v.jsx("div",{style:O.gridLabel,children:"TIME WINDOW"}),v.jsxs("div",{style:O.gridValueWithIcon,children:[v.jsx(So,{})," ",v.jsxs("span",{style:O.direction,children:[tt(e.eta_start)," - ",tt(e.eta_end)]})]})]}),e.completed_at&&v.jsxs("div",{style:O.gridItem,children:[v.jsx("div",{style:O.gridLabel,children:"COMPLETED AT"}),v.jsxs("div",{style:O.gridValueWithIcon,children:[v.jsx(So,{})," ",v.jsx("span",{style:O.direction,children:tt(e.completed_at)})]})]})]}),i&&o&&v.jsx("div",{style:O.extraDataContainer,children:o(e)})]})},vd=({stopGroup:e,index:t,pathType:n,pathPeriod:r,canEditPath:o,isPathCompleted:i,renderStopActions:s,renderOrderExtraData:c})=>{const a=e.status?nt(e.status):e.orders.every(g=>nt(g.status)),[d,p]=D.useState(!a),l=e.status?un(e.status):a?"Completed":"Pending",u=!o||i||a;return v.jsx(Gl,{draggableId:e.stop_id.toString(),index:t,isDragDisabled:u,children:g=>{var h,b;return v.jsxs("div",{ref:g.innerRef,...g.draggableProps,style:{...O.timelineItem,...g.draggableProps.style},children:[v.jsx("div",{style:{...O.bubble,...a?O.bubbleCompleted:O.bubblePending},children:t+1}),v.jsxs("div",{style:O.card,children:[v.jsxs("div",{style:O.cardHeader,children:[v.jsxs("div",{style:{display:"flex",alignItems:"center",gap:"8px"},children:[v.jsxs("span",{style:O.title,children:[n," #",e.sequence_rank]}),v.jsx("span",{style:a?O.badgeCompleted:O.badgePending,children:l}),e.completed_at&&v.jsxs("span",{style:{fontSize:"12px",color:"#6b7280"},children:["(",tt(e.completed_at),")"]})]}),v.jsxs("div",{style:{display:"flex",alignItems:"center",gap:"12px"},children:[v.jsx("button",{onClick:()=>{a&&p(m=>!m)},style:O.expandButton,children:a&&v.jsx(fd,{})}),!u&&v.jsx("div",{...g.dragHandleProps,children:v.jsx(pd,{})})]})]}),d&&v.jsxs(v.Fragment,{children:[v.jsxs("div",{style:O.customerName,children:["Customer: ",(b=(h=e.orders[0])==null?void 0:h.customer)==null?void 0:b.name]}),v.jsx("div",{style:O.ordersList,children:e.orders.map((m,E)=>v.jsx(bd,{order:m,pathPeriod:r,isFirst:E===0,isDone:nt(m.status),renderOrderExtraData:c},m.id))}),s&&v.jsx("div",{style:O.actionsSlot,children:s(e)})]})]})]})}})},yd=({path:e,onReorder:t,renderStopActions:n,renderOrderExtraData:r,canEditPath:o=!0})=>{const[i,s]=D.useState([]);D.useEffect(()=>{if(e)if(e.stops&&e.stops.length>0){const d=e.stops.map(p=>({stop_id:p.id,sequence_rank:p.sequence_rank,status:p.status,completed_at:p.completed_at,orders:(e.path_orders||[]).filter(l=>l.stop_id===p.id).sort((l,u)=>l.sequence_rank-u.sequence_rank)})).sort((p,l)=>p.sequence_rank-l.sequence_rank);s(d)}else e.path_orders&&s(hd(e.path_orders))},[e]);const c=d=>{if(!d.destination)return;const p=Array.from(i),[l]=p.splice(d.source.index,1);p.splice(d.destination.index,0,l),s(p),t&&t(e.id,p.map(u=>u.stop_id))};if(!e||!i.length)return v.jsx("div",{children:"No Path Data"});const a=nt(e.status);return v.jsx("div",{style:O.container,children:v.jsx(El,{onDragEnd:c,children:v.jsx(dd,{droppableId:"path-list",children:d=>v.jsxs("div",{ref:d.innerRef,...d.droppableProps,style:O.timelineWrapper,children:[v.jsx("div",{style:O.verticalLine}),v.jsx("div",{style:{display:"flex",flexDirection:"column",gap:"24px"},children:i.map((p,l)=>v.jsx(vd,{stopGroup:p,index:l,pathType:un(e.type),pathPeriod:un(e.period),canEditPath:o,isPathCompleted:a,renderStopActions:n,renderOrderExtraData:r},p.stop_id))}),d.placeholder]})})})})},O={container:{fontFamily:"sans-serif",maxWidth:"800px",margin:"0 auto"},timelineWrapper:{position:"relative",padding:"20px 0"},verticalLine:{position:"absolute",right:"19px",top:"40px",bottom:"40px",width:"2px",backgroundColor:"#f3f4f6"},direction:{direction:"ltr"},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)",position:"relative"},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",display:"flex",alignItems:"center",justifyContent:"center"},extraDataContainer:{marginTop:"12px",padding:"12px",borderTop:"1px dashed #e5e7eb",backgroundColor:"#fff",borderRadius:"4px"},actionsSlot:{marginTop:"16px"}};Q.LogisticsDashboard=yd,Object.defineProperty(Q,Symbol.toStringTag,{value:"Module"})});
184
+ `)}],id=[function({props:t}){t.renderClone||(process.env.NODE_ENV!=="production"?f(!1,"Must provide a clone render function (renderClone) for virtual lists"):f())},function({getPlaceholderRef:t}){t()&&(process.env.NODE_ENV!=="production"?f(!1,"Expected virtual list to not have a placeholder"):f())}];function sd(e){Te(()=>{ln(e,rd),e.props.mode==="standard"&&ln(e,od),e.props.mode==="virtual"&&ln(e,id)})}class cd 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 ad=e=>{const t=D.useContext(Ke);t||(process.env.NODE_ENV!=="production"?f(!1,"Could not find app context"):f());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:g,snapshot:h,useClone:b,updateViewportMaxScroll:m,getContainerForClone:E}=e,y=x(()=>o.current,[]),S=x((L=null)=>{o.current=L},[]),I=x(()=>i.current,[]),N=x((L=null)=>{i.current=L},[]);sd({props:e,getDroppableRef:y,getPlaceholderRef:I});const C=x(()=>{r()&&m({maxScroll:Wr()})},[r,m]);Zl({droppableId:c,type:a,mode:d,direction:p,isDropDisabled:u,isCombineEnabled:g,ignoreContainerClipping:l,getDroppableRef:y});const A=w(()=>D.createElement(cd,{on:e.placeholder,shouldAnimate:e.shouldAnimatePlaceholder},({onClose:L,data:J,animate:fe})=>D.createElement(nd,{placeholder:J,onClose:L,innerRef:N,animate:fe,contextId:n,onTransitionEnd:C})),[n,C,e.placeholder,e.shouldAnimatePlaceholder,N]),T=w(()=>({innerRef:S,placeholder:A,droppableProps:{"data-rfd-droppable-id":c,"data-rfd-droppable-context-id":n}}),[n,c,A,S]),H=b?b.dragging.draggableId:null,V=w(()=>({droppableId:c,type:a,isUsingCloneFor:H}),[c,H,a]);function z(){if(!b)return null;const{dragging:L,render:J}=b,fe=D.createElement(bo,{draggableId:L.draggableId,index:L.source.index,isClone:!0,isEnabled:!0,shouldRespectForcePress:!1,canDragInteractiveElements:!0},(Z,rt)=>J(Z,rt,L));return it.createPortal(fe,E())}return D.createElement(nn.Provider,{value:V},s(T,h),z())};function ld(){return document.body||(process.env.NODE_ENV!=="production"?f(!1,"document.body is not ready"):f()),document.body}const xo={mode:"standard",type:"DEFAULT",direction:"vertical",isDropDisabled:!1,isCombineEnabled:!1,ignoreContainerClipping:!1,renderClone:null,getContainerForClone:ld},Io=e=>{let t={...e},n;for(n in xo)e[n]===void 0&&(t={...t,[n]:xo[n]});return t},dn=(e,t)=>e===t.droppable.type,Co=(e,t)=>t.draggables[e.draggable.id],dd=qn(()=>{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 h=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:h}}if(!s)return t;if(!a)return e;const g={isDraggingOver:c,draggingOverWith:l,draggingFromThisWith:null,isUsingPlaceholder:!0};return{placeholder:d.placeholder,shouldAnimatePlaceholder:!0,snapshot:g,useClone:null}});return(i,s)=>{const c=Io(s),a=c.droppableId,d=c.type,p=!c.isDropDisabled,l=c.renderClone;if(Be(i)){const u=i.critical;if(!dn(d,u))return t;const g=Co(u,i.dimensions),h=W(i.impact)===a;return r(a,p,h,h,g,l)}if(i.phase==="DROP_ANIMATING"){const u=i.completed;if(!dn(d,u.critical))return t;const g=Co(u.critical,i.dimensions);return r(a,p,mo(u.result)===a,W(u.impact)===a,g,l)}if(i.phase==="IDLE"&&i.completed&&!i.shouldFlush){const u=i.completed;if(!dn(d,u.critical))return t;const g=W(u.impact)===a,h=!!(u.impact.at&&u.impact.at.type==="COMBINE"),b=u.critical.droppable.id===a;return g?h?e:t:b?e:t}return t}},{updateViewportMaxScroll:cc},(e,t,n)=>({...Io(n),...e,...t}),{context:Xt,areStatePropsEqual:go})(ad),ud=()=>v.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:[v.jsx("path",{d:"M21 10c0 7-9 13-9 13s-9-6-9-13a9 9 0 0 1 18 0z"}),v.jsx("circle",{cx:"12",cy:"10",r:"3"})]}),So=()=>v.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:[v.jsx("circle",{cx:"12",cy:"12",r:"10"}),v.jsx("polyline",{points:"12 6 12 12 16 14"})]}),pd=()=>v.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:[v.jsx("line",{x1:"3",y1:"12",x2:"21",y2:"12"}),v.jsx("line",{x1:"3",y1:"6",x2:"21",y2:"6"}),v.jsx("line",{x1:"3",y1:"18",x2:"21",y2:"18"})]}),fd=()=>v.jsx("svg",{width:"25",height:"25",viewBox:"0 0 90 90",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:v.jsxs("g",{children:[v.jsx("polygon",{points:"37.95,64.44 23.78,50.27 30.85,43.2 37.95,50.3 59.15,29.1 66.22,36.17",fill:"#009E04"}),v.jsx("path",{d:"M45 90C20.187 90 0 69.813 0 45C0 20.187 20.187 0 45 0C69.813 0 90 20.187 90 45C90 69.813 69.813 90 45 90ZM45 10C25.701 10 10 25.701 10 45C10 64.299 25.701 80 45 80C64.299 80 80 64.299 80 45C80 25.701 64.299 10 45 10Z",fill:"#009E04",strokeLinecap:"round"})]})}),gd=()=>v.jsxs("svg",{width:"25",height:"25",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[v.jsx("polyline",{points:"15 3 21 3 21 9"}),v.jsx("polyline",{points:"9 21 3 21 3 15"}),v.jsx("line",{x1:"21",y1:"3",x2:"14",y2:"10"}),v.jsx("line",{x1:"3",y1:"21",x2:"10",y2:"14"})]}),md=()=>v.jsxs("svg",{width:"25",height:"25",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[v.jsx("polyline",{points:"4 14 10 14 10 20"}),v.jsx("polyline",{points:"20 10 14 10 14 4"}),v.jsx("line",{x1:"14",y1:"10",x2:"21",y2:"3"}),v.jsx("line",{x1:"3",y1:"21",x2:"10",y2:"14"})]}),tt=e=>{if(!e)return"--:--";const t=e.split("T")[1],[n,r]=t.split(":"),o=Number(n),i=o>=12?"PM":"AM";return`${o%12||12}:${r} ${i}`},un=e=>typeof e=="object"&&(e!=null&&e.name)?e.name:e,nt=e=>{var t;return e?typeof e=="string"?e.toLowerCase()==="completed":((t=e==null?void 0:e.code)==null?void 0:t.toLowerCase())==="completed":!1},hd=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},bd=({order:e,pathPeriod:t,isFirst:n,isDone:r,renderOrderExtraData:o})=>{var a,d,p,l,u,g;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 v.jsxs("div",{style:{...O.orderBlock,borderTop:n?"none":"1px solid #f3f4f6",backgroundColor:r?"#fafafa":"transparent"},children:[v.jsxs("div",{style:O.orderHeader,children:[v.jsxs("div",{style:O.gridItem,children:[v.jsxs("div",{style:O.gridLabel,children:["ORDER"," ",r&&v.jsx("span",{style:{color:"#16a34a",marginLeft:"4px"},children:"✓ DONE"})]}),v.jsxs("div",{style:O.gridValue,children:["#",e.order_id]})]}),o&&v.jsx("button",{onClick:()=>s(!i),style:O.expandButton,children:i?v.jsx(md,{}):v.jsx(gd,{})})]}),v.jsxs("div",{style:O.detailsGrid,children:[v.jsxs("div",{style:O.gridItem,children:[v.jsx("div",{style:O.gridLabel,children:"LOCATION"}),v.jsxs("div",{style:O.gridValueWithIcon,children:[v.jsx(ud,{}),v.jsx("a",{href:c,target:"_blank",rel:"noopener noreferrer",style:O.addressLink,children:((g=(u=e.customer)==null?void 0:u.address)==null?void 0:g.street_area)||"N/A"})]})]}),v.jsxs("div",{style:O.gridItem,children:[v.jsx("div",{style:O.gridLabel,children:"PERIOD"}),v.jsx("div",{style:O.gridValue,children:t})]}),v.jsxs("div",{style:O.gridItem,children:[v.jsx("div",{style:O.gridLabel,children:"TIME WINDOW"}),v.jsxs("div",{style:O.gridValueWithIcon,children:[v.jsx(So,{})," ",v.jsxs("span",{style:O.direction,children:[tt(e.eta_start)," - ",tt(e.eta_end)]})]})]}),e.completed_at&&v.jsxs("div",{style:O.gridItem,children:[v.jsx("div",{style:O.gridLabel,children:"COMPLETED AT"}),v.jsxs("div",{style:O.gridValueWithIcon,children:[v.jsx(So,{})," ",v.jsx("span",{style:O.direction,children:tt(e.completed_at)})]})]})]}),i&&o&&v.jsx("div",{style:O.extraDataContainer,children:o(e)})]})},vd=({stopGroup:e,index:t,pathType:n,pathPeriod:r,canEditPath:o,isPathCompleted:i,renderStopActions:s,renderOrderExtraData:c})=>{const a=e.status?nt(e.status):e.orders.every(g=>nt(g.status)),[d,p]=D.useState(!a&&!!c),l=e.status?un(e.status):a?"Completed":"Pending",u=!o||i||a;return v.jsx(Gl,{draggableId:e.stop_id.toString(),index:t,isDragDisabled:u,children:g=>{var h,b;return v.jsxs("div",{ref:g.innerRef,...g.draggableProps,style:{...O.timelineItem,...g.draggableProps.style},children:[v.jsx("div",{style:{...O.bubble,...a?O.bubbleCompleted:O.bubblePending},children:t+1}),v.jsxs("div",{style:O.card,children:[v.jsxs("div",{style:O.cardHeader,children:[v.jsxs("div",{style:{display:"flex",alignItems:"center",gap:"8px"},children:[v.jsxs("span",{style:O.title,children:[n," #",e.sequence_rank]}),v.jsx("span",{style:a?O.badgeCompleted:O.badgePending,children:l}),e.completed_at&&v.jsxs("span",{style:{fontSize:"12px",color:"#6b7280"},children:["(",tt(e.completed_at),")"]})]}),v.jsxs("div",{style:{display:"flex",alignItems:"center",gap:"12px"},children:[v.jsx("button",{onClick:()=>{a&&c&&p(m=>!m)},children:a&&v.jsx(fd,{})}),!u&&v.jsx("div",{...g.dragHandleProps,children:v.jsx(pd,{})})]})]}),d&&c&&v.jsxs(v.Fragment,{children:[v.jsxs("div",{style:O.customerName,children:["Customer: ",(b=(h=e.orders[0])==null?void 0:h.customer)==null?void 0:b.name]}),v.jsx("div",{style:O.ordersList,children:e.orders.map((m,E)=>v.jsx(bd,{order:m,pathPeriod:r,isFirst:E===0,isDone:nt(m.status),renderOrderExtraData:c},m.id))}),s&&v.jsx("div",{style:O.actionsSlot,children:s(e)})]})]})]})}})},yd=({path:e,onReorder:t,renderStopActions:n,renderOrderExtraData:r,canEditPath:o=!0})=>{const[i,s]=D.useState([]);D.useEffect(()=>{if(e)if(e.stops&&e.stops.length>0){const d=e.stops.map(p=>({stop_id:p.id,sequence_rank:p.sequence_rank,status:p.status,completed_at:p.completed_at,orders:(e.path_orders||[]).filter(l=>l.stop_id===p.id).sort((l,u)=>l.sequence_rank-u.sequence_rank)})).sort((p,l)=>p.sequence_rank-l.sequence_rank);s(d)}else e.path_orders&&s(hd(e.path_orders))},[e]);const c=d=>{if(!d.destination)return;const p=Array.from(i),[l]=p.splice(d.source.index,1);p.splice(d.destination.index,0,l),s(p),t&&t(e.id,p.map(u=>u.stop_id))};if(!e||!i.length)return v.jsx("div",{children:"No Path Data"});const a=nt(e.status);return v.jsx("div",{style:O.container,children:v.jsx(El,{onDragEnd:c,children:v.jsx(dd,{droppableId:"path-list",children:d=>v.jsxs("div",{ref:d.innerRef,...d.droppableProps,style:O.timelineWrapper,children:[v.jsx("div",{style:O.verticalLine}),v.jsx("div",{style:{display:"flex",flexDirection:"column",gap:"24px"},children:i.map((p,l)=>v.jsx(vd,{stopGroup:p,index:l,pathType:un(e.type),pathPeriod:un(e.period),canEditPath:o,isPathCompleted:a,renderStopActions:n,renderOrderExtraData:r},p.stop_id))}),d.placeholder]})})})})},O={container:{fontFamily:"sans-serif",maxWidth:"800px",margin:"0 auto"},timelineWrapper:{position:"relative",padding:"20px 0"},verticalLine:{position:"absolute",right:"19px",top:"40px",bottom:"40px",width:"2px",backgroundColor:"#f3f4f6"},direction:{direction:"ltr"},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)",position:"relative"},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",display:"flex",alignItems:"center",justifyContent:"center"},extraDataContainer:{marginTop:"12px",padding:"12px",borderTop:"1px dashed #e5e7eb",backgroundColor:"#fff",borderRadius:"4px"},actionsSlot:{marginTop:"16px"}};Q.LogisticsDashboard=yd,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.1.7",
3
+ "version": "0.1.8",
4
4
  "type": "module",
5
5
  "files": [
6
6
  "dist"