@calcom/atoms 1.0.113 → 1.1.0-booker
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/README.md +22 -1
- package/dist/{AddressInput-KB6kz8jd.js → AddressInput-6TIOefqU.js} +3 -3
- package/dist/{AlbyPriceComponent-oomi1mi5.js → AlbyPriceComponent-zZlkVZTy.js} +29 -29
- package/dist/{PhoneInput-PW7Cwn_k.js → PhoneInput-_EJl7Rqu.js} +1 -1
- package/dist/cal-atoms.js +5 -36
- package/dist/index-4kA2xtz7.js +1957 -0
- package/dist/index-ESVL5ZDq.js +82852 -0
- package/dist/{index-zYn1uiuE.js → index-_P-UqUYu.js} +1 -1
- package/dist/packages/dayjs/locales.d.ts +1 -0
- package/dist/packages/dayjs/locales.d.ts.map +1 -1
- package/dist/packages/features/bookings/Booker/Booker.d.ts.map +1 -1
- package/dist/packages/features/bookings/Booker/components/DatePicker.d.ts +2 -8
- package/dist/packages/features/bookings/Booker/components/DatePicker.d.ts.map +1 -1
- package/dist/packages/features/bookings/Booker/components/hooks/useBookings.d.ts +2 -1
- package/dist/packages/features/bookings/Booker/components/hooks/useBookings.d.ts.map +1 -1
- package/dist/packages/features/bookings/Booker/components/hooks/useCalendars.d.ts +4 -0
- package/dist/packages/features/bookings/Booker/components/hooks/useCalendars.d.ts.map +1 -1
- package/dist/packages/features/bookings/Booker/types.d.ts +9 -8
- package/dist/packages/features/bookings/Booker/types.d.ts.map +1 -1
- package/dist/packages/features/bookings/lib/book-event-form/booking-to-mutation-input-mapper.d.ts +2 -1
- package/dist/packages/features/bookings/lib/book-event-form/booking-to-mutation-input-mapper.d.ts.map +1 -1
- package/dist/packages/features/bookings/lib/getBookingToDelete.d.ts +5 -0
- package/dist/packages/features/bookings/lib/getBookingToDelete.d.ts.map +1 -1
- package/dist/packages/features/bookings/lib/handleCancelBooking.d.ts.map +1 -1
- package/dist/packages/features/bookings/lib/handleNewBooking/ensureAvailableUsers.d.ts +18 -0
- package/dist/packages/features/bookings/lib/handleNewBooking/ensureAvailableUsers.d.ts.map +1 -1
- package/dist/packages/features/bookings/lib/handleNewBooking/getEventType.d.ts +22 -0
- package/dist/packages/features/bookings/lib/handleNewBooking/getEventType.d.ts.map +1 -1
- package/dist/packages/features/bookings/lib/handleNewBooking/getEventTypesFromDB.d.ts +18 -0
- package/dist/packages/features/bookings/lib/handleNewBooking/getEventTypesFromDB.d.ts.map +1 -1
- package/dist/packages/features/bookings/lib/handleNewBooking/loadUsers.d.ts +14 -0
- package/dist/packages/features/bookings/lib/handleNewBooking/loadUsers.d.ts.map +1 -1
- package/dist/packages/features/bookings/lib/handleNewBooking/originalRescheduledBookingUtils.d.ts +4 -0
- package/dist/packages/features/bookings/lib/handleNewBooking/originalRescheduledBookingUtils.d.ts.map +1 -1
- package/dist/packages/features/bookings/lib/handleNewBooking/test/round-robin-no-hosts.test.d.ts +2 -0
- package/dist/packages/features/bookings/lib/handleNewBooking/test/round-robin-no-hosts.test.d.ts.map +1 -0
- package/dist/packages/features/bookings/lib/handleNewBooking/test/team-bookings/collective-reschedule-destination-calendar.test.d.ts +5 -0
- package/dist/packages/features/bookings/lib/handleNewBooking/test/team-bookings/collective-reschedule-destination-calendar.test.d.ts.map +1 -0
- package/dist/packages/features/bookings/lib/handleNewBooking.d.ts.map +1 -1
- package/dist/packages/features/ee/billing/credit-service.d.ts.map +1 -1
- package/dist/packages/features/ee/billing/stripe-billling-service.d.ts.map +1 -1
- package/dist/packages/features/ee/billing/teams/team-billing.repository.interface.d.ts +1 -1
- package/dist/packages/features/ee/billing/teams/team-billing.repository.interface.d.ts.map +1 -1
- package/dist/packages/features/ee/round-robin/roundRobinManualReassignment.d.ts +4 -0
- package/dist/packages/features/ee/round-robin/roundRobinManualReassignment.d.ts.map +1 -1
- package/dist/packages/features/ee/workflows/api/scheduleSMSReminders.d.ts.map +1 -1
- package/dist/packages/features/ee/workflows/lib/getWorkflowReminders.d.ts +1 -2
- package/dist/packages/features/ee/workflows/lib/getWorkflowReminders.d.ts.map +1 -1
- package/dist/packages/features/ee/workflows/lib/reminders/messageDispatcher.d.ts +2 -0
- package/dist/packages/features/ee/workflows/lib/reminders/messageDispatcher.d.ts.map +1 -1
- package/dist/packages/features/ee/workflows/lib/reminders/smsReminderManager.d.ts.map +1 -1
- package/dist/packages/features/ee/workflows/lib/reminders/whatsappReminderManager.d.ts +0 -1
- package/dist/packages/features/ee/workflows/lib/reminders/whatsappReminderManager.d.ts.map +1 -1
- package/dist/packages/features/eventtypes/components/Locations.d.ts.map +1 -1
- package/dist/packages/features/eventtypes/components/tabs/limits/EventLimitsTab.d.ts.map +1 -1
- package/dist/packages/features/eventtypes/components/tabs/limits/MaxActiveBookingsPerBookerController.d.ts +9 -1
- package/dist/packages/features/eventtypes/components/tabs/limits/MaxActiveBookingsPerBookerController.d.ts.map +1 -1
- package/dist/packages/features/eventtypes/lib/getPublicEvent.d.ts +1 -1
- package/dist/packages/features/eventtypes/lib/getPublicEvent.d.ts.map +1 -1
- package/dist/packages/features/schedules/components/Schedule.d.ts.map +1 -1
- package/dist/packages/features/shell/navigation/NavigationItem.d.ts.map +1 -1
- package/dist/packages/platform/atoms/availability/AvailabilitySettings.d.ts +14 -13
- package/dist/packages/platform/atoms/availability/AvailabilitySettings.d.ts.map +1 -1
- package/dist/packages/platform/atoms/availability/wrappers/AvailabilitySettingsPlatformWrapper.d.ts +1 -2
- package/dist/packages/platform/atoms/availability/wrappers/AvailabilitySettingsPlatformWrapper.d.ts.map +1 -1
- package/dist/packages/platform/atoms/booker/BookerPlatformWrapper.d.ts.map +1 -1
- package/dist/packages/platform/atoms/event-types/hooks/useAtomEventTypeById.d.ts +4 -0
- package/dist/packages/platform/atoms/event-types/hooks/useAtomEventTypeById.d.ts.map +1 -1
- package/dist/packages/platform/atoms/event-types/hooks/usePlatformTabsNavigations.d.ts +1 -1
- package/dist/packages/platform/atoms/hooks/bookings/useHandleBookEvent.d.ts +2 -1
- package/dist/packages/platform/atoms/hooks/bookings/useHandleBookEvent.d.ts.map +1 -1
- package/dist/packages/platform/atoms/hooks/schedules/useAtomSchedule.d.ts +1 -0
- package/dist/packages/platform/atoms/hooks/schedules/useAtomSchedule.d.ts.map +1 -1
- package/dist/packages/platform/atoms/hooks/useConnectedCalendars.d.ts +6 -0
- package/dist/packages/platform/atoms/hooks/useConnectedCalendars.d.ts.map +1 -1
- package/dist/packages/platform/atoms/index.d.ts +0 -32
- package/dist/packages/platform/atoms/index.d.ts.map +1 -1
- package/dist/packages/platform/libraries/repositories.d.ts +9 -0
- package/dist/packages/platform/libraries/repositories.d.ts.map +1 -0
- package/dist/packages/platform/libraries/slots.d.ts +2 -2
- package/dist/packages/platform/libraries/slots.d.ts.map +1 -1
- package/dist/packages/platform/types/bookings/2024-08-13/inputs/create-booking.input.d.ts +11 -2
- package/dist/packages/platform/types/bookings/2024-08-13/inputs/create-booking.input.d.ts.map +1 -1
- package/dist/packages/platform/types/bookings/2024-08-13/inputs/language.d.ts +2 -1
- package/dist/packages/platform/types/bookings/2024-08-13/inputs/language.d.ts.map +1 -1
- package/dist/packages/platform/types/bookings/2024-08-13/inputs/mark-absent.input.d.ts +2 -2
- package/dist/packages/platform/types/bookings/2024-08-13/inputs/mark-absent.input.d.ts.map +1 -1
- package/dist/packages/platform/types/bookings/2024-08-13/outputs/booking.output.d.ts +4 -3
- package/dist/packages/platform/types/bookings/2024-08-13/outputs/booking.output.d.ts.map +1 -1
- package/dist/packages/platform/types/slots/slots-2024-09-04/inputs/get-slots.input.d.ts +4 -0
- package/dist/packages/platform/types/slots/slots-2024-09-04/inputs/get-slots.input.d.ts.map +1 -1
- package/dist/packages/prisma/zod/deployment.d.ts +3 -0
- package/dist/packages/prisma/zod/deployment.d.ts.map +1 -1
- package/dist/packages/prisma/zod/destinationcalendar.d.ts +6 -0
- package/dist/packages/prisma/zod/destinationcalendar.d.ts.map +1 -1
- package/dist/packages/prisma/zod/role.d.ts +3 -0
- package/dist/packages/prisma/zod/role.d.ts.map +1 -1
- package/dist/packages/prisma/zod/selectedcalendar.d.ts +6 -0
- package/dist/packages/prisma/zod/selectedcalendar.d.ts.map +1 -1
- package/dist/packages/prisma-client/index.d.ts +316 -3
- package/dist/packages/trpc/react/shared.d.ts +1 -1
- package/dist/packages/trpc/react/shared.d.ts.map +1 -1
- package/dist/packages/trpc/server/routers/viewer/slots/getSchedule.handler.d.ts.map +1 -1
- package/dist/packages/trpc/server/routers/viewer/slots/reserveSlot.handler.d.ts.map +1 -1
- package/dist/packages/trpc/server/routers/viewer/slots/util.d.ts +50 -2027
- package/dist/packages/trpc/server/routers/viewer/slots/util.d.ts.map +1 -1
- package/dist/style.css +1 -1
- package/package.json +6 -4
- package/dist/AppCard-QiR8Srh9.js +0 -281
- package/dist/AppListCardPlatformWrapper-h2jM2g95.js +0 -9
- package/dist/AppListCardWebWrapper-OFBgjlYM.js +0 -74
- package/dist/AppSettingsInterface-7COrVrq0.js +0 -29
- package/dist/AppSettingsInterface-dKlvoMv2.js +0 -75
- package/dist/AppSettingsInterface-pbYlc78L.js +0 -23
- package/dist/DateRangePicker-PzwyBx1B.js +0 -2405
- package/dist/EventTypeAppCardInterface-3x755JiU.js +0 -34
- package/dist/EventTypeAppCardInterface-507LHevd.js +0 -41
- package/dist/EventTypeAppCardInterface-5ThkZk8K.js +0 -31
- package/dist/EventTypeAppCardInterface-73IWOiiD.js +0 -39
- package/dist/EventTypeAppCardInterface-75U5VYai.js +0 -24
- package/dist/EventTypeAppCardInterface-8LbWeqrI.js +0 -34
- package/dist/EventTypeAppCardInterface-DAchEAmi.js +0 -24
- package/dist/EventTypeAppCardInterface-FqmTQynb.js +0 -34
- package/dist/EventTypeAppCardInterface-Hlu0jFWw.js +0 -86
- package/dist/EventTypeAppCardInterface-NTtL7BeB.js +0 -34
- package/dist/EventTypeAppCardInterface-RaliX3yn.js +0 -34
- package/dist/EventTypeAppCardInterface-UAnlpa_7.js +0 -49
- package/dist/EventTypeAppCardInterface-UTxxrcvC.js +0 -42
- package/dist/EventTypeAppCardInterface-YyYQcCLb.js +0 -32
- package/dist/EventTypeAppCardInterface-aiQ1O2Fx.js +0 -33
- package/dist/EventTypeAppCardInterface-bPaHnrrw.js +0 -41
- package/dist/EventTypeAppCardInterface-gNG7CLUC.js +0 -24
- package/dist/EventTypeAppCardInterface-kzZe7_nW.js +0 -34
- package/dist/EventTypeAppCardInterface-qnzgEVgx.js +0 -34
- package/dist/EventTypeAppCardInterface-qv1aKHZi.js +0 -42
- package/dist/EventTypeAppCardInterface-sM5oG-nM.js +0 -51
- package/dist/EventTypeAppCardInterface-sca6lBYk.js +0 -24
- package/dist/EventTypeAppCardInterface-tUKSDdlH.js +0 -51
- package/dist/EventTypeAppCardInterface-ti-rNnZb.js +0 -32
- package/dist/EventTypeAppCardInterface-wu_3YRX-.js +0 -696
- package/dist/EventTypeAppCardInterface-wzbXpbmI.js +0 -24
- package/dist/EventTypeAppSettingsInterface--vQ93o16.js +0 -24
- package/dist/EventTypeAppSettingsInterface-9lNYGi2n.js +0 -43
- package/dist/EventTypeAppSettingsInterface-DMrIHmgd.js +0 -120
- package/dist/EventTypeAppSettingsInterface-KHIuFGBN.js +0 -78
- package/dist/EventTypeAppSettingsInterface-L1Xo8tyr.js +0 -298
- package/dist/EventTypeAppSettingsInterface-Pu5B82S0.js +0 -25
- package/dist/EventTypeAppSettingsInterface-R_ad05AV.js +0 -23
- package/dist/EventTypeAppSettingsInterface-YWfWvEU3.js +0 -48
- package/dist/EventTypeAppSettingsInterface-_RDwKkaA.js +0 -221
- package/dist/EventTypeAppSettingsInterface-btPUVD8h.js +0 -23
- package/dist/EventTypeAppSettingsInterface-c2021R4F.js +0 -42
- package/dist/EventTypeAppSettingsInterface-tKBioveg.js +0 -72
- package/dist/InstallAppButton-Iv6u_RfE.js +0 -58
- package/dist/InstallAppButton-JXhBVaYJ.js +0 -29
- package/dist/InstallAppButton-Y17r7ILt.js +0 -14
- package/dist/InstallAppButton-dSCw_yR0.js +0 -14
- package/dist/StripePaymentForm-g3sWk7Tq.js +0 -493
- package/dist/currencyOptions-kannG2hu.js +0 -61
- package/dist/index-Bsynpgsa.js +0 -28
- package/dist/index-J6APIiEa.js +0 -156564
- package/dist/index-qEFnZPmB.js +0 -518
- package/dist/useIsAppEnabled-88ccKgkc.js +0 -18
package/README.md
CHANGED
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
Customizable UI components to integrate scheduling into your services.
|
|
2
2
|
|
|
3
|
+
## Users guide
|
|
4
|
+
|
|
3
5
|
### Support
|
|
4
6
|
Currently supports React 18, React 19, Next 14 and Next 15.
|
|
5
7
|
|
|
@@ -13,6 +15,25 @@ Currently supports React 18, React 19, Next 14 and Next 15.
|
|
|
13
15
|
3. Some of the versions are suffixed e.g. `1.0.102-framer` and are intended for isolated use cases, so you most probably
|
|
14
16
|
want to use version without any suffix e.g. `1.0.103`.
|
|
15
17
|
|
|
16
|
-
### Documentation
|
|
18
|
+
### Documentation
|
|
17
19
|
Documentation on how to get started with platform solution is [here](https://cal.com/docs/platform/quickstart) and list of atoms can be viewed
|
|
18
20
|
[here](https://cal.com/docs/platform/atoms/cal-provider)
|
|
21
|
+
|
|
22
|
+
## Contributors guide
|
|
23
|
+
|
|
24
|
+
### Versioning
|
|
25
|
+
We use a tool called changesets that helps documenting changes related to your development branch and then manages
|
|
26
|
+
atoms versioning and publishing to [npm](https://www.npmjs.com/package/@calcom/atoms). We need to add a log documenting changes and then letting changesets to gather the changes, update Changelog and update version in `package.json`.
|
|
27
|
+
|
|
28
|
+
1. Let's say you are on a development branch and just finished adding a new feature to atoms. While on the development branch, you have to add a log documenting this feature so that it later ends up in the atoms [CHANGELOG.md](https://github.com/calcom/cal.com/blob/main/packages/platform/atoms/CHANGELOG.md).
|
|
29
|
+
- Run `yarn changesets-add` from monorepo root and then select `@calcom/atoms` using space bar and press enter to go to the next step.
|
|
30
|
+
- Then, you have to select whether this is a major, minor or patch update following semantic versioning. Since it is a feature skip major by pressing enter and then select minor by pressing space bar and press enter to go to the next step.
|
|
31
|
+
- Then, you have to write a description of the change and press enter. This will generate a log file in the `.changeset` directory e.g. `.changeset/hungry-donuts-cross.md`.
|
|
32
|
+
- Commit this log file to your development branch and push it.
|
|
33
|
+
Notably, you do not have to change `"version"` in the atoms `package.json` file because changesets will do it in the next step.
|
|
34
|
+
2. After the development branch is merged changesets will open a pull request titled `chore: version packages` containing next release changes. This pull request will contain the new log file, it being added to the atoms `CHANGELOG.md` file and changesets will update the atoms `package.json` file based whether or not is is major, minor or patch update. When we want to release atoms we simply have to merge this pull request and changesets will publish the new atoms version to npm. Notably,
|
|
35
|
+
changesets will publish atoms to npm only if the `"version"` in the atoms `package.json` of changeset's PR is higher than in the npm.
|
|
36
|
+
|
|
37
|
+
The following 2 articles teach how to write good change summaries for each PR when it deserves to end up in CHANGELOG.md
|
|
38
|
+
- https://keepachangelog.com/en/1.0.0/
|
|
39
|
+
- https://docs.gitlab.com/development/changelog/
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { jsxs as m, jsx as e } from "react/jsx-runtime";
|
|
2
|
-
import {
|
|
2
|
+
import { I as n, b as c, c as o } from "./index-ESVL5ZDq.js";
|
|
3
3
|
function r({ value: s, onChange: t, ...a }) {
|
|
4
4
|
return /* @__PURE__ */ m("div", { className: "relative flex items-center", children: [
|
|
5
5
|
/* @__PURE__ */ e(
|
|
@@ -11,14 +11,14 @@ function r({ value: s, onChange: t, ...a }) {
|
|
|
11
11
|
}
|
|
12
12
|
),
|
|
13
13
|
/* @__PURE__ */ e(
|
|
14
|
-
|
|
14
|
+
c,
|
|
15
15
|
{
|
|
16
16
|
...a,
|
|
17
17
|
value: s,
|
|
18
18
|
onChange: (l) => {
|
|
19
19
|
t(l.target.value);
|
|
20
20
|
},
|
|
21
|
-
className:
|
|
21
|
+
className: o("pl-10", a == null ? void 0 : a.className)
|
|
22
22
|
}
|
|
23
23
|
)
|
|
24
24
|
] });
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { jsx as
|
|
2
|
-
import
|
|
3
|
-
import {
|
|
4
|
-
const
|
|
1
|
+
import { jsx as z, jsxs as er } from "react/jsx-runtime";
|
|
2
|
+
import J from "react";
|
|
3
|
+
import { d as tr, S as nr } from "./index-ESVL5ZDq.js";
|
|
4
|
+
const K = function(s, r = !0) {
|
|
5
5
|
if (s.destroyed)
|
|
6
6
|
throw new Error("Hash instance has been destroyed");
|
|
7
7
|
if (r && s.finished)
|
|
@@ -33,7 +33,7 @@ class ir extends sr {
|
|
|
33
33
|
super(), this.blockLen = r, this.outputLen = i, this.padOffset = c, this.isLE = f, this.finished = !1, this.length = 0, this.pos = 0, this.destroyed = !1, this.buffer = new Uint8Array(r), this.view = N(this.buffer);
|
|
34
34
|
}
|
|
35
35
|
update(r) {
|
|
36
|
-
|
|
36
|
+
K(this);
|
|
37
37
|
const { view: i, buffer: c, blockLen: f } = this, u = (r = Z(r)).length;
|
|
38
38
|
for (let l = 0; l < u; ) {
|
|
39
39
|
const g = Math.min(f - this.pos, u - l);
|
|
@@ -48,7 +48,7 @@ class ir extends sr {
|
|
|
48
48
|
return this.length += r.length, this.roundClean(), this;
|
|
49
49
|
}
|
|
50
50
|
digestInto(r) {
|
|
51
|
-
|
|
51
|
+
K(this), function(b, y) {
|
|
52
52
|
(function(x, ...B) {
|
|
53
53
|
if (!(x instanceof Uint8Array))
|
|
54
54
|
throw new Error("Expected Uint8Array");
|
|
@@ -67,8 +67,8 @@ class ir extends sr {
|
|
|
67
67
|
(function(b, y, E, x) {
|
|
68
68
|
if (typeof b.setBigUint64 == "function")
|
|
69
69
|
return b.setBigUint64(y, E, x);
|
|
70
|
-
const B = BigInt(32), k = BigInt(4294967295), _ = Number(E >> B & k),
|
|
71
|
-
b.setUint32(y + (x ? 4 : 0), _, x), b.setUint32(y + j,
|
|
70
|
+
const B = BigInt(32), k = BigInt(4294967295), _ = Number(E >> B & k), S = Number(E & k), j = x ? 0 : 4;
|
|
71
|
+
b.setUint32(y + (x ? 4 : 0), _, x), b.setUint32(y + j, S, x);
|
|
72
72
|
})(c, f - 8, BigInt(8 * this.length), u), this.process(c, 0);
|
|
73
73
|
const g = N(r), m = this.outputLen;
|
|
74
74
|
if (m % 4)
|
|
@@ -347,33 +347,33 @@ Q = function(s, r) {
|
|
|
347
347
|
}
|
|
348
348
|
return Uint8Array.from(t);
|
|
349
349
|
} }, r.base58check = (e) => c(B(4, (t) => e(e(t))), r.base58);
|
|
350
|
-
const
|
|
351
|
-
function
|
|
350
|
+
const S = c(f("qpzry9x8gf2tvdw0s3jn54khce6mua7l"), u("")), j = [996825010, 642813549, 513874426, 1027748829, 705979059];
|
|
351
|
+
function C(e) {
|
|
352
352
|
const t = e >> 25;
|
|
353
353
|
let n = (33554431 & e) << 5;
|
|
354
354
|
for (let o = 0; o < j.length; o++)
|
|
355
355
|
(t >> o & 1) == 1 && (n ^= j[o]);
|
|
356
356
|
return n;
|
|
357
357
|
}
|
|
358
|
-
function
|
|
358
|
+
function H(e, t, n = 1) {
|
|
359
359
|
const o = e.length;
|
|
360
360
|
let a = 1;
|
|
361
361
|
for (let h = 0; h < o; h++) {
|
|
362
362
|
const d = e.charCodeAt(h);
|
|
363
363
|
if (d < 33 || d > 126)
|
|
364
364
|
throw new Error(`Invalid prefix (${e})`);
|
|
365
|
-
a =
|
|
365
|
+
a = C(a) ^ d >> 5;
|
|
366
366
|
}
|
|
367
|
-
a =
|
|
367
|
+
a = C(a);
|
|
368
368
|
for (let h = 0; h < o; h++)
|
|
369
|
-
a =
|
|
369
|
+
a = C(a) ^ 31 & e.charCodeAt(h);
|
|
370
370
|
for (let h of t)
|
|
371
|
-
a =
|
|
371
|
+
a = C(a) ^ h;
|
|
372
372
|
for (let h = 0; h < 6; h++)
|
|
373
|
-
a =
|
|
374
|
-
return a ^= n,
|
|
373
|
+
a = C(a);
|
|
374
|
+
return a ^= n, S.encode(b([a % 2 ** 30], 30, 5, !1));
|
|
375
375
|
}
|
|
376
|
-
function
|
|
376
|
+
function O(e) {
|
|
377
377
|
const t = e === "bech32" ? 1 : 734539939, n = E(5), o = n.decode, a = n.encode, h = x(o);
|
|
378
378
|
function d(w, p = 90) {
|
|
379
379
|
if (typeof w != "string")
|
|
@@ -389,7 +389,7 @@ Q = function(s, r) {
|
|
|
389
389
|
const G = w.slice(0, v), D = w.slice(v + 1);
|
|
390
390
|
if (D.length < 6)
|
|
391
391
|
throw new Error("Data must be at least 6 characters long");
|
|
392
|
-
const M =
|
|
392
|
+
const M = S.decode(D).slice(0, -6), P = H(G, M, t);
|
|
393
393
|
if (!D.endsWith(P))
|
|
394
394
|
throw new Error(`Invalid checksum in ${w}: expected "${P}"`);
|
|
395
395
|
return { prefix: G, words: M };
|
|
@@ -402,13 +402,13 @@ Q = function(s, r) {
|
|
|
402
402
|
const v = w.length + 7 + p.length;
|
|
403
403
|
if ($ !== !1 && v > $)
|
|
404
404
|
throw new TypeError(`Length ${v} exceeds limit ${$}`);
|
|
405
|
-
return `${w = w.toLowerCase()}1${
|
|
405
|
+
return `${w = w.toLowerCase()}1${S.encode(p)}${H(w, p, t)}`;
|
|
406
406
|
}, decode: d, decodeToBytes: function(w) {
|
|
407
407
|
const { prefix: p, words: $ } = d(w, !1);
|
|
408
408
|
return { prefix: p, words: $, bytes: o($) };
|
|
409
409
|
}, decodeUnsafe: x(d), fromWords: o, fromWordsUnsafe: h, toWords: a };
|
|
410
410
|
}
|
|
411
|
-
r.bech32 =
|
|
411
|
+
r.bech32 = O("bech32"), r.bech32m = O("bech32m"), r.utf8 = { encode: (e) => new TextDecoder().decode(e), decode: (e) => new TextEncoder().encode(e) }, r.hex = c(E(4), f("0123456789abcdef"), u(""), g((e) => {
|
|
412
412
|
if (typeof e != "string" || e.length % 2)
|
|
413
413
|
throw new TypeError(`hex.decode: expected string, got ${typeof e} with length ${e.length}`);
|
|
414
414
|
return e.toLowerCase();
|
|
@@ -434,26 +434,26 @@ BigInt(1e11);
|
|
|
434
434
|
const X = { payment_hash: 1, payment_secret: 16, description: 13, payee: 19, description_hash: 23, expiry: 6, min_final_cltv_expiry: 24, fallback_address: 9, route_hint: 3, feature_bits: 5, metadata: 27 };
|
|
435
435
|
for (let s = 0, r = Object.keys(X); s < r.length; s++)
|
|
436
436
|
r[s], X[r[s]].toString();
|
|
437
|
-
const
|
|
437
|
+
const V = async (s) => {
|
|
438
438
|
const r = "https://getalby.com/api/rates/" + s.toLowerCase() + ".json";
|
|
439
439
|
return (await (await fetch(r)).json()).rate_float / 1e8;
|
|
440
440
|
}, Y = async ({ satoshi: s, currency: r }) => {
|
|
441
|
-
const i = await
|
|
441
|
+
const i = await V(r);
|
|
442
442
|
return Number(s) * i;
|
|
443
443
|
};
|
|
444
|
-
var fr = { __proto__: null, getFiatBtcRate:
|
|
445
|
-
const i = await
|
|
444
|
+
var fr = { __proto__: null, getFiatBtcRate: V, getFiatValue: Y, getSatoshiValue: async ({ amount: s, currency: r }) => {
|
|
445
|
+
const i = await V(r);
|
|
446
446
|
return Math.floor(Number(s) / i);
|
|
447
447
|
}, getFormattedFiatValue: async ({ satoshi: s, currency: r, locale: i }) => (i || (i = "en"), (await Y({ satoshi: s, currency: r })).toLocaleString(i, { style: "currency", currency: r })) };
|
|
448
448
|
function wr({ displaySymbol: s, price: r, formattedPrice: i }) {
|
|
449
|
-
const [c, f] =
|
|
450
|
-
return
|
|
449
|
+
const [c, f] = J.useState("loading...");
|
|
450
|
+
return J.useEffect(() => {
|
|
451
451
|
(async () => {
|
|
452
452
|
const u = await fr.getFiatValue({ satoshi: r, currency: "USD" });
|
|
453
453
|
f(`$${u.toFixed(2)}`);
|
|
454
454
|
})();
|
|
455
|
-
}, [r]), /* @__PURE__ */
|
|
456
|
-
s && /* @__PURE__ */
|
|
455
|
+
}, [r]), /* @__PURE__ */ z(tr, { content: c, children: /* @__PURE__ */ er("div", { className: "inline-flex items-center justify-center", children: [
|
|
456
|
+
s && /* @__PURE__ */ z(nr, { className: "h-4 w-4" }),
|
|
457
457
|
i
|
|
458
458
|
] }) });
|
|
459
459
|
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { jsx as vt } from "react/jsx-runtime";
|
|
2
2
|
import Bt, { useState as $t, useEffect as Gt } from "react";
|
|
3
|
-
import {
|
|
3
|
+
import { w as Vt, i as qt, g as Kt, u as Ut, c as It, t as Wt } from "./index-ESVL5ZDq.js";
|
|
4
4
|
function Ht() {
|
|
5
5
|
return Vt(qt, arguments);
|
|
6
6
|
}
|
package/dist/cal-atoms.js
CHANGED
|
@@ -1,38 +1,7 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { al as s, ak as e, am as r, u as t } from "./index-ESVL5ZDq.js";
|
|
2
2
|
export {
|
|
3
|
-
s as
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
r as CalendarSettings,
|
|
8
|
-
i as ConferencingAppsSettings,
|
|
9
|
-
u as Connect,
|
|
10
|
-
C as CreateEventType,
|
|
11
|
-
l as DestinationCalendarSettings,
|
|
12
|
-
d as EventTypeSettings,
|
|
13
|
-
g as GcalConnect,
|
|
14
|
-
c as OutlookConnect,
|
|
15
|
-
p as PaymentForm,
|
|
16
|
-
v as Router,
|
|
17
|
-
S as SelectedCalendarsSettings,
|
|
18
|
-
T as StripeConnect,
|
|
19
|
-
m as useAddSelectedCalendar,
|
|
20
|
-
y as useAtomsContext,
|
|
21
|
-
E as useBooking,
|
|
22
|
-
b as useBookings,
|
|
23
|
-
B as useCancelBooking,
|
|
24
|
-
k as useConnectedCalendars,
|
|
25
|
-
A as useCreateEventType,
|
|
26
|
-
O as useCreateTeamEventType,
|
|
27
|
-
P as useDeleteCalendarCredentials,
|
|
28
|
-
f as useEvent,
|
|
29
|
-
D as useEventTypeById,
|
|
30
|
-
I as useEventTypes,
|
|
31
|
-
R as useIsPlatform,
|
|
32
|
-
x as useMe,
|
|
33
|
-
z as useOrganizationBookings,
|
|
34
|
-
F as useOrganizationUserBookings,
|
|
35
|
-
G as useRemoveSelectedCalendar,
|
|
36
|
-
M as useTeamEventTypes,
|
|
37
|
-
U as useTeams
|
|
3
|
+
s as Booker,
|
|
4
|
+
e as CalProvider,
|
|
5
|
+
r as useAtomsContext,
|
|
6
|
+
t as useIsPlatform
|
|
38
7
|
};
|