@knovator/pagecreator-admin 1.7.8 → 1.7.9
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 +65 -110
- package/index.js +65 -110
- package/package.json +1 -1
- package/src/lib/components/Widget/Form/ItemsAccordian.d.ts +1 -1
- package/src/lib/components/Widget/Form/WidgetForm.d.ts +1 -1
- package/src/lib/components/Widget/Widget/Widget.d.ts +2 -2
- package/src/lib/types/components.d.ts +2 -26
- package/src/lib/components/Widget/Form/customItemRenderers/TestimonialItemRenderer.d.ts +0 -4
- package/src/lib/components/Widget/Form/customItemRenderers/defaultCustomItemRenderers.d.ts +0 -3
package/index.cjs
CHANGED
|
@@ -6817,7 +6817,7 @@ const ItemsAccordian = ({
|
|
|
6817
6817
|
itemType,
|
|
6818
6818
|
languages,
|
|
6819
6819
|
clearError,
|
|
6820
|
-
|
|
6820
|
+
widgetType,
|
|
6821
6821
|
addText: _addText = 'Add',
|
|
6822
6822
|
deleteText: _deleteText = 'Delete'
|
|
6823
6823
|
}) => {
|
|
@@ -6841,6 +6841,7 @@ const ItemsAccordian = ({
|
|
|
6841
6841
|
name,
|
|
6842
6842
|
control
|
|
6843
6843
|
});
|
|
6844
|
+
const isTestimonialWidget = widgetType === 'Testimonial';
|
|
6844
6845
|
const onItemsToggleClick = (index, status) => {
|
|
6845
6846
|
var _a;
|
|
6846
6847
|
const newItemsShow = [...itemsShow];
|
|
@@ -6858,11 +6859,16 @@ const ItemsAccordian = ({
|
|
|
6858
6859
|
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
6859
6860
|
}, [errors, name, errors === null || errors === void 0 ? void 0 : errors[name]]);
|
|
6860
6861
|
const addTab = index => {
|
|
6861
|
-
if (
|
|
6862
|
-
appendItem(
|
|
6863
|
-
|
|
6864
|
-
|
|
6865
|
-
|
|
6862
|
+
if (isTestimonialWidget) {
|
|
6863
|
+
appendItem({
|
|
6864
|
+
quote: '',
|
|
6865
|
+
personName: '',
|
|
6866
|
+
personRole: '',
|
|
6867
|
+
personOrganization: '',
|
|
6868
|
+
rating: 5,
|
|
6869
|
+
itemType,
|
|
6870
|
+
sequence: index
|
|
6871
|
+
});
|
|
6866
6872
|
return;
|
|
6867
6873
|
}
|
|
6868
6874
|
appendItem({
|
|
@@ -6888,7 +6894,7 @@ const ItemsAccordian = ({
|
|
|
6888
6894
|
}, /*#__PURE__*/React__default["default"].createElement("div", {
|
|
6889
6895
|
className: "khb_item-items"
|
|
6890
6896
|
}, items === null || items === void 0 ? void 0 : items.map((field, index) => {
|
|
6891
|
-
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
|
|
6897
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t, _u, _v, _w, _x, _y, _z, _0, _1, _2, _3, _4, _5;
|
|
6892
6898
|
return /*#__PURE__*/React__default["default"].createElement(Accordian, {
|
|
6893
6899
|
key: index,
|
|
6894
6900
|
open: itemsShow[index],
|
|
@@ -6908,20 +6914,51 @@ const ItemsAccordian = ({
|
|
|
6908
6914
|
}, _deleteText))
|
|
6909
6915
|
}, /*#__PURE__*/React__default["default"].createElement("div", {
|
|
6910
6916
|
className: "khb-form-items"
|
|
6911
|
-
},
|
|
6912
|
-
name,
|
|
6913
|
-
|
|
6914
|
-
|
|
6915
|
-
|
|
6916
|
-
|
|
6917
|
-
|
|
6918
|
-
|
|
6919
|
-
|
|
6920
|
-
|
|
6921
|
-
|
|
6922
|
-
|
|
6923
|
-
|
|
6924
|
-
|
|
6917
|
+
}, isTestimonialWidget ? (/*#__PURE__*/React__default["default"].createElement(React__default["default"].Fragment, null, /*#__PURE__*/React__default["default"].createElement(Input, {
|
|
6918
|
+
rest: register(`${name}.${index}.quote`),
|
|
6919
|
+
label: widgetTranslations.quote,
|
|
6920
|
+
error: (_d = (_c = (_b = (_a = errors[name]) === null || _a === void 0 ? void 0 : _a[index]) === null || _b === void 0 ? void 0 : _b['quote']) === null || _c === void 0 ? void 0 : _c.message) === null || _d === void 0 ? void 0 : _d.toString(),
|
|
6921
|
+
type: "text",
|
|
6922
|
+
className: "w-full p-2",
|
|
6923
|
+
placeholder: widgetTranslations.quotePlaceholder
|
|
6924
|
+
}), /*#__PURE__*/React__default["default"].createElement(Input, {
|
|
6925
|
+
rest: register(`${name}.${index}.personName`),
|
|
6926
|
+
label: widgetTranslations.personName,
|
|
6927
|
+
error: (_h = (_g = (_f = (_e = errors[name]) === null || _e === void 0 ? void 0 : _e[index]) === null || _f === void 0 ? void 0 : _f['personName']) === null || _g === void 0 ? void 0 : _g.message) === null || _h === void 0 ? void 0 : _h.toString(),
|
|
6928
|
+
type: "text",
|
|
6929
|
+
className: "w-full p-2",
|
|
6930
|
+
placeholder: widgetTranslations.personNamePlaceholder
|
|
6931
|
+
}), /*#__PURE__*/React__default["default"].createElement(Input, {
|
|
6932
|
+
rest: register(`${name}.${index}.personRole`),
|
|
6933
|
+
label: widgetTranslations.personRole,
|
|
6934
|
+
error: (_m = (_l = (_k = (_j = errors[name]) === null || _j === void 0 ? void 0 : _j[index]) === null || _k === void 0 ? void 0 : _k['personRole']) === null || _l === void 0 ? void 0 : _l.message) === null || _m === void 0 ? void 0 : _m.toString(),
|
|
6935
|
+
type: "text",
|
|
6936
|
+
className: "w-full p-2",
|
|
6937
|
+
placeholder: widgetTranslations.personRolePlaceholder
|
|
6938
|
+
}), /*#__PURE__*/React__default["default"].createElement(Input, {
|
|
6939
|
+
rest: register(`${name}.${index}.personOrganization`),
|
|
6940
|
+
label: widgetTranslations.personOrganization,
|
|
6941
|
+
error: (_r = (_q = (_p = (_o = errors[name]) === null || _o === void 0 ? void 0 : _o[index]) === null || _p === void 0 ? void 0 : _p['personOrganization']) === null || _q === void 0 ? void 0 : _q.message) === null || _r === void 0 ? void 0 : _r.toString(),
|
|
6942
|
+
type: "text",
|
|
6943
|
+
className: "w-full p-2",
|
|
6944
|
+
placeholder: widgetTranslations.personOrganizationPlaceholder
|
|
6945
|
+
}), /*#__PURE__*/React__default["default"].createElement(Input, {
|
|
6946
|
+
rest: register(`${name}.${index}.rating`, {
|
|
6947
|
+
min: {
|
|
6948
|
+
value: 0,
|
|
6949
|
+
message: 'Rating should be greater than or equal to 0'
|
|
6950
|
+
},
|
|
6951
|
+
max: {
|
|
6952
|
+
value: 5,
|
|
6953
|
+
message: 'Rating should be less than or equal to 5'
|
|
6954
|
+
}
|
|
6955
|
+
}),
|
|
6956
|
+
label: widgetTranslations.rating,
|
|
6957
|
+
error: (_v = (_u = (_t = (_s = errors[name]) === null || _s === void 0 ? void 0 : _s[index]) === null || _t === void 0 ? void 0 : _t['rating']) === null || _u === void 0 ? void 0 : _u.message) === null || _v === void 0 ? void 0 : _v.toString(),
|
|
6958
|
+
type: "number",
|
|
6959
|
+
className: "w-full p-2",
|
|
6960
|
+
placeholder: widgetTranslations.ratingPlaceholder
|
|
6961
|
+
}))) : (/*#__PURE__*/React__default["default"].createElement(React__default["default"].Fragment, null, Array.isArray(languages) && languages.length > 0 ? (/*#__PURE__*/React__default["default"].createElement(React__default["default"].Fragment, null, languages.map(lang => {
|
|
6925
6962
|
var _a, _b, _c, _d, _e, _f, _g, _h;
|
|
6926
6963
|
return /*#__PURE__*/React__default["default"].createElement(Input, {
|
|
6927
6964
|
rest: register(`${name}.${index}.titles.${lang.code}`),
|
|
@@ -6934,7 +6971,7 @@ const ItemsAccordian = ({
|
|
|
6934
6971
|
}))) : (/*#__PURE__*/React__default["default"].createElement(Input, {
|
|
6935
6972
|
rest: register(`${name}.${index}.title`),
|
|
6936
6973
|
label: commonTranslations.title,
|
|
6937
|
-
error: (
|
|
6974
|
+
error: (_z = (_y = (_x = (_w = errors[name]) === null || _w === void 0 ? void 0 : _w[index]) === null || _x === void 0 ? void 0 : _x['title']) === null || _y === void 0 ? void 0 : _y.message) === null || _z === void 0 ? void 0 : _z.toString(),
|
|
6938
6975
|
type: "text",
|
|
6939
6976
|
className: "w-full p-2",
|
|
6940
6977
|
placeholder: commonTranslations.titlePlaceholder
|
|
@@ -6973,7 +7010,7 @@ const ItemsAccordian = ({
|
|
|
6973
7010
|
register: register,
|
|
6974
7011
|
label: widgetTranslations.srcset,
|
|
6975
7012
|
name: `${name}.${index}.srcset`,
|
|
6976
|
-
errors: (
|
|
7013
|
+
errors: (_1 = (_0 = errors[name]) === null || _0 === void 0 ? void 0 : _0[index]) === null || _1 === void 0 ? void 0 : _1['srcset'],
|
|
6977
7014
|
screenSizeRequired: widgetTranslations.screenSizeRequired,
|
|
6978
7015
|
heightRequired: widgetTranslations.heightRequired,
|
|
6979
7016
|
minHeight: widgetTranslations.minHeight,
|
|
@@ -7008,7 +7045,7 @@ const ItemsAccordian = ({
|
|
|
7008
7045
|
label: widgetTranslations.image,
|
|
7009
7046
|
control: control,
|
|
7010
7047
|
name: `${name}.${index}.img`,
|
|
7011
|
-
error: (
|
|
7048
|
+
error: (_5 = (_4 = (_3 = (_2 = errors[name]) === null || _2 === void 0 ? void 0 : _2[index]) === null || _3 === void 0 ? void 0 : _3['img']) === null || _4 === void 0 ? void 0 : _4.message) === null || _5 === void 0 ? void 0 : _5.toString(),
|
|
7012
7049
|
baseUrl: imageBaseUrl ? imageBaseUrl : baseUrl,
|
|
7013
7050
|
setError: setError,
|
|
7014
7051
|
clearError: clearError,
|
|
@@ -7221,7 +7258,6 @@ const constants = {
|
|
|
7221
7258
|
const WidgetForm = ({
|
|
7222
7259
|
formRef,
|
|
7223
7260
|
customInputs,
|
|
7224
|
-
customItemRenderers,
|
|
7225
7261
|
onPrimaryButtonClick
|
|
7226
7262
|
}) => {
|
|
7227
7263
|
const {
|
|
@@ -7286,7 +7322,6 @@ const WidgetForm = ({
|
|
|
7286
7322
|
const pagesLoadedRef = React.useRef(false);
|
|
7287
7323
|
const blogCategoryInitialized = React.useRef(false);
|
|
7288
7324
|
const selectedWidgetTypeValue = (selectedWidgetType === null || selectedWidgetType === void 0 ? void 0 : selectedWidgetType.value) || getValues(constants.widgetTypeAccessor);
|
|
7289
|
-
const selectedCustomItemRenderer = selectedWidgetTypeValue ? customItemRenderers === null || customItemRenderers === void 0 ? void 0 : customItemRenderers[selectedWidgetTypeValue] : undefined;
|
|
7290
7325
|
React.useEffect(() => {
|
|
7291
7326
|
if (data && formState === 'UPDATE') {
|
|
7292
7327
|
const widgetType = widgetTypes.find(type => type.value === (data === null || data === void 0 ? void 0 : data.widgetType));
|
|
@@ -7496,9 +7531,6 @@ const WidgetForm = ({
|
|
|
7496
7531
|
setSelectedCollectionItems([]);
|
|
7497
7532
|
setValue(constants.itemTypeAccessor, constants.imageItemsTypeValue);
|
|
7498
7533
|
setValue(constants.collectionNameAccessor, constants.imageItemsTypeValue);
|
|
7499
|
-
setValue('webPerRow', 4);
|
|
7500
|
-
setValue('tabletPerRow', 2);
|
|
7501
|
-
setValue('mobilePerRow', 1);
|
|
7502
7534
|
} else {
|
|
7503
7535
|
setItemsEnabled(true);
|
|
7504
7536
|
}
|
|
@@ -7987,7 +8019,7 @@ const WidgetForm = ({
|
|
|
7987
8019
|
loading: loading,
|
|
7988
8020
|
addText: commonTranslations.add,
|
|
7989
8021
|
deleteText: commonTranslations.delete,
|
|
7990
|
-
|
|
8022
|
+
widgetType: selectedWidgetTypeValue
|
|
7991
8023
|
}), /*#__PURE__*/React__default["default"].createElement(ItemsAccordian, {
|
|
7992
8024
|
languages: languages,
|
|
7993
8025
|
clearError: clearErrors,
|
|
@@ -8005,7 +8037,7 @@ const WidgetForm = ({
|
|
|
8005
8037
|
register: register,
|
|
8006
8038
|
addText: commonTranslations.add,
|
|
8007
8039
|
deleteText: commonTranslations.delete,
|
|
8008
|
-
|
|
8040
|
+
widgetType: selectedWidgetTypeValue
|
|
8009
8041
|
}))));
|
|
8010
8042
|
};
|
|
8011
8043
|
|
|
@@ -8128,79 +8160,6 @@ const WiddgetFormWrapper = ({
|
|
|
8128
8160
|
}) : null;
|
|
8129
8161
|
};
|
|
8130
8162
|
|
|
8131
|
-
const TestimonialItemRenderer = ({
|
|
8132
|
-
name,
|
|
8133
|
-
index,
|
|
8134
|
-
register,
|
|
8135
|
-
errors,
|
|
8136
|
-
widgetTranslations
|
|
8137
|
-
}) => {
|
|
8138
|
-
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t, _u, _v;
|
|
8139
|
-
return /*#__PURE__*/React__default["default"].createElement(React__default["default"].Fragment, null, /*#__PURE__*/React__default["default"].createElement(Input, {
|
|
8140
|
-
rest: register(`${name}.${index}.quote`),
|
|
8141
|
-
label: widgetTranslations.quote,
|
|
8142
|
-
error: (_d = (_c = (_b = (_a = errors[name]) === null || _a === void 0 ? void 0 : _a[index]) === null || _b === void 0 ? void 0 : _b['quote']) === null || _c === void 0 ? void 0 : _c.message) === null || _d === void 0 ? void 0 : _d.toString(),
|
|
8143
|
-
type: "textarea",
|
|
8144
|
-
className: "w-full p-2",
|
|
8145
|
-
placeholder: widgetTranslations.quotePlaceholder
|
|
8146
|
-
}), /*#__PURE__*/React__default["default"].createElement(Input, {
|
|
8147
|
-
rest: register(`${name}.${index}.personName`),
|
|
8148
|
-
label: widgetTranslations.personName,
|
|
8149
|
-
error: (_h = (_g = (_f = (_e = errors[name]) === null || _e === void 0 ? void 0 : _e[index]) === null || _f === void 0 ? void 0 : _f['personName']) === null || _g === void 0 ? void 0 : _g.message) === null || _h === void 0 ? void 0 : _h.toString(),
|
|
8150
|
-
type: "text",
|
|
8151
|
-
className: "w-full p-2",
|
|
8152
|
-
placeholder: widgetTranslations.personNamePlaceholder
|
|
8153
|
-
}), /*#__PURE__*/React__default["default"].createElement(Input, {
|
|
8154
|
-
rest: register(`${name}.${index}.personRole`),
|
|
8155
|
-
label: widgetTranslations.personRole,
|
|
8156
|
-
error: (_m = (_l = (_k = (_j = errors[name]) === null || _j === void 0 ? void 0 : _j[index]) === null || _k === void 0 ? void 0 : _k['personRole']) === null || _l === void 0 ? void 0 : _l.message) === null || _m === void 0 ? void 0 : _m.toString(),
|
|
8157
|
-
type: "text",
|
|
8158
|
-
className: "w-full p-2",
|
|
8159
|
-
placeholder: widgetTranslations.personRolePlaceholder
|
|
8160
|
-
}), /*#__PURE__*/React__default["default"].createElement(Input, {
|
|
8161
|
-
rest: register(`${name}.${index}.personOrganization`),
|
|
8162
|
-
label: widgetTranslations.personOrganization,
|
|
8163
|
-
error: (_r = (_q = (_p = (_o = errors[name]) === null || _o === void 0 ? void 0 : _o[index]) === null || _p === void 0 ? void 0 : _p['personOrganization']) === null || _q === void 0 ? void 0 : _q.message) === null || _r === void 0 ? void 0 : _r.toString(),
|
|
8164
|
-
type: "text",
|
|
8165
|
-
className: "w-full p-2",
|
|
8166
|
-
placeholder: widgetTranslations.personOrganizationPlaceholder
|
|
8167
|
-
}), /*#__PURE__*/React__default["default"].createElement(Input, {
|
|
8168
|
-
rest: register(`${name}.${index}.rating`, {
|
|
8169
|
-
min: {
|
|
8170
|
-
value: 0,
|
|
8171
|
-
message: 'Rating should be greater than or equal to 0'
|
|
8172
|
-
},
|
|
8173
|
-
max: {
|
|
8174
|
-
value: 5,
|
|
8175
|
-
message: 'Rating should be less than or equal to 5'
|
|
8176
|
-
}
|
|
8177
|
-
}),
|
|
8178
|
-
label: widgetTranslations.rating,
|
|
8179
|
-
error: (_v = (_u = (_t = (_s = errors[name]) === null || _s === void 0 ? void 0 : _s[index]) === null || _t === void 0 ? void 0 : _t['rating']) === null || _u === void 0 ? void 0 : _u.message) === null || _v === void 0 ? void 0 : _v.toString(),
|
|
8180
|
-
type: "number",
|
|
8181
|
-
className: "w-full p-2",
|
|
8182
|
-
placeholder: widgetTranslations.ratingPlaceholder
|
|
8183
|
-
}));
|
|
8184
|
-
};
|
|
8185
|
-
|
|
8186
|
-
const getDefaultCustomItemRenderers = () => ({
|
|
8187
|
-
Testimonial: {
|
|
8188
|
-
render: TestimonialItemRenderer,
|
|
8189
|
-
createItem: ({
|
|
8190
|
-
index,
|
|
8191
|
-
itemType
|
|
8192
|
-
}) => ({
|
|
8193
|
-
quote: '',
|
|
8194
|
-
personName: '',
|
|
8195
|
-
personRole: '',
|
|
8196
|
-
personOrganization: '',
|
|
8197
|
-
rating: 5,
|
|
8198
|
-
itemType,
|
|
8199
|
-
sequence: index
|
|
8200
|
-
})
|
|
8201
|
-
}
|
|
8202
|
-
});
|
|
8203
|
-
|
|
8204
8163
|
const Widget = ({
|
|
8205
8164
|
routes,
|
|
8206
8165
|
loader,
|
|
@@ -8215,8 +8174,7 @@ const Widget = ({
|
|
|
8215
8174
|
imageMaxSize,
|
|
8216
8175
|
translations,
|
|
8217
8176
|
children,
|
|
8218
|
-
onPrimaryButtonClick
|
|
8219
|
-
customItemRenderers
|
|
8177
|
+
onPrimaryButtonClick
|
|
8220
8178
|
}) => {
|
|
8221
8179
|
const {
|
|
8222
8180
|
commonTranslations
|
|
@@ -8224,8 +8182,6 @@ const Widget = ({
|
|
|
8224
8182
|
const derivedPermissions = Object.assign(DEFAULT_PERMISSIONS, _permissions);
|
|
8225
8183
|
const widgetFormRef = React.useRef(null);
|
|
8226
8184
|
const derivedT = Object.assign(Object.assign({}, TRANSLATION_PAIRS_WIDGET), translations || {});
|
|
8227
|
-
const defaultCustomItemRenderers = getDefaultCustomItemRenderers();
|
|
8228
|
-
const derivedCustomItemRenderers = Object.assign(Object.assign({}, defaultCustomItemRenderers), customItemRenderers || {});
|
|
8229
8185
|
const {
|
|
8230
8186
|
list,
|
|
8231
8187
|
loading,
|
|
@@ -8310,8 +8266,7 @@ const Widget = ({
|
|
|
8310
8266
|
})
|
|
8311
8267
|
}, /*#__PURE__*/React__default["default"].createElement(WidgetForm, {
|
|
8312
8268
|
formRef: widgetFormRef,
|
|
8313
|
-
onPrimaryButtonClick: onPrimaryButtonClick
|
|
8314
|
-
customItemRenderers: derivedCustomItemRenderers
|
|
8269
|
+
onPrimaryButtonClick: onPrimaryButtonClick
|
|
8315
8270
|
}))), itemData && (/*#__PURE__*/React__default["default"].createElement(DeleteModal, {
|
|
8316
8271
|
formState: formState,
|
|
8317
8272
|
itemData: itemData,
|
package/index.js
CHANGED
|
@@ -6805,7 +6805,7 @@ const ItemsAccordian = ({
|
|
|
6805
6805
|
itemType,
|
|
6806
6806
|
languages,
|
|
6807
6807
|
clearError,
|
|
6808
|
-
|
|
6808
|
+
widgetType,
|
|
6809
6809
|
addText: _addText = 'Add',
|
|
6810
6810
|
deleteText: _deleteText = 'Delete'
|
|
6811
6811
|
}) => {
|
|
@@ -6829,6 +6829,7 @@ const ItemsAccordian = ({
|
|
|
6829
6829
|
name,
|
|
6830
6830
|
control
|
|
6831
6831
|
});
|
|
6832
|
+
const isTestimonialWidget = widgetType === 'Testimonial';
|
|
6832
6833
|
const onItemsToggleClick = (index, status) => {
|
|
6833
6834
|
var _a;
|
|
6834
6835
|
const newItemsShow = [...itemsShow];
|
|
@@ -6846,11 +6847,16 @@ const ItemsAccordian = ({
|
|
|
6846
6847
|
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
6847
6848
|
}, [errors, name, errors === null || errors === void 0 ? void 0 : errors[name]]);
|
|
6848
6849
|
const addTab = index => {
|
|
6849
|
-
if (
|
|
6850
|
-
appendItem(
|
|
6851
|
-
|
|
6852
|
-
|
|
6853
|
-
|
|
6850
|
+
if (isTestimonialWidget) {
|
|
6851
|
+
appendItem({
|
|
6852
|
+
quote: '',
|
|
6853
|
+
personName: '',
|
|
6854
|
+
personRole: '',
|
|
6855
|
+
personOrganization: '',
|
|
6856
|
+
rating: 5,
|
|
6857
|
+
itemType,
|
|
6858
|
+
sequence: index
|
|
6859
|
+
});
|
|
6854
6860
|
return;
|
|
6855
6861
|
}
|
|
6856
6862
|
appendItem({
|
|
@@ -6876,7 +6882,7 @@ const ItemsAccordian = ({
|
|
|
6876
6882
|
}, /*#__PURE__*/React.createElement("div", {
|
|
6877
6883
|
className: "khb_item-items"
|
|
6878
6884
|
}, items === null || items === void 0 ? void 0 : items.map((field, index) => {
|
|
6879
|
-
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
|
|
6885
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t, _u, _v, _w, _x, _y, _z, _0, _1, _2, _3, _4, _5;
|
|
6880
6886
|
return /*#__PURE__*/React.createElement(Accordian, {
|
|
6881
6887
|
key: index,
|
|
6882
6888
|
open: itemsShow[index],
|
|
@@ -6896,20 +6902,51 @@ const ItemsAccordian = ({
|
|
|
6896
6902
|
}, _deleteText))
|
|
6897
6903
|
}, /*#__PURE__*/React.createElement("div", {
|
|
6898
6904
|
className: "khb-form-items"
|
|
6899
|
-
},
|
|
6900
|
-
name,
|
|
6901
|
-
|
|
6902
|
-
|
|
6903
|
-
|
|
6904
|
-
|
|
6905
|
-
|
|
6906
|
-
|
|
6907
|
-
|
|
6908
|
-
|
|
6909
|
-
|
|
6910
|
-
|
|
6911
|
-
|
|
6912
|
-
|
|
6905
|
+
}, isTestimonialWidget ? (/*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(Input, {
|
|
6906
|
+
rest: register(`${name}.${index}.quote`),
|
|
6907
|
+
label: widgetTranslations.quote,
|
|
6908
|
+
error: (_d = (_c = (_b = (_a = errors[name]) === null || _a === void 0 ? void 0 : _a[index]) === null || _b === void 0 ? void 0 : _b['quote']) === null || _c === void 0 ? void 0 : _c.message) === null || _d === void 0 ? void 0 : _d.toString(),
|
|
6909
|
+
type: "text",
|
|
6910
|
+
className: "w-full p-2",
|
|
6911
|
+
placeholder: widgetTranslations.quotePlaceholder
|
|
6912
|
+
}), /*#__PURE__*/React.createElement(Input, {
|
|
6913
|
+
rest: register(`${name}.${index}.personName`),
|
|
6914
|
+
label: widgetTranslations.personName,
|
|
6915
|
+
error: (_h = (_g = (_f = (_e = errors[name]) === null || _e === void 0 ? void 0 : _e[index]) === null || _f === void 0 ? void 0 : _f['personName']) === null || _g === void 0 ? void 0 : _g.message) === null || _h === void 0 ? void 0 : _h.toString(),
|
|
6916
|
+
type: "text",
|
|
6917
|
+
className: "w-full p-2",
|
|
6918
|
+
placeholder: widgetTranslations.personNamePlaceholder
|
|
6919
|
+
}), /*#__PURE__*/React.createElement(Input, {
|
|
6920
|
+
rest: register(`${name}.${index}.personRole`),
|
|
6921
|
+
label: widgetTranslations.personRole,
|
|
6922
|
+
error: (_m = (_l = (_k = (_j = errors[name]) === null || _j === void 0 ? void 0 : _j[index]) === null || _k === void 0 ? void 0 : _k['personRole']) === null || _l === void 0 ? void 0 : _l.message) === null || _m === void 0 ? void 0 : _m.toString(),
|
|
6923
|
+
type: "text",
|
|
6924
|
+
className: "w-full p-2",
|
|
6925
|
+
placeholder: widgetTranslations.personRolePlaceholder
|
|
6926
|
+
}), /*#__PURE__*/React.createElement(Input, {
|
|
6927
|
+
rest: register(`${name}.${index}.personOrganization`),
|
|
6928
|
+
label: widgetTranslations.personOrganization,
|
|
6929
|
+
error: (_r = (_q = (_p = (_o = errors[name]) === null || _o === void 0 ? void 0 : _o[index]) === null || _p === void 0 ? void 0 : _p['personOrganization']) === null || _q === void 0 ? void 0 : _q.message) === null || _r === void 0 ? void 0 : _r.toString(),
|
|
6930
|
+
type: "text",
|
|
6931
|
+
className: "w-full p-2",
|
|
6932
|
+
placeholder: widgetTranslations.personOrganizationPlaceholder
|
|
6933
|
+
}), /*#__PURE__*/React.createElement(Input, {
|
|
6934
|
+
rest: register(`${name}.${index}.rating`, {
|
|
6935
|
+
min: {
|
|
6936
|
+
value: 0,
|
|
6937
|
+
message: 'Rating should be greater than or equal to 0'
|
|
6938
|
+
},
|
|
6939
|
+
max: {
|
|
6940
|
+
value: 5,
|
|
6941
|
+
message: 'Rating should be less than or equal to 5'
|
|
6942
|
+
}
|
|
6943
|
+
}),
|
|
6944
|
+
label: widgetTranslations.rating,
|
|
6945
|
+
error: (_v = (_u = (_t = (_s = errors[name]) === null || _s === void 0 ? void 0 : _s[index]) === null || _t === void 0 ? void 0 : _t['rating']) === null || _u === void 0 ? void 0 : _u.message) === null || _v === void 0 ? void 0 : _v.toString(),
|
|
6946
|
+
type: "number",
|
|
6947
|
+
className: "w-full p-2",
|
|
6948
|
+
placeholder: widgetTranslations.ratingPlaceholder
|
|
6949
|
+
}))) : (/*#__PURE__*/React.createElement(React.Fragment, null, Array.isArray(languages) && languages.length > 0 ? (/*#__PURE__*/React.createElement(React.Fragment, null, languages.map(lang => {
|
|
6913
6950
|
var _a, _b, _c, _d, _e, _f, _g, _h;
|
|
6914
6951
|
return /*#__PURE__*/React.createElement(Input, {
|
|
6915
6952
|
rest: register(`${name}.${index}.titles.${lang.code}`),
|
|
@@ -6922,7 +6959,7 @@ const ItemsAccordian = ({
|
|
|
6922
6959
|
}))) : (/*#__PURE__*/React.createElement(Input, {
|
|
6923
6960
|
rest: register(`${name}.${index}.title`),
|
|
6924
6961
|
label: commonTranslations.title,
|
|
6925
|
-
error: (
|
|
6962
|
+
error: (_z = (_y = (_x = (_w = errors[name]) === null || _w === void 0 ? void 0 : _w[index]) === null || _x === void 0 ? void 0 : _x['title']) === null || _y === void 0 ? void 0 : _y.message) === null || _z === void 0 ? void 0 : _z.toString(),
|
|
6926
6963
|
type: "text",
|
|
6927
6964
|
className: "w-full p-2",
|
|
6928
6965
|
placeholder: commonTranslations.titlePlaceholder
|
|
@@ -6961,7 +6998,7 @@ const ItemsAccordian = ({
|
|
|
6961
6998
|
register: register,
|
|
6962
6999
|
label: widgetTranslations.srcset,
|
|
6963
7000
|
name: `${name}.${index}.srcset`,
|
|
6964
|
-
errors: (
|
|
7001
|
+
errors: (_1 = (_0 = errors[name]) === null || _0 === void 0 ? void 0 : _0[index]) === null || _1 === void 0 ? void 0 : _1['srcset'],
|
|
6965
7002
|
screenSizeRequired: widgetTranslations.screenSizeRequired,
|
|
6966
7003
|
heightRequired: widgetTranslations.heightRequired,
|
|
6967
7004
|
minHeight: widgetTranslations.minHeight,
|
|
@@ -6996,7 +7033,7 @@ const ItemsAccordian = ({
|
|
|
6996
7033
|
label: widgetTranslations.image,
|
|
6997
7034
|
control: control,
|
|
6998
7035
|
name: `${name}.${index}.img`,
|
|
6999
|
-
error: (
|
|
7036
|
+
error: (_5 = (_4 = (_3 = (_2 = errors[name]) === null || _2 === void 0 ? void 0 : _2[index]) === null || _3 === void 0 ? void 0 : _3['img']) === null || _4 === void 0 ? void 0 : _4.message) === null || _5 === void 0 ? void 0 : _5.toString(),
|
|
7000
7037
|
baseUrl: imageBaseUrl ? imageBaseUrl : baseUrl,
|
|
7001
7038
|
setError: setError,
|
|
7002
7039
|
clearError: clearError,
|
|
@@ -7209,7 +7246,6 @@ const constants = {
|
|
|
7209
7246
|
const WidgetForm = ({
|
|
7210
7247
|
formRef,
|
|
7211
7248
|
customInputs,
|
|
7212
|
-
customItemRenderers,
|
|
7213
7249
|
onPrimaryButtonClick
|
|
7214
7250
|
}) => {
|
|
7215
7251
|
const {
|
|
@@ -7274,7 +7310,6 @@ const WidgetForm = ({
|
|
|
7274
7310
|
const pagesLoadedRef = useRef(false);
|
|
7275
7311
|
const blogCategoryInitialized = useRef(false);
|
|
7276
7312
|
const selectedWidgetTypeValue = (selectedWidgetType === null || selectedWidgetType === void 0 ? void 0 : selectedWidgetType.value) || getValues(constants.widgetTypeAccessor);
|
|
7277
|
-
const selectedCustomItemRenderer = selectedWidgetTypeValue ? customItemRenderers === null || customItemRenderers === void 0 ? void 0 : customItemRenderers[selectedWidgetTypeValue] : undefined;
|
|
7278
7313
|
useEffect(() => {
|
|
7279
7314
|
if (data && formState === 'UPDATE') {
|
|
7280
7315
|
const widgetType = widgetTypes.find(type => type.value === (data === null || data === void 0 ? void 0 : data.widgetType));
|
|
@@ -7484,9 +7519,6 @@ const WidgetForm = ({
|
|
|
7484
7519
|
setSelectedCollectionItems([]);
|
|
7485
7520
|
setValue(constants.itemTypeAccessor, constants.imageItemsTypeValue);
|
|
7486
7521
|
setValue(constants.collectionNameAccessor, constants.imageItemsTypeValue);
|
|
7487
|
-
setValue('webPerRow', 4);
|
|
7488
|
-
setValue('tabletPerRow', 2);
|
|
7489
|
-
setValue('mobilePerRow', 1);
|
|
7490
7522
|
} else {
|
|
7491
7523
|
setItemsEnabled(true);
|
|
7492
7524
|
}
|
|
@@ -7975,7 +8007,7 @@ const WidgetForm = ({
|
|
|
7975
8007
|
loading: loading,
|
|
7976
8008
|
addText: commonTranslations.add,
|
|
7977
8009
|
deleteText: commonTranslations.delete,
|
|
7978
|
-
|
|
8010
|
+
widgetType: selectedWidgetTypeValue
|
|
7979
8011
|
}), /*#__PURE__*/React.createElement(ItemsAccordian, {
|
|
7980
8012
|
languages: languages,
|
|
7981
8013
|
clearError: clearErrors,
|
|
@@ -7993,7 +8025,7 @@ const WidgetForm = ({
|
|
|
7993
8025
|
register: register,
|
|
7994
8026
|
addText: commonTranslations.add,
|
|
7995
8027
|
deleteText: commonTranslations.delete,
|
|
7996
|
-
|
|
8028
|
+
widgetType: selectedWidgetTypeValue
|
|
7997
8029
|
}))));
|
|
7998
8030
|
};
|
|
7999
8031
|
|
|
@@ -8116,79 +8148,6 @@ const WiddgetFormWrapper = ({
|
|
|
8116
8148
|
}) : null;
|
|
8117
8149
|
};
|
|
8118
8150
|
|
|
8119
|
-
const TestimonialItemRenderer = ({
|
|
8120
|
-
name,
|
|
8121
|
-
index,
|
|
8122
|
-
register,
|
|
8123
|
-
errors,
|
|
8124
|
-
widgetTranslations
|
|
8125
|
-
}) => {
|
|
8126
|
-
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t, _u, _v;
|
|
8127
|
-
return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(Input, {
|
|
8128
|
-
rest: register(`${name}.${index}.quote`),
|
|
8129
|
-
label: widgetTranslations.quote,
|
|
8130
|
-
error: (_d = (_c = (_b = (_a = errors[name]) === null || _a === void 0 ? void 0 : _a[index]) === null || _b === void 0 ? void 0 : _b['quote']) === null || _c === void 0 ? void 0 : _c.message) === null || _d === void 0 ? void 0 : _d.toString(),
|
|
8131
|
-
type: "textarea",
|
|
8132
|
-
className: "w-full p-2",
|
|
8133
|
-
placeholder: widgetTranslations.quotePlaceholder
|
|
8134
|
-
}), /*#__PURE__*/React.createElement(Input, {
|
|
8135
|
-
rest: register(`${name}.${index}.personName`),
|
|
8136
|
-
label: widgetTranslations.personName,
|
|
8137
|
-
error: (_h = (_g = (_f = (_e = errors[name]) === null || _e === void 0 ? void 0 : _e[index]) === null || _f === void 0 ? void 0 : _f['personName']) === null || _g === void 0 ? void 0 : _g.message) === null || _h === void 0 ? void 0 : _h.toString(),
|
|
8138
|
-
type: "text",
|
|
8139
|
-
className: "w-full p-2",
|
|
8140
|
-
placeholder: widgetTranslations.personNamePlaceholder
|
|
8141
|
-
}), /*#__PURE__*/React.createElement(Input, {
|
|
8142
|
-
rest: register(`${name}.${index}.personRole`),
|
|
8143
|
-
label: widgetTranslations.personRole,
|
|
8144
|
-
error: (_m = (_l = (_k = (_j = errors[name]) === null || _j === void 0 ? void 0 : _j[index]) === null || _k === void 0 ? void 0 : _k['personRole']) === null || _l === void 0 ? void 0 : _l.message) === null || _m === void 0 ? void 0 : _m.toString(),
|
|
8145
|
-
type: "text",
|
|
8146
|
-
className: "w-full p-2",
|
|
8147
|
-
placeholder: widgetTranslations.personRolePlaceholder
|
|
8148
|
-
}), /*#__PURE__*/React.createElement(Input, {
|
|
8149
|
-
rest: register(`${name}.${index}.personOrganization`),
|
|
8150
|
-
label: widgetTranslations.personOrganization,
|
|
8151
|
-
error: (_r = (_q = (_p = (_o = errors[name]) === null || _o === void 0 ? void 0 : _o[index]) === null || _p === void 0 ? void 0 : _p['personOrganization']) === null || _q === void 0 ? void 0 : _q.message) === null || _r === void 0 ? void 0 : _r.toString(),
|
|
8152
|
-
type: "text",
|
|
8153
|
-
className: "w-full p-2",
|
|
8154
|
-
placeholder: widgetTranslations.personOrganizationPlaceholder
|
|
8155
|
-
}), /*#__PURE__*/React.createElement(Input, {
|
|
8156
|
-
rest: register(`${name}.${index}.rating`, {
|
|
8157
|
-
min: {
|
|
8158
|
-
value: 0,
|
|
8159
|
-
message: 'Rating should be greater than or equal to 0'
|
|
8160
|
-
},
|
|
8161
|
-
max: {
|
|
8162
|
-
value: 5,
|
|
8163
|
-
message: 'Rating should be less than or equal to 5'
|
|
8164
|
-
}
|
|
8165
|
-
}),
|
|
8166
|
-
label: widgetTranslations.rating,
|
|
8167
|
-
error: (_v = (_u = (_t = (_s = errors[name]) === null || _s === void 0 ? void 0 : _s[index]) === null || _t === void 0 ? void 0 : _t['rating']) === null || _u === void 0 ? void 0 : _u.message) === null || _v === void 0 ? void 0 : _v.toString(),
|
|
8168
|
-
type: "number",
|
|
8169
|
-
className: "w-full p-2",
|
|
8170
|
-
placeholder: widgetTranslations.ratingPlaceholder
|
|
8171
|
-
}));
|
|
8172
|
-
};
|
|
8173
|
-
|
|
8174
|
-
const getDefaultCustomItemRenderers = () => ({
|
|
8175
|
-
Testimonial: {
|
|
8176
|
-
render: TestimonialItemRenderer,
|
|
8177
|
-
createItem: ({
|
|
8178
|
-
index,
|
|
8179
|
-
itemType
|
|
8180
|
-
}) => ({
|
|
8181
|
-
quote: '',
|
|
8182
|
-
personName: '',
|
|
8183
|
-
personRole: '',
|
|
8184
|
-
personOrganization: '',
|
|
8185
|
-
rating: 5,
|
|
8186
|
-
itemType,
|
|
8187
|
-
sequence: index
|
|
8188
|
-
})
|
|
8189
|
-
}
|
|
8190
|
-
});
|
|
8191
|
-
|
|
8192
8151
|
const Widget = ({
|
|
8193
8152
|
routes,
|
|
8194
8153
|
loader,
|
|
@@ -8203,8 +8162,7 @@ const Widget = ({
|
|
|
8203
8162
|
imageMaxSize,
|
|
8204
8163
|
translations,
|
|
8205
8164
|
children,
|
|
8206
|
-
onPrimaryButtonClick
|
|
8207
|
-
customItemRenderers
|
|
8165
|
+
onPrimaryButtonClick
|
|
8208
8166
|
}) => {
|
|
8209
8167
|
const {
|
|
8210
8168
|
commonTranslations
|
|
@@ -8212,8 +8170,6 @@ const Widget = ({
|
|
|
8212
8170
|
const derivedPermissions = Object.assign(DEFAULT_PERMISSIONS, _permissions);
|
|
8213
8171
|
const widgetFormRef = useRef(null);
|
|
8214
8172
|
const derivedT = Object.assign(Object.assign({}, TRANSLATION_PAIRS_WIDGET), translations || {});
|
|
8215
|
-
const defaultCustomItemRenderers = getDefaultCustomItemRenderers();
|
|
8216
|
-
const derivedCustomItemRenderers = Object.assign(Object.assign({}, defaultCustomItemRenderers), customItemRenderers || {});
|
|
8217
8173
|
const {
|
|
8218
8174
|
list,
|
|
8219
8175
|
loading,
|
|
@@ -8298,8 +8254,7 @@ const Widget = ({
|
|
|
8298
8254
|
})
|
|
8299
8255
|
}, /*#__PURE__*/React.createElement(WidgetForm, {
|
|
8300
8256
|
formRef: widgetFormRef,
|
|
8301
|
-
onPrimaryButtonClick: onPrimaryButtonClick
|
|
8302
|
-
customItemRenderers: derivedCustomItemRenderers
|
|
8257
|
+
onPrimaryButtonClick: onPrimaryButtonClick
|
|
8303
8258
|
}))), itemData && (/*#__PURE__*/React.createElement(DeleteModal, {
|
|
8304
8259
|
formState: formState,
|
|
8305
8260
|
itemData: itemData,
|
package/package.json
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
2
|
import { ItemsAccordianProps } from '../../../types';
|
|
3
|
-
declare const ItemsAccordian: ({ show, title, id, collapseId, toggleShow, loading, name, errors, control, register, setError, itemType, languages, clearError,
|
|
3
|
+
declare const ItemsAccordian: ({ show, title, id, collapseId, toggleShow, loading, name, errors, control, register, setError, itemType, languages, clearError, widgetType, addText, deleteText, }: ItemsAccordianProps) => JSX.Element;
|
|
4
4
|
export default ItemsAccordian;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
2
|
import { FormProps } from '../../../types';
|
|
3
|
-
declare const WidgetForm: ({ formRef, customInputs,
|
|
3
|
+
declare const WidgetForm: ({ formRef, customInputs, onPrimaryButtonClick, }: FormProps) => JSX.Element | null;
|
|
4
4
|
export default WidgetForm;
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
2
|
import { WidgetProps } from '../../../types';
|
|
3
3
|
declare const Widget: {
|
|
4
|
-
({ routes, loader, explicitForm, imageBaseUrl, permissions, preConfirmDelete, formatListItem, formatOptionLabel, imageMaxSize, translations, children, onPrimaryButtonClick,
|
|
4
|
+
({ routes, loader, explicitForm, imageBaseUrl, permissions, preConfirmDelete, formatListItem, formatOptionLabel, imageMaxSize, translations, children, onPrimaryButtonClick, }: WidgetProps): JSX.Element;
|
|
5
5
|
Table: ({ extraActions, extraColumns }: import("../../../types").DerivedTableProps) => JSX.Element;
|
|
6
|
-
Form: ({ formRef, customInputs,
|
|
6
|
+
Form: ({ formRef, customInputs, onPrimaryButtonClick, }: import("../../../types").FormProps) => JSX.Element | null;
|
|
7
7
|
AddButton: () => JSX.Element;
|
|
8
8
|
Search: () => JSX.Element;
|
|
9
9
|
Pagination: () => JSX.Element;
|
|
@@ -2,8 +2,7 @@ import React, { MutableRefObject } from 'react';
|
|
|
2
2
|
import { DropResult } from 'react-beautiful-dnd';
|
|
3
3
|
import { FieldValues, RegisterOptions, UseFormClearErrors, UseFormGetValues, UseFormSetValue, ValidationRule } from 'react-hook-form';
|
|
4
4
|
import { Routes_Input } from './api';
|
|
5
|
-
import { OptionType, FormActionTypes, PermissionsObj, ObjectType,
|
|
6
|
-
import type { CommonTranslationPairs } from './context';
|
|
5
|
+
import { OptionType, FormActionTypes, PermissionsObj, ObjectType, LanguageType } from './common';
|
|
7
6
|
export interface DNDItemsListProps {
|
|
8
7
|
onDragEnd: (result: DropResult) => void;
|
|
9
8
|
items: OptionType[];
|
|
@@ -141,7 +140,6 @@ export interface FormProps {
|
|
|
141
140
|
filterQuery?: string;
|
|
142
141
|
formRef: MutableRefObject<HTMLFormElement | null>;
|
|
143
142
|
customInputs?: Record<string, (props: InputRendererProps) => JSX.Element>;
|
|
144
|
-
customItemRenderers?: Record<string, CustomItemRendererConfig>;
|
|
145
143
|
onPrimaryButtonClick?: (e?: React.MouseEvent<HTMLButtonElement, MouseEvent>, data?: any) => void;
|
|
146
144
|
}
|
|
147
145
|
export interface InputRendererProps {
|
|
@@ -150,27 +148,6 @@ export interface InputRendererProps {
|
|
|
150
148
|
setError: (msg: string) => void;
|
|
151
149
|
disabled?: boolean;
|
|
152
150
|
}
|
|
153
|
-
export interface ItemRendererProps {
|
|
154
|
-
name: string;
|
|
155
|
-
index: number;
|
|
156
|
-
itemType: 'Web' | 'Mobile';
|
|
157
|
-
errors: any;
|
|
158
|
-
control: any;
|
|
159
|
-
register: any;
|
|
160
|
-
setError: any;
|
|
161
|
-
clearError: (key: string) => void;
|
|
162
|
-
languages?: LanguageType[];
|
|
163
|
-
loading?: boolean;
|
|
164
|
-
widgetTranslations: WidgetTranslationPairs;
|
|
165
|
-
commonTranslations: CommonTranslationPairs;
|
|
166
|
-
}
|
|
167
|
-
export interface CustomItemRendererConfig {
|
|
168
|
-
render: (props: ItemRendererProps) => JSX.Element;
|
|
169
|
-
createItem?: (props: {
|
|
170
|
-
index: number;
|
|
171
|
-
itemType: 'Web' | 'Mobile';
|
|
172
|
-
}) => CombineObjectType;
|
|
173
|
-
}
|
|
174
151
|
export interface WidgetTranslationPairs {
|
|
175
152
|
htmlContentRequired: string | ValidationRule<boolean> | undefined;
|
|
176
153
|
htmlContentPlaceholder: string | undefined;
|
|
@@ -247,7 +224,6 @@ export interface WidgetProps {
|
|
|
247
224
|
imageBaseUrl?: string;
|
|
248
225
|
imageMaxSize?: number;
|
|
249
226
|
translations?: WidgetTranslationPairs;
|
|
250
|
-
customItemRenderers?: Record<string, CustomItemRendererConfig>;
|
|
251
227
|
onPrimaryButtonClick?: (e?: React.MouseEvent<HTMLButtonElement, MouseEvent>, data?: any) => void;
|
|
252
228
|
}
|
|
253
229
|
export interface DerivedTableProps {
|
|
@@ -347,7 +323,7 @@ export interface ItemsAccordianProps {
|
|
|
347
323
|
register: any;
|
|
348
324
|
setError: any;
|
|
349
325
|
clearError: (key: string) => void;
|
|
350
|
-
|
|
326
|
+
widgetType?: string;
|
|
351
327
|
}
|
|
352
328
|
export interface TabItemProps {
|
|
353
329
|
showDelete?: boolean;
|