@fluid-topics/ft-analytics-top-documents 2.1.19 → 2.1.20

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.
@@ -4,8 +4,8 @@ var __decorate = (this && this.__decorate) || function (decorators, target, key,
4
4
  else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
5
5
  return c > 3 && r && Object.defineProperty(target, key, r), r;
6
6
  };
7
- import { html } from "lit";
8
- import { property, state } from "lit/decorators.js";
7
+ import { html, } from "lit";
8
+ import { property, state, } from "lit/decorators.js";
9
9
  import { FtLitElement } from "@fluid-topics/ft-wc-utils";
10
10
  import moment from "moment";
11
11
  import { repeat } from "lit/directives/repeat.js";
@@ -39,7 +39,7 @@ export class FtAnalyticsTopDocuments extends FtLitElement {
39
39
  return html `
40
40
  <div class="ft-analytics-top-documents">
41
41
  <table>
42
- ${repeat(this.documents, document => this.renderDocument(document))}
42
+ ${repeat(this.documents, (document) => this.renderDocument(document))}
43
43
  </table>
44
44
  </div>
45
45
  `;
@@ -63,12 +63,12 @@ export class FtAnalyticsTopDocuments extends FtLitElement {
63
63
  update(props) {
64
64
  super.update(props);
65
65
  if (props.has("baseUrl")) {
66
- this.fetchDocuments().catch(error => console.error("Cannot fetch documents: ", error));
66
+ this.fetchDocuments().catch((error) => console.error("Cannot fetch documents: ", error));
67
67
  }
68
68
  }
69
69
  async fetchDocuments() {
70
70
  if (this.baseUrl) {
71
- let response = await fetch(this.baseUrl + `/analytics/api/v2/documents/views-top`, {
71
+ const response = await fetch(this.baseUrl + `/analytics/api/v2/documents/views-top`, {
72
72
  method: "POST",
73
73
  headers: {
74
74
  "Content-Type": "application/json",
@@ -78,10 +78,10 @@ export class FtAnalyticsTopDocuments extends FtLitElement {
78
78
  endDate: this.endDate,
79
79
  paging: {
80
80
  page: 1,
81
- perPage: this.documentNumber
81
+ perPage: this.documentNumber,
82
82
  },
83
- startDate: this.startDate
84
- })
83
+ startDate: this.startDate,
84
+ }),
85
85
  });
86
86
  if (response.ok) {
87
87
  this.documents = (await response.json()).results;
@@ -5,7 +5,7 @@ Also for action icons.`,c.colorGray200),contentGlobalSubtle:o.extend("--ftds-con
5
5
  .highlight-html-match {
6
6
  background: ${gc};
7
7
  }
8
- `;function Vf(e,t,r){var n,a;let i=e.getAttribute("data-highlight-html-query");if((i??"")!==(t??"")){let s=new Gf(e);if(s.unmark(),t&&t.trim()){let l={className:(n=r?.className)!==null&&n!==void 0?n:"highlight-html-match",acrossElements:!0};r?.attributes!=null&&(l.each=(f=>{for(let h in r.attributes)f.setAttribute(h,r.attributes[h])})),s.mark(t.replace(/"[^"]+"/g,""),{...l,separateWordSearch:!0}),((a=t.match(/"[^"]+"/g))!==null&&a!==void 0?a:[]).forEach(f=>s.mark(f.replace(/"/g,""),{...l,separateWordSearch:!1}))}}e.setAttribute("data-highlight-html-query",t??"")}var aa={};B(aa,{noTextInputDefaultClearButton:()=>Zf,noTextSelect:()=>jf,safariEllipsisFix:()=>Kf,wordWrap:()=>Yf});var jf=J`
8
+ `;function Vf(e,t,r){var n,a;let i=e.getAttribute("data-highlight-html-query");if((i??"")!==(t??"")){let s=new Gf(e);if(s.unmark(),t&&t.trim()){let l={className:(n=r?.className)!==null&&n!==void 0?n:"highlight-html-match",acrossElements:!0};r?.attributes!=null&&(l.each=f=>{for(let h in r.attributes)f.setAttribute(h,r.attributes[h])}),s.mark(t.replace(/"[^"]+"/g,""),{...l,separateWordSearch:!0}),((a=t.match(/"[^"]+"/g))!==null&&a!==void 0?a:[]).forEach(f=>s.mark(f.replace(/"/g,""),{...l,separateWordSearch:!1}))}}e.setAttribute("data-highlight-html-query",t??"")}var aa={};B(aa,{noTextInputDefaultClearButton:()=>Zf,noTextSelect:()=>jf,safariEllipsisFix:()=>Kf,wordWrap:()=>Yf});var jf=J`
9
9
  .ft-no-text-select {
10
10
  -webkit-touch-callout: none;
11
11
  -webkit-user-select: none;
@@ -1,5 +1,5 @@
1
1
  import { css } from "lit";
2
- import { designSystemVariables, FtCssVariableFactory } from "@fluid-topics/ft-wc-utils";
2
+ import { designSystemVariables, FtCssVariableFactory, } from "@fluid-topics/ft-wc-utils";
3
3
  export const FtAnalyticsTopDocumentsCssVariables = {
4
4
  contentFont: FtCssVariableFactory.external(designSystemVariables.contentFont, "Design system"),
5
5
  colorOnSurfaceHigh: FtCssVariableFactory.external(designSystemVariables.colorOnSurfaceHigh, "Design system"),
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@fluid-topics/ft-analytics-top-documents",
3
- "version": "2.1.19",
3
+ "version": "2.1.20",
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": "2.1.19",
23
- "@fluid-topics/ft-loader": "2.1.19",
24
- "@fluid-topics/ft-typography": "2.1.19",
25
- "@fluid-topics/ft-wc-utils": "2.1.19",
22
+ "@fluid-topics/ft-icon": "2.1.20",
23
+ "@fluid-topics/ft-loader": "2.1.20",
24
+ "@fluid-topics/ft-typography": "2.1.20",
25
+ "@fluid-topics/ft-wc-utils": "2.1.20",
26
26
  "lit": "3.1.0"
27
27
  },
28
- "gitHead": "c2c202986d05fbee1378d8dbb74fa609e89260ec"
28
+ "gitHead": "77e9f03085f977dde887e175b964bf66b862253f"
29
29
  }