@fluid-topics/ft-search-saved-searches 1.2.2 → 1.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.
@@ -12,8 +12,6 @@ export declare class FtSearchSavedSearches extends FtSearchSavedSearches_base im
12
12
  showAlertStatus: boolean;
13
13
  savedSearches?: Array<FtMySearch>;
14
14
  private user?;
15
- private baseUrl?;
16
- private searchPlaceConverter?;
17
15
  private request?;
18
16
  private requiredRole;
19
17
  static elementDefinitions: ElementDefinitionsMap;
@@ -6,9 +6,9 @@ var __decorate = (this && this.__decorate) || function (decorators, target, key,
6
6
  };
7
7
  import { html, nothing } from "lit";
8
8
  import { property } from "lit/decorators.js";
9
- import { deepEqual, redux, SearchPlaceConverter } from "@fluid-topics/ft-wc-utils";
9
+ import { deepEqual, redux } from "@fluid-topics/ft-wc-utils";
10
10
  import { styles } from "./ft-search-saved-searches.styles";
11
- import { ftAppInfoStore } from "@fluid-topics/ft-app-context";
11
+ import { ftAppInfoStore, SearchPlaceConverterProvider } from "@fluid-topics/ft-app-context";
12
12
  import { FtTypography } from "@fluid-topics/ft-typography";
13
13
  import { repeat } from "lit/directives/repeat.js";
14
14
  import { FtDateFilterType, FtSearchScope, FtUserRole, FtVirtualField, userHasRole } from "@fluid-topics/public-api";
@@ -34,17 +34,17 @@ class FtSearchSavedSearches extends withI18n(FtSearchComponent) {
34
34
  }
35
35
  render() {
36
36
  var _a;
37
+ const searchPlaceConverter = SearchPlaceConverterProvider.get();
37
38
  if (this.userHasRights && !this.isEmpty) {
38
39
  return html `
39
40
  <div part="container">
40
41
  ${repeat((_a = this.savedSearches) !== null && _a !== void 0 ? _a : [], s => s.id, s => {
41
- var _a;
42
42
  const ftSearchRequest = this.toFtSearchRequest(s.searchRequest);
43
43
  if (ftSearchRequest === undefined) {
44
44
  return nothing;
45
45
  }
46
46
  return html `
47
- <a href="${(_a = this.searchPlaceConverter) === null || _a === void 0 ? void 0 : _a.serialize(ftSearchRequest)}"
47
+ <a href="${searchPlaceConverter === null || searchPlaceConverter === void 0 ? void 0 : searchPlaceConverter.serialize(ftSearchRequest)}"
48
48
  @click="${(e) => this.onLinkClick(e, ftSearchRequest)}">
49
49
  <ft-card clickable ?selected="${this.isSelected(s.searchRequest)}" part="card">
50
50
  <div slot="header">
@@ -258,9 +258,6 @@ class FtSearchSavedSearches extends withI18n(FtSearchComponent) {
258
258
  && this.savedSearches == undefined) {
259
259
  userAssetsActions.reloadMySearches();
260
260
  }
261
- if (changedProperties.has("baseUrl") && this.baseUrl) {
262
- this.searchPlaceConverter = new SearchPlaceConverter(this.baseUrl, {});
263
- }
264
261
  }
265
262
  }
266
263
  FtSearchSavedSearches.styles = styles;
@@ -289,9 +286,6 @@ __decorate([
289
286
  __decorate([
290
287
  redux({ store: ftAppInfoStore.name, selector: (s) => { var _a; return (_a = s.session) === null || _a === void 0 ? void 0 : _a.profile; } })
291
288
  ], FtSearchSavedSearches.prototype, "user", void 0);
292
- __decorate([
293
- redux({ store: ftAppInfoStore.name })
294
- ], FtSearchSavedSearches.prototype, "baseUrl", void 0);
295
289
  __decorate([
296
290
  redux({ store: "search" })
297
291
  ], FtSearchSavedSearches.prototype, "request", void 0);