@skyux/tiles 7.0.0-beta.9 → 7.1.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/documentation.json +402 -203
- package/esm2020/lib/modules/shared/sky-tiles-resources.module.mjs +5 -5
- package/esm2020/lib/modules/tiles/tile/tile-summary.component.mjs +4 -4
- package/esm2020/lib/modules/tiles/tile/tile-title.component.mjs +4 -4
- package/esm2020/lib/modules/tiles/tile/tile.component.mjs +36 -32
- package/esm2020/lib/modules/tiles/tile/tile.module.mjs +5 -5
- package/esm2020/lib/modules/tiles/tile-content/tile-content-section.component.mjs +4 -4
- package/esm2020/lib/modules/tiles/tile-content/tile-content.component.mjs +4 -4
- package/esm2020/lib/modules/tiles/tile-content/tile-content.module.mjs +5 -5
- package/esm2020/lib/modules/tiles/tile-dashboard/tile-dashboard.component.mjs +45 -35
- package/esm2020/lib/modules/tiles/tile-dashboard/tile-dashboard.module.mjs +5 -5
- package/esm2020/lib/modules/tiles/tile-dashboard/tile-dashboard.service.mjs +353 -327
- package/esm2020/lib/modules/tiles/tile-dashboard-column/tile-dashboard-column.component.mjs +15 -14
- package/esm2020/lib/modules/tiles/tile-dashboard-column/tile-dashboard-column.module.mjs +5 -5
- package/esm2020/lib/modules/tiles/tiles.module.mjs +5 -5
- package/fesm2015/skyux-tiles.mjs +486 -433
- package/fesm2015/skyux-tiles.mjs.map +1 -1
- package/fesm2020/skyux-tiles.mjs +475 -433
- package/fesm2020/skyux-tiles.mjs.map +1 -1
- package/lib/modules/tiles/tile/tile.component.d.ts +5 -9
- package/lib/modules/tiles/tile-dashboard/tile-dashboard.component.d.ts +8 -14
- package/lib/modules/tiles/tile-dashboard/tile-dashboard.service.d.ts +7 -36
- package/lib/modules/tiles/tile-dashboard-column/tile-dashboard-column.component.d.ts +4 -5
- package/package.json +8 -8
package/fesm2015/skyux-tiles.mjs
CHANGED
|
@@ -1,15 +1,16 @@
|
|
|
1
|
-
import * as
|
|
1
|
+
import * as i4 from '@angular/common';
|
|
2
2
|
import { CommonModule } from '@angular/common';
|
|
3
3
|
import * as i0 from '@angular/core';
|
|
4
|
-
import { NgModule, Component, EventEmitter,
|
|
4
|
+
import { NgModule, Component, EventEmitter, Injectable, Optional, Output, ElementRef, Input, ViewChild, ViewChildren } from '@angular/core';
|
|
5
5
|
import * as i2 from '@skyux/core';
|
|
6
|
-
import { SkyMediaBreakpoints, SkyIdModule, SkyTrimModule } from '@skyux/core';
|
|
6
|
+
import { SkyMediaBreakpoints, SkyDynamicComponentLocation, SkyIdModule, SkyTrimModule } from '@skyux/core';
|
|
7
7
|
import * as i3$1 from '@skyux/i18n';
|
|
8
8
|
import { getLibStringForLocale, SkyI18nModule, SKY_LIB_RESOURCES_PROVIDERS } from '@skyux/i18n';
|
|
9
9
|
import * as i3 from '@skyux/indicators';
|
|
10
10
|
import { SkyChevronModule, SkyIconModule } from '@skyux/indicators';
|
|
11
11
|
import * as i5 from '@skyux/theme';
|
|
12
12
|
import { SkyThemeModule } from '@skyux/theme';
|
|
13
|
+
import { __classPrivateFieldSet, __classPrivateFieldGet } from 'tslib';
|
|
13
14
|
import { skyAnimationSlide } from '@skyux/animations';
|
|
14
15
|
import { Subject } from 'rxjs';
|
|
15
16
|
import { take, takeUntil } from 'rxjs/operators';
|
|
@@ -50,16 +51,16 @@ class SkyTilesResourcesProvider {
|
|
|
50
51
|
*/
|
|
51
52
|
class SkyTilesResourcesModule {
|
|
52
53
|
}
|
|
53
|
-
SkyTilesResourcesModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.
|
|
54
|
-
SkyTilesResourcesModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "14.2.
|
|
55
|
-
SkyTilesResourcesModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "14.2.
|
|
54
|
+
SkyTilesResourcesModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.11", ngImport: i0, type: SkyTilesResourcesModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
55
|
+
SkyTilesResourcesModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "14.2.11", ngImport: i0, type: SkyTilesResourcesModule, exports: [SkyI18nModule] });
|
|
56
|
+
SkyTilesResourcesModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "14.2.11", ngImport: i0, type: SkyTilesResourcesModule, providers: [
|
|
56
57
|
{
|
|
57
58
|
provide: SKY_LIB_RESOURCES_PROVIDERS,
|
|
58
59
|
useClass: SkyTilesResourcesProvider,
|
|
59
60
|
multi: true,
|
|
60
61
|
},
|
|
61
62
|
], imports: [SkyI18nModule] });
|
|
62
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.
|
|
63
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.11", ngImport: i0, type: SkyTilesResourcesModule, decorators: [{
|
|
63
64
|
type: NgModule,
|
|
64
65
|
args: [{
|
|
65
66
|
exports: [SkyI18nModule],
|
|
@@ -80,9 +81,9 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.0", ngImpor
|
|
|
80
81
|
/* Code coverage having problems with no statements in classes */
|
|
81
82
|
class SkyTileSummaryComponent {
|
|
82
83
|
}
|
|
83
|
-
SkyTileSummaryComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.
|
|
84
|
-
SkyTileSummaryComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.2.
|
|
85
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.
|
|
84
|
+
SkyTileSummaryComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.11", ngImport: i0, type: SkyTileSummaryComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
85
|
+
SkyTileSummaryComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.2.11", type: SkyTileSummaryComponent, selector: "sky-tile-summary", ngImport: i0, template: "<ng-content></ng-content>\n" });
|
|
86
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.11", ngImport: i0, type: SkyTileSummaryComponent, decorators: [{
|
|
86
87
|
type: Component,
|
|
87
88
|
args: [{ selector: 'sky-tile-summary', template: "<ng-content></ng-content>\n" }]
|
|
88
89
|
}] });
|
|
@@ -92,20 +93,20 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.0", ngImpor
|
|
|
92
93
|
*/
|
|
93
94
|
class SkyTileTitleComponent {
|
|
94
95
|
}
|
|
95
|
-
SkyTileTitleComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.
|
|
96
|
-
SkyTileTitleComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.2.
|
|
97
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.
|
|
96
|
+
SkyTileTitleComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.11", ngImport: i0, type: SkyTileTitleComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
97
|
+
SkyTileTitleComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.2.11", type: SkyTileTitleComponent, selector: "sky-tile-title", ngImport: i0, template: "<h2\n class=\"sky-tile-title\"\n [skyThemeClass]=\"{\n 'sky-font-heading-2': 'modern',\n 'sky-section-heading': 'default'\n }\"\n>\n <span skyTrim><ng-content></ng-content></span\n ><span class=\"sky-control-help-container\"\n ><ng-content select=\".sky-control-help\"></ng-content\n ></span>\n</h2>\n", styles: [".sky-tile-title{margin:0;padding:10px 15px}:host-context(.sky-theme-modern) .sky-tile-title{margin:0 30px 0 0;padding:0}.sky-theme-modern .sky-tile-title{margin:0 30px 0 0;padding:0}\n"], dependencies: [{ kind: "directive", type: i5.λ2, selector: "[skyThemeClass]", inputs: ["class", "skyThemeClass"] }, { kind: "directive", type: i2.λ4, selector: "[skyTrim]" }] });
|
|
98
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.11", ngImport: i0, type: SkyTileTitleComponent, decorators: [{
|
|
98
99
|
type: Component,
|
|
99
100
|
args: [{ selector: 'sky-tile-title', template: "<h2\n class=\"sky-tile-title\"\n [skyThemeClass]=\"{\n 'sky-font-heading-2': 'modern',\n 'sky-section-heading': 'default'\n }\"\n>\n <span skyTrim><ng-content></ng-content></span\n ><span class=\"sky-control-help-container\"\n ><ng-content select=\".sky-control-help\"></ng-content\n ></span>\n</h2>\n", styles: [".sky-tile-title{margin:0;padding:10px 15px}:host-context(.sky-theme-modern) .sky-tile-title{margin:0 30px 0 0;padding:0}.sky-theme-modern .sky-tile-title{margin:0 30px 0 0;padding:0}\n"] }]
|
|
100
101
|
}] });
|
|
101
102
|
|
|
103
|
+
var _SkyTileDashboardService_instances, _SkyTileDashboardService_columns, _SkyTileDashboardService_config, _SkyTileDashboardService_dragulaService, _SkyTileDashboardService_dynamicComponentService, _SkyTileDashboardService_mediaSubscription, _SkyTileDashboardService_mediaQuery, _SkyTileDashboardService_singleColumn, _SkyTileDashboardService_settingsKey, _SkyTileDashboardService_tileComponents, _SkyTileDashboardService_uiConfigService, _SkyTileDashboardService_getTileId, _SkyTileDashboardService_getTileOrRemoveFromLayout, _SkyTileDashboardService_checkReadyAndLoadTiles, _SkyTileDashboardService_loadTiles, _SkyTileDashboardService_loadTileIntoColumn, _SkyTileDashboardService_moveTilesToSingleColumn, _SkyTileDashboardService_moveTilesToMultiColumn, _SkyTileDashboardService_moveTilesToColumn, _SkyTileDashboardService_getConfigForUIState, _SkyTileDashboardService_getSingleColumnLayoutForUIState, _SkyTileDashboardService_getMultiColumnLayoutForUIState, _SkyTileDashboardService_getTilesInEl, _SkyTileDashboardService_initMediaQueries, _SkyTileDashboardService_initDragula, _SkyTileDashboardService_getColumnEl, _SkyTileDashboardService_findTile, _SkyTileDashboardService_findTileColumn, _SkyTileDashboardService_initToDefaults, _SkyTileDashboardService_setUserConfig, _SkyTileDashboardService_checkForNewTiles;
|
|
102
104
|
const ATTR_TILE_ID = '_sky-tile-dashboard-tile-id';
|
|
103
105
|
let bagIdIndex = 0;
|
|
104
106
|
class SkyTileDashboardService {
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
this
|
|
108
|
-
this.uiConfigService = uiConfigService;
|
|
107
|
+
// TODO: remove @optional tag in a future breaking change
|
|
108
|
+
constructor(dragulaService, mediaQuery, uiConfigService, dynamicComponentService) {
|
|
109
|
+
_SkyTileDashboardService_instances.add(this);
|
|
109
110
|
/**
|
|
110
111
|
* @internal
|
|
111
112
|
*/
|
|
@@ -114,8 +115,25 @@ class SkyTileDashboardService {
|
|
|
114
115
|
* Fires when the tile dashboard's initialization is complete.
|
|
115
116
|
*/
|
|
116
117
|
this.dashboardInitialized = new EventEmitter();
|
|
117
|
-
this
|
|
118
|
-
|
|
118
|
+
_SkyTileDashboardService_columns.set(this, void 0);
|
|
119
|
+
_SkyTileDashboardService_config.set(this, void 0);
|
|
120
|
+
_SkyTileDashboardService_dragulaService.set(this, void 0);
|
|
121
|
+
_SkyTileDashboardService_dynamicComponentService.set(this, void 0);
|
|
122
|
+
_SkyTileDashboardService_mediaSubscription.set(this, void 0);
|
|
123
|
+
_SkyTileDashboardService_mediaQuery.set(this, void 0);
|
|
124
|
+
_SkyTileDashboardService_singleColumn.set(this, void 0);
|
|
125
|
+
_SkyTileDashboardService_settingsKey.set(this, void 0);
|
|
126
|
+
_SkyTileDashboardService_tileComponents.set(this, void 0);
|
|
127
|
+
_SkyTileDashboardService_uiConfigService.set(this, void 0);
|
|
128
|
+
if (!dynamicComponentService) {
|
|
129
|
+
console.warn('The SkyTileDashboardService was created without a reference to the SkyDynamicComponentService. The service will be unable to create tiles from the dashboard configuration. Constructing the SkyTileDashboardService without a SkyDynamicComponentService will be removed in a future breaking change.');
|
|
130
|
+
}
|
|
131
|
+
__classPrivateFieldSet(this, _SkyTileDashboardService_dragulaService, dragulaService, "f");
|
|
132
|
+
__classPrivateFieldSet(this, _SkyTileDashboardService_dynamicComponentService, dynamicComponentService, "f");
|
|
133
|
+
__classPrivateFieldSet(this, _SkyTileDashboardService_mediaQuery, mediaQuery, "f");
|
|
134
|
+
__classPrivateFieldSet(this, _SkyTileDashboardService_uiConfigService, uiConfigService, "f");
|
|
135
|
+
this.bagId = `sky-tile-dashboard-bag-${++bagIdIndex}`;
|
|
136
|
+
__classPrivateFieldGet(this, _SkyTileDashboardService_instances, "m", _SkyTileDashboardService_initDragula).call(this);
|
|
119
137
|
}
|
|
120
138
|
/**
|
|
121
139
|
* @internal
|
|
@@ -124,31 +142,31 @@ class SkyTileDashboardService {
|
|
|
124
142
|
if (settingsKey) {
|
|
125
143
|
// Clone this so changes to the config object outside of this class don't modify
|
|
126
144
|
// the config used inside and vice versa.
|
|
127
|
-
this
|
|
128
|
-
this
|
|
129
|
-
this
|
|
145
|
+
__classPrivateFieldSet(this, _SkyTileDashboardService_config, Object.assign({}, config), "f");
|
|
146
|
+
__classPrivateFieldSet(this, _SkyTileDashboardService_settingsKey, settingsKey, "f");
|
|
147
|
+
__classPrivateFieldGet(this, _SkyTileDashboardService_uiConfigService, "f")
|
|
130
148
|
.getConfig(settingsKey, config)
|
|
131
149
|
.pipe(take(1))
|
|
132
150
|
.subscribe((value) => {
|
|
133
|
-
if (value.persisted) {
|
|
134
|
-
this.
|
|
135
|
-
this.
|
|
136
|
-
this.configChange.emit(this
|
|
137
|
-
this
|
|
138
|
-
this
|
|
139
|
-
this.
|
|
151
|
+
if (__classPrivateFieldGet(this, _SkyTileDashboardService_config, "f") && value.persisted) {
|
|
152
|
+
__classPrivateFieldGet(this, _SkyTileDashboardService_config, "f").layout = value.layout;
|
|
153
|
+
__classPrivateFieldGet(this, _SkyTileDashboardService_instances, "m", _SkyTileDashboardService_checkForNewTiles).call(this, value.tileIds);
|
|
154
|
+
this.configChange.emit(__classPrivateFieldGet(this, _SkyTileDashboardService_config, "f"));
|
|
155
|
+
__classPrivateFieldSet(this, _SkyTileDashboardService_columns, columns, "f");
|
|
156
|
+
__classPrivateFieldSet(this, _SkyTileDashboardService_singleColumn, singleColumn, "f");
|
|
157
|
+
__classPrivateFieldGet(this, _SkyTileDashboardService_instances, "m", _SkyTileDashboardService_checkReadyAndLoadTiles).call(this);
|
|
140
158
|
}
|
|
141
159
|
else {
|
|
142
160
|
// Bad data, or config is the default config.
|
|
143
|
-
this.
|
|
161
|
+
__classPrivateFieldGet(this, _SkyTileDashboardService_instances, "m", _SkyTileDashboardService_initToDefaults).call(this, config, columns, singleColumn);
|
|
144
162
|
}
|
|
145
163
|
}, (error) => {
|
|
146
164
|
// Config setting key doesn't exist or other config service error
|
|
147
|
-
this.
|
|
165
|
+
__classPrivateFieldGet(this, _SkyTileDashboardService_instances, "m", _SkyTileDashboardService_initToDefaults).call(this, config, columns, singleColumn);
|
|
148
166
|
});
|
|
149
167
|
}
|
|
150
168
|
else {
|
|
151
|
-
this.
|
|
169
|
+
__classPrivateFieldGet(this, _SkyTileDashboardService_instances, "m", _SkyTileDashboardService_initToDefaults).call(this, config, columns, singleColumn);
|
|
152
170
|
}
|
|
153
171
|
}
|
|
154
172
|
/**
|
|
@@ -157,8 +175,8 @@ class SkyTileDashboardService {
|
|
|
157
175
|
* @param component Specifies the tile component to add.
|
|
158
176
|
*/
|
|
159
177
|
addTileComponent(tile, component) {
|
|
160
|
-
this
|
|
161
|
-
this.
|
|
178
|
+
__classPrivateFieldSet(this, _SkyTileDashboardService_tileComponents, __classPrivateFieldGet(this, _SkyTileDashboardService_tileComponents, "f") || [], "f");
|
|
179
|
+
__classPrivateFieldGet(this, _SkyTileDashboardService_tileComponents, "f").push(component);
|
|
162
180
|
component.location.nativeElement.setAttribute(ATTR_TILE_ID, tile.id);
|
|
163
181
|
}
|
|
164
182
|
/**
|
|
@@ -166,11 +184,11 @@ class SkyTileDashboardService {
|
|
|
166
184
|
* @param tile Specifies the tile component to check.
|
|
167
185
|
*/
|
|
168
186
|
tileIsCollapsed(tile) {
|
|
169
|
-
const tileConfig = this.
|
|
187
|
+
const tileConfig = __classPrivateFieldGet(this, _SkyTileDashboardService_instances, "m", _SkyTileDashboardService_findTile).call(this, __classPrivateFieldGet(this, _SkyTileDashboardService_instances, "m", _SkyTileDashboardService_getTileId).call(this, tile));
|
|
170
188
|
if (tileConfig) {
|
|
171
189
|
return tileConfig.isCollapsed;
|
|
172
190
|
}
|
|
173
|
-
return
|
|
191
|
+
return false;
|
|
174
192
|
}
|
|
175
193
|
/**
|
|
176
194
|
* Sets the collapsed state of all tiles.
|
|
@@ -178,20 +196,20 @@ class SkyTileDashboardService {
|
|
|
178
196
|
*/
|
|
179
197
|
setAllTilesCollapsed(isCollapsed) {
|
|
180
198
|
/*istanbul ignore else */
|
|
181
|
-
if (this
|
|
182
|
-
for (const column of this.
|
|
199
|
+
if (__classPrivateFieldGet(this, _SkyTileDashboardService_config, "f") && __classPrivateFieldGet(this, _SkyTileDashboardService_config, "f").layout.multiColumn) {
|
|
200
|
+
for (const column of __classPrivateFieldGet(this, _SkyTileDashboardService_config, "f").layout.multiColumn) {
|
|
183
201
|
for (const tile of column.tiles) {
|
|
184
202
|
tile.isCollapsed = isCollapsed;
|
|
185
203
|
}
|
|
186
204
|
}
|
|
187
|
-
for (const tile of this.
|
|
205
|
+
for (const tile of __classPrivateFieldGet(this, _SkyTileDashboardService_config, "f").layout.singleColumn.tiles) {
|
|
188
206
|
tile.isCollapsed = isCollapsed;
|
|
189
207
|
}
|
|
190
208
|
}
|
|
191
|
-
if (this
|
|
192
|
-
this.
|
|
209
|
+
if (__classPrivateFieldGet(this, _SkyTileDashboardService_settingsKey, "f")) {
|
|
210
|
+
__classPrivateFieldGet(this, _SkyTileDashboardService_instances, "m", _SkyTileDashboardService_setUserConfig).call(this, __classPrivateFieldGet(this, _SkyTileDashboardService_config, "f"));
|
|
193
211
|
}
|
|
194
|
-
this.configChange.emit(this
|
|
212
|
+
this.configChange.emit(__classPrivateFieldGet(this, _SkyTileDashboardService_config, "f"));
|
|
195
213
|
}
|
|
196
214
|
/**
|
|
197
215
|
* Sets the collapsed state of a specified tile.
|
|
@@ -199,21 +217,21 @@ class SkyTileDashboardService {
|
|
|
199
217
|
* @param isCollapsed Indicates whether the tile is collapsed.
|
|
200
218
|
*/
|
|
201
219
|
setTileCollapsed(tile, isCollapsed) {
|
|
202
|
-
const tileConfig = this.
|
|
220
|
+
const tileConfig = __classPrivateFieldGet(this, _SkyTileDashboardService_instances, "m", _SkyTileDashboardService_findTile).call(this, __classPrivateFieldGet(this, _SkyTileDashboardService_instances, "m", _SkyTileDashboardService_getTileId).call(this, tile));
|
|
203
221
|
if (tileConfig) {
|
|
204
222
|
tileConfig.isCollapsed = isCollapsed;
|
|
205
|
-
if (this
|
|
206
|
-
this.
|
|
223
|
+
if (__classPrivateFieldGet(this, _SkyTileDashboardService_settingsKey, "f")) {
|
|
224
|
+
__classPrivateFieldGet(this, _SkyTileDashboardService_instances, "m", _SkyTileDashboardService_setUserConfig).call(this, __classPrivateFieldGet(this, _SkyTileDashboardService_config, "f"));
|
|
207
225
|
}
|
|
208
|
-
this.configChange.emit(this
|
|
226
|
+
this.configChange.emit(__classPrivateFieldGet(this, _SkyTileDashboardService_config, "f"));
|
|
209
227
|
}
|
|
210
228
|
}
|
|
211
229
|
/**
|
|
212
230
|
* @internal
|
|
213
231
|
*/
|
|
214
232
|
getTileComponentType(layoutTile) {
|
|
215
|
-
if (layoutTile) {
|
|
216
|
-
for (const tile of this.
|
|
233
|
+
if (layoutTile && __classPrivateFieldGet(this, _SkyTileDashboardService_config, "f")) {
|
|
234
|
+
for (const tile of __classPrivateFieldGet(this, _SkyTileDashboardService_config, "f").tiles) {
|
|
217
235
|
if (tile.id === layoutTile.id) {
|
|
218
236
|
return tile.componentType;
|
|
219
237
|
}
|
|
@@ -226,12 +244,12 @@ class SkyTileDashboardService {
|
|
|
226
244
|
*/
|
|
227
245
|
changeColumnMode(isSingleColumn) {
|
|
228
246
|
/*istanbul ignore else */
|
|
229
|
-
if (this
|
|
247
|
+
if (__classPrivateFieldGet(this, _SkyTileDashboardService_config, "f")) {
|
|
230
248
|
if (isSingleColumn) {
|
|
231
|
-
this.
|
|
249
|
+
__classPrivateFieldGet(this, _SkyTileDashboardService_instances, "m", _SkyTileDashboardService_moveTilesToSingleColumn).call(this);
|
|
232
250
|
}
|
|
233
251
|
else {
|
|
234
|
-
this.
|
|
252
|
+
__classPrivateFieldGet(this, _SkyTileDashboardService_instances, "m", _SkyTileDashboardService_moveTilesToMultiColumn).call(this);
|
|
235
253
|
}
|
|
236
254
|
}
|
|
237
255
|
}
|
|
@@ -239,10 +257,12 @@ class SkyTileDashboardService {
|
|
|
239
257
|
* @internal
|
|
240
258
|
*/
|
|
241
259
|
getTileComponent(tileId) {
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
260
|
+
if (__classPrivateFieldGet(this, _SkyTileDashboardService_tileComponents, "f")) {
|
|
261
|
+
for (const tileComponent of __classPrivateFieldGet(this, _SkyTileDashboardService_tileComponents, "f")) {
|
|
262
|
+
if (tileComponent.location.nativeElement.getAttribute(ATTR_TILE_ID) ===
|
|
263
|
+
tileId) {
|
|
264
|
+
return tileComponent;
|
|
265
|
+
}
|
|
246
266
|
}
|
|
247
267
|
}
|
|
248
268
|
/*istanbul ignore next */
|
|
@@ -253,305 +273,318 @@ class SkyTileDashboardService {
|
|
|
253
273
|
*/
|
|
254
274
|
destroy() {
|
|
255
275
|
/*istanbul ignore else */
|
|
256
|
-
if (this
|
|
257
|
-
this.
|
|
276
|
+
if (__classPrivateFieldGet(this, _SkyTileDashboardService_mediaSubscription, "f")) {
|
|
277
|
+
__classPrivateFieldGet(this, _SkyTileDashboardService_mediaSubscription, "f").unsubscribe();
|
|
258
278
|
}
|
|
259
279
|
}
|
|
260
280
|
/**
|
|
261
281
|
* @internal
|
|
262
282
|
*/
|
|
263
283
|
moveTileOnKeyDown(tileCmp, direction, tileDescription) {
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
column = this.findTileColumn(tileId);
|
|
275
|
-
colIndex = this.config.layout.multiColumn.findIndex((value) => value === column);
|
|
276
|
-
}
|
|
277
|
-
if ((direction === 'left' || direction === 'right') &&
|
|
278
|
-
!isSingleColumnMode) {
|
|
279
|
-
const operator = direction === 'left' ? -1 : 1;
|
|
280
|
-
const newColumn = this.config.layout.multiColumn[colIndex + operator];
|
|
281
|
-
if (newColumn) {
|
|
282
|
-
// Move the tile to the end of the new column
|
|
283
|
-
newColumn.tiles.push(tile);
|
|
284
|
-
column.tiles = column.tiles.filter((item) => item !== tile);
|
|
285
|
-
this.moveTilesToColumn(this.columns.toArray()[colIndex + operator], [
|
|
286
|
-
tile,
|
|
287
|
-
]);
|
|
288
|
-
// Report the change in configuration
|
|
289
|
-
const reportConfig = this.config;
|
|
290
|
-
reportConfig.movedTile = {
|
|
291
|
-
tileDescription: tileDescription || /* istanbul ignore next */ tile.id,
|
|
292
|
-
column: colIndex + operator + 1,
|
|
293
|
-
position: newColumn.tiles.length,
|
|
294
|
-
};
|
|
295
|
-
this.configChange.emit(reportConfig);
|
|
284
|
+
var _a, _b, _c;
|
|
285
|
+
if (__classPrivateFieldGet(this, _SkyTileDashboardService_config, "f")) {
|
|
286
|
+
const isSingleColumnMode = __classPrivateFieldGet(this, _SkyTileDashboardService_mediaQuery, "f").current === SkyMediaBreakpoints.xs ||
|
|
287
|
+
__classPrivateFieldGet(this, _SkyTileDashboardService_mediaQuery, "f").current === SkyMediaBreakpoints.sm;
|
|
288
|
+
const tileId = __classPrivateFieldGet(this, _SkyTileDashboardService_instances, "m", _SkyTileDashboardService_getTileId).call(this, tileCmp);
|
|
289
|
+
const tile = __classPrivateFieldGet(this, _SkyTileDashboardService_instances, "m", _SkyTileDashboardService_findTile).call(this, tileId);
|
|
290
|
+
let column;
|
|
291
|
+
let colIndex = 0;
|
|
292
|
+
if (isSingleColumnMode) {
|
|
293
|
+
column = __classPrivateFieldGet(this, _SkyTileDashboardService_config, "f").layout.singleColumn;
|
|
296
294
|
}
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
|
|
295
|
+
else {
|
|
296
|
+
column = __classPrivateFieldGet(this, _SkyTileDashboardService_instances, "m", _SkyTileDashboardService_findTileColumn).call(this, tileId);
|
|
297
|
+
colIndex = __classPrivateFieldGet(this, _SkyTileDashboardService_config, "f").layout.multiColumn.findIndex((value) => value === column);
|
|
298
|
+
}
|
|
299
|
+
if (column && tile && tileId) {
|
|
300
|
+
if ((direction === 'left' || direction === 'right') &&
|
|
301
|
+
!isSingleColumnMode) {
|
|
302
|
+
const operator = direction === 'left' ? -1 : 1;
|
|
303
|
+
const newColumn = __classPrivateFieldGet(this, _SkyTileDashboardService_config, "f").layout.multiColumn[colIndex + operator];
|
|
304
|
+
if (newColumn) {
|
|
305
|
+
// Move the tile to the end of the new column
|
|
306
|
+
newColumn.tiles.push(tile);
|
|
307
|
+
column.tiles = column.tiles.filter((item) => item !== tile);
|
|
308
|
+
__classPrivateFieldGet(this, _SkyTileDashboardService_instances, "m", _SkyTileDashboardService_moveTilesToColumn).call(this, (_a = __classPrivateFieldGet(this, _SkyTileDashboardService_columns, "f")) === null || _a === void 0 ? void 0 : _a.toArray()[colIndex + operator], [tile]);
|
|
309
|
+
// Report the change in configuration
|
|
310
|
+
const reportConfig = __classPrivateFieldGet(this, _SkyTileDashboardService_config, "f");
|
|
311
|
+
reportConfig.movedTile = {
|
|
312
|
+
tileDescription: tileDescription || /* istanbul ignore next */ tile.id,
|
|
313
|
+
column: colIndex + operator + 1,
|
|
314
|
+
position: newColumn.tiles.length,
|
|
315
|
+
};
|
|
316
|
+
this.configChange.emit(reportConfig);
|
|
317
|
+
}
|
|
317
318
|
}
|
|
318
319
|
else {
|
|
319
|
-
|
|
320
|
-
|
|
320
|
+
const operator = direction === 'up' ? -1 : 1;
|
|
321
|
+
const curIndex = column.tiles.findIndex((value) => value.id === tile.id);
|
|
322
|
+
const tileComponentInstance = this.getTileComponent(tileId);
|
|
323
|
+
if (tileComponentInstance && column.tiles[curIndex + operator]) {
|
|
324
|
+
const temp = column.tiles[curIndex + operator];
|
|
325
|
+
column.tiles[curIndex + operator] = tile;
|
|
326
|
+
column.tiles[curIndex] = temp;
|
|
327
|
+
// Get the column element
|
|
328
|
+
let columnEl;
|
|
329
|
+
if (isSingleColumnMode) {
|
|
330
|
+
columnEl = __classPrivateFieldGet(this, _SkyTileDashboardService_instances, "m", _SkyTileDashboardService_getColumnEl).call(this, __classPrivateFieldGet(this, _SkyTileDashboardService_singleColumn, "f"));
|
|
331
|
+
}
|
|
332
|
+
else {
|
|
333
|
+
columnEl = __classPrivateFieldGet(this, _SkyTileDashboardService_instances, "m", _SkyTileDashboardService_getColumnEl).call(this, (_b = __classPrivateFieldGet(this, _SkyTileDashboardService_columns, "f")) === null || _b === void 0 ? void 0 : _b.toArray()[colIndex]);
|
|
334
|
+
}
|
|
335
|
+
// Move the tile element in the document
|
|
336
|
+
if (curIndex + operator === column.tiles.length - 1) {
|
|
337
|
+
columnEl === null || columnEl === void 0 ? void 0 : columnEl.appendChild(tileComponentInstance.location.nativeElement);
|
|
338
|
+
}
|
|
339
|
+
else {
|
|
340
|
+
columnEl === null || columnEl === void 0 ? void 0 : columnEl.insertBefore(tileComponentInstance.location.nativeElement, (_c = this.getTileComponent(column.tiles[curIndex + operator + 1].id)) === null || _c === void 0 ? void 0 : _c.location.nativeElement);
|
|
341
|
+
}
|
|
342
|
+
// Report the change in configuration
|
|
343
|
+
const reportConfig = __classPrivateFieldGet(this, _SkyTileDashboardService_config, "f");
|
|
344
|
+
reportConfig.movedTile = {
|
|
345
|
+
tileDescription: tileDescription || /* istanbul ignore next */ tile.id,
|
|
346
|
+
column: isSingleColumnMode ? 1 : colIndex + 1,
|
|
347
|
+
position: curIndex + operator + 1,
|
|
348
|
+
};
|
|
349
|
+
this.configChange.emit(reportConfig);
|
|
350
|
+
}
|
|
321
351
|
}
|
|
322
|
-
// Report the change in configuration
|
|
323
|
-
const reportConfig = this.config;
|
|
324
|
-
reportConfig.movedTile = {
|
|
325
|
-
tileDescription: tileDescription || /* istanbul ignore next */ tile.id,
|
|
326
|
-
column: isSingleColumnMode ? undefined : colIndex + 1,
|
|
327
|
-
position: curIndex + operator + 1,
|
|
328
|
-
};
|
|
329
|
-
this.configChange.emit(reportConfig);
|
|
330
352
|
}
|
|
331
353
|
}
|
|
332
354
|
}
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
el = el.parentElement;
|
|
355
|
+
}
|
|
356
|
+
_SkyTileDashboardService_columns = new WeakMap(), _SkyTileDashboardService_config = new WeakMap(), _SkyTileDashboardService_dragulaService = new WeakMap(), _SkyTileDashboardService_dynamicComponentService = new WeakMap(), _SkyTileDashboardService_mediaSubscription = new WeakMap(), _SkyTileDashboardService_mediaQuery = new WeakMap(), _SkyTileDashboardService_singleColumn = new WeakMap(), _SkyTileDashboardService_settingsKey = new WeakMap(), _SkyTileDashboardService_tileComponents = new WeakMap(), _SkyTileDashboardService_uiConfigService = new WeakMap(), _SkyTileDashboardService_instances = new WeakSet(), _SkyTileDashboardService_getTileId = function _SkyTileDashboardService_getTileId(tile) {
|
|
357
|
+
if (tile) {
|
|
358
|
+
let el = tile.elementRef.nativeElement;
|
|
359
|
+
let tileId;
|
|
360
|
+
while (el) {
|
|
361
|
+
tileId = el.getAttribute(ATTR_TILE_ID);
|
|
362
|
+
if (tileId) {
|
|
363
|
+
return tileId;
|
|
343
364
|
}
|
|
365
|
+
el = el.parentElement;
|
|
344
366
|
}
|
|
345
|
-
return undefined;
|
|
346
367
|
}
|
|
347
|
-
|
|
348
|
-
|
|
349
|
-
|
|
350
|
-
|
|
351
|
-
|
|
352
|
-
|
|
353
|
-
|
|
354
|
-
|
|
355
|
-
// If the layout tile was not found in the list of tiles, it was removed since last the user updated settings
|
|
356
|
-
/*istanbul ignore else */
|
|
357
|
-
if (this.config.layout.singleColumn) {
|
|
358
|
-
this.config.layout.singleColumn.tiles =
|
|
359
|
-
this.config.layout.singleColumn.tiles.filter((elem) => elem.id !== layoutTile.id);
|
|
360
|
-
}
|
|
361
|
-
/*istanbul ignore else */
|
|
362
|
-
if (this.config.layout.multiColumn) {
|
|
363
|
-
this.config.layout.multiColumn.forEach((elem) => {
|
|
364
|
-
elem.tiles = elem.tiles.filter((res) => res.id !== layoutTile.id);
|
|
365
|
-
});
|
|
368
|
+
return undefined;
|
|
369
|
+
}, _SkyTileDashboardService_getTileOrRemoveFromLayout = function _SkyTileDashboardService_getTileOrRemoveFromLayout(layoutTile) {
|
|
370
|
+
var _a, _b;
|
|
371
|
+
/*istanbul ignore else */
|
|
372
|
+
if (layoutTile && __classPrivateFieldGet(this, _SkyTileDashboardService_config, "f")) {
|
|
373
|
+
for (const tile of __classPrivateFieldGet(this, _SkyTileDashboardService_config, "f").tiles) {
|
|
374
|
+
if (tile.id === layoutTile.id) {
|
|
375
|
+
return tile;
|
|
366
376
|
}
|
|
367
377
|
}
|
|
368
|
-
|
|
369
|
-
|
|
378
|
+
// If the layout tile was not found in the list of tiles, it was removed since last the user updated settings
|
|
379
|
+
/*istanbul ignore else */
|
|
380
|
+
if ((_a = __classPrivateFieldGet(this, _SkyTileDashboardService_config, "f")) === null || _a === void 0 ? void 0 : _a.layout.singleColumn) {
|
|
381
|
+
__classPrivateFieldGet(this, _SkyTileDashboardService_config, "f").layout.singleColumn.tiles =
|
|
382
|
+
__classPrivateFieldGet(this, _SkyTileDashboardService_config, "f").layout.singleColumn.tiles.filter((elem) => elem.id !== layoutTile.id);
|
|
383
|
+
}
|
|
384
|
+
/*istanbul ignore else */
|
|
385
|
+
if ((_b = __classPrivateFieldGet(this, _SkyTileDashboardService_config, "f")) === null || _b === void 0 ? void 0 : _b.layout.multiColumn) {
|
|
386
|
+
__classPrivateFieldGet(this, _SkyTileDashboardService_config, "f").layout.multiColumn.forEach((elem) => {
|
|
387
|
+
elem.tiles = elem.tiles.filter((res) => res.id !== layoutTile.id);
|
|
388
|
+
});
|
|
389
|
+
}
|
|
390
|
+
}
|
|
391
|
+
/*istanbul ignore next */
|
|
392
|
+
return undefined;
|
|
393
|
+
}, _SkyTileDashboardService_checkReadyAndLoadTiles = function _SkyTileDashboardService_checkReadyAndLoadTiles() {
|
|
394
|
+
if (__classPrivateFieldGet(this, _SkyTileDashboardService_config, "f") && __classPrivateFieldGet(this, _SkyTileDashboardService_columns, "f")) {
|
|
395
|
+
__classPrivateFieldGet(this, _SkyTileDashboardService_instances, "m", _SkyTileDashboardService_loadTiles).call(this, __classPrivateFieldGet(this, _SkyTileDashboardService_config, "f"));
|
|
396
|
+
__classPrivateFieldGet(this, _SkyTileDashboardService_instances, "m", _SkyTileDashboardService_initMediaQueries).call(this);
|
|
397
|
+
this.dashboardInitialized.emit();
|
|
370
398
|
}
|
|
371
|
-
|
|
372
|
-
|
|
373
|
-
|
|
374
|
-
|
|
375
|
-
|
|
399
|
+
}, _SkyTileDashboardService_loadTiles = function _SkyTileDashboardService_loadTiles(config) {
|
|
400
|
+
var _a;
|
|
401
|
+
const layout = config.layout;
|
|
402
|
+
if (__classPrivateFieldGet(this, _SkyTileDashboardService_mediaQuery, "f").current === SkyMediaBreakpoints.xs ||
|
|
403
|
+
__classPrivateFieldGet(this, _SkyTileDashboardService_mediaQuery, "f").current === SkyMediaBreakpoints.sm) {
|
|
404
|
+
for (const tile of layout.singleColumn.tiles) {
|
|
405
|
+
__classPrivateFieldGet(this, _SkyTileDashboardService_instances, "m", _SkyTileDashboardService_loadTileIntoColumn).call(this, __classPrivateFieldGet(this, _SkyTileDashboardService_singleColumn, "f"), tile);
|
|
376
406
|
}
|
|
377
407
|
}
|
|
378
|
-
|
|
379
|
-
|
|
380
|
-
|
|
381
|
-
|
|
382
|
-
|
|
383
|
-
this.loadTileIntoColumn(this.singleColumn, tile);
|
|
384
|
-
}
|
|
408
|
+
else {
|
|
409
|
+
let columns = [];
|
|
410
|
+
/*istanbul ignore else */
|
|
411
|
+
if (__classPrivateFieldGet(this, _SkyTileDashboardService_columns, "f")) {
|
|
412
|
+
columns = (_a = __classPrivateFieldGet(this, _SkyTileDashboardService_columns, "f")) === null || _a === void 0 ? void 0 : _a.toArray();
|
|
385
413
|
}
|
|
386
|
-
|
|
387
|
-
const
|
|
388
|
-
for (
|
|
389
|
-
|
|
390
|
-
for (const tile of layout.multiColumn[i].tiles) {
|
|
391
|
-
this.loadTileIntoColumn(column, tile);
|
|
392
|
-
}
|
|
414
|
+
for (let i = 0, n = layout.multiColumn.length; i < n; i++) {
|
|
415
|
+
const column = columns[i];
|
|
416
|
+
for (const tile of layout.multiColumn[i].tiles) {
|
|
417
|
+
__classPrivateFieldGet(this, _SkyTileDashboardService_instances, "m", _SkyTileDashboardService_loadTileIntoColumn).call(this, column, tile);
|
|
393
418
|
}
|
|
394
419
|
}
|
|
395
420
|
}
|
|
396
|
-
|
|
397
|
-
|
|
421
|
+
}, _SkyTileDashboardService_loadTileIntoColumn = function _SkyTileDashboardService_loadTileIntoColumn(column, layoutTile) {
|
|
422
|
+
var _a;
|
|
423
|
+
if (column) {
|
|
424
|
+
const tile = __classPrivateFieldGet(this, _SkyTileDashboardService_instances, "m", _SkyTileDashboardService_getTileOrRemoveFromLayout).call(this, layoutTile);
|
|
398
425
|
/*istanbul ignore else */
|
|
399
|
-
if (tile) {
|
|
426
|
+
if (tile && __classPrivateFieldGet(this, _SkyTileDashboardService_dynamicComponentService, "f")) {
|
|
400
427
|
const componentType = tile.componentType;
|
|
401
428
|
const providers = tile.providers /* istanbul ignore next */ || [];
|
|
402
|
-
const
|
|
403
|
-
|
|
404
|
-
|
|
429
|
+
const componentRef = __classPrivateFieldGet(this, _SkyTileDashboardService_dynamicComponentService, "f").createComponent(componentType, {
|
|
430
|
+
location: SkyDynamicComponentLocation.ElementBottom,
|
|
431
|
+
providers: providers,
|
|
432
|
+
referenceEl: (_a = column.content) === null || _a === void 0 ? void 0 : _a.nativeElement,
|
|
433
|
+
parentInjector: column.injector,
|
|
405
434
|
});
|
|
406
|
-
const factory = column.resolver.resolveComponentFactory(componentType);
|
|
407
|
-
const componentRef = column.content.createComponent(factory, undefined, injector);
|
|
408
435
|
this.addTileComponent(layoutTile, componentRef);
|
|
409
436
|
// Make sure the component is marked for changes in case the parent component uses
|
|
410
437
|
// the OnPush change detection strategy.
|
|
411
438
|
componentRef.changeDetectorRef.markForCheck();
|
|
412
439
|
}
|
|
413
440
|
}
|
|
414
|
-
|
|
415
|
-
|
|
441
|
+
}, _SkyTileDashboardService_moveTilesToSingleColumn = function _SkyTileDashboardService_moveTilesToSingleColumn() {
|
|
442
|
+
var _a;
|
|
443
|
+
__classPrivateFieldGet(this, _SkyTileDashboardService_instances, "m", _SkyTileDashboardService_moveTilesToColumn).call(this, __classPrivateFieldGet(this, _SkyTileDashboardService_singleColumn, "f"), (_a = __classPrivateFieldGet(this, _SkyTileDashboardService_config, "f")) === null || _a === void 0 ? void 0 : _a.layout.singleColumn.tiles);
|
|
444
|
+
}, _SkyTileDashboardService_moveTilesToMultiColumn = function _SkyTileDashboardService_moveTilesToMultiColumn() {
|
|
445
|
+
var _a;
|
|
446
|
+
let layoutColumns = [];
|
|
447
|
+
/*istanbul ignore else */
|
|
448
|
+
if (__classPrivateFieldGet(this, _SkyTileDashboardService_config, "f")) {
|
|
449
|
+
layoutColumns = __classPrivateFieldGet(this, _SkyTileDashboardService_config, "f").layout.multiColumn;
|
|
416
450
|
}
|
|
417
|
-
|
|
418
|
-
|
|
419
|
-
|
|
420
|
-
|
|
421
|
-
|
|
422
|
-
|
|
451
|
+
let columns = [];
|
|
452
|
+
/*istanbul ignore else */
|
|
453
|
+
if (__classPrivateFieldGet(this, _SkyTileDashboardService_columns, "f")) {
|
|
454
|
+
columns = (_a = __classPrivateFieldGet(this, _SkyTileDashboardService_columns, "f")) === null || _a === void 0 ? void 0 : _a.toArray();
|
|
455
|
+
}
|
|
456
|
+
for (let i = 0, n = layoutColumns.length; i < n; i++) {
|
|
457
|
+
__classPrivateFieldGet(this, _SkyTileDashboardService_instances, "m", _SkyTileDashboardService_moveTilesToColumn).call(this, columns[i], layoutColumns[i].tiles);
|
|
423
458
|
}
|
|
424
|
-
|
|
425
|
-
|
|
459
|
+
}, _SkyTileDashboardService_moveTilesToColumn = function _SkyTileDashboardService_moveTilesToColumn(column, layoutTiles) {
|
|
460
|
+
if (column && layoutTiles) {
|
|
461
|
+
const columnEl = __classPrivateFieldGet(this, _SkyTileDashboardService_instances, "m", _SkyTileDashboardService_getColumnEl).call(this, column);
|
|
426
462
|
for (const layoutTile of layoutTiles) {
|
|
427
463
|
const tileComponentInstance = this.getTileComponent(layoutTile.id);
|
|
428
464
|
/*istanbul ignore else */
|
|
429
465
|
if (tileComponentInstance) {
|
|
430
|
-
columnEl.appendChild(tileComponentInstance.location.nativeElement);
|
|
466
|
+
columnEl === null || columnEl === void 0 ? void 0 : columnEl.appendChild(tileComponentInstance.location.nativeElement);
|
|
431
467
|
}
|
|
432
468
|
}
|
|
433
469
|
}
|
|
434
|
-
|
|
435
|
-
|
|
436
|
-
|
|
437
|
-
|
|
438
|
-
|
|
439
|
-
|
|
440
|
-
|
|
441
|
-
|
|
442
|
-
|
|
443
|
-
|
|
444
|
-
}
|
|
445
|
-
return this.config;
|
|
446
|
-
}
|
|
447
|
-
getSingleColumnLayoutForUIState() {
|
|
448
|
-
if (this.mediaQuery.current === SkyMediaBreakpoints.xs ||
|
|
449
|
-
this.mediaQuery.current === SkyMediaBreakpoints.sm) {
|
|
450
|
-
return {
|
|
451
|
-
tiles: this.getTilesInEl(this.getColumnEl(this.singleColumn)),
|
|
452
|
-
};
|
|
453
|
-
}
|
|
454
|
-
return this.config.layout.singleColumn;
|
|
470
|
+
}, _SkyTileDashboardService_getConfigForUIState = function _SkyTileDashboardService_getConfigForUIState() {
|
|
471
|
+
/*istanbul ignore else */
|
|
472
|
+
if (__classPrivateFieldGet(this, _SkyTileDashboardService_config, "f")) {
|
|
473
|
+
__classPrivateFieldSet(this, _SkyTileDashboardService_config, {
|
|
474
|
+
tiles: __classPrivateFieldGet(this, _SkyTileDashboardService_config, "f").tiles,
|
|
475
|
+
layout: {
|
|
476
|
+
singleColumn: __classPrivateFieldGet(this, _SkyTileDashboardService_instances, "m", _SkyTileDashboardService_getSingleColumnLayoutForUIState).call(this, __classPrivateFieldGet(this, _SkyTileDashboardService_config, "f")),
|
|
477
|
+
multiColumn: __classPrivateFieldGet(this, _SkyTileDashboardService_instances, "m", _SkyTileDashboardService_getMultiColumnLayoutForUIState).call(this, __classPrivateFieldGet(this, _SkyTileDashboardService_config, "f")),
|
|
478
|
+
},
|
|
479
|
+
}, "f");
|
|
455
480
|
}
|
|
456
|
-
|
|
457
|
-
|
|
458
|
-
|
|
459
|
-
|
|
460
|
-
|
|
461
|
-
|
|
462
|
-
|
|
463
|
-
const layoutColumn = {
|
|
464
|
-
tiles: this.getTilesInEl(this.getColumnEl(column)),
|
|
465
|
-
};
|
|
466
|
-
layoutColumns.push(layoutColumn);
|
|
467
|
-
}
|
|
468
|
-
}
|
|
469
|
-
return layoutColumns;
|
|
470
|
-
}
|
|
471
|
-
return this.config.layout.multiColumn;
|
|
481
|
+
return __classPrivateFieldGet(this, _SkyTileDashboardService_config, "f");
|
|
482
|
+
}, _SkyTileDashboardService_getSingleColumnLayoutForUIState = function _SkyTileDashboardService_getSingleColumnLayoutForUIState(config) {
|
|
483
|
+
if (__classPrivateFieldGet(this, _SkyTileDashboardService_mediaQuery, "f").current === SkyMediaBreakpoints.xs ||
|
|
484
|
+
__classPrivateFieldGet(this, _SkyTileDashboardService_mediaQuery, "f").current === SkyMediaBreakpoints.sm) {
|
|
485
|
+
return {
|
|
486
|
+
tiles: __classPrivateFieldGet(this, _SkyTileDashboardService_instances, "m", _SkyTileDashboardService_getTilesInEl).call(this, __classPrivateFieldGet(this, _SkyTileDashboardService_instances, "m", _SkyTileDashboardService_getColumnEl).call(this, __classPrivateFieldGet(this, _SkyTileDashboardService_singleColumn, "f"))),
|
|
487
|
+
};
|
|
472
488
|
}
|
|
473
|
-
|
|
474
|
-
|
|
475
|
-
|
|
489
|
+
return config.layout.singleColumn;
|
|
490
|
+
}, _SkyTileDashboardService_getMultiColumnLayoutForUIState = function _SkyTileDashboardService_getMultiColumnLayoutForUIState(config) {
|
|
491
|
+
var _a;
|
|
492
|
+
if (!(__classPrivateFieldGet(this, _SkyTileDashboardService_mediaQuery, "f").current === SkyMediaBreakpoints.xs ||
|
|
493
|
+
__classPrivateFieldGet(this, _SkyTileDashboardService_mediaQuery, "f").current === SkyMediaBreakpoints.sm)) {
|
|
494
|
+
const layoutColumns = [];
|
|
495
|
+
let columns = [];
|
|
476
496
|
/*istanbul ignore else */
|
|
477
|
-
if (
|
|
478
|
-
|
|
479
|
-
const tileEl = tileEls[i];
|
|
480
|
-
const tileId = tileEl.getAttribute(ATTR_TILE_ID);
|
|
481
|
-
const tile = this.findTile(tileId);
|
|
482
|
-
/*istanbul ignore else */
|
|
483
|
-
if (tile) {
|
|
484
|
-
layoutTiles.push(tile);
|
|
485
|
-
}
|
|
486
|
-
}
|
|
497
|
+
if (__classPrivateFieldGet(this, _SkyTileDashboardService_columns, "f")) {
|
|
498
|
+
columns = (_a = __classPrivateFieldGet(this, _SkyTileDashboardService_columns, "f")) === null || _a === void 0 ? void 0 : _a.toArray();
|
|
487
499
|
}
|
|
488
|
-
|
|
489
|
-
|
|
490
|
-
|
|
491
|
-
|
|
492
|
-
|
|
493
|
-
|
|
494
|
-
|
|
495
|
-
});
|
|
500
|
+
for (const column of columns) {
|
|
501
|
+
if (column !== __classPrivateFieldGet(this, _SkyTileDashboardService_singleColumn, "f")) {
|
|
502
|
+
const layoutColumn = {
|
|
503
|
+
tiles: __classPrivateFieldGet(this, _SkyTileDashboardService_instances, "m", _SkyTileDashboardService_getTilesInEl).call(this, __classPrivateFieldGet(this, _SkyTileDashboardService_instances, "m", _SkyTileDashboardService_getColumnEl).call(this, column)),
|
|
504
|
+
};
|
|
505
|
+
layoutColumns.push(layoutColumn);
|
|
506
|
+
}
|
|
496
507
|
}
|
|
508
|
+
return layoutColumns;
|
|
497
509
|
}
|
|
498
|
-
|
|
499
|
-
|
|
500
|
-
|
|
501
|
-
|
|
502
|
-
|
|
503
|
-
|
|
504
|
-
|
|
505
|
-
|
|
506
|
-
const
|
|
510
|
+
return config.layout.multiColumn;
|
|
511
|
+
}, _SkyTileDashboardService_getTilesInEl = function _SkyTileDashboardService_getTilesInEl(el) {
|
|
512
|
+
const tileEls = el === null || el === void 0 ? void 0 : el.querySelectorAll('[' + ATTR_TILE_ID + ']');
|
|
513
|
+
const layoutTiles = [];
|
|
514
|
+
/*istanbul ignore else */
|
|
515
|
+
if (tileEls) {
|
|
516
|
+
for (let i = 0, n = tileEls.length; i < n; i++) {
|
|
517
|
+
const tileEl = tileEls[i];
|
|
518
|
+
const tileId = tileEl.getAttribute(ATTR_TILE_ID);
|
|
519
|
+
const tile = __classPrivateFieldGet(this, _SkyTileDashboardService_instances, "m", _SkyTileDashboardService_findTile).call(this, tileId);
|
|
507
520
|
/*istanbul ignore else */
|
|
508
|
-
if (
|
|
509
|
-
|
|
510
|
-
this.setUserConfig(config);
|
|
511
|
-
}
|
|
512
|
-
this.configChange.emit(config);
|
|
521
|
+
if (tile) {
|
|
522
|
+
layoutTiles.push(tile);
|
|
513
523
|
}
|
|
514
|
-
}
|
|
524
|
+
}
|
|
515
525
|
}
|
|
516
|
-
|
|
517
|
-
|
|
526
|
+
return layoutTiles;
|
|
527
|
+
}, _SkyTileDashboardService_initMediaQueries = function _SkyTileDashboardService_initMediaQueries() {
|
|
528
|
+
/*istanbul ignore else */
|
|
529
|
+
if (!__classPrivateFieldGet(this, _SkyTileDashboardService_mediaSubscription, "f")) {
|
|
530
|
+
__classPrivateFieldSet(this, _SkyTileDashboardService_mediaSubscription, __classPrivateFieldGet(this, _SkyTileDashboardService_mediaQuery, "f").subscribe((args) => {
|
|
531
|
+
this.changeColumnMode(args === SkyMediaBreakpoints.xs || args === SkyMediaBreakpoints.sm);
|
|
532
|
+
}), "f");
|
|
518
533
|
}
|
|
519
|
-
|
|
534
|
+
}, _SkyTileDashboardService_initDragula = function _SkyTileDashboardService_initDragula() {
|
|
535
|
+
__classPrivateFieldGet(this, _SkyTileDashboardService_dragulaService, "f").createGroup(this.bagId, {
|
|
536
|
+
moves: (el, container, handle) => {
|
|
537
|
+
const target = el === null || el === void 0 ? void 0 : el.querySelector('.sky-tile-grab-handle');
|
|
538
|
+
return !!target && target.contains(handle);
|
|
539
|
+
},
|
|
540
|
+
});
|
|
541
|
+
__classPrivateFieldGet(this, _SkyTileDashboardService_dragulaService, "f").drop(this.bagId).subscribe(() => {
|
|
542
|
+
const config = __classPrivateFieldGet(this, _SkyTileDashboardService_instances, "m", _SkyTileDashboardService_getConfigForUIState).call(this);
|
|
520
543
|
/*istanbul ignore else */
|
|
521
|
-
if (
|
|
522
|
-
|
|
523
|
-
|
|
524
|
-
|
|
525
|
-
|
|
526
|
-
|
|
527
|
-
|
|
528
|
-
|
|
544
|
+
if (config) {
|
|
545
|
+
if (__classPrivateFieldGet(this, _SkyTileDashboardService_settingsKey, "f")) {
|
|
546
|
+
__classPrivateFieldGet(this, _SkyTileDashboardService_instances, "m", _SkyTileDashboardService_setUserConfig).call(this, config);
|
|
547
|
+
}
|
|
548
|
+
this.configChange.emit(config);
|
|
549
|
+
}
|
|
550
|
+
});
|
|
551
|
+
}, _SkyTileDashboardService_getColumnEl = function _SkyTileDashboardService_getColumnEl(column) {
|
|
552
|
+
var _a;
|
|
553
|
+
return (_a = column === null || column === void 0 ? void 0 : column.content) === null || _a === void 0 ? void 0 : _a.nativeElement.parentNode;
|
|
554
|
+
}, _SkyTileDashboardService_findTile = function _SkyTileDashboardService_findTile(tileId) {
|
|
555
|
+
/*istanbul ignore else */
|
|
556
|
+
if (__classPrivateFieldGet(this, _SkyTileDashboardService_config, "f") && __classPrivateFieldGet(this, _SkyTileDashboardService_config, "f").layout.multiColumn) {
|
|
557
|
+
for (const column of __classPrivateFieldGet(this, _SkyTileDashboardService_config, "f").layout.multiColumn) {
|
|
558
|
+
/*istanbul ignore else */
|
|
559
|
+
if (column.tiles) {
|
|
560
|
+
for (const tile of column.tiles) {
|
|
561
|
+
if (tile.id === tileId) {
|
|
562
|
+
return tile;
|
|
529
563
|
}
|
|
530
564
|
}
|
|
531
565
|
}
|
|
532
566
|
}
|
|
533
|
-
return undefined;
|
|
534
567
|
}
|
|
535
|
-
|
|
536
|
-
|
|
537
|
-
|
|
538
|
-
|
|
539
|
-
|
|
540
|
-
/*istanbul ignore next */
|
|
541
|
-
return undefined;
|
|
542
|
-
}
|
|
543
|
-
initToDefaults(config, columns, singleColumn) {
|
|
544
|
-
this.config = config;
|
|
545
|
-
this.columns = columns;
|
|
546
|
-
this.singleColumn = singleColumn;
|
|
547
|
-
this.checkReadyAndLoadTiles();
|
|
568
|
+
return undefined;
|
|
569
|
+
}, _SkyTileDashboardService_findTileColumn = function _SkyTileDashboardService_findTileColumn(tileId) {
|
|
570
|
+
/*istanbul ignore else */
|
|
571
|
+
if (__classPrivateFieldGet(this, _SkyTileDashboardService_config, "f") && __classPrivateFieldGet(this, _SkyTileDashboardService_config, "f").layout.multiColumn) {
|
|
572
|
+
return __classPrivateFieldGet(this, _SkyTileDashboardService_config, "f").layout.multiColumn.find((col) => col.tiles && !!col.tiles.find((tile) => tile.id === tileId));
|
|
548
573
|
}
|
|
549
|
-
|
|
550
|
-
|
|
551
|
-
|
|
552
|
-
|
|
574
|
+
/*istanbul ignore next */
|
|
575
|
+
return undefined;
|
|
576
|
+
}, _SkyTileDashboardService_initToDefaults = function _SkyTileDashboardService_initToDefaults(config, columns, singleColumn) {
|
|
577
|
+
__classPrivateFieldSet(this, _SkyTileDashboardService_config, config, "f");
|
|
578
|
+
__classPrivateFieldSet(this, _SkyTileDashboardService_columns, columns, "f");
|
|
579
|
+
__classPrivateFieldSet(this, _SkyTileDashboardService_singleColumn, singleColumn, "f");
|
|
580
|
+
__classPrivateFieldGet(this, _SkyTileDashboardService_instances, "m", _SkyTileDashboardService_checkReadyAndLoadTiles).call(this);
|
|
581
|
+
}, _SkyTileDashboardService_setUserConfig = function _SkyTileDashboardService_setUserConfig(config) {
|
|
582
|
+
if (config && __classPrivateFieldGet(this, _SkyTileDashboardService_settingsKey, "f"))
|
|
583
|
+
__classPrivateFieldGet(this, _SkyTileDashboardService_uiConfigService, "f")
|
|
584
|
+
.setConfig(__classPrivateFieldGet(this, _SkyTileDashboardService_settingsKey, "f"), {
|
|
585
|
+
layout: config.layout,
|
|
553
586
|
persisted: true,
|
|
554
|
-
tileIds:
|
|
587
|
+
tileIds: config.tiles.map((elem) => elem.id),
|
|
555
588
|
})
|
|
556
589
|
.subscribe(
|
|
557
590
|
// eslint-disable-next-line @typescript-eslint/no-empty-function
|
|
@@ -559,72 +592,76 @@ class SkyTileDashboardService {
|
|
|
559
592
|
console.warn('Could not save tile dashboard settings.');
|
|
560
593
|
console.warn(err);
|
|
561
594
|
});
|
|
562
|
-
|
|
563
|
-
|
|
564
|
-
|
|
565
|
-
|
|
566
|
-
|
|
567
|
-
|
|
568
|
-
|
|
569
|
-
|
|
595
|
+
}, _SkyTileDashboardService_checkForNewTiles = function _SkyTileDashboardService_checkForNewTiles(oldUserTiles) {
|
|
596
|
+
var _a, _b, _c;
|
|
597
|
+
// Get a list of tiles that are in the config's default list but not in the user's settings
|
|
598
|
+
const newTiles = (_a = __classPrivateFieldGet(this, _SkyTileDashboardService_config, "f")) === null || _a === void 0 ? void 0 : _a.tiles.filter((elem) => {
|
|
599
|
+
return oldUserTiles.indexOf(elem.id) === -1;
|
|
600
|
+
});
|
|
601
|
+
const multiColumn = (_b = __classPrivateFieldGet(this, _SkyTileDashboardService_config, "f")) === null || _b === void 0 ? void 0 : _b.layout.multiColumn;
|
|
602
|
+
const singleColumn = (_c = __classPrivateFieldGet(this, _SkyTileDashboardService_config, "f")) === null || _c === void 0 ? void 0 : _c.layout.singleColumn;
|
|
603
|
+
// Append new tiles to the end of the layouts
|
|
604
|
+
/*istanbul ignore else */
|
|
605
|
+
if (newTiles === null || newTiles === void 0 ? void 0 : newTiles.length) {
|
|
570
606
|
/*istanbul ignore else */
|
|
571
|
-
if (
|
|
572
|
-
|
|
573
|
-
|
|
574
|
-
|
|
575
|
-
|
|
576
|
-
|
|
577
|
-
|
|
578
|
-
|
|
579
|
-
|
|
580
|
-
smallest = item.tiles.length;
|
|
581
|
-
}
|
|
582
|
-
});
|
|
583
|
-
multiColumn[locationToAdd].tiles.push({
|
|
584
|
-
id: elem.id,
|
|
585
|
-
isCollapsed: false,
|
|
586
|
-
});
|
|
607
|
+
if (multiColumn) {
|
|
608
|
+
newTiles === null || newTiles === void 0 ? void 0 : newTiles.forEach((elem) => {
|
|
609
|
+
let locationToAdd = 0;
|
|
610
|
+
let smallest = multiColumn[0].tiles.length;
|
|
611
|
+
multiColumn.forEach((item, index) => {
|
|
612
|
+
if (item.tiles.length < smallest) {
|
|
613
|
+
locationToAdd = index;
|
|
614
|
+
smallest = item.tiles.length;
|
|
615
|
+
}
|
|
587
616
|
});
|
|
588
|
-
|
|
589
|
-
|
|
590
|
-
|
|
591
|
-
newTiles.forEach((elem) => {
|
|
592
|
-
singleColumn.tiles.push({ id: elem.id, isCollapsed: false });
|
|
617
|
+
multiColumn[locationToAdd].tiles.push({
|
|
618
|
+
id: elem.id,
|
|
619
|
+
isCollapsed: false,
|
|
593
620
|
});
|
|
594
|
-
}
|
|
621
|
+
});
|
|
595
622
|
}
|
|
596
623
|
/*istanbul ignore else */
|
|
597
624
|
if (singleColumn) {
|
|
598
|
-
|
|
599
|
-
|
|
600
|
-
}
|
|
625
|
+
newTiles === null || newTiles === void 0 ? void 0 : newTiles.forEach((elem) => {
|
|
626
|
+
singleColumn.tiles.push({ id: elem.id, isCollapsed: false });
|
|
627
|
+
});
|
|
601
628
|
}
|
|
602
|
-
|
|
603
|
-
|
|
604
|
-
|
|
605
|
-
|
|
606
|
-
|
|
607
|
-
|
|
629
|
+
}
|
|
630
|
+
/*istanbul ignore else */
|
|
631
|
+
if (singleColumn) {
|
|
632
|
+
for (const tile of singleColumn.tiles) {
|
|
633
|
+
__classPrivateFieldGet(this, _SkyTileDashboardService_instances, "m", _SkyTileDashboardService_getTileOrRemoveFromLayout).call(this, tile);
|
|
634
|
+
}
|
|
635
|
+
}
|
|
636
|
+
/*istanbul ignore else */
|
|
637
|
+
if (multiColumn) {
|
|
638
|
+
for (let i = 0, n = multiColumn.length; i < n; i++) {
|
|
639
|
+
for (const tile of multiColumn[i].tiles) {
|
|
640
|
+
__classPrivateFieldGet(this, _SkyTileDashboardService_instances, "m", _SkyTileDashboardService_getTileOrRemoveFromLayout).call(this, tile);
|
|
608
641
|
}
|
|
609
642
|
}
|
|
610
643
|
}
|
|
611
|
-
}
|
|
612
|
-
SkyTileDashboardService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.
|
|
613
|
-
SkyTileDashboardService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "14.2.
|
|
614
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.
|
|
644
|
+
};
|
|
645
|
+
SkyTileDashboardService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.11", ngImport: i0, type: SkyTileDashboardService, deps: [{ token: i1.DragulaService }, { token: i2.SkyMediaQueryService }, { token: i2.SkyUIConfigService }, { token: i2.SkyDynamicComponentService, optional: true }], target: i0.ɵɵFactoryTarget.Injectable });
|
|
646
|
+
SkyTileDashboardService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "14.2.11", ngImport: i0, type: SkyTileDashboardService });
|
|
647
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.11", ngImport: i0, type: SkyTileDashboardService, decorators: [{
|
|
615
648
|
type: Injectable
|
|
616
|
-
}], ctorParameters: function () {
|
|
649
|
+
}], ctorParameters: function () {
|
|
650
|
+
return [{ type: i1.DragulaService }, { type: i2.SkyMediaQueryService }, { type: i2.SkyUIConfigService }, { type: i2.SkyDynamicComponentService, decorators: [{
|
|
651
|
+
type: Optional
|
|
652
|
+
}] }];
|
|
653
|
+
}, propDecorators: { dashboardInitialized: [{
|
|
617
654
|
type: Output
|
|
618
655
|
}] } });
|
|
619
656
|
|
|
657
|
+
var _SkyTileComponent_instances, _SkyTileComponent_changeDetector, _SkyTileComponent_dashboardService, _SkyTileComponent_ngUnsubscribe, _SkyTileComponent__isCollapsed, _SkyTileComponent_focusHandle;
|
|
620
658
|
/**
|
|
621
659
|
* Provides a common look-and-feel for tab content.
|
|
622
660
|
*/
|
|
623
661
|
class SkyTileComponent {
|
|
624
662
|
constructor(elementRef, changeDetector, dashboardService) {
|
|
625
663
|
this.elementRef = elementRef;
|
|
626
|
-
this
|
|
627
|
-
this.dashboardService = dashboardService;
|
|
664
|
+
_SkyTileComponent_instances.add(this);
|
|
628
665
|
/**
|
|
629
666
|
* Indicates whether to display a settings button in the tile header. To display the
|
|
630
667
|
* button, you must also listen for the `settingsClick` event.
|
|
@@ -653,44 +690,48 @@ class SkyTileComponent {
|
|
|
653
690
|
*/
|
|
654
691
|
this.helpClick = new EventEmitter();
|
|
655
692
|
this.isInDashboardColumn = false;
|
|
656
|
-
this
|
|
657
|
-
this
|
|
658
|
-
this
|
|
659
|
-
|
|
660
|
-
|
|
693
|
+
_SkyTileComponent_changeDetector.set(this, void 0);
|
|
694
|
+
_SkyTileComponent_dashboardService.set(this, void 0);
|
|
695
|
+
_SkyTileComponent_ngUnsubscribe.set(this, new Subject());
|
|
696
|
+
_SkyTileComponent__isCollapsed.set(this, false);
|
|
697
|
+
__classPrivateFieldSet(this, _SkyTileComponent_changeDetector, changeDetector, "f");
|
|
698
|
+
__classPrivateFieldSet(this, _SkyTileComponent_dashboardService, dashboardService, "f");
|
|
699
|
+
this.isInDashboardColumn = !!__classPrivateFieldGet(this, _SkyTileComponent_dashboardService, "f");
|
|
700
|
+
if (__classPrivateFieldGet(this, _SkyTileComponent_dashboardService, "f")) {
|
|
701
|
+
this.ariaDescribedBy = `${__classPrivateFieldGet(this, _SkyTileComponent_dashboardService, "f").bagId}-move-instructions`;
|
|
661
702
|
/**
|
|
662
703
|
* This subscription ensures that if any values which come in from the dashboard service are
|
|
663
704
|
* updated that the component will update if the tile's parent component utilizes OnPush
|
|
664
705
|
* change detection.
|
|
665
706
|
*/
|
|
666
|
-
this.
|
|
667
|
-
.pipe(takeUntil(this
|
|
707
|
+
__classPrivateFieldGet(this, _SkyTileComponent_dashboardService, "f").configChange
|
|
708
|
+
.pipe(takeUntil(__classPrivateFieldGet(this, _SkyTileComponent_ngUnsubscribe, "f")))
|
|
668
709
|
.subscribe(() => {
|
|
669
|
-
this.
|
|
710
|
+
__classPrivateFieldGet(this, _SkyTileComponent_changeDetector, "f").markForCheck();
|
|
670
711
|
});
|
|
671
712
|
}
|
|
672
713
|
}
|
|
673
714
|
get isCollapsed() {
|
|
674
|
-
if (this
|
|
675
|
-
const configCollapsedState = this.
|
|
676
|
-
this
|
|
715
|
+
if (__classPrivateFieldGet(this, _SkyTileComponent_dashboardService, "f")) {
|
|
716
|
+
const configCollapsedState = __classPrivateFieldGet(this, _SkyTileComponent_dashboardService, "f").tileIsCollapsed(this);
|
|
717
|
+
__classPrivateFieldSet(this, _SkyTileComponent__isCollapsed, configCollapsedState, "f");
|
|
677
718
|
}
|
|
678
|
-
return this
|
|
719
|
+
return __classPrivateFieldGet(this, _SkyTileComponent__isCollapsed, "f");
|
|
679
720
|
}
|
|
680
721
|
/**
|
|
681
722
|
* Indicates whether the tile is in a collapsed state.
|
|
682
723
|
* @default false
|
|
683
724
|
*/
|
|
684
725
|
set isCollapsed(value) {
|
|
685
|
-
|
|
686
|
-
|
|
726
|
+
__classPrivateFieldSet(this, _SkyTileComponent__isCollapsed, !!value, "f");
|
|
727
|
+
if (__classPrivateFieldGet(this, _SkyTileComponent_dashboardService, "f")) {
|
|
728
|
+
__classPrivateFieldGet(this, _SkyTileComponent_dashboardService, "f").setTileCollapsed(this, __classPrivateFieldGet(this, _SkyTileComponent__isCollapsed, "f"));
|
|
687
729
|
}
|
|
688
|
-
this.
|
|
689
|
-
this.isCollapsedChange.emit(value);
|
|
730
|
+
this.isCollapsedChange.emit(__classPrivateFieldGet(this, _SkyTileComponent__isCollapsed, "f"));
|
|
690
731
|
}
|
|
691
732
|
ngOnDestroy() {
|
|
692
|
-
this.
|
|
693
|
-
this.
|
|
733
|
+
__classPrivateFieldGet(this, _SkyTileComponent_ngUnsubscribe, "f").next();
|
|
734
|
+
__classPrivateFieldGet(this, _SkyTileComponent_ngUnsubscribe, "f").complete();
|
|
694
735
|
}
|
|
695
736
|
settingsButtonClicked() {
|
|
696
737
|
this.settingsClick.emit(undefined);
|
|
@@ -712,28 +753,29 @@ class SkyTileComponent {
|
|
|
712
753
|
}
|
|
713
754
|
moveTile(event) {
|
|
714
755
|
/* istanbul ignore else */
|
|
715
|
-
if (this
|
|
756
|
+
if (__classPrivateFieldGet(this, _SkyTileComponent_dashboardService, "f")) {
|
|
716
757
|
const direction = event.key.toLowerCase().replace('arrow', '');
|
|
717
758
|
/* istanbul ignore else */
|
|
718
759
|
if (direction === 'up' ||
|
|
719
760
|
direction === 'down' ||
|
|
720
761
|
direction === 'left' ||
|
|
721
762
|
direction === 'right') {
|
|
722
|
-
this.
|
|
763
|
+
__classPrivateFieldGet(this, _SkyTileComponent_dashboardService, "f").moveTileOnKeyDown(this, direction, this.title
|
|
723
764
|
? this.title.nativeElement.innerText
|
|
724
765
|
: /* istanbul ignore next */
|
|
725
766
|
undefined);
|
|
726
|
-
this.
|
|
767
|
+
__classPrivateFieldGet(this, _SkyTileComponent_instances, "m", _SkyTileComponent_focusHandle).call(this);
|
|
727
768
|
}
|
|
728
769
|
}
|
|
729
770
|
}
|
|
730
|
-
focusHandle() {
|
|
731
|
-
this.grabHandle.nativeElement.focus();
|
|
732
|
-
}
|
|
733
771
|
}
|
|
734
|
-
|
|
735
|
-
|
|
736
|
-
|
|
772
|
+
_SkyTileComponent_changeDetector = new WeakMap(), _SkyTileComponent_dashboardService = new WeakMap(), _SkyTileComponent_ngUnsubscribe = new WeakMap(), _SkyTileComponent__isCollapsed = new WeakMap(), _SkyTileComponent_instances = new WeakSet(), _SkyTileComponent_focusHandle = function _SkyTileComponent_focusHandle() {
|
|
773
|
+
var _a;
|
|
774
|
+
(_a = this.grabHandle) === null || _a === void 0 ? void 0 : _a.nativeElement.focus();
|
|
775
|
+
};
|
|
776
|
+
SkyTileComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.11", ngImport: i0, type: SkyTileComponent, deps: [{ token: i0.ElementRef }, { token: i0.ChangeDetectorRef }, { token: SkyTileDashboardService, optional: true }], target: i0.ɵɵFactoryTarget.Component });
|
|
777
|
+
SkyTileComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.2.11", type: SkyTileComponent, selector: "sky-tile", inputs: { showSettings: "showSettings", showHelp: "showHelp", tileName: "tileName", isCollapsed: "isCollapsed" }, outputs: { settingsClick: "settingsClick", isCollapsedChange: "isCollapsedChange", helpClick: "helpClick" }, viewQueries: [{ propertyName: "grabHandle", first: true, predicate: ["grabHandle"], descendants: true, read: ElementRef }, { propertyName: "title", first: true, predicate: ["titleContainer"], descendants: true, read: ElementRef }], ngImport: i0, template: "<section\n class=\"sky-tile\"\n [ngClass]=\"{\n 'sky-tile-collapsed': isCollapsed\n }\"\n [skyThemeClass]=\"{\n 'sky-box sky-elevation-1-bordered sky-padding-even-xl': 'modern'\n }\"\n>\n <header class=\"sky-tile-header\">\n <div class=\"sky-tile-header-content\" (click)=\"titleClick()\">\n <div class=\"sky-tile-header-title\" #titleContainer>\n <ng-content select=\"sky-tile-title\"></ng-content>\n </div>\n <div\n class=\"sky-tile-summary\"\n [skyThemeClass]=\"{\n 'sky-font-display-3': 'modern',\n 'sky-headline': 'default'\n }\"\n >\n <ng-content select=\"sky-tile-summary\"></ng-content>\n </div>\n </div>\n <div class=\"sky-tile-header-column-tools\">\n <div class=\"sky-tile-tools\">\n <ng-container *skyThemeIf=\"'default'\">\n <button\n *ngIf=\"hasHelp\"\n class=\"sky-btn sky-tile-tools-control sky-tile-help\"\n type=\"button\"\n [attr.aria-label]=\"\n tileName\n ? ('skyux_tile_help' | skyLibResources: tileName)\n : ('skyux_tile_help_default' | skyLibResources)\n \"\n [skyThemeClass]=\"{\n 'sky-btn-icon-borderless': 'modern'\n }\"\n (click)=\"helpButtonClicked()\"\n >\n <sky-icon icon=\"question-circle\"></sky-icon>\n </button>\n </ng-container>\n <sky-chevron\n [ariaControls]=\"tileContent.id\"\n [ariaLabel]=\"\n tileName\n ? ('skyux_tile_expand' | skyLibResources: tileName)\n : ('skyux_tile_expand_default' | skyLibResources)\n \"\n [direction]=\"isCollapsed ? 'down' : 'up'\"\n [skyThemeClass]=\"{\n 'sky-tile-tools-control': 'default',\n 'sky-margin-inline-default': 'modern'\n }\"\n (directionChange)=\"chevronDirectionChange($event)\"\n >\n </sky-chevron>\n <button\n *ngIf=\"hasSettings\"\n class=\"sky-btn sky-tile-settings\"\n type=\"button\"\n [attr.aria-label]=\"\n tileName\n ? ('skyux_tile_settings' | skyLibResources: tileName)\n : ('skyux_tile_settings_default' | skyLibResources)\n \"\n [skyThemeClass]=\"{\n 'sky-tile-tools-control': 'default',\n 'sky-btn-icon-borderless sky-margin-inline-default': 'modern'\n }\"\n (click)=\"settingsButtonClicked()\"\n >\n <sky-icon *skyThemeIf=\"'default'\" icon=\"cog\"></sky-icon>\n <sky-icon\n *skyThemeIf=\"'modern'\"\n icon=\"cog-line\"\n iconType=\"skyux\"\n ></sky-icon>\n </button>\n <button\n *ngIf=\"isInDashboardColumn\"\n class=\"sky-btn sky-tile-grab-handle\"\n [attr.aria-label]=\"\n tileName\n ? ('skyux_tile_move' | skyLibResources: tileName)\n : ('skyux_tile_move_default' | skyLibResources)\n \"\n [attr.aria-describedby]=\"ariaDescribedBy\"\n [skyThemeClass]=\"{\n 'sky-tile-tools-control': 'default',\n 'sky-btn-icon-borderless': 'modern'\n }\"\n (click)=\"$event.stopPropagation()\"\n (keydown)=\"moveTile($event)\"\n #grabHandle\n >\n <sky-icon *skyThemeIf=\"'default'\" icon=\"th\"></sky-icon>\n <sky-icon\n *skyThemeIf=\"'modern'\"\n icon=\"tile-drag\"\n iconType=\"skyux\"\n ></sky-icon>\n </button>\n </div>\n </div>\n </header>\n <div\n class=\"sky-tile-content\"\n role=\"region\"\n skyId\n [attr.aria-label]=\"tileName\"\n [@skyAnimationSlide]=\"isCollapsed ? 'up' : 'down'\"\n #tileContent=\"skyId\"\n >\n <ng-content select=\"sky-tile-content\"></ng-content>\n </div>\n</section>\n", styles: [".sky-tile{background-color:#fff;margin-bottom:20px}.sky-tile-header{border-color:#cdcfd2;border-style:solid solid none;border-width:4px 0 0;display:flex}.sky-tile-header-content{display:flex;flex:1;align-items:baseline;cursor:pointer}.sky-tile-header-title{display:inline-flex}.sky-tile-summary{color:#0974a1;opacity:0;padding-right:15px;transition:opacity .25s;max-height:30px;overflow:hidden}.sky-tile-collapsed .sky-tile-summary{opacity:1}.sky-tile-header-column-tools{display:flex;align-items:center;flex:0 0 auto}.sky-tile-tools{display:flex;padding-right:15px}.sky-tile-tools-control{color:#cdcfd2;cursor:pointer;border:0;width:24px;height:24px;padding:0;display:block;margin:0 0 0 9px}.sky-tile-tools-control:hover{color:#979ba2;transition:color .15s}.sky-tile-grab-handle{cursor:move;cursor:-moz-grab;font-size:15px}.sky-tile-content{border-color:#e2e3e4;border-image:none;border-style:solid solid none;border-width:1px 0}:host-context(.sky-theme-modern) .sky-tile-header,:host-context(.sky-theme-modern) .sky-tile-content{border:none}:host-context(.sky-theme-modern) .sky-tile-header-column-tools{align-items:flex-start}:host-context(.sky-theme-modern) .sky-tile-tools{padding:0}:host-context(.sky-theme-modern) .sky-tile-tools-control{font-size:18px;color:#686c73}:host-context(.sky-theme-modern) .sky-tile-grab-handle{font-size:16px}:host-context(.sky-theme-modern) .sky-tile-content ::ng-deep .sky-tile-content-section{border-bottom:1px dotted #c0c2c5}:host-context(.sky-theme-modern) .sky-tile-content ::ng-deep sky-tile-content-section:first-child .sky-tile-content-section{margin-top:15px}:host-context(.sky-theme-modern) .sky-tile-content ::ng-deep sky-tile-content-section:last-child .sky-tile-content-section{padding-bottom:0;border-bottom:none}:host-context(.sky-theme-modern) :host .sky-tile{border-radius:0}:host-context(.sky-theme-modern) :host-context(.sky-responsive-container-xs) .sky-tile,:host-context(.sky-theme-modern) :host-context(.sky-responsive-container-sm) .sky-tile,:host-context(.sky-theme-modern) :host-context(.sky-responsive-container-md) .sky-tile,:host-context(.sky-theme-modern) :host-context(.sky-responsive-container-lg) .sky-tile{border-radius:0}@media (min-width: 768px){:host-context(.sky-theme-modern) :host .sky-tile{border-radius:6px}}:host-context(.sky-theme-modern) :host-context(.sky-responsive-container-sm) .sky-tile,:host-context(.sky-theme-modern) :host-context(.sky-responsive-container-md) .sky-tile,:host-context(.sky-theme-modern) :host-context(.sky-responsive-container-lg) .sky-tile{border-radius:6px}.sky-theme-modern .sky-tile-header,.sky-theme-modern .sky-tile-content{border:none}.sky-theme-modern .sky-tile-header-column-tools{align-items:flex-start}.sky-theme-modern .sky-tile-tools{padding:0}.sky-theme-modern .sky-tile-tools-control{font-size:18px;color:#686c73}.sky-theme-modern .sky-tile-grab-handle{font-size:16px}.sky-theme-modern .sky-tile-content ::ng-deep .sky-tile-content-section{border-bottom:1px dotted #c0c2c5}.sky-theme-modern .sky-tile-content ::ng-deep sky-tile-content-section:first-child .sky-tile-content-section{margin-top:15px}.sky-theme-modern .sky-tile-content ::ng-deep sky-tile-content-section:last-child .sky-tile-content-section{padding-bottom:0;border-bottom:none}.sky-theme-modern :host .sky-tile{border-radius:0}.sky-theme-modern :host-context(.sky-responsive-container-xs) .sky-tile,.sky-theme-modern :host-context(.sky-responsive-container-sm) .sky-tile,.sky-theme-modern :host-context(.sky-responsive-container-md) .sky-tile,.sky-theme-modern :host-context(.sky-responsive-container-lg) .sky-tile{border-radius:0}@media (min-width: 768px){.sky-theme-modern :host .sky-tile{border-radius:6px}}.sky-theme-modern :host-context(.sky-responsive-container-sm) .sky-tile,.sky-theme-modern :host-context(.sky-responsive-container-md) .sky-tile,.sky-theme-modern :host-context(.sky-responsive-container-lg) .sky-tile{border-radius:6px}\n"], dependencies: [{ kind: "directive", type: i4.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i4.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: i3.λ2, selector: "sky-chevron", inputs: ["ariaControls", "ariaLabel", "direction", "disabled"], outputs: ["directionChange"] }, { kind: "directive", type: i2.λ2, selector: "[skyId]", exportAs: ["skyId"] }, { kind: "component", type: i3.λ4, selector: "sky-icon", inputs: ["icon", "iconType", "size", "fixedWidth", "variant"] }, { kind: "directive", type: i5.λ2, selector: "[skyThemeClass]", inputs: ["class", "skyThemeClass"] }, { kind: "directive", type: i5.λ3, selector: "[skyThemeIf]", inputs: ["skyThemeIf"] }, { kind: "pipe", type: i3$1.SkyLibResourcesPipe, name: "skyLibResources" }], animations: [skyAnimationSlide] });
|
|
778
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.11", ngImport: i0, type: SkyTileComponent, decorators: [{
|
|
737
779
|
type: Component,
|
|
738
780
|
args: [{ selector: 'sky-tile', animations: [skyAnimationSlide], template: "<section\n class=\"sky-tile\"\n [ngClass]=\"{\n 'sky-tile-collapsed': isCollapsed\n }\"\n [skyThemeClass]=\"{\n 'sky-box sky-elevation-1-bordered sky-padding-even-xl': 'modern'\n }\"\n>\n <header class=\"sky-tile-header\">\n <div class=\"sky-tile-header-content\" (click)=\"titleClick()\">\n <div class=\"sky-tile-header-title\" #titleContainer>\n <ng-content select=\"sky-tile-title\"></ng-content>\n </div>\n <div\n class=\"sky-tile-summary\"\n [skyThemeClass]=\"{\n 'sky-font-display-3': 'modern',\n 'sky-headline': 'default'\n }\"\n >\n <ng-content select=\"sky-tile-summary\"></ng-content>\n </div>\n </div>\n <div class=\"sky-tile-header-column-tools\">\n <div class=\"sky-tile-tools\">\n <ng-container *skyThemeIf=\"'default'\">\n <button\n *ngIf=\"hasHelp\"\n class=\"sky-btn sky-tile-tools-control sky-tile-help\"\n type=\"button\"\n [attr.aria-label]=\"\n tileName\n ? ('skyux_tile_help' | skyLibResources: tileName)\n : ('skyux_tile_help_default' | skyLibResources)\n \"\n [skyThemeClass]=\"{\n 'sky-btn-icon-borderless': 'modern'\n }\"\n (click)=\"helpButtonClicked()\"\n >\n <sky-icon icon=\"question-circle\"></sky-icon>\n </button>\n </ng-container>\n <sky-chevron\n [ariaControls]=\"tileContent.id\"\n [ariaLabel]=\"\n tileName\n ? ('skyux_tile_expand' | skyLibResources: tileName)\n : ('skyux_tile_expand_default' | skyLibResources)\n \"\n [direction]=\"isCollapsed ? 'down' : 'up'\"\n [skyThemeClass]=\"{\n 'sky-tile-tools-control': 'default',\n 'sky-margin-inline-default': 'modern'\n }\"\n (directionChange)=\"chevronDirectionChange($event)\"\n >\n </sky-chevron>\n <button\n *ngIf=\"hasSettings\"\n class=\"sky-btn sky-tile-settings\"\n type=\"button\"\n [attr.aria-label]=\"\n tileName\n ? ('skyux_tile_settings' | skyLibResources: tileName)\n : ('skyux_tile_settings_default' | skyLibResources)\n \"\n [skyThemeClass]=\"{\n 'sky-tile-tools-control': 'default',\n 'sky-btn-icon-borderless sky-margin-inline-default': 'modern'\n }\"\n (click)=\"settingsButtonClicked()\"\n >\n <sky-icon *skyThemeIf=\"'default'\" icon=\"cog\"></sky-icon>\n <sky-icon\n *skyThemeIf=\"'modern'\"\n icon=\"cog-line\"\n iconType=\"skyux\"\n ></sky-icon>\n </button>\n <button\n *ngIf=\"isInDashboardColumn\"\n class=\"sky-btn sky-tile-grab-handle\"\n [attr.aria-label]=\"\n tileName\n ? ('skyux_tile_move' | skyLibResources: tileName)\n : ('skyux_tile_move_default' | skyLibResources)\n \"\n [attr.aria-describedby]=\"ariaDescribedBy\"\n [skyThemeClass]=\"{\n 'sky-tile-tools-control': 'default',\n 'sky-btn-icon-borderless': 'modern'\n }\"\n (click)=\"$event.stopPropagation()\"\n (keydown)=\"moveTile($event)\"\n #grabHandle\n >\n <sky-icon *skyThemeIf=\"'default'\" icon=\"th\"></sky-icon>\n <sky-icon\n *skyThemeIf=\"'modern'\"\n icon=\"tile-drag\"\n iconType=\"skyux\"\n ></sky-icon>\n </button>\n </div>\n </div>\n </header>\n <div\n class=\"sky-tile-content\"\n role=\"region\"\n skyId\n [attr.aria-label]=\"tileName\"\n [@skyAnimationSlide]=\"isCollapsed ? 'up' : 'down'\"\n #tileContent=\"skyId\"\n >\n <ng-content select=\"sky-tile-content\"></ng-content>\n </div>\n</section>\n", styles: [".sky-tile{background-color:#fff;margin-bottom:20px}.sky-tile-header{border-color:#cdcfd2;border-style:solid solid none;border-width:4px 0 0;display:flex}.sky-tile-header-content{display:flex;flex:1;align-items:baseline;cursor:pointer}.sky-tile-header-title{display:inline-flex}.sky-tile-summary{color:#0974a1;opacity:0;padding-right:15px;transition:opacity .25s;max-height:30px;overflow:hidden}.sky-tile-collapsed .sky-tile-summary{opacity:1}.sky-tile-header-column-tools{display:flex;align-items:center;flex:0 0 auto}.sky-tile-tools{display:flex;padding-right:15px}.sky-tile-tools-control{color:#cdcfd2;cursor:pointer;border:0;width:24px;height:24px;padding:0;display:block;margin:0 0 0 9px}.sky-tile-tools-control:hover{color:#979ba2;transition:color .15s}.sky-tile-grab-handle{cursor:move;cursor:-moz-grab;font-size:15px}.sky-tile-content{border-color:#e2e3e4;border-image:none;border-style:solid solid none;border-width:1px 0}:host-context(.sky-theme-modern) .sky-tile-header,:host-context(.sky-theme-modern) .sky-tile-content{border:none}:host-context(.sky-theme-modern) .sky-tile-header-column-tools{align-items:flex-start}:host-context(.sky-theme-modern) .sky-tile-tools{padding:0}:host-context(.sky-theme-modern) .sky-tile-tools-control{font-size:18px;color:#686c73}:host-context(.sky-theme-modern) .sky-tile-grab-handle{font-size:16px}:host-context(.sky-theme-modern) .sky-tile-content ::ng-deep .sky-tile-content-section{border-bottom:1px dotted #c0c2c5}:host-context(.sky-theme-modern) .sky-tile-content ::ng-deep sky-tile-content-section:first-child .sky-tile-content-section{margin-top:15px}:host-context(.sky-theme-modern) .sky-tile-content ::ng-deep sky-tile-content-section:last-child .sky-tile-content-section{padding-bottom:0;border-bottom:none}:host-context(.sky-theme-modern) :host .sky-tile{border-radius:0}:host-context(.sky-theme-modern) :host-context(.sky-responsive-container-xs) .sky-tile,:host-context(.sky-theme-modern) :host-context(.sky-responsive-container-sm) .sky-tile,:host-context(.sky-theme-modern) :host-context(.sky-responsive-container-md) .sky-tile,:host-context(.sky-theme-modern) :host-context(.sky-responsive-container-lg) .sky-tile{border-radius:0}@media (min-width: 768px){:host-context(.sky-theme-modern) :host .sky-tile{border-radius:6px}}:host-context(.sky-theme-modern) :host-context(.sky-responsive-container-sm) .sky-tile,:host-context(.sky-theme-modern) :host-context(.sky-responsive-container-md) .sky-tile,:host-context(.sky-theme-modern) :host-context(.sky-responsive-container-lg) .sky-tile{border-radius:6px}.sky-theme-modern .sky-tile-header,.sky-theme-modern .sky-tile-content{border:none}.sky-theme-modern .sky-tile-header-column-tools{align-items:flex-start}.sky-theme-modern .sky-tile-tools{padding:0}.sky-theme-modern .sky-tile-tools-control{font-size:18px;color:#686c73}.sky-theme-modern .sky-tile-grab-handle{font-size:16px}.sky-theme-modern .sky-tile-content ::ng-deep .sky-tile-content-section{border-bottom:1px dotted #c0c2c5}.sky-theme-modern .sky-tile-content ::ng-deep sky-tile-content-section:first-child .sky-tile-content-section{margin-top:15px}.sky-theme-modern .sky-tile-content ::ng-deep sky-tile-content-section:last-child .sky-tile-content-section{padding-bottom:0;border-bottom:none}.sky-theme-modern :host .sky-tile{border-radius:0}.sky-theme-modern :host-context(.sky-responsive-container-xs) .sky-tile,.sky-theme-modern :host-context(.sky-responsive-container-sm) .sky-tile,.sky-theme-modern :host-context(.sky-responsive-container-md) .sky-tile,.sky-theme-modern :host-context(.sky-responsive-container-lg) .sky-tile{border-radius:0}@media (min-width: 768px){.sky-theme-modern :host .sky-tile{border-radius:6px}}.sky-theme-modern :host-context(.sky-responsive-container-sm) .sky-tile,.sky-theme-modern :host-context(.sky-responsive-container-md) .sky-tile,.sky-theme-modern :host-context(.sky-responsive-container-lg) .sky-tile{border-radius:6px}\n"] }]
|
|
739
781
|
}], ctorParameters: function () {
|
|
@@ -770,8 +812,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.0", ngImpor
|
|
|
770
812
|
|
|
771
813
|
class SkyTileModule {
|
|
772
814
|
}
|
|
773
|
-
SkyTileModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.
|
|
774
|
-
SkyTileModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "14.2.
|
|
815
|
+
SkyTileModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.11", ngImport: i0, type: SkyTileModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
816
|
+
SkyTileModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "14.2.11", ngImport: i0, type: SkyTileModule, declarations: [SkyTileComponent,
|
|
775
817
|
SkyTileSummaryComponent,
|
|
776
818
|
SkyTileTitleComponent], imports: [CommonModule,
|
|
777
819
|
SkyChevronModule,
|
|
@@ -781,7 +823,7 @@ SkyTileModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version:
|
|
|
781
823
|
SkyThemeModule,
|
|
782
824
|
SkyTilesResourcesModule,
|
|
783
825
|
SkyTrimModule], exports: [SkyTileComponent, SkyTileSummaryComponent, SkyTileTitleComponent] });
|
|
784
|
-
SkyTileModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "14.2.
|
|
826
|
+
SkyTileModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "14.2.11", ngImport: i0, type: SkyTileModule, imports: [CommonModule,
|
|
785
827
|
SkyChevronModule,
|
|
786
828
|
SkyIdModule,
|
|
787
829
|
SkyI18nModule,
|
|
@@ -789,7 +831,7 @@ SkyTileModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version:
|
|
|
789
831
|
SkyThemeModule,
|
|
790
832
|
SkyTilesResourcesModule,
|
|
791
833
|
SkyTrimModule] });
|
|
792
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.
|
|
834
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.11", ngImport: i0, type: SkyTileModule, decorators: [{
|
|
793
835
|
type: NgModule,
|
|
794
836
|
args: [{
|
|
795
837
|
declarations: [
|
|
@@ -816,9 +858,9 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.0", ngImpor
|
|
|
816
858
|
*/
|
|
817
859
|
class SkyTileContentSectionComponent {
|
|
818
860
|
}
|
|
819
|
-
SkyTileContentSectionComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.
|
|
820
|
-
SkyTileContentSectionComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.2.
|
|
821
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.
|
|
861
|
+
SkyTileContentSectionComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.11", ngImport: i0, type: SkyTileContentSectionComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
862
|
+
SkyTileContentSectionComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.2.11", type: SkyTileContentSectionComponent, selector: "sky-tile-content-section", ngImport: i0, template: "<div\n class=\"sky-tile-content-section\"\n [skyThemeClass]=\"{\n 'sky-padding-even-large': 'default'\n }\"\n>\n <ng-content></ng-content>\n</div>\n", styles: [":host-context(.sky-theme-modern) .sky-tile-content-section{padding:15px 0}.sky-theme-modern .sky-tile-content-section{padding:15px 0}\n"], dependencies: [{ kind: "directive", type: i5.λ2, selector: "[skyThemeClass]", inputs: ["class", "skyThemeClass"] }] });
|
|
863
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.11", ngImport: i0, type: SkyTileContentSectionComponent, decorators: [{
|
|
822
864
|
type: Component,
|
|
823
865
|
args: [{ selector: 'sky-tile-content-section', template: "<div\n class=\"sky-tile-content-section\"\n [skyThemeClass]=\"{\n 'sky-padding-even-large': 'default'\n }\"\n>\n <ng-content></ng-content>\n</div>\n", styles: [":host-context(.sky-theme-modern) .sky-tile-content-section{padding:15px 0}.sky-theme-modern .sky-tile-content-section{padding:15px 0}\n"] }]
|
|
824
866
|
}] });
|
|
@@ -828,19 +870,19 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.0", ngImpor
|
|
|
828
870
|
*/
|
|
829
871
|
class SkyTileContentComponent {
|
|
830
872
|
}
|
|
831
|
-
SkyTileContentComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.
|
|
832
|
-
SkyTileContentComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.2.
|
|
833
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.
|
|
873
|
+
SkyTileContentComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.11", ngImport: i0, type: SkyTileContentComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
874
|
+
SkyTileContentComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.2.11", type: SkyTileContentComponent, selector: "sky-tile-content", ngImport: i0, template: "<ng-content></ng-content>\n", styles: [":host ::ng-deep sky-tile-content-section:not(:last-child) .sky-tile-content-section{border-bottom:1px solid #e2e3e4}\n"] });
|
|
875
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.11", ngImport: i0, type: SkyTileContentComponent, decorators: [{
|
|
834
876
|
type: Component,
|
|
835
877
|
args: [{ selector: 'sky-tile-content', template: "<ng-content></ng-content>\n", styles: [":host ::ng-deep sky-tile-content-section:not(:last-child) .sky-tile-content-section{border-bottom:1px solid #e2e3e4}\n"] }]
|
|
836
878
|
}] });
|
|
837
879
|
|
|
838
880
|
class SkyTileContentModule {
|
|
839
881
|
}
|
|
840
|
-
SkyTileContentModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.
|
|
841
|
-
SkyTileContentModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "14.2.
|
|
842
|
-
SkyTileContentModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "14.2.
|
|
843
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.
|
|
882
|
+
SkyTileContentModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.11", ngImport: i0, type: SkyTileContentModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
883
|
+
SkyTileContentModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "14.2.11", ngImport: i0, type: SkyTileContentModule, declarations: [SkyTileContentComponent, SkyTileContentSectionComponent], imports: [CommonModule, SkyThemeModule], exports: [SkyTileContentComponent, SkyTileContentSectionComponent] });
|
|
884
|
+
SkyTileContentModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "14.2.11", ngImport: i0, type: SkyTileContentModule, imports: [CommonModule, SkyThemeModule] });
|
|
885
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.11", ngImport: i0, type: SkyTileContentModule, decorators: [{
|
|
844
886
|
type: NgModule,
|
|
845
887
|
args: [{
|
|
846
888
|
declarations: [SkyTileContentComponent, SkyTileContentSectionComponent],
|
|
@@ -864,39 +906,40 @@ var SkyTileDashboardMessageType;
|
|
|
864
906
|
SkyTileDashboardMessageType[SkyTileDashboardMessageType["CollapseAll"] = 1] = "CollapseAll";
|
|
865
907
|
})(SkyTileDashboardMessageType || (SkyTileDashboardMessageType = {}));
|
|
866
908
|
|
|
909
|
+
var _SkyTileDashboardColumnComponent_dashboardService;
|
|
867
910
|
let columnIdIndex = 0;
|
|
868
911
|
/**
|
|
869
912
|
* @internal
|
|
870
913
|
*/
|
|
871
914
|
class SkyTileDashboardColumnComponent {
|
|
872
|
-
constructor(
|
|
873
|
-
this.resolver = resolver;
|
|
915
|
+
constructor(injector, dashboardService) {
|
|
874
916
|
this.injector = injector;
|
|
875
|
-
this
|
|
876
|
-
|
|
877
|
-
this.columnId =
|
|
878
|
-
this.bagId = this.
|
|
917
|
+
_SkyTileDashboardColumnComponent_dashboardService.set(this, void 0);
|
|
918
|
+
__classPrivateFieldSet(this, _SkyTileDashboardColumnComponent_dashboardService, dashboardService, "f");
|
|
919
|
+
this.columnId = `tile-dashboard-column-${++columnIdIndex}`;
|
|
920
|
+
this.bagId = __classPrivateFieldGet(this, _SkyTileDashboardColumnComponent_dashboardService, "f").bagId;
|
|
879
921
|
}
|
|
880
922
|
}
|
|
881
|
-
|
|
882
|
-
SkyTileDashboardColumnComponent.ɵ
|
|
883
|
-
i0.ɵɵ
|
|
923
|
+
_SkyTileDashboardColumnComponent_dashboardService = new WeakMap();
|
|
924
|
+
SkyTileDashboardColumnComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.11", ngImport: i0, type: SkyTileDashboardColumnComponent, deps: [{ token: i0.Injector }, { token: SkyTileDashboardService }], target: i0.ɵɵFactoryTarget.Component });
|
|
925
|
+
SkyTileDashboardColumnComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.2.11", type: SkyTileDashboardColumnComponent, selector: "sky-tile-dashboard-column", viewQueries: [{ propertyName: "content", first: true, predicate: ["content"], descendants: true, read: ElementRef }], ngImport: i0, template: "<div class=\"sky-tile-dashboard-column\" [dragula]=\"bagId\">\n <div #content></div>\n</div>\n", styles: [":host{display:flex;flex-grow:1;overflow:hidden}:host{padding:0}:host-context(.sky-responsive-container-xs),:host-context(.sky-responsive-container-sm),:host-context(.sky-responsive-container-md),:host-context(.sky-responsive-container-lg){padding:0}@media (min-width: 768px){:host{padding:0 10px}}:host-context(.sky-responsive-container-sm),:host-context(.sky-responsive-container-md),:host-context(.sky-responsive-container-lg){padding:0 10px}.sky-tile-dashboard-column{min-height:100px;width:100%}@media (min-width: 768px){:host-context(.sky-theme-modern) :host{padding:0 15px}}:host-context(.sky-theme-modern) :host-context(.sky-responsive-container-sm),:host-context(.sky-theme-modern) :host-context(.sky-responsive-container-md),:host-context(.sky-theme-modern) :host-context(.sky-responsive-container-lg){padding:0 15px}@media (min-width: 768px){.sky-theme-modern :host{padding:0 15px}}.sky-theme-modern :host-context(.sky-responsive-container-sm),.sky-theme-modern :host-context(.sky-responsive-container-md),.sky-theme-modern :host-context(.sky-responsive-container-lg){padding:0 15px}\n"], dependencies: [{ kind: "directive", type: i1.DragulaDirective, selector: "[dragula]", inputs: ["dragula", "dragulaModel"], outputs: ["dragulaModelChange"] }] });
|
|
926
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.11", ngImport: i0, type: SkyTileDashboardColumnComponent, decorators: [{
|
|
884
927
|
type: Component,
|
|
885
928
|
args: [{ selector: 'sky-tile-dashboard-column', template: "<div class=\"sky-tile-dashboard-column\" [dragula]=\"bagId\">\n <div #content></div>\n</div>\n", styles: [":host{display:flex;flex-grow:1;overflow:hidden}:host{padding:0}:host-context(.sky-responsive-container-xs),:host-context(.sky-responsive-container-sm),:host-context(.sky-responsive-container-md),:host-context(.sky-responsive-container-lg){padding:0}@media (min-width: 768px){:host{padding:0 10px}}:host-context(.sky-responsive-container-sm),:host-context(.sky-responsive-container-md),:host-context(.sky-responsive-container-lg){padding:0 10px}.sky-tile-dashboard-column{min-height:100px;width:100%}@media (min-width: 768px){:host-context(.sky-theme-modern) :host{padding:0 15px}}:host-context(.sky-theme-modern) :host-context(.sky-responsive-container-sm),:host-context(.sky-theme-modern) :host-context(.sky-responsive-container-md),:host-context(.sky-theme-modern) :host-context(.sky-responsive-container-lg){padding:0 15px}@media (min-width: 768px){.sky-theme-modern :host{padding:0 15px}}.sky-theme-modern :host-context(.sky-responsive-container-sm),.sky-theme-modern :host-context(.sky-responsive-container-md),.sky-theme-modern :host-context(.sky-responsive-container-lg){padding:0 15px}\n"] }]
|
|
886
|
-
}], ctorParameters: function () { return [{ type: i0.
|
|
929
|
+
}], ctorParameters: function () { return [{ type: i0.Injector }, { type: SkyTileDashboardService }]; }, propDecorators: { content: [{
|
|
887
930
|
type: ViewChild,
|
|
888
931
|
args: ['content', {
|
|
889
|
-
read:
|
|
932
|
+
read: ElementRef,
|
|
890
933
|
static: false,
|
|
891
934
|
}]
|
|
892
935
|
}] } });
|
|
893
936
|
|
|
894
937
|
class SkyTileDashboardColumnModule {
|
|
895
938
|
}
|
|
896
|
-
SkyTileDashboardColumnModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.
|
|
897
|
-
SkyTileDashboardColumnModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "14.2.
|
|
898
|
-
SkyTileDashboardColumnModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "14.2.
|
|
899
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.
|
|
939
|
+
SkyTileDashboardColumnModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.11", ngImport: i0, type: SkyTileDashboardColumnModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
940
|
+
SkyTileDashboardColumnModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "14.2.11", ngImport: i0, type: SkyTileDashboardColumnModule, declarations: [SkyTileDashboardColumnComponent], imports: [CommonModule, DragulaModule], exports: [SkyTileDashboardColumnComponent] });
|
|
941
|
+
SkyTileDashboardColumnModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "14.2.11", ngImport: i0, type: SkyTileDashboardColumnModule, imports: [CommonModule, DragulaModule] });
|
|
942
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.11", ngImport: i0, type: SkyTileDashboardColumnModule, decorators: [{
|
|
900
943
|
type: NgModule,
|
|
901
944
|
args: [{
|
|
902
945
|
declarations: [SkyTileDashboardColumnComponent],
|
|
@@ -905,14 +948,12 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.0", ngImpor
|
|
|
905
948
|
}]
|
|
906
949
|
}] });
|
|
907
950
|
|
|
951
|
+
var _SkyTileDashboardComponent_configSet, _SkyTileDashboardComponent_dashboardService, _SkyTileDashboardComponent_mediaQueryService, _SkyTileDashboardComponent_ngUnsubscribe, _SkyTileDashboardComponent_resourcesService, _SkyTileDashboardComponent_viewReady, _SkyTileDashboardComponent__config;
|
|
908
952
|
/**
|
|
909
953
|
* Specifies a container to group multiple tiles.
|
|
910
954
|
*/
|
|
911
955
|
class SkyTileDashboardComponent {
|
|
912
|
-
constructor(dashboardService,
|
|
913
|
-
this.dashboardService = dashboardService;
|
|
914
|
-
this.mediaQuery = mediaQuery;
|
|
915
|
-
this.resourcesService = resourcesService;
|
|
956
|
+
constructor(dashboardService, mediaQueryService, resourcesService) {
|
|
916
957
|
/**
|
|
917
958
|
* Provides an observable to send commands to the tile dashboard. The commands should respect the
|
|
918
959
|
* `SkyTileDashboardMessage` type.
|
|
@@ -924,21 +965,30 @@ class SkyTileDashboardComponent {
|
|
|
924
965
|
* tiles to rearrange them.
|
|
925
966
|
*/
|
|
926
967
|
this.configChange = new EventEmitter();
|
|
927
|
-
this.
|
|
928
|
-
this
|
|
929
|
-
this
|
|
930
|
-
this
|
|
931
|
-
|
|
968
|
+
this.tileMovedReport = '';
|
|
969
|
+
_SkyTileDashboardComponent_configSet.set(this, false);
|
|
970
|
+
_SkyTileDashboardComponent_dashboardService.set(this, void 0);
|
|
971
|
+
_SkyTileDashboardComponent_mediaQueryService.set(this, void 0);
|
|
972
|
+
_SkyTileDashboardComponent_ngUnsubscribe.set(this, new Subject());
|
|
973
|
+
_SkyTileDashboardComponent_resourcesService.set(this, void 0);
|
|
974
|
+
_SkyTileDashboardComponent_viewReady.set(this, false);
|
|
975
|
+
_SkyTileDashboardComponent__config.set(this, void 0);
|
|
976
|
+
__classPrivateFieldSet(this, _SkyTileDashboardComponent_dashboardService, dashboardService, "f");
|
|
977
|
+
__classPrivateFieldSet(this, _SkyTileDashboardComponent_mediaQueryService, mediaQueryService, "f");
|
|
978
|
+
__classPrivateFieldSet(this, _SkyTileDashboardComponent_resourcesService, resourcesService, "f");
|
|
979
|
+
this.moveInstructionsId =
|
|
980
|
+
__classPrivateFieldGet(this, _SkyTileDashboardComponent_dashboardService, "f").bagId + '-move-instructions';
|
|
981
|
+
__classPrivateFieldGet(this, _SkyTileDashboardComponent_dashboardService, "f").configChange.subscribe((config) => {
|
|
932
982
|
this.configChange.emit(config);
|
|
933
983
|
// Update aria live region with tile drag info
|
|
934
|
-
if (config.movedTile && this
|
|
984
|
+
if (config.movedTile && __classPrivateFieldGet(this, _SkyTileDashboardComponent_resourcesService, "f")) {
|
|
935
985
|
let messageObservable;
|
|
936
|
-
if (this.
|
|
937
|
-
this.
|
|
938
|
-
messageObservable = this.
|
|
986
|
+
if (__classPrivateFieldGet(this, _SkyTileDashboardComponent_mediaQueryService, "f").current === SkyMediaBreakpoints.xs ||
|
|
987
|
+
__classPrivateFieldGet(this, _SkyTileDashboardComponent_mediaQueryService, "f").current === SkyMediaBreakpoints.sm) {
|
|
988
|
+
messageObservable = __classPrivateFieldGet(this, _SkyTileDashboardComponent_resourcesService, "f").getString('skyux_tile_moved_assistive_text', config.movedTile.tileDescription, '1', '1', config.movedTile.position.toString(), config.layout.singleColumn.tiles.length.toString());
|
|
939
989
|
}
|
|
940
990
|
else {
|
|
941
|
-
messageObservable = this.
|
|
991
|
+
messageObservable = __classPrivateFieldGet(this, _SkyTileDashboardComponent_resourcesService, "f").getString('skyux_tile_moved_assistive_text', config.movedTile.tileDescription, config.movedTile.column.toString(), config.layout.multiColumn.length.toString(), config.movedTile.position.toString(), config.layout.multiColumn[config.movedTile.column - 1].tiles.length.toString());
|
|
942
992
|
}
|
|
943
993
|
messageObservable.pipe(take(1)).subscribe((message) => {
|
|
944
994
|
this.tileMovedReport = message;
|
|
@@ -951,52 +1001,55 @@ class SkyTileDashboardComponent {
|
|
|
951
1001
|
* @required
|
|
952
1002
|
*/
|
|
953
1003
|
set config(value) {
|
|
954
|
-
if (value && !this
|
|
955
|
-
this
|
|
956
|
-
this
|
|
1004
|
+
if (value && !__classPrivateFieldGet(this, _SkyTileDashboardComponent_configSet, "f")) {
|
|
1005
|
+
__classPrivateFieldSet(this, _SkyTileDashboardComponent__config, value, "f");
|
|
1006
|
+
__classPrivateFieldSet(this, _SkyTileDashboardComponent_configSet, true, "f");
|
|
957
1007
|
this.checkReady();
|
|
958
1008
|
}
|
|
959
1009
|
}
|
|
960
1010
|
get config() {
|
|
961
|
-
return this
|
|
1011
|
+
return __classPrivateFieldGet(this, _SkyTileDashboardComponent__config, "f");
|
|
962
1012
|
}
|
|
963
1013
|
ngAfterViewInit() {
|
|
964
1014
|
this.messageStream
|
|
965
|
-
.pipe(takeUntil(this
|
|
1015
|
+
.pipe(takeUntil(__classPrivateFieldGet(this, _SkyTileDashboardComponent_ngUnsubscribe, "f")))
|
|
966
1016
|
.subscribe((message) => {
|
|
967
1017
|
this.handleIncomingMessages(message);
|
|
968
1018
|
});
|
|
969
|
-
this
|
|
1019
|
+
__classPrivateFieldSet(this, _SkyTileDashboardComponent_viewReady, true, "f");
|
|
970
1020
|
this.checkReady();
|
|
971
1021
|
}
|
|
972
1022
|
ngOnDestroy() {
|
|
973
|
-
this.
|
|
974
|
-
this.
|
|
975
|
-
this.
|
|
1023
|
+
__classPrivateFieldGet(this, _SkyTileDashboardComponent_ngUnsubscribe, "f").next();
|
|
1024
|
+
__classPrivateFieldGet(this, _SkyTileDashboardComponent_ngUnsubscribe, "f").complete();
|
|
1025
|
+
__classPrivateFieldGet(this, _SkyTileDashboardComponent_dashboardService, "f").destroy();
|
|
976
1026
|
}
|
|
977
1027
|
checkReady() {
|
|
978
|
-
if (this.
|
|
1028
|
+
if (__classPrivateFieldGet(this, _SkyTileDashboardComponent_viewReady, "f") && this.config && this.columns && this.singleColumn) {
|
|
979
1029
|
setTimeout(() => {
|
|
980
|
-
|
|
1030
|
+
if (this.config && this.columns && this.singleColumn) {
|
|
1031
|
+
__classPrivateFieldGet(this, _SkyTileDashboardComponent_dashboardService, "f").init(this.config, this.columns, this.singleColumn, this.settingsKey);
|
|
1032
|
+
}
|
|
981
1033
|
}, 0);
|
|
982
1034
|
}
|
|
983
1035
|
}
|
|
984
1036
|
handleIncomingMessages(message) {
|
|
985
1037
|
switch (message.type) {
|
|
986
1038
|
case SkyTileDashboardMessageType.ExpandAll:
|
|
987
|
-
this.
|
|
1039
|
+
__classPrivateFieldGet(this, _SkyTileDashboardComponent_dashboardService, "f").setAllTilesCollapsed(false);
|
|
988
1040
|
break;
|
|
989
1041
|
case SkyTileDashboardMessageType.CollapseAll:
|
|
990
|
-
this.
|
|
1042
|
+
__classPrivateFieldGet(this, _SkyTileDashboardComponent_dashboardService, "f").setAllTilesCollapsed(true);
|
|
991
1043
|
break;
|
|
992
1044
|
}
|
|
993
1045
|
}
|
|
994
1046
|
}
|
|
995
|
-
|
|
996
|
-
SkyTileDashboardComponent.ɵ
|
|
997
|
-
i0.ɵɵ
|
|
1047
|
+
_SkyTileDashboardComponent_configSet = new WeakMap(), _SkyTileDashboardComponent_dashboardService = new WeakMap(), _SkyTileDashboardComponent_mediaQueryService = new WeakMap(), _SkyTileDashboardComponent_ngUnsubscribe = new WeakMap(), _SkyTileDashboardComponent_resourcesService = new WeakMap(), _SkyTileDashboardComponent_viewReady = new WeakMap(), _SkyTileDashboardComponent__config = new WeakMap();
|
|
1048
|
+
SkyTileDashboardComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.11", ngImport: i0, type: SkyTileDashboardComponent, deps: [{ token: SkyTileDashboardService }, { token: i2.SkyMediaQueryService }, { token: i3$1.SkyLibResourcesService, optional: true }], target: i0.ɵɵFactoryTarget.Component });
|
|
1049
|
+
SkyTileDashboardComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.2.11", type: SkyTileDashboardComponent, selector: "sky-tile-dashboard", inputs: { config: "config", messageStream: "messageStream", settingsKey: "settingsKey" }, outputs: { configChange: "configChange" }, providers: [SkyTileDashboardService], viewQueries: [{ propertyName: "singleColumn", first: true, predicate: ["singleColumn"], descendants: true, read: SkyTileDashboardColumnComponent }, { propertyName: "columns", predicate: SkyTileDashboardColumnComponent, descendants: true }], ngImport: i0, template: "<ng-container *ngIf=\"config\">\n <span aria-live=\"assertive\" class=\"sky-assistive-text\">\n {{ tileMovedReport }}\n </span>\n <sky-tile-dashboard-column\n *ngFor=\"let column of config.layout.multiColumn\"\n class=\"sky-tile-dashboard-layout-multi\"\n [ngStyle]=\"{\n 'flex-basis': 100 / config.layout.multiColumn.length + '%'\n }\"\n >\n </sky-tile-dashboard-column>\n <sky-tile-dashboard-column\n class=\"sky-tile-dashboard-layout-single\"\n #singleColumn\n >\n </sky-tile-dashboard-column>\n <span class=\"sky-screen-reader-only\" [id]=\"moveInstructionsId\">{{\n 'skyux_tile_move_instructions' | skyLibResources\n }}</span>\n <ng-content></ng-content>\n</ng-container>\n", styles: [":host{display:block;padding:0}:host .sky-tile-dashboard-layout-multi{display:none}:host .sky-tile-dashboard-layout-single{display:block}:host .sky-tile-dashboard-layout-single ::ng-deep .sky-tile,:host .sky-tile-dashboard-layout-multi ::ng-deep .sky-tile{margin-bottom:0}:host-context(.sky-responsive-container-xs),:host-context(.sky-responsive-container-sm),:host-context(.sky-responsive-container-md),:host-context(.sky-responsive-container-lg){display:block;padding:0}:host-context(.sky-responsive-container-xs) .sky-tile-dashboard-layout-multi,:host-context(.sky-responsive-container-sm) .sky-tile-dashboard-layout-multi,:host-context(.sky-responsive-container-md) .sky-tile-dashboard-layout-multi,:host-context(.sky-responsive-container-lg) .sky-tile-dashboard-layout-multi{display:none}:host-context(.sky-responsive-container-xs) .sky-tile-dashboard-layout-single,:host-context(.sky-responsive-container-sm) .sky-tile-dashboard-layout-single,:host-context(.sky-responsive-container-md) .sky-tile-dashboard-layout-single,:host-context(.sky-responsive-container-lg) .sky-tile-dashboard-layout-single{display:block}:host-context(.sky-responsive-container-xs) .sky-tile-dashboard-layout-single ::ng-deep .sky-tile,:host-context(.sky-responsive-container-xs) .sky-tile-dashboard-layout-multi ::ng-deep .sky-tile,:host-context(.sky-responsive-container-sm) .sky-tile-dashboard-layout-single ::ng-deep .sky-tile,:host-context(.sky-responsive-container-sm) .sky-tile-dashboard-layout-multi ::ng-deep .sky-tile,:host-context(.sky-responsive-container-md) .sky-tile-dashboard-layout-single ::ng-deep .sky-tile,:host-context(.sky-responsive-container-md) .sky-tile-dashboard-layout-multi ::ng-deep .sky-tile,:host-context(.sky-responsive-container-lg) .sky-tile-dashboard-layout-single ::ng-deep .sky-tile,:host-context(.sky-responsive-container-lg) .sky-tile-dashboard-layout-multi ::ng-deep .sky-tile{margin-bottom:0}@media (min-width: 768px){:host .sky-tile-dashboard-layout-single ::ng-deep .sky-tile,:host .sky-tile-dashboard-layout-multi ::ng-deep .sky-tile{margin-bottom:20px}:host :host-context(.sky-theme-default){padding-top:20px}}:host-context(.sky-responsive-container-sm) .sky-tile-dashboard-layout-single ::ng-deep .sky-tile,:host-context(.sky-responsive-container-sm) .sky-tile-dashboard-layout-multi ::ng-deep .sky-tile,:host-context(.sky-responsive-container-md) .sky-tile-dashboard-layout-single ::ng-deep .sky-tile,:host-context(.sky-responsive-container-md) .sky-tile-dashboard-layout-multi ::ng-deep .sky-tile,:host-context(.sky-responsive-container-lg) .sky-tile-dashboard-layout-single ::ng-deep .sky-tile,:host-context(.sky-responsive-container-lg) .sky-tile-dashboard-layout-multi ::ng-deep .sky-tile{margin-bottom:20px}:host-context(.sky-responsive-container-sm) :host-context(.sky-theme-default),:host-context(.sky-responsive-container-md) :host-context(.sky-theme-default),:host-context(.sky-responsive-container-lg) :host-context(.sky-theme-default){padding-top:20px}@media (min-width: 992px){:host{display:flex;padding:0 10px}:host .sky-tile-dashboard-layout-multi{display:block}:host .sky-tile-dashboard-layout-single{display:none}}:host-context(.sky-responsive-container-md),:host-context(.sky-responsive-container-lg){display:flex;padding:0 10px}:host-context(.sky-responsive-container-md) .sky-tile-dashboard-layout-multi,:host-context(.sky-responsive-container-lg) .sky-tile-dashboard-layout-multi{display:block}:host-context(.sky-responsive-container-md) .sky-tile-dashboard-layout-single,:host-context(.sky-responsive-container-lg) .sky-tile-dashboard-layout-single{display:none}@media screen{.sky-assistive-text{width:0;height:0;padding:0;opacity:0;position:absolute;margin:-1px;border:0;overflow:hidden;clip:rect(0,0,0,0);outline:none;white-space:nowrap}}:host-context(.sky-theme-default){background-color:#eeeeef}@media (min-width: 768px){:host-context(.sky-theme-modern) :host .sky-tile-dashboard-layout-single ::ng-deep .sky-tile,:host-context(.sky-theme-modern) :host .sky-tile-dashboard-layout-multi ::ng-deep .sky-tile{margin-bottom:30px}}:host-context(.sky-theme-modern) :host-context(.sky-responsive-container-sm) .sky-tile-dashboard-layout-single ::ng-deep .sky-tile,:host-context(.sky-theme-modern) :host-context(.sky-responsive-container-sm) .sky-tile-dashboard-layout-multi ::ng-deep .sky-tile,:host-context(.sky-theme-modern) :host-context(.sky-responsive-container-md) .sky-tile-dashboard-layout-single ::ng-deep .sky-tile,:host-context(.sky-theme-modern) :host-context(.sky-responsive-container-md) .sky-tile-dashboard-layout-multi ::ng-deep .sky-tile,:host-context(.sky-theme-modern) :host-context(.sky-responsive-container-lg) .sky-tile-dashboard-layout-single ::ng-deep .sky-tile,:host-context(.sky-theme-modern) :host-context(.sky-responsive-container-lg) .sky-tile-dashboard-layout-multi ::ng-deep .sky-tile{margin-bottom:30px}@media (min-width: 768px){.sky-theme-modern :host .sky-tile-dashboard-layout-single ::ng-deep .sky-tile,.sky-theme-modern :host .sky-tile-dashboard-layout-multi ::ng-deep .sky-tile{margin-bottom:30px}}.sky-theme-modern :host-context(.sky-responsive-container-sm) .sky-tile-dashboard-layout-single ::ng-deep .sky-tile,.sky-theme-modern :host-context(.sky-responsive-container-sm) .sky-tile-dashboard-layout-multi ::ng-deep .sky-tile,.sky-theme-modern :host-context(.sky-responsive-container-md) .sky-tile-dashboard-layout-single ::ng-deep .sky-tile,.sky-theme-modern :host-context(.sky-responsive-container-md) .sky-tile-dashboard-layout-multi ::ng-deep .sky-tile,.sky-theme-modern :host-context(.sky-responsive-container-lg) .sky-tile-dashboard-layout-single ::ng-deep .sky-tile,.sky-theme-modern :host-context(.sky-responsive-container-lg) .sky-tile-dashboard-layout-multi ::ng-deep .sky-tile{margin-bottom:30px}\n"], dependencies: [{ kind: "directive", type: i4.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i4.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i4.NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }, { kind: "component", type: SkyTileDashboardColumnComponent, selector: "sky-tile-dashboard-column" }, { kind: "pipe", type: i3$1.SkyLibResourcesPipe, name: "skyLibResources" }] });
|
|
1050
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.11", ngImport: i0, type: SkyTileDashboardComponent, decorators: [{
|
|
998
1051
|
type: Component,
|
|
999
|
-
args: [{ selector: 'sky-tile-dashboard', providers: [SkyTileDashboardService], template: "<span aria-live=\"assertive\" class=\"sky-assistive-text\">\n
|
|
1052
|
+
args: [{ selector: 'sky-tile-dashboard', providers: [SkyTileDashboardService], template: "<ng-container *ngIf=\"config\">\n <span aria-live=\"assertive\" class=\"sky-assistive-text\">\n {{ tileMovedReport }}\n </span>\n <sky-tile-dashboard-column\n *ngFor=\"let column of config.layout.multiColumn\"\n class=\"sky-tile-dashboard-layout-multi\"\n [ngStyle]=\"{\n 'flex-basis': 100 / config.layout.multiColumn.length + '%'\n }\"\n >\n </sky-tile-dashboard-column>\n <sky-tile-dashboard-column\n class=\"sky-tile-dashboard-layout-single\"\n #singleColumn\n >\n </sky-tile-dashboard-column>\n <span class=\"sky-screen-reader-only\" [id]=\"moveInstructionsId\">{{\n 'skyux_tile_move_instructions' | skyLibResources\n }}</span>\n <ng-content></ng-content>\n</ng-container>\n", styles: [":host{display:block;padding:0}:host .sky-tile-dashboard-layout-multi{display:none}:host .sky-tile-dashboard-layout-single{display:block}:host .sky-tile-dashboard-layout-single ::ng-deep .sky-tile,:host .sky-tile-dashboard-layout-multi ::ng-deep .sky-tile{margin-bottom:0}:host-context(.sky-responsive-container-xs),:host-context(.sky-responsive-container-sm),:host-context(.sky-responsive-container-md),:host-context(.sky-responsive-container-lg){display:block;padding:0}:host-context(.sky-responsive-container-xs) .sky-tile-dashboard-layout-multi,:host-context(.sky-responsive-container-sm) .sky-tile-dashboard-layout-multi,:host-context(.sky-responsive-container-md) .sky-tile-dashboard-layout-multi,:host-context(.sky-responsive-container-lg) .sky-tile-dashboard-layout-multi{display:none}:host-context(.sky-responsive-container-xs) .sky-tile-dashboard-layout-single,:host-context(.sky-responsive-container-sm) .sky-tile-dashboard-layout-single,:host-context(.sky-responsive-container-md) .sky-tile-dashboard-layout-single,:host-context(.sky-responsive-container-lg) .sky-tile-dashboard-layout-single{display:block}:host-context(.sky-responsive-container-xs) .sky-tile-dashboard-layout-single ::ng-deep .sky-tile,:host-context(.sky-responsive-container-xs) .sky-tile-dashboard-layout-multi ::ng-deep .sky-tile,:host-context(.sky-responsive-container-sm) .sky-tile-dashboard-layout-single ::ng-deep .sky-tile,:host-context(.sky-responsive-container-sm) .sky-tile-dashboard-layout-multi ::ng-deep .sky-tile,:host-context(.sky-responsive-container-md) .sky-tile-dashboard-layout-single ::ng-deep .sky-tile,:host-context(.sky-responsive-container-md) .sky-tile-dashboard-layout-multi ::ng-deep .sky-tile,:host-context(.sky-responsive-container-lg) .sky-tile-dashboard-layout-single ::ng-deep .sky-tile,:host-context(.sky-responsive-container-lg) .sky-tile-dashboard-layout-multi ::ng-deep .sky-tile{margin-bottom:0}@media (min-width: 768px){:host .sky-tile-dashboard-layout-single ::ng-deep .sky-tile,:host .sky-tile-dashboard-layout-multi ::ng-deep .sky-tile{margin-bottom:20px}:host :host-context(.sky-theme-default){padding-top:20px}}:host-context(.sky-responsive-container-sm) .sky-tile-dashboard-layout-single ::ng-deep .sky-tile,:host-context(.sky-responsive-container-sm) .sky-tile-dashboard-layout-multi ::ng-deep .sky-tile,:host-context(.sky-responsive-container-md) .sky-tile-dashboard-layout-single ::ng-deep .sky-tile,:host-context(.sky-responsive-container-md) .sky-tile-dashboard-layout-multi ::ng-deep .sky-tile,:host-context(.sky-responsive-container-lg) .sky-tile-dashboard-layout-single ::ng-deep .sky-tile,:host-context(.sky-responsive-container-lg) .sky-tile-dashboard-layout-multi ::ng-deep .sky-tile{margin-bottom:20px}:host-context(.sky-responsive-container-sm) :host-context(.sky-theme-default),:host-context(.sky-responsive-container-md) :host-context(.sky-theme-default),:host-context(.sky-responsive-container-lg) :host-context(.sky-theme-default){padding-top:20px}@media (min-width: 992px){:host{display:flex;padding:0 10px}:host .sky-tile-dashboard-layout-multi{display:block}:host .sky-tile-dashboard-layout-single{display:none}}:host-context(.sky-responsive-container-md),:host-context(.sky-responsive-container-lg){display:flex;padding:0 10px}:host-context(.sky-responsive-container-md) .sky-tile-dashboard-layout-multi,:host-context(.sky-responsive-container-lg) .sky-tile-dashboard-layout-multi{display:block}:host-context(.sky-responsive-container-md) .sky-tile-dashboard-layout-single,:host-context(.sky-responsive-container-lg) .sky-tile-dashboard-layout-single{display:none}@media screen{.sky-assistive-text{width:0;height:0;padding:0;opacity:0;position:absolute;margin:-1px;border:0;overflow:hidden;clip:rect(0,0,0,0);outline:none;white-space:nowrap}}:host-context(.sky-theme-default){background-color:#eeeeef}@media (min-width: 768px){:host-context(.sky-theme-modern) :host .sky-tile-dashboard-layout-single ::ng-deep .sky-tile,:host-context(.sky-theme-modern) :host .sky-tile-dashboard-layout-multi ::ng-deep .sky-tile{margin-bottom:30px}}:host-context(.sky-theme-modern) :host-context(.sky-responsive-container-sm) .sky-tile-dashboard-layout-single ::ng-deep .sky-tile,:host-context(.sky-theme-modern) :host-context(.sky-responsive-container-sm) .sky-tile-dashboard-layout-multi ::ng-deep .sky-tile,:host-context(.sky-theme-modern) :host-context(.sky-responsive-container-md) .sky-tile-dashboard-layout-single ::ng-deep .sky-tile,:host-context(.sky-theme-modern) :host-context(.sky-responsive-container-md) .sky-tile-dashboard-layout-multi ::ng-deep .sky-tile,:host-context(.sky-theme-modern) :host-context(.sky-responsive-container-lg) .sky-tile-dashboard-layout-single ::ng-deep .sky-tile,:host-context(.sky-theme-modern) :host-context(.sky-responsive-container-lg) .sky-tile-dashboard-layout-multi ::ng-deep .sky-tile{margin-bottom:30px}@media (min-width: 768px){.sky-theme-modern :host .sky-tile-dashboard-layout-single ::ng-deep .sky-tile,.sky-theme-modern :host .sky-tile-dashboard-layout-multi ::ng-deep .sky-tile{margin-bottom:30px}}.sky-theme-modern :host-context(.sky-responsive-container-sm) .sky-tile-dashboard-layout-single ::ng-deep .sky-tile,.sky-theme-modern :host-context(.sky-responsive-container-sm) .sky-tile-dashboard-layout-multi ::ng-deep .sky-tile,.sky-theme-modern :host-context(.sky-responsive-container-md) .sky-tile-dashboard-layout-single ::ng-deep .sky-tile,.sky-theme-modern :host-context(.sky-responsive-container-md) .sky-tile-dashboard-layout-multi ::ng-deep .sky-tile,.sky-theme-modern :host-context(.sky-responsive-container-lg) .sky-tile-dashboard-layout-single ::ng-deep .sky-tile,.sky-theme-modern :host-context(.sky-responsive-container-lg) .sky-tile-dashboard-layout-multi ::ng-deep .sky-tile{margin-bottom:30px}\n"] }]
|
|
1000
1053
|
}], ctorParameters: function () {
|
|
1001
1054
|
return [{ type: SkyTileDashboardService }, { type: i2.SkyMediaQueryService }, { type: i3$1.SkyLibResourcesService, decorators: [{
|
|
1002
1055
|
type: Optional
|
|
@@ -1022,14 +1075,14 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.0", ngImpor
|
|
|
1022
1075
|
|
|
1023
1076
|
class SkyTileDashboardModule {
|
|
1024
1077
|
}
|
|
1025
|
-
SkyTileDashboardModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.
|
|
1026
|
-
SkyTileDashboardModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "14.2.
|
|
1078
|
+
SkyTileDashboardModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.11", ngImport: i0, type: SkyTileDashboardModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
1079
|
+
SkyTileDashboardModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "14.2.11", ngImport: i0, type: SkyTileDashboardModule, declarations: [SkyTileDashboardComponent], imports: [CommonModule,
|
|
1027
1080
|
SkyTileDashboardColumnModule,
|
|
1028
1081
|
SkyTilesResourcesModule], exports: [SkyTileDashboardComponent] });
|
|
1029
|
-
SkyTileDashboardModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "14.2.
|
|
1082
|
+
SkyTileDashboardModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "14.2.11", ngImport: i0, type: SkyTileDashboardModule, providers: [DragulaService], imports: [CommonModule,
|
|
1030
1083
|
SkyTileDashboardColumnModule,
|
|
1031
1084
|
SkyTilesResourcesModule] });
|
|
1032
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.
|
|
1085
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.11", ngImport: i0, type: SkyTileDashboardModule, decorators: [{
|
|
1033
1086
|
type: NgModule,
|
|
1034
1087
|
args: [{
|
|
1035
1088
|
declarations: [SkyTileDashboardComponent],
|
|
@@ -1045,16 +1098,16 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.0", ngImpor
|
|
|
1045
1098
|
|
|
1046
1099
|
class SkyTilesModule {
|
|
1047
1100
|
}
|
|
1048
|
-
SkyTilesModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.
|
|
1049
|
-
SkyTilesModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "14.2.
|
|
1101
|
+
SkyTilesModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.11", ngImport: i0, type: SkyTilesModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
1102
|
+
SkyTilesModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "14.2.11", ngImport: i0, type: SkyTilesModule, imports: [CommonModule], exports: [SkyTileContentModule,
|
|
1050
1103
|
SkyTileModule,
|
|
1051
1104
|
SkyTileDashboardColumnModule,
|
|
1052
1105
|
SkyTileDashboardModule] });
|
|
1053
|
-
SkyTilesModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "14.2.
|
|
1106
|
+
SkyTilesModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "14.2.11", ngImport: i0, type: SkyTilesModule, providers: [DragulaService], imports: [CommonModule, SkyTileContentModule,
|
|
1054
1107
|
SkyTileModule,
|
|
1055
1108
|
SkyTileDashboardColumnModule,
|
|
1056
1109
|
SkyTileDashboardModule] });
|
|
1057
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.
|
|
1110
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.11", ngImport: i0, type: SkyTilesModule, decorators: [{
|
|
1058
1111
|
type: NgModule,
|
|
1059
1112
|
args: [{
|
|
1060
1113
|
imports: [CommonModule],
|