From d2e97a0dde29c6ab998b12947b118a983df8ff5e Mon Sep 17 00:00:00 2001 From: semantic-release-bot Date: Wed, 25 Oct 2023 16:06:27 +0000 Subject: [PATCH] chore(release): 3.93.0 [skip ci] # [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)) --- CHANGELOG.md | 8 ++++++++ dist/cjs/Cleave/Cleave.js | 2 +- dist/cjs/Inputs/Multiselect.js | 11 +++++++---- dist/cjs/utils.js | 6 ++++-- dist/es/Cleave/Cleave.js | 2 -- package.json | 2 +- 6 files changed, 21 insertions(+), 10 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 608192f4..fbf41c92 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -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) diff --git a/dist/cjs/Cleave/Cleave.js b/dist/cjs/Cleave/Cleave.js index a6481def..239805f0 100644 --- a/dist/cjs/Cleave/Cleave.js +++ b/dist/cjs/Cleave/Cleave.js @@ -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 { diff --git a/dist/cjs/Inputs/Multiselect.js b/dist/cjs/Inputs/Multiselect.js index 65c3fb21..3de00da8 100644 --- a/dist/cjs/Inputs/Multiselect.js +++ b/dist/cjs/Inputs/Multiselect.js @@ -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, @@ -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: { @@ -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 }; \ No newline at end of file diff --git a/dist/cjs/utils.js b/dist/cjs/utils.js index 3dd59c61..24ad7900 100644 --- a/dist/cjs/utils.js +++ b/dist/cjs/utils.js @@ -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']; @@ -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(); diff --git a/dist/es/Cleave/Cleave.js b/dist/es/Cleave/Cleave.js index f7b94e43..a1d3647f 100644 --- a/dist/es/Cleave/Cleave.js +++ b/dist/es/Cleave/Cleave.js @@ -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) { @@ -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" diff --git a/package.json b/package.json index 37eb60e1..7eee090f 100644 --- a/package.json +++ b/package.json @@ -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",