directual-web-components-v2 3.11.336 → 3.11.337
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/index.js +30 -18
- package/dist/index.js.map +1 -1
- package/dist/index.modern.js +30 -18
- package/dist/index.modern.js.map +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -20070,13 +20070,19 @@ function FpsForm2(props) {
|
|
|
20070
20070
|
setExtendedModel(newExtendedModel);
|
|
20071
20071
|
let saveSate = _extends({}, stateRef.current);
|
|
20072
20072
|
const newModel = _extends({}, flatternModel(_extends({}, gatherDefaults(), _$1__default.get(data, "data[0]"), convertedDates, convertedBools)));
|
|
20073
|
-
if (!_$1__default.isEqual(newModel,
|
|
20073
|
+
if (!_$1__default.isEqual(newModel, originalModelRef.current)) {
|
|
20074
20074
|
submitDebouncedRef.current.cancel();
|
|
20075
|
-
|
|
20076
|
-
|
|
20077
|
-
|
|
20075
|
+
const userChangedFields = Object.keys(model).filter(key => !_$1__default.isEqual(model[key], originalModelRef.current[key]));
|
|
20076
|
+
const mergedModel = _extends({}, newModel);
|
|
20077
|
+
userChangedFields.forEach(key => {
|
|
20078
|
+
mergedModel[key] = model[key];
|
|
20079
|
+
});
|
|
20080
|
+
console.log('[SOCKET MODEL LOG] === СОКЕТ: ОБНОВЛЕНИЕ МОДЕЛИ ===');
|
|
20081
|
+
console.log('[SOCKET MODEL LOG] Серверная модель:', JSON.parse(JSON.stringify(newModel)));
|
|
20082
|
+
console.log('[SOCKET MODEL LOG] Изменённые пользователем поля (сохранены):', userChangedFields);
|
|
20083
|
+
console.log('[SOCKET MODEL LOG] Итоговая модель:', JSON.parse(JSON.stringify(mergedModel)));
|
|
20078
20084
|
isSocketUpdateRef.current = true;
|
|
20079
|
-
setModel(
|
|
20085
|
+
setModel(mergedModel);
|
|
20080
20086
|
setOriginalModel(newModel);
|
|
20081
20087
|
}
|
|
20082
20088
|
setOriginalExtendedModel(newExtendedModel);
|
|
@@ -26697,6 +26703,8 @@ function Comments(props) {
|
|
|
26697
26703
|
handleRoute
|
|
26698
26704
|
} = props;
|
|
26699
26705
|
const lang = locale ? locale.length == 3 ? locale : 'ENG' : 'ENG';
|
|
26706
|
+
const buttonTexts = _$1__default.get(data, "params.buttonTexts") || {};
|
|
26707
|
+
const t = (key, fallback) => buttonTexts[key] || fallback;
|
|
26700
26708
|
const [comments, setComments] = React.useState(_$1__default.get(data, "data") || []);
|
|
26701
26709
|
const [loading, setLoading] = React.useState(false);
|
|
26702
26710
|
const [error, setError] = React.useState('');
|
|
@@ -26749,9 +26757,10 @@ function Comments(props) {
|
|
|
26749
26757
|
return /*#__PURE__*/React__default.createElement("div", {
|
|
26750
26758
|
className: styles$N.comments + " FPS_COMMENTS"
|
|
26751
26759
|
}, /*#__PURE__*/React__default.createElement(CommentsHeader, _extends({
|
|
26752
|
-
header: dict[lang].comments.comments,
|
|
26760
|
+
header: t('headerText', dict[lang].comments.comments),
|
|
26753
26761
|
counter: (comments || []).length
|
|
26754
26762
|
}, props)), allowSend && /*#__PURE__*/React__default.createElement(AddComment, _extends({}, props, {
|
|
26763
|
+
t: t,
|
|
26755
26764
|
lang: lang,
|
|
26756
26765
|
loading: loading,
|
|
26757
26766
|
sendComment: sendComment,
|
|
@@ -26763,6 +26772,7 @@ function Comments(props) {
|
|
|
26763
26772
|
}, error), /*#__PURE__*/React__default.createElement("div", {
|
|
26764
26773
|
className: styles$N.commentsList
|
|
26765
26774
|
}, comments.filter(comment => !_$1__default.get(comment, _$1__default.get(data, "params._replyField")) || _$1__default.get(comment, _$1__default.get(data, "params._replyField")) == 'root').map(comment => /*#__PURE__*/React__default.createElement(Comment, _extends({}, props, {
|
|
26775
|
+
t: t,
|
|
26766
26776
|
sendComment: sendComment,
|
|
26767
26777
|
updateCommentText: updateCommentText,
|
|
26768
26778
|
lang: lang,
|
|
@@ -26786,7 +26796,8 @@ function Comment(props) {
|
|
|
26786
26796
|
allowSend,
|
|
26787
26797
|
allowEdit,
|
|
26788
26798
|
sendComment,
|
|
26789
|
-
updateCommentText
|
|
26799
|
+
updateCommentText,
|
|
26800
|
+
t
|
|
26790
26801
|
} = props;
|
|
26791
26802
|
const [addReply, setAddReply] = React.useState(false);
|
|
26792
26803
|
const [isEditing, setIsEditing] = React.useState(false);
|
|
@@ -26866,13 +26877,13 @@ function Comment(props) {
|
|
|
26866
26877
|
className: styles$N.commentWrapperAssignTo + " " + (isResoled ? styles$N.taskResolved : "") + " FPS_COMMENT_WRAPPER__ASSIGN"
|
|
26867
26878
|
}, isAssignedToMe ? /*#__PURE__*/React__default.createElement("span", null, dict[lang].comments.assignedToMe) : /*#__PURE__*/React__default.createElement("span", null, dict[lang].comments.assignedTo, " ", /*#__PURE__*/React__default.createElement("b", null, assigneName)), isResoled ? /*#__PURE__*/React__default.createElement("span", {
|
|
26868
26879
|
className: "icon icon-done"
|
|
26869
|
-
}, dict[lang].comments.taskResolved, " ", formatDate(resolvedDate, formatResolvedDate)) : isAssignedToMe ? /*#__PURE__*/React__default.createElement(Button, {
|
|
26880
|
+
}, t('taskResolvedText', dict[lang].comments.taskResolved), " ", formatDate(resolvedDate, formatResolvedDate)) : isAssignedToMe ? /*#__PURE__*/React__default.createElement(Button, {
|
|
26870
26881
|
loading: localLoading,
|
|
26871
26882
|
onClick: resolveTask,
|
|
26872
26883
|
small: true,
|
|
26873
26884
|
height: 32,
|
|
26874
26885
|
icon: "done"
|
|
26875
|
-
}, dict[lang].comments.resolveTask) : ''), /*#__PURE__*/React__default.createElement("div", {
|
|
26886
|
+
}, t('resolveTaskText', dict[lang].comments.resolveTask)) : ''), /*#__PURE__*/React__default.createElement("div", {
|
|
26876
26887
|
className: styles$N.commentBody
|
|
26877
26888
|
}, parent && /*#__PURE__*/React__default.createElement("div", {
|
|
26878
26889
|
className: styles$N.commentParent + " icon icon-arrowRight small"
|
|
@@ -26910,11 +26921,11 @@ function Comment(props) {
|
|
|
26910
26921
|
height: 32,
|
|
26911
26922
|
accent: true,
|
|
26912
26923
|
disabled: !editText
|
|
26913
|
-
}, dict[lang].comments.save), /*#__PURE__*/React__default.createElement(Button, {
|
|
26924
|
+
}, t('saveText', dict[lang].comments.save)), /*#__PURE__*/React__default.createElement(Button, {
|
|
26914
26925
|
onClick: cancelEdit,
|
|
26915
26926
|
small: true,
|
|
26916
26927
|
height: 32
|
|
26917
|
-
}, dict[lang].comments.cancel))) : /*#__PURE__*/React__default.createElement("div", {
|
|
26928
|
+
}, t('cancelText', dict[lang].comments.cancel)))) : /*#__PURE__*/React__default.createElement("div", {
|
|
26918
26929
|
className: styles$N.commentBodyText
|
|
26919
26930
|
}, commentText), commentAttachment && commentAttachment.length > 0 && commentAttachment.map(file => {
|
|
26920
26931
|
const fileName = file.split("/")[file.split("/").length - 1];
|
|
@@ -26930,10 +26941,10 @@ function Comment(props) {
|
|
|
26930
26941
|
}, _$1__default.includes(data.writeFields, _$1__default.get(data, "params._replyField")) && allowSend && /*#__PURE__*/React__default.createElement("div", {
|
|
26931
26942
|
onClick: e => setAddReply(true),
|
|
26932
26943
|
className: "icon icon-bubble small " + styles$N.commentReplyButton
|
|
26933
|
-
}, dict[lang].comments.reply), allowEdit && isAuthor && /*#__PURE__*/React__default.createElement("div", {
|
|
26944
|
+
}, t('replyText', dict[lang].comments.reply)), allowEdit && isAuthor && /*#__PURE__*/React__default.createElement("div", {
|
|
26934
26945
|
onClick: e => setIsEditing(true),
|
|
26935
26946
|
className: "icon icon-edit small " + styles$N.commentReplyButton
|
|
26936
|
-
}, dict[lang].comments.edit)))), addReply && /*#__PURE__*/React__default.createElement("div", {
|
|
26947
|
+
}, t('editText', dict[lang].comments.edit))))), addReply && /*#__PURE__*/React__default.createElement("div", {
|
|
26937
26948
|
className: styles$N.childComments
|
|
26938
26949
|
}, /*#__PURE__*/React__default.createElement(AddComment, _extends({}, props, {
|
|
26939
26950
|
parentID: commentID,
|
|
@@ -26971,7 +26982,8 @@ function AddComment(props) {
|
|
|
26971
26982
|
sendComment,
|
|
26972
26983
|
parentID,
|
|
26973
26984
|
data,
|
|
26974
|
-
loading
|
|
26985
|
+
loading,
|
|
26986
|
+
t
|
|
26975
26987
|
} = props;
|
|
26976
26988
|
const rolesExample = [{
|
|
26977
26989
|
key: 'admin',
|
|
@@ -27013,7 +27025,7 @@ function AddComment(props) {
|
|
|
27013
27025
|
bottom: 0
|
|
27014
27026
|
},
|
|
27015
27027
|
ok: true
|
|
27016
|
-
}, dict[lang].comments.submitted);
|
|
27028
|
+
}, t('submittedText', dict[lang].comments.submitted));
|
|
27017
27029
|
return /*#__PURE__*/React__default.createElement("div", {
|
|
27018
27030
|
className: styles$N.commentsAdd
|
|
27019
27031
|
}, /*#__PURE__*/React__default.createElement(Input, {
|
|
@@ -27022,7 +27034,7 @@ function AddComment(props) {
|
|
|
27022
27034
|
defaultValue: comment[_$1__default.get(data, "params._textField")],
|
|
27023
27035
|
onChange: setCommentField(_$1__default.get(data, "params._textField")),
|
|
27024
27036
|
rows: "auto",
|
|
27025
|
-
placeholder: dict[lang].comments.write
|
|
27037
|
+
placeholder: t('placeholderText', dict[lang].comments.write)
|
|
27026
27038
|
}), /*#__PURE__*/React__default.createElement("div", {
|
|
27027
27039
|
className: styles$N.commentsAdditionslControls
|
|
27028
27040
|
}, addFile && allowAttachment && /*#__PURE__*/React__default.createElement(FileUpload, {
|
|
@@ -27104,9 +27116,9 @@ function AddComment(props) {
|
|
|
27104
27116
|
accent: true,
|
|
27105
27117
|
icon: "bubble",
|
|
27106
27118
|
onClick: () => sendComment(comment, finish)
|
|
27107
|
-
}, dict[lang].comments.send), onCancel && /*#__PURE__*/React__default.createElement(Button, {
|
|
27119
|
+
}, t('sendText', dict[lang].comments.send)), onCancel && /*#__PURE__*/React__default.createElement(Button, {
|
|
27108
27120
|
onClick: onCancel
|
|
27109
|
-
}, dict[lang].comments.cancel)));
|
|
27121
|
+
}, t('cancelText', dict[lang].comments.cancel))));
|
|
27110
27122
|
}
|
|
27111
27123
|
Comments.propTypes = {
|
|
27112
27124
|
data: propTypes.object,
|