-
Notifications
You must be signed in to change notification settings - Fork 2.9k
/
CONST.ts
executable file
·5482 lines (5234 loc) · 174 KB
/
CONST.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
/* eslint-disable @typescript-eslint/naming-convention */
import dateAdd from 'date-fns/add';
import dateSubtract from 'date-fns/sub';
import Config from 'react-native-config';
import * as KeyCommand from 'react-native-key-command';
import type {ValueOf} from 'type-fest';
import BankAccount from './libs/models/BankAccount';
import * as Url from './libs/Url';
import SCREENS from './SCREENS';
import type PlaidBankAccount from './types/onyx/PlaidBankAccount';
import type {Unit} from './types/onyx/Policy';
type RateAndUnit = {
unit: Unit;
rate: number;
currency: string;
};
type CurrencyDefaultMileageRate = Record<string, RateAndUnit>;
// Creating a default array and object this way because objects ({}) and arrays ([]) are not stable types.
// Freezing the array ensures that it cannot be unintentionally modified.
const EMPTY_ARRAY = Object.freeze([]);
const EMPTY_OBJECT = Object.freeze({});
const CLOUDFRONT_DOMAIN = 'cloudfront.net';
const CLOUDFRONT_URL = `https://d2k5nsl2zxldvw.${CLOUDFRONT_DOMAIN}`;
const ACTIVE_EXPENSIFY_URL = Url.addTrailingForwardSlash(Config?.NEW_EXPENSIFY_URL ?? 'https://new.expensify.com');
const USE_EXPENSIFY_URL = 'https://use.expensify.com';
const PLATFORM_OS_MACOS = 'Mac OS';
const PLATFORM_IOS = 'iOS';
const ANDROID_PACKAGE_NAME = 'com.expensify.chat';
const CURRENT_YEAR = new Date().getFullYear();
const PULL_REQUEST_NUMBER = Config?.PULL_REQUEST_NUMBER ?? '';
const MAX_DATE = dateAdd(new Date(), {years: 1});
const MIN_DATE = dateSubtract(new Date(), {years: 20});
const keyModifierControl = KeyCommand?.constants?.keyModifierControl ?? 'keyModifierControl';
const keyModifierCommand = KeyCommand?.constants?.keyModifierCommand ?? 'keyModifierCommand';
const keyModifierShiftControl = KeyCommand?.constants?.keyModifierShiftControl ?? 'keyModifierShiftControl';
const keyModifierShiftCommand = KeyCommand?.constants?.keyModifierShiftCommand ?? 'keyModifierShiftCommand';
const keyInputEscape = KeyCommand?.constants?.keyInputEscape ?? 'keyInputEscape';
const keyInputEnter = KeyCommand?.constants?.keyInputEnter ?? 'keyInputEnter';
const keyInputUpArrow = KeyCommand?.constants?.keyInputUpArrow ?? 'keyInputUpArrow';
const keyInputDownArrow = KeyCommand?.constants?.keyInputDownArrow ?? 'keyInputDownArrow';
const keyInputLeftArrow = KeyCommand?.constants?.keyInputLeftArrow ?? 'keyInputLeftArrow';
const keyInputRightArrow = KeyCommand?.constants?.keyInputRightArrow ?? 'keyInputRightArrow';
// describes if a shortcut key can cause navigation
const KEYBOARD_SHORTCUT_NAVIGATION_TYPE = 'NAVIGATION_SHORTCUT';
const chatTypes = {
POLICY_ANNOUNCE: 'policyAnnounce',
POLICY_ADMINS: 'policyAdmins',
TRIP_ROOM: 'tripRoom',
GROUP: 'group',
DOMAIN_ALL: 'domainAll',
POLICY_ROOM: 'policyRoom',
POLICY_EXPENSE_CHAT: 'policyExpenseChat',
SELF_DM: 'selfDM',
INVOICE: 'invoice',
SYSTEM: 'system',
} as const;
// Explicit type annotation is required
const cardActiveStates: number[] = [2, 3, 4, 7];
const onboardingChoices = {
PERSONAL_SPEND: 'newDotPersonalSpend',
MANAGE_TEAM: 'newDotManageTeam',
EMPLOYER: 'newDotEmployer',
CHAT_SPLIT: 'newDotSplitChat',
LOOKING_AROUND: 'newDotLookingAround',
};
type OnboardingPurposeType = ValueOf<typeof onboardingChoices>;
const CONST = {
HEIC_SIGNATURES: [
'6674797068656963', // 'ftypheic' - Indicates standard HEIC file
'6674797068656978', // 'ftypheix' - Indicates a variation of HEIC
'6674797068657631', // 'ftyphevc' - Typically for HEVC encoded media (common in HEIF)
'667479706d696631', // 'ftypmif1' - Multi-Image Format part of HEIF, broader usage
],
RECENT_WAYPOINTS_NUMBER: 20,
DEFAULT_DB_NAME: 'OnyxDB',
DEFAULT_TABLE_NAME: 'keyvaluepairs',
DEFAULT_ONYX_DUMP_FILE_NAME: 'onyx-state.txt',
DEFAULT_POLICY_ROOM_CHAT_TYPES: [chatTypes.POLICY_ADMINS, chatTypes.POLICY_ANNOUNCE, chatTypes.DOMAIN_ALL],
DISABLED_MAX_EXPENSE_VALUE: 10000000000,
POLICY_BILLABLE_MODES: {
BILLABLE: 'billable',
NON_BILLABLE: 'nonBillable',
},
// Note: Group and Self-DM excluded as these are not tied to a Workspace
WORKSPACE_ROOM_TYPES: [chatTypes.POLICY_ADMINS, chatTypes.POLICY_ANNOUNCE, chatTypes.DOMAIN_ALL, chatTypes.POLICY_ROOM, chatTypes.POLICY_EXPENSE_CHAT],
ANDROID_PACKAGE_NAME,
WORKSPACE_ENABLE_FEATURE_REDIRECT_DELAY: 100,
ANIMATED_HIGHLIGHT_ENTRY_DELAY: 50,
ANIMATED_HIGHLIGHT_ENTRY_DURATION: 300,
ANIMATED_HIGHLIGHT_START_DELAY: 10,
ANIMATED_HIGHLIGHT_START_DURATION: 300,
ANIMATED_HIGHLIGHT_END_DELAY: 800,
ANIMATED_HIGHLIGHT_END_DURATION: 2000,
ANIMATED_TRANSITION: 300,
ANIMATED_TRANSITION_FROM_VALUE: 100,
ANIMATION_IN_TIMING: 100,
ANIMATION_DIRECTION: {
IN: 'in',
OUT: 'out',
},
// Multiplier for gyroscope animation in order to make it a bit more subtle
ANIMATION_GYROSCOPE_VALUE: 0.4,
BACKGROUND_IMAGE_TRANSITION_DURATION: 1000,
SCREEN_TRANSITION_END_TIMEOUT: 1000,
ARROW_HIDE_DELAY: 3000,
MAX_IMAGE_CANVAS_AREA: 16777216,
API_ATTACHMENT_VALIDATIONS: {
// 24 megabytes in bytes, this is limit set on servers, do not update without wider internal discussion
MAX_SIZE: 25165824,
// An arbitrary size, but the same minimum as in the PHP layer
MIN_SIZE: 240,
// Allowed extensions for receipts
ALLOWED_RECEIPT_EXTENSIONS: ['jpg', 'jpeg', 'gif', 'png', 'pdf', 'htm', 'html', 'text', 'rtf', 'doc', 'tif', 'tiff', 'msword', 'zip', 'xml', 'message'],
},
// This is limit set on servers, do not update without wider internal discussion
API_TRANSACTION_CATEGORY_MAX_LENGTH: 255,
AUTO_AUTH_STATE: {
NOT_STARTED: 'not-started',
SIGNING_IN: 'signing-in',
JUST_SIGNED_IN: 'just-signed-in',
FAILED: 'failed',
},
AUTH_TOKEN_TYPES: {
ANONYMOUS: 'anonymousAccount',
SUPPORT: 'support',
},
AVATAR_MAX_ATTACHMENT_SIZE: 6291456,
AVATAR_ALLOWED_EXTENSIONS: ['jpg', 'jpeg', 'png', 'gif', 'bmp', 'svg'],
// Minimum width and height size in px for a selected image
AVATAR_MIN_WIDTH_PX: 80,
AVATAR_MIN_HEIGHT_PX: 80,
// Maximum width and height size in px for a selected image
AVATAR_MAX_WIDTH_PX: 4096,
AVATAR_MAX_HEIGHT_PX: 4096,
LOGO_MAX_SCALE: 1.5,
MAX_IMAGE_DIMENSION: 2400,
BREADCRUMB_TYPE: {
ROOT: 'root',
STRONG: 'strong',
NORMAL: 'normal',
},
DEFAULT_GROUP_AVATAR_COUNT: 18,
DEFAULT_AVATAR_COUNT: 24,
OLD_DEFAULT_AVATAR_COUNT: 8,
DISPLAY_NAME: {
MAX_LENGTH: 50,
RESERVED_NAMES: ['Expensify', 'Concierge'],
EXPENSIFY_CONCIERGE: 'Expensify Concierge',
},
GPS: {
// It's OK to get a cached location that is up to an hour old because the only accuracy needed is the country the user is in
MAX_AGE: 3600000,
// 15 seconds, don't wait too long because the server can always fall back to using the IP address
TIMEOUT: 15000,
},
LEGAL_NAME: {
MAX_LENGTH: 40,
},
REPORT_DESCRIPTION: {
MAX_LENGTH: 1000,
},
PULL_REQUEST_NUMBER,
// Regex to get link in href prop inside of <a/> component
REGEX_LINK_IN_ANCHOR: /<a\s+(?:[^>]*?\s+)?href="([^"]*)"/gi,
MERCHANT_NAME_MAX_LENGTH: 255,
MASKED_PAN_PREFIX: 'XXXXXXXXXXXX',
REQUEST_PREVIEW: {
MAX_LENGTH: 83,
},
CALENDAR_PICKER: {
// Numbers were arbitrarily picked.
MIN_YEAR: CURRENT_YEAR - 100,
MAX_YEAR: CURRENT_YEAR + 100,
MAX_DATE,
MIN_DATE,
},
DATE_BIRTH: {
MIN_AGE: 0,
MIN_AGE_FOR_PAYMENT: 18,
MAX_AGE: 150,
},
DESKTOP_SHORTCUT_ACCELERATOR: {
PASTE_AND_MATCH_STYLE: 'Option+Shift+CmdOrCtrl+V',
PASTE_AS_PLAIN_TEXT: 'CmdOrCtrl+Shift+V',
},
// This is used to enable a rotation/transform style to any component.
DIRECTION: {
LEFT: 'left',
RIGHT: 'right',
},
// Sizes needed for report empty state background image handling
EMPTY_STATE_BACKGROUND: {
ASPECT_RATIO: 3.72,
OVERLAP: 60,
SMALL_SCREEN: {
IMAGE_HEIGHT: 300,
},
WIDE_SCREEN: {
IMAGE_HEIGHT: 450,
},
},
NEW_EXPENSIFY_URL: ACTIVE_EXPENSIFY_URL,
APP_DOWNLOAD_LINKS: {
ANDROID: `https://play.google.com/store/apps/details?id=${ANDROID_PACKAGE_NAME}`,
IOS: 'https://apps.apple.com/us/app/expensify-cash/id1530278510',
DESKTOP: `${ACTIVE_EXPENSIFY_URL}NewExpensify.dmg`,
OLD_DOT_ANDROID: 'https://play.google.com/store/apps/details?id=org.me.mobiexpensifyg&hl=en_US&pli=1',
OLD_DOT_IOS: 'https://apps.apple.com/us/app/expensify-expense-tracker/id471713959',
},
DATE: {
SQL_DATE_TIME: 'YYYY-MM-DD HH:mm:ss',
FNS_FORMAT_STRING: 'yyyy-MM-dd',
FNS_DATE_TIME_FORMAT_STRING: 'yyyy-MM-dd HH:mm:ss',
LOCAL_TIME_FORMAT: 'h:mm a',
YEAR_MONTH_FORMAT: 'yyyyMM',
MONTH_FORMAT: 'MMMM',
WEEKDAY_TIME_FORMAT: 'eeee',
MONTH_DAY_ABBR_FORMAT: 'MMM d',
SHORT_DATE_FORMAT: 'MM-dd',
MONTH_DAY_YEAR_ABBR_FORMAT: 'MMM d, yyyy',
MONTH_DAY_YEAR_FORMAT: 'MMMM d, yyyy',
FNS_TIMEZONE_FORMAT_STRING: "yyyy-MM-dd'T'HH:mm:ssXXX",
FNS_DB_FORMAT_STRING: 'yyyy-MM-dd HH:mm:ss.SSS',
LONG_DATE_FORMAT_WITH_WEEKDAY: 'eeee, MMMM d, yyyy',
UNIX_EPOCH: '1970-01-01 00:00:00.000',
MAX_DATE: '9999-12-31',
MIN_DATE: '0001-01-01',
ORDINAL_DAY_OF_MONTH: 'do',
},
SMS: {
DOMAIN: '@expensify.sms',
},
BANK_ACCOUNT: {
BENEFICIAL_OWNER_INFO_STEP: {
SUBSTEP: {
IS_USER_UBO: 1,
IS_ANYONE_ELSE_UBO: 2,
UBO_DETAILS_FORM: 3,
ARE_THERE_MORE_UBOS: 4,
UBOS_LIST: 5,
},
BENEFICIAL_OWNER_DATA: {
BENEFICIAL_OWNER_KEYS: 'beneficialOwnerKeys',
PREFIX: 'beneficialOwner',
FIRST_NAME: 'firstName',
LAST_NAME: 'lastName',
DOB: 'dob',
SSN_LAST_4: 'ssnLast4',
STREET: 'street',
CITY: 'city',
STATE: 'state',
ZIP_CODE: 'zipCode',
},
},
PLAID: {
ALLOWED_THROTTLED_COUNT: 2,
ERROR: {
TOO_MANY_ATTEMPTS: 'Too many attempts',
},
EVENTS_NAME: {
OPEN: 'OPEN',
EXIT: 'EXIT',
},
},
ERROR: {
MISSING_ROUTING_NUMBER: '402 Missing routingNumber',
MAX_ROUTING_NUMBER: '402 Maximum Size Exceeded routingNumber',
MISSING_INCORPORATION_STATE: '402 Missing incorporationState in additionalData',
MISSING_INCORPORATION_TYPE: '402 Missing incorporationType in additionalData',
},
STEP: {
// In the order they appear in the VBA flow
BANK_ACCOUNT: 'BankAccountStep',
REQUESTOR: 'RequestorStep',
COMPANY: 'CompanyStep',
BENEFICIAL_OWNERS: 'BeneficialOwnersStep',
ACH_CONTRACT: 'ACHContractStep',
VALIDATION: 'ValidationStep',
ENABLE: 'EnableStep',
},
STEP_NAMES: ['1', '2', '3', '4', '5'],
STEPS_HEADER_HEIGHT: 40,
SUBSTEP: {
MANUAL: 'manual',
PLAID: 'plaid',
},
VERIFICATIONS: {
ERROR_MESSAGE: 'verifications.errorMessage',
THROTTLED: 'verifications.throttled',
},
FIELDS_TYPE: {
LOCAL: 'local',
},
ONFIDO_RESPONSE: {
SDK_TOKEN: 'apiResult.sdkToken',
PASS: 'pass',
},
QUESTIONS: {
QUESTION: 'apiResult.questions.question',
DIFFERENTIATOR_QUESTION: 'apiResult.differentiator-question',
},
SETUP_TYPE: {
MANUAL: 'manual',
PLAID: 'plaid',
},
REGEX: {
US_ACCOUNT_NUMBER: /^[0-9]{4,17}$/,
// The back-end is always returning account number with 4 last digits and mask the rest with X
MASKED_US_ACCOUNT_NUMBER: /^[X]{0,13}[0-9]{4}$/,
SWIFT_BIC: /^[A-Za-z0-9]{8,11}$/,
},
VERIFICATION_MAX_ATTEMPTS: 7,
STATE: {
VERIFYING: 'VERIFYING',
VALIDATING: 'VALIDATING',
SETUP: 'SETUP',
PENDING: 'PENDING',
OPEN: 'OPEN',
},
MAX_LENGTH: {
FULL_SSN: 9,
SSN: 4,
ZIP_CODE: 10,
},
TYPE: {
BUSINESS: 'BUSINESS',
PERSONAL: 'PERSONAL',
},
},
INCORPORATION_TYPES: {
LLC: 'LLC',
CORPORATION: 'Corp',
PARTNERSHIP: 'Partnership',
COOPERATIVE: 'Cooperative',
SOLE_PROPRIETORSHIP: 'Sole Proprietorship',
OTHER: 'Other',
},
BETAS: {
ALL: 'all',
DEFAULT_ROOMS: 'defaultRooms',
DUPE_DETECTION: 'dupeDetection',
P2P_DISTANCE_REQUESTS: 'p2pDistanceRequests',
WORKFLOWS_ADVANCED_APPROVAL: 'workflowsAdvancedApproval',
SPOTNANA_TRAVEL: 'spotnanaTravel',
REPORT_FIELDS_FEATURE: 'reportFieldsFeature',
WORKSPACE_FEEDS: 'workspaceFeeds',
NETSUITE_USA_TAX: 'netsuiteUsaTax',
WORKSPACE_RULES: 'workspaceRules',
COMBINED_TRACK_SUBMIT: 'combinedTrackSubmit',
},
BUTTON_STATES: {
DEFAULT: 'default',
ACTIVE: 'active',
PRESSED: 'pressed',
COMPLETE: 'complete',
DISABLED: 'disabled',
},
BANK_ACCOUNT_TYPES: {
WALLET: 'WALLET',
},
COUNTRY: {
US: 'US',
MX: 'MX',
AU: 'AU',
CA: 'CA',
GB: 'GB',
},
DESKTOP_DEEPLINK_APP_STATE: {
CHECKING: 'checking',
INSTALLED: 'installed',
NOT_INSTALLED: 'not-installed',
},
TAX_RATES: {
CUSTOM_NAME_MAX_LENGTH: 8,
NAME_MAX_LENGTH: 50,
},
PLATFORM: {
IOS: 'ios',
ANDROID: 'android',
WEB: 'web',
DESKTOP: 'desktop',
},
PLATFORM_SPECIFIC_KEYS: {
CTRL: {
DEFAULT: 'control',
[PLATFORM_OS_MACOS]: 'meta',
[PLATFORM_IOS]: 'meta',
},
SHIFT: {
DEFAULT: 'shift',
},
},
KEYBOARD_SHORTCUTS: {
SEARCH: {
descriptionKey: 'search',
shortcutKey: 'K',
modifiers: ['CTRL'],
trigger: {
DEFAULT: {input: 'k', modifierFlags: keyModifierControl},
[PLATFORM_OS_MACOS]: {input: 'k', modifierFlags: keyModifierCommand},
[PLATFORM_IOS]: {input: 'k', modifierFlags: keyModifierCommand},
},
type: KEYBOARD_SHORTCUT_NAVIGATION_TYPE,
},
NEW_CHAT: {
descriptionKey: 'newChat',
shortcutKey: 'K',
modifiers: ['CTRL', 'SHIFT'],
trigger: {
DEFAULT: {input: 'k', modifierFlags: keyModifierShiftControl},
[PLATFORM_OS_MACOS]: {input: 'k', modifierFlags: keyModifierShiftCommand},
[PLATFORM_IOS]: {input: 'k', modifierFlags: keyModifierShiftCommand},
},
type: KEYBOARD_SHORTCUT_NAVIGATION_TYPE,
},
SHORTCUTS: {
descriptionKey: 'openShortcutDialog',
shortcutKey: 'J',
modifiers: ['CTRL'],
trigger: {
DEFAULT: {input: 'j', modifierFlags: keyModifierControl},
[PLATFORM_OS_MACOS]: {input: 'j', modifierFlags: keyModifierCommand},
[PLATFORM_IOS]: {input: 'j', modifierFlags: keyModifierCommand},
},
},
ESCAPE: {
descriptionKey: 'escape',
shortcutKey: 'Escape',
modifiers: [],
trigger: {
DEFAULT: {input: keyInputEscape},
[PLATFORM_OS_MACOS]: {input: keyInputEscape},
[PLATFORM_IOS]: {input: keyInputEscape},
},
},
ENTER: {
descriptionKey: null,
shortcutKey: 'Enter',
modifiers: [],
trigger: {
DEFAULT: {input: keyInputEnter},
[PLATFORM_OS_MACOS]: {input: keyInputEnter},
[PLATFORM_IOS]: {input: keyInputEnter},
},
},
CTRL_ENTER: {
descriptionKey: null,
shortcutKey: 'Enter',
modifiers: ['CTRL'],
trigger: {
DEFAULT: {input: keyInputEnter, modifierFlags: keyModifierControl},
[PLATFORM_OS_MACOS]: {input: keyInputEnter, modifierFlags: keyModifierCommand},
[PLATFORM_IOS]: {input: keyInputEnter, modifierFlags: keyModifierCommand},
},
},
COPY: {
descriptionKey: 'copy',
shortcutKey: 'C',
modifiers: ['CTRL'],
trigger: {
DEFAULT: {input: 'c', modifierFlags: keyModifierControl},
[PLATFORM_OS_MACOS]: {input: 'c', modifierFlags: keyModifierCommand},
[PLATFORM_IOS]: {input: 'c', modifierFlags: keyModifierCommand},
},
},
ARROW_UP: {
descriptionKey: null,
shortcutKey: 'ArrowUp',
modifiers: [],
trigger: {
DEFAULT: {input: keyInputUpArrow},
[PLATFORM_OS_MACOS]: {input: keyInputUpArrow},
[PLATFORM_IOS]: {input: keyInputUpArrow},
},
},
ARROW_DOWN: {
descriptionKey: null,
shortcutKey: 'ArrowDown',
modifiers: [],
trigger: {
DEFAULT: {input: keyInputDownArrow},
[PLATFORM_OS_MACOS]: {input: keyInputDownArrow},
[PLATFORM_IOS]: {input: keyInputDownArrow},
},
},
ARROW_LEFT: {
descriptionKey: null,
shortcutKey: 'ArrowLeft',
modifiers: [],
trigger: {
DEFAULT: {input: keyInputLeftArrow},
[PLATFORM_OS_MACOS]: {input: keyInputLeftArrow},
[PLATFORM_IOS]: {input: keyInputLeftArrow},
},
},
ARROW_RIGHT: {
descriptionKey: null,
shortcutKey: 'ArrowRight',
modifiers: [],
trigger: {
DEFAULT: {input: keyInputRightArrow},
[PLATFORM_OS_MACOS]: {input: keyInputRightArrow},
[PLATFORM_IOS]: {input: keyInputRightArrow},
},
},
TAB: {
descriptionKey: null,
shortcutKey: 'Tab',
modifiers: [],
},
DEBUG: {
descriptionKey: 'openDebug',
shortcutKey: 'D',
modifiers: ['CTRL'],
trigger: {
DEFAULT: {input: 'd', modifierFlags: keyModifierControl},
[PLATFORM_OS_MACOS]: {input: 'd', modifierFlags: keyModifierCommand},
[PLATFORM_IOS]: {input: 'd', modifierFlags: keyModifierCommand},
},
},
},
KEYBOARD_SHORTCUTS_TYPES: {
NAVIGATION_SHORTCUT: KEYBOARD_SHORTCUT_NAVIGATION_TYPE,
},
KEYBOARD_SHORTCUT_KEY_DISPLAY_NAME: {
CONTROL: 'CTRL',
ESCAPE: 'ESC',
META: 'CMD',
SHIFT: 'Shift',
},
CURRENCY: {
USD: 'USD',
AUD: 'AUD',
CAD: 'CAD',
GBP: 'GBP',
NZD: 'NZD',
EUR: 'EUR',
},
get DIRECT_REIMBURSEMENT_CURRENCIES() {
return [this.CURRENCY.USD, this.CURRENCY.AUD, this.CURRENCY.CAD, this.CURRENCY.GBP, this.CURRENCY.EUR];
},
EXAMPLE_PHONE_NUMBER: '+15005550006',
CONCIERGE_CHAT_NAME: 'Concierge',
CLOUDFRONT_URL,
EMPTY_ARRAY,
EMPTY_OBJECT,
USE_EXPENSIFY_URL,
GOOGLE_MEET_URL_ANDROID: 'https://meet.google.com',
GOOGLE_DOC_IMAGE_LINK_MATCH: 'googleusercontent.com',
IMAGE_BASE64_MATCH: 'base64',
DEEPLINK_BASE_URL: 'new-expensify://',
PDF_VIEWER_URL: '/pdf/web/viewer.html',
CLOUDFRONT_DOMAIN_REGEX: /^https:\/\/\w+\.cloudfront\.net/i,
EXPENSIFY_ICON_URL: `${CLOUDFRONT_URL}/images/favicon-2019.png`,
CONCIERGE_ICON_URL_2021: `${CLOUDFRONT_URL}/images/icons/concierge_2021.png`,
CONCIERGE_ICON_URL: `${CLOUDFRONT_URL}/images/icons/concierge_2022.png`,
UPWORK_URL: 'https://github.com/Expensify/App/issues?q=is%3Aopen+is%3Aissue+label%3A%22Help+Wanted%22',
DEEP_DIVE_EXPENSIFY_CARD: 'https://community.expensify.com/discussion/4848/deep-dive-expensify-card-and-quickbooks-online-auto-reconciliation-how-it-works',
DEEP_DIVE_ERECEIPTS: 'https://community.expensify.com/discussion/5542/deep-dive-what-are-ereceipts/',
GITHUB_URL: 'https://github.com/Expensify/App',
TERMS_URL: `${USE_EXPENSIFY_URL}/terms`,
PRIVACY_URL: `${USE_EXPENSIFY_URL}/privacy`,
LICENSES_URL: `${USE_EXPENSIFY_URL}/licenses`,
ACH_TERMS_URL: `${USE_EXPENSIFY_URL}/achterms`,
WALLET_AGREEMENT_URL: `${USE_EXPENSIFY_URL}/walletagreement`,
BANCORP_WALLET_AGREEMENT_URL: `${USE_EXPENSIFY_URL}/bancorp-bank-wallet-terms-of-service`,
HELP_LINK_URL: `${USE_EXPENSIFY_URL}/usa-patriot-act`,
ELECTRONIC_DISCLOSURES_URL: `${USE_EXPENSIFY_URL}/esignagreement`,
GITHUB_RELEASE_URL: 'https://api.github.com/repos/expensify/app/releases/latest',
ADD_SECONDARY_LOGIN_URL: encodeURI('settings?param={"section":"account","openModal":"secondaryLogin"}'),
MANAGE_CARDS_URL: 'domain_companycards',
FEES_URL: `${USE_EXPENSIFY_URL}/fees`,
SAVE_WITH_EXPENSIFY_URL: `${USE_EXPENSIFY_URL}/savings-calculator`,
CFPB_PREPAID_URL: 'https://cfpb.gov/prepaid',
STAGING_NEW_EXPENSIFY_URL: 'https://staging.new.expensify.com',
NEWHELP_URL: 'https://help.expensify.com',
INTERNAL_DEV_EXPENSIFY_URL: 'https://www.expensify.com.dev',
STAGING_EXPENSIFY_URL: 'https://staging.expensify.com',
EXPENSIFY_URL: 'https://www.expensify.com',
BANK_ACCOUNT_PERSONAL_DOCUMENTATION_INFO_URL:
'https://community.expensify.com/discussion/6983/faq-why-do-i-need-to-provide-personal-documentation-when-setting-up-updating-my-bank-account',
PERSONAL_DATA_PROTECTION_INFO_URL: 'https://community.expensify.com/discussion/5677/deep-dive-security-how-expensify-protects-your-information',
ONFIDO_FACIAL_SCAN_POLICY_URL: 'https://onfido.com/facial-scan-policy-and-release/',
ONFIDO_PRIVACY_POLICY_URL: 'https://onfido.com/privacy/',
ONFIDO_TERMS_OF_SERVICE_URL: 'https://onfido.com/terms-of-service/',
LIST_OF_RESTRICTED_BUSINESSES: 'https://community.expensify.com/discussion/6191/list-of-restricted-businesses',
TRAVEL_TERMS_URL: `${USE_EXPENSIFY_URL}/travelterms`,
EXPENSIFY_PACKAGE_FOR_SAGE_INTACCT: 'https://www.expensify.com/tools/integrations/downloadPackage',
EXPENSIFY_PACKAGE_FOR_SAGE_INTACCT_FILE_NAME: 'ExpensifyPackageForSageIntacct',
SAGE_INTACCT_INSTRUCTIONS: 'https://help.expensify.com/articles/expensify-classic/integrations/accounting-integrations/Sage-Intacct',
HOW_TO_CONNECT_TO_SAGE_INTACCT: 'https://help.expensify.com/articles/expensify-classic/integrations/accounting-integrations/Sage-Intacct#how-to-connect-to-sage-intacct',
PRICING: `https://www.expensify.com/pricing`,
// Use Environment.getEnvironmentURL to get the complete URL with port number
DEV_NEW_EXPENSIFY_URL: 'https://dev.new.expensify.com:',
OLDDOT_URLS: {
ADMIN_POLICIES_URL: 'admin_policies',
ADMIN_DOMAINS_URL: 'admin_domains',
INBOX: 'inbox',
},
EXPENSIFY_POLICY_DOMAIN: 'expensify-policy',
EXPENSIFY_POLICY_DOMAIN_EXTENSION: '.exfy',
SIGN_IN_FORM_WIDTH: 300,
REQUEST_CODE_DELAY: 30,
DEEPLINK_PROMPT_DENYLIST: [SCREENS.HOME, SCREENS.SIGN_IN_WITH_APPLE_DESKTOP, SCREENS.SIGN_IN_WITH_GOOGLE_DESKTOP],
SIGN_IN_METHOD: {
APPLE: 'Apple',
GOOGLE: 'Google',
},
OPTION_TYPE: {
REPORT: 'report',
PERSONAL_DETAIL: 'personalDetail',
},
QUICK_ACTIONS: {
REQUEST_MANUAL: 'requestManual',
REQUEST_SCAN: 'requestScan',
REQUEST_DISTANCE: 'requestDistance',
SPLIT_MANUAL: 'splitManual',
SPLIT_SCAN: 'splitScan',
SPLIT_DISTANCE: 'splitDistance',
TRACK_MANUAL: 'trackManual',
TRACK_SCAN: 'trackScan',
TRACK_DISTANCE: 'trackDistance',
ASSIGN_TASK: 'assignTask',
SEND_MONEY: 'sendMoney',
},
RECEIPT: {
ICON_SIZE: 164,
PERMISSION_GRANTED: 'granted',
HAND_ICON_HEIGHT: 152,
HAND_ICON_WIDTH: 200,
SHUTTER_SIZE: 90,
MAX_REPORT_PREVIEW_RECEIPTS: 3,
},
REPORT: {
ROLE: {
ADMIN: 'admin',
MEMBER: 'member',
},
MAX_COUNT_BEFORE_FOCUS_UPDATE: 30,
MIN_INITIAL_REPORT_ACTION_COUNT: 15,
SPLIT_REPORTID: '-2',
ACTIONS: {
LIMIT: 50,
// OldDot Actions render getMessage from Web-Expensify/lib/Report/Action PHP files via getMessageOfOldDotReportAction in ReportActionsUtils.ts
TYPE: {
ACTIONABLE_ADD_PAYMENT_CARD: 'ACTIONABLEADDPAYMENTCARD',
ACTIONABLE_JOIN_REQUEST: 'ACTIONABLEJOINREQUEST',
ACTIONABLE_MENTION_WHISPER: 'ACTIONABLEMENTIONWHISPER',
ACTIONABLE_REPORT_MENTION_WHISPER: 'ACTIONABLEREPORTMENTIONWHISPER',
ACTIONABLE_TRACK_EXPENSE_WHISPER: 'ACTIONABLETRACKEXPENSEWHISPER',
ADD_COMMENT: 'ADDCOMMENT',
APPROVED: 'APPROVED',
CARD_MISSING_ADDRESS: 'CARDMISSINGADDRESS',
CARD_ISSUED: 'CARDISSUED',
CARD_ISSUED_VIRTUAL: 'CARDISSUEDVIRTUAL',
CHANGE_FIELD: 'CHANGEFIELD', // OldDot Action
CHANGE_POLICY: 'CHANGEPOLICY', // OldDot Action
CHANGE_TYPE: 'CHANGETYPE', // OldDot Action
CHRONOS_OOO_LIST: 'CHRONOSOOOLIST',
CLOSED: 'CLOSED',
CREATED: 'CREATED',
DELEGATE_SUBMIT: 'DELEGATESUBMIT', // OldDot Action
DELETED_ACCOUNT: 'DELETEDACCOUNT', // Deprecated OldDot Action
DISMISSED_VIOLATION: 'DISMISSEDVIOLATION',
DONATION: 'DONATION', // Deprecated OldDot Action
EXPORTED_TO_CSV: 'EXPORTCSV', // OldDot Action
EXPORTED_TO_INTEGRATION: 'EXPORTINTEGRATION', // OldDot Action
EXPORTED_TO_QUICK_BOOKS: 'EXPORTED', // Deprecated OldDot Action
FORWARDED: 'FORWARDED', // OldDot Action
HOLD: 'HOLD',
HOLD_COMMENT: 'HOLDCOMMENT',
INTEGRATION_SYNC_FAILED: 'INTEGRATIONSYNCFAILED',
IOU: 'IOU',
INTEGRATIONS_MESSAGE: 'INTEGRATIONSMESSAGE', // OldDot Action
MANAGER_ATTACH_RECEIPT: 'MANAGERATTACHRECEIPT', // OldDot Action
MANAGER_DETACH_RECEIPT: 'MANAGERDETACHRECEIPT', // OldDot Action
MARKED_REIMBURSED: 'MARKEDREIMBURSED', // OldDot Action
MARK_REIMBURSED_FROM_INTEGRATION: 'MARKREIMBURSEDFROMINTEGRATION', // OldDot Action
MERGED_WITH_CASH_TRANSACTION: 'MERGEDWITHCASHTRANSACTION',
MODIFIED_EXPENSE: 'MODIFIEDEXPENSE',
MOVED: 'MOVED',
OUTDATED_BANK_ACCOUNT: 'OUTDATEDBANKACCOUNT', // OldDot Action
REIMBURSEMENT_ACH_BOUNCE: 'REIMBURSEMENTACHBOUNCE', // OldDot Action
REIMBURSEMENT_ACH_CANCELLED: 'REIMBURSEMENTACHCANCELLED', // OldDot Action
REIMBURSEMENT_ACCOUNT_CHANGED: 'REIMBURSEMENTACCOUNTCHANGED', // OldDot Action
REIMBURSEMENT_DELAYED: 'REIMBURSEMENTDELAYED', // OldDot Action
REIMBURSEMENT_QUEUED: 'REIMBURSEMENTQUEUED',
REIMBURSEMENT_DEQUEUED: 'REIMBURSEMENTDEQUEUED',
REIMBURSEMENT_REQUESTED: 'REIMBURSEMENTREQUESTED', // Deprecated OldDot Action
REIMBURSEMENT_SETUP: 'REIMBURSEMENTSETUP', // Deprecated OldDot Action
REIMBURSEMENT_SETUP_REQUESTED: 'REIMBURSEMENTSETUPREQUESTED', // Deprecated OldDot Action
RENAMED: 'RENAMED',
REPORT_PREVIEW: 'REPORTPREVIEW',
SELECTED_FOR_RANDOM_AUDIT: 'SELECTEDFORRANDOMAUDIT', // OldDot Action
SHARE: 'SHARE', // OldDot Action
STRIPE_PAID: 'STRIPEPAID', // OldDot Action
SUBMITTED: 'SUBMITTED',
TAKE_CONTROL: 'TAKECONTROL', // OldDot Action
TASK_CANCELLED: 'TASKCANCELLED',
TASK_COMPLETED: 'TASKCOMPLETED',
TASK_EDITED: 'TASKEDITED',
TASK_REOPENED: 'TASKREOPENED',
TRIPPREVIEW: 'TRIPPREVIEW',
UNAPPROVED: 'UNAPPROVED',
UNHOLD: 'UNHOLD',
UNSHARE: 'UNSHARE', // OldDot Action
UPDATE_GROUP_CHAT_MEMBER_ROLE: 'UPDATEGROUPCHATMEMBERROLE',
POLICY_CHANGE_LOG: {
ADD_APPROVER_RULE: 'POLICYCHANGELOG_ADD_APPROVER_RULE',
ADD_BUDGET: 'POLICYCHANGELOG_ADD_BUDGET',
ADD_CATEGORY: 'POLICYCHANGELOG_ADD_CATEGORY',
ADD_CUSTOM_UNIT: 'POLICYCHANGELOG_ADD_CUSTOM_UNIT',
ADD_CUSTOM_UNIT_RATE: 'POLICYCHANGELOG_ADD_CUSTOM_UNIT_RATE',
ADD_EMPLOYEE: 'POLICYCHANGELOG_ADD_EMPLOYEE',
ADD_INTEGRATION: 'POLICYCHANGELOG_ADD_INTEGRATION',
ADD_REPORT_FIELD: 'POLICYCHANGELOG_ADD_REPORT_FIELD',
ADD_TAG: 'POLICYCHANGELOG_ADD_TAG',
DELETE_ALL_TAGS: 'POLICYCHANGELOG_DELETE_ALL_TAGS',
DELETE_APPROVER_RULE: 'POLICYCHANGELOG_DELETE_APPROVER_RULE',
DELETE_BUDGET: 'POLICYCHANGELOG_DELETE_BUDGET',
DELETE_CATEGORY: 'POLICYCHANGELOG_DELETE_CATEGORY',
DELETE_CUSTOM_UNIT: 'POLICYCHANGELOG_DELETE_CUSTOM_UNIT',
DELETE_CUSTOM_UNIT_RATE: 'POLICYCHANGELOG_DELETE_CUSTOM_UNIT_RATE',
DELETE_CUSTOM_UNIT_SUB_RATE: 'POLICYCHANGELOG_DELETE_CUSTOM_UNIT_SUB_RATE',
DELETE_EMPLOYEE: 'POLICYCHANGELOG_DELETE_EMPLOYEE',
DELETE_INTEGRATION: 'POLICYCHANGELOG_DELETE_INTEGRATION',
DELETE_REPORT_FIELD: 'POLICYCHANGELOG_DELETE_REPORT_FIELD',
DELETE_TAG: 'POLICYCHANGELOG_DELETE_TAG',
IMPORT_CUSTOM_UNIT_RATES: 'POLICYCHANGELOG_IMPORT_CUSTOM_UNIT_RATES',
IMPORT_TAGS: 'POLICYCHANGELOG_IMPORT_TAGS',
INDIVIDUAL_BUDGET_NOTIFICATION: 'POLICYCHANGELOG_INDIVIDUAL_BUDGET_NOTIFICATION',
INVITE_TO_ROOM: 'POLICYCHANGELOG_INVITETOROOM',
REMOVE_FROM_ROOM: 'POLICYCHANGELOG_REMOVEFROMROOM',
LEAVE_ROOM: 'POLICYCHANGELOG_LEAVEROOM',
REPLACE_CATEGORIES: 'POLICYCHANGELOG_REPLACE_CATEGORIES',
SET_AUTO_REIMBURSEMENT: 'POLICYCHANGELOG_SET_AUTOREIMBURSEMENT',
SET_AUTO_JOIN: 'POLICYCHANGELOG_SET_AUTO_JOIN',
SET_CATEGORY_NAME: 'POLICYCHANGELOG_SET_CATEGORY_NAME',
SHARED_BUDGET_NOTIFICATION: 'POLICYCHANGELOG_SHARED_BUDGET_NOTIFICATION',
UPDATE_ACH_ACCOUNT: 'POLICYCHANGELOG_UPDATE_ACH_ACCOUNT',
UPDATE_APPROVER_RULE: 'POLICYCHANGELOG_UPDATE_APPROVER_RULE',
UPDATE_AUDIT_RATE: 'POLICYCHANGELOG_UPDATE_AUDIT_RATE',
UPDATE_AUTO_HARVESTING: 'POLICYCHANGELOG_UPDATE_AUTOHARVESTING',
UPDATE_AUTO_REIMBURSEMENT: 'POLICYCHANGELOG_UPDATE_AUTOREIMBURSEMENT',
UPDATE_AUTO_REPORTING_FREQUENCY: 'POLICYCHANGELOG_UPDATE_AUTOREPORTING_FREQUENCY',
UPDATE_BUDGET: 'POLICYCHANGELOG_UPDATE_BUDGET',
UPDATE_CATEGORY: 'POLICYCHANGELOG_UPDATE_CATEGORY',
UPDATE_CURRENCY: 'POLICYCHANGELOG_UPDATE_CURRENCY',
UPDATE_CUSTOM_UNIT: 'POLICYCHANGELOG_UPDATE_CUSTOM_UNIT',
UPDATE_CUSTOM_UNIT_RATE: 'POLICYCHANGELOG_UPDATE_CUSTOM_UNIT_RATE',
UPDATE_CUSTOM_UNIT_SUB_RATE: 'POLICYCHANGELOG_UPDATE_CUSTOM_UNIT_SUB_RATE',
UPDATE_DEFAULT_BILLABLE: 'POLICYCHANGELOG_UPDATE_DEFAULT_BILLABLE',
UPDATE_DEFAULT_REIMBURSABLE: 'POLICYCHANGELOG_UPDATE_DEFAULT_REIMBURSABLE',
UPDATE_DEFAULT_TITLE: 'POLICYCHANGELOG_UPDATE_DEFAULT_TITLE',
UPDATE_DEFAULT_TITLE_ENFORCED: 'POLICYCHANGELOG_UPDATE_DEFAULT_TITLE_ENFORCED',
UPDATE_DISABLED_FIELDS: 'POLICYCHANGELOG_UPDATE_DISABLED_FIELDS',
UPDATE_EMPLOYEE: 'POLICYCHANGELOG_UPDATE_EMPLOYEE',
UPDATE_FIELD: 'POLICYCHANGELOG_UPDATE_FIELD',
UPDATE_MANUAL_APPROVAL_THRESHOLD: 'POLICYCHANGELOG_UPDATE_MANUAL_APPROVAL_THRESHOLD',
UPDATE_MAX_EXPENSE_AMOUNT: 'POLICYCHANGELOG_UPDATE_MAX_EXPENSE_AMOUNT',
UPDATE_MAX_EXPENSE_AMOUNT_NO_RECEIPT: 'POLICYCHANGELOG_UPDATE_MAX_EXPENSE_AMOUNT_NO_RECEIPT',
UPDATE_NAME: 'POLICYCHANGELOG_UPDATE_NAME',
UPDATE_DESCRIPTION: 'POLICYCHANGELOG_UPDATE_DESCRIPTION',
UPDATE_OWNERSHIP: 'POLICYCHANGELOG_UPDATE_OWNERSHIP',
UPDATE_REIMBURSEMENT_CHOICE: 'POLICYCHANGELOG_UPDATE_REIMBURSEMENT_CHOICE',
UPDATE_REPORT_FIELD: 'POLICYCHANGELOG_UPDATE_REPORT_FIELD',
UPDATE_TAG: 'POLICYCHANGELOG_UPDATE_TAG',
UPDATE_TAG_ENABLED: 'POLICYCHANGELOG_UPDATE_TAG_ENABLED',
UPDATE_TAG_LIST: 'POLICYCHANGELOG_UPDATE_TAG_LIST',
UPDATE_TAG_LIST_NAME: 'POLICYCHANGELOG_UPDATE_TAG_LIST_NAME',
UPDATE_TAG_NAME: 'POLICYCHANGELOG_UPDATE_TAG_NAME',
UPDATE_TIME_ENABLED: 'POLICYCHANGELOG_UPDATE_TIME_ENABLED',
UPDATE_TIME_RATE: 'POLICYCHANGELOG_UPDATE_TIME_RATE',
LEAVE_POLICY: 'POLICYCHANGELOG_LEAVE_POLICY',
CORPORATE_UPGRADE: 'POLICYCHANGELOG_CORPORATE_UPGRADE',
},
ROOM_CHANGE_LOG: {
INVITE_TO_ROOM: 'INVITETOROOM',
REMOVE_FROM_ROOM: 'REMOVEFROMROOM',
LEAVE_ROOM: 'LEAVEROOM',
UPDATE_ROOM_DESCRIPTION: 'UPDATEROOMDESCRIPTION',
},
},
THREAD_DISABLED: ['CREATED'],
},
CANCEL_PAYMENT_REASONS: {
ADMIN: 'CANCEL_REASON_ADMIN',
},
ACTIONABLE_MENTION_WHISPER_RESOLUTION: {
INVITE: 'invited',
NOTHING: 'nothing',
},
ACTIONABLE_TRACK_EXPENSE_WHISPER_RESOLUTION: {
NOTHING: 'nothing',
},
ACTIONABLE_REPORT_MENTION_WHISPER_RESOLUTION: {
CREATE: 'created',
NOTHING: 'nothing',
},
ACTIONABLE_MENTION_JOIN_WORKSPACE_RESOLUTION: {
ACCEPT: 'accept',
DECLINE: 'decline',
},
ARCHIVE_REASON: {
DEFAULT: 'default',
ACCOUNT_CLOSED: 'accountClosed',
ACCOUNT_MERGED: 'accountMerged',
REMOVED_FROM_POLICY: 'removedFromPolicy',
POLICY_DELETED: 'policyDeleted',
BOOKING_END_DATE_HAS_PASSED: 'bookingEndDateHasPassed',
},
MESSAGE: {
TYPE: {
COMMENT: 'COMMENT',
TEXT: 'TEXT',
},
},
TYPE: {
CHAT: 'chat',
EXPENSE: 'expense',
IOU: 'iou',
TASK: 'task',
INVOICE: 'invoice',
},
UNSUPPORTED_TYPE: {
PAYCHECK: 'paycheck',
BILL: 'bill',
},
CHAT_TYPE: chatTypes,
WORKSPACE_CHAT_ROOMS: {
ANNOUNCE: '#announce',
ADMINS: '#admins',
},
STATE_NUM: {
OPEN: 0,
SUBMITTED: 1,
APPROVED: 2,
BILLING: 3,
},
STATUS_NUM: {
OPEN: 0,
SUBMITTED: 1,
CLOSED: 2,
APPROVED: 3,
REIMBURSED: 4,
},
NOTIFICATION_PREFERENCE: {
MUTE: 'mute',
DAILY: 'daily',
ALWAYS: 'always',
HIDDEN: 'hidden',
},
// Options for which room members can post
WRITE_CAPABILITIES: {
ALL: 'all',
ADMINS: 'admins',
},
VISIBILITY: {
PUBLIC: 'public',
PUBLIC_ANNOUNCE: 'public_announce',
PRIVATE: 'private',
RESTRICTED: 'restricted',
},
RESERVED_ROOM_NAMES: ['#admins', '#announce'],
MAX_PREVIEW_AVATARS: 4,
MAX_ROOM_NAME_LENGTH: 99,
LAST_MESSAGE_TEXT_MAX_LENGTH: 200,
OWNER_EMAIL_FAKE: '__FAKE__',
OWNER_ACCOUNT_ID_FAKE: 0,
DEFAULT_REPORT_NAME: 'Chat Report',
PERMISSIONS: {
READ: 'read',
WRITE: 'write',
SHARE: 'share',
OWN: 'own',
AUDITOR: 'auditor',
},
INVOICE_RECEIVER_TYPE: {
INDIVIDUAL: 'individual',
BUSINESS: 'policy',
},
EXPORT_OPTIONS: {
EXPORT_TO_INTEGRATION: 'exportToIntegration',
MARK_AS_EXPORTED: 'markAsExported',
},
},
NEXT_STEP: {
ICONS: {
HOURGLASS: 'hourglass',
CHECKMARK: 'checkmark',
STOPWATCH: 'stopwatch',
},
},
COMPOSER: {
MAX_LINES: 16,
MAX_LINES_SMALL_SCREEN: 6,
MAX_LINES_FULL: -1,
// The minimum height needed to enable the full screen composer
FULL_COMPOSER_MIN_HEIGHT: 60,
},
MODAL: {
MODAL_TYPE: {
CONFIRM: 'confirm',
CENTERED: 'centered',
CENTERED_UNSWIPEABLE: 'centered_unswipeable',
CENTERED_SMALL: 'centered_small',
BOTTOM_DOCKED: 'bottom_docked',
POPOVER: 'popover',
RIGHT_DOCKED: 'right_docked',
ONBOARDING: 'onboarding',
},
ANCHOR_ORIGIN_VERTICAL: {
TOP: 'top',
CENTER: 'center',
BOTTOM: 'bottom',
},
ANCHOR_ORIGIN_HORIZONTAL: {
LEFT: 'left',
CENTER: 'center',
RIGHT: 'right',
},
POPOVER_MENU_PADDING: 8,
RESTORE_FOCUS_TYPE: {
DEFAULT: 'default',
DELETE: 'delete',
PRESERVE: 'preserve',
},
},
TIMING: {
CALCULATE_MOST_RECENT_LAST_MODIFIED_ACTION: 'calc_most_recent_last_modified_action',
CHAT_FINDER_RENDER: 'search_render',
CHAT_RENDER: 'chat_render',
OPEN_REPORT: 'open_report',
HOMEPAGE_INITIAL_RENDER: 'homepage_initial_render',
REPORT_INITIAL_RENDER: 'report_initial_render',
SWITCH_REPORT: 'switch_report',
OPEN_REPORT_FROM_PREVIEW: 'open_report_from_preview',
OPEN_REPORT_THREAD: 'open_report_thread',
SIDEBAR_LOADED: 'sidebar_loaded',
LOAD_SEARCH_OPTIONS: 'load_search_options',
MESSAGE_SENT: 'message_sent',
COLD: 'cold',
WARM: 'warm',
REPORT_ACTION_ITEM_LAYOUT_DEBOUNCE_TIME: 1500,
SHOW_LOADING_SPINNER_DEBOUNCE_TIME: 250,
TEST_TOOLS_MODAL_THROTTLE_TIME: 800,
TOOLTIP_SENSE: 1000,
TRIE_INITIALIZATION: 'trie_initialization',
COMMENT_LENGTH_DEBOUNCE_TIME: 500,