@fluid-topics/ft-filter 2.0.30 → 2.0.32

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.
@@ -3,7 +3,20 @@ import { Debouncer, ElementDefinitionsMap, FtLitElement } from "@fluid-topics/ft
3
3
  import { FtRadio } from "@fluid-topics/ft-radio";
4
4
  import { FtFilterOptionProperties } from "./ft-filter-option.properties";
5
5
  import { I18nAttributeValue } from "@fluid-topics/ft-i18n/build/decorators/i18nAttribute";
6
- declare const FtFilterLevel_base: typeof FtLitElement & import("@fluid-topics/ft-wc-utils").Constructor<import("@fluid-topics/ft-wc-utils").FtLitElementWithAriaNotificationInterface> & import("@fluid-topics/ft-wc-utils").Constructor<import("@fluid-topics/ft-i18n").FtLitElementWithI18nInterface>;
6
+ export declare const analyticsActions: {
7
+ "more-filters-button-pressed": {
8
+ label: string;
9
+ defaultEventName: string;
10
+ defaultComponentId: string;
11
+ };
12
+ };
13
+ declare const FtFilterLevel_base: import("@fluid-topics/ft-wc-utils").withAnalyticsType<typeof FtLitElement & import("@fluid-topics/ft-wc-utils").Constructor<import("@fluid-topics/ft-wc-utils").FtLitElementWithAriaNotificationInterface> & import("@fluid-topics/ft-wc-utils").Constructor<import("@fluid-topics/ft-i18n").FtLitElementWithI18nInterface>, {
14
+ "more-filters-button-pressed": {
15
+ label: string;
16
+ defaultEventName: string;
17
+ defaultComponentId: string;
18
+ };
19
+ }>;
7
20
  export declare class FtFilterLevel extends FtFilterLevel_base {
8
21
  static elementDefinitions: ElementDefinitionsMap;
9
22
  static styles: import("lit").CSSResult;
@@ -7,7 +7,7 @@ var __decorate = (this && this.__decorate) || function (decorators, target, key,
7
7
  import { html, nothing, } from "lit";
8
8
  import { property, query, state, } from "lit/decorators.js";
9
9
  import { repeat } from "lit/directives/repeat.js";
10
- import { Debouncer, flatDeep, FtLitElement, hasChanged, numberProperty, withAriaNotification, } from "@fluid-topics/ft-wc-utils";
10
+ import { Debouncer, flatDeep, FtLitElement, hasChanged, numberProperty, withAriaNotification, withAnalytics, } from "@fluid-topics/ft-wc-utils";
11
11
  import { FtButton } from "@fluid-topics/ft-button";
12
12
  import { FtTypography, FtTypographyVariants, } from "@fluid-topics/ft-typography";
13
13
  import { FtRipple } from "@fluid-topics/ft-ripple";
@@ -16,7 +16,14 @@ import { FtCheckbox } from "@fluid-topics/ft-checkbox";
16
16
  import { FtRadio, } from "@fluid-topics/ft-radio";
17
17
  import { levelStyles } from "./ft-filter-level.styles";
18
18
  import { withI18n } from "@fluid-topics/ft-i18n";
19
- export class FtFilterLevel extends withI18n(withAriaNotification(FtLitElement)) {
19
+ export const analyticsActions = {
20
+ "more-filters-button-pressed": {
21
+ label: "Revealing more filters",
22
+ defaultEventName: "filters-click_see_more",
23
+ defaultComponentId: "ft-filter-level"
24
+ },
25
+ };
26
+ export class FtFilterLevel extends withAnalytics(withI18n(withAriaNotification(FtLitElement)), analyticsActions) {
20
27
  constructor() {
21
28
  super(...arguments);
22
29
  this.filterId = "";
@@ -126,7 +133,10 @@ export class FtFilterLevel extends withI18n(withAriaNotification(FtLitElement))
126
133
  icon="thin_arrow"
127
134
  dense trailingIcon
128
135
  part="controls display-more"
129
- @click=${this.displayMore}>
136
+ @click=${() => {
137
+ this.emitAnalyticsAction("more-filters-button-pressed", {});
138
+ this.displayMore();
139
+ }}>
130
140
  ${this.moreValuesButtonLabel}
131
141
  </ft-button>
132
142
  ` : nothing}
@@ -6,7 +6,14 @@ import { I18nAttributeValue } from "@fluid-topics/ft-i18n/build/decorators/i18nA
6
6
  export declare class FtFilterChangeEvent extends CustomEvent<Array<any>> {
7
7
  constructor(selectedValues: any[]);
8
8
  }
9
- export declare class FtFilter extends FtLitElement implements FtFilterProperties {
9
+ declare const FtFilter_base: import("@fluid-topics/ft-wc-utils").withAnalyticsType<typeof FtLitElement, {
10
+ "more-filters-button-pressed": {
11
+ label: string;
12
+ defaultEventName: string;
13
+ defaultComponentId: string;
14
+ };
15
+ }>;
16
+ export declare class FtFilter extends FtFilter_base implements FtFilterProperties {
10
17
  static elementDefinitions: ElementDefinitionsMap;
11
18
  static styles: import("lit").CSSResult[];
12
19
  id: string;
@@ -58,3 +65,4 @@ export declare class FtFilter extends FtLitElement implements FtFilterProperties
58
65
  private onFilterChange;
59
66
  private updateScroll;
60
67
  }
68
+ export {};
@@ -6,9 +6,9 @@ var __decorate = (this && this.__decorate) || function (decorators, target, key,
6
6
  };
7
7
  import { html } from "lit";
8
8
  import { property, query, queryAll, state } from "lit/decorators.js";
9
- import { Debouncer, deepEqual, flatDeep, FtLitElement, jsonProperty, numberProperty, waitUntil } from "@fluid-topics/ft-wc-utils";
9
+ import { Debouncer, deepEqual, flatDeep, withAnalytics, FtLitElement, jsonProperty, numberProperty, waitUntil } from "@fluid-topics/ft-wc-utils";
10
10
  import { FtTypography, FtTypographyVariants } from "@fluid-topics/ft-typography";
11
- import { FtFilterLevel } from "./ft-filter-level";
11
+ import { FtFilterLevel, analyticsActions } from "./ft-filter-level";
12
12
  import { FtButton } from "@fluid-topics/ft-button";
13
13
  import { FtSnapScroll } from "@fluid-topics/ft-snap-scroll";
14
14
  import { styles } from "./ft-filter.styles";
@@ -17,7 +17,7 @@ export class FtFilterChangeEvent extends CustomEvent {
17
17
  super("change", { detail: selectedValues });
18
18
  }
19
19
  }
20
- export class FtFilter extends FtLitElement {
20
+ export class FtFilter extends withAnalytics(FtLitElement, analyticsActions) {
21
21
  constructor() {
22
22
  super(...arguments);
23
23
  this.id = "";
@@ -188,6 +188,7 @@ export class FtFilter extends FtLitElement {
188
188
  class="${className}"
189
189
  filterId="${this.id}"
190
190
  .filter=${this.filter}
191
+ .configuredAnalyticsActions="${this.configuredAnalyticsActions}"
191
192
  moreValuesButtonLabel="${this.moreValuesButtonLabel}"
192
193
  ?multivalued=${this.multivalued}
193
194
  ?disabled=${this.disabled || className !== "ft-filter--level-center"}