@verma-consulting/common-library 0.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.js ADDED
@@ -0,0 +1,1206 @@
1
+ "use strict";
2
+ var __defProp = Object.defineProperty;
3
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4
+ var __getOwnPropNames = Object.getOwnPropertyNames;
5
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
6
+ var __export = (target, all) => {
7
+ for (var name in all)
8
+ __defProp(target, name, { get: all[name], enumerable: true });
9
+ };
10
+ var __copyProps = (to, from, except, desc) => {
11
+ if (from && typeof from === "object" || typeof from === "function") {
12
+ for (let key of __getOwnPropNames(from))
13
+ if (!__hasOwnProp.call(to, key) && key !== except)
14
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
15
+ }
16
+ return to;
17
+ };
18
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
19
+
20
+ // src/index.tsx
21
+ var index_exports = {};
22
+ __export(index_exports, {
23
+ camelCaseToWords: () => camelCaseToWords,
24
+ capitalizeSentence: () => capitalizeSentence,
25
+ constants: () => constants_default,
26
+ defaults: () => defaults_default,
27
+ formatPhoneNumber: () => formatPhoneNumber,
28
+ getRandomArbitrary: () => getRandomArbitrary,
29
+ grabAge: () => grabAge,
30
+ isNumber: () => isNumber,
31
+ largeNumberLabel: () => largeNumberLabel,
32
+ normalizeKey: () => normalizeKey,
33
+ openInNewTab: () => openInNewTab,
34
+ prettifyString: () => prettifyString,
35
+ snakeToPretty: () => snakeToPretty,
36
+ validEmail: () => validEmail
37
+ });
38
+ module.exports = __toCommonJS(index_exports);
39
+
40
+ // src/common.ts
41
+ var validEmail = (email) => /^\w+([\.-]?\w+)*@\w+([\.-]?\w+)*(\.\w{2,3})+$/.test(email);
42
+ var isNumber = (value) => typeof value === "number" && !isNaN(value);
43
+ var grabAge = (dateOfBirth) => {
44
+ const today = /* @__PURE__ */ new Date();
45
+ const birthDate = new Date(dateOfBirth);
46
+ let age = today.getFullYear() - birthDate.getFullYear();
47
+ const m = today.getMonth() - birthDate.getMonth();
48
+ if (m < 0 || m === 0 && today.getDate() < birthDate.getDate()) {
49
+ age--;
50
+ }
51
+ return age;
52
+ };
53
+ function normalizeKey(str) {
54
+ return str.trim().toLowerCase().replace(/[^a-zA-Z0-9]+(.)/g, (_, chr) => chr.toUpperCase()).replace(/^[A-Z]/, (chr) => chr.toLowerCase());
55
+ }
56
+ function prettifyString(input = "") {
57
+ if (!input) return "";
58
+ let result = input.replace(/_/g, " ");
59
+ result = result.replace(/([a-z0-9])([A-Z])/g, "$1 $2");
60
+ result = result.split(" ").filter(Boolean).map((word) => word.charAt(0).toUpperCase() + word.slice(1).toLowerCase()).join(" ");
61
+ return result;
62
+ }
63
+ function snakeToPretty(input) {
64
+ return input.split("_").map((word) => word.charAt(0).toUpperCase() + word.slice(1).toLowerCase()).join(" ");
65
+ }
66
+ var camelCaseToWords = (value) => {
67
+ if (!value) return "\u2013";
68
+ const result = value.replace(/([A-Z])/g, " $1");
69
+ return result.charAt(0).toUpperCase() + result.slice(1);
70
+ };
71
+ var capitalizeSentence = (value) => {
72
+ if (!value) return "\u2013";
73
+ return value.replace(
74
+ /\w\S*/g,
75
+ (txt) => txt.charAt(0).toUpperCase() + txt.substr(1).toLowerCase()
76
+ );
77
+ };
78
+ var largeNumberLabel = (value) => {
79
+ if (!value || value === "" || value === 0) {
80
+ return "\u2013";
81
+ }
82
+ const number = typeof value === "number" ? value : parseFloat(value);
83
+ if (isNaN(number)) return "\u2013";
84
+ let notation = "standard";
85
+ if (number > 99999) notation = "compact";
86
+ const formatter = new Intl.NumberFormat("en", {
87
+ notation
88
+ });
89
+ return formatter.format(number);
90
+ };
91
+ var getRandomArbitrary = (min, max) => Math.floor(Math.random() * (max - min) + min);
92
+ var formatPhoneNumber = (value) => {
93
+ if (!value) return "\u2013";
94
+ const cleaned = value.replace(/\D/g, "");
95
+ const match = cleaned.match(/^(1|)?(\d{3})(\d{3})(\d{4})$/);
96
+ if (match) {
97
+ const intlCode = match[1] ? "+1 " : "";
98
+ return [intlCode, "(", match[2], ") ", match[3], "\u2013", match[4]].join("");
99
+ }
100
+ return null;
101
+ };
102
+ var openInNewTab = (url) => {
103
+ if (typeof window !== "undefined") {
104
+ const newWindow = window.open(url, "_blank", "noopener,noreferrer");
105
+ if (newWindow) newWindow.opener = null;
106
+ }
107
+ };
108
+
109
+ // src/constants.tsx
110
+ var constants = {
111
+ APP_LANGUAGES: {
112
+ English: "English"
113
+ },
114
+ PAGE_LIMIT: "4",
115
+ ROWS_PER_PAGE: ["4", "8", "16", "32", "48"],
116
+ DEFAULT_PASSWORD: "YourNewPassword123!",
117
+ DEFAULT_FREQUENCY: "5",
118
+ DEFAULT_ORDER: "asc",
119
+ DEFAULT_SORT: "createdAt",
120
+ DEFAULT_KANBAN_FIELD: "status",
121
+ DEFAULT_PRIMARY_THEME: "#00a893",
122
+ DEFAULT_CURRENCY_FIELDS: [
123
+ "annualRevenue",
124
+ "balance",
125
+ "amount",
126
+ "expectedRevenue",
127
+ "actualCost",
128
+ "amountDue",
129
+ "amountPaid",
130
+ "amountRemaining",
131
+ "amountShipping",
132
+ "startingBalance",
133
+ "endingBalance",
134
+ "subtotal",
135
+ "subtotalExcludingTax",
136
+ "totalExcludingTax",
137
+ "tax",
138
+ "postPaymentCreditNotesAmount",
139
+ "prePaymentCreditNotesAmount",
140
+ "amountCapturable",
141
+ "amountReceived"
142
+ ],
143
+ MODEL_APP_MAPPING: {
144
+ clients: "cms",
145
+ inventories: "cms",
146
+ invoices: "cms",
147
+ tasks: "cms",
148
+ campaigns: "crm",
149
+ contacts: "crm",
150
+ deals: "crm",
151
+ engagements: "crm",
152
+ leads: "crm",
153
+ payments: "financials",
154
+ products: "financials",
155
+ subscriptions: "financials"
156
+ },
157
+ NOT_INCLUDED_FIELDS: [
158
+ "id",
159
+ "selected",
160
+ "edited",
161
+ "createdAt",
162
+ "updatedAt",
163
+ "poolId",
164
+ "contents",
165
+ "schemas",
166
+ "readOnly",
167
+ "__typename"
168
+ ],
169
+ GQL_FIELD_TYPE: {
170
+ LIST: "LIST",
171
+ OBJECT: "OBJECT",
172
+ ENUM: "ENUM",
173
+ String: "String",
174
+ Float: "Float",
175
+ Int: "Int",
176
+ Boolean: "Boolean"
177
+ },
178
+ STATIC_STORAGE_BUCKET_FOLDERS: {
179
+ avatars: "avatars",
180
+ exports: "exports",
181
+ imports: "imports",
182
+ logos: "logos",
183
+ pools: "pools"
184
+ },
185
+ OPERATION_TYPE: {
186
+ ADD: "Add",
187
+ EDIT: "Edit"
188
+ },
189
+ CONTENTS_CUSTOM_TYPES: {
190
+ accountOwners: "accountOwners",
191
+ assignees: "assignees"
192
+ },
193
+ MODEL_CATEGORY_MAP: {
194
+ leads: "relations",
195
+ campaigns: "relations",
196
+ tasks: "content",
197
+ clients: "content",
198
+ inventories: "content",
199
+ deals: "relations",
200
+ invoices: "content",
201
+ contacts: "relations",
202
+ engagements: "relations",
203
+ products: "financials",
204
+ subscriptions: "financials",
205
+ payments: "financials",
206
+ content: ["clients", "inventories", "invoices", "tasks"],
207
+ relations: ["deals", "contacts", "engagements", "leads", "campaigns"],
208
+ financials: ["products", "subscriptions", "payments"]
209
+ },
210
+ SETTING_TABS: {
211
+ Personal: "Personal",
212
+ Notifications: "Notifications",
213
+ Organization: "Organization",
214
+ Features: "Features",
215
+ Team: "Team"
216
+ },
217
+ PARENT_ORGANIZATION_TYPE: {
218
+ parent: "parent",
219
+ sub: "sub"
220
+ },
221
+ POPULAR_EMAILS: [
222
+ "gmail",
223
+ "yahoo",
224
+ "aol",
225
+ "outlook",
226
+ "aim",
227
+ "yandex",
228
+ "protonmail",
229
+ "zoho",
230
+ "gmx",
231
+ "tutanota",
232
+ "tutamail",
233
+ "tuta",
234
+ "keemail",
235
+ "icloud"
236
+ ],
237
+ STATES: [
238
+ "Alabama",
239
+ "Alaska",
240
+ "Arizona",
241
+ "Arkansas",
242
+ "California",
243
+ "Colorado",
244
+ "Connecticut",
245
+ "Delaware",
246
+ "District of Columbia",
247
+ "Florida",
248
+ "Georgia",
249
+ "Guam",
250
+ "Hawaii",
251
+ "Idaho",
252
+ "Illinois",
253
+ "Indiana",
254
+ "Iowa",
255
+ "Kansas",
256
+ "Kentucky",
257
+ "Louisiana",
258
+ "Maine",
259
+ "Maryland",
260
+ "Massachusetts",
261
+ "Michigan",
262
+ "Minnesota",
263
+ "Mississippi",
264
+ "Missouri",
265
+ "Montana",
266
+ "Nebraska",
267
+ "Nevada",
268
+ "New Hampshire",
269
+ "New Jersey",
270
+ "New Mexico",
271
+ "New York",
272
+ "North Carolina",
273
+ "North Dakota",
274
+ "Ohio",
275
+ "Oklahoma",
276
+ "Oregon",
277
+ "Pennsylvania",
278
+ "Puerto Rico",
279
+ "Rhode Island",
280
+ "South Carolina",
281
+ "South Dakota",
282
+ "Tennessee",
283
+ "Texas",
284
+ "Utah",
285
+ "Vermont",
286
+ "Virgin Island",
287
+ "Virginia",
288
+ "Washington",
289
+ "West Virginia",
290
+ "Wisconsin",
291
+ "Wyoming"
292
+ ],
293
+ COUNTRIES: ["USA"],
294
+ CURRENCIES: {
295
+ aed: "United Arab Emirates Dirham",
296
+ afn: "Afghan Afghani",
297
+ all: "Albanian Lek",
298
+ amd: "Armenian Dram",
299
+ ang: "Netherlands Antillean Guilder",
300
+ aoa: "Angolan Kwanza",
301
+ ars: "Argentine Peso",
302
+ aud: "Australian Dollar",
303
+ awg: "Aruban Florin",
304
+ azn: "Azerbaijani Manat",
305
+ bam: "Bosnia-Herzegovina Convertible Mark",
306
+ bbd: "Barbadian Dollar",
307
+ bdt: "Bangladeshi Taka",
308
+ bgn: "Bulgarian Lev",
309
+ bhd: "Bahraini Dinar",
310
+ bif: "Burundian Franc",
311
+ bmd: "Bermudan Dollar",
312
+ bnd: "Brunei Dollar",
313
+ bob: "Bolivian Boliviano",
314
+ brl: "Brazilian Real",
315
+ bsd: "Bahamian Dollar",
316
+ btc: "Bitcoin",
317
+ btn: "Bhutanese Ngultrum",
318
+ bwp: "Botswanan Pula",
319
+ byn: "New Belarusian Ruble",
320
+ byr: "Belarusian Ruble",
321
+ bzd: "Belize Dollar",
322
+ cad: "Canadian Dollar",
323
+ cdf: "Congolese Franc",
324
+ chf: "Swiss Franc",
325
+ clf: "Chilean Unit of Account (UF)",
326
+ clp: "Chilean Peso",
327
+ cny: "Chinese Yuan",
328
+ cnh: "Chinese Yuan Offshore",
329
+ cop: "Colombian Peso",
330
+ crc: "Costa Rican Col\xF3n",
331
+ cuc: "Cuban Convertible Peso",
332
+ cup: "Cuban Peso",
333
+ cve: "Cape Verdean Escudo",
334
+ czk: "Czech Republic Koruna",
335
+ djf: "Djiboutian Franc",
336
+ dkk: "Danish Krone",
337
+ dop: "Dominican Peso",
338
+ dzd: "Algerian Dinar",
339
+ egp: "Egyptian Pound",
340
+ ern: "Eritrean Nakfa",
341
+ etb: "Ethiopian Birr",
342
+ eur: "Euro",
343
+ fjd: "Fijian Dollar",
344
+ fkp: "Falkland Islands Pound",
345
+ gbp: "British Pound Sterling",
346
+ gel: "Georgian Lari",
347
+ ggp: "Guernsey Pound",
348
+ ghs: "Ghanaian Cedi",
349
+ gip: "Gibraltar Pound",
350
+ gmd: "Gambian Dalasi",
351
+ gnf: "Guinean Franc",
352
+ gtq: "Guatemalan Quetzal",
353
+ gyd: "Guyanaese Dollar",
354
+ hkd: "Hong Kong Dollar",
355
+ hnl: "Honduran Lempira",
356
+ hrk: "Croatian Kuna",
357
+ htg: "Haitian Gourde",
358
+ huf: "Hungarian Forint",
359
+ idr: "Indonesian Rupiah",
360
+ ils: "Israeli New Sheqel",
361
+ imp: "Manx pound",
362
+ inr: "Indian Rupee",
363
+ iqd: "Iraqi Dinar",
364
+ irr: "Iranian Rial",
365
+ isk: "Icelandic Kr\xF3na",
366
+ jep: "Jersey Pound",
367
+ jmd: "Jamaican Dollar",
368
+ jod: "Jordanian Dinar",
369
+ jpy: "Japanese Yen",
370
+ kes: "Kenyan Shilling",
371
+ kgs: "Kyrgystani Som",
372
+ khr: "Cambodian Riel",
373
+ kmf: "Comorian Franc",
374
+ kpw: "North Korean Won",
375
+ krw: "South Korean Won",
376
+ kwd: "Kuwaiti Dinar",
377
+ kyd: "Cayman Islands Dollar",
378
+ kzt: "Kazakhstani Tenge",
379
+ lak: "Laotian Kip",
380
+ lbp: "Lebanese Pound",
381
+ lkr: "Sri Lankan Rupee",
382
+ lrd: "Liberian Dollar",
383
+ lsl: "Lesotho Loti",
384
+ ltl: "Lithuanian Litas",
385
+ lvl: "Latvian Lats",
386
+ lyd: "Libyan Dinar",
387
+ mad: "Moroccan Dirham",
388
+ mdl: "Moldovan Leu",
389
+ mga: "Malagasy Ariary",
390
+ mkd: "Macedonian Denar",
391
+ mmk: "Myanma Kyat",
392
+ mnt: "Mongolian Tugrik",
393
+ mop: "Macanese Pataca",
394
+ mru: "Mauritanian Ouguiya",
395
+ mur: "Mauritian Rupee",
396
+ mvr: "Maldivian Rufiyaa",
397
+ mwk: "Malawian Kwacha",
398
+ mxn: "Mexican Peso",
399
+ myr: "Malaysian Ringgit",
400
+ mzn: "Mozambican Metical",
401
+ nad: "Namibian Dollar",
402
+ ngn: "Nigerian Naira",
403
+ nio: "Nicaraguan C\xF3rdoba",
404
+ nok: "Norwegian Krone",
405
+ npr: "Nepalese Rupee",
406
+ nzd: "New Zealand Dollar",
407
+ omr: "Omani Rial",
408
+ pab: "Panamanian Balboa",
409
+ pen: "Peruvian Nuevo Sol",
410
+ pgk: "Papua New Guinean Kina",
411
+ php: "Philippine Peso",
412
+ pkr: "Pakistani Rupee",
413
+ pln: "Polish Zloty",
414
+ pyg: "Paraguayan Guarani",
415
+ qar: "Qatari Rial",
416
+ ron: "Romanian Leu",
417
+ rsd: "Serbian Dinar",
418
+ rub: "Russian Ruble",
419
+ rwf: "Rwandan Franc",
420
+ sar: "Saudi Riyal",
421
+ sbd: "Solomon Islands Dollar",
422
+ scr: "Seychellois Rupee",
423
+ sdg: "South Sudanese Pound",
424
+ sek: "Swedish Krona",
425
+ sgd: "Singapore Dollar",
426
+ shp: "Saint Helena Pound",
427
+ sle: "Sierra Leonean Leone",
428
+ sll: "Sierra Leonean Leone",
429
+ sos: "Somali Shilling",
430
+ srd: "Surinamese Dollar",
431
+ std: "S\xE3o Tom\xE9 and Pr\xEDncipe Dobra",
432
+ svc: "Salvadoran Col\xF3n",
433
+ syp: "Syrian Pound",
434
+ szl: "Swazi Lilangeni",
435
+ thb: "Thai Baht",
436
+ tjs: "Tajikistani Somoni",
437
+ tmt: "Turkmenistani Manat",
438
+ tnd: "Tunisian Dinar",
439
+ top: "Tongan Pa\u02BBanga",
440
+ try: "Turkish Lira",
441
+ ttd: "Trinidad and Tobago Dollar",
442
+ twd: "New Taiwan Dollar",
443
+ tzs: "Tanzanian Shilling",
444
+ uah: "Ukrainian Hryvnia",
445
+ ugx: "Ugandan Shilling",
446
+ usd: "United States Dollar",
447
+ uyu: "Uruguayan Peso",
448
+ uzs: "Uzbekistan Som",
449
+ vef: "Venezuelan Bol\xEDvar Fuerte",
450
+ ves: "Sovereign Bolivar",
451
+ vnd: "Vietnamese Dong",
452
+ vuv: "Vanuatu Vatu",
453
+ wst: "Samoan Tala",
454
+ xaf: "CFA Franc BEAC",
455
+ xag: "Silver (troy ounce)",
456
+ xau: "Gold (troy ounce)",
457
+ xcd: "East Caribbean Dollar",
458
+ xdr: "Special Drawing Rights",
459
+ xof: "CFA Franc BCEAO",
460
+ xpf: "CFP Franc",
461
+ yer: "Yemeni Rial",
462
+ zar: "South African Rand",
463
+ zmk: "Zambian Kwacha",
464
+ zmw: "Zambian Kwacha",
465
+ zwl: "Zimbabwean Dollar"
466
+ },
467
+ CURRENCY_SYMBOLS: {
468
+ aed: "\u062F.\u0625",
469
+ afn: "\u060B",
470
+ all: "L",
471
+ amd: "\u058F",
472
+ ang: "\u0192",
473
+ aoa: "Kz",
474
+ ars: "$",
475
+ aud: "$",
476
+ awg: "\u0192",
477
+ azn: "\u20BC",
478
+ bam: "KM",
479
+ bbd: "$",
480
+ bdt: "\u09F3",
481
+ bgn: "\u043B\u0432",
482
+ bhd: ".\u062F.\u0628",
483
+ bif: "FBu",
484
+ bmd: "$",
485
+ bnd: "$",
486
+ bob: "Bs.",
487
+ brl: "R$",
488
+ bsd: "$",
489
+ btc: "\u20BF",
490
+ btn: "Nu.",
491
+ bwp: "P",
492
+ byn: "Br",
493
+ byr: "Br",
494
+ bzd: "$",
495
+ cad: "$",
496
+ cdf: "FC",
497
+ chf: "CHF",
498
+ clf: "UF",
499
+ clp: "$",
500
+ cny: "\xA5",
501
+ cnh: "\xA5",
502
+ cop: "$",
503
+ crc: "\u20A1",
504
+ cuc: "$",
505
+ cup: "$",
506
+ cve: "$",
507
+ czk: "K\u010D",
508
+ djf: "Fdj",
509
+ dkk: "kr",
510
+ dop: "$",
511
+ dzd: "\u062F\u062C",
512
+ egp: "\xA3",
513
+ ern: "Nfk",
514
+ etb: "Br",
515
+ eur: "\u20AC",
516
+ fjd: "$",
517
+ fkp: "\xA3",
518
+ gbp: "\xA3",
519
+ gel: "\u20BE",
520
+ ggp: "\xA3",
521
+ ghs: "\u20B5",
522
+ gip: "\xA3",
523
+ gmd: "D",
524
+ gnf: "FG",
525
+ gtq: "Q",
526
+ gyd: "$",
527
+ hkd: "$",
528
+ hnl: "L",
529
+ hrk: "kn",
530
+ htg: "G",
531
+ huf: "Ft",
532
+ idr: "Rp",
533
+ ils: "\u20AA",
534
+ imp: "\xA3",
535
+ inr: "\u20B9",
536
+ iqd: "\u0639.\u062F",
537
+ irr: "\uFDFC",
538
+ isk: "kr",
539
+ jep: "\xA3",
540
+ jmd: "$",
541
+ jod: "\u062F.\u0627",
542
+ jpy: "\xA5",
543
+ kes: "KSh",
544
+ kgs: "\u043B\u0432",
545
+ khr: "\u17DB",
546
+ kmf: "CF",
547
+ kpw: "\u20A9",
548
+ krw: "\u20A9",
549
+ kwd: "\u062F.\u0643",
550
+ kyd: "$",
551
+ kzt: "\u20B8",
552
+ lak: "\u20AD",
553
+ lbp: "\u0644.\u0644",
554
+ lkr: "\u20A8",
555
+ lrd: "$",
556
+ lsl: "L",
557
+ ltl: "Lt",
558
+ lvl: "Ls",
559
+ lyd: "\u0644.\u062F",
560
+ mad: "\u062F.\u0645.",
561
+ mdl: "L",
562
+ mga: "Ar",
563
+ mkd: "\u0434\u0435\u043D",
564
+ mmk: "K",
565
+ mnt: "\u20AE",
566
+ mop: "MOP$",
567
+ mru: "UM",
568
+ mur: "\u20A8",
569
+ mvr: "\u0783.",
570
+ mwk: "MK",
571
+ mxn: "$",
572
+ myr: "RM",
573
+ mzn: "MT",
574
+ nad: "$",
575
+ ngn: "\u20A6",
576
+ nio: "C$",
577
+ nok: "kr",
578
+ npr: "\u20A8",
579
+ nzd: "$",
580
+ omr: "\u0631.\u0639.",
581
+ pab: "B/.",
582
+ pen: "S/",
583
+ pgk: "K",
584
+ php: "\u20B1",
585
+ pkr: "\u20A8",
586
+ pln: "z\u0142",
587
+ pyg: "\u20B2",
588
+ qar: "\u0631.\u0642",
589
+ ron: "lei",
590
+ rsd: "\u0434\u0438\u043D.",
591
+ rub: "\u20BD",
592
+ rwf: "RF",
593
+ sar: "\u0631.\u0633",
594
+ sbd: "$",
595
+ scr: "\u20A8",
596
+ sdg: "\xA3",
597
+ sek: "kr",
598
+ sgd: "$",
599
+ shp: "\xA3",
600
+ sle: "Le",
601
+ sll: "Le",
602
+ sos: "S",
603
+ srd: "$",
604
+ std: "Db",
605
+ svc: "\u20A1",
606
+ syp: "\xA3",
607
+ szl: "L",
608
+ thb: "\u0E3F",
609
+ tjs: "SM",
610
+ tmt: "T",
611
+ tnd: "\u062F.\u062A",
612
+ top: "T$",
613
+ try: "\u20BA",
614
+ ttd: "$",
615
+ twd: "NT$",
616
+ tzs: "TSh",
617
+ uah: "\u20B4",
618
+ ugx: "USh",
619
+ usd: "$",
620
+ uyu: "$U",
621
+ uzs: "\u0441\u0443\u043C",
622
+ vef: "Bs.F",
623
+ ves: "Bs.",
624
+ vnd: "\u20AB",
625
+ vuv: "Vt",
626
+ wst: "T",
627
+ xaf: "FCFA",
628
+ xag: "Ag",
629
+ xau: "Au",
630
+ xcd: "$",
631
+ xdr: "SDR",
632
+ xof: "CFA",
633
+ xpf: "\u20A3",
634
+ yer: "\uFDFC",
635
+ zar: "R",
636
+ zmk: "ZK",
637
+ zmw: "ZK",
638
+ zwl: "Z$"
639
+ },
640
+ DEFAULT_INTEGRATIONS: [
641
+ {
642
+ name: "Finances",
643
+ list: [
644
+ {
645
+ name: "Stripe",
646
+ category: "Finances",
647
+ type: "stripe",
648
+ description: "Stripe's payments platform lets you accept credit cards, debit cards, and popular payment methods around the world\u2014all with a single integration. Get access to advanced payments features like 3D Secure 2 authentication, card updates, automated retries, and more.",
649
+ title: "Integrate to stripe service and manage financial models",
650
+ logo: "img/integrations/stripe.png",
651
+ new: false
652
+ }
653
+ ]
654
+ },
655
+ {
656
+ name: "Organization Workspaces",
657
+ list: [
658
+ {
659
+ name: "Google Workplace",
660
+ category: "Organization Workspaces",
661
+ type: "google_workspace",
662
+ description: "Google Workspace (formerly G Suite) is a cloud-based productivity suite that provides tools for collaboration, communication, and business operations. Many companies use Google Workspace to improve efficiency, collaboration, and streamline workflows.",
663
+ title: "Integrate to Workspace and manage team members",
664
+ logo: "img/integrations/google_workspace.webp",
665
+ new: true
666
+ },
667
+ {
668
+ name: "Microsoft 365",
669
+ category: "Organization Workspaces",
670
+ type: "microsoft_365",
671
+ description: "Microsoft 365 (formerly known as Office 365) is a cloud-based suite of productivity and collaboration tools developed by Microsoft.",
672
+ title: "Integrate with your organization microsoft 365 to manage employees",
673
+ logo: "img/integrations/microsoft_365.png",
674
+ new: true
675
+ }
676
+ ]
677
+ },
678
+ {
679
+ name: "Messaging Platforms",
680
+ list: [
681
+ {
682
+ name: "Microsoft Teams",
683
+ category: "Messaging Platforms",
684
+ type: "microsoft_teams",
685
+ description: "Microsoft Teams is a collaboration and communication platform designed to facilitate teamwork in organizations, particularly those that rely on Microsoft\u2019s ecosystem. It integrates chat, video conferencing, file storage, and app integration, making it a hub for team collaboration.",
686
+ title: "Integrate with your organization microsoft teams to manage employees and notifications",
687
+ logo: "img/integrations/microsoft_teams.png",
688
+ new: true
689
+ },
690
+ {
691
+ name: "Slack",
692
+ category: "Messaging Platforms",
693
+ type: "slack",
694
+ description: "Slack is a cloud-based messaging platform designed to enhance team communication and collaboration. It acts as a hub where teams can communicate in real-time, share files, and integrate with other software tools, streamlining workflows and reducing the need for long email threads.",
695
+ title: "Integrate with your organization slack and manage notifications",
696
+ logo: "img/integrations/slack.png",
697
+ new: true
698
+ }
699
+ ]
700
+ },
701
+ {
702
+ name: "AI",
703
+ list: [
704
+ {
705
+ name: "ChatGPT",
706
+ category: "AI",
707
+ type: "chat_gpt",
708
+ description: "ChatGPT is an artificial intelligence (AI) chatbot that uses natural language processing to generate human-like responses to user input.",
709
+ title: "Integrate chatGPT to your platform",
710
+ logo: "img/integrations/chatgpt.png",
711
+ new: true
712
+ },
713
+ {
714
+ name: "DeepSeek",
715
+ category: "AI",
716
+ type: "deepseek",
717
+ description: "DeepSeek is a Chinese artificial intelligence company that develops open-source large language models (LLMs).",
718
+ title: "Integrate DeepSeek to your platform",
719
+ logo: "img/integrations/deepseek.png",
720
+ new: true
721
+ },
722
+ {
723
+ name: "Claude",
724
+ category: "AI",
725
+ type: "claude",
726
+ description: "Claude is a next generation AI assistant built by Anthropic and trained to be safe, accurate, and secure to help you do your best work.",
727
+ title: "Integrate Claude to your platform",
728
+ logo: "img/integrations/claude.png",
729
+ new: true
730
+ }
731
+ ]
732
+ },
733
+ {
734
+ name: "Commerce",
735
+ list: [
736
+ {
737
+ name: "Shopify",
738
+ category: "Commerce",
739
+ type: "shopify",
740
+ description: "Cloud-based commerce platform that allows businesses to sell products online and in-person.",
741
+ title: "Integrate with shopify to connect client usage to platform",
742
+ logo: "img/integrations/shopify.png",
743
+ new: true
744
+ },
745
+ {
746
+ name: "Dealio",
747
+ category: "Commerce",
748
+ type: "dealio",
749
+ description: "A complete, Next-Gen Software-as-a-Service platform tailored for financial institutions.",
750
+ title: "Integrate with dealio to platform",
751
+ logo: "img/integrations/dealio.svg",
752
+ new: true
753
+ }
754
+ ]
755
+ },
756
+ {
757
+ name: "Logistics",
758
+ list: [
759
+ {
760
+ name: "Shippo",
761
+ category: "Logistics",
762
+ type: "shippo",
763
+ description: "Multi-carrier shipping platform that provides businesses with a simple way to integrate shipping functionality into their applications.",
764
+ title: "Integrate with shippo to generate labels and live shipping details",
765
+ logo: "img/integrations/shippo.png",
766
+ new: true
767
+ }
768
+ ]
769
+ },
770
+ {
771
+ name: "Miscellaneous",
772
+ list: [
773
+ {
774
+ name: "Fixer io",
775
+ category: "Miscellaneous",
776
+ type: "fixer_io",
777
+ description: "Fixer.io is an API service that provides real-time and historical exchange rate data for foreign currencies. It is primarily used by developers, businesses, and financial institutions to integrate currency conversion and exchange rate information into their applications, websites, or services.",
778
+ title: "Integration with fixer io to enable currency conversions across the platform",
779
+ logo: "img/integrations/fixer.png",
780
+ new: false
781
+ }
782
+ ]
783
+ }
784
+ ]
785
+ };
786
+ var constants_default = constants;
787
+
788
+ // src/defaults.ts
789
+ var defaults = {
790
+ users: {
791
+ firstName: "",
792
+ lastName: "",
793
+ email: "",
794
+ role: "Employee",
795
+ status: "Pending",
796
+ userName: "",
797
+ jobTitle: "",
798
+ password: "",
799
+ dateOfBirth: null,
800
+ phoneNumber: "",
801
+ permissions: [],
802
+ avatar: null,
803
+ notificationSettings: {
804
+ dailyReports: false,
805
+ dealsClosing: false,
806
+ deletionAlerts: false,
807
+ device: "Do Not Notify"
808
+ },
809
+ platformSettings: {
810
+ mode: "light",
811
+ language: "english",
812
+ currency: "usd"
813
+ }
814
+ },
815
+ clients: {
816
+ name: "",
817
+ description: "",
818
+ status: "Ready",
819
+ email: "",
820
+ contactName: "",
821
+ phone: "",
822
+ accountNumber: "",
823
+ invoicePrefix: "",
824
+ sicCode: "",
825
+ clientType: "Company",
826
+ currency: "usd",
827
+ customerType: "Trial",
828
+ industry: "",
829
+ annualRevenue: 0,
830
+ balance: 0,
831
+ nextInvoiceSequence: 0,
832
+ taxExempt: "none",
833
+ website: "",
834
+ source: "Advertisement",
835
+ logoUrl: "",
836
+ linkedinUrl: "",
837
+ facebookUrl: "",
838
+ twitterUrl: "",
839
+ angelUrl: "",
840
+ crunchbaseUrl: "",
841
+ accountOwner: "",
842
+ contacts: "",
843
+ deals: "",
844
+ invoices: "",
845
+ engagements: "",
846
+ tasks: ""
847
+ },
848
+ contacts: {
849
+ name: "",
850
+ description: "",
851
+ status: "Ready",
852
+ email: "",
853
+ phoneNumber: "",
854
+ role: "",
855
+ linkedinUrl: "",
856
+ twitterUrl: "",
857
+ client: "",
858
+ engagements: ""
859
+ },
860
+ inventories: {
861
+ name: "",
862
+ description: "",
863
+ status: "Ready",
864
+ amount: 0,
865
+ quantity: 0
866
+ },
867
+ organizations: {
868
+ name: "",
869
+ website: "",
870
+ industry: "",
871
+ currency: "usd",
872
+ linkedinUrl: "",
873
+ facebookUrl: "",
874
+ twitterUrl: "",
875
+ angelUrl: "",
876
+ crunchbaseUrl: ""
877
+ },
878
+ activties: {
879
+ label: "",
880
+ value: "",
881
+ modelName: "",
882
+ path: ""
883
+ },
884
+ leads: {
885
+ name: "",
886
+ description: "",
887
+ status: "Ready",
888
+ leadType: "AttemtpedToContact",
889
+ source: "Advertisement",
890
+ amount: 0,
891
+ projectedClosingDate: null,
892
+ expectedRevenue: 0,
893
+ probability: 0,
894
+ nextStep: "",
895
+ accountOwner: "",
896
+ client: "",
897
+ campaign: ""
898
+ },
899
+ deals: {
900
+ name: "",
901
+ description: "",
902
+ status: "Ready",
903
+ dealType: "New",
904
+ source: "Advertisement",
905
+ amount: 0,
906
+ closingDate: null,
907
+ expectedRevenue: 0,
908
+ probability: 0,
909
+ nextStep: "",
910
+ accountOwner: "",
911
+ client: "",
912
+ campaign: ""
913
+ },
914
+ campaigns: {
915
+ name: "",
916
+ description: "",
917
+ status: "Ready",
918
+ priority: "Medium",
919
+ startDate: null,
920
+ endDate: null,
921
+ campaignType: "Email",
922
+ budgetedCost: 0,
923
+ expectedRevenue: 0,
924
+ actualCost: 0,
925
+ numbersSent: 0,
926
+ expectedResponse: "",
927
+ accountOwner: "",
928
+ leads: "",
929
+ deals: ""
930
+ },
931
+ invoices: {
932
+ name: "",
933
+ description: "",
934
+ footer: "",
935
+ status: "Ready",
936
+ currency: "usd",
937
+ accountCountry: "US",
938
+ statementDescriptor: "",
939
+ dueDate: null,
940
+ nextPaymentAttempt: null,
941
+ effectiveAt: null,
942
+ amountDue: 0,
943
+ amountPaid: 0,
944
+ amountRemaining: 0,
945
+ amountShipping: 0,
946
+ attemptCount: 0,
947
+ startingBalance: 0,
948
+ endingBalance: 0,
949
+ subtotal: 0,
950
+ subtotalExcludingTax: 0,
951
+ totalExcludingTax: 0,
952
+ tax: 0,
953
+ postPaymentCreditNotesAmount: 0,
954
+ prePaymentCreditNotesAmount: 0,
955
+ daysUntilDue: 0,
956
+ attempted: false,
957
+ autoAdvance: false,
958
+ billingReason: "manual",
959
+ collectionMethod: "charge_automatically",
960
+ customerEmail: "",
961
+ customerPhone: "",
962
+ customerTaxExempt: "none",
963
+ invoicePdf: "",
964
+ lastFinalizationError: "",
965
+ number: null,
966
+ receiptNumber: "",
967
+ livemode: false,
968
+ paid: false,
969
+ paidOutOfBand: false,
970
+ client: "",
971
+ accountOwner: "",
972
+ deal: ""
973
+ },
974
+ issuer: {
975
+ account: "",
976
+ type: ""
977
+ },
978
+ engagements: {
979
+ name: "",
980
+ description: "",
981
+ status: "Ready",
982
+ engagementDate: null,
983
+ client: "",
984
+ contact: ""
985
+ },
986
+ pools: {
987
+ name: "",
988
+ description: "",
989
+ status: "Ready"
990
+ },
991
+ products: {
992
+ name: "",
993
+ description: null,
994
+ status: "Ready",
995
+ productType: "service",
996
+ client: "",
997
+ inventory: "",
998
+ accountOwner: "",
999
+ active: true,
1000
+ shippable: false,
1001
+ statementDescriptor: "",
1002
+ taxCode: null,
1003
+ unitLabel: null,
1004
+ url: ""
1005
+ },
1006
+ prices: {
1007
+ active: true,
1008
+ unitAmount: 0,
1009
+ unitAmountDecimal: null,
1010
+ lookupKey: "",
1011
+ type: "",
1012
+ taxBehavior: "unspecified",
1013
+ currency: "usd",
1014
+ billingScheme: "",
1015
+ recurring: {
1016
+ intervalCount: 0,
1017
+ interval: "",
1018
+ aggregateUsage: "",
1019
+ usageType: "",
1020
+ trialPeriodDays: 0
1021
+ }
1022
+ },
1023
+ packageDimensions: {
1024
+ height: 0,
1025
+ length: 0,
1026
+ weight: 0,
1027
+ width: 0
1028
+ },
1029
+ subscriptions: {
1030
+ name: "",
1031
+ description: null,
1032
+ status: "Ready",
1033
+ trialStart: null,
1034
+ trialEnd: null,
1035
+ startDate: null,
1036
+ endedAt: null,
1037
+ currentPeriodStart: null,
1038
+ currentPeriodEnd: null,
1039
+ backdateStartDate: null,
1040
+ billingCycleAnchor: null,
1041
+ cancelAt: null,
1042
+ canceledAt: null,
1043
+ daysUntilDue: 0,
1044
+ trialPeriodDays: 0,
1045
+ applicationFeePercent: 0,
1046
+ cancelAtPeriodEnd: false,
1047
+ trialFromPlan: false,
1048
+ offSession: false,
1049
+ nextPendingInvoiceItemInvoice: null,
1050
+ collectionMethod: "charge_automatically",
1051
+ client: "",
1052
+ deal: "",
1053
+ accountOwner: ""
1054
+ },
1055
+ automaticTax: {
1056
+ enabled: false,
1057
+ liability: {
1058
+ account: "",
1059
+ type: ""
1060
+ },
1061
+ status: ""
1062
+ },
1063
+ pauseCollection: {
1064
+ behavior: "",
1065
+ resumesAt: null
1066
+ },
1067
+ cancellationDetails: {
1068
+ comment: "",
1069
+ feedback: "",
1070
+ reason: ""
1071
+ },
1072
+ trialSettings: {
1073
+ endBehavior: {
1074
+ missingPaymentMethod: ""
1075
+ }
1076
+ },
1077
+ payments: {
1078
+ name: "",
1079
+ description: "",
1080
+ status: "Ready",
1081
+ paymentStatus: "requires_payment_method",
1082
+ currency: "usd",
1083
+ amount: 0,
1084
+ amountCapturable: 0,
1085
+ amountReceived: 0,
1086
+ applicationFeeAmount: 0,
1087
+ statementDescriptor: "",
1088
+ statementDescriptorSuffix: "",
1089
+ livemode: false,
1090
+ receiptEmail: "",
1091
+ client: "",
1092
+ subscription: "",
1093
+ invoice: ""
1094
+ },
1095
+ reports: {
1096
+ label: "",
1097
+ star: false,
1098
+ chartType: "line",
1099
+ frequency: "Annually",
1100
+ frequencyField: "createdAt",
1101
+ modelName: "",
1102
+ fieldName: "",
1103
+ operationType: "Count",
1104
+ calculation: "Empty",
1105
+ calculationValue: ""
1106
+ },
1107
+ lists: {
1108
+ label: "",
1109
+ star: false,
1110
+ dynamic: false,
1111
+ modelName: "",
1112
+ fieldName: "",
1113
+ calculation: "Empty",
1114
+ calculationValue: ""
1115
+ },
1116
+ statistics: {
1117
+ label: "",
1118
+ star: false,
1119
+ modelName: "",
1120
+ fieldName: "",
1121
+ operationType: "Count",
1122
+ calculation: "Empty",
1123
+ calculationValue: ""
1124
+ },
1125
+ address: {
1126
+ streetNumber: "",
1127
+ streetName: "",
1128
+ city: "",
1129
+ state: "",
1130
+ country: "",
1131
+ countryCode: "",
1132
+ postalCode: "",
1133
+ latitude: 37.7749,
1134
+ longitude: -122.4194
1135
+ },
1136
+ schema: {
1137
+ deleted: false,
1138
+ selected: false,
1139
+ key: "",
1140
+ type: "",
1141
+ options: []
1142
+ },
1143
+ comments: {
1144
+ label: ""
1145
+ },
1146
+ tasks: {
1147
+ name: "",
1148
+ description: "",
1149
+ status: "Ready",
1150
+ priority: "Medium",
1151
+ dueDate: null,
1152
+ reminder: false,
1153
+ reminderDate: null,
1154
+ reminderTime: "",
1155
+ repeat: false,
1156
+ repeatDate: null,
1157
+ repeatTime: "",
1158
+ client: "",
1159
+ assignee: ""
1160
+ },
1161
+ integrations: {
1162
+ name: "",
1163
+ title: "",
1164
+ description: "",
1165
+ category: "",
1166
+ key: "",
1167
+ secret: "",
1168
+ logo: "",
1169
+ clientEmail: "",
1170
+ customerId: "",
1171
+ channelId: "",
1172
+ active: false,
1173
+ importBridge: false,
1174
+ exportBridge: false,
1175
+ dynamicBridge: false
1176
+ },
1177
+ operations: {
1178
+ label: "",
1179
+ description: "",
1180
+ star: false
1181
+ },
1182
+ prompts: {
1183
+ label: "",
1184
+ description: "",
1185
+ active: false
1186
+ }
1187
+ };
1188
+ var defaults_default = defaults;
1189
+ // Annotate the CommonJS export names for ESM import in node:
1190
+ 0 && (module.exports = {
1191
+ camelCaseToWords,
1192
+ capitalizeSentence,
1193
+ constants,
1194
+ defaults,
1195
+ formatPhoneNumber,
1196
+ getRandomArbitrary,
1197
+ grabAge,
1198
+ isNumber,
1199
+ largeNumberLabel,
1200
+ normalizeKey,
1201
+ openInNewTab,
1202
+ prettifyString,
1203
+ snakeToPretty,
1204
+ validEmail
1205
+ });
1206
+ //# sourceMappingURL=index.js.map