@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.
- package/dist/cjs/index.cjs +812 -464
- package/dist/esm/index.mjs +806 -458
- package/dist/index.css +134 -27
- package/dist/index.d.ts +8 -0
- package/package.json +1 -1
package/dist/esm/index.mjs
CHANGED
|
@@ -4,7 +4,7 @@ import { Fragment as Fragment$1, jsx, jsxs } from "react/jsx-runtime";
|
|
|
4
4
|
import { usePlaidLink } from "react-plaid-link";
|
|
5
5
|
import useSWR, { SWRConfig, unstable_serialize, useSWRConfig } from "swr";
|
|
6
6
|
import useSWRMutation from "swr/mutation";
|
|
7
|
-
import { Button, Calendar, CalendarCell, CalendarGrid, CalendarGridBody, CalendarGridHeader, CalendarHeaderCell, Cell, Checkbox, Collection, Column, DateField, DateInput, DatePicker, DateSegment, Dialog, DialogTrigger, FieldError, Form, GridList, GridListItem, Group, Header, Heading, I18nProvider, Input, Label, Link, Menu, MenuItem, MenuTrigger, Meter, Modal, ModalOverlay, NumberField, Popover, Radio, RadioGroup, Row, SearchField, SelectionIndicator, Switch, Table, TableBody, TableHeader, Text, TextArea, TextField, ToggleButton, ToggleButtonGroup, Tree, TreeItem, TreeItemContent, composeRenderProps } from "react-aria-components";
|
|
7
|
+
import { Breadcrumb, Breadcrumbs, Button, Calendar, CalendarCell, CalendarGrid, CalendarGridBody, CalendarGridHeader, CalendarHeaderCell, Cell, Checkbox, Collection, Column, DateField, DateInput, DatePicker, DateSegment, Dialog, DialogTrigger, FieldError, Form, GridList, GridListItem, Group, Header, Heading, I18nProvider, Input, Label, Link, Menu, MenuItem, MenuTrigger, Meter, Modal, ModalOverlay, NumberField, Popover, Radio, RadioGroup, Row, SearchField, SelectionIndicator, Switch, Table, TableBody, TableHeader, Text, TextArea, TextField, ToggleButton, ToggleButtonGroup, Tree, TreeItem, TreeItemContent, composeRenderProps } from "react-aria-components";
|
|
8
8
|
import { I18nextProvider, Trans, initReactI18next, useTranslation } from "react-i18next";
|
|
9
9
|
import { IntlProvider, useIntl } from "react-intl";
|
|
10
10
|
import i18next from "i18next";
|
|
@@ -20,7 +20,7 @@ import { FloatingPortal, autoUpdate, flip, offset, shift, useDismiss, useFloatin
|
|
|
20
20
|
import { CalendarDate, ZonedDateTime, fromDate, getLocalTimeZone, parseDate, toCalendarDate, today } from "@internationalized/date";
|
|
21
21
|
import { mergeRefs } from "react-merge-refs";
|
|
22
22
|
import useResizeObserver from "@react-hook/resize-observer";
|
|
23
|
-
import { AlertCircle, AlertTriangle, Archive, ArchiveRestore, ArrowRight, Briefcase, Calendar as Calendar$1, Car, Check, CheckCircle, CheckIcon, ChevronDown, ChevronLeft, ChevronRight, Circle, Clock, Clock3, CopyIcon, Download, Edit, ExternalLink, FileDownIcon, FileSpreadsheet, FileText, HandCoins, Hourglass, Info,
|
|
23
|
+
import { AlertCircle, AlertTriangle, Archive, ArchiveRestore, ArrowRight, Briefcase, Calendar as Calendar$1, Car, Check, CheckCircle, CheckIcon, ChevronDown, ChevronLeft, ChevronRight, Circle, Clock, Clock3, CopyIcon, Download, Edit, ExternalLink, FileDownIcon, FileSpreadsheet, FileText, HandCoins, Hourglass, Info, Layers2Icon, Link as Link$1, List, LoaderCircle, Lock, Menu as Menu$1, MenuIcon, Milestone, Minus, PencilRuler, Play, Plus, RefreshCcw, RotateCcw, Save, Search, SearchX, Trash, Trash2, TriangleAlert, UploadCloud, UserRoundPen, Users, Video, X, XCircle } from "lucide-react";
|
|
24
24
|
import { DurationFormat } from "@formatjs/intl-durationformat";
|
|
25
25
|
import Select, { components } from "react-select";
|
|
26
26
|
import CreatableSelect from "react-select/creatable";
|
|
@@ -146,6 +146,10 @@ let Direction = /* @__PURE__ */ function(Direction$1) {
|
|
|
146
146
|
Direction$1["DEBIT"] = "DEBIT";
|
|
147
147
|
return Direction$1;
|
|
148
148
|
}({});
|
|
149
|
+
const ApiEnumErrorType = {
|
|
150
|
+
SpecifiedIdNotFound: "SpecifiedIdNotFound",
|
|
151
|
+
SpecifiedBadRequest: "SpecifiedBadRequest"
|
|
152
|
+
};
|
|
149
153
|
var APIError = class APIError extends Error {
|
|
150
154
|
constructor(message, code, messages) {
|
|
151
155
|
super(message);
|
|
@@ -192,7 +196,7 @@ const getIntlLocale = (locale) => {
|
|
|
192
196
|
return isSupportedLocale(locale) ? locale : DEFAULT_LOCALE;
|
|
193
197
|
};
|
|
194
198
|
const name = "@layerfi/components";
|
|
195
|
-
const version = "0.1.128-alpha";
|
|
199
|
+
const version = "0.1.128-alpha.1";
|
|
196
200
|
const description = "Layer React Components";
|
|
197
201
|
const main = "dist/cjs/index.cjs";
|
|
198
202
|
const module = "dist/esm/index.mjs";
|
|
@@ -1877,6 +1881,7 @@ var timeTracking_default$1 = {
|
|
|
1877
1881
|
"archive_service": "Could not archive this service. Please try again.",
|
|
1878
1882
|
"cancel_timer": "Failed to cancel timer. Please try again.",
|
|
1879
1883
|
"complete_timer": "Failed to complete timer. Please try again.",
|
|
1884
|
+
"complete_timer_stale": "This timer was already completed or cancelled. Reload the page.",
|
|
1880
1885
|
"create_service": "Failed to create service. Please try again.",
|
|
1881
1886
|
"delete_entry": "Failed to delete time entry. Please check your connection and try again.",
|
|
1882
1887
|
"load_active_timer": "Failed to load active timer. Please check your connection and try again.",
|
|
@@ -1885,6 +1890,7 @@ var timeTracking_default$1 = {
|
|
|
1885
1890
|
"load_services": "Failed to load services.",
|
|
1886
1891
|
"load_summary": "Failed to load time tracking summary",
|
|
1887
1892
|
"start_timer": "Failed to start timer. Please try again.",
|
|
1893
|
+
"start_timer_already_active": "A timer is already running. Please reload the page.",
|
|
1888
1894
|
"unarchive_service": "Could not restore this service. Please try again.",
|
|
1889
1895
|
"update_service": "Could not save this service. Please try again.",
|
|
1890
1896
|
"update_timer": "Failed to update timer. Please try again."
|
|
@@ -1907,7 +1913,7 @@ var timeTracking_default$1 = {
|
|
|
1907
1913
|
"invoiced": "Invoiced",
|
|
1908
1914
|
"less_than_one_minute": "< 1 min",
|
|
1909
1915
|
"memo": "Memo",
|
|
1910
|
-
"no_activity_breakdown": "No activity
|
|
1916
|
+
"no_activity_breakdown": "No activity during this period",
|
|
1911
1917
|
"no_services": "No services available",
|
|
1912
1918
|
"other": "Other",
|
|
1913
1919
|
"select_customer": "Select a customer (optional)",
|
|
@@ -1915,7 +1921,8 @@ var timeTracking_default$1 = {
|
|
|
1915
1921
|
"select_service": "Select a service",
|
|
1916
1922
|
"service": "Service",
|
|
1917
1923
|
"time_entries": "Time Entries",
|
|
1918
|
-
"time_tracking": "Time Tracking"
|
|
1924
|
+
"time_tracking": "Time Tracking",
|
|
1925
|
+
"zero_minutes": "0 min"
|
|
1919
1926
|
},
|
|
1920
1927
|
prompt: {
|
|
1921
1928
|
"delete_entry": "Delete this time entry?",
|
|
@@ -1928,6 +1935,7 @@ var timeTracking_default$1 = {
|
|
|
1928
1935
|
"archive_confirm_description": "This service will be removed from your active list. Time entries that used it are unchanged.",
|
|
1929
1936
|
"archive_confirm_title": "Archive this service?",
|
|
1930
1937
|
"archived": "Archived",
|
|
1938
|
+
"archived_service": "{{name}} (Archived)",
|
|
1931
1939
|
"cancel": "Cancel",
|
|
1932
1940
|
"create_service_input_value": "Create service \"{{inputValue}}\"",
|
|
1933
1941
|
"hourly_rate_optional": "Default hourly rate (optional)",
|
|
@@ -3323,6 +3331,7 @@ var timeTracking_default = {
|
|
|
3323
3331
|
"archive_service": "Impossible d'archiver ce service. Veuillez réessayer.",
|
|
3324
3332
|
"cancel_timer": "Impossible d'annuler le minuteur. Veuillez réessayer.",
|
|
3325
3333
|
"complete_timer": "Impossible de terminer le minuteur. Veuillez réessayer.",
|
|
3334
|
+
"complete_timer_stale": "",
|
|
3326
3335
|
"create_service": "Impossible de créer le service. Veuillez réessayer.",
|
|
3327
3336
|
"delete_entry": "Impossible de supprimer l'entrée de temps. Veuillez vérifier votre connexion et réessayer.",
|
|
3328
3337
|
"load_active_timer": "Impossible de charger le minuteur actif. Veuillez vérifier votre connexion et réessayer.",
|
|
@@ -3331,6 +3340,7 @@ var timeTracking_default = {
|
|
|
3331
3340
|
"load_services": "Impossible de charger les services.",
|
|
3332
3341
|
"load_summary": "Impossible de charger le sommaire du suivi du temps",
|
|
3333
3342
|
"start_timer": "Impossible de démarrer le minuteur. Veuillez réessayer.",
|
|
3343
|
+
"start_timer_already_active": "",
|
|
3334
3344
|
"unarchive_service": "Impossible de restaurer ce service. Veuillez réessayer.",
|
|
3335
3345
|
"update_service": "Impossible d'enregistrer ce service. Veuillez réessayer.",
|
|
3336
3346
|
"update_timer": "Impossible de mettre à jour le minuteur. Veuillez réessayer."
|
|
@@ -3353,7 +3363,7 @@ var timeTracking_default = {
|
|
|
3353
3363
|
"invoiced": "Facturé",
|
|
3354
3364
|
"less_than_one_minute": "",
|
|
3355
3365
|
"memo": "Note",
|
|
3356
|
-
"no_activity_breakdown": "
|
|
3366
|
+
"no_activity_breakdown": "",
|
|
3357
3367
|
"no_services": "Aucun service disponible",
|
|
3358
3368
|
"other": "Autre",
|
|
3359
3369
|
"select_customer": "Sélectionner un client (facultatif)",
|
|
@@ -3361,7 +3371,8 @@ var timeTracking_default = {
|
|
|
3361
3371
|
"select_service": "Sélectionner un service",
|
|
3362
3372
|
"service": "Service",
|
|
3363
3373
|
"time_entries": "Entrées de temps",
|
|
3364
|
-
"time_tracking": ""
|
|
3374
|
+
"time_tracking": "",
|
|
3375
|
+
"zero_minutes": ""
|
|
3365
3376
|
},
|
|
3366
3377
|
prompt: {
|
|
3367
3378
|
"delete_entry": "Supprimer cette entrée de temps?",
|
|
@@ -3374,6 +3385,7 @@ var timeTracking_default = {
|
|
|
3374
3385
|
"archive_confirm_description": "Ce service sera retiré de votre liste active. Les entrées de temps qui l'utilisaient ne sont pas modifiées.",
|
|
3375
3386
|
"archive_confirm_title": "Archiver ce service?",
|
|
3376
3387
|
"archived": "Archivés",
|
|
3388
|
+
"archived_service": "",
|
|
3377
3389
|
"cancel": "Annuler",
|
|
3378
3390
|
"create_service_input_value": "",
|
|
3379
3391
|
"hourly_rate_optional": "Taux horaire par défaut (facultatif)",
|
|
@@ -3703,11 +3715,11 @@ function _objectWithoutProperties(e, t) {
|
|
|
3703
3715
|
}
|
|
3704
3716
|
return i;
|
|
3705
3717
|
}
|
|
3706
|
-
var _excluded$
|
|
3718
|
+
var _excluded$115 = ["_locale"];
|
|
3707
3719
|
var createLocalizedFetcher = (fetcher) => {
|
|
3708
3720
|
if (!fetcher) return null;
|
|
3709
3721
|
return (_ref, ...rest) => {
|
|
3710
|
-
let { _locale: _locale$1 } = _ref, key = _objectWithoutProperties(_ref, _excluded$
|
|
3722
|
+
let { _locale: _locale$1 } = _ref, key = _objectWithoutProperties(_ref, _excluded$115);
|
|
3711
3723
|
setLocaleHeader(_locale$1);
|
|
3712
3724
|
return fetcher(key, ...rest);
|
|
3713
3725
|
};
|
|
@@ -3722,7 +3734,7 @@ const useLocalizedKey = () => {
|
|
|
3722
3734
|
return _objectSpread2(_objectSpread2({}, key), {}, { _locale: locale });
|
|
3723
3735
|
};
|
|
3724
3736
|
};
|
|
3725
|
-
var _excluded$
|
|
3737
|
+
var _excluded$114 = ["trigger"];
|
|
3726
3738
|
var UNLINK_BANK_ACCOUNT_TAG_KEY = "#unlink-bank-account";
|
|
3727
3739
|
var unlinkBankAccount = del(({ businessId, bankAccountId }) => `/v1/businesses/${businessId}/bank-accounts/${bankAccountId}`);
|
|
3728
3740
|
function buildKey$87({ access_token: accessToken, apiUrl, businessId }) {
|
|
@@ -3745,7 +3757,7 @@ function useUnlinkBankAccount() {
|
|
|
3745
3757
|
})), ({ accessToken, apiUrl: apiUrl$1, businessId: businessId$1 }, { arg: bankAccountId }) => unlinkBankAccount(apiUrl$1, accessToken, { params: {
|
|
3746
3758
|
businessId: businessId$1,
|
|
3747
3759
|
bankAccountId
|
|
3748
|
-
} }), { revalidate: false }), { trigger: rawTrigger } = _useSWRMutation, rest = _objectWithoutProperties(_useSWRMutation, _excluded$
|
|
3760
|
+
} }), { revalidate: false }), { trigger: rawTrigger } = _useSWRMutation, rest = _objectWithoutProperties(_useSWRMutation, _excluded$114);
|
|
3749
3761
|
const triggerRef = useRef(rawTrigger);
|
|
3750
3762
|
triggerRef.current = rawTrigger;
|
|
3751
3763
|
return _objectSpread2({ trigger: useCallback((bankAccountId) => triggerRef.current(bankAccountId), []) }, rest);
|
|
@@ -5765,14 +5777,14 @@ const useBankTransactionsFilters = ({ scope, monthlyView, applyGlobalDateRange,
|
|
|
5765
5777
|
dateFilterMode
|
|
5766
5778
|
]);
|
|
5767
5779
|
};
|
|
5768
|
-
var _excluded$
|
|
5780
|
+
var _excluded$113 = ["size"];
|
|
5769
5781
|
var Bell = (_ref) => {
|
|
5770
5782
|
let { size = 18 } = _ref;
|
|
5771
5783
|
return /* @__PURE__ */ jsxs("svg", _objectSpread2(_objectSpread2({
|
|
5772
5784
|
xmlns: "http://www.w3.org/2000/svg",
|
|
5773
5785
|
viewBox: "0 0 18 18",
|
|
5774
5786
|
fill: "none"
|
|
5775
|
-
}, _objectWithoutProperties(_ref, _excluded$
|
|
5787
|
+
}, _objectWithoutProperties(_ref, _excluded$113)), {}, {
|
|
5776
5788
|
width: size,
|
|
5777
5789
|
height: size,
|
|
5778
5790
|
children: [/* @__PURE__ */ jsx("path", {
|
|
@@ -5789,14 +5801,14 @@ var Bell = (_ref) => {
|
|
|
5789
5801
|
}));
|
|
5790
5802
|
};
|
|
5791
5803
|
var Bell_default = Bell;
|
|
5792
|
-
var _excluded$
|
|
5804
|
+
var _excluded$112 = ["size"];
|
|
5793
5805
|
var CreditCard = (_ref) => {
|
|
5794
5806
|
let { size = 12 } = _ref;
|
|
5795
5807
|
return /* @__PURE__ */ jsxs("svg", _objectSpread2(_objectSpread2({
|
|
5796
5808
|
xmlns: "http://www.w3.org/2000/svg",
|
|
5797
5809
|
viewBox: "0 0 12 12",
|
|
5798
5810
|
fill: "none"
|
|
5799
|
-
}, _objectWithoutProperties(_ref, _excluded$
|
|
5811
|
+
}, _objectWithoutProperties(_ref, _excluded$112)), {}, {
|
|
5800
5812
|
width: size,
|
|
5801
5813
|
height: size,
|
|
5802
5814
|
children: [/* @__PURE__ */ jsx("path", {
|
|
@@ -5813,14 +5825,14 @@ var CreditCard = (_ref) => {
|
|
|
5813
5825
|
}));
|
|
5814
5826
|
};
|
|
5815
5827
|
var CreditCard_default = CreditCard;
|
|
5816
|
-
var _excluded$
|
|
5828
|
+
var _excluded$111 = ["size"];
|
|
5817
5829
|
var Folder = (_ref) => {
|
|
5818
5830
|
let { size = 12 } = _ref;
|
|
5819
5831
|
return /* @__PURE__ */ jsx("svg", _objectSpread2(_objectSpread2({
|
|
5820
5832
|
xmlns: "http://www.w3.org/2000/svg",
|
|
5821
5833
|
viewBox: "0 0 12 12",
|
|
5822
5834
|
fill: "none"
|
|
5823
|
-
}, _objectWithoutProperties(_ref, _excluded$
|
|
5835
|
+
}, _objectWithoutProperties(_ref, _excluded$111)), {}, {
|
|
5824
5836
|
width: size,
|
|
5825
5837
|
height: size,
|
|
5826
5838
|
children: /* @__PURE__ */ jsx("path", {
|
|
@@ -5832,14 +5844,14 @@ var Folder = (_ref) => {
|
|
|
5832
5844
|
}));
|
|
5833
5845
|
};
|
|
5834
5846
|
var Folder_default = Folder;
|
|
5835
|
-
var _excluded$
|
|
5836
|
-
var Link$
|
|
5847
|
+
var _excluded$110 = ["size"];
|
|
5848
|
+
var Link$4 = (_ref) => {
|
|
5837
5849
|
let { size = 18 } = _ref;
|
|
5838
5850
|
return /* @__PURE__ */ jsxs("svg", _objectSpread2(_objectSpread2({
|
|
5839
5851
|
xmlns: "http://www.w3.org/2000/svg",
|
|
5840
5852
|
viewBox: "0 0 18 18",
|
|
5841
5853
|
fill: "none"
|
|
5842
|
-
}, _objectWithoutProperties(_ref, _excluded$
|
|
5854
|
+
}, _objectWithoutProperties(_ref, _excluded$110)), {}, {
|
|
5843
5855
|
width: size,
|
|
5844
5856
|
height: size,
|
|
5845
5857
|
children: [/* @__PURE__ */ jsx("path", {
|
|
@@ -5855,7 +5867,7 @@ var Link$3 = (_ref) => {
|
|
|
5855
5867
|
})]
|
|
5856
5868
|
}));
|
|
5857
5869
|
};
|
|
5858
|
-
var Link_default = Link$
|
|
5870
|
+
var Link_default = Link$4;
|
|
5859
5871
|
var PlaidIcon = () => {
|
|
5860
5872
|
return /* @__PURE__ */ jsx("img", {
|
|
5861
5873
|
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",
|
|
@@ -5863,14 +5875,14 @@ var PlaidIcon = () => {
|
|
|
5863
5875
|
});
|
|
5864
5876
|
};
|
|
5865
5877
|
var PlaidIcon_default = PlaidIcon;
|
|
5866
|
-
var _excluded$
|
|
5878
|
+
var _excluded$109 = ["size"];
|
|
5867
5879
|
var Sunrise = (_ref) => {
|
|
5868
5880
|
let { size = 12 } = _ref;
|
|
5869
5881
|
return /* @__PURE__ */ jsxs("svg", _objectSpread2(_objectSpread2({
|
|
5870
5882
|
xmlns: "http://www.w3.org/2000/svg",
|
|
5871
5883
|
viewBox: "0 0 12 12",
|
|
5872
5884
|
fill: "none"
|
|
5873
|
-
}, _objectWithoutProperties(_ref, _excluded$
|
|
5885
|
+
}, _objectWithoutProperties(_ref, _excluded$109)), {}, {
|
|
5874
5886
|
width: size,
|
|
5875
5887
|
height: size,
|
|
5876
5888
|
children: [
|
|
@@ -5947,7 +5959,7 @@ var ChevronRight$1 = (_ref) => {
|
|
|
5947
5959
|
}) }));
|
|
5948
5960
|
};
|
|
5949
5961
|
var ChevronRight_default = ChevronRight$1;
|
|
5950
|
-
var _excluded$
|
|
5962
|
+
var _excluded$108 = [
|
|
5951
5963
|
"className",
|
|
5952
5964
|
"children",
|
|
5953
5965
|
"icon",
|
|
@@ -5959,7 +5971,7 @@ var _excluded$106 = [
|
|
|
5959
5971
|
"download"
|
|
5960
5972
|
];
|
|
5961
5973
|
const IconButton = (_ref) => {
|
|
5962
|
-
let { className, children: _children, icon, active, withBorder = false, href, target, rel, download } = _ref, props = _objectWithoutProperties(_ref, _excluded$
|
|
5974
|
+
let { className, children: _children, icon, active, withBorder = false, href, target, rel, download } = _ref, props = _objectWithoutProperties(_ref, _excluded$108);
|
|
5963
5975
|
const baseClassName$1 = classNames("Layer__icon-btn", `Layer__icon-btn--${active ? "active" : "inactive"}`, withBorder && "Layer__icon-btn--border", className);
|
|
5964
5976
|
if (href) return /* @__PURE__ */ jsx("a", {
|
|
5965
5977
|
href,
|
|
@@ -6043,17 +6055,17 @@ const useTooltip = ({ initialOpen = false, placement = "top", open: controlledOp
|
|
|
6043
6055
|
data
|
|
6044
6056
|
]);
|
|
6045
6057
|
};
|
|
6046
|
-
var _excluded$
|
|
6058
|
+
var _excluded$107 = ["children"], _excluded2$15 = ["children", "asChild"], _excluded3$6 = ["className", "width"];
|
|
6047
6059
|
const DeprecatedTooltip = (_ref) => {
|
|
6048
6060
|
let { children } = _ref;
|
|
6049
|
-
const tooltip = useTooltip(_objectWithoutProperties(_ref, _excluded$
|
|
6061
|
+
const tooltip = useTooltip(_objectWithoutProperties(_ref, _excluded$107));
|
|
6050
6062
|
return /* @__PURE__ */ jsx(TooltipContext.Provider, {
|
|
6051
6063
|
value: tooltip,
|
|
6052
6064
|
children
|
|
6053
6065
|
});
|
|
6054
6066
|
};
|
|
6055
6067
|
const DeprecatedTooltipTrigger = forwardRef(function TooltipTrigger$1(_ref2, propRef) {
|
|
6056
|
-
let { children, asChild = false } = _ref2, props = _objectWithoutProperties(_ref2, _excluded2$
|
|
6068
|
+
let { children, asChild = false } = _ref2, props = _objectWithoutProperties(_ref2, _excluded2$15);
|
|
6057
6069
|
const context = useTooltipContext();
|
|
6058
6070
|
const childrenRef = isValidElement(children) && "ref" in children ? children.ref : null;
|
|
6059
6071
|
const ref = useMergeRefs([
|
|
@@ -6084,7 +6096,7 @@ const DeprecatedTooltipContent = forwardRef(function TooltipContent$1(_ref3, pro
|
|
|
6084
6096
|
children: props.children
|
|
6085
6097
|
}) })) });
|
|
6086
6098
|
});
|
|
6087
|
-
var _excluded$
|
|
6099
|
+
var _excluded$106 = [
|
|
6088
6100
|
"as",
|
|
6089
6101
|
"className",
|
|
6090
6102
|
"children",
|
|
@@ -6095,7 +6107,7 @@ var _excluded$104 = [
|
|
|
6095
6107
|
"status",
|
|
6096
6108
|
"pb",
|
|
6097
6109
|
"invertColor"
|
|
6098
|
-
], _excluded2$
|
|
6110
|
+
], _excluded2$14 = [
|
|
6099
6111
|
"as",
|
|
6100
6112
|
"className",
|
|
6101
6113
|
"children",
|
|
@@ -6121,7 +6133,7 @@ let TextUseTooltip = /* @__PURE__ */ function(TextUseTooltip$1) {
|
|
|
6121
6133
|
return TextUseTooltip$1;
|
|
6122
6134
|
}({});
|
|
6123
6135
|
const Text$2 = (_ref) => {
|
|
6124
|
-
let { as: Component$1 = "p", className, children, size = TextSize.md, weight = TextWeight.normal, withDeprecatedTooltip: withTooltip, ellipsis, status, pb, invertColor } = _ref, props = _objectWithoutProperties(_ref, _excluded$
|
|
6136
|
+
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);
|
|
6125
6137
|
const dataProperties = toDataProperties({
|
|
6126
6138
|
status,
|
|
6127
6139
|
ellipsis,
|
|
@@ -6142,7 +6154,7 @@ const Text$2 = (_ref) => {
|
|
|
6142
6154
|
}));
|
|
6143
6155
|
};
|
|
6144
6156
|
const DeprecatedTextWithTooltip = (_ref2) => {
|
|
6145
|
-
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$
|
|
6157
|
+
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);
|
|
6146
6158
|
const textElementRef = useRef();
|
|
6147
6159
|
const compareSize = () => {
|
|
6148
6160
|
if (textElementRef.current) setHover(textElementRef.current.children[0].scrollWidth > textElementRef.current.children[0].clientWidth);
|
|
@@ -6244,14 +6256,14 @@ const Badge = ({ icon, onClick, children, tooltip, size = BadgeSize.MEDIUM, vari
|
|
|
6244
6256
|
});
|
|
6245
6257
|
return content;
|
|
6246
6258
|
};
|
|
6247
|
-
var _excluded$
|
|
6259
|
+
var _excluded$105 = ["size"];
|
|
6248
6260
|
var Loader$1 = (_ref) => {
|
|
6249
6261
|
let { size = 18 } = _ref;
|
|
6250
6262
|
return /* @__PURE__ */ jsxs("svg", _objectSpread2(_objectSpread2({
|
|
6251
6263
|
xmlns: "http://www.w3.org/2000/svg",
|
|
6252
6264
|
viewBox: "0 0 18 18",
|
|
6253
6265
|
fill: "none"
|
|
6254
|
-
}, _objectWithoutProperties(_ref, _excluded$
|
|
6266
|
+
}, _objectWithoutProperties(_ref, _excluded$105)), {}, {
|
|
6255
6267
|
width: size,
|
|
6256
6268
|
height: size,
|
|
6257
6269
|
children: [
|
|
@@ -6307,7 +6319,7 @@ var Loader$1 = (_ref) => {
|
|
|
6307
6319
|
}));
|
|
6308
6320
|
};
|
|
6309
6321
|
var Loader_default = Loader$1;
|
|
6310
|
-
var _excluded$
|
|
6322
|
+
var _excluded$104 = [
|
|
6311
6323
|
"className",
|
|
6312
6324
|
"children",
|
|
6313
6325
|
"variant",
|
|
@@ -6327,7 +6339,7 @@ let ButtonVariant = /* @__PURE__ */ function(ButtonVariant$1) {
|
|
|
6327
6339
|
return ButtonVariant$1;
|
|
6328
6340
|
}({});
|
|
6329
6341
|
const Button$2 = (_ref) => {
|
|
6330
|
-
let { className, children, variant = ButtonVariant.primary, leftIcon, rightIcon, iconOnly, iconAsPrimary = false, justify = "center", fullWidth, isProcessing, tooltip } = _ref, props = _objectWithoutProperties(_ref, _excluded$
|
|
6342
|
+
let { className, children, variant = ButtonVariant.primary, leftIcon, rightIcon, iconOnly, iconAsPrimary = false, justify = "center", fullWidth, isProcessing, tooltip } = _ref, props = _objectWithoutProperties(_ref, _excluded$104);
|
|
6331
6343
|
const buttonRef = useRef(null);
|
|
6332
6344
|
let justifyContent = "center";
|
|
6333
6345
|
if (justify) justifyContent = justify;
|
|
@@ -6374,14 +6386,14 @@ const Button$2 = (_ref) => {
|
|
|
6374
6386
|
}) : content
|
|
6375
6387
|
}));
|
|
6376
6388
|
};
|
|
6377
|
-
var _excluded$
|
|
6389
|
+
var _excluded$103 = ["size"];
|
|
6378
6390
|
var AlertOctagon = (_ref) => {
|
|
6379
6391
|
let { size = 18 } = _ref;
|
|
6380
6392
|
return /* @__PURE__ */ jsxs("svg", _objectSpread2(_objectSpread2({
|
|
6381
6393
|
viewBox: "0 0 18 18",
|
|
6382
6394
|
fill: "none",
|
|
6383
6395
|
xmlns: "http://www.w3.org/2000/svg"
|
|
6384
|
-
}, _objectWithoutProperties(_ref, _excluded$
|
|
6396
|
+
}, _objectWithoutProperties(_ref, _excluded$103)), {}, {
|
|
6385
6397
|
width: size,
|
|
6386
6398
|
height: size,
|
|
6387
6399
|
children: [
|
|
@@ -6407,14 +6419,14 @@ var AlertOctagon = (_ref) => {
|
|
|
6407
6419
|
}));
|
|
6408
6420
|
};
|
|
6409
6421
|
var AlertOctagon_default = AlertOctagon;
|
|
6410
|
-
var _excluded$
|
|
6422
|
+
var _excluded$102 = ["size"];
|
|
6411
6423
|
var CheckCircle$1 = (_ref) => {
|
|
6412
6424
|
let { size = 18 } = _ref;
|
|
6413
6425
|
return /* @__PURE__ */ jsxs("svg", _objectSpread2(_objectSpread2({
|
|
6414
6426
|
viewBox: "0 0 18 18",
|
|
6415
6427
|
fill: "none",
|
|
6416
6428
|
xmlns: "http://www.w3.org/2000/svg"
|
|
6417
|
-
}, _objectWithoutProperties(_ref, _excluded$
|
|
6429
|
+
}, _objectWithoutProperties(_ref, _excluded$102)), {}, {
|
|
6418
6430
|
width: size,
|
|
6419
6431
|
height: size,
|
|
6420
6432
|
children: [/* @__PURE__ */ jsx("path", {
|
|
@@ -6431,14 +6443,14 @@ var CheckCircle$1 = (_ref) => {
|
|
|
6431
6443
|
}));
|
|
6432
6444
|
};
|
|
6433
6445
|
var CheckCircle_default = CheckCircle$1;
|
|
6434
|
-
var _excluded$
|
|
6446
|
+
var _excluded$101 = ["size"];
|
|
6435
6447
|
var RefreshCcw$1 = (_ref) => {
|
|
6436
6448
|
let { size = 18 } = _ref;
|
|
6437
6449
|
return /* @__PURE__ */ jsxs("svg", _objectSpread2(_objectSpread2({
|
|
6438
6450
|
viewBox: "0 0 18 18",
|
|
6439
6451
|
fill: "none",
|
|
6440
6452
|
xmlns: "http://www.w3.org/2000/svg"
|
|
6441
|
-
}, _objectWithoutProperties(_ref, _excluded$
|
|
6453
|
+
}, _objectWithoutProperties(_ref, _excluded$101)), {}, {
|
|
6442
6454
|
width: size,
|
|
6443
6455
|
height: size,
|
|
6444
6456
|
children: [
|
|
@@ -7026,7 +7038,7 @@ function BulkSelectionStoreProvider({ children }) {
|
|
|
7026
7038
|
children
|
|
7027
7039
|
});
|
|
7028
7040
|
}
|
|
7029
|
-
var _excluded$
|
|
7041
|
+
var _excluded$100 = [
|
|
7030
7042
|
"align",
|
|
7031
7043
|
"children",
|
|
7032
7044
|
"className",
|
|
@@ -7044,7 +7056,7 @@ var _excluded$98 = [
|
|
|
7044
7056
|
];
|
|
7045
7057
|
var CLASS_NAME$11 = "Layer__Stack";
|
|
7046
7058
|
const Stack = forwardRef(function Stack$1(_ref, ref) {
|
|
7047
|
-
let { align, children, className, direction, gap, justify, overflow, pb, pbs, pbe, pi, pis, pie, fluid } = _ref, restProps = _objectWithoutProperties(_ref, _excluded$
|
|
7059
|
+
let { align, children, className, direction, gap, justify, overflow, pb, pbs, pbe, pi, pis, pie, fluid } = _ref, restProps = _objectWithoutProperties(_ref, _excluded$100);
|
|
7048
7060
|
const dataProperties = toDataProperties({
|
|
7049
7061
|
align,
|
|
7050
7062
|
direction,
|
|
@@ -7343,7 +7355,7 @@ function useSizeClass() {
|
|
|
7343
7355
|
isDesktop: sizeClass === "desktop"
|
|
7344
7356
|
};
|
|
7345
7357
|
}
|
|
7346
|
-
var _excluded$
|
|
7358
|
+
var _excluded$99 = ["children"], _excluded2$13 = [
|
|
7347
7359
|
"children",
|
|
7348
7360
|
"asChild",
|
|
7349
7361
|
"wordBreak"
|
|
@@ -7354,14 +7366,14 @@ var _excluded$97 = ["children"], _excluded2$12 = [
|
|
|
7354
7366
|
];
|
|
7355
7367
|
const Tooltip$1 = (_ref) => {
|
|
7356
7368
|
let { children } = _ref;
|
|
7357
|
-
const tooltip = useTooltip(_objectWithoutProperties(_ref, _excluded$
|
|
7369
|
+
const tooltip = useTooltip(_objectWithoutProperties(_ref, _excluded$99));
|
|
7358
7370
|
return /* @__PURE__ */ jsx(TooltipContext.Provider, {
|
|
7359
7371
|
value: tooltip,
|
|
7360
7372
|
children
|
|
7361
7373
|
});
|
|
7362
7374
|
};
|
|
7363
7375
|
const TooltipTrigger = forwardRef(function TooltipTrigger$1(_ref2, propRef) {
|
|
7364
|
-
let { children, asChild = false, wordBreak } = _ref2, props = _objectWithoutProperties(_ref2, _excluded2$
|
|
7376
|
+
let { children, asChild = false, wordBreak } = _ref2, props = _objectWithoutProperties(_ref2, _excluded2$13);
|
|
7365
7377
|
const context = useTooltipContext();
|
|
7366
7378
|
const childrenRef = isValidElement(children) && "ref" in children ? children.ref : null;
|
|
7367
7379
|
const ref = useMergeRefs([
|
|
@@ -7426,7 +7438,7 @@ function useTruncationDetection(elementRef, options = {
|
|
|
7426
7438
|
}, [checkTruncation]);
|
|
7427
7439
|
return isTruncated;
|
|
7428
7440
|
}
|
|
7429
|
-
var _excluded$
|
|
7441
|
+
var _excluded$98 = [
|
|
7430
7442
|
"align",
|
|
7431
7443
|
"children",
|
|
7432
7444
|
"ellipsis",
|
|
@@ -7441,7 +7453,7 @@ var _excluded$96 = [
|
|
|
7441
7453
|
"weight"
|
|
7442
7454
|
];
|
|
7443
7455
|
function splitTextProps(props) {
|
|
7444
|
-
const { align, children, ellipsis, nonAria, noWrap, pb, pbe, pbs, size, status, variant, weight } = props, restProps = _objectWithoutProperties(props, _excluded$
|
|
7456
|
+
const { align, children, ellipsis, nonAria, noWrap, pb, pbe, pbs, size, status, variant, weight } = props, restProps = _objectWithoutProperties(props, _excluded$98);
|
|
7445
7457
|
return {
|
|
7446
7458
|
children,
|
|
7447
7459
|
dataProperties: toDataProperties({
|
|
@@ -7603,7 +7615,7 @@ function withRenderProp(renderProp, callback) {
|
|
|
7603
7615
|
if (typeof renderProp === "function") return renderProp;
|
|
7604
7616
|
return callback(renderProp);
|
|
7605
7617
|
}
|
|
7606
|
-
var _excluded$
|
|
7618
|
+
var _excluded$97 = [
|
|
7607
7619
|
"children",
|
|
7608
7620
|
"ellipsis",
|
|
7609
7621
|
"icon",
|
|
@@ -7631,7 +7643,7 @@ function ButtonTransparentContent({ children }) {
|
|
|
7631
7643
|
});
|
|
7632
7644
|
}
|
|
7633
7645
|
var Button$1 = forwardRef((_ref, ref) => {
|
|
7634
|
-
let { children, ellipsis, icon, inset, size = "md", variant = "solid", fullWidth = false, flex = false } = _ref, restProps = _objectWithoutProperties(_ref, _excluded$
|
|
7646
|
+
let { children, ellipsis, icon, inset, size = "md", variant = "solid", fullWidth = false, flex = false } = _ref, restProps = _objectWithoutProperties(_ref, _excluded$97);
|
|
7635
7647
|
const { isPending = false } = restProps;
|
|
7636
7648
|
const dataProperties = toDataProperties({
|
|
7637
7649
|
ellipsis,
|
|
@@ -7652,10 +7664,10 @@ var Button$1 = forwardRef((_ref, ref) => {
|
|
|
7652
7664
|
}));
|
|
7653
7665
|
});
|
|
7654
7666
|
Button$1.displayName = "Button";
|
|
7655
|
-
var _excluded$
|
|
7667
|
+
var _excluded$96 = ["one", "other"];
|
|
7656
7668
|
const tPlural = (translate, key, _ref) => {
|
|
7657
7669
|
let { one, other } = _ref;
|
|
7658
|
-
return translate(key, _objectSpread2(_objectSpread2({}, _objectWithoutProperties(_ref, _excluded$
|
|
7670
|
+
return translate(key, _objectSpread2(_objectSpread2({}, _objectWithoutProperties(_ref, _excluded$96)), {}, {
|
|
7659
7671
|
defaultValue_one: one,
|
|
7660
7672
|
defaultValue_other: other
|
|
7661
7673
|
}));
|
|
@@ -8821,7 +8833,7 @@ const useVirtualKeyboardHeight = () => {
|
|
|
8821
8833
|
}, []);
|
|
8822
8834
|
return keyboardHeight;
|
|
8823
8835
|
};
|
|
8824
|
-
var _excluded$
|
|
8836
|
+
var _excluded$95 = ["variant"], _excluded2$12 = [
|
|
8825
8837
|
"variant",
|
|
8826
8838
|
"children",
|
|
8827
8839
|
"slots",
|
|
@@ -8831,7 +8843,7 @@ var _excluded$93 = ["variant"], _excluded2$11 = [
|
|
|
8831
8843
|
];
|
|
8832
8844
|
var MODAL_OVERLAY_CLASS_NAME = `Layer__Portal Layer__ModalOverlay`;
|
|
8833
8845
|
var ModalOverlay$1 = forwardRef((_ref, ref) => {
|
|
8834
|
-
let { variant } = _ref, restProps = _objectWithoutProperties(_ref, _excluded$
|
|
8846
|
+
let { variant } = _ref, restProps = _objectWithoutProperties(_ref, _excluded$95);
|
|
8835
8847
|
return /* @__PURE__ */ jsx(ModalOverlay, _objectSpread2(_objectSpread2(_objectSpread2({}, toDataProperties({ variant })), restProps), {}, {
|
|
8836
8848
|
className: MODAL_OVERLAY_CLASS_NAME,
|
|
8837
8849
|
ref
|
|
@@ -8865,7 +8877,7 @@ var MobileDrawerKeyboardSpacer = () => {
|
|
|
8865
8877
|
};
|
|
8866
8878
|
var DIALOG_CLASS_NAME = "Layer__Dialog";
|
|
8867
8879
|
var Dialog$1 = forwardRef((_ref2, ref) => {
|
|
8868
|
-
let { variant = "center", children, slots, isEntering, isExiting, fixedHeight } = _ref2, restProps = _objectWithoutProperties(_ref2, _excluded2$
|
|
8880
|
+
let { variant = "center", children, slots, isEntering, isExiting, fixedHeight } = _ref2, restProps = _objectWithoutProperties(_ref2, _excluded2$12);
|
|
8869
8881
|
const dataProperties = toDataProperties({
|
|
8870
8882
|
variant,
|
|
8871
8883
|
entering: isEntering,
|
|
@@ -8933,7 +8945,7 @@ function Drawer({ isOpen, onOpenChange, size = "md", flexBlock, flexInline, chil
|
|
|
8933
8945
|
})
|
|
8934
8946
|
});
|
|
8935
8947
|
}
|
|
8936
|
-
var _excluded$
|
|
8948
|
+
var _excluded$94 = [
|
|
8937
8949
|
"align",
|
|
8938
8950
|
"pie",
|
|
8939
8951
|
"pbe",
|
|
@@ -8945,7 +8957,7 @@ var _excluded$92 = [
|
|
|
8945
8957
|
];
|
|
8946
8958
|
var HEADING_CLASS_NAME = "Layer__UI__Heading";
|
|
8947
8959
|
var Heading$1 = forwardRef((_ref, ref) => {
|
|
8948
|
-
let { align, pie, pbe, size, variant, weight, ellipsis, className } = _ref, restProps = _objectWithoutProperties(_ref, _excluded$
|
|
8960
|
+
let { align, pie, pbe, size, variant, weight, ellipsis, className } = _ref, restProps = _objectWithoutProperties(_ref, _excluded$94);
|
|
8949
8961
|
const dataProperties = toDataProperties({
|
|
8950
8962
|
pbe,
|
|
8951
8963
|
pie,
|
|
@@ -9029,14 +9041,14 @@ function ModalActions({ children }) {
|
|
|
9029
9041
|
children
|
|
9030
9042
|
});
|
|
9031
9043
|
}
|
|
9032
|
-
var _excluded$
|
|
9044
|
+
var _excluded$93 = ["size"];
|
|
9033
9045
|
var AlertCircle$1 = (_ref) => {
|
|
9034
9046
|
let { size = 18 } = _ref;
|
|
9035
9047
|
return /* @__PURE__ */ jsxs("svg", _objectSpread2(_objectSpread2({
|
|
9036
9048
|
viewBox: "0 0 18 18",
|
|
9037
9049
|
fill: "none",
|
|
9038
9050
|
xmlns: "http://www.w3.org/2000/svg"
|
|
9039
|
-
}, _objectWithoutProperties(_ref, _excluded$
|
|
9051
|
+
}, _objectWithoutProperties(_ref, _excluded$93)), {}, {
|
|
9040
9052
|
width: size,
|
|
9041
9053
|
height: size,
|
|
9042
9054
|
children: [
|
|
@@ -9062,14 +9074,14 @@ var AlertCircle$1 = (_ref) => {
|
|
|
9062
9074
|
}));
|
|
9063
9075
|
};
|
|
9064
9076
|
var AlertCircle_default = AlertCircle$1;
|
|
9065
|
-
var _excluded$
|
|
9077
|
+
var _excluded$92 = ["size"];
|
|
9066
9078
|
var Save$1 = (_ref) => {
|
|
9067
9079
|
let { size = 18 } = _ref;
|
|
9068
9080
|
return /* @__PURE__ */ jsxs("svg", _objectSpread2(_objectSpread2({
|
|
9069
9081
|
xmlns: "http://www.w3.org/2000/svg",
|
|
9070
9082
|
viewBox: "0 0 18 18",
|
|
9071
9083
|
fill: "none"
|
|
9072
|
-
}, _objectWithoutProperties(_ref, _excluded$
|
|
9084
|
+
}, _objectWithoutProperties(_ref, _excluded$92)), {}, {
|
|
9073
9085
|
width: size,
|
|
9074
9086
|
height: size,
|
|
9075
9087
|
children: [
|
|
@@ -9095,7 +9107,7 @@ var Save$1 = (_ref) => {
|
|
|
9095
9107
|
}));
|
|
9096
9108
|
};
|
|
9097
9109
|
var Save_default = Save$1;
|
|
9098
|
-
var _excluded$
|
|
9110
|
+
var _excluded$91 = [
|
|
9099
9111
|
"className",
|
|
9100
9112
|
"processing",
|
|
9101
9113
|
"disabled",
|
|
@@ -9103,7 +9115,7 @@ var _excluded$89 = [
|
|
|
9103
9115
|
"children"
|
|
9104
9116
|
];
|
|
9105
9117
|
const RetryButton = (_ref) => {
|
|
9106
|
-
let { className, processing, disabled, error: error$38, children } = _ref, props = _objectWithoutProperties(_ref, _excluded$
|
|
9118
|
+
let { className, processing, disabled, error: error$38, children } = _ref, props = _objectWithoutProperties(_ref, _excluded$91);
|
|
9107
9119
|
const baseClassName$1 = classNames("Layer__retry-btn", processing ? "Layer__btn--processing" : "", className);
|
|
9108
9120
|
return /* @__PURE__ */ jsx(Button$2, _objectSpread2(_objectSpread2({}, props), {}, {
|
|
9109
9121
|
className: baseClassName$1,
|
|
@@ -9115,7 +9127,7 @@ const RetryButton = (_ref) => {
|
|
|
9115
9127
|
children
|
|
9116
9128
|
}));
|
|
9117
9129
|
};
|
|
9118
|
-
var _excluded$
|
|
9130
|
+
var _excluded$90 = [
|
|
9119
9131
|
"active",
|
|
9120
9132
|
"className",
|
|
9121
9133
|
"processing",
|
|
@@ -9152,7 +9164,7 @@ var buildRightIcon = ({ processing, error: error$38, action: action$44, noIcon }
|
|
|
9152
9164
|
return /* @__PURE__ */ jsx(Save_default, { size: 16 });
|
|
9153
9165
|
};
|
|
9154
9166
|
const SubmitButton = (_ref) => {
|
|
9155
|
-
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$
|
|
9167
|
+
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);
|
|
9156
9168
|
const { t } = useTranslation();
|
|
9157
9169
|
const baseClassName$1 = classNames(active ? "Layer__btn--active" : "", className);
|
|
9158
9170
|
if (withRetry && error$38) return /* @__PURE__ */ jsx(RetryButton, _objectSpread2(_objectSpread2({}, props), {}, {
|
|
@@ -9175,7 +9187,7 @@ const SubmitButton = (_ref) => {
|
|
|
9175
9187
|
children
|
|
9176
9188
|
}));
|
|
9177
9189
|
};
|
|
9178
|
-
var _excluded$
|
|
9190
|
+
var _excluded$89 = [
|
|
9179
9191
|
"isOpen",
|
|
9180
9192
|
"onOpenChange",
|
|
9181
9193
|
"useDrawer"
|
|
@@ -9241,7 +9253,7 @@ var BaseConfirmationModalContent = memo(function BaseConfirmationModalContent$1(
|
|
|
9241
9253
|
});
|
|
9242
9254
|
});
|
|
9243
9255
|
function BaseConfirmationModal(_ref) {
|
|
9244
|
-
let { isOpen, onOpenChange, useDrawer = false } = _ref, contentProps = _objectWithoutProperties(_ref, _excluded$
|
|
9256
|
+
let { isOpen, onOpenChange, useDrawer = false } = _ref, contentProps = _objectWithoutProperties(_ref, _excluded$89);
|
|
9245
9257
|
if (useDrawer) return /* @__PURE__ */ jsx(Drawer, {
|
|
9246
9258
|
flexBlock: true,
|
|
9247
9259
|
isOpen,
|
|
@@ -9293,14 +9305,14 @@ const COMBO_BOX_CLASS_NAMES = {
|
|
|
9293
9305
|
MULTI_VALUE: "Layer__ComboBoxMultiValue",
|
|
9294
9306
|
MULTI_VALUE_LABEL: "Layer__ComboBoxMultiValueLabel"
|
|
9295
9307
|
};
|
|
9296
|
-
var _excluded$
|
|
9308
|
+
var _excluded$88 = ["size"];
|
|
9297
9309
|
var Check$1 = (_ref) => {
|
|
9298
9310
|
let { size = 18 } = _ref;
|
|
9299
9311
|
return /* @__PURE__ */ jsx("svg", _objectSpread2(_objectSpread2({
|
|
9300
9312
|
viewBox: "0 0 18 18",
|
|
9301
9313
|
fill: "none",
|
|
9302
9314
|
xmlns: "http://www.w3.org/2000/svg"
|
|
9303
|
-
}, _objectWithoutProperties(_ref, _excluded$
|
|
9315
|
+
}, _objectWithoutProperties(_ref, _excluded$88)), {}, {
|
|
9304
9316
|
width: size,
|
|
9305
9317
|
height: size,
|
|
9306
9318
|
children: /* @__PURE__ */ jsx("path", {
|
|
@@ -9312,14 +9324,14 @@ var Check$1 = (_ref) => {
|
|
|
9312
9324
|
}));
|
|
9313
9325
|
};
|
|
9314
9326
|
var Check_default = Check$1;
|
|
9315
|
-
var _excluded$
|
|
9327
|
+
var _excluded$87 = ["size"];
|
|
9316
9328
|
var ChevronDown$1 = (_ref) => {
|
|
9317
9329
|
let { size = 18 } = _ref;
|
|
9318
9330
|
return /* @__PURE__ */ jsx("svg", _objectSpread2(_objectSpread2({
|
|
9319
9331
|
viewBox: "0 0 18 18",
|
|
9320
9332
|
fill: "none",
|
|
9321
9333
|
xmlns: "http://www.w3.org/2000/svg"
|
|
9322
|
-
}, _objectWithoutProperties(_ref, _excluded$
|
|
9334
|
+
}, _objectWithoutProperties(_ref, _excluded$87)), {}, {
|
|
9323
9335
|
width: size,
|
|
9324
9336
|
height: size,
|
|
9325
9337
|
children: /* @__PURE__ */ jsx("path", {
|
|
@@ -9331,14 +9343,14 @@ var ChevronDown$1 = (_ref) => {
|
|
|
9331
9343
|
}));
|
|
9332
9344
|
};
|
|
9333
9345
|
var ChevronDown_default = ChevronDown$1;
|
|
9334
|
-
var _excluded$
|
|
9346
|
+
var _excluded$86 = ["size"];
|
|
9335
9347
|
var X$1 = (_ref) => {
|
|
9336
9348
|
let { size = 18 } = _ref;
|
|
9337
9349
|
return /* @__PURE__ */ jsxs("svg", _objectSpread2(_objectSpread2({
|
|
9338
9350
|
xmlns: "http://www.w3.org/2000/svg",
|
|
9339
9351
|
viewBox: "0 0 18 18",
|
|
9340
9352
|
fill: "none"
|
|
9341
|
-
}, _objectWithoutProperties(_ref, _excluded$
|
|
9353
|
+
}, _objectWithoutProperties(_ref, _excluded$86)), {}, {
|
|
9342
9354
|
width: size,
|
|
9343
9355
|
height: size,
|
|
9344
9356
|
children: [/* @__PURE__ */ jsx("path", {
|
|
@@ -9355,10 +9367,10 @@ var X$1 = (_ref) => {
|
|
|
9355
9367
|
}));
|
|
9356
9368
|
};
|
|
9357
9369
|
var X_default = X$1;
|
|
9358
|
-
var _excluded$
|
|
9370
|
+
var _excluded$85 = ["children"], _excluded2$11 = ["children"], _excluded3$4 = ["children"], _excluded4$3 = ["children"], _excluded5$2 = ["children"], _excluded6$2 = ["children"], _excluded7 = ["children"], _excluded8 = ["children"];
|
|
9359
9371
|
function buildCustomClearIndicator() {
|
|
9360
9372
|
return function CustomClearIndicator(_ref) {
|
|
9361
|
-
let { children } = _ref, restProps = _objectWithoutProperties(_ref, _excluded$
|
|
9373
|
+
let { children } = _ref, restProps = _objectWithoutProperties(_ref, _excluded$85);
|
|
9362
9374
|
return /* @__PURE__ */ jsx(components.ClearIndicator, _objectSpread2(_objectSpread2({}, restProps), {}, {
|
|
9363
9375
|
className: COMBO_BOX_CLASS_NAMES.CLEAR_INDICATOR,
|
|
9364
9376
|
children: /* @__PURE__ */ jsx(X_default, { size: 16 })
|
|
@@ -9367,7 +9379,7 @@ function buildCustomClearIndicator() {
|
|
|
9367
9379
|
}
|
|
9368
9380
|
function buildCustomDropdownIndicator() {
|
|
9369
9381
|
return function CustomDropdownIndicator(_ref2) {
|
|
9370
|
-
let { children } = _ref2, restProps = _objectWithoutProperties(_ref2, _excluded2$
|
|
9382
|
+
let { children } = _ref2, restProps = _objectWithoutProperties(_ref2, _excluded2$11);
|
|
9371
9383
|
const { isDisabled } = restProps;
|
|
9372
9384
|
return /* @__PURE__ */ jsx(components.DropdownIndicator, _objectSpread2(_objectSpread2({}, restProps), {}, {
|
|
9373
9385
|
className: COMBO_BOX_CLASS_NAMES.DROPDOWN_INDICATOR,
|
|
@@ -9564,7 +9576,7 @@ function useCommonComboBoxProps({ className, options, groups, onInputValueChange
|
|
|
9564
9576
|
styles
|
|
9565
9577
|
]);
|
|
9566
9578
|
}
|
|
9567
|
-
var _excluded$
|
|
9579
|
+
var _excluded$84 = [
|
|
9568
9580
|
"className",
|
|
9569
9581
|
"slots",
|
|
9570
9582
|
"isError",
|
|
@@ -9572,7 +9584,7 @@ var _excluded$82 = [
|
|
|
9572
9584
|
"onSelectedValueChange"
|
|
9573
9585
|
];
|
|
9574
9586
|
function ComboBox(_ref) {
|
|
9575
|
-
let { className, slots, isError, selectedValue, onSelectedValueChange } = _ref, props = _objectWithoutProperties(_ref, _excluded$
|
|
9587
|
+
let { className, slots, isError, selectedValue, onSelectedValueChange } = _ref, props = _objectWithoutProperties(_ref, _excluded$84);
|
|
9576
9588
|
const commonSelectProps = useCommonComboBoxProps(_objectSpread2({
|
|
9577
9589
|
className,
|
|
9578
9590
|
slots,
|
|
@@ -9591,13 +9603,13 @@ function ComboBox(_ref) {
|
|
|
9591
9603
|
})]
|
|
9592
9604
|
});
|
|
9593
9605
|
}
|
|
9594
|
-
var _excluded$
|
|
9606
|
+
var _excluded$83 = [
|
|
9595
9607
|
"amount",
|
|
9596
9608
|
"displayPlusSign",
|
|
9597
9609
|
"className"
|
|
9598
9610
|
];
|
|
9599
9611
|
var MoneySpan = forwardRef((_ref, ref) => {
|
|
9600
|
-
let { amount, displayPlusSign, className } = _ref, restProps = _objectWithoutProperties(_ref, _excluded$
|
|
9612
|
+
let { amount, displayPlusSign, className } = _ref, restProps = _objectWithoutProperties(_ref, _excluded$83);
|
|
9601
9613
|
const { formatCurrencyFromCents: formatCurrencyFromCents$1 } = useIntlFormatter();
|
|
9602
9614
|
const formattedAmount = formatCurrencyFromCents$1(amount, { signDisplay: displayPlusSign ? "always" : "auto" });
|
|
9603
9615
|
return /* @__PURE__ */ jsx(Span, _objectSpread2(_objectSpread2({}, restProps), {}, {
|
|
@@ -9914,14 +9926,14 @@ const getDefaultSelectedCategoryForBankTransaction = (bankTransaction, ignoreSug
|
|
|
9914
9926
|
if (hasSuggestions(bankTransaction.categorization_flow)) return convertApiCategorizationToCategoryOrSplitAsOption(bankTransaction.categorization_flow.suggestions[0]);
|
|
9915
9927
|
return null;
|
|
9916
9928
|
};
|
|
9917
|
-
var _excluded$
|
|
9929
|
+
var _excluded$82 = ["size"];
|
|
9918
9930
|
var MinimizeTwo = (_ref) => {
|
|
9919
9931
|
let { size = 18 } = _ref;
|
|
9920
9932
|
return /* @__PURE__ */ jsxs("svg", _objectSpread2(_objectSpread2({
|
|
9921
9933
|
xmlns: "http://www.w3.org/2000/svg",
|
|
9922
9934
|
viewBox: "0 0 18 18",
|
|
9923
9935
|
fill: "none"
|
|
9924
|
-
}, _objectWithoutProperties(_ref, _excluded$
|
|
9936
|
+
}, _objectWithoutProperties(_ref, _excluded$82)), {}, {
|
|
9925
9937
|
width: size,
|
|
9926
9938
|
height: size,
|
|
9927
9939
|
children: [
|
|
@@ -9953,14 +9965,14 @@ var MinimizeTwo = (_ref) => {
|
|
|
9953
9965
|
}));
|
|
9954
9966
|
};
|
|
9955
9967
|
var MinimizeTwo_default = MinimizeTwo;
|
|
9956
|
-
var _excluded$
|
|
9968
|
+
var _excluded$81 = ["size"];
|
|
9957
9969
|
var Scissors = (_ref) => {
|
|
9958
9970
|
let { size = 11 } = _ref;
|
|
9959
9971
|
return /* @__PURE__ */ jsxs("svg", _objectSpread2(_objectSpread2({
|
|
9960
9972
|
viewBox: "0 0 11 11",
|
|
9961
9973
|
fill: "none",
|
|
9962
9974
|
xmlns: "http://www.w3.org/2000/svg"
|
|
9963
|
-
}, _objectWithoutProperties(_ref, _excluded$
|
|
9975
|
+
}, _objectWithoutProperties(_ref, _excluded$81)), {}, {
|
|
9964
9976
|
width: size,
|
|
9965
9977
|
height: size,
|
|
9966
9978
|
children: [
|
|
@@ -10380,7 +10392,7 @@ var toActionableListOption = (opt) => {
|
|
|
10380
10392
|
value: opt
|
|
10381
10393
|
};
|
|
10382
10394
|
};
|
|
10383
|
-
var _excluded$
|
|
10395
|
+
var _excluded$80 = [
|
|
10384
10396
|
"actionCount",
|
|
10385
10397
|
"className",
|
|
10386
10398
|
"slots",
|
|
@@ -10388,7 +10400,7 @@ var _excluded$78 = [
|
|
|
10388
10400
|
];
|
|
10389
10401
|
var INPUT_GROUP_CLASS_NAME = "Layer__UI__InputGroup";
|
|
10390
10402
|
const InputGroup$1 = forwardRef(function InputGroup$2(_ref, ref) {
|
|
10391
|
-
let { actionCount, className, slots, children } = _ref, restProps = _objectWithoutProperties(_ref, _excluded$
|
|
10403
|
+
let { actionCount, className, slots, children } = _ref, restProps = _objectWithoutProperties(_ref, _excluded$80);
|
|
10392
10404
|
const combinedClassName = classNames(INPUT_GROUP_CLASS_NAME, className);
|
|
10393
10405
|
const dataProperties = toDataProperties({ "action-count": actionCount });
|
|
10394
10406
|
return /* @__PURE__ */ jsx(Group, _objectSpread2(_objectSpread2(_objectSpread2({}, restProps), dataProperties), {}, {
|
|
@@ -10397,10 +10409,10 @@ const InputGroup$1 = forwardRef(function InputGroup$2(_ref, ref) {
|
|
|
10397
10409
|
children
|
|
10398
10410
|
}));
|
|
10399
10411
|
});
|
|
10400
|
-
var _excluded$
|
|
10412
|
+
var _excluded$79 = ["placeholder", "isDisabled"];
|
|
10401
10413
|
var CLASS_NAME$8 = "Layer__MinimalSearchField";
|
|
10402
10414
|
function MinimalSearchField(_ref) {
|
|
10403
|
-
let { placeholder, isDisabled } = _ref, restProps = _objectWithoutProperties(_ref, _excluded$
|
|
10415
|
+
let { placeholder, isDisabled } = _ref, restProps = _objectWithoutProperties(_ref, _excluded$79);
|
|
10404
10416
|
const { t } = useTranslation();
|
|
10405
10417
|
return /* @__PURE__ */ jsxs(SearchField, _objectSpread2(_objectSpread2({}, restProps), {}, {
|
|
10406
10418
|
isDisabled,
|
|
@@ -10418,7 +10430,7 @@ function MinimalSearchField(_ref) {
|
|
|
10418
10430
|
})]
|
|
10419
10431
|
}));
|
|
10420
10432
|
}
|
|
10421
|
-
var _excluded$
|
|
10433
|
+
var _excluded$78 = [
|
|
10422
10434
|
"slot",
|
|
10423
10435
|
"className",
|
|
10424
10436
|
"label",
|
|
@@ -10426,7 +10438,7 @@ var _excluded$76 = [
|
|
|
10426
10438
|
];
|
|
10427
10439
|
var CLASS_NAME$7 = "Layer__SearchField";
|
|
10428
10440
|
function SearchField$1(_ref) {
|
|
10429
|
-
let { slot = "search", className, label: label$50, isDisabled } = _ref, restProps = _objectWithoutProperties(_ref, _excluded$
|
|
10441
|
+
let { slot = "search", className, label: label$50, isDisabled } = _ref, restProps = _objectWithoutProperties(_ref, _excluded$78);
|
|
10430
10442
|
return /* @__PURE__ */ jsxs(InputGroup$1, {
|
|
10431
10443
|
slot,
|
|
10432
10444
|
className: classNames(CLASS_NAME$7, className),
|
|
@@ -10932,14 +10944,14 @@ const BankTransactionsBulkActions = ({ isMobileView = false, slotProps }) => {
|
|
|
10932
10944
|
] })
|
|
10933
10945
|
}) });
|
|
10934
10946
|
};
|
|
10935
|
-
var _excluded$
|
|
10947
|
+
var _excluded$77 = ["size"];
|
|
10936
10948
|
var DownloadCloud = (_ref) => {
|
|
10937
10949
|
let { size = 18 } = _ref;
|
|
10938
10950
|
return /* @__PURE__ */ jsxs("svg", _objectSpread2(_objectSpread2({
|
|
10939
10951
|
xmlns: "http://www.w3.org/2000/svg",
|
|
10940
10952
|
viewBox: "0 0 18 18",
|
|
10941
10953
|
fill: "none"
|
|
10942
|
-
}, _objectWithoutProperties(_ref, _excluded$
|
|
10954
|
+
}, _objectWithoutProperties(_ref, _excluded$77)), {}, {
|
|
10943
10955
|
width: size,
|
|
10944
10956
|
height: size,
|
|
10945
10957
|
children: [
|
|
@@ -10965,14 +10977,14 @@ var DownloadCloud = (_ref) => {
|
|
|
10965
10977
|
}));
|
|
10966
10978
|
};
|
|
10967
10979
|
var DownloadCloud_default = DownloadCloud;
|
|
10968
|
-
var _excluded$
|
|
10980
|
+
var _excluded$76 = ["size"];
|
|
10969
10981
|
var UploadCloud$1 = (_ref) => {
|
|
10970
10982
|
let { size = 18 } = _ref;
|
|
10971
10983
|
return /* @__PURE__ */ jsxs("svg", _objectSpread2(_objectSpread2({
|
|
10972
10984
|
viewBox: "0 0 18 18",
|
|
10973
10985
|
fill: "none",
|
|
10974
10986
|
xmlns: "http://www.w3.org/2000/svg"
|
|
10975
|
-
}, _objectWithoutProperties(_ref, _excluded$
|
|
10987
|
+
}, _objectWithoutProperties(_ref, _excluded$76)), {}, {
|
|
10976
10988
|
width: size,
|
|
10977
10989
|
height: size,
|
|
10978
10990
|
children: [
|
|
@@ -11218,7 +11230,7 @@ function useCustomAccountParseCsv() {
|
|
|
11218
11230
|
file
|
|
11219
11231
|
}).then(({ data: data$1 }) => data$1), { revalidate: false });
|
|
11220
11232
|
}
|
|
11221
|
-
var _excluded$
|
|
11233
|
+
var _excluded$75 = [
|
|
11222
11234
|
"className",
|
|
11223
11235
|
"slots",
|
|
11224
11236
|
"isError",
|
|
@@ -11231,7 +11243,7 @@ var _excluded$73 = [
|
|
|
11231
11243
|
];
|
|
11232
11244
|
var returnTrue = () => true;
|
|
11233
11245
|
function CreatableComboBox(_ref) {
|
|
11234
|
-
let { className, slots, isError, selectedValue, onSelectedValueChange, onCreateOption, formatCreateLabel: formatCreateLabel$3, createOptionPosition = "first", isValidNewOption = returnTrue } = _ref, props = _objectWithoutProperties(_ref, _excluded$
|
|
11246
|
+
let { className, slots, isError, selectedValue, onSelectedValueChange, onCreateOption, formatCreateLabel: formatCreateLabel$3, createOptionPosition = "first", isValidNewOption = returnTrue } = _ref, props = _objectWithoutProperties(_ref, _excluded$75);
|
|
11235
11247
|
const commonSelectProps = useCommonComboBoxProps(_objectSpread2({
|
|
11236
11248
|
className,
|
|
11237
11249
|
slots,
|
|
@@ -11272,14 +11284,14 @@ const CopyTemplateHeadersButtonGroup = ({ headers, className }) => {
|
|
|
11272
11284
|
}, key))
|
|
11273
11285
|
});
|
|
11274
11286
|
};
|
|
11275
|
-
var _excluded$
|
|
11287
|
+
var _excluded$74 = ["size"];
|
|
11276
11288
|
var CloseIcon = (_ref) => {
|
|
11277
11289
|
let { size = 12 } = _ref;
|
|
11278
11290
|
return /* @__PURE__ */ jsxs("svg", _objectSpread2(_objectSpread2({
|
|
11279
11291
|
viewBox: "0 0 12 12",
|
|
11280
11292
|
fill: "none",
|
|
11281
11293
|
xmlns: "http://www.w3.org/2000/svg"
|
|
11282
|
-
}, _objectWithoutProperties(_ref, _excluded$
|
|
11294
|
+
}, _objectWithoutProperties(_ref, _excluded$74)), {}, {
|
|
11283
11295
|
width: size,
|
|
11284
11296
|
height: size,
|
|
11285
11297
|
children: [/* @__PURE__ */ jsx("path", {
|
|
@@ -11509,7 +11521,7 @@ function useCreateCustomAccount() {
|
|
|
11509
11521
|
return Reflect.get(target, prop);
|
|
11510
11522
|
} });
|
|
11511
11523
|
}
|
|
11512
|
-
var _excluded$
|
|
11524
|
+
var _excluded$73 = ["children", "className"], _excluded2$10 = [
|
|
11513
11525
|
"children",
|
|
11514
11526
|
"inline",
|
|
11515
11527
|
"textarea",
|
|
@@ -11518,7 +11530,7 @@ var _excluded$71 = ["children", "className"], _excluded2$9 = [
|
|
|
11518
11530
|
var FORM_CLASS_NAME = "Layer__UI__Form";
|
|
11519
11531
|
const Form$1 = forwardRef(function Form$2(_ref, ref) {
|
|
11520
11532
|
let { children, className } = _ref;
|
|
11521
|
-
return /* @__PURE__ */ jsx(Form, _objectSpread2(_objectSpread2({}, _objectWithoutProperties(_ref, _excluded$
|
|
11533
|
+
return /* @__PURE__ */ jsx(Form, _objectSpread2(_objectSpread2({}, _objectWithoutProperties(_ref, _excluded$73)), {}, {
|
|
11522
11534
|
className: classNames(FORM_CLASS_NAME, className),
|
|
11523
11535
|
ref,
|
|
11524
11536
|
children
|
|
@@ -11526,7 +11538,7 @@ const Form$1 = forwardRef(function Form$2(_ref, ref) {
|
|
|
11526
11538
|
});
|
|
11527
11539
|
var TEXT_FIELD_CLASS_NAME = "Layer__UI__TextField";
|
|
11528
11540
|
const TextField$1 = forwardRef(function TextField$2(_ref2, ref) {
|
|
11529
|
-
let { children, inline, textarea, className } = _ref2, restProps = _objectWithoutProperties(_ref2, _excluded2$
|
|
11541
|
+
let { children, inline, textarea, className } = _ref2, restProps = _objectWithoutProperties(_ref2, _excluded2$10);
|
|
11530
11542
|
const dataProperties = toDataProperties({
|
|
11531
11543
|
inline,
|
|
11532
11544
|
textarea
|
|
@@ -11725,10 +11737,10 @@ function useBigDecimalInput({ value, onChange, onBlur, mode, maxValue, maxDecima
|
|
|
11725
11737
|
onPaste
|
|
11726
11738
|
};
|
|
11727
11739
|
}
|
|
11728
|
-
var _excluded$
|
|
11740
|
+
var _excluded$72 = ["inset", "placement"];
|
|
11729
11741
|
var INPUT_CLASS_NAME = "Layer__UI__Input";
|
|
11730
11742
|
const Input$2 = forwardRef(function Input$3(_ref, ref) {
|
|
11731
|
-
let { inset, placement } = _ref, restProps = _objectWithoutProperties(_ref, _excluded$
|
|
11743
|
+
let { inset, placement } = _ref, restProps = _objectWithoutProperties(_ref, _excluded$72);
|
|
11732
11744
|
const dataProperties = toDataProperties({
|
|
11733
11745
|
inset,
|
|
11734
11746
|
placement
|
|
@@ -11738,7 +11750,7 @@ const Input$2 = forwardRef(function Input$3(_ref, ref) {
|
|
|
11738
11750
|
ref
|
|
11739
11751
|
}));
|
|
11740
11752
|
});
|
|
11741
|
-
var _excluded$
|
|
11753
|
+
var _excluded$71 = [
|
|
11742
11754
|
"mode",
|
|
11743
11755
|
"allowNegative",
|
|
11744
11756
|
"maxValue",
|
|
@@ -11752,7 +11764,7 @@ var DEFAULT_MAX_VALUE$1 = BigDecimal.fromBigInt(BigInt(1e7));
|
|
|
11752
11764
|
var DEFAULT_MIN_DECIMAL_PLACES$1 = 0;
|
|
11753
11765
|
var DEFAULT_MAX_DECIMAL_PLACES$1 = 3;
|
|
11754
11766
|
function FormBigDecimalField(_ref) {
|
|
11755
|
-
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$
|
|
11767
|
+
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);
|
|
11756
11768
|
const { name: name$1, state: state$14, handleChange, handleBlur } = useFieldContext();
|
|
11757
11769
|
const { value } = state$14;
|
|
11758
11770
|
const { inputValue, onInputChange, onInputBlur, onBeforeInput, onPaste } = useBigDecimalInput({
|
|
@@ -11785,13 +11797,13 @@ function FormBigDecimalField(_ref) {
|
|
|
11785
11797
|
})
|
|
11786
11798
|
}));
|
|
11787
11799
|
}
|
|
11788
|
-
var _excluded$
|
|
11800
|
+
var _excluded$70 = [
|
|
11789
11801
|
"children",
|
|
11790
11802
|
"className",
|
|
11791
11803
|
"variant",
|
|
11792
11804
|
"size",
|
|
11793
11805
|
"isIndeterminate"
|
|
11794
|
-
], _excluded2$
|
|
11806
|
+
], _excluded2$9 = ["tooltip"];
|
|
11795
11807
|
var CLASS_NAME$6 = "Layer__Checkbox";
|
|
11796
11808
|
var CHECK_SIZE = {
|
|
11797
11809
|
sm: 12,
|
|
@@ -11799,7 +11811,7 @@ var CHECK_SIZE = {
|
|
|
11799
11811
|
lg: 16
|
|
11800
11812
|
};
|
|
11801
11813
|
function Checkbox$1(_ref) {
|
|
11802
|
-
let { children, className, variant = "default", size = "sm", isIndeterminate } = _ref, props = _objectWithoutProperties(_ref, _excluded$
|
|
11814
|
+
let { children, className, variant = "default", size = "sm", isIndeterminate } = _ref, props = _objectWithoutProperties(_ref, _excluded$70);
|
|
11803
11815
|
return /* @__PURE__ */ jsx(Checkbox, _objectSpread2(_objectSpread2(_objectSpread2({}, useMemo(() => toDataProperties({
|
|
11804
11816
|
size,
|
|
11805
11817
|
variant,
|
|
@@ -11818,7 +11830,7 @@ function Checkbox$1(_ref) {
|
|
|
11818
11830
|
}));
|
|
11819
11831
|
}
|
|
11820
11832
|
function CheckboxWithTooltip(_ref2) {
|
|
11821
|
-
let { tooltip } = _ref2, props = _objectWithoutProperties(_ref2, _excluded2$
|
|
11833
|
+
let { tooltip } = _ref2, props = _objectWithoutProperties(_ref2, _excluded2$9);
|
|
11822
11834
|
return /* @__PURE__ */ jsx("div", {
|
|
11823
11835
|
className: "Layer__checkbox-wrapper",
|
|
11824
11836
|
children: /* @__PURE__ */ jsxs(DeprecatedTooltip, {
|
|
@@ -11858,15 +11870,15 @@ function FormCheckboxField({ label: label$50, className, inline = false, showLab
|
|
|
11858
11870
|
children: label$50
|
|
11859
11871
|
}) }));
|
|
11860
11872
|
}
|
|
11861
|
-
var _excluded$
|
|
11873
|
+
var _excluded$69 = [
|
|
11862
11874
|
"inline",
|
|
11863
11875
|
"className",
|
|
11864
11876
|
"isReadOnly"
|
|
11865
|
-
], _excluded2$
|
|
11877
|
+
], _excluded2$8 = ["inset", "pointerEvents"], _excluded3$3 = ["isReadOnly"], _excluded4$2 = ["className"];
|
|
11866
11878
|
const DATE_PICKER_CLASS_NAME = "Layer__UI__DatePicker";
|
|
11867
11879
|
var DATE_FIELD_CLASS_NAME = "Layer__UI__DateField";
|
|
11868
11880
|
const DateField$1 = forwardRef(function DateField$2(_ref, ref) {
|
|
11869
|
-
let { inline, className, isReadOnly } = _ref, restProps = _objectWithoutProperties(_ref, _excluded$
|
|
11881
|
+
let { inline, className, isReadOnly } = _ref, restProps = _objectWithoutProperties(_ref, _excluded$69);
|
|
11870
11882
|
return /* @__PURE__ */ jsx(DateField, _objectSpread2(_objectSpread2(_objectSpread2({}, toDataProperties({
|
|
11871
11883
|
inline,
|
|
11872
11884
|
readonly: isReadOnly
|
|
@@ -11878,7 +11890,7 @@ const DateField$1 = forwardRef(function DateField$2(_ref, ref) {
|
|
|
11878
11890
|
});
|
|
11879
11891
|
var DATE_INPUT_CLASS_NAME = "Layer__UI__DateInput";
|
|
11880
11892
|
const DateInput$1 = forwardRef(function DateInput$2(_ref2, ref) {
|
|
11881
|
-
let { inset, pointerEvents } = _ref2, restProps = _objectWithoutProperties(_ref2, _excluded2$
|
|
11893
|
+
let { inset, pointerEvents } = _ref2, restProps = _objectWithoutProperties(_ref2, _excluded2$8);
|
|
11882
11894
|
return /* @__PURE__ */ jsx(DateInput, _objectSpread2(_objectSpread2(_objectSpread2({}, toDataProperties({
|
|
11883
11895
|
inset,
|
|
11884
11896
|
"pointer-events": pointerEvents
|
|
@@ -11953,10 +11965,10 @@ function FormDateField({ label: label$50, className, inline = false, showLabel =
|
|
|
11953
11965
|
shouldShowErrorMessage && /* @__PURE__ */ jsx(FieldError$1, { children: errorMessage })
|
|
11954
11966
|
] }));
|
|
11955
11967
|
}
|
|
11956
|
-
var _excluded$
|
|
11968
|
+
var _excluded$68 = ["className", "isReadOnly"], _excluded2$7 = ["className"], _excluded3$2 = ["className"], _excluded4$1 = ["className", "size"], _excluded5$1 = ["className"], _excluded6$1 = ["className", "size"];
|
|
11957
11969
|
var CALENDAR_CLASS_NAME = "Layer__UI__Calendar";
|
|
11958
11970
|
const Calendar$2 = forwardRef(function Calendar$3(_ref, ref) {
|
|
11959
|
-
let { className, isReadOnly } = _ref, restProps = _objectWithoutProperties(_ref, _excluded$
|
|
11971
|
+
let { className, isReadOnly } = _ref, restProps = _objectWithoutProperties(_ref, _excluded$68);
|
|
11960
11972
|
return /* @__PURE__ */ jsx(Calendar, _objectSpread2(_objectSpread2(_objectSpread2({}, toDataProperties({ readonly: isReadOnly })), restProps), {}, {
|
|
11961
11973
|
isReadOnly,
|
|
11962
11974
|
className: classNames(CALENDAR_CLASS_NAME, className),
|
|
@@ -11966,7 +11978,7 @@ const Calendar$2 = forwardRef(function Calendar$3(_ref, ref) {
|
|
|
11966
11978
|
var CALENDAR_GRID_CLASS_NAME = "Layer__UI__CalendarGrid";
|
|
11967
11979
|
const CalendarGrid$1 = forwardRef(function CalendarGrid$2(_ref2, ref) {
|
|
11968
11980
|
let { className } = _ref2;
|
|
11969
|
-
return /* @__PURE__ */ jsx(CalendarGrid, _objectSpread2(_objectSpread2({}, _objectWithoutProperties(_ref2, _excluded2$
|
|
11981
|
+
return /* @__PURE__ */ jsx(CalendarGrid, _objectSpread2(_objectSpread2({}, _objectWithoutProperties(_ref2, _excluded2$7)), {}, {
|
|
11970
11982
|
className: classNames(CALENDAR_GRID_CLASS_NAME, className),
|
|
11971
11983
|
ref
|
|
11972
11984
|
}));
|
|
@@ -12095,10 +12107,10 @@ const DatePickerInput = ({ errorText, variant, onClick, isReadOnly }) => {
|
|
|
12095
12107
|
})]
|
|
12096
12108
|
});
|
|
12097
12109
|
};
|
|
12098
|
-
var _excluded$
|
|
12110
|
+
var _excluded$67 = ["flexInline"];
|
|
12099
12111
|
var POPOVER_CLASS_NAMES = `Layer__Portal Layer__Popover`;
|
|
12100
12112
|
const Popover$1 = forwardRef(function Popover$2(_ref, ref) {
|
|
12101
|
-
let { flexInline = false } = _ref, restProps = _objectWithoutProperties(_ref, _excluded$
|
|
12113
|
+
let { flexInline = false } = _ref, restProps = _objectWithoutProperties(_ref, _excluded$67);
|
|
12102
12114
|
const dataProperties = toDataProperties({ "flex-inline": flexInline });
|
|
12103
12115
|
return /* @__PURE__ */ jsx(Popover, _objectSpread2(_objectSpread2(_objectSpread2({}, restProps), dataProperties), {}, {
|
|
12104
12116
|
className: POPOVER_CLASS_NAMES,
|
|
@@ -12218,7 +12230,7 @@ const fromNonRecursiveBigDecimal = (nrbd) => {
|
|
|
12218
12230
|
const nrbdEquals = (a, b) => {
|
|
12219
12231
|
return BigDecimal.equals(fromNonRecursiveBigDecimal(a), fromNonRecursiveBigDecimal(b));
|
|
12220
12232
|
};
|
|
12221
|
-
var _excluded$
|
|
12233
|
+
var _excluded$66 = [
|
|
12222
12234
|
"mode",
|
|
12223
12235
|
"allowNegative",
|
|
12224
12236
|
"maxValue",
|
|
@@ -12232,7 +12244,7 @@ var DEFAULT_MAX_VALUE = BigDecimal.fromBigInt(BigInt(1e7));
|
|
|
12232
12244
|
var DEFAULT_MIN_DECIMAL_PLACES = 0;
|
|
12233
12245
|
var DEFAULT_MAX_DECIMAL_PLACES = 3;
|
|
12234
12246
|
function FormNonRecursiveBigDecimalField(_ref) {
|
|
12235
|
-
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$
|
|
12247
|
+
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);
|
|
12236
12248
|
const { name: name$1, state: state$14, handleChange, handleBlur } = useFieldContext();
|
|
12237
12249
|
const { value: nrbdValue } = state$14;
|
|
12238
12250
|
const { inputValue, onInputChange, onInputBlur, onBeforeInput, onPaste } = useBigDecimalInput({
|
|
@@ -12267,14 +12279,14 @@ function FormNonRecursiveBigDecimalField(_ref) {
|
|
|
12267
12279
|
})
|
|
12268
12280
|
}));
|
|
12269
12281
|
}
|
|
12270
|
-
var _excluded$
|
|
12282
|
+
var _excluded$65 = [
|
|
12271
12283
|
"inline",
|
|
12272
12284
|
"className",
|
|
12273
12285
|
"isReadOnly"
|
|
12274
12286
|
];
|
|
12275
12287
|
var NUMBER_FIELD_CLASS_NAME = "Layer__UI__NumberField";
|
|
12276
12288
|
const NumberField$1 = forwardRef(function NumberField$2(_ref, ref) {
|
|
12277
|
-
let { inline, className, isReadOnly } = _ref, restProps = _objectWithoutProperties(_ref, _excluded$
|
|
12289
|
+
let { inline, className, isReadOnly } = _ref, restProps = _objectWithoutProperties(_ref, _excluded$65);
|
|
12278
12290
|
return /* @__PURE__ */ jsx(NumberField, _objectSpread2(_objectSpread2(_objectSpread2({ step: 1 }, toDataProperties({
|
|
12279
12291
|
inline,
|
|
12280
12292
|
readonly: isReadOnly
|
|
@@ -12321,17 +12333,17 @@ function FormNumberField({ label: label$50, className, inline = false, showLabel
|
|
|
12321
12333
|
shouldShowErrorMessage && /* @__PURE__ */ jsx(FieldError$1, { children: errorMessage })
|
|
12322
12334
|
] }));
|
|
12323
12335
|
}
|
|
12324
|
-
var _excluded$
|
|
12336
|
+
var _excluded$64 = [
|
|
12325
12337
|
"children",
|
|
12326
12338
|
"className",
|
|
12327
12339
|
"onChange"
|
|
12328
|
-
], _excluded2$
|
|
12340
|
+
], _excluded2$6 = ["children", "className"];
|
|
12329
12341
|
var RADIO_GROUP_CLASS_NAME = "Layer__RadioGroup";
|
|
12330
12342
|
var RADIO_CLASS_NAME = "Layer__Radio";
|
|
12331
12343
|
var INDICATOR_SIZE = 10;
|
|
12332
12344
|
function RadioGroup$1(_ref) {
|
|
12333
12345
|
let { children, className, onChange } = _ref;
|
|
12334
|
-
return /* @__PURE__ */ jsx(RadioGroup, _objectSpread2(_objectSpread2({}, _objectWithoutProperties(_ref, _excluded$
|
|
12346
|
+
return /* @__PURE__ */ jsx(RadioGroup, _objectSpread2(_objectSpread2({}, _objectWithoutProperties(_ref, _excluded$64)), {}, {
|
|
12335
12347
|
onChange,
|
|
12336
12348
|
className: classNames(RADIO_GROUP_CLASS_NAME, className),
|
|
12337
12349
|
children
|
|
@@ -12339,7 +12351,7 @@ function RadioGroup$1(_ref) {
|
|
|
12339
12351
|
}
|
|
12340
12352
|
function Radio$1(_ref2) {
|
|
12341
12353
|
let { children, className } = _ref2;
|
|
12342
|
-
return /* @__PURE__ */ jsx(Radio, _objectSpread2(_objectSpread2({}, _objectWithoutProperties(_ref2, _excluded2$
|
|
12354
|
+
return /* @__PURE__ */ jsx(Radio, _objectSpread2(_objectSpread2({}, _objectWithoutProperties(_ref2, _excluded2$6)), {}, {
|
|
12343
12355
|
className: classNames(RADIO_CLASS_NAME, className),
|
|
12344
12356
|
children: withRenderProp(children, (node) => /* @__PURE__ */ jsxs(Fragment$1, { children: [/* @__PURE__ */ jsx("div", {
|
|
12345
12357
|
slot: "radio",
|
|
@@ -12440,11 +12452,11 @@ function FormRadioGroupYesNoField({ label: label$50, className, inline = false,
|
|
|
12440
12452
|
}), shouldShowErrorMessage && /* @__PURE__ */ jsx(FieldError$1, { children: errorMessage })]
|
|
12441
12453
|
})] }));
|
|
12442
12454
|
}
|
|
12443
|
-
var _excluded$
|
|
12455
|
+
var _excluded$63 = ["children", "className"];
|
|
12444
12456
|
var SWITCH_CLASS_NAME = "Layer__UI__Switch";
|
|
12445
12457
|
const Switch$1 = forwardRef((_ref, ref) => {
|
|
12446
12458
|
let { children, className } = _ref;
|
|
12447
|
-
return /* @__PURE__ */ jsx(Switch, _objectSpread2(_objectSpread2({}, _objectWithoutProperties(_ref, _excluded$
|
|
12459
|
+
return /* @__PURE__ */ jsx(Switch, _objectSpread2(_objectSpread2({}, _objectWithoutProperties(_ref, _excluded$63)), {}, {
|
|
12448
12460
|
className: classNames(SWITCH_CLASS_NAME, className),
|
|
12449
12461
|
ref,
|
|
12450
12462
|
children: withRenderProp(children, (node) => /* @__PURE__ */ jsxs(Fragment$1, { children: [/* @__PURE__ */ jsx("div", { slot: "indicator" }), node] }))
|
|
@@ -12474,19 +12486,19 @@ function FormSwitchField({ label: label$50, slots, className, inline = false, sh
|
|
|
12474
12486
|
})]
|
|
12475
12487
|
}) }));
|
|
12476
12488
|
}
|
|
12477
|
-
var _excluded$
|
|
12489
|
+
var _excluded$62 = ["resize"];
|
|
12478
12490
|
var TEXTAREA_CLASS_NAME = "Layer__UI__TextArea";
|
|
12479
12491
|
const TextArea$1 = forwardRef(function TextArea$2(_ref, ref) {
|
|
12480
|
-
let { resize = "none" } = _ref, restProps = _objectWithoutProperties(_ref, _excluded$
|
|
12492
|
+
let { resize = "none" } = _ref, restProps = _objectWithoutProperties(_ref, _excluded$62);
|
|
12481
12493
|
const dataProperties = toDataProperties({ resize });
|
|
12482
12494
|
return /* @__PURE__ */ jsx(TextArea, _objectSpread2(_objectSpread2(_objectSpread2({}, restProps), dataProperties), {}, {
|
|
12483
12495
|
className: TEXTAREA_CLASS_NAME,
|
|
12484
12496
|
ref
|
|
12485
12497
|
}));
|
|
12486
12498
|
});
|
|
12487
|
-
var _excluded$
|
|
12499
|
+
var _excluded$61 = ["placeholder"];
|
|
12488
12500
|
function FormTextAreaField(_ref) {
|
|
12489
|
-
let { placeholder } = _ref, props = _objectWithoutProperties(_ref, _excluded$
|
|
12501
|
+
let { placeholder } = _ref, props = _objectWithoutProperties(_ref, _excluded$61);
|
|
12490
12502
|
const { name: name$1, state: state$14, handleChange, handleBlur } = useFieldContext();
|
|
12491
12503
|
const { value } = state$14;
|
|
12492
12504
|
const onChange = useCallback((e) => {
|
|
@@ -12505,9 +12517,9 @@ function FormTextAreaField(_ref) {
|
|
|
12505
12517
|
})
|
|
12506
12518
|
}));
|
|
12507
12519
|
}
|
|
12508
|
-
var _excluded$
|
|
12520
|
+
var _excluded$60 = ["placeholder"];
|
|
12509
12521
|
function FormTextField(_ref) {
|
|
12510
|
-
let { placeholder } = _ref, props = _objectWithoutProperties(_ref, _excluded$
|
|
12522
|
+
let { placeholder } = _ref, props = _objectWithoutProperties(_ref, _excluded$60);
|
|
12511
12523
|
const { name: name$1, state: state$14, handleChange, handleBlur } = useFieldContext();
|
|
12512
12524
|
const { value } = state$14;
|
|
12513
12525
|
const onChange = useCallback((e) => {
|
|
@@ -12604,14 +12616,14 @@ const useCustomAccountForm = ({ onSuccess }) => {
|
|
|
12604
12616
|
isFormValid: useStore$1(form.store, (state$14) => state$14.isValid)
|
|
12605
12617
|
};
|
|
12606
12618
|
};
|
|
12607
|
-
var _excluded$
|
|
12619
|
+
var _excluded$59 = [
|
|
12608
12620
|
"className",
|
|
12609
12621
|
"isInvalid",
|
|
12610
12622
|
"errorMessage",
|
|
12611
12623
|
"leftText"
|
|
12612
12624
|
];
|
|
12613
12625
|
const Input$1 = (_ref) => {
|
|
12614
|
-
let { className, isInvalid, errorMessage, leftText } = _ref, props = _objectWithoutProperties(_ref, _excluded$
|
|
12626
|
+
let { className, isInvalid, errorMessage, leftText } = _ref, props = _objectWithoutProperties(_ref, _excluded$59);
|
|
12615
12627
|
const baseClassName$1 = classNames("Layer__input", isInvalid ? "Layer__input--error" : "", leftText ? "Layer__input--with-left-text" : "", className);
|
|
12616
12628
|
return /* @__PURE__ */ jsxs(DeprecatedTooltip, {
|
|
12617
12629
|
disabled: !isInvalid || !errorMessage,
|
|
@@ -12639,14 +12651,14 @@ const InputGroup = ({ label: label$50, name: name$1, className, inline, children
|
|
|
12639
12651
|
}), children]
|
|
12640
12652
|
});
|
|
12641
12653
|
};
|
|
12642
|
-
var _excluded$
|
|
12654
|
+
var _excluded$58 = ["size"];
|
|
12643
12655
|
var ChevronDownFill = (_ref) => {
|
|
12644
12656
|
let { size = 18 } = _ref;
|
|
12645
12657
|
return /* @__PURE__ */ jsxs("svg", _objectSpread2(_objectSpread2({
|
|
12646
12658
|
xmlns: "http://www.w3.org/2000/svg",
|
|
12647
12659
|
viewBox: "0 0 18 18",
|
|
12648
12660
|
fill: "none"
|
|
12649
|
-
}, _objectWithoutProperties(_ref, _excluded$
|
|
12661
|
+
}, _objectWithoutProperties(_ref, _excluded$58)), {}, {
|
|
12650
12662
|
width: size,
|
|
12651
12663
|
height: size,
|
|
12652
12664
|
children: [/* @__PURE__ */ jsx("path", {
|
|
@@ -12661,9 +12673,9 @@ var ChevronDownFill = (_ref) => {
|
|
|
12661
12673
|
}));
|
|
12662
12674
|
};
|
|
12663
12675
|
var ChevronDownFill_default = ChevronDownFill;
|
|
12664
|
-
var _excluded$
|
|
12676
|
+
var _excluded$57 = ["children"];
|
|
12665
12677
|
const SelectMenuPortal = (_ref) => {
|
|
12666
|
-
let { children } = _ref, restProps = _objectWithoutProperties(_ref, _excluded$
|
|
12678
|
+
let { children } = _ref, restProps = _objectWithoutProperties(_ref, _excluded$57);
|
|
12667
12679
|
const dataProperties = toDataProperties({ "react-aria-top-layer": true });
|
|
12668
12680
|
return /* @__PURE__ */ jsx(components.MenuPortal, _objectSpread2(_objectSpread2({}, restProps), {}, {
|
|
12669
12681
|
innerProps: dataProperties,
|
|
@@ -12703,10 +12715,10 @@ const Select$1 = ({ name: name$1, options, className, classNamePrefix = "Layer__
|
|
|
12703
12715
|
})]
|
|
12704
12716
|
});
|
|
12705
12717
|
};
|
|
12706
|
-
var _excluded$
|
|
12718
|
+
var _excluded$56 = ["className"];
|
|
12707
12719
|
const ErrorText = (_ref) => {
|
|
12708
12720
|
let { className } = _ref;
|
|
12709
|
-
return /* @__PURE__ */ jsx(Text$2, _objectSpread2(_objectSpread2({}, _objectWithoutProperties(_ref, _excluded$
|
|
12721
|
+
return /* @__PURE__ */ jsx(Text$2, _objectSpread2(_objectSpread2({}, _objectWithoutProperties(_ref, _excluded$56)), {}, {
|
|
12710
12722
|
status: "error",
|
|
12711
12723
|
className
|
|
12712
12724
|
}));
|
|
@@ -13027,7 +13039,7 @@ function UploadTransactionsUploadCsvStep({ selectedAccount, onSelectAccount, sel
|
|
|
13027
13039
|
] })]
|
|
13028
13040
|
});
|
|
13029
13041
|
}
|
|
13030
|
-
var _excluded$
|
|
13042
|
+
var _excluded$55 = ["customAccountId"];
|
|
13031
13043
|
var createCustomAccountTransactions = post(({ businessId, customAccountId }) => `/v1/businesses/${businessId}/custom-accounts/${customAccountId}/transactions`);
|
|
13032
13044
|
function buildKey$73({ access_token: accessToken, apiUrl, businessId }) {
|
|
13033
13045
|
if (accessToken && apiUrl) return {
|
|
@@ -13042,7 +13054,7 @@ function useCreateCustomAccountTransactions() {
|
|
|
13042
13054
|
const { data } = useAuth();
|
|
13043
13055
|
const { businessId } = useLayerContext();
|
|
13044
13056
|
return useSWRMutation(() => withLocale(buildKey$73(_objectSpread2(_objectSpread2({}, data), {}, { businessId }))), ({ accessToken, apiUrl, businessId: businessId$1 }, _ref) => {
|
|
13045
|
-
let { arg: _ref2 } = _ref, { customAccountId } = _ref2, body = _objectWithoutProperties(_ref2, _excluded$
|
|
13057
|
+
let { arg: _ref2 } = _ref, { customAccountId } = _ref2, body = _objectWithoutProperties(_ref2, _excluded$55);
|
|
13046
13058
|
return createCustomAccountTransactions(apiUrl, accessToken, {
|
|
13047
13059
|
params: {
|
|
13048
13060
|
businessId: businessId$1,
|
|
@@ -13055,6 +13067,31 @@ function useCreateCustomAccountTransactions() {
|
|
|
13055
13067
|
throwOnError: false
|
|
13056
13068
|
});
|
|
13057
13069
|
}
|
|
13070
|
+
let ReportControl = /* @__PURE__ */ function(ReportControl$1) {
|
|
13071
|
+
ReportControl$1["Date"] = "date";
|
|
13072
|
+
ReportControl$1["DateRange"] = "date_range";
|
|
13073
|
+
ReportControl$1["GroupBy"] = "group_by";
|
|
13074
|
+
ReportControl$1["Unknown"] = "unknown";
|
|
13075
|
+
return ReportControl$1;
|
|
13076
|
+
}({});
|
|
13077
|
+
var TransformedReportControlSchema = createTransformedEnumSchema(Schema.Enums(ReportControl), ReportControl, ReportControl.Unknown);
|
|
13078
|
+
const ReportConfigSchema = Schema.Struct({
|
|
13079
|
+
key: Schema.String,
|
|
13080
|
+
reportRoute: pipe(Schema.propertySignature(Schema.String), Schema.fromKey("report_route")),
|
|
13081
|
+
displayName: pipe(Schema.propertySignature(Schema.String), Schema.fromKey("display_name")),
|
|
13082
|
+
controls: Schema.Array(TransformedReportControlSchema),
|
|
13083
|
+
baseQueryParameters: pipe(Schema.propertySignature(Schema.Record({
|
|
13084
|
+
key: Schema.String,
|
|
13085
|
+
value: Schema.String
|
|
13086
|
+
})), Schema.fromKey("base_query_parameters")),
|
|
13087
|
+
isDefaultReport: Schema.optional(Schema.Boolean).pipe(Schema.fromKey("is_default_report"))
|
|
13088
|
+
});
|
|
13089
|
+
const ReportGroupSchema = Schema.Struct({
|
|
13090
|
+
groupType: pipe(Schema.propertySignature(Schema.String), Schema.fromKey("group_type")),
|
|
13091
|
+
displayName: pipe(Schema.propertySignature(Schema.String), Schema.fromKey("display_name")),
|
|
13092
|
+
reports: Schema.Array(ReportConfigSchema)
|
|
13093
|
+
});
|
|
13094
|
+
const ReportConfigResponseSchema = Schema.Struct({ data: Schema.Array(ReportGroupSchema) });
|
|
13058
13095
|
let DateGroupBy = /* @__PURE__ */ function(DateGroupBy$1) {
|
|
13059
13096
|
DateGroupBy$1["AllTime"] = "ALL_TIME";
|
|
13060
13097
|
DateGroupBy$1["Month"] = "MONTH";
|
|
@@ -13068,6 +13105,13 @@ let Alignment = /* @__PURE__ */ function(Alignment$1) {
|
|
|
13068
13105
|
return Alignment$1;
|
|
13069
13106
|
}({});
|
|
13070
13107
|
var TransformedAlignmentSchema = createTransformedEnumSchema(Schema.Enums(Alignment), Alignment, Alignment.Left);
|
|
13108
|
+
let Pinning = /* @__PURE__ */ function(Pinning$1) {
|
|
13109
|
+
Pinning$1["Left"] = "LEFT";
|
|
13110
|
+
Pinning$1["Right"] = "RIGHT";
|
|
13111
|
+
Pinning$1["Unpinned"] = "UNPINNED";
|
|
13112
|
+
return Pinning$1;
|
|
13113
|
+
}({});
|
|
13114
|
+
var TransformedPinningSchema = createTransformedEnumSchema(Schema.Enums(Pinning), Pinning, Pinning.Unpinned);
|
|
13071
13115
|
const DateQueryParamsSchema = Schema.Struct({ effectiveDate: pipe(Schema.propertySignature(Schema.Date), Schema.fromKey("effective_date")) });
|
|
13072
13116
|
const DateRangeQueryParamsSchema = Schema.Struct({
|
|
13073
13117
|
startDate: pipe(Schema.propertySignature(Schema.Date), Schema.fromKey("start_date")),
|
|
@@ -13078,7 +13122,8 @@ var unifiedReportColumnFields = {
|
|
|
13078
13122
|
columnKey: pipe(Schema.propertySignature(Schema.String), Schema.fromKey("column_key")),
|
|
13079
13123
|
displayName: pipe(Schema.propertySignature(Schema.String), Schema.fromKey("display_name")),
|
|
13080
13124
|
isRowHeader: Schema.optional(Schema.Boolean).pipe(Schema.fromKey("is_row_header")),
|
|
13081
|
-
alignment: Schema.optional(TransformedAlignmentSchema)
|
|
13125
|
+
alignment: Schema.optional(TransformedAlignmentSchema),
|
|
13126
|
+
pinning: Schema.optional(TransformedPinningSchema)
|
|
13082
13127
|
};
|
|
13083
13128
|
const UnifiedReportColumnSchema = Schema.Struct(_objectSpread2(_objectSpread2({}, unifiedReportColumnFields), {}, { columns: Schema.optional(Schema.Array(Schema.suspend(() => UnifiedReportColumnSchema))) }));
|
|
13084
13129
|
var UnifiedCellValueAmountSchema = Schema.Struct({
|
|
@@ -13101,7 +13146,8 @@ const isEmptyCellValue = (value) => value.type === "Empty";
|
|
|
13101
13146
|
var UnifiedCellFormatSchema = Schema.Struct({ bold: Schema.optional(Schema.Boolean) });
|
|
13102
13147
|
var UnifiedReportCellSchema = Schema.Struct({
|
|
13103
13148
|
value: UnifiedCellValueSchema,
|
|
13104
|
-
format: Schema.optional(UnifiedCellFormatSchema)
|
|
13149
|
+
format: Schema.optional(UnifiedCellFormatSchema),
|
|
13150
|
+
reportConfig: pipe(Schema.propertySignature(Schema.NullishOr(ReportConfigSchema)), Schema.fromKey("report_config"))
|
|
13105
13151
|
});
|
|
13106
13152
|
var unifiedReportRowFields = {
|
|
13107
13153
|
rowKey: pipe(Schema.propertySignature(Schema.String), Schema.fromKey("row_key")),
|
|
@@ -13116,15 +13162,14 @@ const UnifiedReportSchema = Schema.Struct({
|
|
|
13116
13162
|
columns: Schema.Array(UnifiedReportColumnSchema),
|
|
13117
13163
|
rows: Schema.Array(UnifiedReportRowSchema)
|
|
13118
13164
|
});
|
|
13119
|
-
var _excluded$
|
|
13165
|
+
var _excluded$54 = [
|
|
13120
13166
|
"children",
|
|
13121
13167
|
"className",
|
|
13122
13168
|
"nonAria",
|
|
13123
13169
|
"slot"
|
|
13124
|
-
], _excluded2$
|
|
13170
|
+
], _excluded2$5 = [
|
|
13125
13171
|
"children",
|
|
13126
13172
|
"className",
|
|
13127
|
-
"hideHeader",
|
|
13128
13173
|
"nonAria"
|
|
13129
13174
|
], _excluded3$1 = [
|
|
13130
13175
|
"children",
|
|
@@ -13143,13 +13188,15 @@ var _excluded$52 = [
|
|
|
13143
13188
|
"nonAria",
|
|
13144
13189
|
"id",
|
|
13145
13190
|
"alignment",
|
|
13146
|
-
"colSpan"
|
|
13191
|
+
"colSpan",
|
|
13192
|
+
"pinned"
|
|
13147
13193
|
], _excluded6 = [
|
|
13148
13194
|
"children",
|
|
13149
13195
|
"className",
|
|
13150
13196
|
"nonAria",
|
|
13151
13197
|
"id",
|
|
13152
|
-
"alignment"
|
|
13198
|
+
"alignment",
|
|
13199
|
+
"pinned"
|
|
13153
13200
|
];
|
|
13154
13201
|
var TableSubComponent = /* @__PURE__ */ function(TableSubComponent$1) {
|
|
13155
13202
|
TableSubComponent$1["Table"] = "Table";
|
|
@@ -13169,9 +13216,9 @@ var toAlignmentDataValue = (alignment) => {
|
|
|
13169
13216
|
default: return;
|
|
13170
13217
|
}
|
|
13171
13218
|
};
|
|
13172
|
-
var getClassName = (component, additionalClassNames
|
|
13219
|
+
var getClassName = (component, additionalClassNames) => classNames(`${CSS_PREFIX$1}-${component}`, additionalClassNames);
|
|
13173
13220
|
var Table$1 = forwardRef((_ref, ref) => {
|
|
13174
|
-
let { children, className, nonAria, slot } = _ref, restProps = _objectWithoutProperties(_ref, _excluded$
|
|
13221
|
+
let { children, className, nonAria, slot } = _ref, restProps = _objectWithoutProperties(_ref, _excluded$54);
|
|
13175
13222
|
return /* @__PURE__ */ jsx(nonAria ? "table" : Table, _objectSpread2(_objectSpread2({
|
|
13176
13223
|
className: getClassName(TableSubComponent.Table, className),
|
|
13177
13224
|
slot: slot !== null && slot !== void 0 ? slot : void 0
|
|
@@ -13182,8 +13229,8 @@ var Table$1 = forwardRef((_ref, ref) => {
|
|
|
13182
13229
|
});
|
|
13183
13230
|
Table$1.displayName = TableSubComponent.Table;
|
|
13184
13231
|
var TableHeaderInner = (_ref2, ref) => {
|
|
13185
|
-
let { children, className,
|
|
13186
|
-
return /* @__PURE__ */ jsx(nonAria ? "thead" : TableHeader, _objectSpread2(_objectSpread2({ className: getClassName(TableSubComponent.TableHeader, className
|
|
13232
|
+
let { children, className, nonAria } = _ref2, restProps = _objectWithoutProperties(_ref2, _excluded2$5);
|
|
13233
|
+
return /* @__PURE__ */ jsx(nonAria ? "thead" : TableHeader, _objectSpread2(_objectSpread2({ className: getClassName(TableSubComponent.TableHeader, className) }, restProps), {}, {
|
|
13187
13234
|
ref,
|
|
13188
13235
|
children: withRenderProp(children, (node) => node)
|
|
13189
13236
|
}));
|
|
@@ -13213,8 +13260,11 @@ var RowInner = (_ref4, ref) => {
|
|
|
13213
13260
|
var Row$1 = forwardRef(RowInner);
|
|
13214
13261
|
Row$1.displayName = TableSubComponent.Row;
|
|
13215
13262
|
var Column$1 = forwardRef((_ref5, ref) => {
|
|
13216
|
-
let { children, className, nonAria, id, alignment = Alignment.Left, colSpan = 1 } = _ref5, restProps = _objectWithoutProperties(_ref5, _excluded5);
|
|
13217
|
-
const dataProperties = toDataProperties({
|
|
13263
|
+
let { children, className, nonAria, id, alignment = Alignment.Left, colSpan = 1, pinned } = _ref5, restProps = _objectWithoutProperties(_ref5, _excluded5);
|
|
13264
|
+
const dataProperties = toDataProperties({
|
|
13265
|
+
align: toAlignmentDataValue(alignment),
|
|
13266
|
+
pinned
|
|
13267
|
+
});
|
|
13218
13268
|
const columnClassName = getClassName(TableSubComponent.Column, className);
|
|
13219
13269
|
return /* @__PURE__ */ jsx(nonAria ? "th" : Column, _objectSpread2(_objectSpread2(_objectSpread2({ className: columnClassName }, restProps), dataProperties), {}, {
|
|
13220
13270
|
ref,
|
|
@@ -13225,8 +13275,11 @@ var Column$1 = forwardRef((_ref5, ref) => {
|
|
|
13225
13275
|
});
|
|
13226
13276
|
Column$1.displayName = TableSubComponent.Column;
|
|
13227
13277
|
var Cell$2 = forwardRef((_ref6, ref) => {
|
|
13228
|
-
let { children, className, nonAria, id, alignment } = _ref6, restProps = _objectWithoutProperties(_ref6, _excluded6);
|
|
13229
|
-
const dataProperties = toDataProperties({
|
|
13278
|
+
let { children, className, nonAria, id, alignment, pinned } = _ref6, restProps = _objectWithoutProperties(_ref6, _excluded6);
|
|
13279
|
+
const dataProperties = toDataProperties({
|
|
13280
|
+
align: toAlignmentDataValue(alignment),
|
|
13281
|
+
pinned
|
|
13282
|
+
});
|
|
13230
13283
|
return /* @__PURE__ */ jsx(nonAria ? "td" : Cell, _objectSpread2(_objectSpread2(_objectSpread2({ className: getClassName(TableSubComponent.Cell, className) }, restProps), dataProperties), {}, {
|
|
13231
13284
|
ref,
|
|
13232
13285
|
id: id === null || id === void 0 ? void 0 : id.toString(),
|
|
@@ -13261,6 +13314,42 @@ const getColumnDefs = (columnConfig) => {
|
|
|
13261
13314
|
});
|
|
13262
13315
|
});
|
|
13263
13316
|
};
|
|
13317
|
+
const computePinningStyles = (headerGroups, widths) => {
|
|
13318
|
+
var _headerGroups$at$head, _headerGroups$at;
|
|
13319
|
+
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 : [];
|
|
13320
|
+
const styles = /* @__PURE__ */ new Map();
|
|
13321
|
+
const accumulate = (headersInOrder, side) => {
|
|
13322
|
+
let offset$1 = 0;
|
|
13323
|
+
for (const header of headersInOrder) {
|
|
13324
|
+
var _widths$header$column;
|
|
13325
|
+
if (header.column.getIsPinned() !== side) continue;
|
|
13326
|
+
styles.set(header.column.id, {
|
|
13327
|
+
position: "sticky",
|
|
13328
|
+
[side]: `${offset$1}px`
|
|
13329
|
+
});
|
|
13330
|
+
offset$1 += (_widths$header$column = widths[header.column.id]) !== null && _widths$header$column !== void 0 ? _widths$header$column : 0;
|
|
13331
|
+
}
|
|
13332
|
+
};
|
|
13333
|
+
accumulate(leafHeaders, "left");
|
|
13334
|
+
accumulate([...leafHeaders].reverse(), "right");
|
|
13335
|
+
return styles;
|
|
13336
|
+
};
|
|
13337
|
+
const getColumnPinning = (columnConfig) => {
|
|
13338
|
+
const left = [];
|
|
13339
|
+
const right = [];
|
|
13340
|
+
for (const col of columnConfig) if (isLeafColumn(col)) {
|
|
13341
|
+
if (col.pinning === "left") left.push(col.id);
|
|
13342
|
+
else if (col.pinning === "right") right.push(col.id);
|
|
13343
|
+
} else {
|
|
13344
|
+
const nested = getColumnPinning(col.columns);
|
|
13345
|
+
left.push(...nested.left);
|
|
13346
|
+
right.push(...nested.right);
|
|
13347
|
+
}
|
|
13348
|
+
return {
|
|
13349
|
+
left,
|
|
13350
|
+
right
|
|
13351
|
+
};
|
|
13352
|
+
};
|
|
13264
13353
|
const Loader = ({ children, size = 28 }) => {
|
|
13265
13354
|
return /* @__PURE__ */ jsxs("span", {
|
|
13266
13355
|
className: "Layer__loader",
|
|
@@ -13276,7 +13365,7 @@ var DEFAULT_NUM_ROWS = 15;
|
|
|
13276
13365
|
var HEADER_HEIGHT = 52;
|
|
13277
13366
|
var DEFAULT_TABLE_HEIGHT = DEFAULT_ROW_HEIGHT * DEFAULT_NUM_ROWS + HEADER_HEIGHT - 1;
|
|
13278
13367
|
var CSS_PREFIX = "Layer__UI__VirtualizedTable";
|
|
13279
|
-
var EMPTY_ARRAY$
|
|
13368
|
+
var EMPTY_ARRAY$4 = [];
|
|
13280
13369
|
const VirtualizedDataTable = ({ columnConfig, data, isLoading, isError, componentName, ariaLabel, slots, shrinkHeightToFitRows = false, height = DEFAULT_TABLE_HEIGHT, rowHeight = DEFAULT_ROW_HEIGHT, overscan = DEFAULT_OVERSCAN }) => {
|
|
13281
13370
|
const { EmptyState: EmptyState$6, ErrorState: ErrorState$5 } = slots;
|
|
13282
13371
|
const containerRef = useRef(null);
|
|
@@ -13292,7 +13381,7 @@ const VirtualizedDataTable = ({ columnConfig, data, isLoading, isError, componen
|
|
|
13292
13381
|
shrinkHeightToFitRows
|
|
13293
13382
|
]);
|
|
13294
13383
|
const table$1 = useReactTable({
|
|
13295
|
-
data: data !== null && data !== void 0 ? data : EMPTY_ARRAY$
|
|
13384
|
+
data: data !== null && data !== void 0 ? data : EMPTY_ARRAY$4,
|
|
13296
13385
|
columns: getColumnDefs(columnConfig),
|
|
13297
13386
|
getCoreRowModel: getCoreRowModel(),
|
|
13298
13387
|
getSortedRowModel: getSortedRowModel()
|
|
@@ -14302,7 +14391,7 @@ function useDelayedRemoveBankTransaction({ bankTransaction, onRemove }) {
|
|
|
14302
14391
|
}, [bankTransaction.recently_categorized]);
|
|
14303
14392
|
return useMemo(() => ({ isBeingRemoved }), [isBeingRemoved]);
|
|
14304
14393
|
}
|
|
14305
|
-
var _excluded$
|
|
14394
|
+
var _excluded$53 = ["bankTransactionId"];
|
|
14306
14395
|
var CATEGORIZE_BANK_TRANSACTION_TAG = "#categorize-bank-transaction";
|
|
14307
14396
|
var categorizeBankTransaction = put(({ businessId, bankTransactionId }) => `/v1/businesses/${businessId}/bank-transactions/${bankTransactionId}/categorize`);
|
|
14308
14397
|
function buildKey$72({ access_token: accessToken, apiUrl, businessId }) {
|
|
@@ -14326,7 +14415,7 @@ function useCategorizeBankTransaction() {
|
|
|
14326
14415
|
apiUrl: auth === null || auth === void 0 ? void 0 : auth.apiUrl,
|
|
14327
14416
|
businessId
|
|
14328
14417
|
})), ({ accessToken, apiUrl, businessId: businessId$1 }, _ref) => {
|
|
14329
|
-
let { arg: _ref2 } = _ref, { bankTransactionId } = _ref2, rest = _objectWithoutProperties(_ref2, _excluded$
|
|
14418
|
+
let { arg: _ref2 } = _ref, { bankTransactionId } = _ref2, rest = _objectWithoutProperties(_ref2, _excluded$53);
|
|
14330
14419
|
return categorizeBankTransaction(apiUrl, accessToken, {
|
|
14331
14420
|
params: {
|
|
14332
14421
|
businessId: businessId$1,
|
|
@@ -14392,7 +14481,7 @@ function useCategorizeBankTransactionWithCacheUpdate() {
|
|
|
14392
14481
|
isError
|
|
14393
14482
|
]);
|
|
14394
14483
|
}
|
|
14395
|
-
var _excluded$
|
|
14484
|
+
var _excluded$52 = ["bankTransactionId"];
|
|
14396
14485
|
var matchBankTransaction = put(({ businessId, bankTransactionId }) => `/v1/businesses/${businessId}/bank-transactions/${bankTransactionId}/match`);
|
|
14397
14486
|
var MATCH_BANK_TRANSACTION_TAG = "#match-bank-transaction";
|
|
14398
14487
|
function buildKey$71({ access_token: accessToken, apiUrl, businessId }) {
|
|
@@ -14416,7 +14505,7 @@ function useMatchBankTransaction() {
|
|
|
14416
14505
|
apiUrl: auth === null || auth === void 0 ? void 0 : auth.apiUrl,
|
|
14417
14506
|
businessId
|
|
14418
14507
|
})), ({ accessToken, apiUrl, businessId: businessId$1 }, _ref) => {
|
|
14419
|
-
let { arg: _ref2 } = _ref, { bankTransactionId } = _ref2, body = _objectWithoutProperties(_ref2, _excluded$
|
|
14508
|
+
let { arg: _ref2 } = _ref, { bankTransactionId } = _ref2, body = _objectWithoutProperties(_ref2, _excluded$52);
|
|
14420
14509
|
return matchBankTransaction(apiUrl, accessToken, {
|
|
14421
14510
|
params: {
|
|
14422
14511
|
businessId: businessId$1,
|
|
@@ -14544,14 +14633,14 @@ function useDelayedVisibility({ delay, initialVisibility = false }) {
|
|
|
14544
14633
|
}, []);
|
|
14545
14634
|
return { isVisible };
|
|
14546
14635
|
}
|
|
14547
|
-
var _excluded$
|
|
14636
|
+
var _excluded$51 = ["size"];
|
|
14548
14637
|
var File$1 = (_ref) => {
|
|
14549
14638
|
let { size = 12 } = _ref;
|
|
14550
14639
|
return /* @__PURE__ */ jsxs("svg", _objectSpread2(_objectSpread2({
|
|
14551
14640
|
xmlns: "http://www.w3.org/2000/svg",
|
|
14552
14641
|
viewBox: "0 0 12 12",
|
|
14553
14642
|
fill: "none"
|
|
14554
|
-
}, _objectWithoutProperties(_ref, _excluded$
|
|
14643
|
+
}, _objectWithoutProperties(_ref, _excluded$51)), {}, {
|
|
14555
14644
|
width: size,
|
|
14556
14645
|
height: size,
|
|
14557
14646
|
children: [
|
|
@@ -14653,7 +14742,7 @@ const variants = {
|
|
|
14653
14742
|
}
|
|
14654
14743
|
}
|
|
14655
14744
|
};
|
|
14656
|
-
var _excluded$
|
|
14745
|
+
var _excluded$50 = [
|
|
14657
14746
|
"as",
|
|
14658
14747
|
"children",
|
|
14659
14748
|
"variant",
|
|
@@ -14662,7 +14751,7 @@ var _excluded$48 = [
|
|
|
14662
14751
|
"motionKey"
|
|
14663
14752
|
];
|
|
14664
14753
|
function AnimatedPresenceElementInner(_ref, ref) {
|
|
14665
|
-
let { as, children, variant, isOpen, slotProps = { AnimatePresence: { initial: false } }, motionKey } = _ref, props = _objectWithoutProperties(_ref, _excluded$
|
|
14754
|
+
let { as, children, variant, isOpen, slotProps = { AnimatePresence: { initial: false } }, motionKey } = _ref, props = _objectWithoutProperties(_ref, _excluded$50);
|
|
14666
14755
|
const config = variants[variant];
|
|
14667
14756
|
const MotionComponent = motion[as !== null && as !== void 0 ? as : "div"];
|
|
14668
14757
|
return /* @__PURE__ */ jsx(AnimatePresence, _objectSpread2(_objectSpread2({}, slotProps.AnimatePresence), {}, { children: isOpen && /* @__PURE__ */ jsx(MotionComponent, _objectSpread2(_objectSpread2({
|
|
@@ -14807,14 +14896,14 @@ function useBookkeepingPeriods() {
|
|
|
14807
14896
|
return Reflect.get(target, prop);
|
|
14808
14897
|
} });
|
|
14809
14898
|
}
|
|
14810
|
-
var _excluded$
|
|
14899
|
+
var _excluded$49 = ["size"];
|
|
14811
14900
|
var Clock$1 = (_ref) => {
|
|
14812
14901
|
let { size = 18 } = _ref;
|
|
14813
14902
|
return /* @__PURE__ */ jsxs("svg", _objectSpread2(_objectSpread2({
|
|
14814
14903
|
xmlns: "http://www.w3.org/2000/svg",
|
|
14815
14904
|
viewBox: "0 0 18 18",
|
|
14816
14905
|
fill: "none"
|
|
14817
|
-
}, _objectWithoutProperties(_ref, _excluded$
|
|
14906
|
+
}, _objectWithoutProperties(_ref, _excluded$49)), {}, {
|
|
14818
14907
|
width: size,
|
|
14819
14908
|
height: size,
|
|
14820
14909
|
children: [/* @__PURE__ */ jsx("path", {
|
|
@@ -15319,14 +15408,14 @@ const useSplitsForm = ({ bankTransaction, selectedCategory, isOpen }) => {
|
|
|
15319
15408
|
saveLocalSplitsToCategoryStore
|
|
15320
15409
|
};
|
|
15321
15410
|
};
|
|
15322
|
-
var _excluded$
|
|
15411
|
+
var _excluded$48 = ["size"];
|
|
15323
15412
|
var ScissorsFullOpen = (_ref) => {
|
|
15324
15413
|
let { size = 12 } = _ref;
|
|
15325
15414
|
return /* @__PURE__ */ jsx("svg", _objectSpread2(_objectSpread2({
|
|
15326
15415
|
viewBox: "0 0 12 12",
|
|
15327
15416
|
fill: "none",
|
|
15328
15417
|
xmlns: "http://www.w3.org/2000/svg"
|
|
15329
|
-
}, _objectWithoutProperties(_ref, _excluded$
|
|
15418
|
+
}, _objectWithoutProperties(_ref, _excluded$48)), {}, {
|
|
15330
15419
|
width: size,
|
|
15331
15420
|
height: size,
|
|
15332
15421
|
children: /* @__PURE__ */ jsxs("g", {
|
|
@@ -15372,14 +15461,14 @@ var ScissorsFullOpen = (_ref) => {
|
|
|
15372
15461
|
}));
|
|
15373
15462
|
};
|
|
15374
15463
|
var ScissorsFullOpen_default = ScissorsFullOpen;
|
|
15375
|
-
var _excluded$
|
|
15464
|
+
var _excluded$47 = ["size"];
|
|
15376
15465
|
var Trash$1 = (_ref) => {
|
|
15377
15466
|
let { size = 18 } = _ref;
|
|
15378
15467
|
return /* @__PURE__ */ jsxs("svg", _objectSpread2(_objectSpread2({
|
|
15379
15468
|
xmlns: "http://www.w3.org/2000/svg",
|
|
15380
15469
|
viewBox: "0 0 18 18",
|
|
15381
15470
|
fill: "none"
|
|
15382
|
-
}, _objectWithoutProperties(_ref, _excluded$
|
|
15471
|
+
}, _objectWithoutProperties(_ref, _excluded$47)), {}, {
|
|
15383
15472
|
width: size,
|
|
15384
15473
|
height: size,
|
|
15385
15474
|
children: [
|
|
@@ -16127,9 +16216,9 @@ const ReceiptsProvider = ({ children, bankTransaction, isActive }) => {
|
|
|
16127
16216
|
children
|
|
16128
16217
|
});
|
|
16129
16218
|
};
|
|
16130
|
-
var _excluded$
|
|
16219
|
+
var _excluded$46 = ["size"];
|
|
16131
16220
|
var Eye = (_ref) => {
|
|
16132
|
-
let { size = 18 } = _ref, props = _objectWithoutProperties(_ref, _excluded$
|
|
16221
|
+
let { size = 18 } = _ref, props = _objectWithoutProperties(_ref, _excluded$46);
|
|
16133
16222
|
return /* @__PURE__ */ jsx("svg", _objectSpread2(_objectSpread2({
|
|
16134
16223
|
xmlns: "http://www.w3.org/2000/svg",
|
|
16135
16224
|
width: size,
|
|
@@ -16223,9 +16312,9 @@ const FileThumb = ({ url, floatingActions = false, uploadPending, deletePending,
|
|
|
16223
16312
|
}) : null]
|
|
16224
16313
|
});
|
|
16225
16314
|
};
|
|
16226
|
-
var _excluded$
|
|
16315
|
+
var _excluded$45 = ["className", "children"];
|
|
16227
16316
|
const TextButton = (_ref) => {
|
|
16228
|
-
let { className, children } = _ref, props = _objectWithoutProperties(_ref, _excluded$
|
|
16317
|
+
let { className, children } = _ref, props = _objectWithoutProperties(_ref, _excluded$45);
|
|
16229
16318
|
const baseClassName$1 = classNames("Layer__text-btn", className);
|
|
16230
16319
|
return /* @__PURE__ */ jsx("button", _objectSpread2(_objectSpread2({}, props), {}, {
|
|
16231
16320
|
className: baseClassName$1,
|
|
@@ -16271,7 +16360,7 @@ const FileInput = ({ text, onUpload, disabled = false, secondary, iconOnly = fal
|
|
|
16271
16360
|
style: { display: "none" }
|
|
16272
16361
|
})] });
|
|
16273
16362
|
};
|
|
16274
|
-
var _excluded$
|
|
16363
|
+
var _excluded$44 = ["bankTransaction", "isActive"];
|
|
16275
16364
|
var MAX_RECEIPTS_COUNT = 10;
|
|
16276
16365
|
var openReceiptInNewTab = (url, receiptTitle) => (e) => {
|
|
16277
16366
|
e.preventDefault();
|
|
@@ -16292,7 +16381,7 @@ var BankTransactionReceiptsWithProvider = forwardRef((_ref, ref) => {
|
|
|
16292
16381
|
return /* @__PURE__ */ jsx(ReceiptsProvider, {
|
|
16293
16382
|
bankTransaction,
|
|
16294
16383
|
isActive,
|
|
16295
|
-
children: /* @__PURE__ */ jsx(BankTransactionReceipts, _objectSpread2(_objectSpread2({}, _objectWithoutProperties(_ref, _excluded$
|
|
16384
|
+
children: /* @__PURE__ */ jsx(BankTransactionReceipts, _objectSpread2(_objectSpread2({}, _objectWithoutProperties(_ref, _excluded$44)), {}, { ref }))
|
|
16296
16385
|
});
|
|
16297
16386
|
});
|
|
16298
16387
|
BankTransactionReceiptsWithProvider.displayName = "BankTransactionReceiptsWithProvider";
|
|
@@ -16371,14 +16460,14 @@ const getCurrencyFormatConfig = (intl) => {
|
|
|
16371
16460
|
suffix: parts.slice(lastNumberIndex + 1).map((part) => part.value).join("")
|
|
16372
16461
|
};
|
|
16373
16462
|
};
|
|
16374
|
-
var _excluded$
|
|
16463
|
+
var _excluded$43 = [
|
|
16375
16464
|
"onChange",
|
|
16376
16465
|
"className",
|
|
16377
16466
|
"errorMessage",
|
|
16378
16467
|
"isInvalid"
|
|
16379
16468
|
];
|
|
16380
16469
|
const AmountInput = (_ref) => {
|
|
16381
|
-
let { onChange, className, errorMessage, isInvalid } = _ref, props = _objectWithoutProperties(_ref, _excluded$
|
|
16470
|
+
let { onChange, className, errorMessage, isInvalid } = _ref, props = _objectWithoutProperties(_ref, _excluded$43);
|
|
16382
16471
|
const intl = useIntl();
|
|
16383
16472
|
const formatter = useIntlFormatter();
|
|
16384
16473
|
const currencyFormatConfig = useMemo(() => getCurrencyFormatConfig(intl), [intl]);
|
|
@@ -17018,14 +17107,14 @@ const BankTransactionsMobileListItemCheckbox = ({ bulkActionsEnabled, bankTransa
|
|
|
17018
17107
|
})
|
|
17019
17108
|
});
|
|
17020
17109
|
};
|
|
17021
|
-
var _excluded$
|
|
17110
|
+
var _excluded$42 = ["size"];
|
|
17022
17111
|
var Paperclip = (_ref) => {
|
|
17023
17112
|
let { size = 20 } = _ref;
|
|
17024
17113
|
return /* @__PURE__ */ jsx("svg", _objectSpread2(_objectSpread2({
|
|
17025
17114
|
xmlns: "http://www.w3.org/2000/svg",
|
|
17026
17115
|
viewBox: "0 0 20 20",
|
|
17027
17116
|
fill: "none"
|
|
17028
|
-
}, _objectWithoutProperties(_ref, _excluded$
|
|
17117
|
+
}, _objectWithoutProperties(_ref, _excluded$42)), {}, {
|
|
17029
17118
|
width: size,
|
|
17030
17119
|
height: size,
|
|
17031
17120
|
children: /* @__PURE__ */ jsx("path", {
|
|
@@ -18105,14 +18194,14 @@ const BankTransactionRow = ({ index, bankTransaction, initialLoad, showDescripti
|
|
|
18105
18194
|
})
|
|
18106
18195
|
}) })] });
|
|
18107
18196
|
};
|
|
18108
|
-
var _excluded$
|
|
18197
|
+
var _excluded$41 = ["size"];
|
|
18109
18198
|
var Inbox = (_ref) => {
|
|
18110
18199
|
let { size = 18 } = _ref;
|
|
18111
18200
|
return /* @__PURE__ */ jsxs("svg", _objectSpread2(_objectSpread2({
|
|
18112
18201
|
xmlns: "http://www.w3.org/2000/svg",
|
|
18113
18202
|
viewBox: "0 0 18 18",
|
|
18114
18203
|
fill: "none"
|
|
18115
|
-
}, _objectWithoutProperties(_ref, _excluded$
|
|
18204
|
+
}, _objectWithoutProperties(_ref, _excluded$41)), {}, {
|
|
18116
18205
|
width: size,
|
|
18117
18206
|
height: size,
|
|
18118
18207
|
children: [/* @__PURE__ */ jsx("path", {
|
|
@@ -18410,14 +18499,14 @@ function useArchiveCategorizationRule() {
|
|
|
18410
18499
|
return Reflect.get(target, prop);
|
|
18411
18500
|
} });
|
|
18412
18501
|
}
|
|
18413
|
-
var _excluded$
|
|
18502
|
+
var _excluded$40 = ["size"];
|
|
18414
18503
|
var BackArrow = (_ref) => {
|
|
18415
18504
|
let { size = 18 } = _ref;
|
|
18416
18505
|
return /* @__PURE__ */ jsx("svg", _objectSpread2(_objectSpread2({
|
|
18417
18506
|
viewBox: "0 0 12 12",
|
|
18418
18507
|
fill: "none",
|
|
18419
18508
|
xmlns: "http://www.w3.org/2000/svg"
|
|
18420
|
-
}, _objectWithoutProperties(_ref, _excluded$
|
|
18509
|
+
}, _objectWithoutProperties(_ref, _excluded$40)), {}, {
|
|
18421
18510
|
width: size,
|
|
18422
18511
|
height: size,
|
|
18423
18512
|
children: /* @__PURE__ */ jsx("path", {
|
|
@@ -18494,7 +18583,7 @@ const MobileListItem = ({ item, onClickItem, children }) => {
|
|
|
18494
18583
|
}), children$1] }))
|
|
18495
18584
|
}, item.id);
|
|
18496
18585
|
};
|
|
18497
|
-
var _excluded$
|
|
18586
|
+
var _excluded$39 = [
|
|
18498
18587
|
"ariaLabel",
|
|
18499
18588
|
"data",
|
|
18500
18589
|
"slots",
|
|
@@ -18508,7 +18597,7 @@ var isSelectionEnabled = (props) => {
|
|
|
18508
18597
|
return props.selectionMode !== "none" && props.enableSelection;
|
|
18509
18598
|
};
|
|
18510
18599
|
const MobileList = (props) => {
|
|
18511
|
-
const { ariaLabel, data, slots, renderItem, onClickItem, isLoading, isError, selectionMode = "none" } = props, restSelectionProps = _objectWithoutProperties(props, _excluded$
|
|
18600
|
+
const { ariaLabel, data, slots, renderItem, onClickItem, isLoading, isError, selectionMode = "none" } = props, restSelectionProps = _objectWithoutProperties(props, _excluded$39);
|
|
18512
18601
|
const { EmptyState: EmptyState$6, ErrorState: ErrorState$5 } = slots;
|
|
18513
18602
|
const resolvedSelectionMode = isSelectionEnabled(props) ? selectionMode : "none";
|
|
18514
18603
|
const resolvedSelectionBehavior = resolvedSelectionMode === "none" ? "toggle" : void 0;
|
|
@@ -18562,9 +18651,9 @@ const usePaginationRange = ({ totalCount, pageSize, siblingCount = 1, currentPag
|
|
|
18562
18651
|
currentPage
|
|
18563
18652
|
]);
|
|
18564
18653
|
};
|
|
18565
|
-
var _excluded$
|
|
18654
|
+
var _excluded$38 = ["children", "isSelected"];
|
|
18566
18655
|
var PaginationButton = (_ref) => {
|
|
18567
|
-
let { children, isSelected } = _ref, buttonProps = _objectWithoutProperties(_ref, _excluded$
|
|
18656
|
+
let { children, isSelected } = _ref, buttonProps = _objectWithoutProperties(_ref, _excluded$38);
|
|
18568
18657
|
return /* @__PURE__ */ jsx(Button$1, _objectSpread2(_objectSpread2({
|
|
18569
18658
|
inset: true,
|
|
18570
18659
|
icon: true,
|
|
@@ -18631,14 +18720,14 @@ const Pagination = ({ onPageChange, totalCount, siblingCount = 1, currentPage, p
|
|
|
18631
18720
|
})
|
|
18632
18721
|
});
|
|
18633
18722
|
};
|
|
18634
|
-
var _excluded$
|
|
18635
|
-
var EMPTY_ARRAY$
|
|
18723
|
+
var _excluded$37 = ["data", "paginationProps"];
|
|
18724
|
+
var EMPTY_ARRAY$3 = [];
|
|
18636
18725
|
const PaginatedMobileList = (props) => {
|
|
18637
18726
|
var _data$length;
|
|
18638
|
-
const { data, paginationProps } = props, listProps = _objectWithoutProperties(props, _excluded$
|
|
18727
|
+
const { data, paginationProps } = props, listProps = _objectWithoutProperties(props, _excluded$37);
|
|
18639
18728
|
const { initialPage = 0, onSetPage, pageSize = 20, hasMore, fetchMore, autoResetPageIndexRef } = paginationProps;
|
|
18640
18729
|
const { pageItems, pageIndex, setPage } = usePaginatedList({
|
|
18641
|
-
data: data !== null && data !== void 0 ? data : EMPTY_ARRAY$
|
|
18730
|
+
data: data !== null && data !== void 0 ? data : EMPTY_ARRAY$3,
|
|
18642
18731
|
pageSize,
|
|
18643
18732
|
initialPage,
|
|
18644
18733
|
onSetPage
|
|
@@ -18753,9 +18842,55 @@ const CategorizationRulesMobileList = ({ data, isLoading, isError, paginationPro
|
|
|
18753
18842
|
})
|
|
18754
18843
|
});
|
|
18755
18844
|
};
|
|
18756
|
-
|
|
18845
|
+
var WIDTH_CHANGE_THRESHOLD_PX = .5;
|
|
18846
|
+
var getLeafHeaderCells = (header) => {
|
|
18847
|
+
const leafRow = header === null || header === void 0 ? void 0 : header.lastElementChild;
|
|
18848
|
+
if (!leafRow) return null;
|
|
18849
|
+
return Array.from(leafRow.children);
|
|
18850
|
+
};
|
|
18851
|
+
var computeUpdatedWidths = (prev, columnIds, cells) => {
|
|
18852
|
+
let next = prev;
|
|
18853
|
+
columnIds.forEach((id, i) => {
|
|
18854
|
+
var _prev$id;
|
|
18855
|
+
const cell = cells[i];
|
|
18856
|
+
if (!cell) return;
|
|
18857
|
+
const width = cell.getBoundingClientRect().width;
|
|
18858
|
+
if (Math.abs(((_prev$id = prev[id]) !== null && _prev$id !== void 0 ? _prev$id : 0) - width) < WIDTH_CHANGE_THRESHOLD_PX) return;
|
|
18859
|
+
if (next === prev) next = _objectSpread2({}, prev);
|
|
18860
|
+
next[id] = width;
|
|
18861
|
+
});
|
|
18862
|
+
return next;
|
|
18863
|
+
};
|
|
18864
|
+
const useColumnHeaderWidths = (headerRef, columnIds) => {
|
|
18865
|
+
const [widths, setWidths] = useState({});
|
|
18866
|
+
useLayoutEffect(() => {
|
|
18867
|
+
const cells = getLeafHeaderCells(headerRef.current);
|
|
18868
|
+
if (!cells) return;
|
|
18869
|
+
const measure = () => {
|
|
18870
|
+
setWidths((prev) => computeUpdatedWidths(prev, columnIds, cells));
|
|
18871
|
+
};
|
|
18872
|
+
measure();
|
|
18873
|
+
const observer = new ResizeObserver(measure);
|
|
18874
|
+
cells.forEach((cell) => observer.observe(cell));
|
|
18875
|
+
return () => observer.disconnect();
|
|
18876
|
+
}, [headerRef, columnIds.join("|")]);
|
|
18877
|
+
return widths;
|
|
18878
|
+
};
|
|
18879
|
+
const useColumnPinningStyles = (headerGroups) => {
|
|
18880
|
+
const headerRef = useRef(null);
|
|
18881
|
+
const headerWidths = useColumnHeaderWidths(headerRef, useMemo(() => {
|
|
18882
|
+
var _headerGroups$at$head, _headerGroups$at;
|
|
18883
|
+
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 : [];
|
|
18884
|
+
}, [headerGroups]));
|
|
18885
|
+
return {
|
|
18886
|
+
headerRef,
|
|
18887
|
+
pinningStyles: useMemo(() => computePinningStyles(headerGroups, headerWidths), [headerGroups, headerWidths])
|
|
18888
|
+
};
|
|
18889
|
+
};
|
|
18890
|
+
const DataTable = ({ isLoading, isError, componentName, ariaLabel, slots, dependencies: dependencies$1, data, headerGroups, numColumns, withClickableRow }) => {
|
|
18757
18891
|
const nonAria = headerGroups.length > 1;
|
|
18758
18892
|
const { EmptyState: EmptyState$6, ErrorState: ErrorState$5 } = slots;
|
|
18893
|
+
const { headerRef, pinningStyles } = useColumnPinningStyles(headerGroups);
|
|
18759
18894
|
const isEmptyTable = (data === null || data === void 0 ? void 0 : data.length) === 0;
|
|
18760
18895
|
const renderTableBody = useMemo(() => {
|
|
18761
18896
|
if (isError) return /* @__PURE__ */ jsx(Row$1, {
|
|
@@ -18801,6 +18936,8 @@ const DataTable = ({ isLoading, isError, componentName, ariaLabel, slots, hideHe
|
|
|
18801
18936
|
return /* @__PURE__ */ jsx(Cell$2, {
|
|
18802
18937
|
className: `Layer__UI__Table-Cell__${componentName}--${cell.column.id}`,
|
|
18803
18938
|
alignment: (_cell$column$columnDe = cell.column.columnDef.meta) === null || _cell$column$columnDe === void 0 ? void 0 : _cell$column$columnDe.alignment,
|
|
18939
|
+
pinned: cell.column.getIsPinned(),
|
|
18940
|
+
style: pinningStyles.get(cell.column.id),
|
|
18804
18941
|
nonAria,
|
|
18805
18942
|
children: flexRender(cell.column.columnDef.cell, cell.getContext())
|
|
18806
18943
|
}, `${row.id}-${cell.id}`);
|
|
@@ -18817,34 +18954,40 @@ const DataTable = ({ isLoading, isError, componentName, ariaLabel, slots, hideHe
|
|
|
18817
18954
|
ErrorState$5,
|
|
18818
18955
|
EmptyState$6,
|
|
18819
18956
|
withClickableRow,
|
|
18820
|
-
componentName
|
|
18957
|
+
componentName,
|
|
18958
|
+
pinningStyles
|
|
18821
18959
|
]);
|
|
18822
|
-
return /* @__PURE__ */
|
|
18823
|
-
"
|
|
18824
|
-
|
|
18825
|
-
|
|
18826
|
-
|
|
18827
|
-
hideHeader,
|
|
18960
|
+
return /* @__PURE__ */ jsx("div", {
|
|
18961
|
+
className: "Layer__UI__Table-ScrollContainer",
|
|
18962
|
+
children: /* @__PURE__ */ jsxs(Table$1, {
|
|
18963
|
+
"aria-label": ariaLabel,
|
|
18964
|
+
className: `Layer__UI__Table__${componentName}`,
|
|
18828
18965
|
nonAria,
|
|
18829
|
-
children:
|
|
18966
|
+
children: [/* @__PURE__ */ jsx(TableHeader$1, {
|
|
18967
|
+
ref: headerRef,
|
|
18830
18968
|
nonAria,
|
|
18831
|
-
children:
|
|
18832
|
-
|
|
18833
|
-
|
|
18834
|
-
|
|
18835
|
-
|
|
18836
|
-
|
|
18837
|
-
|
|
18838
|
-
|
|
18839
|
-
|
|
18840
|
-
|
|
18841
|
-
|
|
18842
|
-
|
|
18843
|
-
|
|
18844
|
-
|
|
18845
|
-
|
|
18846
|
-
|
|
18847
|
-
|
|
18969
|
+
children: headerGroups.map((headerGroup) => /* @__PURE__ */ jsx(Row$1, {
|
|
18970
|
+
nonAria,
|
|
18971
|
+
children: headerGroup.headers.map((header) => {
|
|
18972
|
+
var _header$column$column, _header$column$column2;
|
|
18973
|
+
return /* @__PURE__ */ jsx(Column$1, {
|
|
18974
|
+
isRowHeader: (_header$column$column = header.column.columnDef.meta) === null || _header$column$column === void 0 ? void 0 : _header$column$column.isRowHeader,
|
|
18975
|
+
className: `Layer__UI__Table-Column__${componentName}--${header.id}`,
|
|
18976
|
+
alignment: (_header$column$column2 = header.column.columnDef.meta) === null || _header$column$column2 === void 0 ? void 0 : _header$column$column2.alignment,
|
|
18977
|
+
pinned: header.column.getIsPinned(),
|
|
18978
|
+
style: pinningStyles.get(header.column.id),
|
|
18979
|
+
nonAria,
|
|
18980
|
+
colSpan: header.colSpan,
|
|
18981
|
+
children: header.isPlaceholder ? null : typeof header.column.columnDef.header === "function" ? header.column.columnDef.header(header.getContext()) : header.column.columnDef.header
|
|
18982
|
+
}, header.id);
|
|
18983
|
+
})
|
|
18984
|
+
}, headerGroup.id))
|
|
18985
|
+
}), /* @__PURE__ */ jsx(TableBody$1, {
|
|
18986
|
+
dependencies: dependencies$1,
|
|
18987
|
+
nonAria,
|
|
18988
|
+
children: renderTableBody
|
|
18989
|
+
})]
|
|
18990
|
+
})
|
|
18848
18991
|
});
|
|
18849
18992
|
};
|
|
18850
18993
|
function PaginatedTable({ data, isLoading, isError, columnConfig, componentName, ariaLabel, paginationProps, slots }) {
|
|
@@ -19548,7 +19691,7 @@ const SuggestedCategorizationRuleUpdatesDialog = ({ isOpen, onOpenChange, ruleSu
|
|
|
19548
19691
|
})] })
|
|
19549
19692
|
});
|
|
19550
19693
|
};
|
|
19551
|
-
var _excluded$
|
|
19694
|
+
var _excluded$36 = [
|
|
19552
19695
|
"onError",
|
|
19553
19696
|
"showTags",
|
|
19554
19697
|
"showCustomerVendor",
|
|
@@ -19560,7 +19703,7 @@ var _excluded$34 = [
|
|
|
19560
19703
|
];
|
|
19561
19704
|
var COMPONENT_NAME$12 = "bank-transactions";
|
|
19562
19705
|
const BankTransactions = (_ref) => {
|
|
19563
|
-
let { onError, showTags = false, showCustomerVendor = false, monthlyView = false, applyGlobalDateRange = false, mode, renderInAppLink, filters } = _ref, restProps = _objectWithoutProperties(_ref, _excluded$
|
|
19706
|
+
let { onError, showTags = false, showCustomerVendor = false, monthlyView = false, applyGlobalDateRange = false, mode, renderInAppLink, filters } = _ref, restProps = _objectWithoutProperties(_ref, _excluded$36);
|
|
19564
19707
|
usePreloadTagDimensions({ isEnabled: showTags });
|
|
19565
19708
|
usePreloadCustomers({ isEnabled: showCustomerVendor });
|
|
19566
19709
|
usePreloadVendors({ isEnabled: showCustomerVendor });
|
|
@@ -19866,9 +20009,9 @@ function QuickbooksContextProvider({ children }) {
|
|
|
19866
20009
|
children
|
|
19867
20010
|
});
|
|
19868
20011
|
}
|
|
19869
|
-
var _excluded$
|
|
20012
|
+
var _excluded$35 = ["size"];
|
|
19870
20013
|
var Cog = (_ref) => {
|
|
19871
|
-
let { size = 12 } = _ref, props = _objectWithoutProperties(_ref, _excluded$
|
|
20014
|
+
let { size = 12 } = _ref, props = _objectWithoutProperties(_ref, _excluded$35);
|
|
19872
20015
|
const id = useId();
|
|
19873
20016
|
return /* @__PURE__ */ jsxs("svg", _objectSpread2(_objectSpread2({
|
|
19874
20017
|
xmlns: "http://www.w3.org/2000/svg",
|
|
@@ -19899,9 +20042,9 @@ var Cog = (_ref) => {
|
|
|
19899
20042
|
}) })] }));
|
|
19900
20043
|
};
|
|
19901
20044
|
var Cog_default = Cog;
|
|
19902
|
-
var _excluded$
|
|
20045
|
+
var _excluded$34 = ["size"];
|
|
19903
20046
|
var QuickbooksIcon = (_ref) => {
|
|
19904
|
-
let { size = 24 } = _ref, props = _objectWithoutProperties(_ref, _excluded$
|
|
20047
|
+
let { size = 24 } = _ref, props = _objectWithoutProperties(_ref, _excluded$34);
|
|
19905
20048
|
return /* @__PURE__ */ jsxs("svg", _objectSpread2(_objectSpread2({
|
|
19906
20049
|
xmlns: "http://www.w3.org/2000/svg",
|
|
19907
20050
|
viewBox: "0 0 24 24",
|
|
@@ -20088,14 +20231,14 @@ function IntegrationsQuickbooksUnlinkConfirmationModal({ isOpen, onOpenChange })
|
|
|
20088
20231
|
errorText: t("integrations:error.unlink_failed", "Unlink failed. Please check your connection and try again in a few seconds.")
|
|
20089
20232
|
});
|
|
20090
20233
|
}
|
|
20091
|
-
var _excluded$
|
|
20234
|
+
var _excluded$33 = ["size"];
|
|
20092
20235
|
var MoreVertical = (_ref) => {
|
|
20093
20236
|
let { size = 18 } = _ref;
|
|
20094
20237
|
return /* @__PURE__ */ jsxs("svg", _objectSpread2(_objectSpread2({
|
|
20095
20238
|
viewBox: "0 0 16 14",
|
|
20096
20239
|
fill: "none",
|
|
20097
20240
|
xmlns: "http://www.w3.org/2000/svg"
|
|
20098
|
-
}, _objectWithoutProperties(_ref, _excluded$
|
|
20241
|
+
}, _objectWithoutProperties(_ref, _excluded$33)), {}, {
|
|
20099
20242
|
width: size,
|
|
20100
20243
|
height: size,
|
|
20101
20244
|
children: [
|
|
@@ -20289,14 +20432,14 @@ const IntegrationsComponent = ({ stringOverrides }) => {
|
|
|
20289
20432
|
]
|
|
20290
20433
|
});
|
|
20291
20434
|
};
|
|
20292
|
-
var _excluded$
|
|
20435
|
+
var _excluded$32 = ["size"];
|
|
20293
20436
|
var PlusIcon = (_ref) => {
|
|
20294
20437
|
let { size = 14 } = _ref;
|
|
20295
20438
|
return /* @__PURE__ */ jsxs("svg", _objectSpread2(_objectSpread2({
|
|
20296
20439
|
xmlns: "http://www.w3.org/2000/svg",
|
|
20297
20440
|
viewBox: "0 0 16 16",
|
|
20298
20441
|
fill: "none"
|
|
20299
|
-
}, _objectWithoutProperties(_ref, _excluded$
|
|
20442
|
+
}, _objectWithoutProperties(_ref, _excluded$32)), {}, {
|
|
20300
20443
|
width: size,
|
|
20301
20444
|
height: size,
|
|
20302
20445
|
children: [
|
|
@@ -20371,14 +20514,14 @@ function useConfirmAndExcludeMultiple({ onSuccess }) {
|
|
|
20371
20514
|
throwOnError: false
|
|
20372
20515
|
});
|
|
20373
20516
|
}
|
|
20374
|
-
var _excluded$
|
|
20517
|
+
var _excluded$31 = ["size"];
|
|
20375
20518
|
var InstitutionIcon = (_ref) => {
|
|
20376
20519
|
let { size = 18 } = _ref;
|
|
20377
20520
|
return /* @__PURE__ */ jsxs("svg", _objectSpread2(_objectSpread2({
|
|
20378
20521
|
viewBox: "0 0 27 28",
|
|
20379
20522
|
fill: "none",
|
|
20380
20523
|
xmlns: "http://www.w3.org/2000/svg"
|
|
20381
|
-
}, _objectWithoutProperties(_ref, _excluded$
|
|
20524
|
+
}, _objectWithoutProperties(_ref, _excluded$31)), {}, {
|
|
20382
20525
|
width: size,
|
|
20383
20526
|
height: size,
|
|
20384
20527
|
children: [
|
|
@@ -20904,10 +21047,10 @@ const MenuItem$2 = forwardRef(function MenuItem$3({ children, textValue, onActio
|
|
|
20904
21047
|
children
|
|
20905
21048
|
});
|
|
20906
21049
|
});
|
|
20907
|
-
var _excluded$
|
|
21050
|
+
var _excluded$30 = ["children", "status"];
|
|
20908
21051
|
var PILL_CLASS_NAME = "Layer__Pill";
|
|
20909
21052
|
const Pill = forwardRef(function Pill$1(_ref, ref) {
|
|
20910
|
-
let { children, status } = _ref, restProps = _objectWithoutProperties(_ref, _excluded$
|
|
21053
|
+
let { children, status } = _ref, restProps = _objectWithoutProperties(_ref, _excluded$30);
|
|
20911
21054
|
const dataProperties = toDataProperties({ status });
|
|
20912
21055
|
return /* @__PURE__ */ jsx(Button, _objectSpread2(_objectSpread2(_objectSpread2({}, restProps), dataProperties), {}, {
|
|
20913
21056
|
className: PILL_CLASS_NAME,
|
|
@@ -22065,16 +22208,16 @@ const useProfitAndLossLTM = ({ tagFilter, reportingBasis, chartWindow }) => {
|
|
|
22065
22208
|
isError
|
|
22066
22209
|
};
|
|
22067
22210
|
};
|
|
22068
|
-
var _excluded$
|
|
22211
|
+
var _excluded$29 = [
|
|
22069
22212
|
"verticalAnchor",
|
|
22070
22213
|
"visibleTicksCount",
|
|
22071
22214
|
"tickFormatter",
|
|
22072
22215
|
"format",
|
|
22073
22216
|
"payload"
|
|
22074
|
-
], _excluded2$
|
|
22217
|
+
], _excluded2$4 = ["format"];
|
|
22075
22218
|
var CustomizedYTick = (_ref) => {
|
|
22076
22219
|
let { verticalAnchor: _verticalAnchor, visibleTicksCount: _visibleTicksCount, tickFormatter: _tickFormatter, format: format$1, payload } = _ref;
|
|
22077
|
-
return /* @__PURE__ */ jsx("text", _objectSpread2(_objectSpread2({}, _objectWithoutProperties(_ref, _excluded$
|
|
22220
|
+
return /* @__PURE__ */ jsx("text", _objectSpread2(_objectSpread2({}, _objectWithoutProperties(_ref, _excluded$29)), {}, {
|
|
22078
22221
|
className: "Layer__ChartYAxis__tick",
|
|
22079
22222
|
children: /* @__PURE__ */ jsx("tspan", {
|
|
22080
22223
|
dy: "0.355em",
|
|
@@ -22083,7 +22226,7 @@ var CustomizedYTick = (_ref) => {
|
|
|
22083
22226
|
}));
|
|
22084
22227
|
};
|
|
22085
22228
|
const ChartYAxis = (_ref2) => {
|
|
22086
|
-
let { format: format$1 } = _ref2, props = _objectWithoutProperties(_ref2, _excluded2$
|
|
22229
|
+
let { format: format$1 } = _ref2, props = _objectWithoutProperties(_ref2, _excluded2$4);
|
|
22087
22230
|
const { formatNumber: formatNumber$1 } = useIntlFormatter();
|
|
22088
22231
|
const formatYAxisValue = useCallback((value) => {
|
|
22089
22232
|
if (!value) return value;
|
|
@@ -22251,7 +22394,7 @@ const ProfitAndLossChartSelectionIndicator = ({ viewBox, selected }) => {
|
|
|
22251
22394
|
height: "calc(100% - 30px)"
|
|
22252
22395
|
});
|
|
22253
22396
|
};
|
|
22254
|
-
var _excluded$
|
|
22397
|
+
var _excluded$28 = ["payload", "fill"];
|
|
22255
22398
|
var BAR_RADIUS$1 = [
|
|
22256
22399
|
2,
|
|
22257
22400
|
2,
|
|
@@ -22271,7 +22414,7 @@ const ProfitAndLossChartBar = ({ dataKey, xAxisId, cellFill, className, barSize,
|
|
|
22271
22414
|
isAnimationActive: barAnimation,
|
|
22272
22415
|
fill: cellFill,
|
|
22273
22416
|
shape: useCallback((props) => {
|
|
22274
|
-
const { payload, fill } = props, restProps = _objectWithoutProperties(props, _excluded$
|
|
22417
|
+
const { payload, fill } = props, restProps = _objectWithoutProperties(props, _excluded$28);
|
|
22275
22418
|
const shouldRound = payload && isOutermostBar(payload, dataKey, xAxisId);
|
|
22276
22419
|
return /* @__PURE__ */ jsx(Rectangle, _objectSpread2(_objectSpread2({}, restProps), {}, {
|
|
22277
22420
|
fill,
|
|
@@ -22333,14 +22476,14 @@ const ProfitAndLossChartLegend = () => {
|
|
|
22333
22476
|
})), [t]))
|
|
22334
22477
|
});
|
|
22335
22478
|
};
|
|
22336
|
-
var _excluded$
|
|
22479
|
+
var _excluded$27 = ["size"];
|
|
22337
22480
|
var BarChart2 = (_ref) => {
|
|
22338
22481
|
let { size = 12 } = _ref;
|
|
22339
22482
|
return /* @__PURE__ */ jsxs("svg", _objectSpread2(_objectSpread2({
|
|
22340
22483
|
xmlns: "http://www.w3.org/2000/svg",
|
|
22341
22484
|
viewBox: "0 0 12 12",
|
|
22342
22485
|
fill: "none"
|
|
22343
|
-
}, _objectWithoutProperties(_ref, _excluded$
|
|
22486
|
+
}, _objectWithoutProperties(_ref, _excluded$27)), {}, {
|
|
22344
22487
|
width: size,
|
|
22345
22488
|
height: size,
|
|
22346
22489
|
children: [
|
|
@@ -22383,7 +22526,7 @@ const ProfitAndLossChartStateCard = () => {
|
|
|
22383
22526
|
})]
|
|
22384
22527
|
});
|
|
22385
22528
|
};
|
|
22386
|
-
var _excluded$
|
|
22529
|
+
var _excluded$26 = [
|
|
22387
22530
|
"content",
|
|
22388
22531
|
"cursorWidth",
|
|
22389
22532
|
"animationDuration",
|
|
@@ -22419,7 +22562,7 @@ const ChartTooltipCursor = ({ width, points, height }) => {
|
|
|
22419
22562
|
});
|
|
22420
22563
|
};
|
|
22421
22564
|
const ChartTooltip = (_ref) => {
|
|
22422
|
-
let { content, cursorWidth, animationDuration = 100, animationEasing = "ease-out" } = _ref, props = _objectWithoutProperties(_ref, _excluded$
|
|
22565
|
+
let { content, cursorWidth, animationDuration = 100, animationEasing = "ease-out" } = _ref, props = _objectWithoutProperties(_ref, _excluded$26);
|
|
22423
22566
|
return /* @__PURE__ */ jsx(Tooltip, _objectSpread2({
|
|
22424
22567
|
wrapperClassName: "Layer__ChartTooltip__wrapper",
|
|
22425
22568
|
content,
|
|
@@ -22680,9 +22823,9 @@ const ProfitAndLossChart = ({ tagFilter }) => {
|
|
|
22680
22823
|
}, "pnl-chart"), isSyncing ? /* @__PURE__ */ jsx(ProfitAndLossChartStateCard, {}) : null]
|
|
22681
22824
|
});
|
|
22682
22825
|
};
|
|
22683
|
-
var _excluded$
|
|
22826
|
+
var _excluded$25 = ["className", "textOnly"];
|
|
22684
22827
|
const BackButton = (_ref) => {
|
|
22685
|
-
let { className, textOnly = false } = _ref, props = _objectWithoutProperties(_ref, _excluded$
|
|
22828
|
+
let { className, textOnly = false } = _ref, props = _objectWithoutProperties(_ref, _excluded$25);
|
|
22686
22829
|
const baseClassName$1 = classNames("Layer__btn", "Layer__back-btn", className);
|
|
22687
22830
|
return /* @__PURE__ */ jsx("button", _objectSpread2(_objectSpread2({}, props), {}, {
|
|
22688
22831
|
className: baseClassName$1,
|
|
@@ -22856,7 +22999,7 @@ const DetailedChart = ({ data, isLoading, interactionProps, stylingProps, slots
|
|
|
22856
22999
|
})]
|
|
22857
23000
|
});
|
|
22858
23001
|
};
|
|
22859
|
-
var _excluded$
|
|
23002
|
+
var _excluded$24 = ["size"];
|
|
22860
23003
|
var ClassNames = {
|
|
22861
23004
|
DESC_ARROW: "Layer__SortArrows__DescArrow",
|
|
22862
23005
|
ASC_ARROW: "Layer__SortArrows__AscArrow"
|
|
@@ -22867,7 +23010,7 @@ var SortArrows = (_ref) => {
|
|
|
22867
23010
|
xmlns: "http://www.w3.org/2000/svg",
|
|
22868
23011
|
viewBox: "0 0 12 13",
|
|
22869
23012
|
fill: "none"
|
|
22870
|
-
}, _objectWithoutProperties(_ref, _excluded$
|
|
23013
|
+
}, _objectWithoutProperties(_ref, _excluded$24)), {}, {
|
|
22871
23014
|
width: size,
|
|
22872
23015
|
height: size,
|
|
22873
23016
|
children: [/* @__PURE__ */ jsxs("g", {
|
|
@@ -23005,7 +23148,7 @@ var RegularValueIcon = ({ colorMapping }) => {
|
|
|
23005
23148
|
})
|
|
23006
23149
|
});
|
|
23007
23150
|
};
|
|
23008
|
-
var _excluded$
|
|
23151
|
+
var _excluded$23 = ["data"];
|
|
23009
23152
|
const DetailedTable = ({ stylingProps, sortParams, sortFunction, interactionProps, rows, stringOverrides }) => {
|
|
23010
23153
|
const { t } = useTranslation();
|
|
23011
23154
|
const setAndToggleSortDirection = (params) => {
|
|
@@ -23136,7 +23279,7 @@ const DetailedTable = ({ stylingProps, sortParams, sortFunction, interactionProp
|
|
|
23136
23279
|
});
|
|
23137
23280
|
};
|
|
23138
23281
|
const DetailedTableWithData = (_ref) => {
|
|
23139
|
-
let { data } = _ref, props = _objectWithoutProperties(_ref, _excluded$
|
|
23282
|
+
let { data } = _ref, props = _objectWithoutProperties(_ref, _excluded$23);
|
|
23140
23283
|
return /* @__PURE__ */ jsx(DetailedTable, _objectSpread2({ rows: useDetailedTableRows({ data }) }, props));
|
|
23141
23284
|
};
|
|
23142
23285
|
function useGlobalDatePickerBounds() {
|
|
@@ -23290,9 +23433,9 @@ const LedgerAccountsContext = createContext({
|
|
|
23290
23433
|
hasMore: false,
|
|
23291
23434
|
fetchMore: () => {}
|
|
23292
23435
|
});
|
|
23293
|
-
var _excluded$
|
|
23436
|
+
var _excluded$22 = ["className", "textOnly"];
|
|
23294
23437
|
const CloseButton = (_ref) => {
|
|
23295
|
-
let { className, textOnly = false } = _ref, props = _objectWithoutProperties(_ref, _excluded$
|
|
23438
|
+
let { className, textOnly = false } = _ref, props = _objectWithoutProperties(_ref, _excluded$22);
|
|
23296
23439
|
const baseClassName$1 = classNames("Layer__btn", "Layer__back-btn", className);
|
|
23297
23440
|
return /* @__PURE__ */ jsx("button", _objectSpread2(_objectSpread2({}, props), {}, {
|
|
23298
23441
|
className: baseClassName$1,
|
|
@@ -25717,7 +25860,7 @@ function TransactionsToReview({ onClick, tagFilter = void 0, variants: variants$
|
|
|
25717
25860
|
})]
|
|
25718
25861
|
});
|
|
25719
25862
|
}
|
|
25720
|
-
var _excluded$
|
|
25863
|
+
var _excluded$21 = ["onTransactionsToReviewClick"];
|
|
25721
25864
|
var SECTION_CLASS_NAMES = `Layer__ProfitAndLossSummaries Layer__component`;
|
|
25722
25865
|
function Internal_ProfitAndLossSummaries({ actionable = false, revenueLabel, stringOverrides, chartColorsList, slots, variants: variants$1 }) {
|
|
25723
25866
|
var _effectiveData$income3, _effectiveData$income4, _effectiveData$income5, _data$netProfit;
|
|
@@ -25824,7 +25967,7 @@ function Internal_ProfitAndLossSummaries({ actionable = false, revenueLabel, str
|
|
|
25824
25967
|
});
|
|
25825
25968
|
}
|
|
25826
25969
|
function ProfitAndLossSummaries(_ref) {
|
|
25827
|
-
let { onTransactionsToReviewClick } = _ref, restProps = _objectWithoutProperties(_ref, _excluded$
|
|
25970
|
+
let { onTransactionsToReviewClick } = _ref, restProps = _objectWithoutProperties(_ref, _excluded$21);
|
|
25828
25971
|
return /* @__PURE__ */ jsx(Internal_ProfitAndLossSummaries, _objectSpread2(_objectSpread2({}, restProps), {}, { slots: { unstable_AdditionalListItems: onTransactionsToReviewClick ? [/* @__PURE__ */ jsx(TransactionsToReview, {
|
|
25829
25972
|
variants: restProps.variants,
|
|
25830
25973
|
onClick: onTransactionsToReviewClick
|
|
@@ -27143,14 +27286,14 @@ const ChartOfAccountsContext = createContext({
|
|
|
27143
27286
|
changeFormData: () => {},
|
|
27144
27287
|
submitForm: () => {}
|
|
27145
27288
|
});
|
|
27146
|
-
var _excluded$
|
|
27289
|
+
var _excluded$20 = ["size"];
|
|
27147
27290
|
var Plus$1 = (_ref) => {
|
|
27148
27291
|
let { size = 14 } = _ref;
|
|
27149
27292
|
return /* @__PURE__ */ jsxs("svg", _objectSpread2(_objectSpread2({
|
|
27150
27293
|
xmlns: "http://www.w3.org/2000/svg",
|
|
27151
27294
|
viewBox: "0 0 14 14",
|
|
27152
27295
|
fill: "none"
|
|
27153
|
-
}, _objectWithoutProperties(_ref, _excluded$
|
|
27296
|
+
}, _objectWithoutProperties(_ref, _excluded$20)), {}, {
|
|
27154
27297
|
width: size,
|
|
27155
27298
|
height: size,
|
|
27156
27299
|
children: [/* @__PURE__ */ jsx("path", {
|
|
@@ -27418,14 +27561,14 @@ let LedgerAccountNodeType = /* @__PURE__ */ function(LedgerAccountNodeType$1) {
|
|
|
27418
27561
|
LedgerAccountNodeType$1["Parent"] = "Parent";
|
|
27419
27562
|
return LedgerAccountNodeType$1;
|
|
27420
27563
|
}({});
|
|
27421
|
-
var _excluded$
|
|
27564
|
+
var _excluded$19 = ["size"];
|
|
27422
27565
|
var Edit2 = (_ref) => {
|
|
27423
27566
|
let { size = 18 } = _ref;
|
|
27424
27567
|
return /* @__PURE__ */ jsx("svg", _objectSpread2(_objectSpread2({
|
|
27425
27568
|
xmlns: "http://www.w3.org/2000/svg",
|
|
27426
27569
|
viewBox: "0 0 18 18",
|
|
27427
27570
|
fill: "none"
|
|
27428
|
-
}, _objectWithoutProperties(_ref, _excluded$
|
|
27571
|
+
}, _objectWithoutProperties(_ref, _excluded$19)), {}, {
|
|
27429
27572
|
width: size,
|
|
27430
27573
|
height: size,
|
|
27431
27574
|
children: /* @__PURE__ */ jsx("path", {
|
|
@@ -28930,10 +29073,10 @@ const JournalEntryLineItem = ({ form, index, displayIndex, isReadOnly, onDeleteL
|
|
|
28930
29073
|
})
|
|
28931
29074
|
});
|
|
28932
29075
|
};
|
|
28933
|
-
var EMPTY_ARRAY$
|
|
29076
|
+
var EMPTY_ARRAY$2 = [];
|
|
28934
29077
|
const JournalEntryLineItemsTable = ({ form, isReadOnly, title, direction, showTags = false }) => {
|
|
28935
29078
|
const { t } = useTranslation();
|
|
28936
|
-
const lineItems = useStore$1(form.store, (state$14) => state$14.values.lineItems || EMPTY_ARRAY$
|
|
29079
|
+
const lineItems = useStore$1(form.store, (state$14) => state$14.values.lineItems || EMPTY_ARRAY$2);
|
|
28937
29080
|
const filteredIndices = useMemo(() => {
|
|
28938
29081
|
const indices = [];
|
|
28939
29082
|
lineItems.forEach((item, index) => {
|
|
@@ -29968,14 +30111,14 @@ const TasksHeader = ({ tasksHeader }) => {
|
|
|
29968
30111
|
})
|
|
29969
30112
|
});
|
|
29970
30113
|
};
|
|
29971
|
-
var _excluded$
|
|
30114
|
+
var _excluded$18 = ["size"];
|
|
29972
30115
|
var SmileIcon = (_ref) => {
|
|
29973
30116
|
let { size = 12 } = _ref;
|
|
29974
30117
|
return /* @__PURE__ */ jsxs("svg", _objectSpread2(_objectSpread2({
|
|
29975
30118
|
viewBox: "0 0 12 12",
|
|
29976
30119
|
fill: "none",
|
|
29977
30120
|
xmlns: "http://www.w3.org/2000/svg"
|
|
29978
|
-
}, _objectWithoutProperties(_ref, _excluded$
|
|
30121
|
+
}, _objectWithoutProperties(_ref, _excluded$18)), {}, {
|
|
29979
30122
|
width: size,
|
|
29980
30123
|
height: size,
|
|
29981
30124
|
children: [
|
|
@@ -30163,13 +30306,13 @@ function useSubmitUserResponseForTask() {
|
|
|
30163
30306
|
return Reflect.get(target, prop);
|
|
30164
30307
|
} });
|
|
30165
30308
|
}
|
|
30166
|
-
var _excluded$
|
|
30309
|
+
var _excluded$17 = [
|
|
30167
30310
|
"className",
|
|
30168
30311
|
"isInvalid",
|
|
30169
30312
|
"errorMessage"
|
|
30170
30313
|
];
|
|
30171
30314
|
const Textarea = (_ref) => {
|
|
30172
|
-
let { className, isInvalid, errorMessage } = _ref, props = _objectWithoutProperties(_ref, _excluded$
|
|
30315
|
+
let { className, isInvalid, errorMessage } = _ref, props = _objectWithoutProperties(_ref, _excluded$17);
|
|
30173
30316
|
const baseClassName$1 = classNames("Layer__textarea", isInvalid ? "Layer__textarea--error" : "", className);
|
|
30174
30317
|
return /* @__PURE__ */ jsxs(DeprecatedTooltip, {
|
|
30175
30318
|
disabled: !isInvalid || !errorMessage,
|
|
@@ -30667,14 +30810,14 @@ const useBookkeepingYearsStatus = () => {
|
|
|
30667
30810
|
isLoading
|
|
30668
30811
|
};
|
|
30669
30812
|
};
|
|
30670
|
-
var _excluded$
|
|
30813
|
+
var _excluded$16 = ["size"];
|
|
30671
30814
|
var ArrowRightCircle = (_ref) => {
|
|
30672
30815
|
let { size = 18 } = _ref;
|
|
30673
30816
|
return /* @__PURE__ */ jsxs("svg", _objectSpread2(_objectSpread2({
|
|
30674
30817
|
xmlns: "http://www.w3.org/2000/svg",
|
|
30675
30818
|
viewBox: "0 0 18 18",
|
|
30676
30819
|
fill: "none"
|
|
30677
|
-
}, _objectWithoutProperties(_ref, _excluded$
|
|
30820
|
+
}, _objectWithoutProperties(_ref, _excluded$16)), {}, {
|
|
30678
30821
|
width: size,
|
|
30679
30822
|
height: size,
|
|
30680
30823
|
children: [
|
|
@@ -31905,14 +32048,14 @@ function LinkAccountsContent({ onComplete }) {
|
|
|
31905
32048
|
})
|
|
31906
32049
|
});
|
|
31907
32050
|
}
|
|
31908
|
-
var _excluded$
|
|
32051
|
+
var _excluded$15 = ["size"];
|
|
31909
32052
|
var CoffeeIcon = (_ref) => {
|
|
31910
32053
|
let { size = 11 } = _ref;
|
|
31911
32054
|
return /* @__PURE__ */ jsxs("svg", _objectSpread2(_objectSpread2({
|
|
31912
32055
|
xmlns: "http://www.w3.org/2000/svg",
|
|
31913
32056
|
viewBox: "0 0 12 12",
|
|
31914
32057
|
fill: "none"
|
|
31915
|
-
}, _objectWithoutProperties(_ref, _excluded$
|
|
32058
|
+
}, _objectWithoutProperties(_ref, _excluded$15)), {}, {
|
|
31916
32059
|
width: size,
|
|
31917
32060
|
height: size,
|
|
31918
32061
|
children: [/* @__PURE__ */ jsxs("g", {
|
|
@@ -31961,7 +32104,7 @@ var CoffeeIcon = (_ref) => {
|
|
|
31961
32104
|
}));
|
|
31962
32105
|
};
|
|
31963
32106
|
var Coffee_default = CoffeeIcon;
|
|
31964
|
-
var _excluded$
|
|
32107
|
+
var _excluded$14 = [
|
|
31965
32108
|
"className",
|
|
31966
32109
|
"children",
|
|
31967
32110
|
"variant",
|
|
@@ -31972,8 +32115,8 @@ var _excluded$12 = [
|
|
|
31972
32115
|
"justify",
|
|
31973
32116
|
"fullWidth"
|
|
31974
32117
|
];
|
|
31975
|
-
const Link$
|
|
31976
|
-
let { className, children, variant = ButtonVariant.primary, leftIcon, rightIcon, iconOnly, iconAsPrimary = false, justify = "center", fullWidth } = _ref, props = _objectWithoutProperties(_ref, _excluded$
|
|
32118
|
+
const Link$3 = (_ref) => {
|
|
32119
|
+
let { className, children, variant = ButtonVariant.primary, leftIcon, rightIcon, iconOnly, iconAsPrimary = false, justify = "center", fullWidth } = _ref, props = _objectWithoutProperties(_ref, _excluded$14);
|
|
31977
32120
|
const linkRef = useRef(null);
|
|
31978
32121
|
let justifyContent = "center";
|
|
31979
32122
|
if (justify) justifyContent = justify;
|
|
@@ -32029,7 +32172,7 @@ const BookkeepingUpsellBar = ({ onClick, href }) => {
|
|
|
32029
32172
|
variant: ButtonVariant.secondary,
|
|
32030
32173
|
onClick,
|
|
32031
32174
|
children: t("bookkeeping:action.schedule_a_demo", "Schedule a demo")
|
|
32032
|
-
}) : href ? /* @__PURE__ */ jsx(Link$
|
|
32175
|
+
}) : href ? /* @__PURE__ */ jsx(Link$3, {
|
|
32033
32176
|
href,
|
|
32034
32177
|
target: "_blank",
|
|
32035
32178
|
variant: ButtonVariant.secondary,
|
|
@@ -32071,14 +32214,14 @@ const useMileageSummaryGlobalCacheActions = () => {
|
|
|
32071
32214
|
const { invalidate } = useGlobalCacheActions();
|
|
32072
32215
|
return { invalidateMileageSummary: useCallback(() => invalidate(({ tags }) => tags.includes(MILEAGE_SUMMARY_TAG_KEY)), [invalidate]) };
|
|
32073
32216
|
};
|
|
32074
|
-
var _excluded$
|
|
32217
|
+
var _excluded$13 = ["size"];
|
|
32075
32218
|
var ArrowRightCircleAlt = (_ref) => {
|
|
32076
32219
|
let { size = 18 } = _ref;
|
|
32077
32220
|
return /* @__PURE__ */ jsxs("svg", _objectSpread2(_objectSpread2({
|
|
32078
32221
|
xmlns: "http://www.w3.org/2000/svg",
|
|
32079
32222
|
viewBox: "0 0 18 18",
|
|
32080
32223
|
fill: "none"
|
|
32081
|
-
}, _objectWithoutProperties(_ref, _excluded$
|
|
32224
|
+
}, _objectWithoutProperties(_ref, _excluded$13)), {}, {
|
|
32082
32225
|
width: size,
|
|
32083
32226
|
height: size,
|
|
32084
32227
|
children: [
|
|
@@ -33359,14 +33502,14 @@ function getCustomerName(customer) {
|
|
|
33359
33502
|
var _ref, _customer$individualN;
|
|
33360
33503
|
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";
|
|
33361
33504
|
}
|
|
33362
|
-
var _excluded$
|
|
33505
|
+
var _excluded$12 = ["size"];
|
|
33363
33506
|
var ChevronRightFill = (_ref) => {
|
|
33364
33507
|
let { size = 18 } = _ref;
|
|
33365
33508
|
return /* @__PURE__ */ jsxs("svg", _objectSpread2(_objectSpread2({
|
|
33366
33509
|
xmlns: "http://www.w3.org/2000/svg",
|
|
33367
33510
|
viewBox: "0 0 18 18",
|
|
33368
33511
|
fill: "none"
|
|
33369
|
-
}, _objectWithoutProperties(_ref, _excluded$
|
|
33512
|
+
}, _objectWithoutProperties(_ref, _excluded$12)), {}, {
|
|
33370
33513
|
width: size,
|
|
33371
33514
|
height: size,
|
|
33372
33515
|
children: [/* @__PURE__ */ jsx("path", {
|
|
@@ -33397,8 +33540,7 @@ const DataTableHeader = ({ name: name$1, count, slotProps = {}, slots = {} }) =>
|
|
|
33397
33540
|
children: [/* @__PURE__ */ jsxs(HStack, {
|
|
33398
33541
|
align: "center",
|
|
33399
33542
|
gap: "sm",
|
|
33400
|
-
children: [/* @__PURE__ */ jsx(
|
|
33401
|
-
weight: "bold",
|
|
33543
|
+
children: [/* @__PURE__ */ jsx(Heading$1, {
|
|
33402
33544
|
size: "md",
|
|
33403
33545
|
children: name$1
|
|
33404
33546
|
}), showCount && (totalCount ? /* @__PURE__ */ jsx(Badge, {
|
|
@@ -35389,9 +35531,9 @@ const useCustomerForm = (props) => {
|
|
|
35389
35531
|
submitError
|
|
35390
35532
|
}), [form, submitError]);
|
|
35391
35533
|
};
|
|
35392
|
-
var _excluded$
|
|
35534
|
+
var _excluded$11 = ["onSuccess", "isReadOnly"];
|
|
35393
35535
|
const CustomerForm = (_ref) => {
|
|
35394
|
-
let { onSuccess, isReadOnly } = _ref, formState = _objectWithoutProperties(_ref, _excluded$
|
|
35536
|
+
let { onSuccess, isReadOnly } = _ref, formState = _objectWithoutProperties(_ref, _excluded$11);
|
|
35395
35537
|
const { t } = useTranslation();
|
|
35396
35538
|
const { form, submitError } = useCustomerForm(_objectSpread2({ onSuccess }, formState));
|
|
35397
35539
|
return /* @__PURE__ */ jsxs(Form$1, {
|
|
@@ -36244,10 +36386,10 @@ const useInvoiceForm = (props) => {
|
|
|
36244
36386
|
submitError
|
|
36245
36387
|
]);
|
|
36246
36388
|
};
|
|
36247
|
-
var _excluded$
|
|
36389
|
+
var _excluded$10 = ["isReadOnly"];
|
|
36248
36390
|
const InvoiceForm = forwardRef((props, ref) => {
|
|
36249
36391
|
var _accountingConfig$ena;
|
|
36250
|
-
const _useInvoiceDetail = useInvoiceDetail(), { isReadOnly } = _useInvoiceDetail, viewState = _objectWithoutProperties(_useInvoiceDetail, _excluded$
|
|
36392
|
+
const _useInvoiceDetail = useInvoiceDetail(), { isReadOnly } = _useInvoiceDetail, viewState = _objectWithoutProperties(_useInvoiceDetail, _excluded$10);
|
|
36251
36393
|
const { mode } = viewState;
|
|
36252
36394
|
const { onSuccess, onChangeFormState } = props;
|
|
36253
36395
|
const { businessId } = useLayerContext();
|
|
@@ -36693,7 +36835,7 @@ const InvoiceDetail = () => {
|
|
|
36693
36835
|
})
|
|
36694
36836
|
] });
|
|
36695
36837
|
};
|
|
36696
|
-
var _excluded$
|
|
36838
|
+
var _excluded$9 = [
|
|
36697
36839
|
"className",
|
|
36698
36840
|
"label",
|
|
36699
36841
|
"meterOnly"
|
|
@@ -36704,7 +36846,7 @@ var getClassnameForSubComponent = (className, suffix) => {
|
|
|
36704
36846
|
var METER_CLASS_NAME = "Layer__Meter";
|
|
36705
36847
|
const Meter$1 = forwardRef(function Meter$2(_ref, ref) {
|
|
36706
36848
|
let { className, label: label$50, meterOnly } = _ref;
|
|
36707
|
-
return /* @__PURE__ */ jsx(Meter, _objectSpread2(_objectSpread2(_objectSpread2({}, _objectWithoutProperties(_ref, _excluded$
|
|
36849
|
+
return /* @__PURE__ */ jsx(Meter, _objectSpread2(_objectSpread2(_objectSpread2({}, _objectWithoutProperties(_ref, _excluded$9)), {}, {
|
|
36708
36850
|
className: classNames(METER_CLASS_NAME, className),
|
|
36709
36851
|
ref
|
|
36710
36852
|
}, meterOnly && { "aria-label": label$50 }), {}, { children: ({ percentage, valueText }) => /* @__PURE__ */ jsxs(VStack, {
|
|
@@ -37147,7 +37289,7 @@ const Invoices = ({ stringOverrides }) => {
|
|
|
37147
37289
|
var InvoicesContent = () => {
|
|
37148
37290
|
return useInvoiceRouteState().route === InvoiceRoute.Detail ? /* @__PURE__ */ jsx(InvoiceDetail, {}) : /* @__PURE__ */ jsx(InvoiceOverview, {});
|
|
37149
37291
|
};
|
|
37150
|
-
var _excluded$
|
|
37292
|
+
var _excluded$8 = ["containerRef", "stringOverrides"];
|
|
37151
37293
|
var COMPONENT_NAME$4 = "profit-and-loss";
|
|
37152
37294
|
const ProfitAndLossView = (props) => {
|
|
37153
37295
|
const containerRef = useRef(null);
|
|
@@ -37158,7 +37300,7 @@ const ProfitAndLossView = (props) => {
|
|
|
37158
37300
|
});
|
|
37159
37301
|
};
|
|
37160
37302
|
var ProfitAndLossPanel = (_ref) => {
|
|
37161
|
-
let { containerRef, stringOverrides } = _ref, props = _objectWithoutProperties(_ref, _excluded$
|
|
37303
|
+
let { containerRef, stringOverrides } = _ref, props = _objectWithoutProperties(_ref, _excluded$8);
|
|
37162
37304
|
const { t } = useTranslation();
|
|
37163
37305
|
const { sidebarScope } = useContext(ProfitAndLossContext);
|
|
37164
37306
|
return /* @__PURE__ */ jsxs(Panel, {
|
|
@@ -37199,39 +37341,6 @@ var Components = ({ hideChart = false, hideTable = false, stringOverrides }) =>
|
|
|
37199
37341
|
})]
|
|
37200
37342
|
}), !hideTable && /* @__PURE__ */ jsx(ProfitAndLossTableWithProvider, { stringOverrides: stringOverrides === null || stringOverrides === void 0 ? void 0 : stringOverrides.profitAndLossTable })] });
|
|
37201
37343
|
};
|
|
37202
|
-
let ReportControl = /* @__PURE__ */ function(ReportControl$1) {
|
|
37203
|
-
ReportControl$1["Date"] = "date";
|
|
37204
|
-
ReportControl$1["DateRange"] = "date_range";
|
|
37205
|
-
ReportControl$1["GroupBy"] = "group_by";
|
|
37206
|
-
ReportControl$1["Unknown"] = "unknown";
|
|
37207
|
-
return ReportControl$1;
|
|
37208
|
-
}({});
|
|
37209
|
-
let ReportGroupType = /* @__PURE__ */ function(ReportGroupType$1) {
|
|
37210
|
-
ReportGroupType$1["Accounting"] = "accounting";
|
|
37211
|
-
ReportGroupType$1["Unknown"] = "unknown";
|
|
37212
|
-
return ReportGroupType$1;
|
|
37213
|
-
}({});
|
|
37214
|
-
var ReportControlSchema = Schema.Enums(ReportControl);
|
|
37215
|
-
var ReportGroupTypeSchema = Schema.Enums(ReportGroupType);
|
|
37216
|
-
var TransformedReportControlSchema = createTransformedEnumSchema(ReportControlSchema, ReportControl, ReportControl.Unknown);
|
|
37217
|
-
var TransformedReportGroupTypeSchema = createTransformedEnumSchema(ReportGroupTypeSchema, ReportGroupType, ReportGroupType.Unknown);
|
|
37218
|
-
const ReportConfigSchema = Schema.Struct({
|
|
37219
|
-
key: Schema.String,
|
|
37220
|
-
reportRoute: pipe(Schema.propertySignature(Schema.String), Schema.fromKey("report_route")),
|
|
37221
|
-
displayName: pipe(Schema.propertySignature(Schema.String), Schema.fromKey("display_name")),
|
|
37222
|
-
controls: Schema.Array(TransformedReportControlSchema),
|
|
37223
|
-
baseQueryParameters: pipe(Schema.propertySignature(Schema.Record({
|
|
37224
|
-
key: Schema.String,
|
|
37225
|
-
value: Schema.String
|
|
37226
|
-
})), Schema.fromKey("base_query_parameters")),
|
|
37227
|
-
isDefaultReport: Schema.optional(Schema.Boolean).pipe(Schema.fromKey("is_default_report"))
|
|
37228
|
-
});
|
|
37229
|
-
const ReportGroupSchema = Schema.Struct({
|
|
37230
|
-
groupType: pipe(Schema.propertySignature(TransformedReportGroupTypeSchema), Schema.fromKey("group_type")),
|
|
37231
|
-
displayName: pipe(Schema.propertySignature(Schema.String), Schema.fromKey("display_name")),
|
|
37232
|
-
reports: Schema.Array(ReportConfigSchema)
|
|
37233
|
-
});
|
|
37234
|
-
const ReportConfigResponseSchema = Schema.Struct({ data: Schema.Array(ReportGroupSchema) });
|
|
37235
37344
|
const REPORT_CONFIG_TAG_KEY = "#report-config";
|
|
37236
37345
|
var getReportConfig = get(({ businessId }) => `/v1/businesses/${businessId}/reports/config`);
|
|
37237
37346
|
function buildKey$26({ access_token: accessToken, apiUrl, businessId }) {
|
|
@@ -37260,11 +37369,14 @@ const hasControl = (report, control) => {
|
|
|
37260
37369
|
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;
|
|
37261
37370
|
};
|
|
37262
37371
|
var UnifiedReportStoreContext = createContext(createStore(() => ({
|
|
37263
|
-
|
|
37372
|
+
baseReport: null,
|
|
37373
|
+
detailReportConfig: null,
|
|
37264
37374
|
groupBy: DateGroupBy.AllTime,
|
|
37265
37375
|
dateSelectionMode: "full",
|
|
37266
37376
|
actions: {
|
|
37267
|
-
|
|
37377
|
+
setBaseReport: () => {},
|
|
37378
|
+
openDetailReport: () => {},
|
|
37379
|
+
closeDetailReport: () => {},
|
|
37268
37380
|
setGroupBy: () => {}
|
|
37269
37381
|
}
|
|
37270
37382
|
})));
|
|
@@ -37273,12 +37385,43 @@ function useUnifiedReportDateSelectionMode() {
|
|
|
37273
37385
|
}
|
|
37274
37386
|
function useActiveUnifiedReport() {
|
|
37275
37387
|
const store = useContext(UnifiedReportStoreContext);
|
|
37276
|
-
const
|
|
37277
|
-
const
|
|
37388
|
+
const baseReport = useStore(store, (state$14) => state$14.baseReport);
|
|
37389
|
+
const detailReportConfig = useStore(store, (state$14) => state$14.detailReportConfig);
|
|
37390
|
+
return useMemo(() => {
|
|
37391
|
+
var _detailReportConfig$r;
|
|
37392
|
+
return {
|
|
37393
|
+
report: (_detailReportConfig$r = detailReportConfig === null || detailReportConfig === void 0 ? void 0 : detailReportConfig.report) !== null && _detailReportConfig$r !== void 0 ? _detailReportConfig$r : baseReport,
|
|
37394
|
+
isDetailView: detailReportConfig != null
|
|
37395
|
+
};
|
|
37396
|
+
}, [baseReport, detailReportConfig]);
|
|
37397
|
+
}
|
|
37398
|
+
function useBaseUnifiedReport() {
|
|
37399
|
+
const store = useContext(UnifiedReportStoreContext);
|
|
37400
|
+
const baseReport = useStore(store, (state$14) => state$14.baseReport);
|
|
37401
|
+
const setBaseReport = useStore(store, (state$14) => state$14.actions.setBaseReport);
|
|
37278
37402
|
return useMemo(() => ({
|
|
37279
|
-
|
|
37280
|
-
|
|
37281
|
-
}), [
|
|
37403
|
+
baseReport,
|
|
37404
|
+
setBaseReport
|
|
37405
|
+
}), [baseReport, setBaseReport]);
|
|
37406
|
+
}
|
|
37407
|
+
function useDetailUnifiedReport() {
|
|
37408
|
+
const store = useContext(UnifiedReportStoreContext);
|
|
37409
|
+
const detailReportConfig = useStore(store, (state$14) => state$14.detailReportConfig);
|
|
37410
|
+
const openDetailReport = useStore(store, (state$14) => state$14.actions.openDetailReport);
|
|
37411
|
+
const closeDetailReport = useStore(store, (state$14) => state$14.actions.closeDetailReport);
|
|
37412
|
+
return useMemo(() => ({
|
|
37413
|
+
detailReportConfig,
|
|
37414
|
+
isDetailView: detailReportConfig != null,
|
|
37415
|
+
openDetailReport,
|
|
37416
|
+
closeDetailReport
|
|
37417
|
+
}), [
|
|
37418
|
+
detailReportConfig,
|
|
37419
|
+
openDetailReport,
|
|
37420
|
+
closeDetailReport
|
|
37421
|
+
]);
|
|
37422
|
+
}
|
|
37423
|
+
function useOpenDetailReport() {
|
|
37424
|
+
return useStore(useContext(UnifiedReportStoreContext), (state$14) => state$14.actions.openDetailReport);
|
|
37282
37425
|
}
|
|
37283
37426
|
function useUnifiedReportGroupByParam() {
|
|
37284
37427
|
const store = useContext(UnifiedReportStoreContext);
|
|
@@ -37319,27 +37462,33 @@ var findDefaultReport = (groups) => {
|
|
|
37319
37462
|
};
|
|
37320
37463
|
var hasReportWithKey = (groups, key) => groups.some((group) => group.reports.some((report) => report.key === key));
|
|
37321
37464
|
var createUnifiedReportStore = (dateSelectionMode) => createStore((set$1) => ({
|
|
37322
|
-
|
|
37465
|
+
baseReport: null,
|
|
37466
|
+
detailReportConfig: null,
|
|
37323
37467
|
groupBy: DateGroupBy.AllTime,
|
|
37324
37468
|
dateSelectionMode,
|
|
37325
37469
|
actions: {
|
|
37326
|
-
|
|
37470
|
+
setBaseReport: (baseReport) => set$1({
|
|
37471
|
+
baseReport,
|
|
37472
|
+
detailReportConfig: null
|
|
37473
|
+
}),
|
|
37474
|
+
openDetailReport: (detailReportConfig) => set$1({ detailReportConfig }),
|
|
37475
|
+
closeDetailReport: () => set$1({ detailReportConfig: null }),
|
|
37327
37476
|
setGroupBy: (groupBy) => set$1({ groupBy })
|
|
37328
37477
|
}
|
|
37329
37478
|
}));
|
|
37330
37479
|
function useHydrateUnifiedReportStore(store) {
|
|
37331
37480
|
const { data } = useReportConfig();
|
|
37332
|
-
const
|
|
37333
|
-
const
|
|
37481
|
+
const baseReport = useStore(store, (state$14) => state$14.baseReport);
|
|
37482
|
+
const setBaseReport = useStore(store, (state$14) => state$14.actions.setBaseReport);
|
|
37334
37483
|
useEffect(() => {
|
|
37335
37484
|
if (!data) return;
|
|
37336
|
-
if (
|
|
37485
|
+
if (baseReport && hasReportWithKey(data, baseReport.key)) return;
|
|
37337
37486
|
const defaultReport = findDefaultReport(data);
|
|
37338
|
-
if (defaultReport)
|
|
37487
|
+
if (defaultReport) setBaseReport(defaultReport);
|
|
37339
37488
|
}, [
|
|
37340
37489
|
data,
|
|
37341
|
-
|
|
37342
|
-
|
|
37490
|
+
baseReport,
|
|
37491
|
+
setBaseReport
|
|
37343
37492
|
]);
|
|
37344
37493
|
}
|
|
37345
37494
|
function useSyncExternalDateSelectionMode(store, dateSelectionMode) {
|
|
@@ -37371,12 +37520,12 @@ function ExpandableDataTableProvider({ children }) {
|
|
|
37371
37520
|
children
|
|
37372
37521
|
});
|
|
37373
37522
|
}
|
|
37374
|
-
var _excluded$
|
|
37523
|
+
var _excluded$7 = ["children", "className"], _excluded2$3 = ["children"], _excluded3 = ["children"];
|
|
37375
37524
|
var TREE_CLASS_NAME = "Layer__UI__Tree";
|
|
37376
37525
|
var TREE_ITEM_CLASS_NAME = "Layer__UI__TreeItem";
|
|
37377
37526
|
var TreeInner = (_ref, ref) => {
|
|
37378
37527
|
let { children, className } = _ref;
|
|
37379
|
-
return /* @__PURE__ */ jsx(Tree, _objectSpread2(_objectSpread2({}, _objectWithoutProperties(_ref, _excluded$
|
|
37528
|
+
return /* @__PURE__ */ jsx(Tree, _objectSpread2(_objectSpread2({}, _objectWithoutProperties(_ref, _excluded$7)), {}, {
|
|
37380
37529
|
className: classNames(TREE_CLASS_NAME, className),
|
|
37381
37530
|
ref,
|
|
37382
37531
|
children: withRenderProp(children, (node) => node)
|
|
@@ -37386,7 +37535,7 @@ const Tree$1 = forwardRef(TreeInner);
|
|
|
37386
37535
|
Tree$1.displayName = "Tree";
|
|
37387
37536
|
var TreeItemInner = (_ref2, ref) => {
|
|
37388
37537
|
let { children } = _ref2;
|
|
37389
|
-
return /* @__PURE__ */ jsx(TreeItem, _objectSpread2(_objectSpread2({}, _objectWithoutProperties(_ref2, _excluded2$
|
|
37538
|
+
return /* @__PURE__ */ jsx(TreeItem, _objectSpread2(_objectSpread2({}, _objectWithoutProperties(_ref2, _excluded2$3)), {}, {
|
|
37390
37539
|
className: TREE_ITEM_CLASS_NAME,
|
|
37391
37540
|
ref,
|
|
37392
37541
|
children: withRenderProp(children, (node) => node)
|
|
@@ -37446,11 +37595,7 @@ var renderTreeLeaf = ({ leaf, leafConfig }) => /* @__PURE__ */ jsx(TreeItem$1, {
|
|
|
37446
37595
|
children: /* @__PURE__ */ jsx(TreeItemContent$1, { children: /* @__PURE__ */ jsxs(HStack, {
|
|
37447
37596
|
align: "center",
|
|
37448
37597
|
justify: "space-between",
|
|
37449
|
-
children: [leafConfig.renderLabel(leaf), /* @__PURE__ */ jsx(Check_default, {
|
|
37450
|
-
className: "Layer__TreeNavigation__Check",
|
|
37451
|
-
width: 14,
|
|
37452
|
-
height: 14
|
|
37453
|
-
})]
|
|
37598
|
+
children: [leafConfig.renderLabel(leaf), /* @__PURE__ */ jsx(Check_default, { className: "Layer__TreeNavigation__Check" })]
|
|
37454
37599
|
}) })
|
|
37455
37600
|
});
|
|
37456
37601
|
function TreeNavigation({ items, selectedItem, isGroup: isGroup$1, groupConfig: groupConfig$1, leafConfig, ariaLabel }) {
|
|
@@ -37545,31 +37690,16 @@ var ReportsNavigationError = () => {
|
|
|
37545
37690
|
spacing: true
|
|
37546
37691
|
});
|
|
37547
37692
|
};
|
|
37548
|
-
var REPORT_GROUP_ICON = {
|
|
37549
|
-
[ReportGroupType.Accounting]: Landmark,
|
|
37550
|
-
[ReportGroupType.Unknown]: Folder_default
|
|
37551
|
-
};
|
|
37552
37693
|
var isReportGroup = (item) => "reports" in item;
|
|
37553
37694
|
var groupConfig = {
|
|
37554
37695
|
getId: (group) => group.groupType,
|
|
37555
37696
|
getTextValue: (group) => group.displayName,
|
|
37556
37697
|
getChildren: (group) => group.reports,
|
|
37557
37698
|
renderLabel: (group) => {
|
|
37558
|
-
|
|
37559
|
-
|
|
37560
|
-
|
|
37561
|
-
|
|
37562
|
-
align: "center",
|
|
37563
|
-
children: [/* @__PURE__ */ jsx(Icon, {
|
|
37564
|
-
className: "Layer__ReportsNavigation__GroupIcon",
|
|
37565
|
-
strokeWidth: 1.5,
|
|
37566
|
-
size: 16
|
|
37567
|
-
}), /* @__PURE__ */ jsx(Span, {
|
|
37568
|
-
ellipsis: true,
|
|
37569
|
-
variant: "subtle",
|
|
37570
|
-
weight: "bold",
|
|
37571
|
-
children: group.displayName
|
|
37572
|
-
})]
|
|
37699
|
+
return /* @__PURE__ */ jsx(Span, {
|
|
37700
|
+
ellipsis: true,
|
|
37701
|
+
weight: "bold",
|
|
37702
|
+
children: group.displayName
|
|
37573
37703
|
});
|
|
37574
37704
|
}
|
|
37575
37705
|
};
|
|
@@ -37585,8 +37715,8 @@ var buildLeafConfig = (onSelectLeaf) => ({
|
|
|
37585
37715
|
function ReportsNavigation() {
|
|
37586
37716
|
const { t } = useTranslation();
|
|
37587
37717
|
const { data, isLoading, isError } = useReportConfig();
|
|
37588
|
-
const {
|
|
37589
|
-
const leafConfig = useMemo(() => buildLeafConfig(
|
|
37718
|
+
const { baseReport, setBaseReport } = useBaseUnifiedReport();
|
|
37719
|
+
const leafConfig = useMemo(() => buildLeafConfig(setBaseReport), [setBaseReport]);
|
|
37590
37720
|
return /* @__PURE__ */ jsx(ConditionalBlock, {
|
|
37591
37721
|
data,
|
|
37592
37722
|
isLoading,
|
|
@@ -37595,11 +37725,11 @@ function ReportsNavigation() {
|
|
|
37595
37725
|
isError,
|
|
37596
37726
|
Error: /* @__PURE__ */ jsx(ReportsNavigationError, {}),
|
|
37597
37727
|
children: ({ data: data$1 }) => {
|
|
37598
|
-
var
|
|
37728
|
+
var _baseReport$key;
|
|
37599
37729
|
return /* @__PURE__ */ jsx(TreeNavigation, {
|
|
37600
37730
|
ariaLabel: t("reports:label.reports_navigation", "Reports navigation"),
|
|
37601
37731
|
items: data$1,
|
|
37602
|
-
selectedItem: (
|
|
37732
|
+
selectedItem: (_baseReport$key = baseReport === null || baseReport === void 0 ? void 0 : baseReport.key) !== null && _baseReport$key !== void 0 ? _baseReport$key : null,
|
|
37603
37733
|
isGroup: isReportGroup,
|
|
37604
37734
|
groupConfig,
|
|
37605
37735
|
leafConfig
|
|
@@ -37607,7 +37737,7 @@ function ReportsNavigation() {
|
|
|
37607
37737
|
}
|
|
37608
37738
|
});
|
|
37609
37739
|
}
|
|
37610
|
-
var _excluded$
|
|
37740
|
+
var _excluded$6 = ["businessId", "route"], _excluded2$2 = [
|
|
37611
37741
|
"accessToken",
|
|
37612
37742
|
"apiUrl",
|
|
37613
37743
|
"businessId",
|
|
@@ -37624,7 +37754,7 @@ function buildKey$25({ access_token: accessToken, apiUrl, businessId, params })
|
|
|
37624
37754
|
}
|
|
37625
37755
|
var getUnifiedReport = get((_ref) => {
|
|
37626
37756
|
let { businessId, route } = _ref;
|
|
37627
|
-
return `/v1/businesses/${businessId}/reports/unified/${route}?${toDefinedSearchParameters(_objectSpread2({}, _objectWithoutProperties(_ref, _excluded$
|
|
37757
|
+
return `/v1/businesses/${businessId}/reports/unified/${route}?${toDefinedSearchParameters(_objectSpread2({}, _objectWithoutProperties(_ref, _excluded$6)))}`;
|
|
37628
37758
|
});
|
|
37629
37759
|
function useUnifiedReport() {
|
|
37630
37760
|
const withLocale = useLocalizedKey();
|
|
@@ -37637,7 +37767,7 @@ function useUnifiedReport() {
|
|
|
37637
37767
|
businessId,
|
|
37638
37768
|
params
|
|
37639
37769
|
}))), (_ref2) => {
|
|
37640
|
-
let { accessToken, apiUrl: apiUrl$1, businessId: businessId$1, tags } = _ref2, restParams = _objectWithoutProperties(_ref2, _excluded2$
|
|
37770
|
+
let { accessToken, apiUrl: apiUrl$1, businessId: businessId$1, tags } = _ref2, restParams = _objectWithoutProperties(_ref2, _excluded2$2);
|
|
37641
37771
|
return getUnifiedReport(apiUrl$1, accessToken, { params: _objectSpread2({ businessId: businessId$1 }, restParams) })().then(({ data }) => Schema.decodeUnknownPromise(UnifiedReportSchema)(data));
|
|
37642
37772
|
}));
|
|
37643
37773
|
}
|
|
@@ -37650,10 +37780,10 @@ const ExpandButton = ({ isExpanded }) => {
|
|
|
37650
37780
|
});
|
|
37651
37781
|
};
|
|
37652
37782
|
var getRowIndentStyle = ({ depth, canExpand }) => ({ paddingInlineStart: depth * 20 + (canExpand ? 0 : 4) });
|
|
37653
|
-
var EMPTY_ARRAY = [];
|
|
37654
|
-
function ExpandableDataTable({ data, isLoading, isError, columnConfig, componentName, ariaLabel, slots,
|
|
37783
|
+
var EMPTY_ARRAY$1 = [];
|
|
37784
|
+
function ExpandableDataTable({ data, isLoading, isError, columnConfig, componentName, ariaLabel, slots, getSubRows: getSubRows$2, getRowId: getRowId$1 }) {
|
|
37655
37785
|
const { expanded, setExpanded } = useContext(ExpandableDataTableContext);
|
|
37656
|
-
const
|
|
37786
|
+
const wrappedColumnConfig = useMemo(() => {
|
|
37657
37787
|
const [first, ...rest] = columnConfig;
|
|
37658
37788
|
if (!first || !isLeafColumn(first)) return columnConfig;
|
|
37659
37789
|
const originalFirstCell = first.cell;
|
|
@@ -37676,14 +37806,19 @@ function ExpandableDataTable({ data, isLoading, isError, columnConfig, component
|
|
|
37676
37806
|
})
|
|
37677
37807
|
});
|
|
37678
37808
|
} }), ...rest];
|
|
37679
|
-
}, [columnConfig])
|
|
37809
|
+
}, [columnConfig]);
|
|
37810
|
+
const columnDefs = getColumnDefs(wrappedColumnConfig);
|
|
37811
|
+
const columnPinning = useMemo(() => getColumnPinning(wrappedColumnConfig), [wrappedColumnConfig]);
|
|
37680
37812
|
const table$1 = useReactTable({
|
|
37681
|
-
data: data !== null && data !== void 0 ? data : EMPTY_ARRAY,
|
|
37813
|
+
data: data !== null && data !== void 0 ? data : EMPTY_ARRAY$1,
|
|
37682
37814
|
columns: columnDefs,
|
|
37683
37815
|
getSubRows: getSubRows$2,
|
|
37684
37816
|
getCoreRowModel: getCoreRowModel(),
|
|
37685
37817
|
getExpandedRowModel: getExpandedRowModel(),
|
|
37686
|
-
state: {
|
|
37818
|
+
state: {
|
|
37819
|
+
expanded,
|
|
37820
|
+
columnPinning
|
|
37821
|
+
},
|
|
37687
37822
|
onExpandedChange: setExpanded,
|
|
37688
37823
|
autoResetPageIndex: false,
|
|
37689
37824
|
getRowId: getRowId$1
|
|
@@ -37706,7 +37841,6 @@ function ExpandableDataTable({ data, isLoading, isError, columnConfig, component
|
|
|
37706
37841
|
isError,
|
|
37707
37842
|
componentName,
|
|
37708
37843
|
slots,
|
|
37709
|
-
hideHeader,
|
|
37710
37844
|
dependencies: dependencies$1,
|
|
37711
37845
|
headerGroups,
|
|
37712
37846
|
withClickableRow: useMemo(() => ({
|
|
@@ -37715,9 +37849,10 @@ function ExpandableDataTable({ data, isLoading, isError, columnConfig, component
|
|
|
37715
37849
|
}), [onRowClick, isRowClickable])
|
|
37716
37850
|
});
|
|
37717
37851
|
}
|
|
37718
|
-
const UnifiedReportTableCellContent = ({ cell }) => {
|
|
37852
|
+
const UnifiedReportTableCellContent = ({ cell, column, breadcrumb }) => {
|
|
37719
37853
|
var _cell$format;
|
|
37720
37854
|
const { formatDate: formatDate$1 } = useIntlFormatter();
|
|
37855
|
+
const openDetailReport = useOpenDetailReport();
|
|
37721
37856
|
if (!cell) return;
|
|
37722
37857
|
const cellValue = cell.value;
|
|
37723
37858
|
const isBold = (_cell$format = cell.format) === null || _cell$format === void 0 ? void 0 : _cell$format.bold;
|
|
@@ -37743,16 +37878,57 @@ const UnifiedReportTableCellContent = ({ cell }) => {
|
|
|
37743
37878
|
variant,
|
|
37744
37879
|
children: String(cellValue.value)
|
|
37745
37880
|
});
|
|
37881
|
+
if (cell.reportConfig) {
|
|
37882
|
+
const reportConfig = cell.reportConfig;
|
|
37883
|
+
return /* @__PURE__ */ jsx(Button$1, {
|
|
37884
|
+
variant: "text",
|
|
37885
|
+
onClick: () => openDetailReport({
|
|
37886
|
+
report: reportConfig,
|
|
37887
|
+
column,
|
|
37888
|
+
breadcrumb
|
|
37889
|
+
}),
|
|
37890
|
+
children: content
|
|
37891
|
+
});
|
|
37892
|
+
}
|
|
37746
37893
|
return content;
|
|
37747
37894
|
};
|
|
37895
|
+
var getCell = (row, col) => row.original.cells[col.columnKey];
|
|
37748
37896
|
var isGroupColumn = (col) => col.columns !== void 0 && col.columns.length > 0;
|
|
37897
|
+
var toPinningSide = (pinning) => {
|
|
37898
|
+
switch (pinning) {
|
|
37899
|
+
case Pinning.Left: return "left";
|
|
37900
|
+
case Pinning.Right: return "right";
|
|
37901
|
+
default: return;
|
|
37902
|
+
}
|
|
37903
|
+
};
|
|
37749
37904
|
var makeBaseColumn = (col) => ({
|
|
37750
37905
|
id: col.columnKey,
|
|
37751
37906
|
header: col.displayName,
|
|
37752
37907
|
isRowHeader: col.isRowHeader,
|
|
37753
37908
|
alignment: col.alignment
|
|
37754
37909
|
});
|
|
37755
|
-
var makeLeafColumn = (col) => _objectSpread2(_objectSpread2({}, makeBaseColumn(col)), {}, {
|
|
37910
|
+
var makeLeafColumn = (col) => _objectSpread2(_objectSpread2({}, makeBaseColumn(col)), {}, {
|
|
37911
|
+
pinning: toPinningSide(col.pinning),
|
|
37912
|
+
cell: (row) => {
|
|
37913
|
+
var _cell$reportConfig;
|
|
37914
|
+
const cell = getCell(row, col);
|
|
37915
|
+
const cellConfig = (_cell$reportConfig = cell === null || cell === void 0 ? void 0 : cell.reportConfig) !== null && _cell$reportConfig !== void 0 ? _cell$reportConfig : null;
|
|
37916
|
+
const breadcrumb = cellConfig ? [cellConfig] : [];
|
|
37917
|
+
let parentRow = row.getParentRow();
|
|
37918
|
+
while (parentRow) {
|
|
37919
|
+
var _getCell;
|
|
37920
|
+
const parentConfig = (_getCell = getCell(parentRow, col)) === null || _getCell === void 0 ? void 0 : _getCell.reportConfig;
|
|
37921
|
+
if (!parentConfig) break;
|
|
37922
|
+
breadcrumb.push(parentConfig);
|
|
37923
|
+
parentRow = parentRow.getParentRow();
|
|
37924
|
+
}
|
|
37925
|
+
return /* @__PURE__ */ jsx(UnifiedReportTableCellContent, {
|
|
37926
|
+
cell,
|
|
37927
|
+
column: col,
|
|
37928
|
+
breadcrumb: breadcrumb.reverse()
|
|
37929
|
+
});
|
|
37930
|
+
}
|
|
37931
|
+
});
|
|
37756
37932
|
var makeGroupColumn = (col) => _objectSpread2(_objectSpread2({}, makeBaseColumn(col)), {}, { columns: buildNestedColumnConfig(col.columns) });
|
|
37757
37933
|
const buildNestedColumnConfig = (columns) => {
|
|
37758
37934
|
return columns.map((col) => {
|
|
@@ -37812,7 +37988,7 @@ const S3PresignedUrlSchema = Schema.Struct({
|
|
|
37812
37988
|
createdAt: Schema.Date,
|
|
37813
37989
|
documentId: Schema.NullishOr(Schema.UUID)
|
|
37814
37990
|
});
|
|
37815
|
-
var _excluded$
|
|
37991
|
+
var _excluded$5 = ["businessId", "route"], _excluded2$1 = [
|
|
37816
37992
|
"accessToken",
|
|
37817
37993
|
"apiUrl",
|
|
37818
37994
|
"businessId",
|
|
@@ -37820,7 +37996,7 @@ var _excluded$3 = ["businessId", "route"], _excluded2 = [
|
|
|
37820
37996
|
];
|
|
37821
37997
|
var getUnifiedReportExcel = get((_ref) => {
|
|
37822
37998
|
let { businessId, route } = _ref;
|
|
37823
|
-
return `/v1/businesses/${businessId}/reports/unified/${route}/exports/excel?${toDefinedSearchParameters(_objectSpread2({}, _objectWithoutProperties(_ref, _excluded$
|
|
37999
|
+
return `/v1/businesses/${businessId}/reports/unified/${route}/exports/excel?${toDefinedSearchParameters(_objectSpread2({}, _objectWithoutProperties(_ref, _excluded$5)))}`;
|
|
37824
38000
|
});
|
|
37825
38001
|
var getTag = (report) => `#unified-${report}-report-excel`;
|
|
37826
38002
|
var UnifiedReportExcelReturnSchema = Schema.Struct({ data: S3PresignedUrlSchema });
|
|
@@ -37843,7 +38019,7 @@ function useUnifiedReportExcel({ onSuccess } = {}) {
|
|
|
37843
38019
|
businessId,
|
|
37844
38020
|
params
|
|
37845
38021
|
}))), (_ref2) => {
|
|
37846
|
-
let { accessToken, apiUrl: apiUrl$1, businessId: businessId$1, tags } = _ref2, restParams = _objectWithoutProperties(_ref2, _excluded2);
|
|
38022
|
+
let { accessToken, apiUrl: apiUrl$1, businessId: businessId$1, tags } = _ref2, restParams = _objectWithoutProperties(_ref2, _excluded2$1);
|
|
37847
38023
|
return getUnifiedReportExcel(apiUrl$1, accessToken, { params: _objectSpread2({ businessId: businessId$1 }, restParams) })().then(Schema.decodeUnknownPromise(UnifiedReportExcelReturnSchema)).then(function() {
|
|
37848
38024
|
var _ref3 = _asyncToGenerator(function* ({ data }) {
|
|
37849
38025
|
if (onSuccess) yield onSuccess(data);
|
|
@@ -37872,9 +38048,9 @@ function UnifiedReportDownloadButton() {
|
|
|
37872
38048
|
children: [isError ? t("common:action.retry_label", "Retry") : t("common:action.download_label", "Download"), isError ? /* @__PURE__ */ jsx(RefreshCcw_default, { size: 12 }) : /* @__PURE__ */ jsx(DownloadCloud_default, { size: 16 })]
|
|
37873
38049
|
}), /* @__PURE__ */ jsx(InvisibleDownload_default, { ref: invisibleDownloadRef })] });
|
|
37874
38050
|
}
|
|
37875
|
-
const
|
|
38051
|
+
const UnifiedReportBaseHeader = () => {
|
|
37876
38052
|
const { t } = useTranslation();
|
|
37877
|
-
const {
|
|
38053
|
+
const { baseReport } = useBaseUnifiedReport();
|
|
37878
38054
|
const { groupBy, setGroupBy } = useUnifiedReportGroupByParam();
|
|
37879
38055
|
const dateSelectionMode = useUnifiedReportDateSelectionMode();
|
|
37880
38056
|
const { expanded, setExpanded } = useContext(ExpandableDataTableContext);
|
|
@@ -37885,46 +38061,154 @@ const UnifiedReportTableHeader = () => {
|
|
|
37885
38061
|
}, [setExpanded, shouldCollapse]);
|
|
37886
38062
|
return /* @__PURE__ */ jsxs(VStack, {
|
|
37887
38063
|
gap: "lg",
|
|
37888
|
-
children: [/* @__PURE__ */
|
|
37889
|
-
|
|
38064
|
+
children: [/* @__PURE__ */ jsxs(HStack, {
|
|
38065
|
+
pi: "lg",
|
|
37890
38066
|
pbs: "lg",
|
|
37891
|
-
|
|
38067
|
+
align: "center",
|
|
38068
|
+
justify: "space-between",
|
|
38069
|
+
children: [baseReport ? /* @__PURE__ */ jsx(Span, {
|
|
37892
38070
|
size: "lg",
|
|
37893
38071
|
weight: "bold",
|
|
37894
|
-
children:
|
|
38072
|
+
children: baseReport.displayName
|
|
37895
38073
|
}) : /* @__PURE__ */ jsx(SkeletonLoader, {
|
|
37896
38074
|
width: "192px",
|
|
37897
38075
|
height: "24px"
|
|
37898
|
-
})
|
|
37899
|
-
|
|
38076
|
+
}), /* @__PURE__ */ jsxs(HStack, {
|
|
38077
|
+
gap: "xs",
|
|
38078
|
+
children: [/* @__PURE__ */ jsx(Button$1, {
|
|
38079
|
+
variant: "outlined",
|
|
38080
|
+
onClick: onClickExpandOrCollapse,
|
|
38081
|
+
children: shouldCollapse ? t("reports:action.collapse_all", "Collapse All") : t("reports:action.expand_all", "Expand All")
|
|
38082
|
+
}), /* @__PURE__ */ jsx(UnifiedReportDownloadButton, {})]
|
|
38083
|
+
})]
|
|
38084
|
+
}), /* @__PURE__ */ jsx(HStack, {
|
|
37900
38085
|
fluid: true,
|
|
37901
|
-
justify: "space-between",
|
|
37902
38086
|
align: "end",
|
|
37903
38087
|
pbe: "lg",
|
|
37904
38088
|
className: "Layer__UnifiedReport__Header",
|
|
37905
|
-
children:
|
|
38089
|
+
children: /* @__PURE__ */ jsxs(HStack, {
|
|
37906
38090
|
pi: "lg",
|
|
37907
38091
|
gap: "xs",
|
|
37908
38092
|
children: [
|
|
37909
|
-
hasControl(
|
|
37910
|
-
hasControl(
|
|
37911
|
-
dateSelectionMode === "full" && hasControl(
|
|
38093
|
+
hasControl(baseReport, ReportControl.DateRange) && /* @__PURE__ */ jsx(CombinedDateRangeSelection, { mode: dateSelectionMode }),
|
|
38094
|
+
hasControl(baseReport, ReportControl.Date) && /* @__PURE__ */ jsx(CombinedDateSelection, { mode: dateSelectionMode }),
|
|
38095
|
+
dateSelectionMode === "full" && hasControl(baseReport, ReportControl.GroupBy) && /* @__PURE__ */ jsx(DateGroupByComboBox, {
|
|
37912
38096
|
value: groupBy,
|
|
37913
38097
|
onValueChange: setGroupBy
|
|
37914
38098
|
})
|
|
37915
38099
|
]
|
|
37916
|
-
})
|
|
37917
|
-
|
|
37918
|
-
|
|
37919
|
-
|
|
37920
|
-
|
|
37921
|
-
|
|
37922
|
-
|
|
37923
|
-
|
|
38100
|
+
})
|
|
38101
|
+
})]
|
|
38102
|
+
});
|
|
38103
|
+
};
|
|
38104
|
+
var _excluded$4 = [
|
|
38105
|
+
"children",
|
|
38106
|
+
"size",
|
|
38107
|
+
"ellipsis",
|
|
38108
|
+
"external",
|
|
38109
|
+
"disabled",
|
|
38110
|
+
"href",
|
|
38111
|
+
"target",
|
|
38112
|
+
"rel"
|
|
38113
|
+
];
|
|
38114
|
+
var LINK_CLASS_NAME = "Layer__UI__Link";
|
|
38115
|
+
const Link$2 = forwardRef(function Link$5(_ref, ref) {
|
|
38116
|
+
let { children, size = "md", ellipsis, external, disabled, href, target, rel } = _ref, restProps = _objectWithoutProperties(_ref, _excluded$4);
|
|
38117
|
+
const dataProperties = toDataProperties({
|
|
38118
|
+
size,
|
|
38119
|
+
ellipsis,
|
|
38120
|
+
external,
|
|
38121
|
+
disabled
|
|
38122
|
+
});
|
|
38123
|
+
const effectiveTarget = external ? "_blank" : target;
|
|
38124
|
+
const effectiveRel = external ? "noopener noreferrer" : rel;
|
|
38125
|
+
return /* @__PURE__ */ jsx(Link, _objectSpread2(_objectSpread2(_objectSpread2({}, restProps), dataProperties), {}, {
|
|
38126
|
+
href,
|
|
38127
|
+
target: effectiveTarget,
|
|
38128
|
+
rel: effectiveRel,
|
|
38129
|
+
className: LINK_CLASS_NAME,
|
|
38130
|
+
ref,
|
|
38131
|
+
children
|
|
38132
|
+
}));
|
|
38133
|
+
});
|
|
38134
|
+
var _excluded$3 = ["children"], _excluded2 = ["id", "children"];
|
|
38135
|
+
var BREADCRUMBS_CLASS_NAME = "Layer__Breadcrumbs";
|
|
38136
|
+
var BREADCRUMB_CLASS_NAME = "Layer__Breadcrumb";
|
|
38137
|
+
function BreadcrumbsInner(_ref, ref) {
|
|
38138
|
+
let { children } = _ref;
|
|
38139
|
+
return /* @__PURE__ */ jsx(Breadcrumbs, _objectSpread2(_objectSpread2({}, _objectWithoutProperties(_ref, _excluded$3)), {}, {
|
|
38140
|
+
className: BREADCRUMBS_CLASS_NAME,
|
|
38141
|
+
ref,
|
|
38142
|
+
children
|
|
38143
|
+
}));
|
|
38144
|
+
}
|
|
38145
|
+
const Breadcrumbs$1 = forwardRef(BreadcrumbsInner);
|
|
38146
|
+
const Breadcrumb$1 = forwardRef(function Breadcrumb$2(_ref2, ref) {
|
|
38147
|
+
let { id, children } = _ref2, linkProps = _objectWithoutProperties(_ref2, _excluded2);
|
|
38148
|
+
return /* @__PURE__ */ jsx(Breadcrumb, {
|
|
38149
|
+
id,
|
|
38150
|
+
className: BREADCRUMB_CLASS_NAME,
|
|
38151
|
+
ref,
|
|
38152
|
+
children: ({ isCurrent }) => /* @__PURE__ */ jsxs(Fragment$1, { children: [/* @__PURE__ */ jsx(Link$2, _objectSpread2(_objectSpread2({}, linkProps), {}, { children })), !isCurrent && /* @__PURE__ */ jsx(ChevronRight_default, {})] })
|
|
38153
|
+
});
|
|
38154
|
+
});
|
|
38155
|
+
var EMPTY_ARRAY = [];
|
|
38156
|
+
const UnifiedReportDetailBreadcrumb = () => {
|
|
38157
|
+
const { detailReportConfig, openDetailReport } = useDetailUnifiedReport();
|
|
38158
|
+
const breadcrumb = detailReportConfig === null || detailReportConfig === void 0 ? void 0 : detailReportConfig.breadcrumb;
|
|
38159
|
+
const breadcrumbItems = useMemo(() => breadcrumb !== null && breadcrumb !== void 0 ? breadcrumb : EMPTY_ARRAY, [breadcrumb]);
|
|
38160
|
+
return /* @__PURE__ */ jsx(Breadcrumbs$1, {
|
|
38161
|
+
items: breadcrumbItems,
|
|
38162
|
+
onAction: useCallback((key) => {
|
|
38163
|
+
const index = breadcrumbItems.findIndex((item) => item.key === key);
|
|
38164
|
+
if (index === -1 || !detailReportConfig) return;
|
|
38165
|
+
openDetailReport({
|
|
38166
|
+
report: breadcrumbItems[index],
|
|
38167
|
+
breadcrumb: breadcrumbItems.slice(0, index + 1),
|
|
38168
|
+
column: detailReportConfig === null || detailReportConfig === void 0 ? void 0 : detailReportConfig.column
|
|
38169
|
+
});
|
|
38170
|
+
}, [
|
|
38171
|
+
breadcrumbItems,
|
|
38172
|
+
detailReportConfig,
|
|
38173
|
+
openDetailReport
|
|
38174
|
+
]),
|
|
38175
|
+
children: (item) => /* @__PURE__ */ jsx(Breadcrumb$1, {
|
|
38176
|
+
id: item.key,
|
|
38177
|
+
children: item.displayName
|
|
38178
|
+
})
|
|
38179
|
+
});
|
|
38180
|
+
};
|
|
38181
|
+
const UnifiedReportDetailHeader = () => {
|
|
38182
|
+
const { detailReportConfig, closeDetailReport } = useDetailUnifiedReport();
|
|
38183
|
+
const { t } = useTranslation();
|
|
38184
|
+
if (!detailReportConfig) return null;
|
|
38185
|
+
const { column } = detailReportConfig;
|
|
38186
|
+
return /* @__PURE__ */ jsxs(HStack, {
|
|
38187
|
+
gap: "sm",
|
|
38188
|
+
pb: "lg",
|
|
38189
|
+
pis: "lg",
|
|
38190
|
+
align: "center",
|
|
38191
|
+
className: "Layer__UnifiedReport__DetailHeader",
|
|
38192
|
+
children: [/* @__PURE__ */ jsx(Button$1, {
|
|
38193
|
+
icon: true,
|
|
38194
|
+
variant: "outlined",
|
|
38195
|
+
onClick: closeDetailReport,
|
|
38196
|
+
"aria-label": t("common:action.back", "Back"),
|
|
38197
|
+
children: /* @__PURE__ */ jsx(ChevronLeft_default, { size: 16 })
|
|
38198
|
+
}), /* @__PURE__ */ jsxs(VStack, {
|
|
38199
|
+
gap: "3xs",
|
|
38200
|
+
children: [/* @__PURE__ */ jsx(UnifiedReportDetailBreadcrumb, {}), /* @__PURE__ */ jsx(Span, {
|
|
38201
|
+
size: "sm",
|
|
38202
|
+
variant: "subtle",
|
|
38203
|
+
children: column.displayName
|
|
37924
38204
|
})]
|
|
37925
38205
|
})]
|
|
37926
38206
|
});
|
|
37927
38207
|
};
|
|
38208
|
+
const UnifiedReportTableHeader = () => {
|
|
38209
|
+
const { isDetailView } = useDetailUnifiedReport();
|
|
38210
|
+
return isDetailView ? /* @__PURE__ */ jsx(UnifiedReportDetailHeader, {}) : /* @__PURE__ */ jsx(UnifiedReportBaseHeader, {});
|
|
38211
|
+
};
|
|
37928
38212
|
const UnifiedReport = ({ dateSelectionMode }) => {
|
|
37929
38213
|
const { t } = useTranslation();
|
|
37930
38214
|
return /* @__PURE__ */ jsx(View, {
|
|
@@ -43292,6 +43576,7 @@ Schema.Struct({
|
|
|
43292
43576
|
memo: Schema.NullishOr(Schema.String),
|
|
43293
43577
|
metadata: Schema.NullishOr(Schema.Unknown)
|
|
43294
43578
|
});
|
|
43579
|
+
Schema.Struct({ date: CalendarDateSchema });
|
|
43295
43580
|
const ACTIVE_TIME_TRACKER_TAG_KEY = "#active-time-tracker";
|
|
43296
43581
|
var ActiveTimeTrackerResponseSchema = Schema.Struct({ data: Schema.Struct({ timeEntry: pipe(Schema.propertySignature(Schema.NullishOr(TimeEntrySchema)), Schema.fromKey("time_entry")) }) });
|
|
43297
43582
|
var getActiveTimeTracker = get(({ businessId }) => `/v1/businesses/${businessId}/time-tracking/tracker/active`);
|
|
@@ -43783,10 +44068,13 @@ function ActiveServicesContent({ services: services$2, showCreateForm, showAddBu
|
|
|
43783
44068
|
return /* @__PURE__ */ jsxs(Fragment$1, { children: [
|
|
43784
44069
|
/* @__PURE__ */ jsx(ConditionalList, {
|
|
43785
44070
|
list: services$2,
|
|
43786
|
-
Empty: useMemo(() => showCreateForm ? null : /* @__PURE__ */ jsx(
|
|
43787
|
-
|
|
43788
|
-
|
|
43789
|
-
|
|
44071
|
+
Empty: useMemo(() => showCreateForm ? null : /* @__PURE__ */ jsx(VStack, {
|
|
44072
|
+
className: "Layer__TimeTrackingServicesDrawer__EmptyState",
|
|
44073
|
+
children: /* @__PURE__ */ jsx(DataState, {
|
|
44074
|
+
status: DataStateStatus.allDone,
|
|
44075
|
+
title: t("timeTracking:services.no_active", "No services yet"),
|
|
44076
|
+
spacing: true
|
|
44077
|
+
})
|
|
43790
44078
|
}), [showCreateForm, t]),
|
|
43791
44079
|
Container: ({ children }) => /* @__PURE__ */ jsx(VStack, {
|
|
43792
44080
|
className: "Layer__TimeTrackingServicesDrawer__accordion",
|
|
@@ -43845,10 +44133,13 @@ function ArchivedServicesContent({ isEnabled, formatHourly, onRestore }) {
|
|
|
43845
44133
|
Error: /* @__PURE__ */ jsx(LoadServicesErrorState, {}),
|
|
43846
44134
|
children: () => /* @__PURE__ */ jsx(ConditionalList, {
|
|
43847
44135
|
list: archivedServices,
|
|
43848
|
-
Empty: /* @__PURE__ */ jsx(
|
|
43849
|
-
|
|
43850
|
-
|
|
43851
|
-
|
|
44136
|
+
Empty: /* @__PURE__ */ jsx(VStack, {
|
|
44137
|
+
className: "Layer__TimeTrackingServicesDrawer__EmptyState",
|
|
44138
|
+
children: /* @__PURE__ */ jsx(DataState, {
|
|
44139
|
+
status: DataStateStatus.allDone,
|
|
44140
|
+
title: t("timeTracking:services.no_archived", "No archived services"),
|
|
44141
|
+
spacing: true
|
|
44142
|
+
})
|
|
43852
44143
|
}),
|
|
43853
44144
|
Container: ({ children }) => /* @__PURE__ */ jsx(VStack, {
|
|
43854
44145
|
className: "Layer__TimeTrackingServicesDrawer__archivedList",
|
|
@@ -44420,7 +44711,10 @@ const useStopTimeTracker = () => {
|
|
|
44420
44711
|
const { forceReloadTimeEntries } = useTimeEntriesGlobalCacheActions();
|
|
44421
44712
|
const { invalidateTimeTrackingSummary } = useTimeTrackingSummaryGlobalCacheActions();
|
|
44422
44713
|
const { invalidateActiveTimeTracker } = useActiveTimeTrackerGlobalCacheActions();
|
|
44423
|
-
const mutationResponse = new SWRMutationResult(useSWRMutation(() => withLocale(buildKey$2(_objectSpread2(_objectSpread2({}, data), {}, { businessId }))), ({ accessToken, apiUrl, businessId: businessId$1 }) => stopTimeTracker(apiUrl, accessToken, {
|
|
44714
|
+
const mutationResponse = new SWRMutationResult(useSWRMutation(() => withLocale(buildKey$2(_objectSpread2(_objectSpread2({}, data), {}, { businessId }))), ({ accessToken, apiUrl, businessId: businessId$1 }, { arg: body }) => stopTimeTracker(apiUrl, accessToken, {
|
|
44715
|
+
params: { businessId: businessId$1 },
|
|
44716
|
+
body
|
|
44717
|
+
}).then(Schema.decodeUnknownPromise(StopTimeTrackerResponseSchema)), {
|
|
44424
44718
|
revalidate: false,
|
|
44425
44719
|
throwOnError: true
|
|
44426
44720
|
}));
|
|
@@ -44442,6 +44736,12 @@ const useStopTimeTracker = () => {
|
|
|
44442
44736
|
return Reflect.get(target, prop);
|
|
44443
44737
|
} });
|
|
44444
44738
|
};
|
|
44739
|
+
var isNoActiveTimerResponse = (error$38) => {
|
|
44740
|
+
var _error$messages;
|
|
44741
|
+
if (!(error$38 instanceof APIError)) return false;
|
|
44742
|
+
if (error$38.code === 404) return true;
|
|
44743
|
+
return ((_error$messages = error$38.messages) === null || _error$messages === void 0 ? void 0 : _error$messages.some((m) => m.error_enum === ApiEnumErrorType.SpecifiedIdNotFound)) === true;
|
|
44744
|
+
};
|
|
44445
44745
|
const useActiveTimerBannerForm = ({ activeEntry }) => {
|
|
44446
44746
|
const { t } = useTranslation();
|
|
44447
44747
|
const [actionError, setActionError] = useState(null);
|
|
@@ -44467,9 +44767,10 @@ const useActiveTimerBannerForm = ({ activeEntry }) => {
|
|
|
44467
44767
|
return;
|
|
44468
44768
|
}
|
|
44469
44769
|
try {
|
|
44470
|
-
yield stopTimeTracker$1();
|
|
44471
|
-
} catch (
|
|
44472
|
-
setActionError(t("timeTracking:error.
|
|
44770
|
+
yield stopTimeTracker$1({ date: today(getLocalTimeZone()).toString() });
|
|
44771
|
+
} catch (error$38) {
|
|
44772
|
+
if (isNoActiveTimerResponse(error$38)) setActionError(t("timeTracking:error.complete_timer_stale", "This timer was already completed or cancelled. Reload the page."));
|
|
44773
|
+
else setActionError(t("timeTracking:error.complete_timer", "Failed to complete timer. Please try again."));
|
|
44473
44774
|
}
|
|
44474
44775
|
});
|
|
44475
44776
|
return function(_x) {
|
|
@@ -44515,7 +44816,7 @@ const useActiveTimerBannerForm = ({ activeEntry }) => {
|
|
|
44515
44816
|
try {
|
|
44516
44817
|
yield deleteTimeEntry$1();
|
|
44517
44818
|
invalidateActiveTimeTracker();
|
|
44518
|
-
} catch (
|
|
44819
|
+
} catch (_unused2) {
|
|
44519
44820
|
setActionError(t("timeTracking:error.cancel_timer", "Failed to cancel timer. Please try again."));
|
|
44520
44821
|
}
|
|
44521
44822
|
}), [
|
|
@@ -44551,16 +44852,21 @@ const useActiveTimerBannerForm = ({ activeEntry }) => {
|
|
|
44551
44852
|
isUpdating
|
|
44552
44853
|
]);
|
|
44553
44854
|
};
|
|
44855
|
+
function getServiceLabel(service, t) {
|
|
44856
|
+
return service.archivedAt ? t("timeTracking:services.archived_service", "{{name}} (Archived)", { name: service.name }) : service.name;
|
|
44857
|
+
}
|
|
44554
44858
|
var ServiceAsOption = class {
|
|
44555
|
-
constructor(service) {
|
|
44859
|
+
constructor(service, t) {
|
|
44556
44860
|
_defineProperty(this, "internalService", void 0);
|
|
44861
|
+
_defineProperty(this, "t", void 0);
|
|
44557
44862
|
this.internalService = service;
|
|
44863
|
+
this.t = t;
|
|
44558
44864
|
}
|
|
44559
44865
|
get original() {
|
|
44560
44866
|
return this.internalService;
|
|
44561
44867
|
}
|
|
44562
44868
|
get label() {
|
|
44563
|
-
return this.internalService.
|
|
44869
|
+
return getServiceLabel(this.internalService, this.t);
|
|
44564
44870
|
}
|
|
44565
44871
|
get id() {
|
|
44566
44872
|
return this.internalService.id;
|
|
@@ -44569,16 +44875,23 @@ var ServiceAsOption = class {
|
|
|
44569
44875
|
return this.internalService.id;
|
|
44570
44876
|
}
|
|
44571
44877
|
};
|
|
44572
|
-
var formatCreateLabel = (inputValue, t) =>
|
|
44573
|
-
|
|
44878
|
+
var formatCreateLabel = (inputValue, t) => /* @__PURE__ */ jsxs(Span, {
|
|
44879
|
+
variant: "inherit",
|
|
44880
|
+
className: "Layer__TimeEntryServiceSelector__CreateLabel",
|
|
44881
|
+
children: [/* @__PURE__ */ jsx(Plus, {
|
|
44882
|
+
size: 14,
|
|
44883
|
+
"aria-hidden": "true"
|
|
44884
|
+
}), inputValue ? t("timeTracking:services.create_service_input_value", "Create service \"{{inputValue}}\"", { inputValue }) : t("timeTracking:services.add_service", "Add service")]
|
|
44885
|
+
});
|
|
44886
|
+
function TimeEntryServiceSelector({ selectedServiceId, onSelectedServiceIdChange, placeholder, isReadOnly, isClearable, inline, className, showLabel = true, allowArchived, isCreatable, onCreateService }) {
|
|
44574
44887
|
const { t } = useTranslation();
|
|
44575
|
-
const { data: servicesResponse, isLoading, isError } = useListCatalogServices();
|
|
44888
|
+
const { data: servicesResponse, isLoading, isError } = useListCatalogServices({ allowArchived });
|
|
44576
44889
|
const isLoadingWithoutFallback = isLoading && !servicesResponse;
|
|
44577
44890
|
const shouldDisableComboBox = isLoadingWithoutFallback || isError;
|
|
44578
44891
|
const serviceOptions = useMemo(() => {
|
|
44579
44892
|
var _servicesResponse$dat;
|
|
44580
|
-
return (_servicesResponse$dat = servicesResponse === null || servicesResponse === void 0 ? void 0 : servicesResponse.data.map((service) => new ServiceAsOption(service))) !== null && _servicesResponse$dat !== void 0 ? _servicesResponse$dat : [];
|
|
44581
|
-
}, [servicesResponse]);
|
|
44893
|
+
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 : [];
|
|
44894
|
+
}, [servicesResponse, t]);
|
|
44582
44895
|
const combinedClassName = classNames("Layer__TimeEntryServiceSelector", inline && "Layer__TimeEntryServiceSelector--inline", className);
|
|
44583
44896
|
const handleSelectionChange = useCallback((selectedOption) => {
|
|
44584
44897
|
var _selectedOption$id;
|
|
@@ -44645,13 +44958,26 @@ const ActiveTimeTrackerBanner = ({ activeEntry, timerDisplayValue }) => {
|
|
|
44645
44958
|
const { form, actions, state: state$14 } = useActiveTimerBannerForm({ activeEntry });
|
|
44646
44959
|
return /* @__PURE__ */ jsxs(Container, {
|
|
44647
44960
|
name: "ActiveTimeTracker",
|
|
44648
|
-
|
|
44961
|
+
className: "Layer__ActiveTimeTracker__Container",
|
|
44962
|
+
children: [state$14.actionError && /* @__PURE__ */ jsx(HStack, {
|
|
44963
|
+
className: "Layer__ActiveTimeTracker__ErrorStrip",
|
|
44964
|
+
pb: "xs",
|
|
44649
44965
|
pi: "md",
|
|
44650
|
-
|
|
44651
|
-
children: /* @__PURE__ */
|
|
44652
|
-
|
|
44653
|
-
|
|
44654
|
-
|
|
44966
|
+
role: "alert",
|
|
44967
|
+
children: /* @__PURE__ */ jsxs(HStack, {
|
|
44968
|
+
className: "Layer__ActiveTimeTracker__ErrorStripRow",
|
|
44969
|
+
gap: "sm",
|
|
44970
|
+
align: "center",
|
|
44971
|
+
children: [/* @__PURE__ */ jsx(AlertTriangle, {
|
|
44972
|
+
"aria-hidden": true,
|
|
44973
|
+
className: "Layer__ActiveTimeTracker__ErrorStripIcon",
|
|
44974
|
+
size: 16,
|
|
44975
|
+
strokeWidth: 1.25
|
|
44976
|
+
}), /* @__PURE__ */ jsx(Span, {
|
|
44977
|
+
size: "sm",
|
|
44978
|
+
className: "Layer__ActiveTimeTracker__ErrorStripText",
|
|
44979
|
+
children: state$14.actionError
|
|
44980
|
+
})]
|
|
44655
44981
|
})
|
|
44656
44982
|
}), /* @__PURE__ */ jsxs(HStack, {
|
|
44657
44983
|
className: "Layer__ActiveTimeTracker__Main",
|
|
@@ -44711,8 +45037,7 @@ const ActiveTimeTrackerBanner = ({ activeEntry, timerDisplayValue }) => {
|
|
|
44711
45037
|
children: (selectedServiceId) => /* @__PURE__ */ jsxs(Button$1, {
|
|
44712
45038
|
variant: "outlined-light",
|
|
44713
45039
|
onPress: actions.completeTimer,
|
|
44714
|
-
|
|
44715
|
-
isDisabled: state$14.isCancelling || !selectedServiceId,
|
|
45040
|
+
isDisabled: state$14.isCancelling || state$14.isStopping || state$14.isUpdating || !selectedServiceId,
|
|
44716
45041
|
children: [t("timeTracking:action.complete_timer", "Complete"), /* @__PURE__ */ jsx(Check, { size: 16 })]
|
|
44717
45042
|
})
|
|
44718
45043
|
})]
|
|
@@ -44754,6 +45079,11 @@ const useStartTimeTracker = () => {
|
|
|
44754
45079
|
return Reflect.get(target, prop);
|
|
44755
45080
|
} });
|
|
44756
45081
|
};
|
|
45082
|
+
var isActiveTimerAlreadyExistsError = (error$38) => {
|
|
45083
|
+
var _error$messages;
|
|
45084
|
+
if (!(error$38 instanceof APIError)) return false;
|
|
45085
|
+
return ((_error$messages = error$38.messages) === null || _error$messages === void 0 ? void 0 : _error$messages.some((m) => m.error_enum === ApiEnumErrorType.SpecifiedBadRequest)) === true;
|
|
45086
|
+
};
|
|
44757
45087
|
const useStartTimerForm = ({ onStarted }) => {
|
|
44758
45088
|
const { t } = useTranslation();
|
|
44759
45089
|
const [actionError, setActionError] = useState(null);
|
|
@@ -44772,8 +45102,9 @@ const useStartTimerForm = ({ onStarted }) => {
|
|
|
44772
45102
|
yield startTimeTracker$1(payload);
|
|
44773
45103
|
formApi.reset(EMPTY_DRAFT);
|
|
44774
45104
|
onStarted();
|
|
44775
|
-
} catch (
|
|
44776
|
-
setActionError(t("timeTracking:error.
|
|
45105
|
+
} catch (error$38) {
|
|
45106
|
+
if (isActiveTimerAlreadyExistsError(error$38)) setActionError(t("timeTracking:error.start_timer_already_active", "A timer is already running. Please reload the page."));
|
|
45107
|
+
else setActionError(t("timeTracking:error.start_timer", "Failed to start timer. Please try again."));
|
|
44777
45108
|
}
|
|
44778
45109
|
});
|
|
44779
45110
|
return function(_x) {
|
|
@@ -45097,6 +45428,7 @@ const TimeEntriesTableHeader = () => {
|
|
|
45097
45428
|
const HeaderActions = useCallback(() => /* @__PURE__ */ jsxs(HStack, {
|
|
45098
45429
|
gap: "xs",
|
|
45099
45430
|
children: [/* @__PURE__ */ jsxs(Button$1, {
|
|
45431
|
+
variant: "outlined-light",
|
|
45100
45432
|
onPress: onAddEntry,
|
|
45101
45433
|
children: [t("timeTracking:action.add_entry", "Add Entry"), /* @__PURE__ */ jsx(Plus, { size: 16 })]
|
|
45102
45434
|
}), onStartTimer && /* @__PURE__ */ jsxs(Button$1, {
|
|
@@ -45120,6 +45452,7 @@ const TimeEntriesTableHeader = () => {
|
|
|
45120
45452
|
className: "Layer__TimeEntriesTable__FilterService",
|
|
45121
45453
|
placeholder: t("timeTracking:label.all_services", "All Services"),
|
|
45122
45454
|
showLabel: false,
|
|
45455
|
+
allowArchived: true,
|
|
45123
45456
|
inline: true
|
|
45124
45457
|
}), /* @__PURE__ */ jsx(CustomerSelector, {
|
|
45125
45458
|
selectedCustomer,
|
|
@@ -45178,14 +45511,20 @@ var TimeEntryActionsCell = memo(function TimeEntryActionsCell$1({ entry }) {
|
|
|
45178
45511
|
onPress: () => setDrawerOpen(true, entry),
|
|
45179
45512
|
"aria-label": t("timeTracking:action.view_entry", "View Entry"),
|
|
45180
45513
|
variant: "ghost",
|
|
45181
|
-
children: /* @__PURE__ */ jsx(Edit, {
|
|
45514
|
+
children: /* @__PURE__ */ jsx(Edit, {
|
|
45515
|
+
size: 20,
|
|
45516
|
+
strokeWidth: 1.25
|
|
45517
|
+
})
|
|
45182
45518
|
}), !isLocked && /* @__PURE__ */ jsx(Button$1, {
|
|
45183
45519
|
inset: true,
|
|
45184
45520
|
icon: true,
|
|
45185
45521
|
onPress: () => setDeleteModalOpen(true, entry),
|
|
45186
45522
|
"aria-label": t("timeTracking:action.delete_entry", "Delete Entry"),
|
|
45187
45523
|
variant: "ghost",
|
|
45188
|
-
children: /* @__PURE__ */ jsx(Trash2, {
|
|
45524
|
+
children: /* @__PURE__ */ jsx(Trash2, {
|
|
45525
|
+
size: 20,
|
|
45526
|
+
strokeWidth: 1.25
|
|
45527
|
+
})
|
|
45189
45528
|
})]
|
|
45190
45529
|
});
|
|
45191
45530
|
});
|
|
@@ -45574,10 +45913,16 @@ const TimeEntryDrawer = () => {
|
|
|
45574
45913
|
children: [/* @__PURE__ */ jsxs(Button$1, {
|
|
45575
45914
|
variant: "outlined",
|
|
45576
45915
|
onPress: handleDeleteEntry,
|
|
45577
|
-
children: [/* @__PURE__ */ jsx(Trash2, {
|
|
45916
|
+
children: [/* @__PURE__ */ jsx(Trash2, {
|
|
45917
|
+
size: 16,
|
|
45918
|
+
strokeWidth: 1.25
|
|
45919
|
+
}), t("timeTracking:action.delete_entry", "Delete Entry")]
|
|
45578
45920
|
}), /* @__PURE__ */ jsxs(Button$1, {
|
|
45579
45921
|
onPress: () => setIsEditMode(true),
|
|
45580
|
-
children: [/* @__PURE__ */ jsx(Edit, {
|
|
45922
|
+
children: [/* @__PURE__ */ jsx(Edit, {
|
|
45923
|
+
size: 16,
|
|
45924
|
+
strokeWidth: 1.25
|
|
45925
|
+
}), t("timeTracking:action.edit_entry", "Edit Entry")]
|
|
45581
45926
|
})]
|
|
45582
45927
|
})]
|
|
45583
45928
|
})
|
|
@@ -45765,29 +46110,31 @@ var TimeTrackingStatsBreakdown = memo(function TimeTrackingStatsBreakdown$1({ en
|
|
|
45765
46110
|
children: entries.map(({ color, key, percentage, serviceName, totalMinutes }) => /* @__PURE__ */ jsxs(VStack, {
|
|
45766
46111
|
className: "Layer__TimeTrackingStats__LegendItem",
|
|
45767
46112
|
gap: "2xs",
|
|
45768
|
-
children: [
|
|
45769
|
-
|
|
45770
|
-
|
|
45771
|
-
|
|
45772
|
-
|
|
45773
|
-
|
|
45774
|
-
|
|
45775
|
-
|
|
45776
|
-
|
|
45777
|
-
})
|
|
45778
|
-
|
|
46113
|
+
children: [/* @__PURE__ */ jsxs(HStack, {
|
|
46114
|
+
className: "Layer__TimeTrackingStats__LegendLabel",
|
|
46115
|
+
gap: "2xs",
|
|
46116
|
+
align: "center",
|
|
46117
|
+
children: [/* @__PURE__ */ jsx(TimeTrackingStatsLegendSwatch, { color }), /* @__PURE__ */ jsx(Span, {
|
|
46118
|
+
size: "md",
|
|
46119
|
+
ellipsis: true,
|
|
46120
|
+
withTooltip: true,
|
|
46121
|
+
children: serviceName
|
|
46122
|
+
})]
|
|
46123
|
+
}), /* @__PURE__ */ jsxs(HStack, {
|
|
46124
|
+
className: "Layer__TimeTrackingStats__LegendMeta",
|
|
46125
|
+
gap: "2xs",
|
|
46126
|
+
align: "baseline",
|
|
46127
|
+
children: [/* @__PURE__ */ jsx(Span, {
|
|
45779
46128
|
className: "Layer__TimeTrackingStats__LegendDuration",
|
|
45780
|
-
size: "
|
|
45781
|
-
weight: "bold",
|
|
46129
|
+
size: "sm",
|
|
45782
46130
|
children: formatMinutesAsDuration$1(totalMinutes)
|
|
45783
|
-
}),
|
|
45784
|
-
/* @__PURE__ */ jsx(Span, {
|
|
46131
|
+
}), /* @__PURE__ */ jsx(Span, {
|
|
45785
46132
|
className: "Layer__TimeTrackingStats__LegendPercentage",
|
|
45786
46133
|
size: "sm",
|
|
45787
46134
|
variant: "subtle",
|
|
45788
46135
|
children: formatPercent$1(percentage, { maximumFractionDigits: 0 })
|
|
45789
|
-
})
|
|
45790
|
-
]
|
|
46136
|
+
})]
|
|
46137
|
+
})]
|
|
45791
46138
|
}, key))
|
|
45792
46139
|
})]
|
|
45793
46140
|
});
|
|
@@ -45796,6 +46143,7 @@ function TimeTrackingStatsContent({ summary }) {
|
|
|
45796
46143
|
const { t } = useTranslation();
|
|
45797
46144
|
const { formatMinutesAsDuration: formatMinutesAsDuration$1 } = useIntlFormatter();
|
|
45798
46145
|
const serviceBreakdown = useMemo(() => buildServiceBreakdown(summary.byService, t("timeTracking:label.other", "Other")), [summary.byService, t]);
|
|
46146
|
+
const totalDurationDisplay = summary.totalMinutes > 0 ? formatMinutesAsDuration$1(summary.totalMinutes) : t("timeTracking:label.zero_minutes", "0 min");
|
|
45799
46147
|
return /* @__PURE__ */ jsxs(VStack, {
|
|
45800
46148
|
className: "Layer__TimeTrackingStats__Content",
|
|
45801
46149
|
gap: "lg",
|
|
@@ -45830,7 +46178,7 @@ function TimeTrackingStatsContent({ summary }) {
|
|
|
45830
46178
|
}), /* @__PURE__ */ jsx(Span, {
|
|
45831
46179
|
className: "Layer__TimeTrackingStats__SummaryValue",
|
|
45832
46180
|
weight: "bold",
|
|
45833
|
-
children:
|
|
46181
|
+
children: totalDurationDisplay
|
|
45834
46182
|
})]
|
|
45835
46183
|
})]
|
|
45836
46184
|
})]
|
|
@@ -45842,7 +46190,7 @@ function TimeTrackingStatsContent({ summary }) {
|
|
|
45842
46190
|
children: [/* @__PURE__ */ jsx(HStack, { className: "Layer__TimeTrackingStats__ChartBar Layer__TimeTrackingStats__ChartBar--empty" }), /* @__PURE__ */ jsx(Span, {
|
|
45843
46191
|
size: "sm",
|
|
45844
46192
|
variant: "subtle",
|
|
45845
|
-
children: t("timeTracking:label.no_activity_breakdown", "No activity
|
|
46193
|
+
children: t("timeTracking:label.no_activity_breakdown", "No activity during this period")
|
|
45846
46194
|
})]
|
|
45847
46195
|
})]
|
|
45848
46196
|
});
|