@taiga-ui/addon-doc 2.54.1 → 2.55.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/bundles/taiga-ui-addon-doc.umd.js +19 -3
- 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/components/example/example.component.d.ts +7 -1
- package/esm2015/components/example/example.component.js +22 -4
- package/esm5/components/example/example.component.js +22 -4
- package/fesm2015/taiga-ui-addon-doc.js +19 -3
- package/fesm2015/taiga-ui-addon-doc.js.map +1 -1
- package/fesm5/taiga-ui-addon-doc.js +19 -3
- package/fesm5/taiga-ui-addon-doc.js.map +1 -1
- package/package.json +5 -5
- package/taiga-ui-addon-doc.metadata.json +1 -1
|
@@ -932,7 +932,7 @@ var tuiRawLoadRecord = rawLoadRecord;
|
|
|
932
932
|
// Ambient type cannot be used without dynamic https://github.com/angular/angular/issues/23395
|
|
933
933
|
// @dynamic
|
|
934
934
|
var TuiDocExampleComponent = /** @class */ (function () {
|
|
935
|
-
function TuiDocExampleComponent(id, clipboard, notifications, location, copyTexts$, texts, codeEditor, processContent, isCypress, codeActions) {
|
|
935
|
+
function TuiDocExampleComponent(id, clipboard, notifications, location, copyTexts$, texts, codeEditor, processContent, isCypress, codeActions, router, route, ngLocation) {
|
|
936
936
|
var _this = this;
|
|
937
937
|
this.id = id;
|
|
938
938
|
this.clipboard = clipboard;
|
|
@@ -944,6 +944,9 @@ var TuiDocExampleComponent = /** @class */ (function () {
|
|
|
944
944
|
this.processContent = processContent;
|
|
945
945
|
this.isCypress = isCypress;
|
|
946
946
|
this.codeActions = codeActions;
|
|
947
|
+
this.router = router;
|
|
948
|
+
this.route = route;
|
|
949
|
+
this.ngLocation = ngLocation;
|
|
947
950
|
this.rawLoader$$ = new BehaviorSubject({});
|
|
948
951
|
this.heading = '';
|
|
949
952
|
this.description = '';
|
|
@@ -971,6 +974,7 @@ var TuiDocExampleComponent = /** @class */ (function () {
|
|
|
971
974
|
? this.location.href.slice(0, Math.max(0, hashPosition))
|
|
972
975
|
: this.location.href;
|
|
973
976
|
var url = currentUrl + "#" + this.id;
|
|
977
|
+
this.setFragmentWithoutRedirect(this.id);
|
|
974
978
|
this.clipboard.copy(url);
|
|
975
979
|
this.notifications
|
|
976
980
|
.show(this.texts[1], {
|
|
@@ -985,6 +989,12 @@ var TuiDocExampleComponent = /** @class */ (function () {
|
|
|
985
989
|
this.loading$.next(true);
|
|
986
990
|
(_a = this.codeEditor) === null || _a === void 0 ? void 0 : _a.edit(this.componentName, (_b = this.id) !== null && _b !== void 0 ? _b : '', files).finally(function () { return _this.loading$.next(false); });
|
|
987
991
|
};
|
|
992
|
+
TuiDocExampleComponent.prototype.setFragmentWithoutRedirect = function (id) {
|
|
993
|
+
var url = this.router
|
|
994
|
+
.createUrlTree([], { relativeTo: this.route, fragment: id || '' })
|
|
995
|
+
.toString();
|
|
996
|
+
this.ngLocation.go(url);
|
|
997
|
+
};
|
|
988
998
|
TuiDocExampleComponent.ctorParameters = function () { return [
|
|
989
999
|
{ type: String, decorators: [{ type: Attribute, args: ['id',] }] },
|
|
990
1000
|
{ type: Clipboard, decorators: [{ type: Inject, args: [Clipboard,] }] },
|
|
@@ -995,7 +1005,10 @@ var TuiDocExampleComponent = /** @class */ (function () {
|
|
|
995
1005
|
{ type: undefined, decorators: [{ type: Optional }, { type: Inject, args: [TUI_DOC_CODE_EDITOR,] }] },
|
|
996
1006
|
{ type: undefined, decorators: [{ type: Inject, args: [TUI_DOC_EXAMPLE_CONTENT_PROCESSOR,] }] },
|
|
997
1007
|
{ type: Boolean, decorators: [{ type: Inject, args: [TUI_IS_CYPRESS,] }] },
|
|
998
|
-
{ type: Array, decorators: [{ type: Inject, args: [TUI_DOC_CODE_ACTIONS,] }] }
|
|
1008
|
+
{ type: Array, decorators: [{ type: Inject, args: [TUI_DOC_CODE_ACTIONS,] }] },
|
|
1009
|
+
{ type: Router, decorators: [{ type: Inject, args: [Router,] }] },
|
|
1010
|
+
{ type: ActivatedRoute, decorators: [{ type: Inject, args: [ActivatedRoute,] }] },
|
|
1011
|
+
{ type: Location$1, decorators: [{ type: Inject, args: [Location$1,] }] }
|
|
999
1012
|
]; };
|
|
1000
1013
|
__decorate([
|
|
1001
1014
|
Input()
|
|
@@ -1026,7 +1039,10 @@ var TuiDocExampleComponent = /** @class */ (function () {
|
|
|
1026
1039
|
__param(6, Inject(TUI_DOC_CODE_EDITOR)),
|
|
1027
1040
|
__param(7, Inject(TUI_DOC_EXAMPLE_CONTENT_PROCESSOR)),
|
|
1028
1041
|
__param(8, Inject(TUI_IS_CYPRESS)),
|
|
1029
|
-
__param(9, Inject(TUI_DOC_CODE_ACTIONS))
|
|
1042
|
+
__param(9, Inject(TUI_DOC_CODE_ACTIONS)),
|
|
1043
|
+
__param(10, Inject(Router)),
|
|
1044
|
+
__param(11, Inject(ActivatedRoute)),
|
|
1045
|
+
__param(12, Inject(Location$1))
|
|
1030
1046
|
], TuiDocExampleComponent);
|
|
1031
1047
|
return TuiDocExampleComponent;
|
|
1032
1048
|
}());
|