@licklist/design 0.78.7 → 0.78.8
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 +6 -2
- package/dist/auth/AccessDenied/AccessDenied.d.ts.map +1 -1
- package/dist/auth/AccessDenied/AccessDenied.js +4 -3
- package/dist/auth/Authorizer.d.ts.map +1 -1
- package/dist/auth/Authorizer.js +10 -6
- package/dist/auth/ChangePassword/ChangePasswordComponent.d.ts.map +1 -1
- package/dist/auth/ChangePassword/ChangePasswordComponent.js +36 -41
- package/dist/auth/Layout/AuthNavComponent.d.ts.map +1 -1
- package/dist/auth/Layout/AuthNavComponent.js +2 -3
- package/dist/auth/Layout/UserNavDropDown.d.ts.map +1 -1
- package/dist/auth/Layout/UserNavDropDown.js +8 -9
- package/dist/auth/Login/LoginComponent.d.ts.map +1 -1
- package/dist/auth/Login/LoginComponent.js +57 -60
- package/dist/auth/Logout/Logout.d.ts.map +1 -1
- package/dist/auth/Logout/Logout.js +4 -2
- package/dist/auth/Register/RegisterComponent.d.ts.map +1 -1
- package/dist/auth/Register/RegisterComponent.js +53 -58
- package/dist/auth/ResetPassword/ResetPasswordComponent.d.ts.map +1 -1
- package/dist/auth/ResetPassword/ResetPasswordComponent.js +26 -30
- 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/SelectEventProductSet/component/EditEventProductSet.js +0 -1
- package/dist/events/edit-recurrent-event-modal/EditRecurrentEventModal.d.ts.map +1 -1
- package/dist/events/event-card/EventCard.d.ts +1 -1
- package/dist/events/event-card/EventCard.d.ts.map +1 -1
- package/dist/events/event-card/EventCard.js +1 -1
- package/dist/events/event-statistic-modal/EventStatisticModal.d.ts.map +1 -1
- package/dist/events/event-statistic-modal/EventStatisticModal.js +0 -1
- 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 +1 -2
- package/dist/iframe/ProductWithModifierModal/ModifierSetModal/ProductWithModifierSetForm.d.ts.map +1 -1
- package/dist/iframe/ProductWithModifierModal/ModifierSetModal/ProductWithModifierSetForm.js +3 -4
- package/dist/iframe/ProductWithModifierModal/ModifierSetModal/ProductWithModifierSetModal.d.ts.map +1 -1
- package/dist/iframe/ProductWithModifierModal/ModifierSetModal/ProductWithModifierSetModal.js +5 -6
- package/dist/iframe/ProductWithModifierModal/ModifierSetModal/controll/ModifierSetControll.js +1 -2
- 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 +3 -2
- 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 +0 -1
- package/dist/iframe/payment/order-items-table/hooks/useTableData.d.ts +0 -5
- package/dist/iframe/payment/order-items-table/hooks/useTableData.d.ts.map +1 -1
- package/dist/iframe/payment/payment-form/PaymentForm.js +0 -1
- 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/ryft/RyftPaymentForm.d.ts.map +1 -1
- package/dist/iframe/ryft/RyftPaymentForm.js +1 -3
- 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/index.d.ts +1 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +3 -1
- package/dist/modals/dialog/Dialog.d.ts.map +1 -1
- package/dist/modals/dialog/Dialog.js +39 -41
- 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/pages/PrivacyComponent.d.ts +3 -0
- package/dist/pages/PrivacyComponent.d.ts.map +1 -0
- package/dist/pages/PrivacyComponent.js +536 -0
- package/dist/pages/TermsComponent.d.ts +3 -0
- package/dist/pages/TermsComponent.d.ts.map +1 -0
- package/dist/pages/TermsComponent.js +682 -0
- package/dist/pages/index.d.ts +3 -0
- package/dist/pages/index.d.ts.map +1 -0
- package/dist/product-set/card/ProductSetCard.d.ts.map +1 -1
- package/dist/product-set/card/ProductSetCard.js +3 -2
- 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 +1 -2
- 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 +0 -1
- package/dist/sales/payment-form/components/RyftPayment/RyftPayment.d.ts.map +1 -1
- package/dist/sales/payment-form/components/RyftPayment/RyftPayment.js +1 -3
- 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 +14 -21
- package/dist/static/RestrictedAccess.d.ts.map +1 -1
- package/dist/static/RestrictedAccess.js +3 -2
- package/dist/static/index.js +1 -1
- package/dist/striped-static-table/StripedStaticTable.js +0 -1
- 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 +4 -3
- package/dist/zone/card/ZoneCard.d.ts.map +1 -1
- package/dist/zone/card/ZoneCard.js +4 -3
- package/package.json +23 -20
- package/src/affiliate/form/AffiliateForm.tsx +4 -2
- package/src/auth/AccessDenied/AccessDenied.tsx +4 -3
- package/src/auth/Authorizer.tsx +11 -6
- package/src/auth/ChangePassword/ChangePasswordComponent.tsx +21 -26
- package/src/auth/Layout/AuthNavComponent.tsx +2 -3
- package/src/auth/Layout/UserNavDropDown.tsx +6 -7
- package/src/auth/Login/LoginComponent.tsx +42 -46
- package/src/auth/Logout/Logout.stories.tsx +12 -14
- package/src/auth/Logout/Logout.tsx +4 -3
- package/src/auth/Register/RegisterComponent.tsx +35 -41
- package/src/auth/ResetPassword/ResetPasswordComponent.tsx +16 -20
- package/src/auth/Social/SocialCallbackComponent.tsx +4 -4
- package/src/custom-fields/field-set/providers/CustomFieldSetsProvider.tsx +2 -2
- package/src/events/edit-recurrent-event-modal/EditRecurrentEventModal.tsx +1 -0
- package/src/events/event-card/EventCard.tsx +10 -8
- package/src/events/event-statistic-modal/EventStatisticModal.tsx +1 -0
- package/src/events/event-venue-map/components/Dropdown/components/DropdownWrapper/DropdownWrapper.tsx +2 -2
- package/src/iframe/ProductWithModifierModal/ModifierSetModal/ProductWithModifierSetForm.tsx +13 -8
- package/src/iframe/ProductWithModifierModal/ModifierSetModal/ProductWithModifierSetModal.tsx +12 -4
- package/src/iframe/ProductWithModifierModal/ModifierSetModal/controll/ModifierSetControll.tsx +2 -2
- package/src/iframe/ProductWithModifierModal/ModifierSetModal/controll/ProductControll.tsx +18 -20
- package/src/iframe/event/event-navigation-footer/EventNavigationFooter.tsx +3 -2
- package/src/iframe/order-process/components/CategoryProduct/CategoryProduct.tsx +3 -5
- 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 +1 -1
- package/src/iframe/ryft/RyftPaymentForm.tsx +2 -5
- package/src/iframe/ryft/utils/ryft-form.ts +1 -1
- package/src/index.ts +1 -0
- package/src/modals/dialog/Dialog.tsx +35 -36
- package/src/modals/dialog/DialogContext.tsx +8 -2
- package/src/notification/email-template/card/EmailTemplateCard.tsx +0 -2
- package/src/pages/PrivacyComponent.tsx +318 -0
- package/src/pages/TermsComponent.tsx +306 -0
- package/src/pages/index.ts +2 -0
- package/src/product-set/card/ProductSetCard.tsx +3 -2
- package/src/product-set/form/ProductSetForm.tsx +2 -1
- package/src/product-set/utils/index.ts +15 -14
- package/src/recurrence-input/RecurrenceInput.tsx +4 -3
- package/src/sales/payment-form/components/RyftPayment/RyftPayment.tsx +1 -3
- package/src/setting/dashboard/payments/payments-modal/PaymentsModal.tsx +1 -0
- package/src/setting/dashboard/snippets/card/SnippetCard.tsx +4 -3
- package/src/snippet/snippet-template/preview/Preview.tsx +6 -9
- package/src/static/RestrictedAccess.tsx +3 -6
- package/src/table/ReactTableHelperComponent.tsx +3 -5
- package/src/table/TableHelperComponent.tsx +3 -3
- package/src/venue-map-sets/card/VenueMapSetCard.tsx +4 -3
- package/src/zone/card/ZoneCard.tsx +4 -3
- package/yarn.lock +474 -542
|
@@ -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;AAGtF,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,4CAgGpB,CAAA"}
|
|
@@ -3,6 +3,7 @@ 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';
|
|
6
7
|
import { Dialog } from '../../modals/dialog/Dialog.js';
|
|
7
8
|
import { useDialogContext } from '../../modals/dialog/DialogContext.js';
|
|
8
9
|
import { AffiliateControl } from './AffiliateControl.js';
|
|
@@ -63,6 +64,7 @@ var AffiliateForm = function(param) {
|
|
|
63
64
|
var defaultValues = param.defaultValues, handleSubmit = param.handleSubmit, generateLink = param.generateLink, isLoading = param.isLoading;
|
|
64
65
|
var t = useTranslation('Design').t;
|
|
65
66
|
var _useDialogContext = useDialogContext(), isShownDialog = _useDialogContext.isShownDialog, showDialog = _useDialogContext.showDialog, hideDialog = _useDialogContext.hideDialog;
|
|
67
|
+
var navigate = useNavigate();
|
|
66
68
|
var form = useForm({
|
|
67
69
|
defaultValues: defaultValues,
|
|
68
70
|
mode: 'onChange'
|
|
@@ -83,8 +85,10 @@ var AffiliateForm = function(param) {
|
|
|
83
85
|
isShownDialog
|
|
84
86
|
]);
|
|
85
87
|
var onApproveDialog = useCallback(function() {
|
|
86
|
-
|
|
87
|
-
}, [
|
|
88
|
+
navigate(-1);
|
|
89
|
+
}, [
|
|
90
|
+
navigate
|
|
91
|
+
]);
|
|
88
92
|
var onDeclineDialog = useCallback(function() {
|
|
89
93
|
window.history.pushState(null, '', window.location.pathname);
|
|
90
94
|
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,+CAgCxB,CAAA"}
|
|
@@ -1,19 +1,20 @@
|
|
|
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';
|
|
5
4
|
import useUser from '@licklist/plugins/dist/context/user/hooks/useUser';
|
|
6
5
|
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();
|
|
11
12
|
var onGoToHomepage = function() {
|
|
12
|
-
|
|
13
|
+
navigate('/');
|
|
13
14
|
};
|
|
14
15
|
var logOutHandler = function() {
|
|
15
16
|
user.logout();
|
|
16
|
-
|
|
17
|
+
navigate('/');
|
|
17
18
|
};
|
|
18
19
|
return /*#__PURE__*/ jsx("div", {
|
|
19
20
|
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,2CAgFzC;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 { matchPath } from 'react-router-dom';
|
|
3
|
+
import { useLocation, 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';
|
|
6
5
|
import { MATCH_ROUTE_PATTERNS, ROUTES } from '@licklist/core/dist/Config';
|
|
7
6
|
import useAuthApi from '@licklist/plugins/dist/hooks/Api/useAuthApi';
|
|
8
7
|
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,14 +71,17 @@ function Authorizer(props) {
|
|
|
71
71
|
var auth = useAuth();
|
|
72
72
|
var user = useUser();
|
|
73
73
|
var useProfile = useAuthApi().useProfile;
|
|
74
|
+
var pathname = useLocation().pathname;
|
|
74
75
|
// This will re-fetch user's profile
|
|
75
76
|
var profile = useProfile();
|
|
76
77
|
var _useState = _sliced_to_array(useState(false), 2), isValidated = _useState[0], setIsValidated = _useState[1];
|
|
77
78
|
var matchedPathPatternUrls = useCallback(function() {
|
|
78
79
|
return Object.values(MATCH_ROUTE_PATTERNS).map(function(pathUrlPattern) {
|
|
79
|
-
return matchPath(
|
|
80
|
+
return matchPath({
|
|
81
|
+
path: pathUrlPattern
|
|
82
|
+
}, RouteService.getCurrentPage());
|
|
80
83
|
}).filter(Boolean).map(function(matched) {
|
|
81
|
-
return matched.
|
|
84
|
+
return matched.pathname;
|
|
82
85
|
});
|
|
83
86
|
}, []);
|
|
84
87
|
useEffect(function() {
|
|
@@ -100,7 +103,7 @@ function Authorizer(props) {
|
|
|
100
103
|
ROUTES.CHANGE_PASSWORD,
|
|
101
104
|
ROUTES.FORGOT_PASSWORD,
|
|
102
105
|
ROUTES.SSO_LOGIN
|
|
103
|
-
].concat(_to_consumable_array(matchedPathPatternUrls())).includes(
|
|
106
|
+
].concat(_to_consumable_array(matchedPathPatternUrls())).includes(pathname)) {
|
|
104
107
|
setIsValidated(function() {
|
|
105
108
|
return true;
|
|
106
109
|
});
|
|
@@ -118,7 +121,8 @@ function Authorizer(props) {
|
|
|
118
121
|
matchedPathPatternUrls,
|
|
119
122
|
profile.isError,
|
|
120
123
|
profile.isLoading,
|
|
121
|
-
profile.isFetching
|
|
124
|
+
profile.isFetching,
|
|
125
|
+
pathname
|
|
122
126
|
]);
|
|
123
127
|
if (profile.isFetching || profile.isLoading || !isValidated) return /*#__PURE__*/ jsx(BlockLoader, {});
|
|
124
128
|
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":"AAeA,iBAAS,uBAAuB,4CAmE/B;AAED,OAAO,EAAE,uBAAuB,EAAE,CAAA"}
|
|
@@ -1,16 +1,14 @@
|
|
|
1
|
-
import { jsx, jsxs
|
|
1
|
+
import { jsx, jsxs } 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 } from 'react-router-dom';
|
|
6
|
+
import { useLocation, useNavigate } 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';
|
|
11
10
|
import { ROUTES } from '@licklist/core/dist/Config';
|
|
12
11
|
import { ChangePasswordFormComponent } from './ChangePasswordFormComponent.js';
|
|
13
|
-
import { Router } from '../Router.js';
|
|
14
12
|
import FormCard from '../../static/FormCard.js';
|
|
15
13
|
import { LoaderIndicator } from '../../static/loader/LoaderIndicator.js';
|
|
16
14
|
|
|
@@ -195,6 +193,7 @@ function ChangePasswordComponent() {
|
|
|
195
193
|
var search = useLocation().search;
|
|
196
194
|
var email = new URLSearchParams(search).get('email');
|
|
197
195
|
var token = new URLSearchParams(search).get('token');
|
|
196
|
+
var navigate = useNavigate();
|
|
198
197
|
var _useState = _sliced_to_array(useState(false), 2), isLoading = _useState[0], setIsLoading = _useState[1];
|
|
199
198
|
var userApiService = useUserApi(request);
|
|
200
199
|
var handleError = function(error) {
|
|
@@ -203,7 +202,7 @@ function ChangePasswordComponent() {
|
|
|
203
202
|
title: t('App:error'),
|
|
204
203
|
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
|
|
205
204
|
});
|
|
206
|
-
|
|
205
|
+
navigate(ROUTES.FORGOT_PASSWORD);
|
|
207
206
|
};
|
|
208
207
|
var changePassword = function() {
|
|
209
208
|
var _ref = _async_to_generator(function(resetRequest) {
|
|
@@ -239,7 +238,7 @@ function ChangePasswordComponent() {
|
|
|
239
238
|
title: 'Success',
|
|
240
239
|
message: t('Notification:passwordChangedSuccessfully')
|
|
241
240
|
});
|
|
242
|
-
|
|
241
|
+
navigate(ROUTES.LOGIN_PAGE);
|
|
243
242
|
return [
|
|
244
243
|
2
|
|
245
244
|
];
|
|
@@ -252,49 +251,45 @@ function ChangePasswordComponent() {
|
|
|
252
251
|
}();
|
|
253
252
|
useEffect(function() {
|
|
254
253
|
if (!email && !token) {
|
|
255
|
-
|
|
254
|
+
navigate(ROUTES.LOGIN_PAGE);
|
|
256
255
|
}
|
|
257
256
|
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
258
257
|
}, []);
|
|
259
|
-
return /*#__PURE__*/ jsx(
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
258
|
+
return /*#__PURE__*/ jsx(Row, {
|
|
259
|
+
className: "justify-content-center",
|
|
260
|
+
children: /*#__PURE__*/ jsxs(Col, {
|
|
261
|
+
xs: true,
|
|
262
|
+
sm: 12,
|
|
263
|
+
md: 7,
|
|
264
|
+
lg: 6,
|
|
265
|
+
xl: 5,
|
|
266
|
+
className: "align-self-center",
|
|
267
|
+
children: [
|
|
268
|
+
/*#__PURE__*/ jsx("h1", {
|
|
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, {
|
|
270
279
|
children: [
|
|
271
|
-
/*#__PURE__*/ jsx(
|
|
272
|
-
|
|
273
|
-
|
|
280
|
+
/*#__PURE__*/ jsx(ChangePasswordFormComponent, {
|
|
281
|
+
isLoading: isLoading,
|
|
282
|
+
setIsLoading: setIsLoading,
|
|
283
|
+
onSubmit: handleOnSubmit,
|
|
284
|
+
email: email,
|
|
285
|
+
token: token
|
|
274
286
|
}),
|
|
275
|
-
/*#__PURE__*/ jsx(
|
|
276
|
-
|
|
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
|
-
]
|
|
287
|
+
/*#__PURE__*/ jsx(LoaderIndicator, {
|
|
288
|
+
isLoaded: !isLoading
|
|
294
289
|
})
|
|
295
290
|
]
|
|
296
291
|
})
|
|
297
|
-
|
|
292
|
+
]
|
|
298
293
|
})
|
|
299
294
|
});
|
|
300
295
|
}
|
|
@@ -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":"AAIA,iBAAS,gBAAgB,4CAyBxB;AAED,OAAO,EAAE,gBAAgB,EAAE,CAAA"}
|
|
@@ -1,12 +1,11 @@
|
|
|
1
|
-
import { jsxs, jsx } from 'react/jsx-runtime';
|
|
1
|
+
import { jsxs, Fragment, 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';
|
|
6
5
|
|
|
7
6
|
function AuthNavComponent() {
|
|
8
7
|
var t = useTranslation('User').t;
|
|
9
|
-
return /*#__PURE__*/ jsxs(
|
|
8
|
+
return /*#__PURE__*/ jsxs(Fragment, {
|
|
10
9
|
children: [
|
|
11
10
|
/*#__PURE__*/ jsx(Link, {
|
|
12
11
|
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,4CAgBvB;AAED,OAAO,EAAE,eAAe,EAAE,CAAA"}
|
|
@@ -1,22 +1,21 @@
|
|
|
1
|
-
import { jsx
|
|
1
|
+
import { jsx } 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';
|
|
5
4
|
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();
|
|
10
11
|
var onLogoutHandler = function() {
|
|
11
12
|
user.logout();
|
|
12
|
-
|
|
13
|
+
navigate('/');
|
|
13
14
|
};
|
|
14
|
-
return /*#__PURE__*/ jsx(
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
children: t('logout')
|
|
19
|
-
})
|
|
15
|
+
return /*#__PURE__*/ jsx(Dropdown.Item, {
|
|
16
|
+
eventKey: "1",
|
|
17
|
+
onClick: onLogoutHandler,
|
|
18
|
+
children: t('logout')
|
|
20
19
|
});
|
|
21
20
|
}
|
|
22
21
|
|
|
@@ -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":"AAqBA,KAAK,mBAAmB,GAAG;IACzB,cAAc,CAAC,EAAE,OAAO,CAAA;IACxB,eAAe,CAAC,EAAE,OAAO,CAAA;CAC1B,CAAA;AAED,QAAA,MAAM,cAAc,yCAGjB,mBAAmB,4CAkHrB,CAAA;AAED,OAAO,EAAE,cAAc,EAAE,CAAA"}
|
|
@@ -3,17 +3,15 @@ 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 { Link } from 'react-router-dom';
|
|
6
|
+
import { useNavigate, 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';
|
|
14
13
|
import { SocialFormComponent } from '../Social/SocialFormComponent.js';
|
|
15
14
|
import { LoginFormComponent } from './LoginFormComponent.js';
|
|
16
|
-
import { Router } from '../Router.js';
|
|
17
15
|
import FormCard from '../../static/FormCard.js';
|
|
18
16
|
import { LoaderIndicator } from '../../static/loader/LoaderIndicator.js';
|
|
19
17
|
import Logo from '../../logo/Logo.js';
|
|
@@ -200,6 +198,7 @@ var LoginComponent = function(param) {
|
|
|
200
198
|
var auth = useAuth();
|
|
201
199
|
var user = useUser();
|
|
202
200
|
var invite = useInvite();
|
|
201
|
+
var navigate = useNavigate();
|
|
203
202
|
var _useState = _sliced_to_array(useState(false), 2), isLoading = _useState[0], setIsLoading = _useState[1];
|
|
204
203
|
var userApiService = useUserApi(request);
|
|
205
204
|
var handleError = function(error) {
|
|
@@ -276,7 +275,9 @@ var LoginComponent = function(param) {
|
|
|
276
275
|
title: 'Success',
|
|
277
276
|
message: t('Notification:loggedSuccessfully')
|
|
278
277
|
});
|
|
279
|
-
|
|
278
|
+
navigate('/', {
|
|
279
|
+
replace: true
|
|
280
|
+
});
|
|
280
281
|
return [
|
|
281
282
|
2
|
|
282
283
|
];
|
|
@@ -291,75 +292,71 @@ var LoginComponent = function(param) {
|
|
|
291
292
|
if (!user.profile || !auth.secrets) {
|
|
292
293
|
return;
|
|
293
294
|
}
|
|
294
|
-
|
|
295
|
+
navigate('/');
|
|
295
296
|
}, [
|
|
296
297
|
user.profile,
|
|
297
298
|
auth.secrets
|
|
298
299
|
]);
|
|
299
|
-
return /*#__PURE__*/ jsx(
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
300
|
+
return /*#__PURE__*/ jsx(Row, {
|
|
301
|
+
className: "justify-content-center",
|
|
302
|
+
children: /*#__PURE__*/ jsxs(Col, {
|
|
303
|
+
xs: true,
|
|
304
|
+
sm: 12,
|
|
305
|
+
md: 7,
|
|
306
|
+
lg: 6,
|
|
307
|
+
xl: 5,
|
|
308
|
+
className: "align-self-center",
|
|
309
|
+
children: [
|
|
310
|
+
/*#__PURE__*/ jsx("h1", {
|
|
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, {
|
|
310
336
|
children: [
|
|
311
|
-
/*#__PURE__*/
|
|
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, {
|
|
337
|
+
showSocialLinks && /*#__PURE__*/ jsxs(Fragment, {
|
|
337
338
|
children: [
|
|
338
|
-
|
|
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, {
|
|
339
|
+
/*#__PURE__*/ jsx(SocialFormComponent, {
|
|
350
340
|
isLoading: isLoading,
|
|
351
|
-
setIsLoading: setIsLoading
|
|
352
|
-
onSubmit: handleOnSubmit,
|
|
353
|
-
invitation: invite.invitation
|
|
341
|
+
setIsLoading: setIsLoading
|
|
354
342
|
}),
|
|
355
|
-
/*#__PURE__*/ jsx(
|
|
356
|
-
|
|
343
|
+
/*#__PURE__*/ jsx("hr", {
|
|
344
|
+
className: "mb-2"
|
|
357
345
|
})
|
|
358
346
|
]
|
|
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
|
|
359
356
|
})
|
|
360
357
|
]
|
|
361
358
|
})
|
|
362
|
-
|
|
359
|
+
]
|
|
363
360
|
})
|
|
364
361
|
});
|
|
365
362
|
};
|
|
@@ -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,+CAUlB,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 { useNavigate } from 'react-router-dom';
|
|
5
5
|
import '../../static/index.js';
|
|
6
6
|
import { BlockLoader } from '../../static/loader/BlockLoader.js';
|
|
7
7
|
import 'react-loader';
|
|
@@ -11,10 +11,12 @@ import 'clsx';
|
|
|
11
11
|
|
|
12
12
|
var Logout = function() {
|
|
13
13
|
var user = useUser();
|
|
14
|
+
var navigate = useNavigate();
|
|
14
15
|
useEffect(function() {
|
|
15
16
|
user.logout();
|
|
16
|
-
|
|
17
|
+
navigate('/');
|
|
17
18
|
}, [
|
|
19
|
+
navigate,
|
|
18
20
|
user
|
|
19
21
|
]);
|
|
20
22
|
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":"AAmBA,KAAK,sBAAsB,GAAG;IAC5B,eAAe,CAAC,EAAE,OAAO,CAAA;CAC1B,CAAA;AAED,iBAAS,iBAAiB,CAAC,EACzB,eAAuB,GACxB,EAAE,sBAAsB,2CA6GxB;AAED,OAAO,EAAE,iBAAiB,EAAE,CAAA"}
|