@licklist/design 0.78.18 → 0.78.20
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/.storybook/main.cjs +55 -6
- package/.storybook/preview.jsx +77 -7
- package/dist/Maintenance/Maintenance.scss.js +6 -0
- package/dist/Maintenance/MaintenancePage.d.ts +12 -0
- package/dist/Maintenance/MaintenancePage.d.ts.map +1 -0
- package/dist/Maintenance/MaintenancePage.js +98 -0
- package/dist/Maintenance/SkeletonSidebar.d.ts +5 -0
- package/dist/Maintenance/SkeletonSidebar.d.ts.map +1 -0
- package/dist/Maintenance/SkeletonSidebar.js +101 -0
- package/dist/PageNotFound/PageNotFound.d.ts +10 -0
- package/dist/PageNotFound/PageNotFound.d.ts.map +1 -0
- package/dist/PageNotFound/PageNotFound.js +42 -0
- package/dist/PageNotFound/index.d.ts +2 -0
- package/dist/PageNotFound/index.d.ts.map +1 -0
- package/dist/UnderMaintenance/UnderMaintenance.d.ts +4 -0
- package/dist/UnderMaintenance/UnderMaintenance.d.ts.map +1 -0
- package/dist/UnderMaintenance/UnderMaintenance.js +39 -0
- package/dist/UnderMaintenance/UnderMaintenance.scss.js +6 -0
- package/dist/UnderMaintenance/index.d.ts +2 -0
- package/dist/UnderMaintenance/index.d.ts.map +1 -0
- package/dist/auth/Authorizer.d.ts.map +1 -1
- package/dist/auth/Authorizer.js +4 -3
- package/dist/iframe/ProductWithModifierModal/ModifierSetModal/ProductWithModifierSetModal.js +4 -3
- package/dist/iframe/ProductWithModifierModal/ModifierSetModal/controll/ModifierSetControll.js +2 -1
- package/dist/iframe/ProductWithModifierModal/ModifierSetModal/controll/ProductControll.js +1 -1
- package/dist/index.d.ts +2 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +2 -0
- package/dist/notification/components/NotificationPlaceholders.js +1 -1
- package/dist/product-set/form/ProductCategoriesControl.d.ts.map +1 -1
- package/dist/product-set/form/ProductCategoriesControl.js +13 -5
- package/dist/provider/provider-details-input/ProviderDetailsInput.js +1 -1
- package/dist/recurrence-input/RecurrenceEndInput.d.ts.map +1 -1
- package/dist/recurrence-input/RecurrenceEndInput.js +7 -3
- package/dist/sortable-tree/SortableTree.js +1 -26
- package/dist/styles/overrides/_functions.scss +1 -1
- package/dist/v2/components/Alert/Alert.d.ts +14 -0
- package/dist/v2/components/Alert/Alert.d.ts.map +1 -0
- package/dist/v2/components/Alert/index.d.ts +3 -0
- package/dist/v2/components/Alert/index.d.ts.map +1 -0
- package/dist/v2/components/Button/Button.d.ts +10 -0
- package/dist/v2/components/Button/Button.d.ts.map +1 -0
- package/dist/v2/components/Button/index.d.ts +3 -0
- package/dist/v2/components/Button/index.d.ts.map +1 -0
- package/dist/v2/components/Colors/Colors.d.ts +21 -0
- package/dist/v2/components/Colors/Colors.d.ts.map +1 -0
- package/dist/v2/components/Colors/index.d.ts +3 -0
- package/dist/v2/components/Colors/index.d.ts.map +1 -0
- package/dist/v2/components/Typography/Typography.d.ts +11 -0
- package/dist/v2/components/Typography/Typography.d.ts.map +1 -0
- package/dist/v2/components/Typography/index.d.ts +3 -0
- package/dist/v2/components/Typography/index.d.ts.map +1 -0
- package/dist/v2/hooks/useAuth.d.ts +4 -0
- package/dist/v2/hooks/useAuth.d.ts.map +1 -0
- package/dist/v2/index.d.ts +56 -0
- package/dist/v2/index.d.ts.map +1 -0
- package/dist/v2/navigation/FigmasAdminSideBar/FigmasAdminSideBar.d.ts +8 -0
- package/dist/v2/navigation/FigmasAdminSideBar/FigmasAdminSideBar.d.ts.map +1 -0
- package/dist/v2/navigation/FigmasAdminSideBar/index.d.ts +3 -0
- package/dist/v2/navigation/FigmasAdminSideBar/index.d.ts.map +1 -0
- package/dist/v2/navigation/FigmasSideBar/FigmasSideBar.d.ts +22 -0
- package/dist/v2/navigation/FigmasSideBar/FigmasSideBar.d.ts.map +1 -0
- package/dist/v2/navigation/FigmasSideBar/index.d.ts +3 -0
- package/dist/v2/navigation/FigmasSideBar/index.d.ts.map +1 -0
- package/dist/v2/navigation/FigmasTopHat/FigmasTopHat.d.ts +15 -0
- package/dist/v2/navigation/FigmasTopHat/FigmasTopHat.d.ts.map +1 -0
- package/dist/v2/navigation/FigmasTopHat/index.d.ts +3 -0
- package/dist/v2/navigation/FigmasTopHat/index.d.ts.map +1 -0
- package/dist/v2/navigation/Navigation/Navigation.d.ts +9 -0
- package/dist/v2/navigation/Navigation/Navigation.d.ts.map +1 -0
- package/dist/v2/navigation/Navigation/index.d.ts +3 -0
- package/dist/v2/navigation/Navigation/index.d.ts.map +1 -0
- package/dist/v2/navigation/NavigationItem/NavigationItem.d.ts +12 -0
- package/dist/v2/navigation/NavigationItem/NavigationItem.d.ts.map +1 -0
- package/dist/v2/navigation/NavigationItem/index.d.ts +3 -0
- package/dist/v2/navigation/NavigationItem/index.d.ts.map +1 -0
- package/dist/v2/navigation/NavigationSection/NavigationSection.d.ts +8 -0
- package/dist/v2/navigation/NavigationSection/NavigationSection.d.ts.map +1 -0
- package/dist/v2/navigation/NavigationSection/index.d.ts +3 -0
- package/dist/v2/navigation/NavigationSection/index.d.ts.map +1 -0
- package/dist/v2/navigation/SideBarToggleLarge/SideBarToggleLarge.d.ts +9 -0
- package/dist/v2/navigation/SideBarToggleLarge/SideBarToggleLarge.d.ts.map +1 -0
- package/dist/v2/navigation/SideBarToggleLarge/index.d.ts +3 -0
- package/dist/v2/navigation/SideBarToggleLarge/index.d.ts.map +1 -0
- package/dist/v2/navigation/SidebarUserElement/SidebarUserElement.d.ts +15 -0
- package/dist/v2/navigation/SidebarUserElement/SidebarUserElement.d.ts.map +1 -0
- package/dist/v2/navigation/SidebarUserElement/index.d.ts +3 -0
- package/dist/v2/navigation/SidebarUserElement/index.d.ts.map +1 -0
- package/dist/v2/navigation/SidebarWithAuth.d.ts +20 -0
- package/dist/v2/navigation/SidebarWithAuth.d.ts.map +1 -0
- package/dist/v2/navigation/TopHatControlDisc/TopHatControlDisc.d.ts +9 -0
- package/dist/v2/navigation/TopHatControlDisc/TopHatControlDisc.d.ts.map +1 -0
- package/dist/v2/navigation/TopHatControlDisc/index.d.ts +3 -0
- package/dist/v2/navigation/TopHatControlDisc/index.d.ts.map +1 -0
- package/dist/v2/navigation/config.d.ts +3 -0
- package/dist/v2/navigation/config.d.ts.map +1 -0
- package/dist/v2/navigation/icons/index.d.ts +12 -0
- package/dist/v2/navigation/icons/index.d.ts.map +1 -0
- package/dist/v2/navigation/index.d.ts +23 -0
- package/dist/v2/navigation/index.d.ts.map +1 -0
- package/dist/v2/types/navigation.d.ts +17 -0
- package/dist/v2/types/navigation.d.ts.map +1 -0
- package/package.json +2 -1
- package/rollup.config.js +13 -0
- package/src/Maintenance/Maintenance.scss +253 -0
- package/src/Maintenance/MaintenancePage.tsx +59 -0
- package/src/Maintenance/SkeletonSidebar.tsx +56 -0
- package/src/PageNotFound/PageNotFound.scss +8 -0
- package/src/PageNotFound/PageNotFound.stories.tsx +23 -0
- package/src/PageNotFound/PageNotFound.tsx +43 -0
- package/src/PageNotFound/index.ts +1 -0
- package/src/UnderMaintenance/UnderMaintenance.scss +6 -0
- package/src/UnderMaintenance/UnderMaintenance.stories.tsx +23 -0
- package/src/UnderMaintenance/UnderMaintenance.tsx +22 -0
- package/src/UnderMaintenance/index.ts +1 -0
- package/src/auth/Auth.stories.tsx +37 -3
- package/src/auth/Authorizer.tsx +3 -2
- package/src/auth/ChangePassword/ChangePassword.stories.tsx +1 -8
- package/src/auth/Login/Login.stories.tsx +1 -6
- package/src/auth/Logout/Logout.stories.tsx +3 -0
- package/src/auth/Register/Register.stories.tsx +3 -7
- package/src/auth/ResetPassword/ResetPassword.stories.tsx +1 -8
- package/src/auth/Social/Social.stories.tsx +1 -6
- package/src/collapsible-input-group/CollapsibleInputGroup.stories.tsx +72 -4
- package/src/events/edit-event-modal/component/EditEventForm/EditEventForm.stories.tsx +2 -1
- package/src/events/edit-recurrent-event-modal/EditRecurrentEventModal.stories.tsx +3 -2
- package/src/events/event-card/EventCard.stories.tsx +3 -2
- package/src/events/event-statistic-modal/EventStatisticModal.stories.tsx +2 -1
- package/src/events/event-venue-map/EventVenueMap.stories.tsx +8 -1
- package/src/iframe/ProductWithModifierModal/ModifierSetModal/ProductWithModifierSetModal.tsx +3 -3
- package/src/iframe/ProductWithModifierModal/ModifierSetModal/controll/ModifierSetControll.tsx +2 -2
- package/src/iframe/ProductWithModifierModal/ModifierSetModal/controll/ProductControll.tsx +1 -1
- package/src/iframe/custom-fields/components/CustomDateField.stories.tsx +3 -2
- package/src/iframe/event/event-card/IframeEventCard.stories.tsx +7 -5
- package/src/iframe/event/event-card/IframeEventCards.stories.tsx +7 -6
- package/src/iframe/event/event-description/EventDescription.stories.tsx +3 -2
- package/src/iframe/event/event-venue-map/IframeEventVenueMap.stories.tsx +3 -2
- package/src/iframe/external-modal/ExternalModal.stories.tsx +3 -0
- package/src/iframe/order-process/components/CalendarStepsForm/CalendarStepsForm.stories.tsx +5 -0
- package/src/iframe/order-process/components/NavigationSteps/NavigationSteps.stories.tsx +2 -1
- package/src/iframe/order-process/components/PaymentCard/PaymentCard.stories.tsx +2 -1
- package/src/iframe/page/Page.stories.tsx +9 -8
- package/src/iframe/payment/order-items-table/OrderItemsTable.stories.tsx +2 -1
- package/src/iframe/payment/payment-status-header/PaymentStatusHeader.stories.tsx +2 -1
- package/src/index.ts +2 -0
- package/src/logo/Logo.stories.tsx +17 -14
- package/src/modals/confirmation/Confirmation.stories.tsx +2 -1
- package/src/notification/components/NotificationPlaceholders.stories.tsx +4 -0
- package/src/notification/components/NotificationPlaceholders.tsx +1 -1
- package/src/product-set/form/ProductCategoriesControl.tsx +12 -6
- package/src/product-set/form/ProductSetForm.stories.tsx +13 -4
- package/src/provider/location-input/LocationInput.stories.tsx +47 -2
- package/src/provider/provider-details-input/ProviderDetailsInput.stories.tsx +10 -1
- package/src/provider/provider-details-input/ProviderDetailsInput.tsx +1 -1
- package/src/provider/provider-form/ProviderForm.stories.tsx +46 -0
- package/src/provider/venue-form/VenueForm.stories.tsx +49 -0
- package/src/recurrence-input/RecurrenceEndInput.tsx +7 -5
- package/src/recurrence-input/RecurrenceInput.stories.tsx +3 -0
- package/src/resource/form/ResourceForm.stories.tsx +2 -1
- package/src/sales/guest-profile/previous-bookings/PreviousBookings.stories.tsx +2 -1
- package/src/sales/life-time-sales/LifeTimeSalesChart.stories.tsx +2 -1
- package/src/sales/manual-booking/select-date-type-control/SelectDateTypeControl.stories.tsx +2 -1
- package/src/sales/manual-booking/select-menu/SelectMenu.stories.tsx +2 -1
- package/src/sales/modals/payment-modal/PaymentModal.stories.tsx +3 -2
- package/src/sales/modals/refund-modal/RefundModal.stories.tsx +5 -4
- package/src/sales/payment-form/SalePaymentForm.stories.tsx +3 -2
- package/src/setting/dashboard/snippet-templates/card/SnippetTemplateCard.stories.tsx +2 -1
- package/src/snippet/snippet-template/SnippetTemplate.stories.tsx +2 -1
- package/src/snippet/snippet-template/form/SnippetTemplateForm.stories.tsx +4 -2
- package/src/sortable-tree/SortableTree.tsx +1 -1
- package/src/sortable-tree/SortableTreeItem.stories.tsx +12 -14
- package/src/styles/overrides/_functions.scss +1 -1
- package/src/table/Table.stories.tsx +3 -24
- package/src/tiptap-editor/TipTapMenu/TipTapMenu.stories.tsx +27 -3
- package/src/v2/components/Alert/Alert.scss +186 -0
- package/src/v2/components/Alert/Alert.stories.tsx +176 -0
- package/src/v2/components/Alert/Alert.tsx +62 -0
- package/src/v2/components/Alert/assets/alert-icon.svg +3 -0
- package/src/v2/components/Alert/assets/error-icon.svg +3 -0
- package/src/v2/components/Alert/assets/info-icon.svg +3 -0
- package/src/v2/components/Alert/assets/success-icon.svg +3 -0
- package/src/v2/components/Alert/index.ts +2 -0
- package/src/v2/components/Button/Button.scss +19 -0
- package/src/v2/components/Button/Button.stories.tsx +93 -0
- package/src/v2/components/Button/Button.tsx +37 -0
- package/src/v2/components/Button/index.ts +3 -0
- package/src/v2/components/Colors/Colors.scss +64 -0
- package/src/v2/components/Colors/Colors.stories.tsx +143 -0
- package/src/v2/components/Colors/Colors.tsx +51 -0
- package/src/v2/components/Colors/ColorsAliases.stories.tsx +285 -0
- package/src/v2/components/Colors/Sizes.stories.tsx +141 -0
- package/src/v2/components/Colors/index.ts +2 -0
- package/src/v2/components/Typography/Typography.scss +72 -0
- package/src/v2/components/Typography/Typography.stories.tsx +266 -0
- package/src/v2/components/Typography/Typography.tsx +56 -0
- package/src/v2/components/Typography/index.ts +2 -0
- package/src/v2/hooks/useAuth.ts +40 -0
- package/src/v2/index.ts +105 -0
- package/src/v2/navigation/FigmasAdminSideBar/FigmasAdminSideBar.scss +148 -0
- package/src/v2/navigation/FigmasAdminSideBar/FigmasAdminSideBar.stories.tsx +132 -0
- package/src/v2/navigation/FigmasAdminSideBar/FigmasAdminSideBar.tsx +272 -0
- package/src/v2/navigation/FigmasAdminSideBar/index.ts +2 -0
- package/src/v2/navigation/FigmasSideBar/FigmasSideBar.scss +214 -0
- package/src/v2/navigation/FigmasSideBar/FigmasSideBar.stories.tsx +164 -0
- package/src/v2/navigation/FigmasSideBar/FigmasSideBar.tsx +310 -0
- package/src/v2/navigation/FigmasSideBar/index.ts +2 -0
- package/src/v2/navigation/FigmasTopHat/FigmasTopHat.scss +291 -0
- package/src/v2/navigation/FigmasTopHat/FigmasTopHat.stories.tsx +201 -0
- package/src/v2/navigation/FigmasTopHat/FigmasTopHat.tsx +158 -0
- package/src/v2/navigation/FigmasTopHat/assets/bell-icon.svg +3 -0
- package/src/v2/navigation/FigmasTopHat/assets/disc-icon.svg +4 -0
- package/src/v2/navigation/FigmasTopHat/assets/inbox-icon.svg +3 -0
- package/src/v2/navigation/FigmasTopHat/assets/logo-desktop-1.svg +3 -0
- package/src/v2/navigation/FigmasTopHat/assets/logo-desktop-2.svg +4 -0
- package/src/v2/navigation/FigmasTopHat/assets/user-icon.svg +4 -0
- package/src/v2/navigation/FigmasTopHat/index.ts +2 -0
- package/src/v2/navigation/Navigation/Navigation.scss +15 -0
- package/src/v2/navigation/Navigation/Navigation.stories.tsx +137 -0
- package/src/v2/navigation/Navigation/Navigation.tsx +127 -0
- package/src/v2/navigation/Navigation/index.ts +3 -0
- package/src/v2/navigation/NavigationItem/NavigationItem.scss +61 -0
- package/src/v2/navigation/NavigationItem/NavigationItem.stories.tsx +110 -0
- package/src/v2/navigation/NavigationItem/NavigationItem.tsx +38 -0
- package/src/v2/navigation/NavigationItem/index.ts +3 -0
- package/src/v2/navigation/NavigationSection/NavigationSection.scss +20 -0
- package/src/v2/navigation/NavigationSection/NavigationSection.tsx +19 -0
- package/src/v2/navigation/NavigationSection/index.ts +3 -0
- package/src/v2/navigation/SideBarToggleLarge/SideBarToggleLarge.scss +64 -0
- package/src/v2/navigation/SideBarToggleLarge/SideBarToggleLarge.stories.tsx +183 -0
- package/src/v2/navigation/SideBarToggleLarge/SideBarToggleLarge.tsx +30 -0
- package/src/v2/navigation/SideBarToggleLarge/assets/sidebar-icon.svg +5 -0
- package/src/v2/navigation/SideBarToggleLarge/index.ts +2 -0
- package/src/v2/navigation/SidebarUserElement/SidebarUserElement.scss +148 -0
- package/src/v2/navigation/SidebarUserElement/SidebarUserElement.stories.tsx +342 -0
- package/src/v2/navigation/SidebarUserElement/SidebarUserElement.tsx +113 -0
- package/src/v2/navigation/SidebarUserElement/index.ts +2 -0
- package/src/v2/navigation/SidebarWithAuth.stories.tsx +208 -0
- package/src/v2/navigation/SidebarWithAuth.tsx +49 -0
- package/src/v2/navigation/TopHatControlDisc/TopHatControlDisc.scss +57 -0
- package/src/v2/navigation/TopHatControlDisc/TopHatControlDisc.stories.tsx +153 -0
- package/src/v2/navigation/TopHatControlDisc/TopHatControlDisc.tsx +30 -0
- package/src/v2/navigation/TopHatControlDisc/assets/disc-icon.svg +4 -0
- package/src/v2/navigation/TopHatControlDisc/index.ts +2 -0
- package/src/v2/navigation/config.tsx +150 -0
- package/src/v2/navigation/icons/index.tsx +72 -0
- package/src/v2/navigation/index.ts +23 -0
- package/src/v2/styles/components/Button.scss +168 -0
- package/src/v2/styles/form/NewInput.scss +172 -0
- package/src/v2/styles/index.scss +5 -0
- package/src/v2/styles/navigation/Navigation.scss +17 -0
- package/src/v2/styles/navigation/NavigationItem.scss +86 -0
- package/src/v2/styles/navigation/NavigationSection.scss +26 -0
- package/src/v2/styles/navigation/_index.scss +9 -0
- package/src/v2/styles/tokens/_aliases.scss +199 -0
- package/src/v2/styles/tokens/_colors.scss +121 -0
- package/src/v2/styles/tokens/_sizes.scss +122 -0
- package/src/v2/styles/tokens/_status.scss +108 -0
- package/src/v2/styles/tokens/_typography.scss +146 -0
- package/src/v2/types/navigation.ts +17 -0
- package/src/zone/form/ZoneForm.stories.tsx +2 -1
- package/styles/overrides/_functions.scss +6 -0
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import Skeleton from "react-loading-skeleton";
|
|
3
|
+
import "react-loading-skeleton/dist/skeleton.css";
|
|
4
|
+
import "./Maintenance.scss";
|
|
5
|
+
|
|
6
|
+
export const SkeletonSidebar: React.FC = () => {
|
|
7
|
+
const skeletonItems = Array.from({ length: 10 });
|
|
8
|
+
|
|
9
|
+
return (
|
|
10
|
+
<div className="figmas-admin-sidebar figmas-admin-sidebar--expanded">
|
|
11
|
+
<div className="figmas-admin-sidebar__top">
|
|
12
|
+
<div className="figmas-admin-sidebar__links">
|
|
13
|
+
<div className="figmas-admin-sidebar__section-label">
|
|
14
|
+
<svg xmlns="http://www.w3.org/2000/svg" width="124" height="32" viewBox="0 0 124 32" fill="none">
|
|
15
|
+
<path d="M9.52321 6.23162C11.6312 4.06995 12.6151 3.51115 13.7979 3.14351C14.9807 2.77588 16.1903 2.77588 17.3731 3.14351C18.5559 3.51115 19.5398 4.06995 21.6478 6.23162L25.0943 9.76587C27.2023 11.9275 27.7473 12.9365 28.1058 14.1494C28.4643 15.3623 28.4643 16.6028 28.1058 17.8157C27.7473 19.0286 27.2023 20.0375 25.0943 22.1992L21.6478 25.7335C19.5398 27.8951 18.556 28.4539 17.3731 28.8216C16.1903 29.1892 14.9807 29.1892 13.7979 28.8216C12.6151 28.4539 11.6312 27.8951 9.52321 25.7335L6.07672 22.1992C3.96872 20.0375 3.4238 19.0286 3.06529 17.8157C2.70679 16.6028 2.70679 15.3623 3.06529 14.1494C3.4238 12.9365 3.96872 11.9275 6.07672 9.76587L9.52321 6.23162ZM11.4177 8.07385L7.92219 11.6583C6.27888 13.3435 5.82902 14.0256 5.56297 14.9257C5.35408 15.6325 5.35408 16.3326 5.56297 17.0394C5.82636 17.9305 6.2699 18.608 7.87325 20.2565L11.4177 23.8912C13.0253 25.5354 13.6859 25.9902 14.555 26.2603C15.2442 26.4745 15.9269 26.4745 16.6161 26.2603C17.4939 25.9875 18.1591 25.5262 19.8024 23.841L23.2489 20.3068C24.8922 18.6216 25.342 17.9395 25.6081 17.0394C25.817 16.3326 25.817 15.6325 25.6081 14.9257C25.342 14.0256 24.8922 13.3435 23.2489 11.6583L19.8024 8.12408C18.1591 6.43893 17.4939 5.97761 16.6161 5.70479C15.9269 5.49057 15.2442 5.49057 14.555 5.70479C13.6859 5.97488 13.0253 6.42972 11.4177 8.07385ZM20.0103 14.7102C20.711 13.9916 21.8471 13.9916 22.5478 14.7102C23.2486 15.4287 23.2486 16.5937 22.5478 17.3123L16.8961 23.108C16.1954 23.8265 15.0593 23.8265 14.3586 23.108L13.5334 22.2618C13.3792 22.1036 13.3393 22.0298 13.3131 21.941C13.2868 21.8523 13.2868 21.7615 13.3131 21.6728C13.3393 21.584 13.3792 21.5102 13.5334 21.352L20.0103 14.7102ZM10.575 17.927C10.7437 17.7539 10.9728 17.6569 11.2114 17.6575L14.5124 17.6653C14.6926 17.6657 14.8383 17.8159 14.8379 18.0006C14.8377 18.0874 14.8047 18.1706 14.7458 18.2329L14.5717 18.4168L12.5131 20.509C12.3218 20.7035 12.0131 20.7028 11.8226 20.5074L10.575 19.228C10.2246 18.8687 10.2246 18.2862 10.575 17.927Z" fill="#D2D5E3" />
|
|
16
|
+
<path d="M51.535 11.5924C53.1724 11.5924 54.4499 12.0267 55.3675 12.8952C56.285 13.7637 56.7438 14.9579 56.7438 16.4778V18.7577C56.7438 20.35 56.2815 21.6057 55.3569 22.5249C54.4323 23.4441 53.1583 23.9037 51.535 23.9037C49.9117 23.9037 48.6377 23.4694 47.7131 22.6009C46.7885 21.7324 46.3262 20.5382 46.3262 19.0183V16.7384C46.3262 15.1461 46.7885 13.8904 47.7131 12.9712C48.6377 12.052 49.9117 11.5924 51.535 11.5924ZM63.1171 11.5924C64.7546 11.5924 66.0321 12.0267 66.9496 12.8952C67.8672 13.7637 68.3259 14.9579 68.3259 16.4778V18.7577C68.3259 20.35 67.8636 21.6057 66.939 22.5249C66.0144 23.4441 64.7405 23.9037 63.1171 23.9037C61.4938 23.9037 60.2198 23.4694 59.2952 22.6009C58.3706 21.7324 57.9083 20.5382 57.9083 19.0183V16.7384C57.9083 15.1461 58.3706 13.8904 59.2952 12.9712C60.2198 12.052 61.4938 11.5924 63.1171 11.5924ZM86.0062 11.5924C87.5166 11.5924 88.7235 12.0448 89.6269 12.9495C90.5303 13.8542 90.982 15.1461 90.982 16.8252V17.8458C90.982 18.1932 90.922 18.4175 90.8021 18.5189C90.6821 18.6202 90.4386 18.6709 90.0716 18.6709H84.164V18.7577C84.164 19.6118 84.2981 20.2306 84.5663 20.6142C84.8345 20.9978 85.3498 21.1896 86.112 21.1896C86.479 21.1896 86.7861 21.1389 87.0331 21.0376C87.2801 20.9363 87.4813 20.7336 87.6366 20.4296C87.7071 20.2849 87.7954 20.1763 87.9012 20.1039C88.0071 20.0315 88.1941 19.9954 88.4623 19.9954H90.1139C90.3962 19.9954 90.5868 20.0496 90.6856 20.1582C90.7844 20.2668 90.8338 20.4369 90.8338 20.6685C90.8338 20.9869 90.7597 21.2945 90.6115 21.5913C90.4633 21.888 90.2974 22.145 90.1139 22.3621C89.6622 22.8977 89.0658 23.2885 88.3247 23.5346C87.5836 23.7807 86.7967 23.9037 85.9638 23.9037C84.3264 23.9037 83.063 23.4803 82.1737 22.6335C81.2844 21.7867 80.8397 20.5237 80.8397 18.8446V16.7818C80.8397 15.1461 81.295 13.8723 82.2054 12.9603C83.1159 12.0484 84.3828 11.5924 86.0062 11.5924ZM101.548 8.14001C101.915 8.14001 102.158 8.1943 102.278 8.30286C102.398 8.41143 102.458 8.63218 102.458 8.96511V18.9966C102.458 20.5165 101.989 21.7143 101.05 22.5901C100.112 23.4658 98.8235 23.9037 97.186 23.9037C95.5768 23.9037 94.3169 23.4658 93.4065 22.5901C92.496 21.7143 92.0407 20.4948 92.0407 18.9314V16.5647C92.0407 15.0303 92.436 13.818 93.2265 12.9277C94.017 12.0375 95.0968 11.5924 96.4661 11.5924C97.6377 11.5924 98.5129 11.8891 99.0917 12.4826V8.96511C99.0917 8.63218 99.1516 8.41143 99.2716 8.30286C99.3916 8.1943 99.6351 8.14001 100.002 8.14001H101.548ZM115.569 8.7303C115.936 8.7303 116.179 8.78458 116.299 8.89315C116.419 9.00171 116.479 9.22246 116.479 9.5554V11.9221H118.025C118.35 11.9221 118.569 11.9764 118.681 12.085C118.794 12.1935 118.851 12.3998 118.851 12.7038V13.7894C118.851 14.1224 118.794 14.3468 118.681 14.4626C118.569 14.5784 118.35 14.6363 118.025 14.6363H116.479V19.196C116.479 19.7171 116.564 20.0935 116.733 20.3251C116.903 20.5567 117.185 20.6725 117.58 20.6725H117.94C118.293 20.6725 118.526 20.7268 118.639 20.8353C118.752 20.9439 118.809 21.1647 118.809 21.4976V22.8221C118.809 23.1405 118.752 23.3541 118.639 23.4626C118.526 23.5712 118.286 23.6255 117.919 23.6255H116.882C115.527 23.6255 114.56 23.3215 113.981 22.7135C113.402 22.1056 113.113 21.0995 113.113 19.6954V9.5554C113.113 9.22246 113.173 9.00171 113.293 8.89315C113.413 8.78458 113.656 8.7303 114.023 8.7303H115.569ZM40.0375 8.14001C43.2701 8.14001 44.8864 9.4428 44.8864 12.0484V12.3306C44.8864 13.0978 44.7064 13.7746 44.3464 14.3608C43.9865 14.9471 43.5101 15.3415 42.9172 15.5442C43.623 15.7179 44.1912 16.1087 44.6217 16.7167C45.0522 17.3246 45.2675 18.0339 45.2675 18.8446V19.192C45.2675 20.7119 44.8229 21.8265 43.9335 22.5358C43.0442 23.2451 41.6397 23.5997 39.7199 23.5997H35.3158C34.9487 23.5997 34.7052 23.5454 34.5853 23.4369C34.4653 23.3283 34.4053 23.1076 34.4053 22.7746V8.96511C34.4053 8.63218 34.4653 8.41143 34.5853 8.30286C34.7052 8.1943 34.9487 8.14001 35.3158 8.14001H40.0375ZM72.3066 8.14001C72.6736 8.14001 72.9171 8.1943 73.0371 8.30286C73.1571 8.41143 73.2171 8.63218 73.2171 8.96511V16.2607L76.372 12.5043C76.612 12.2148 76.7814 12.0411 76.8802 11.9832C76.979 11.9253 77.1413 11.8964 77.3672 11.8964H79.5058C79.8869 11.8964 80.0775 12.0556 80.0775 12.3741C80.0775 12.5333 79.9998 12.6925 79.8445 12.8518L76.7955 16.2824L80.3527 22.6444C80.4656 22.847 80.5221 23.0135 80.5221 23.1438C80.5221 23.4477 80.3104 23.5997 79.8869 23.5997H77.8118C77.5578 23.5997 77.3637 23.5563 77.2296 23.4694C77.0955 23.3826 76.9649 23.2234 76.8378 22.9918L74.5299 18.6709L73.2171 20.1473V22.7746C73.2171 23.1076 73.1571 23.3283 73.0371 23.4369C72.9171 23.5454 72.6736 23.5997 72.3066 23.5997H70.8456C70.4786 23.5997 70.2351 23.5454 70.1151 23.4369C69.9951 23.3283 69.9351 23.1076 69.9351 22.7746V8.96511C69.9351 8.63218 69.9951 8.41143 70.1151 8.30286C70.2351 8.1943 70.4786 8.14001 70.8456 8.14001H72.3066ZM110.187 14.2522C110.554 14.2522 110.797 14.3065 110.917 14.4151C111.037 14.5237 111.097 14.7444 111.097 15.0773L111.076 22.7529C111.076 23.0859 111.016 23.3066 110.896 23.4152C110.776 23.5237 110.533 23.578 110.166 23.578H108.62C108.253 23.578 108.009 23.5237 107.889 23.4152C107.769 23.3066 107.709 23.0859 107.709 22.7529L107.731 15.0773C107.731 14.7444 107.791 14.5237 107.911 14.4151C108.031 14.3065 108.274 14.2522 108.641 14.2522H110.187ZM51.5985 14.3065C50.9915 14.3065 50.5222 14.5056 50.1904 14.9036C49.8587 15.3017 49.6929 15.8771 49.6929 16.6298V18.8663C49.6929 20.4151 50.2857 21.1896 51.4715 21.1896C52.0926 21.1896 52.5655 20.9905 52.8901 20.5925C53.2148 20.1944 53.3771 19.619 53.3771 18.8663V16.6298C53.3771 15.081 52.7843 14.3065 51.5985 14.3065ZM63.1807 14.3065C62.5737 14.3065 62.1043 14.5056 61.7726 14.9036C61.4409 15.3017 61.275 15.8771 61.275 16.6298V18.8663C61.275 20.4151 61.8679 21.1896 63.0536 21.1896C63.6747 21.1896 64.1476 20.9905 64.4723 20.5925C64.7969 20.1944 64.9593 19.619 64.9593 18.8663V16.6298C64.9593 15.081 64.3664 14.3065 63.1807 14.3065ZM97.186 14.3065C96.0003 14.3065 95.4074 15.081 95.4074 16.6298V18.8663C95.4074 19.619 95.5662 20.1944 95.8838 20.5925C96.2014 20.9905 96.6637 21.1896 97.2707 21.1896C98.4847 21.1896 99.0917 20.4151 99.0917 18.8663V16.6298C99.0917 15.8771 98.9293 15.3017 98.6047 14.9036C98.28 14.5056 97.8071 14.3065 97.186 14.3065ZM40.0587 17.0858H37.8143V20.625H39.8258C41.0821 20.625 41.7103 20.0967 41.7103 19.04V18.6491C41.7103 18.1425 41.5691 17.7553 41.2868 17.4875C41.0045 17.2197 40.5951 17.0858 40.0587 17.0858ZM85.8791 14.2414C85.3709 14.2414 84.9686 14.4006 84.6722 14.7191C84.3758 15.0375 84.2134 15.5804 84.1852 16.3476H87.5942C87.5801 15.6238 87.4425 15.0918 87.1813 14.7516C86.9202 14.4115 86.4861 14.2414 85.8791 14.2414ZM39.5929 11.1147H37.8143V14.3282H39.7411C40.828 14.3282 41.3715 13.8288 41.3715 12.83V12.4826C41.3715 11.5707 40.7786 11.1147 39.5929 11.1147ZM109.693 8.7303C110.172 8.7303 110.346 8.78233 110.521 8.88003C110.696 8.97774 110.834 9.12111 110.928 9.3038C111.021 9.48649 111.071 9.66769 111.071 10.1674V10.9844C111.071 11.4841 111.021 11.6653 110.928 11.848C110.834 12.0307 110.696 12.1741 110.521 12.2718C110.346 12.3695 110.172 12.4215 109.693 12.4215H108.91C108.431 12.4215 108.257 12.3695 108.082 12.2718C107.906 12.1741 107.769 12.0307 107.675 11.848C107.582 11.6653 107.532 11.4841 107.532 10.9844V10.1674C107.532 9.66769 107.582 9.48649 107.675 9.3038C107.769 9.12111 107.906 8.97774 108.082 8.88003C108.257 8.78233 108.431 8.7303 108.91 8.7303H109.693Z" fill="#D2D5E3" />
|
|
17
|
+
</svg>
|
|
18
|
+
</div>
|
|
19
|
+
|
|
20
|
+
<div className="figmas-admin-sidebar__section-label">
|
|
21
|
+
<div className="figmas-admin-sidebar__link-item">
|
|
22
|
+
<svg
|
|
23
|
+
xmlns="http://www.w3.org/2000/svg"
|
|
24
|
+
width="47"
|
|
25
|
+
height="47"
|
|
26
|
+
viewBox="0 0 47 47"
|
|
27
|
+
fill="none"
|
|
28
|
+
>
|
|
29
|
+
<circle cx="23.5" cy="23.5" r="23" fill="white" stroke="#E8E9EF" />
|
|
30
|
+
</svg>
|
|
31
|
+
|
|
32
|
+
<div className="venue-skeleton-items">
|
|
33
|
+
<Skeleton className="venue-skeleton-item" width={87} height={15} />
|
|
34
|
+
<h6 className="venue-name">Venue ID:</h6>
|
|
35
|
+
</div>
|
|
36
|
+
</div>
|
|
37
|
+
</div>
|
|
38
|
+
|
|
39
|
+
{skeletonItems.map((_, index) => (
|
|
40
|
+
<div className="figmas-admin-sidebar__section-label" key={index}>
|
|
41
|
+
<div className="figmas-admin-sidebar__link-item">
|
|
42
|
+
<Skeleton
|
|
43
|
+
circle
|
|
44
|
+
className="venue-skeleton-item"
|
|
45
|
+
width={24}
|
|
46
|
+
height={24}
|
|
47
|
+
/>
|
|
48
|
+
<Skeleton className="skeleton-item" width={87} height={15} />
|
|
49
|
+
</div>
|
|
50
|
+
</div>
|
|
51
|
+
))}
|
|
52
|
+
</div>
|
|
53
|
+
</div>
|
|
54
|
+
</div>
|
|
55
|
+
);
|
|
56
|
+
};
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { Meta, StoryObj } from '@storybook/react'
|
|
2
|
+
import { PageNotFound } from './PageNotFound'
|
|
3
|
+
export default {
|
|
4
|
+
title: 'Maintenance/Page Not Found',
|
|
5
|
+
component: PageNotFound,
|
|
6
|
+
parameters: {
|
|
7
|
+
layout: 'fullscreen',
|
|
8
|
+
},
|
|
9
|
+
} as Meta
|
|
10
|
+
|
|
11
|
+
type Story = StoryObj<typeof PageNotFound>
|
|
12
|
+
|
|
13
|
+
export const Desktop: Story = {
|
|
14
|
+
parameters: {
|
|
15
|
+
viewport: { defaultViewport: 'desktop' },
|
|
16
|
+
},
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
export const Mobile: Story = {
|
|
20
|
+
parameters: {
|
|
21
|
+
viewport: { defaultViewport: 'mobile1' },
|
|
22
|
+
},
|
|
23
|
+
}
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
//import { SkeletonSidebar } from "../Maintenance/SkeletonSidebar";
|
|
3
|
+
import { MaintenancePage } from "../Maintenance/MaintenancePage";
|
|
4
|
+
|
|
5
|
+
export type AppContext = 'dashboard' | 'app' | 'admin' | 'iframe'
|
|
6
|
+
|
|
7
|
+
interface PageNotFoundProps {
|
|
8
|
+
app?: AppContext;
|
|
9
|
+
buttonLabel?: string;
|
|
10
|
+
onButtonClick?: () => void;
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
export const PageNotFound: React.FC<PageNotFoundProps> = ({ app, buttonLabel, onButtonClick }) => {
|
|
14
|
+
const defaultLabels: Record<AppContext, string> = {
|
|
15
|
+
dashboard: 'Back to Dashboard',
|
|
16
|
+
app: 'Back to App',
|
|
17
|
+
admin: 'Back to Admin',
|
|
18
|
+
iframe: 'Back',
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
const resolvedLabel = buttonLabel ?? (app ? defaultLabels[app] : 'Back')
|
|
22
|
+
const handleClick = onButtonClick ?? (() => (window.location.href = "/"))
|
|
23
|
+
|
|
24
|
+
return (
|
|
25
|
+
<div>
|
|
26
|
+
<div className="page-not-found-container">
|
|
27
|
+
{/* We are not using the sidebar for now. It will be enabled when we have the sidebar ready.
|
|
28
|
+
<SkeletonSidebar />
|
|
29
|
+
*/}
|
|
30
|
+
<MaintenancePage
|
|
31
|
+
svg={<svg xmlns="http://www.w3.org/2000/svg" width="64" height="64" viewBox="0 0 64 64" fill="none">
|
|
32
|
+
<path d="M18 50H22V48H40V44H44V48H48V52H22V54H18V52H15.9863C14.8893 51.9997 14.0001 51.0894 14 50.0166V44H18V50ZM22 44H18V40H22V44ZM49.999 44H46V38H49.999V44ZM18 40H14V30H18V40ZM54 38H50V34H54V38ZM46 34H42V30H46V34ZM14 30H10V26H14V30ZM49.999 22V30H46V24H38V22H40V18H38V16H36V12H40L49.999 22ZM22 14H26V12H32V16H26V18H22V16H16V20H18V26H14V20H12V16H14V13.9834C14.0001 12.888 14.8951 12 15.9971 12H22V14ZM38 22H34V18H38V22Z" fill="#626A90" />
|
|
33
|
+
</svg>}
|
|
34
|
+
title="Page not found."
|
|
35
|
+
subheading="It looks like that page doesn’t exist."
|
|
36
|
+
body="Typing in the URL again or retrace your steps. If you continue to experience problems contact your account manager."
|
|
37
|
+
buttonLabel={resolvedLabel}
|
|
38
|
+
onButtonClick={handleClick}
|
|
39
|
+
/>
|
|
40
|
+
</div>
|
|
41
|
+
</div>
|
|
42
|
+
)
|
|
43
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { PageNotFound } from './PageNotFound'
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { Meta, StoryObj } from '@storybook/react'
|
|
2
|
+
import { UnderMaintenance } from './UnderMaintenance'
|
|
3
|
+
export default {
|
|
4
|
+
title: 'Maintenance/Under Maintenance',
|
|
5
|
+
component: UnderMaintenance,
|
|
6
|
+
parameters: {
|
|
7
|
+
layout: 'fullscreen',
|
|
8
|
+
},
|
|
9
|
+
} as Meta
|
|
10
|
+
|
|
11
|
+
type Story = StoryObj<typeof UnderMaintenance>
|
|
12
|
+
|
|
13
|
+
export const Desktop: Story = {
|
|
14
|
+
parameters: {
|
|
15
|
+
viewport: { defaultViewport: 'desktop' },
|
|
16
|
+
},
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
export const Mobile: Story = {
|
|
20
|
+
parameters: {
|
|
21
|
+
viewport: { defaultViewport: 'mobile1' },
|
|
22
|
+
},
|
|
23
|
+
}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import './UnderMaintenance.scss'
|
|
3
|
+
import { SkeletonSidebar } from "../Maintenance/SkeletonSidebar";
|
|
4
|
+
import { MaintenancePage } from "../Maintenance/MaintenancePage";
|
|
5
|
+
export const UnderMaintenance: React.FC = () => {
|
|
6
|
+
return (
|
|
7
|
+
<div>
|
|
8
|
+
<div className="under-maintenance-container" style={{ display: 'flex', height: '100vh', width: '100vw', background: 'var(--surfaces-main-background-secondary, #FFFFFF)' }}>
|
|
9
|
+
<SkeletonSidebar />
|
|
10
|
+
<MaintenancePage
|
|
11
|
+
svg={<svg xmlns="http://www.w3.org/2000/svg" width="64" height="64" viewBox="0 0 64 64" fill="none">
|
|
12
|
+
<path d="M32 12C43.0456 12 52 20.9543 52 32C52 43.0456 43.0456 52 32 52C20.9543 52 12 43.0456 12 32C12 20.9543 20.9543 12 32 12ZM32 16C23.1634 16 16 23.1634 16 32C16 40.8366 23.1634 48 32 48C40.8366 48 48 40.8366 48 32C48 23.1634 40.8366 16 32 16ZM32 32C37.5228 32 42 36.4772 42 42H38C38 38.6863 35.3137 36 32 36C28.6863 36 26 38.6863 26 42H22C22 36.4772 26.4772 32 32 32ZM27 24C28.6569 24 30 25.3431 30 27C30 28.6569 28.6569 30 27 30C25.3431 30 24 28.6569 24 27C24 25.3431 25.3431 24 27 24ZM37 24C38.6569 24 40 25.3431 40 27C40 28.6569 38.6569 30 37 30C35.3431 30 34 28.6569 34 27C34 25.3431 35.3431 24 37 24Z" fill="#626A90" />
|
|
13
|
+
</svg>}
|
|
14
|
+
title="Oops, we didn’t want you to see us like this."
|
|
15
|
+
subheading="We are undergoing maintenance at the moment and will be back online shortly. Sorry for any inconvenience."
|
|
16
|
+
/>
|
|
17
|
+
</div>
|
|
18
|
+
|
|
19
|
+
</div>
|
|
20
|
+
)
|
|
21
|
+
|
|
22
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { UnderMaintenance } from './UnderMaintenance'
|
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
import { useEffect } from 'react'
|
|
2
2
|
import { Meta, Story } from '@storybook/react-vite'
|
|
3
|
+
import { createBrowserHistory } from 'history'
|
|
4
|
+
import history from '@licklist/plugins/dist/services/History/History'
|
|
3
5
|
import UserProvider from '@licklist/plugins/dist/context/user/providers/UserProvider'
|
|
4
6
|
import InviteProvider from '@licklist/plugins/dist/context/user/providers/InviteProvider'
|
|
5
7
|
import useUser from '@licklist/plugins/dist/context/user/hooks/useUser'
|
|
@@ -10,16 +12,48 @@ export default {
|
|
|
10
12
|
title: 'Auth',
|
|
11
13
|
} as Meta
|
|
12
14
|
|
|
15
|
+
// Initialize history synchronously before the component renders
|
|
16
|
+
if (history && !history.location) {
|
|
17
|
+
try {
|
|
18
|
+
const browserHistory = createBrowserHistory()
|
|
19
|
+
Object.assign(history, {
|
|
20
|
+
location: browserHistory.location,
|
|
21
|
+
action: browserHistory.action,
|
|
22
|
+
length: browserHistory.length,
|
|
23
|
+
push: browserHistory.push,
|
|
24
|
+
replace: browserHistory.replace,
|
|
25
|
+
go: browserHistory.go,
|
|
26
|
+
goBack: browserHistory.goBack,
|
|
27
|
+
goForward: browserHistory.goForward,
|
|
28
|
+
block: browserHistory.block,
|
|
29
|
+
listen: browserHistory.listen,
|
|
30
|
+
})
|
|
31
|
+
} catch (e) {
|
|
32
|
+
// Fallback: set a basic location
|
|
33
|
+
Object.defineProperty(history, 'location', {
|
|
34
|
+
value: {
|
|
35
|
+
pathname: '/',
|
|
36
|
+
search: '',
|
|
37
|
+
hash: '',
|
|
38
|
+
state: null,
|
|
39
|
+
key: 'default',
|
|
40
|
+
},
|
|
41
|
+
writable: true,
|
|
42
|
+
})
|
|
43
|
+
}
|
|
44
|
+
}
|
|
45
|
+
|
|
13
46
|
export const RouterComponent: Story<RouterProps> = (args) => (
|
|
14
47
|
<Router {...args} />
|
|
15
48
|
)
|
|
49
|
+
RouterComponent.parameters = {
|
|
50
|
+
excludeRouter: true,
|
|
51
|
+
}
|
|
16
52
|
export const AuthorizerComponent: Story<AuthorizerProps> = (args) => (
|
|
17
53
|
<>
|
|
18
54
|
<UserProvider>
|
|
19
55
|
<InviteProvider>
|
|
20
|
-
<
|
|
21
|
-
<AuthorizerWrapper {...args} />
|
|
22
|
-
</Router>
|
|
56
|
+
<AuthorizerWrapper {...args} />
|
|
23
57
|
</InviteProvider>
|
|
24
58
|
</UserProvider>
|
|
25
59
|
</>
|
package/src/auth/Authorizer.tsx
CHANGED
|
@@ -64,6 +64,7 @@ function Authorizer(props: AuthorizerProps) {
|
|
|
64
64
|
ROUTES.CHANGE_PASSWORD,
|
|
65
65
|
ROUTES.FORGOT_PASSWORD,
|
|
66
66
|
ROUTES.SSO_LOGIN,
|
|
67
|
+
ROUTES.MAINTENANCE_PAGE,
|
|
67
68
|
...matchedPathPatternUrls(),
|
|
68
69
|
].includes(pathname)
|
|
69
70
|
) {
|
|
@@ -73,8 +74,8 @@ function Authorizer(props: AuthorizerProps) {
|
|
|
73
74
|
|
|
74
75
|
const route = RouteService.getCurrentRoute()
|
|
75
76
|
|
|
76
|
-
RouteService.
|
|
77
|
-
[ROUTES.
|
|
77
|
+
RouteService.redirectTo(
|
|
78
|
+
[ROUTES.MAINTENANCE_PAGE, `returnUrl=${escape(route)}`].join('?'),
|
|
78
79
|
)
|
|
79
80
|
}, [
|
|
80
81
|
auth.secrets,
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import { Meta, Story } from '@storybook/react-vite'
|
|
2
|
-
import { Router } from '../Router'
|
|
3
2
|
import { ChangePasswordComponent } from './ChangePasswordComponent'
|
|
4
3
|
import {
|
|
5
4
|
ChangePasswordFormComponent,
|
|
@@ -16,10 +15,4 @@ export const ChangePassword: Story<{}> = (args) => (
|
|
|
16
15
|
|
|
17
16
|
export const ChangePasswordForm: Story<ChangePasswordFormComponentProps> = (
|
|
18
17
|
args,
|
|
19
|
-
) =>
|
|
20
|
-
<>
|
|
21
|
-
<Router>
|
|
22
|
-
<ChangePasswordFormComponent {...args} />
|
|
23
|
-
</Router>
|
|
24
|
-
</>
|
|
25
|
-
)
|
|
18
|
+
) => <ChangePasswordFormComponent {...args} />
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import { Meta, StoryObj } from '@storybook/react-vite'
|
|
2
|
-
import { Router } from '../Router'
|
|
3
2
|
import { LoginComponent } from './LoginComponent'
|
|
4
3
|
import {
|
|
5
4
|
LoginFormComponent,
|
|
@@ -29,9 +28,5 @@ export const Login: StoryObj<typeof LoginComponent> = {
|
|
|
29
28
|
}
|
|
30
29
|
|
|
31
30
|
export const LoginForm: StoryObj<LoginFormComponentProps> = {
|
|
32
|
-
render: (args) =>
|
|
33
|
-
<Router>
|
|
34
|
-
<LoginFormComponent {...args} />
|
|
35
|
-
</Router>
|
|
36
|
-
),
|
|
31
|
+
render: (args) => <LoginFormComponent {...args} />,
|
|
37
32
|
}
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import { Meta, Story } from '@storybook/react-vite'
|
|
2
2
|
import { useForm } from 'react-hook-form'
|
|
3
3
|
// TODO: Replace knobs with controls
|
|
4
|
-
import { Router } from '../Router'
|
|
5
4
|
import {
|
|
6
5
|
BirthDateFormComponent,
|
|
7
6
|
BirthDateFormComponentProps,
|
|
@@ -40,15 +39,12 @@ export const BirthDateForm: Story<BirthDateFormComponentProps> = (args) => {
|
|
|
40
39
|
)
|
|
41
40
|
}
|
|
42
41
|
export const RegisterForm: Story<RegisterFormComponentProps> = (args) => (
|
|
43
|
-
|
|
44
|
-
<Router>
|
|
45
|
-
<RegisterFormComponent {...args} />
|
|
46
|
-
</Router>
|
|
47
|
-
</>
|
|
42
|
+
<RegisterFormComponent {...args} />
|
|
48
43
|
)
|
|
49
44
|
|
|
50
45
|
export const Register: Story<{}> = (args) => {
|
|
51
|
-
|
|
46
|
+
// TODO: Replace with Storybook controls
|
|
47
|
+
const showSocialLinks = false
|
|
52
48
|
|
|
53
49
|
return <RegisterComponent {...args} showSocialLinks={showSocialLinks} />
|
|
54
50
|
}
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import { Meta, Story } from '@storybook/react-vite'
|
|
2
|
-
import { Router } from '../Router'
|
|
3
2
|
import { ResetPasswordComponent } from './ResetPasswordComponent'
|
|
4
3
|
import {
|
|
5
4
|
ResetPasswordFormComponent,
|
|
@@ -15,10 +14,4 @@ export const ResetPassword: Story<{}> = (args) => (
|
|
|
15
14
|
)
|
|
16
15
|
export const ResetPasswordForm: Story<ResetPasswordFormComponentProps> = (
|
|
17
16
|
args,
|
|
18
|
-
) =>
|
|
19
|
-
<>
|
|
20
|
-
<Router>
|
|
21
|
-
<ResetPasswordFormComponent {...args} />
|
|
22
|
-
</Router>
|
|
23
|
-
</>
|
|
24
|
-
)
|
|
17
|
+
) => <ResetPasswordFormComponent {...args} />
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import { Meta, Story } from '@storybook/react-vite'
|
|
2
|
-
import { Router } from '../Router'
|
|
3
2
|
import { SocialCallbackComponent } from './SocialCallbackComponent'
|
|
4
3
|
import {
|
|
5
4
|
SocialFormComponent,
|
|
@@ -14,9 +13,5 @@ export const SocialForm: Story<SocialFormComponentProps> = (args) => (
|
|
|
14
13
|
<SocialFormComponent {...args} />
|
|
15
14
|
)
|
|
16
15
|
export const SocialCallback: Story<{}> = (args) => (
|
|
17
|
-
|
|
18
|
-
<Router>
|
|
19
|
-
<SocialCallbackComponent {...args} />
|
|
20
|
-
</Router>
|
|
21
|
-
</>
|
|
16
|
+
<SocialCallbackComponent {...args} />
|
|
22
17
|
)
|
|
@@ -1,5 +1,8 @@
|
|
|
1
|
-
import
|
|
1
|
+
import React from 'react'
|
|
2
|
+
import { Meta, StoryFn } from '@storybook/react-vite'
|
|
2
3
|
import { Accordion } from 'react-bootstrap'
|
|
4
|
+
import { useQueryClient } from 'react-query'
|
|
5
|
+
import { TimeZonePath } from '@licklist/plugins'
|
|
3
6
|
import { FormProvider, useForm } from 'react-hook-form'
|
|
4
7
|
import {
|
|
5
8
|
CategoriesInput,
|
|
@@ -38,6 +41,7 @@ const defaultValues: CategoriesInputValues &
|
|
|
38
41
|
state: 'Essex',
|
|
39
42
|
country: 'GB',
|
|
40
43
|
},
|
|
44
|
+
timeZoneId: '',
|
|
41
45
|
workingHours: [
|
|
42
46
|
{ start: '08:00', end: '18:00', description: 'Description' },
|
|
43
47
|
undefined,
|
|
@@ -45,12 +49,48 @@ const defaultValues: CategoriesInputValues &
|
|
|
45
49
|
],
|
|
46
50
|
}
|
|
47
51
|
|
|
52
|
+
// Mock timezone data for Storybook
|
|
53
|
+
const mockTimezones = [
|
|
54
|
+
{ id: 1, name: 'Europe/London' },
|
|
55
|
+
{ id: 2, name: 'America/New_York' },
|
|
56
|
+
{ id: 3, name: 'America/Los_Angeles' },
|
|
57
|
+
{ id: 4, name: 'Europe/Paris' },
|
|
58
|
+
{ id: 5, name: 'Asia/Tokyo' },
|
|
59
|
+
]
|
|
60
|
+
|
|
61
|
+
// Decorator to mock timezone query data
|
|
62
|
+
const withMockedTimezones = (Story) => {
|
|
63
|
+
const QueryClientWrapper = () => {
|
|
64
|
+
const queryClient = useQueryClient()
|
|
65
|
+
|
|
66
|
+
// Pre-populate the query cache with mock data before render
|
|
67
|
+
// Try multiple possible query key formats
|
|
68
|
+
React.useLayoutEffect(() => {
|
|
69
|
+
const possibleKeys = [
|
|
70
|
+
['/api/timezones', 'all'],
|
|
71
|
+
['timezones', '/api/timezones', 'all'],
|
|
72
|
+
['timeZone', '/api/timezones'],
|
|
73
|
+
['/api/timezones'],
|
|
74
|
+
]
|
|
75
|
+
|
|
76
|
+
possibleKeys.forEach((key) => {
|
|
77
|
+
queryClient.setQueryData(key, mockTimezones)
|
|
78
|
+
})
|
|
79
|
+
}, [queryClient])
|
|
80
|
+
|
|
81
|
+
return <Story />
|
|
82
|
+
}
|
|
83
|
+
|
|
84
|
+
return <QueryClientWrapper />
|
|
85
|
+
}
|
|
86
|
+
|
|
48
87
|
export default {
|
|
49
88
|
title: 'CollapsibleInputGroup',
|
|
50
89
|
component: CollapsibleInputGroup,
|
|
90
|
+
decorators: [withMockedTimezones],
|
|
51
91
|
} as Meta
|
|
52
92
|
|
|
53
|
-
const Template:
|
|
93
|
+
const Template: StoryFn<CollapsibleInputGroupProps> = (args) => {
|
|
54
94
|
const form = useForm({ defaultValues })
|
|
55
95
|
return (
|
|
56
96
|
<FormProvider {...form}>
|
|
@@ -77,13 +117,41 @@ Categories.args = {
|
|
|
77
117
|
label: 'Categories',
|
|
78
118
|
}
|
|
79
119
|
|
|
120
|
+
// Location-specific decorator with better query mocking
|
|
121
|
+
const withLocationMock = (Story) => {
|
|
122
|
+
const LocationWrapper = () => {
|
|
123
|
+
const queryClient = useQueryClient()
|
|
124
|
+
const path = '/api/timezones' as TimeZonePath
|
|
125
|
+
|
|
126
|
+
// Set query data synchronously before first render
|
|
127
|
+
// Try all possible query key formats
|
|
128
|
+
const queryKeys = [
|
|
129
|
+
[path, 'all'],
|
|
130
|
+
['timezones', path, 'all'],
|
|
131
|
+
['timeZone', path],
|
|
132
|
+
[path],
|
|
133
|
+
['useTimeZoneApi', path, 'all'],
|
|
134
|
+
]
|
|
135
|
+
|
|
136
|
+
queryKeys.forEach((key) => {
|
|
137
|
+
queryClient.setQueryData(key, mockTimezones)
|
|
138
|
+
})
|
|
139
|
+
|
|
140
|
+
|
|
141
|
+
return <Story />
|
|
142
|
+
}
|
|
143
|
+
|
|
144
|
+
return <LocationWrapper />
|
|
145
|
+
}
|
|
146
|
+
|
|
80
147
|
export const Location = Template.bind({})
|
|
81
148
|
Location.args = {
|
|
82
149
|
eventKey: 'location',
|
|
83
|
-
children: <LocationInput />,
|
|
84
|
-
description: <LocationInputDescription />,
|
|
150
|
+
children: <LocationInput path={'/api/timezones' as TimeZonePath} />,
|
|
151
|
+
description: <LocationInputDescription path={'/api/timezones' as TimeZonePath} />,
|
|
85
152
|
label: 'Location',
|
|
86
153
|
}
|
|
154
|
+
Location.decorators = [withLocationMock]
|
|
87
155
|
|
|
88
156
|
export const WorkingHours = Template.bind({})
|
|
89
157
|
WorkingHours.args = {
|
|
@@ -1063,7 +1063,8 @@ const defaultProductSets = [
|
|
|
1063
1063
|
|
|
1064
1064
|
export const Default: Story<EditEventFormProps> = (args) => {
|
|
1065
1065
|
// @todo: rewrite story to use actions instead of addon-knobs
|
|
1066
|
-
|
|
1066
|
+
// TODO: Replace with Storybook controls
|
|
1067
|
+
const hasPermission = true
|
|
1067
1068
|
const [editProductSetId, setEditProductSetId] = useState<string>()
|
|
1068
1069
|
return (
|
|
1069
1070
|
<div className='edit-event-dialog'>
|
|
@@ -14,7 +14,8 @@ export default {
|
|
|
14
14
|
|
|
15
15
|
export const Default: Story<EditRecurrentEventModalProps> = (args) => {
|
|
16
16
|
const [isOpen, setIsOpen] = useState(false)
|
|
17
|
-
|
|
17
|
+
// TODO: Replace with Storybook controls
|
|
18
|
+
const isEditRecurrentEventModal = false
|
|
18
19
|
|
|
19
20
|
return (
|
|
20
21
|
<div>
|
|
@@ -31,7 +32,7 @@ export const Default: Story<EditRecurrentEventModalProps> = (args) => {
|
|
|
31
32
|
|
|
32
33
|
Default.args = {
|
|
33
34
|
isOpen: false,
|
|
34
|
-
onHide: () => {},
|
|
35
|
+
onHide: () => { },
|
|
35
36
|
title: 'Some title',
|
|
36
37
|
onSubmit: (data) => console.log(data),
|
|
37
38
|
}
|
|
@@ -10,9 +10,10 @@ export default {
|
|
|
10
10
|
} as Meta
|
|
11
11
|
|
|
12
12
|
export const Default: Story<EventCardProps> = () => {
|
|
13
|
-
|
|
13
|
+
// TODO: Replace with Storybook controls
|
|
14
|
+
const showImage = true
|
|
14
15
|
// @todo: rewrite story to use actions instead of addon-knobs
|
|
15
|
-
const hasPermission =
|
|
16
|
+
const hasPermission = true
|
|
16
17
|
|
|
17
18
|
return (
|
|
18
19
|
<div style={{ maxWidth: '34rem' }}>
|
|
@@ -13,7 +13,8 @@ export default {
|
|
|
13
13
|
|
|
14
14
|
export const Default: Story<EventStatisticModalProps> = (args) => {
|
|
15
15
|
const [isOpen, setIsOpen] = useState(false)
|
|
16
|
-
|
|
16
|
+
// TODO: Replace with Storybook controls
|
|
17
|
+
const isEmptyEventStatistic = false
|
|
17
18
|
|
|
18
19
|
return (
|
|
19
20
|
<div>
|
|
@@ -20,7 +20,8 @@ export const EventVenueMapComponent: Story<EventVenueMapProps> = (args) => {
|
|
|
20
20
|
productUuid: 'product-1',
|
|
21
21
|
},
|
|
22
22
|
])
|
|
23
|
-
|
|
23
|
+
// TODO: Replace with Storybook controls
|
|
24
|
+
const editMode = false
|
|
24
25
|
|
|
25
26
|
return (
|
|
26
27
|
<div style={{ width: window.innerWidth, height: window.innerHeight }}>
|
|
@@ -66,4 +67,10 @@ EventVenueMapComponent.args = {
|
|
|
66
67
|
yCoordinate: 250,
|
|
67
68
|
},
|
|
68
69
|
],
|
|
70
|
+
onPointsChange: (value) => {
|
|
71
|
+
console.log('onPointsChange called with:', value)
|
|
72
|
+
},
|
|
73
|
+
onPointClick: (pointId) => {
|
|
74
|
+
console.log('onPointClick called with:', pointId)
|
|
75
|
+
},
|
|
69
76
|
}
|
package/src/iframe/ProductWithModifierModal/ModifierSetModal/ProductWithModifierSetModal.tsx
CHANGED
|
@@ -51,7 +51,7 @@ export const ProductWithModifierSetModal = ({
|
|
|
51
51
|
<div
|
|
52
52
|
className={clsx(
|
|
53
53
|
'manual-booking-container',
|
|
54
|
-
!product.images
|
|
54
|
+
!product.images?.length && 'tw-mt-8',
|
|
55
55
|
)}
|
|
56
56
|
>
|
|
57
57
|
<div className='manual-booking-header'>
|
|
@@ -60,10 +60,10 @@ export const ProductWithModifierSetModal = ({
|
|
|
60
60
|
description={product.description}
|
|
61
61
|
className={clsx(
|
|
62
62
|
'iframe-event__product-description',
|
|
63
|
-
!product.images
|
|
63
|
+
!product.images?.length && 'mt-6',
|
|
64
64
|
)}
|
|
65
65
|
classNameProductModal='d-block'
|
|
66
|
-
images={product.images}
|
|
66
|
+
images={product.images || []}
|
|
67
67
|
isRequired={product.isRequired}
|
|
68
68
|
canExpand
|
|
69
69
|
isModal
|
package/src/iframe/ProductWithModifierModal/ModifierSetModal/controll/ModifierSetControll.tsx
CHANGED
|
@@ -131,14 +131,14 @@ export const ModifiersSetControl = ({
|
|
|
131
131
|
|
|
132
132
|
const radioButtonDefaultModifier = currentOrderModifiersSets
|
|
133
133
|
.find((modifier) =>
|
|
134
|
-
modifierSet.modifiers
|
|
134
|
+
modifierSet.modifiers?.some((rl) => rl.id === modifier.modifierId),
|
|
135
135
|
)
|
|
136
136
|
?.modifierId.toString()
|
|
137
137
|
|
|
138
138
|
return (
|
|
139
139
|
<>
|
|
140
140
|
{modifierSet?.maxItems === 1 &&
|
|
141
|
-
|
|
141
|
+
modifiers.every((modifier) => modifier.maxItems === 1) ? (
|
|
142
142
|
<>
|
|
143
143
|
<Controller
|
|
144
144
|
name={`${productId}.modifier`}
|
|
@@ -74,7 +74,7 @@ export const ProductControl = ({
|
|
|
74
74
|
<ModifiersSetControl
|
|
75
75
|
modifierSet={modifierSet}
|
|
76
76
|
productId={product.id}
|
|
77
|
-
modifiers={modifierSet.modifiers}
|
|
77
|
+
modifiers={modifierSet.modifiers || []}
|
|
78
78
|
isEditMode={!!editOrderModifier?.modifiers}
|
|
79
79
|
orderProductModifierSets={editOrderModifier?.modifiers}
|
|
80
80
|
isLoading={isLoading}
|
|
@@ -33,8 +33,9 @@ export const Default: Story<any> = () => {
|
|
|
33
33
|
})
|
|
34
34
|
const { handleSubmit, register } = formProps
|
|
35
35
|
|
|
36
|
-
|
|
37
|
-
const
|
|
36
|
+
// TODO: Replace with Storybook controls
|
|
37
|
+
const isRequired = false
|
|
38
|
+
const isLoading = false
|
|
38
39
|
|
|
39
40
|
const currentField = useMemo(
|
|
40
41
|
() => ({
|