@licklist/design 0.78.7-stage.8 → 0.78.7
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/affiliate/form/AffiliateForm.d.ts.map +1 -1
- package/dist/affiliate/form/AffiliateForm.js +2 -6
- package/dist/auth/AccessDenied/AccessDenied.d.ts.map +1 -1
- package/dist/auth/AccessDenied/AccessDenied.js +3 -4
- package/dist/auth/Authorizer.d.ts.map +1 -1
- package/dist/auth/Authorizer.js +6 -10
- package/dist/auth/ChangePassword/ChangePasswordComponent.d.ts.map +1 -1
- package/dist/auth/ChangePassword/ChangePasswordComponent.js +41 -36
- package/dist/auth/Layout/AuthNavComponent.d.ts.map +1 -1
- package/dist/auth/Layout/AuthNavComponent.js +3 -2
- package/dist/auth/Layout/UserNavDropDown.d.ts.map +1 -1
- package/dist/auth/Layout/UserNavDropDown.js +9 -8
- package/dist/auth/Layout/UserNavDropDownToggle.js +0 -3
- package/dist/auth/Login/LoginComponent.d.ts.map +1 -1
- package/dist/auth/Login/LoginComponent.js +60 -57
- package/dist/auth/Logout/Logout.d.ts.map +1 -1
- package/dist/auth/Logout/Logout.js +2 -4
- package/dist/auth/Register/RegisterComponent.d.ts.map +1 -1
- package/dist/auth/Register/RegisterComponent.js +58 -53
- package/dist/auth/ResetPassword/ResetPasswordComponent.d.ts.map +1 -1
- package/dist/auth/ResetPassword/ResetPasswordComponent.js +30 -26
- package/dist/auth/Social/SocialCallbackComponent.d.ts.map +1 -1
- package/dist/auth/Social/SocialCallbackComponent.js +3 -3
- package/dist/custom-fields/field-set/providers/CustomFieldSetsProvider.d.ts +2 -2
- package/dist/custom-fields/field-set/providers/CustomFieldSetsProvider.d.ts.map +1 -1
- package/dist/events/edit-event-modal/component/SaleDeadline/SaleDeadline.d.ts +2 -1
- package/dist/events/edit-event-modal/component/SaleDeadline/SaleDeadline.d.ts.map +1 -1
- package/dist/events/edit-event-modal/component/SaleDeadline/SaleDeadline.js +3 -2
- package/dist/events/edit-event-modal/component/SelectEventProductSet/component/EditEventProductSet.js +1 -0
- package/dist/events/edit-recurrent-event-modal/EditRecurrentEventModal.d.ts.map +1 -1
- package/dist/events/event-statistic-modal/EventStatisticModal.d.ts.map +1 -1
- package/dist/events/event-statistic-modal/EventStatisticModal.js +1 -0
- package/dist/events/event-venue-map/components/Dropdown/components/DropdownWrapper/DropdownWrapper.d.ts +2 -2
- package/dist/events/event-venue-map/components/Dropdown/components/DropdownWrapper/DropdownWrapper.d.ts.map +1 -1
- package/dist/file-upload/FileUpload.d.ts +1 -1
- package/dist/iframe/ProductWithModifierModal/ModifierSetModal/ProductWithModifierSetForm.d.ts +2 -1
- package/dist/iframe/ProductWithModifierModal/ModifierSetModal/ProductWithModifierSetForm.d.ts.map +1 -1
- package/dist/iframe/ProductWithModifierModal/ModifierSetModal/ProductWithModifierSetForm.js +4 -3
- package/dist/iframe/ProductWithModifierModal/ModifierSetModal/ProductWithModifierSetModal.d.ts.map +1 -1
- package/dist/iframe/ProductWithModifierModal/ModifierSetModal/ProductWithModifierSetModal.js +6 -5
- package/dist/iframe/ProductWithModifierModal/ModifierSetModal/controll/ModifierSetControll.js +2 -1
- package/dist/iframe/ProductWithModifierModal/ModifierSetModal/controll/ProductControll.d.ts.map +1 -1
- package/dist/iframe/event/event-navigation-footer/EventNavigationFooter.d.ts.map +1 -1
- package/dist/iframe/event/event-navigation-footer/EventNavigationFooter.js +2 -3
- package/dist/iframe/order-process/components/BookingSummary/components/ProductSummary/ProductSummary.d.ts.map +1 -1
- package/dist/iframe/order-process/components/BookingSummary/utils/index.js +1 -1
- package/dist/iframe/order-process/components/CategoryProduct/CategoryProduct.d.ts.map +1 -1
- package/dist/iframe/order-process/components/NavigationSteps/NavigationSteps.js +3 -3
- package/dist/iframe/order-process/components/PaymentCard/PaymentCard.d.ts +2 -2
- package/dist/iframe/order-process/components/PaymentCard/PaymentCard.d.ts.map +1 -1
- package/dist/iframe/payment/order-items-table/OrderItemsTable.js +1 -0
- package/dist/iframe/payment/order-items-table/hooks/useTableData.d.ts +5 -0
- package/dist/iframe/payment/order-items-table/hooks/useTableData.d.ts.map +1 -1
- package/dist/iframe/payment/payment-form/PaymentForm.js +1 -0
- package/dist/iframe/payment/payment-page/PaymentPage.d.ts +1 -1
- package/dist/iframe/payment/payment-page/PaymentPage.d.ts.map +1 -1
- package/dist/iframe/payment/payment-page/PaymentPage.js +8 -4
- package/dist/iframe/ryft/RyftPaymentForm.d.ts.map +1 -1
- package/dist/iframe/ryft/RyftPaymentForm.js +75 -224
- package/dist/iframe/ryft/utils/ryft-form.d.ts +1 -1
- package/dist/iframe/ryft/utils/ryft-form.d.ts.map +1 -1
- package/dist/iframe/ryft/utils/ryft-form.js +73 -0
- package/dist/index.d.ts +0 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +1 -3
- package/dist/modals/dialog/Dialog.d.ts.map +1 -1
- package/dist/modals/dialog/Dialog.js +41 -39
- package/dist/modals/dialog/DialogContext.d.ts +2 -2
- package/dist/modals/dialog/DialogContext.d.ts.map +1 -1
- package/dist/notification/email-template/card/EmailTemplateCard.d.ts.map +1 -1
- package/dist/product-set/card/ProductSetCard.d.ts.map +1 -1
- package/dist/product-set/card/ProductSetCard.js +2 -3
- package/dist/product-set/control/ProductSetControl.js +2 -1
- package/dist/product-set/form/ProductSetForm.d.ts.map +1 -1
- package/dist/product-set/form/ProductsControl.js +1 -1
- package/dist/product-set/product/advanced-options/AdvancedOptions.js +2 -1
- package/dist/product-set/utils/index.d.ts +1 -1
- package/dist/product-set/utils/index.d.ts.map +1 -1
- package/dist/recurrence-input/RecurrenceInput.d.ts.map +1 -1
- package/dist/recurrence-input/RecurrenceInput.js +1 -1
- package/dist/sales/notes/NotesTableRow.js +1 -0
- package/dist/sales/payment-form/components/RyftPayment/RyftPayment.d.ts.map +1 -1
- package/dist/sales/payment-form/components/RyftPayment/RyftPayment.js +3 -1
- package/dist/setting/dashboard/payments/payments-modal/PaymentsModal.d.ts.map +1 -1
- package/dist/setting/dashboard/snippets/card/SnippetCard.d.ts.map +1 -1
- package/dist/setting/dashboard/snippets/card/SnippetCard.js +4 -4
- package/dist/snippet/snippet-template/preview/Preview.d.ts.map +1 -1
- package/dist/snippet/snippet-template/preview/Preview.js +21 -14
- package/dist/static/RestrictedAccess.d.ts.map +1 -1
- package/dist/static/RestrictedAccess.js +2 -3
- package/dist/static/index.js +1 -1
- package/dist/striped-static-table/StripedStaticTable.js +1 -0
- package/dist/table/ReactTableHelperComponent.d.ts.map +1 -1
- package/dist/table/ReactTableHelperComponent.js +3 -3
- package/dist/table/TableHelperComponent.d.ts.map +1 -1
- package/dist/table/TableHelperComponent.js +3 -3
- package/dist/venue-map-sets/card/VenueMapSetCard.d.ts.map +1 -1
- package/dist/venue-map-sets/card/VenueMapSetCard.js +3 -4
- package/dist/zone/card/ZoneCard.d.ts.map +1 -1
- package/dist/zone/card/ZoneCard.js +3 -4
- package/package.json +21 -25
- package/src/affiliate/form/AffiliateForm.tsx +2 -4
- package/src/auth/AccessDenied/AccessDenied.tsx +3 -4
- package/src/auth/Authorizer.tsx +6 -11
- package/src/auth/ChangePassword/ChangePasswordComponent.tsx +26 -21
- package/src/auth/Layout/AuthNavComponent.tsx +3 -2
- package/src/auth/Layout/UserNavDropDown.tsx +7 -6
- package/src/auth/Layout/UserNavDropDownToggle.tsx +1 -1
- package/src/auth/Login/LoginComponent.tsx +46 -42
- package/src/auth/Logout/Logout.stories.tsx +14 -12
- package/src/auth/Logout/Logout.tsx +3 -4
- package/src/auth/Register/RegisterComponent.tsx +41 -35
- package/src/auth/ResetPassword/ResetPasswordComponent.tsx +20 -16
- package/src/auth/Social/SocialCallbackComponent.tsx +4 -4
- package/src/custom-fields/field-set/providers/CustomFieldSetsProvider.tsx +2 -2
- package/src/events/edit-event-modal/component/SaleDeadline/SaleDeadline.tsx +12 -4
- package/src/events/edit-recurrent-event-modal/EditRecurrentEventModal.tsx +0 -1
- package/src/events/event-statistic-modal/EventStatisticModal.tsx +0 -1
- package/src/events/event-venue-map/components/Dropdown/components/DropdownWrapper/DropdownWrapper.tsx +2 -2
- package/src/iframe/ProductWithModifierModal/ModifierSetModal/ProductWithModifierSetForm.tsx +8 -13
- package/src/iframe/ProductWithModifierModal/ModifierSetModal/ProductWithModifierSetModal.tsx +4 -12
- package/src/iframe/ProductWithModifierModal/ModifierSetModal/controll/ModifierSetControll.tsx +2 -2
- package/src/iframe/ProductWithModifierModal/ModifierSetModal/controll/ProductControll.tsx +20 -18
- package/src/iframe/event/event-navigation-footer/EventNavigationFooter.tsx +2 -3
- package/src/iframe/order-process/components/BookingSummary/components/ProductSummary/ProductSummary.tsx +0 -1
- package/src/iframe/order-process/components/BookingSummary/utils/index.ts +2 -2
- package/src/iframe/order-process/components/CategoryProduct/CategoryProduct.tsx +5 -3
- package/src/iframe/order-process/components/NavigationSteps/NavigationSteps.tsx +3 -3
- package/src/iframe/order-process/components/PaymentCard/PaymentCard.tsx +3 -3
- package/src/iframe/order-process/components/utils/useOnWindowUnmount.ts +1 -1
- package/src/iframe/payment/payment-page/PaymentPage.tsx +7 -7
- package/src/iframe/ryft/RyftPaymentForm.tsx +86 -136
- package/src/iframe/ryft/utils/ryft-form.ts +1 -1
- package/src/index.ts +0 -1
- package/src/modals/dialog/Dialog.tsx +36 -35
- package/src/modals/dialog/DialogContext.tsx +2 -8
- package/src/notification/email-template/card/EmailTemplateCard.tsx +2 -0
- package/src/product-set/card/ProductSetCard.tsx +2 -3
- package/src/product-set/control/ProductSetControl.tsx +1 -1
- package/src/product-set/form/ProductSetForm.tsx +1 -2
- package/src/product-set/utils/index.ts +14 -15
- package/src/recurrence-input/RecurrenceInput.tsx +3 -4
- package/src/sales/payment-form/components/RyftPayment/RyftPayment.tsx +3 -1
- package/src/setting/dashboard/payments/payments-modal/PaymentsModal.tsx +0 -1
- package/src/setting/dashboard/snippets/card/SnippetCard.tsx +3 -4
- package/src/snippet/snippet-template/preview/Preview.tsx +9 -6
- package/src/static/RestrictedAccess.tsx +6 -3
- package/src/table/ReactTableHelperComponent.tsx +5 -3
- package/src/table/TableHelperComponent.tsx +3 -3
- package/src/venue-map-sets/card/VenueMapSetCard.tsx +3 -4
- package/src/zone/card/ZoneCard.tsx +3 -4
- package/yarn.lock +604 -536
- package/dist/pages/PrivacyComponent.d.ts +0 -3
- package/dist/pages/PrivacyComponent.d.ts.map +0 -1
- package/dist/pages/PrivacyComponent.js +0 -536
- package/dist/pages/TermsComponent.d.ts +0 -3
- package/dist/pages/TermsComponent.d.ts.map +0 -1
- package/dist/pages/TermsComponent.js +0 -682
- package/dist/pages/index.d.ts +0 -3
- package/dist/pages/index.d.ts.map +0 -1
- package/src/pages/PrivacyComponent.tsx +0 -318
- package/src/pages/TermsComponent.tsx +0 -306
- package/src/pages/index.ts +0 -2
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AffiliateForm.d.ts","sourceRoot":"","sources":["../../../src/affiliate/form/AffiliateForm.tsx"],"names":[],"mappings":"AAIA,OAAO,EAAE,SAAS,EAAE,MAAM,4DAA4D,CAAA;
|
|
1
|
+
{"version":3,"file":"AffiliateForm.d.ts","sourceRoot":"","sources":["../../../src/affiliate/form/AffiliateForm.tsx"],"names":[],"mappings":"AAIA,OAAO,EAAE,SAAS,EAAE,MAAM,4DAA4D,CAAA;AAEtF,OAAO,EAAE,mBAAmB,EAAE,oBAAoB,EAAE,MAAM,UAAU,CAAA;AAGpE,MAAM,WAAW,kBAAkB;IACjC,aAAa,CAAC,EAAE,SAAS,GAAG,IAAI,CAAA;IAChC,YAAY,EAAE,CAAC,MAAM,EAAE,mBAAmB,KAAK,IAAI,CAAA;IACnD,YAAY,EAAE,oBAAoB,CAAA;IAClC,SAAS,EAAE,OAAO,CAAA;CACnB;AAED,eAAO,MAAM,aAAa,8DAKvB,kBAAkB,4CA+FpB,CAAA"}
|
|
@@ -3,7 +3,6 @@ import { useCallback, useEffect } from 'react';
|
|
|
3
3
|
import { Form, Button } from 'react-bootstrap';
|
|
4
4
|
import { useForm, FormProvider } from 'react-hook-form';
|
|
5
5
|
import { useTranslation } from 'react-i18next';
|
|
6
|
-
import { useNavigate } from 'react-router-dom';
|
|
7
6
|
import { Dialog } from '../../modals/dialog/Dialog.js';
|
|
8
7
|
import { useDialogContext } from '../../modals/dialog/DialogContext.js';
|
|
9
8
|
import { AffiliateControl } from './AffiliateControl.js';
|
|
@@ -64,7 +63,6 @@ var AffiliateForm = function(param) {
|
|
|
64
63
|
var defaultValues = param.defaultValues, handleSubmit = param.handleSubmit, generateLink = param.generateLink, isLoading = param.isLoading;
|
|
65
64
|
var t = useTranslation('Design').t;
|
|
66
65
|
var _useDialogContext = useDialogContext(), isShownDialog = _useDialogContext.isShownDialog, showDialog = _useDialogContext.showDialog, hideDialog = _useDialogContext.hideDialog;
|
|
67
|
-
var navigate = useNavigate();
|
|
68
66
|
var form = useForm({
|
|
69
67
|
defaultValues: defaultValues,
|
|
70
68
|
mode: 'onChange'
|
|
@@ -85,10 +83,8 @@ var AffiliateForm = function(param) {
|
|
|
85
83
|
isShownDialog
|
|
86
84
|
]);
|
|
87
85
|
var onApproveDialog = useCallback(function() {
|
|
88
|
-
|
|
89
|
-
}, [
|
|
90
|
-
navigate
|
|
91
|
-
]);
|
|
86
|
+
window.history.back();
|
|
87
|
+
}, []);
|
|
92
88
|
var onDeclineDialog = useCallback(function() {
|
|
93
89
|
window.history.pushState(null, '', window.location.pathname);
|
|
94
90
|
hideDialog();
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AccessDenied.d.ts","sourceRoot":"","sources":["../../../src/auth/AccessDenied/AccessDenied.tsx"],"names":[],"mappings":"AAMA,eAAO,MAAM,YAAY,+
|
|
1
|
+
{"version":3,"file":"AccessDenied.d.ts","sourceRoot":"","sources":["../../../src/auth/AccessDenied/AccessDenied.tsx"],"names":[],"mappings":"AAMA,eAAO,MAAM,YAAY,+CA+BxB,CAAA"}
|
|
@@ -1,20 +1,19 @@
|
|
|
1
1
|
import { jsx, jsxs } from 'react/jsx-runtime';
|
|
2
2
|
import { Button } from 'react-bootstrap';
|
|
3
3
|
import { useTranslation } from 'react-i18next';
|
|
4
|
+
import RouteService from '@licklist/plugins/dist/services/Route/RouteService';
|
|
4
5
|
import useUser from '@licklist/plugins/dist/context/user/hooks/useUser';
|
|
5
6
|
import { FaLock } from 'react-icons/fa';
|
|
6
|
-
import { useNavigate } from 'react-router-dom';
|
|
7
7
|
|
|
8
8
|
var AccessDenied = function() {
|
|
9
9
|
var t = useTranslation('App').t;
|
|
10
10
|
var user = useUser();
|
|
11
|
-
var navigate = useNavigate();
|
|
12
11
|
var onGoToHomepage = function() {
|
|
13
|
-
|
|
12
|
+
RouteService.redirectTo('/');
|
|
14
13
|
};
|
|
15
14
|
var logOutHandler = function() {
|
|
16
15
|
user.logout();
|
|
17
|
-
|
|
16
|
+
RouteService.redirectTo('/');
|
|
18
17
|
};
|
|
19
18
|
return /*#__PURE__*/ jsx("div", {
|
|
20
19
|
className: "d-flex align-items-center justify-content-center flex-column text-center access-denied h-100",
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Authorizer.d.ts","sourceRoot":"","sources":["../../src/auth/Authorizer.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAoC,MAAM,OAAO,CAAA;AASnE,MAAM,WAAW,eAAe;IAC9B,QAAQ,CAAC,EAAE,SAAS,GAAG,SAAS,EAAE,CAAA;CACnC;AAED,iBAAS,UAAU,CAAC,KAAK,EAAE,eAAe,
|
|
1
|
+
{"version":3,"file":"Authorizer.d.ts","sourceRoot":"","sources":["../../src/auth/Authorizer.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAoC,MAAM,OAAO,CAAA;AASnE,MAAM,WAAW,eAAe;IAC9B,QAAQ,CAAC,EAAE,SAAS,GAAG,SAAS,EAAE,CAAA;CACnC;AAED,iBAAS,UAAU,CAAC,KAAK,EAAE,eAAe,2CA2EzC;AAED,OAAO,EAAE,UAAU,EAAE,CAAA"}
|
package/dist/auth/Authorizer.js
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import { jsx, Fragment } from 'react/jsx-runtime';
|
|
2
2
|
import { useState, useCallback, useEffect } from 'react';
|
|
3
|
-
import {
|
|
3
|
+
import { matchPath } from 'react-router-dom';
|
|
4
4
|
import useUser from '@licklist/plugins/dist/context/user/hooks/useUser';
|
|
5
|
+
import RouteService from '@licklist/plugins/dist/services/Route/RouteService';
|
|
5
6
|
import { MATCH_ROUTE_PATTERNS, ROUTES } from '@licklist/core/dist/Config';
|
|
6
7
|
import useAuthApi from '@licklist/plugins/dist/hooks/Api/useAuthApi';
|
|
7
8
|
import useAuth from '@licklist/plugins/dist/context/user/hooks/useAuth';
|
|
8
|
-
import RouteService from '@licklist/plugins/dist/services/Route/RouteService';
|
|
9
9
|
import { BlockLoader } from '../static/loader/BlockLoader.js';
|
|
10
10
|
|
|
11
11
|
function _array_like_to_array(arr, len) {
|
|
@@ -71,17 +71,14 @@ function Authorizer(props) {
|
|
|
71
71
|
var auth = useAuth();
|
|
72
72
|
var user = useUser();
|
|
73
73
|
var useProfile = useAuthApi().useProfile;
|
|
74
|
-
var pathname = useLocation().pathname;
|
|
75
74
|
// This will re-fetch user's profile
|
|
76
75
|
var profile = useProfile();
|
|
77
76
|
var _useState = _sliced_to_array(useState(false), 2), isValidated = _useState[0], setIsValidated = _useState[1];
|
|
78
77
|
var matchedPathPatternUrls = useCallback(function() {
|
|
79
78
|
return Object.values(MATCH_ROUTE_PATTERNS).map(function(pathUrlPattern) {
|
|
80
|
-
return matchPath(
|
|
81
|
-
path: pathUrlPattern
|
|
82
|
-
}, RouteService.getCurrentPage());
|
|
79
|
+
return matchPath(RouteService.getCurrentPage(), pathUrlPattern);
|
|
83
80
|
}).filter(Boolean).map(function(matched) {
|
|
84
|
-
return matched.
|
|
81
|
+
return matched.url;
|
|
85
82
|
});
|
|
86
83
|
}, []);
|
|
87
84
|
useEffect(function() {
|
|
@@ -103,7 +100,7 @@ function Authorizer(props) {
|
|
|
103
100
|
ROUTES.CHANGE_PASSWORD,
|
|
104
101
|
ROUTES.FORGOT_PASSWORD,
|
|
105
102
|
ROUTES.SSO_LOGIN
|
|
106
|
-
].concat(_to_consumable_array(matchedPathPatternUrls())).includes(
|
|
103
|
+
].concat(_to_consumable_array(matchedPathPatternUrls())).includes(RouteService.getCurrentPage())) {
|
|
107
104
|
setIsValidated(function() {
|
|
108
105
|
return true;
|
|
109
106
|
});
|
|
@@ -121,8 +118,7 @@ function Authorizer(props) {
|
|
|
121
118
|
matchedPathPatternUrls,
|
|
122
119
|
profile.isError,
|
|
123
120
|
profile.isLoading,
|
|
124
|
-
profile.isFetching
|
|
125
|
-
pathname
|
|
121
|
+
profile.isFetching
|
|
126
122
|
]);
|
|
127
123
|
if (profile.isFetching || profile.isLoading || !isValidated) return /*#__PURE__*/ jsx(BlockLoader, {});
|
|
128
124
|
return /*#__PURE__*/ jsx(Fragment, {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ChangePasswordComponent.d.ts","sourceRoot":"","sources":["../../../src/auth/ChangePassword/ChangePasswordComponent.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"ChangePasswordComponent.d.ts","sourceRoot":"","sources":["../../../src/auth/ChangePassword/ChangePasswordComponent.tsx"],"names":[],"mappings":"AAiBA,iBAAS,uBAAuB,4CAsE/B;AAED,OAAO,EAAE,uBAAuB,EAAE,CAAA"}
|
|
@@ -1,14 +1,16 @@
|
|
|
1
|
-
import { jsx, jsxs } from 'react/jsx-runtime';
|
|
1
|
+
import { jsx, jsxs, Fragment } from 'react/jsx-runtime';
|
|
2
2
|
import { useContext, useState, useEffect } from 'react';
|
|
3
3
|
import Row from 'react-bootstrap/Row';
|
|
4
4
|
import Col from 'react-bootstrap/Col';
|
|
5
5
|
import { useTranslation } from 'react-i18next';
|
|
6
|
-
import { useLocation
|
|
6
|
+
import { useLocation } from 'react-router-dom';
|
|
7
7
|
import RequestContext from '@licklist/plugins/dist/context/app/RequestContext';
|
|
8
8
|
import useUserApi from '@licklist/plugins/dist/hooks/Api/useUserApi';
|
|
9
9
|
import useNotification from '@licklist/plugins/dist/context/app/hooks/useNotification';
|
|
10
|
+
import RouteService from '@licklist/plugins/dist/services/Route/RouteService';
|
|
10
11
|
import { ROUTES } from '@licklist/core/dist/Config';
|
|
11
12
|
import { ChangePasswordFormComponent } from './ChangePasswordFormComponent.js';
|
|
13
|
+
import { Router } from '../Router.js';
|
|
12
14
|
import FormCard from '../../static/FormCard.js';
|
|
13
15
|
import { LoaderIndicator } from '../../static/loader/LoaderIndicator.js';
|
|
14
16
|
|
|
@@ -193,7 +195,6 @@ function ChangePasswordComponent() {
|
|
|
193
195
|
var search = useLocation().search;
|
|
194
196
|
var email = new URLSearchParams(search).get('email');
|
|
195
197
|
var token = new URLSearchParams(search).get('token');
|
|
196
|
-
var navigate = useNavigate();
|
|
197
198
|
var _useState = _sliced_to_array(useState(false), 2), isLoading = _useState[0], setIsLoading = _useState[1];
|
|
198
199
|
var userApiService = useUserApi(request);
|
|
199
200
|
var handleError = function(error) {
|
|
@@ -202,7 +203,7 @@ function ChangePasswordComponent() {
|
|
|
202
203
|
title: t('App:error'),
|
|
203
204
|
message: (_error_response = error.response) === null || _error_response === void 0 ? void 0 : (_error_response_data = _error_response.data) === null || _error_response_data === void 0 ? void 0 : _error_response_data.message
|
|
204
205
|
});
|
|
205
|
-
|
|
206
|
+
RouteService.redirectTo(ROUTES.FORGOT_PASSWORD);
|
|
206
207
|
};
|
|
207
208
|
var changePassword = function() {
|
|
208
209
|
var _ref = _async_to_generator(function(resetRequest) {
|
|
@@ -238,7 +239,7 @@ function ChangePasswordComponent() {
|
|
|
238
239
|
title: 'Success',
|
|
239
240
|
message: t('Notification:passwordChangedSuccessfully')
|
|
240
241
|
});
|
|
241
|
-
|
|
242
|
+
RouteService.redirectTo(ROUTES.LOGIN_PAGE);
|
|
242
243
|
return [
|
|
243
244
|
2
|
|
244
245
|
];
|
|
@@ -251,45 +252,49 @@ function ChangePasswordComponent() {
|
|
|
251
252
|
}();
|
|
252
253
|
useEffect(function() {
|
|
253
254
|
if (!email && !token) {
|
|
254
|
-
|
|
255
|
+
RouteService.redirectTo(ROUTES.LOGIN_PAGE);
|
|
255
256
|
}
|
|
256
257
|
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
257
258
|
}, []);
|
|
258
|
-
return /*#__PURE__*/ jsx(
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
/*#__PURE__*/
|
|
269
|
-
className: "text-center",
|
|
270
|
-
children: t('User:resetPasswordTitle')
|
|
271
|
-
}),
|
|
272
|
-
/*#__PURE__*/ jsx("h3", {
|
|
273
|
-
className: "text-center",
|
|
274
|
-
children: t('User:forEmail', {
|
|
275
|
-
email: email
|
|
276
|
-
})
|
|
277
|
-
}),
|
|
278
|
-
/*#__PURE__*/ jsxs(FormCard, {
|
|
259
|
+
return /*#__PURE__*/ jsx(Router, {
|
|
260
|
+
children: /*#__PURE__*/ jsx(Row, {
|
|
261
|
+
className: "justify-content-center",
|
|
262
|
+
children: /*#__PURE__*/ jsx(Col, {
|
|
263
|
+
xs: true,
|
|
264
|
+
sm: 12,
|
|
265
|
+
md: 7,
|
|
266
|
+
lg: 6,
|
|
267
|
+
xl: 5,
|
|
268
|
+
className: "align-self-center",
|
|
269
|
+
children: /*#__PURE__*/ jsxs(Fragment, {
|
|
279
270
|
children: [
|
|
280
|
-
/*#__PURE__*/ jsx(
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
onSubmit: handleOnSubmit,
|
|
284
|
-
email: email,
|
|
285
|
-
token: token
|
|
271
|
+
/*#__PURE__*/ jsx("h1", {
|
|
272
|
+
className: "text-center",
|
|
273
|
+
children: t('User:resetPasswordTitle')
|
|
286
274
|
}),
|
|
287
|
-
/*#__PURE__*/ jsx(
|
|
288
|
-
|
|
275
|
+
/*#__PURE__*/ jsx("h3", {
|
|
276
|
+
className: "text-center",
|
|
277
|
+
children: t('User:forEmail', {
|
|
278
|
+
email: email
|
|
279
|
+
})
|
|
280
|
+
}),
|
|
281
|
+
/*#__PURE__*/ jsxs(FormCard, {
|
|
282
|
+
children: [
|
|
283
|
+
/*#__PURE__*/ jsx(ChangePasswordFormComponent, {
|
|
284
|
+
isLoading: isLoading,
|
|
285
|
+
setIsLoading: setIsLoading,
|
|
286
|
+
onSubmit: handleOnSubmit,
|
|
287
|
+
email: email,
|
|
288
|
+
token: token
|
|
289
|
+
}),
|
|
290
|
+
/*#__PURE__*/ jsx(LoaderIndicator, {
|
|
291
|
+
isLoaded: !isLoading
|
|
292
|
+
})
|
|
293
|
+
]
|
|
289
294
|
})
|
|
290
295
|
]
|
|
291
296
|
})
|
|
292
|
-
|
|
297
|
+
})
|
|
293
298
|
})
|
|
294
299
|
});
|
|
295
300
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AuthNavComponent.d.ts","sourceRoot":"","sources":["../../../src/auth/Layout/AuthNavComponent.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"AuthNavComponent.d.ts","sourceRoot":"","sources":["../../../src/auth/Layout/AuthNavComponent.tsx"],"names":[],"mappings":"AAKA,iBAAS,gBAAgB,4CAyBxB;AAED,OAAO,EAAE,gBAAgB,EAAE,CAAA"}
|
|
@@ -1,11 +1,12 @@
|
|
|
1
|
-
import { jsxs,
|
|
1
|
+
import { jsxs, jsx } from 'react/jsx-runtime';
|
|
2
2
|
import { useTranslation } from 'react-i18next';
|
|
3
3
|
import { Link } from 'react-router-dom';
|
|
4
4
|
import StyledButton from '../../static/StyledButton.js';
|
|
5
|
+
import { Router } from '../Router.js';
|
|
5
6
|
|
|
6
7
|
function AuthNavComponent() {
|
|
7
8
|
var t = useTranslation('User').t;
|
|
8
|
-
return /*#__PURE__*/ jsxs(
|
|
9
|
+
return /*#__PURE__*/ jsxs(Router, {
|
|
9
10
|
children: [
|
|
10
11
|
/*#__PURE__*/ jsx(Link, {
|
|
11
12
|
to: "/login",
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"UserNavDropDown.d.ts","sourceRoot":"","sources":["../../../src/auth/Layout/UserNavDropDown.tsx"],"names":[],"mappings":"AAKA,iBAAS,eAAe,
|
|
1
|
+
{"version":3,"file":"UserNavDropDown.d.ts","sourceRoot":"","sources":["../../../src/auth/Layout/UserNavDropDown.tsx"],"names":[],"mappings":"AAKA,iBAAS,eAAe,4CAiBvB;AAED,OAAO,EAAE,eAAe,EAAE,CAAA"}
|
|
@@ -1,21 +1,22 @@
|
|
|
1
|
-
import { jsx } from 'react/jsx-runtime';
|
|
1
|
+
import { jsx, Fragment } from 'react/jsx-runtime';
|
|
2
2
|
import Dropdown from 'react-bootstrap/Dropdown';
|
|
3
3
|
import { useTranslation } from 'react-i18next';
|
|
4
|
+
import RouteService from '@licklist/plugins/dist/services/Route/RouteService';
|
|
4
5
|
import useUser from '@licklist/plugins/dist/context/user/hooks/useUser';
|
|
5
|
-
import { useNavigate } from 'react-router-dom';
|
|
6
6
|
|
|
7
7
|
function UserNavDropDown() {
|
|
8
8
|
var t = useTranslation('App').t;
|
|
9
9
|
var user = useUser();
|
|
10
|
-
var navigate = useNavigate();
|
|
11
10
|
var onLogoutHandler = function() {
|
|
12
11
|
user.logout();
|
|
13
|
-
|
|
12
|
+
RouteService.redirectTo('/');
|
|
14
13
|
};
|
|
15
|
-
return /*#__PURE__*/ jsx(
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
14
|
+
return /*#__PURE__*/ jsx(Fragment, {
|
|
15
|
+
children: /*#__PURE__*/ jsx(Dropdown.Item, {
|
|
16
|
+
eventKey: "1",
|
|
17
|
+
onClick: onLogoutHandler,
|
|
18
|
+
children: t('logout')
|
|
19
|
+
})
|
|
19
20
|
});
|
|
20
21
|
}
|
|
21
22
|
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"LoginComponent.d.ts","sourceRoot":"","sources":["../../../src/auth/Login/LoginComponent.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"LoginComponent.d.ts","sourceRoot":"","sources":["../../../src/auth/Login/LoginComponent.tsx"],"names":[],"mappings":"AAuBA,KAAK,mBAAmB,GAAG;IACzB,cAAc,CAAC,EAAE,OAAO,CAAA;IACxB,eAAe,CAAC,EAAE,OAAO,CAAA;CAC1B,CAAA;AAED,QAAA,MAAM,cAAc,yCAGjB,mBAAmB,4CAoHrB,CAAA;AAED,OAAO,EAAE,cAAc,EAAE,CAAA"}
|
|
@@ -3,15 +3,17 @@ import { useContext, useState, useEffect } from 'react';
|
|
|
3
3
|
import Row from 'react-bootstrap/Row';
|
|
4
4
|
import Col from 'react-bootstrap/Col';
|
|
5
5
|
import { useTranslation, Trans } from 'react-i18next';
|
|
6
|
-
import {
|
|
6
|
+
import { Link } from 'react-router-dom';
|
|
7
7
|
import RequestContext from '@licklist/plugins/dist/context/app/RequestContext';
|
|
8
8
|
import useUserApi from '@licklist/plugins/dist/hooks/Api/useUserApi';
|
|
9
9
|
import useNotification from '@licklist/plugins/dist/context/app/hooks/useNotification';
|
|
10
10
|
import useAuth from '@licklist/plugins/dist/context/user/hooks/useAuth';
|
|
11
11
|
import useUser from '@licklist/plugins/dist/context/user/hooks/useUser';
|
|
12
12
|
import useInvite from '@licklist/plugins/dist/context/user/hooks/useInvite';
|
|
13
|
+
import RouteService from '@licklist/plugins/dist/services/Route/RouteService';
|
|
13
14
|
import { SocialFormComponent } from '../Social/SocialFormComponent.js';
|
|
14
15
|
import { LoginFormComponent } from './LoginFormComponent.js';
|
|
16
|
+
import { Router } from '../Router.js';
|
|
15
17
|
import FormCard from '../../static/FormCard.js';
|
|
16
18
|
import { LoaderIndicator } from '../../static/loader/LoaderIndicator.js';
|
|
17
19
|
import Logo from '../../logo/Logo.js';
|
|
@@ -198,7 +200,6 @@ var LoginComponent = function(param) {
|
|
|
198
200
|
var auth = useAuth();
|
|
199
201
|
var user = useUser();
|
|
200
202
|
var invite = useInvite();
|
|
201
|
-
var navigate = useNavigate();
|
|
202
203
|
var _useState = _sliced_to_array(useState(false), 2), isLoading = _useState[0], setIsLoading = _useState[1];
|
|
203
204
|
var userApiService = useUserApi(request);
|
|
204
205
|
var handleError = function(error) {
|
|
@@ -275,9 +276,7 @@ var LoginComponent = function(param) {
|
|
|
275
276
|
title: 'Success',
|
|
276
277
|
message: t('Notification:loggedSuccessfully')
|
|
277
278
|
});
|
|
278
|
-
|
|
279
|
-
replace: true
|
|
280
|
-
});
|
|
279
|
+
RouteService.redirectTo('/');
|
|
281
280
|
return [
|
|
282
281
|
2
|
|
283
282
|
];
|
|
@@ -292,71 +291,75 @@ var LoginComponent = function(param) {
|
|
|
292
291
|
if (!user.profile || !auth.secrets) {
|
|
293
292
|
return;
|
|
294
293
|
}
|
|
295
|
-
|
|
294
|
+
RouteService.redirectTo('/');
|
|
296
295
|
}, [
|
|
297
296
|
user.profile,
|
|
298
297
|
auth.secrets
|
|
299
298
|
]);
|
|
300
|
-
return /*#__PURE__*/ jsx(
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
/*#__PURE__*/
|
|
311
|
-
className: "text-center",
|
|
312
|
-
children: t('User:loginTitle')
|
|
313
|
-
}),
|
|
314
|
-
/*#__PURE__*/ jsx("div", {
|
|
315
|
-
className: "login d-flex pb-4 justify-content-center",
|
|
316
|
-
children: /*#__PURE__*/ jsx(Logo, {
|
|
317
|
-
logo: /*#__PURE__*/ jsx(SvgBookedit, {})
|
|
318
|
-
})
|
|
319
|
-
}),
|
|
320
|
-
!hideSignUpLink && /*#__PURE__*/ jsx("h6", {
|
|
321
|
-
className: "text-center",
|
|
322
|
-
children: /*#__PURE__*/ jsxs(Trans, {
|
|
323
|
-
t: t,
|
|
324
|
-
i18nKey: "loginPromo",
|
|
325
|
-
children: [
|
|
326
|
-
"Don't have account? ",
|
|
327
|
-
/*#__PURE__*/ jsx(Link, {
|
|
328
|
-
to: "/register",
|
|
329
|
-
children: "Sign up"
|
|
330
|
-
}),
|
|
331
|
-
"."
|
|
332
|
-
]
|
|
333
|
-
})
|
|
334
|
-
}),
|
|
335
|
-
/*#__PURE__*/ jsxs(FormCard, {
|
|
299
|
+
return /*#__PURE__*/ jsx(Router, {
|
|
300
|
+
children: /*#__PURE__*/ jsx(Row, {
|
|
301
|
+
className: "justify-content-center",
|
|
302
|
+
children: /*#__PURE__*/ jsx(Col, {
|
|
303
|
+
xs: true,
|
|
304
|
+
sm: 12,
|
|
305
|
+
md: 7,
|
|
306
|
+
lg: 6,
|
|
307
|
+
xl: 5,
|
|
308
|
+
className: "align-self-center",
|
|
309
|
+
children: /*#__PURE__*/ jsxs(Fragment, {
|
|
336
310
|
children: [
|
|
337
|
-
|
|
311
|
+
/*#__PURE__*/ jsx("h1", {
|
|
312
|
+
className: "text-center",
|
|
313
|
+
children: t('User:loginTitle')
|
|
314
|
+
}),
|
|
315
|
+
/*#__PURE__*/ jsx("div", {
|
|
316
|
+
className: "login d-flex pb-4 justify-content-center",
|
|
317
|
+
children: /*#__PURE__*/ jsx(Logo, {
|
|
318
|
+
logo: /*#__PURE__*/ jsx(SvgBookedit, {})
|
|
319
|
+
})
|
|
320
|
+
}),
|
|
321
|
+
!hideSignUpLink && /*#__PURE__*/ jsx("h6", {
|
|
322
|
+
className: "text-center",
|
|
323
|
+
children: /*#__PURE__*/ jsxs(Trans, {
|
|
324
|
+
t: t,
|
|
325
|
+
i18nKey: "loginPromo",
|
|
326
|
+
children: [
|
|
327
|
+
"Don't have account? ",
|
|
328
|
+
/*#__PURE__*/ jsx(Link, {
|
|
329
|
+
to: "/register",
|
|
330
|
+
children: "Sign up"
|
|
331
|
+
}),
|
|
332
|
+
"."
|
|
333
|
+
]
|
|
334
|
+
})
|
|
335
|
+
}),
|
|
336
|
+
/*#__PURE__*/ jsxs(FormCard, {
|
|
338
337
|
children: [
|
|
339
|
-
/*#__PURE__*/
|
|
338
|
+
showSocialLinks && /*#__PURE__*/ jsxs(Fragment, {
|
|
339
|
+
children: [
|
|
340
|
+
/*#__PURE__*/ jsx(SocialFormComponent, {
|
|
341
|
+
isLoading: isLoading,
|
|
342
|
+
setIsLoading: setIsLoading
|
|
343
|
+
}),
|
|
344
|
+
/*#__PURE__*/ jsx("hr", {
|
|
345
|
+
className: "mb-2"
|
|
346
|
+
})
|
|
347
|
+
]
|
|
348
|
+
}),
|
|
349
|
+
/*#__PURE__*/ jsx(LoginFormComponent, {
|
|
340
350
|
isLoading: isLoading,
|
|
341
|
-
setIsLoading: setIsLoading
|
|
351
|
+
setIsLoading: setIsLoading,
|
|
352
|
+
onSubmit: handleOnSubmit,
|
|
353
|
+
invitation: invite.invitation
|
|
342
354
|
}),
|
|
343
|
-
/*#__PURE__*/ jsx(
|
|
344
|
-
|
|
355
|
+
/*#__PURE__*/ jsx(LoaderIndicator, {
|
|
356
|
+
isLoaded: !isLoading
|
|
345
357
|
})
|
|
346
358
|
]
|
|
347
|
-
}),
|
|
348
|
-
/*#__PURE__*/ jsx(LoginFormComponent, {
|
|
349
|
-
isLoading: isLoading,
|
|
350
|
-
setIsLoading: setIsLoading,
|
|
351
|
-
onSubmit: handleOnSubmit,
|
|
352
|
-
invitation: invite.invitation
|
|
353
|
-
}),
|
|
354
|
-
/*#__PURE__*/ jsx(LoaderIndicator, {
|
|
355
|
-
isLoaded: !isLoading
|
|
356
359
|
})
|
|
357
360
|
]
|
|
358
361
|
})
|
|
359
|
-
|
|
362
|
+
})
|
|
360
363
|
})
|
|
361
364
|
});
|
|
362
365
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Logout.d.ts","sourceRoot":"","sources":["../../../src/auth/Logout/Logout.tsx"],"names":[],"mappings":"AAKA,eAAO,MAAM,MAAM,+
|
|
1
|
+
{"version":3,"file":"Logout.d.ts","sourceRoot":"","sources":["../../../src/auth/Logout/Logout.tsx"],"names":[],"mappings":"AAKA,eAAO,MAAM,MAAM,+CASlB,CAAA"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { jsx } from 'react/jsx-runtime';
|
|
2
2
|
import { useEffect } from 'react';
|
|
3
3
|
import useUser from '@licklist/plugins/dist/context/user/hooks/useUser';
|
|
4
|
-
import
|
|
4
|
+
import RouteService from '@licklist/plugins/dist/services/Route/RouteService';
|
|
5
5
|
import '../../static/index.js';
|
|
6
6
|
import { BlockLoader } from '../../static/loader/BlockLoader.js';
|
|
7
7
|
import 'react-loader';
|
|
@@ -11,12 +11,10 @@ import 'clsx';
|
|
|
11
11
|
|
|
12
12
|
var Logout = function() {
|
|
13
13
|
var user = useUser();
|
|
14
|
-
var navigate = useNavigate();
|
|
15
14
|
useEffect(function() {
|
|
16
15
|
user.logout();
|
|
17
|
-
|
|
16
|
+
RouteService.redirectTo('/');
|
|
18
17
|
}, [
|
|
19
|
-
navigate,
|
|
20
18
|
user
|
|
21
19
|
]);
|
|
22
20
|
return /*#__PURE__*/ jsx(BlockLoader, {});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"RegisterComponent.d.ts","sourceRoot":"","sources":["../../../src/auth/Register/RegisterComponent.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"RegisterComponent.d.ts","sourceRoot":"","sources":["../../../src/auth/Register/RegisterComponent.tsx"],"names":[],"mappings":"AAsBA,KAAK,sBAAsB,GAAG;IAC5B,eAAe,CAAC,EAAE,OAAO,CAAA;CAC1B,CAAA;AAED,iBAAS,iBAAiB,CAAC,EACzB,eAAuB,GACxB,EAAE,sBAAsB,2CAgHxB;AAED,OAAO,EAAE,iBAAiB,EAAE,CAAA"}
|