@covalent/core 11.0.0-beta.6 → 11.0.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.
@@ -1,5 +1,5 @@
|
|
1
1
|
import * as i0 from '@angular/core';
|
2
|
-
import { Component, Input, ViewChild, inject, Renderer2, ElementRef,
|
2
|
+
import { Component, Input, ViewChild, inject, Renderer2, ElementRef, Directive, HostListener, SecurityContext, ContentChildren, NgModule } from '@angular/core';
|
3
3
|
import { MatSidenav, MatSidenavContainer } from '@angular/material/sidenav';
|
4
4
|
import { mixinDisabled, tdCollapseAnimation } from '@covalent/core/common';
|
5
5
|
import * as i1 from '@angular/common';
|
@@ -128,12 +128,12 @@ class LayoutToggleBase {
|
|
128
128
|
/* tslint:disable-next-line */
|
129
129
|
const _TdLayoutToggleMixinBase = mixinDisabled(LayoutToggleBase);
|
130
130
|
class BaseLayoutToggleDirective extends _TdLayoutToggleMixinBase {
|
131
|
+
_toggleSubs;
|
131
132
|
_renderer = inject(Renderer2);
|
132
133
|
_elementRef = inject(ElementRef);
|
133
|
-
_layout = inject(new InjectionToken('ILayoutTogglable'), { optional: true });
|
134
|
-
_toggleSubs;
|
135
134
|
_initialized = false;
|
136
135
|
_hideWhenOpened = false;
|
136
|
+
_layout;
|
137
137
|
/**
|
138
138
|
* hideWhenOpened?: boolean
|
139
139
|
* When this is set to true, the host will be hidden when
|
@@ -147,15 +147,15 @@ class BaseLayoutToggleDirective extends _TdLayoutToggleMixinBase {
|
|
147
147
|
}
|
148
148
|
constructor() {
|
149
149
|
super();
|
150
|
+
this._renderer.addClass(this._elementRef.nativeElement, 'td-layout-menu-button');
|
151
|
+
}
|
152
|
+
ngAfterViewInit() {
|
153
|
+
this._initialized = true;
|
150
154
|
// if layout has not been provided
|
151
155
|
// show warn message
|
152
156
|
if (!this._layout) {
|
153
157
|
this._noLayoutMessage();
|
154
158
|
}
|
155
|
-
this._renderer.addClass(this._elementRef.nativeElement, 'td-layout-menu-button');
|
156
|
-
}
|
157
|
-
ngAfterViewInit() {
|
158
|
-
this._initialized = true;
|
159
159
|
if (this._layout && this._layout.sidenav) {
|
160
160
|
this._toggleSubs = this._layout.sidenav._animationStarted.subscribe(() => {
|
161
161
|
this._toggleVisibility();
|
@@ -219,10 +219,14 @@ class TdLayoutToggleDirective extends BaseLayoutToggleDirective {
|
|
219
219
|
set tdLayoutToggle(tdLayoutToggle) {
|
220
220
|
this.disabled = !(tdLayoutToggle === '' || tdLayoutToggle);
|
221
221
|
}
|
222
|
+
constructor() {
|
223
|
+
super();
|
224
|
+
this._layout = inject(TdLayoutComponent);
|
225
|
+
}
|
222
226
|
onClick() {
|
223
227
|
this._layout?.toggle();
|
224
228
|
}
|
225
|
-
static ɵfac =
|
229
|
+
static ɵfac = function TdLayoutToggleDirective_Factory(__ngFactoryType__) { return new (__ngFactoryType__ || TdLayoutToggleDirective)(); };
|
226
230
|
static ɵdir = /*@__PURE__*/ i0.ɵɵdefineDirective({ type: TdLayoutToggleDirective, selectors: [["", "tdLayoutToggle", ""]], inputs: { tdLayoutToggle: "tdLayoutToggle" }, features: [i0.ɵɵInheritDefinitionFeature] });
|
227
231
|
}
|
228
232
|
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(TdLayoutToggleDirective, [{
|
@@ -230,17 +234,21 @@ class TdLayoutToggleDirective extends BaseLayoutToggleDirective {
|
|
230
234
|
args: [{
|
231
235
|
selector: '[tdLayoutToggle]',
|
232
236
|
}]
|
233
|
-
}],
|
237
|
+
}], () => [], { tdLayoutToggle: [{
|
234
238
|
type: Input
|
235
239
|
}] }); })();
|
236
240
|
class TdLayoutCloseDirective extends BaseLayoutToggleDirective {
|
237
241
|
set tdLayoutClose(tdLayoutClose) {
|
238
242
|
this.disabled = !(tdLayoutClose === '' || tdLayoutClose);
|
239
243
|
}
|
244
|
+
constructor() {
|
245
|
+
super();
|
246
|
+
this._layout = inject(TdLayoutComponent);
|
247
|
+
}
|
240
248
|
onClick() {
|
241
249
|
this._layout?.close();
|
242
250
|
}
|
243
|
-
static ɵfac =
|
251
|
+
static ɵfac = function TdLayoutCloseDirective_Factory(__ngFactoryType__) { return new (__ngFactoryType__ || TdLayoutCloseDirective)(); };
|
244
252
|
static ɵdir = /*@__PURE__*/ i0.ɵɵdefineDirective({ type: TdLayoutCloseDirective, selectors: [["", "tdLayoutClose", ""]], inputs: { tdLayoutClose: "tdLayoutClose" }, features: [i0.ɵɵInheritDefinitionFeature] });
|
245
253
|
}
|
246
254
|
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(TdLayoutCloseDirective, [{
|
@@ -248,17 +256,21 @@ class TdLayoutCloseDirective extends BaseLayoutToggleDirective {
|
|
248
256
|
args: [{
|
249
257
|
selector: '[tdLayoutClose]',
|
250
258
|
}]
|
251
|
-
}],
|
259
|
+
}], () => [], { tdLayoutClose: [{
|
252
260
|
type: Input
|
253
261
|
}] }); })();
|
254
262
|
class TdLayoutOpenDirective extends BaseLayoutToggleDirective {
|
255
263
|
set tdLayoutClose(tdLayoutOpen) {
|
256
264
|
this.disabled = !(tdLayoutOpen === '' || tdLayoutOpen);
|
257
265
|
}
|
266
|
+
constructor() {
|
267
|
+
super();
|
268
|
+
this._layout = inject(TdLayoutComponent);
|
269
|
+
}
|
258
270
|
onClick() {
|
259
271
|
this._layout?.open();
|
260
272
|
}
|
261
|
-
static ɵfac =
|
273
|
+
static ɵfac = function TdLayoutOpenDirective_Factory(__ngFactoryType__) { return new (__ngFactoryType__ || TdLayoutOpenDirective)(); };
|
262
274
|
static ɵdir = /*@__PURE__*/ i0.ɵɵdefineDirective({ type: TdLayoutOpenDirective, selectors: [["", "tdLayoutOpen", ""]], inputs: { tdLayoutClose: [0, "tdLayoutOpen", "tdLayoutClose"] }, features: [i0.ɵɵInheritDefinitionFeature] });
|
263
275
|
}
|
264
276
|
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(TdLayoutOpenDirective, [{
|
@@ -266,7 +278,7 @@ class TdLayoutOpenDirective extends BaseLayoutToggleDirective {
|
|
266
278
|
args: [{
|
267
279
|
selector: '[tdLayoutOpen]',
|
268
280
|
}]
|
269
|
-
}],
|
281
|
+
}], () => [], { tdLayoutClose: [{
|
270
282
|
type: Input,
|
271
283
|
args: ['tdLayoutOpen']
|
272
284
|
}] }); })();
|
@@ -616,10 +628,14 @@ class TdLayoutNavListToggleDirective extends BaseLayoutToggleDirective {
|
|
616
628
|
set tdLayoutNavListToggle(tdLayoutNavListToggle) {
|
617
629
|
this.disabled = !(tdLayoutNavListToggle === '' || tdLayoutNavListToggle);
|
618
630
|
}
|
631
|
+
constructor() {
|
632
|
+
super();
|
633
|
+
this._layout = inject(TdLayoutNavListComponent);
|
634
|
+
}
|
619
635
|
onClick() {
|
620
636
|
this._layout?.toggle();
|
621
637
|
}
|
622
|
-
static ɵfac =
|
638
|
+
static ɵfac = function TdLayoutNavListToggleDirective_Factory(__ngFactoryType__) { return new (__ngFactoryType__ || TdLayoutNavListToggleDirective)(); };
|
623
639
|
static ɵdir = /*@__PURE__*/ i0.ɵɵdefineDirective({ type: TdLayoutNavListToggleDirective, selectors: [["", "tdLayoutNavListToggle", ""]], inputs: { tdLayoutNavListToggle: "tdLayoutNavListToggle" }, features: [i0.ɵɵInheritDefinitionFeature] });
|
624
640
|
}
|
625
641
|
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(TdLayoutNavListToggleDirective, [{
|
@@ -627,17 +643,21 @@ class TdLayoutNavListToggleDirective extends BaseLayoutToggleDirective {
|
|
627
643
|
args: [{
|
628
644
|
selector: '[tdLayoutNavListToggle]',
|
629
645
|
}]
|
630
|
-
}],
|
646
|
+
}], () => [], { tdLayoutNavListToggle: [{
|
631
647
|
type: Input
|
632
648
|
}] }); })();
|
633
649
|
class TdLayoutNavListCloseDirective extends BaseLayoutToggleDirective {
|
634
650
|
set tdLayoutNavListClose(tdLayoutNavListClose) {
|
635
651
|
this.disabled = !(tdLayoutNavListClose === '' || tdLayoutNavListClose);
|
636
652
|
}
|
653
|
+
constructor() {
|
654
|
+
super();
|
655
|
+
this._layout = inject(TdLayoutNavListComponent);
|
656
|
+
}
|
637
657
|
onClick() {
|
638
658
|
this._layout?.close();
|
639
659
|
}
|
640
|
-
static ɵfac =
|
660
|
+
static ɵfac = function TdLayoutNavListCloseDirective_Factory(__ngFactoryType__) { return new (__ngFactoryType__ || TdLayoutNavListCloseDirective)(); };
|
641
661
|
static ɵdir = /*@__PURE__*/ i0.ɵɵdefineDirective({ type: TdLayoutNavListCloseDirective, selectors: [["", "tdLayoutNavListClose", ""]], inputs: { tdLayoutNavListClose: "tdLayoutNavListClose" }, features: [i0.ɵɵInheritDefinitionFeature] });
|
642
662
|
}
|
643
663
|
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(TdLayoutNavListCloseDirective, [{
|
@@ -645,17 +665,21 @@ class TdLayoutNavListCloseDirective extends BaseLayoutToggleDirective {
|
|
645
665
|
args: [{
|
646
666
|
selector: '[tdLayoutNavListClose]',
|
647
667
|
}]
|
648
|
-
}],
|
668
|
+
}], () => [], { tdLayoutNavListClose: [{
|
649
669
|
type: Input
|
650
670
|
}] }); })();
|
651
671
|
class TdLayoutNavListOpenDirective extends BaseLayoutToggleDirective {
|
652
672
|
set tdLayoutNavListOpen(tdLayoutNavListOpen) {
|
653
673
|
this.disabled = !(tdLayoutNavListOpen === '' || tdLayoutNavListOpen);
|
654
674
|
}
|
675
|
+
constructor() {
|
676
|
+
super();
|
677
|
+
this._layout = inject(TdLayoutNavListComponent);
|
678
|
+
}
|
655
679
|
onClick() {
|
656
680
|
this._layout?.open();
|
657
681
|
}
|
658
|
-
static ɵfac =
|
682
|
+
static ɵfac = function TdLayoutNavListOpenDirective_Factory(__ngFactoryType__) { return new (__ngFactoryType__ || TdLayoutNavListOpenDirective)(); };
|
659
683
|
static ɵdir = /*@__PURE__*/ i0.ɵɵdefineDirective({ type: TdLayoutNavListOpenDirective, selectors: [["", "tdLayoutNavListOpen", ""]], inputs: { tdLayoutNavListOpen: "tdLayoutNavListOpen" }, features: [i0.ɵɵInheritDefinitionFeature] });
|
660
684
|
}
|
661
685
|
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(TdLayoutNavListOpenDirective, [{
|
@@ -663,7 +687,7 @@ class TdLayoutNavListOpenDirective extends BaseLayoutToggleDirective {
|
|
663
687
|
args: [{
|
664
688
|
selector: '[tdLayoutNavListOpen]',
|
665
689
|
}]
|
666
|
-
}],
|
690
|
+
}], () => [], { tdLayoutNavListOpen: [{
|
667
691
|
type: Input
|
668
692
|
}] }); })();
|
669
693
|
|
@@ -874,10 +898,14 @@ class TdLayoutManageListToggleDirective extends BaseLayoutToggleDirective {
|
|
874
898
|
set tdLayoutManageListToggle(tdLayoutManageListToggle) {
|
875
899
|
this.disabled = !(tdLayoutManageListToggle === '' || tdLayoutManageListToggle);
|
876
900
|
}
|
901
|
+
constructor() {
|
902
|
+
super();
|
903
|
+
this._layout = inject(TdLayoutManageListComponent);
|
904
|
+
}
|
877
905
|
onClick() {
|
878
906
|
this._layout?.toggle();
|
879
907
|
}
|
880
|
-
static ɵfac =
|
908
|
+
static ɵfac = function TdLayoutManageListToggleDirective_Factory(__ngFactoryType__) { return new (__ngFactoryType__ || TdLayoutManageListToggleDirective)(); };
|
881
909
|
static ɵdir = /*@__PURE__*/ i0.ɵɵdefineDirective({ type: TdLayoutManageListToggleDirective, selectors: [["", "tdLayoutManageListToggle", ""]], inputs: { tdLayoutManageListToggle: "tdLayoutManageListToggle" }, features: [i0.ɵɵInheritDefinitionFeature] });
|
882
910
|
}
|
883
911
|
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(TdLayoutManageListToggleDirective, [{
|
@@ -885,17 +913,21 @@ class TdLayoutManageListToggleDirective extends BaseLayoutToggleDirective {
|
|
885
913
|
args: [{
|
886
914
|
selector: '[tdLayoutManageListToggle]',
|
887
915
|
}]
|
888
|
-
}],
|
916
|
+
}], () => [], { tdLayoutManageListToggle: [{
|
889
917
|
type: Input
|
890
918
|
}] }); })();
|
891
919
|
class TdLayoutManageListCloseDirective extends BaseLayoutToggleDirective {
|
892
920
|
set tdLayoutManageListClose(tdLayoutManageListClose) {
|
893
921
|
this.disabled = !(tdLayoutManageListClose === '' || tdLayoutManageListClose);
|
894
922
|
}
|
923
|
+
constructor() {
|
924
|
+
super();
|
925
|
+
this._layout = inject(TdLayoutManageListComponent);
|
926
|
+
}
|
895
927
|
onClick() {
|
896
928
|
this._layout?.close();
|
897
929
|
}
|
898
|
-
static ɵfac =
|
930
|
+
static ɵfac = function TdLayoutManageListCloseDirective_Factory(__ngFactoryType__) { return new (__ngFactoryType__ || TdLayoutManageListCloseDirective)(); };
|
899
931
|
static ɵdir = /*@__PURE__*/ i0.ɵɵdefineDirective({ type: TdLayoutManageListCloseDirective, selectors: [["", "tdLayoutManageListClose", ""]], inputs: { tdLayoutManageListClose: "tdLayoutManageListClose" }, features: [i0.ɵɵInheritDefinitionFeature] });
|
900
932
|
}
|
901
933
|
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(TdLayoutManageListCloseDirective, [{
|
@@ -903,17 +935,21 @@ class TdLayoutManageListCloseDirective extends BaseLayoutToggleDirective {
|
|
903
935
|
args: [{
|
904
936
|
selector: '[tdLayoutManageListClose]',
|
905
937
|
}]
|
906
|
-
}],
|
938
|
+
}], () => [], { tdLayoutManageListClose: [{
|
907
939
|
type: Input
|
908
940
|
}] }); })();
|
909
941
|
class TdLayoutManageListOpenDirective extends BaseLayoutToggleDirective {
|
910
942
|
set tdLayoutManageListOpen(tdLayoutManageListOpen) {
|
911
943
|
this.disabled = !(tdLayoutManageListOpen === '' || tdLayoutManageListOpen);
|
912
944
|
}
|
945
|
+
constructor() {
|
946
|
+
super();
|
947
|
+
this._layout = inject(TdLayoutManageListComponent);
|
948
|
+
}
|
913
949
|
onClick() {
|
914
950
|
this._layout?.open();
|
915
951
|
}
|
916
|
-
static ɵfac =
|
952
|
+
static ɵfac = function TdLayoutManageListOpenDirective_Factory(__ngFactoryType__) { return new (__ngFactoryType__ || TdLayoutManageListOpenDirective)(); };
|
917
953
|
static ɵdir = /*@__PURE__*/ i0.ɵɵdefineDirective({ type: TdLayoutManageListOpenDirective, selectors: [["", "tdLayoutManageListOpen", ""]], inputs: { tdLayoutManageListOpen: "tdLayoutManageListOpen" }, features: [i0.ɵɵInheritDefinitionFeature] });
|
918
954
|
}
|
919
955
|
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(TdLayoutManageListOpenDirective, [{
|
@@ -921,7 +957,7 @@ class TdLayoutManageListOpenDirective extends BaseLayoutToggleDirective {
|
|
921
957
|
args: [{
|
922
958
|
selector: '[tdLayoutManageListOpen]',
|
923
959
|
}]
|
924
|
-
}],
|
960
|
+
}], () => [], { tdLayoutManageListOpen: [{
|
925
961
|
type: Input
|
926
962
|
}] }); })();
|
927
963
|
|