@fluid-topics/ft-in-product-help 1.0.58 → 1.0.60
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/ft-in-product-help.css.js +25 -21
- package/build/ft-in-product-help.d.ts +5 -0
- package/build/ft-in-product-help.js +48 -0
- package/build/ft-in-product-help.light.js +505 -247
- package/build/ft-in-product-help.min.js +540 -282
- package/build/ft-in-product-help.properties.d.ts +4 -0
- package/package.json +3 -3
|
@@ -1,27 +1,27 @@
|
|
|
1
1
|
import { css } from "lit";
|
|
2
2
|
import { designSystemVariables, FtCssVariableFactory } from "@fluid-topics/ft-wc-utils";
|
|
3
3
|
export const FtInProductHelpCssVariables = {
|
|
4
|
-
standardSizeWidth: FtCssVariableFactory.create("--ft-in-product-help-standard-width", "SIZE", "400px"),
|
|
5
|
-
standardSizeHeight: FtCssVariableFactory.create("--ft-in-product-help-standard-height", "SIZE", "630px"),
|
|
6
|
-
topPosition: FtCssVariableFactory.create("--ft-in-product-help-top", "SIZE", "unset"),
|
|
7
|
-
rightPosition: FtCssVariableFactory.create("--ft-in-product-help-right", "SIZE", "1rem"),
|
|
8
|
-
bottomPosition: FtCssVariableFactory.create("--ft-in-product-help-bottom", "SIZE", "1rem"),
|
|
9
|
-
leftPosition: FtCssVariableFactory.create("--ft-in-product-help-left", "SIZE", "unset"),
|
|
10
|
-
zIndex: FtCssVariableFactory.create("--ft-in-product-help-zindex", "NUMBER", "10"),
|
|
11
|
-
theaterSizeWidth: FtCssVariableFactory.create("--ft-in-product-help-theater-width", "SIZE", "90%"),
|
|
12
|
-
theaterSizeHeight: FtCssVariableFactory.create("--ft-in-product-help-theater-height", "SIZE", "60%"),
|
|
13
|
-
fullscreenSizeWidth: FtCssVariableFactory.create("--ft-in-product-help-fullscreen-width", "SIZE", "100%"),
|
|
14
|
-
fullscreenSizeHeight: FtCssVariableFactory.create("--ft-in-product-help-fullscreen-height", "SIZE", "100%"),
|
|
15
|
-
borderStyle: FtCssVariableFactory.create("--ft-in-product-help-border-style", "BORDER-STYLE", "solid"),
|
|
16
|
-
borderWidth: FtCssVariableFactory.create("--ft-in-product-help-border-width", "SIZE", "0"),
|
|
17
|
-
borderColor: FtCssVariableFactory.extend("--ft-in-product-help-border-color", designSystemVariables.colorPrimary),
|
|
18
|
-
borderRadius: FtCssVariableFactory.extend("--ft-in-product-help-border-radius", designSystemVariables.borderRadiusM),
|
|
19
|
-
shadow: FtCssVariableFactory.extend("--ft-in-product-help-shadow", designSystemVariables.elevation02),
|
|
20
|
-
topBarHeight: FtCssVariableFactory.create("--ft-in-product-help-top-bar-height", "SIZE", "28px"),
|
|
21
|
-
iconColor: FtCssVariableFactory.extend("--ft-in-product-help-icon-color", designSystemVariables.colorOnSurface),
|
|
22
|
-
iconGap: FtCssVariableFactory.create("--ft-in-product-help-icon-gap", "SIZE", "8px"),
|
|
23
|
-
tabletBreakpoint: FtCssVariableFactory.create("--ft-in-product-help-tablet-breakpoint", "SIZE", "768px"),
|
|
24
|
-
desktopBreakpoint: FtCssVariableFactory.create("--ft-in-product-help-desktop-breakpoint", "SIZE", "1280px"),
|
|
4
|
+
standardSizeWidth: FtCssVariableFactory.create("--ft-in-product-help-standard-width", "", "SIZE", "400px"),
|
|
5
|
+
standardSizeHeight: FtCssVariableFactory.create("--ft-in-product-help-standard-height", "", "SIZE", "630px"),
|
|
6
|
+
topPosition: FtCssVariableFactory.create("--ft-in-product-help-top", "", "SIZE", "unset"),
|
|
7
|
+
rightPosition: FtCssVariableFactory.create("--ft-in-product-help-right", "", "SIZE", "1rem"),
|
|
8
|
+
bottomPosition: FtCssVariableFactory.create("--ft-in-product-help-bottom", "", "SIZE", "1rem"),
|
|
9
|
+
leftPosition: FtCssVariableFactory.create("--ft-in-product-help-left", "", "SIZE", "unset"),
|
|
10
|
+
zIndex: FtCssVariableFactory.create("--ft-in-product-help-zindex", "", "NUMBER", "10"),
|
|
11
|
+
theaterSizeWidth: FtCssVariableFactory.create("--ft-in-product-help-theater-width", "", "SIZE", "90%"),
|
|
12
|
+
theaterSizeHeight: FtCssVariableFactory.create("--ft-in-product-help-theater-height", "", "SIZE", "60%"),
|
|
13
|
+
fullscreenSizeWidth: FtCssVariableFactory.create("--ft-in-product-help-fullscreen-width", "", "SIZE", "100%"),
|
|
14
|
+
fullscreenSizeHeight: FtCssVariableFactory.create("--ft-in-product-help-fullscreen-height", "", "SIZE", "100%"),
|
|
15
|
+
borderStyle: FtCssVariableFactory.create("--ft-in-product-help-border-style", "", "BORDER-STYLE", "solid"),
|
|
16
|
+
borderWidth: FtCssVariableFactory.create("--ft-in-product-help-border-width", "", "SIZE", "0"),
|
|
17
|
+
borderColor: FtCssVariableFactory.extend("--ft-in-product-help-border-color", "", designSystemVariables.colorPrimary),
|
|
18
|
+
borderRadius: FtCssVariableFactory.extend("--ft-in-product-help-border-radius", "", designSystemVariables.borderRadiusM),
|
|
19
|
+
shadow: FtCssVariableFactory.extend("--ft-in-product-help-shadow", "", designSystemVariables.elevation02),
|
|
20
|
+
topBarHeight: FtCssVariableFactory.create("--ft-in-product-help-top-bar-height", "", "SIZE", "28px"),
|
|
21
|
+
iconColor: FtCssVariableFactory.extend("--ft-in-product-help-icon-color", "", designSystemVariables.colorOnSurface),
|
|
22
|
+
iconGap: FtCssVariableFactory.create("--ft-in-product-help-icon-gap", "", "SIZE", "8px"),
|
|
23
|
+
tabletBreakpoint: FtCssVariableFactory.create("--ft-in-product-help-tablet-breakpoint", "", "SIZE", "768px"),
|
|
24
|
+
desktopBreakpoint: FtCssVariableFactory.create("--ft-in-product-help-desktop-breakpoint", "", "SIZE", "1280px"),
|
|
25
25
|
colorSurface: FtCssVariableFactory.external(designSystemVariables.colorSurface, "Design system"),
|
|
26
26
|
colorPrimary: FtCssVariableFactory.external(designSystemVariables.colorPrimary, "Design system"),
|
|
27
27
|
};
|
|
@@ -75,6 +75,10 @@ export const styles = css `
|
|
|
75
75
|
--ft-button-color: ${FtInProductHelpCssVariables.iconColor};
|
|
76
76
|
}
|
|
77
77
|
|
|
78
|
+
.ft-in-product-help--home-button {
|
|
79
|
+
margin-right: auto;
|
|
80
|
+
}
|
|
81
|
+
|
|
78
82
|
iframe {
|
|
79
83
|
width: 100%;
|
|
80
84
|
height: calc(100% - ${FtInProductHelpCssVariables.topBarHeight});
|
|
@@ -15,6 +15,10 @@ export declare class FtInProductHelp extends FtLitElement implements FtInProduct
|
|
|
15
15
|
disableTheaterMode: boolean;
|
|
16
16
|
fullscreenModeIcon: string;
|
|
17
17
|
disableFullscreenMode: boolean;
|
|
18
|
+
enableHomeButton: boolean;
|
|
19
|
+
homeIcon: string;
|
|
20
|
+
enableOpenTabButton: boolean;
|
|
21
|
+
openTabIcon: string;
|
|
18
22
|
iconVariant?: FtIconVariants;
|
|
19
23
|
allowStandardMode: boolean;
|
|
20
24
|
allowTheaterMode: boolean;
|
|
@@ -32,4 +36,5 @@ export declare class FtInProductHelp extends FtLitElement implements FtInProduct
|
|
|
32
36
|
private isTablet;
|
|
33
37
|
private isDesktop;
|
|
34
38
|
navigateTo(path: string): void;
|
|
39
|
+
openTab(): void;
|
|
35
40
|
}
|
|
@@ -26,6 +26,10 @@ class FtInProductHelp extends FtLitElement {
|
|
|
26
26
|
this.disableTheaterMode = false;
|
|
27
27
|
this.fullscreenModeIcon = FtIcons.EXPAND_WIDE;
|
|
28
28
|
this.disableFullscreenMode = false;
|
|
29
|
+
this.enableHomeButton = false;
|
|
30
|
+
this.homeIcon = FtIcons.HOME;
|
|
31
|
+
this.enableOpenTabButton = false;
|
|
32
|
+
this.openTabIcon = FtIcons.EXTLINK_LIGHT;
|
|
29
33
|
this.allowStandardMode = true;
|
|
30
34
|
this.allowTheaterMode = true;
|
|
31
35
|
this.allowFullscreenMode = true;
|
|
@@ -45,12 +49,35 @@ class FtInProductHelp extends FtLitElement {
|
|
|
45
49
|
<ft-size-watcher @change=${this.onViewportChange}></ft-size-watcher>
|
|
46
50
|
<div class="${classMap(classes)}" part="container">
|
|
47
51
|
<div class="ft-in-product-help--top-bar" part="top-bar">
|
|
52
|
+
${this.enableHomeButton ? html `
|
|
53
|
+
<ft-button icon="${this.homeIcon}"
|
|
54
|
+
class="ft-in-product-help--home-button"
|
|
55
|
+
dense
|
|
56
|
+
.iconVariant=${this.iconVariant}
|
|
57
|
+
part="button-home top-bar-button"
|
|
58
|
+
label="Back to homepage"
|
|
59
|
+
tooltipPosition="right"
|
|
60
|
+
@click=${() => this.navigateTo(this.portalUrl)}
|
|
61
|
+
></ft-button>
|
|
62
|
+
` : nothing}
|
|
63
|
+
${this.enableOpenTabButton ? html `
|
|
64
|
+
<ft-button icon="${this.openTabIcon}"
|
|
65
|
+
dense
|
|
66
|
+
.iconVariant=${this.iconVariant}
|
|
67
|
+
part="button-new-tab top-bar-button"
|
|
68
|
+
label="Open in a new tab"
|
|
69
|
+
tooltipPosition="left"
|
|
70
|
+
@click=${this.openTab}
|
|
71
|
+
></ft-button>
|
|
72
|
+
` : nothing}
|
|
48
73
|
${showFullscreenIcon ? html `
|
|
49
74
|
<ft-button icon="${this.fullscreenModeIcon}"
|
|
50
75
|
class="${this.displayMode == FtInProductHelpMode.FULLSCREEN ? "ft-in-product-help--active-mode" : ""}"
|
|
51
76
|
dense
|
|
52
77
|
.iconVariant=${this.iconVariant}
|
|
53
78
|
part="button-fullscreen top-bar-button"
|
|
79
|
+
label="Fullscreen mode"
|
|
80
|
+
tooltipPosition="left"
|
|
54
81
|
@click=${() => this.setMode(FtInProductHelpMode.FULLSCREEN)}
|
|
55
82
|
></ft-button>
|
|
56
83
|
` : nothing}
|
|
@@ -60,6 +87,8 @@ class FtInProductHelp extends FtLitElement {
|
|
|
60
87
|
dense
|
|
61
88
|
.iconVariant=${this.iconVariant}
|
|
62
89
|
part="button-theater top-bar-button"
|
|
90
|
+
label="Theater mode"
|
|
91
|
+
tooltipPosition="left"
|
|
63
92
|
@click=${() => this.setMode(FtInProductHelpMode.THEATER)}
|
|
64
93
|
></ft-button>
|
|
65
94
|
` : nothing}
|
|
@@ -69,6 +98,8 @@ class FtInProductHelp extends FtLitElement {
|
|
|
69
98
|
dense
|
|
70
99
|
.iconVariant=${this.iconVariant}
|
|
71
100
|
part="button-standard top-bar-button"
|
|
101
|
+
label="Standard mode"
|
|
102
|
+
tooltipPosition="left"
|
|
72
103
|
@click=${() => this.setMode(FtInProductHelpMode.STANDARD)}
|
|
73
104
|
></ft-button>
|
|
74
105
|
` : nothing}
|
|
@@ -76,6 +107,8 @@ class FtInProductHelp extends FtLitElement {
|
|
|
76
107
|
dense
|
|
77
108
|
.iconVariant=${this.iconVariant}
|
|
78
109
|
part="button-close top-bar-button"
|
|
110
|
+
label="Close"
|
|
111
|
+
tooltipPosition="left"
|
|
79
112
|
@click=${this.close}
|
|
80
113
|
></ft-button>
|
|
81
114
|
</div>
|
|
@@ -143,6 +176,9 @@ class FtInProductHelp extends FtLitElement {
|
|
|
143
176
|
navigateTo(path) {
|
|
144
177
|
this.iframe.contentWindow.postMessage({ navigateTo: path }, this.portalUrl);
|
|
145
178
|
}
|
|
179
|
+
openTab() {
|
|
180
|
+
this.iframe.contentWindow.postMessage({ openTabToCurrentUrl: true }, this.portalUrl);
|
|
181
|
+
}
|
|
146
182
|
}
|
|
147
183
|
FtInProductHelp.elementDefinitions = {
|
|
148
184
|
"ft-button": FtButton,
|
|
@@ -179,6 +215,18 @@ __decorate([
|
|
|
179
215
|
__decorate([
|
|
180
216
|
property({ type: Boolean })
|
|
181
217
|
], FtInProductHelp.prototype, "disableFullscreenMode", void 0);
|
|
218
|
+
__decorate([
|
|
219
|
+
property({ type: Boolean })
|
|
220
|
+
], FtInProductHelp.prototype, "enableHomeButton", void 0);
|
|
221
|
+
__decorate([
|
|
222
|
+
property()
|
|
223
|
+
], FtInProductHelp.prototype, "homeIcon", void 0);
|
|
224
|
+
__decorate([
|
|
225
|
+
property({ type: Boolean })
|
|
226
|
+
], FtInProductHelp.prototype, "enableOpenTabButton", void 0);
|
|
227
|
+
__decorate([
|
|
228
|
+
property()
|
|
229
|
+
], FtInProductHelp.prototype, "openTabIcon", void 0);
|
|
182
230
|
__decorate([
|
|
183
231
|
property()
|
|
184
232
|
], FtInProductHelp.prototype, "iconVariant", void 0);
|