@panoramax/web-viewer 5.1.1-develop-c975d647 → 5.1.1-develop-177481f2

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.
@@ -9,7 +9,7 @@ import BasicStyles from "./Basic.css" with { type: "css" };
9
9
  document.adoptedStyleSheets.push(AtkinsonStyles);
10
10
  document.adoptedStyleSheets.push(BasicStyles);
11
11
 
12
- const __COMMIT_HASH__ = "c975d64";
12
+ const __COMMIT_HASH__ = "177481f";
13
13
  const __PACKAGE_VERSION__ = "5.1.1";
14
14
  const __PACKAGE_ISSUES_URL__ = "https://gitlab.com/panoramax/clients/web-viewer/-/work_items";
15
15
 
@@ -469,6 +469,7 @@ export default class MapFilters extends LitElement {
469
469
  .searcher=${this._userSearch.bind(this)}
470
470
  ._parent=${this._parent}
471
471
  no-menu-closure
472
+ keep-on-menu-closure
472
473
  >
473
474
  </pnx-search-bar>
474
475
  </div>
@@ -116,6 +116,7 @@ export default class SearchBar extends LitElement {
116
116
  * @property {string} [size=md] The component sizing (md, xxl)
117
117
  * @property {function} [searcher] Search callback, function that takes as parameter the input text value, and resolves on list of results ({title, subtitle} and any other data you'd like to get on validation)
118
118
  * @property {boolean} [no-menu-closure=false] Set to true to not send menu closure events. Note that it still listens to other menu closures.
119
+ * @property {boolean} [keep-on-menu-closure=false] Set to true to keep last data in search bar on menu closure.
119
120
  */
120
121
  static properties = {
121
122
  id: {type: String},
@@ -128,6 +129,7 @@ export default class SearchBar extends LitElement {
128
129
  _results: {state: true},
129
130
  searcher: {type: Function},
130
131
  "no-menu-closure": {type: Boolean},
132
+ "keep-on-menu-closure": {type: Boolean},
131
133
  };
132
134
 
133
135
  constructor() {
@@ -141,6 +143,7 @@ export default class SearchBar extends LitElement {
141
143
  this._icon = "search";
142
144
  this._results = null;
143
145
  this["no-menu-closure"] = false;
146
+ this["keep-on-menu-closure"] = false;
144
147
 
145
148
  // Other properties
146
149
  this._throttler = null;
@@ -300,7 +303,9 @@ export default class SearchBar extends LitElement {
300
303
  this._popup._parent = this._parent;
301
304
  this._popup.classList.add("sb-results", "pnx-panel");
302
305
  this._parent.renderRoot.appendChild(this._popup);
303
- listenForMenuClosure(this._popup, this.reset.bind(this));
306
+ if(!this["keep-on-menu-closure"]) {
307
+ listenForMenuClosure(this._popup, this.reset.bind(this));
308
+ }
304
309
  }
305
310
 
306
311
  if(!this.reduced && this._results) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@panoramax/web-viewer",
3
- "version": "5.1.1-develop-c975d647",
3
+ "version": "5.1.1-develop-177481f2",
4
4
  "description": "Panoramax web viewer for geolocated pictures",
5
5
  "main": "./build/cjs/index.js",
6
6
  "module": "./build/esm/index.js",