@operato/help 2.0.0-alpha.9 → 2.0.0-alpha.92
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/CHANGELOG.md +405 -0
- package/demo/index.html +13 -2
- package/dist/src/components/ox-help-icon.d.ts +2 -2
- package/dist/src/components/ox-help-icon.js +9 -8
- package/dist/src/components/ox-help-icon.js.map +1 -1
- package/dist/src/components/ox-inline-help.d.ts +1 -1
- package/dist/src/components/ox-title-with-help.d.ts +2 -2
- package/dist/src/components/ox-title-with-help.js +10 -8
- package/dist/src/components/ox-title-with-help.js.map +1 -1
- package/dist/src/help-style.js +4 -3
- package/dist/src/help-style.js.map +1 -1
- package/dist/src/pages/ox-help-home.d.ts +1 -1
- package/dist/src/pages/ox-help-home.js +11 -9
- package/dist/src/pages/ox-help-home.js.map +1 -1
- package/dist/src/viewparts/ox-help-panel.d.ts +1 -1
- package/dist/src/viewparts/ox-help-panel.js +18 -21
- package/dist/src/viewparts/ox-help-panel.js.map +1 -1
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/package.json +20 -20
- package/src/components/ox-help-icon.ts +9 -8
- package/src/components/ox-title-with-help.ts +10 -8
- package/src/help-style.ts +4 -3
- package/src/pages/ox-help-home.ts +14 -17
- package/src/viewparts/ox-help-panel.ts +18 -21
@@ -1,4 +1,4 @@
|
|
1
|
-
import '@material/
|
1
|
+
import '@material/web/icon/icon.js'
|
2
2
|
|
3
3
|
import { css, html, LitElement } from 'lit'
|
4
4
|
import { customElement, property } from 'lit/decorators.js'
|
@@ -10,18 +10,20 @@ import { openHelp } from '../controller/help.js'
|
|
10
10
|
@customElement('ox-title-with-help')
|
11
11
|
export class TitleWithHelp extends localize(i18next)(LitElement) {
|
12
12
|
static styles = css`
|
13
|
-
|
13
|
+
md-icon {
|
14
14
|
position: relative;
|
15
15
|
top: 4px;
|
16
16
|
cursor: help;
|
17
17
|
opacity: var(--help-icon-opacity);
|
18
18
|
color: var(--help-icon-color);
|
19
|
-
font-size: var(--help-icon-size);
|
20
19
|
line-height: 0;
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
20
|
+
|
21
|
+
--md-icon-size: var(--help-icon-size);
|
22
|
+
|
23
|
+
&:hover {
|
24
|
+
opacity: var(--help-icon-hover-opacity);
|
25
|
+
color: var(--help-icon-hover-color);
|
26
|
+
}
|
25
27
|
}
|
26
28
|
`
|
27
29
|
|
@@ -32,6 +34,6 @@ export class TitleWithHelp extends localize(i18next)(LitElement) {
|
|
32
34
|
const title = i18next.t(this.msgid)
|
33
35
|
const topic = this.topic
|
34
36
|
|
35
|
-
return html` ${title} ${topic ? html`<
|
37
|
+
return html` ${title} ${topic ? html`<md-icon @click=${() => openHelp(topic)}>help</md-icon>` : html``} `
|
36
38
|
}
|
37
39
|
}
|
package/src/help-style.ts
CHANGED
@@ -22,7 +22,7 @@ export const HelpStyle = css`
|
|
22
22
|
font-size: var(--help-panel-h3-title-font-size);
|
23
23
|
color: var(--help-panel-h3-title-color);
|
24
24
|
}
|
25
|
-
|
25
|
+
md-icon {
|
26
26
|
vertical-align: middle;
|
27
27
|
}
|
28
28
|
|
@@ -92,9 +92,10 @@ export const HelpStyle = css`
|
|
92
92
|
font-size: var(--fontsize-default);
|
93
93
|
text-decoration: underline;
|
94
94
|
}
|
95
|
-
a
|
96
|
-
font-size: var(--help-panel-a-icon-size);
|
95
|
+
a md-icon {
|
97
96
|
margin: 0;
|
97
|
+
|
98
|
+
--md-icon-size: var(--help-panel-a-icon-size);
|
98
99
|
}
|
99
100
|
a:hover {
|
100
101
|
background-color: var(--opacity-light-dark-color);
|
@@ -1,4 +1,4 @@
|
|
1
|
-
import '@material/
|
1
|
+
import '@material/web/icon/icon.js'
|
2
2
|
|
3
3
|
import { css, html } from 'lit'
|
4
4
|
import { customElement, property, query } from 'lit/decorators.js'
|
@@ -20,6 +20,8 @@ class HelpHome extends connect(store)(localize(i18next)(PageView)) {
|
|
20
20
|
flex-direction: column;
|
21
21
|
overflow: hidden;
|
22
22
|
position: relative;
|
23
|
+
|
24
|
+
--md-icon-size: 24px;
|
23
25
|
}
|
24
26
|
|
25
27
|
#navigation {
|
@@ -31,8 +33,8 @@ class HelpHome extends connect(store)(localize(i18next)(PageView)) {
|
|
31
33
|
background-color: white;
|
32
34
|
}
|
33
35
|
|
34
|
-
#navigation
|
35
|
-
padding: var(--help-navigation-icon-padding);
|
36
|
+
#navigation md-icon {
|
37
|
+
padding: var(--help-navigation-icon-padding, var(--padding-default));
|
36
38
|
border-right: var(--help-navigation-icon-border);
|
37
39
|
cursor: pointer;
|
38
40
|
color: var(--help-icon-color);
|
@@ -47,7 +49,7 @@ class HelpHome extends connect(store)(localize(i18next)(PageView)) {
|
|
47
49
|
}
|
48
50
|
|
49
51
|
#upward {
|
50
|
-
--
|
52
|
+
--md-icon-size: 26px;
|
51
53
|
position: absolute;
|
52
54
|
bottom: var(--data-list-fab-position-vertical);
|
53
55
|
right: var(--data-list-fab-position-horizontal);
|
@@ -81,19 +83,14 @@ class HelpHome extends connect(store)(localize(i18next)(PageView)) {
|
|
81
83
|
<ox-markdown id="content" .src=${src} toc></ox-markdown>
|
82
84
|
|
83
85
|
<div id="navigation">
|
84
|
-
<
|
85
|
-
|
86
|
-
|
87
|
-
|
88
|
-
|
89
|
-
|
90
|
-
|
91
|
-
|
92
|
-
${
|
93
|
-
this.showGotoTop
|
94
|
-
? html` <mwc-icon id="upward" @click=${(e: Event) => this.gotoTop(e)}>arrow_upward</mwc-icon> `
|
95
|
-
: html``
|
96
|
-
}
|
86
|
+
<md-icon @click=${() => navigate('help')} ?disabled=${this.topic == 'index'}>home</md-icon>
|
87
|
+
<md-icon @click=${() => window.history.back()}>keyboard_arrow_left</md-icon>
|
88
|
+
<md-icon @click=${() => window.history.forward()}>keyboard_arrow_right</md-icon>
|
89
|
+
</div>
|
90
|
+
|
91
|
+
${this.showGotoTop
|
92
|
+
? html` <md-icon id="upward" @click=${(e: Event) => this.gotoTop(e)}>arrow_upward</md-icon> `
|
93
|
+
: html``}
|
97
94
|
`
|
98
95
|
}
|
99
96
|
|
@@ -1,4 +1,4 @@
|
|
1
|
-
import '@material/
|
1
|
+
import '@material/web/icon/icon.js'
|
2
2
|
import '@operato/markdown/ox-markdown.js'
|
3
3
|
|
4
4
|
import { css, html, LitElement, PropertyValues } from 'lit'
|
@@ -31,6 +31,9 @@ class HelpPanel extends connect(store)(LitElement) {
|
|
31
31
|
margin: 4px;
|
32
32
|
|
33
33
|
overflow: hidden;
|
34
|
+
|
35
|
+
--md-icon-size: 24px;
|
36
|
+
font-variation-settings: 'FILL' 1;
|
34
37
|
}
|
35
38
|
|
36
39
|
:host(:focus) {
|
@@ -45,7 +48,9 @@ class HelpPanel extends connect(store)(LitElement) {
|
|
45
48
|
border-bottom: var(--help-navigation-bottom);
|
46
49
|
background-color: white;
|
47
50
|
}
|
48
|
-
|
51
|
+
|
52
|
+
#navigation md-icon {
|
53
|
+
padding: var(--help-navigation-icon-padding, var(--padding-default));
|
49
54
|
border-right: var(--help-navigation-icon-border);
|
50
55
|
cursor: pointer;
|
51
56
|
color: var(--help-icon-color);
|
@@ -64,7 +69,7 @@ class HelpPanel extends connect(store)(LitElement) {
|
|
64
69
|
}
|
65
70
|
|
66
71
|
#upward {
|
67
|
-
--
|
72
|
+
--md-icon-size: 26px;
|
68
73
|
position: absolute;
|
69
74
|
bottom: var(--data-list-fab-position-vertical);
|
70
75
|
right: var(--data-list-fab-position-horizontal);
|
@@ -99,28 +104,20 @@ class HelpPanel extends connect(store)(LitElement) {
|
|
99
104
|
|
100
105
|
return html`
|
101
106
|
<div id="navigation">
|
102
|
-
<
|
103
|
-
|
104
|
-
|
105
|
-
|
106
|
-
|
107
|
-
|
108
|
-
|
109
|
-
|
110
|
-
|
111
|
-
></mwc-icon-button>
|
112
|
-
<mwc-icon-button
|
113
|
-
icon="keyboard_arrow_right"
|
114
|
-
@click=${() => this.historyForward()}
|
115
|
-
?disabled=${this.historyIndex >= this.history.length - 1}
|
116
|
-
></mwc-icon-button>
|
117
|
-
<mwc-icon-button icon="open_in_new" @click=${() => navigate(`help?topic=${this.topic}`)}></mwc-icon-button>
|
118
|
-
<mwc-icon-button icon="close" id="close" @click=${() => closeOverlay('help')}></mwc-icon-button>
|
107
|
+
<md-icon @click=${() => this.goHome()} ?disabled=${this.history[0] === this.history[this.historyIndex]}>
|
108
|
+
home
|
109
|
+
</md-icon>
|
110
|
+
<md-icon @click=${() => this.historyBack()} ?disabled=${this.historyIndex < 1}> keyboard_arrow_left </md-icon>
|
111
|
+
<md-icon @click=${() => this.historyForward()} ?disabled=${this.historyIndex >= this.history.length - 1}>
|
112
|
+
keyboard_arrow_right
|
113
|
+
</md-icon>
|
114
|
+
<md-icon @click=${() => navigate(`help?topic=${this.topic}`)}> open_in_new </md-icon>
|
115
|
+
<md-icon id="close" @click=${() => closeOverlay('help')}> close </md-icon>
|
119
116
|
</div>
|
120
117
|
|
121
118
|
${!this.showGotoTop
|
122
119
|
? html``
|
123
|
-
: html` <
|
120
|
+
: html` <md-icon id="upward" @click=${(e: Event) => this.gotoTop(e)}>arrow_upward</md-icon> `}
|
124
121
|
<ox-markdown id="content" .src=${src}></ox-markdown>
|
125
122
|
`
|
126
123
|
}
|