@fluid-topics/ft-search-saved-searches 1.1.113 → 1.1.114

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.
@@ -13,6 +13,7 @@ export declare class FtSearchSavedSearches extends FtSearchSavedSearches_base im
13
13
  savedSearches?: Array<FtMySearch>;
14
14
  private user?;
15
15
  private baseUrl?;
16
+ private searchPlaceConverter?;
16
17
  private request?;
17
18
  private requiredRole;
18
19
  static elementDefinitions: ElementDefinitionsMap;
@@ -6,7 +6,7 @@ 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, serializeRequest } from "@fluid-topics/ft-wc-utils";
9
+ import { deepEqual, redux, SearchPlaceConverter } from "@fluid-topics/ft-wc-utils";
10
10
  import { styles } from "./ft-search-saved-searches.styles";
11
11
  import { ftAppInfoStore } from "@fluid-topics/ft-app-context";
12
12
  import { FtTypography } from "@fluid-topics/ft-typography";
@@ -38,26 +38,27 @@ class FtSearchSavedSearches extends withI18n(FtSearchComponent) {
38
38
  return html `
39
39
  <div part="container">
40
40
  ${repeat((_a = this.savedSearches) !== null && _a !== void 0 ? _a : [], s => s.id, s => {
41
+ var _a;
41
42
  const ftSearchRequest = this.toFtSearchRequest(s.searchRequest);
42
- if (ftSearchRequest === undefined)
43
+ if (ftSearchRequest === undefined) {
43
44
  return nothing;
44
- const link = serializeRequest(this.baseUrl, ftSearchRequest);
45
+ }
45
46
  return html `
46
- <a href="${link}" @click="${(e) => this.onLinkClick(e, ftSearchRequest)}">
47
- <ft-card clickable ?selected="${this.isSelected(s.searchRequest)}" part="card">
48
- <div slot="header">
49
- <ft-typography variant="title">${s.title}</ft-typography>
50
- ${this.renderAlertStatus(s.alert)}
51
- </div>
52
-
53
- <div part="card-content">
54
- ${this.renderDescription(s.description)}
55
- ${this.renderSearchFilters(s.searchRequest)}
56
- ${this.renderSearchButton(this.isSelected(s.searchRequest))}
57
- </div>
58
- </ft-card>
59
- </a>
60
- `;
47
+ <a href="${(_a = this.searchPlaceConverter) === null || _a === void 0 ? void 0 : _a.serialize(ftSearchRequest)}"
48
+ @click="${(e) => this.onLinkClick(e, ftSearchRequest)}">
49
+ <ft-card clickable ?selected="${this.isSelected(s.searchRequest)}" part="card">
50
+ <div slot="header">
51
+ <ft-typography variant="title">${s.title}</ft-typography>
52
+ ${this.renderAlertStatus(s.alert)}
53
+ </div>
54
+ <div part="card-content">
55
+ ${this.renderDescription(s.description)}
56
+ ${this.renderSearchFilters(s.searchRequest)}
57
+ ${this.renderSearchButton(this.isSelected(s.searchRequest))}
58
+ </div>
59
+ </ft-card>
60
+ </a>
61
+ `;
61
62
  })}
62
63
  </div>
63
64
  `;
@@ -68,40 +69,46 @@ class FtSearchSavedSearches extends withI18n(FtSearchComponent) {
68
69
  }
69
70
  renderDescription(description) {
70
71
  return this.showDescription && description
71
- ? html `<div part="description" class="content">${description}</div>`
72
+ ? html `
73
+ <div part="description" class="content">${description}</div>`
72
74
  : nothing;
73
75
  }
74
76
  renderSearchButton(isSelected) {
75
77
  return this.showSearchButton
76
- ? html `<div part="search-button"><ft-button id="search" icon="search" ?disabled=${isSelected}>${savedSearches.messages.search()}</ft-button></div>`
78
+ ? html `
79
+ <div part="search-button">
80
+ <ft-button id="search" icon="search" ?disabled=${isSelected}>${savedSearches.messages.search()}</ft-button>
81
+ </div>`
77
82
  : nothing;
78
83
  }
79
84
  renderAlertStatus(alert) {
80
85
  return this.showAlertStatus && alert
81
- ? html `<ft-icon part="alert-status">alert</ft-icon>`
86
+ ? html `
87
+ <ft-icon part="alert-status">alert</ft-icon>`
82
88
  : nothing;
83
89
  }
84
90
  // See net.antidot.fluidtopics.client.application.mylibrary.shared.MyLibraryTagWidgetFactory.createMySearchTags
85
91
  renderSearchFilters(searchRequest) {
86
92
  var _a, _b, _c, _d, _e, _f, _g;
87
- return this.showSearchFilters ? html `<div part="search-filters" class="content">
88
- ${((_a = searchRequest.query.length) !== null && _a !== void 0 ? _a : 0 > 0)
93
+ return this.showSearchFilters ? html `
94
+ <div part="search-filters" class="content">
95
+ ${((_a = searchRequest.query.length) !== null && _a !== void 0 ? _a : 0 > 0)
89
96
  ? this.renderMetadata(savedSearches.messages.keywords(), searchRequest.query)
90
97
  : nothing}
91
- ${searchRequest.virtualField == FtVirtualField.TITLE_ONLY
98
+ ${searchRequest.virtualField == FtVirtualField.TITLE_ONLY
92
99
  ? this.renderMetadata(savedSearches.messages.in(), savedSearches.messages.titles())
93
100
  : nothing}
94
- ${searchRequest.scope == FtSearchScope.DOCUMENTS
101
+ ${searchRequest.scope == FtSearchScope.DOCUMENTS
95
102
  ? this.renderMetadata(savedSearches.messages.resultsType(), savedSearches.messages.documentsOnly())
96
103
  : nothing}
97
- ${(_c = (_b = searchRequest.metadataFilters) === null || _b === void 0 ? void 0 : _b.map(f => this.renderUnknownFilter(f))) !== null && _c !== void 0 ? _c : nothing}
98
- ${((_e = (_d = searchRequest.contentLocale) === null || _d === void 0 ? void 0 : _d.length) !== null && _e !== void 0 ? _e : 0 > 0)
104
+ ${(_c = (_b = searchRequest.metadataFilters) === null || _b === void 0 ? void 0 : _b.map(f => this.renderUnknownFilter(f))) !== null && _c !== void 0 ? _c : nothing}
105
+ ${((_e = (_d = searchRequest.contentLocale) === null || _d === void 0 ? void 0 : _d.length) !== null && _e !== void 0 ? _e : 0 > 0)
99
106
  ? this.renderMetadata(savedSearches.messages.language(), searchRequest.contentLocale)
100
107
  : nothing}
101
- ${((_g = (_f = searchRequest.sort[0]) === null || _f === void 0 ? void 0 : _f.key.length) !== null && _g !== void 0 ? _g : 0 > 0)
108
+ ${((_g = (_f = searchRequest.sort[0]) === null || _f === void 0 ? void 0 : _f.key.length) !== null && _g !== void 0 ? _g : 0 > 0)
102
109
  ? this.renderMetadata(savedSearches.messages.sort(), this.mapSortKey(searchRequest.sort[0].key))
103
110
  : nothing}
104
- </div>` : nothing;
111
+ </div>` : nothing;
105
112
  }
106
113
  renderMetadata(key, values) {
107
114
  return html `
@@ -251,6 +258,9 @@ class FtSearchSavedSearches extends withI18n(FtSearchComponent) {
251
258
  && this.savedSearches == undefined) {
252
259
  userAssetsActions.reloadMySearches();
253
260
  }
261
+ if (changedProperties.has("baseUrl") && this.baseUrl) {
262
+ this.searchPlaceConverter = new SearchPlaceConverter(this.baseUrl, {});
263
+ }
254
264
  }
255
265
  }
256
266
  FtSearchSavedSearches.styles = styles;
@@ -333,7 +333,7 @@ Also for action icons.`,c.colorGray200),contentGlobalSubtle:r.extend("--ft-conte
333
333
  </ft-typography>
334
334
  </div>
335
335
  </div>
336
- `}};De.elementDefinitions={"ft-ripple":j,"ft-typography":ie};De.styles=va;Vr([(0,hr.property)()],De.prototype,"title",void 0);Vr([(0,hr.property)({type:Boolean})],De.prototype,"clickable",void 0);Vr([(0,hr.property)({type:Boolean})],De.prototype,"selected",void 0);Vr([(0,hr.property)({type:Boolean})],De.prototype,"noHeader",void 0);(0,Ca.customElement)("ft-card")(De);var ln=b(L());var ro=b(V()),xe=b(te()),Ss=b(Ut()),no=b(L());var La=b(L());var mr=b(V()),Rt=b(te()),Na=b(L()),Ta=b(wa());var Zt;(function(e){e.ADD_TO_PBK="&#xe800;",e.ALERT="&#xe801;",e.ADD_ALERT="&#xe802;",e.BACK_TO_SEARCH="&#xe803;",e.ADD_BOOKMARK="&#xe804;",e.BOOKMARK="&#xe805;",e.BOOKS="&#xe806;",e.MENU="&#xe807;",e.DOWNLOAD="&#xe808;",e.EDIT="&#xe809;",e.FEEDBACK="&#xe80a;",e.HOME="&#xe80b;",e.MODIFY_PBK="&#xe80c;",e.SCHEDULED="&#xe80d;",e.SEARCH="&#xe80e;",e.EXPORT="&#xe80f;",e.TOC="&#xe810;",e.WRITE_UGC="&#xe811;",e.TRASH="&#xe812;",e.USER="&#xe813;",e.EXTLINK="&#xe814;",e.CALENDAR="&#xe815;",e.OFFLINE="&#xe816;",e.BOOK="&#xe817;",e.DOWNLOAD_PLAIN="&#xe818;",e.CHECK="&#xe819;",e.STAR_PLAIN="&#xe900;",e.TOPICS="&#xe901;",e.DISC="&#xe902;",e.CIRCLE="&#xe903;",e.SHARED="&#xe904;",e.SORT_UNSORTED="&#xe905;",e.SORT_UP="&#xe906;",e.SORT_DOWN="&#xe907;",e.WORKING="&#xe908;",e.CLOSE="&#xe909;",e.ZOOM_OUT="&#xe90a;",e.ZOOM_IN="&#xe90b;",e.ZOOM_REALSIZE="&#xe90c;",e.ZOOM_FULLSCREEN="&#xe90d;",e.ADMIN_RESTRICTED="&#xe90e;",e.ADMIN="&#xe90f;",e.ADMIN_KHUB="&#xe910;",e.ADMIN_THEME="&#xe911;",e.ADMIN_USERS="&#xe912;",e.WARNING="&#xe913;",e.CONTEXT="&#xe914;",e.SEARCH_HOME="&#xe915;",e.STEPS="&#xe916;",e.ICON_EXPAND="&#xe917;",e.ICON_COLLAPSE="&#xe918;",e.INFO="&#xe919;",e.MINUS_PLAIN="&#xe91a;",e.PLUS_PLAIN="&#xe91b;",e.FACET_HAS_DESCENDANT="&#xe91c;",e.TRIANGLE_BOTTOM="&#xe91d;",e.TRIANGLE_LEFT="&#xe91e;",e.TRIANGLE_RIGHT="&#xe91f;",e.TRIANGLE_TOP="&#xe920;",e.THIN_ARROW="&#xe921;",e.SIGN_IN="&#xe922;",e.LOGOUT="&#xe923;",e.TRANSLATE="&#xe924;",e.CLOSE_PLAIN="&#xe925;",e.CHECK_PLAIN="&#xe926;",e.ARTICLE="&#xe927;",e.COLUMNS="&#xe928;",e.ANALYTICS="&#xe929;",e.COLLECTIONS="&#xe92a;",e.ARROW_DOWN="&#xe92b;",e.ARROW_LEFT="&#xe92c;",e.ARROW_RIGHT="&#xe92d;",e.ARROW_UP="&#xe92e;",e.SEARCH_IN_PUBLICATION="&#xe92f;",e.COPY_TO_CLIPBOARD="&#xe930;",e.SHARED_PBK="&#xe931;",e.ATTACHMENTS="&#xe932;",e.STRIPE_ARROW_LEFT="&#xe933;",e.STRIPE_ARROW_RIGHT="&#xe934;",e.FILTERS="&#xe935;",e.DOT="&#xe936;",e.MINUS="&#xe937;",e.PLUS="&#xe938;",e.MAILS_AND_NOTIFICATIONS="&#xe939;",e.SAVE="&#xe93a;",e.LOCKER="&#xe93b;",e.ADMIN_INTEGRATION="&#xe93c;",e.SYNC="&#xe93d;",e.TAG="&#xe93e;",e.BOOK_PLAIN="&#xe93f;",e.UPLOAD="&#xe940;",e.ONLINE="&#xe941;",e.TAG_PLAIN="&#xe942;",e.ACCOUNT_SETTINGS="&#xe943;",e.PRINT="&#xe944;",e.DEFAULT_ROLES="&#xe945;",e.SHORTCUT_MENU="&#xe946;",e.RELATIVES_PLAIN="&#xe947;",e.RELATIVES="&#xe948;",e.PAUSE="&#xe949;",e.PLAY="&#xe94a;",e.ADMIN_PORTAL="&#xe94b;",e.STAR="&#xe94c;",e.THUMBS_DOWN="&#xe94d;",e.THUMBS_DOWN_PLAIN="&#xe94e;",e.THUMBS_UP="&#xe94f;",e.THUMBS_UP_PLAIN="&#xe950;",e.FEEDBACK_PLAIN="&#xe951;",e.RATE_PLAIN="&#xe952;",e.RATE="&#xe953;",e.OFFLINE_SETTINGS="&#xe954;",e.MY_COLLECTIONS="&#xe955;",e.THIN_ARROW_LEFT="&#xe956;",e.THIN_ARROW_RIGHT="&#xe957;",e.RESET="&#xe958;",e.MY_LIBRARY="&#xe959;",e.UNSTRUCTURED_DOC="&#xe95a;",e.CONTEXTUAL="&#xe95b;",e.THIN_ARROW_UP="&#xe95c;",e.ARROW_RIGHT_TO_LINE="&#xe95d;",e.DESKTOP="&#xe95e;",e.TABLET_LANDSCAPE="&#xe95f;",e.TABLET_PORTRAIT="&#xe960;",e.MOBILE_LANDSCAPE="&#xe961;",e.MOBILE_PORTRAIT="&#xe962;",e.DIAGRAM_SUNBURST="&#xe963;",e.DIAGRAM_SANKEY="&#xe964;",e.COMMENT_QUESTION="&#xe965;",e.COMMENT_QUESTION_PLAIN="&#xe966;",e.MESSAGE_BOT="&#xe967;",e.CHART_SIMPLE="&#xe968;",e.BARS_PROGRESS="&#xe969;",e.BOOK_OPEN_GEAR="&#xe96a;",e.BOOK_OPEN_GEAR_SLASH="&#xe96b;",e.LINE_CHART="&#xe96c;",e.STACKED_CHART="&#xe96d;",e.CHART_BAR_STACKED="&#xe96e;",e.CHART_BAR_GROUPED="&#xe96f;",e.EYE_SLASH="&#xe970;",e.X_MARK="&#xe971;",e.EXPAND_WIDE="&#xe972;",e.PIP="&#xe973;",e.PIP_WIDE="&#xe974;",e.LIFE_RING="&#xe975;",e.GLOBE="&#xe976;",e.PIGGY_BANK="&#xe977;",e.EXTLINK_LIGHT="&#xe978;",e.CLONE="&#xe979;",e.CLONE_LINK_SIMPLE="&#xe97a;",e.CHART_BAR_NORMALIZED="&#xe97b;",e.CONSUMER="&#xe97c;",e.OCTAGON_XMARK="&#xe97d;",e.HOURGLASS_HALF="&#xe97e;",e.CLOCK="&#xe97f;",e.CLOCK_THREE="&#xe97f;",e.CALENDAR_DAY="&#xe980;",e.COMPUTER_MOUSE_MAGNIFYING_GLASS="&#xe981;",e.WAND_MAGIC_SPARKLES="&#xe982;",e.PAPER_PLANE="&#xe983;",e.CIRCLE_STOP="&#xe984;",e.ARROW_ROTATE_RIGHT="&#xe985;",e.ARROWS_ROTATE="&#xe986;",e.ALIGN_RIGHT="&#xe987;",e.FORMAT_CLEAR="&#xe988;",e.ALIGN_CENTER="&#xe989;",e.ALIGN_LEFT="&#xe98a;",e.PALETTE="&#xe98b;",e.BOLD="&#xe98c;",e.ITALIC="&#xe98d;",e.UNDERLINE="&#xe98e;",e.STRIKETHROUGH="&#xe98f;",e.LINK_SIMPLE_SLASH="&#xe990;",e.LINK_SIMPLE="&#xe991;",e.ROUTE="&#xe992;",e.CIRCLE_USER_SLASH="&#xe993;",e.CIRCLE_USER_CHECK="&#xe994;",e.LIST_MAGNIFYING_GLASS="&#xe995;",e.MEDAL="&#xe996;",e.THUMBS_UP_THUMBS_DOWN_SOLID="&#xe997;",e.ARROW_TURN_DOWN_RIGHT="&#xe998;",e.FLASK="&#xe999;",e.LOCK_KEYHOLE_OPEN_SOLID="&#xe99a;",e.HOURGLASS_END="&#xe99b;",e.EYE="&#xf06e;",e.SHARE="&#xe80f1;"})(Zt||(Zt={}));var C;(function(e){e.UNKNOWN="&#xe90a;",e.ABW="&#xe900;",e.AUDIO="&#xe901;",e.AVI="&#xe902;",e.CHM="&#xe904;",e.CODE="&#xe905;",e.CSV="&#xe903;",e.DITA="&#xe906;",e.EPUB="&#xe907;",e.EXCEL="&#xe908;",e.FLAC="&#xe909;",e.GIF="&#xe90b;",e.GZIP="&#xe90c;",e.HTML="&#xe90d;",e.IMAGE="&#xe90e;",e.JPEG="&#xe90f;",e.JSON="&#xe910;",e.M4A="&#xe911;",e.MOV="&#xe912;",e.MP3="&#xe913;",e.MP4="&#xe914;",e.OGG="&#xe915;",e.PDF="&#xe916;",e.PNG="&#xe917;",e.POWERPOINT="&#xe918;",e.RAR="&#xe91a;",e.STP="&#xe91b;",e.TEXT="&#xe91c;",e.VIDEO="&#xe91e;",e.WAV="&#xe91f;",e.WMA="&#xe920;",e.WORD="&#xe921;",e.XML="&#xe922;",e.YAML="&#xe919;",e.ZIP="&#xe923;"})(C||(C={}));var Yh=new Map([...["abw"].map(e=>[e,C.ABW]),...["3gp","act","aiff","aac","amr","au","awb","dct","dss","dvf","gsm","iklax","ivs","mmf","mpc","msv","opus","ra","rm","raw","sln","tta","vox","wv"].map(e=>[e,C.AUDIO]),...["avi"].map(e=>[e,C.AVI]),...["chm","xhs"].map(e=>[e,C.CHM]),...["java","py","php","php3","php4","php5","js","javascript","rb","rbw","c","cpp","cxx","h","hh","hpp","hxx","sh","bash","zsh","tcsh","ksh","csh","vb","scala","pl","prl","perl","groovy","ceylon","aspx","jsp","scpt","applescript","bas","bat","lua","jsp","mk","cmake","css","sass","less","m","mm","xcodeproj"].map(e=>[e,C.CODE]),...["csv"].map(e=>[e,C.CSV]),...["dita","ditamap","ditaval"].map(e=>[e,C.DITA]),...["epub"].map(e=>[e,C.EPUB]),...["xls","xlt","xlm","xlsx","xlsm","xltx","xltm","xlsb","xla","xlam","xll","xlw"].map(e=>[e,C.EXCEL]),...["flac"].map(e=>[e,C.FLAC]),...["gif"].map(e=>[e,C.GIF]),...["gzip","x-gzip","giz","gz","tgz"].map(e=>[e,C.GZIP]),...["html","htm","xhtml"].map(e=>[e,C.HTML]),...["ai","vml","xps","img","cpt","psd","psp","xcf","svg","svg+xml","bmp","bpg","ppm","pgm","pbm","pnm","rif","tif","tiff","webp","wmf","ico"].map(e=>[e,C.IMAGE]),...["jpeg","jpg","jpe"].map(e=>[e,C.JPEG]),...["json"].map(e=>[e,C.JSON]),...["m4a","m4p"].map(e=>[e,C.M4A]),...["mov","qt"].map(e=>[e,C.MOV]),...["mp3"].map(e=>[e,C.MP3]),...["mp4","m4v"].map(e=>[e,C.MP4]),...["ogg","oga"].map(e=>[e,C.OGG]),...["pdf","ps"].map(e=>[e,C.PDF]),...["png"].map(e=>[e,C.PNG]),...["ppt","pot","pps","pptx","pptm","potx","potm","ppam","ppsx","ppsm","sldx","sldm"].map(e=>[e,C.POWERPOINT]),...["rar"].map(e=>[e,C.RAR]),...["stp"].map(e=>[e,C.STP]),...["txt","rtf","md","mdown"].map(e=>[e,C.TEXT]),...["webm","mkv","flv","vob","ogv","ogg","drc","mng","wmv","yuv","rm","rmvb","asf","mpg","mp2","mpeg","mpe","mpv","m2v","svi","3gp","3g2","mxf","roq","nsv"].map(e=>[e,C.VIDEO]),...["wav"].map(e=>[e,C.WAV]),...["wma"].map(e=>[e,C.WMA]),...["doc","dot","docx","docm","dotx","dotm","docb"].map(e=>[e,C.WORD]),...["xml","xsl","rdf"].map(e=>[e,C.XML]),...["yaml","yml","x-yaml"].map(e=>[e,C.YAML]),...["zip"].map(e=>[e,C.ZIP])]);var Xh={[C.ABW]:"#91ABC6",[C.AUDIO]:"#1795E3",[C.AVI]:"#E63324",[C.CHM]:"#71C3EB",[C.CODE]:"#71C3EB",[C.CSV]:"#1F7345",[C.DITA]:"#71C3EB",[C.EPUB]:"#85B926",[C.EXCEL]:"#1F7345",[C.FLAC]:"#1795E3",[C.GIF]:"#59B031",[C.GZIP]:"#F8AB36",[C.HTML]:"#71C3EB",[C.IMAGE]:"#59B031",[C.JPEG]:"#59B031",[C.JSON]:"#71C3EB",[C.M4A]:"#1795E3",[C.MOV]:"#E63324",[C.MP3]:"#1795E3",[C.MP4]:"#E63324",[C.OGG]:"#1795E3",[C.PDF]:"#E44948",[C.PNG]:"#59B031",[C.POWERPOINT]:"#B54A2B",[C.RAR]:"#F8AB36",[C.STP]:"#3764B1",[C.TEXT]:"#3162AB",[C.UNKNOWN]:"#999999",[C.VIDEO]:"#E63324",[C.WAV]:"#1795E3",[C.WMA]:"#1795E3",[C.WORD]:"#3162AB",[C.XML]:"#71C3EB",[C.YAML]:"#71C3EB",[C.ZIP]:"#F8AB36"};var Aa=b(V()),tt=b(L()),oe={size:tt.FtCssVariableFactory.create("--ft-icon-font-size","","SIZE","24px"),fluidTopicsFontFamily:tt.FtCssVariableFactory.extend("--ft-icon-fluid-topics-font-family","",tt.FtCssVariableFactory.create("--ft-icon-font-family","","UNKNOWN","ft-icons")),fileFormatFontFamily:tt.FtCssVariableFactory.extend("--ft-icon-file-format-font-family","",tt.FtCssVariableFactory.create("--ft-icon-font-family","","UNKNOWN","ft-mime")),materialFontFamily:tt.FtCssVariableFactory.extend("--ft-icon-material-font-family","",tt.FtCssVariableFactory.create("--ft-icon-font-family","","UNKNOWN","Material Icons")),verticalAlign:tt.FtCssVariableFactory.create("--ft-icon-vertical-align","","UNKNOWN","unset")},Ra=Aa.css`
336
+ `}};De.elementDefinitions={"ft-ripple":j,"ft-typography":ie};De.styles=va;Vr([(0,hr.property)()],De.prototype,"title",void 0);Vr([(0,hr.property)({type:Boolean})],De.prototype,"clickable",void 0);Vr([(0,hr.property)({type:Boolean})],De.prototype,"selected",void 0);Vr([(0,hr.property)({type:Boolean})],De.prototype,"noHeader",void 0);(0,Ca.customElement)("ft-card")(De);var ln=b(L());var ro=b(V()),xe=b(te()),Ss=b(Ut()),no=b(L());var La=b(L());var mr=b(V()),Rt=b(te()),Na=b(L()),Ta=b(wa());var Zt;(function(e){e.ADD_TO_PBK="&#xe800;",e.ALERT="&#xe801;",e.ADD_ALERT="&#xe802;",e.BACK_TO_SEARCH="&#xe803;",e.ADD_BOOKMARK="&#xe804;",e.BOOKMARK="&#xe805;",e.BOOKS="&#xe806;",e.MENU="&#xe807;",e.DOWNLOAD="&#xe808;",e.EDIT="&#xe809;",e.FEEDBACK="&#xe80a;",e.HOME="&#xe80b;",e.MODIFY_PBK="&#xe80c;",e.SCHEDULED="&#xe80d;",e.SEARCH="&#xe80e;",e.EXPORT="&#xe80f;",e.TOC="&#xe810;",e.WRITE_UGC="&#xe811;",e.TRASH="&#xe812;",e.USER="&#xe813;",e.EXTLINK="&#xe814;",e.CALENDAR="&#xe815;",e.OFFLINE="&#xe816;",e.BOOK="&#xe817;",e.DOWNLOAD_PLAIN="&#xe818;",e.CHECK="&#xe819;",e.STAR_PLAIN="&#xe900;",e.TOPICS="&#xe901;",e.DISC="&#xe902;",e.CIRCLE="&#xe903;",e.SHARED="&#xe904;",e.SORT_UNSORTED="&#xe905;",e.SORT_UP="&#xe906;",e.SORT_DOWN="&#xe907;",e.WORKING="&#xe908;",e.CLOSE="&#xe909;",e.ZOOM_OUT="&#xe90a;",e.ZOOM_IN="&#xe90b;",e.ZOOM_REALSIZE="&#xe90c;",e.ZOOM_FULLSCREEN="&#xe90d;",e.ADMIN_RESTRICTED="&#xe90e;",e.ADMIN="&#xe90f;",e.ADMIN_KHUB="&#xe910;",e.ADMIN_THEME="&#xe911;",e.ADMIN_USERS="&#xe912;",e.WARNING="&#xe913;",e.CONTEXT="&#xe914;",e.SEARCH_HOME="&#xe915;",e.STEPS="&#xe916;",e.ICON_EXPAND="&#xe917;",e.ICON_COLLAPSE="&#xe918;",e.INFO="&#xe919;",e.MINUS_PLAIN="&#xe91a;",e.PLUS_PLAIN="&#xe91b;",e.FACET_HAS_DESCENDANT="&#xe91c;",e.TRIANGLE_BOTTOM="&#xe91d;",e.TRIANGLE_LEFT="&#xe91e;",e.TRIANGLE_RIGHT="&#xe91f;",e.TRIANGLE_TOP="&#xe920;",e.THIN_ARROW="&#xe921;",e.SIGN_IN="&#xe922;",e.LOGOUT="&#xe923;",e.TRANSLATE="&#xe924;",e.CLOSE_PLAIN="&#xe925;",e.CHECK_PLAIN="&#xe926;",e.ARTICLE="&#xe927;",e.COLUMNS="&#xe928;",e.ANALYTICS="&#xe929;",e.COLLECTIONS="&#xe92a;",e.ARROW_DOWN="&#xe92b;",e.ARROW_LEFT="&#xe92c;",e.ARROW_RIGHT="&#xe92d;",e.ARROW_UP="&#xe92e;",e.SEARCH_IN_PUBLICATION="&#xe92f;",e.COPY_TO_CLIPBOARD="&#xe930;",e.SHARED_PBK="&#xe931;",e.ATTACHMENTS="&#xe932;",e.STRIPE_ARROW_LEFT="&#xe933;",e.STRIPE_ARROW_RIGHT="&#xe934;",e.FILTERS="&#xe935;",e.DOT="&#xe936;",e.MINUS="&#xe937;",e.PLUS="&#xe938;",e.MAILS_AND_NOTIFICATIONS="&#xe939;",e.SAVE="&#xe93a;",e.LOCKER="&#xe93b;",e.ADMIN_INTEGRATION="&#xe93c;",e.SYNC="&#xe93d;",e.TAG="&#xe93e;",e.BOOK_PLAIN="&#xe93f;",e.UPLOAD="&#xe940;",e.ONLINE="&#xe941;",e.TAG_PLAIN="&#xe942;",e.ACCOUNT_SETTINGS="&#xe943;",e.PRINT="&#xe944;",e.DEFAULT_ROLES="&#xe945;",e.SHORTCUT_MENU="&#xe946;",e.RELATIVES_PLAIN="&#xe947;",e.RELATIVES="&#xe948;",e.PAUSE="&#xe949;",e.PLAY="&#xe94a;",e.ADMIN_PORTAL="&#xe94b;",e.STAR="&#xe94c;",e.THUMBS_DOWN="&#xe94d;",e.THUMBS_DOWN_PLAIN="&#xe94e;",e.THUMBS_UP="&#xe94f;",e.THUMBS_UP_PLAIN="&#xe950;",e.FEEDBACK_PLAIN="&#xe951;",e.RATE_PLAIN="&#xe952;",e.RATE="&#xe953;",e.OFFLINE_SETTINGS="&#xe954;",e.MY_COLLECTIONS="&#xe955;",e.THIN_ARROW_LEFT="&#xe956;",e.THIN_ARROW_RIGHT="&#xe957;",e.RESET="&#xe958;",e.MY_LIBRARY="&#xe959;",e.UNSTRUCTURED_DOC="&#xe95a;",e.CONTEXTUAL="&#xe95b;",e.THIN_ARROW_UP="&#xe95c;",e.ARROW_RIGHT_TO_LINE="&#xe95d;",e.DESKTOP="&#xe95e;",e.TABLET_LANDSCAPE="&#xe95f;",e.TABLET_PORTRAIT="&#xe960;",e.MOBILE_LANDSCAPE="&#xe961;",e.MOBILE_PORTRAIT="&#xe962;",e.DIAGRAM_SUNBURST="&#xe963;",e.DIAGRAM_SANKEY="&#xe964;",e.COMMENT_QUESTION="&#xe965;",e.COMMENT_QUESTION_PLAIN="&#xe966;",e.MESSAGE_BOT="&#xe967;",e.CHART_SIMPLE="&#xe968;",e.BARS_PROGRESS="&#xe969;",e.BOOK_OPEN_GEAR="&#xe96a;",e.BOOK_OPEN_GEAR_SLASH="&#xe96b;",e.LINE_CHART="&#xe96c;",e.STACKED_CHART="&#xe96d;",e.CHART_BAR_STACKED="&#xe96e;",e.CHART_BAR_GROUPED="&#xe96f;",e.EYE_SLASH="&#xe970;",e.X_MARK="&#xe971;",e.EXPAND_WIDE="&#xe972;",e.PIP="&#xe973;",e.PIP_WIDE="&#xe974;",e.LIFE_RING="&#xe975;",e.GLOBE="&#xe976;",e.PIGGY_BANK="&#xe977;",e.EXTLINK_LIGHT="&#xe978;",e.CLONE="&#xe979;",e.CLONE_LINK_SIMPLE="&#xe97a;",e.CHART_BAR_NORMALIZED="&#xe97b;",e.CONSUMER="&#xe97c;",e.OCTAGON_XMARK="&#xe97d;",e.HOURGLASS_HALF="&#xe97e;",e.CLOCK="&#xe97f;",e.CLOCK_THREE="&#xe97f;",e.CALENDAR_DAY="&#xe980;",e.COMPUTER_MOUSE_MAGNIFYING_GLASS="&#xe981;",e.WAND_MAGIC_SPARKLES="&#xe982;",e.PAPER_PLANE="&#xe983;",e.CIRCLE_STOP="&#xe984;",e.ARROW_ROTATE_RIGHT="&#xe985;",e.ARROWS_ROTATE="&#xe986;",e.ALIGN_RIGHT="&#xe987;",e.FORMAT_CLEAR="&#xe988;",e.ALIGN_CENTER="&#xe989;",e.ALIGN_LEFT="&#xe98a;",e.PALETTE="&#xe98b;",e.BOLD="&#xe98c;",e.ITALIC="&#xe98d;",e.UNDERLINE="&#xe98e;",e.STRIKETHROUGH="&#xe98f;",e.LINK_SIMPLE_SLASH="&#xe990;",e.LINK_SIMPLE="&#xe991;",e.ROUTE="&#xe992;",e.CIRCLE_USER_SLASH="&#xe993;",e.CIRCLE_USER_CHECK="&#xe994;",e.LIST_MAGNIFYING_GLASS="&#xe995;",e.MEDAL="&#xe996;",e.THUMBS_UP_THUMBS_DOWN_SOLID="&#xe997;",e.ARROW_TURN_DOWN_RIGHT="&#xe998;",e.FLASK="&#xe999;",e.LOCK_KEYHOLE_OPEN_SOLID="&#xe99a;",e.HOURGLASS_END="&#xe99b;",e.CIRCLE_QUESTION="&#xe99c;",e.EYE="&#xf06e;",e.SHARE="&#xe80f1;"})(Zt||(Zt={}));var C;(function(e){e.UNKNOWN="&#xe90a;",e.ABW="&#xe900;",e.AUDIO="&#xe901;",e.AVI="&#xe902;",e.CHM="&#xe904;",e.CODE="&#xe905;",e.CSV="&#xe903;",e.DITA="&#xe906;",e.EPUB="&#xe907;",e.EXCEL="&#xe908;",e.FLAC="&#xe909;",e.GIF="&#xe90b;",e.GZIP="&#xe90c;",e.HTML="&#xe90d;",e.IMAGE="&#xe90e;",e.JPEG="&#xe90f;",e.JSON="&#xe910;",e.M4A="&#xe911;",e.MOV="&#xe912;",e.MP3="&#xe913;",e.MP4="&#xe914;",e.OGG="&#xe915;",e.PDF="&#xe916;",e.PNG="&#xe917;",e.POWERPOINT="&#xe918;",e.RAR="&#xe91a;",e.STP="&#xe91b;",e.TEXT="&#xe91c;",e.VIDEO="&#xe91e;",e.WAV="&#xe91f;",e.WMA="&#xe920;",e.WORD="&#xe921;",e.XML="&#xe922;",e.YAML="&#xe919;",e.ZIP="&#xe923;"})(C||(C={}));var Yh=new Map([...["abw"].map(e=>[e,C.ABW]),...["3gp","act","aiff","aac","amr","au","awb","dct","dss","dvf","gsm","iklax","ivs","mmf","mpc","msv","opus","ra","rm","raw","sln","tta","vox","wv"].map(e=>[e,C.AUDIO]),...["avi"].map(e=>[e,C.AVI]),...["chm","xhs"].map(e=>[e,C.CHM]),...["java","py","php","php3","php4","php5","js","javascript","rb","rbw","c","cpp","cxx","h","hh","hpp","hxx","sh","bash","zsh","tcsh","ksh","csh","vb","scala","pl","prl","perl","groovy","ceylon","aspx","jsp","scpt","applescript","bas","bat","lua","jsp","mk","cmake","css","sass","less","m","mm","xcodeproj"].map(e=>[e,C.CODE]),...["csv"].map(e=>[e,C.CSV]),...["dita","ditamap","ditaval"].map(e=>[e,C.DITA]),...["epub"].map(e=>[e,C.EPUB]),...["xls","xlt","xlm","xlsx","xlsm","xltx","xltm","xlsb","xla","xlam","xll","xlw"].map(e=>[e,C.EXCEL]),...["flac"].map(e=>[e,C.FLAC]),...["gif"].map(e=>[e,C.GIF]),...["gzip","x-gzip","giz","gz","tgz"].map(e=>[e,C.GZIP]),...["html","htm","xhtml"].map(e=>[e,C.HTML]),...["ai","vml","xps","img","cpt","psd","psp","xcf","svg","svg+xml","bmp","bpg","ppm","pgm","pbm","pnm","rif","tif","tiff","webp","wmf","ico"].map(e=>[e,C.IMAGE]),...["jpeg","jpg","jpe"].map(e=>[e,C.JPEG]),...["json"].map(e=>[e,C.JSON]),...["m4a","m4p"].map(e=>[e,C.M4A]),...["mov","qt"].map(e=>[e,C.MOV]),...["mp3"].map(e=>[e,C.MP3]),...["mp4","m4v"].map(e=>[e,C.MP4]),...["ogg","oga"].map(e=>[e,C.OGG]),...["pdf","ps"].map(e=>[e,C.PDF]),...["png"].map(e=>[e,C.PNG]),...["ppt","pot","pps","pptx","pptm","potx","potm","ppam","ppsx","ppsm","sldx","sldm"].map(e=>[e,C.POWERPOINT]),...["rar"].map(e=>[e,C.RAR]),...["stp"].map(e=>[e,C.STP]),...["txt","rtf","md","mdown"].map(e=>[e,C.TEXT]),...["webm","mkv","flv","vob","ogv","ogg","drc","mng","wmv","yuv","rm","rmvb","asf","mpg","mp2","mpeg","mpe","mpv","m2v","svi","3gp","3g2","mxf","roq","nsv"].map(e=>[e,C.VIDEO]),...["wav"].map(e=>[e,C.WAV]),...["wma"].map(e=>[e,C.WMA]),...["doc","dot","docx","docm","dotx","dotm","docb"].map(e=>[e,C.WORD]),...["xml","xsl","rdf"].map(e=>[e,C.XML]),...["yaml","yml","x-yaml"].map(e=>[e,C.YAML]),...["zip"].map(e=>[e,C.ZIP])]);var Xh={[C.ABW]:"#91ABC6",[C.AUDIO]:"#1795E3",[C.AVI]:"#E63324",[C.CHM]:"#71C3EB",[C.CODE]:"#71C3EB",[C.CSV]:"#1F7345",[C.DITA]:"#71C3EB",[C.EPUB]:"#85B926",[C.EXCEL]:"#1F7345",[C.FLAC]:"#1795E3",[C.GIF]:"#59B031",[C.GZIP]:"#F8AB36",[C.HTML]:"#71C3EB",[C.IMAGE]:"#59B031",[C.JPEG]:"#59B031",[C.JSON]:"#71C3EB",[C.M4A]:"#1795E3",[C.MOV]:"#E63324",[C.MP3]:"#1795E3",[C.MP4]:"#E63324",[C.OGG]:"#1795E3",[C.PDF]:"#E44948",[C.PNG]:"#59B031",[C.POWERPOINT]:"#B54A2B",[C.RAR]:"#F8AB36",[C.STP]:"#3764B1",[C.TEXT]:"#3162AB",[C.UNKNOWN]:"#999999",[C.VIDEO]:"#E63324",[C.WAV]:"#1795E3",[C.WMA]:"#1795E3",[C.WORD]:"#3162AB",[C.XML]:"#71C3EB",[C.YAML]:"#71C3EB",[C.ZIP]:"#F8AB36"};var Aa=b(V()),tt=b(L()),oe={size:tt.FtCssVariableFactory.create("--ft-icon-font-size","","SIZE","24px"),fluidTopicsFontFamily:tt.FtCssVariableFactory.extend("--ft-icon-fluid-topics-font-family","",tt.FtCssVariableFactory.create("--ft-icon-font-family","","UNKNOWN","ft-icons")),fileFormatFontFamily:tt.FtCssVariableFactory.extend("--ft-icon-file-format-font-family","",tt.FtCssVariableFactory.create("--ft-icon-font-family","","UNKNOWN","ft-mime")),materialFontFamily:tt.FtCssVariableFactory.extend("--ft-icon-material-font-family","",tt.FtCssVariableFactory.create("--ft-icon-font-family","","UNKNOWN","Material Icons")),verticalAlign:tt.FtCssVariableFactory.create("--ft-icon-vertical-align","","UNKNOWN","unset")},Ra=Aa.css`
337
337
  :host, i.ft-icon {
338
338
  display: inline-flex;
339
339
  align-items: center;
@@ -1282,35 +1282,41 @@ Also for action icons.`,c.colorGray200),contentGlobalSubtle:r.extend("--ft-conte
1282
1282
  </span>
1283
1283
  `}update(t){var o;super.update(t),["context","key","defaultMessage"].some(n=>t.has(n))&&this.context&&this.key&&this.addI18nMessages(this.context,{[this.key]:(o=this.defaultMessage)!==null&&o!==void 0?o:""})}};Ve.elementDefinitions={};Ve.styles=Zc;Dr([(0,ko.redux)()],Ve.prototype,"editorMode",void 0);Dr([(0,_o.property)()],Ve.prototype,"context",void 0);Dr([(0,_o.property)()],Ve.prototype,"key",void 0);Dr([(0,ko.jsonProperty)([])],Ve.prototype,"args",void 0);Dr([(0,_o.property)()],Ve.prototype,"defaultMessage",void 0);var Do=class e{static build(t){return new e(t)}static fromGwt(t){return new e(t)}constructor(t){this.name=t,this.properties=new Proxy({},{get:(o,n)=>{let i=n;return a=>({context:this.name,key:i,args:typeof a=="function"?void 0:a,argsProvider:typeof a=="function"?a:void 0})}}),this.messages=new Proxy({},{get:(o,n)=>(...i)=>kt.resolveMessage(this.name,n,...i)}),this.rawMessages=new Proxy({},{get:(o,n)=>kt.resolveRawMessage(this.name,n)})}};(0,Xc.customElement)("ft-i18n")(Ve);var de=Do.build("savedSearchesComponent"),Qc={keywords:"Keywords",language:"Language",sort:"Sort",period:"Period",relevance:"Relevance",lastUpdate:"Last update",lastWeek:"Less than one week",lastMonth:"Less than one month",lastYear:"Less than one year",customPeriod:"Custom period",search:"Search",in:"In",titles:"Titles",resultsType:"Results type",documentsOnly:"Documents only"};var St=function(e,t,o,n){var i=arguments.length,a=i<3?t:n===null?n=Object.getOwnPropertyDescriptor(t,o):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")a=Reflect.decorate(e,t,o,n);else for(var l=e.length-1;l>=0;l--)(s=e[l])&&(a=(i<3?s(a):i>3?s(t,o,a):s(t,o))||a);return i>3&&a&&Object.defineProperty(t,o,a),a},Ne=class extends Po(Ro){constructor(){super(),this.showDescription=!1,this.showSearchFilters=!1,this.showSearchButton=!1,this.showAlertStatus=!1,this.requiredRole=ne.SAVED_SEARCH_USER,this.addStore(I),this.addStore(Ft),this.addI18nContext(de,Qc)}render(){var t;return this.userHasRights&&!this.isEmpty?X.html`
1284
1284
  <div part="container">
1285
- ${(0,Jc.repeat)((t=this.savedSearches)!==null&&t!==void 0?t:[],o=>o.id,o=>{let n=this.toFtSearchRequest(o.searchRequest);if(n===void 0)return X.nothing;let i=(0,Re.serializeRequest)(this.baseUrl,n);return X.html`
1286
- <a href="${i}" @click="${a=>this.onLinkClick(a,n)}">
1287
- <ft-card clickable ?selected="${this.isSelected(o.searchRequest)}" part="card">
1288
- <div slot="header">
1289
- <ft-typography variant="title">${o.title}</ft-typography>
1290
- ${this.renderAlertStatus(o.alert)}
1291
- </div>
1292
-
1293
- <div part="card-content">
1294
- ${this.renderDescription(o.description)}
1295
- ${this.renderSearchFilters(o.searchRequest)}
1296
- ${this.renderSearchButton(this.isSelected(o.searchRequest))}
1297
- </div>
1298
- </ft-card>
1299
- </a>
1300
- `})}
1285
+ ${(0,Jc.repeat)((t=this.savedSearches)!==null&&t!==void 0?t:[],o=>o.id,o=>{var n;let i=this.toFtSearchRequest(o.searchRequest);return i===void 0?X.nothing:X.html`
1286
+ <a href="${(n=this.searchPlaceConverter)===null||n===void 0?void 0:n.serialize(i)}"
1287
+ @click="${a=>this.onLinkClick(a,i)}">
1288
+ <ft-card clickable ?selected="${this.isSelected(o.searchRequest)}" part="card">
1289
+ <div slot="header">
1290
+ <ft-typography variant="title">${o.title}</ft-typography>
1291
+ ${this.renderAlertStatus(o.alert)}
1292
+ </div>
1293
+ <div part="card-content">
1294
+ ${this.renderDescription(o.description)}
1295
+ ${this.renderSearchFilters(o.searchRequest)}
1296
+ ${this.renderSearchButton(this.isSelected(o.searchRequest))}
1297
+ </div>
1298
+ </ft-card>
1299
+ </a>
1300
+ `})}
1301
1301
  </div>
1302
- `:X.nothing}renderDescription(t){return this.showDescription&&t?X.html`<div part="description" class="content">${t}</div>`:X.nothing}renderSearchButton(t){return this.showSearchButton?X.html`<div part="search-button"><ft-button id="search" icon="search" ?disabled=${t}>${de.messages.search()}</ft-button></div>`:X.nothing}renderAlertStatus(t){return this.showAlertStatus&&t?X.html`<ft-icon part="alert-status">alert</ft-icon>`:X.nothing}renderSearchFilters(t){var o,n,i,a,s,l,p;return this.showSearchFilters?X.html`<div part="search-filters" class="content">
1303
- ${(o=t.query.length)!==null&&o!==void 0&&o?this.renderMetadata(de.messages.keywords(),t.query):X.nothing}
1304
- ${t.virtualField==Ir.TITLE_ONLY?this.renderMetadata(de.messages.in(),de.messages.titles()):X.nothing}
1305
- ${t.scope==_r.DOCUMENTS?this.renderMetadata(de.messages.resultsType(),de.messages.documentsOnly()):X.nothing}
1306
- ${(i=(n=t.metadataFilters)===null||n===void 0?void 0:n.map(u=>this.renderUnknownFilter(u)))!==null&&i!==void 0?i:X.nothing}
1307
- ${(s=(a=t.contentLocale)===null||a===void 0?void 0:a.length)!==null&&s!==void 0&&s?this.renderMetadata(de.messages.language(),t.contentLocale):X.nothing}
1308
- ${(p=(l=t.sort[0])===null||l===void 0?void 0:l.key.length)!==null&&p!==void 0&&p?this.renderMetadata(de.messages.sort(),this.mapSortKey(t.sort[0].key)):X.nothing}
1309
- </div>`:X.nothing}renderMetadata(t,o){return X.html`
1302
+ `:X.nothing}renderDescription(t){return this.showDescription&&t?X.html`
1303
+ <div part="description" class="content">${t}</div>`:X.nothing}renderSearchButton(t){return this.showSearchButton?X.html`
1304
+ <div part="search-button">
1305
+ <ft-button id="search" icon="search" ?disabled=${t}>${de.messages.search()}</ft-button>
1306
+ </div>`:X.nothing}renderAlertStatus(t){return this.showAlertStatus&&t?X.html`
1307
+ <ft-icon part="alert-status">alert</ft-icon>`:X.nothing}renderSearchFilters(t){var o,n,i,a,s,l,p;return this.showSearchFilters?X.html`
1308
+ <div part="search-filters" class="content">
1309
+ ${(o=t.query.length)!==null&&o!==void 0&&o?this.renderMetadata(de.messages.keywords(),t.query):X.nothing}
1310
+ ${t.virtualField==Ir.TITLE_ONLY?this.renderMetadata(de.messages.in(),de.messages.titles()):X.nothing}
1311
+ ${t.scope==_r.DOCUMENTS?this.renderMetadata(de.messages.resultsType(),de.messages.documentsOnly()):X.nothing}
1312
+ ${(i=(n=t.metadataFilters)===null||n===void 0?void 0:n.map(u=>this.renderUnknownFilter(u)))!==null&&i!==void 0?i:X.nothing}
1313
+ ${(s=(a=t.contentLocale)===null||a===void 0?void 0:a.length)!==null&&s!==void 0&&s?this.renderMetadata(de.messages.language(),t.contentLocale):X.nothing}
1314
+ ${(p=(l=t.sort[0])===null||l===void 0?void 0:l.key.length)!==null&&p!==void 0&&p?this.renderMetadata(de.messages.sort(),this.mapSortKey(t.sort[0].key)):X.nothing}
1315
+ </div>`:X.nothing}renderMetadata(t,o){return X.html`
1310
1316
  <ft-chip dense part="chip">
1311
1317
  <span part="metadata-label">${t}</span>
1312
1318
  <span part="metadata-values">${Array.isArray(o)?o.join(", "):o}</span>
1313
- </ft-chip>`}renderUnknownFilter(t){return t.valueFilter?this.renderValueFilter(t.label,t.valueFilter):t.dateFilter?this.renderDateFilter(t.dateFilter):t.rangeFilter?this.renderRangeFilter():X.nothing}renderValueFilter(t,o){return this.renderMetadata(t,o.values)}renderDateFilter(t){return this.renderMetadata(de.messages.period(),this.mapDateFilterType(t.type))}renderRangeFilter(){return this.renderMetadata(de.messages.period(),de.messages.customPeriod())}mapSortKey(t){switch(t){case"afs:relevance":return de.messages.relevance();case"ft:lastEdition":return de.messages.lastUpdate();default:return t}}mapDateFilterType(t){switch(t){case sr.LAST_WEEK:return de.messages.lastWeek();case sr.LAST_MONTH:return de.messages.lastMonth();case sr.LAST_YEAR:return de.messages.lastYear();default:return"--"}}get userHasRights(){return Vc(this.user,this.requiredRole)}get isEmpty(){var t;return((t=this.savedSearches)!==null&&t!==void 0?t:[]).length==0}isSelected(t){var o,n,i,a,s;return this.request!=null&&(0,Re.deepEqual)(this.request.query,t.query)&&this.areFtMetadataFiltersEqual([...this.request.metadataFilters],[...(o=t.metadataFilters)!==null&&o!==void 0?o:[]].map(this.toMetadataFilter))&&(0,Re.deepEqual)([...this.request.sort].map(this.mapFtSearchSortCriterion),[...t.sort].map(this.mapFtSearchSortCriterion))&&(0,Re.deepEqual)(this.request.contentLocale,t.contentLocale)&&(0,Re.deepEqual)((n=this.request.virtualField)!==null&&n!==void 0?n:"EVERYWHERE",(i=t.virtualField)!==null&&i!==void 0?i:"EVERYWHERE")&&(0,Re.deepEqual)((a=this.request.scope)!==null&&a!==void 0?a:"DEFAULT",(s=t.scope)!==null&&s!==void 0?s:"DEFAULT")}areFtMetadataFiltersEqual(t,o){if(!(0,Re.deepEqual)(t.map(i=>i.key).sort(),o.map(i=>i.key).sort()))return!1;let n=(i,a)=>i.key===a.key&&this.compareUnknownFilter(i,a);for(let i of t)if(!o.find(s=>n(i,s)))return!1;return!0}compareUnknownFilter(t,o){return t.valueFilter&&o.valueFilter?this.compareValueFilter(t.valueFilter,o.valueFilter):t.dateFilter&&o.dateFilter?this.compareDateFilter(t.dateFilter,o.dateFilter):t.rangeFilter&&o.rangeFilter?this.compareRangeFilter(t.rangeFilter,o.rangeFilter):!1}compareValueFilter(t,o){return t.negative===o.negative&&t.values.length===o.values.length&&t.values.every(n=>o.values.includes(n))}compareDateFilter(t,o){return t.type===o.type}compareRangeFilter(t,o){return t.from===o.from&&t.to===o.to}mapFtSearchSortCriterion(t){return{...t}}toFtSearchRequest(t){var o,n;return this.request==null?void 0:{...this.request,query:t.query,metadataFilters:(n=(o=t.metadataFilters)===null||o===void 0?void 0:o.map(this.toMetadataFilter))!==null&&n!==void 0?n:[],sort:t.sort,contentLocale:t.contentLocale,virtualField:t.virtualField,scope:t.scope}}toMetadataFilter(t){return{key:t.key,valueFilter:t.valueFilter,dateFilter:t.dateFilter,rangeFilter:t.rangeFilter}}connectedCallback(){super.connectedCallback(),Hn.reloadMySearches()}onLinkClick(t,o){var n;!t.ctrlKey&&!t.metaKey&&(t.stopPropagation(),t.preventDefault(),(n=this.stateManager)===null||n===void 0||n.setRequest(o),this.click())}update(t){super.update(t),(t.has("user")||t.has("savedSearches"))&&this.savedSearches==null&&Hn.reloadMySearches()}};Ne.styles=As;Ne.elementDefinitions={"ft-typography":ie,"ft-icon":ce,"ft-card":De,"ft-chip":J,"ft-button":Le};St([(0,Br.property)({type:Boolean})],Ne.prototype,"showDescription",void 0);St([(0,Br.property)({type:Boolean})],Ne.prototype,"showSearchFilters",void 0);St([(0,Br.property)({type:Boolean})],Ne.prototype,"showSearchButton",void 0);St([(0,Br.property)({type:Boolean})],Ne.prototype,"showAlertStatus",void 0);St([(0,Re.redux)({store:Ft.name})],Ne.prototype,"savedSearches",void 0);St([(0,Re.redux)({store:I.name,selector:e=>{var t;return(t=e.session)===null||t===void 0?void 0:t.profile}})],Ne.prototype,"user",void 0);St([(0,Re.redux)({store:I.name})],Ne.prototype,"baseUrl",void 0);St([(0,Re.redux)({store:"search"})],Ne.prototype,"request",void 0);(0,el.customElement)("ft-search-saved-searches")(Ne);})();
1319
+ </ft-chip>`}renderUnknownFilter(t){return t.valueFilter?this.renderValueFilter(t.label,t.valueFilter):t.dateFilter?this.renderDateFilter(t.dateFilter):t.rangeFilter?this.renderRangeFilter():X.nothing}renderValueFilter(t,o){return this.renderMetadata(t,o.values)}renderDateFilter(t){return this.renderMetadata(de.messages.period(),this.mapDateFilterType(t.type))}renderRangeFilter(){return this.renderMetadata(de.messages.period(),de.messages.customPeriod())}mapSortKey(t){switch(t){case"afs:relevance":return de.messages.relevance();case"ft:lastEdition":return de.messages.lastUpdate();default:return t}}mapDateFilterType(t){switch(t){case sr.LAST_WEEK:return de.messages.lastWeek();case sr.LAST_MONTH:return de.messages.lastMonth();case sr.LAST_YEAR:return de.messages.lastYear();default:return"--"}}get userHasRights(){return Vc(this.user,this.requiredRole)}get isEmpty(){var t;return((t=this.savedSearches)!==null&&t!==void 0?t:[]).length==0}isSelected(t){var o,n,i,a,s;return this.request!=null&&(0,Re.deepEqual)(this.request.query,t.query)&&this.areFtMetadataFiltersEqual([...this.request.metadataFilters],[...(o=t.metadataFilters)!==null&&o!==void 0?o:[]].map(this.toMetadataFilter))&&(0,Re.deepEqual)([...this.request.sort].map(this.mapFtSearchSortCriterion),[...t.sort].map(this.mapFtSearchSortCriterion))&&(0,Re.deepEqual)(this.request.contentLocale,t.contentLocale)&&(0,Re.deepEqual)((n=this.request.virtualField)!==null&&n!==void 0?n:"EVERYWHERE",(i=t.virtualField)!==null&&i!==void 0?i:"EVERYWHERE")&&(0,Re.deepEqual)((a=this.request.scope)!==null&&a!==void 0?a:"DEFAULT",(s=t.scope)!==null&&s!==void 0?s:"DEFAULT")}areFtMetadataFiltersEqual(t,o){if(!(0,Re.deepEqual)(t.map(i=>i.key).sort(),o.map(i=>i.key).sort()))return!1;let n=(i,a)=>i.key===a.key&&this.compareUnknownFilter(i,a);for(let i of t)if(!o.find(s=>n(i,s)))return!1;return!0}compareUnknownFilter(t,o){return t.valueFilter&&o.valueFilter?this.compareValueFilter(t.valueFilter,o.valueFilter):t.dateFilter&&o.dateFilter?this.compareDateFilter(t.dateFilter,o.dateFilter):t.rangeFilter&&o.rangeFilter?this.compareRangeFilter(t.rangeFilter,o.rangeFilter):!1}compareValueFilter(t,o){return t.negative===o.negative&&t.values.length===o.values.length&&t.values.every(n=>o.values.includes(n))}compareDateFilter(t,o){return t.type===o.type}compareRangeFilter(t,o){return t.from===o.from&&t.to===o.to}mapFtSearchSortCriterion(t){return{...t}}toFtSearchRequest(t){var o,n;return this.request==null?void 0:{...this.request,query:t.query,metadataFilters:(n=(o=t.metadataFilters)===null||o===void 0?void 0:o.map(this.toMetadataFilter))!==null&&n!==void 0?n:[],sort:t.sort,contentLocale:t.contentLocale,virtualField:t.virtualField,scope:t.scope}}toMetadataFilter(t){return{key:t.key,valueFilter:t.valueFilter,dateFilter:t.dateFilter,rangeFilter:t.rangeFilter}}connectedCallback(){super.connectedCallback(),Hn.reloadMySearches()}onLinkClick(t,o){var n;!t.ctrlKey&&!t.metaKey&&(t.stopPropagation(),t.preventDefault(),(n=this.stateManager)===null||n===void 0||n.setRequest(o),this.click())}update(t){super.update(t),(t.has("user")||t.has("savedSearches"))&&this.savedSearches==null&&Hn.reloadMySearches(),t.has("baseUrl")&&this.baseUrl&&(this.searchPlaceConverter=new Re.SearchPlaceConverter(this.baseUrl,{}))}};Ne.styles=As;Ne.elementDefinitions={"ft-typography":ie,"ft-icon":ce,"ft-card":De,"ft-chip":J,"ft-button":Le};St([(0,Br.property)({type:Boolean})],Ne.prototype,"showDescription",void 0);St([(0,Br.property)({type:Boolean})],Ne.prototype,"showSearchFilters",void 0);St([(0,Br.property)({type:Boolean})],Ne.prototype,"showSearchButton",void 0);St([(0,Br.property)({type:Boolean})],Ne.prototype,"showAlertStatus",void 0);St([(0,Re.redux)({store:Ft.name})],Ne.prototype,"savedSearches",void 0);St([(0,Re.redux)({store:I.name,selector:e=>{var t;return(t=e.session)===null||t===void 0?void 0:t.profile}})],Ne.prototype,"user",void 0);St([(0,Re.redux)({store:I.name})],Ne.prototype,"baseUrl",void 0);St([(0,Re.redux)({store:"search"})],Ne.prototype,"request",void 0);(0,el.customElement)("ft-search-saved-searches")(Ne);})();
1314
1320
  /*! Bundled license information:
1315
1321
 
1316
1322
  lit-html/lit-html.js: