Skip to content

Commit

Permalink
Create a new dist version 2.2.5 (#336)
Browse files Browse the repository at this point in the history
Collecting:
- Cleanup [React] Replace createRef across the code (#333)
- Fix [Labels chip] duplicated id (#334)
- Fix [Feature store, Models] Label editing action issues (#335)
  • Loading branch information
ilan7empest authored Nov 12, 2024
1 parent 16d4694 commit 6e87b83
Show file tree
Hide file tree
Showing 7 changed files with 14 additions and 12 deletions.
6 changes: 4 additions & 2 deletions commit_message
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@


Create a new dist version 2.2.4
Create a new dist version 2.2.5

Collecting:
- Impl [UI] Add retry option for workflows (#331)
- Cleanup [React] Replace createRef across the code (#333)
- Fix [Labels chip] duplicated id (#334)
- Fix [Feature store, Models] Label editing action issues (#335)
9 changes: 5 additions & 4 deletions dist/components/FormChipCell/FormChipCell.js
Original file line number Diff line number Diff line change
Expand Up @@ -122,21 +122,22 @@ const FormChipCell = _ref => {
});
event && event.preventDefault();
}, [editConfig.isEdit, editConfig.chipIndex, showHiddenChips, formState.form.mutators, name, delimiter, setShowHiddenChips]);
const handleRemoveChip = (0, _react.useCallback)((event, fields, chipIndex) => {
const handleRemoveChip = (0, _react.useCallback)(function (event, fields, chipIndex) {
let isOutsideClick = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : false;
checkChipsList(_lodash.default.chain(formState).get(['values', name]).filter((_, index) => index !== chipIndex).value());
fields.remove(chipIndex);
onExitEditModeCallback && onExitEditModeCallback();
event && event.stopPropagation();
event && !isOutsideClick && event.stopPropagation();
}, [checkChipsList, formState, name, onExitEditModeCallback]);
const handleEditChip = (0, _react.useCallback)((event, fields, nameEvent) => {
const handleEditChip = (0, _react.useCallback)((event, fields, nameEvent, isOutsideClick) => {
const {
key,
value
} = fields.value[editConfig.chipIndex];
const isChipNotEmpty = !!(key !== null && key !== void 0 && key.trim() && value !== null && value !== void 0 && value.trim());
if (nameEvent === _constants.CLICK) {
if (!isChipNotEmpty) {
handleRemoveChip(event, fields, editConfig.chipIndex);
handleRemoveChip(event, fields, editConfig.chipIndex, isOutsideClick);
}
setEditConfig({
chipIndex: null,
Expand Down
2 changes: 1 addition & 1 deletion dist/components/FormChipCell/FormChipCellView.js
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,7 @@ const FormChipCellView = /*#__PURE__*/_react.default.forwardRef((_ref, _ref2) =>
chipIndex: index,
chipOptions: chipOptions,
editConfig: editConfig,
handleEditChip: (event, nameEvent) => handleEditChip(event, fields, nameEvent),
handleEditChip: (event, nameEvent, isOutsideClick) => handleEditChip(event, fields, nameEvent, isOutsideClick),
handleRemoveChip: (event, index) => handleRemoveChip(event, fields, index),
handleToEditMode: handleToEditMode,
isEditable: isEditable,
Expand Down
4 changes: 2 additions & 2 deletions dist/components/FormChipCell/NewChipForm/NewChipForm.js
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,7 @@ const NewChipForm = /*#__PURE__*/_react.default.forwardRef((_ref, ref) => {
var _event$path, _event$composedPath;
const elementPath = (_event$path = event.path) !== null && _event$path !== void 0 ? _event$path : (_event$composedPath = event.composedPath) === null || _event$composedPath === void 0 ? void 0 : _event$composedPath.call(event);
if (!elementPath.includes(refInputContainer.current)) {
onChange(event, _constants.CLICK);
onChange(event, _constants.CLICK, true);
window.getSelection().removeAllRanges();
} else {
event.stopPropagation();
Expand Down Expand Up @@ -206,7 +206,7 @@ const NewChipForm = /*#__PURE__*/_react.default.forwardRef((_ref, ref) => {
};
});
}
}, [maxWidthInput, refInputKey, refInputValue, keyName]);
}, [keyName, minWidthInput, maxWidthInput, minWidthValueInput]);
(0, _react.useLayoutEffect)(() => {
if (editConfig.chipIndex === chipIndex) {
setSelectedInput(editConfig.isKeyFocused ? 'key' : editConfig.isValueFocused ? 'value' : null);
Expand Down
1 change: 0 additions & 1 deletion dist/components/FormChipCell/NewChipInput/NewChipInput.js
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,6 @@ const NewChipInput = /*#__PURE__*/_react.default.forwardRef((_ref, ref) => {
"data-testid": "input",
ref: ref,
type: "text",
id: input.name,
...inputProps,
...input,
onChange: handleInputChange,
Expand Down
2 changes: 1 addition & 1 deletion dist/components/FormTextarea/FormTextarea.js
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ const FormTextarea = /*#__PURE__*/_react.default.forwardRef((_ref, ref) => {
} = (0, _reactFinalForm.useField)(name);
const [isInvalid, setIsInvalid] = (0, _react.useState)(false);
const [textAreaCount, setTextAreaCount] = (0, _react.useState)(input.value.length);
const textAreaRef = /*#__PURE__*/_react.default.createRef();
const textAreaRef = (0, _react.useRef)();
const formFieldClassNames = (0, _classnames.default)('form-field-textarea', className);
const labelClassNames = (0, _classnames.default)('form-field__label', disabled && 'form-field__label-disabled');
const textAreaClassNames = (0, _classnames.default)('form-field__wrapper', disabled && 'form-field__wrapper-disabled', isInvalid && 'form-field__wrapper-invalid', withoutBorder && 'without-border');
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "iguazio.dashboard-react-controls",
"version": "2.2.4",
"version": "2.2.5",
"description": "Collection of resources (such as CSS styles, fonts and images) and ReactJS 17.x components to share among different Iguazio React repos.",
"main": "dist/index.js",
"module": "dist/index.js",
Expand Down

0 comments on commit 6e87b83

Please sign in to comment.