@covalent/markdown-navigator 4.1.1-next.1 → 4.1.1

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/src/README.md DELETED
@@ -1,237 +0,0 @@
1
- # MarkdownNavigatorComponent
2
-
3
- A component for rendering and navigating through markdown, such as documentation. Supports github urls.
4
-
5
- ## API Summary
6
-
7
- #### Inputs
8
-
9
- - items: IMarkdownNavigatorItem[]
10
- - List of IMarkdownNavigatorItems to be rendered
11
- - labels?: IMarkdownNavigatorLabels
12
- - Translated labels
13
- - startAt?: IMarkdownNavigatorItem | IMarkdownNavigatorItem[]
14
- - Item or path to jump to
15
- - compareWith?: IMarkdownNavigatorCompareWith
16
- - Function used to find startAt item
17
- - Defaults to comparison by strict equality (===)
18
- - footer:? Type<any>
19
- - Custom component to be used as global footer
20
- - copyCodeToClipboard?: boolean
21
- - Display copy button on code snippets to copy code to clipboard.
22
- - copyCodeTooltips?: ICopyCodeTooltips
23
- - Tooltips for copy button to copy and upon copying.
24
-
25
- #### Outputs
26
-
27
- - buttonClicked: ITdFlavoredMarkdownButtonClickEvent
28
- - Emitted when a button is clicked
29
-
30
- For reference:
31
-
32
- ```typescript
33
- interface IMarkdownNavigatorItem {
34
- id?: string; // used to compare items by default and as attr id for content
35
- title?: string;
36
- url?: string;
37
- httpOptions?: object;
38
- markdownString?: string; // raw markdown
39
- anchor?: string;
40
- children?: IMarkdownNavigatorItem[];
41
- childrenUrl?: string;
42
- description?: string;
43
- icon?: string;
44
- footer?: Type<any>;
45
- }
46
-
47
- interface ICopyCodeTooltips {
48
- copy?: string;
49
- copied?: string;
50
- }
51
- ```
52
-
53
- ## Setup
54
-
55
- ```typescript
56
- import { CovalentMarkdownNavigatorModule } from '@covalent/markdown-navigator';
57
- @NgModule({
58
- imports: [CovalentMarkdownNavigatorModule],
59
- })
60
- export class MyModule {}
61
- ```
62
-
63
- ## Usage
64
-
65
- ```html
66
- <td-markdown-navigator [items]="items"></td-markdown-navigator>
67
- ```
68
-
69
- ```typescript
70
- const items = [
71
- {
72
- id: 'covalent',
73
- title: 'Covalent',
74
- children: [
75
- {
76
- id: 'component',
77
- title: 'Components',
78
- children: [
79
- {
80
- id: 'td-loading',
81
- url: 'https://raw.githubusercontent.com/Teradata/covalent/develop/src/platform/core/loading/README.md',
82
- title: 'tdLoading',
83
- },
84
- ],
85
- },
86
- ],
87
- },
88
- ];
89
- ```
90
-
91
- # MarkdownNavigatorWindowComponent
92
-
93
- A component that contains a MarkdownNavigator component and a toolbar
94
-
95
- ## API Summary
96
-
97
- #### Inputs
98
-
99
- - items: IMarkdownNavigatorItem[]
100
- - List of IMarkdownNavigatorItems to be rendered
101
- - labels?: IMarkdownNavigatorLabels
102
- - Translated labels
103
- - startAt?: IMarkdownNavigatorItem | IMarkdownNavigatorItem[]
104
- - Item or path to jump to
105
- - compareWith?: IMarkdownNavigatorCompareWith
106
- - Function used to find startAt item
107
- - Defaults to comparison by strict equality (===)
108
- - toolbarColor?: ThemePalette
109
- - Toolbar color
110
- - Defaults to 'primary'
111
- - footer:? Type<any>;
112
- - Custom component to be used as global footer
113
-
114
- #### Outputs
115
-
116
- - closed: void
117
- - Event emitted when the close button is clicked.
118
- - buttonClicked: ITdFlavoredMarkdownButtonClickEvent
119
- - Emitted when a button is clicked
120
-
121
- ## Setup
122
-
123
- ```typescript
124
- import { CovalentMarkdownNavigatorModule } from '@covalent/markdown-navigator';
125
- @NgModule({
126
- imports: [CovalentMarkdownNavigatorModule],
127
- })
128
- export class MyModule {}
129
- ```
130
-
131
- ## Usage
132
-
133
- ```html
134
- <td-markdown-navigator-window [items]="items"></td-markdown-navigator-window>
135
- ```
136
-
137
- # MarkdownNavigatorWindowService
138
-
139
- A service that opens a MarkdownNavigatorWindowComponent inside a draggable dialog. Uses the openDraggable method of the TdDialogService.
140
-
141
- ## API Summary
142
-
143
- #### Methods
144
-
145
- - open: function(config: IMarkdownNavigatorWindowConfig)
146
- - Opens a MarkdownNavigatorWindowComponent inside a draggable dialog.
147
-
148
- For reference:
149
-
150
- ```typescript
151
- interface IMarkdownNavigatorWindowConfig {
152
- items: IMarkdownNavigatorItem[];
153
- dialogConfig?: MatDialogConfig;
154
- labels?: IMarkdownNavigatorWindowLabels;
155
- toolbarColor?: ThemePalette;
156
- startAt?: IMarkdownNavigatorItem | IMarkdownNavigatorItem[];
157
- compareWith?: IMarkdownNavigatorCompareWith;
158
- footer?: Type<any>;
159
- }
160
- ```
161
-
162
- ## Setup
163
-
164
- ```typescript
165
- import { CovalentMarkdownNavigatorModule } from '@covalent/markdown-navigator';
166
- @NgModule({
167
- imports: [CovalentMarkdownNavigatorModule],
168
- })
169
- export class MyModule {}
170
- ```
171
-
172
- ## Usage
173
-
174
- ```typescript
175
- import {
176
- TdMarkdownNavigatorWindowComponent,
177
- TdMarkdownNavigatorWindowService,
178
- IMarkdownNavigatorItem,
179
- } from '@covalent/markdown-navigator';
180
- import { MatDialogRef } from '@angular/material/dialog';
181
-
182
- export class SampleComponent {
183
- constructor(
184
- private _markdownNavigatorWindowService: TdMarkdownNavigatorWindowService
185
- ) {}
186
-
187
- ngOnInit(): void {
188
- const ref: MatDialogRef<TdMarkdownNavigatorWindowComponent> =
189
- this._markdownNavigatorWindowService.open({
190
- items: [
191
- {
192
- url: 'https://github.com/Teradata/covalent/blob/develop/README.md',
193
- },
194
- ],
195
- });
196
- ref.afterOpened().subscribe(() => {});
197
- ref.afterClosed().subscribe(() => {});
198
- }
199
- }
200
- ```
201
-
202
- # MarkdownNavigatorWindowDirective
203
-
204
- A directive that calls the TdMarkdownNavigatorWindowService open method on click events.
205
-
206
- ## API Summary
207
-
208
- #### Inputs
209
-
210
- - tdMarkdownNavigatorWindow: IMarkdownNavigatorWindowConfig
211
- - Config to open window with
212
- - disabled: boolean
213
- - Whether disabled or not
214
-
215
- ## Setup
216
-
217
- ```typescript
218
- import { CovalentMarkdownNavigatorModule } from '@covalent/markdown-navigator';
219
- @NgModule({
220
- imports: [CovalentMarkdownNavigatorModule],
221
- })
222
- export class MyModule {}
223
- ```
224
-
225
- ## Usage
226
-
227
- Example:
228
-
229
- ```html
230
- <button
231
- mat-button
232
- [tdMarkdownNavigatorWindow]="{ items: [] }"
233
- [disabled]="false"
234
- >
235
- Open window
236
- </button>
237
- ```