@layerfi/components 0.1.128-alpha → 0.1.128-alpha.1

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.
@@ -175,6 +175,10 @@ let Direction = /* @__PURE__ */ function(Direction$1) {
175
175
  Direction$1["DEBIT"] = "DEBIT";
176
176
  return Direction$1;
177
177
  }({});
178
+ const ApiEnumErrorType = {
179
+ SpecifiedIdNotFound: "SpecifiedIdNotFound",
180
+ SpecifiedBadRequest: "SpecifiedBadRequest"
181
+ };
178
182
  var APIError = class APIError extends Error {
179
183
  constructor(message, code, messages) {
180
184
  super(message);
@@ -221,7 +225,7 @@ const getIntlLocale = (locale) => {
221
225
  return isSupportedLocale(locale) ? locale : DEFAULT_LOCALE;
222
226
  };
223
227
  const name = "@layerfi/components";
224
- const version$1 = "0.1.128-alpha";
228
+ const version$1 = "0.1.128-alpha.1";
225
229
  const description = "Layer React Components";
226
230
  const main = "dist/cjs/index.cjs";
227
231
  const module$1 = "dist/esm/index.mjs";
@@ -1990,6 +1994,7 @@ const error$23 = {
1990
1994
  "archive_service": "Could not archive this service. Please try again.",
1991
1995
  "cancel_timer": "Failed to cancel timer. Please try again.",
1992
1996
  "complete_timer": "Failed to complete timer. Please try again.",
1997
+ "complete_timer_stale": "This timer was already completed or cancelled. Reload the page.",
1993
1998
  "create_service": "Failed to create service. Please try again.",
1994
1999
  "delete_entry": "Failed to delete time entry. Please check your connection and try again.",
1995
2000
  "load_active_timer": "Failed to load active timer. Please check your connection and try again.",
@@ -1998,6 +2003,7 @@ const error$23 = {
1998
2003
  "load_services": "Failed to load services.",
1999
2004
  "load_summary": "Failed to load time tracking summary",
2000
2005
  "start_timer": "Failed to start timer. Please try again.",
2006
+ "start_timer_already_active": "A timer is already running. Please reload the page.",
2001
2007
  "unarchive_service": "Could not restore this service. Please try again.",
2002
2008
  "update_service": "Could not save this service. Please try again.",
2003
2009
  "update_timer": "Failed to update timer. Please try again."
@@ -2020,7 +2026,7 @@ const label$30 = {
2020
2026
  "invoiced": "Invoiced",
2021
2027
  "less_than_one_minute": "< 1 min",
2022
2028
  "memo": "Memo",
2023
- "no_activity_breakdown": "No activity breakdown available for this period.",
2029
+ "no_activity_breakdown": "No activity during this period",
2024
2030
  "no_services": "No services available",
2025
2031
  "other": "Other",
2026
2032
  "select_customer": "Select a customer (optional)",
@@ -2028,7 +2034,8 @@ const label$30 = {
2028
2034
  "select_service": "Select a service",
2029
2035
  "service": "Service",
2030
2036
  "time_entries": "Time Entries",
2031
- "time_tracking": "Time Tracking"
2037
+ "time_tracking": "Time Tracking",
2038
+ "zero_minutes": "0 min"
2032
2039
  };
2033
2040
  const prompt$15 = {
2034
2041
  "delete_entry": "Delete this time entry?",
@@ -2041,6 +2048,7 @@ const services$1 = {
2041
2048
  "archive_confirm_description": "This service will be removed from your active list. Time entries that used it are unchanged.",
2042
2049
  "archive_confirm_title": "Archive this service?",
2043
2050
  "archived": "Archived",
2051
+ "archived_service": "{{name}} (Archived)",
2044
2052
  "cancel": "Cancel",
2045
2053
  "create_service_input_value": "Create service \"{{inputValue}}\"",
2046
2054
  "hourly_rate_optional": "Default hourly rate (optional)",
@@ -3551,6 +3559,7 @@ const error$4 = {
3551
3559
  "archive_service": "Impossible d'archiver ce service. Veuillez réessayer.",
3552
3560
  "cancel_timer": "Impossible d'annuler le minuteur. Veuillez réessayer.",
3553
3561
  "complete_timer": "Impossible de terminer le minuteur. Veuillez réessayer.",
3562
+ "complete_timer_stale": "",
3554
3563
  "create_service": "Impossible de créer le service. Veuillez réessayer.",
3555
3564
  "delete_entry": "Impossible de supprimer l'entrée de temps. Veuillez vérifier votre connexion et réessayer.",
3556
3565
  "load_active_timer": "Impossible de charger le minuteur actif. Veuillez vérifier votre connexion et réessayer.",
@@ -3559,6 +3568,7 @@ const error$4 = {
3559
3568
  "load_services": "Impossible de charger les services.",
3560
3569
  "load_summary": "Impossible de charger le sommaire du suivi du temps",
3561
3570
  "start_timer": "Impossible de démarrer le minuteur. Veuillez réessayer.",
3571
+ "start_timer_already_active": "",
3562
3572
  "unarchive_service": "Impossible de restaurer ce service. Veuillez réessayer.",
3563
3573
  "update_service": "Impossible d'enregistrer ce service. Veuillez réessayer.",
3564
3574
  "update_timer": "Impossible de mettre à jour le minuteur. Veuillez réessayer."
@@ -3581,7 +3591,7 @@ const label$5 = {
3581
3591
  "invoiced": "Facturé",
3582
3592
  "less_than_one_minute": "",
3583
3593
  "memo": "Note",
3584
- "no_activity_breakdown": "Aucune répartition des activités n'est disponible pour cette période.",
3594
+ "no_activity_breakdown": "",
3585
3595
  "no_services": "Aucun service disponible",
3586
3596
  "other": "Autre",
3587
3597
  "select_customer": "Sélectionner un client (facultatif)",
@@ -3589,7 +3599,8 @@ const label$5 = {
3589
3599
  "select_service": "Sélectionner un service",
3590
3600
  "service": "Service",
3591
3601
  "time_entries": "Entrées de temps",
3592
- "time_tracking": ""
3602
+ "time_tracking": "",
3603
+ "zero_minutes": ""
3593
3604
  };
3594
3605
  const prompt$3 = {
3595
3606
  "delete_entry": "Supprimer cette entrée de temps?",
@@ -3602,6 +3613,7 @@ const services = {
3602
3613
  "archive_confirm_description": "Ce service sera retiré de votre liste active. Les entrées de temps qui l'utilisaient ne sont pas modifiées.",
3603
3614
  "archive_confirm_title": "Archiver ce service?",
3604
3615
  "archived": "Archivés",
3616
+ "archived_service": "",
3605
3617
  "cancel": "Annuler",
3606
3618
  "create_service_input_value": "",
3607
3619
  "hourly_rate_optional": "Taux horaire par défaut (facultatif)",
@@ -3962,11 +3974,11 @@ function _objectWithoutProperties(e, t) {
3962
3974
  }
3963
3975
  return i;
3964
3976
  }
3965
- var _excluded$113 = ["_locale"];
3977
+ var _excluded$115 = ["_locale"];
3966
3978
  var createLocalizedFetcher = (fetcher) => {
3967
3979
  if (!fetcher) return null;
3968
3980
  return (_ref, ...rest) => {
3969
- let { _locale: _locale$1 } = _ref, key = _objectWithoutProperties(_ref, _excluded$113);
3981
+ let { _locale: _locale$1 } = _ref, key = _objectWithoutProperties(_ref, _excluded$115);
3970
3982
  setLocaleHeader(_locale$1);
3971
3983
  return fetcher(key, ...rest);
3972
3984
  };
@@ -3981,7 +3993,7 @@ const useLocalizedKey = () => {
3981
3993
  return _objectSpread2(_objectSpread2({}, key), {}, { _locale: locale });
3982
3994
  };
3983
3995
  };
3984
- var _excluded$112 = ["trigger"];
3996
+ var _excluded$114 = ["trigger"];
3985
3997
  var UNLINK_BANK_ACCOUNT_TAG_KEY = "#unlink-bank-account";
3986
3998
  var unlinkBankAccount = del(({ businessId, bankAccountId }) => `/v1/businesses/${businessId}/bank-accounts/${bankAccountId}`);
3987
3999
  function buildKey$87({ access_token: accessToken, apiUrl, businessId }) {
@@ -4004,7 +4016,7 @@ function useUnlinkBankAccount() {
4004
4016
  })), ({ accessToken, apiUrl: apiUrl$1, businessId: businessId$1 }, { arg: bankAccountId }) => unlinkBankAccount(apiUrl$1, accessToken, { params: {
4005
4017
  businessId: businessId$1,
4006
4018
  bankAccountId
4007
- } }), { revalidate: false }), { trigger: rawTrigger } = _useSWRMutation, rest = _objectWithoutProperties(_useSWRMutation, _excluded$112);
4019
+ } }), { revalidate: false }), { trigger: rawTrigger } = _useSWRMutation, rest = _objectWithoutProperties(_useSWRMutation, _excluded$114);
4008
4020
  const triggerRef = (0, react.useRef)(rawTrigger);
4009
4021
  triggerRef.current = rawTrigger;
4010
4022
  return _objectSpread2({ trigger: (0, react.useCallback)((bankAccountId) => triggerRef.current(bankAccountId), []) }, rest);
@@ -7357,14 +7369,14 @@ const useBankTransactionsFilters = ({ scope, monthlyView, applyGlobalDateRange,
7357
7369
  dateFilterMode
7358
7370
  ]);
7359
7371
  };
7360
- var _excluded$111 = ["size"];
7372
+ var _excluded$113 = ["size"];
7361
7373
  var Bell = (_ref) => {
7362
7374
  let { size = 18 } = _ref;
7363
7375
  return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("svg", _objectSpread2(_objectSpread2({
7364
7376
  xmlns: "http://www.w3.org/2000/svg",
7365
7377
  viewBox: "0 0 18 18",
7366
7378
  fill: "none"
7367
- }, _objectWithoutProperties(_ref, _excluded$111)), {}, {
7379
+ }, _objectWithoutProperties(_ref, _excluded$113)), {}, {
7368
7380
  width: size,
7369
7381
  height: size,
7370
7382
  children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("path", {
@@ -7381,14 +7393,14 @@ var Bell = (_ref) => {
7381
7393
  }));
7382
7394
  };
7383
7395
  var Bell_default = Bell;
7384
- var _excluded$110 = ["size"];
7396
+ var _excluded$112 = ["size"];
7385
7397
  var CreditCard = (_ref) => {
7386
7398
  let { size = 12 } = _ref;
7387
7399
  return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("svg", _objectSpread2(_objectSpread2({
7388
7400
  xmlns: "http://www.w3.org/2000/svg",
7389
7401
  viewBox: "0 0 12 12",
7390
7402
  fill: "none"
7391
- }, _objectWithoutProperties(_ref, _excluded$110)), {}, {
7403
+ }, _objectWithoutProperties(_ref, _excluded$112)), {}, {
7392
7404
  width: size,
7393
7405
  height: size,
7394
7406
  children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("path", {
@@ -7405,14 +7417,14 @@ var CreditCard = (_ref) => {
7405
7417
  }));
7406
7418
  };
7407
7419
  var CreditCard_default = CreditCard;
7408
- var _excluded$109 = ["size"];
7420
+ var _excluded$111 = ["size"];
7409
7421
  var Folder = (_ref) => {
7410
7422
  let { size = 12 } = _ref;
7411
7423
  return /* @__PURE__ */ (0, react_jsx_runtime.jsx)("svg", _objectSpread2(_objectSpread2({
7412
7424
  xmlns: "http://www.w3.org/2000/svg",
7413
7425
  viewBox: "0 0 12 12",
7414
7426
  fill: "none"
7415
- }, _objectWithoutProperties(_ref, _excluded$109)), {}, {
7427
+ }, _objectWithoutProperties(_ref, _excluded$111)), {}, {
7416
7428
  width: size,
7417
7429
  height: size,
7418
7430
  children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)("path", {
@@ -7424,14 +7436,14 @@ var Folder = (_ref) => {
7424
7436
  }));
7425
7437
  };
7426
7438
  var Folder_default = Folder;
7427
- var _excluded$108 = ["size"];
7428
- var Link$1 = (_ref) => {
7439
+ var _excluded$110 = ["size"];
7440
+ var Link$2 = (_ref) => {
7429
7441
  let { size = 18 } = _ref;
7430
7442
  return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("svg", _objectSpread2(_objectSpread2({
7431
7443
  xmlns: "http://www.w3.org/2000/svg",
7432
7444
  viewBox: "0 0 18 18",
7433
7445
  fill: "none"
7434
- }, _objectWithoutProperties(_ref, _excluded$108)), {}, {
7446
+ }, _objectWithoutProperties(_ref, _excluded$110)), {}, {
7435
7447
  width: size,
7436
7448
  height: size,
7437
7449
  children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("path", {
@@ -7447,7 +7459,7 @@ var Link$1 = (_ref) => {
7447
7459
  })]
7448
7460
  }));
7449
7461
  };
7450
- var Link_default = Link$1;
7462
+ var Link_default = Link$2;
7451
7463
  var PlaidIcon = () => {
7452
7464
  return /* @__PURE__ */ (0, react_jsx_runtime.jsx)("img", {
7453
7465
  src: "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAhCAYAAAC4JqlRAAAACXBIWXMAAAsTAAALEwEAmpwYAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAQDSURBVHgB7VbpK65bFP+9XJTMJGPGDIVIpjIln2S4SIr4AxSOIZFwPxA+HUf5rhAZb3xQylCUizKLD+I1ROYpZcq+e63u+9S5t573XN1z3nvr/or97GVba+3fmrYGf8DBwSHx/f09VH7a4DvD2Nj414uLi1X61tAvOzu7z0KIT/iB0Gg0bdfX12UaafyTNP4ZBoB0okxja2u7L789YRhoyQEBA8IIBsZ/0wF7e3tYWVkpe2tra8hQ4iP46VsOWVpaIiYmBrGxsYiKikJERASWl5eRnZ0NU1NT9PX1ISwsDCsrK5iZmcHi4iKmpqbw+vqqV7feJCwsLERbW5uyX19fx/7+PjIyMrC5uQkTExP4+/tjZGQEvr6+CA4OVs6Wlpaiq6sLqiAH1H4GBgaEDqmpqYq8qalJkdfX1yvyrKwscXd3x/L+/n6hT79eBnZ3d3F6egobGxtInUhPT8f9/T3fWHfb7e1tpKSk8JmxsTGWPT4+wsnJCV5eXqoEqCYhUSo7JXp6epCWlkadC5OTkxgaGmLjFRUVKC8vR2BgIEZHR9k4OUlnJXOcnO7u7vhwCKqqqpjKxMRE3tOqQ3Nzs3KutbWVZU9PT0IywbKEhASW1dbWqoZAlQHKbEJISAiXXnt7O+/Pz8+Rn58PDw8PeHp6Ii8vDzLuMDMzQ0tLC988Li6Oz/r5+X2cARcXF7G1tcU3OTk54bWyslJIx8Tx8bGQ00wcHR2Jw8NDERoaKsrKyviMzBleZcUIZ2dnVQb0VkF0dLR4fn5mhbLeFXlBQYESDsnAX6rm5eWF/1efflUHXF1d+RY6BuSDRRQXF/NtdTe/ubnhb5JVV1d/xYCsDuHm5vZxB2QTYUU1NTVCxprDQU6QUR3tFA5y4OzsTKHdx8dHyOrgfW9v78eTcGdnh9e5uTlOMukI3t7euN47OztxcHAArVaL7u5uODo68lnJEGRuYHWVX1zcntWgOguothsbG5GcnIyHhwd0dHRA3hS3t7eoq6vD5eUlzM3NIalnQ9R0qPVSs4qPj2cd09PTaib0zwLq+9QJLSwseE/KZQgwPj6OgIAAlm1sbPBsIGbIaWpGxJisIm5matA7jicmJtgQ1XZJSQlTTsplbJUzw8PDzAr9raioiLtfUFAQT0R90DuOZ2dnkZOTwyOZDK2trWFvbw+ZmZk8AygnGhoaIBMS3t7eX01Dyh19+KY3IY3cpKQkREZGQrZjZfbn5ubyzB8cHER4eDiWlpawsLDAhufn5zlv/hEH/gzdZKRQEIgdephcXV3h7+L/V/G/wgEtDAetkUymLzAQyLaxfMX8JtspPeqj8QMhn3dfZEf9RaMTyNIKNTIy+hnfGXKa3splVXbOGdr/DtMw0L76HoUPAAAAAElFTkSuQmCC",
@@ -7455,14 +7467,14 @@ var PlaidIcon = () => {
7455
7467
  });
7456
7468
  };
7457
7469
  var PlaidIcon_default = PlaidIcon;
7458
- var _excluded$107 = ["size"];
7470
+ var _excluded$109 = ["size"];
7459
7471
  var Sunrise = (_ref) => {
7460
7472
  let { size = 12 } = _ref;
7461
7473
  return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("svg", _objectSpread2(_objectSpread2({
7462
7474
  xmlns: "http://www.w3.org/2000/svg",
7463
7475
  viewBox: "0 0 12 12",
7464
7476
  fill: "none"
7465
- }, _objectWithoutProperties(_ref, _excluded$107)), {}, {
7477
+ }, _objectWithoutProperties(_ref, _excluded$109)), {}, {
7466
7478
  width: size,
7467
7479
  height: size,
7468
7480
  children: [
@@ -7539,7 +7551,7 @@ var ChevronRight$2 = (_ref) => {
7539
7551
  }) }));
7540
7552
  };
7541
7553
  var ChevronRight_default = ChevronRight$2;
7542
- var _excluded$106 = [
7554
+ var _excluded$108 = [
7543
7555
  "className",
7544
7556
  "children",
7545
7557
  "icon",
@@ -7551,7 +7563,7 @@ var _excluded$106 = [
7551
7563
  "download"
7552
7564
  ];
7553
7565
  const IconButton = (_ref) => {
7554
- let { className, children: _children, icon, active, withBorder = false, href, target, rel, download } = _ref, props = _objectWithoutProperties(_ref, _excluded$106);
7566
+ let { className, children: _children, icon, active, withBorder = false, href, target, rel, download } = _ref, props = _objectWithoutProperties(_ref, _excluded$108);
7555
7567
  const baseClassName$1 = (0, classnames.default)("Layer__icon-btn", `Layer__icon-btn--${active ? "active" : "inactive"}`, withBorder && "Layer__icon-btn--border", className);
7556
7568
  if (href) return /* @__PURE__ */ (0, react_jsx_runtime.jsx)("a", {
7557
7569
  href,
@@ -7635,17 +7647,17 @@ const useTooltip = ({ initialOpen = false, placement = "top", open: controlledOp
7635
7647
  data
7636
7648
  ]);
7637
7649
  };
7638
- var _excluded$105 = ["children"], _excluded2$14 = ["children", "asChild"], _excluded3$6 = ["className", "width"];
7650
+ var _excluded$107 = ["children"], _excluded2$15 = ["children", "asChild"], _excluded3$6 = ["className", "width"];
7639
7651
  const DeprecatedTooltip = (_ref) => {
7640
7652
  let { children } = _ref;
7641
- const tooltip = useTooltip(_objectWithoutProperties(_ref, _excluded$105));
7653
+ const tooltip = useTooltip(_objectWithoutProperties(_ref, _excluded$107));
7642
7654
  return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(TooltipContext.Provider, {
7643
7655
  value: tooltip,
7644
7656
  children
7645
7657
  });
7646
7658
  };
7647
7659
  const DeprecatedTooltipTrigger = (0, react.forwardRef)(function TooltipTrigger$1(_ref2, propRef) {
7648
- let { children, asChild = false } = _ref2, props = _objectWithoutProperties(_ref2, _excluded2$14);
7660
+ let { children, asChild = false } = _ref2, props = _objectWithoutProperties(_ref2, _excluded2$15);
7649
7661
  const context = useTooltipContext();
7650
7662
  const childrenRef = (0, react.isValidElement)(children) && "ref" in children ? children.ref : null;
7651
7663
  const ref = (0, __floating_ui_react.useMergeRefs)([
@@ -7676,7 +7688,7 @@ const DeprecatedTooltipContent = (0, react.forwardRef)(function TooltipContent$1
7676
7688
  children: props.children
7677
7689
  }) })) });
7678
7690
  });
7679
- var _excluded$104 = [
7691
+ var _excluded$106 = [
7680
7692
  "as",
7681
7693
  "className",
7682
7694
  "children",
@@ -7687,7 +7699,7 @@ var _excluded$104 = [
7687
7699
  "status",
7688
7700
  "pb",
7689
7701
  "invertColor"
7690
- ], _excluded2$13 = [
7702
+ ], _excluded2$14 = [
7691
7703
  "as",
7692
7704
  "className",
7693
7705
  "children",
@@ -7713,7 +7725,7 @@ let TextUseTooltip = /* @__PURE__ */ function(TextUseTooltip$1) {
7713
7725
  return TextUseTooltip$1;
7714
7726
  }({});
7715
7727
  const Text = (_ref) => {
7716
- let { as: Component$1 = "p", className, children, size = TextSize.md, weight = TextWeight.normal, withDeprecatedTooltip: withTooltip, ellipsis, status, pb, invertColor } = _ref, props = _objectWithoutProperties(_ref, _excluded$104);
7728
+ let { as: Component$1 = "p", className, children, size = TextSize.md, weight = TextWeight.normal, withDeprecatedTooltip: withTooltip, ellipsis, status, pb, invertColor } = _ref, props = _objectWithoutProperties(_ref, _excluded$106);
7717
7729
  const dataProperties = toDataProperties({
7718
7730
  status,
7719
7731
  ellipsis,
@@ -7734,7 +7746,7 @@ const Text = (_ref) => {
7734
7746
  }));
7735
7747
  };
7736
7748
  const DeprecatedTextWithTooltip = (_ref2) => {
7737
- let { as: Component$1 = "p", className, children, size: _size = TextSize.md, weight: _weight = TextWeight.normal, withDeprecatedTooltip: _withTooltip = TextUseTooltip.whenTruncated, tooltipOptions } = _ref2, props = _objectWithoutProperties(_ref2, _excluded2$13);
7749
+ let { as: Component$1 = "p", className, children, size: _size = TextSize.md, weight: _weight = TextWeight.normal, withDeprecatedTooltip: _withTooltip = TextUseTooltip.whenTruncated, tooltipOptions } = _ref2, props = _objectWithoutProperties(_ref2, _excluded2$14);
7738
7750
  const textElementRef = (0, react.useRef)();
7739
7751
  const compareSize = () => {
7740
7752
  if (textElementRef.current) setHover(textElementRef.current.children[0].scrollWidth > textElementRef.current.children[0].clientWidth);
@@ -7836,14 +7848,14 @@ const Badge = ({ icon, onClick, children, tooltip, size = BadgeSize.MEDIUM, vari
7836
7848
  });
7837
7849
  return content;
7838
7850
  };
7839
- var _excluded$103 = ["size"];
7851
+ var _excluded$105 = ["size"];
7840
7852
  var Loader$1 = (_ref) => {
7841
7853
  let { size = 18 } = _ref;
7842
7854
  return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("svg", _objectSpread2(_objectSpread2({
7843
7855
  xmlns: "http://www.w3.org/2000/svg",
7844
7856
  viewBox: "0 0 18 18",
7845
7857
  fill: "none"
7846
- }, _objectWithoutProperties(_ref, _excluded$103)), {}, {
7858
+ }, _objectWithoutProperties(_ref, _excluded$105)), {}, {
7847
7859
  width: size,
7848
7860
  height: size,
7849
7861
  children: [
@@ -7899,7 +7911,7 @@ var Loader$1 = (_ref) => {
7899
7911
  }));
7900
7912
  };
7901
7913
  var Loader_default = Loader$1;
7902
- var _excluded$102 = [
7914
+ var _excluded$104 = [
7903
7915
  "className",
7904
7916
  "children",
7905
7917
  "variant",
@@ -7919,7 +7931,7 @@ let ButtonVariant = /* @__PURE__ */ function(ButtonVariant$1) {
7919
7931
  return ButtonVariant$1;
7920
7932
  }({});
7921
7933
  const Button$1 = (_ref) => {
7922
- let { className, children, variant = ButtonVariant.primary, leftIcon, rightIcon, iconOnly, iconAsPrimary = false, justify = "center", fullWidth, isProcessing, tooltip } = _ref, props = _objectWithoutProperties(_ref, _excluded$102);
7934
+ let { className, children, variant = ButtonVariant.primary, leftIcon, rightIcon, iconOnly, iconAsPrimary = false, justify = "center", fullWidth, isProcessing, tooltip } = _ref, props = _objectWithoutProperties(_ref, _excluded$104);
7923
7935
  const buttonRef = (0, react.useRef)(null);
7924
7936
  let justifyContent = "center";
7925
7937
  if (justify) justifyContent = justify;
@@ -7966,14 +7978,14 @@ const Button$1 = (_ref) => {
7966
7978
  }) : content
7967
7979
  }));
7968
7980
  };
7969
- var _excluded$101 = ["size"];
7981
+ var _excluded$103 = ["size"];
7970
7982
  var AlertOctagon = (_ref) => {
7971
7983
  let { size = 18 } = _ref;
7972
7984
  return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("svg", _objectSpread2(_objectSpread2({
7973
7985
  viewBox: "0 0 18 18",
7974
7986
  fill: "none",
7975
7987
  xmlns: "http://www.w3.org/2000/svg"
7976
- }, _objectWithoutProperties(_ref, _excluded$101)), {}, {
7988
+ }, _objectWithoutProperties(_ref, _excluded$103)), {}, {
7977
7989
  width: size,
7978
7990
  height: size,
7979
7991
  children: [
@@ -7999,14 +8011,14 @@ var AlertOctagon = (_ref) => {
7999
8011
  }));
8000
8012
  };
8001
8013
  var AlertOctagon_default = AlertOctagon;
8002
- var _excluded$100 = ["size"];
8014
+ var _excluded$102 = ["size"];
8003
8015
  var CheckCircle$2 = (_ref) => {
8004
8016
  let { size = 18 } = _ref;
8005
8017
  return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("svg", _objectSpread2(_objectSpread2({
8006
8018
  viewBox: "0 0 18 18",
8007
8019
  fill: "none",
8008
8020
  xmlns: "http://www.w3.org/2000/svg"
8009
- }, _objectWithoutProperties(_ref, _excluded$100)), {}, {
8021
+ }, _objectWithoutProperties(_ref, _excluded$102)), {}, {
8010
8022
  width: size,
8011
8023
  height: size,
8012
8024
  children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("path", {
@@ -8023,14 +8035,14 @@ var CheckCircle$2 = (_ref) => {
8023
8035
  }));
8024
8036
  };
8025
8037
  var CheckCircle_default = CheckCircle$2;
8026
- var _excluded$99 = ["size"];
8038
+ var _excluded$101 = ["size"];
8027
8039
  var RefreshCcw$1 = (_ref) => {
8028
8040
  let { size = 18 } = _ref;
8029
8041
  return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("svg", _objectSpread2(_objectSpread2({
8030
8042
  viewBox: "0 0 18 18",
8031
8043
  fill: "none",
8032
8044
  xmlns: "http://www.w3.org/2000/svg"
8033
- }, _objectWithoutProperties(_ref, _excluded$99)), {}, {
8045
+ }, _objectWithoutProperties(_ref, _excluded$101)), {}, {
8034
8046
  width: size,
8035
8047
  height: size,
8036
8048
  children: [
@@ -8618,7 +8630,7 @@ function BulkSelectionStoreProvider({ children }) {
8618
8630
  children
8619
8631
  });
8620
8632
  }
8621
- var _excluded$98 = [
8633
+ var _excluded$100 = [
8622
8634
  "align",
8623
8635
  "children",
8624
8636
  "className",
@@ -8636,7 +8648,7 @@ var _excluded$98 = [
8636
8648
  ];
8637
8649
  var CLASS_NAME$11 = "Layer__Stack";
8638
8650
  const Stack = (0, react.forwardRef)(function Stack$2(_ref, ref) {
8639
- let { align, children, className, direction, gap, justify, overflow, pb, pbs, pbe, pi, pis, pie, fluid } = _ref, restProps = _objectWithoutProperties(_ref, _excluded$98);
8651
+ let { align, children, className, direction, gap, justify, overflow, pb, pbs, pbe, pi, pis, pie, fluid } = _ref, restProps = _objectWithoutProperties(_ref, _excluded$100);
8640
8652
  const dataProperties = toDataProperties({
8641
8653
  align,
8642
8654
  direction,
@@ -8746,11 +8758,11 @@ function translationKey(key, defaultValue$1, ns) {
8746
8758
  }
8747
8759
  const toLocalDateString = (date) => (0, date_fns.formatISO)(date.valueOf(), { representation: "date" });
8748
8760
  function getDueDifference(dueDate) {
8749
- const today$4 = /* @__PURE__ */ new Date();
8750
- today$4.setHours(0, 0, 0, 0);
8761
+ const today$5 = /* @__PURE__ */ new Date();
8762
+ today$5.setHours(0, 0, 0, 0);
8751
8763
  const normalizedDue = new Date(dueDate);
8752
8764
  normalizedDue.setHours(0, 0, 0, 0);
8753
- return (0, date_fns.differenceInDays)(normalizedDue, today$4);
8765
+ return (0, date_fns.differenceInDays)(normalizedDue, today$5);
8754
8766
  }
8755
8767
  const convertDateToZonedDateTime = (date) => (0, __internationalized_date.fromDate)(date, (0, __internationalized_date.getLocalTimeZone)());
8756
8768
  const formatCalendarDate = (date, formatDate$1) => {
@@ -8935,7 +8947,7 @@ function useSizeClass() {
8935
8947
  isDesktop: sizeClass === "desktop"
8936
8948
  };
8937
8949
  }
8938
- var _excluded$97 = ["children"], _excluded2$12 = [
8950
+ var _excluded$99 = ["children"], _excluded2$13 = [
8939
8951
  "children",
8940
8952
  "asChild",
8941
8953
  "wordBreak"
@@ -8946,14 +8958,14 @@ var _excluded$97 = ["children"], _excluded2$12 = [
8946
8958
  ];
8947
8959
  const Tooltip$1 = (_ref) => {
8948
8960
  let { children } = _ref;
8949
- const tooltip = useTooltip(_objectWithoutProperties(_ref, _excluded$97));
8961
+ const tooltip = useTooltip(_objectWithoutProperties(_ref, _excluded$99));
8950
8962
  return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(TooltipContext.Provider, {
8951
8963
  value: tooltip,
8952
8964
  children
8953
8965
  });
8954
8966
  };
8955
8967
  const TooltipTrigger = (0, react.forwardRef)(function TooltipTrigger$1(_ref2, propRef) {
8956
- let { children, asChild = false, wordBreak } = _ref2, props = _objectWithoutProperties(_ref2, _excluded2$12);
8968
+ let { children, asChild = false, wordBreak } = _ref2, props = _objectWithoutProperties(_ref2, _excluded2$13);
8957
8969
  const context = useTooltipContext();
8958
8970
  const childrenRef = (0, react.isValidElement)(children) && "ref" in children ? children.ref : null;
8959
8971
  const ref = (0, __floating_ui_react.useMergeRefs)([
@@ -9041,7 +9053,7 @@ function useTruncationDetection(elementRef, options = {
9041
9053
  }, [checkTruncation]);
9042
9054
  return isTruncated;
9043
9055
  }
9044
- var _excluded$96 = [
9056
+ var _excluded$98 = [
9045
9057
  "align",
9046
9058
  "children",
9047
9059
  "ellipsis",
@@ -9056,7 +9068,7 @@ var _excluded$96 = [
9056
9068
  "weight"
9057
9069
  ];
9058
9070
  function splitTextProps(props) {
9059
- const { align, children, ellipsis, nonAria, noWrap, pb, pbe, pbs, size, status, variant, weight } = props, restProps = _objectWithoutProperties(props, _excluded$96);
9071
+ const { align, children, ellipsis, nonAria, noWrap, pb, pbe, pbs, size, status, variant, weight } = props, restProps = _objectWithoutProperties(props, _excluded$98);
9060
9072
  return {
9061
9073
  children,
9062
9074
  dataProperties: toDataProperties({
@@ -9218,7 +9230,7 @@ function withRenderProp(renderProp, callback) {
9218
9230
  if (typeof renderProp === "function") return renderProp;
9219
9231
  return callback(renderProp);
9220
9232
  }
9221
- var _excluded$95 = [
9233
+ var _excluded$97 = [
9222
9234
  "children",
9223
9235
  "ellipsis",
9224
9236
  "icon",
@@ -9246,7 +9258,7 @@ function ButtonTransparentContent({ children }) {
9246
9258
  });
9247
9259
  }
9248
9260
  var Button = (0, react.forwardRef)((_ref, ref) => {
9249
- let { children, ellipsis, icon, inset, size = "md", variant = "solid", fullWidth = false, flex = false } = _ref, restProps = _objectWithoutProperties(_ref, _excluded$95);
9261
+ let { children, ellipsis, icon, inset, size = "md", variant = "solid", fullWidth = false, flex = false } = _ref, restProps = _objectWithoutProperties(_ref, _excluded$97);
9250
9262
  const { isPending = false } = restProps;
9251
9263
  const dataProperties = toDataProperties({
9252
9264
  ellipsis,
@@ -9267,10 +9279,10 @@ var Button = (0, react.forwardRef)((_ref, ref) => {
9267
9279
  }));
9268
9280
  });
9269
9281
  Button.displayName = "Button";
9270
- var _excluded$94 = ["one", "other"];
9282
+ var _excluded$96 = ["one", "other"];
9271
9283
  const tPlural = (translate, key, _ref) => {
9272
9284
  let { one, other } = _ref;
9273
- return translate(key, _objectSpread2(_objectSpread2({}, _objectWithoutProperties(_ref, _excluded$94)), {}, {
9285
+ return translate(key, _objectSpread2(_objectSpread2({}, _objectWithoutProperties(_ref, _excluded$96)), {}, {
9274
9286
  defaultValue_one: one,
9275
9287
  defaultValue_other: other
9276
9288
  }));
@@ -10436,7 +10448,7 @@ const useVirtualKeyboardHeight = () => {
10436
10448
  }, []);
10437
10449
  return keyboardHeight;
10438
10450
  };
10439
- var _excluded$93 = ["variant"], _excluded2$11 = [
10451
+ var _excluded$95 = ["variant"], _excluded2$12 = [
10440
10452
  "variant",
10441
10453
  "children",
10442
10454
  "slots",
@@ -10446,7 +10458,7 @@ var _excluded$93 = ["variant"], _excluded2$11 = [
10446
10458
  ];
10447
10459
  var MODAL_OVERLAY_CLASS_NAME = `Layer__Portal Layer__ModalOverlay`;
10448
10460
  var ModalOverlay = (0, react.forwardRef)((_ref, ref) => {
10449
- let { variant } = _ref, restProps = _objectWithoutProperties(_ref, _excluded$93);
10461
+ let { variant } = _ref, restProps = _objectWithoutProperties(_ref, _excluded$95);
10450
10462
  return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(react_aria_components.ModalOverlay, _objectSpread2(_objectSpread2(_objectSpread2({}, toDataProperties({ variant })), restProps), {}, {
10451
10463
  className: MODAL_OVERLAY_CLASS_NAME,
10452
10464
  ref
@@ -10480,7 +10492,7 @@ var MobileDrawerKeyboardSpacer = () => {
10480
10492
  };
10481
10493
  var DIALOG_CLASS_NAME = "Layer__Dialog";
10482
10494
  var Dialog$3 = (0, react.forwardRef)((_ref2, ref) => {
10483
- let { variant = "center", children, slots, isEntering, isExiting, fixedHeight } = _ref2, restProps = _objectWithoutProperties(_ref2, _excluded2$11);
10495
+ let { variant = "center", children, slots, isEntering, isExiting, fixedHeight } = _ref2, restProps = _objectWithoutProperties(_ref2, _excluded2$12);
10484
10496
  const dataProperties = toDataProperties({
10485
10497
  variant,
10486
10498
  entering: isEntering,
@@ -10548,7 +10560,7 @@ function Drawer({ isOpen, onOpenChange, size = "md", flexBlock, flexInline, chil
10548
10560
  })
10549
10561
  });
10550
10562
  }
10551
- var _excluded$92 = [
10563
+ var _excluded$94 = [
10552
10564
  "align",
10553
10565
  "pie",
10554
10566
  "pbe",
@@ -10560,7 +10572,7 @@ var _excluded$92 = [
10560
10572
  ];
10561
10573
  var HEADING_CLASS_NAME = "Layer__UI__Heading";
10562
10574
  var Heading = (0, react.forwardRef)((_ref, ref) => {
10563
- let { align, pie, pbe, size, variant, weight, ellipsis, className } = _ref, restProps = _objectWithoutProperties(_ref, _excluded$92);
10575
+ let { align, pie, pbe, size, variant, weight, ellipsis, className } = _ref, restProps = _objectWithoutProperties(_ref, _excluded$94);
10564
10576
  const dataProperties = toDataProperties({
10565
10577
  pbe,
10566
10578
  pie,
@@ -10644,14 +10656,14 @@ function ModalActions({ children }) {
10644
10656
  children
10645
10657
  });
10646
10658
  }
10647
- var _excluded$91 = ["size"];
10659
+ var _excluded$93 = ["size"];
10648
10660
  var AlertCircle$1 = (_ref) => {
10649
10661
  let { size = 18 } = _ref;
10650
10662
  return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("svg", _objectSpread2(_objectSpread2({
10651
10663
  viewBox: "0 0 18 18",
10652
10664
  fill: "none",
10653
10665
  xmlns: "http://www.w3.org/2000/svg"
10654
- }, _objectWithoutProperties(_ref, _excluded$91)), {}, {
10666
+ }, _objectWithoutProperties(_ref, _excluded$93)), {}, {
10655
10667
  width: size,
10656
10668
  height: size,
10657
10669
  children: [
@@ -10677,14 +10689,14 @@ var AlertCircle$1 = (_ref) => {
10677
10689
  }));
10678
10690
  };
10679
10691
  var AlertCircle_default = AlertCircle$1;
10680
- var _excluded$90 = ["size"];
10692
+ var _excluded$92 = ["size"];
10681
10693
  var Save$6 = (_ref) => {
10682
10694
  let { size = 18 } = _ref;
10683
10695
  return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("svg", _objectSpread2(_objectSpread2({
10684
10696
  xmlns: "http://www.w3.org/2000/svg",
10685
10697
  viewBox: "0 0 18 18",
10686
10698
  fill: "none"
10687
- }, _objectWithoutProperties(_ref, _excluded$90)), {}, {
10699
+ }, _objectWithoutProperties(_ref, _excluded$92)), {}, {
10688
10700
  width: size,
10689
10701
  height: size,
10690
10702
  children: [
@@ -10710,7 +10722,7 @@ var Save$6 = (_ref) => {
10710
10722
  }));
10711
10723
  };
10712
10724
  var Save_default = Save$6;
10713
- var _excluded$89 = [
10725
+ var _excluded$91 = [
10714
10726
  "className",
10715
10727
  "processing",
10716
10728
  "disabled",
@@ -10718,7 +10730,7 @@ var _excluded$89 = [
10718
10730
  "children"
10719
10731
  ];
10720
10732
  const RetryButton = (_ref) => {
10721
- let { className, processing, disabled, error: error$38, children } = _ref, props = _objectWithoutProperties(_ref, _excluded$89);
10733
+ let { className, processing, disabled, error: error$38, children } = _ref, props = _objectWithoutProperties(_ref, _excluded$91);
10722
10734
  const baseClassName$1 = (0, classnames.default)("Layer__retry-btn", processing ? "Layer__btn--processing" : "", className);
10723
10735
  return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(Button$1, _objectSpread2(_objectSpread2({}, props), {}, {
10724
10736
  className: baseClassName$1,
@@ -10730,7 +10742,7 @@ const RetryButton = (_ref) => {
10730
10742
  children
10731
10743
  }));
10732
10744
  };
10733
- var _excluded$88 = [
10745
+ var _excluded$90 = [
10734
10746
  "active",
10735
10747
  "className",
10736
10748
  "processing",
@@ -10767,7 +10779,7 @@ var buildRightIcon = ({ processing, error: error$38, action: action$44, noIcon }
10767
10779
  return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(Save_default, { size: 16 });
10768
10780
  };
10769
10781
  const SubmitButton = (_ref) => {
10770
- let { active, className, processing, disabled, error: error$38, children, action: action$44 = SubmitAction.SAVE, noIcon, variant = ButtonVariant.primary, withRetry, iconAsPrimary = true } = _ref, props = _objectWithoutProperties(_ref, _excluded$88);
10782
+ let { active, className, processing, disabled, error: error$38, children, action: action$44 = SubmitAction.SAVE, noIcon, variant = ButtonVariant.primary, withRetry, iconAsPrimary = true } = _ref, props = _objectWithoutProperties(_ref, _excluded$90);
10771
10783
  const { t } = (0, react_i18next.useTranslation)();
10772
10784
  const baseClassName$1 = (0, classnames.default)(active ? "Layer__btn--active" : "", className);
10773
10785
  if (withRetry && error$38) return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(RetryButton, _objectSpread2(_objectSpread2({}, props), {}, {
@@ -10790,7 +10802,7 @@ const SubmitButton = (_ref) => {
10790
10802
  children
10791
10803
  }));
10792
10804
  };
10793
- var _excluded$87 = [
10805
+ var _excluded$89 = [
10794
10806
  "isOpen",
10795
10807
  "onOpenChange",
10796
10808
  "useDrawer"
@@ -10856,7 +10868,7 @@ var BaseConfirmationModalContent = (0, react.memo)(function BaseConfirmationModa
10856
10868
  });
10857
10869
  });
10858
10870
  function BaseConfirmationModal(_ref) {
10859
- let { isOpen, onOpenChange, useDrawer = false } = _ref, contentProps = _objectWithoutProperties(_ref, _excluded$87);
10871
+ let { isOpen, onOpenChange, useDrawer = false } = _ref, contentProps = _objectWithoutProperties(_ref, _excluded$89);
10860
10872
  if (useDrawer) return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(Drawer, {
10861
10873
  flexBlock: true,
10862
10874
  isOpen,
@@ -10909,14 +10921,14 @@ const COMBO_BOX_CLASS_NAMES = {
10909
10921
  MULTI_VALUE: "Layer__ComboBoxMultiValue",
10910
10922
  MULTI_VALUE_LABEL: "Layer__ComboBoxMultiValueLabel"
10911
10923
  };
10912
- var _excluded$86 = ["size"];
10924
+ var _excluded$88 = ["size"];
10913
10925
  var Check$4 = (_ref) => {
10914
10926
  let { size = 18 } = _ref;
10915
10927
  return /* @__PURE__ */ (0, react_jsx_runtime.jsx)("svg", _objectSpread2(_objectSpread2({
10916
10928
  viewBox: "0 0 18 18",
10917
10929
  fill: "none",
10918
10930
  xmlns: "http://www.w3.org/2000/svg"
10919
- }, _objectWithoutProperties(_ref, _excluded$86)), {}, {
10931
+ }, _objectWithoutProperties(_ref, _excluded$88)), {}, {
10920
10932
  width: size,
10921
10933
  height: size,
10922
10934
  children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)("path", {
@@ -10928,14 +10940,14 @@ var Check$4 = (_ref) => {
10928
10940
  }));
10929
10941
  };
10930
10942
  var Check_default = Check$4;
10931
- var _excluded$85 = ["size"];
10943
+ var _excluded$87 = ["size"];
10932
10944
  var ChevronDown$1 = (_ref) => {
10933
10945
  let { size = 18 } = _ref;
10934
10946
  return /* @__PURE__ */ (0, react_jsx_runtime.jsx)("svg", _objectSpread2(_objectSpread2({
10935
10947
  viewBox: "0 0 18 18",
10936
10948
  fill: "none",
10937
10949
  xmlns: "http://www.w3.org/2000/svg"
10938
- }, _objectWithoutProperties(_ref, _excluded$85)), {}, {
10950
+ }, _objectWithoutProperties(_ref, _excluded$87)), {}, {
10939
10951
  width: size,
10940
10952
  height: size,
10941
10953
  children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)("path", {
@@ -10947,14 +10959,14 @@ var ChevronDown$1 = (_ref) => {
10947
10959
  }));
10948
10960
  };
10949
10961
  var ChevronDown_default = ChevronDown$1;
10950
- var _excluded$84 = ["size"];
10962
+ var _excluded$86 = ["size"];
10951
10963
  var X$1 = (_ref) => {
10952
10964
  let { size = 18 } = _ref;
10953
10965
  return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("svg", _objectSpread2(_objectSpread2({
10954
10966
  xmlns: "http://www.w3.org/2000/svg",
10955
10967
  viewBox: "0 0 18 18",
10956
10968
  fill: "none"
10957
- }, _objectWithoutProperties(_ref, _excluded$84)), {}, {
10969
+ }, _objectWithoutProperties(_ref, _excluded$86)), {}, {
10958
10970
  width: size,
10959
10971
  height: size,
10960
10972
  children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("path", {
@@ -10971,10 +10983,10 @@ var X$1 = (_ref) => {
10971
10983
  }));
10972
10984
  };
10973
10985
  var X_default = X$1;
10974
- var _excluded$83 = ["children"], _excluded2$10 = ["children"], _excluded3$4 = ["children"], _excluded4$3 = ["children"], _excluded5$2 = ["children"], _excluded6$2 = ["children"], _excluded7 = ["children"], _excluded8 = ["children"];
10986
+ var _excluded$85 = ["children"], _excluded2$11 = ["children"], _excluded3$4 = ["children"], _excluded4$3 = ["children"], _excluded5$2 = ["children"], _excluded6$2 = ["children"], _excluded7 = ["children"], _excluded8 = ["children"];
10975
10987
  function buildCustomClearIndicator() {
10976
10988
  return function CustomClearIndicator(_ref) {
10977
- let { children } = _ref, restProps = _objectWithoutProperties(_ref, _excluded$83);
10989
+ let { children } = _ref, restProps = _objectWithoutProperties(_ref, _excluded$85);
10978
10990
  return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(react_select.components.ClearIndicator, _objectSpread2(_objectSpread2({}, restProps), {}, {
10979
10991
  className: COMBO_BOX_CLASS_NAMES.CLEAR_INDICATOR,
10980
10992
  children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(X_default, { size: 16 })
@@ -10983,7 +10995,7 @@ function buildCustomClearIndicator() {
10983
10995
  }
10984
10996
  function buildCustomDropdownIndicator() {
10985
10997
  return function CustomDropdownIndicator(_ref2) {
10986
- let { children } = _ref2, restProps = _objectWithoutProperties(_ref2, _excluded2$10);
10998
+ let { children } = _ref2, restProps = _objectWithoutProperties(_ref2, _excluded2$11);
10987
10999
  const { isDisabled } = restProps;
10988
11000
  return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(react_select.components.DropdownIndicator, _objectSpread2(_objectSpread2({}, restProps), {}, {
10989
11001
  className: COMBO_BOX_CLASS_NAMES.DROPDOWN_INDICATOR,
@@ -11180,7 +11192,7 @@ function useCommonComboBoxProps({ className, options, groups, onInputValueChange
11180
11192
  styles
11181
11193
  ]);
11182
11194
  }
11183
- var _excluded$82 = [
11195
+ var _excluded$84 = [
11184
11196
  "className",
11185
11197
  "slots",
11186
11198
  "isError",
@@ -11188,7 +11200,7 @@ var _excluded$82 = [
11188
11200
  "onSelectedValueChange"
11189
11201
  ];
11190
11202
  function ComboBox(_ref) {
11191
- let { className, slots, isError, selectedValue, onSelectedValueChange } = _ref, props = _objectWithoutProperties(_ref, _excluded$82);
11203
+ let { className, slots, isError, selectedValue, onSelectedValueChange } = _ref, props = _objectWithoutProperties(_ref, _excluded$84);
11192
11204
  const commonSelectProps = useCommonComboBoxProps(_objectSpread2({
11193
11205
  className,
11194
11206
  slots,
@@ -11207,13 +11219,13 @@ function ComboBox(_ref) {
11207
11219
  })]
11208
11220
  });
11209
11221
  }
11210
- var _excluded$81 = [
11222
+ var _excluded$83 = [
11211
11223
  "amount",
11212
11224
  "displayPlusSign",
11213
11225
  "className"
11214
11226
  ];
11215
11227
  var MoneySpan = (0, react.forwardRef)((_ref, ref) => {
11216
- let { amount, displayPlusSign, className } = _ref, restProps = _objectWithoutProperties(_ref, _excluded$81);
11228
+ let { amount, displayPlusSign, className } = _ref, restProps = _objectWithoutProperties(_ref, _excluded$83);
11217
11229
  const { formatCurrencyFromCents: formatCurrencyFromCents$1 } = useIntlFormatter();
11218
11230
  const formattedAmount = formatCurrencyFromCents$1(amount, { signDisplay: displayPlusSign ? "always" : "auto" });
11219
11231
  return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(Span, _objectSpread2(_objectSpread2({}, restProps), {}, {
@@ -11530,14 +11542,14 @@ const getDefaultSelectedCategoryForBankTransaction = (bankTransaction, ignoreSug
11530
11542
  if (hasSuggestions(bankTransaction.categorization_flow)) return convertApiCategorizationToCategoryOrSplitAsOption(bankTransaction.categorization_flow.suggestions[0]);
11531
11543
  return null;
11532
11544
  };
11533
- var _excluded$80 = ["size"];
11545
+ var _excluded$82 = ["size"];
11534
11546
  var MinimizeTwo = (_ref) => {
11535
11547
  let { size = 18 } = _ref;
11536
11548
  return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("svg", _objectSpread2(_objectSpread2({
11537
11549
  xmlns: "http://www.w3.org/2000/svg",
11538
11550
  viewBox: "0 0 18 18",
11539
11551
  fill: "none"
11540
- }, _objectWithoutProperties(_ref, _excluded$80)), {}, {
11552
+ }, _objectWithoutProperties(_ref, _excluded$82)), {}, {
11541
11553
  width: size,
11542
11554
  height: size,
11543
11555
  children: [
@@ -11569,14 +11581,14 @@ var MinimizeTwo = (_ref) => {
11569
11581
  }));
11570
11582
  };
11571
11583
  var MinimizeTwo_default = MinimizeTwo;
11572
- var _excluded$79 = ["size"];
11584
+ var _excluded$81 = ["size"];
11573
11585
  var Scissors = (_ref) => {
11574
11586
  let { size = 11 } = _ref;
11575
11587
  return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("svg", _objectSpread2(_objectSpread2({
11576
11588
  viewBox: "0 0 11 11",
11577
11589
  fill: "none",
11578
11590
  xmlns: "http://www.w3.org/2000/svg"
11579
- }, _objectWithoutProperties(_ref, _excluded$79)), {}, {
11591
+ }, _objectWithoutProperties(_ref, _excluded$81)), {}, {
11580
11592
  width: size,
11581
11593
  height: size,
11582
11594
  children: [
@@ -11996,7 +12008,7 @@ var toActionableListOption = (opt) => {
11996
12008
  value: opt
11997
12009
  };
11998
12010
  };
11999
- var _excluded$78 = [
12011
+ var _excluded$80 = [
12000
12012
  "actionCount",
12001
12013
  "className",
12002
12014
  "slots",
@@ -12004,7 +12016,7 @@ var _excluded$78 = [
12004
12016
  ];
12005
12017
  var INPUT_GROUP_CLASS_NAME = "Layer__UI__InputGroup";
12006
12018
  const InputGroup$1 = (0, react.forwardRef)(function InputGroup$2(_ref, ref) {
12007
- let { actionCount, className, slots, children } = _ref, restProps = _objectWithoutProperties(_ref, _excluded$78);
12019
+ let { actionCount, className, slots, children } = _ref, restProps = _objectWithoutProperties(_ref, _excluded$80);
12008
12020
  const combinedClassName = (0, classnames.default)(INPUT_GROUP_CLASS_NAME, className);
12009
12021
  const dataProperties = toDataProperties({ "action-count": actionCount });
12010
12022
  return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(react_aria_components.Group, _objectSpread2(_objectSpread2(_objectSpread2({}, restProps), dataProperties), {}, {
@@ -12013,10 +12025,10 @@ const InputGroup$1 = (0, react.forwardRef)(function InputGroup$2(_ref, ref) {
12013
12025
  children
12014
12026
  }));
12015
12027
  });
12016
- var _excluded$77 = ["placeholder", "isDisabled"];
12028
+ var _excluded$79 = ["placeholder", "isDisabled"];
12017
12029
  var CLASS_NAME$8 = "Layer__MinimalSearchField";
12018
12030
  function MinimalSearchField(_ref) {
12019
- let { placeholder, isDisabled } = _ref, restProps = _objectWithoutProperties(_ref, _excluded$77);
12031
+ let { placeholder, isDisabled } = _ref, restProps = _objectWithoutProperties(_ref, _excluded$79);
12020
12032
  const { t } = (0, react_i18next.useTranslation)();
12021
12033
  return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(react_aria_components.SearchField, _objectSpread2(_objectSpread2({}, restProps), {}, {
12022
12034
  isDisabled,
@@ -12034,7 +12046,7 @@ function MinimalSearchField(_ref) {
12034
12046
  })]
12035
12047
  }));
12036
12048
  }
12037
- var _excluded$76 = [
12049
+ var _excluded$78 = [
12038
12050
  "slot",
12039
12051
  "className",
12040
12052
  "label",
@@ -12042,7 +12054,7 @@ var _excluded$76 = [
12042
12054
  ];
12043
12055
  var CLASS_NAME$7 = "Layer__SearchField";
12044
12056
  function SearchField(_ref) {
12045
- let { slot = "search", className, label: label$50, isDisabled } = _ref, restProps = _objectWithoutProperties(_ref, _excluded$76);
12057
+ let { slot = "search", className, label: label$50, isDisabled } = _ref, restProps = _objectWithoutProperties(_ref, _excluded$78);
12046
12058
  return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(InputGroup$1, {
12047
12059
  slot,
12048
12060
  className: (0, classnames.default)(CLASS_NAME$7, className),
@@ -12548,14 +12560,14 @@ const BankTransactionsBulkActions = ({ isMobileView = false, slotProps }) => {
12548
12560
  ] })
12549
12561
  }) });
12550
12562
  };
12551
- var _excluded$75 = ["size"];
12563
+ var _excluded$77 = ["size"];
12552
12564
  var DownloadCloud = (_ref) => {
12553
12565
  let { size = 18 } = _ref;
12554
12566
  return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("svg", _objectSpread2(_objectSpread2({
12555
12567
  xmlns: "http://www.w3.org/2000/svg",
12556
12568
  viewBox: "0 0 18 18",
12557
12569
  fill: "none"
12558
- }, _objectWithoutProperties(_ref, _excluded$75)), {}, {
12570
+ }, _objectWithoutProperties(_ref, _excluded$77)), {}, {
12559
12571
  width: size,
12560
12572
  height: size,
12561
12573
  children: [
@@ -12581,14 +12593,14 @@ var DownloadCloud = (_ref) => {
12581
12593
  }));
12582
12594
  };
12583
12595
  var DownloadCloud_default = DownloadCloud;
12584
- var _excluded$74 = ["size"];
12596
+ var _excluded$76 = ["size"];
12585
12597
  var UploadCloud = (_ref) => {
12586
12598
  let { size = 18 } = _ref;
12587
12599
  return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("svg", _objectSpread2(_objectSpread2({
12588
12600
  viewBox: "0 0 18 18",
12589
12601
  fill: "none",
12590
12602
  xmlns: "http://www.w3.org/2000/svg"
12591
- }, _objectWithoutProperties(_ref, _excluded$74)), {}, {
12603
+ }, _objectWithoutProperties(_ref, _excluded$76)), {}, {
12592
12604
  width: size,
12593
12605
  height: size,
12594
12606
  children: [
@@ -12834,7 +12846,7 @@ function useCustomAccountParseCsv() {
12834
12846
  file
12835
12847
  }).then(({ data: data$1 }) => data$1), { revalidate: false });
12836
12848
  }
12837
- var _excluded$73 = [
12849
+ var _excluded$75 = [
12838
12850
  "className",
12839
12851
  "slots",
12840
12852
  "isError",
@@ -12847,7 +12859,7 @@ var _excluded$73 = [
12847
12859
  ];
12848
12860
  var returnTrue = () => true;
12849
12861
  function CreatableComboBox(_ref) {
12850
- let { className, slots, isError, selectedValue, onSelectedValueChange, onCreateOption, formatCreateLabel: formatCreateLabel$3, createOptionPosition = "first", isValidNewOption = returnTrue } = _ref, props = _objectWithoutProperties(_ref, _excluded$73);
12862
+ let { className, slots, isError, selectedValue, onSelectedValueChange, onCreateOption, formatCreateLabel: formatCreateLabel$3, createOptionPosition = "first", isValidNewOption = returnTrue } = _ref, props = _objectWithoutProperties(_ref, _excluded$75);
12851
12863
  const commonSelectProps = useCommonComboBoxProps(_objectSpread2({
12852
12864
  className,
12853
12865
  slots,
@@ -12888,14 +12900,14 @@ const CopyTemplateHeadersButtonGroup = ({ headers, className }) => {
12888
12900
  }, key))
12889
12901
  });
12890
12902
  };
12891
- var _excluded$72 = ["size"];
12903
+ var _excluded$74 = ["size"];
12892
12904
  var CloseIcon = (_ref) => {
12893
12905
  let { size = 12 } = _ref;
12894
12906
  return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("svg", _objectSpread2(_objectSpread2({
12895
12907
  viewBox: "0 0 12 12",
12896
12908
  fill: "none",
12897
12909
  xmlns: "http://www.w3.org/2000/svg"
12898
- }, _objectWithoutProperties(_ref, _excluded$72)), {}, {
12910
+ }, _objectWithoutProperties(_ref, _excluded$74)), {}, {
12899
12911
  width: size,
12900
12912
  height: size,
12901
12913
  children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("path", {
@@ -13126,7 +13138,7 @@ function useCreateCustomAccount() {
13126
13138
  return Reflect.get(target, prop);
13127
13139
  } });
13128
13140
  }
13129
- var _excluded$71 = ["children", "className"], _excluded2$9 = [
13141
+ var _excluded$73 = ["children", "className"], _excluded2$10 = [
13130
13142
  "children",
13131
13143
  "inline",
13132
13144
  "textarea",
@@ -13135,7 +13147,7 @@ var _excluded$71 = ["children", "className"], _excluded2$9 = [
13135
13147
  var FORM_CLASS_NAME = "Layer__UI__Form";
13136
13148
  const Form = (0, react.forwardRef)(function Form$1(_ref, ref) {
13137
13149
  let { children, className } = _ref;
13138
- return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(react_aria_components.Form, _objectSpread2(_objectSpread2({}, _objectWithoutProperties(_ref, _excluded$71)), {}, {
13150
+ return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(react_aria_components.Form, _objectSpread2(_objectSpread2({}, _objectWithoutProperties(_ref, _excluded$73)), {}, {
13139
13151
  className: (0, classnames.default)(FORM_CLASS_NAME, className),
13140
13152
  ref,
13141
13153
  children
@@ -13143,7 +13155,7 @@ const Form = (0, react.forwardRef)(function Form$1(_ref, ref) {
13143
13155
  });
13144
13156
  var TEXT_FIELD_CLASS_NAME = "Layer__UI__TextField";
13145
13157
  const TextField = (0, react.forwardRef)(function TextField$1(_ref2, ref) {
13146
- let { children, inline, textarea, className } = _ref2, restProps = _objectWithoutProperties(_ref2, _excluded2$9);
13158
+ let { children, inline, textarea, className } = _ref2, restProps = _objectWithoutProperties(_ref2, _excluded2$10);
13147
13159
  const dataProperties = toDataProperties({
13148
13160
  inline,
13149
13161
  textarea
@@ -13342,10 +13354,10 @@ function useBigDecimalInput({ value, onChange, onBlur, mode, maxValue, maxDecima
13342
13354
  onPaste
13343
13355
  };
13344
13356
  }
13345
- var _excluded$70 = ["inset", "placement"];
13357
+ var _excluded$72 = ["inset", "placement"];
13346
13358
  var INPUT_CLASS_NAME = "Layer__UI__Input";
13347
13359
  const Input$1 = (0, react.forwardRef)(function Input$2(_ref, ref) {
13348
- let { inset, placement } = _ref, restProps = _objectWithoutProperties(_ref, _excluded$70);
13360
+ let { inset, placement } = _ref, restProps = _objectWithoutProperties(_ref, _excluded$72);
13349
13361
  const dataProperties = toDataProperties({
13350
13362
  inset,
13351
13363
  placement
@@ -13355,7 +13367,7 @@ const Input$1 = (0, react.forwardRef)(function Input$2(_ref, ref) {
13355
13367
  ref
13356
13368
  }));
13357
13369
  });
13358
- var _excluded$69 = [
13370
+ var _excluded$71 = [
13359
13371
  "mode",
13360
13372
  "allowNegative",
13361
13373
  "maxValue",
@@ -13369,7 +13381,7 @@ var DEFAULT_MAX_VALUE$1 = effect.BigDecimal.fromBigInt(BigInt(1e7));
13369
13381
  var DEFAULT_MIN_DECIMAL_PLACES$1 = 0;
13370
13382
  var DEFAULT_MAX_DECIMAL_PLACES$1 = 3;
13371
13383
  function FormBigDecimalField(_ref) {
13372
- let { mode = "decimal", allowNegative = false, maxValue = mode === "percent" ? BIG_DECIMAL_ONE : DEFAULT_MAX_VALUE$1, minDecimalPlaces = mode === "currency" ? 2 : DEFAULT_MIN_DECIMAL_PLACES$1, maxDecimalPlaces = mode === "currency" ? 2 : DEFAULT_MAX_DECIMAL_PLACES$1, slots, placeholder, allowEmpty } = _ref, restProps = _objectWithoutProperties(_ref, _excluded$69);
13384
+ let { mode = "decimal", allowNegative = false, maxValue = mode === "percent" ? BIG_DECIMAL_ONE : DEFAULT_MAX_VALUE$1, minDecimalPlaces = mode === "currency" ? 2 : DEFAULT_MIN_DECIMAL_PLACES$1, maxDecimalPlaces = mode === "currency" ? 2 : DEFAULT_MAX_DECIMAL_PLACES$1, slots, placeholder, allowEmpty } = _ref, restProps = _objectWithoutProperties(_ref, _excluded$71);
13373
13385
  const { name: name$1, state: state$14, handleChange, handleBlur } = useFieldContext();
13374
13386
  const { value } = state$14;
13375
13387
  const { inputValue, onInputChange, onInputBlur, onBeforeInput, onPaste } = useBigDecimalInput({
@@ -13402,13 +13414,13 @@ function FormBigDecimalField(_ref) {
13402
13414
  })
13403
13415
  }));
13404
13416
  }
13405
- var _excluded$68 = [
13417
+ var _excluded$70 = [
13406
13418
  "children",
13407
13419
  "className",
13408
13420
  "variant",
13409
13421
  "size",
13410
13422
  "isIndeterminate"
13411
- ], _excluded2$8 = ["tooltip"];
13423
+ ], _excluded2$9 = ["tooltip"];
13412
13424
  var CLASS_NAME$6 = "Layer__Checkbox";
13413
13425
  var CHECK_SIZE = {
13414
13426
  sm: 12,
@@ -13416,7 +13428,7 @@ var CHECK_SIZE = {
13416
13428
  lg: 16
13417
13429
  };
13418
13430
  function Checkbox(_ref) {
13419
- let { children, className, variant = "default", size = "sm", isIndeterminate } = _ref, props = _objectWithoutProperties(_ref, _excluded$68);
13431
+ let { children, className, variant = "default", size = "sm", isIndeterminate } = _ref, props = _objectWithoutProperties(_ref, _excluded$70);
13420
13432
  return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(react_aria_components.Checkbox, _objectSpread2(_objectSpread2(_objectSpread2({}, (0, react.useMemo)(() => toDataProperties({
13421
13433
  size,
13422
13434
  variant,
@@ -13435,7 +13447,7 @@ function Checkbox(_ref) {
13435
13447
  }));
13436
13448
  }
13437
13449
  function CheckboxWithTooltip(_ref2) {
13438
- let { tooltip } = _ref2, props = _objectWithoutProperties(_ref2, _excluded2$8);
13450
+ let { tooltip } = _ref2, props = _objectWithoutProperties(_ref2, _excluded2$9);
13439
13451
  return /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
13440
13452
  className: "Layer__checkbox-wrapper",
13441
13453
  children: /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(DeprecatedTooltip, {
@@ -13475,15 +13487,15 @@ function FormCheckboxField({ label: label$50, className, inline = false, showLab
13475
13487
  children: label$50
13476
13488
  }) }));
13477
13489
  }
13478
- var _excluded$67 = [
13490
+ var _excluded$69 = [
13479
13491
  "inline",
13480
13492
  "className",
13481
13493
  "isReadOnly"
13482
- ], _excluded2$7 = ["inset", "pointerEvents"], _excluded3$3 = ["isReadOnly"], _excluded4$2 = ["className"];
13494
+ ], _excluded2$8 = ["inset", "pointerEvents"], _excluded3$3 = ["isReadOnly"], _excluded4$2 = ["className"];
13483
13495
  const DATE_PICKER_CLASS_NAME = "Layer__UI__DatePicker";
13484
13496
  var DATE_FIELD_CLASS_NAME = "Layer__UI__DateField";
13485
13497
  const DateField = (0, react.forwardRef)(function DateField$1(_ref, ref) {
13486
- let { inline, className, isReadOnly } = _ref, restProps = _objectWithoutProperties(_ref, _excluded$67);
13498
+ let { inline, className, isReadOnly } = _ref, restProps = _objectWithoutProperties(_ref, _excluded$69);
13487
13499
  return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(react_aria_components.DateField, _objectSpread2(_objectSpread2(_objectSpread2({}, toDataProperties({
13488
13500
  inline,
13489
13501
  readonly: isReadOnly
@@ -13495,7 +13507,7 @@ const DateField = (0, react.forwardRef)(function DateField$1(_ref, ref) {
13495
13507
  });
13496
13508
  var DATE_INPUT_CLASS_NAME = "Layer__UI__DateInput";
13497
13509
  const DateInput = (0, react.forwardRef)(function DateInput$1(_ref2, ref) {
13498
- let { inset, pointerEvents } = _ref2, restProps = _objectWithoutProperties(_ref2, _excluded2$7);
13510
+ let { inset, pointerEvents } = _ref2, restProps = _objectWithoutProperties(_ref2, _excluded2$8);
13499
13511
  return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(react_aria_components.DateInput, _objectSpread2(_objectSpread2(_objectSpread2({}, toDataProperties({
13500
13512
  inset,
13501
13513
  "pointer-events": pointerEvents
@@ -13570,10 +13582,10 @@ function FormDateField({ label: label$50, className, inline = false, showLabel =
13570
13582
  shouldShowErrorMessage && /* @__PURE__ */ (0, react_jsx_runtime.jsx)(FieldError, { children: errorMessage })
13571
13583
  ] }));
13572
13584
  }
13573
- var _excluded$66 = ["className", "isReadOnly"], _excluded2$6 = ["className"], _excluded3$2 = ["className"], _excluded4$1 = ["className", "size"], _excluded5$1 = ["className"], _excluded6$1 = ["className", "size"];
13585
+ var _excluded$68 = ["className", "isReadOnly"], _excluded2$7 = ["className"], _excluded3$2 = ["className"], _excluded4$1 = ["className", "size"], _excluded5$1 = ["className"], _excluded6$1 = ["className", "size"];
13574
13586
  var CALENDAR_CLASS_NAME = "Layer__UI__Calendar";
13575
13587
  const Calendar$1 = (0, react.forwardRef)(function Calendar$2(_ref, ref) {
13576
- let { className, isReadOnly } = _ref, restProps = _objectWithoutProperties(_ref, _excluded$66);
13588
+ let { className, isReadOnly } = _ref, restProps = _objectWithoutProperties(_ref, _excluded$68);
13577
13589
  return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(react_aria_components.Calendar, _objectSpread2(_objectSpread2(_objectSpread2({}, toDataProperties({ readonly: isReadOnly })), restProps), {}, {
13578
13590
  isReadOnly,
13579
13591
  className: (0, classnames.default)(CALENDAR_CLASS_NAME, className),
@@ -13583,7 +13595,7 @@ const Calendar$1 = (0, react.forwardRef)(function Calendar$2(_ref, ref) {
13583
13595
  var CALENDAR_GRID_CLASS_NAME = "Layer__UI__CalendarGrid";
13584
13596
  const CalendarGrid = (0, react.forwardRef)(function CalendarGrid$1(_ref2, ref) {
13585
13597
  let { className } = _ref2;
13586
- return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(react_aria_components.CalendarGrid, _objectSpread2(_objectSpread2({}, _objectWithoutProperties(_ref2, _excluded2$6)), {}, {
13598
+ return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(react_aria_components.CalendarGrid, _objectSpread2(_objectSpread2({}, _objectWithoutProperties(_ref2, _excluded2$7)), {}, {
13587
13599
  className: (0, classnames.default)(CALENDAR_GRID_CLASS_NAME, className),
13588
13600
  ref
13589
13601
  }));
@@ -13712,10 +13724,10 @@ const DatePickerInput = ({ errorText, variant, onClick, isReadOnly }) => {
13712
13724
  })]
13713
13725
  });
13714
13726
  };
13715
- var _excluded$65 = ["flexInline"];
13727
+ var _excluded$67 = ["flexInline"];
13716
13728
  var POPOVER_CLASS_NAMES = `Layer__Portal Layer__Popover`;
13717
13729
  const Popover$2 = (0, react.forwardRef)(function Popover$3(_ref, ref) {
13718
- let { flexInline = false } = _ref, restProps = _objectWithoutProperties(_ref, _excluded$65);
13730
+ let { flexInline = false } = _ref, restProps = _objectWithoutProperties(_ref, _excluded$67);
13719
13731
  const dataProperties = toDataProperties({ "flex-inline": flexInline });
13720
13732
  return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(react_aria_components.Popover, _objectSpread2(_objectSpread2(_objectSpread2({}, restProps), dataProperties), {}, {
13721
13733
  className: POPOVER_CLASS_NAMES,
@@ -13835,7 +13847,7 @@ const fromNonRecursiveBigDecimal = (nrbd) => {
13835
13847
  const nrbdEquals = (a, b) => {
13836
13848
  return effect.BigDecimal.equals(fromNonRecursiveBigDecimal(a), fromNonRecursiveBigDecimal(b));
13837
13849
  };
13838
- var _excluded$64 = [
13850
+ var _excluded$66 = [
13839
13851
  "mode",
13840
13852
  "allowNegative",
13841
13853
  "maxValue",
@@ -13849,7 +13861,7 @@ var DEFAULT_MAX_VALUE = effect.BigDecimal.fromBigInt(BigInt(1e7));
13849
13861
  var DEFAULT_MIN_DECIMAL_PLACES = 0;
13850
13862
  var DEFAULT_MAX_DECIMAL_PLACES = 3;
13851
13863
  function FormNonRecursiveBigDecimalField(_ref) {
13852
- let { mode = "decimal", allowNegative = false, maxValue = mode === "percent" ? BIG_DECIMAL_ONE : DEFAULT_MAX_VALUE, minDecimalPlaces = mode === "currency" ? 2 : DEFAULT_MIN_DECIMAL_PLACES, maxDecimalPlaces = mode === "currency" ? 2 : DEFAULT_MAX_DECIMAL_PLACES, slots, placeholder, allowEmpty } = _ref, restProps = _objectWithoutProperties(_ref, _excluded$64);
13864
+ let { mode = "decimal", allowNegative = false, maxValue = mode === "percent" ? BIG_DECIMAL_ONE : DEFAULT_MAX_VALUE, minDecimalPlaces = mode === "currency" ? 2 : DEFAULT_MIN_DECIMAL_PLACES, maxDecimalPlaces = mode === "currency" ? 2 : DEFAULT_MAX_DECIMAL_PLACES, slots, placeholder, allowEmpty } = _ref, restProps = _objectWithoutProperties(_ref, _excluded$66);
13853
13865
  const { name: name$1, state: state$14, handleChange, handleBlur } = useFieldContext();
13854
13866
  const { value: nrbdValue } = state$14;
13855
13867
  const { inputValue, onInputChange, onInputBlur, onBeforeInput, onPaste } = useBigDecimalInput({
@@ -13884,14 +13896,14 @@ function FormNonRecursiveBigDecimalField(_ref) {
13884
13896
  })
13885
13897
  }));
13886
13898
  }
13887
- var _excluded$63 = [
13899
+ var _excluded$65 = [
13888
13900
  "inline",
13889
13901
  "className",
13890
13902
  "isReadOnly"
13891
13903
  ];
13892
13904
  var NUMBER_FIELD_CLASS_NAME = "Layer__UI__NumberField";
13893
13905
  const NumberField = (0, react.forwardRef)(function NumberField$1(_ref, ref) {
13894
- let { inline, className, isReadOnly } = _ref, restProps = _objectWithoutProperties(_ref, _excluded$63);
13906
+ let { inline, className, isReadOnly } = _ref, restProps = _objectWithoutProperties(_ref, _excluded$65);
13895
13907
  return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(react_aria_components.NumberField, _objectSpread2(_objectSpread2(_objectSpread2({ step: 1 }, toDataProperties({
13896
13908
  inline,
13897
13909
  readonly: isReadOnly
@@ -13938,17 +13950,17 @@ function FormNumberField({ label: label$50, className, inline = false, showLabel
13938
13950
  shouldShowErrorMessage && /* @__PURE__ */ (0, react_jsx_runtime.jsx)(FieldError, { children: errorMessage })
13939
13951
  ] }));
13940
13952
  }
13941
- var _excluded$62 = [
13953
+ var _excluded$64 = [
13942
13954
  "children",
13943
13955
  "className",
13944
13956
  "onChange"
13945
- ], _excluded2$5 = ["children", "className"];
13957
+ ], _excluded2$6 = ["children", "className"];
13946
13958
  var RADIO_GROUP_CLASS_NAME = "Layer__RadioGroup";
13947
13959
  var RADIO_CLASS_NAME = "Layer__Radio";
13948
13960
  var INDICATOR_SIZE = 10;
13949
13961
  function RadioGroup(_ref) {
13950
13962
  let { children, className, onChange } = _ref;
13951
- return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(react_aria_components.RadioGroup, _objectSpread2(_objectSpread2({}, _objectWithoutProperties(_ref, _excluded$62)), {}, {
13963
+ return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(react_aria_components.RadioGroup, _objectSpread2(_objectSpread2({}, _objectWithoutProperties(_ref, _excluded$64)), {}, {
13952
13964
  onChange,
13953
13965
  className: (0, classnames.default)(RADIO_GROUP_CLASS_NAME, className),
13954
13966
  children
@@ -13956,7 +13968,7 @@ function RadioGroup(_ref) {
13956
13968
  }
13957
13969
  function Radio(_ref2) {
13958
13970
  let { children, className } = _ref2;
13959
- return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(react_aria_components.Radio, _objectSpread2(_objectSpread2({}, _objectWithoutProperties(_ref2, _excluded2$5)), {}, {
13971
+ return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(react_aria_components.Radio, _objectSpread2(_objectSpread2({}, _objectWithoutProperties(_ref2, _excluded2$6)), {}, {
13960
13972
  className: (0, classnames.default)(RADIO_CLASS_NAME, className),
13961
13973
  children: withRenderProp(children, (node) => /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(react_jsx_runtime.Fragment, { children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
13962
13974
  slot: "radio",
@@ -14057,11 +14069,11 @@ function FormRadioGroupYesNoField({ label: label$50, className, inline = false,
14057
14069
  }), shouldShowErrorMessage && /* @__PURE__ */ (0, react_jsx_runtime.jsx)(FieldError, { children: errorMessage })]
14058
14070
  })] }));
14059
14071
  }
14060
- var _excluded$61 = ["children", "className"];
14072
+ var _excluded$63 = ["children", "className"];
14061
14073
  var SWITCH_CLASS_NAME = "Layer__UI__Switch";
14062
14074
  const Switch = (0, react.forwardRef)((_ref, ref) => {
14063
14075
  let { children, className } = _ref;
14064
- return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(react_aria_components.Switch, _objectSpread2(_objectSpread2({}, _objectWithoutProperties(_ref, _excluded$61)), {}, {
14076
+ return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(react_aria_components.Switch, _objectSpread2(_objectSpread2({}, _objectWithoutProperties(_ref, _excluded$63)), {}, {
14065
14077
  className: (0, classnames.default)(SWITCH_CLASS_NAME, className),
14066
14078
  ref,
14067
14079
  children: withRenderProp(children, (node) => /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(react_jsx_runtime.Fragment, { children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", { slot: "indicator" }), node] }))
@@ -14091,19 +14103,19 @@ function FormSwitchField({ label: label$50, slots, className, inline = false, sh
14091
14103
  })]
14092
14104
  }) }));
14093
14105
  }
14094
- var _excluded$60 = ["resize"];
14106
+ var _excluded$62 = ["resize"];
14095
14107
  var TEXTAREA_CLASS_NAME = "Layer__UI__TextArea";
14096
14108
  const TextArea = (0, react.forwardRef)(function TextArea$1(_ref, ref) {
14097
- let { resize = "none" } = _ref, restProps = _objectWithoutProperties(_ref, _excluded$60);
14109
+ let { resize = "none" } = _ref, restProps = _objectWithoutProperties(_ref, _excluded$62);
14098
14110
  const dataProperties = toDataProperties({ resize });
14099
14111
  return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(react_aria_components.TextArea, _objectSpread2(_objectSpread2(_objectSpread2({}, restProps), dataProperties), {}, {
14100
14112
  className: TEXTAREA_CLASS_NAME,
14101
14113
  ref
14102
14114
  }));
14103
14115
  });
14104
- var _excluded$59 = ["placeholder"];
14116
+ var _excluded$61 = ["placeholder"];
14105
14117
  function FormTextAreaField(_ref) {
14106
- let { placeholder } = _ref, props = _objectWithoutProperties(_ref, _excluded$59);
14118
+ let { placeholder } = _ref, props = _objectWithoutProperties(_ref, _excluded$61);
14107
14119
  const { name: name$1, state: state$14, handleChange, handleBlur } = useFieldContext();
14108
14120
  const { value } = state$14;
14109
14121
  const onChange = (0, react.useCallback)((e) => {
@@ -14122,9 +14134,9 @@ function FormTextAreaField(_ref) {
14122
14134
  })
14123
14135
  }));
14124
14136
  }
14125
- var _excluded$58 = ["placeholder"];
14137
+ var _excluded$60 = ["placeholder"];
14126
14138
  function FormTextField(_ref) {
14127
- let { placeholder } = _ref, props = _objectWithoutProperties(_ref, _excluded$58);
14139
+ let { placeholder } = _ref, props = _objectWithoutProperties(_ref, _excluded$60);
14128
14140
  const { name: name$1, state: state$14, handleChange, handleBlur } = useFieldContext();
14129
14141
  const { value } = state$14;
14130
14142
  const onChange = (0, react.useCallback)((e) => {
@@ -14221,14 +14233,14 @@ const useCustomAccountForm = ({ onSuccess }) => {
14221
14233
  isFormValid: (0, __tanstack_react_form.useStore)(form.store, (state$14) => state$14.isValid)
14222
14234
  };
14223
14235
  };
14224
- var _excluded$57 = [
14236
+ var _excluded$59 = [
14225
14237
  "className",
14226
14238
  "isInvalid",
14227
14239
  "errorMessage",
14228
14240
  "leftText"
14229
14241
  ];
14230
14242
  const Input = (_ref) => {
14231
- let { className, isInvalid, errorMessage, leftText } = _ref, props = _objectWithoutProperties(_ref, _excluded$57);
14243
+ let { className, isInvalid, errorMessage, leftText } = _ref, props = _objectWithoutProperties(_ref, _excluded$59);
14232
14244
  const baseClassName$1 = (0, classnames.default)("Layer__input", isInvalid ? "Layer__input--error" : "", leftText ? "Layer__input--with-left-text" : "", className);
14233
14245
  return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(DeprecatedTooltip, {
14234
14246
  disabled: !isInvalid || !errorMessage,
@@ -14256,14 +14268,14 @@ const InputGroup = ({ label: label$50, name: name$1, className, inline, children
14256
14268
  }), children]
14257
14269
  });
14258
14270
  };
14259
- var _excluded$56 = ["size"];
14271
+ var _excluded$58 = ["size"];
14260
14272
  var ChevronDownFill = (_ref) => {
14261
14273
  let { size = 18 } = _ref;
14262
14274
  return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("svg", _objectSpread2(_objectSpread2({
14263
14275
  xmlns: "http://www.w3.org/2000/svg",
14264
14276
  viewBox: "0 0 18 18",
14265
14277
  fill: "none"
14266
- }, _objectWithoutProperties(_ref, _excluded$56)), {}, {
14278
+ }, _objectWithoutProperties(_ref, _excluded$58)), {}, {
14267
14279
  width: size,
14268
14280
  height: size,
14269
14281
  children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("path", {
@@ -14278,9 +14290,9 @@ var ChevronDownFill = (_ref) => {
14278
14290
  }));
14279
14291
  };
14280
14292
  var ChevronDownFill_default = ChevronDownFill;
14281
- var _excluded$55 = ["children"];
14293
+ var _excluded$57 = ["children"];
14282
14294
  const SelectMenuPortal = (_ref) => {
14283
- let { children } = _ref, restProps = _objectWithoutProperties(_ref, _excluded$55);
14295
+ let { children } = _ref, restProps = _objectWithoutProperties(_ref, _excluded$57);
14284
14296
  const dataProperties = toDataProperties({ "react-aria-top-layer": true });
14285
14297
  return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(react_select.components.MenuPortal, _objectSpread2(_objectSpread2({}, restProps), {}, {
14286
14298
  innerProps: dataProperties,
@@ -14320,10 +14332,10 @@ const Select$1 = ({ name: name$1, options, className, classNamePrefix = "Layer__
14320
14332
  })]
14321
14333
  });
14322
14334
  };
14323
- var _excluded$54 = ["className"];
14335
+ var _excluded$56 = ["className"];
14324
14336
  const ErrorText = (_ref) => {
14325
14337
  let { className } = _ref;
14326
- return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(Text, _objectSpread2(_objectSpread2({}, _objectWithoutProperties(_ref, _excluded$54)), {}, {
14338
+ return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(Text, _objectSpread2(_objectSpread2({}, _objectWithoutProperties(_ref, _excluded$56)), {}, {
14327
14339
  status: "error",
14328
14340
  className
14329
14341
  }));
@@ -14644,7 +14656,7 @@ function UploadTransactionsUploadCsvStep({ selectedAccount, onSelectAccount, sel
14644
14656
  ] })]
14645
14657
  });
14646
14658
  }
14647
- var _excluded$53 = ["customAccountId"];
14659
+ var _excluded$55 = ["customAccountId"];
14648
14660
  var createCustomAccountTransactions = post(({ businessId, customAccountId }) => `/v1/businesses/${businessId}/custom-accounts/${customAccountId}/transactions`);
14649
14661
  function buildKey$73({ access_token: accessToken, apiUrl, businessId }) {
14650
14662
  if (accessToken && apiUrl) return {
@@ -14659,7 +14671,7 @@ function useCreateCustomAccountTransactions() {
14659
14671
  const { data } = useAuth();
14660
14672
  const { businessId } = useLayerContext();
14661
14673
  return (0, swr_mutation.default)(() => withLocale(buildKey$73(_objectSpread2(_objectSpread2({}, data), {}, { businessId }))), ({ accessToken, apiUrl, businessId: businessId$1 }, _ref) => {
14662
- let { arg: _ref2 } = _ref, { customAccountId } = _ref2, body = _objectWithoutProperties(_ref2, _excluded$53);
14674
+ let { arg: _ref2 } = _ref, { customAccountId } = _ref2, body = _objectWithoutProperties(_ref2, _excluded$55);
14663
14675
  return createCustomAccountTransactions(apiUrl, accessToken, {
14664
14676
  params: {
14665
14677
  businessId: businessId$1,
@@ -14672,6 +14684,31 @@ function useCreateCustomAccountTransactions() {
14672
14684
  throwOnError: false
14673
14685
  });
14674
14686
  }
14687
+ let ReportControl = /* @__PURE__ */ function(ReportControl$1) {
14688
+ ReportControl$1["Date"] = "date";
14689
+ ReportControl$1["DateRange"] = "date_range";
14690
+ ReportControl$1["GroupBy"] = "group_by";
14691
+ ReportControl$1["Unknown"] = "unknown";
14692
+ return ReportControl$1;
14693
+ }({});
14694
+ var TransformedReportControlSchema = createTransformedEnumSchema(effect.Schema.Enums(ReportControl), ReportControl, ReportControl.Unknown);
14695
+ const ReportConfigSchema = effect.Schema.Struct({
14696
+ key: effect.Schema.String,
14697
+ reportRoute: (0, effect.pipe)(effect.Schema.propertySignature(effect.Schema.String), effect.Schema.fromKey("report_route")),
14698
+ displayName: (0, effect.pipe)(effect.Schema.propertySignature(effect.Schema.String), effect.Schema.fromKey("display_name")),
14699
+ controls: effect.Schema.Array(TransformedReportControlSchema),
14700
+ baseQueryParameters: (0, effect.pipe)(effect.Schema.propertySignature(effect.Schema.Record({
14701
+ key: effect.Schema.String,
14702
+ value: effect.Schema.String
14703
+ })), effect.Schema.fromKey("base_query_parameters")),
14704
+ isDefaultReport: effect.Schema.optional(effect.Schema.Boolean).pipe(effect.Schema.fromKey("is_default_report"))
14705
+ });
14706
+ const ReportGroupSchema = effect.Schema.Struct({
14707
+ groupType: (0, effect.pipe)(effect.Schema.propertySignature(effect.Schema.String), effect.Schema.fromKey("group_type")),
14708
+ displayName: (0, effect.pipe)(effect.Schema.propertySignature(effect.Schema.String), effect.Schema.fromKey("display_name")),
14709
+ reports: effect.Schema.Array(ReportConfigSchema)
14710
+ });
14711
+ const ReportConfigResponseSchema = effect.Schema.Struct({ data: effect.Schema.Array(ReportGroupSchema) });
14675
14712
  let DateGroupBy = /* @__PURE__ */ function(DateGroupBy$1) {
14676
14713
  DateGroupBy$1["AllTime"] = "ALL_TIME";
14677
14714
  DateGroupBy$1["Month"] = "MONTH";
@@ -14685,6 +14722,13 @@ let Alignment = /* @__PURE__ */ function(Alignment$1) {
14685
14722
  return Alignment$1;
14686
14723
  }({});
14687
14724
  var TransformedAlignmentSchema = createTransformedEnumSchema(effect.Schema.Enums(Alignment), Alignment, Alignment.Left);
14725
+ let Pinning = /* @__PURE__ */ function(Pinning$1) {
14726
+ Pinning$1["Left"] = "LEFT";
14727
+ Pinning$1["Right"] = "RIGHT";
14728
+ Pinning$1["Unpinned"] = "UNPINNED";
14729
+ return Pinning$1;
14730
+ }({});
14731
+ var TransformedPinningSchema = createTransformedEnumSchema(effect.Schema.Enums(Pinning), Pinning, Pinning.Unpinned);
14688
14732
  const DateQueryParamsSchema = effect.Schema.Struct({ effectiveDate: (0, effect.pipe)(effect.Schema.propertySignature(effect.Schema.Date), effect.Schema.fromKey("effective_date")) });
14689
14733
  const DateRangeQueryParamsSchema = effect.Schema.Struct({
14690
14734
  startDate: (0, effect.pipe)(effect.Schema.propertySignature(effect.Schema.Date), effect.Schema.fromKey("start_date")),
@@ -14695,7 +14739,8 @@ var unifiedReportColumnFields = {
14695
14739
  columnKey: (0, effect.pipe)(effect.Schema.propertySignature(effect.Schema.String), effect.Schema.fromKey("column_key")),
14696
14740
  displayName: (0, effect.pipe)(effect.Schema.propertySignature(effect.Schema.String), effect.Schema.fromKey("display_name")),
14697
14741
  isRowHeader: effect.Schema.optional(effect.Schema.Boolean).pipe(effect.Schema.fromKey("is_row_header")),
14698
- alignment: effect.Schema.optional(TransformedAlignmentSchema)
14742
+ alignment: effect.Schema.optional(TransformedAlignmentSchema),
14743
+ pinning: effect.Schema.optional(TransformedPinningSchema)
14699
14744
  };
14700
14745
  const UnifiedReportColumnSchema = effect.Schema.Struct(_objectSpread2(_objectSpread2({}, unifiedReportColumnFields), {}, { columns: effect.Schema.optional(effect.Schema.Array(effect.Schema.suspend(() => UnifiedReportColumnSchema))) }));
14701
14746
  var UnifiedCellValueAmountSchema = effect.Schema.Struct({
@@ -14718,7 +14763,8 @@ const isEmptyCellValue = (value) => value.type === "Empty";
14718
14763
  var UnifiedCellFormatSchema = effect.Schema.Struct({ bold: effect.Schema.optional(effect.Schema.Boolean) });
14719
14764
  var UnifiedReportCellSchema = effect.Schema.Struct({
14720
14765
  value: UnifiedCellValueSchema,
14721
- format: effect.Schema.optional(UnifiedCellFormatSchema)
14766
+ format: effect.Schema.optional(UnifiedCellFormatSchema),
14767
+ reportConfig: (0, effect.pipe)(effect.Schema.propertySignature(effect.Schema.NullishOr(ReportConfigSchema)), effect.Schema.fromKey("report_config"))
14722
14768
  });
14723
14769
  var unifiedReportRowFields = {
14724
14770
  rowKey: (0, effect.pipe)(effect.Schema.propertySignature(effect.Schema.String), effect.Schema.fromKey("row_key")),
@@ -14733,15 +14779,14 @@ const UnifiedReportSchema = effect.Schema.Struct({
14733
14779
  columns: effect.Schema.Array(UnifiedReportColumnSchema),
14734
14780
  rows: effect.Schema.Array(UnifiedReportRowSchema)
14735
14781
  });
14736
- var _excluded$52 = [
14782
+ var _excluded$54 = [
14737
14783
  "children",
14738
14784
  "className",
14739
14785
  "nonAria",
14740
14786
  "slot"
14741
- ], _excluded2$4 = [
14787
+ ], _excluded2$5 = [
14742
14788
  "children",
14743
14789
  "className",
14744
- "hideHeader",
14745
14790
  "nonAria"
14746
14791
  ], _excluded3$1 = [
14747
14792
  "children",
@@ -14760,13 +14805,15 @@ var _excluded$52 = [
14760
14805
  "nonAria",
14761
14806
  "id",
14762
14807
  "alignment",
14763
- "colSpan"
14808
+ "colSpan",
14809
+ "pinned"
14764
14810
  ], _excluded6 = [
14765
14811
  "children",
14766
14812
  "className",
14767
14813
  "nonAria",
14768
14814
  "id",
14769
- "alignment"
14815
+ "alignment",
14816
+ "pinned"
14770
14817
  ];
14771
14818
  var TableSubComponent = /* @__PURE__ */ function(TableSubComponent$1) {
14772
14819
  TableSubComponent$1["Table"] = "Table";
@@ -14786,9 +14833,9 @@ var toAlignmentDataValue = (alignment) => {
14786
14833
  default: return;
14787
14834
  }
14788
14835
  };
14789
- var getClassName = (component, additionalClassNames, withHidden) => (0, classnames.default)(`${CSS_PREFIX$1}-${component}`, withHidden && `${CSS_PREFIX$1}-${component}--hidden`, additionalClassNames);
14836
+ var getClassName = (component, additionalClassNames) => (0, classnames.default)(`${CSS_PREFIX$1}-${component}`, additionalClassNames);
14790
14837
  var Table = (0, react.forwardRef)((_ref, ref) => {
14791
- let { children, className, nonAria, slot } = _ref, restProps = _objectWithoutProperties(_ref, _excluded$52);
14838
+ let { children, className, nonAria, slot } = _ref, restProps = _objectWithoutProperties(_ref, _excluded$54);
14792
14839
  return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(nonAria ? "table" : react_aria_components.Table, _objectSpread2(_objectSpread2({
14793
14840
  className: getClassName(TableSubComponent.Table, className),
14794
14841
  slot: slot !== null && slot !== void 0 ? slot : void 0
@@ -14799,8 +14846,8 @@ var Table = (0, react.forwardRef)((_ref, ref) => {
14799
14846
  });
14800
14847
  Table.displayName = TableSubComponent.Table;
14801
14848
  var TableHeaderInner = (_ref2, ref) => {
14802
- let { children, className, hideHeader, nonAria } = _ref2, restProps = _objectWithoutProperties(_ref2, _excluded2$4);
14803
- return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(nonAria ? "thead" : react_aria_components.TableHeader, _objectSpread2(_objectSpread2({ className: getClassName(TableSubComponent.TableHeader, className, hideHeader) }, restProps), {}, {
14849
+ let { children, className, nonAria } = _ref2, restProps = _objectWithoutProperties(_ref2, _excluded2$5);
14850
+ return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(nonAria ? "thead" : react_aria_components.TableHeader, _objectSpread2(_objectSpread2({ className: getClassName(TableSubComponent.TableHeader, className) }, restProps), {}, {
14804
14851
  ref,
14805
14852
  children: withRenderProp(children, (node) => node)
14806
14853
  }));
@@ -14830,8 +14877,11 @@ var RowInner = (_ref4, ref) => {
14830
14877
  var Row = (0, react.forwardRef)(RowInner);
14831
14878
  Row.displayName = TableSubComponent.Row;
14832
14879
  var Column = (0, react.forwardRef)((_ref5, ref) => {
14833
- let { children, className, nonAria, id, alignment = Alignment.Left, colSpan = 1 } = _ref5, restProps = _objectWithoutProperties(_ref5, _excluded5);
14834
- const dataProperties = toDataProperties({ align: toAlignmentDataValue(alignment) });
14880
+ let { children, className, nonAria, id, alignment = Alignment.Left, colSpan = 1, pinned } = _ref5, restProps = _objectWithoutProperties(_ref5, _excluded5);
14881
+ const dataProperties = toDataProperties({
14882
+ align: toAlignmentDataValue(alignment),
14883
+ pinned
14884
+ });
14835
14885
  const columnClassName = getClassName(TableSubComponent.Column, className);
14836
14886
  return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(nonAria ? "th" : react_aria_components.Column, _objectSpread2(_objectSpread2(_objectSpread2({ className: columnClassName }, restProps), dataProperties), {}, {
14837
14887
  ref,
@@ -14842,8 +14892,11 @@ var Column = (0, react.forwardRef)((_ref5, ref) => {
14842
14892
  });
14843
14893
  Column.displayName = TableSubComponent.Column;
14844
14894
  var Cell = (0, react.forwardRef)((_ref6, ref) => {
14845
- let { children, className, nonAria, id, alignment } = _ref6, restProps = _objectWithoutProperties(_ref6, _excluded6);
14846
- const dataProperties = toDataProperties({ align: toAlignmentDataValue(alignment) });
14895
+ let { children, className, nonAria, id, alignment, pinned } = _ref6, restProps = _objectWithoutProperties(_ref6, _excluded6);
14896
+ const dataProperties = toDataProperties({
14897
+ align: toAlignmentDataValue(alignment),
14898
+ pinned
14899
+ });
14847
14900
  return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(nonAria ? "td" : react_aria_components.Cell, _objectSpread2(_objectSpread2(_objectSpread2({ className: getClassName(TableSubComponent.Cell, className) }, restProps), dataProperties), {}, {
14848
14901
  ref,
14849
14902
  id: id === null || id === void 0 ? void 0 : id.toString(),
@@ -14878,6 +14931,42 @@ const getColumnDefs = (columnConfig) => {
14878
14931
  });
14879
14932
  });
14880
14933
  };
14934
+ const computePinningStyles = (headerGroups, widths) => {
14935
+ var _headerGroups$at$head, _headerGroups$at;
14936
+ const leafHeaders = (_headerGroups$at$head = (_headerGroups$at = headerGroups.at(-1)) === null || _headerGroups$at === void 0 ? void 0 : _headerGroups$at.headers) !== null && _headerGroups$at$head !== void 0 ? _headerGroups$at$head : [];
14937
+ const styles = /* @__PURE__ */ new Map();
14938
+ const accumulate = (headersInOrder, side) => {
14939
+ let offset$1 = 0;
14940
+ for (const header of headersInOrder) {
14941
+ var _widths$header$column;
14942
+ if (header.column.getIsPinned() !== side) continue;
14943
+ styles.set(header.column.id, {
14944
+ position: "sticky",
14945
+ [side]: `${offset$1}px`
14946
+ });
14947
+ offset$1 += (_widths$header$column = widths[header.column.id]) !== null && _widths$header$column !== void 0 ? _widths$header$column : 0;
14948
+ }
14949
+ };
14950
+ accumulate(leafHeaders, "left");
14951
+ accumulate([...leafHeaders].reverse(), "right");
14952
+ return styles;
14953
+ };
14954
+ const getColumnPinning = (columnConfig) => {
14955
+ const left = [];
14956
+ const right = [];
14957
+ for (const col of columnConfig) if (isLeafColumn(col)) {
14958
+ if (col.pinning === "left") left.push(col.id);
14959
+ else if (col.pinning === "right") right.push(col.id);
14960
+ } else {
14961
+ const nested = getColumnPinning(col.columns);
14962
+ left.push(...nested.left);
14963
+ right.push(...nested.right);
14964
+ }
14965
+ return {
14966
+ left,
14967
+ right
14968
+ };
14969
+ };
14881
14970
  const Loader = ({ children, size = 28 }) => {
14882
14971
  return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("span", {
14883
14972
  className: "Layer__loader",
@@ -14893,7 +14982,7 @@ var DEFAULT_NUM_ROWS = 15;
14893
14982
  var HEADER_HEIGHT = 52;
14894
14983
  var DEFAULT_TABLE_HEIGHT = DEFAULT_ROW_HEIGHT * DEFAULT_NUM_ROWS + HEADER_HEIGHT - 1;
14895
14984
  var CSS_PREFIX = "Layer__UI__VirtualizedTable";
14896
- var EMPTY_ARRAY$3 = [];
14985
+ var EMPTY_ARRAY$4 = [];
14897
14986
  const VirtualizedDataTable = ({ columnConfig, data, isLoading, isError, componentName, ariaLabel, slots, shrinkHeightToFitRows = false, height = DEFAULT_TABLE_HEIGHT, rowHeight = DEFAULT_ROW_HEIGHT, overscan = DEFAULT_OVERSCAN }) => {
14898
14987
  const { EmptyState: EmptyState$6, ErrorState: ErrorState$5 } = slots;
14899
14988
  const containerRef = (0, react.useRef)(null);
@@ -14909,7 +14998,7 @@ const VirtualizedDataTable = ({ columnConfig, data, isLoading, isError, componen
14909
14998
  shrinkHeightToFitRows
14910
14999
  ]);
14911
15000
  const table$1 = (0, __tanstack_react_table.useReactTable)({
14912
- data: data !== null && data !== void 0 ? data : EMPTY_ARRAY$3,
15001
+ data: data !== null && data !== void 0 ? data : EMPTY_ARRAY$4,
14913
15002
  columns: getColumnDefs(columnConfig),
14914
15003
  getCoreRowModel: (0, __tanstack_react_table.getCoreRowModel)(),
14915
15004
  getSortedRowModel: (0, __tanstack_react_table.getSortedRowModel)()
@@ -15919,7 +16008,7 @@ function useDelayedRemoveBankTransaction({ bankTransaction, onRemove }) {
15919
16008
  }, [bankTransaction.recently_categorized]);
15920
16009
  return (0, react.useMemo)(() => ({ isBeingRemoved }), [isBeingRemoved]);
15921
16010
  }
15922
- var _excluded$51 = ["bankTransactionId"];
16011
+ var _excluded$53 = ["bankTransactionId"];
15923
16012
  var CATEGORIZE_BANK_TRANSACTION_TAG = "#categorize-bank-transaction";
15924
16013
  var categorizeBankTransaction = put(({ businessId, bankTransactionId }) => `/v1/businesses/${businessId}/bank-transactions/${bankTransactionId}/categorize`);
15925
16014
  function buildKey$72({ access_token: accessToken, apiUrl, businessId }) {
@@ -15943,7 +16032,7 @@ function useCategorizeBankTransaction() {
15943
16032
  apiUrl: auth === null || auth === void 0 ? void 0 : auth.apiUrl,
15944
16033
  businessId
15945
16034
  })), ({ accessToken, apiUrl, businessId: businessId$1 }, _ref) => {
15946
- let { arg: _ref2 } = _ref, { bankTransactionId } = _ref2, rest = _objectWithoutProperties(_ref2, _excluded$51);
16035
+ let { arg: _ref2 } = _ref, { bankTransactionId } = _ref2, rest = _objectWithoutProperties(_ref2, _excluded$53);
15947
16036
  return categorizeBankTransaction(apiUrl, accessToken, {
15948
16037
  params: {
15949
16038
  businessId: businessId$1,
@@ -16009,7 +16098,7 @@ function useCategorizeBankTransactionWithCacheUpdate() {
16009
16098
  isError
16010
16099
  ]);
16011
16100
  }
16012
- var _excluded$50 = ["bankTransactionId"];
16101
+ var _excluded$52 = ["bankTransactionId"];
16013
16102
  var matchBankTransaction = put(({ businessId, bankTransactionId }) => `/v1/businesses/${businessId}/bank-transactions/${bankTransactionId}/match`);
16014
16103
  var MATCH_BANK_TRANSACTION_TAG = "#match-bank-transaction";
16015
16104
  function buildKey$71({ access_token: accessToken, apiUrl, businessId }) {
@@ -16033,7 +16122,7 @@ function useMatchBankTransaction() {
16033
16122
  apiUrl: auth === null || auth === void 0 ? void 0 : auth.apiUrl,
16034
16123
  businessId
16035
16124
  })), ({ accessToken, apiUrl, businessId: businessId$1 }, _ref) => {
16036
- let { arg: _ref2 } = _ref, { bankTransactionId } = _ref2, body = _objectWithoutProperties(_ref2, _excluded$50);
16125
+ let { arg: _ref2 } = _ref, { bankTransactionId } = _ref2, body = _objectWithoutProperties(_ref2, _excluded$52);
16037
16126
  return matchBankTransaction(apiUrl, accessToken, {
16038
16127
  params: {
16039
16128
  businessId: businessId$1,
@@ -16161,14 +16250,14 @@ function useDelayedVisibility({ delay, initialVisibility = false }) {
16161
16250
  }, []);
16162
16251
  return { isVisible };
16163
16252
  }
16164
- var _excluded$49 = ["size"];
16253
+ var _excluded$51 = ["size"];
16165
16254
  var File$1 = (_ref) => {
16166
16255
  let { size = 12 } = _ref;
16167
16256
  return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("svg", _objectSpread2(_objectSpread2({
16168
16257
  xmlns: "http://www.w3.org/2000/svg",
16169
16258
  viewBox: "0 0 12 12",
16170
16259
  fill: "none"
16171
- }, _objectWithoutProperties(_ref, _excluded$49)), {}, {
16260
+ }, _objectWithoutProperties(_ref, _excluded$51)), {}, {
16172
16261
  width: size,
16173
16262
  height: size,
16174
16263
  children: [
@@ -16270,7 +16359,7 @@ const variants = {
16270
16359
  }
16271
16360
  }
16272
16361
  };
16273
- var _excluded$48 = [
16362
+ var _excluded$50 = [
16274
16363
  "as",
16275
16364
  "children",
16276
16365
  "variant",
@@ -16279,7 +16368,7 @@ var _excluded$48 = [
16279
16368
  "motionKey"
16280
16369
  ];
16281
16370
  function AnimatedPresenceElementInner(_ref, ref) {
16282
- let { as, children, variant, isOpen, slotProps = { AnimatePresence: { initial: false } }, motionKey } = _ref, props = _objectWithoutProperties(_ref, _excluded$48);
16371
+ let { as, children, variant, isOpen, slotProps = { AnimatePresence: { initial: false } }, motionKey } = _ref, props = _objectWithoutProperties(_ref, _excluded$50);
16283
16372
  const config = variants[variant];
16284
16373
  const MotionComponent = motion_react.motion[as !== null && as !== void 0 ? as : "div"];
16285
16374
  return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(motion_react.AnimatePresence, _objectSpread2(_objectSpread2({}, slotProps.AnimatePresence), {}, { children: isOpen && /* @__PURE__ */ (0, react_jsx_runtime.jsx)(MotionComponent, _objectSpread2(_objectSpread2({
@@ -16424,14 +16513,14 @@ function useBookkeepingPeriods() {
16424
16513
  return Reflect.get(target, prop);
16425
16514
  } });
16426
16515
  }
16427
- var _excluded$47 = ["size"];
16516
+ var _excluded$49 = ["size"];
16428
16517
  var Clock$2 = (_ref) => {
16429
16518
  let { size = 18 } = _ref;
16430
16519
  return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("svg", _objectSpread2(_objectSpread2({
16431
16520
  xmlns: "http://www.w3.org/2000/svg",
16432
16521
  viewBox: "0 0 18 18",
16433
16522
  fill: "none"
16434
- }, _objectWithoutProperties(_ref, _excluded$47)), {}, {
16523
+ }, _objectWithoutProperties(_ref, _excluded$49)), {}, {
16435
16524
  width: size,
16436
16525
  height: size,
16437
16526
  children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("path", {
@@ -16936,14 +17025,14 @@ const useSplitsForm = ({ bankTransaction, selectedCategory, isOpen }) => {
16936
17025
  saveLocalSplitsToCategoryStore
16937
17026
  };
16938
17027
  };
16939
- var _excluded$46 = ["size"];
17028
+ var _excluded$48 = ["size"];
16940
17029
  var ScissorsFullOpen = (_ref) => {
16941
17030
  let { size = 12 } = _ref;
16942
17031
  return /* @__PURE__ */ (0, react_jsx_runtime.jsx)("svg", _objectSpread2(_objectSpread2({
16943
17032
  viewBox: "0 0 12 12",
16944
17033
  fill: "none",
16945
17034
  xmlns: "http://www.w3.org/2000/svg"
16946
- }, _objectWithoutProperties(_ref, _excluded$46)), {}, {
17035
+ }, _objectWithoutProperties(_ref, _excluded$48)), {}, {
16947
17036
  width: size,
16948
17037
  height: size,
16949
17038
  children: /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("g", {
@@ -16989,14 +17078,14 @@ var ScissorsFullOpen = (_ref) => {
16989
17078
  }));
16990
17079
  };
16991
17080
  var ScissorsFullOpen_default = ScissorsFullOpen;
16992
- var _excluded$45 = ["size"];
17081
+ var _excluded$47 = ["size"];
16993
17082
  var Trash$1 = (_ref) => {
16994
17083
  let { size = 18 } = _ref;
16995
17084
  return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("svg", _objectSpread2(_objectSpread2({
16996
17085
  xmlns: "http://www.w3.org/2000/svg",
16997
17086
  viewBox: "0 0 18 18",
16998
17087
  fill: "none"
16999
- }, _objectWithoutProperties(_ref, _excluded$45)), {}, {
17088
+ }, _objectWithoutProperties(_ref, _excluded$47)), {}, {
17000
17089
  width: size,
17001
17090
  height: size,
17002
17091
  children: [
@@ -17744,9 +17833,9 @@ const ReceiptsProvider = ({ children, bankTransaction, isActive }) => {
17744
17833
  children
17745
17834
  });
17746
17835
  };
17747
- var _excluded$44 = ["size"];
17836
+ var _excluded$46 = ["size"];
17748
17837
  var Eye = (_ref) => {
17749
- let { size = 18 } = _ref, props = _objectWithoutProperties(_ref, _excluded$44);
17838
+ let { size = 18 } = _ref, props = _objectWithoutProperties(_ref, _excluded$46);
17750
17839
  return /* @__PURE__ */ (0, react_jsx_runtime.jsx)("svg", _objectSpread2(_objectSpread2({
17751
17840
  xmlns: "http://www.w3.org/2000/svg",
17752
17841
  width: size,
@@ -17840,9 +17929,9 @@ const FileThumb = ({ url, floatingActions = false, uploadPending, deletePending,
17840
17929
  }) : null]
17841
17930
  });
17842
17931
  };
17843
- var _excluded$43 = ["className", "children"];
17932
+ var _excluded$45 = ["className", "children"];
17844
17933
  const TextButton = (_ref) => {
17845
- let { className, children } = _ref, props = _objectWithoutProperties(_ref, _excluded$43);
17934
+ let { className, children } = _ref, props = _objectWithoutProperties(_ref, _excluded$45);
17846
17935
  const baseClassName$1 = (0, classnames.default)("Layer__text-btn", className);
17847
17936
  return /* @__PURE__ */ (0, react_jsx_runtime.jsx)("button", _objectSpread2(_objectSpread2({}, props), {}, {
17848
17937
  className: baseClassName$1,
@@ -17888,7 +17977,7 @@ const FileInput = ({ text, onUpload, disabled = false, secondary, iconOnly = fal
17888
17977
  style: { display: "none" }
17889
17978
  })] });
17890
17979
  };
17891
- var _excluded$42 = ["bankTransaction", "isActive"];
17980
+ var _excluded$44 = ["bankTransaction", "isActive"];
17892
17981
  var MAX_RECEIPTS_COUNT = 10;
17893
17982
  var openReceiptInNewTab = (url, receiptTitle) => (e) => {
17894
17983
  e.preventDefault();
@@ -17909,7 +17998,7 @@ var BankTransactionReceiptsWithProvider = (0, react.forwardRef)((_ref, ref) => {
17909
17998
  return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(ReceiptsProvider, {
17910
17999
  bankTransaction,
17911
18000
  isActive,
17912
- children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(BankTransactionReceipts, _objectSpread2(_objectSpread2({}, _objectWithoutProperties(_ref, _excluded$42)), {}, { ref }))
18001
+ children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(BankTransactionReceipts, _objectSpread2(_objectSpread2({}, _objectWithoutProperties(_ref, _excluded$44)), {}, { ref }))
17913
18002
  });
17914
18003
  });
17915
18004
  BankTransactionReceiptsWithProvider.displayName = "BankTransactionReceiptsWithProvider";
@@ -17988,14 +18077,14 @@ const getCurrencyFormatConfig = (intl) => {
17988
18077
  suffix: parts.slice(lastNumberIndex + 1).map((part) => part.value).join("")
17989
18078
  };
17990
18079
  };
17991
- var _excluded$41 = [
18080
+ var _excluded$43 = [
17992
18081
  "onChange",
17993
18082
  "className",
17994
18083
  "errorMessage",
17995
18084
  "isInvalid"
17996
18085
  ];
17997
18086
  const AmountInput = (_ref) => {
17998
- let { onChange, className, errorMessage, isInvalid } = _ref, props = _objectWithoutProperties(_ref, _excluded$41);
18087
+ let { onChange, className, errorMessage, isInvalid } = _ref, props = _objectWithoutProperties(_ref, _excluded$43);
17999
18088
  const intl = (0, react_intl.useIntl)();
18000
18089
  const formatter = useIntlFormatter();
18001
18090
  const currencyFormatConfig = (0, react.useMemo)(() => getCurrencyFormatConfig(intl), [intl]);
@@ -18635,14 +18724,14 @@ const BankTransactionsMobileListItemCheckbox = ({ bulkActionsEnabled, bankTransa
18635
18724
  })
18636
18725
  });
18637
18726
  };
18638
- var _excluded$40 = ["size"];
18727
+ var _excluded$42 = ["size"];
18639
18728
  var Paperclip = (_ref) => {
18640
18729
  let { size = 20 } = _ref;
18641
18730
  return /* @__PURE__ */ (0, react_jsx_runtime.jsx)("svg", _objectSpread2(_objectSpread2({
18642
18731
  xmlns: "http://www.w3.org/2000/svg",
18643
18732
  viewBox: "0 0 20 20",
18644
18733
  fill: "none"
18645
- }, _objectWithoutProperties(_ref, _excluded$40)), {}, {
18734
+ }, _objectWithoutProperties(_ref, _excluded$42)), {}, {
18646
18735
  width: size,
18647
18736
  height: size,
18648
18737
  children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)("path", {
@@ -19722,14 +19811,14 @@ const BankTransactionRow = ({ index, bankTransaction, initialLoad, showDescripti
19722
19811
  })
19723
19812
  }) })] });
19724
19813
  };
19725
- var _excluded$39 = ["size"];
19814
+ var _excluded$41 = ["size"];
19726
19815
  var Inbox = (_ref) => {
19727
19816
  let { size = 18 } = _ref;
19728
19817
  return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("svg", _objectSpread2(_objectSpread2({
19729
19818
  xmlns: "http://www.w3.org/2000/svg",
19730
19819
  viewBox: "0 0 18 18",
19731
19820
  fill: "none"
19732
- }, _objectWithoutProperties(_ref, _excluded$39)), {}, {
19821
+ }, _objectWithoutProperties(_ref, _excluded$41)), {}, {
19733
19822
  width: size,
19734
19823
  height: size,
19735
19824
  children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("path", {
@@ -20027,14 +20116,14 @@ function useArchiveCategorizationRule() {
20027
20116
  return Reflect.get(target, prop);
20028
20117
  } });
20029
20118
  }
20030
- var _excluded$38 = ["size"];
20119
+ var _excluded$40 = ["size"];
20031
20120
  var BackArrow = (_ref) => {
20032
20121
  let { size = 18 } = _ref;
20033
20122
  return /* @__PURE__ */ (0, react_jsx_runtime.jsx)("svg", _objectSpread2(_objectSpread2({
20034
20123
  viewBox: "0 0 12 12",
20035
20124
  fill: "none",
20036
20125
  xmlns: "http://www.w3.org/2000/svg"
20037
- }, _objectWithoutProperties(_ref, _excluded$38)), {}, {
20126
+ }, _objectWithoutProperties(_ref, _excluded$40)), {}, {
20038
20127
  width: size,
20039
20128
  height: size,
20040
20129
  children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)("path", {
@@ -20111,7 +20200,7 @@ const MobileListItem = ({ item, onClickItem, children }) => {
20111
20200
  }), children$1] }))
20112
20201
  }, item.id);
20113
20202
  };
20114
- var _excluded$37 = [
20203
+ var _excluded$39 = [
20115
20204
  "ariaLabel",
20116
20205
  "data",
20117
20206
  "slots",
@@ -20125,7 +20214,7 @@ var isSelectionEnabled = (props) => {
20125
20214
  return props.selectionMode !== "none" && props.enableSelection;
20126
20215
  };
20127
20216
  const MobileList = (props) => {
20128
- const { ariaLabel, data, slots, renderItem, onClickItem, isLoading, isError, selectionMode = "none" } = props, restSelectionProps = _objectWithoutProperties(props, _excluded$37);
20217
+ const { ariaLabel, data, slots, renderItem, onClickItem, isLoading, isError, selectionMode = "none" } = props, restSelectionProps = _objectWithoutProperties(props, _excluded$39);
20129
20218
  const { EmptyState: EmptyState$6, ErrorState: ErrorState$5 } = slots;
20130
20219
  const resolvedSelectionMode = isSelectionEnabled(props) ? selectionMode : "none";
20131
20220
  const resolvedSelectionBehavior = resolvedSelectionMode === "none" ? "toggle" : void 0;
@@ -20179,9 +20268,9 @@ const usePaginationRange = ({ totalCount, pageSize, siblingCount = 1, currentPag
20179
20268
  currentPage
20180
20269
  ]);
20181
20270
  };
20182
- var _excluded$36 = ["children", "isSelected"];
20271
+ var _excluded$38 = ["children", "isSelected"];
20183
20272
  var PaginationButton = (_ref) => {
20184
- let { children, isSelected } = _ref, buttonProps = _objectWithoutProperties(_ref, _excluded$36);
20273
+ let { children, isSelected } = _ref, buttonProps = _objectWithoutProperties(_ref, _excluded$38);
20185
20274
  return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(Button, _objectSpread2(_objectSpread2({
20186
20275
  inset: true,
20187
20276
  icon: true,
@@ -20248,14 +20337,14 @@ const Pagination = ({ onPageChange, totalCount, siblingCount = 1, currentPage, p
20248
20337
  })
20249
20338
  });
20250
20339
  };
20251
- var _excluded$35 = ["data", "paginationProps"];
20252
- var EMPTY_ARRAY$2 = [];
20340
+ var _excluded$37 = ["data", "paginationProps"];
20341
+ var EMPTY_ARRAY$3 = [];
20253
20342
  const PaginatedMobileList = (props) => {
20254
20343
  var _data$length;
20255
- const { data, paginationProps } = props, listProps = _objectWithoutProperties(props, _excluded$35);
20344
+ const { data, paginationProps } = props, listProps = _objectWithoutProperties(props, _excluded$37);
20256
20345
  const { initialPage = 0, onSetPage, pageSize = 20, hasMore, fetchMore, autoResetPageIndexRef } = paginationProps;
20257
20346
  const { pageItems, pageIndex, setPage } = usePaginatedList({
20258
- data: data !== null && data !== void 0 ? data : EMPTY_ARRAY$2,
20347
+ data: data !== null && data !== void 0 ? data : EMPTY_ARRAY$3,
20259
20348
  pageSize,
20260
20349
  initialPage,
20261
20350
  onSetPage
@@ -20370,9 +20459,55 @@ const CategorizationRulesMobileList = ({ data, isLoading, isError, paginationPro
20370
20459
  })
20371
20460
  });
20372
20461
  };
20373
- const DataTable = ({ isLoading, isError, componentName, ariaLabel, slots, hideHeader, dependencies: dependencies$1, data, headerGroups, numColumns, withClickableRow }) => {
20462
+ var WIDTH_CHANGE_THRESHOLD_PX = .5;
20463
+ var getLeafHeaderCells = (header) => {
20464
+ const leafRow = header === null || header === void 0 ? void 0 : header.lastElementChild;
20465
+ if (!leafRow) return null;
20466
+ return Array.from(leafRow.children);
20467
+ };
20468
+ var computeUpdatedWidths = (prev, columnIds, cells) => {
20469
+ let next = prev;
20470
+ columnIds.forEach((id, i) => {
20471
+ var _prev$id;
20472
+ const cell = cells[i];
20473
+ if (!cell) return;
20474
+ const width = cell.getBoundingClientRect().width;
20475
+ if (Math.abs(((_prev$id = prev[id]) !== null && _prev$id !== void 0 ? _prev$id : 0) - width) < WIDTH_CHANGE_THRESHOLD_PX) return;
20476
+ if (next === prev) next = _objectSpread2({}, prev);
20477
+ next[id] = width;
20478
+ });
20479
+ return next;
20480
+ };
20481
+ const useColumnHeaderWidths = (headerRef, columnIds) => {
20482
+ const [widths, setWidths] = (0, react.useState)({});
20483
+ (0, react.useLayoutEffect)(() => {
20484
+ const cells = getLeafHeaderCells(headerRef.current);
20485
+ if (!cells) return;
20486
+ const measure = () => {
20487
+ setWidths((prev) => computeUpdatedWidths(prev, columnIds, cells));
20488
+ };
20489
+ measure();
20490
+ const observer = new ResizeObserver(measure);
20491
+ cells.forEach((cell) => observer.observe(cell));
20492
+ return () => observer.disconnect();
20493
+ }, [headerRef, columnIds.join("|")]);
20494
+ return widths;
20495
+ };
20496
+ const useColumnPinningStyles = (headerGroups) => {
20497
+ const headerRef = (0, react.useRef)(null);
20498
+ const headerWidths = useColumnHeaderWidths(headerRef, (0, react.useMemo)(() => {
20499
+ var _headerGroups$at$head, _headerGroups$at;
20500
+ return (_headerGroups$at$head = (_headerGroups$at = headerGroups.at(-1)) === null || _headerGroups$at === void 0 ? void 0 : _headerGroups$at.headers.map((h) => h.column.id)) !== null && _headerGroups$at$head !== void 0 ? _headerGroups$at$head : [];
20501
+ }, [headerGroups]));
20502
+ return {
20503
+ headerRef,
20504
+ pinningStyles: (0, react.useMemo)(() => computePinningStyles(headerGroups, headerWidths), [headerGroups, headerWidths])
20505
+ };
20506
+ };
20507
+ const DataTable = ({ isLoading, isError, componentName, ariaLabel, slots, dependencies: dependencies$1, data, headerGroups, numColumns, withClickableRow }) => {
20374
20508
  const nonAria = headerGroups.length > 1;
20375
20509
  const { EmptyState: EmptyState$6, ErrorState: ErrorState$5 } = slots;
20510
+ const { headerRef, pinningStyles } = useColumnPinningStyles(headerGroups);
20376
20511
  const isEmptyTable = (data === null || data === void 0 ? void 0 : data.length) === 0;
20377
20512
  const renderTableBody = (0, react.useMemo)(() => {
20378
20513
  if (isError) return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(Row, {
@@ -20418,6 +20553,8 @@ const DataTable = ({ isLoading, isError, componentName, ariaLabel, slots, hideHe
20418
20553
  return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(Cell, {
20419
20554
  className: `Layer__UI__Table-Cell__${componentName}--${cell.column.id}`,
20420
20555
  alignment: (_cell$column$columnDe = cell.column.columnDef.meta) === null || _cell$column$columnDe === void 0 ? void 0 : _cell$column$columnDe.alignment,
20556
+ pinned: cell.column.getIsPinned(),
20557
+ style: pinningStyles.get(cell.column.id),
20421
20558
  nonAria,
20422
20559
  children: (0, __tanstack_react_table.flexRender)(cell.column.columnDef.cell, cell.getContext())
20423
20560
  }, `${row.id}-${cell.id}`);
@@ -20434,34 +20571,40 @@ const DataTable = ({ isLoading, isError, componentName, ariaLabel, slots, hideHe
20434
20571
  ErrorState$5,
20435
20572
  EmptyState$6,
20436
20573
  withClickableRow,
20437
- componentName
20574
+ componentName,
20575
+ pinningStyles
20438
20576
  ]);
20439
- return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(Table, {
20440
- "aria-label": ariaLabel,
20441
- className: `Layer__UI__Table__${componentName}`,
20442
- nonAria,
20443
- children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)(TableHeader, {
20444
- hideHeader,
20577
+ return /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
20578
+ className: "Layer__UI__Table-ScrollContainer",
20579
+ children: /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(Table, {
20580
+ "aria-label": ariaLabel,
20581
+ className: `Layer__UI__Table__${componentName}`,
20445
20582
  nonAria,
20446
- children: headerGroups.map((headerGroup) => /* @__PURE__ */ (0, react_jsx_runtime.jsx)(Row, {
20583
+ children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)(TableHeader, {
20584
+ ref: headerRef,
20447
20585
  nonAria,
20448
- children: headerGroup.headers.map((header) => {
20449
- var _header$column$column, _header$column$column2;
20450
- return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(Column, {
20451
- isRowHeader: (_header$column$column = header.column.columnDef.meta) === null || _header$column$column === void 0 ? void 0 : _header$column$column.isRowHeader,
20452
- className: `Layer__UI__Table-Column__${componentName}--${header.id}`,
20453
- alignment: (_header$column$column2 = header.column.columnDef.meta) === null || _header$column$column2 === void 0 ? void 0 : _header$column$column2.alignment,
20454
- nonAria,
20455
- colSpan: header.colSpan,
20456
- children: header.isPlaceholder ? null : typeof header.column.columnDef.header === "function" ? header.column.columnDef.header(header.getContext()) : header.column.columnDef.header
20457
- }, header.id);
20458
- })
20459
- }, headerGroup.id))
20460
- }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)(TableBody, {
20461
- dependencies: dependencies$1,
20462
- nonAria,
20463
- children: renderTableBody
20464
- })]
20586
+ children: headerGroups.map((headerGroup) => /* @__PURE__ */ (0, react_jsx_runtime.jsx)(Row, {
20587
+ nonAria,
20588
+ children: headerGroup.headers.map((header) => {
20589
+ var _header$column$column, _header$column$column2;
20590
+ return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(Column, {
20591
+ isRowHeader: (_header$column$column = header.column.columnDef.meta) === null || _header$column$column === void 0 ? void 0 : _header$column$column.isRowHeader,
20592
+ className: `Layer__UI__Table-Column__${componentName}--${header.id}`,
20593
+ alignment: (_header$column$column2 = header.column.columnDef.meta) === null || _header$column$column2 === void 0 ? void 0 : _header$column$column2.alignment,
20594
+ pinned: header.column.getIsPinned(),
20595
+ style: pinningStyles.get(header.column.id),
20596
+ nonAria,
20597
+ colSpan: header.colSpan,
20598
+ children: header.isPlaceholder ? null : typeof header.column.columnDef.header === "function" ? header.column.columnDef.header(header.getContext()) : header.column.columnDef.header
20599
+ }, header.id);
20600
+ })
20601
+ }, headerGroup.id))
20602
+ }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)(TableBody, {
20603
+ dependencies: dependencies$1,
20604
+ nonAria,
20605
+ children: renderTableBody
20606
+ })]
20607
+ })
20465
20608
  });
20466
20609
  };
20467
20610
  function PaginatedTable({ data, isLoading, isError, columnConfig, componentName, ariaLabel, paginationProps, slots }) {
@@ -21165,7 +21308,7 @@ const SuggestedCategorizationRuleUpdatesDialog = ({ isOpen, onOpenChange, ruleSu
21165
21308
  })] })
21166
21309
  });
21167
21310
  };
21168
- var _excluded$34 = [
21311
+ var _excluded$36 = [
21169
21312
  "onError",
21170
21313
  "showTags",
21171
21314
  "showCustomerVendor",
@@ -21177,7 +21320,7 @@ var _excluded$34 = [
21177
21320
  ];
21178
21321
  var COMPONENT_NAME$12 = "bank-transactions";
21179
21322
  const BankTransactions = (_ref) => {
21180
- let { onError, showTags = false, showCustomerVendor = false, monthlyView = false, applyGlobalDateRange = false, mode, renderInAppLink, filters } = _ref, restProps = _objectWithoutProperties(_ref, _excluded$34);
21323
+ let { onError, showTags = false, showCustomerVendor = false, monthlyView = false, applyGlobalDateRange = false, mode, renderInAppLink, filters } = _ref, restProps = _objectWithoutProperties(_ref, _excluded$36);
21181
21324
  usePreloadTagDimensions({ isEnabled: showTags });
21182
21325
  usePreloadCustomers({ isEnabled: showCustomerVendor });
21183
21326
  usePreloadVendors({ isEnabled: showCustomerVendor });
@@ -21483,9 +21626,9 @@ function QuickbooksContextProvider({ children }) {
21483
21626
  children
21484
21627
  });
21485
21628
  }
21486
- var _excluded$33 = ["size"];
21629
+ var _excluded$35 = ["size"];
21487
21630
  var Cog = (_ref) => {
21488
- let { size = 12 } = _ref, props = _objectWithoutProperties(_ref, _excluded$33);
21631
+ let { size = 12 } = _ref, props = _objectWithoutProperties(_ref, _excluded$35);
21489
21632
  const id = (0, react.useId)();
21490
21633
  return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("svg", _objectSpread2(_objectSpread2({
21491
21634
  xmlns: "http://www.w3.org/2000/svg",
@@ -21516,9 +21659,9 @@ var Cog = (_ref) => {
21516
21659
  }) })] }));
21517
21660
  };
21518
21661
  var Cog_default = Cog;
21519
- var _excluded$32 = ["size"];
21662
+ var _excluded$34 = ["size"];
21520
21663
  var QuickbooksIcon = (_ref) => {
21521
- let { size = 24 } = _ref, props = _objectWithoutProperties(_ref, _excluded$32);
21664
+ let { size = 24 } = _ref, props = _objectWithoutProperties(_ref, _excluded$34);
21522
21665
  return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("svg", _objectSpread2(_objectSpread2({
21523
21666
  xmlns: "http://www.w3.org/2000/svg",
21524
21667
  viewBox: "0 0 24 24",
@@ -21705,14 +21848,14 @@ function IntegrationsQuickbooksUnlinkConfirmationModal({ isOpen, onOpenChange })
21705
21848
  errorText: t("integrations:error.unlink_failed", "Unlink failed. Please check your connection and try again in a few seconds.")
21706
21849
  });
21707
21850
  }
21708
- var _excluded$31 = ["size"];
21851
+ var _excluded$33 = ["size"];
21709
21852
  var MoreVertical = (_ref) => {
21710
21853
  let { size = 18 } = _ref;
21711
21854
  return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("svg", _objectSpread2(_objectSpread2({
21712
21855
  viewBox: "0 0 16 14",
21713
21856
  fill: "none",
21714
21857
  xmlns: "http://www.w3.org/2000/svg"
21715
- }, _objectWithoutProperties(_ref, _excluded$31)), {}, {
21858
+ }, _objectWithoutProperties(_ref, _excluded$33)), {}, {
21716
21859
  width: size,
21717
21860
  height: size,
21718
21861
  children: [
@@ -21906,14 +22049,14 @@ const IntegrationsComponent = ({ stringOverrides }) => {
21906
22049
  ]
21907
22050
  });
21908
22051
  };
21909
- var _excluded$30 = ["size"];
22052
+ var _excluded$32 = ["size"];
21910
22053
  var PlusIcon = (_ref) => {
21911
22054
  let { size = 14 } = _ref;
21912
22055
  return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("svg", _objectSpread2(_objectSpread2({
21913
22056
  xmlns: "http://www.w3.org/2000/svg",
21914
22057
  viewBox: "0 0 16 16",
21915
22058
  fill: "none"
21916
- }, _objectWithoutProperties(_ref, _excluded$30)), {}, {
22059
+ }, _objectWithoutProperties(_ref, _excluded$32)), {}, {
21917
22060
  width: size,
21918
22061
  height: size,
21919
22062
  children: [
@@ -21988,14 +22131,14 @@ function useConfirmAndExcludeMultiple({ onSuccess }) {
21988
22131
  throwOnError: false
21989
22132
  });
21990
22133
  }
21991
- var _excluded$29 = ["size"];
22134
+ var _excluded$31 = ["size"];
21992
22135
  var InstitutionIcon = (_ref) => {
21993
22136
  let { size = 18 } = _ref;
21994
22137
  return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("svg", _objectSpread2(_objectSpread2({
21995
22138
  viewBox: "0 0 27 28",
21996
22139
  fill: "none",
21997
22140
  xmlns: "http://www.w3.org/2000/svg"
21998
- }, _objectWithoutProperties(_ref, _excluded$29)), {}, {
22141
+ }, _objectWithoutProperties(_ref, _excluded$31)), {}, {
21999
22142
  width: size,
22000
22143
  height: size,
22001
22144
  children: [
@@ -22521,10 +22664,10 @@ const MenuItem$1 = (0, react.forwardRef)(function MenuItem$2({ children, textVal
22521
22664
  children
22522
22665
  });
22523
22666
  });
22524
- var _excluded$28 = ["children", "status"];
22667
+ var _excluded$30 = ["children", "status"];
22525
22668
  var PILL_CLASS_NAME = "Layer__Pill";
22526
22669
  const Pill = (0, react.forwardRef)(function Pill$1(_ref, ref) {
22527
- let { children, status } = _ref, restProps = _objectWithoutProperties(_ref, _excluded$28);
22670
+ let { children, status } = _ref, restProps = _objectWithoutProperties(_ref, _excluded$30);
22528
22671
  const dataProperties = toDataProperties({ status });
22529
22672
  return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(react_aria_components.Button, _objectSpread2(_objectSpread2(_objectSpread2({}, restProps), dataProperties), {}, {
22530
22673
  className: PILL_CLASS_NAME,
@@ -23682,16 +23825,16 @@ const useProfitAndLossLTM = ({ tagFilter, reportingBasis, chartWindow }) => {
23682
23825
  isError
23683
23826
  };
23684
23827
  };
23685
- var _excluded$27 = [
23828
+ var _excluded$29 = [
23686
23829
  "verticalAnchor",
23687
23830
  "visibleTicksCount",
23688
23831
  "tickFormatter",
23689
23832
  "format",
23690
23833
  "payload"
23691
- ], _excluded2$3 = ["format"];
23834
+ ], _excluded2$4 = ["format"];
23692
23835
  var CustomizedYTick = (_ref) => {
23693
23836
  let { verticalAnchor: _verticalAnchor, visibleTicksCount: _visibleTicksCount, tickFormatter: _tickFormatter, format: format$1, payload } = _ref;
23694
- return /* @__PURE__ */ (0, react_jsx_runtime.jsx)("text", _objectSpread2(_objectSpread2({}, _objectWithoutProperties(_ref, _excluded$27)), {}, {
23837
+ return /* @__PURE__ */ (0, react_jsx_runtime.jsx)("text", _objectSpread2(_objectSpread2({}, _objectWithoutProperties(_ref, _excluded$29)), {}, {
23695
23838
  className: "Layer__ChartYAxis__tick",
23696
23839
  children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)("tspan", {
23697
23840
  dy: "0.355em",
@@ -23700,7 +23843,7 @@ var CustomizedYTick = (_ref) => {
23700
23843
  }));
23701
23844
  };
23702
23845
  const ChartYAxis = (_ref2) => {
23703
- let { format: format$1 } = _ref2, props = _objectWithoutProperties(_ref2, _excluded2$3);
23846
+ let { format: format$1 } = _ref2, props = _objectWithoutProperties(_ref2, _excluded2$4);
23704
23847
  const { formatNumber: formatNumber$1 } = useIntlFormatter();
23705
23848
  const formatYAxisValue = (0, react.useCallback)((value) => {
23706
23849
  if (!value) return value;
@@ -23731,12 +23874,12 @@ var shiftWindow = (chartWindow, months) => ({
23731
23874
  end: (0, date_fns.endOfMonth)((0, date_fns.add)(chartWindow.end, { months }))
23732
23875
  });
23733
23876
  const getChartWindow = ({ chartWindow, selectedDate, activationDate }) => {
23734
- const today$4 = (0, date_fns.startOfMonth)(Date.now());
23877
+ const today$5 = (0, date_fns.startOfMonth)(Date.now());
23735
23878
  const minStart = (0, date_fns.startOfMonth)(activationDate);
23736
23879
  const selected = (0, date_fns.startOfMonth)(selectedDate);
23737
23880
  const windowStart = (0, date_fns.startOfMonth)(chartWindow.start);
23738
23881
  const windowEnd = (0, date_fns.startOfMonth)(chartWindow.end);
23739
- if ((0, date_fns.differenceInMonths)(today$4, minStart) < MONTHS_IN_WINDOW) return buildWindow((0, date_fns.sub)(today$4, { months: MONTHS_IN_WINDOW - 1 }));
23882
+ if ((0, date_fns.differenceInMonths)(today$5, minStart) < MONTHS_IN_WINDOW) return buildWindow((0, date_fns.sub)(today$5, { months: MONTHS_IN_WINDOW - 1 }));
23740
23883
  const position = (0, date_fns.differenceInMonths)(selected, windowStart);
23741
23884
  if (position >= 1 && position <= 10) return chartWindow;
23742
23885
  if (position === 0) {
@@ -23744,7 +23887,7 @@ const getChartWindow = ({ chartWindow, selectedDate, activationDate }) => {
23744
23887
  return shift$1 > 0 ? shiftWindow(chartWindow, -shift$1) : chartWindow;
23745
23888
  }
23746
23889
  if (position === MONTHS_IN_WINDOW - 1) {
23747
- const shift$1 = Math.min(MAX_EDGE_SHIFT, (0, date_fns.differenceInMonths)(today$4, windowEnd));
23890
+ const shift$1 = Math.min(MAX_EDGE_SHIFT, (0, date_fns.differenceInMonths)(today$5, windowEnd));
23748
23891
  return shift$1 > 0 ? shiftWindow(chartWindow, shift$1) : chartWindow;
23749
23892
  }
23750
23893
  const monthsFromActivation = (0, date_fns.differenceInMonths)(selected, minStart);
@@ -23868,7 +24011,7 @@ const ProfitAndLossChartSelectionIndicator = ({ viewBox, selected }) => {
23868
24011
  height: "calc(100% - 30px)"
23869
24012
  });
23870
24013
  };
23871
- var _excluded$26 = ["payload", "fill"];
24014
+ var _excluded$28 = ["payload", "fill"];
23872
24015
  var BAR_RADIUS$1 = [
23873
24016
  2,
23874
24017
  2,
@@ -23888,7 +24031,7 @@ const ProfitAndLossChartBar = ({ dataKey, xAxisId, cellFill, className, barSize,
23888
24031
  isAnimationActive: barAnimation,
23889
24032
  fill: cellFill,
23890
24033
  shape: (0, react.useCallback)((props) => {
23891
- const { payload, fill } = props, restProps = _objectWithoutProperties(props, _excluded$26);
24034
+ const { payload, fill } = props, restProps = _objectWithoutProperties(props, _excluded$28);
23892
24035
  const shouldRound = payload && isOutermostBar(payload, dataKey, xAxisId);
23893
24036
  return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(recharts.Rectangle, _objectSpread2(_objectSpread2({}, restProps), {}, {
23894
24037
  fill,
@@ -23950,14 +24093,14 @@ const ProfitAndLossChartLegend = () => {
23950
24093
  })), [t]))
23951
24094
  });
23952
24095
  };
23953
- var _excluded$25 = ["size"];
24096
+ var _excluded$27 = ["size"];
23954
24097
  var BarChart2 = (_ref) => {
23955
24098
  let { size = 12 } = _ref;
23956
24099
  return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("svg", _objectSpread2(_objectSpread2({
23957
24100
  xmlns: "http://www.w3.org/2000/svg",
23958
24101
  viewBox: "0 0 12 12",
23959
24102
  fill: "none"
23960
- }, _objectWithoutProperties(_ref, _excluded$25)), {}, {
24103
+ }, _objectWithoutProperties(_ref, _excluded$27)), {}, {
23961
24104
  width: size,
23962
24105
  height: size,
23963
24106
  children: [
@@ -24000,7 +24143,7 @@ const ProfitAndLossChartStateCard = () => {
24000
24143
  })]
24001
24144
  });
24002
24145
  };
24003
- var _excluded$24 = [
24146
+ var _excluded$26 = [
24004
24147
  "content",
24005
24148
  "cursorWidth",
24006
24149
  "animationDuration",
@@ -24036,7 +24179,7 @@ const ChartTooltipCursor = ({ width, points, height }) => {
24036
24179
  });
24037
24180
  };
24038
24181
  const ChartTooltip = (_ref) => {
24039
- let { content, cursorWidth, animationDuration = 100, animationEasing = "ease-out" } = _ref, props = _objectWithoutProperties(_ref, _excluded$24);
24182
+ let { content, cursorWidth, animationDuration = 100, animationEasing = "ease-out" } = _ref, props = _objectWithoutProperties(_ref, _excluded$26);
24040
24183
  return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(recharts.Tooltip, _objectSpread2({
24041
24184
  wrapperClassName: "Layer__ChartTooltip__wrapper",
24042
24185
  content,
@@ -24297,9 +24440,9 @@ const ProfitAndLossChart = ({ tagFilter }) => {
24297
24440
  }, "pnl-chart"), isSyncing ? /* @__PURE__ */ (0, react_jsx_runtime.jsx)(ProfitAndLossChartStateCard, {}) : null]
24298
24441
  });
24299
24442
  };
24300
- var _excluded$23 = ["className", "textOnly"];
24443
+ var _excluded$25 = ["className", "textOnly"];
24301
24444
  const BackButton = (_ref) => {
24302
- let { className, textOnly = false } = _ref, props = _objectWithoutProperties(_ref, _excluded$23);
24445
+ let { className, textOnly = false } = _ref, props = _objectWithoutProperties(_ref, _excluded$25);
24303
24446
  const baseClassName$1 = (0, classnames.default)("Layer__btn", "Layer__back-btn", className);
24304
24447
  return /* @__PURE__ */ (0, react_jsx_runtime.jsx)("button", _objectSpread2(_objectSpread2({}, props), {}, {
24305
24448
  className: baseClassName$1,
@@ -24473,7 +24616,7 @@ const DetailedChart = ({ data, isLoading, interactionProps, stylingProps, slots
24473
24616
  })]
24474
24617
  });
24475
24618
  };
24476
- var _excluded$22 = ["size"];
24619
+ var _excluded$24 = ["size"];
24477
24620
  var ClassNames = {
24478
24621
  DESC_ARROW: "Layer__SortArrows__DescArrow",
24479
24622
  ASC_ARROW: "Layer__SortArrows__AscArrow"
@@ -24484,7 +24627,7 @@ var SortArrows = (_ref) => {
24484
24627
  xmlns: "http://www.w3.org/2000/svg",
24485
24628
  viewBox: "0 0 12 13",
24486
24629
  fill: "none"
24487
- }, _objectWithoutProperties(_ref, _excluded$22)), {}, {
24630
+ }, _objectWithoutProperties(_ref, _excluded$24)), {}, {
24488
24631
  width: size,
24489
24632
  height: size,
24490
24633
  children: [/* @__PURE__ */ (0, react_jsx_runtime.jsxs)("g", {
@@ -24622,7 +24765,7 @@ var RegularValueIcon = ({ colorMapping }) => {
24622
24765
  })
24623
24766
  });
24624
24767
  };
24625
- var _excluded$21 = ["data"];
24768
+ var _excluded$23 = ["data"];
24626
24769
  const DetailedTable = ({ stylingProps, sortParams, sortFunction, interactionProps, rows, stringOverrides }) => {
24627
24770
  const { t } = (0, react_i18next.useTranslation)();
24628
24771
  const setAndToggleSortDirection = (params) => {
@@ -24753,7 +24896,7 @@ const DetailedTable = ({ stylingProps, sortParams, sortFunction, interactionProp
24753
24896
  });
24754
24897
  };
24755
24898
  const DetailedTableWithData = (_ref) => {
24756
- let { data } = _ref, props = _objectWithoutProperties(_ref, _excluded$21);
24899
+ let { data } = _ref, props = _objectWithoutProperties(_ref, _excluded$23);
24757
24900
  return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(DetailedTable, _objectSpread2({ rows: useDetailedTableRows({ data }) }, props));
24758
24901
  };
24759
24902
  function useGlobalDatePickerBounds() {
@@ -24907,9 +25050,9 @@ const LedgerAccountsContext = (0, react.createContext)({
24907
25050
  hasMore: false,
24908
25051
  fetchMore: () => {}
24909
25052
  });
24910
- var _excluded$20 = ["className", "textOnly"];
25053
+ var _excluded$22 = ["className", "textOnly"];
24911
25054
  const CloseButton = (_ref) => {
24912
- let { className, textOnly = false } = _ref, props = _objectWithoutProperties(_ref, _excluded$20);
25055
+ let { className, textOnly = false } = _ref, props = _objectWithoutProperties(_ref, _excluded$22);
24913
25056
  const baseClassName$1 = (0, classnames.default)("Layer__btn", "Layer__back-btn", className);
24914
25057
  return /* @__PURE__ */ (0, react_jsx_runtime.jsx)("button", _objectSpread2(_objectSpread2({}, props), {}, {
24915
25058
  className: baseClassName$1,
@@ -27335,7 +27478,7 @@ function TransactionsToReview({ onClick, tagFilter = void 0, variants: variants$
27335
27478
  })]
27336
27479
  });
27337
27480
  }
27338
- var _excluded$19 = ["onTransactionsToReviewClick"];
27481
+ var _excluded$21 = ["onTransactionsToReviewClick"];
27339
27482
  var SECTION_CLASS_NAMES = `Layer__ProfitAndLossSummaries Layer__component`;
27340
27483
  function Internal_ProfitAndLossSummaries({ actionable = false, revenueLabel, stringOverrides, chartColorsList, slots, variants: variants$1 }) {
27341
27484
  var _effectiveData$income3, _effectiveData$income4, _effectiveData$income5, _data$netProfit;
@@ -27442,7 +27585,7 @@ function Internal_ProfitAndLossSummaries({ actionable = false, revenueLabel, str
27442
27585
  });
27443
27586
  }
27444
27587
  function ProfitAndLossSummaries(_ref) {
27445
- let { onTransactionsToReviewClick } = _ref, restProps = _objectWithoutProperties(_ref, _excluded$19);
27588
+ let { onTransactionsToReviewClick } = _ref, restProps = _objectWithoutProperties(_ref, _excluded$21);
27446
27589
  return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(Internal_ProfitAndLossSummaries, _objectSpread2(_objectSpread2({}, restProps), {}, { slots: { unstable_AdditionalListItems: onTransactionsToReviewClick ? [/* @__PURE__ */ (0, react_jsx_runtime.jsx)(TransactionsToReview, {
27447
27590
  variants: restProps.variants,
27448
27591
  onClick: onTransactionsToReviewClick
@@ -28767,14 +28910,14 @@ const ChartOfAccountsContext = (0, react.createContext)({
28767
28910
  changeFormData: () => {},
28768
28911
  submitForm: () => {}
28769
28912
  });
28770
- var _excluded$18 = ["size"];
28771
- var Plus$7 = (_ref) => {
28913
+ var _excluded$20 = ["size"];
28914
+ var Plus$8 = (_ref) => {
28772
28915
  let { size = 14 } = _ref;
28773
28916
  return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("svg", _objectSpread2(_objectSpread2({
28774
28917
  xmlns: "http://www.w3.org/2000/svg",
28775
28918
  viewBox: "0 0 14 14",
28776
28919
  fill: "none"
28777
- }, _objectWithoutProperties(_ref, _excluded$18)), {}, {
28920
+ }, _objectWithoutProperties(_ref, _excluded$20)), {}, {
28778
28921
  width: size,
28779
28922
  height: size,
28780
28923
  children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("path", {
@@ -28790,7 +28933,7 @@ var Plus$7 = (_ref) => {
28790
28933
  })]
28791
28934
  }));
28792
28935
  };
28793
- var Plus_default = Plus$7;
28936
+ var Plus_default = Plus$8;
28794
28937
  var getLedgerAccountBalancesCSV = get(({ businessId }) => `/v1/businesses/${businessId}/ledger/balances/exports/csv`);
28795
28938
  function buildKey$50({ access_token: accessToken, apiUrl, businessId, startCutoff, endCutoff }) {
28796
28939
  if (accessToken && apiUrl) return {
@@ -29042,14 +29185,14 @@ let LedgerAccountNodeType = /* @__PURE__ */ function(LedgerAccountNodeType$1) {
29042
29185
  LedgerAccountNodeType$1["Parent"] = "Parent";
29043
29186
  return LedgerAccountNodeType$1;
29044
29187
  }({});
29045
- var _excluded$17 = ["size"];
29188
+ var _excluded$19 = ["size"];
29046
29189
  var Edit2 = (_ref) => {
29047
29190
  let { size = 18 } = _ref;
29048
29191
  return /* @__PURE__ */ (0, react_jsx_runtime.jsx)("svg", _objectSpread2(_objectSpread2({
29049
29192
  xmlns: "http://www.w3.org/2000/svg",
29050
29193
  viewBox: "0 0 18 18",
29051
29194
  fill: "none"
29052
- }, _objectWithoutProperties(_ref, _excluded$17)), {}, {
29195
+ }, _objectWithoutProperties(_ref, _excluded$19)), {}, {
29053
29196
  width: size,
29054
29197
  height: size,
29055
29198
  children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)("path", {
@@ -30554,10 +30697,10 @@ const JournalEntryLineItem = ({ form, index, displayIndex, isReadOnly, onDeleteL
30554
30697
  })
30555
30698
  });
30556
30699
  };
30557
- var EMPTY_ARRAY$1 = [];
30700
+ var EMPTY_ARRAY$2 = [];
30558
30701
  const JournalEntryLineItemsTable = ({ form, isReadOnly, title, direction, showTags = false }) => {
30559
30702
  const { t } = (0, react_i18next.useTranslation)();
30560
- const lineItems = (0, __tanstack_react_form.useStore)(form.store, (state$14) => state$14.values.lineItems || EMPTY_ARRAY$1);
30703
+ const lineItems = (0, __tanstack_react_form.useStore)(form.store, (state$14) => state$14.values.lineItems || EMPTY_ARRAY$2);
30561
30704
  const filteredIndices = (0, react.useMemo)(() => {
30562
30705
  const indices = [];
30563
30706
  lineItems.forEach((item, index) => {
@@ -31592,14 +31735,14 @@ const TasksHeader = ({ tasksHeader }) => {
31592
31735
  })
31593
31736
  });
31594
31737
  };
31595
- var _excluded$16 = ["size"];
31738
+ var _excluded$18 = ["size"];
31596
31739
  var SmileIcon = (_ref) => {
31597
31740
  let { size = 12 } = _ref;
31598
31741
  return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("svg", _objectSpread2(_objectSpread2({
31599
31742
  viewBox: "0 0 12 12",
31600
31743
  fill: "none",
31601
31744
  xmlns: "http://www.w3.org/2000/svg"
31602
- }, _objectWithoutProperties(_ref, _excluded$16)), {}, {
31745
+ }, _objectWithoutProperties(_ref, _excluded$18)), {}, {
31603
31746
  width: size,
31604
31747
  height: size,
31605
31748
  children: [
@@ -31787,13 +31930,13 @@ function useSubmitUserResponseForTask() {
31787
31930
  return Reflect.get(target, prop);
31788
31931
  } });
31789
31932
  }
31790
- var _excluded$15 = [
31933
+ var _excluded$17 = [
31791
31934
  "className",
31792
31935
  "isInvalid",
31793
31936
  "errorMessage"
31794
31937
  ];
31795
31938
  const Textarea = (_ref) => {
31796
- let { className, isInvalid, errorMessage } = _ref, props = _objectWithoutProperties(_ref, _excluded$15);
31939
+ let { className, isInvalid, errorMessage } = _ref, props = _objectWithoutProperties(_ref, _excluded$17);
31797
31940
  const baseClassName$1 = (0, classnames.default)("Layer__textarea", isInvalid ? "Layer__textarea--error" : "", className);
31798
31941
  return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(DeprecatedTooltip, {
31799
31942
  disabled: !isInvalid || !errorMessage,
@@ -32291,14 +32434,14 @@ const useBookkeepingYearsStatus = () => {
32291
32434
  isLoading
32292
32435
  };
32293
32436
  };
32294
- var _excluded$14 = ["size"];
32437
+ var _excluded$16 = ["size"];
32295
32438
  var ArrowRightCircle = (_ref) => {
32296
32439
  let { size = 18 } = _ref;
32297
32440
  return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("svg", _objectSpread2(_objectSpread2({
32298
32441
  xmlns: "http://www.w3.org/2000/svg",
32299
32442
  viewBox: "0 0 18 18",
32300
32443
  fill: "none"
32301
- }, _objectWithoutProperties(_ref, _excluded$14)), {}, {
32444
+ }, _objectWithoutProperties(_ref, _excluded$16)), {}, {
32302
32445
  width: size,
32303
32446
  height: size,
32304
32447
  children: [
@@ -33535,14 +33678,14 @@ function LinkAccountsContent({ onComplete }) {
33535
33678
  })
33536
33679
  });
33537
33680
  }
33538
- var _excluded$13 = ["size"];
33681
+ var _excluded$15 = ["size"];
33539
33682
  var CoffeeIcon = (_ref) => {
33540
33683
  let { size = 11 } = _ref;
33541
33684
  return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("svg", _objectSpread2(_objectSpread2({
33542
33685
  xmlns: "http://www.w3.org/2000/svg",
33543
33686
  viewBox: "0 0 12 12",
33544
33687
  fill: "none"
33545
- }, _objectWithoutProperties(_ref, _excluded$13)), {}, {
33688
+ }, _objectWithoutProperties(_ref, _excluded$15)), {}, {
33546
33689
  width: size,
33547
33690
  height: size,
33548
33691
  children: [/* @__PURE__ */ (0, react_jsx_runtime.jsxs)("g", {
@@ -33591,7 +33734,7 @@ var CoffeeIcon = (_ref) => {
33591
33734
  }));
33592
33735
  };
33593
33736
  var Coffee_default = CoffeeIcon;
33594
- var _excluded$12 = [
33737
+ var _excluded$14 = [
33595
33738
  "className",
33596
33739
  "children",
33597
33740
  "variant",
@@ -33602,8 +33745,8 @@ var _excluded$12 = [
33602
33745
  "justify",
33603
33746
  "fullWidth"
33604
33747
  ];
33605
- const Link = (_ref) => {
33606
- let { className, children, variant = ButtonVariant.primary, leftIcon, rightIcon, iconOnly, iconAsPrimary = false, justify = "center", fullWidth } = _ref, props = _objectWithoutProperties(_ref, _excluded$12);
33748
+ const Link$1 = (_ref) => {
33749
+ let { className, children, variant = ButtonVariant.primary, leftIcon, rightIcon, iconOnly, iconAsPrimary = false, justify = "center", fullWidth } = _ref, props = _objectWithoutProperties(_ref, _excluded$14);
33607
33750
  const linkRef = (0, react.useRef)(null);
33608
33751
  let justifyContent = "center";
33609
33752
  if (justify) justifyContent = justify;
@@ -33659,7 +33802,7 @@ const BookkeepingUpsellBar = ({ onClick, href }) => {
33659
33802
  variant: ButtonVariant.secondary,
33660
33803
  onClick,
33661
33804
  children: t("bookkeeping:action.schedule_a_demo", "Schedule a demo")
33662
- }) : href ? /* @__PURE__ */ (0, react_jsx_runtime.jsx)(Link, {
33805
+ }) : href ? /* @__PURE__ */ (0, react_jsx_runtime.jsx)(Link$1, {
33663
33806
  href,
33664
33807
  target: "_blank",
33665
33808
  variant: ButtonVariant.secondary,
@@ -33701,14 +33844,14 @@ const useMileageSummaryGlobalCacheActions = () => {
33701
33844
  const { invalidate } = useGlobalCacheActions();
33702
33845
  return { invalidateMileageSummary: (0, react.useCallback)(() => invalidate(({ tags }) => tags.includes(MILEAGE_SUMMARY_TAG_KEY)), [invalidate]) };
33703
33846
  };
33704
- var _excluded$11 = ["size"];
33847
+ var _excluded$13 = ["size"];
33705
33848
  var ArrowRightCircleAlt = (_ref) => {
33706
33849
  let { size = 18 } = _ref;
33707
33850
  return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("svg", _objectSpread2(_objectSpread2({
33708
33851
  xmlns: "http://www.w3.org/2000/svg",
33709
33852
  viewBox: "0 0 18 18",
33710
33853
  fill: "none"
33711
- }, _objectWithoutProperties(_ref, _excluded$11)), {}, {
33854
+ }, _objectWithoutProperties(_ref, _excluded$13)), {}, {
33712
33855
  width: size,
33713
33856
  height: size,
33714
33857
  children: [
@@ -34989,14 +35132,14 @@ function getCustomerName(customer) {
34989
35132
  var _ref, _customer$individualN;
34990
35133
  return (_ref = (_customer$individualN = customer === null || customer === void 0 ? void 0 : customer.individualName) !== null && _customer$individualN !== void 0 ? _customer$individualN : customer === null || customer === void 0 ? void 0 : customer.companyName) !== null && _ref !== void 0 ? _ref : "Unknown Customer";
34991
35134
  }
34992
- var _excluded$10 = ["size"];
35135
+ var _excluded$12 = ["size"];
34993
35136
  var ChevronRightFill = (_ref) => {
34994
35137
  let { size = 18 } = _ref;
34995
35138
  return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("svg", _objectSpread2(_objectSpread2({
34996
35139
  xmlns: "http://www.w3.org/2000/svg",
34997
35140
  viewBox: "0 0 18 18",
34998
35141
  fill: "none"
34999
- }, _objectWithoutProperties(_ref, _excluded$10)), {}, {
35142
+ }, _objectWithoutProperties(_ref, _excluded$12)), {}, {
35000
35143
  width: size,
35001
35144
  height: size,
35002
35145
  children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("path", {
@@ -35027,8 +35170,7 @@ const DataTableHeader = ({ name: name$1, count, slotProps = {}, slots = {} }) =>
35027
35170
  children: [/* @__PURE__ */ (0, react_jsx_runtime.jsxs)(HStack, {
35028
35171
  align: "center",
35029
35172
  gap: "sm",
35030
- children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)(Span, {
35031
- weight: "bold",
35173
+ children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)(Heading, {
35032
35174
  size: "md",
35033
35175
  children: name$1
35034
35176
  }), showCount && (totalCount ? /* @__PURE__ */ (0, react_jsx_runtime.jsx)(Badge, {
@@ -37019,9 +37161,9 @@ const useCustomerForm = (props) => {
37019
37161
  submitError
37020
37162
  }), [form, submitError]);
37021
37163
  };
37022
- var _excluded$9 = ["onSuccess", "isReadOnly"];
37164
+ var _excluded$11 = ["onSuccess", "isReadOnly"];
37023
37165
  const CustomerForm = (_ref) => {
37024
- let { onSuccess, isReadOnly } = _ref, formState = _objectWithoutProperties(_ref, _excluded$9);
37166
+ let { onSuccess, isReadOnly } = _ref, formState = _objectWithoutProperties(_ref, _excluded$11);
37025
37167
  const { t } = (0, react_i18next.useTranslation)();
37026
37168
  const { form, submitError } = useCustomerForm(_objectSpread2({ onSuccess }, formState));
37027
37169
  return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(Form, {
@@ -37874,10 +38016,10 @@ const useInvoiceForm = (props) => {
37874
38016
  submitError
37875
38017
  ]);
37876
38018
  };
37877
- var _excluded$8 = ["isReadOnly"];
38019
+ var _excluded$10 = ["isReadOnly"];
37878
38020
  const InvoiceForm = (0, react.forwardRef)((props, ref) => {
37879
38021
  var _accountingConfig$ena;
37880
- const _useInvoiceDetail = useInvoiceDetail(), { isReadOnly } = _useInvoiceDetail, viewState = _objectWithoutProperties(_useInvoiceDetail, _excluded$8);
38022
+ const _useInvoiceDetail = useInvoiceDetail(), { isReadOnly } = _useInvoiceDetail, viewState = _objectWithoutProperties(_useInvoiceDetail, _excluded$10);
37881
38023
  const { mode } = viewState;
37882
38024
  const { onSuccess, onChangeFormState } = props;
37883
38025
  const { businessId } = useLayerContext();
@@ -38323,7 +38465,7 @@ const InvoiceDetail = () => {
38323
38465
  })
38324
38466
  ] });
38325
38467
  };
38326
- var _excluded$7 = [
38468
+ var _excluded$9 = [
38327
38469
  "className",
38328
38470
  "label",
38329
38471
  "meterOnly"
@@ -38334,7 +38476,7 @@ var getClassnameForSubComponent = (className, suffix) => {
38334
38476
  var METER_CLASS_NAME = "Layer__Meter";
38335
38477
  const Meter = (0, react.forwardRef)(function Meter$1(_ref, ref) {
38336
38478
  let { className, label: label$50, meterOnly } = _ref;
38337
- return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(react_aria_components.Meter, _objectSpread2(_objectSpread2(_objectSpread2({}, _objectWithoutProperties(_ref, _excluded$7)), {}, {
38479
+ return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(react_aria_components.Meter, _objectSpread2(_objectSpread2(_objectSpread2({}, _objectWithoutProperties(_ref, _excluded$9)), {}, {
38338
38480
  className: (0, classnames.default)(METER_CLASS_NAME, className),
38339
38481
  ref
38340
38482
  }, meterOnly && { "aria-label": label$50 }), {}, { children: ({ percentage, valueText }) => /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(VStack, {
@@ -38777,7 +38919,7 @@ const Invoices = ({ stringOverrides }) => {
38777
38919
  var InvoicesContent = () => {
38778
38920
  return useInvoiceRouteState().route === InvoiceRoute.Detail ? /* @__PURE__ */ (0, react_jsx_runtime.jsx)(InvoiceDetail, {}) : /* @__PURE__ */ (0, react_jsx_runtime.jsx)(InvoiceOverview, {});
38779
38921
  };
38780
- var _excluded$6 = ["containerRef", "stringOverrides"];
38922
+ var _excluded$8 = ["containerRef", "stringOverrides"];
38781
38923
  var COMPONENT_NAME$4 = "profit-and-loss";
38782
38924
  const ProfitAndLossView = (props) => {
38783
38925
  const containerRef = (0, react.useRef)(null);
@@ -38788,7 +38930,7 @@ const ProfitAndLossView = (props) => {
38788
38930
  });
38789
38931
  };
38790
38932
  var ProfitAndLossPanel = (_ref) => {
38791
- let { containerRef, stringOverrides } = _ref, props = _objectWithoutProperties(_ref, _excluded$6);
38933
+ let { containerRef, stringOverrides } = _ref, props = _objectWithoutProperties(_ref, _excluded$8);
38792
38934
  const { t } = (0, react_i18next.useTranslation)();
38793
38935
  const { sidebarScope } = (0, react.useContext)(ProfitAndLossContext);
38794
38936
  return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(Panel, {
@@ -38829,39 +38971,6 @@ var Components = ({ hideChart = false, hideTable = false, stringOverrides }) =>
38829
38971
  })]
38830
38972
  }), !hideTable && /* @__PURE__ */ (0, react_jsx_runtime.jsx)(ProfitAndLossTableWithProvider, { stringOverrides: stringOverrides === null || stringOverrides === void 0 ? void 0 : stringOverrides.profitAndLossTable })] });
38831
38973
  };
38832
- let ReportControl = /* @__PURE__ */ function(ReportControl$1) {
38833
- ReportControl$1["Date"] = "date";
38834
- ReportControl$1["DateRange"] = "date_range";
38835
- ReportControl$1["GroupBy"] = "group_by";
38836
- ReportControl$1["Unknown"] = "unknown";
38837
- return ReportControl$1;
38838
- }({});
38839
- let ReportGroupType = /* @__PURE__ */ function(ReportGroupType$1) {
38840
- ReportGroupType$1["Accounting"] = "accounting";
38841
- ReportGroupType$1["Unknown"] = "unknown";
38842
- return ReportGroupType$1;
38843
- }({});
38844
- var ReportControlSchema = effect.Schema.Enums(ReportControl);
38845
- var ReportGroupTypeSchema = effect.Schema.Enums(ReportGroupType);
38846
- var TransformedReportControlSchema = createTransformedEnumSchema(ReportControlSchema, ReportControl, ReportControl.Unknown);
38847
- var TransformedReportGroupTypeSchema = createTransformedEnumSchema(ReportGroupTypeSchema, ReportGroupType, ReportGroupType.Unknown);
38848
- const ReportConfigSchema = effect.Schema.Struct({
38849
- key: effect.Schema.String,
38850
- reportRoute: (0, effect.pipe)(effect.Schema.propertySignature(effect.Schema.String), effect.Schema.fromKey("report_route")),
38851
- displayName: (0, effect.pipe)(effect.Schema.propertySignature(effect.Schema.String), effect.Schema.fromKey("display_name")),
38852
- controls: effect.Schema.Array(TransformedReportControlSchema),
38853
- baseQueryParameters: (0, effect.pipe)(effect.Schema.propertySignature(effect.Schema.Record({
38854
- key: effect.Schema.String,
38855
- value: effect.Schema.String
38856
- })), effect.Schema.fromKey("base_query_parameters")),
38857
- isDefaultReport: effect.Schema.optional(effect.Schema.Boolean).pipe(effect.Schema.fromKey("is_default_report"))
38858
- });
38859
- const ReportGroupSchema = effect.Schema.Struct({
38860
- groupType: (0, effect.pipe)(effect.Schema.propertySignature(TransformedReportGroupTypeSchema), effect.Schema.fromKey("group_type")),
38861
- displayName: (0, effect.pipe)(effect.Schema.propertySignature(effect.Schema.String), effect.Schema.fromKey("display_name")),
38862
- reports: effect.Schema.Array(ReportConfigSchema)
38863
- });
38864
- const ReportConfigResponseSchema = effect.Schema.Struct({ data: effect.Schema.Array(ReportGroupSchema) });
38865
38974
  const REPORT_CONFIG_TAG_KEY = "#report-config";
38866
38975
  var getReportConfig = get(({ businessId }) => `/v1/businesses/${businessId}/reports/config`);
38867
38976
  function buildKey$26({ access_token: accessToken, apiUrl, businessId }) {
@@ -38890,11 +38999,14 @@ const hasControl = (report, control) => {
38890
38999
  return (_report$controls$incl = report === null || report === void 0 ? void 0 : report.controls.includes(control)) !== null && _report$controls$incl !== void 0 ? _report$controls$incl : false;
38891
39000
  };
38892
39001
  var UnifiedReportStoreContext = (0, react.createContext)((0, zustand.createStore)(() => ({
38893
- report: null,
39002
+ baseReport: null,
39003
+ detailReportConfig: null,
38894
39004
  groupBy: DateGroupBy.AllTime,
38895
39005
  dateSelectionMode: "full",
38896
39006
  actions: {
38897
- setReport: () => {},
39007
+ setBaseReport: () => {},
39008
+ openDetailReport: () => {},
39009
+ closeDetailReport: () => {},
38898
39010
  setGroupBy: () => {}
38899
39011
  }
38900
39012
  })));
@@ -38903,12 +39015,43 @@ function useUnifiedReportDateSelectionMode() {
38903
39015
  }
38904
39016
  function useActiveUnifiedReport() {
38905
39017
  const store = (0, react.useContext)(UnifiedReportStoreContext);
38906
- const report = (0, zustand.useStore)(store, (state$14) => state$14.report);
38907
- const setReport = (0, zustand.useStore)(store, (state$14) => state$14.actions.setReport);
39018
+ const baseReport = (0, zustand.useStore)(store, (state$14) => state$14.baseReport);
39019
+ const detailReportConfig = (0, zustand.useStore)(store, (state$14) => state$14.detailReportConfig);
39020
+ return (0, react.useMemo)(() => {
39021
+ var _detailReportConfig$r;
39022
+ return {
39023
+ report: (_detailReportConfig$r = detailReportConfig === null || detailReportConfig === void 0 ? void 0 : detailReportConfig.report) !== null && _detailReportConfig$r !== void 0 ? _detailReportConfig$r : baseReport,
39024
+ isDetailView: detailReportConfig != null
39025
+ };
39026
+ }, [baseReport, detailReportConfig]);
39027
+ }
39028
+ function useBaseUnifiedReport() {
39029
+ const store = (0, react.useContext)(UnifiedReportStoreContext);
39030
+ const baseReport = (0, zustand.useStore)(store, (state$14) => state$14.baseReport);
39031
+ const setBaseReport = (0, zustand.useStore)(store, (state$14) => state$14.actions.setBaseReport);
38908
39032
  return (0, react.useMemo)(() => ({
38909
- report,
38910
- setReport
38911
- }), [report, setReport]);
39033
+ baseReport,
39034
+ setBaseReport
39035
+ }), [baseReport, setBaseReport]);
39036
+ }
39037
+ function useDetailUnifiedReport() {
39038
+ const store = (0, react.useContext)(UnifiedReportStoreContext);
39039
+ const detailReportConfig = (0, zustand.useStore)(store, (state$14) => state$14.detailReportConfig);
39040
+ const openDetailReport = (0, zustand.useStore)(store, (state$14) => state$14.actions.openDetailReport);
39041
+ const closeDetailReport = (0, zustand.useStore)(store, (state$14) => state$14.actions.closeDetailReport);
39042
+ return (0, react.useMemo)(() => ({
39043
+ detailReportConfig,
39044
+ isDetailView: detailReportConfig != null,
39045
+ openDetailReport,
39046
+ closeDetailReport
39047
+ }), [
39048
+ detailReportConfig,
39049
+ openDetailReport,
39050
+ closeDetailReport
39051
+ ]);
39052
+ }
39053
+ function useOpenDetailReport() {
39054
+ return (0, zustand.useStore)((0, react.useContext)(UnifiedReportStoreContext), (state$14) => state$14.actions.openDetailReport);
38912
39055
  }
38913
39056
  function useUnifiedReportGroupByParam() {
38914
39057
  const store = (0, react.useContext)(UnifiedReportStoreContext);
@@ -38949,27 +39092,33 @@ var findDefaultReport = (groups) => {
38949
39092
  };
38950
39093
  var hasReportWithKey = (groups, key) => groups.some((group) => group.reports.some((report) => report.key === key));
38951
39094
  var createUnifiedReportStore = (dateSelectionMode) => (0, zustand.createStore)((set$1) => ({
38952
- report: null,
39095
+ baseReport: null,
39096
+ detailReportConfig: null,
38953
39097
  groupBy: DateGroupBy.AllTime,
38954
39098
  dateSelectionMode,
38955
39099
  actions: {
38956
- setReport: (report) => set$1({ report }),
39100
+ setBaseReport: (baseReport) => set$1({
39101
+ baseReport,
39102
+ detailReportConfig: null
39103
+ }),
39104
+ openDetailReport: (detailReportConfig) => set$1({ detailReportConfig }),
39105
+ closeDetailReport: () => set$1({ detailReportConfig: null }),
38957
39106
  setGroupBy: (groupBy) => set$1({ groupBy })
38958
39107
  }
38959
39108
  }));
38960
39109
  function useHydrateUnifiedReportStore(store) {
38961
39110
  const { data } = useReportConfig();
38962
- const report = (0, zustand.useStore)(store, (state$14) => state$14.report);
38963
- const setReport = (0, zustand.useStore)(store, (state$14) => state$14.actions.setReport);
39111
+ const baseReport = (0, zustand.useStore)(store, (state$14) => state$14.baseReport);
39112
+ const setBaseReport = (0, zustand.useStore)(store, (state$14) => state$14.actions.setBaseReport);
38964
39113
  (0, react.useEffect)(() => {
38965
39114
  if (!data) return;
38966
- if (report && hasReportWithKey(data, report.key)) return;
39115
+ if (baseReport && hasReportWithKey(data, baseReport.key)) return;
38967
39116
  const defaultReport = findDefaultReport(data);
38968
- if (defaultReport) setReport(defaultReport);
39117
+ if (defaultReport) setBaseReport(defaultReport);
38969
39118
  }, [
38970
39119
  data,
38971
- report,
38972
- setReport
39120
+ baseReport,
39121
+ setBaseReport
38973
39122
  ]);
38974
39123
  }
38975
39124
  function useSyncExternalDateSelectionMode(store, dateSelectionMode) {
@@ -39002,12 +39151,12 @@ function ExpandableDataTableProvider({ children }) {
39002
39151
  children
39003
39152
  });
39004
39153
  }
39005
- var _excluded$5 = ["children", "className"], _excluded2$2 = ["children"], _excluded3 = ["children"];
39154
+ var _excluded$7 = ["children", "className"], _excluded2$3 = ["children"], _excluded3 = ["children"];
39006
39155
  var TREE_CLASS_NAME = "Layer__UI__Tree";
39007
39156
  var TREE_ITEM_CLASS_NAME = "Layer__UI__TreeItem";
39008
39157
  var TreeInner = (_ref, ref) => {
39009
39158
  let { children, className } = _ref;
39010
- return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(react_aria_components.Tree, _objectSpread2(_objectSpread2({}, _objectWithoutProperties(_ref, _excluded$5)), {}, {
39159
+ return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(react_aria_components.Tree, _objectSpread2(_objectSpread2({}, _objectWithoutProperties(_ref, _excluded$7)), {}, {
39011
39160
  className: (0, classnames.default)(TREE_CLASS_NAME, className),
39012
39161
  ref,
39013
39162
  children: withRenderProp(children, (node) => node)
@@ -39017,7 +39166,7 @@ const Tree = (0, react.forwardRef)(TreeInner);
39017
39166
  Tree.displayName = "Tree";
39018
39167
  var TreeItemInner = (_ref2, ref) => {
39019
39168
  let { children } = _ref2;
39020
- return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(react_aria_components.TreeItem, _objectSpread2(_objectSpread2({}, _objectWithoutProperties(_ref2, _excluded2$2)), {}, {
39169
+ return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(react_aria_components.TreeItem, _objectSpread2(_objectSpread2({}, _objectWithoutProperties(_ref2, _excluded2$3)), {}, {
39021
39170
  className: TREE_ITEM_CLASS_NAME,
39022
39171
  ref,
39023
39172
  children: withRenderProp(children, (node) => node)
@@ -39077,11 +39226,7 @@ var renderTreeLeaf = ({ leaf, leafConfig }) => /* @__PURE__ */ (0, react_jsx_run
39077
39226
  children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(TreeItemContent, { children: /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(HStack, {
39078
39227
  align: "center",
39079
39228
  justify: "space-between",
39080
- children: [leafConfig.renderLabel(leaf), /* @__PURE__ */ (0, react_jsx_runtime.jsx)(Check_default, {
39081
- className: "Layer__TreeNavigation__Check",
39082
- width: 14,
39083
- height: 14
39084
- })]
39229
+ children: [leafConfig.renderLabel(leaf), /* @__PURE__ */ (0, react_jsx_runtime.jsx)(Check_default, { className: "Layer__TreeNavigation__Check" })]
39085
39230
  }) })
39086
39231
  });
39087
39232
  function TreeNavigation({ items, selectedItem, isGroup: isGroup$1, groupConfig: groupConfig$1, leafConfig, ariaLabel }) {
@@ -39176,31 +39321,16 @@ var ReportsNavigationError = () => {
39176
39321
  spacing: true
39177
39322
  });
39178
39323
  };
39179
- var REPORT_GROUP_ICON = {
39180
- [ReportGroupType.Accounting]: lucide_react.Landmark,
39181
- [ReportGroupType.Unknown]: Folder_default
39182
- };
39183
39324
  var isReportGroup = (item) => "reports" in item;
39184
39325
  var groupConfig = {
39185
39326
  getId: (group) => group.groupType,
39186
39327
  getTextValue: (group) => group.displayName,
39187
39328
  getChildren: (group) => group.reports,
39188
39329
  renderLabel: (group) => {
39189
- const Icon = REPORT_GROUP_ICON[group.groupType];
39190
- return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(HStack, {
39191
- className: "Layer__ReportsNavigation__GroupLabel",
39192
- gap: "sm",
39193
- align: "center",
39194
- children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)(Icon, {
39195
- className: "Layer__ReportsNavigation__GroupIcon",
39196
- strokeWidth: 1.5,
39197
- size: 16
39198
- }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)(Span, {
39199
- ellipsis: true,
39200
- variant: "subtle",
39201
- weight: "bold",
39202
- children: group.displayName
39203
- })]
39330
+ return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(Span, {
39331
+ ellipsis: true,
39332
+ weight: "bold",
39333
+ children: group.displayName
39204
39334
  });
39205
39335
  }
39206
39336
  };
@@ -39216,8 +39346,8 @@ var buildLeafConfig = (onSelectLeaf) => ({
39216
39346
  function ReportsNavigation() {
39217
39347
  const { t } = (0, react_i18next.useTranslation)();
39218
39348
  const { data, isLoading, isError } = useReportConfig();
39219
- const { report, setReport } = useActiveUnifiedReport();
39220
- const leafConfig = (0, react.useMemo)(() => buildLeafConfig(setReport), [setReport]);
39349
+ const { baseReport, setBaseReport } = useBaseUnifiedReport();
39350
+ const leafConfig = (0, react.useMemo)(() => buildLeafConfig(setBaseReport), [setBaseReport]);
39221
39351
  return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(ConditionalBlock, {
39222
39352
  data,
39223
39353
  isLoading,
@@ -39226,11 +39356,11 @@ function ReportsNavigation() {
39226
39356
  isError,
39227
39357
  Error: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(ReportsNavigationError, {}),
39228
39358
  children: ({ data: data$1 }) => {
39229
- var _report$key;
39359
+ var _baseReport$key;
39230
39360
  return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(TreeNavigation, {
39231
39361
  ariaLabel: t("reports:label.reports_navigation", "Reports navigation"),
39232
39362
  items: data$1,
39233
- selectedItem: (_report$key = report === null || report === void 0 ? void 0 : report.key) !== null && _report$key !== void 0 ? _report$key : null,
39363
+ selectedItem: (_baseReport$key = baseReport === null || baseReport === void 0 ? void 0 : baseReport.key) !== null && _baseReport$key !== void 0 ? _baseReport$key : null,
39234
39364
  isGroup: isReportGroup,
39235
39365
  groupConfig,
39236
39366
  leafConfig
@@ -39238,7 +39368,7 @@ function ReportsNavigation() {
39238
39368
  }
39239
39369
  });
39240
39370
  }
39241
- var _excluded$4 = ["businessId", "route"], _excluded2$1 = [
39371
+ var _excluded$6 = ["businessId", "route"], _excluded2$2 = [
39242
39372
  "accessToken",
39243
39373
  "apiUrl",
39244
39374
  "businessId",
@@ -39255,7 +39385,7 @@ function buildKey$25({ access_token: accessToken, apiUrl, businessId, params })
39255
39385
  }
39256
39386
  var getUnifiedReport = get((_ref) => {
39257
39387
  let { businessId, route } = _ref;
39258
- return `/v1/businesses/${businessId}/reports/unified/${route}?${toDefinedSearchParameters(_objectSpread2({}, _objectWithoutProperties(_ref, _excluded$4)))}`;
39388
+ return `/v1/businesses/${businessId}/reports/unified/${route}?${toDefinedSearchParameters(_objectSpread2({}, _objectWithoutProperties(_ref, _excluded$6)))}`;
39259
39389
  });
39260
39390
  function useUnifiedReport() {
39261
39391
  const withLocale = useLocalizedKey();
@@ -39268,7 +39398,7 @@ function useUnifiedReport() {
39268
39398
  businessId,
39269
39399
  params
39270
39400
  }))), (_ref2) => {
39271
- let { accessToken, apiUrl: apiUrl$1, businessId: businessId$1, tags } = _ref2, restParams = _objectWithoutProperties(_ref2, _excluded2$1);
39401
+ let { accessToken, apiUrl: apiUrl$1, businessId: businessId$1, tags } = _ref2, restParams = _objectWithoutProperties(_ref2, _excluded2$2);
39272
39402
  return getUnifiedReport(apiUrl$1, accessToken, { params: _objectSpread2({ businessId: businessId$1 }, restParams) })().then(({ data }) => effect.Schema.decodeUnknownPromise(UnifiedReportSchema)(data));
39273
39403
  }));
39274
39404
  }
@@ -39281,10 +39411,10 @@ const ExpandButton = ({ isExpanded }) => {
39281
39411
  });
39282
39412
  };
39283
39413
  var getRowIndentStyle = ({ depth, canExpand }) => ({ paddingInlineStart: depth * 20 + (canExpand ? 0 : 4) });
39284
- var EMPTY_ARRAY = [];
39285
- function ExpandableDataTable({ data, isLoading, isError, columnConfig, componentName, ariaLabel, slots, hideHeader, getSubRows: getSubRows$2, getRowId: getRowId$1 }) {
39414
+ var EMPTY_ARRAY$1 = [];
39415
+ function ExpandableDataTable({ data, isLoading, isError, columnConfig, componentName, ariaLabel, slots, getSubRows: getSubRows$2, getRowId: getRowId$1 }) {
39286
39416
  const { expanded, setExpanded } = (0, react.useContext)(ExpandableDataTableContext);
39287
- const columnDefs = getColumnDefs((0, react.useMemo)(() => {
39417
+ const wrappedColumnConfig = (0, react.useMemo)(() => {
39288
39418
  const [first, ...rest] = columnConfig;
39289
39419
  if (!first || !isLeafColumn(first)) return columnConfig;
39290
39420
  const originalFirstCell = first.cell;
@@ -39307,14 +39437,19 @@ function ExpandableDataTable({ data, isLoading, isError, columnConfig, component
39307
39437
  })
39308
39438
  });
39309
39439
  } }), ...rest];
39310
- }, [columnConfig]));
39440
+ }, [columnConfig]);
39441
+ const columnDefs = getColumnDefs(wrappedColumnConfig);
39442
+ const columnPinning = (0, react.useMemo)(() => getColumnPinning(wrappedColumnConfig), [wrappedColumnConfig]);
39311
39443
  const table$1 = (0, __tanstack_react_table.useReactTable)({
39312
- data: data !== null && data !== void 0 ? data : EMPTY_ARRAY,
39444
+ data: data !== null && data !== void 0 ? data : EMPTY_ARRAY$1,
39313
39445
  columns: columnDefs,
39314
39446
  getSubRows: getSubRows$2,
39315
39447
  getCoreRowModel: (0, __tanstack_react_table.getCoreRowModel)(),
39316
39448
  getExpandedRowModel: (0, __tanstack_react_table.getExpandedRowModel)(),
39317
- state: { expanded },
39449
+ state: {
39450
+ expanded,
39451
+ columnPinning
39452
+ },
39318
39453
  onExpandedChange: setExpanded,
39319
39454
  autoResetPageIndex: false,
39320
39455
  getRowId: getRowId$1
@@ -39337,7 +39472,6 @@ function ExpandableDataTable({ data, isLoading, isError, columnConfig, component
39337
39472
  isError,
39338
39473
  componentName,
39339
39474
  slots,
39340
- hideHeader,
39341
39475
  dependencies: dependencies$1,
39342
39476
  headerGroups,
39343
39477
  withClickableRow: (0, react.useMemo)(() => ({
@@ -39346,9 +39480,10 @@ function ExpandableDataTable({ data, isLoading, isError, columnConfig, component
39346
39480
  }), [onRowClick, isRowClickable])
39347
39481
  });
39348
39482
  }
39349
- const UnifiedReportTableCellContent = ({ cell }) => {
39483
+ const UnifiedReportTableCellContent = ({ cell, column, breadcrumb }) => {
39350
39484
  var _cell$format;
39351
39485
  const { formatDate: formatDate$1 } = useIntlFormatter();
39486
+ const openDetailReport = useOpenDetailReport();
39352
39487
  if (!cell) return;
39353
39488
  const cellValue = cell.value;
39354
39489
  const isBold = (_cell$format = cell.format) === null || _cell$format === void 0 ? void 0 : _cell$format.bold;
@@ -39374,16 +39509,57 @@ const UnifiedReportTableCellContent = ({ cell }) => {
39374
39509
  variant,
39375
39510
  children: String(cellValue.value)
39376
39511
  });
39512
+ if (cell.reportConfig) {
39513
+ const reportConfig = cell.reportConfig;
39514
+ return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(Button, {
39515
+ variant: "text",
39516
+ onClick: () => openDetailReport({
39517
+ report: reportConfig,
39518
+ column,
39519
+ breadcrumb
39520
+ }),
39521
+ children: content
39522
+ });
39523
+ }
39377
39524
  return content;
39378
39525
  };
39526
+ var getCell = (row, col) => row.original.cells[col.columnKey];
39379
39527
  var isGroupColumn = (col) => col.columns !== void 0 && col.columns.length > 0;
39528
+ var toPinningSide = (pinning) => {
39529
+ switch (pinning) {
39530
+ case Pinning.Left: return "left";
39531
+ case Pinning.Right: return "right";
39532
+ default: return;
39533
+ }
39534
+ };
39380
39535
  var makeBaseColumn = (col) => ({
39381
39536
  id: col.columnKey,
39382
39537
  header: col.displayName,
39383
39538
  isRowHeader: col.isRowHeader,
39384
39539
  alignment: col.alignment
39385
39540
  });
39386
- var makeLeafColumn = (col) => _objectSpread2(_objectSpread2({}, makeBaseColumn(col)), {}, { cell: (row) => /* @__PURE__ */ (0, react_jsx_runtime.jsx)(UnifiedReportTableCellContent, { cell: row.original.cells[col.columnKey] }) });
39541
+ var makeLeafColumn = (col) => _objectSpread2(_objectSpread2({}, makeBaseColumn(col)), {}, {
39542
+ pinning: toPinningSide(col.pinning),
39543
+ cell: (row) => {
39544
+ var _cell$reportConfig;
39545
+ const cell = getCell(row, col);
39546
+ const cellConfig = (_cell$reportConfig = cell === null || cell === void 0 ? void 0 : cell.reportConfig) !== null && _cell$reportConfig !== void 0 ? _cell$reportConfig : null;
39547
+ const breadcrumb = cellConfig ? [cellConfig] : [];
39548
+ let parentRow = row.getParentRow();
39549
+ while (parentRow) {
39550
+ var _getCell;
39551
+ const parentConfig = (_getCell = getCell(parentRow, col)) === null || _getCell === void 0 ? void 0 : _getCell.reportConfig;
39552
+ if (!parentConfig) break;
39553
+ breadcrumb.push(parentConfig);
39554
+ parentRow = parentRow.getParentRow();
39555
+ }
39556
+ return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(UnifiedReportTableCellContent, {
39557
+ cell,
39558
+ column: col,
39559
+ breadcrumb: breadcrumb.reverse()
39560
+ });
39561
+ }
39562
+ });
39387
39563
  var makeGroupColumn = (col) => _objectSpread2(_objectSpread2({}, makeBaseColumn(col)), {}, { columns: buildNestedColumnConfig(col.columns) });
39388
39564
  const buildNestedColumnConfig = (columns) => {
39389
39565
  return columns.map((col) => {
@@ -39443,7 +39619,7 @@ const S3PresignedUrlSchema = effect.Schema.Struct({
39443
39619
  createdAt: effect.Schema.Date,
39444
39620
  documentId: effect.Schema.NullishOr(effect.Schema.UUID)
39445
39621
  });
39446
- var _excluded$3 = ["businessId", "route"], _excluded2 = [
39622
+ var _excluded$5 = ["businessId", "route"], _excluded2$1 = [
39447
39623
  "accessToken",
39448
39624
  "apiUrl",
39449
39625
  "businessId",
@@ -39451,7 +39627,7 @@ var _excluded$3 = ["businessId", "route"], _excluded2 = [
39451
39627
  ];
39452
39628
  var getUnifiedReportExcel = get((_ref) => {
39453
39629
  let { businessId, route } = _ref;
39454
- return `/v1/businesses/${businessId}/reports/unified/${route}/exports/excel?${toDefinedSearchParameters(_objectSpread2({}, _objectWithoutProperties(_ref, _excluded$3)))}`;
39630
+ return `/v1/businesses/${businessId}/reports/unified/${route}/exports/excel?${toDefinedSearchParameters(_objectSpread2({}, _objectWithoutProperties(_ref, _excluded$5)))}`;
39455
39631
  });
39456
39632
  var getTag = (report) => `#unified-${report}-report-excel`;
39457
39633
  var UnifiedReportExcelReturnSchema = effect.Schema.Struct({ data: S3PresignedUrlSchema });
@@ -39474,7 +39650,7 @@ function useUnifiedReportExcel({ onSuccess } = {}) {
39474
39650
  businessId,
39475
39651
  params
39476
39652
  }))), (_ref2) => {
39477
- let { accessToken, apiUrl: apiUrl$1, businessId: businessId$1, tags } = _ref2, restParams = _objectWithoutProperties(_ref2, _excluded2);
39653
+ let { accessToken, apiUrl: apiUrl$1, businessId: businessId$1, tags } = _ref2, restParams = _objectWithoutProperties(_ref2, _excluded2$1);
39478
39654
  return getUnifiedReportExcel(apiUrl$1, accessToken, { params: _objectSpread2({ businessId: businessId$1 }, restParams) })().then(effect.Schema.decodeUnknownPromise(UnifiedReportExcelReturnSchema)).then(function() {
39479
39655
  var _ref3 = _asyncToGenerator(function* ({ data }) {
39480
39656
  if (onSuccess) yield onSuccess(data);
@@ -39503,9 +39679,9 @@ function UnifiedReportDownloadButton() {
39503
39679
  children: [isError ? t("common:action.retry_label", "Retry") : t("common:action.download_label", "Download"), isError ? /* @__PURE__ */ (0, react_jsx_runtime.jsx)(RefreshCcw_default, { size: 12 }) : /* @__PURE__ */ (0, react_jsx_runtime.jsx)(DownloadCloud_default, { size: 16 })]
39504
39680
  }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)(InvisibleDownload_default, { ref: invisibleDownloadRef })] });
39505
39681
  }
39506
- const UnifiedReportTableHeader = () => {
39682
+ const UnifiedReportBaseHeader = () => {
39507
39683
  const { t } = (0, react_i18next.useTranslation)();
39508
- const { report } = useActiveUnifiedReport();
39684
+ const { baseReport } = useBaseUnifiedReport();
39509
39685
  const { groupBy, setGroupBy } = useUnifiedReportGroupByParam();
39510
39686
  const dateSelectionMode = useUnifiedReportDateSelectionMode();
39511
39687
  const { expanded, setExpanded } = (0, react.useContext)(ExpandableDataTableContext);
@@ -39516,46 +39692,154 @@ const UnifiedReportTableHeader = () => {
39516
39692
  }, [setExpanded, shouldCollapse]);
39517
39693
  return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(VStack, {
39518
39694
  gap: "lg",
39519
- children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)(HStack, {
39520
- pis: "lg",
39695
+ children: [/* @__PURE__ */ (0, react_jsx_runtime.jsxs)(HStack, {
39696
+ pi: "lg",
39521
39697
  pbs: "lg",
39522
- children: report ? /* @__PURE__ */ (0, react_jsx_runtime.jsx)(Span, {
39698
+ align: "center",
39699
+ justify: "space-between",
39700
+ children: [baseReport ? /* @__PURE__ */ (0, react_jsx_runtime.jsx)(Span, {
39523
39701
  size: "lg",
39524
39702
  weight: "bold",
39525
- children: report.displayName
39703
+ children: baseReport.displayName
39526
39704
  }) : /* @__PURE__ */ (0, react_jsx_runtime.jsx)(SkeletonLoader, {
39527
39705
  width: "192px",
39528
39706
  height: "24px"
39529
- })
39530
- }), /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(HStack, {
39707
+ }), /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(HStack, {
39708
+ gap: "xs",
39709
+ children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)(Button, {
39710
+ variant: "outlined",
39711
+ onClick: onClickExpandOrCollapse,
39712
+ children: shouldCollapse ? t("reports:action.collapse_all", "Collapse All") : t("reports:action.expand_all", "Expand All")
39713
+ }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)(UnifiedReportDownloadButton, {})]
39714
+ })]
39715
+ }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)(HStack, {
39531
39716
  fluid: true,
39532
- justify: "space-between",
39533
39717
  align: "end",
39534
39718
  pbe: "lg",
39535
39719
  className: "Layer__UnifiedReport__Header",
39536
- children: [/* @__PURE__ */ (0, react_jsx_runtime.jsxs)(HStack, {
39720
+ children: /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(HStack, {
39537
39721
  pi: "lg",
39538
39722
  gap: "xs",
39539
39723
  children: [
39540
- hasControl(report, ReportControl.DateRange) && /* @__PURE__ */ (0, react_jsx_runtime.jsx)(CombinedDateRangeSelection, { mode: dateSelectionMode }),
39541
- hasControl(report, ReportControl.Date) && /* @__PURE__ */ (0, react_jsx_runtime.jsx)(CombinedDateSelection, { mode: dateSelectionMode }),
39542
- dateSelectionMode === "full" && hasControl(report, ReportControl.GroupBy) && /* @__PURE__ */ (0, react_jsx_runtime.jsx)(DateGroupByComboBox, {
39724
+ hasControl(baseReport, ReportControl.DateRange) && /* @__PURE__ */ (0, react_jsx_runtime.jsx)(CombinedDateRangeSelection, { mode: dateSelectionMode }),
39725
+ hasControl(baseReport, ReportControl.Date) && /* @__PURE__ */ (0, react_jsx_runtime.jsx)(CombinedDateSelection, { mode: dateSelectionMode }),
39726
+ dateSelectionMode === "full" && hasControl(baseReport, ReportControl.GroupBy) && /* @__PURE__ */ (0, react_jsx_runtime.jsx)(DateGroupByComboBox, {
39543
39727
  value: groupBy,
39544
39728
  onValueChange: setGroupBy
39545
39729
  })
39546
39730
  ]
39547
- }), /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(HStack, {
39548
- pi: "lg",
39549
- className: "Layer__UnifiedReport__Header__SecondaryActions",
39550
- children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)(Button, {
39551
- variant: "outlined",
39552
- onClick: onClickExpandOrCollapse,
39553
- children: shouldCollapse ? t("reports:action.collapse_all", "Collapse All") : t("reports:action.expand_all", "Expand All")
39554
- }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)(UnifiedReportDownloadButton, {})]
39731
+ })
39732
+ })]
39733
+ });
39734
+ };
39735
+ var _excluded$4 = [
39736
+ "children",
39737
+ "size",
39738
+ "ellipsis",
39739
+ "external",
39740
+ "disabled",
39741
+ "href",
39742
+ "target",
39743
+ "rel"
39744
+ ];
39745
+ var LINK_CLASS_NAME = "Layer__UI__Link";
39746
+ const Link = (0, react.forwardRef)(function Link$3(_ref, ref) {
39747
+ let { children, size = "md", ellipsis, external, disabled, href, target, rel } = _ref, restProps = _objectWithoutProperties(_ref, _excluded$4);
39748
+ const dataProperties = toDataProperties({
39749
+ size,
39750
+ ellipsis,
39751
+ external,
39752
+ disabled
39753
+ });
39754
+ const effectiveTarget = external ? "_blank" : target;
39755
+ const effectiveRel = external ? "noopener noreferrer" : rel;
39756
+ return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(react_aria_components.Link, _objectSpread2(_objectSpread2(_objectSpread2({}, restProps), dataProperties), {}, {
39757
+ href,
39758
+ target: effectiveTarget,
39759
+ rel: effectiveRel,
39760
+ className: LINK_CLASS_NAME,
39761
+ ref,
39762
+ children
39763
+ }));
39764
+ });
39765
+ var _excluded$3 = ["children"], _excluded2 = ["id", "children"];
39766
+ var BREADCRUMBS_CLASS_NAME = "Layer__Breadcrumbs";
39767
+ var BREADCRUMB_CLASS_NAME = "Layer__Breadcrumb";
39768
+ function BreadcrumbsInner(_ref, ref) {
39769
+ let { children } = _ref;
39770
+ return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(react_aria_components.Breadcrumbs, _objectSpread2(_objectSpread2({}, _objectWithoutProperties(_ref, _excluded$3)), {}, {
39771
+ className: BREADCRUMBS_CLASS_NAME,
39772
+ ref,
39773
+ children
39774
+ }));
39775
+ }
39776
+ const Breadcrumbs = (0, react.forwardRef)(BreadcrumbsInner);
39777
+ const Breadcrumb = (0, react.forwardRef)(function Breadcrumb$1(_ref2, ref) {
39778
+ let { id, children } = _ref2, linkProps = _objectWithoutProperties(_ref2, _excluded2);
39779
+ return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(react_aria_components.Breadcrumb, {
39780
+ id,
39781
+ className: BREADCRUMB_CLASS_NAME,
39782
+ ref,
39783
+ children: ({ isCurrent }) => /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(react_jsx_runtime.Fragment, { children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)(Link, _objectSpread2(_objectSpread2({}, linkProps), {}, { children })), !isCurrent && /* @__PURE__ */ (0, react_jsx_runtime.jsx)(ChevronRight_default, {})] })
39784
+ });
39785
+ });
39786
+ var EMPTY_ARRAY = [];
39787
+ const UnifiedReportDetailBreadcrumb = () => {
39788
+ const { detailReportConfig, openDetailReport } = useDetailUnifiedReport();
39789
+ const breadcrumb = detailReportConfig === null || detailReportConfig === void 0 ? void 0 : detailReportConfig.breadcrumb;
39790
+ const breadcrumbItems = (0, react.useMemo)(() => breadcrumb !== null && breadcrumb !== void 0 ? breadcrumb : EMPTY_ARRAY, [breadcrumb]);
39791
+ return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(Breadcrumbs, {
39792
+ items: breadcrumbItems,
39793
+ onAction: (0, react.useCallback)((key) => {
39794
+ const index = breadcrumbItems.findIndex((item) => item.key === key);
39795
+ if (index === -1 || !detailReportConfig) return;
39796
+ openDetailReport({
39797
+ report: breadcrumbItems[index],
39798
+ breadcrumb: breadcrumbItems.slice(0, index + 1),
39799
+ column: detailReportConfig === null || detailReportConfig === void 0 ? void 0 : detailReportConfig.column
39800
+ });
39801
+ }, [
39802
+ breadcrumbItems,
39803
+ detailReportConfig,
39804
+ openDetailReport
39805
+ ]),
39806
+ children: (item) => /* @__PURE__ */ (0, react_jsx_runtime.jsx)(Breadcrumb, {
39807
+ id: item.key,
39808
+ children: item.displayName
39809
+ })
39810
+ });
39811
+ };
39812
+ const UnifiedReportDetailHeader = () => {
39813
+ const { detailReportConfig, closeDetailReport } = useDetailUnifiedReport();
39814
+ const { t } = (0, react_i18next.useTranslation)();
39815
+ if (!detailReportConfig) return null;
39816
+ const { column } = detailReportConfig;
39817
+ return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(HStack, {
39818
+ gap: "sm",
39819
+ pb: "lg",
39820
+ pis: "lg",
39821
+ align: "center",
39822
+ className: "Layer__UnifiedReport__DetailHeader",
39823
+ children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)(Button, {
39824
+ icon: true,
39825
+ variant: "outlined",
39826
+ onClick: closeDetailReport,
39827
+ "aria-label": t("common:action.back", "Back"),
39828
+ children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(ChevronLeft_default, { size: 16 })
39829
+ }), /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(VStack, {
39830
+ gap: "3xs",
39831
+ children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)(UnifiedReportDetailBreadcrumb, {}), /* @__PURE__ */ (0, react_jsx_runtime.jsx)(Span, {
39832
+ size: "sm",
39833
+ variant: "subtle",
39834
+ children: column.displayName
39555
39835
  })]
39556
39836
  })]
39557
39837
  });
39558
39838
  };
39839
+ const UnifiedReportTableHeader = () => {
39840
+ const { isDetailView } = useDetailUnifiedReport();
39841
+ return isDetailView ? /* @__PURE__ */ (0, react_jsx_runtime.jsx)(UnifiedReportDetailHeader, {}) : /* @__PURE__ */ (0, react_jsx_runtime.jsx)(UnifiedReportBaseHeader, {});
39842
+ };
39559
39843
  const UnifiedReport = ({ dateSelectionMode }) => {
39560
39844
  const { t } = (0, react_i18next.useTranslation)();
39561
39845
  return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(View, {
@@ -44923,6 +45207,7 @@ const StartTrackerSchema = effect.Schema.Struct({
44923
45207
  memo: effect.Schema.NullishOr(effect.Schema.String),
44924
45208
  metadata: effect.Schema.NullishOr(effect.Schema.Unknown)
44925
45209
  });
45210
+ const StopTrackerSchema = effect.Schema.Struct({ date: CalendarDateSchema });
44926
45211
  const ACTIVE_TIME_TRACKER_TAG_KEY = "#active-time-tracker";
44927
45212
  var ActiveTimeTrackerResponseSchema = effect.Schema.Struct({ data: effect.Schema.Struct({ timeEntry: (0, effect.pipe)(effect.Schema.propertySignature(effect.Schema.NullishOr(TimeEntrySchema)), effect.Schema.fromKey("time_entry")) }) });
44928
45213
  var getActiveTimeTracker = get(({ businessId }) => `/v1/businesses/${businessId}/time-tracking/tracker/active`);
@@ -45414,10 +45699,13 @@ function ActiveServicesContent({ services: services$2, showCreateForm, showAddBu
45414
45699
  return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(react_jsx_runtime.Fragment, { children: [
45415
45700
  /* @__PURE__ */ (0, react_jsx_runtime.jsx)(ConditionalList, {
45416
45701
  list: services$2,
45417
- Empty: (0, react.useMemo)(() => showCreateForm ? null : /* @__PURE__ */ (0, react_jsx_runtime.jsx)(DataState, {
45418
- status: DataStateStatus.allDone,
45419
- title: t("timeTracking:services.no_active", "No services yet"),
45420
- spacing: true
45702
+ Empty: (0, react.useMemo)(() => showCreateForm ? null : /* @__PURE__ */ (0, react_jsx_runtime.jsx)(VStack, {
45703
+ className: "Layer__TimeTrackingServicesDrawer__EmptyState",
45704
+ children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(DataState, {
45705
+ status: DataStateStatus.allDone,
45706
+ title: t("timeTracking:services.no_active", "No services yet"),
45707
+ spacing: true
45708
+ })
45421
45709
  }), [showCreateForm, t]),
45422
45710
  Container: ({ children }) => /* @__PURE__ */ (0, react_jsx_runtime.jsx)(VStack, {
45423
45711
  className: "Layer__TimeTrackingServicesDrawer__accordion",
@@ -45476,10 +45764,13 @@ function ArchivedServicesContent({ isEnabled, formatHourly, onRestore }) {
45476
45764
  Error: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(LoadServicesErrorState, {}),
45477
45765
  children: () => /* @__PURE__ */ (0, react_jsx_runtime.jsx)(ConditionalList, {
45478
45766
  list: archivedServices,
45479
- Empty: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(DataState, {
45480
- status: DataStateStatus.allDone,
45481
- title: t("timeTracking:services.no_archived", "No archived services"),
45482
- spacing: true
45767
+ Empty: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(VStack, {
45768
+ className: "Layer__TimeTrackingServicesDrawer__EmptyState",
45769
+ children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(DataState, {
45770
+ status: DataStateStatus.allDone,
45771
+ title: t("timeTracking:services.no_archived", "No archived services"),
45772
+ spacing: true
45773
+ })
45483
45774
  }),
45484
45775
  Container: ({ children }) => /* @__PURE__ */ (0, react_jsx_runtime.jsx)(VStack, {
45485
45776
  className: "Layer__TimeTrackingServicesDrawer__archivedList",
@@ -46051,7 +46342,10 @@ const useStopTimeTracker = () => {
46051
46342
  const { forceReloadTimeEntries } = useTimeEntriesGlobalCacheActions();
46052
46343
  const { invalidateTimeTrackingSummary } = useTimeTrackingSummaryGlobalCacheActions();
46053
46344
  const { invalidateActiveTimeTracker } = useActiveTimeTrackerGlobalCacheActions();
46054
- const mutationResponse = new SWRMutationResult((0, swr_mutation.default)(() => withLocale(buildKey$2(_objectSpread2(_objectSpread2({}, data), {}, { businessId }))), ({ accessToken, apiUrl, businessId: businessId$1 }) => stopTimeTracker(apiUrl, accessToken, { params: { businessId: businessId$1 } }).then(effect.Schema.decodeUnknownPromise(StopTimeTrackerResponseSchema)), {
46345
+ const mutationResponse = new SWRMutationResult((0, swr_mutation.default)(() => withLocale(buildKey$2(_objectSpread2(_objectSpread2({}, data), {}, { businessId }))), ({ accessToken, apiUrl, businessId: businessId$1 }, { arg: body }) => stopTimeTracker(apiUrl, accessToken, {
46346
+ params: { businessId: businessId$1 },
46347
+ body
46348
+ }).then(effect.Schema.decodeUnknownPromise(StopTimeTrackerResponseSchema)), {
46055
46349
  revalidate: false,
46056
46350
  throwOnError: true
46057
46351
  }));
@@ -46073,6 +46367,12 @@ const useStopTimeTracker = () => {
46073
46367
  return Reflect.get(target, prop);
46074
46368
  } });
46075
46369
  };
46370
+ var isNoActiveTimerResponse = (error$38) => {
46371
+ var _error$messages;
46372
+ if (!(error$38 instanceof APIError)) return false;
46373
+ if (error$38.code === 404) return true;
46374
+ return ((_error$messages = error$38.messages) === null || _error$messages === void 0 ? void 0 : _error$messages.some((m) => m.error_enum === ApiEnumErrorType.SpecifiedIdNotFound)) === true;
46375
+ };
46076
46376
  const useActiveTimerBannerForm = ({ activeEntry }) => {
46077
46377
  const { t } = (0, react_i18next.useTranslation)();
46078
46378
  const [actionError, setActionError] = (0, react.useState)(null);
@@ -46098,9 +46398,10 @@ const useActiveTimerBannerForm = ({ activeEntry }) => {
46098
46398
  return;
46099
46399
  }
46100
46400
  try {
46101
- yield stopTimeTracker$1();
46102
- } catch (_unused2) {
46103
- setActionError(t("timeTracking:error.complete_timer", "Failed to complete timer. Please try again."));
46401
+ yield stopTimeTracker$1({ date: (0, __internationalized_date.today)((0, __internationalized_date.getLocalTimeZone)()).toString() });
46402
+ } catch (error$38) {
46403
+ if (isNoActiveTimerResponse(error$38)) setActionError(t("timeTracking:error.complete_timer_stale", "This timer was already completed or cancelled. Reload the page."));
46404
+ else setActionError(t("timeTracking:error.complete_timer", "Failed to complete timer. Please try again."));
46104
46405
  }
46105
46406
  });
46106
46407
  return function(_x) {
@@ -46146,7 +46447,7 @@ const useActiveTimerBannerForm = ({ activeEntry }) => {
46146
46447
  try {
46147
46448
  yield deleteTimeEntry$1();
46148
46449
  invalidateActiveTimeTracker();
46149
- } catch (_unused3) {
46450
+ } catch (_unused2) {
46150
46451
  setActionError(t("timeTracking:error.cancel_timer", "Failed to cancel timer. Please try again."));
46151
46452
  }
46152
46453
  }), [
@@ -46182,16 +46483,21 @@ const useActiveTimerBannerForm = ({ activeEntry }) => {
46182
46483
  isUpdating
46183
46484
  ]);
46184
46485
  };
46486
+ function getServiceLabel(service, t) {
46487
+ return service.archivedAt ? t("timeTracking:services.archived_service", "{{name}} (Archived)", { name: service.name }) : service.name;
46488
+ }
46185
46489
  var ServiceAsOption = class {
46186
- constructor(service) {
46490
+ constructor(service, t) {
46187
46491
  _defineProperty(this, "internalService", void 0);
46492
+ _defineProperty(this, "t", void 0);
46188
46493
  this.internalService = service;
46494
+ this.t = t;
46189
46495
  }
46190
46496
  get original() {
46191
46497
  return this.internalService;
46192
46498
  }
46193
46499
  get label() {
46194
- return this.internalService.name;
46500
+ return getServiceLabel(this.internalService, this.t);
46195
46501
  }
46196
46502
  get id() {
46197
46503
  return this.internalService.id;
@@ -46200,16 +46506,23 @@ var ServiceAsOption = class {
46200
46506
  return this.internalService.id;
46201
46507
  }
46202
46508
  };
46203
- var formatCreateLabel = (inputValue, t) => inputValue ? t("timeTracking:services.create_service_input_value", "Create service \"{{inputValue}}\"", { inputValue }) : t("timeTracking:services.add_service", "Add service");
46204
- function TimeEntryServiceSelector({ selectedServiceId, onSelectedServiceIdChange, placeholder, isReadOnly, isClearable, inline, className, showLabel = true, isCreatable, onCreateService }) {
46509
+ var formatCreateLabel = (inputValue, t) => /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(Span, {
46510
+ variant: "inherit",
46511
+ className: "Layer__TimeEntryServiceSelector__CreateLabel",
46512
+ children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)(lucide_react.Plus, {
46513
+ size: 14,
46514
+ "aria-hidden": "true"
46515
+ }), inputValue ? t("timeTracking:services.create_service_input_value", "Create service \"{{inputValue}}\"", { inputValue }) : t("timeTracking:services.add_service", "Add service")]
46516
+ });
46517
+ function TimeEntryServiceSelector({ selectedServiceId, onSelectedServiceIdChange, placeholder, isReadOnly, isClearable, inline, className, showLabel = true, allowArchived, isCreatable, onCreateService }) {
46205
46518
  const { t } = (0, react_i18next.useTranslation)();
46206
- const { data: servicesResponse, isLoading, isError } = useListCatalogServices();
46519
+ const { data: servicesResponse, isLoading, isError } = useListCatalogServices({ allowArchived });
46207
46520
  const isLoadingWithoutFallback = isLoading && !servicesResponse;
46208
46521
  const shouldDisableComboBox = isLoadingWithoutFallback || isError;
46209
46522
  const serviceOptions = (0, react.useMemo)(() => {
46210
46523
  var _servicesResponse$dat;
46211
- return (_servicesResponse$dat = servicesResponse === null || servicesResponse === void 0 ? void 0 : servicesResponse.data.map((service) => new ServiceAsOption(service))) !== null && _servicesResponse$dat !== void 0 ? _servicesResponse$dat : [];
46212
- }, [servicesResponse]);
46524
+ return (_servicesResponse$dat = servicesResponse === null || servicesResponse === void 0 ? void 0 : servicesResponse.data.map((service) => new ServiceAsOption(service, t))) !== null && _servicesResponse$dat !== void 0 ? _servicesResponse$dat : [];
46525
+ }, [servicesResponse, t]);
46213
46526
  const combinedClassName = (0, classnames.default)("Layer__TimeEntryServiceSelector", inline && "Layer__TimeEntryServiceSelector--inline", className);
46214
46527
  const handleSelectionChange = (0, react.useCallback)((selectedOption) => {
46215
46528
  var _selectedOption$id;
@@ -46276,13 +46589,26 @@ const ActiveTimeTrackerBanner = ({ activeEntry, timerDisplayValue }) => {
46276
46589
  const { form, actions, state: state$14 } = useActiveTimerBannerForm({ activeEntry });
46277
46590
  return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(Container, {
46278
46591
  name: "ActiveTimeTracker",
46279
- children: [state$14.actionError && /* @__PURE__ */ (0, react_jsx_runtime.jsx)(VStack, {
46592
+ className: "Layer__ActiveTimeTracker__Container",
46593
+ children: [state$14.actionError && /* @__PURE__ */ (0, react_jsx_runtime.jsx)(HStack, {
46594
+ className: "Layer__ActiveTimeTracker__ErrorStrip",
46595
+ pb: "xs",
46280
46596
  pi: "md",
46281
- pbe: "2xs",
46282
- children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(DataState, {
46283
- status: DataStateStatus.failed,
46284
- title: state$14.actionError,
46285
- inline: true
46597
+ role: "alert",
46598
+ children: /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(HStack, {
46599
+ className: "Layer__ActiveTimeTracker__ErrorStripRow",
46600
+ gap: "sm",
46601
+ align: "center",
46602
+ children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)(lucide_react.AlertTriangle, {
46603
+ "aria-hidden": true,
46604
+ className: "Layer__ActiveTimeTracker__ErrorStripIcon",
46605
+ size: 16,
46606
+ strokeWidth: 1.25
46607
+ }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)(Span, {
46608
+ size: "sm",
46609
+ className: "Layer__ActiveTimeTracker__ErrorStripText",
46610
+ children: state$14.actionError
46611
+ })]
46286
46612
  })
46287
46613
  }), /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(HStack, {
46288
46614
  className: "Layer__ActiveTimeTracker__Main",
@@ -46342,8 +46668,7 @@ const ActiveTimeTrackerBanner = ({ activeEntry, timerDisplayValue }) => {
46342
46668
  children: (selectedServiceId) => /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(Button, {
46343
46669
  variant: "outlined-light",
46344
46670
  onPress: actions.completeTimer,
46345
- isPending: state$14.isStopping || state$14.isUpdating,
46346
- isDisabled: state$14.isCancelling || !selectedServiceId,
46671
+ isDisabled: state$14.isCancelling || state$14.isStopping || state$14.isUpdating || !selectedServiceId,
46347
46672
  children: [t("timeTracking:action.complete_timer", "Complete"), /* @__PURE__ */ (0, react_jsx_runtime.jsx)(lucide_react.Check, { size: 16 })]
46348
46673
  })
46349
46674
  })]
@@ -46385,6 +46710,11 @@ const useStartTimeTracker = () => {
46385
46710
  return Reflect.get(target, prop);
46386
46711
  } });
46387
46712
  };
46713
+ var isActiveTimerAlreadyExistsError = (error$38) => {
46714
+ var _error$messages;
46715
+ if (!(error$38 instanceof APIError)) return false;
46716
+ return ((_error$messages = error$38.messages) === null || _error$messages === void 0 ? void 0 : _error$messages.some((m) => m.error_enum === ApiEnumErrorType.SpecifiedBadRequest)) === true;
46717
+ };
46388
46718
  const useStartTimerForm = ({ onStarted }) => {
46389
46719
  const { t } = (0, react_i18next.useTranslation)();
46390
46720
  const [actionError, setActionError] = (0, react.useState)(null);
@@ -46403,8 +46733,9 @@ const useStartTimerForm = ({ onStarted }) => {
46403
46733
  yield startTimeTracker$1(payload);
46404
46734
  formApi.reset(EMPTY_DRAFT);
46405
46735
  onStarted();
46406
- } catch (_unused) {
46407
- setActionError(t("timeTracking:error.start_timer", "Failed to start timer. Please try again."));
46736
+ } catch (error$38) {
46737
+ if (isActiveTimerAlreadyExistsError(error$38)) setActionError(t("timeTracking:error.start_timer_already_active", "A timer is already running. Please reload the page."));
46738
+ else setActionError(t("timeTracking:error.start_timer", "Failed to start timer. Please try again."));
46408
46739
  }
46409
46740
  });
46410
46741
  return function(_x) {
@@ -46728,6 +47059,7 @@ const TimeEntriesTableHeader = () => {
46728
47059
  const HeaderActions = (0, react.useCallback)(() => /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(HStack, {
46729
47060
  gap: "xs",
46730
47061
  children: [/* @__PURE__ */ (0, react_jsx_runtime.jsxs)(Button, {
47062
+ variant: "outlined-light",
46731
47063
  onPress: onAddEntry,
46732
47064
  children: [t("timeTracking:action.add_entry", "Add Entry"), /* @__PURE__ */ (0, react_jsx_runtime.jsx)(lucide_react.Plus, { size: 16 })]
46733
47065
  }), onStartTimer && /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(Button, {
@@ -46751,6 +47083,7 @@ const TimeEntriesTableHeader = () => {
46751
47083
  className: "Layer__TimeEntriesTable__FilterService",
46752
47084
  placeholder: t("timeTracking:label.all_services", "All Services"),
46753
47085
  showLabel: false,
47086
+ allowArchived: true,
46754
47087
  inline: true
46755
47088
  }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)(CustomerSelector, {
46756
47089
  selectedCustomer,
@@ -46809,14 +47142,20 @@ var TimeEntryActionsCell = (0, react.memo)(function TimeEntryActionsCell$1({ ent
46809
47142
  onPress: () => setDrawerOpen(true, entry),
46810
47143
  "aria-label": t("timeTracking:action.view_entry", "View Entry"),
46811
47144
  variant: "ghost",
46812
- children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(lucide_react.Edit, { size: 20 })
47145
+ children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(lucide_react.Edit, {
47146
+ size: 20,
47147
+ strokeWidth: 1.25
47148
+ })
46813
47149
  }), !isLocked && /* @__PURE__ */ (0, react_jsx_runtime.jsx)(Button, {
46814
47150
  inset: true,
46815
47151
  icon: true,
46816
47152
  onPress: () => setDeleteModalOpen(true, entry),
46817
47153
  "aria-label": t("timeTracking:action.delete_entry", "Delete Entry"),
46818
47154
  variant: "ghost",
46819
- children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(lucide_react.Trash2, { size: 20 })
47155
+ children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(lucide_react.Trash2, {
47156
+ size: 20,
47157
+ strokeWidth: 1.25
47158
+ })
46820
47159
  })]
46821
47160
  });
46822
47161
  });
@@ -47205,10 +47544,16 @@ const TimeEntryDrawer = () => {
47205
47544
  children: [/* @__PURE__ */ (0, react_jsx_runtime.jsxs)(Button, {
47206
47545
  variant: "outlined",
47207
47546
  onPress: handleDeleteEntry,
47208
- children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)(lucide_react.Trash2, { size: 16 }), t("timeTracking:action.delete_entry", "Delete Entry")]
47547
+ children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)(lucide_react.Trash2, {
47548
+ size: 16,
47549
+ strokeWidth: 1.25
47550
+ }), t("timeTracking:action.delete_entry", "Delete Entry")]
47209
47551
  }), /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(Button, {
47210
47552
  onPress: () => setIsEditMode(true),
47211
- children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)(lucide_react.Edit, { size: 16 }), t("timeTracking:action.edit_entry", "Edit Entry")]
47553
+ children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)(lucide_react.Edit, {
47554
+ size: 16,
47555
+ strokeWidth: 1.25
47556
+ }), t("timeTracking:action.edit_entry", "Edit Entry")]
47212
47557
  })]
47213
47558
  })]
47214
47559
  })
@@ -47396,29 +47741,31 @@ var TimeTrackingStatsBreakdown = (0, react.memo)(function TimeTrackingStatsBreak
47396
47741
  children: entries.map(({ color, key, percentage, serviceName, totalMinutes }) => /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(VStack, {
47397
47742
  className: "Layer__TimeTrackingStats__LegendItem",
47398
47743
  gap: "2xs",
47399
- children: [
47400
- /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(HStack, {
47401
- className: "Layer__TimeTrackingStats__LegendLabel",
47402
- gap: "2xs",
47403
- align: "center",
47404
- children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)(TimeTrackingStatsLegendSwatch, { color }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)(Span, {
47405
- size: "md",
47406
- children: serviceName
47407
- })]
47408
- }),
47409
- /* @__PURE__ */ (0, react_jsx_runtime.jsx)(Span, {
47744
+ children: [/* @__PURE__ */ (0, react_jsx_runtime.jsxs)(HStack, {
47745
+ className: "Layer__TimeTrackingStats__LegendLabel",
47746
+ gap: "2xs",
47747
+ align: "center",
47748
+ children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)(TimeTrackingStatsLegendSwatch, { color }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)(Span, {
47749
+ size: "md",
47750
+ ellipsis: true,
47751
+ withTooltip: true,
47752
+ children: serviceName
47753
+ })]
47754
+ }), /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(HStack, {
47755
+ className: "Layer__TimeTrackingStats__LegendMeta",
47756
+ gap: "2xs",
47757
+ align: "baseline",
47758
+ children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)(Span, {
47410
47759
  className: "Layer__TimeTrackingStats__LegendDuration",
47411
- size: "xl",
47412
- weight: "bold",
47760
+ size: "sm",
47413
47761
  children: formatMinutesAsDuration$1(totalMinutes)
47414
- }),
47415
- /* @__PURE__ */ (0, react_jsx_runtime.jsx)(Span, {
47762
+ }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)(Span, {
47416
47763
  className: "Layer__TimeTrackingStats__LegendPercentage",
47417
47764
  size: "sm",
47418
47765
  variant: "subtle",
47419
47766
  children: formatPercent$1(percentage, { maximumFractionDigits: 0 })
47420
- })
47421
- ]
47767
+ })]
47768
+ })]
47422
47769
  }, key))
47423
47770
  })]
47424
47771
  });
@@ -47427,6 +47774,7 @@ function TimeTrackingStatsContent({ summary }) {
47427
47774
  const { t } = (0, react_i18next.useTranslation)();
47428
47775
  const { formatMinutesAsDuration: formatMinutesAsDuration$1 } = useIntlFormatter();
47429
47776
  const serviceBreakdown = (0, react.useMemo)(() => buildServiceBreakdown(summary.byService, t("timeTracking:label.other", "Other")), [summary.byService, t]);
47777
+ const totalDurationDisplay = summary.totalMinutes > 0 ? formatMinutesAsDuration$1(summary.totalMinutes) : t("timeTracking:label.zero_minutes", "0 min");
47430
47778
  return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(VStack, {
47431
47779
  className: "Layer__TimeTrackingStats__Content",
47432
47780
  gap: "lg",
@@ -47461,7 +47809,7 @@ function TimeTrackingStatsContent({ summary }) {
47461
47809
  }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)(Span, {
47462
47810
  className: "Layer__TimeTrackingStats__SummaryValue",
47463
47811
  weight: "bold",
47464
- children: formatMinutesAsDuration$1(summary.totalMinutes)
47812
+ children: totalDurationDisplay
47465
47813
  })]
47466
47814
  })]
47467
47815
  })]
@@ -47473,7 +47821,7 @@ function TimeTrackingStatsContent({ summary }) {
47473
47821
  children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)(HStack, { className: "Layer__TimeTrackingStats__ChartBar Layer__TimeTrackingStats__ChartBar--empty" }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)(Span, {
47474
47822
  size: "sm",
47475
47823
  variant: "subtle",
47476
- children: t("timeTracking:label.no_activity_breakdown", "No activity breakdown available for this period.")
47824
+ children: t("timeTracking:label.no_activity_breakdown", "No activity during this period")
47477
47825
  })]
47478
47826
  })]
47479
47827
  });