superdesk-ui-framework 5.2.2 → 5.2.3

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.
@@ -147,7 +147,7 @@ export const SearchBar = forwardRef<{focus: () => void; search: () => void}, IPr
147
147
  <Icon name="remove-sign" />
148
148
  </button>
149
149
  )}
150
- {!props.hideSearchButton && (
150
+ {!props.hideSearchButton && value && !props.searchOptions?.searchOnType && (
151
151
  <button
152
152
  id="sd-searchbar__search-btn"
153
153
  className={searchButtonClasses}
@@ -159166,11 +159166,11 @@ var debounce_1 = __importDefault(__webpack_require__(135));
159166
159166
  var Icon_1 = __webpack_require__(13);
159167
159167
  exports.SearchBar = (0, react_1.forwardRef)(function (props, ref) {
159168
159168
  var _a;
159169
- var _b;
159170
- var _c = props.type, type = _c === void 0 ? 'expanded' : _c, _d = props.boxed, boxed = _d === void 0 ? false : _d;
159171
- var _e = (0, react_1.useState)(false), focused = _e[0], setFocused = _e[1];
159172
- var _f = (0, react_1.useState)(false), keyDown = _f[0], setKeyDown = _f[1];
159173
- var _g = (0, react_1.useState)(''), value = _g[0], setValue = _g[1];
159169
+ var _b, _c;
159170
+ var _d = props.type, type = _d === void 0 ? 'expanded' : _d, _e = props.boxed, boxed = _e === void 0 ? false : _e;
159171
+ var _f = (0, react_1.useState)(false), focused = _f[0], setFocused = _f[1];
159172
+ var _g = (0, react_1.useState)(false), keyDown = _g[0], setKeyDown = _g[1];
159173
+ var _h = (0, react_1.useState)(''), value = _h[0], setValue = _h[1];
159174
159174
  var inputRef = (0, react_1.useRef)(null);
159175
159175
  var searchInputRef = (0, react_1.useRef)(null);
159176
159176
  /**
@@ -159248,7 +159248,7 @@ exports.SearchBar = (0, react_1.forwardRef)(function (props, ref) {
159248
159248
  props.onSubmit('');
159249
159249
  } },
159250
159250
  react_1.default.createElement(Icon_1.Icon, { name: "remove-sign" }))),
159251
- !props.hideSearchButton && (react_1.default.createElement("button", { id: "sd-searchbar__search-btn", className: searchButtonClasses, onClick: function () {
159251
+ !props.hideSearchButton && value && !((_c = props.searchOptions) === null || _c === void 0 ? void 0 : _c.searchOnType) && (react_1.default.createElement("button", { id: "sd-searchbar__search-btn", className: searchButtonClasses, onClick: function () {
159252
159252
  handleDebouncedSearch.cancel();
159253
159253
  props.onSubmit(value);
159254
159254
  } },
@@ -198405,7 +198405,7 @@ exports.ThreePaneLayoutPattern = ThreePaneLayoutPattern;
198405
198405
  /* 1067 */
198406
198406
  /***/ (function(module, exports) {
198407
198407
 
198408
- module.exports = {"name":"superdesk-ui-framework","version":"5.2.2","license":"AGPL-3.0","repository":{"type":"git","url":"https://github.com/superdesk/superdesk-ui-framework.git"},"main":"dist/superdesk-ui.bundle.js","types":"react/index.d.ts","contributors":["Nemanja Pavlovic","Vladimir Stefanovic","Darko Tomic","Aleksandar Jelicic","Tomas Kikutis","Dragana Zivkovic","Konstantin Markov","Helmy Giacoman"],"scripts":{"start":"webpack-dev-server --config tasks/webpack.dev.js","watch":"webpack --watch --config tasks/webpack.prod.js & tsc --watch","build":"tsc -p tsconfig.json --noEmit && webpack --config tasks/webpack.prod.js && tsc","build-ui":"webpack && tsc && npm run lint","playground-lint":"tsc -p examples/pages/playgrounds/react-playgrounds --noEmit","format-code":"npx prettier . --write","lint":"tsc -p tsconfig.json --noEmit && npx prettier . --check && eslint --parser=@typescript-eslint/parser app && tslint -c tslint.json 'app-typescript/**/*.{ts,tsx}' && npm run playground-lint && npm run unit-test","lint-fix":"tsc -p tsconfig.json --noEmit && tslint --fix -c tslint.json 'app-typescript/**/*.{ts,tsx}'","prepublishOnly":"npm run build","unit-test":"mocha","debug-unit-tests":"mocha --inspect-brk"},"devDependencies":{"@types/assert":"^1.5.6","@types/chart.js":"^2.9.24","@types/classnames":"^2.2.9","@types/enzyme":"^3.10.12","@types/enzyme-adapter-react-16":"^1.0.6","@types/lodash":"^4.14.161","@types/mocha":"^9.1.1","@types/react":"16.8.23","@types/react-beautiful-dnd":"^13.1.2","@types/react-dom":"16.8.0","@types/react-router-dom":"^5.1.2","@types/react-scrollspy":"^3.3.5","@typescript-eslint/parser":"^5.58.0","angular":"^1.7.9","angular-animate":"^1.7.9","angular-route":"^1.7.9","classnames":"^2.2.5","clean-webpack-plugin":"^1.0.0","code-prettify":"^0.1.0","copy-webpack-plugin":"^4.6.0","css-loader":"^2.1.1","enzyme":"^3.11.0","enzyme-adapter-react-16":"^1.15.7","eslint":"^4.6.1","eslint-loader":"^1.9.0","eslint-plugin-angular":"^3.1.1","eslint-plugin-react":"^7.3.0","extract-text-webpack-plugin":"^3.0.2","file-loader":"^0.11.2","html-loader":"^0.5.1","html-webpack-plugin":"^2.30.1","jquery":"^3.1.1","jquery-ui":"^1.12.1","jsdom":"20.0.3","jsdom-global":"3.0.2","lodash":"4.17.21","mocha":"^8.4.0","moment":"^2.29.3","node-sass":"6.0","prettier":"3.5.3","prismjs":"^1.28.0","prop-types":"^15.6.0","react":"16.8.6","react-dom":"16.8.6","react-redux":"^5.0.6","react-router-dom":"^5.1.2","redux":"^3.7.2","redux-form":"^7.0.4","sass-loader":"^6.0.6","style-loader":"^0.18.2","superdesk-code-style":"^1.1.2","ts-loader":"^6.0.2","ts-node":"^10.9.1","tslint":"^5.18.0","typescript":"^5.8.3","url-loader":"^1.1.2","webpack":"^3.5.5","webpack-cli":"3.3.10","webpack-dev-server":"2.11.1","webpack-merge":"^4.2.1"},"dependencies":{"@popperjs/core":"^2.4.0","@sourcefabric/common":"0.0.66","@superdesk/primereact":"^5.0.2-16","@superdesk/react-resizable-panels":"0.0.39","chart.js":"^2.9.3","date-fns":"^4.1.0","popper-max-size-modifier":"^0.2.0","popper.js":"1.14.4","primeicons":"2.0.0","react-beautiful-dnd":"^13.0.0","react-id-generator":"^3.0.0","react-scrollspy":"^3.4.3","weekstart":"^2.0.0"},"peerDependencies":{"moment":"*"},"volta":{"node":"14.21.3"}}
198408
+ module.exports = {"name":"superdesk-ui-framework","version":"5.2.3","license":"AGPL-3.0","repository":{"type":"git","url":"https://github.com/superdesk/superdesk-ui-framework.git"},"main":"dist/superdesk-ui.bundle.js","types":"react/index.d.ts","contributors":["Nemanja Pavlovic","Vladimir Stefanovic","Darko Tomic","Aleksandar Jelicic","Tomas Kikutis","Dragana Zivkovic","Konstantin Markov","Helmy Giacoman"],"scripts":{"start":"webpack-dev-server --config tasks/webpack.dev.js","watch":"webpack --watch --config tasks/webpack.prod.js & tsc --watch","build":"tsc -p tsconfig.json --noEmit && webpack --config tasks/webpack.prod.js && tsc","build-ui":"webpack && tsc && npm run lint","playground-lint":"tsc -p examples/pages/playgrounds/react-playgrounds --noEmit","format-code":"npx prettier . --write","lint":"tsc -p tsconfig.json --noEmit && npx prettier . --check && eslint --parser=@typescript-eslint/parser app && tslint -c tslint.json 'app-typescript/**/*.{ts,tsx}' && npm run playground-lint && npm run unit-test","lint-fix":"tsc -p tsconfig.json --noEmit && tslint --fix -c tslint.json 'app-typescript/**/*.{ts,tsx}'","prepublishOnly":"npm run build","unit-test":"mocha","debug-unit-tests":"mocha --inspect-brk"},"devDependencies":{"@types/assert":"^1.5.6","@types/chart.js":"^2.9.24","@types/classnames":"^2.2.9","@types/enzyme":"^3.10.12","@types/enzyme-adapter-react-16":"^1.0.6","@types/lodash":"^4.14.161","@types/mocha":"^9.1.1","@types/react":"16.8.23","@types/react-beautiful-dnd":"^13.1.2","@types/react-dom":"16.8.0","@types/react-router-dom":"^5.1.2","@types/react-scrollspy":"^3.3.5","@typescript-eslint/parser":"^5.58.0","angular":"^1.7.9","angular-animate":"^1.7.9","angular-route":"^1.7.9","classnames":"^2.2.5","clean-webpack-plugin":"^1.0.0","code-prettify":"^0.1.0","copy-webpack-plugin":"^4.6.0","css-loader":"^2.1.1","enzyme":"^3.11.0","enzyme-adapter-react-16":"^1.15.7","eslint":"^4.6.1","eslint-loader":"^1.9.0","eslint-plugin-angular":"^3.1.1","eslint-plugin-react":"^7.3.0","extract-text-webpack-plugin":"^3.0.2","file-loader":"^0.11.2","html-loader":"^0.5.1","html-webpack-plugin":"^2.30.1","jquery":"^3.1.1","jquery-ui":"^1.12.1","jsdom":"20.0.3","jsdom-global":"3.0.2","lodash":"4.17.21","mocha":"^8.4.0","moment":"^2.29.3","node-sass":"6.0","prettier":"3.5.3","prismjs":"^1.28.0","prop-types":"^15.6.0","react":"16.8.6","react-dom":"16.8.6","react-redux":"^5.0.6","react-router-dom":"^5.1.2","redux":"^3.7.2","redux-form":"^7.0.4","sass-loader":"^6.0.6","style-loader":"^0.18.2","superdesk-code-style":"^1.1.2","ts-loader":"^6.0.2","ts-node":"^10.9.1","tslint":"^5.18.0","typescript":"^5.8.3","url-loader":"^1.1.2","webpack":"^3.5.5","webpack-cli":"3.3.10","webpack-dev-server":"2.11.1","webpack-merge":"^4.2.1"},"dependencies":{"@popperjs/core":"^2.4.0","@sourcefabric/common":"0.0.66","@superdesk/primereact":"^5.0.2-16","@superdesk/react-resizable-panels":"0.0.39","chart.js":"^2.9.3","date-fns":"^4.1.0","popper-max-size-modifier":"^0.2.0","popper.js":"1.14.4","primeicons":"2.0.0","react-beautiful-dnd":"^13.0.0","react-id-generator":"^3.0.0","react-scrollspy":"^3.4.3","weekstart":"^2.0.0"},"peerDependencies":{"moment":"*"},"volta":{"node":"14.21.3"}}
198409
198409
 
198410
198410
  /***/ }),
198411
198411
  /* 1068 */
@@ -158513,11 +158513,11 @@ var debounce_1 = __importDefault(__webpack_require__(135));
158513
158513
  var Icon_1 = __webpack_require__(13);
158514
158514
  exports.SearchBar = (0, react_1.forwardRef)(function (props, ref) {
158515
158515
  var _a;
158516
- var _b;
158517
- var _c = props.type, type = _c === void 0 ? 'expanded' : _c, _d = props.boxed, boxed = _d === void 0 ? false : _d;
158518
- var _e = (0, react_1.useState)(false), focused = _e[0], setFocused = _e[1];
158519
- var _f = (0, react_1.useState)(false), keyDown = _f[0], setKeyDown = _f[1];
158520
- var _g = (0, react_1.useState)(''), value = _g[0], setValue = _g[1];
158516
+ var _b, _c;
158517
+ var _d = props.type, type = _d === void 0 ? 'expanded' : _d, _e = props.boxed, boxed = _e === void 0 ? false : _e;
158518
+ var _f = (0, react_1.useState)(false), focused = _f[0], setFocused = _f[1];
158519
+ var _g = (0, react_1.useState)(false), keyDown = _g[0], setKeyDown = _g[1];
158520
+ var _h = (0, react_1.useState)(''), value = _h[0], setValue = _h[1];
158521
158521
  var inputRef = (0, react_1.useRef)(null);
158522
158522
  var searchInputRef = (0, react_1.useRef)(null);
158523
158523
  /**
@@ -158595,7 +158595,7 @@ exports.SearchBar = (0, react_1.forwardRef)(function (props, ref) {
158595
158595
  props.onSubmit('');
158596
158596
  } },
158597
158597
  react_1.default.createElement(Icon_1.Icon, { name: "remove-sign" }))),
158598
- !props.hideSearchButton && (react_1.default.createElement("button", { id: "sd-searchbar__search-btn", className: searchButtonClasses, onClick: function () {
158598
+ !props.hideSearchButton && value && !((_c = props.searchOptions) === null || _c === void 0 ? void 0 : _c.searchOnType) && (react_1.default.createElement("button", { id: "sd-searchbar__search-btn", className: searchButtonClasses, onClick: function () {
158599
158599
  handleDebouncedSearch.cancel();
158600
158600
  props.onSubmit(value);
158601
158601
  } },
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "superdesk-ui-framework",
3
- "version": "5.2.2",
3
+ "version": "5.2.3",
4
4
  "license": "AGPL-3.0",
5
5
  "repository": {
6
6
  "type": "git",
@@ -43,11 +43,11 @@ var debounce_1 = __importDefault(require("lodash/debounce"));
43
43
  var Icon_1 = require("./Icon");
44
44
  exports.SearchBar = (0, react_1.forwardRef)(function (props, ref) {
45
45
  var _a;
46
- var _b;
47
- var _c = props.type, type = _c === void 0 ? 'expanded' : _c, _d = props.boxed, boxed = _d === void 0 ? false : _d;
48
- var _e = (0, react_1.useState)(false), focused = _e[0], setFocused = _e[1];
49
- var _f = (0, react_1.useState)(false), keyDown = _f[0], setKeyDown = _f[1];
50
- var _g = (0, react_1.useState)(''), value = _g[0], setValue = _g[1];
46
+ var _b, _c;
47
+ var _d = props.type, type = _d === void 0 ? 'expanded' : _d, _e = props.boxed, boxed = _e === void 0 ? false : _e;
48
+ var _f = (0, react_1.useState)(false), focused = _f[0], setFocused = _f[1];
49
+ var _g = (0, react_1.useState)(false), keyDown = _g[0], setKeyDown = _g[1];
50
+ var _h = (0, react_1.useState)(''), value = _h[0], setValue = _h[1];
51
51
  var inputRef = (0, react_1.useRef)(null);
52
52
  var searchInputRef = (0, react_1.useRef)(null);
53
53
  /**
@@ -125,7 +125,7 @@ exports.SearchBar = (0, react_1.forwardRef)(function (props, ref) {
125
125
  props.onSubmit('');
126
126
  } },
127
127
  react_1.default.createElement(Icon_1.Icon, { name: "remove-sign" }))),
128
- !props.hideSearchButton && (react_1.default.createElement("button", { id: "sd-searchbar__search-btn", className: searchButtonClasses, onClick: function () {
128
+ !props.hideSearchButton && value && !((_c = props.searchOptions) === null || _c === void 0 ? void 0 : _c.searchOnType) && (react_1.default.createElement("button", { id: "sd-searchbar__search-btn", className: searchButtonClasses, onClick: function () {
129
129
  handleDebouncedSearch.cancel();
130
130
  props.onSubmit(value);
131
131
  } },