@taiga-ui/addon-doc 3.23.1-dev.main-14214d9 → 3.23.1-dev.main-3d032b2
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/bundles/taiga-ui-addon-doc.umd.js +23 -23
- package/bundles/taiga-ui-addon-doc.umd.js.map +1 -1
- package/components/demo/demo.component.d.ts +2 -2
- package/components/documentation/documentation.component.d.ts +2 -2
- package/components/example/example.component.d.ts +2 -2
- package/components/navigation/navigation.component.d.ts +2 -2
- package/esm2015/components/demo/demo.component.js +5 -5
- package/esm2015/components/documentation/documentation.component.js +4 -4
- package/esm2015/components/example/example.component.js +4 -4
- package/esm2015/components/navigation/navigation.component.js +5 -5
- package/esm2015/internal/input-opacity/input-opacity.directive.js +4 -4
- package/esm2015/services/theme-night.service.js +4 -4
- package/esm2015/utils/to-flat-map-pages.js +4 -4
- package/fesm2015/taiga-ui-addon-doc.js +23 -23
- package/fesm2015/taiga-ui-addon-doc.js.map +1 -1
- package/internal/input-opacity/input-opacity.directive.d.ts +2 -2
- package/package.json +1 -1
- package/services/theme-night.service.d.ts +2 -2
|
@@ -589,9 +589,9 @@
|
|
|
589
589
|
|
|
590
590
|
var MIN_WIDTH = 160;
|
|
591
591
|
var TuiDocDemoComponent = /** @class */ (function () {
|
|
592
|
-
function TuiDocDemoComponent(isMobile,
|
|
592
|
+
function TuiDocDemoComponent(isMobile, el, locationRef, urlSerializer, texts, urlStateHandler) {
|
|
593
593
|
this.isMobile = isMobile;
|
|
594
|
-
this.
|
|
594
|
+
this.el = el;
|
|
595
595
|
this.locationRef = locationRef;
|
|
596
596
|
this.urlSerializer = urlSerializer;
|
|
597
597
|
this.texts = texts;
|
|
@@ -636,10 +636,10 @@
|
|
|
636
636
|
return;
|
|
637
637
|
}
|
|
638
638
|
var safe = width || this.resizeable.nativeElement.clientWidth;
|
|
639
|
-
var total = this.
|
|
639
|
+
var total = this.el.nativeElement.clientWidth;
|
|
640
640
|
var clamped = Math.round(i6.tuiClamp(safe, MIN_WIDTH, total)) - this.delta;
|
|
641
641
|
var validated = safe < total ? clamped : NaN;
|
|
642
|
-
this.resizer.nativeElement.textContent = String(clamped);
|
|
642
|
+
this.resizer.nativeElement.textContent = String(clamped || '-');
|
|
643
643
|
this.resizeable.nativeElement.style.width = validated ? i6.tuiPx(safe) : '';
|
|
644
644
|
this.sandboxWidth = validated;
|
|
645
645
|
};
|
|
@@ -1058,13 +1058,13 @@
|
|
|
1058
1058
|
}] });
|
|
1059
1059
|
|
|
1060
1060
|
var TuiInputOpacityDirective = /** @class */ (function () {
|
|
1061
|
-
function TuiInputOpacityDirective(renderer,
|
|
1061
|
+
function TuiInputOpacityDirective(renderer, focusable) {
|
|
1062
1062
|
this.renderer = renderer;
|
|
1063
|
-
this.
|
|
1063
|
+
this.focusable = focusable;
|
|
1064
1064
|
}
|
|
1065
1065
|
Object.defineProperty(TuiInputOpacityDirective.prototype, "tuiInputOpacity", {
|
|
1066
1066
|
set: function (opacity) {
|
|
1067
|
-
var nativeFocusableElement = this.
|
|
1067
|
+
var nativeFocusableElement = this.focusable.nativeFocusableElement;
|
|
1068
1068
|
if (nativeFocusableElement) {
|
|
1069
1069
|
this.renderer.setStyle(nativeFocusableElement, 'opacity', opacity / 100);
|
|
1070
1070
|
}
|
|
@@ -1270,8 +1270,8 @@
|
|
|
1270
1270
|
// @bad TODO subscribe propertiesConnectors changes
|
|
1271
1271
|
// @bad TODO refactor to make more flexible
|
|
1272
1272
|
var TuiDocDocumentationComponent = /** @class */ (function () {
|
|
1273
|
-
function TuiDocDocumentationComponent(
|
|
1274
|
-
this.
|
|
1273
|
+
function TuiDocDocumentationComponent(cdr, texts, excludedProperties, destroy$, getColor, getOpacity) {
|
|
1274
|
+
this.cdr = cdr;
|
|
1275
1275
|
this.texts = texts;
|
|
1276
1276
|
this.excludedProperties = excludedProperties;
|
|
1277
1277
|
this.destroy$ = destroy$;
|
|
@@ -1289,7 +1289,7 @@
|
|
|
1289
1289
|
.pipe(operators.switchMap(function (items) { return i9.merge.apply(void 0, __spreadArray([], __read(items.map(function (_a) {
|
|
1290
1290
|
var changed$ = _a.changed$;
|
|
1291
1291
|
return changed$;
|
|
1292
|
-
})))); }), i6.tuiWatch(this.
|
|
1292
|
+
})))); }), i6.tuiWatch(this.cdr), operators.takeUntil(this.destroy$))
|
|
1293
1293
|
.subscribe();
|
|
1294
1294
|
};
|
|
1295
1295
|
Object.defineProperty(TuiDocDocumentationComponent.prototype, "type", {
|
|
@@ -1594,10 +1594,10 @@
|
|
|
1594
1594
|
}] });
|
|
1595
1595
|
|
|
1596
1596
|
var TuiDocExampleComponent = /** @class */ (function () {
|
|
1597
|
-
function TuiDocExampleComponent(clipboard,
|
|
1597
|
+
function TuiDocExampleComponent(clipboard, alerts, location, copyTexts$, texts, codeEditor, processContent, isCypress, codeActions, router, route, ngLocation, options) {
|
|
1598
1598
|
var _this = this;
|
|
1599
1599
|
this.clipboard = clipboard;
|
|
1600
|
-
this.
|
|
1600
|
+
this.alerts = alerts;
|
|
1601
1601
|
this.location = location;
|
|
1602
1602
|
this.copyTexts$ = copyTexts$;
|
|
1603
1603
|
this.texts = texts;
|
|
@@ -1640,7 +1640,7 @@
|
|
|
1640
1640
|
var url = currentUrl + "#" + this.id;
|
|
1641
1641
|
this.setFragmentWithoutRedirect(this.id);
|
|
1642
1642
|
this.clipboard.copy(url);
|
|
1643
|
-
this.
|
|
1643
|
+
this.alerts
|
|
1644
1644
|
.open(this.texts[1], {
|
|
1645
1645
|
label: this.texts[2],
|
|
1646
1646
|
status: "success" /* Success */,
|
|
@@ -1929,11 +1929,11 @@
|
|
|
1929
1929
|
|
|
1930
1930
|
var TuiThemeNightService = /** @class */ (function (_super) {
|
|
1931
1931
|
__extends(TuiThemeNightService, _super);
|
|
1932
|
-
function TuiThemeNightService(
|
|
1932
|
+
function TuiThemeNightService(win, storage, key, useDefaultNightTheme) {
|
|
1933
1933
|
var _this = _super.call(this, storage.getItem(key) === "true" ||
|
|
1934
1934
|
(storage.getItem(key) === null &&
|
|
1935
|
-
|
|
1936
|
-
_this.
|
|
1935
|
+
win.matchMedia("(prefers-color-scheme: dark)").matches)) || this;
|
|
1936
|
+
_this.win = win;
|
|
1937
1937
|
_this.storage = storage;
|
|
1938
1938
|
_this.key = key;
|
|
1939
1939
|
_this.useDefaultNightTheme = useDefaultNightTheme;
|
|
@@ -2038,7 +2038,7 @@
|
|
|
2038
2038
|
try {
|
|
2039
2039
|
for (var _d = (e_2 = void 0, __values(page.subPages)), _e = _d.next(); !_e.done; _e = _d.next()) {
|
|
2040
2040
|
var subPage = _e.value;
|
|
2041
|
-
|
|
2041
|
+
ngDevMode && assertTitle(subPage, map);
|
|
2042
2042
|
map.set(subPage.title, subPage);
|
|
2043
2043
|
}
|
|
2044
2044
|
}
|
|
@@ -2051,7 +2051,7 @@
|
|
|
2051
2051
|
}
|
|
2052
2052
|
}
|
|
2053
2053
|
else {
|
|
2054
|
-
|
|
2054
|
+
ngDevMode && assertTitle(page, map);
|
|
2055
2055
|
map.set(page.title, page);
|
|
2056
2056
|
}
|
|
2057
2057
|
}
|
|
@@ -2065,7 +2065,7 @@
|
|
|
2065
2065
|
}
|
|
2066
2066
|
return map;
|
|
2067
2067
|
}
|
|
2068
|
-
function
|
|
2068
|
+
function assertTitle(page, map) {
|
|
2069
2069
|
var _a;
|
|
2070
2070
|
if (map.has(page.title) && ((_a = map.get(page.title)) === null || _a === void 0 ? void 0 : _a.route) !== page.route) {
|
|
2071
2071
|
console.error("Title for page should be unique for prevent inconsistent page names", page, "<== Collisions between ==>", map.get(page.title));
|
|
@@ -2195,9 +2195,9 @@
|
|
|
2195
2195
|
}] } });
|
|
2196
2196
|
|
|
2197
2197
|
var TuiDocNavigationComponent = /** @class */ (function () {
|
|
2198
|
-
function TuiDocNavigationComponent(
|
|
2198
|
+
function TuiDocNavigationComponent(cdr, titleService, title$, doc, mode, sidebar, labels, items, searchText, router, activatedRoute, destroy$, readyToScroll$, scrollBehavior) {
|
|
2199
2199
|
var _this = this;
|
|
2200
|
-
this.
|
|
2200
|
+
this.doc = doc;
|
|
2201
2201
|
this.mode = mode;
|
|
2202
2202
|
this.sidebar = sidebar;
|
|
2203
2203
|
this.labels = labels;
|
|
@@ -2218,7 +2218,7 @@
|
|
|
2218
2218
|
// Angular can't navigate no anchor links
|
|
2219
2219
|
// https://stackoverflow.com/questions/36101756/angular2-routing-with-hashtag-to-page-anchor
|
|
2220
2220
|
title$.subscribe(function (title) {
|
|
2221
|
-
|
|
2221
|
+
cdr.markForCheck();
|
|
2222
2222
|
titleService.setTitle(title);
|
|
2223
2223
|
_this.openActivePageGroup();
|
|
2224
2224
|
_this.handleAnchorLink(_this.activatedRoute.snapshot.fragment || '');
|
|
@@ -2308,7 +2308,7 @@
|
|
|
2308
2308
|
});
|
|
2309
2309
|
};
|
|
2310
2310
|
TuiDocNavigationComponent.prototype.navigateToAnchorLink = function (fragment) {
|
|
2311
|
-
var nodes = fragment ? this.
|
|
2311
|
+
var nodes = fragment ? this.doc.querySelectorAll("#" + fragment) : [];
|
|
2312
2312
|
var element = nodes.length && nodes[nodes.length - 1];
|
|
2313
2313
|
if (!element) {
|
|
2314
2314
|
return;
|