@knovator/pagecreator-admin 0.8.3 → 0.8.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/index.cjs CHANGED
@@ -1716,7 +1716,8 @@ const TRANSLATION_PAIRS_COMMON = {
1716
1716
  cancelButtonText: 'Cancel',
1717
1717
  yesButtonText: 'Yes',
1718
1718
  deleteButtonText: 'Delete',
1719
- saveButtonText: 'Save',
1719
+ createButtonText: 'Create',
1720
+ updateButtonText: 'Update',
1720
1721
  showing: 'Showing',
1721
1722
  of: 'of',
1722
1723
  typeHerePlaceholder: 'Type Here'
@@ -4360,7 +4361,8 @@ const PageFormActions = ({
4360
4361
  loading,
4361
4362
  canAdd,
4362
4363
  canUpdate,
4363
- t
4364
+ t,
4365
+ formState
4364
4366
  } = usePageState();
4365
4367
  const onSubmitClick = e => {
4366
4368
  var _a;
@@ -4379,7 +4381,7 @@ const PageFormActions = ({
4379
4381
  if (!canAdd && !canUpdate) return null;
4380
4382
  return /*#__PURE__*/React__default["default"].createElement(FormActions, {
4381
4383
  loading: loading,
4382
- primaryLabel: t('saveButtonText'),
4384
+ primaryLabel: formState === 'ADD' ? t('createButtonText') : t('updateButtonText'),
4383
4385
  onPrimaryButtonClick: onSubmitClick,
4384
4386
  onSecondaryButtonClick: closeForm,
4385
4387
  secondaryLabel: t('cancelButtonText')
@@ -7256,7 +7258,8 @@ const WidgetFormActions = ({
7256
7258
  loading,
7257
7259
  canAdd,
7258
7260
  canUpdate,
7259
- t
7261
+ t,
7262
+ formState
7260
7263
  } = useWidgetState();
7261
7264
  const onSubmitClick = e => {
7262
7265
  var _a;
@@ -7275,7 +7278,7 @@ const WidgetFormActions = ({
7275
7278
  if (!canAdd && !canUpdate) return null;
7276
7279
  return /*#__PURE__*/React__default["default"].createElement(FormActions, {
7277
7280
  loading: loading,
7278
- primaryLabel: t('saveButtonText'),
7281
+ primaryLabel: formState === 'ADD' ? t('createButtonText') : t('updateButtonText'),
7279
7282
  onPrimaryButtonClick: onSubmitClick,
7280
7283
  onSecondaryButtonClick: closeForm,
7281
7284
  secondaryLabel: t('cancelButtonText')
package/index.js CHANGED
@@ -1704,7 +1704,8 @@ const TRANSLATION_PAIRS_COMMON = {
1704
1704
  cancelButtonText: 'Cancel',
1705
1705
  yesButtonText: 'Yes',
1706
1706
  deleteButtonText: 'Delete',
1707
- saveButtonText: 'Save',
1707
+ createButtonText: 'Create',
1708
+ updateButtonText: 'Update',
1708
1709
  showing: 'Showing',
1709
1710
  of: 'of',
1710
1711
  typeHerePlaceholder: 'Type Here'
@@ -4348,7 +4349,8 @@ const PageFormActions = ({
4348
4349
  loading,
4349
4350
  canAdd,
4350
4351
  canUpdate,
4351
- t
4352
+ t,
4353
+ formState
4352
4354
  } = usePageState();
4353
4355
  const onSubmitClick = e => {
4354
4356
  var _a;
@@ -4367,7 +4369,7 @@ const PageFormActions = ({
4367
4369
  if (!canAdd && !canUpdate) return null;
4368
4370
  return /*#__PURE__*/React.createElement(FormActions, {
4369
4371
  loading: loading,
4370
- primaryLabel: t('saveButtonText'),
4372
+ primaryLabel: formState === 'ADD' ? t('createButtonText') : t('updateButtonText'),
4371
4373
  onPrimaryButtonClick: onSubmitClick,
4372
4374
  onSecondaryButtonClick: closeForm,
4373
4375
  secondaryLabel: t('cancelButtonText')
@@ -7244,7 +7246,8 @@ const WidgetFormActions = ({
7244
7246
  loading,
7245
7247
  canAdd,
7246
7248
  canUpdate,
7247
- t
7249
+ t,
7250
+ formState
7248
7251
  } = useWidgetState();
7249
7252
  const onSubmitClick = e => {
7250
7253
  var _a;
@@ -7263,7 +7266,7 @@ const WidgetFormActions = ({
7263
7266
  if (!canAdd && !canUpdate) return null;
7264
7267
  return /*#__PURE__*/React.createElement(FormActions, {
7265
7268
  loading: loading,
7266
- primaryLabel: t('saveButtonText'),
7269
+ primaryLabel: formState === 'ADD' ? t('createButtonText') : t('updateButtonText'),
7267
7270
  onPrimaryButtonClick: onSubmitClick,
7268
7271
  onSecondaryButtonClick: closeForm,
7269
7272
  secondaryLabel: t('cancelButtonText')
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@knovator/pagecreator-admin",
3
- "version": "0.8.3",
3
+ "version": "0.8.4",
4
4
  "dependencies": {
5
5
  "classnames": "^2.3.1",
6
6
  "react-beautiful-dnd": "^13.1.0",
@@ -45,7 +45,8 @@ declare const TRANSLATION_PAIRS_COMMON: {
45
45
  cancelButtonText: string;
46
46
  yesButtonText: string;
47
47
  deleteButtonText: string;
48
- saveButtonText: string;
48
+ createButtonText: string;
49
+ updateButtonText: string;
49
50
  showing: string;
50
51
  of: string;
51
52
  typeHerePlaceholder: string;