@vitrosoftware/common-ui-ts 1.1.47 → 1.1.49
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.css
CHANGED
package/dist/index.js
CHANGED
|
@@ -59648,7 +59648,7 @@ var UpdatingPopover = React__default.forwardRef(function (_ref, ref) {
|
|
|
59648
59648
|
}, props), children));
|
|
59649
59649
|
});
|
|
59650
59650
|
|
|
59651
|
-
var styles$8 = {"vitro-info-container":"_action-handler-info_vitro-info-container_eNvJr3n","vitro-action-info":"_action-handler-info_vitro-action-info_40N4L4N","vitro-item
|
|
59651
|
+
var styles$8 = {"vitro-info-container":"_action-handler-info_vitro-info-container_eNvJr3n","vitro-action-info":"_action-handler-info_vitro-action-info_40N4L4N","vitro-item":"_action-handler-info_vitro-item_2pXL5Ks","vitro-title":"_action-handler-info_vitro-title_kdIhxqv","vitro-subtitle":"_action-handler-info_vitro-subtitle_29cfoD0","vitro-progress-bar":"_action-handler-info_vitro-progress-bar_2IxowO0","vitro-button-cancel":"_action-handler-info_vitro-button-cancel_3eqrIKx","vitro-success":"_action-handler-info_vitro-success_22wks7Q","vitro-progress":"_action-handler-info_vitro-progress_1pVf3VJ","vitro-error":"_action-handler-info_vitro-error_2JNd137","vitro-status":"_action-handler-info_vitro-status_3Ey3f6C"};
|
|
59652
59652
|
|
|
59653
59653
|
var ActionInfoItem = function ActionInfoItem(props) {
|
|
59654
59654
|
var getClassName = function getClassName() {
|
|
@@ -59714,11 +59714,6 @@ var ActionHandlerConstants = {
|
|
|
59714
59714
|
get TRIGGER () { return TRIGGER; }
|
|
59715
59715
|
};
|
|
59716
59716
|
|
|
59717
|
-
var actionMap = {
|
|
59718
|
-
before: 0,
|
|
59719
|
-
progress: 1,
|
|
59720
|
-
after: 2
|
|
59721
|
-
};
|
|
59722
59717
|
var ActionInfo = function ActionInfo(props) {
|
|
59723
59718
|
var localeService = inversifyReact.useInjection(SERVICE.LOCALE);
|
|
59724
59719
|
var getInfo = function getInfo(item) {
|
|
@@ -59755,32 +59750,9 @@ var ActionInfo = function ActionInfo(props) {
|
|
|
59755
59750
|
}
|
|
59756
59751
|
return info;
|
|
59757
59752
|
};
|
|
59758
|
-
var getText = function getText() {
|
|
59759
|
-
var successCount = props.successResult ? props.successResult.length : 0;
|
|
59760
|
-
if (props.action === actionMap.progress) {
|
|
59761
|
-
return localeService.create(LOCALE$1.PROGRESS_STD, {
|
|
59762
|
-
actionCode: localeService.create(LOCALE$1.ACTION + CTRL.DOT + props.actionCode)
|
|
59763
|
-
});
|
|
59764
|
-
}
|
|
59765
|
-
if (props.action === actionMap.after) {
|
|
59766
|
-
if (props.isSuccess) {
|
|
59767
|
-
return localeService.create(LOCALE$1.SUCCESS_STD, {
|
|
59768
|
-
count: successCount,
|
|
59769
|
-
actionCode: localeService.create(LOCALE$1.ACTION + CTRL.DOT + props.actionCode)
|
|
59770
|
-
});
|
|
59771
|
-
} else {
|
|
59772
|
-
return localeService.create(LOCALE$1.ERROR_STD, {
|
|
59773
|
-
actionCode: localeService.create(LOCALE$1.ACTION + CTRL.DOT + props.actionCode)
|
|
59774
|
-
});
|
|
59775
|
-
}
|
|
59776
|
-
}
|
|
59777
|
-
return CTRL.EMPTY;
|
|
59778
|
-
};
|
|
59779
59753
|
return React__default.createElement("div", {
|
|
59780
59754
|
className: styles$8['vitro-info-container']
|
|
59781
59755
|
}, React__default.createElement("div", {
|
|
59782
|
-
className: styles$8['vitro-action-info']
|
|
59783
|
-
}, getText()), React__default.createElement("div", {
|
|
59784
59756
|
className: styles$8['vitro-item-container']
|
|
59785
59757
|
}, props.itemList.map(function (item) {
|
|
59786
59758
|
return React__default.createElement(ActionInfoItem, {
|
|
@@ -59791,7 +59763,7 @@ var ActionInfo = function ActionInfo(props) {
|
|
|
59791
59763
|
})));
|
|
59792
59764
|
};
|
|
59793
59765
|
|
|
59794
|
-
var actionMap
|
|
59766
|
+
var actionMap = {
|
|
59795
59767
|
before: 0,
|
|
59796
59768
|
progress: 1,
|
|
59797
59769
|
after: 2
|
|
@@ -59816,7 +59788,7 @@ var ActionHandler = function ActionHandler(props) {
|
|
|
59816
59788
|
var _useState6 = React.useState(false),
|
|
59817
59789
|
blockInterface = _useState6[0],
|
|
59818
59790
|
setBlockInterface = _useState6[1];
|
|
59819
|
-
var _useState7 = React.useState(actionMap
|
|
59791
|
+
var _useState7 = React.useState(actionMap.before),
|
|
59820
59792
|
currentAction = _useState7[0],
|
|
59821
59793
|
setCurrentAction = _useState7[1];
|
|
59822
59794
|
var _useState8 = React.useState(null),
|
|
@@ -59856,19 +59828,19 @@ var ActionHandler = function ActionHandler(props) {
|
|
|
59856
59828
|
var localeService = inversifyReact.useInjection(SERVICE.LOCALE);
|
|
59857
59829
|
var action = props.actionText || localeService.create(LOCALE$1.ACTION + CTRL.DOT + props.actionCode);
|
|
59858
59830
|
React.useEffect(function () {
|
|
59859
|
-
setIsCloseEnabled(currentAction !== actionMap
|
|
59860
|
-
if (currentAction === actionMap
|
|
59831
|
+
setIsCloseEnabled(currentAction !== actionMap.progress);
|
|
59832
|
+
if (currentAction === actionMap.before) {
|
|
59861
59833
|
setState(styles$7['vitro-confirm']);
|
|
59862
59834
|
setShowItemCount(true);
|
|
59863
59835
|
setIcon(styles$7['vitro-icon-before']);
|
|
59864
59836
|
}
|
|
59865
|
-
if (currentAction === actionMap
|
|
59837
|
+
if (currentAction === actionMap.progress) {
|
|
59866
59838
|
setState(CTRL.EMPTY);
|
|
59867
59839
|
setShowProgressBar(!props.isHideProgressBar);
|
|
59868
59840
|
setShowItemCount(false);
|
|
59869
59841
|
setIcon(styles$7['vitro-icon-progress']);
|
|
59870
59842
|
}
|
|
59871
|
-
if (currentAction !== actionMap
|
|
59843
|
+
if (currentAction !== actionMap.progress) {
|
|
59872
59844
|
setShowProgressBar(false);
|
|
59873
59845
|
}
|
|
59874
59846
|
}, [currentAction]);
|
|
@@ -59917,14 +59889,14 @@ var ActionHandler = function ActionHandler(props) {
|
|
|
59917
59889
|
}
|
|
59918
59890
|
setText(confText + CTRL.QUESTION);
|
|
59919
59891
|
}
|
|
59920
|
-
setCurrentAction(actionMap
|
|
59892
|
+
setCurrentAction(actionMap.before);
|
|
59921
59893
|
};
|
|
59922
59894
|
var finish = function finish(success, error, successResult, failResult) {
|
|
59923
59895
|
if (failResult.length) {
|
|
59924
59896
|
setShow(true);
|
|
59925
59897
|
}
|
|
59926
59898
|
setSuccess(success);
|
|
59927
|
-
setCurrentAction(actionMap
|
|
59899
|
+
setCurrentAction(actionMap.after);
|
|
59928
59900
|
if (props.onAfterAction) {
|
|
59929
59901
|
props.onAfterAction(error, successResult, failResult);
|
|
59930
59902
|
}
|
|
@@ -60021,7 +59993,7 @@ var ActionHandler = function ActionHandler(props) {
|
|
|
60021
59993
|
}
|
|
60022
59994
|
}
|
|
60023
59995
|
;
|
|
60024
|
-
setCurrentAction(actionMap
|
|
59996
|
+
setCurrentAction(actionMap.progress);
|
|
60025
59997
|
if (props.isBlockInterface) {
|
|
60026
59998
|
setBlockInterface(true);
|
|
60027
59999
|
}
|
|
@@ -60152,7 +60124,7 @@ var ActionHandler = function ActionHandler(props) {
|
|
|
60152
60124
|
if (!props.isShowProgress && !props.isShowAfterAction && !props.isConfirm) {
|
|
60153
60125
|
window.document.body.click();
|
|
60154
60126
|
}
|
|
60155
|
-
if (currentAction !== actionMap
|
|
60127
|
+
if (currentAction !== actionMap.progress) {
|
|
60156
60128
|
init();
|
|
60157
60129
|
}
|
|
60158
60130
|
if (!props.isConfirm) {
|
|
@@ -60160,7 +60132,7 @@ var ActionHandler = function ActionHandler(props) {
|
|
|
60160
60132
|
}
|
|
60161
60133
|
};
|
|
60162
60134
|
var onEscClick = function onEscClick(e) {
|
|
60163
|
-
if (e.keyCode === ESC_KEY_CODE && currentAction === actionMap
|
|
60135
|
+
if (e.keyCode === ESC_KEY_CODE && currentAction === actionMap.before) {
|
|
60164
60136
|
hideDialog();
|
|
60165
60137
|
}
|
|
60166
60138
|
};
|
|
@@ -60170,12 +60142,12 @@ var ActionHandler = function ActionHandler(props) {
|
|
|
60170
60142
|
};
|
|
60171
60143
|
var close = function close(error, successResult, failResult) {
|
|
60172
60144
|
if (isCloseEnabled) {
|
|
60173
|
-
if (currentAction == actionMap
|
|
60145
|
+
if (currentAction == actionMap.after && props.onAfterActionClose) {
|
|
60174
60146
|
props.onAfterActionClose(error, successResult, failResult);
|
|
60175
60147
|
}
|
|
60176
60148
|
hideDialog();
|
|
60177
60149
|
}
|
|
60178
|
-
if (currentAction === actionMap
|
|
60150
|
+
if (currentAction === actionMap.progress) {
|
|
60179
60151
|
cancellationToken.cancel = true;
|
|
60180
60152
|
}
|
|
60181
60153
|
};
|
|
@@ -60189,8 +60161,8 @@ var ActionHandler = function ActionHandler(props) {
|
|
|
60189
60161
|
itemCount: data.itemCount
|
|
60190
60162
|
});
|
|
60191
60163
|
};
|
|
60192
|
-
var showConfirmButtonGroup = props.isConfirm && currentAction === actionMap
|
|
60193
|
-
var showCloseButtonGroup = currentAction !== actionMap
|
|
60164
|
+
var showConfirmButtonGroup = props.isConfirm && currentAction === actionMap.before;
|
|
60165
|
+
var showCloseButtonGroup = currentAction !== actionMap.before;
|
|
60194
60166
|
var positionCenter = !props.target && !props.children;
|
|
60195
60167
|
var content = React__default.createElement("div", {
|
|
60196
60168
|
className: styles$7['vitro-content'] + CTRL.SPACE + state
|
|
@@ -60205,7 +60177,7 @@ var ActionHandler = function ActionHandler(props) {
|
|
|
60205
60177
|
onClick: function onClick() {
|
|
60206
60178
|
return setShowInfo(!showInfo);
|
|
60207
60179
|
}
|
|
60208
|
-
}), currentAction != actionMap
|
|
60180
|
+
}), currentAction != actionMap.before && React__default.createElement("div", {
|
|
60209
60181
|
className: styles$7['vitro-button-close'],
|
|
60210
60182
|
onClick: close
|
|
60211
60183
|
}))), showItemCount && React__default.createElement("span", {
|
|
@@ -60230,7 +60202,7 @@ var ActionHandler = function ActionHandler(props) {
|
|
|
60230
60202
|
}), React__default.createElement(Button$2, {
|
|
60231
60203
|
onClick: onStart,
|
|
60232
60204
|
text: action || props.labelYes || CTRL.EMPTY,
|
|
60233
|
-
isDisabled: currentAction !== actionMap
|
|
60205
|
+
isDisabled: currentAction !== actionMap.before,
|
|
60234
60206
|
className: styles$7['vitro-button']
|
|
60235
60207
|
})));
|
|
60236
60208
|
return React__default.createElement(React__default.Fragment, null, props.children && React__default.createElement(OverlayTrigger, {
|
|
@@ -60246,7 +60218,7 @@ var ActionHandler = function ActionHandler(props) {
|
|
|
60246
60218
|
onHide: close,
|
|
60247
60219
|
placement: props.placement || PLACEMENT.TOP
|
|
60248
60220
|
}, React__default.createElement(UpdatingPopover, null, content)), positionCenter && show && React__default.createElement("div", {
|
|
60249
|
-
className: currentAction === actionMap
|
|
60221
|
+
className: currentAction === actionMap.before ? styles$7['vitro-action-handler-dialog-confirm'] : styles$7['vitro-action-handler-dialog']
|
|
60250
60222
|
}, content), blockInterface && React__default.createElement("div", {
|
|
60251
60223
|
className: styles$7['vitro-interface-blur']
|
|
60252
60224
|
}));
|
|
@@ -61622,6 +61594,7 @@ var LookupPicker = function LookupPicker(props) {
|
|
|
61622
61594
|
state = _useState7[0],
|
|
61623
61595
|
setState = _useState7[1];
|
|
61624
61596
|
var localeService = inversifyReact.useInjection(SERVICE.LOCALE);
|
|
61597
|
+
var isEditable = !props.isDisabled && !props.isReadOnly;
|
|
61625
61598
|
var inputRef = React.useRef(null);
|
|
61626
61599
|
var updatePending = function updatePending(valueList) {
|
|
61627
61600
|
return setPending(valueList ? false : true);
|
|
@@ -61798,7 +61771,9 @@ var LookupPicker = function LookupPicker(props) {
|
|
|
61798
61771
|
}
|
|
61799
61772
|
};
|
|
61800
61773
|
var copyValue = function copyValue() {
|
|
61801
|
-
navigator.clipboard.writeText(selectedValueList.
|
|
61774
|
+
navigator.clipboard.writeText(selectedValueList.map(function (x) {
|
|
61775
|
+
return props.selectedValueTemplate(x);
|
|
61776
|
+
}).join(CTRL.COMMA));
|
|
61802
61777
|
};
|
|
61803
61778
|
var getClassName = function getClassName() {
|
|
61804
61779
|
var classList = [styles$q['vitro-lookup-picker'], props.className];
|
|
@@ -61835,17 +61810,15 @@ var LookupPicker = function LookupPicker(props) {
|
|
|
61835
61810
|
selectedValueTemplate: selectedValueTemplate,
|
|
61836
61811
|
isMultiSelect: props.isMultiSelect,
|
|
61837
61812
|
getHtmlValue: getHtmlValue
|
|
61838
|
-
}) : !valueListVisible && React__default.createElement(React__default.Fragment, null, props.placeholder),
|
|
61813
|
+
}) : !valueListVisible && React__default.createElement(React__default.Fragment, null, props.placeholder), isEditable && React__default.createElement("input", {
|
|
61839
61814
|
ref: inputRef,
|
|
61840
61815
|
value: inputValue,
|
|
61841
61816
|
onKeyDown: onKeyDown,
|
|
61842
61817
|
onChange: onChange,
|
|
61843
|
-
onClick: onFocus
|
|
61844
|
-
disabled: props.isDisabled,
|
|
61845
|
-
readOnly: props.isReadOnly
|
|
61818
|
+
onClick: onFocus
|
|
61846
61819
|
}), !props.isDisabled && props.children, React__default.createElement("div", {
|
|
61847
61820
|
className: styles$q['vitro-right']
|
|
61848
|
-
}, !props.isMultiSelect && selectedValueList && selectedValueList.length > 0 &&
|
|
61821
|
+
}, !props.isMultiSelect && selectedValueList && selectedValueList.length > 0 && isEditable && React__default.createElement("div", {
|
|
61849
61822
|
className: styles$q['vitro-button-close'],
|
|
61850
61823
|
onClick: function onClick() {
|
|
61851
61824
|
return onOptionValueDelete();
|
|
@@ -61858,7 +61831,7 @@ var LookupPicker = function LookupPicker(props) {
|
|
|
61858
61831
|
}), props.isReadOnly ? React__default.createElement("span", {
|
|
61859
61832
|
className: styles$q['vitro-button-copy'],
|
|
61860
61833
|
onClick: copyValue
|
|
61861
|
-
}) : null)),
|
|
61834
|
+
}) : null)), isEditable && (!props.filterMinLength || props.filterMinLength <= inputValue.length) && React__default.createElement(ValueList, {
|
|
61862
61835
|
isPending: pending,
|
|
61863
61836
|
inputValue: inputValue,
|
|
61864
61837
|
list: filteredValueList,
|
|
@@ -64934,7 +64907,7 @@ var CheckboxList = function CheckboxList(props) {
|
|
|
64934
64907
|
};
|
|
64935
64908
|
|
|
64936
64909
|
var ESC_KEY_CODE$1 = 27;
|
|
64937
|
-
var
|
|
64910
|
+
var CONDITION_CONTAINS = 11;
|
|
64938
64911
|
var Search = function Search(props) {
|
|
64939
64912
|
var _useState = React.useState(false),
|
|
64940
64913
|
isShowDialog = _useState[0],
|
|
@@ -65058,8 +65031,8 @@ var Search = function Search(props) {
|
|
|
65058
65031
|
};
|
|
65059
65032
|
var onInputChange = function onInputChange(value) {
|
|
65060
65033
|
var criterion = {
|
|
65061
|
-
condition:
|
|
65062
|
-
operator:
|
|
65034
|
+
condition: CONDITION_CONTAINS,
|
|
65035
|
+
operator: 0,
|
|
65063
65036
|
internalName: props.defaultSearchFieldName,
|
|
65064
65037
|
valueList: [value]
|
|
65065
65038
|
};
|