Skip to content

Commit

Permalink
Create a new dist version 2.1.5 (#306)
Browse files Browse the repository at this point in the history
Collecting:
- Fix [UI] Deprecated param - Support for defaultProps will be removed (#305)
  • Loading branch information
ilan7empest authored Aug 5, 2024
1 parent 431af87 commit b85e5b7
Show file tree
Hide file tree
Showing 31 changed files with 229 additions and 466 deletions.
5 changes: 2 additions & 3 deletions commit_message
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@


Create a new dist version 2.1.4
Create a new dist version 2.1.5

Collecting:
- Fix [Node Selector] Add validation to key:value as in mlrun (#302)
- Fix [Feature Vectors] Unify the conditions for the 'Tag' field (#301)
- Fix [UI] Deprecated param - Support for defaultProps will be removed (#305)
6 changes: 1 addition & 5 deletions dist/components/Backdrop/Backdrop.js
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ such restriction.
const Backdrop = _ref => {
let {
duration = 300,
show,
show = false,
onClose
} = _ref;
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactTransitionGroup.CSSTransition, {
Expand All @@ -45,10 +45,6 @@ const Backdrop = _ref => {
})
});
};
Backdrop.defaultProps = {
duration: 300,
show: false
};
Backdrop.propTypes = {
show: _propTypes.default.bool.isRequired
};
Expand Down
20 changes: 6 additions & 14 deletions dist/components/Button/Button.js
Original file line number Diff line number Diff line change
Expand Up @@ -35,13 +35,13 @@ such restriction.

const Button = /*#__PURE__*/(0, _react.forwardRef)((_ref, ref) => {
let {
className,
density,
className = '',
density = 'normal',
icon,
id,
label,
tooltip,
variant,
id = 'btn',
label = 'Button',
tooltip = '',
variant = _constants.TERTIARY_BUTTON,
...restProps
} = _ref;
const buttonClassName = (0, _classnames.default)('btn', "btn-".concat(variant), "btn-".concat(density), className);
Expand All @@ -62,14 +62,6 @@ const Button = /*#__PURE__*/(0, _react.forwardRef)((_ref, ref) => {
})]
});
});
Button.defaultProps = {
className: '',
density: 'normal',
id: 'btn',
label: 'Button',
tooltip: '',
variant: _constants.TERTIARY_BUTTON
};
Button.propTypes = {
className: _propTypes.default.string,
density: _propTypes.default.oneOf(['dense', 'normal', 'medium', 'chunky']),
Expand Down
23 changes: 7 additions & 16 deletions dist/components/ConfirmDialog/ConfirmDialog.js
Original file line number Diff line number Diff line change
Expand Up @@ -32,16 +32,16 @@ such restriction.

const ConfirmDialog = _ref => {
let {
cancelButton,
cancelButton = null,
children,
className,
className = '',
closePopUp,
confirmButton,
customPosition,
header,
confirmButton = null,
customPosition = {},
header = '',
isOpen,
message,
messageOnly,
message = '',
messageOnly = false,
onResolve
} = _ref;
const messageClassNames = (0, _classnames.default)('confirm-dialog__message', messageOnly && 'confirm-dialog__message-only');
Expand Down Expand Up @@ -88,15 +88,6 @@ const ConfirmDialog = _ref => {
})
});
};
ConfirmDialog.defaultProps = {
cancelButton: null,
className: '',
confirmButton: null,
customPosition: {},
header: '',
message: '',
messageOnly: false
};
ConfirmDialog.propTypes = {
cancelButton: _types.CONFIRM_DIALOG_CANCEL_BUTTON,
className: _propTypes.default.string,
Expand Down
14 changes: 4 additions & 10 deletions dist/components/FormCheckBox/FormCheckBox.js
Original file line number Diff line number Diff line change
Expand Up @@ -33,11 +33,11 @@ such restriction.
const FormCheckBox = _ref => {
let {
children,
className,
highlightLabel,
label,
className = '',
highlightLabel = false,
label = '',
name,
readOnly,
readOnly = false,
...inputProps
} = _ref;
const formFieldClassNames = (0, _classnames.default)('form-field-checkbox', readOnly && 'form-field-checkbox_readonly', className);
Expand Down Expand Up @@ -73,12 +73,6 @@ const FormCheckBox = _ref => {
}
});
};
FormCheckBox.defaultProps = {
className: '',
highlightLabel: false,
label: '',
readOnly: false
};
FormCheckBox.propTypes = {
className: _propTypes.default.string,
highlightLabel: _propTypes.default.bool,
Expand Down
34 changes: 12 additions & 22 deletions dist/components/FormChipCell/FormChip/FormChip.js
Original file line number Diff line number Diff line change
Expand Up @@ -34,19 +34,25 @@ const FormChip = /*#__PURE__*/_react.default.forwardRef((_ref, ref) => {
let {
chip,
chipIndex,
chipOptions,
chipOptions = {
background: 'purple',
boldValue: false,
borderRadius: 'primary',
borderColor: 'transparent',
density: 'dense',
font: 'purple'
},
editConfig,
handleEditChip,
handleRemoveChip,
handleToEditMode,
isDeleteMode,
isEditable,
keyName,
isEditable = false,
keyName = '',
meta,
setChipsSizes,
setEditConfig,
validationRules,
valueName
validationRules = {},
valueName = ''
} = _ref;
const chipRef = _react.default.useRef();
(0, _react.useEffect)(() => {
Expand Down Expand Up @@ -80,21 +86,6 @@ const FormChip = /*#__PURE__*/_react.default.forwardRef((_ref, ref) => {
})
});
});
FormChip.defaultProps = {
chipOptions: {
background: 'purple',
boldValue: false,
borderRadius: 'primary',
borderColor: 'transparent',
density: 'dense',
font: 'purple'
},
isDeleteMode: false,
isEditable: false,
keyName: '',
validationRules: {},
valueName: ''
};
FormChip.propTypes = {
chip: _propTypes.default.object.isRequired,
chipIndex: _propTypes.default.number.isRequired,
Expand All @@ -103,7 +94,6 @@ FormChip.propTypes = {
handleEditChip: _propTypes.default.func.isRequired,
handleRemoveChip: _propTypes.default.func.isRequired,
handleToEditMode: _propTypes.default.func.isRequired,
isDeleteMode: _propTypes.default.bool,
isEditable: _propTypes.default.bool,
keyName: _propTypes.default.string,
meta: _propTypes.default.object.isRequired,
Expand Down
46 changes: 17 additions & 29 deletions dist/components/FormChipCell/FormChipCell.js
Original file line number Diff line number Diff line change
Expand Up @@ -40,20 +40,27 @@ such restriction.

const FormChipCell = _ref => {
let {
chipOptions,
className,
delimiter,
chipOptions = {
background: 'purple',
boldValue: false,
borderRadius: 'primary',
borderColor: 'transparent',
density: 'dense',
font: 'purple'
},
className = '',
delimiter = null,
formState,
initialValues,
isEditable,
label,
isEditable = false,
label = null,
name,
onClick,
shortChips,
validationRules,
validator,
onClick = () => {},
shortChips = false,
validationRules = {},
validator = null,
onExitEditModeCallback,
visibleChipsMaxLength
visibleChipsMaxLength = null
} = _ref;
const chipsClassName = (0, _classnames.default)('chips', className);
const {
Expand Down Expand Up @@ -314,25 +321,6 @@ const FormChipCell = _ref => {
})]
});
};
FormChipCell.defaultProps = {
chipOptions: {
background: 'purple',
boldValue: false,
borderRadius: 'primary',
borderColor: 'transparent',
density: 'dense',
font: 'purple'
},
className: '',
delimiter: null,
isEditable: false,
label: null,
onClick: () => {},
shortChips: false,
validationRules: {},
validator: null,
visibleChipsMaxLength: null
};
FormChipCell.propTypes = {
chipOptions: _types.CHIP_OPTIONS,
className: _propTypes.default.string,
Expand Down
28 changes: 11 additions & 17 deletions dist/components/FormChipCell/FormChipCellView.js
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,14 @@ such restriction.

const FormChipCellView = /*#__PURE__*/_react.default.forwardRef((_ref, _ref2) => {
let {
chipOptions,
chipOptions = {
background: 'purple',
boldValue: false,
borderRadius: 'primary',
borderColor: 'transparent',
density: 'dense',
font: 'purple'
},
chips,
editConfig,
formState,
Expand All @@ -47,15 +54,15 @@ const FormChipCellView = /*#__PURE__*/_react.default.forwardRef((_ref, _ref2) =>
handleRemoveChip,
handleShowElements,
handleToEditMode,
isEditable,
isEditable = false,
name,
setChipsSizes,
setEditConfig,
shortChips,
shortChips = false,
showChips,
showHiddenChips,
validateFields,
validationRules
validationRules = {}
} = _ref;
let {
chipsCellRef,
Expand Down Expand Up @@ -150,19 +157,6 @@ const FormChipCellView = /*#__PURE__*/_react.default.forwardRef((_ref, _ref2) =>
}
});
});
FormChipCellView.defaultProps = {
chipOptions: {
background: 'purple',
boldValue: false,
borderRadius: 'primary',
borderColor: 'transparent',
density: 'dense',
font: 'purple'
},
isEditable: false,
shortChips: false,
validationRules: {}
};
FormChipCellView.propTypes = {
chipOptions: _types.CHIP_OPTIONS,
chips: _propTypes.default.object.isRequired,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ const HiddenChipsBlock = /*#__PURE__*/_react.default.forwardRef((_ref, _ref2) =>
chipOptions,
chips,
handleShowElements,
textOverflowEllipsis
textOverflowEllipsis = false
} = _ref;
let {
hiddenChipsCounterRef,
Expand Down Expand Up @@ -97,9 +97,6 @@ const HiddenChipsBlock = /*#__PURE__*/_react.default.forwardRef((_ref, _ref2) =>
})
}), document.getElementById('overlay_container'));
});
HiddenChipsBlock.defaultProps = {
textOverflowEllipsis: false
};
HiddenChipsBlock.propTypes = {
chipClassNames: _propTypes.default.string.isRequired,
chipOptions: _types.CHIP_OPTIONS.isRequired,
Expand Down
11 changes: 5 additions & 6 deletions dist/components/FormChipCell/NewChipForm/NewChipForm.js
Original file line number Diff line number Diff line change
Expand Up @@ -37,20 +37,23 @@ under the Apache 2.0 license is conditioned upon your compliance with
such restriction.
*/

const defaultProps = {
rules: {}
};
const NewChipForm = /*#__PURE__*/_react.default.forwardRef((_ref, ref) => {
let {
chip,
chipIndex,
chipOptions,
className,
className = '',
editConfig,
handleRemoveChip,
isEditable,
keyName,
meta,
onChange,
setEditConfig,
validationRules: rules,
validationRules: rules = defaultProps.rules,
valueName
} = _ref;
const [chipData, setChipData] = (0, _react.useState)({
Expand Down Expand Up @@ -282,10 +285,6 @@ const NewChipForm = /*#__PURE__*/_react.default.forwardRef((_ref, ref) => {
})]
});
});
NewChipForm.defaultProps = {
className: '',
validationRules: {}
};
NewChipForm.propTypes = {
chip: _propTypes.default.object.isRequired,
chipIndex: _propTypes.default.number.isRequired,
Expand Down
Loading

0 comments on commit b85e5b7

Please sign in to comment.