@fluid-topics/ft-announcement 2.0.37 → 2.1.0
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.
- package/build/call-to-action/ft-announcement-call-to-action.d.ts +10 -0
- package/build/call-to-action/ft-announcement-call-to-action.js +23 -0
- package/build/definitions.d.ts +2 -0
- package/build/definitions.js +2 -0
- package/build/ft-announcement.light.js +77 -94
- package/build/ft-announcement.min.js +63 -79
- package/build/index.d.ts +1 -0
- package/build/index.js +1 -0
- package/build/link/ft-announcement-link.d.ts +5 -1
- package/build/link/ft-announcement-link.js +9 -1
- package/build/models/ft-announcement-component.js +4 -2
- package/build/models/ft-announcement-model.d.ts +3 -2
- package/build/text/ft-announcement-text.d.ts +5 -1
- package/build/text/ft-announcement-text.js +10 -2
- package/package.json +5 -5
package/build/index.d.ts
CHANGED
package/build/index.js
CHANGED
|
@@ -1,6 +1,10 @@
|
|
|
1
|
+
import { PropertyValues } from "lit";
|
|
1
2
|
import { FtAnnouncementComponent } from "../models/ft-announcement-component";
|
|
2
|
-
|
|
3
|
+
declare const FtAnnouncementLink_base: typeof FtAnnouncementComponent & import("@fluid-topics/ft-wc-utils").Constructor<import("@fluid-topics/ft-wc-utils").FtLitElementWithConditionalVisibilityInterface>;
|
|
4
|
+
export declare class FtAnnouncementLink extends FtAnnouncementLink_base {
|
|
3
5
|
static styles: import("lit").CSSResult;
|
|
4
6
|
target: string;
|
|
7
|
+
protected willUpdate(props: PropertyValues): void;
|
|
5
8
|
protected render(): import("lit-html").TemplateResult<1>;
|
|
6
9
|
}
|
|
10
|
+
export {};
|
|
@@ -7,11 +7,19 @@ var __decorate = (this && this.__decorate) || function (decorators, target, key,
|
|
|
7
7
|
import { css, html, } from "lit";
|
|
8
8
|
import { FtAnnouncementComponent } from "../models/ft-announcement-component";
|
|
9
9
|
import { property } from "lit/decorators.js";
|
|
10
|
-
|
|
10
|
+
import { withConditionalVisibility } from "@fluid-topics/ft-wc-utils";
|
|
11
|
+
export class FtAnnouncementLink extends withConditionalVisibility(FtAnnouncementComponent) {
|
|
11
12
|
constructor() {
|
|
12
13
|
super(...arguments);
|
|
13
14
|
this.target = "_self";
|
|
14
15
|
}
|
|
16
|
+
willUpdate(props) {
|
|
17
|
+
var _a;
|
|
18
|
+
super.willUpdate(props);
|
|
19
|
+
if (props.has("announcement")) {
|
|
20
|
+
this.isVisible = !!((_a = this.announcement) === null || _a === void 0 ? void 0 : _a.link);
|
|
21
|
+
}
|
|
22
|
+
}
|
|
15
23
|
render() {
|
|
16
24
|
var _a;
|
|
17
25
|
return html `
|
|
@@ -6,12 +6,14 @@ var __decorate = (this && this.__decorate) || function (decorators, target, key,
|
|
|
6
6
|
};
|
|
7
7
|
import { FtLitElement } from "@fluid-topics/ft-wc-utils";
|
|
8
8
|
import { consume } from "@lit/context";
|
|
9
|
-
import { announcementContext } from "./ft-announcement-model";
|
|
9
|
+
import { announcementContext, } from "./ft-announcement-model";
|
|
10
|
+
import { property } from "lit/decorators.js";
|
|
10
11
|
export class FtAnnouncementComponent extends FtLitElement {
|
|
11
12
|
}
|
|
12
13
|
__decorate([
|
|
13
14
|
consume({
|
|
14
15
|
context: announcementContext,
|
|
15
16
|
subscribe: true,
|
|
16
|
-
})
|
|
17
|
+
}),
|
|
18
|
+
property({ attribute: false })
|
|
17
19
|
], FtAnnouncementComponent.prototype, "announcement", void 0);
|
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
import { FtSearchResultAnnouncement } from "@fluid-topics/public-api";
|
|
2
2
|
export type FtAnnouncement = {
|
|
3
3
|
title: string;
|
|
4
|
-
text
|
|
5
|
-
link
|
|
4
|
+
text?: string;
|
|
5
|
+
link?: string;
|
|
6
|
+
callToAction?: string;
|
|
6
7
|
};
|
|
7
8
|
export declare function fromFtSearchResultsAnnouncement(ftSearchResultAnnouncement: FtSearchResultAnnouncement): FtAnnouncement;
|
|
8
9
|
export declare const announcementContext: {
|
|
@@ -1,6 +1,10 @@
|
|
|
1
1
|
import { ElementDefinitionsMap } from "@fluid-topics/ft-wc-utils";
|
|
2
|
+
import { PropertyValues } from "lit";
|
|
2
3
|
import { FtAnnouncementComponent } from "../models/ft-announcement-component";
|
|
3
|
-
|
|
4
|
+
declare const FtAnnouncementText_base: typeof FtAnnouncementComponent & import("@fluid-topics/ft-wc-utils").Constructor<import("@fluid-topics/ft-wc-utils").FtLitElementWithConditionalVisibilityInterface>;
|
|
5
|
+
export declare class FtAnnouncementText extends FtAnnouncementText_base {
|
|
4
6
|
static elementDefinitions: ElementDefinitionsMap;
|
|
7
|
+
protected willUpdate(props: PropertyValues): void;
|
|
5
8
|
protected render(): import("lit-html").TemplateResult<1>;
|
|
6
9
|
}
|
|
10
|
+
export {};
|
|
@@ -1,8 +1,16 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { withConditionalVisibility, } from "@fluid-topics/ft-wc-utils";
|
|
2
|
+
import { html, } from "lit";
|
|
2
3
|
import { FtAnnouncementComponent } from "../models/ft-announcement-component";
|
|
3
4
|
import { FtTypography, FtTypographyVariants, } from "@fluid-topics/ft-typography";
|
|
4
5
|
import { unsafeHTML } from "lit/directives/unsafe-html.js";
|
|
5
|
-
export class FtAnnouncementText extends FtAnnouncementComponent {
|
|
6
|
+
export class FtAnnouncementText extends withConditionalVisibility(FtAnnouncementComponent) {
|
|
7
|
+
willUpdate(props) {
|
|
8
|
+
var _a;
|
|
9
|
+
super.willUpdate(props);
|
|
10
|
+
if (props.has("announcement")) {
|
|
11
|
+
this.isVisible = !!((_a = this.announcement) === null || _a === void 0 ? void 0 : _a.text);
|
|
12
|
+
}
|
|
13
|
+
}
|
|
6
14
|
render() {
|
|
7
15
|
var _a;
|
|
8
16
|
return html `
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@fluid-topics/ft-announcement",
|
|
3
|
-
"version": "2.0
|
|
3
|
+
"version": "2.1.0",
|
|
4
4
|
"description": "Components related to announcements",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"Lit"
|
|
@@ -19,13 +19,13 @@
|
|
|
19
19
|
"url": "ssh://git@scm.mrs.antidot.net:2222/fluidtopics/ft-web-components.git"
|
|
20
20
|
},
|
|
21
21
|
"dependencies": {
|
|
22
|
-
"@fluid-topics/ft-wc-utils": "2.0
|
|
23
|
-
"@fluid-topics/public-api": "1.0.
|
|
22
|
+
"@fluid-topics/ft-wc-utils": "2.1.0",
|
|
23
|
+
"@fluid-topics/public-api": "1.0.126",
|
|
24
24
|
"@lit/context": "1.1.6",
|
|
25
25
|
"lit": "3.1.0"
|
|
26
26
|
},
|
|
27
27
|
"devDependencies": {
|
|
28
|
-
"@fluid-topics/ft-wc-test-utils": "2.0
|
|
28
|
+
"@fluid-topics/ft-wc-test-utils": "2.1.0"
|
|
29
29
|
},
|
|
30
|
-
"gitHead": "
|
|
30
|
+
"gitHead": "4727cf19d04236ad1d2b2cb43ce1c46298834c7e"
|
|
31
31
|
}
|