@xcelsior/ui-chat 2.0.5 → 2.0.6
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.d.mts +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.js +1 -0
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +1 -0
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
- package/src/components/BookingSlotPicker.tsx +3 -0
package/dist/index.d.mts
CHANGED
|
@@ -252,7 +252,7 @@ interface BookingSlotPickerProps {
|
|
|
252
252
|
onSlotSelected: (date: string, time: string) => void;
|
|
253
253
|
disabled?: boolean;
|
|
254
254
|
}
|
|
255
|
-
declare function BookingSlotPicker({ data, theme, onSlotSelected, disabled }: BookingSlotPickerProps): react_jsx_runtime.JSX.Element;
|
|
255
|
+
declare function BookingSlotPicker({ data, theme, onSlotSelected, disabled }: BookingSlotPickerProps): react_jsx_runtime.JSX.Element | null;
|
|
256
256
|
|
|
257
257
|
interface ChatHeaderProps {
|
|
258
258
|
agent?: IUser;
|
package/dist/index.d.ts
CHANGED
|
@@ -252,7 +252,7 @@ interface BookingSlotPickerProps {
|
|
|
252
252
|
onSlotSelected: (date: string, time: string) => void;
|
|
253
253
|
disabled?: boolean;
|
|
254
254
|
}
|
|
255
|
-
declare function BookingSlotPicker({ data, theme, onSlotSelected, disabled }: BookingSlotPickerProps): react_jsx_runtime.JSX.Element;
|
|
255
|
+
declare function BookingSlotPicker({ data, theme, onSlotSelected, disabled }: BookingSlotPickerProps): react_jsx_runtime.JSX.Element | null;
|
|
256
256
|
|
|
257
257
|
interface ChatHeaderProps {
|
|
258
258
|
agent?: IUser;
|
package/dist/index.js
CHANGED
|
@@ -1322,6 +1322,7 @@ var import_jsx_runtime5 = require("react/jsx-runtime");
|
|
|
1322
1322
|
function BookingSlotPicker({ data, theme, onSlotSelected, disabled = false }) {
|
|
1323
1323
|
const [selectedDateIndex, setSelectedDateIndex] = (0, import_react6.useState)(0);
|
|
1324
1324
|
const [selectedSlot, setSelectedSlot] = (0, import_react6.useState)(null);
|
|
1325
|
+
if (!data?.availableDates?.length) return null;
|
|
1325
1326
|
const bgColor = theme?.background || "#00001a";
|
|
1326
1327
|
const isLightTheme = (() => {
|
|
1327
1328
|
if (!bgColor.startsWith("#")) return false;
|