@fluid-topics/ft-analytics-top-documents 1.0.54 → 1.0.56

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.
@@ -11,7 +11,7 @@ export declare class FtAnalyticsTopDocuments extends FtLitElement implements FtA
11
11
  static styles: import("lit").CSSResult;
12
12
  render(): import("lit-html").TemplateResult<1>;
13
13
  renderDocument(document: Document): import("lit-html").TemplateResult<1>;
14
- protected updated(props: PropertyValues): void;
14
+ protected update(props: PropertyValues): void;
15
15
  private fetchDocuments;
16
16
  private static getIcon;
17
17
  }
@@ -60,8 +60,8 @@ class FtAnalyticsTopDocuments extends FtLitElement {
60
60
  </tr>
61
61
  `;
62
62
  }
63
- updated(props) {
64
- super.updated(props);
63
+ update(props) {
64
+ super.update(props);
65
65
  if (props.has("baseUrl")) {
66
66
  this.fetchDocuments().catch(error => console.error("Cannot fetch documents: ", error));
67
67
  }
@@ -56,7 +56,7 @@ o.version="2.29.4",s=Ln,o.fn=Wi,o.min=function(){return In("isBefore",[].slice.c
56
56
  ${t.title}
57
57
  </td>
58
58
  </tr>
59
- `}updated(t){super.updated(t),t.has("baseUrl")&&this.fetchDocuments().catch((t=>console.error("Cannot fetch documents: ",t)))}async fetchDocuments(){if(this.baseUrl){let t=await fetch(this.baseUrl+"/analytics/api/v2/documents/views-top",{method:"POST",headers:{"Content-Type":"application/json","Ft-Calling-App":"analytics/web-component"},body:JSON.stringify({endDate:this.endDate,paging:{page:1,perPage:this.documentNumber},startDate:this.startDate})});t.ok?(this.documents=(await t.json()).results,0===this.documents.length&&(this.emptyResults=!0)):console.log((await t.json()).message)}}static getIcon(t){switch(t){case"STRUCTURED_DOCUMENT":return i.html`
59
+ `}update(t){super.update(t),t.has("baseUrl")&&this.fetchDocuments().catch((t=>console.error("Cannot fetch documents: ",t)))}async fetchDocuments(){if(this.baseUrl){let t=await fetch(this.baseUrl+"/analytics/api/v2/documents/views-top",{method:"POST",headers:{"Content-Type":"application/json","Ft-Calling-App":"analytics/web-component"},body:JSON.stringify({endDate:this.endDate,paging:{page:1,perPage:this.documentNumber},startDate:this.startDate})});t.ok?(this.documents=(await t.json()).results,0===this.documents.length&&(this.emptyResults=!0)):console.log((await t.json()).message)}}static getIcon(t){switch(t){case"STRUCTURED_DOCUMENT":return i.html`
60
60
  <ft-icon>BOOK_PLAIN</ft-icon>
61
61
  `;case"UNSTRUCTURED_DOCUMENT":case"MAP_ATTACHMENT":case"RESOURCE":return i.html`
62
62
  <ft-icon variant="file-format">UNKNOWN</ft-icon>
@@ -152,7 +152,7 @@ const Hr=2;class Ar{constructor(t){}get _$AU(){return this._$AM._$AU}_$AT(t,n,i)
152
152
  ${t.title}
153
153
  </td>
154
154
  </tr>
155
- `}updated(t){super.updated(t),t.has("baseUrl")&&this.fetchDocuments().catch((t=>console.error("Cannot fetch documents: ",t)))}async fetchDocuments(){if(this.baseUrl){let t=await fetch(this.baseUrl+"/analytics/api/v2/documents/views-top",{method:"POST",headers:{"Content-Type":"application/json","Ft-Calling-App":"analytics/web-component"},body:JSON.stringify({endDate:this.endDate,paging:{page:1,perPage:this.documentNumber},startDate:this.startDate})});t.ok?(this.documents=(await t.json()).results,0===this.documents.length&&(this.emptyResults=!0)):console.log((await t.json()).message)}}static getIcon(t){switch(t){case"STRUCTURED_DOCUMENT":return B`
155
+ `}update(t){super.update(t),t.has("baseUrl")&&this.fetchDocuments().catch((t=>console.error("Cannot fetch documents: ",t)))}async fetchDocuments(){if(this.baseUrl){let t=await fetch(this.baseUrl+"/analytics/api/v2/documents/views-top",{method:"POST",headers:{"Content-Type":"application/json","Ft-Calling-App":"analytics/web-component"},body:JSON.stringify({endDate:this.endDate,paging:{page:1,perPage:this.documentNumber},startDate:this.startDate})});t.ok?(this.documents=(await t.json()).results,0===this.documents.length&&(this.emptyResults=!0)):console.log((await t.json()).message)}}static getIcon(t){switch(t){case"STRUCTURED_DOCUMENT":return B`
156
156
  <ft-icon>BOOK_PLAIN</ft-icon>
157
157
  `;case"UNSTRUCTURED_DOCUMENT":case"MAP_ATTACHMENT":case"RESOURCE":return B`
158
158
  <ft-icon variant="file-format">UNKNOWN</ft-icon>
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@fluid-topics/ft-analytics-top-documents",
3
- "version": "1.0.54",
3
+ "version": "1.0.56",
4
4
  "description": "List the most viewed documents",
5
5
  "keywords": [
6
6
  "Lit"
@@ -19,11 +19,11 @@
19
19
  "url": "ssh://git@scm.mrs.antidot.net:2222/fluidtopics/ft-web-components.git"
20
20
  },
21
21
  "dependencies": {
22
- "@fluid-topics/ft-icon": "1.0.54",
23
- "@fluid-topics/ft-loader": "1.0.54",
24
- "@fluid-topics/ft-typography": "1.0.54",
25
- "@fluid-topics/ft-wc-utils": "1.0.54",
22
+ "@fluid-topics/ft-icon": "1.0.56",
23
+ "@fluid-topics/ft-loader": "1.0.56",
24
+ "@fluid-topics/ft-typography": "1.0.56",
25
+ "@fluid-topics/ft-wc-utils": "1.0.56",
26
26
  "lit": "2.7.2"
27
27
  },
28
- "gitHead": "d1045741e4bd9965f6a8319b4df0534b7eec46ba"
28
+ "gitHead": "da00d6ea6bfc74fef8c6687f383355e35a26289b"
29
29
  }