@licklist/design 0.70.0-dev.2 → 0.70.0-dev.4
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/custom-fields/field-set/components/CustomFieldSet/CustomFieldSet.d.ts.map +1 -1
- package/dist/custom-fields/field-set/components/CustomFieldSet/CustomFieldSet.js +14 -0
- package/dist/iframe/ryft/RyftPaymentForm.d.ts.map +1 -1
- package/dist/iframe/ryft/RyftPaymentForm.js +3 -3
- package/dist/iframe/ryft/utils/ryft-form.js +2 -2
- package/package.json +4 -4
- package/src/custom-fields/field-set/components/CustomFieldSet/CustomFieldSet.tsx +16 -1
- package/src/iframe/ryft/RyftPaymentForm.tsx +4 -2
- package/src/iframe/ryft/utils/ryft-form.ts +2 -2
- package/yarn.lock +907 -845
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CustomFieldSet.d.ts","sourceRoot":"","sources":["../../../../../src/custom-fields/field-set/components/CustomFieldSet/CustomFieldSet.tsx"],"names":[],"mappings":"AAeA,OAAO,EAAE,iBAAiB,EAAE,MAAM,oDAAoD,CAAA;AAEtF,OAAO,EAAE,WAAW,EAAE,MAAM,+CAA+C,CAAA;
|
|
1
|
+
{"version":3,"file":"CustomFieldSet.d.ts","sourceRoot":"","sources":["../../../../../src/custom-fields/field-set/components/CustomFieldSet/CustomFieldSet.tsx"],"names":[],"mappings":"AAeA,OAAO,EAAE,iBAAiB,EAAE,MAAM,oDAAoD,CAAA;AAEtF,OAAO,EAAE,WAAW,EAAE,MAAM,+CAA+C,CAAA;AAI3E,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,2HASxB,mBAAmB,4CAgNrB,CAAA"}
|
|
@@ -7,6 +7,7 @@ import { isEqual } from 'lodash';
|
|
|
7
7
|
import { CUSTOM_FIELD_TYPE_INPUT, CUSTOM_FIELD_TYPE_DROPDOWN } from '@licklist/core/dist/DataMapper/Order/CustomFieldDataMapper';
|
|
8
8
|
import FormErrorService from '@licklist/plugins/dist/services/Form/FormErrorService';
|
|
9
9
|
import HookFormService from '@licklist/plugins/dist/services/Form/HookFormService';
|
|
10
|
+
import useNotification from '@licklist/plugins/dist/context/app/hooks/useNotification';
|
|
10
11
|
import { CreateSortableListItem } from '../../../../sortable-list/CreateSortableListItem.js';
|
|
11
12
|
import { SORTABLE_ID_KEY } from '../../../../sortable-list/SortableList.js';
|
|
12
13
|
import { SortableTreeItem } from '../../../../sortable-tree/SortableTreeItem.js';
|
|
@@ -270,6 +271,7 @@ var CustomFieldSet = function(param) {
|
|
|
270
271
|
serverErrors,
|
|
271
272
|
setError
|
|
272
273
|
]);
|
|
274
|
+
var notification = useNotification();
|
|
273
275
|
var _useFieldArray = useFieldArray({
|
|
274
276
|
control: control,
|
|
275
277
|
name: CUSTOM_FIELDS
|
|
@@ -293,6 +295,12 @@ var CustomFieldSet = function(param) {
|
|
|
293
295
|
if (!response) return [
|
|
294
296
|
2
|
|
295
297
|
];
|
|
298
|
+
notification.success({
|
|
299
|
+
title: t('App:success'),
|
|
300
|
+
message: t('Notification:createSuccessfully', {
|
|
301
|
+
argument: t('customField')
|
|
302
|
+
})
|
|
303
|
+
});
|
|
296
304
|
setFieldSets(function(prevFieldSets) {
|
|
297
305
|
var nextFieldSets = _to_consumable_array(prevFieldSets);
|
|
298
306
|
var nextFieldSetFormProps = _object_spread({}, formValues, response);
|
|
@@ -325,6 +333,12 @@ var CustomFieldSet = function(param) {
|
|
|
325
333
|
];
|
|
326
334
|
case 1:
|
|
327
335
|
_state.sent();
|
|
336
|
+
notification.success({
|
|
337
|
+
title: t('App:success'),
|
|
338
|
+
message: t('Notification:theRemovedSuccessfully', {
|
|
339
|
+
argument: t('customField')
|
|
340
|
+
})
|
|
341
|
+
});
|
|
328
342
|
_state.label = 2;
|
|
329
343
|
case 2:
|
|
330
344
|
setFieldSets(sortedItems.filter(function(sortedItem) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"RyftPaymentForm.d.ts","sourceRoot":"","sources":["../../../src/iframe/ryft/RyftPaymentForm.tsx"],"names":[],"mappings":"AAOA,OAAO,
|
|
1
|
+
{"version":3,"file":"RyftPaymentForm.d.ts","sourceRoot":"","sources":["../../../src/iframe/ryft/RyftPaymentForm.tsx"],"names":[],"mappings":"AAOA,OAAO,EAML,sBAAsB,EACvB,MAAM,kDAAkD,CAAA;AACzD,OAAO,EAAE,uBAAuB,EAAE,MAAM,0EAA0E,CAAA;AAKlH,eAAO,MAAM,YAAY,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAW/C,CAAA;AAED,MAAM,MAAM,qBAAqB,GAAG,MAAM,CAAC,MAAM,EAAE,KAAK,CAAC,CAAA;AAEzD,MAAM,WAAW,oBAAoB;IAEnC,SAAS,EAAE,GAAG,CAAA;IACd,eAAe,EAAE,OAAO,CAAA;IACxB,kBAAkB,CAAC,EAAE,OAAO,CAAA;IAC5B,qBAAqB,CAAC,EAAE,MAAM,IAAI,CAAA;IAClC,iBAAiB,CAAC,EAAE,OAAO,CAAA;IAC3B,QAAQ,EAAE,CACR,SAAS,EAAE,MAAM,IAAI,EACrB,SAAS,EAAE,CAAC,KAAK,CAAC,EAAE,MAAM,KAAK,IAAI,KAChC,OAAO,CAAC,IAAI,CAAC,CAAA;IAClB,QAAQ,EAAE,MAAM,OAAO,CAAC,sBAAsB,CAAC,CAAA;IAC/C,aAAa,CAAC,EAAE,MAAM,IAAI,CAAA;IAC1B,uBAAuB,CAAC,EAAE,uBAAuB,CAAA;CAClD;AAED,eAAO,MAAM,eAAe,8JAUzB,oBAAoB,4CA+KtB,CAAA"}
|
|
@@ -5,7 +5,7 @@ import { useForm } from 'react-hook-form';
|
|
|
5
5
|
import Button from 'react-bootstrap/Button';
|
|
6
6
|
import { useHistory } from 'react-router-dom';
|
|
7
7
|
import Alert from 'react-bootstrap/Alert';
|
|
8
|
-
import { useRyftPayment, RYFT_STATUS_PENDING_ACTION, RYFT_STATUS_APPROVED, RYFT_STATUS_CAPTURED } from '@licklist/plugins/dist/hooks/Ryft/useRyftPayment';
|
|
8
|
+
import { useRyftPayment, RYFT_STATUS_PENDING_ACTION, RYFT_STATUS_APPROVED, RYFT_STATUS_CAPTURED, RYFT_STATUS_PENDING_PAYMENT } from '@licklist/plugins/dist/hooks/Ryft/useRyftPayment';
|
|
9
9
|
import '../../static/index.js';
|
|
10
10
|
import { injectComponentsInRyftForm } from './utils/ryft-form.js';
|
|
11
11
|
import { ButtonLoader } from '../../static/loader/ButtonLoader.js';
|
|
@@ -220,7 +220,7 @@ var RyftPaymentForm = function(param) {
|
|
|
220
220
|
if (!(paymentSession === null || paymentSession === void 0 ? void 0 : paymentSession.id) || !(paymentSession === null || paymentSession === void 0 ? void 0 : paymentSession.returnUrl)) return;
|
|
221
221
|
// Handle there cases when orderStatus - Captured, Approved,
|
|
222
222
|
// or when no redirect URL and orderStatus - PendingAction
|
|
223
|
-
window.location.href = "".concat(paymentSession.returnUrl, "&
|
|
223
|
+
window.location.href = "".concat(paymentSession.returnUrl, "&paymentSessionId=").concat(paymentSession.id);
|
|
224
224
|
setReferrerBeforePayment();
|
|
225
225
|
};
|
|
226
226
|
var handleSubmit = function() {
|
|
@@ -257,7 +257,7 @@ var RyftPaymentForm = function(param) {
|
|
|
257
257
|
window.location.href = paymentSession.requiredAction.url;
|
|
258
258
|
setReferrerBeforePayment();
|
|
259
259
|
}
|
|
260
|
-
if (paymentSession.status === RYFT_STATUS_APPROVED || paymentSession.status === RYFT_STATUS_CAPTURED) {
|
|
260
|
+
if (paymentSession.status === RYFT_STATUS_APPROVED || paymentSession.status === RYFT_STATUS_CAPTURED || paymentSession.status === RYFT_STATUS_PENDING_PAYMENT) {
|
|
261
261
|
redirectOnFailAttempt(paymentSession);
|
|
262
262
|
return [
|
|
263
263
|
2
|
|
@@ -49,11 +49,11 @@ var injectComponentsInRyftForm = function(param) {
|
|
|
49
49
|
var appleButton = document.getElementById('ryft-pay-apple-pay-button');
|
|
50
50
|
if (googleButton) {
|
|
51
51
|
googleButton.disabled = isDisableButton;
|
|
52
|
-
googleButton.style.opacity = isDisableButton ? '1' : '0.6';
|
|
52
|
+
googleButton.style.opacity = !isDisableButton ? '1' : '0.6';
|
|
53
53
|
}
|
|
54
54
|
if (appleButton) {
|
|
55
55
|
appleButton.disabled = isDisableButton;
|
|
56
|
-
appleButton.style.opacity = isDisableButton ? '1' : '0.6';
|
|
56
|
+
appleButton.style.opacity = !isDisableButton ? '1' : '0.6';
|
|
57
57
|
}
|
|
58
58
|
}
|
|
59
59
|
if (isAppUsingInIframe) {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@licklist/design",
|
|
3
|
-
"version": "0.70.0-dev.
|
|
3
|
+
"version": "0.70.0-dev.4",
|
|
4
4
|
"repository": {
|
|
5
5
|
"type": "git",
|
|
6
6
|
"url": "git+ssh://git@bitbucket.org/artelogicsoft/licklist_design.git"
|
|
@@ -44,7 +44,7 @@
|
|
|
44
44
|
"peerDependencies": {
|
|
45
45
|
"@licklist/core": "0.31.0-dev.0",
|
|
46
46
|
"@licklist/eslint-config": "0.5.6",
|
|
47
|
-
"@licklist/plugins": "0.34.0-dev.
|
|
47
|
+
"@licklist/plugins": "0.34.0-dev.4",
|
|
48
48
|
"lodash": "4.17.21",
|
|
49
49
|
"luxon": "3.5.0",
|
|
50
50
|
"react": "17.0.2",
|
|
@@ -63,7 +63,7 @@
|
|
|
63
63
|
"@fortawesome/free-solid-svg-icons": "5.15.2",
|
|
64
64
|
"@licklist/core": "0.31.0-dev.0",
|
|
65
65
|
"@licklist/eslint-config": "0.5.6",
|
|
66
|
-
"@licklist/plugins": "0.34.0-dev.
|
|
66
|
+
"@licklist/plugins": "0.34.0-dev.4",
|
|
67
67
|
"@mantine/core": "6.0.22",
|
|
68
68
|
"@mantine/hooks": "6.0.22",
|
|
69
69
|
"@mdx-js/react": "1.6.22",
|
|
@@ -208,4 +208,4 @@
|
|
|
208
208
|
"yarn": "4.4.0"
|
|
209
209
|
},
|
|
210
210
|
"stableVersion": "0.69.1-dev.3"
|
|
211
|
-
}
|
|
211
|
+
}
|
|
@@ -17,6 +17,7 @@ import { HasPermissionProp } from '@licklist/plugins/dist/types/permission/Permi
|
|
|
17
17
|
import FormErrorService from '@licklist/plugins/dist/services/Form/FormErrorService'
|
|
18
18
|
import { ServerError } from '@licklist/plugins/dist/hooks/Api/useHttpQuery'
|
|
19
19
|
import HookFormService from '@licklist/plugins/dist/services/Form/HookFormService'
|
|
20
|
+
import useNotification from '@licklist/plugins/dist/context/app/hooks/useNotification'
|
|
20
21
|
|
|
21
22
|
import {
|
|
22
23
|
CreateSortableListItem,
|
|
@@ -84,7 +85,7 @@ export const CustomFieldSet = ({
|
|
|
84
85
|
useEffect(() => {
|
|
85
86
|
FormErrorService.handleServerErrors(serverErrors, setError)
|
|
86
87
|
}, [serverErrors, setError])
|
|
87
|
-
|
|
88
|
+
const notification = useNotification()
|
|
88
89
|
const { fields, append, remove } = useFieldArray({
|
|
89
90
|
control,
|
|
90
91
|
name: CUSTOM_FIELDS,
|
|
@@ -97,6 +98,13 @@ export const CustomFieldSet = ({
|
|
|
97
98
|
|
|
98
99
|
if (!response) return
|
|
99
100
|
|
|
101
|
+
notification.success({
|
|
102
|
+
title: t('App:success'),
|
|
103
|
+
message: t('Notification:createSuccessfully', {
|
|
104
|
+
argument: t('customField'),
|
|
105
|
+
}),
|
|
106
|
+
})
|
|
107
|
+
|
|
100
108
|
setFieldSets((prevFieldSets) => {
|
|
101
109
|
const nextFieldSets = [...prevFieldSets]
|
|
102
110
|
|
|
@@ -115,6 +123,13 @@ export const CustomFieldSet = ({
|
|
|
115
123
|
const removeFieldSet = async () => {
|
|
116
124
|
if (fieldSet.id !== null) {
|
|
117
125
|
await onFieldSetDelete(fieldSet)
|
|
126
|
+
|
|
127
|
+
notification.success({
|
|
128
|
+
title: t('App:success'),
|
|
129
|
+
message: t('Notification:theRemovedSuccessfully', {
|
|
130
|
+
argument: t('customField'),
|
|
131
|
+
}),
|
|
132
|
+
})
|
|
118
133
|
}
|
|
119
134
|
|
|
120
135
|
setFieldSets(
|
|
@@ -10,6 +10,7 @@ import {
|
|
|
10
10
|
RYFT_STATUS_APPROVED,
|
|
11
11
|
RYFT_STATUS_CAPTURED,
|
|
12
12
|
RYFT_STATUS_PENDING_ACTION,
|
|
13
|
+
RYFT_STATUS_PENDING_PAYMENT,
|
|
13
14
|
AttemptPaymentResponse,
|
|
14
15
|
} from '@licklist/plugins/dist/hooks/Ryft/useRyftPayment'
|
|
15
16
|
import { ProviderPaymentSettings } from '@licklist/core/dist/DataMapper/Setting/ProviderPaymentSettingsDataMapper'
|
|
@@ -84,7 +85,7 @@ export const RyftPaymentForm = ({
|
|
|
84
85
|
|
|
85
86
|
// Handle there cases when orderStatus - Captured, Approved,
|
|
86
87
|
// or when no redirect URL and orderStatus - PendingAction
|
|
87
|
-
window.location.href = `${paymentSession.returnUrl}&
|
|
88
|
+
window.location.href = `${paymentSession.returnUrl}&paymentSessionId=${paymentSession.id}`
|
|
88
89
|
setReferrerBeforePayment()
|
|
89
90
|
}
|
|
90
91
|
|
|
@@ -112,7 +113,8 @@ export const RyftPaymentForm = ({
|
|
|
112
113
|
|
|
113
114
|
if (
|
|
114
115
|
paymentSession.status === RYFT_STATUS_APPROVED ||
|
|
115
|
-
paymentSession.status === RYFT_STATUS_CAPTURED
|
|
116
|
+
paymentSession.status === RYFT_STATUS_CAPTURED ||
|
|
117
|
+
paymentSession.status === RYFT_STATUS_PENDING_PAYMENT
|
|
116
118
|
) {
|
|
117
119
|
redirectOnFailAttempt(paymentSession)
|
|
118
120
|
return
|
|
@@ -76,11 +76,11 @@ export const injectComponentsInRyftForm = ({
|
|
|
76
76
|
) as HTMLButtonElement
|
|
77
77
|
if (googleButton) {
|
|
78
78
|
googleButton.disabled = isDisableButton
|
|
79
|
-
googleButton.style.opacity = isDisableButton ? '1' : '0.6'
|
|
79
|
+
googleButton.style.opacity = !isDisableButton ? '1' : '0.6'
|
|
80
80
|
}
|
|
81
81
|
if (appleButton) {
|
|
82
82
|
appleButton.disabled = isDisableButton
|
|
83
|
-
appleButton.style.opacity = isDisableButton ? '1' : '0.6'
|
|
83
|
+
appleButton.style.opacity = !isDisableButton ? '1' : '0.6'
|
|
84
84
|
}
|
|
85
85
|
}
|
|
86
86
|
|