@knovator/pagecreator-admin 0.5.3 → 0.5.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 +26 -10
- package/index.css +12 -1
- package/index.js +26 -10
- package/package.json +1 -1
package/index.cjs
CHANGED
|
@@ -1737,7 +1737,8 @@ const TRANSLATION_PAIRS_WIDGET = {
|
|
|
1737
1737
|
'widget.webPerRowRequired': 'Web Per Row is required',
|
|
1738
1738
|
'widget.tabletPerRowRequired': 'Tablet Per Row is required',
|
|
1739
1739
|
'widget.mobilePerRowRequired': 'Mobile Per Row is required',
|
|
1740
|
-
'widget.tabDeleteTitle': 'Are you sure you want to delete this tab?'
|
|
1740
|
+
'widget.tabDeleteTitle': 'Are you sure you want to delete this tab?',
|
|
1741
|
+
'widget.widgetTitleInfo': 'HTML is supported'
|
|
1741
1742
|
};
|
|
1742
1743
|
const TRANSLATION_PAIRS_ITEM = {
|
|
1743
1744
|
'item.title': 'Title',
|
|
@@ -3256,6 +3257,7 @@ const Input$1 = ({
|
|
|
3256
3257
|
onInput,
|
|
3257
3258
|
onBlur,
|
|
3258
3259
|
value,
|
|
3260
|
+
info,
|
|
3259
3261
|
onChange,
|
|
3260
3262
|
wrapperClassName
|
|
3261
3263
|
}) => {
|
|
@@ -3278,7 +3280,9 @@ const Input$1 = ({
|
|
|
3278
3280
|
onBlur: onBlur
|
|
3279
3281
|
})), error && /*#__PURE__*/React__default["default"].createElement("p", {
|
|
3280
3282
|
className: "khb_input-error "
|
|
3281
|
-
}, error)
|
|
3283
|
+
}, error), info && /*#__PURE__*/React__default["default"].createElement("p", {
|
|
3284
|
+
className: "khb_input-info"
|
|
3285
|
+
}, info));
|
|
3282
3286
|
};
|
|
3283
3287
|
|
|
3284
3288
|
const Select = ({
|
|
@@ -3330,7 +3334,8 @@ const CustomReactSelect = ({
|
|
|
3330
3334
|
placeholder,
|
|
3331
3335
|
wrapperClassName,
|
|
3332
3336
|
formatOptionLabel,
|
|
3333
|
-
listCode
|
|
3337
|
+
listCode,
|
|
3338
|
+
customStyles
|
|
3334
3339
|
}) => {
|
|
3335
3340
|
return /*#__PURE__*/React__default["default"].createElement("div", {
|
|
3336
3341
|
className: wrapperClassName
|
|
@@ -3351,7 +3356,8 @@ const CustomReactSelect = ({
|
|
|
3351
3356
|
isLoading: isLoading,
|
|
3352
3357
|
onKeyDown: e => onSearch && onSearch(e.target.value),
|
|
3353
3358
|
placeholder: placeholder,
|
|
3354
|
-
formatOptionLabel: formatOptionLabel ? option => formatOptionLabel(listCode, option) : undefined
|
|
3359
|
+
formatOptionLabel: formatOptionLabel ? option => formatOptionLabel(listCode, option) : undefined,
|
|
3360
|
+
styles: customStyles
|
|
3355
3361
|
}), error && /*#__PURE__*/React__default["default"].createElement("p", {
|
|
3356
3362
|
className: "khb_input-error "
|
|
3357
3363
|
}, error));
|
|
@@ -3889,7 +3895,8 @@ const SimpleForm = /*#__PURE__*/React.forwardRef(({
|
|
|
3889
3895
|
placeholder: schema.placeholder,
|
|
3890
3896
|
wrapperClassName: schema.wrapperClassName,
|
|
3891
3897
|
formatOptionLabel: schema.formatOptionLabel,
|
|
3892
|
-
listCode: schema.listCode
|
|
3898
|
+
listCode: schema.listCode,
|
|
3899
|
+
customStyles: schema.customStyles
|
|
3893
3900
|
});
|
|
3894
3901
|
break;
|
|
3895
3902
|
case 'checkbox':
|
|
@@ -3941,7 +3948,8 @@ const SimpleForm = /*#__PURE__*/React.forwardRef(({
|
|
|
3941
3948
|
disabled: _isUpdating && typeof schema.editable !== 'undefined' && !schema.editable || !_enable,
|
|
3942
3949
|
required: schema.required,
|
|
3943
3950
|
onInput: schema.onInput,
|
|
3944
|
-
wrapperClassName: schema.wrapperClassName
|
|
3951
|
+
wrapperClassName: schema.wrapperClassName,
|
|
3952
|
+
info: schema.info
|
|
3945
3953
|
});
|
|
3946
3954
|
break;
|
|
3947
3955
|
}
|
|
@@ -6187,6 +6195,7 @@ const WidgetContextProvider = ({
|
|
|
6187
6195
|
mobileItems: _mobileItems = [],
|
|
6188
6196
|
itemsLoading: _itemsLoading = false,
|
|
6189
6197
|
onItemFormSubmit: _onItemFormSubmit = () => {},
|
|
6198
|
+
reactSelectStyles: _reactSelectStyles = {},
|
|
6190
6199
|
// other
|
|
6191
6200
|
children
|
|
6192
6201
|
}) => {
|
|
@@ -6215,6 +6224,7 @@ const WidgetContextProvider = ({
|
|
|
6215
6224
|
collectionData: _collectionData,
|
|
6216
6225
|
formatListItem,
|
|
6217
6226
|
formatOptionLabel,
|
|
6227
|
+
reactSelectStyles: _reactSelectStyles,
|
|
6218
6228
|
// Pagination
|
|
6219
6229
|
currentPage: _currentPage,
|
|
6220
6230
|
limits: _limits,
|
|
@@ -6730,6 +6740,7 @@ const Tabs = ({
|
|
|
6730
6740
|
listCode,
|
|
6731
6741
|
formatItem,
|
|
6732
6742
|
deleteTitle,
|
|
6743
|
+
customStyles,
|
|
6733
6744
|
noButtonText,
|
|
6734
6745
|
yesButtonText,
|
|
6735
6746
|
onItemsSearch,
|
|
@@ -6810,6 +6821,7 @@ const Tabs = ({
|
|
|
6810
6821
|
isLoading: isItemsLoading,
|
|
6811
6822
|
placeholder: itemsPlaceholder,
|
|
6812
6823
|
listCode: listCode,
|
|
6824
|
+
customStyles: customStyles,
|
|
6813
6825
|
// wrapperClassName={schema.wrapperClassName}
|
|
6814
6826
|
formatOptionLabel: formatOptionLabel
|
|
6815
6827
|
})
|
|
@@ -6873,7 +6885,8 @@ const WidgetForm = ({
|
|
|
6873
6885
|
collectionData,
|
|
6874
6886
|
collectionDataLoading,
|
|
6875
6887
|
formatListItem,
|
|
6876
|
-
formatOptionLabel
|
|
6888
|
+
formatOptionLabel,
|
|
6889
|
+
reactSelectStyles
|
|
6877
6890
|
} = useWidgetState();
|
|
6878
6891
|
const callerRef = React.useRef(null);
|
|
6879
6892
|
const [webItemsVisible, setWebItemsVisible] = React.useState(false);
|
|
@@ -7055,7 +7068,8 @@ const WidgetForm = ({
|
|
|
7055
7068
|
placeholder: t('widget.widgetTitlePlaceholder'),
|
|
7056
7069
|
validations: {
|
|
7057
7070
|
required: t('widget.widgetTitleRequired')
|
|
7058
|
-
}
|
|
7071
|
+
},
|
|
7072
|
+
info: t('widget.widgetTitleInfo')
|
|
7059
7073
|
}, {
|
|
7060
7074
|
label: `${t('widget.widgetType')}`,
|
|
7061
7075
|
required: true,
|
|
@@ -7135,7 +7149,8 @@ const WidgetForm = ({
|
|
|
7135
7149
|
isLoading: collectionDataLoading,
|
|
7136
7150
|
show: !itemsEnabled && selectedWidgetType !== 'Tabs',
|
|
7137
7151
|
formatOptionLabel: formatOptionLabel,
|
|
7138
|
-
listCode: selectedCollectionType === null || selectedCollectionType === void 0 ? void 0 : selectedCollectionType.value
|
|
7152
|
+
listCode: selectedCollectionType === null || selectedCollectionType === void 0 ? void 0 : selectedCollectionType.value,
|
|
7153
|
+
customStyles: reactSelectStyles || {}
|
|
7139
7154
|
}];
|
|
7140
7155
|
const itemFormSchema = [{
|
|
7141
7156
|
label: `${t('item.title')}`,
|
|
@@ -7227,7 +7242,8 @@ const WidgetForm = ({
|
|
|
7227
7242
|
listCode: (selectedCollectionType === null || selectedCollectionType === void 0 ? void 0 : selectedCollectionType.value) || '',
|
|
7228
7243
|
onCollectionItemsIndexChange: onTabItemsIndexChange,
|
|
7229
7244
|
tabCollectionItems: tabCollectionItems,
|
|
7230
|
-
formatItem: formatListItem
|
|
7245
|
+
formatItem: formatListItem,
|
|
7246
|
+
customStyles: reactSelectStyles || {}
|
|
7231
7247
|
}) : null, !itemsEnabled && selectedWidgetType !== 'Tabs' && /*#__PURE__*/React__default["default"].createElement(DNDItemsList, {
|
|
7232
7248
|
items: selectedCollectionItems,
|
|
7233
7249
|
onDragEnd: onCollectionIndexChange,
|
package/index.css
CHANGED
|
@@ -937,6 +937,10 @@ video {
|
|
|
937
937
|
--tw-text-opacity: 1;
|
|
938
938
|
color: rgb(55 65 81 / var(--tw-text-opacity));
|
|
939
939
|
}
|
|
940
|
+
.text-gray-400 {
|
|
941
|
+
--tw-text-opacity: 1;
|
|
942
|
+
color: rgb(156 163 175 / var(--tw-text-opacity));
|
|
943
|
+
}
|
|
940
944
|
.text-red-600 {
|
|
941
945
|
--tw-text-opacity: 1;
|
|
942
946
|
color: rgb(220 38 38 / var(--tw-text-opacity));
|
|
@@ -1504,6 +1508,13 @@ video {
|
|
|
1504
1508
|
--tw-text-opacity: 1;
|
|
1505
1509
|
color: rgb(107 114 128 / var(--tw-text-opacity));
|
|
1506
1510
|
}
|
|
1511
|
+
.khb_input-info {
|
|
1512
|
+
margin-top: 0.25rem;
|
|
1513
|
+
font-size: 0.875rem;
|
|
1514
|
+
line-height: 1.25rem;
|
|
1515
|
+
--tw-text-opacity: 1;
|
|
1516
|
+
color: rgb(156 163 175 / var(--tw-text-opacity));
|
|
1517
|
+
}
|
|
1507
1518
|
.khb_input-error {
|
|
1508
1519
|
font-size: 0.875rem;
|
|
1509
1520
|
line-height: 1.25rem;
|
|
@@ -1611,7 +1622,7 @@ video {
|
|
|
1611
1622
|
.khb_drawer-container-2 {
|
|
1612
1623
|
position: relative;
|
|
1613
1624
|
width: 100vw;
|
|
1614
|
-
max-width:
|
|
1625
|
+
max-width: 72rem;
|
|
1615
1626
|
}
|
|
1616
1627
|
.khb_drawer-close-section {
|
|
1617
1628
|
position: absolute;
|
package/index.js
CHANGED
|
@@ -1725,7 +1725,8 @@ const TRANSLATION_PAIRS_WIDGET = {
|
|
|
1725
1725
|
'widget.webPerRowRequired': 'Web Per Row is required',
|
|
1726
1726
|
'widget.tabletPerRowRequired': 'Tablet Per Row is required',
|
|
1727
1727
|
'widget.mobilePerRowRequired': 'Mobile Per Row is required',
|
|
1728
|
-
'widget.tabDeleteTitle': 'Are you sure you want to delete this tab?'
|
|
1728
|
+
'widget.tabDeleteTitle': 'Are you sure you want to delete this tab?',
|
|
1729
|
+
'widget.widgetTitleInfo': 'HTML is supported'
|
|
1729
1730
|
};
|
|
1730
1731
|
const TRANSLATION_PAIRS_ITEM = {
|
|
1731
1732
|
'item.title': 'Title',
|
|
@@ -3244,6 +3245,7 @@ const Input$1 = ({
|
|
|
3244
3245
|
onInput,
|
|
3245
3246
|
onBlur,
|
|
3246
3247
|
value,
|
|
3248
|
+
info,
|
|
3247
3249
|
onChange,
|
|
3248
3250
|
wrapperClassName
|
|
3249
3251
|
}) => {
|
|
@@ -3266,7 +3268,9 @@ const Input$1 = ({
|
|
|
3266
3268
|
onBlur: onBlur
|
|
3267
3269
|
})), error && /*#__PURE__*/React.createElement("p", {
|
|
3268
3270
|
className: "khb_input-error "
|
|
3269
|
-
}, error)
|
|
3271
|
+
}, error), info && /*#__PURE__*/React.createElement("p", {
|
|
3272
|
+
className: "khb_input-info"
|
|
3273
|
+
}, info));
|
|
3270
3274
|
};
|
|
3271
3275
|
|
|
3272
3276
|
const Select = ({
|
|
@@ -3318,7 +3322,8 @@ const CustomReactSelect = ({
|
|
|
3318
3322
|
placeholder,
|
|
3319
3323
|
wrapperClassName,
|
|
3320
3324
|
formatOptionLabel,
|
|
3321
|
-
listCode
|
|
3325
|
+
listCode,
|
|
3326
|
+
customStyles
|
|
3322
3327
|
}) => {
|
|
3323
3328
|
return /*#__PURE__*/React.createElement("div", {
|
|
3324
3329
|
className: wrapperClassName
|
|
@@ -3339,7 +3344,8 @@ const CustomReactSelect = ({
|
|
|
3339
3344
|
isLoading: isLoading,
|
|
3340
3345
|
onKeyDown: e => onSearch && onSearch(e.target.value),
|
|
3341
3346
|
placeholder: placeholder,
|
|
3342
|
-
formatOptionLabel: formatOptionLabel ? option => formatOptionLabel(listCode, option) : undefined
|
|
3347
|
+
formatOptionLabel: formatOptionLabel ? option => formatOptionLabel(listCode, option) : undefined,
|
|
3348
|
+
styles: customStyles
|
|
3343
3349
|
}), error && /*#__PURE__*/React.createElement("p", {
|
|
3344
3350
|
className: "khb_input-error "
|
|
3345
3351
|
}, error));
|
|
@@ -3877,7 +3883,8 @@ const SimpleForm = /*#__PURE__*/forwardRef(({
|
|
|
3877
3883
|
placeholder: schema.placeholder,
|
|
3878
3884
|
wrapperClassName: schema.wrapperClassName,
|
|
3879
3885
|
formatOptionLabel: schema.formatOptionLabel,
|
|
3880
|
-
listCode: schema.listCode
|
|
3886
|
+
listCode: schema.listCode,
|
|
3887
|
+
customStyles: schema.customStyles
|
|
3881
3888
|
});
|
|
3882
3889
|
break;
|
|
3883
3890
|
case 'checkbox':
|
|
@@ -3929,7 +3936,8 @@ const SimpleForm = /*#__PURE__*/forwardRef(({
|
|
|
3929
3936
|
disabled: _isUpdating && typeof schema.editable !== 'undefined' && !schema.editable || !_enable,
|
|
3930
3937
|
required: schema.required,
|
|
3931
3938
|
onInput: schema.onInput,
|
|
3932
|
-
wrapperClassName: schema.wrapperClassName
|
|
3939
|
+
wrapperClassName: schema.wrapperClassName,
|
|
3940
|
+
info: schema.info
|
|
3933
3941
|
});
|
|
3934
3942
|
break;
|
|
3935
3943
|
}
|
|
@@ -6175,6 +6183,7 @@ const WidgetContextProvider = ({
|
|
|
6175
6183
|
mobileItems: _mobileItems = [],
|
|
6176
6184
|
itemsLoading: _itemsLoading = false,
|
|
6177
6185
|
onItemFormSubmit: _onItemFormSubmit = () => {},
|
|
6186
|
+
reactSelectStyles: _reactSelectStyles = {},
|
|
6178
6187
|
// other
|
|
6179
6188
|
children
|
|
6180
6189
|
}) => {
|
|
@@ -6203,6 +6212,7 @@ const WidgetContextProvider = ({
|
|
|
6203
6212
|
collectionData: _collectionData,
|
|
6204
6213
|
formatListItem,
|
|
6205
6214
|
formatOptionLabel,
|
|
6215
|
+
reactSelectStyles: _reactSelectStyles,
|
|
6206
6216
|
// Pagination
|
|
6207
6217
|
currentPage: _currentPage,
|
|
6208
6218
|
limits: _limits,
|
|
@@ -6718,6 +6728,7 @@ const Tabs = ({
|
|
|
6718
6728
|
listCode,
|
|
6719
6729
|
formatItem,
|
|
6720
6730
|
deleteTitle,
|
|
6731
|
+
customStyles,
|
|
6721
6732
|
noButtonText,
|
|
6722
6733
|
yesButtonText,
|
|
6723
6734
|
onItemsSearch,
|
|
@@ -6798,6 +6809,7 @@ const Tabs = ({
|
|
|
6798
6809
|
isLoading: isItemsLoading,
|
|
6799
6810
|
placeholder: itemsPlaceholder,
|
|
6800
6811
|
listCode: listCode,
|
|
6812
|
+
customStyles: customStyles,
|
|
6801
6813
|
// wrapperClassName={schema.wrapperClassName}
|
|
6802
6814
|
formatOptionLabel: formatOptionLabel
|
|
6803
6815
|
})
|
|
@@ -6861,7 +6873,8 @@ const WidgetForm = ({
|
|
|
6861
6873
|
collectionData,
|
|
6862
6874
|
collectionDataLoading,
|
|
6863
6875
|
formatListItem,
|
|
6864
|
-
formatOptionLabel
|
|
6876
|
+
formatOptionLabel,
|
|
6877
|
+
reactSelectStyles
|
|
6865
6878
|
} = useWidgetState();
|
|
6866
6879
|
const callerRef = useRef(null);
|
|
6867
6880
|
const [webItemsVisible, setWebItemsVisible] = useState(false);
|
|
@@ -7043,7 +7056,8 @@ const WidgetForm = ({
|
|
|
7043
7056
|
placeholder: t('widget.widgetTitlePlaceholder'),
|
|
7044
7057
|
validations: {
|
|
7045
7058
|
required: t('widget.widgetTitleRequired')
|
|
7046
|
-
}
|
|
7059
|
+
},
|
|
7060
|
+
info: t('widget.widgetTitleInfo')
|
|
7047
7061
|
}, {
|
|
7048
7062
|
label: `${t('widget.widgetType')}`,
|
|
7049
7063
|
required: true,
|
|
@@ -7123,7 +7137,8 @@ const WidgetForm = ({
|
|
|
7123
7137
|
isLoading: collectionDataLoading,
|
|
7124
7138
|
show: !itemsEnabled && selectedWidgetType !== 'Tabs',
|
|
7125
7139
|
formatOptionLabel: formatOptionLabel,
|
|
7126
|
-
listCode: selectedCollectionType === null || selectedCollectionType === void 0 ? void 0 : selectedCollectionType.value
|
|
7140
|
+
listCode: selectedCollectionType === null || selectedCollectionType === void 0 ? void 0 : selectedCollectionType.value,
|
|
7141
|
+
customStyles: reactSelectStyles || {}
|
|
7127
7142
|
}];
|
|
7128
7143
|
const itemFormSchema = [{
|
|
7129
7144
|
label: `${t('item.title')}`,
|
|
@@ -7215,7 +7230,8 @@ const WidgetForm = ({
|
|
|
7215
7230
|
listCode: (selectedCollectionType === null || selectedCollectionType === void 0 ? void 0 : selectedCollectionType.value) || '',
|
|
7216
7231
|
onCollectionItemsIndexChange: onTabItemsIndexChange,
|
|
7217
7232
|
tabCollectionItems: tabCollectionItems,
|
|
7218
|
-
formatItem: formatListItem
|
|
7233
|
+
formatItem: formatListItem,
|
|
7234
|
+
customStyles: reactSelectStyles || {}
|
|
7219
7235
|
}) : null, !itemsEnabled && selectedWidgetType !== 'Tabs' && /*#__PURE__*/React.createElement(DNDItemsList, {
|
|
7220
7236
|
items: selectedCollectionItems,
|
|
7221
7237
|
onDragEnd: onCollectionIndexChange,
|