@knovator/pagecreator-admin 0.9.2 → 0.9.3
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/index.cjs +43 -46
- package/index.js +43 -46
- package/package.json +1 -1
- package/src/lib/constants/common.d.ts +2 -4
package/index.cjs
CHANGED
|
@@ -1705,14 +1705,12 @@ const TRANSLATION_PAIRS_COMMON = {
|
|
|
1705
1705
|
pleaseType: 'Please type',
|
|
1706
1706
|
toProceedOrCancel: 'to processed or close this modal to cancel.',
|
|
1707
1707
|
confirm: 'Confirm',
|
|
1708
|
-
|
|
1709
|
-
|
|
1708
|
+
nextContent: 'Next',
|
|
1709
|
+
previousContent: 'Previous',
|
|
1710
1710
|
page: 'Page',
|
|
1711
1711
|
next: 'Next',
|
|
1712
|
-
previous: 'Previous',
|
|
1713
1712
|
indicatesRequired: 'Indicates fields are required',
|
|
1714
1713
|
addButtonText: 'Add',
|
|
1715
|
-
editButtonText: 'Edit',
|
|
1716
1714
|
cancelButtonText: 'Cancel',
|
|
1717
1715
|
yesButtonText: 'Yes',
|
|
1718
1716
|
deleteButtonText: 'Delete',
|
|
@@ -4107,8 +4105,8 @@ const AddButton$1 = () => {
|
|
|
4107
4105
|
} = usePageState();
|
|
4108
4106
|
return /*#__PURE__*/React__default["default"].createElement(Button, {
|
|
4109
4107
|
disabled: !canAdd,
|
|
4110
|
-
onClick: () => onChangeFormState(
|
|
4111
|
-
}, t(
|
|
4108
|
+
onClick: () => onChangeFormState('ADD')
|
|
4109
|
+
}, t('addButtonText') || t('common:addButtonText'));
|
|
4112
4110
|
};
|
|
4113
4111
|
|
|
4114
4112
|
const ChevronLeft = ({
|
|
@@ -4220,11 +4218,11 @@ const PagePagination = () => {
|
|
|
4220
4218
|
setCurrentPage
|
|
4221
4219
|
} = usePageState();
|
|
4222
4220
|
return /*#__PURE__*/React__default["default"].createElement(Pagination, {
|
|
4223
|
-
ofText: t('of'),
|
|
4224
|
-
pageText: t('
|
|
4225
|
-
showingText: t('showing'),
|
|
4226
|
-
nextContent: t('nextContent'),
|
|
4227
|
-
previousContent: t('previousContent'),
|
|
4221
|
+
ofText: t('of') || t('common:of'),
|
|
4222
|
+
pageText: t('confirm') || t('common:confirm'),
|
|
4223
|
+
showingText: t('showing') || t('common:showing'),
|
|
4224
|
+
nextContent: t('nextContent') || t('common:nextContent'),
|
|
4225
|
+
previousContent: t('previousContent') || t('common:previousContent'),
|
|
4228
4226
|
totalPages: totalPages,
|
|
4229
4227
|
totalRecords: totalRecords,
|
|
4230
4228
|
currentPage: currentPage,
|
|
@@ -4436,10 +4434,10 @@ const PageFormActions = ({
|
|
|
4436
4434
|
if (!canAdd && !canUpdate) return null;
|
|
4437
4435
|
return /*#__PURE__*/React__default["default"].createElement(FormActions, {
|
|
4438
4436
|
loading: loading,
|
|
4439
|
-
primaryLabel: formState === 'ADD' ? t('createButtonText') : t('updateButtonText'),
|
|
4437
|
+
primaryLabel: formState === 'ADD' ? t('createButtonText') || t('common:createButtonText') : t('updateButtonText') || t('common:updateButtonText'),
|
|
4440
4438
|
onPrimaryButtonClick: onSubmitClick,
|
|
4441
4439
|
onSecondaryButtonClick: closeForm,
|
|
4442
|
-
secondaryLabel: t('cancelButtonText')
|
|
4440
|
+
secondaryLabel: t('cancelButtonText') || t('common:cancelButtonText')
|
|
4443
4441
|
});
|
|
4444
4442
|
};
|
|
4445
4443
|
|
|
@@ -4541,13 +4539,13 @@ const Page = ({
|
|
|
4541
4539
|
itemData: itemData,
|
|
4542
4540
|
onClose: onCloseForm,
|
|
4543
4541
|
onConfirmDelete: onCofirmDeletePage,
|
|
4544
|
-
confirmationRequired: derivedT('confirmationRequired'),
|
|
4545
|
-
confirm: derivedT('confirm'),
|
|
4546
|
-
lossOfData: derivedT('lossOfData'),
|
|
4547
|
-
permanentlyDelete: derivedT('permanentlyDelete'),
|
|
4548
|
-
pleaseType: derivedT('pleaseType'),
|
|
4549
|
-
toProceedOrCancel: derivedT('toProceedOrCancel'),
|
|
4550
|
-
typeHerePlaceholder: derivedT('typeHerePlaceholder')
|
|
4542
|
+
confirmationRequired: derivedT('confirmationRequired') || derivedT('common:confirmationRequired'),
|
|
4543
|
+
confirm: derivedT('confirm') || derivedT('common:confirm'),
|
|
4544
|
+
lossOfData: derivedT('lossOfData') || derivedT('common:lossOfData'),
|
|
4545
|
+
permanentlyDelete: derivedT('permanentlyDelete') || derivedT('common:permanentlyDelete'),
|
|
4546
|
+
pleaseType: derivedT('pleaseType') || derivedT('common:pleaseType'),
|
|
4547
|
+
toProceedOrCancel: derivedT('toProceedOrCancel') || derivedT('common:toProceedOrCancel'),
|
|
4548
|
+
typeHerePlaceholder: derivedT('typeHerePlaceholder') || derivedT('common:typeHerePlaceholder')
|
|
4551
4549
|
}));
|
|
4552
4550
|
};
|
|
4553
4551
|
Page.Table = PageTable;
|
|
@@ -4582,8 +4580,7 @@ const useWidget = ({
|
|
|
4582
4580
|
onError,
|
|
4583
4581
|
onSuccess,
|
|
4584
4582
|
onLogout,
|
|
4585
|
-
widgetRoutesPrefix
|
|
4586
|
-
pageRoutesPrefix
|
|
4583
|
+
widgetRoutesPrefix
|
|
4587
4584
|
} = useProviderState();
|
|
4588
4585
|
const {
|
|
4589
4586
|
changeSearch,
|
|
@@ -4645,7 +4642,7 @@ const useWidget = ({
|
|
|
4645
4642
|
const api = getApiType({
|
|
4646
4643
|
routes,
|
|
4647
4644
|
action: 'LANGUAGES',
|
|
4648
|
-
prefix:
|
|
4645
|
+
prefix: widgetRoutesPrefix
|
|
4649
4646
|
});
|
|
4650
4647
|
const response = yield commonApi({
|
|
4651
4648
|
baseUrl,
|
|
@@ -4658,7 +4655,7 @@ const useWidget = ({
|
|
|
4658
4655
|
setLanguages(response.data);
|
|
4659
4656
|
return response.data;
|
|
4660
4657
|
}
|
|
4661
|
-
}), [baseUrl, handleError,
|
|
4658
|
+
}), [baseUrl, handleError, widgetRoutesPrefix, routes, token]);
|
|
4662
4659
|
const onCofirmDeleteWidget = () => __awaiter(void 0, void 0, void 0, function* () {
|
|
4663
4660
|
try {
|
|
4664
4661
|
let proceed = true;
|
|
@@ -6588,8 +6585,8 @@ const ItemsAccordian = ({
|
|
|
6588
6585
|
footerContent: /*#__PURE__*/React__default["default"].createElement(ConfirmPopOver, {
|
|
6589
6586
|
onConfirm: () => removeItem(index),
|
|
6590
6587
|
title: t('item.deleteTitle'),
|
|
6591
|
-
confirmText: t('yesButtonText'),
|
|
6592
|
-
cancelText: t('cancelButtonText')
|
|
6588
|
+
confirmText: t('yesButtonText') || t('common:yesButtonText'),
|
|
6589
|
+
cancelText: t('cancelButtonText') || t('common:cancelButtonText')
|
|
6593
6590
|
}, /*#__PURE__*/React__default["default"].createElement(Button, {
|
|
6594
6591
|
type: "danger",
|
|
6595
6592
|
size: "sm",
|
|
@@ -7311,8 +7308,8 @@ const WidgetForm = ({
|
|
|
7311
7308
|
control: control,
|
|
7312
7309
|
languages: languages,
|
|
7313
7310
|
deleteTitle: t('widget.tabDeleteTitle'),
|
|
7314
|
-
yesButtonText: t('yesButtonText'),
|
|
7315
|
-
noButtonText: t('cancelButtonText'),
|
|
7311
|
+
yesButtonText: t('yesButtonText') || t('common:yesButtonText'),
|
|
7312
|
+
noButtonText: t('cancelButtonText') || t('common:cancelButtonText'),
|
|
7316
7313
|
errors: errors,
|
|
7317
7314
|
itemsPlaceholder: `Select ${selectedCollectionType === null || selectedCollectionType === void 0 ? void 0 : selectedCollectionType.label}...`,
|
|
7318
7315
|
loadOptions: onChangeSearch,
|
|
@@ -7346,7 +7343,7 @@ const WidgetForm = ({
|
|
|
7346
7343
|
register: register,
|
|
7347
7344
|
loading: loading,
|
|
7348
7345
|
addText: t('addButtonText'),
|
|
7349
|
-
deleteText: t('deleteButtonText')
|
|
7346
|
+
deleteText: t('deleteButtonText') || t('common:deleteButtonText')
|
|
7350
7347
|
}), /*#__PURE__*/React__default["default"].createElement(ItemsAccordian, {
|
|
7351
7348
|
languages: languages,
|
|
7352
7349
|
clearError: clearErrors,
|
|
@@ -7363,7 +7360,7 @@ const WidgetForm = ({
|
|
|
7363
7360
|
control: control,
|
|
7364
7361
|
register: register,
|
|
7365
7362
|
addText: t('addButtonText'),
|
|
7366
|
-
deleteText: t('deleteButtonText')
|
|
7363
|
+
deleteText: t('deleteButtonText') || t('common:deleteButtonText')
|
|
7367
7364
|
})));
|
|
7368
7365
|
};
|
|
7369
7366
|
|
|
@@ -7375,8 +7372,8 @@ const AddButton = () => {
|
|
|
7375
7372
|
} = useWidgetState();
|
|
7376
7373
|
return /*#__PURE__*/React__default["default"].createElement(Button, {
|
|
7377
7374
|
disabled: !canAdd,
|
|
7378
|
-
onClick: () => onChangeFormState(
|
|
7379
|
-
}, t(
|
|
7375
|
+
onClick: () => onChangeFormState('ADD')
|
|
7376
|
+
}, t('addButtonText') || t('common:addButtonText'));
|
|
7380
7377
|
};
|
|
7381
7378
|
|
|
7382
7379
|
const WidgetPagination = () => {
|
|
@@ -7389,11 +7386,11 @@ const WidgetPagination = () => {
|
|
|
7389
7386
|
setCurrentPage
|
|
7390
7387
|
} = useWidgetState();
|
|
7391
7388
|
return /*#__PURE__*/React__default["default"].createElement(Pagination, {
|
|
7392
|
-
ofText: t('of'),
|
|
7393
|
-
pageText: t('
|
|
7394
|
-
showingText: t('showing'),
|
|
7395
|
-
nextContent: t('nextContent'),
|
|
7396
|
-
previousContent: t('previousContent'),
|
|
7389
|
+
ofText: t('of') || t('common:of'),
|
|
7390
|
+
pageText: t('confirm') || t('common:confirm'),
|
|
7391
|
+
showingText: t('showing') || t('common:showing'),
|
|
7392
|
+
nextContent: t('nextContent') || t('common:nextContent'),
|
|
7393
|
+
previousContent: t('previousContent') || t('common:previousContent'),
|
|
7397
7394
|
totalPages: totalPages,
|
|
7398
7395
|
totalRecords: totalRecords,
|
|
7399
7396
|
currentPage: currentPage,
|
|
@@ -7459,10 +7456,10 @@ const WidgetFormActions = ({
|
|
|
7459
7456
|
if (!canAdd && !canUpdate) return null;
|
|
7460
7457
|
return /*#__PURE__*/React__default["default"].createElement(FormActions, {
|
|
7461
7458
|
loading: loading,
|
|
7462
|
-
primaryLabel: formState === 'ADD' ? t('createButtonText') : t('updateButtonText'),
|
|
7459
|
+
primaryLabel: formState === 'ADD' ? t('createButtonText') || t('common:createButtonText') : t('updateButtonText') || t('common:updateButtonText'),
|
|
7463
7460
|
onPrimaryButtonClick: onSubmitClick,
|
|
7464
7461
|
onSecondaryButtonClick: closeForm,
|
|
7465
|
-
secondaryLabel: t('cancelButtonText')
|
|
7462
|
+
secondaryLabel: t('cancelButtonText') || t('common:cancelButtonText')
|
|
7466
7463
|
});
|
|
7467
7464
|
};
|
|
7468
7465
|
|
|
@@ -7586,13 +7583,13 @@ const Widget = ({
|
|
|
7586
7583
|
itemData: itemData,
|
|
7587
7584
|
onClose: onCloseForm,
|
|
7588
7585
|
onConfirmDelete: onCofirmDeleteWidget,
|
|
7589
|
-
confirmationRequired: derivedT('confirmationRequired'),
|
|
7590
|
-
confirm: derivedT('confirm'),
|
|
7591
|
-
lossOfData: derivedT('lossOfData'),
|
|
7592
|
-
permanentlyDelete: derivedT('permanentlyDelete'),
|
|
7593
|
-
pleaseType: derivedT('pleaseType'),
|
|
7594
|
-
toProceedOrCancel: derivedT('toProceedOrCancel'),
|
|
7595
|
-
typeHerePlaceholder: derivedT('typeHerePlaceholder')
|
|
7586
|
+
confirmationRequired: derivedT('confirmationRequired') || derivedT('common:confirmationRequired'),
|
|
7587
|
+
confirm: derivedT('confirm') || derivedT('common:confirm'),
|
|
7588
|
+
lossOfData: derivedT('lossOfData') || derivedT('common:lossOfData'),
|
|
7589
|
+
permanentlyDelete: derivedT('permanentlyDelete') || derivedT('common:permanentlyDelete'),
|
|
7590
|
+
pleaseType: derivedT('pleaseType') || derivedT('common:pleaseType'),
|
|
7591
|
+
toProceedOrCancel: derivedT('toProceedOrCancel') || derivedT('common:toProceedOrCancel'),
|
|
7592
|
+
typeHerePlaceholder: derivedT('typeHerePlaceholder') || derivedT('common:typeHerePlaceholder')
|
|
7596
7593
|
}));
|
|
7597
7594
|
};
|
|
7598
7595
|
Widget.Table = WidgetTable;
|
package/index.js
CHANGED
|
@@ -1693,14 +1693,12 @@ const TRANSLATION_PAIRS_COMMON = {
|
|
|
1693
1693
|
pleaseType: 'Please type',
|
|
1694
1694
|
toProceedOrCancel: 'to processed or close this modal to cancel.',
|
|
1695
1695
|
confirm: 'Confirm',
|
|
1696
|
-
|
|
1697
|
-
|
|
1696
|
+
nextContent: 'Next',
|
|
1697
|
+
previousContent: 'Previous',
|
|
1698
1698
|
page: 'Page',
|
|
1699
1699
|
next: 'Next',
|
|
1700
|
-
previous: 'Previous',
|
|
1701
1700
|
indicatesRequired: 'Indicates fields are required',
|
|
1702
1701
|
addButtonText: 'Add',
|
|
1703
|
-
editButtonText: 'Edit',
|
|
1704
1702
|
cancelButtonText: 'Cancel',
|
|
1705
1703
|
yesButtonText: 'Yes',
|
|
1706
1704
|
deleteButtonText: 'Delete',
|
|
@@ -4095,8 +4093,8 @@ const AddButton$1 = () => {
|
|
|
4095
4093
|
} = usePageState();
|
|
4096
4094
|
return /*#__PURE__*/React.createElement(Button, {
|
|
4097
4095
|
disabled: !canAdd,
|
|
4098
|
-
onClick: () => onChangeFormState(
|
|
4099
|
-
}, t(
|
|
4096
|
+
onClick: () => onChangeFormState('ADD')
|
|
4097
|
+
}, t('addButtonText') || t('common:addButtonText'));
|
|
4100
4098
|
};
|
|
4101
4099
|
|
|
4102
4100
|
const ChevronLeft = ({
|
|
@@ -4208,11 +4206,11 @@ const PagePagination = () => {
|
|
|
4208
4206
|
setCurrentPage
|
|
4209
4207
|
} = usePageState();
|
|
4210
4208
|
return /*#__PURE__*/React.createElement(Pagination, {
|
|
4211
|
-
ofText: t('of'),
|
|
4212
|
-
pageText: t('
|
|
4213
|
-
showingText: t('showing'),
|
|
4214
|
-
nextContent: t('nextContent'),
|
|
4215
|
-
previousContent: t('previousContent'),
|
|
4209
|
+
ofText: t('of') || t('common:of'),
|
|
4210
|
+
pageText: t('confirm') || t('common:confirm'),
|
|
4211
|
+
showingText: t('showing') || t('common:showing'),
|
|
4212
|
+
nextContent: t('nextContent') || t('common:nextContent'),
|
|
4213
|
+
previousContent: t('previousContent') || t('common:previousContent'),
|
|
4216
4214
|
totalPages: totalPages,
|
|
4217
4215
|
totalRecords: totalRecords,
|
|
4218
4216
|
currentPage: currentPage,
|
|
@@ -4424,10 +4422,10 @@ const PageFormActions = ({
|
|
|
4424
4422
|
if (!canAdd && !canUpdate) return null;
|
|
4425
4423
|
return /*#__PURE__*/React.createElement(FormActions, {
|
|
4426
4424
|
loading: loading,
|
|
4427
|
-
primaryLabel: formState === 'ADD' ? t('createButtonText') : t('updateButtonText'),
|
|
4425
|
+
primaryLabel: formState === 'ADD' ? t('createButtonText') || t('common:createButtonText') : t('updateButtonText') || t('common:updateButtonText'),
|
|
4428
4426
|
onPrimaryButtonClick: onSubmitClick,
|
|
4429
4427
|
onSecondaryButtonClick: closeForm,
|
|
4430
|
-
secondaryLabel: t('cancelButtonText')
|
|
4428
|
+
secondaryLabel: t('cancelButtonText') || t('common:cancelButtonText')
|
|
4431
4429
|
});
|
|
4432
4430
|
};
|
|
4433
4431
|
|
|
@@ -4529,13 +4527,13 @@ const Page = ({
|
|
|
4529
4527
|
itemData: itemData,
|
|
4530
4528
|
onClose: onCloseForm,
|
|
4531
4529
|
onConfirmDelete: onCofirmDeletePage,
|
|
4532
|
-
confirmationRequired: derivedT('confirmationRequired'),
|
|
4533
|
-
confirm: derivedT('confirm'),
|
|
4534
|
-
lossOfData: derivedT('lossOfData'),
|
|
4535
|
-
permanentlyDelete: derivedT('permanentlyDelete'),
|
|
4536
|
-
pleaseType: derivedT('pleaseType'),
|
|
4537
|
-
toProceedOrCancel: derivedT('toProceedOrCancel'),
|
|
4538
|
-
typeHerePlaceholder: derivedT('typeHerePlaceholder')
|
|
4530
|
+
confirmationRequired: derivedT('confirmationRequired') || derivedT('common:confirmationRequired'),
|
|
4531
|
+
confirm: derivedT('confirm') || derivedT('common:confirm'),
|
|
4532
|
+
lossOfData: derivedT('lossOfData') || derivedT('common:lossOfData'),
|
|
4533
|
+
permanentlyDelete: derivedT('permanentlyDelete') || derivedT('common:permanentlyDelete'),
|
|
4534
|
+
pleaseType: derivedT('pleaseType') || derivedT('common:pleaseType'),
|
|
4535
|
+
toProceedOrCancel: derivedT('toProceedOrCancel') || derivedT('common:toProceedOrCancel'),
|
|
4536
|
+
typeHerePlaceholder: derivedT('typeHerePlaceholder') || derivedT('common:typeHerePlaceholder')
|
|
4539
4537
|
}));
|
|
4540
4538
|
};
|
|
4541
4539
|
Page.Table = PageTable;
|
|
@@ -4570,8 +4568,7 @@ const useWidget = ({
|
|
|
4570
4568
|
onError,
|
|
4571
4569
|
onSuccess,
|
|
4572
4570
|
onLogout,
|
|
4573
|
-
widgetRoutesPrefix
|
|
4574
|
-
pageRoutesPrefix
|
|
4571
|
+
widgetRoutesPrefix
|
|
4575
4572
|
} = useProviderState();
|
|
4576
4573
|
const {
|
|
4577
4574
|
changeSearch,
|
|
@@ -4633,7 +4630,7 @@ const useWidget = ({
|
|
|
4633
4630
|
const api = getApiType({
|
|
4634
4631
|
routes,
|
|
4635
4632
|
action: 'LANGUAGES',
|
|
4636
|
-
prefix:
|
|
4633
|
+
prefix: widgetRoutesPrefix
|
|
4637
4634
|
});
|
|
4638
4635
|
const response = yield commonApi({
|
|
4639
4636
|
baseUrl,
|
|
@@ -4646,7 +4643,7 @@ const useWidget = ({
|
|
|
4646
4643
|
setLanguages(response.data);
|
|
4647
4644
|
return response.data;
|
|
4648
4645
|
}
|
|
4649
|
-
}), [baseUrl, handleError,
|
|
4646
|
+
}), [baseUrl, handleError, widgetRoutesPrefix, routes, token]);
|
|
4650
4647
|
const onCofirmDeleteWidget = () => __awaiter(void 0, void 0, void 0, function* () {
|
|
4651
4648
|
try {
|
|
4652
4649
|
let proceed = true;
|
|
@@ -6576,8 +6573,8 @@ const ItemsAccordian = ({
|
|
|
6576
6573
|
footerContent: /*#__PURE__*/React.createElement(ConfirmPopOver, {
|
|
6577
6574
|
onConfirm: () => removeItem(index),
|
|
6578
6575
|
title: t('item.deleteTitle'),
|
|
6579
|
-
confirmText: t('yesButtonText'),
|
|
6580
|
-
cancelText: t('cancelButtonText')
|
|
6576
|
+
confirmText: t('yesButtonText') || t('common:yesButtonText'),
|
|
6577
|
+
cancelText: t('cancelButtonText') || t('common:cancelButtonText')
|
|
6581
6578
|
}, /*#__PURE__*/React.createElement(Button, {
|
|
6582
6579
|
type: "danger",
|
|
6583
6580
|
size: "sm",
|
|
@@ -7299,8 +7296,8 @@ const WidgetForm = ({
|
|
|
7299
7296
|
control: control,
|
|
7300
7297
|
languages: languages,
|
|
7301
7298
|
deleteTitle: t('widget.tabDeleteTitle'),
|
|
7302
|
-
yesButtonText: t('yesButtonText'),
|
|
7303
|
-
noButtonText: t('cancelButtonText'),
|
|
7299
|
+
yesButtonText: t('yesButtonText') || t('common:yesButtonText'),
|
|
7300
|
+
noButtonText: t('cancelButtonText') || t('common:cancelButtonText'),
|
|
7304
7301
|
errors: errors,
|
|
7305
7302
|
itemsPlaceholder: `Select ${selectedCollectionType === null || selectedCollectionType === void 0 ? void 0 : selectedCollectionType.label}...`,
|
|
7306
7303
|
loadOptions: onChangeSearch,
|
|
@@ -7334,7 +7331,7 @@ const WidgetForm = ({
|
|
|
7334
7331
|
register: register,
|
|
7335
7332
|
loading: loading,
|
|
7336
7333
|
addText: t('addButtonText'),
|
|
7337
|
-
deleteText: t('deleteButtonText')
|
|
7334
|
+
deleteText: t('deleteButtonText') || t('common:deleteButtonText')
|
|
7338
7335
|
}), /*#__PURE__*/React.createElement(ItemsAccordian, {
|
|
7339
7336
|
languages: languages,
|
|
7340
7337
|
clearError: clearErrors,
|
|
@@ -7351,7 +7348,7 @@ const WidgetForm = ({
|
|
|
7351
7348
|
control: control,
|
|
7352
7349
|
register: register,
|
|
7353
7350
|
addText: t('addButtonText'),
|
|
7354
|
-
deleteText: t('deleteButtonText')
|
|
7351
|
+
deleteText: t('deleteButtonText') || t('common:deleteButtonText')
|
|
7355
7352
|
})));
|
|
7356
7353
|
};
|
|
7357
7354
|
|
|
@@ -7363,8 +7360,8 @@ const AddButton = () => {
|
|
|
7363
7360
|
} = useWidgetState();
|
|
7364
7361
|
return /*#__PURE__*/React.createElement(Button, {
|
|
7365
7362
|
disabled: !canAdd,
|
|
7366
|
-
onClick: () => onChangeFormState(
|
|
7367
|
-
}, t(
|
|
7363
|
+
onClick: () => onChangeFormState('ADD')
|
|
7364
|
+
}, t('addButtonText') || t('common:addButtonText'));
|
|
7368
7365
|
};
|
|
7369
7366
|
|
|
7370
7367
|
const WidgetPagination = () => {
|
|
@@ -7377,11 +7374,11 @@ const WidgetPagination = () => {
|
|
|
7377
7374
|
setCurrentPage
|
|
7378
7375
|
} = useWidgetState();
|
|
7379
7376
|
return /*#__PURE__*/React.createElement(Pagination, {
|
|
7380
|
-
ofText: t('of'),
|
|
7381
|
-
pageText: t('
|
|
7382
|
-
showingText: t('showing'),
|
|
7383
|
-
nextContent: t('nextContent'),
|
|
7384
|
-
previousContent: t('previousContent'),
|
|
7377
|
+
ofText: t('of') || t('common:of'),
|
|
7378
|
+
pageText: t('confirm') || t('common:confirm'),
|
|
7379
|
+
showingText: t('showing') || t('common:showing'),
|
|
7380
|
+
nextContent: t('nextContent') || t('common:nextContent'),
|
|
7381
|
+
previousContent: t('previousContent') || t('common:previousContent'),
|
|
7385
7382
|
totalPages: totalPages,
|
|
7386
7383
|
totalRecords: totalRecords,
|
|
7387
7384
|
currentPage: currentPage,
|
|
@@ -7447,10 +7444,10 @@ const WidgetFormActions = ({
|
|
|
7447
7444
|
if (!canAdd && !canUpdate) return null;
|
|
7448
7445
|
return /*#__PURE__*/React.createElement(FormActions, {
|
|
7449
7446
|
loading: loading,
|
|
7450
|
-
primaryLabel: formState === 'ADD' ? t('createButtonText') : t('updateButtonText'),
|
|
7447
|
+
primaryLabel: formState === 'ADD' ? t('createButtonText') || t('common:createButtonText') : t('updateButtonText') || t('common:updateButtonText'),
|
|
7451
7448
|
onPrimaryButtonClick: onSubmitClick,
|
|
7452
7449
|
onSecondaryButtonClick: closeForm,
|
|
7453
|
-
secondaryLabel: t('cancelButtonText')
|
|
7450
|
+
secondaryLabel: t('cancelButtonText') || t('common:cancelButtonText')
|
|
7454
7451
|
});
|
|
7455
7452
|
};
|
|
7456
7453
|
|
|
@@ -7574,13 +7571,13 @@ const Widget = ({
|
|
|
7574
7571
|
itemData: itemData,
|
|
7575
7572
|
onClose: onCloseForm,
|
|
7576
7573
|
onConfirmDelete: onCofirmDeleteWidget,
|
|
7577
|
-
confirmationRequired: derivedT('confirmationRequired'),
|
|
7578
|
-
confirm: derivedT('confirm'),
|
|
7579
|
-
lossOfData: derivedT('lossOfData'),
|
|
7580
|
-
permanentlyDelete: derivedT('permanentlyDelete'),
|
|
7581
|
-
pleaseType: derivedT('pleaseType'),
|
|
7582
|
-
toProceedOrCancel: derivedT('toProceedOrCancel'),
|
|
7583
|
-
typeHerePlaceholder: derivedT('typeHerePlaceholder')
|
|
7574
|
+
confirmationRequired: derivedT('confirmationRequired') || derivedT('common:confirmationRequired'),
|
|
7575
|
+
confirm: derivedT('confirm') || derivedT('common:confirm'),
|
|
7576
|
+
lossOfData: derivedT('lossOfData') || derivedT('common:lossOfData'),
|
|
7577
|
+
permanentlyDelete: derivedT('permanentlyDelete') || derivedT('common:permanentlyDelete'),
|
|
7578
|
+
pleaseType: derivedT('pleaseType') || derivedT('common:pleaseType'),
|
|
7579
|
+
toProceedOrCancel: derivedT('toProceedOrCancel') || derivedT('common:toProceedOrCancel'),
|
|
7580
|
+
typeHerePlaceholder: derivedT('typeHerePlaceholder') || derivedT('common:typeHerePlaceholder')
|
|
7584
7581
|
}));
|
|
7585
7582
|
};
|
|
7586
7583
|
Widget.Table = WidgetTable;
|
package/package.json
CHANGED
|
@@ -34,14 +34,12 @@ declare const TRANSLATION_PAIRS_COMMON: {
|
|
|
34
34
|
pleaseType: string;
|
|
35
35
|
toProceedOrCancel: string;
|
|
36
36
|
confirm: string;
|
|
37
|
-
|
|
38
|
-
|
|
37
|
+
nextContent: string;
|
|
38
|
+
previousContent: string;
|
|
39
39
|
page: string;
|
|
40
40
|
next: string;
|
|
41
|
-
previous: string;
|
|
42
41
|
indicatesRequired: string;
|
|
43
42
|
addButtonText: string;
|
|
44
|
-
editButtonText: string;
|
|
45
43
|
cancelButtonText: string;
|
|
46
44
|
yesButtonText: string;
|
|
47
45
|
deleteButtonText: string;
|