Skip to content

Commit

Permalink
chore(release): 3.93.0 [skip ci]
Browse files Browse the repository at this point in the history
# [3.93.0](v3.92.2...v3.93.0) (2023-10-25)

### Features

* **cleave:** modify value isNaN check ([#214](#214)) ([88c45a1](88c45a1))
* **multiSelect:** require flag to remove invalid values ([#211](#211)) ([8e122a1](8e122a1))
  • Loading branch information
semantic-release-bot committed Oct 25, 2023
1 parent 88c45a1 commit d2e97a0
Show file tree
Hide file tree
Showing 6 changed files with 21 additions and 10 deletions.
8 changes: 8 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,11 @@
# [3.93.0](https://github.com/ClearC2/grid-form-builder/compare/v3.92.2...v3.93.0) (2023-10-25)


### Features

* **cleave:** modify value isNaN check ([#214](https://github.com/ClearC2/grid-form-builder/issues/214)) ([88c45a1](https://github.com/ClearC2/grid-form-builder/commit/88c45a15ef7da41c0899da519efce0d983a8da48))
* **multiSelect:** require flag to remove invalid values ([#211](https://github.com/ClearC2/grid-form-builder/issues/211)) ([8e122a1](https://github.com/ClearC2/grid-form-builder/commit/8e122a127e4ae527069a2b0f3bc85e25a01f9cc5))

## [3.92.2](https://github.com/ClearC2/grid-form-builder/compare/v3.92.1...v3.92.2) (2023-10-09)


Expand Down
2 changes: 1 addition & 1 deletion dist/cjs/Cleave/Cleave.js
Original file line number Diff line number Diff line change
Expand Up @@ -301,7 +301,7 @@ var Cleave = /*#__PURE__*/function (_Component) {
// This mostly because we need to show user the native input placeholder
if (pps.prefix && pps.noImmediatePrefix && value.length === 0) {
pps.result = '';
} else if (readOnly || disabled && isNaN(Number(value))) {
} else if ((readOnly || disabled) && isNaN(Number(value))) {
pps.result = value;
return _this.updateValueState(false);
} else {
Expand Down
11 changes: 7 additions & 4 deletions dist/cjs/Inputs/Multiselect.js
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,8 @@ var Multiselect = function Multiselect(props) {
searchable = _props$searchable === void 0 ? false : _props$searchable,
_props$closeMenuOnSel = props.closeMenuOnSelect,
closeMenuOnSelect = _props$closeMenuOnSel === void 0 ? true : _props$closeMenuOnSel,
warning = props.warning;
warning = props.warning,
showValidOptions = props.showValidOptions;

var _style$value = style.value,
valueStyle = _style$value === void 0 ? {} : _style$value,
Expand Down Expand Up @@ -267,9 +268,10 @@ var Multiselect = function Multiselect(props) {
value: value,
delimit: delimit,
delimiter: delimiter,
options: options
options: options,
showValidOptions: showValidOptions
}));
}, [value, updateSelectValue, name, delimit, delimiter, stringify, options]);
}, [value, updateSelectValue, name, delimit, delimiter, stringify, options, showValidOptions]);
var handleChange = (0, _react.useCallback)(function (val) {
onChange({
target: {
Expand Down Expand Up @@ -443,5 +445,6 @@ Multiselect.propTypes = {
isClearable: _propTypes.default.bool,
searchable: _propTypes.default.bool,
closeMenuOnSelect: _propTypes.default.bool,
warning: _propTypes.default.string
warning: _propTypes.default.string,
showValidOptions: _propTypes.default.bool
};
6 changes: 4 additions & 2 deletions dist/cjs/utils.js
Original file line number Diff line number Diff line change
Expand Up @@ -191,7 +191,8 @@ var convertDelimitedValueIntoLabelValueArray = function convertDelimitedValueInt
var delimit = _ref.delimit,
delimiter = _ref.delimiter,
value = _ref.value,
options = _ref.options;
options = _ref.options,
showValidOptions = _ref.showValidOptions;
if (!delimit) delimit = [];
if (delimit && typeof delimit === 'string') delimit = [delimit];
delimit = delimit.length ? delimit : ['label', 'value'];
Expand Down Expand Up @@ -251,9 +252,10 @@ var convertDelimitedValueIntoLabelValueArray = function convertDelimitedValueInt
}
});

if (formattedOptions.length) {
if (formattedOptions.length && showValidOptions) {
// if we were provided options we are going to try to match the values up with what options we have available
// a consequence of doing this is that we will lose any value that is not a valid option - JRA 02/07/2020
// Update: showing invalid options as a default, schemas need to specify if they want to show valid options only via showValidOptions in config = AHP 10/5/2023
var optionEquivalents = [];
(0, _forEach.default)(values).call(values, function (value) {
if (value.toJS) value = value.toJS();
Expand Down
2 changes: 0 additions & 2 deletions dist/es/Cleave/Cleave.js
Original file line number Diff line number Diff line change
Expand Up @@ -161,7 +161,6 @@ var Cleave = /*#__PURE__*/function (_Component) {

_defineProperty(_assertThisInitialized(_this), "getRawValue", function () {
var pps = _this.properties;
console.log(pps);
var rawValue = pps.result;

if (pps.rawValueTrimPrefix) {
Expand Down Expand Up @@ -245,7 +244,6 @@ var Cleave = /*#__PURE__*/function (_Component) {

_defineProperty(_assertThisInitialized(_this), "onInput", function (value, fromProps, bypassSetState) {
var pps = _this.properties;
console.log(pps);
var _this$props = _this.props,
disabled = _this$props.disabled,
readOnly = _this$props.readOnly; // case 1: delete one more character "4"
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": "grid-form-builder",
"version": "3.92.2",
"version": "3.93.0",
"description": "Form Builder built on top of React Grid Layout",
"repository": {
"type": "git",
Expand Down

0 comments on commit d2e97a0

Please sign in to comment.