@licklist/design 0.78.5-dev.29 → 0.78.5-dev.30
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/preview.jsx +1 -1
- package/dist/auth/ChangePassword/ChangePasswordComponent.d.ts.map +1 -1
- package/dist/auth/ChangePassword/ChangePasswordComponent.js +5 -4
- package/dist/auth/Register/RegisterComponent.d.ts.map +1 -1
- package/dist/auth/Register/RegisterComponent.js +5 -4
- package/dist/auth/ResetPassword/ResetPasswordComponent.d.ts.map +1 -1
- package/dist/auth/ResetPassword/ResetPasswordComponent.js +5 -4
- package/dist/auth/Social/SocialCallbackComponent.d.ts.map +1 -1
- package/dist/auth/Social/SocialCallbackComponent.js +5 -2
- package/dist/auth/Social/SocialFormComponent.d.ts.map +1 -1
- package/dist/auth/Social/SocialFormComponent.js +4 -4
- package/dist/custom-fields/field-set/components/CustomFieldSet/CustomFieldSet.d.ts.map +1 -1
- package/dist/custom-fields/field-set/components/CustomFieldSet/CustomFieldSet.js +9 -6
- package/dist/events/edit-event-modal/component/SelectEventProductSet/component/EditEventProductSet.js +1 -1
- package/dist/file-upload/FileUpload.d.ts.map +1 -1
- package/dist/file-upload/FileUpload.js +4 -4
- package/package.json +8 -7
- package/src/auth/ChangePassword/ChangePasswordComponent.tsx +3 -4
- package/src/auth/Register/RegisterComponent.tsx +3 -4
- package/src/auth/ResetPassword/ResetPasswordComponent.tsx +3 -4
- package/src/auth/Social/SocialCallbackComponent.tsx +3 -2
- package/src/auth/Social/SocialFormComponent.tsx +2 -3
- package/src/custom-fields/field-set/components/CustomFieldSet/CustomFieldSet.tsx +5 -4
- package/src/file-upload/FileUpload.tsx +2 -3
package/.storybook/preview.jsx
CHANGED
|
@@ -17,7 +17,7 @@ const themeController = (() => {
|
|
|
17
17
|
themes.map((theme) => [
|
|
18
18
|
theme,
|
|
19
19
|
require(
|
|
20
|
-
`!style-loader?injectType=lazyStyleTag!css-loader!sass-loader!../src/styles/themes/${theme}/
|
|
20
|
+
`!style-loader?injectType=lazyStyleTag!css-loader!sass-loader!../src/styles/themes/${theme}/index.scss`,
|
|
21
21
|
).default,
|
|
22
22
|
]),
|
|
23
23
|
)
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ChangePasswordComponent.d.ts","sourceRoot":"","sources":["../../../src/auth/ChangePassword/ChangePasswordComponent.tsx"],"names":[],"mappings":"AAeA,iBAAS,uBAAuB,
|
|
1
|
+
{"version":3,"file":"ChangePasswordComponent.d.ts","sourceRoot":"","sources":["../../../src/auth/ChangePassword/ChangePasswordComponent.tsx"],"names":[],"mappings":"AAeA,iBAAS,uBAAuB,4CAkE/B;AAED,OAAO,EAAE,uBAAuB,EAAE,CAAA"}
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { jsx, jsxs } from 'react/jsx-runtime';
|
|
2
|
+
import { showAlert } from '@licklist/plugins/dist/context/app/AlertContext';
|
|
2
3
|
import { useContext, useState, useEffect } from 'react';
|
|
3
4
|
import Row from 'react-bootstrap/Row';
|
|
4
5
|
import Col from 'react-bootstrap/Col';
|
|
@@ -6,7 +7,6 @@ import { useTranslation } from 'react-i18next';
|
|
|
6
7
|
import { useLocation, useNavigate } from 'react-router-dom';
|
|
7
8
|
import RequestContext from '@licklist/plugins/dist/context/app/RequestContext';
|
|
8
9
|
import useUserApi from '@licklist/plugins/dist/hooks/Api/useUserApi';
|
|
9
|
-
import useNotification from '@licklist/plugins/dist/context/app/hooks/useNotification';
|
|
10
10
|
import { ROUTES } from '@licklist/core/dist/Config';
|
|
11
11
|
import { ChangePasswordFormComponent } from './ChangePasswordFormComponent.js';
|
|
12
12
|
import FormCard from '../../static/FormCard.js';
|
|
@@ -189,7 +189,6 @@ function ChangePasswordComponent() {
|
|
|
189
189
|
'App'
|
|
190
190
|
]).t;
|
|
191
191
|
var request = useContext(RequestContext);
|
|
192
|
-
var notification = useNotification();
|
|
193
192
|
var search = useLocation().search;
|
|
194
193
|
var email = new URLSearchParams(search).get('email');
|
|
195
194
|
var token = new URLSearchParams(search).get('token');
|
|
@@ -198,7 +197,8 @@ function ChangePasswordComponent() {
|
|
|
198
197
|
var userApiService = useUserApi(request);
|
|
199
198
|
var handleError = function(error) {
|
|
200
199
|
var _error_response_data, _error_response;
|
|
201
|
-
|
|
200
|
+
showAlert({
|
|
201
|
+
type: 'error',
|
|
202
202
|
title: t('App:error'),
|
|
203
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
|
|
204
204
|
});
|
|
@@ -234,7 +234,8 @@ function ChangePasswordComponent() {
|
|
|
234
234
|
2
|
|
235
235
|
];
|
|
236
236
|
}
|
|
237
|
-
|
|
237
|
+
showAlert({
|
|
238
|
+
type: 'success',
|
|
238
239
|
title: 'Success',
|
|
239
240
|
message: t('Notification:passwordChangedSuccessfully')
|
|
240
241
|
});
|
|
@@ -1 +1 @@
|
|
|
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,
|
|
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,2CA0GxB;AAED,OAAO,EAAE,iBAAiB,EAAE,CAAA"}
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { jsx, jsxs, Fragment } from 'react/jsx-runtime';
|
|
2
|
+
import { showAlert } from '@licklist/plugins/dist/context/app/AlertContext';
|
|
2
3
|
import { useContext, useState } from 'react';
|
|
3
4
|
import { useTranslation, Trans } from 'react-i18next';
|
|
4
5
|
import { useNavigate, Link } from 'react-router-dom';
|
|
5
6
|
import { Row, Col } from 'react-bootstrap';
|
|
6
7
|
import RequestContext from '@licklist/plugins/dist/context/app/RequestContext';
|
|
7
|
-
import useNotification from '@licklist/plugins/dist/context/app/hooks/useNotification';
|
|
8
8
|
import useUser from '@licklist/plugins/dist/context/user/hooks/useUser';
|
|
9
9
|
import useAuth from '@licklist/plugins/dist/context/user/hooks/useAuth';
|
|
10
10
|
import useInvite from '@licklist/plugins/dist/context/user/hooks/useInvite';
|
|
@@ -195,7 +195,6 @@ function RegisterComponent(param) {
|
|
|
195
195
|
var _param_showSocialLinks = param.showSocialLinks, showSocialLinks = _param_showSocialLinks === void 0 ? false : _param_showSocialLinks;
|
|
196
196
|
var t = useTranslation('User').t;
|
|
197
197
|
var request = useContext(RequestContext);
|
|
198
|
-
var notification = useNotification();
|
|
199
198
|
var auth = useAuth();
|
|
200
199
|
var user = useUser();
|
|
201
200
|
var invite = useInvite();
|
|
@@ -212,7 +211,8 @@ function RegisterComponent(param) {
|
|
|
212
211
|
}
|
|
213
212
|
};
|
|
214
213
|
var handleError = function(error) {
|
|
215
|
-
|
|
214
|
+
showAlert({
|
|
215
|
+
type: 'error',
|
|
216
216
|
title: 'Error',
|
|
217
217
|
message: error.message
|
|
218
218
|
});
|
|
@@ -278,7 +278,8 @@ function RegisterComponent(param) {
|
|
|
278
278
|
// Store user profile
|
|
279
279
|
user.login(profile.message);
|
|
280
280
|
invite.clearInvitation();
|
|
281
|
-
|
|
281
|
+
showAlert({
|
|
282
|
+
type: 'success',
|
|
282
283
|
title: 'Success',
|
|
283
284
|
message: t('Notification:registeredSuccessfully')
|
|
284
285
|
});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ResetPasswordComponent.d.ts","sourceRoot":"","sources":["../../../src/auth/ResetPassword/ResetPasswordComponent.tsx"],"names":[],"mappings":"AAeA,iBAAS,sBAAsB,
|
|
1
|
+
{"version":3,"file":"ResetPasswordComponent.d.ts","sourceRoot":"","sources":["../../../src/auth/ResetPassword/ResetPasswordComponent.tsx"],"names":[],"mappings":"AAeA,iBAAS,sBAAsB,4CAmD9B;AAED,OAAO,EAAE,sBAAsB,EAAE,CAAA"}
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import { jsx, jsxs } from 'react/jsx-runtime';
|
|
2
|
+
import { showAlert } from '@licklist/plugins/dist/context/app/AlertContext';
|
|
2
3
|
import { useContext, useState } from 'react';
|
|
3
4
|
import Row from 'react-bootstrap/Row';
|
|
4
5
|
import Col from 'react-bootstrap/Col';
|
|
5
6
|
import { useTranslation } from 'react-i18next';
|
|
6
7
|
import RequestContext from '@licklist/plugins/dist/context/app/RequestContext';
|
|
7
8
|
import useUserApi from '@licklist/plugins/dist/hooks/Api/useUserApi';
|
|
8
|
-
import useNotification from '@licklist/plugins/dist/context/app/hooks/useNotification';
|
|
9
9
|
import { ROUTES } from '@licklist/core/dist/Config';
|
|
10
10
|
import { useNavigate } from 'react-router-dom';
|
|
11
11
|
import { ResetPasswordFormComponent } from './ResetPasswordFormComponent.js';
|
|
@@ -189,13 +189,13 @@ function ResetPasswordComponent() {
|
|
|
189
189
|
'App'
|
|
190
190
|
]).t;
|
|
191
191
|
var request = useContext(RequestContext);
|
|
192
|
-
var notification = useNotification();
|
|
193
192
|
var navigate = useNavigate();
|
|
194
193
|
var _useState = _sliced_to_array(useState(false), 2), isLoading = _useState[0], setIsLoading = _useState[1];
|
|
195
194
|
var userApiService = useUserApi(request);
|
|
196
195
|
var handleError = function(error) {
|
|
197
196
|
var _error_response_data, _error_response;
|
|
198
|
-
|
|
197
|
+
showAlert({
|
|
198
|
+
type: 'error',
|
|
199
199
|
title: t('App:error'),
|
|
200
200
|
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
|
|
201
201
|
});
|
|
@@ -230,7 +230,8 @@ function ResetPasswordComponent() {
|
|
|
230
230
|
2
|
|
231
231
|
];
|
|
232
232
|
}
|
|
233
|
-
|
|
233
|
+
showAlert({
|
|
234
|
+
type: 'success',
|
|
234
235
|
title: 'Success',
|
|
235
236
|
message: t('Notification:passwordResetedSuccessfully')
|
|
236
237
|
});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SocialCallbackComponent.d.ts","sourceRoot":"","sources":["../../../src/auth/Social/SocialCallbackComponent.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"SocialCallbackComponent.d.ts","sourceRoot":"","sources":["../../../src/auth/Social/SocialCallbackComponent.tsx"],"names":[],"mappings":"AAsBA,iBAAS,uBAAuB,4CA2G/B;AAED,OAAO,EAAE,uBAAuB,EAAE,CAAA"}
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { jsx, Fragment } from 'react/jsx-runtime';
|
|
2
|
+
import { showAlert } from '@licklist/plugins/dist/context/app/AlertContext';
|
|
2
3
|
import { useState, useContext, useEffect } from 'react';
|
|
3
4
|
import RequestContext from '@licklist/plugins/dist/context/app/RequestContext';
|
|
4
5
|
import useNotification from '@licklist/plugins/dist/context/app/hooks/useNotification';
|
|
@@ -203,7 +204,8 @@ function SocialCallbackComponent() {
|
|
|
203
204
|
// Handle social callback
|
|
204
205
|
useEffect(function() {
|
|
205
206
|
var handleError = function(error) {
|
|
206
|
-
|
|
207
|
+
showAlert({
|
|
208
|
+
type: 'error',
|
|
207
209
|
title: 'Error',
|
|
208
210
|
message: error.message
|
|
209
211
|
});
|
|
@@ -252,7 +254,8 @@ function SocialCallbackComponent() {
|
|
|
252
254
|
}
|
|
253
255
|
// Store user profile
|
|
254
256
|
user.login(profile.message);
|
|
255
|
-
|
|
257
|
+
showAlert({
|
|
258
|
+
type: 'success',
|
|
256
259
|
title: 'Success',
|
|
257
260
|
message: t('Notification:loggedSuccessfully')
|
|
258
261
|
});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SocialFormComponent.d.ts","sourceRoot":"","sources":["../../../src/auth/Social/SocialFormComponent.tsx"],"names":[],"mappings":"AAaA,MAAM,WAAW,wBAAwB;IACvC,SAAS,EAAE,OAAO,CAAA;IAClB,YAAY,EAAE,QAAQ,CAAA;CACvB;AAED,iBAAS,mBAAmB,CAAC,KAAK,EAAE,wBAAwB,
|
|
1
|
+
{"version":3,"file":"SocialFormComponent.d.ts","sourceRoot":"","sources":["../../../src/auth/Social/SocialFormComponent.tsx"],"names":[],"mappings":"AAaA,MAAM,WAAW,wBAAwB;IACvC,SAAS,EAAE,OAAO,CAAA;IAClB,YAAY,EAAE,QAAQ,CAAA;CACvB;AAED,iBAAS,mBAAmB,CAAC,KAAK,EAAE,wBAAwB,2CA6E3D;AAED,OAAO,EAAE,mBAAmB,EAAE,CAAA"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { jsxs, Fragment, jsx } from 'react/jsx-runtime';
|
|
2
|
-
import
|
|
2
|
+
import { showAlert } from '@licklist/plugins/dist/context/app/AlertContext';
|
|
3
3
|
import RequestContext from '@licklist/plugins/dist/context/app/RequestContext';
|
|
4
4
|
import useSocialApi from '@licklist/plugins/dist/hooks/Api/useSocialApi';
|
|
5
5
|
import RouteService from '@licklist/plugins/dist/services/Route/RouteService';
|
|
@@ -9,7 +9,7 @@ import { useTranslation } from 'react-i18next';
|
|
|
9
9
|
import { LoaderIndicator } from '../../static/loader/LoaderIndicator.js';
|
|
10
10
|
import SocialButton from '../../static/SocialButton.js';
|
|
11
11
|
|
|
12
|
-
|
|
12
|
+
function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) {
|
|
13
13
|
try {
|
|
14
14
|
var info = gen[key](arg);
|
|
15
15
|
var value = info.value;
|
|
@@ -136,13 +136,13 @@ function _ts_generator(thisArg, body) {
|
|
|
136
136
|
function SocialFormComponent(props) {
|
|
137
137
|
var isLoading = props.isLoading, setIsLoading = props.setIsLoading;
|
|
138
138
|
var request = useContext(RequestContext);
|
|
139
|
-
var notification = useNotification();
|
|
140
139
|
var t = useTranslation([
|
|
141
140
|
'App'
|
|
142
141
|
]).t;
|
|
143
142
|
var socialService = useSocialApi(request);
|
|
144
143
|
var handleError = function(error) {
|
|
145
|
-
|
|
144
|
+
showAlert({
|
|
145
|
+
type: 'error',
|
|
146
146
|
title: 'Error',
|
|
147
147
|
message: error.message
|
|
148
148
|
});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CustomFieldSet.d.ts","sourceRoot":"","sources":["../../../../../src/custom-fields/field-set/components/CustomFieldSet/CustomFieldSet.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"CustomFieldSet.d.ts","sourceRoot":"","sources":["../../../../../src/custom-fields/field-set/components/CustomFieldSet/CustomFieldSet.tsx"],"names":[],"mappings":"AAgBA,OAAO,EAAE,iBAAiB,EAAE,MAAM,oDAAoD,CAAA;AAEtF,OAAO,EAAE,WAAW,EAAE,MAAM,+CAA+C,CAAA;AAG3E,OAAO,EAGL,YAAY,EACb,MAAM,2BAA2B,CAAA;AAKlC,OAAO,EAAE,oBAAoB,EAAE,gBAAgB,EAAE,MAAM,uBAAuB,CAAA;AAW9E,KAAK,mBAAmB,GAAG,iBAAiB,GAAG;IAC7C,YAAY,EAAE,oBAAoB,CAAC,cAAc,CAAC,CAAA;IAClD,IAAI,EAAE,YAAY,CAAC,gBAAgB,CAAC,CAAA;IACpC,WAAW,EAAE,gBAAgB,EAAE,CAAA;IAC/B,KAAK,EAAE,MAAM,CAAA;IACb,gBAAgB,EAAE,oBAAoB,CAAC,kBAAkB,CAAC,CAAA;IAC1D,gBAAgB,EAAE,oBAAoB,CAAC,kBAAkB,CAAC,CAAA;IAC1D,YAAY,CAAC,EAAE,WAAW,CAAA;CAC3B,CAAA;AAED,eAAO,MAAM,cAAc,GAAI,wHAS5B,mBAAmB,4CAiNrB,CAAA"}
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { jsxs, jsx, Fragment } from 'react/jsx-runtime';
|
|
2
|
+
import { showAlert } from '@licklist/plugins/dist/context/app/AlertContext';
|
|
2
3
|
import { useContext, useState, useEffect, createElement } from 'react';
|
|
3
4
|
import { useTranslation } from 'react-i18next';
|
|
4
5
|
import { Form, Button } from 'react-bootstrap';
|
|
@@ -7,7 +8,6 @@ import { isEqual } from 'lodash';
|
|
|
7
8
|
import { CUSTOM_FIELD_TYPE_INPUT, CUSTOM_FIELD_TYPE_DROPDOWN } from '@licklist/core/dist/DataMapper/Order/CustomFieldDataMapper';
|
|
8
9
|
import FormErrorService from '@licklist/plugins/dist/services/Form/FormErrorService';
|
|
9
10
|
import HookFormService from '@licklist/plugins/dist/services/Form/HookFormService';
|
|
10
|
-
import useNotification from '@licklist/plugins/dist/context/app/hooks/useNotification';
|
|
11
11
|
import { CreateSortableListItem } from '../../../../sortable-list/CreateSortableListItem.js';
|
|
12
12
|
import { SORTABLE_ID_KEY } from '../../../../sortable-list/SortableList.js';
|
|
13
13
|
import { SortableTreeItem } from '../../../../sortable-tree/SortableTreeItem.js';
|
|
@@ -271,7 +271,6 @@ var CustomFieldSet = function(param) {
|
|
|
271
271
|
serverErrors,
|
|
272
272
|
setError
|
|
273
273
|
]);
|
|
274
|
-
var notification = useNotification();
|
|
275
274
|
var _useFieldArray = useFieldArray({
|
|
276
275
|
control: control,
|
|
277
276
|
name: CUSTOM_FIELDS
|
|
@@ -295,11 +294,13 @@ var CustomFieldSet = function(param) {
|
|
|
295
294
|
if (!response) return [
|
|
296
295
|
2
|
|
297
296
|
];
|
|
298
|
-
|
|
297
|
+
showAlert({
|
|
298
|
+
type: 'success',
|
|
299
299
|
title: t('App:success'),
|
|
300
300
|
message: t('Notification:createSuccessfully', {
|
|
301
301
|
argument: t('customField')
|
|
302
|
-
})
|
|
302
|
+
}),
|
|
303
|
+
mount: 'global'
|
|
303
304
|
});
|
|
304
305
|
setFieldSets(function(prevFieldSets) {
|
|
305
306
|
var nextFieldSets = _to_consumable_array(prevFieldSets);
|
|
@@ -333,11 +334,13 @@ var CustomFieldSet = function(param) {
|
|
|
333
334
|
];
|
|
334
335
|
case 1:
|
|
335
336
|
_state.sent();
|
|
336
|
-
|
|
337
|
+
showAlert({
|
|
338
|
+
type: 'success',
|
|
337
339
|
title: t('App:success'),
|
|
338
340
|
message: t('Notification:theRemovedSuccessfully', {
|
|
339
341
|
argument: t('customField')
|
|
340
|
-
})
|
|
342
|
+
}),
|
|
343
|
+
mount: 'global'
|
|
341
344
|
});
|
|
342
345
|
_state.label = 2;
|
|
343
346
|
case 2:
|
|
@@ -32,7 +32,7 @@ import 'react-bootstrap/Collapse';
|
|
|
32
32
|
import '@licklist/plugins/dist/hooks/Media/useImages';
|
|
33
33
|
import '@licklist/core/dist/DataMapper/Media/ImageDataMapper';
|
|
34
34
|
import 'react-select';
|
|
35
|
-
import '@licklist/plugins/dist/context/app/
|
|
35
|
+
import '@licklist/plugins/dist/context/app/AlertContext';
|
|
36
36
|
import '../../../../../static/index.js';
|
|
37
37
|
import '../../../../../tiptap-editor/TipTapEditor.js';
|
|
38
38
|
import '@licklist/core/dist/DataMapper/Product/ProductDataMapper';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"FileUpload.d.ts","sourceRoot":"","sources":["../../src/file-upload/FileUpload.tsx"],"names":[],"mappings":"AAKA,OAAO,EAAE,KAAK,EAAE,MAAM,sDAAsD,CAAA;AAC5E,OAAO,EAAE,UAAU,EAAE,MAAM,kEAAkE,CAAA;AAC7F,OAAO,EAAE,kBAAkB,EAAE,MAAM,0EAA0E,CAAA;AAQ7G,KAAK,YAAY,GAAG,CAAC,EAAE,EAAE,MAAM,EAAE,IAAI,CAAC,EAAE,MAAM,EAAE,IAAI,CAAC,EAAE,MAAM,KAAK,IAAI,CAAA;AAEtE,UAAU,eAAe;IACvB,aAAa,CAAC,EAAE,OAAO,CAA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';
|
|
2
3
|
import { useEffect, useState } from 'react';
|
|
3
4
|
import clsx from 'clsx';
|
|
4
|
-
import useNotification from '@licklist/plugins/dist/context/app/hooks/useNotification';
|
|
5
5
|
import { useTranslation } from 'react-i18next';
|
|
6
6
|
import { Form } from 'react-bootstrap';
|
|
7
7
|
import '../static/index.js';
|
|
@@ -10,7 +10,7 @@ import { ReactComponent as SvgAddImage } from '../assets/dashboard/addImage.svg.
|
|
|
10
10
|
import { LoaderIndicator } from '../static/loader/LoaderIndicator.js';
|
|
11
11
|
import '@licklist/plugins/dist/hooks/Media/useWindowDimensions';
|
|
12
12
|
|
|
13
|
-
|
|
13
|
+
function _array_like_to_array(arr, len) {
|
|
14
14
|
if (len == null || len > arr.length) len = arr.length;
|
|
15
15
|
for(var i = 0, arr2 = new Array(len); i < len; i++)arr2[i] = arr[i];
|
|
16
16
|
return arr2;
|
|
@@ -163,7 +163,6 @@ var useFileUpload = function(param) {
|
|
|
163
163
|
var allowMultiple = param.allowMultiple, allowedExtensions = param.allowedExtensions, onFileRemove = param.onFileRemove;
|
|
164
164
|
var _useState = _sliced_to_array(useState(null), 2), files = _useState[0], setFiles = _useState[1];
|
|
165
165
|
var _useState1 = _sliced_to_array(useState(false), 2), isDragged = _useState1[0], setIsDragged = _useState1[1];
|
|
166
|
-
var notification = useNotification();
|
|
167
166
|
var t = useTranslation('Design').t;
|
|
168
167
|
var uploadFile = function(file) {
|
|
169
168
|
var sameFile = files === null || files === void 0 ? void 0 : files.find(function(uploadedFile) {
|
|
@@ -190,7 +189,8 @@ var useFileUpload = function(param) {
|
|
|
190
189
|
if (isExtensionValid) {
|
|
191
190
|
uploadFile(file);
|
|
192
191
|
} else {
|
|
193
|
-
|
|
192
|
+
showAlert({
|
|
193
|
+
type: 'error',
|
|
194
194
|
title: t('fileNotUploaded', {
|
|
195
195
|
fileName: file.name
|
|
196
196
|
}),
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@licklist/design",
|
|
3
|
-
"version": "0.78.5-dev.
|
|
3
|
+
"version": "0.78.5-dev.30",
|
|
4
4
|
"repository": {
|
|
5
5
|
"type": "git",
|
|
6
6
|
"url": "git+ssh://git@bitbucket.org/artelogicsoft/licklist_design.git"
|
|
@@ -42,9 +42,9 @@
|
|
|
42
42
|
]
|
|
43
43
|
},
|
|
44
44
|
"peerDependencies": {
|
|
45
|
-
"@licklist/core": "0.36.
|
|
45
|
+
"@licklist/core": "0.36.1-dev.7",
|
|
46
46
|
"@licklist/eslint-config": "0.5.6",
|
|
47
|
-
"@licklist/plugins": "0.36.4-
|
|
47
|
+
"@licklist/plugins": "0.36.4-dev.10",
|
|
48
48
|
"clsx": "2.1.1",
|
|
49
49
|
"i18next": "25.3.2",
|
|
50
50
|
"lodash": "4.17.21",
|
|
@@ -64,9 +64,9 @@
|
|
|
64
64
|
"@dnd-kit/utilities": "2.0.0",
|
|
65
65
|
"@fortawesome/fontawesome-svg-core": "1.2.34",
|
|
66
66
|
"@fortawesome/free-solid-svg-icons": "5.15.2",
|
|
67
|
-
"@licklist/core": "0.36.
|
|
67
|
+
"@licklist/core": "0.36.1-dev.7",
|
|
68
68
|
"@licklist/eslint-config": "0.5.6",
|
|
69
|
-
"@licklist/plugins": "0.36.4-
|
|
69
|
+
"@licklist/plugins": "0.36.4-dev.10",
|
|
70
70
|
"@mantine/core": "6.0.22",
|
|
71
71
|
"@mantine/hooks": "6.0.22",
|
|
72
72
|
"@mdx-js/react": "1.6.22",
|
|
@@ -222,5 +222,6 @@
|
|
|
222
222
|
"node": "20.9.0",
|
|
223
223
|
"yarn": "4.4.0"
|
|
224
224
|
},
|
|
225
|
-
"packageManager": "yarn@4.8.0
|
|
226
|
-
|
|
225
|
+
"packageManager": "yarn@4.8.0",
|
|
226
|
+
"stableVersion": "0.78.5-dev.30"
|
|
227
|
+
}
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { showAlert } from '@licklist/plugins/dist/context/app/AlertContext'
|
|
1
2
|
import { useContext, useEffect, useState } from 'react'
|
|
2
3
|
import Row from 'react-bootstrap/Row'
|
|
3
4
|
import Col from 'react-bootstrap/Col'
|
|
@@ -6,7 +7,6 @@ import { useLocation, useNavigate } from 'react-router-dom'
|
|
|
6
7
|
import { ApiServiceError } from '@licklist/core/dist/Api/ApiService'
|
|
7
8
|
import RequestContext from '@licklist/plugins/dist/context/app/RequestContext'
|
|
8
9
|
import useUserApi from '@licklist/plugins/dist/hooks/Api/useUserApi'
|
|
9
|
-
import useNotification from '@licklist/plugins/dist/context/app/hooks/useNotification'
|
|
10
10
|
import { UserChangePasswordRequest } from '@licklist/plugins/dist/types/Request/UserChangePasswordRequest'
|
|
11
11
|
import { ROUTES } from '@licklist/core/dist/Config'
|
|
12
12
|
import { ChangePasswordFormComponent } from './ChangePasswordFormComponent'
|
|
@@ -16,7 +16,6 @@ import { LoaderIndicator } from '../../static/loader/LoaderIndicator'
|
|
|
16
16
|
function ChangePasswordComponent() {
|
|
17
17
|
const { t } = useTranslation(['Notification', 'User', 'App'])
|
|
18
18
|
const request = useContext(RequestContext)
|
|
19
|
-
const notification = useNotification()
|
|
20
19
|
const { search } = useLocation()
|
|
21
20
|
const email = new URLSearchParams(search).get('email')
|
|
22
21
|
const token = new URLSearchParams(search).get('token')
|
|
@@ -27,7 +26,7 @@ function ChangePasswordComponent() {
|
|
|
27
26
|
const userApiService = useUserApi(request)
|
|
28
27
|
|
|
29
28
|
const handleError = (error: ApiServiceError<{ message: string }>) => {
|
|
30
|
-
|
|
29
|
+
showAlert({ type: 'error',
|
|
31
30
|
title: t('App:error'),
|
|
32
31
|
message: error.response?.data?.message,
|
|
33
32
|
})
|
|
@@ -45,7 +44,7 @@ function ChangePasswordComponent() {
|
|
|
45
44
|
return
|
|
46
45
|
}
|
|
47
46
|
|
|
48
|
-
|
|
47
|
+
showAlert({ type: 'success',
|
|
49
48
|
title: 'Success',
|
|
50
49
|
message: t('Notification:passwordChangedSuccessfully'),
|
|
51
50
|
})
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
+
import { showAlert } from '@licklist/plugins/dist/context/app/AlertContext'
|
|
1
2
|
import { useContext, useState } from 'react'
|
|
2
3
|
import { Trans, useTranslation } from 'react-i18next'
|
|
3
4
|
import { Link, useNavigate } from 'react-router-dom'
|
|
4
5
|
import { Row, Col } from 'react-bootstrap'
|
|
5
6
|
import RequestContext from '@licklist/plugins/dist/context/app/RequestContext'
|
|
6
|
-
import useNotification from '@licklist/plugins/dist/context/app/hooks/useNotification'
|
|
7
7
|
import useUser from '@licklist/plugins/dist/context/user/hooks/useUser'
|
|
8
8
|
import useAuth from '@licklist/plugins/dist/context/user/hooks/useAuth'
|
|
9
9
|
import useInvite from '@licklist/plugins/dist/context/user/hooks/useInvite'
|
|
@@ -26,7 +26,6 @@ function RegisterComponent({
|
|
|
26
26
|
}: RegisterComponentProps) {
|
|
27
27
|
const { t } = useTranslation('User')
|
|
28
28
|
const request = useContext(RequestContext)
|
|
29
|
-
const notification = useNotification()
|
|
30
29
|
const auth = useAuth()
|
|
31
30
|
const user = useUser()
|
|
32
31
|
const invite = useInvite()
|
|
@@ -48,7 +47,7 @@ function RegisterComponent({
|
|
|
48
47
|
}
|
|
49
48
|
|
|
50
49
|
const handleError = (error: Error) => {
|
|
51
|
-
|
|
50
|
+
showAlert({ type: 'error',
|
|
52
51
|
title: 'Error',
|
|
53
52
|
message: error.message,
|
|
54
53
|
})
|
|
@@ -85,7 +84,7 @@ function RegisterComponent({
|
|
|
85
84
|
|
|
86
85
|
invite.clearInvitation()
|
|
87
86
|
|
|
88
|
-
|
|
87
|
+
showAlert({ type: 'success',
|
|
89
88
|
title: 'Success',
|
|
90
89
|
message: t('Notification:registeredSuccessfully'),
|
|
91
90
|
})
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { showAlert } from '@licklist/plugins/dist/context/app/AlertContext'
|
|
1
2
|
import { useContext, useState } from 'react'
|
|
2
3
|
import Row from 'react-bootstrap/Row'
|
|
3
4
|
import Col from 'react-bootstrap/Col'
|
|
@@ -5,7 +6,6 @@ import { useTranslation } from 'react-i18next'
|
|
|
5
6
|
import { ApiServiceError } from '@licklist/core/dist/Api/ApiService'
|
|
6
7
|
import RequestContext from '@licklist/plugins/dist/context/app/RequestContext'
|
|
7
8
|
import useUserApi from '@licklist/plugins/dist/hooks/Api/useUserApi'
|
|
8
|
-
import useNotification from '@licklist/plugins/dist/context/app/hooks/useNotification'
|
|
9
9
|
import { UserResetPasswordRequest } from '@licklist/plugins/dist/types/Request/UserResetPasswordRequest'
|
|
10
10
|
import { ROUTES } from '@licklist/core/dist/Config'
|
|
11
11
|
import { useNavigate } from 'react-router-dom'
|
|
@@ -16,7 +16,6 @@ import { LoaderIndicator } from '../../static/loader/LoaderIndicator'
|
|
|
16
16
|
function ResetPasswordComponent() {
|
|
17
17
|
const { t } = useTranslation(['Notification', 'User', 'App'])
|
|
18
18
|
const request = useContext(RequestContext)
|
|
19
|
-
const notification = useNotification()
|
|
20
19
|
const navigate = useNavigate()
|
|
21
20
|
|
|
22
21
|
const [isLoading, setIsLoading] = useState<boolean>(false)
|
|
@@ -24,7 +23,7 @@ function ResetPasswordComponent() {
|
|
|
24
23
|
const userApiService = useUserApi(request)
|
|
25
24
|
|
|
26
25
|
const handleError = (error: ApiServiceError<{ message: string }>) => {
|
|
27
|
-
|
|
26
|
+
showAlert({ type: 'error',
|
|
28
27
|
title: t('App:error'),
|
|
29
28
|
message: error.response?.data?.message,
|
|
30
29
|
})
|
|
@@ -40,7 +39,7 @@ function ResetPasswordComponent() {
|
|
|
40
39
|
return
|
|
41
40
|
}
|
|
42
41
|
|
|
43
|
-
|
|
42
|
+
showAlert({ type: 'success',
|
|
44
43
|
title: 'Success',
|
|
45
44
|
message: t('Notification:passwordResetedSuccessfully'),
|
|
46
45
|
})
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { showAlert } from '@licklist/plugins/dist/context/app/AlertContext'
|
|
1
2
|
import { useContext, useEffect, useState } from 'react'
|
|
2
3
|
import RequestContext from '@licklist/plugins/dist/context/app/RequestContext'
|
|
3
4
|
import useNotification from '@licklist/plugins/dist/context/app/hooks/useNotification'
|
|
@@ -39,7 +40,7 @@ function SocialCallbackComponent() {
|
|
|
39
40
|
// Handle social callback
|
|
40
41
|
useEffect(() => {
|
|
41
42
|
const handleError = (error: Error) => {
|
|
42
|
-
|
|
43
|
+
showAlert({ type: 'error',
|
|
43
44
|
title: 'Error',
|
|
44
45
|
message: error.message,
|
|
45
46
|
})
|
|
@@ -72,7 +73,7 @@ function SocialCallbackComponent() {
|
|
|
72
73
|
// Store user profile
|
|
73
74
|
user.login(profile.message as IUser)
|
|
74
75
|
|
|
75
|
-
|
|
76
|
+
showAlert({ type: 'success',
|
|
76
77
|
title: 'Success',
|
|
77
78
|
message: t('Notification:loggedSuccessfully'),
|
|
78
79
|
})
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
+
import { showAlert } from '@licklist/plugins/dist/context/app/AlertContext'
|
|
1
2
|
/* eslint-disable @typescript-eslint/ban-ts-comment */
|
|
2
3
|
/* eslint-disable @typescript-eslint/ban-types */
|
|
3
|
-
import useNotification from '@licklist/plugins/dist/context/app/hooks/useNotification'
|
|
4
4
|
import RequestContext from '@licklist/plugins/dist/context/app/RequestContext'
|
|
5
5
|
import useSocialApi from '@licklist/plugins/dist/hooks/Api/useSocialApi'
|
|
6
6
|
import RouteService from '@licklist/plugins/dist/services/Route/RouteService'
|
|
@@ -20,13 +20,12 @@ function SocialFormComponent(props: SocialFormComponentProps) {
|
|
|
20
20
|
const { isLoading, setIsLoading } = props
|
|
21
21
|
|
|
22
22
|
const request = useContext(RequestContext)
|
|
23
|
-
const notification = useNotification()
|
|
24
23
|
const { t } = useTranslation(['App'])
|
|
25
24
|
|
|
26
25
|
const socialService = useSocialApi(request)
|
|
27
26
|
|
|
28
27
|
const handleError = (error: Error) => {
|
|
29
|
-
|
|
28
|
+
showAlert({ type: 'error',
|
|
30
29
|
title: 'Error',
|
|
31
30
|
message: error.message,
|
|
32
31
|
})
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { showAlert } from '@licklist/plugins/dist/context/app/AlertContext'
|
|
1
2
|
import { createElement, useState, useEffect, useContext } from 'react'
|
|
2
3
|
import { useTranslation } from 'react-i18next'
|
|
3
4
|
import { Button, Form } from 'react-bootstrap'
|
|
@@ -17,7 +18,6 @@ import { HasPermissionProp } from '@licklist/plugins/dist/types/permission/Permi
|
|
|
17
18
|
import FormErrorService from '@licklist/plugins/dist/services/Form/FormErrorService'
|
|
18
19
|
import { ServerError } from '@licklist/plugins/dist/hooks/Api/useHttpQuery'
|
|
19
20
|
import HookFormService from '@licklist/plugins/dist/services/Form/HookFormService'
|
|
20
|
-
import useNotification from '@licklist/plugins/dist/context/app/hooks/useNotification'
|
|
21
21
|
|
|
22
22
|
import {
|
|
23
23
|
CreateSortableListItem,
|
|
@@ -85,7 +85,6 @@ export const CustomFieldSet = ({
|
|
|
85
85
|
useEffect(() => {
|
|
86
86
|
FormErrorService.handleServerErrors(serverErrors, setError)
|
|
87
87
|
}, [serverErrors, setError])
|
|
88
|
-
const notification = useNotification()
|
|
89
88
|
const { fields, append, remove } = useFieldArray({
|
|
90
89
|
control,
|
|
91
90
|
name: CUSTOM_FIELDS,
|
|
@@ -98,11 +97,12 @@ export const CustomFieldSet = ({
|
|
|
98
97
|
|
|
99
98
|
if (!response) return
|
|
100
99
|
|
|
101
|
-
|
|
100
|
+
showAlert({ type: 'success',
|
|
102
101
|
title: t('App:success'),
|
|
103
102
|
message: t('Notification:createSuccessfully', {
|
|
104
103
|
argument: t('customField'),
|
|
105
104
|
}),
|
|
105
|
+
mount: 'global'
|
|
106
106
|
})
|
|
107
107
|
|
|
108
108
|
setFieldSets((prevFieldSets) => {
|
|
@@ -124,11 +124,12 @@ export const CustomFieldSet = ({
|
|
|
124
124
|
if (fieldSet.id !== null) {
|
|
125
125
|
await onFieldSetDelete(fieldSet)
|
|
126
126
|
|
|
127
|
-
|
|
127
|
+
showAlert({ type: 'success',
|
|
128
128
|
title: t('App:success'),
|
|
129
129
|
message: t('Notification:theRemovedSuccessfully', {
|
|
130
130
|
argument: t('customField'),
|
|
131
131
|
}),
|
|
132
|
+
mount: 'global'
|
|
132
133
|
})
|
|
133
134
|
}
|
|
134
135
|
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
+
import { showAlert } from '@licklist/plugins/dist/context/app/AlertContext'
|
|
1
2
|
/* eslint-disable no-return-assign */
|
|
2
3
|
/* eslint-disable react-hooks/exhaustive-deps */
|
|
3
4
|
import { useEffect, useState } from 'react'
|
|
4
5
|
import clsx from 'clsx'
|
|
5
|
-
import useNotification from '@licklist/plugins/dist/context/app/hooks/useNotification'
|
|
6
6
|
import { Image } from '@licklist/core/dist/DataMapper/Media/ImageDataMapper'
|
|
7
7
|
import { Attachment } from '@licklist/core/dist/DataMapper/Notification/AttachmentDataMapper'
|
|
8
8
|
import { AttachmentMetadata } from '@licklist/core/dist/DataMapper/Notification/AttachmentMetadataDataMapper'
|
|
@@ -153,7 +153,6 @@ export const useFileUpload = ({
|
|
|
153
153
|
const [files, setFiles] = useState<File[] | null>(null)
|
|
154
154
|
const [isDragged, setIsDragged] = useState(false)
|
|
155
155
|
|
|
156
|
-
const notification = useNotification()
|
|
157
156
|
const { t } = useTranslation('Design')
|
|
158
157
|
|
|
159
158
|
const uploadFile = (file: File) => {
|
|
@@ -183,7 +182,7 @@ export const useFileUpload = ({
|
|
|
183
182
|
if (isExtensionValid) {
|
|
184
183
|
uploadFile(file)
|
|
185
184
|
} else {
|
|
186
|
-
|
|
185
|
+
showAlert({ type: 'error',
|
|
187
186
|
title: t('fileNotUploaded', { fileName: file.name }),
|
|
188
187
|
message: t('invalidExtension', { extension: fileExtension }),
|
|
189
188
|
})
|