@mindly/ui-components 8.11.1 → 8.11.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/index.js +6 -6
- package/dist/cjs/lib2/features/ScheduleFeature/types.d.ts +7 -2
- package/dist/cjs/lib2/features/ScheduleSectionsFeature/ScheduleSectionsFeature.d.ts +13 -0
- package/dist/cjs/lib2/features/ScheduleSectionsFeature/components/ScheduleSection.d.ts +15 -0
- package/dist/cjs/lib2/features/ScheduleSectionsFeature/components/ScheduleSectionV1.d.ts +7 -0
- package/dist/cjs/lib2/features/ScheduleSectionsFeature/components/Slot.d.ts +10 -0
- package/dist/cjs/lib2/features/ScheduleSectionsFeature/hooks/useSelectAllSectionSlots/index.d.ts +10 -0
- package/dist/cjs/lib2/features/ScheduleSectionsFeature/index.d.ts +1 -0
- package/dist/cjs/lib2/features/ScheduleSectionsFeature/mocks/slots.d.ts +9 -0
- package/dist/cjs/lib2/features/ScheduleSectionsFeature/types.d.ts +18 -0
- package/dist/cjs/lib2/features/ScheduleSectionsFeature/utils/toSections/index.d.ts +15 -0
- package/dist/cjs/lib2/features/UseSwipeFeature/UseSwipeFeature.d.ts +8 -0
- package/dist/cjs/lib2/features/index.d.ts +1 -0
- package/dist/cjs/lib2/shared/hooks/useSwipe.d.ts +1 -2
- package/dist/esm/index.js +4 -4
- package/dist/esm/lib2/features/ScheduleFeature/types.d.ts +7 -2
- package/dist/esm/lib2/features/ScheduleSectionsFeature/ScheduleSectionsFeature.d.ts +13 -0
- package/dist/esm/lib2/features/ScheduleSectionsFeature/components/ScheduleSection.d.ts +15 -0
- package/dist/esm/lib2/features/ScheduleSectionsFeature/components/ScheduleSectionV1.d.ts +7 -0
- package/dist/esm/lib2/features/ScheduleSectionsFeature/components/Slot.d.ts +10 -0
- package/dist/esm/lib2/features/ScheduleSectionsFeature/hooks/useSelectAllSectionSlots/index.d.ts +10 -0
- package/dist/esm/lib2/features/ScheduleSectionsFeature/index.d.ts +1 -0
- package/dist/esm/lib2/features/ScheduleSectionsFeature/mocks/slots.d.ts +9 -0
- package/dist/esm/lib2/features/ScheduleSectionsFeature/types.d.ts +18 -0
- package/dist/esm/lib2/features/ScheduleSectionsFeature/utils/toSections/index.d.ts +15 -0
- package/dist/esm/lib2/features/UseSwipeFeature/UseSwipeFeature.d.ts +8 -0
- package/dist/esm/lib2/features/index.d.ts +1 -0
- package/dist/esm/lib2/shared/hooks/useSwipe.d.ts +1 -2
- package/dist/index.d.ts +23 -3
- package/package.json +2 -2
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
+
import { WithTranslation } from 'react-i18next';
|
|
2
3
|
export type SlotViewModel = {
|
|
3
4
|
title: string;
|
|
4
5
|
active: boolean;
|
|
@@ -7,8 +8,10 @@ export type DaySectionKey = 'morning' | 'day' | 'evening';
|
|
|
7
8
|
export type DaySection = {
|
|
8
9
|
key: DaySectionKey;
|
|
9
10
|
label: string;
|
|
11
|
+
selectAllLabel?: string;
|
|
10
12
|
items: SlotViewModel[];
|
|
11
13
|
icon: React.ReactNode;
|
|
14
|
+
isExpanded?: boolean;
|
|
12
15
|
};
|
|
13
16
|
export type DayTabItem = {
|
|
14
17
|
title: string;
|
|
@@ -16,7 +19,8 @@ export type DayTabItem = {
|
|
|
16
19
|
};
|
|
17
20
|
export type ScheduleProps = {
|
|
18
21
|
items: DayTabItem[];
|
|
19
|
-
|
|
22
|
+
slots: SlotViewModel[];
|
|
23
|
+
setSlots: (slots: SlotViewModel[]) => void;
|
|
20
24
|
isLoading?: boolean;
|
|
21
25
|
isButtonLoading?: boolean;
|
|
22
26
|
isButtonDisabled?: boolean;
|
|
@@ -24,6 +28,7 @@ export type ScheduleProps = {
|
|
|
24
28
|
buttonText?: string;
|
|
25
29
|
skeletonCount?: number;
|
|
26
30
|
onDayChange?: (dayIndex: number) => void;
|
|
27
|
-
onSlotClick?: (time: string) => void;
|
|
28
31
|
onSave?: () => void;
|
|
32
|
+
isSectionsCollapsable?: boolean;
|
|
33
|
+
t: WithTranslation['t'];
|
|
29
34
|
};
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { FC } from 'react';
|
|
2
|
+
import { WithTranslation } from 'react-i18next';
|
|
3
|
+
import { Slot } from './types';
|
|
4
|
+
type ScheduleSectionsFeatureProps = {
|
|
5
|
+
t: WithTranslation['t'];
|
|
6
|
+
slots: Slot[];
|
|
7
|
+
setSlots: (slots: Slot[]) => void;
|
|
8
|
+
isSectionsCollapsable?: boolean;
|
|
9
|
+
openSectionIfSlotSelected?: boolean;
|
|
10
|
+
showSlotStatus?: boolean;
|
|
11
|
+
};
|
|
12
|
+
declare const ScheduleSectionsFeature: FC<ScheduleSectionsFeatureProps>;
|
|
13
|
+
export default ScheduleSectionsFeature;
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { FC } from 'react';
|
|
2
|
+
import { DaySectionKey, Section, Slot } from '../types';
|
|
3
|
+
import { WithTranslation } from 'react-i18next';
|
|
4
|
+
type ScheduleSectionProps = {
|
|
5
|
+
section: Section;
|
|
6
|
+
selectAllLabel?: string;
|
|
7
|
+
isSectionsCollapsable: boolean;
|
|
8
|
+
onSelectAll: (sectionKey: DaySectionKey) => void;
|
|
9
|
+
onSlotClick: (slot: Slot) => void;
|
|
10
|
+
t: WithTranslation['t'];
|
|
11
|
+
className?: string;
|
|
12
|
+
showSlotStatus?: boolean;
|
|
13
|
+
};
|
|
14
|
+
declare const ScheduleSection: FC<ScheduleSectionProps>;
|
|
15
|
+
export default ScheduleSection;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { Section, Slot } from '../types';
|
|
2
|
+
type ScheduleSectionV1Props = {
|
|
3
|
+
section: Section;
|
|
4
|
+
onSlotClick?: (slot: Slot) => void;
|
|
5
|
+
};
|
|
6
|
+
export declare const ScheduleSectionV1: ({ section, onSlotClick }: ScheduleSectionV1Props) => import("react/jsx-runtime").JSX.Element;
|
|
7
|
+
export {};
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { Slot as SlotType } from '../types';
|
|
2
|
+
import { WithTranslation } from 'react-i18next';
|
|
3
|
+
type SlotProps = {
|
|
4
|
+
slot: SlotType;
|
|
5
|
+
onClick: (slot: SlotType) => void;
|
|
6
|
+
t: WithTranslation['t'];
|
|
7
|
+
showSlotStatus?: boolean;
|
|
8
|
+
};
|
|
9
|
+
declare const Slot: ({ slot, onClick, t, showSlotStatus }: SlotProps) => import("react/jsx-runtime").JSX.Element;
|
|
10
|
+
export default Slot;
|
package/dist/cjs/lib2/features/ScheduleSectionsFeature/hooks/useSelectAllSectionSlots/index.d.ts
ADDED
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { DaySectionKey, Section } from '../../types';
|
|
2
|
+
import { Slot } from '../../types';
|
|
3
|
+
export declare const useSelectAllSectionSlots: ({ sections, selectedDay, setSlots, }: {
|
|
4
|
+
sections: Section[];
|
|
5
|
+
selectedDay: number;
|
|
6
|
+
setSlots: (slots: Slot[]) => void;
|
|
7
|
+
}) => {
|
|
8
|
+
handleSelectAllSlots: (rawSectionKey: DaySectionKey) => void;
|
|
9
|
+
handleSlotClick: (slot: Slot) => Promise<void>;
|
|
10
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { default as ScheduleSectionsFeature } from './ScheduleSectionsFeature';
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
export declare enum DaySectionKey {
|
|
2
|
+
Morning = "morning",
|
|
3
|
+
Day = "day",
|
|
4
|
+
Evening = "evening"
|
|
5
|
+
}
|
|
6
|
+
export { type DaySection } from '../ScheduleFeature/types';
|
|
7
|
+
export type Slot = {
|
|
8
|
+
title: string;
|
|
9
|
+
active: boolean;
|
|
10
|
+
disabled?: boolean;
|
|
11
|
+
};
|
|
12
|
+
export type Section = {
|
|
13
|
+
key: DaySectionKey;
|
|
14
|
+
label: string;
|
|
15
|
+
items: Slot[];
|
|
16
|
+
icon: React.ReactNode;
|
|
17
|
+
isExpanded?: boolean;
|
|
18
|
+
};
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { Section } from '../../types';
|
|
2
|
+
type Slot = {
|
|
3
|
+
title: string;
|
|
4
|
+
active: boolean;
|
|
5
|
+
};
|
|
6
|
+
type Labels = {
|
|
7
|
+
morning: string;
|
|
8
|
+
day: string;
|
|
9
|
+
evening: string;
|
|
10
|
+
};
|
|
11
|
+
export declare const toSections: (slots: Slot[], { labels, openIfSelected }: {
|
|
12
|
+
labels: Labels;
|
|
13
|
+
openIfSelected?: boolean;
|
|
14
|
+
}) => Section[];
|
|
15
|
+
export {};
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { UseSwipeOptions } from '../../shared/hooks/useSwipe';
|
|
3
|
+
type UseSwipeFeatureProps = UseSwipeOptions & {
|
|
4
|
+
className?: string;
|
|
5
|
+
children: React.ReactNode;
|
|
6
|
+
};
|
|
7
|
+
declare const UseSwipeFeature: React.FC<UseSwipeFeatureProps>;
|
|
8
|
+
export default UseSwipeFeature;
|
|
@@ -67,6 +67,7 @@ export * from './ReservedSessionManageModalFeature';
|
|
|
67
67
|
export * from './ViewedClientsListFeature';
|
|
68
68
|
export * from './RevampSubscriptionStepperFeature';
|
|
69
69
|
export * from './ScheduleFeature';
|
|
70
|
+
export * from './ScheduleSectionsFeature';
|
|
70
71
|
export * from './SubscriptionCard';
|
|
71
72
|
export * from './CancelSubscriptionFeature';
|
|
72
73
|
export type { RecurringSessionsTimeSlots } from './RevampSubscriptionStepperFeature';
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { DependencyList } from 'react';
|
|
2
|
-
type UseSwipeOptions = {
|
|
2
|
+
export type UseSwipeOptions = {
|
|
3
3
|
onSwipeLeft?: () => void;
|
|
4
4
|
onSwipeRight?: () => void;
|
|
5
5
|
onSwipeUp?: () => void;
|
|
@@ -13,4 +13,3 @@ type UseSwipeOptions = {
|
|
|
13
13
|
export declare const useSwipe: (options?: UseSwipeOptions, deps?: DependencyList) => {
|
|
14
14
|
ref: import("react").RefObject<HTMLDivElement | null>;
|
|
15
15
|
};
|
|
16
|
-
export {};
|