@taiga-ui/addon-doc 2.46.0 → 2.49.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/README.md +2 -5
- package/bundles/taiga-ui-addon-doc.umd.js +55 -24
- package/bundles/taiga-ui-addon-doc.umd.js.map +1 -1
- package/bundles/taiga-ui-addon-doc.umd.min.js +1 -1
- package/bundles/taiga-ui-addon-doc.umd.min.js.map +1 -1
- package/esm2015/components/page/page.providers.js +4 -3
- package/esm2015/interfaces/code-editor.js +1 -1
- package/esm2015/internal/see-also/see-also.component.js +3 -3
- package/esm5/components/page/page.providers.js +4 -3
- package/esm5/interfaces/code-editor.js +1 -1
- package/esm5/internal/see-also/see-also.component.js +3 -3
- package/fesm2015/taiga-ui-addon-doc.js +5 -4
- package/fesm2015/taiga-ui-addon-doc.js.map +1 -1
- package/fesm5/taiga-ui-addon-doc.js +5 -4
- package/fesm5/taiga-ui-addon-doc.js.map +1 -1
- package/interfaces/code-editor.d.ts +5 -4
- package/package.json +7 -7
- package/taiga-ui-addon-doc.metadata.json +1 -1
package/README.md
CHANGED
|
@@ -116,9 +116,6 @@ npm i @taiga-ui/addon-doc
|
|
|
116
116
|
```typescript
|
|
117
117
|
import {Component} from '@angular/core';
|
|
118
118
|
|
|
119
|
-
import {default as exampleHtml} from '!!raw-loader!./examples/1/index.html';
|
|
120
|
-
import {default as exampleTs} from '!!raw-loader!./examples/1/index.ts';
|
|
121
|
-
|
|
122
119
|
@Component({
|
|
123
120
|
selector: 'super-component',
|
|
124
121
|
templateUrl: './account.template.html',
|
|
@@ -126,8 +123,8 @@ npm i @taiga-ui/addon-doc
|
|
|
126
123
|
export class SuperComponent {
|
|
127
124
|
// Keys would be used as tabs for code example
|
|
128
125
|
readonly example = {
|
|
129
|
-
TypeScript:
|
|
130
|
-
HTML:
|
|
126
|
+
TypeScript: import('!!raw-loader!./examples/1/index.ts'),
|
|
127
|
+
HTML: import('!!raw-loader!./examples/1/index.html'),
|
|
131
128
|
};
|
|
132
129
|
|
|
133
130
|
readonly inputVariants = ['input 1', 'input 2'];
|
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
|
|
7
7
|
MarkdownIt = MarkdownIt && Object.prototype.hasOwnProperty.call(MarkdownIt, 'default') ? MarkdownIt['default'] : MarkdownIt;
|
|
8
8
|
|
|
9
|
-
|
|
9
|
+
/******************************************************************************
|
|
10
10
|
Copyright (c) Microsoft Corporation.
|
|
11
11
|
|
|
12
12
|
Permission to use, copy, modify, and/or distribute this software for any
|
|
@@ -25,11 +25,13 @@
|
|
|
25
25
|
var extendStatics = function(d, b) {
|
|
26
26
|
extendStatics = Object.setPrototypeOf ||
|
|
27
27
|
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
|
|
28
|
-
function (d, b) { for (var p in b) if (
|
|
28
|
+
function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
|
|
29
29
|
return extendStatics(d, b);
|
|
30
30
|
};
|
|
31
31
|
|
|
32
32
|
function __extends(d, b) {
|
|
33
|
+
if (typeof b !== "function" && b !== null)
|
|
34
|
+
throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
|
|
33
35
|
extendStatics(d, b);
|
|
34
36
|
function __() { this.constructor = d; }
|
|
35
37
|
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
|
@@ -111,13 +113,20 @@
|
|
|
111
113
|
}
|
|
112
114
|
}
|
|
113
115
|
|
|
114
|
-
|
|
116
|
+
var __createBinding = Object.create ? (function(o, m, k, k2) {
|
|
117
|
+
if (k2 === undefined) k2 = k;
|
|
118
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
119
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
120
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
121
|
+
}
|
|
122
|
+
Object.defineProperty(o, k2, desc);
|
|
123
|
+
}) : (function(o, m, k, k2) {
|
|
115
124
|
if (k2 === undefined) k2 = k;
|
|
116
125
|
o[k2] = m[k];
|
|
117
|
-
}
|
|
126
|
+
});
|
|
118
127
|
|
|
119
|
-
function __exportStar(m,
|
|
120
|
-
for (var p in m) if (p !== "default" && !
|
|
128
|
+
function __exportStar(m, o) {
|
|
129
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(o, p)) __createBinding(o, m, p);
|
|
121
130
|
}
|
|
122
131
|
|
|
123
132
|
function __values(o) {
|
|
@@ -149,19 +158,31 @@
|
|
|
149
158
|
return ar;
|
|
150
159
|
}
|
|
151
160
|
|
|
161
|
+
/** @deprecated */
|
|
152
162
|
function __spread() {
|
|
153
163
|
for (var ar = [], i = 0; i < arguments.length; i++)
|
|
154
164
|
ar = ar.concat(__read(arguments[i]));
|
|
155
165
|
return ar;
|
|
156
166
|
}
|
|
157
167
|
|
|
168
|
+
/** @deprecated */
|
|
158
169
|
function __spreadArrays() {
|
|
159
170
|
for (var s = 0, i = 0, il = arguments.length; i < il; i++) s += arguments[i].length;
|
|
160
171
|
for (var r = Array(s), k = 0, i = 0; i < il; i++)
|
|
161
172
|
for (var a = arguments[i], j = 0, jl = a.length; j < jl; j++, k++)
|
|
162
173
|
r[k] = a[j];
|
|
163
174
|
return r;
|
|
164
|
-
}
|
|
175
|
+
}
|
|
176
|
+
|
|
177
|
+
function __spreadArray(to, from, pack) {
|
|
178
|
+
if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) {
|
|
179
|
+
if (ar || !(i in from)) {
|
|
180
|
+
if (!ar) ar = Array.prototype.slice.call(from, 0, i);
|
|
181
|
+
ar[i] = from[i];
|
|
182
|
+
}
|
|
183
|
+
}
|
|
184
|
+
return to.concat(ar || Array.prototype.slice.call(from));
|
|
185
|
+
}
|
|
165
186
|
|
|
166
187
|
function __await(v) {
|
|
167
188
|
return this instanceof __await ? (this.v = v, this) : new __await(v);
|
|
@@ -198,11 +219,17 @@
|
|
|
198
219
|
return cooked;
|
|
199
220
|
};
|
|
200
221
|
|
|
222
|
+
var __setModuleDefault = Object.create ? (function(o, v) {
|
|
223
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
224
|
+
}) : function(o, v) {
|
|
225
|
+
o["default"] = v;
|
|
226
|
+
};
|
|
227
|
+
|
|
201
228
|
function __importStar(mod) {
|
|
202
229
|
if (mod && mod.__esModule) return mod;
|
|
203
230
|
var result = {};
|
|
204
|
-
if (mod != null) for (var k in mod) if (Object.hasOwnProperty.call(mod, k)) result
|
|
205
|
-
result
|
|
231
|
+
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
|
232
|
+
__setModuleDefault(result, mod);
|
|
206
233
|
return result;
|
|
207
234
|
}
|
|
208
235
|
|
|
@@ -210,19 +237,22 @@
|
|
|
210
237
|
return (mod && mod.__esModule) ? mod : { default: mod };
|
|
211
238
|
}
|
|
212
239
|
|
|
213
|
-
function __classPrivateFieldGet(receiver,
|
|
214
|
-
if (!
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
return privateMap.get(receiver);
|
|
240
|
+
function __classPrivateFieldGet(receiver, state, kind, f) {
|
|
241
|
+
if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a getter");
|
|
242
|
+
if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot read private member from an object whose class did not declare it");
|
|
243
|
+
return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver);
|
|
218
244
|
}
|
|
219
245
|
|
|
220
|
-
function __classPrivateFieldSet(receiver,
|
|
221
|
-
if (
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
246
|
+
function __classPrivateFieldSet(receiver, state, value, kind, f) {
|
|
247
|
+
if (kind === "m") throw new TypeError("Private method is not writable");
|
|
248
|
+
if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a setter");
|
|
249
|
+
if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot write private member to an object whose class did not declare it");
|
|
250
|
+
return (kind === "a" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value;
|
|
251
|
+
}
|
|
252
|
+
|
|
253
|
+
function __classPrivateFieldIn(state, receiver) {
|
|
254
|
+
if (receiver === null || (typeof receiver !== "object" && typeof receiver !== "function")) throw new TypeError("Cannot use 'in' operator on non-object");
|
|
255
|
+
return typeof state === "function" ? receiver === state : state.has(receiver);
|
|
226
256
|
}
|
|
227
257
|
|
|
228
258
|
function rawLoad(content) {
|
|
@@ -1767,11 +1797,12 @@
|
|
|
1767
1797
|
];
|
|
1768
1798
|
function seeAlsoProviderFactory(_a, seeAlsoGroups) {
|
|
1769
1799
|
var nativeElement = _a.nativeElement;
|
|
1770
|
-
var
|
|
1800
|
+
var currentHeader = nativeElement.getAttribute('header');
|
|
1801
|
+
var groups = seeAlsoGroups.filter(function (group) { return group.includes(currentHeader); }) || [];
|
|
1771
1802
|
var seeAlsoSet = new Set(groups
|
|
1772
1803
|
.join()
|
|
1773
1804
|
.split(',')
|
|
1774
|
-
.filter(function (component) { return component && component !==
|
|
1805
|
+
.filter(function (component) { return component && component !== currentHeader; }));
|
|
1775
1806
|
return Array.from(seeAlsoSet);
|
|
1776
1807
|
}
|
|
1777
1808
|
|
|
@@ -1868,7 +1899,7 @@
|
|
|
1868
1899
|
.map(function (page) { return ('subPages' in page ? page.subPages : [page]); })
|
|
1869
1900
|
.reduce(function (pages, subPages) { return __spread(pages, subPages); }, [])
|
|
1870
1901
|
.find(function (page) { return page.title === pageTitle; });
|
|
1871
|
-
if (page
|
|
1902
|
+
if (page === null || page === void 0 ? void 0 : page.route) {
|
|
1872
1903
|
return page.route;
|
|
1873
1904
|
}
|
|
1874
1905
|
}
|
|
@@ -1884,7 +1915,7 @@
|
|
|
1884
1915
|
TuiDocSeeAlsoComponent = __decorate([
|
|
1885
1916
|
core.Component({
|
|
1886
1917
|
selector: 'tui-doc-see-also',
|
|
1887
|
-
template: "<h5 class=\"header\">{{ text }}</h5>\n<ng-container *ngFor=\"let item of seeAlso; last as last\">\n <a\n tuiLink\n [routerLink]=\"getRouterLink(item)\"\n >\n {{ item }}\n </a>\n <ng-container *ngIf=\"!last\"
|
|
1918
|
+
template: "<h5 class=\"header\">{{ text }}</h5>\n<ng-container *ngFor=\"let item of seeAlso; last as last\">\n <a\n tuiLink\n [routerLink]=\"getRouterLink(item)\"\n >\n {{ item }}\n </a>\n <ng-container *ngIf=\"!last\">{{', '}}</ng-container>\n</ng-container>\n",
|
|
1888
1919
|
changeDetection: core.ChangeDetectionStrategy.OnPush,
|
|
1889
1920
|
styles: [":host{display:block}.header{font-size:.6875rem;line-height:1rem;text-transform:uppercase;letter-spacing:.075em;color:var(--tui-text-02);margin:0 0 .5rem;white-space:nowrap}"]
|
|
1890
1921
|
}),
|