@skyux/tabs 7.0.0-beta.5 → 7.0.0-beta.7

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.
Files changed (40) hide show
  1. package/documentation.json +664 -557
  2. package/esm2020/lib/modules/sectioned-form/sectioned-form.component.mjs +2 -2
  3. package/esm2020/lib/modules/tabs/tab-button-view-model.mjs +1 -1
  4. package/esm2020/lib/modules/tabs/tab-button.component.mjs +5 -3
  5. package/esm2020/lib/modules/tabs/tab.component.mjs +73 -33
  6. package/esm2020/lib/modules/tabs/tabs.module.mjs +5 -2
  7. package/esm2020/lib/modules/tabs/tabset-adapter.service.mjs +34 -22
  8. package/esm2020/lib/modules/tabs/tabset-nav-button-disabled.pipe.mjs +22 -0
  9. package/esm2020/lib/modules/tabs/tabset-nav-button.component.mjs +17 -23
  10. package/esm2020/lib/modules/tabs/tabset-permalink.service.mjs +41 -35
  11. package/esm2020/lib/modules/tabs/tabset-tab-indexes-change.mjs +1 -1
  12. package/esm2020/lib/modules/tabs/tabset.component.mjs +220 -216
  13. package/esm2020/lib/modules/tabs/tabset.service.mjs +67 -51
  14. package/esm2020/lib/modules/vertical-tabset/vertical-tab.component.mjs +5 -3
  15. package/esm2020/lib/modules/vertical-tabset/vertical-tabset-group.component.mjs +2 -2
  16. package/esm2020/lib/modules/vertical-tabset/vertical-tabset.component.mjs +2 -2
  17. package/esm2020/testing/tabs/tab-fixture-tab.mjs +1 -1
  18. package/esm2020/testing/tabs/tabset-fixture.mjs +44 -47
  19. package/fesm2015/skyux-tabs-testing.mjs +47 -49
  20. package/fesm2015/skyux-tabs-testing.mjs.map +1 -1
  21. package/fesm2015/skyux-tabs.mjs +478 -383
  22. package/fesm2015/skyux-tabs.mjs.map +1 -1
  23. package/fesm2020/skyux-tabs-testing.mjs +43 -46
  24. package/fesm2020/skyux-tabs-testing.mjs.map +1 -1
  25. package/fesm2020/skyux-tabs.mjs +597 -504
  26. package/fesm2020/skyux-tabs.mjs.map +1 -1
  27. package/lib/modules/tabs/tab-button-view-model.d.ts +5 -5
  28. package/lib/modules/tabs/tab-button.component.d.ts +9 -9
  29. package/lib/modules/tabs/tab.component.d.ts +13 -18
  30. package/lib/modules/tabs/tabs.module.d.ts +9 -8
  31. package/lib/modules/tabs/tabset-adapter.service.d.ts +5 -10
  32. package/lib/modules/tabs/tabset-nav-button-disabled.pipe.d.ts +8 -0
  33. package/lib/modules/tabs/tabset-nav-button.component.d.ts +8 -6
  34. package/lib/modules/tabs/tabset-permalink.service.d.ts +3 -11
  35. package/lib/modules/tabs/tabset-tab-indexes-change.d.ts +2 -2
  36. package/lib/modules/tabs/tabset.component.d.ts +10 -53
  37. package/lib/modules/tabs/tabset.service.d.ts +8 -12
  38. package/package.json +9 -9
  39. package/testing/tabs/tab-fixture-tab.d.ts +3 -3
  40. package/testing/tabs/tabset-fixture.d.ts +3 -9
@@ -1,7 +1,7 @@
1
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, Injectable, Component, ChangeDetectionStrategy, Input, ViewChild, HostListener, ContentChildren, EventEmitter, Output, ViewEncapsulation } from '@angular/core';
4
+ import { NgModule, Injectable, Component, ChangeDetectionStrategy, Input, ViewChild, HostListener, ContentChildren, EventEmitter, Output, ViewEncapsulation, Pipe } from '@angular/core';
5
5
  import { SkyCheckboxModule } from '@skyux/forms';
6
6
  import * as i7 from '@skyux/theme';
7
7
  import { SkyThemeModule } from '@skyux/theme';
@@ -499,7 +499,9 @@ _SkyVerticalTabComponent__ariaRole = new WeakMap(), _SkyVerticalTabComponent__co
499
499
  const width = __classPrivateFieldGet(this, _SkyVerticalTabComponent_adapterService, "f").getWidth(this.tabContent);
500
500
  __classPrivateFieldGet(this, _SkyVerticalTabComponent_verticalTabMediaQueryService, "f").setBreakpointForWidth(width);
501
501
  const newBreakpoint = __classPrivateFieldGet(this, _SkyVerticalTabComponent_verticalTabMediaQueryService, "f").current;
502
- __classPrivateFieldGet(this, _SkyVerticalTabComponent_adapterService, "f").setResponsiveClass(this.tabContent, newBreakpoint);
502
+ if (newBreakpoint) {
503
+ __classPrivateFieldGet(this, _SkyVerticalTabComponent_adapterService, "f").setResponsiveClass(this.tabContent, newBreakpoint);
504
+ }
503
505
  __classPrivateFieldGet(this, _SkyVerticalTabComponent_changeRef, "f").markForCheck();
504
506
  }
505
507
  };
@@ -1030,27 +1032,37 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.0", ngImpor
1030
1032
  type: Injectable
1031
1033
  }] });
1032
1034
 
1035
+ var _SkyTabsetService_instances, _SkyTabsetService_activeTabIndex, _SkyTabsetService_focusedTabBtnIndex, _SkyTabsetService_activeTabUnregistered, _SkyTabsetService_tabs, _SkyTabsetService_tabCounter, _SkyTabsetService_isTabIndexActive, _SkyTabsetService_getNextTabArrayIndex, _SkyTabsetService_getPrevTabArrayIndex;
1033
1036
  /**
1034
1037
  * @internal
1035
1038
  */
1036
1039
  class SkyTabsetService {
1037
1040
  constructor() {
1041
+ _SkyTabsetService_instances.add(this);
1038
1042
  this.currentActiveTabIndex = 0;
1039
1043
  this.currentFocusedTabBtnIndex = 0;
1040
- this._activeTabIndex = new BehaviorSubject(0);
1041
- this._focusedTabBtnIndex = new Subject();
1042
- this._activeTabUnregistered = new Subject();
1043
- this.tabs = [];
1044
- this.tabCounter = 0;
1044
+ _SkyTabsetService_activeTabIndex.set(this, void 0);
1045
+ _SkyTabsetService_focusedTabBtnIndex.set(this, void 0);
1046
+ _SkyTabsetService_activeTabUnregistered.set(this, void 0);
1047
+ _SkyTabsetService_tabs.set(this, []);
1048
+ _SkyTabsetService_tabCounter.set(this, 0);
1049
+ __classPrivateFieldSet(this, _SkyTabsetService_activeTabIndex, new BehaviorSubject(0), "f");
1050
+ __classPrivateFieldSet(this, _SkyTabsetService_activeTabUnregistered, new Subject(), "f");
1051
+ __classPrivateFieldSet(this, _SkyTabsetService_focusedTabBtnIndex, new Subject(), "f");
1045
1052
  }
1046
1053
  get activeTabUnregistered() {
1047
- return this._activeTabUnregistered.asObservable();
1054
+ return __classPrivateFieldGet(this, _SkyTabsetService_activeTabUnregistered, "f");
1048
1055
  }
1049
1056
  get activeTabIndex() {
1050
- return this._activeTabIndex.asObservable();
1057
+ return __classPrivateFieldGet(this, _SkyTabsetService_activeTabIndex, "f");
1051
1058
  }
1052
1059
  get focusedTabBtnIndex() {
1053
- return this._focusedTabBtnIndex.asObservable();
1060
+ return __classPrivateFieldGet(this, _SkyTabsetService_focusedTabBtnIndex, "f");
1061
+ }
1062
+ ngOnDestroy() {
1063
+ __classPrivateFieldGet(this, _SkyTabsetService_activeTabIndex, "f").complete();
1064
+ __classPrivateFieldGet(this, _SkyTabsetService_activeTabUnregistered, "f").complete();
1065
+ __classPrivateFieldGet(this, _SkyTabsetService_focusedTabBtnIndex, "f").complete();
1054
1066
  }
1055
1067
  /**
1056
1068
  * Sets the active tab by its unique `tabIndex` property.
@@ -1063,26 +1075,26 @@ class SkyTabsetService {
1063
1075
  this.currentActiveTabIndex = value;
1064
1076
  /* istanbul ignore else */
1065
1077
  if (config.emitChange) {
1066
- this._activeTabIndex.next(value);
1078
+ __classPrivateFieldGet(this, _SkyTabsetService_activeTabIndex, "f").next(value);
1067
1079
  }
1068
1080
  this.setFocusedTabBtnIndex(value);
1069
1081
  }
1070
1082
  }
1071
1083
  focusNextTabBtn(tabButtons) {
1072
- const currentTabArrayIndex = this.tabs.findIndex((tab) => this.tabIndexesEqual(tab.tabIndex, this.currentFocusedTabBtnIndex));
1073
- for (let i = this.getNextTabArrayIndex(currentTabArrayIndex); i !== currentTabArrayIndex; i = this.getNextTabArrayIndex(i)) {
1084
+ const currentTabArrayIndex = __classPrivateFieldGet(this, _SkyTabsetService_tabs, "f").findIndex((tab) => this.tabIndexesEqual(tab.tabIndex, this.currentFocusedTabBtnIndex));
1085
+ for (let i = __classPrivateFieldGet(this, _SkyTabsetService_instances, "m", _SkyTabsetService_getNextTabArrayIndex).call(this, currentTabArrayIndex); i !== currentTabArrayIndex; i = __classPrivateFieldGet(this, _SkyTabsetService_instances, "m", _SkyTabsetService_getNextTabArrayIndex).call(this, i)) {
1074
1086
  const tabBtn = tabButtons[i];
1075
- if (!tabBtn.disabled) {
1087
+ if (!tabBtn.disabled && tabBtn.tabIndex !== undefined) {
1076
1088
  this.setFocusedTabBtnIndex(tabBtn.tabIndex);
1077
1089
  return;
1078
1090
  }
1079
1091
  }
1080
1092
  }
1081
1093
  focusPrevTabBtn(tabButtons) {
1082
- const currentTabArrayIndex = this.tabs.findIndex((tab) => this.tabIndexesEqual(tab.tabIndex, this.currentFocusedTabBtnIndex));
1083
- for (let i = this.getPrevTabArrayIndex(currentTabArrayIndex); i !== currentTabArrayIndex; i = this.getPrevTabArrayIndex(i)) {
1094
+ const currentTabArrayIndex = __classPrivateFieldGet(this, _SkyTabsetService_tabs, "f").findIndex((tab) => this.tabIndexesEqual(tab.tabIndex, this.currentFocusedTabBtnIndex));
1095
+ for (let i = __classPrivateFieldGet(this, _SkyTabsetService_instances, "m", _SkyTabsetService_getPrevTabArrayIndex).call(this, currentTabArrayIndex); i !== currentTabArrayIndex; i = __classPrivateFieldGet(this, _SkyTabsetService_instances, "m", _SkyTabsetService_getPrevTabArrayIndex).call(this, i)) {
1084
1096
  const tabBtn = tabButtons[i];
1085
- if (!tabBtn.disabled) {
1097
+ if (!tabBtn.disabled && tabBtn.tabIndex !== undefined) {
1086
1098
  this.setFocusedTabBtnIndex(tabBtn.tabIndex);
1087
1099
  return;
1088
1100
  }
@@ -1091,7 +1103,7 @@ class SkyTabsetService {
1091
1103
  focusFirstOrNearestTabBtn(tabButtons) {
1092
1104
  for (let i = 0; i < tabButtons.length; i++) {
1093
1105
  const tabBtn = tabButtons[i];
1094
- if (!tabBtn.disabled) {
1106
+ if (!tabBtn.disabled && tabBtn.tabIndex !== undefined) {
1095
1107
  this.setFocusedTabBtnIndex(tabBtn.tabIndex);
1096
1108
  return;
1097
1109
  }
@@ -1100,7 +1112,7 @@ class SkyTabsetService {
1100
1112
  focusLastOrNearestTabBtn(tabButtons) {
1101
1113
  for (let i = tabButtons.length - 1; i >= 0; i--) {
1102
1114
  const tabBtn = tabButtons[i];
1103
- if (!tabBtn.disabled) {
1115
+ if (!tabBtn.disabled && tabBtn.tabIndex !== undefined) {
1104
1116
  this.setFocusedTabBtnIndex(tabBtn.tabIndex);
1105
1117
  return;
1106
1118
  }
@@ -1108,96 +1120,101 @@ class SkyTabsetService {
1108
1120
  }
1109
1121
  setFocusedTabBtnIndex(tabIndex) {
1110
1122
  this.currentFocusedTabBtnIndex = tabIndex;
1111
- this._focusedTabBtnIndex.next(tabIndex);
1123
+ __classPrivateFieldGet(this, _SkyTabsetService_focusedTabBtnIndex, "f").next(tabIndex);
1112
1124
  }
1113
1125
  /**
1114
1126
  * Registers a tab component.
1115
1127
  */
1116
1128
  registerTab(tabIndex) {
1129
+ var _a;
1117
1130
  if (tabIndex === undefined) {
1118
- tabIndex = this.tabCounter;
1119
- this.tabCounter++;
1131
+ tabIndex = __classPrivateFieldGet(this, _SkyTabsetService_tabCounter, "f");
1132
+ __classPrivateFieldSet(this, _SkyTabsetService_tabCounter, (_a = __classPrivateFieldGet(this, _SkyTabsetService_tabCounter, "f"), _a++, _a), "f");
1120
1133
  }
1121
- this.tabs.push({ tabIndex });
1134
+ __classPrivateFieldGet(this, _SkyTabsetService_tabs, "f").push({ tabIndex });
1122
1135
  return tabIndex;
1123
1136
  }
1124
1137
  updateTabIndex(currentTabIndex, newTabIndex) {
1125
- const found = this.tabs.find((tab) => this.tabIndexesEqual(tab.tabIndex, currentTabIndex));
1126
- found.tabIndex = newTabIndex;
1138
+ const found = __classPrivateFieldGet(this, _SkyTabsetService_tabs, "f").find((tab) => this.tabIndexesEqual(tab.tabIndex, currentTabIndex));
1139
+ if (found) {
1140
+ found.tabIndex = newTabIndex;
1141
+ }
1127
1142
  }
1128
1143
  /**
1129
1144
  * Unregisters a tab component.
1130
1145
  */
1131
1146
  unregisterTab(tabIndex) {
1132
- const index = this.tabs.findIndex((tab) => this.tabIndexesEqual(tab.tabIndex, tabIndex));
1147
+ const index = __classPrivateFieldGet(this, _SkyTabsetService_tabs, "f").findIndex((tab) => this.tabIndexesEqual(tab.tabIndex, tabIndex));
1133
1148
  // Notify the tabset component when an active tab is unregistered.
1134
- if (this.isTabIndexActive(this.tabs[index]?.tabIndex)) {
1135
- this._activeTabUnregistered.next({
1149
+ if (__classPrivateFieldGet(this, _SkyTabsetService_instances, "m", _SkyTabsetService_isTabIndexActive).call(this, __classPrivateFieldGet(this, _SkyTabsetService_tabs, "f")[index]?.tabIndex)) {
1150
+ __classPrivateFieldGet(this, _SkyTabsetService_activeTabUnregistered, "f").next({
1136
1151
  arrayIndex: index,
1137
1152
  });
1138
1153
  }
1139
- this.tabs.splice(index, 1);
1154
+ __classPrivateFieldGet(this, _SkyTabsetService_tabs, "f").splice(index, 1);
1140
1155
  }
1141
1156
  /**
1142
1157
  * Unregisters all tab components at once.
1143
1158
  */
1144
1159
  unregisterAll() {
1145
- this.tabs = [];
1160
+ __classPrivateFieldSet(this, _SkyTabsetService_tabs, [], "f");
1146
1161
  }
1147
1162
  /**
1148
1163
  * Compares two tab indexes and returns `true` if they are equal.
1149
1164
  */
1150
1165
  tabIndexesEqual(tabIndex1, tabIndex2) {
1151
- return tabIndex1 === tabIndex2 || +tabIndex1 === +tabIndex2;
1166
+ return (tabIndex1 === tabIndex2 ||
1167
+ (tabIndex1 !== undefined &&
1168
+ tabIndex2 !== undefined &&
1169
+ +tabIndex1 === +tabIndex2));
1152
1170
  }
1153
1171
  /**
1154
1172
  * Verifies if a provided tab index is registered.
1155
1173
  */
1156
1174
  isValidTabIndex(tabIndex) {
1157
- return this.tabs.some((tab) => this.tabIndexesEqual(tab.tabIndex, tabIndex));
1175
+ return __classPrivateFieldGet(this, _SkyTabsetService_tabs, "f").some((tab) => this.tabIndexesEqual(tab.tabIndex, tabIndex));
1158
1176
  }
1159
1177
  /**
1160
1178
  * Activates the first registered tab.
1161
1179
  */
1162
1180
  activateFirstTab() {
1163
- const firstTabIndex = this.tabs[0] && this.tabs[0].tabIndex;
1181
+ const firstTabIndex = __classPrivateFieldGet(this, _SkyTabsetService_tabs, "f")[0] && __classPrivateFieldGet(this, _SkyTabsetService_tabs, "f")[0].tabIndex;
1164
1182
  if (firstTabIndex !== undefined) {
1165
1183
  this.setActiveTabIndex(firstTabIndex);
1166
1184
  return firstTabIndex;
1167
1185
  }
1186
+ return undefined;
1168
1187
  }
1169
1188
  /**
1170
1189
  * Activates the next registered tab, or the previous one based on a provided array index.
1171
1190
  */
1172
1191
  activateNearestTab(arrayIndex) {
1173
- const newActiveTab = this.tabs[arrayIndex] || this.tabs[arrayIndex - 1];
1192
+ const newActiveTab = __classPrivateFieldGet(this, _SkyTabsetService_tabs, "f")[arrayIndex] || __classPrivateFieldGet(this, _SkyTabsetService_tabs, "f")[arrayIndex - 1];
1174
1193
  if (newActiveTab) {
1175
1194
  this.currentActiveTabIndex = newActiveTab.tabIndex;
1176
1195
  }
1177
1196
  }
1178
- isTabIndexActive(tabIndex) {
1179
- return this.tabIndexesEqual(tabIndex, this.currentActiveTabIndex);
1180
- }
1181
- getNextTabArrayIndex(currentIndex) {
1182
- let nextIndex = currentIndex + 1;
1183
- if (nextIndex === this.tabs.length) {
1184
- nextIndex = 0;
1185
- }
1186
- return nextIndex;
1187
- }
1188
- getPrevTabArrayIndex(currentIndex) {
1189
- let prevIndex = currentIndex - 1;
1190
- if (prevIndex < 0) {
1191
- prevIndex = this.tabs.length - 1;
1192
- }
1193
- return prevIndex;
1194
- }
1195
1197
  }
1198
+ _SkyTabsetService_activeTabIndex = new WeakMap(), _SkyTabsetService_focusedTabBtnIndex = new WeakMap(), _SkyTabsetService_activeTabUnregistered = new WeakMap(), _SkyTabsetService_tabs = new WeakMap(), _SkyTabsetService_tabCounter = new WeakMap(), _SkyTabsetService_instances = new WeakSet(), _SkyTabsetService_isTabIndexActive = function _SkyTabsetService_isTabIndexActive(tabIndex) {
1199
+ return this.tabIndexesEqual(tabIndex, this.currentActiveTabIndex);
1200
+ }, _SkyTabsetService_getNextTabArrayIndex = function _SkyTabsetService_getNextTabArrayIndex(currentIndex) {
1201
+ let nextIndex = currentIndex + 1;
1202
+ if (nextIndex === __classPrivateFieldGet(this, _SkyTabsetService_tabs, "f").length) {
1203
+ nextIndex = 0;
1204
+ }
1205
+ return nextIndex;
1206
+ }, _SkyTabsetService_getPrevTabArrayIndex = function _SkyTabsetService_getPrevTabArrayIndex(currentIndex) {
1207
+ let prevIndex = currentIndex - 1;
1208
+ if (prevIndex < 0) {
1209
+ prevIndex = __classPrivateFieldGet(this, _SkyTabsetService_tabs, "f").length - 1;
1210
+ }
1211
+ return prevIndex;
1212
+ };
1196
1213
  SkyTabsetService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.0", ngImport: i0, type: SkyTabsetService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
1197
1214
  SkyTabsetService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "14.2.0", ngImport: i0, type: SkyTabsetService });
1198
1215
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.0", ngImport: i0, type: SkyTabsetService, decorators: [{
1199
1216
  type: Injectable
1200
- }] });
1217
+ }], ctorParameters: function () { return []; } });
1201
1218
 
1202
1219
  var _SkyTabButtonComponent_instances, _SkyTabButtonComponent__isActive, _SkyTabButtonComponent__isDisabled, _SkyTabButtonComponent__tabStyle, _SkyTabButtonComponent_adapterService, _SkyTabButtonComponent_changeDetectorRef, _SkyTabButtonComponent_elementRef, _SkyTabButtonComponent_tabsetService, _SkyTabButtonComponent_ngUnsubscribe, _SkyTabButtonComponent_updateWizardStepState;
1203
1220
  const DEFAULT_DISABLED = false;
@@ -1248,7 +1265,7 @@ class SkyTabButtonComponent {
1248
1265
  __classPrivateFieldGet(this, _SkyTabButtonComponent_tabsetService, "f").focusedTabBtnIndex
1249
1266
  .pipe(distinctUntilChanged(), takeUntil(__classPrivateFieldGet(this, _SkyTabButtonComponent_ngUnsubscribe, "f")))
1250
1267
  .subscribe((focusedIndex) => {
1251
- if (focusedIndex === this.tabIndex) {
1268
+ if (this.tabIndex !== undefined && focusedIndex === this.tabIndex) {
1252
1269
  this.closeBtnTabIndex = '0';
1253
1270
  this.focusBtn();
1254
1271
  }
@@ -1293,7 +1310,9 @@ class SkyTabButtonComponent {
1293
1310
  __classPrivateFieldGet(this, _SkyTabButtonComponent_adapterService, "f").focusButtonLink(__classPrivateFieldGet(this, _SkyTabButtonComponent_elementRef, "f"));
1294
1311
  }
1295
1312
  onFocus() {
1296
- __classPrivateFieldGet(this, _SkyTabButtonComponent_tabsetService, "f").setFocusedTabBtnIndex(this.tabIndex);
1313
+ if (this.tabIndex !== undefined) {
1314
+ __classPrivateFieldGet(this, _SkyTabButtonComponent_tabsetService, "f").setFocusedTabBtnIndex(this.tabIndex);
1315
+ }
1297
1316
  }
1298
1317
  }
1299
1318
  _SkyTabButtonComponent__isActive = new WeakMap(), _SkyTabButtonComponent__isDisabled = new WeakMap(), _SkyTabButtonComponent__tabStyle = new WeakMap(), _SkyTabButtonComponent_adapterService = new WeakMap(), _SkyTabButtonComponent_changeDetectorRef = new WeakMap(), _SkyTabButtonComponent_elementRef = new WeakMap(), _SkyTabButtonComponent_tabsetService = new WeakMap(), _SkyTabButtonComponent_ngUnsubscribe = new WeakMap(), _SkyTabButtonComponent_instances = new WeakSet(), _SkyTabButtonComponent_updateWizardStepState = function _SkyTabButtonComponent_updateWizardStepState() {
@@ -1348,40 +1367,48 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.0", ngImpor
1348
1367
  type: Output
1349
1368
  }] } });
1350
1369
 
1370
+ var _SkyTabsetPermalinkService_instances, _SkyTabsetPermalinkService_popStateChange, _SkyTabsetPermalinkService_subscription, _SkyTabsetPermalinkService_activatedRoute, _SkyTabsetPermalinkService_location, _SkyTabsetPermalinkService_router, _SkyTabsetPermalinkService_getParams;
1351
1371
  /**
1352
1372
  * @internal
1353
1373
  */
1354
1374
  class SkyTabsetPermalinkService {
1355
1375
  constructor(activatedRoute, location, router) {
1356
- this.activatedRoute = activatedRoute;
1357
- this.location = location;
1358
- this.router = router;
1359
- this._popStateChange = new Subject();
1376
+ _SkyTabsetPermalinkService_instances.add(this);
1377
+ _SkyTabsetPermalinkService_popStateChange.set(this, void 0);
1378
+ _SkyTabsetPermalinkService_subscription.set(this, void 0);
1379
+ _SkyTabsetPermalinkService_activatedRoute.set(this, void 0);
1380
+ _SkyTabsetPermalinkService_location.set(this, void 0);
1381
+ _SkyTabsetPermalinkService_router.set(this, void 0);
1382
+ __classPrivateFieldSet(this, _SkyTabsetPermalinkService_activatedRoute, activatedRoute, "f");
1383
+ __classPrivateFieldSet(this, _SkyTabsetPermalinkService_location, location, "f");
1384
+ __classPrivateFieldSet(this, _SkyTabsetPermalinkService_router, router, "f");
1385
+ __classPrivateFieldSet(this, _SkyTabsetPermalinkService_popStateChange, new Subject(), "f");
1360
1386
  }
1361
1387
  get popStateChange() {
1362
- return this._popStateChange.asObservable();
1388
+ return __classPrivateFieldGet(this, _SkyTabsetPermalinkService_popStateChange, "f");
1363
1389
  }
1364
1390
  ngOnDestroy() {
1365
- if (this.subscription) {
1366
- this.subscription.unsubscribe();
1391
+ if (__classPrivateFieldGet(this, _SkyTabsetPermalinkService_subscription, "f")) {
1392
+ __classPrivateFieldGet(this, _SkyTabsetPermalinkService_subscription, "f").unsubscribe();
1367
1393
  }
1394
+ __classPrivateFieldGet(this, _SkyTabsetPermalinkService_popStateChange, "f").complete();
1368
1395
  }
1369
1396
  init() {
1370
- this.subscription = this.location.subscribe(() => {
1371
- this._popStateChange.next();
1372
- });
1397
+ __classPrivateFieldSet(this, _SkyTabsetPermalinkService_subscription, __classPrivateFieldGet(this, _SkyTabsetPermalinkService_location, "f").subscribe(() => {
1398
+ __classPrivateFieldGet(this, _SkyTabsetPermalinkService_popStateChange, "f").next();
1399
+ }), "f");
1373
1400
  }
1374
1401
  /**
1375
1402
  * Returns the value of a URL query param.
1376
1403
  */
1377
1404
  getParam(name) {
1378
- return this.getParams()[name];
1405
+ return __classPrivateFieldGet(this, _SkyTabsetPermalinkService_instances, "m", _SkyTabsetPermalinkService_getParams).call(this)[name];
1379
1406
  }
1380
1407
  /**
1381
1408
  * Sets the value of a URL query param.
1382
1409
  */
1383
1410
  setParam(name, value) {
1384
- const params = this.getParams();
1411
+ const params = __classPrivateFieldGet(this, _SkyTabsetPermalinkService_instances, "m", _SkyTabsetPermalinkService_getParams).call(this);
1385
1412
  if (value === null) {
1386
1413
  delete params[name];
1387
1414
  }
@@ -1390,18 +1417,18 @@ class SkyTabsetPermalinkService {
1390
1417
  }
1391
1418
  // Update the URL without triggering a navigation state change.
1392
1419
  // See: https://stackoverflow.com/a/46486677
1393
- const url = this.router
1420
+ const url = __classPrivateFieldGet(this, _SkyTabsetPermalinkService_router, "f")
1394
1421
  .createUrlTree([], {
1395
- relativeTo: this.activatedRoute,
1422
+ relativeTo: __classPrivateFieldGet(this, _SkyTabsetPermalinkService_activatedRoute, "f"),
1396
1423
  queryParams: params,
1397
1424
  queryParamsHandling: 'merge',
1398
1425
  })
1399
1426
  .toString();
1400
1427
  // Abort redirect if the current URL is equal to the new URL.
1401
- if (this.location.isCurrentPathEqualTo(url)) {
1428
+ if (__classPrivateFieldGet(this, _SkyTabsetPermalinkService_location, "f").isCurrentPathEqualTo(url)) {
1402
1429
  return;
1403
1430
  }
1404
- this.location.go(url);
1431
+ __classPrivateFieldGet(this, _SkyTabsetPermalinkService_location, "f").go(url);
1405
1432
  }
1406
1433
  /**
1407
1434
  * Removes the provided query param from the URL.
@@ -1417,13 +1444,13 @@ class SkyTabsetPermalinkService {
1417
1444
  if (!name) {
1418
1445
  return null;
1419
1446
  }
1420
- const params = this.getParams();
1447
+ const params = __classPrivateFieldGet(this, _SkyTabsetPermalinkService_instances, "m", _SkyTabsetPermalinkService_getParams).call(this);
1421
1448
  params[name] = value;
1422
- const baseUrl = this.location.path().split('?')[0];
1449
+ const baseUrl = __classPrivateFieldGet(this, _SkyTabsetPermalinkService_location, "f").path().split('?')[0];
1423
1450
  const paramString = Object.keys(params)
1424
1451
  .map((k) => `${k}=${params[k]}`)
1425
1452
  .join('&');
1426
- return this.location.prepareExternalUrl(`${baseUrl}?${paramString}`);
1453
+ return __classPrivateFieldGet(this, _SkyTabsetPermalinkService_location, "f").prepareExternalUrl(`${baseUrl}?${paramString}`);
1427
1454
  }
1428
1455
  /**
1429
1456
  * Converts the provided string into a value that can be safely used in a URL.
@@ -1442,48 +1469,59 @@ class SkyTabsetPermalinkService {
1442
1469
  .replace(/--/g, '-');
1443
1470
  return sanitized;
1444
1471
  }
1445
- /**
1446
- * Returns all query params that exist in the current URL.
1447
- */
1448
- getParams() {
1449
- const params = {};
1450
- const path = this.location.path();
1451
- if (path.indexOf('?') === -1) {
1452
- return params;
1453
- }
1454
- const existingParamPairs = path.split('?')[1].split('&');
1455
- existingParamPairs.forEach((pair) => {
1456
- const fragments = pair.split('=');
1457
- params[fragments[0]] = decodeURIComponent(fragments[1]);
1458
- });
1472
+ }
1473
+ _SkyTabsetPermalinkService_popStateChange = new WeakMap(), _SkyTabsetPermalinkService_subscription = new WeakMap(), _SkyTabsetPermalinkService_activatedRoute = new WeakMap(), _SkyTabsetPermalinkService_location = new WeakMap(), _SkyTabsetPermalinkService_router = new WeakMap(), _SkyTabsetPermalinkService_instances = new WeakSet(), _SkyTabsetPermalinkService_getParams = function _SkyTabsetPermalinkService_getParams() {
1474
+ const params = {};
1475
+ const path = __classPrivateFieldGet(this, _SkyTabsetPermalinkService_location, "f").path();
1476
+ if (path.indexOf('?') === -1) {
1459
1477
  return params;
1460
1478
  }
1461
- }
1479
+ const existingParamPairs = path.split('?')[1].split('&');
1480
+ existingParamPairs.forEach((pair) => {
1481
+ const fragments = pair.split('=');
1482
+ params[fragments[0]] = decodeURIComponent(fragments[1]);
1483
+ });
1484
+ return params;
1485
+ };
1462
1486
  SkyTabsetPermalinkService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.0", ngImport: i0, type: SkyTabsetPermalinkService, deps: [{ token: i1$1.ActivatedRoute }, { token: i4.Location }, { token: i1$1.Router }], target: i0.ɵɵFactoryTarget.Injectable });
1463
1487
  SkyTabsetPermalinkService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "14.2.0", ngImport: i0, type: SkyTabsetPermalinkService });
1464
1488
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.0", ngImport: i0, type: SkyTabsetPermalinkService, decorators: [{
1465
1489
  type: Injectable
1466
1490
  }], ctorParameters: function () { return [{ type: i1$1.ActivatedRoute }, { type: i4.Location }, { type: i1$1.Router }]; } });
1467
1491
 
1492
+ var _SkyTabComponent_instances, _SkyTabComponent__active, _SkyTabComponent_activeChange, _SkyTabComponent__permalinkValue, _SkyTabComponent_stateChange, _SkyTabComponent__tabHeading, _SkyTabComponent__tabIndex, _SkyTabComponent_tabIndexChange, _SkyTabComponent_changeDetector, _SkyTabComponent_permalinkService, _SkyTabComponent_tabsetService, _SkyTabComponent_setPermalinkValueOrDefault;
1468
1493
  let nextId = 0;
1469
1494
  class SkyTabComponent {
1470
1495
  constructor(changeDetector, permalinkService, tabsetService) {
1471
- this.changeDetector = changeDetector;
1472
- this.permalinkService = permalinkService;
1473
- this.tabsetService = tabsetService;
1496
+ _SkyTabComponent_instances.add(this);
1474
1497
  /**
1475
1498
  * Fires when users click the button to close the tab.
1476
1499
  * The close button is added to the tab when you specify a listener for this event.
1477
1500
  * This event only applies when the tabset's `tabStyle` is `"tabs"`.
1478
1501
  */
1479
1502
  this.close = new EventEmitter(); // eslint-disable-line @angular-eslint/no-output-native
1503
+ this.permalinkValueOrDefault = '';
1480
1504
  this.showContent = false;
1481
- this._activeChange = new BehaviorSubject(undefined);
1482
- this._stateChange = new BehaviorSubject(undefined);
1483
- this._tabIndexChange = new BehaviorSubject(undefined);
1505
+ _SkyTabComponent__active.set(this, false);
1506
+ _SkyTabComponent_activeChange.set(this, void 0);
1507
+ _SkyTabComponent__permalinkValue.set(this, void 0);
1508
+ _SkyTabComponent_stateChange.set(this, void 0);
1509
+ _SkyTabComponent__tabHeading.set(this, void 0);
1510
+ _SkyTabComponent__tabIndex.set(this, void 0);
1511
+ _SkyTabComponent_tabIndexChange.set(this, void 0);
1512
+ _SkyTabComponent_changeDetector.set(this, void 0);
1513
+ _SkyTabComponent_permalinkService.set(this, void 0);
1514
+ _SkyTabComponent_tabsetService.set(this, void 0);
1515
+ __classPrivateFieldSet(this, _SkyTabComponent_changeDetector, changeDetector, "f");
1516
+ __classPrivateFieldSet(this, _SkyTabComponent_permalinkService, permalinkService, "f");
1517
+ __classPrivateFieldSet(this, _SkyTabComponent_tabsetService, tabsetService, "f");
1484
1518
  const id = nextId++;
1485
1519
  this.tabPanelId = `sky-tab-${id}`;
1486
1520
  this.tabButtonId = `${this.tabPanelId}-nav-btn`;
1521
+ __classPrivateFieldSet(this, _SkyTabComponent_activeChange, new BehaviorSubject(undefined), "f");
1522
+ __classPrivateFieldSet(this, _SkyTabComponent_stateChange, new BehaviorSubject(undefined), "f");
1523
+ __classPrivateFieldSet(this, _SkyTabComponent_tabIndexChange, new BehaviorSubject(undefined), "f");
1524
+ __classPrivateFieldGet(this, _SkyTabComponent_instances, "m", _SkyTabComponent_setPermalinkValueOrDefault).call(this);
1487
1525
  }
1488
1526
  /**
1489
1527
  * Indicates whether the tab is active when the tabset loads. After initialization, the `active`
@@ -1491,16 +1529,16 @@ class SkyTabComponent {
1491
1529
  * @default false
1492
1530
  */
1493
1531
  set active(value) {
1494
- if (value !== undefined && value !== this._active) {
1495
- this._active = value;
1496
- this._activeChange.next();
1532
+ if (value !== undefined && !!value !== __classPrivateFieldGet(this, _SkyTabComponent__active, "f")) {
1533
+ __classPrivateFieldSet(this, _SkyTabComponent__active, value, "f");
1534
+ __classPrivateFieldGet(this, _SkyTabComponent_activeChange, "f").next();
1497
1535
  }
1498
1536
  }
1499
1537
  get active() {
1500
- return this._active || false;
1538
+ return __classPrivateFieldGet(this, _SkyTabComponent__active, "f");
1501
1539
  }
1502
1540
  get activeChange() {
1503
- return this._activeChange.asObservable();
1541
+ return __classPrivateFieldGet(this, _SkyTabComponent_activeChange, "f");
1504
1542
  }
1505
1543
  /**
1506
1544
  * Specifies a custom query parameter value for the tab.
@@ -1511,65 +1549,90 @@ class SkyTabComponent {
1511
1549
  * This input only applies when the tabset's `tabStyle` is `"tabs"`.
1512
1550
  */
1513
1551
  set permalinkValue(value) {
1514
- this._permalinkValue = this.permalinkService.urlify(value);
1552
+ __classPrivateFieldSet(this, _SkyTabComponent__permalinkValue, value, "f");
1553
+ __classPrivateFieldGet(this, _SkyTabComponent_instances, "m", _SkyTabComponent_setPermalinkValueOrDefault).call(this);
1515
1554
  }
1516
1555
  get permalinkValue() {
1517
- return (this._permalinkValue || this.permalinkService.urlify(this.tabHeading));
1556
+ return __classPrivateFieldGet(this, _SkyTabComponent__permalinkValue, "f");
1557
+ }
1558
+ /**
1559
+ * Specifies the tab header.
1560
+ * When using tabs as the main navigation on a page,
1561
+ * use [the Angular `Title` service](https://angular.io/docs/ts/latest/cookbook/set-document-title.html)
1562
+ * and [the SKY UX `title` configuration property](https://developer.blackbaud.com/skyux/learn/reference/configuration#app)
1563
+ * to reflect the tab header in the page title.
1564
+ * @required
1565
+ */
1566
+ set tabHeading(value) {
1567
+ __classPrivateFieldSet(this, _SkyTabComponent__tabHeading, value, "f");
1568
+ __classPrivateFieldGet(this, _SkyTabComponent_instances, "m", _SkyTabComponent_setPermalinkValueOrDefault).call(this);
1569
+ }
1570
+ get tabHeading() {
1571
+ return __classPrivateFieldGet(this, _SkyTabComponent__tabHeading, "f");
1518
1572
  }
1519
1573
  /**
1520
1574
  * Specifies a unique identifier for the tab.
1521
1575
  * If not defined, the identifier is set to the position of the tab on load, starting with `0`.
1522
1576
  */
1523
1577
  set tabIndex(value) {
1524
- if (value !== this._tabIndex &&
1578
+ if (value !== __classPrivateFieldGet(this, _SkyTabComponent__tabIndex, "f") &&
1525
1579
  value !== undefined &&
1526
- this._tabIndex !== undefined) {
1527
- this.tabsetService.updateTabIndex(this._tabIndex, value);
1528
- this._tabIndexChange.next(value);
1580
+ __classPrivateFieldGet(this, _SkyTabComponent__tabIndex, "f") !== undefined) {
1581
+ __classPrivateFieldGet(this, _SkyTabComponent_tabsetService, "f").updateTabIndex(__classPrivateFieldGet(this, _SkyTabComponent__tabIndex, "f"), value);
1582
+ __classPrivateFieldGet(this, _SkyTabComponent_tabIndexChange, "f").next(value);
1529
1583
  }
1530
- this._tabIndex = value;
1584
+ __classPrivateFieldSet(this, _SkyTabComponent__tabIndex, value, "f");
1531
1585
  }
1532
1586
  get tabIndex() {
1533
- return this._tabIndex;
1534
- }
1535
- get closeable() {
1536
- return this.close.observers.length > 0;
1587
+ return __classPrivateFieldGet(this, _SkyTabComponent__tabIndex, "f");
1537
1588
  }
1538
1589
  /**
1539
1590
  * Alerts the tabset component when this component has changes that need to be reflected in the UI.
1540
1591
  */
1541
1592
  get stateChange() {
1542
- return this._stateChange.asObservable();
1593
+ return __classPrivateFieldGet(this, _SkyTabComponent_stateChange, "f");
1543
1594
  }
1544
1595
  get tabIndexChange() {
1545
- return this._tabIndexChange.asObservable();
1596
+ return __classPrivateFieldGet(this, _SkyTabComponent_tabIndexChange, "f");
1546
1597
  }
1547
1598
  ngOnChanges(changes) {
1548
1599
  if ((changes.disabled && !changes.disabled.firstChange) ||
1549
1600
  (changes.tabHeading && !changes.tabHeading.firstChange) ||
1550
1601
  (changes.tabHeaderCount && !changes.tabHeaderCount.firstChange) ||
1551
1602
  (changes.permalinkValue && !changes.permalinkValue.firstChange)) {
1552
- this._stateChange.next();
1603
+ __classPrivateFieldGet(this, _SkyTabComponent_stateChange, "f").next();
1553
1604
  }
1554
1605
  }
1555
1606
  ngOnDestroy() {
1556
- this._stateChange.complete();
1557
- this.tabsetService.unregisterTab(this.tabIndex);
1607
+ __classPrivateFieldGet(this, _SkyTabComponent_activeChange, "f").complete();
1608
+ __classPrivateFieldGet(this, _SkyTabComponent_stateChange, "f").complete();
1609
+ __classPrivateFieldGet(this, _SkyTabComponent_tabIndexChange, "f").complete();
1610
+ if (this.tabIndex !== undefined) {
1611
+ __classPrivateFieldGet(this, _SkyTabComponent_tabsetService, "f").unregisterTab(this.tabIndex);
1612
+ }
1558
1613
  }
1559
1614
  init() {
1560
- this._tabIndex = this.tabsetService.registerTab(this.tabIndex);
1615
+ __classPrivateFieldSet(this, _SkyTabComponent__tabIndex, __classPrivateFieldGet(this, _SkyTabComponent_tabsetService, "f").registerTab(this.tabIndex), "f");
1561
1616
  }
1562
1617
  activate() {
1563
- this._active = true;
1618
+ __classPrivateFieldSet(this, _SkyTabComponent__active, true, "f");
1564
1619
  this.showContent = true;
1565
- this.changeDetector.markForCheck();
1620
+ __classPrivateFieldGet(this, _SkyTabComponent_changeDetector, "f").markForCheck();
1566
1621
  }
1567
1622
  deactivate() {
1568
- this._active = false;
1623
+ __classPrivateFieldSet(this, _SkyTabComponent__active, false, "f");
1569
1624
  this.showContent = false;
1570
- this.changeDetector.markForCheck();
1625
+ __classPrivateFieldGet(this, _SkyTabComponent_changeDetector, "f").markForCheck();
1626
+ }
1627
+ isCloseable() {
1628
+ return this.close.observers.length > 0;
1571
1629
  }
1572
1630
  }
1631
+ _SkyTabComponent__active = new WeakMap(), _SkyTabComponent_activeChange = new WeakMap(), _SkyTabComponent__permalinkValue = new WeakMap(), _SkyTabComponent_stateChange = new WeakMap(), _SkyTabComponent__tabHeading = new WeakMap(), _SkyTabComponent__tabIndex = new WeakMap(), _SkyTabComponent_tabIndexChange = new WeakMap(), _SkyTabComponent_changeDetector = new WeakMap(), _SkyTabComponent_permalinkService = new WeakMap(), _SkyTabComponent_tabsetService = new WeakMap(), _SkyTabComponent_instances = new WeakSet(), _SkyTabComponent_setPermalinkValueOrDefault = function _SkyTabComponent_setPermalinkValueOrDefault() {
1632
+ this.permalinkValueOrDefault =
1633
+ __classPrivateFieldGet(this, _SkyTabComponent_permalinkService, "f").urlify(this.permalinkValue) ||
1634
+ __classPrivateFieldGet(this, _SkyTabComponent_permalinkService, "f").urlify(this.tabHeading);
1635
+ };
1573
1636
  SkyTabComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.0", ngImport: i0, type: SkyTabComponent, deps: [{ token: i0.ChangeDetectorRef }, { token: SkyTabsetPermalinkService }, { token: SkyTabsetService }], target: i0.ɵɵFactoryTarget.Component });
1574
1637
  SkyTabComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.2.0", type: SkyTabComponent, selector: "sky-tab", inputs: { active: "active", disabled: "disabled", permalinkValue: "permalinkValue", tabHeaderCount: "tabHeaderCount", tabHeading: "tabHeading", tabIndex: "tabIndex" }, outputs: { close: "close" }, usesOnChanges: true, ngImport: i0, template: "<div\n class=\"sky-tab\"\n role=\"tabpanel\"\n [attr.aria-labelledby]=\"tabButtonId\"\n [hidden]=\"!showContent\"\n [id]=\"tabPanelId\"\n>\n <ng-content></ng-content>\n</div>\n", changeDetection: i0.ChangeDetectionStrategy.OnPush });
1575
1638
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.0", ngImport: i0, type: SkyTabComponent, decorators: [{
@@ -1591,25 +1654,194 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.0", ngImpor
1591
1654
  type: Output
1592
1655
  }] } });
1593
1656
 
1657
+ class SkyTabsetNavButtonDisabledPipe {
1658
+ transform(disabled, buttonType, tabToSelectExists, tabToSelectIsDisabled) {
1659
+ if (disabled !== undefined) {
1660
+ return disabled;
1661
+ }
1662
+ else if (buttonType === 'finish') {
1663
+ return false;
1664
+ }
1665
+ return !tabToSelectExists || !!tabToSelectIsDisabled;
1666
+ }
1667
+ }
1668
+ SkyTabsetNavButtonDisabledPipe.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.0", ngImport: i0, type: SkyTabsetNavButtonDisabledPipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe });
1669
+ SkyTabsetNavButtonDisabledPipe.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "14.2.0", ngImport: i0, type: SkyTabsetNavButtonDisabledPipe, name: "skyTabsetNavButtonDisabled" });
1670
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.0", ngImport: i0, type: SkyTabsetNavButtonDisabledPipe, decorators: [{
1671
+ type: Pipe,
1672
+ args: [{
1673
+ name: 'skyTabsetNavButtonDisabled',
1674
+ }]
1675
+ }] });
1676
+
1677
+ var _SkyTabsetNavButtonComponent_instances, _SkyTabsetNavButtonComponent__buttonType, _SkyTabsetNavButtonComponent__disabled, _SkyTabsetNavButtonComponent__tabset, _SkyTabsetNavButtonComponent_activeIndexNumber, _SkyTabsetNavButtonComponent_activeSkyTabIndex, _SkyTabsetNavButtonComponent_currentTabsetSub, _SkyTabsetNavButtonComponent_logger, _SkyTabsetNavButtonComponent_tabCount, _SkyTabsetNavButtonComponent_ngUnsubscribe, _SkyTabsetNavButtonComponent_updateButtonVisibility, _SkyTabsetNavButtonComponent_updateButtonProperties, _SkyTabsetNavButtonComponent_updateTabToSelect;
1678
+ const buttonTypeNext = 'next';
1679
+ const buttonTypePrevious = 'previous';
1680
+ const buttonTypeFinish = 'finish';
1681
+ class SkyTabsetNavButtonComponent {
1682
+ constructor(logger) {
1683
+ _SkyTabsetNavButtonComponent_instances.add(this);
1684
+ this.isVisible = false;
1685
+ this.type = 'submit';
1686
+ _SkyTabsetNavButtonComponent__buttonType.set(this, void 0);
1687
+ _SkyTabsetNavButtonComponent__disabled.set(this, void 0);
1688
+ _SkyTabsetNavButtonComponent__tabset.set(this, void 0);
1689
+ _SkyTabsetNavButtonComponent_activeIndexNumber.set(this, void 0);
1690
+ _SkyTabsetNavButtonComponent_activeSkyTabIndex.set(this, void 0);
1691
+ _SkyTabsetNavButtonComponent_currentTabsetSub.set(this, void 0);
1692
+ _SkyTabsetNavButtonComponent_logger.set(this, void 0);
1693
+ _SkyTabsetNavButtonComponent_tabCount.set(this, void 0);
1694
+ _SkyTabsetNavButtonComponent_ngUnsubscribe.set(this, new Subject());
1695
+ __classPrivateFieldSet(this, _SkyTabsetNavButtonComponent_logger, logger, "f");
1696
+ }
1697
+ /**
1698
+ * Specifies the tabset wizard component to associate with the nav button.
1699
+ * @required
1700
+ */
1701
+ get tabset() {
1702
+ return __classPrivateFieldGet(this, _SkyTabsetNavButtonComponent__tabset, "f");
1703
+ }
1704
+ set tabset(value) {
1705
+ __classPrivateFieldSet(this, _SkyTabsetNavButtonComponent__tabset, value, "f");
1706
+ if (__classPrivateFieldGet(this, _SkyTabsetNavButtonComponent_currentTabsetSub, "f")) {
1707
+ __classPrivateFieldGet(this, _SkyTabsetNavButtonComponent_currentTabsetSub, "f").unsubscribe();
1708
+ }
1709
+ if (value) {
1710
+ __classPrivateFieldSet(this, _SkyTabsetNavButtonComponent_currentTabsetSub, value.activeChange
1711
+ .pipe(distinctUntilChanged(), takeUntil(__classPrivateFieldGet(this, _SkyTabsetNavButtonComponent_ngUnsubscribe, "f")))
1712
+ .subscribe((index) => {
1713
+ __classPrivateFieldSet(this, _SkyTabsetNavButtonComponent_activeSkyTabIndex, index, "f");
1714
+ __classPrivateFieldSet(this, _SkyTabsetNavButtonComponent_tabCount, __classPrivateFieldGet(this, _SkyTabsetNavButtonComponent__tabset, "f")?.tabs?.length, "f");
1715
+ __classPrivateFieldGet(this, _SkyTabsetNavButtonComponent_instances, "m", _SkyTabsetNavButtonComponent_updateTabToSelect).call(this);
1716
+ __classPrivateFieldGet(this, _SkyTabsetNavButtonComponent_instances, "m", _SkyTabsetNavButtonComponent_updateButtonVisibility).call(this);
1717
+ __classPrivateFieldGet(this, _SkyTabsetNavButtonComponent_instances, "m", _SkyTabsetNavButtonComponent_updateButtonProperties).call(this);
1718
+ }), "f");
1719
+ }
1720
+ else {
1721
+ __classPrivateFieldGet(this, _SkyTabsetNavButtonComponent_logger, "f").error('The SkyTabsetNavButtonComponent requires a reference to the SkyTabsetComponent it controls.');
1722
+ }
1723
+ }
1724
+ /**
1725
+ * Specifies the type of nav button to include.
1726
+ * @required
1727
+ */
1728
+ get buttonType() {
1729
+ return __classPrivateFieldGet(this, _SkyTabsetNavButtonComponent__buttonType, "f");
1730
+ }
1731
+ set buttonType(value) {
1732
+ __classPrivateFieldSet(this, _SkyTabsetNavButtonComponent__buttonType, value, "f");
1733
+ __classPrivateFieldGet(this, _SkyTabsetNavButtonComponent_instances, "m", _SkyTabsetNavButtonComponent_updateTabToSelect).call(this);
1734
+ __classPrivateFieldGet(this, _SkyTabsetNavButtonComponent_instances, "m", _SkyTabsetNavButtonComponent_updateButtonProperties).call(this);
1735
+ __classPrivateFieldGet(this, _SkyTabsetNavButtonComponent_instances, "m", _SkyTabsetNavButtonComponent_updateButtonVisibility).call(this);
1736
+ if (value === buttonTypeFinish) {
1737
+ this.type = 'submit';
1738
+ }
1739
+ else {
1740
+ this.type = 'button';
1741
+ }
1742
+ }
1743
+ /**
1744
+ * Indicates whether to disable the nav button.
1745
+ * Defaults to the disabled state of the next tab for `next`, the existence of a previous tab for `previous`,
1746
+ * and false for `finish`.
1747
+ */
1748
+ set disabled(value) {
1749
+ __classPrivateFieldSet(this, _SkyTabsetNavButtonComponent__disabled, value, "f");
1750
+ }
1751
+ get disabled() {
1752
+ return __classPrivateFieldGet(this, _SkyTabsetNavButtonComponent__disabled, "f");
1753
+ }
1754
+ ngOnDestroy() {
1755
+ __classPrivateFieldGet(this, _SkyTabsetNavButtonComponent_ngUnsubscribe, "f").next();
1756
+ __classPrivateFieldGet(this, _SkyTabsetNavButtonComponent_ngUnsubscribe, "f").complete();
1757
+ }
1758
+ buttonClick() {
1759
+ /* istanbul ignore else */
1760
+ if (this.tabToSelect && !this.tabToSelect.disabled && this.tabset) {
1761
+ this.tabset.active = this.tabToSelect.tabIndex;
1762
+ }
1763
+ }
1764
+ }
1765
+ _SkyTabsetNavButtonComponent__buttonType = new WeakMap(), _SkyTabsetNavButtonComponent__disabled = new WeakMap(), _SkyTabsetNavButtonComponent__tabset = new WeakMap(), _SkyTabsetNavButtonComponent_activeIndexNumber = new WeakMap(), _SkyTabsetNavButtonComponent_activeSkyTabIndex = new WeakMap(), _SkyTabsetNavButtonComponent_currentTabsetSub = new WeakMap(), _SkyTabsetNavButtonComponent_logger = new WeakMap(), _SkyTabsetNavButtonComponent_tabCount = new WeakMap(), _SkyTabsetNavButtonComponent_ngUnsubscribe = new WeakMap(), _SkyTabsetNavButtonComponent_instances = new WeakSet(), _SkyTabsetNavButtonComponent_updateButtonVisibility = function _SkyTabsetNavButtonComponent_updateButtonVisibility() {
1766
+ const isLastStep = !!__classPrivateFieldGet(this, _SkyTabsetNavButtonComponent_tabCount, "f") && __classPrivateFieldGet(this, _SkyTabsetNavButtonComponent_activeIndexNumber, "f") === __classPrivateFieldGet(this, _SkyTabsetNavButtonComponent_tabCount, "f") - 1;
1767
+ if (this.buttonType === buttonTypeFinish) {
1768
+ this.isVisible = isLastStep;
1769
+ }
1770
+ else if (this.buttonType === buttonTypeNext) {
1771
+ this.isVisible = !isLastStep;
1772
+ }
1773
+ else {
1774
+ this.isVisible = true;
1775
+ }
1776
+ }, _SkyTabsetNavButtonComponent_updateButtonProperties = function _SkyTabsetNavButtonComponent_updateButtonProperties() {
1777
+ if (this.buttonType === buttonTypeNext ||
1778
+ this.buttonType === buttonTypeFinish) {
1779
+ this.buttonClassName = 'sky-btn-primary';
1780
+ }
1781
+ else {
1782
+ this.buttonClassName = 'sky-btn-default';
1783
+ }
1784
+ this.ariaControls = this.tabToSelect?.tabPanelId;
1785
+ }, _SkyTabsetNavButtonComponent_updateTabToSelect = function _SkyTabsetNavButtonComponent_updateTabToSelect() {
1786
+ if (this.tabset?.tabs) {
1787
+ const tabs = this.tabset.tabs.toArray();
1788
+ this.tabToSelect = undefined;
1789
+ // tab index can be a number or a string, but we need the actual number index
1790
+ __classPrivateFieldSet(this, _SkyTabsetNavButtonComponent_activeIndexNumber, tabs.findIndex((tab) => tab.tabIndex === __classPrivateFieldGet(this, _SkyTabsetNavButtonComponent_activeSkyTabIndex, "f")), "f");
1791
+ /* istanbul ignore else */
1792
+ if (__classPrivateFieldGet(this, _SkyTabsetNavButtonComponent_activeIndexNumber, "f") !== undefined) {
1793
+ if (this.buttonType === buttonTypeNext) {
1794
+ this.tabToSelect = tabs[__classPrivateFieldGet(this, _SkyTabsetNavButtonComponent_activeIndexNumber, "f") + 1];
1795
+ }
1796
+ else if (this.buttonType === buttonTypePrevious) {
1797
+ this.tabToSelect = tabs[__classPrivateFieldGet(this, _SkyTabsetNavButtonComponent_activeIndexNumber, "f") - 1];
1798
+ }
1799
+ }
1800
+ }
1801
+ };
1802
+ SkyTabsetNavButtonComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.0", ngImport: i0, type: SkyTabsetNavButtonComponent, deps: [{ token: i1.SkyLogService }], target: i0.ɵɵFactoryTarget.Component });
1803
+ SkyTabsetNavButtonComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.2.0", type: SkyTabsetNavButtonComponent, selector: "sky-tabset-nav-button", inputs: { tabset: "tabset", buttonType: "buttonType", buttonText: "buttonText", disabled: "disabled" }, ngImport: i0, template: "<button\n *ngIf=\"isVisible\"\n class=\"sky-btn sky-margin-inline-sm\"\n [attr.aria-controls]=\"ariaControls\"\n [disabled]=\"\n disabled\n | skyTabsetNavButtonDisabled\n : buttonType\n : !!tabToSelect\n : tabToSelect?.disabled\n \"\n [ngClass]=\"buttonClassName\"\n [type]=\"type\"\n (click)=\"buttonType === 'finish' ? null : buttonClick()\"\n>\n {{ buttonText || ('skyux_tabs_navigator_' + buttonType | skyLibResources) }}\n</button>\n", dependencies: [{ kind: "directive", type: i4.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i4.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "pipe", type: i3.SkyLibResourcesPipe, name: "skyLibResources" }, { kind: "pipe", type: SkyTabsetNavButtonDisabledPipe, name: "skyTabsetNavButtonDisabled" }] });
1804
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.0", ngImport: i0, type: SkyTabsetNavButtonComponent, decorators: [{
1805
+ type: Component,
1806
+ args: [{ selector: 'sky-tabset-nav-button', template: "<button\n *ngIf=\"isVisible\"\n class=\"sky-btn sky-margin-inline-sm\"\n [attr.aria-controls]=\"ariaControls\"\n [disabled]=\"\n disabled\n | skyTabsetNavButtonDisabled\n : buttonType\n : !!tabToSelect\n : tabToSelect?.disabled\n \"\n [ngClass]=\"buttonClassName\"\n [type]=\"type\"\n (click)=\"buttonType === 'finish' ? null : buttonClick()\"\n>\n {{ buttonText || ('skyux_tabs_navigator_' + buttonType | skyLibResources) }}\n</button>\n" }]
1807
+ }], ctorParameters: function () { return [{ type: i1.SkyLogService }]; }, propDecorators: { tabset: [{
1808
+ type: Input
1809
+ }], buttonType: [{
1810
+ type: Input
1811
+ }], buttonText: [{
1812
+ type: Input
1813
+ }], disabled: [{
1814
+ type: Input
1815
+ }] } });
1816
+
1817
+ var _SkyTabsetAdapterService_instances, _SkyTabsetAdapterService_currentOverflow, _SkyTabsetAdapterService_tabsetRef, _SkyTabsetAdapterService_tabsOffsetLeft, _SkyTabsetAdapterService_overflowChange, _SkyTabsetAdapterService_getTabsOffsetLeft;
1594
1818
  /**
1595
1819
  * @internal
1596
1820
  */
1597
1821
  class SkyTabsetAdapterService {
1598
1822
  constructor() {
1599
- this._overflowChange = new BehaviorSubject(false);
1823
+ _SkyTabsetAdapterService_instances.add(this);
1824
+ _SkyTabsetAdapterService_currentOverflow.set(this, false);
1825
+ _SkyTabsetAdapterService_tabsetRef.set(this, void 0);
1826
+ _SkyTabsetAdapterService_tabsOffsetLeft.set(this, void 0);
1827
+ _SkyTabsetAdapterService_overflowChange.set(this, void 0);
1828
+ __classPrivateFieldSet(this, _SkyTabsetAdapterService_overflowChange, new BehaviorSubject(false), "f");
1600
1829
  }
1601
1830
  get overflowChange() {
1602
- return this._overflowChange.asObservable();
1831
+ return __classPrivateFieldGet(this, _SkyTabsetAdapterService_overflowChange, "f");
1832
+ }
1833
+ ngOnDestroy() {
1834
+ __classPrivateFieldGet(this, _SkyTabsetAdapterService_overflowChange, "f").complete();
1603
1835
  }
1604
1836
  registerTabset(tabsetRef) {
1605
- this.tabsetRef = tabsetRef;
1606
- this.tabsOffsetLeft = this.getTabsOffsetLeft(tabsetRef.nativeElement);
1837
+ __classPrivateFieldSet(this, _SkyTabsetAdapterService_tabsetRef, tabsetRef, "f");
1838
+ __classPrivateFieldSet(this, _SkyTabsetAdapterService_tabsOffsetLeft, __classPrivateFieldGet(this, _SkyTabsetAdapterService_instances, "m", _SkyTabsetAdapterService_getTabsOffsetLeft).call(this, tabsetRef.nativeElement), "f");
1607
1839
  }
1608
1840
  /**
1609
1841
  * Detects if the tab buttons are wider than the tabset container.
1610
1842
  */
1611
1843
  detectOverflow() {
1612
- const nativeElement = this.tabsetRef.nativeElement;
1844
+ const nativeElement = __classPrivateFieldGet(this, _SkyTabsetAdapterService_tabsetRef, "f")?.nativeElement;
1613
1845
  const tabsetRect = nativeElement
1614
1846
  .querySelector('.sky-tabset')
1615
1847
  .getBoundingClientRect();
@@ -1619,38 +1851,37 @@ class SkyTabsetAdapterService {
1619
1851
  const tabExtraButtonsRect = nativeElement
1620
1852
  .querySelector('.sky-tabset-btns')
1621
1853
  .getBoundingClientRect();
1622
- const tabButtonsWidth = tabButtonsRect.width + tabExtraButtonsRect.width + this.tabsOffsetLeft;
1854
+ const tabButtonsWidth = tabButtonsRect.width + tabExtraButtonsRect.width + __classPrivateFieldGet(this, _SkyTabsetAdapterService_tabsOffsetLeft, "f");
1623
1855
  const newOverflow = tabButtonsWidth > tabsetRect.width;
1624
- if (this.currentOverflow !== newOverflow) {
1625
- this.currentOverflow = newOverflow;
1626
- this._overflowChange.next(this.currentOverflow);
1856
+ if (__classPrivateFieldGet(this, _SkyTabsetAdapterService_currentOverflow, "f") !== newOverflow) {
1857
+ __classPrivateFieldSet(this, _SkyTabsetAdapterService_currentOverflow, newOverflow, "f");
1858
+ __classPrivateFieldGet(this, _SkyTabsetAdapterService_overflowChange, "f").next(__classPrivateFieldGet(this, _SkyTabsetAdapterService_currentOverflow, "f"));
1627
1859
  }
1628
1860
  }
1629
- /**
1630
- * Returns the number of pixels to the left of the first tab.
1631
- */
1632
- getTabsOffsetLeft(tabsetEl) {
1633
- const tabsetRect = tabsetEl.getBoundingClientRect();
1634
- // The dropdown element is the first "tab" and always exists in the DOM, even when hidden.
1635
- const firstTabRect = tabsetEl
1636
- .querySelector('.sky-tabset-dropdown')
1637
- .getBoundingClientRect();
1638
- return firstTabRect.left - tabsetRect.left;
1639
- }
1640
1861
  }
1862
+ _SkyTabsetAdapterService_currentOverflow = new WeakMap(), _SkyTabsetAdapterService_tabsetRef = new WeakMap(), _SkyTabsetAdapterService_tabsOffsetLeft = new WeakMap(), _SkyTabsetAdapterService_overflowChange = new WeakMap(), _SkyTabsetAdapterService_instances = new WeakSet(), _SkyTabsetAdapterService_getTabsOffsetLeft = function _SkyTabsetAdapterService_getTabsOffsetLeft(tabsetEl) {
1863
+ const tabsetRect = tabsetEl.getBoundingClientRect();
1864
+ // The dropdown element is the first "tab" and always exists in the DOM, even when hidden.
1865
+ const firstTabRect = tabsetEl
1866
+ .querySelector('.sky-tabset-dropdown')
1867
+ ?.getBoundingClientRect();
1868
+ // Safety check
1869
+ /* istanbul ignore next */
1870
+ if (!firstTabRect) {
1871
+ return 0;
1872
+ }
1873
+ return firstTabRect.left - tabsetRect.left;
1874
+ };
1641
1875
  SkyTabsetAdapterService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.0", ngImport: i0, type: SkyTabsetAdapterService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
1642
1876
  SkyTabsetAdapterService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "14.2.0", ngImport: i0, type: SkyTabsetAdapterService });
1643
1877
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.0", ngImport: i0, type: SkyTabsetAdapterService, decorators: [{
1644
1878
  type: Injectable
1645
- }] });
1879
+ }], ctorParameters: function () { return []; } });
1646
1880
 
1881
+ var _SkyTabsetComponent_instances, _SkyTabsetComponent_ngUnsubscribe, _SkyTabsetComponent_tabComponentsChangeUnsubscribe, _SkyTabsetComponent_tabComponentsStateChangeUnsubscribe, _SkyTabsetComponent__active, _SkyTabsetComponent__permalinkId, _SkyTabsetComponent__tabs, _SkyTabsetComponent__tabDisplayMode, _SkyTabsetComponent__tabStyle, _SkyTabsetComponent_changeDetector, _SkyTabsetComponent_elementRef, _SkyTabsetComponent_adapterService, _SkyTabsetComponent_permalinkService, _SkyTabsetComponent_tabsetService, _SkyTabsetComponent_getInitialTabIndex, _SkyTabsetComponent_listenActiveIndexChange, _SkyTabsetComponent_listenTabComponentsStateChange, _SkyTabsetComponent_initTabComponents, _SkyTabsetComponent_resetTabComponents, _SkyTabsetComponent_emitTabIndexChange, _SkyTabsetComponent_unsubscribeTabComponentsStateChange, _SkyTabsetComponent_listenTabButtonsOverflowChange, _SkyTabsetComponent_listenLocationPopStateChange, _SkyTabsetComponent_setActiveTabIndexByPermalinkId, _SkyTabsetComponent_getActiveTabIndexByPermalinkId, _SkyTabsetComponent_getActiveTabComponent, _SkyTabsetComponent_createTabButtons, _SkyTabsetComponent_updateTabButtons, _SkyTabsetComponent_updateTabsetComponent;
1647
1882
  class SkyTabsetComponent {
1648
1883
  constructor(changeDetector, elementRef, adapterService, permalinkService, tabsetService) {
1649
- this.changeDetector = changeDetector;
1650
- this.elementRef = elementRef;
1651
- this.adapterService = adapterService;
1652
- this.permalinkService = permalinkService;
1653
- this.tabsetService = tabsetService;
1884
+ _SkyTabsetComponent_instances.add(this);
1654
1885
  /**
1655
1886
  * Fires when the active tab changes. This event emits the index of the active tab.
1656
1887
  */
@@ -1672,40 +1903,57 @@ class SkyTabsetComponent {
1672
1903
  * This event only applies when `tabStyle` is `"tabs"`.
1673
1904
  */
1674
1905
  this.tabIndexesChange = new EventEmitter();
1906
+ this.dropdownTriggerButtonText = '';
1675
1907
  this.tabButtons = [];
1676
- this.ngUnsubscribe = new Subject();
1677
- this.tabComponentsStateChangeUnsubscribe = new Subject();
1908
+ _SkyTabsetComponent_ngUnsubscribe.set(this, new Subject());
1909
+ _SkyTabsetComponent_tabComponentsChangeUnsubscribe.set(this, new Subject());
1910
+ _SkyTabsetComponent_tabComponentsStateChangeUnsubscribe.set(this, new Subject());
1911
+ _SkyTabsetComponent__active.set(this, void 0);
1912
+ _SkyTabsetComponent__permalinkId.set(this, '');
1913
+ _SkyTabsetComponent__tabs.set(this, void 0);
1914
+ _SkyTabsetComponent__tabDisplayMode.set(this, 'tabs');
1915
+ _SkyTabsetComponent__tabStyle.set(this, 'tabs');
1916
+ _SkyTabsetComponent_changeDetector.set(this, void 0);
1917
+ _SkyTabsetComponent_elementRef.set(this, void 0);
1918
+ _SkyTabsetComponent_adapterService.set(this, void 0);
1919
+ _SkyTabsetComponent_permalinkService.set(this, void 0);
1920
+ _SkyTabsetComponent_tabsetService.set(this, void 0);
1921
+ __classPrivateFieldSet(this, _SkyTabsetComponent_changeDetector, changeDetector, "f");
1922
+ __classPrivateFieldSet(this, _SkyTabsetComponent_elementRef, elementRef, "f");
1923
+ __classPrivateFieldSet(this, _SkyTabsetComponent_adapterService, adapterService, "f");
1924
+ __classPrivateFieldSet(this, _SkyTabsetComponent_permalinkService, permalinkService, "f");
1925
+ __classPrivateFieldSet(this, _SkyTabsetComponent_tabsetService, tabsetService, "f");
1678
1926
  }
1679
1927
  /**
1680
1928
  * Activates a tab by its `tabIndex` property.
1681
1929
  */
1682
1930
  set active(value) {
1683
1931
  if (value === undefined ||
1684
- this.tabsetService.tabIndexesEqual(value, this._active)) {
1932
+ __classPrivateFieldGet(this, _SkyTabsetComponent_tabsetService, "f").tabIndexesEqual(value, __classPrivateFieldGet(this, _SkyTabsetComponent__active, "f"))) {
1685
1933
  return;
1686
1934
  }
1687
- this._active = value;
1935
+ __classPrivateFieldSet(this, _SkyTabsetComponent__active, value, "f");
1688
1936
  if (this.tabs) {
1689
- this.tabsetService.setActiveTabIndex(value);
1937
+ __classPrivateFieldGet(this, _SkyTabsetComponent_tabsetService, "f").setActiveTabIndex(value);
1690
1938
  }
1691
1939
  else {
1692
1940
  // On init, wait for children tabs to render before broadcasting the active tab index.
1693
1941
  setTimeout(() => {
1694
- if (this.tabsetService.isValidTabIndex(value)) {
1942
+ if (__classPrivateFieldGet(this, _SkyTabsetComponent_tabsetService, "f").isValidTabIndex(value)) {
1695
1943
  // On init, yield to the permalink ID, if it exists.
1696
- if (this.getActiveTabIndexByPermalinkId() === undefined) {
1697
- this.tabsetService.setActiveTabIndex(value);
1944
+ if (__classPrivateFieldGet(this, _SkyTabsetComponent_instances, "m", _SkyTabsetComponent_getActiveTabIndexByPermalinkId).call(this) === undefined) {
1945
+ __classPrivateFieldGet(this, _SkyTabsetComponent_tabsetService, "f").setActiveTabIndex(value);
1698
1946
  }
1699
1947
  }
1700
1948
  else {
1701
1949
  // Activate the first tab if the new tab index is invalid.
1702
- this._active = this.tabsetService.activateFirstTab();
1950
+ __classPrivateFieldSet(this, _SkyTabsetComponent__active, __classPrivateFieldGet(this, _SkyTabsetComponent_tabsetService, "f").activateFirstTab(), "f");
1703
1951
  }
1704
1952
  });
1705
1953
  }
1706
1954
  }
1707
1955
  get active() {
1708
- return this._active;
1956
+ return __classPrivateFieldGet(this, _SkyTabsetComponent__active, "f");
1709
1957
  }
1710
1958
  /**
1711
1959
  * Distinguishes a tabset's unique state in the URL by generating a query parameter
@@ -1716,71 +1964,86 @@ class SkyTabsetComponent {
1716
1964
  */
1717
1965
  set permalinkId(value) {
1718
1966
  if (!value) {
1719
- return;
1967
+ __classPrivateFieldSet(this, _SkyTabsetComponent__permalinkId, '', "f");
1968
+ }
1969
+ else {
1970
+ const sanitized = __classPrivateFieldGet(this, _SkyTabsetComponent_permalinkService, "f").urlify(value);
1971
+ __classPrivateFieldSet(this, _SkyTabsetComponent__permalinkId, `${sanitized}-active-tab`, "f");
1720
1972
  }
1721
- const sanitized = this.permalinkService.urlify(value);
1722
- this._permalinkId = `${sanitized}-active-tab`;
1723
1973
  }
1724
1974
  get permalinkId() {
1725
- return this._permalinkId || '';
1975
+ return __classPrivateFieldGet(this, _SkyTabsetComponent__permalinkId, "f");
1726
1976
  }
1727
1977
  /**
1728
1978
  * Specifies the behavior for a series of tabs.
1729
1979
  * @default "tabs"
1730
1980
  */
1731
1981
  set tabStyle(value) {
1732
- this._tabStyle = value;
1982
+ __classPrivateFieldSet(this, _SkyTabsetComponent__tabStyle, value || 'tabs', "f");
1733
1983
  }
1734
1984
  get tabStyle() {
1735
- return this._tabStyle || 'tabs';
1985
+ return __classPrivateFieldGet(this, _SkyTabsetComponent__tabStyle, "f");
1736
1986
  }
1737
1987
  set tabDisplayMode(value) {
1738
- this._tabDisplayMode = value;
1739
- this.changeDetector.markForCheck();
1988
+ __classPrivateFieldSet(this, _SkyTabsetComponent__tabDisplayMode, value, "f");
1989
+ __classPrivateFieldGet(this, _SkyTabsetComponent_changeDetector, "f").markForCheck();
1740
1990
  }
1741
1991
  get tabDisplayMode() {
1742
- return this._tabDisplayMode || 'tabs';
1992
+ return __classPrivateFieldGet(this, _SkyTabsetComponent__tabDisplayMode, "f");
1993
+ }
1994
+ set tabs(value) {
1995
+ __classPrivateFieldSet(this, _SkyTabsetComponent__tabs, value, "f");
1996
+ __classPrivateFieldGet(this, _SkyTabsetComponent_tabComponentsChangeUnsubscribe, "f").next();
1997
+ value?.changes
1998
+ .pipe(takeUntil(__classPrivateFieldGet(this, _SkyTabsetComponent_tabComponentsChangeUnsubscribe, "f")))
1999
+ .subscribe(() => {
2000
+ __classPrivateFieldGet(this, _SkyTabsetComponent_instances, "m", _SkyTabsetComponent_resetTabComponents).call(this);
2001
+ });
2002
+ }
2003
+ get tabs() {
2004
+ return __classPrivateFieldGet(this, _SkyTabsetComponent__tabs, "f");
1743
2005
  }
1744
2006
  ngAfterViewInit() {
1745
- this.initTabComponents();
1746
- this.listenTabComponentsStructuralChange();
1747
- const initialTabIndex = this.getInitialTabIndex();
1748
- this.tabsetService.setActiveTabIndex(initialTabIndex);
1749
- this.listenTabButtonsOverflowChange();
1750
- this.listenLocationPopStateChange();
2007
+ __classPrivateFieldGet(this, _SkyTabsetComponent_instances, "m", _SkyTabsetComponent_initTabComponents).call(this);
2008
+ const initialTabIndex = __classPrivateFieldGet(this, _SkyTabsetComponent_instances, "m", _SkyTabsetComponent_getInitialTabIndex).call(this);
2009
+ __classPrivateFieldGet(this, _SkyTabsetComponent_tabsetService, "f").setActiveTabIndex(initialTabIndex);
2010
+ __classPrivateFieldGet(this, _SkyTabsetComponent_instances, "m", _SkyTabsetComponent_listenTabButtonsOverflowChange).call(this);
2011
+ __classPrivateFieldGet(this, _SkyTabsetComponent_instances, "m", _SkyTabsetComponent_listenLocationPopStateChange).call(this);
1751
2012
  // If the currently active tab is getting unregistered, activate the next one.
1752
- this.tabsetService.activeTabUnregistered
1753
- .pipe(takeUntil(this.ngUnsubscribe))
2013
+ __classPrivateFieldGet(this, _SkyTabsetComponent_tabsetService, "f").activeTabUnregistered
2014
+ .pipe(takeUntil(__classPrivateFieldGet(this, _SkyTabsetComponent_ngUnsubscribe, "f")))
1754
2015
  .subscribe((tab) => {
1755
2016
  // Wait for the new tabs to render before activating.
1756
2017
  setTimeout(() => {
1757
- this.tabsetService.activateNearestTab(tab.arrayIndex);
2018
+ __classPrivateFieldGet(this, _SkyTabsetComponent_tabsetService, "f").activateNearestTab(tab.arrayIndex);
1758
2019
  });
1759
2020
  });
1760
2021
  // Let the tabset render the initial active index before listening for changes.
1761
2022
  setTimeout(() => {
1762
- this.listenTabComponentsStateChange();
1763
- this.listenActiveIndexChange();
1764
- this.permalinkService.init();
2023
+ __classPrivateFieldGet(this, _SkyTabsetComponent_instances, "m", _SkyTabsetComponent_listenTabComponentsStateChange).call(this);
2024
+ __classPrivateFieldGet(this, _SkyTabsetComponent_instances, "m", _SkyTabsetComponent_listenActiveIndexChange).call(this);
2025
+ __classPrivateFieldGet(this, _SkyTabsetComponent_permalinkService, "f").init();
1765
2026
  });
1766
2027
  }
1767
2028
  ngOnDestroy() {
1768
- this.ngUnsubscribe.next();
1769
- this.ngUnsubscribe.complete();
1770
- this.unsubscribeTabComponentsStateChange();
2029
+ __classPrivateFieldGet(this, _SkyTabsetComponent_ngUnsubscribe, "f").next();
2030
+ __classPrivateFieldGet(this, _SkyTabsetComponent_ngUnsubscribe, "f").complete();
2031
+ __classPrivateFieldGet(this, _SkyTabsetComponent_tabComponentsChangeUnsubscribe, "f").next();
2032
+ __classPrivateFieldGet(this, _SkyTabsetComponent_tabComponentsChangeUnsubscribe, "f").complete();
2033
+ __classPrivateFieldGet(this, _SkyTabsetComponent_instances, "m", _SkyTabsetComponent_unsubscribeTabComponentsStateChange).call(this);
1771
2034
  if (this.permalinkId) {
1772
- this.permalinkService.clearParam(this.permalinkId);
2035
+ __classPrivateFieldGet(this, _SkyTabsetComponent_permalinkService, "f").clearParam(this.permalinkId);
1773
2036
  }
1774
2037
  }
1775
2038
  onWindowResize() {
1776
- this.adapterService.detectOverflow();
2039
+ __classPrivateFieldGet(this, _SkyTabsetComponent_adapterService, "f").detectOverflow();
1777
2040
  }
1778
2041
  onTabCloseClick(tabButton) {
1779
- const tabComponent = this.tabs.find((tab) => this.tabsetService.tabIndexesEqual(tab.tabIndex, tabButton.tabIndex));
1780
- tabComponent.close.emit();
2042
+ const tabComponent = this.tabs?.find((tab) => __classPrivateFieldGet(this, _SkyTabsetComponent_tabsetService, "f").tabIndexesEqual(tab.tabIndex, tabButton.tabIndex));
2043
+ tabComponent?.close.emit();
1781
2044
  }
1782
2045
  onTabButtonClick(tabButton) {
1783
- this.tabsetService.setActiveTabIndex(tabButton.tabIndex);
2046
+ __classPrivateFieldGet(this, _SkyTabsetComponent_tabsetService, "f").setActiveTabIndex(tabButton.tabIndex);
1784
2047
  }
1785
2048
  onNewTabClick() {
1786
2049
  this.newTab.emit();
@@ -1789,213 +2052,187 @@ class SkyTabsetComponent {
1789
2052
  this.openTab.emit();
1790
2053
  }
1791
2054
  onRightKeyDown() {
1792
- this.tabsetService.focusNextTabBtn(this.tabButtons);
2055
+ __classPrivateFieldGet(this, _SkyTabsetComponent_tabsetService, "f").focusNextTabBtn(this.tabButtons);
1793
2056
  }
1794
2057
  onLeftKeyDown() {
1795
- this.tabsetService.focusPrevTabBtn(this.tabButtons);
2058
+ __classPrivateFieldGet(this, _SkyTabsetComponent_tabsetService, "f").focusPrevTabBtn(this.tabButtons);
1796
2059
  }
1797
2060
  onHomeKeyDown() {
1798
- this.tabsetService.focusFirstOrNearestTabBtn(this.tabButtons);
2061
+ __classPrivateFieldGet(this, _SkyTabsetComponent_tabsetService, "f").focusFirstOrNearestTabBtn(this.tabButtons);
1799
2062
  }
1800
2063
  onEndKeyDown() {
1801
- this.tabsetService.focusLastOrNearestTabBtn(this.tabButtons);
2064
+ __classPrivateFieldGet(this, _SkyTabsetComponent_tabsetService, "f").focusLastOrNearestTabBtn(this.tabButtons);
1802
2065
  }
1803
- /**
1804
- * Sets the initial active tab index based on the following criteria.
1805
- * 1. Does the URL include a query param that reflects this tabset's active tab?
1806
- * 2. Does one of the tab components have their `active` property set to `true`?
1807
- * 3. Is the tabset component's `active` property set to a specific tab index?
1808
- */
1809
- getInitialTabIndex() {
1810
- let activeIndex = this.getActiveTabIndexByPermalinkId();
2066
+ }
2067
+ _SkyTabsetComponent_ngUnsubscribe = new WeakMap(), _SkyTabsetComponent_tabComponentsChangeUnsubscribe = new WeakMap(), _SkyTabsetComponent_tabComponentsStateChangeUnsubscribe = new WeakMap(), _SkyTabsetComponent__active = new WeakMap(), _SkyTabsetComponent__permalinkId = new WeakMap(), _SkyTabsetComponent__tabs = new WeakMap(), _SkyTabsetComponent__tabDisplayMode = new WeakMap(), _SkyTabsetComponent__tabStyle = new WeakMap(), _SkyTabsetComponent_changeDetector = new WeakMap(), _SkyTabsetComponent_elementRef = new WeakMap(), _SkyTabsetComponent_adapterService = new WeakMap(), _SkyTabsetComponent_permalinkService = new WeakMap(), _SkyTabsetComponent_tabsetService = new WeakMap(), _SkyTabsetComponent_instances = new WeakSet(), _SkyTabsetComponent_getInitialTabIndex = function _SkyTabsetComponent_getInitialTabIndex() {
2068
+ let activeIndex = __classPrivateFieldGet(this, _SkyTabsetComponent_instances, "m", _SkyTabsetComponent_getActiveTabIndexByPermalinkId).call(this);
2069
+ if (activeIndex === undefined) {
2070
+ activeIndex = __classPrivateFieldGet(this, _SkyTabsetComponent_instances, "m", _SkyTabsetComponent_getActiveTabComponent).call(this)?.tabIndex;
1811
2071
  if (activeIndex === undefined) {
1812
- activeIndex = this.getActiveTabComponent()?.tabIndex;
1813
- if (activeIndex === undefined) {
1814
- activeIndex = this.active;
1815
- }
1816
- }
1817
- return activeIndex;
1818
- }
1819
- listenActiveIndexChange() {
1820
- this.tabsetService.activeTabIndex
1821
- .pipe(distinctUntilChanged(), takeUntil(this.ngUnsubscribe))
1822
- .subscribe((activeIndex) => {
1823
- this.updateTabsetComponent(activeIndex);
1824
- });
1825
- }
1826
- listenTabComponentsStructuralChange() {
1827
- this.tabs.changes.pipe(takeUntil(this.ngUnsubscribe)).subscribe(() => {
1828
- this.resetTabComponents();
1829
- });
1830
- }
1831
- listenTabComponentsStateChange() {
2072
+ activeIndex = this.active;
2073
+ }
2074
+ }
2075
+ return activeIndex;
2076
+ }, _SkyTabsetComponent_listenActiveIndexChange = function _SkyTabsetComponent_listenActiveIndexChange() {
2077
+ __classPrivateFieldGet(this, _SkyTabsetComponent_tabsetService, "f").activeTabIndex
2078
+ .pipe(distinctUntilChanged(), takeUntil(__classPrivateFieldGet(this, _SkyTabsetComponent_ngUnsubscribe, "f")))
2079
+ .subscribe((activeIndex) => {
2080
+ __classPrivateFieldGet(this, _SkyTabsetComponent_instances, "m", _SkyTabsetComponent_updateTabsetComponent).call(this, activeIndex);
2081
+ });
2082
+ }, _SkyTabsetComponent_listenTabComponentsStateChange = function _SkyTabsetComponent_listenTabComponentsStateChange() {
2083
+ if (this.tabs) {
1832
2084
  combineLatest(this.tabs.map((tab) => tab.activeChange))
1833
- .pipe(takeUntil(race(this.tabComponentsStateChangeUnsubscribe, this.ngUnsubscribe)))
2085
+ .pipe(takeUntil(race(__classPrivateFieldGet(this, _SkyTabsetComponent_tabComponentsStateChangeUnsubscribe, "f"), __classPrivateFieldGet(this, _SkyTabsetComponent_ngUnsubscribe, "f"))))
1834
2086
  .subscribe(() => {
1835
2087
  // Wait for the tab components to render changes before finding the active one.
1836
2088
  setTimeout(() => {
1837
- const tabIndex = this.getActiveTabComponent()?.tabIndex;
1838
- this.tabsetService.setActiveTabIndex(tabIndex);
2089
+ const tabIndex = __classPrivateFieldGet(this, _SkyTabsetComponent_instances, "m", _SkyTabsetComponent_getActiveTabComponent).call(this)?.tabIndex;
2090
+ __classPrivateFieldGet(this, _SkyTabsetComponent_tabsetService, "f").setActiveTabIndex(tabIndex);
1839
2091
  });
1840
2092
  });
1841
2093
  combineLatest(this.tabs.map((tab) => tab.tabIndexChange))
1842
- .pipe(takeUntil(race(this.tabComponentsStateChangeUnsubscribe, this.ngUnsubscribe)))
2094
+ .pipe(takeUntil(race(__classPrivateFieldGet(this, _SkyTabsetComponent_tabComponentsStateChangeUnsubscribe, "f"), __classPrivateFieldGet(this, _SkyTabsetComponent_ngUnsubscribe, "f"))))
1843
2095
  .subscribe(() => {
1844
2096
  // Don't emit the first change.
1845
2097
  if (this.lastActiveTabIndex !== undefined) {
1846
2098
  // Wait for the tab components to render changes before updating the view.
1847
2099
  setTimeout(() => {
1848
- this.updateTabsetComponent(this.tabsetService.currentActiveTabIndex, true);
1849
- this.emitTabIndexChange();
2100
+ __classPrivateFieldGet(this, _SkyTabsetComponent_instances, "m", _SkyTabsetComponent_updateTabsetComponent).call(this, __classPrivateFieldGet(this, _SkyTabsetComponent_tabsetService, "f").currentActiveTabIndex, true);
2101
+ __classPrivateFieldGet(this, _SkyTabsetComponent_instances, "m", _SkyTabsetComponent_emitTabIndexChange).call(this);
1850
2102
  });
1851
2103
  }
1852
2104
  });
1853
2105
  combineLatest(this.tabs.map((tab) => tab.stateChange))
1854
- .pipe(takeUntil(race(this.tabComponentsStateChangeUnsubscribe, this.ngUnsubscribe)))
2106
+ .pipe(takeUntil(race(__classPrivateFieldGet(this, _SkyTabsetComponent_tabComponentsStateChangeUnsubscribe, "f"), __classPrivateFieldGet(this, _SkyTabsetComponent_ngUnsubscribe, "f"))))
1855
2107
  .subscribe(() => {
1856
2108
  // Wait for the tab components to render changes before finding the active one.
1857
2109
  setTimeout(() => {
1858
- this.updateTabsetComponent(this.tabsetService.currentActiveTabIndex, true);
2110
+ __classPrivateFieldGet(this, _SkyTabsetComponent_instances, "m", _SkyTabsetComponent_updateTabsetComponent).call(this, __classPrivateFieldGet(this, _SkyTabsetComponent_tabsetService, "f").currentActiveTabIndex, true);
1859
2111
  });
1860
2112
  });
1861
2113
  }
1862
- initTabComponents() {
1863
- this.tabs.forEach((tab) => tab.init());
1864
- }
1865
- resetTabComponents() {
1866
- this.unsubscribeTabComponentsStateChange();
1867
- this.tabsetService.unregisterAll();
1868
- // If there are no tab components, do a hard reset of the view.
1869
- if (this.tabs.length === 0) {
1870
- this.updateTabsetComponent(0, true);
1871
- return;
1872
- }
1873
- this.initTabComponents();
1874
- const activeIndex = this.getActiveTabComponent()?.tabIndex;
1875
- this.tabsetService.setActiveTabIndex(activeIndex, {
1876
- emitChange: false,
1877
- });
1878
- this.listenTabComponentsStateChange();
1879
- }
1880
- emitTabIndexChange() {
1881
- this.tabIndexesChange.emit({
1882
- tabs: this.tabs.map((tab) => ({
1883
- tabHeading: tab.tabHeading,
1884
- tabIndex: tab.tabIndex,
1885
- })),
1886
- });
1887
- }
1888
- unsubscribeTabComponentsStateChange() {
1889
- this.tabComponentsStateChangeUnsubscribe.next();
1890
- this.tabComponentsStateChangeUnsubscribe.complete();
1891
- this.tabComponentsStateChangeUnsubscribe = new Subject();
1892
- }
1893
- listenTabButtonsOverflowChange() {
1894
- this.adapterService.registerTabset(this.elementRef);
1895
- this.adapterService.overflowChange
1896
- .pipe(takeUntil(this.ngUnsubscribe))
1897
- .subscribe((isOverflowing) => {
1898
- this.tabDisplayMode = isOverflowing ? 'dropdown' : 'tabs';
1899
- this.changeDetector.markForCheck();
1900
- });
1901
- }
1902
- /**
1903
- * Listen for back/forward history button presses to detect query param changes in the URL.
1904
- */
1905
- listenLocationPopStateChange() {
1906
- this.permalinkService.popStateChange
1907
- .pipe(takeUntil(this.ngUnsubscribe))
1908
- .subscribe(() => {
1909
- this.setActiveTabIndexByPermalinkId();
1910
- });
1911
- }
1912
- setActiveTabIndexByPermalinkId() {
1913
- const activeIndex = this.getActiveTabIndexByPermalinkId();
1914
- this.tabsetService.setActiveTabIndex(activeIndex);
1915
- }
1916
- getActiveTabIndexByPermalinkId() {
1917
- if (this.permalinkId) {
1918
- const paramValue = this.permalinkService.getParam(this.permalinkId);
1919
- if (paramValue) {
1920
- return this.tabs.find((tab) => tab.permalinkValue === paramValue)
1921
- ?.tabIndex;
1922
- }
1923
- }
1924
- }
1925
- getActiveTabComponent() {
1926
- return this.tabs
1927
- .toArray()
1928
- .reverse()
1929
- .find((tab) => tab.active === true);
1930
- }
1931
- createTabButtons(activeIndex) {
1932
- return this.tabs.map((tab, index) => ({
1933
- active: this.tabsetService.tabIndexesEqual(tab.tabIndex, activeIndex),
1934
- closeable: tab.closeable,
1935
- ariaControls: tab.tabPanelId,
1936
- disabled: tab.disabled,
1937
- buttonHref: tab.disabled
1938
- ? null
1939
- : this.permalinkService.getParamHref(this.permalinkId, tab.permalinkValue),
1940
- buttonId: tab.tabButtonId,
1941
- buttonTextCount: tab.tabHeaderCount,
1942
- buttonText: tab.tabHeading,
2114
+ }, _SkyTabsetComponent_initTabComponents = function _SkyTabsetComponent_initTabComponents() {
2115
+ this.tabs?.forEach((tab) => tab.init());
2116
+ }, _SkyTabsetComponent_resetTabComponents = function _SkyTabsetComponent_resetTabComponents() {
2117
+ __classPrivateFieldGet(this, _SkyTabsetComponent_instances, "m", _SkyTabsetComponent_unsubscribeTabComponentsStateChange).call(this);
2118
+ __classPrivateFieldGet(this, _SkyTabsetComponent_tabsetService, "f").unregisterAll();
2119
+ // If there are no tab components, do a hard reset of the view.
2120
+ if (this.tabs?.length === 0) {
2121
+ __classPrivateFieldGet(this, _SkyTabsetComponent_instances, "m", _SkyTabsetComponent_updateTabsetComponent).call(this, 0, true);
2122
+ return;
2123
+ }
2124
+ __classPrivateFieldGet(this, _SkyTabsetComponent_instances, "m", _SkyTabsetComponent_initTabComponents).call(this);
2125
+ const activeIndex = __classPrivateFieldGet(this, _SkyTabsetComponent_instances, "m", _SkyTabsetComponent_getActiveTabComponent).call(this)?.tabIndex;
2126
+ __classPrivateFieldGet(this, _SkyTabsetComponent_tabsetService, "f").setActiveTabIndex(activeIndex, {
2127
+ emitChange: false,
2128
+ });
2129
+ __classPrivateFieldGet(this, _SkyTabsetComponent_instances, "m", _SkyTabsetComponent_listenTabComponentsStateChange).call(this);
2130
+ }, _SkyTabsetComponent_emitTabIndexChange = function _SkyTabsetComponent_emitTabIndexChange() {
2131
+ this.tabIndexesChange.emit({
2132
+ tabs: this.tabs?.map((tab) => ({
2133
+ tabHeading: tab.tabHeading,
1943
2134
  tabIndex: tab.tabIndex,
1944
- tabNumber: index + 1,
1945
- totalTabsCount: this.tabs.length,
1946
- }));
2135
+ })),
2136
+ });
2137
+ }, _SkyTabsetComponent_unsubscribeTabComponentsStateChange = function _SkyTabsetComponent_unsubscribeTabComponentsStateChange() {
2138
+ __classPrivateFieldGet(this, _SkyTabsetComponent_tabComponentsStateChangeUnsubscribe, "f").next();
2139
+ __classPrivateFieldGet(this, _SkyTabsetComponent_tabComponentsStateChangeUnsubscribe, "f").complete();
2140
+ __classPrivateFieldSet(this, _SkyTabsetComponent_tabComponentsStateChangeUnsubscribe, new Subject(), "f");
2141
+ }, _SkyTabsetComponent_listenTabButtonsOverflowChange = function _SkyTabsetComponent_listenTabButtonsOverflowChange() {
2142
+ __classPrivateFieldGet(this, _SkyTabsetComponent_adapterService, "f").registerTabset(__classPrivateFieldGet(this, _SkyTabsetComponent_elementRef, "f"));
2143
+ __classPrivateFieldGet(this, _SkyTabsetComponent_adapterService, "f").overflowChange
2144
+ .pipe(takeUntil(__classPrivateFieldGet(this, _SkyTabsetComponent_ngUnsubscribe, "f")))
2145
+ .subscribe((isOverflowing) => {
2146
+ this.tabDisplayMode = isOverflowing ? 'dropdown' : 'tabs';
2147
+ __classPrivateFieldGet(this, _SkyTabsetComponent_changeDetector, "f").markForCheck();
2148
+ });
2149
+ }, _SkyTabsetComponent_listenLocationPopStateChange = function _SkyTabsetComponent_listenLocationPopStateChange() {
2150
+ __classPrivateFieldGet(this, _SkyTabsetComponent_permalinkService, "f").popStateChange
2151
+ .pipe(takeUntil(__classPrivateFieldGet(this, _SkyTabsetComponent_ngUnsubscribe, "f")))
2152
+ .subscribe(() => {
2153
+ __classPrivateFieldGet(this, _SkyTabsetComponent_instances, "m", _SkyTabsetComponent_setActiveTabIndexByPermalinkId).call(this);
2154
+ });
2155
+ }, _SkyTabsetComponent_setActiveTabIndexByPermalinkId = function _SkyTabsetComponent_setActiveTabIndexByPermalinkId() {
2156
+ const activeIndex = __classPrivateFieldGet(this, _SkyTabsetComponent_instances, "m", _SkyTabsetComponent_getActiveTabIndexByPermalinkId).call(this);
2157
+ __classPrivateFieldGet(this, _SkyTabsetComponent_tabsetService, "f").setActiveTabIndex(activeIndex);
2158
+ }, _SkyTabsetComponent_getActiveTabIndexByPermalinkId = function _SkyTabsetComponent_getActiveTabIndexByPermalinkId() {
2159
+ if (this.permalinkId) {
2160
+ const paramValue = __classPrivateFieldGet(this, _SkyTabsetComponent_permalinkService, "f").getParam(this.permalinkId);
2161
+ if (paramValue) {
2162
+ return this.tabs?.find((tab) => tab.permalinkValueOrDefault === paramValue)?.tabIndex;
2163
+ }
2164
+ return undefined;
2165
+ }
2166
+ return undefined;
2167
+ }, _SkyTabsetComponent_getActiveTabComponent = function _SkyTabsetComponent_getActiveTabComponent() {
2168
+ return this.tabs
2169
+ ?.toArray()
2170
+ .reverse()
2171
+ .find((tab) => tab.active === true);
2172
+ }, _SkyTabsetComponent_createTabButtons = function _SkyTabsetComponent_createTabButtons(activeIndex) {
2173
+ // Safety check
2174
+ /* istanbul ignore next */
2175
+ if (!this.tabs) {
2176
+ return [];
2177
+ }
2178
+ return this.tabs.map((tab, index) => ({
2179
+ active: __classPrivateFieldGet(this, _SkyTabsetComponent_tabsetService, "f").tabIndexesEqual(tab.tabIndex, activeIndex),
2180
+ closeable: tab.isCloseable(),
2181
+ ariaControls: tab.tabPanelId,
2182
+ disabled: tab.disabled,
2183
+ buttonHref: tab.disabled
2184
+ ? null
2185
+ : __classPrivateFieldGet(this, _SkyTabsetComponent_permalinkService, "f").getParamHref(this.permalinkId, tab.permalinkValueOrDefault),
2186
+ buttonId: tab.tabButtonId,
2187
+ buttonTextCount: tab.tabHeaderCount,
2188
+ buttonText: tab.tabHeading,
2189
+ tabIndex: tab.tabIndex,
2190
+ tabNumber: index + 1,
2191
+ totalTabsCount: this.tabs.length,
2192
+ }));
2193
+ }, _SkyTabsetComponent_updateTabButtons = function _SkyTabsetComponent_updateTabButtons(activeIndex) {
2194
+ this.tabButtons.forEach((button) => {
2195
+ button.active = __classPrivateFieldGet(this, _SkyTabsetComponent_tabsetService, "f").tabIndexesEqual(button.tabIndex, activeIndex);
2196
+ });
2197
+ }, _SkyTabsetComponent_updateTabsetComponent = function _SkyTabsetComponent_updateTabsetComponent(activeIndex, regenerateTabButtons = false) {
2198
+ // Activate/deactivate tab components.
2199
+ this.tabs?.forEach((tab) => {
2200
+ __classPrivateFieldGet(this, _SkyTabsetComponent_tabsetService, "f").tabIndexesEqual(tab.tabIndex, activeIndex)
2201
+ ? tab.activate()
2202
+ : tab.deactivate();
2203
+ });
2204
+ // Update the tab button models.
2205
+ if (regenerateTabButtons || !this.tabButtons.length) {
2206
+ this.tabButtons = __classPrivateFieldGet(this, _SkyTabsetComponent_instances, "m", _SkyTabsetComponent_createTabButtons).call(this, activeIndex);
1947
2207
  }
1948
- updateTabButtons(activeIndex) {
1949
- this.tabButtons.forEach((button) => {
1950
- button.active = this.tabsetService.tabIndexesEqual(button.tabIndex, activeIndex);
1951
- });
1952
- }
1953
- /**
1954
- * Updates the UI and state of the tabset component after the tab index or
1955
- * tab components have changed.
1956
- * @param activeIndex The currently active tab index.
1957
- * @param regenerateTabButtons Indicates if tab button view models should be regenerated.
1958
- * Setting this value to `false` will simply update the existing tab buttons. Setting this value
1959
- * to `true` is only necessary when the underlying tab components have changed and the tab
1960
- * buttons must reflect those changes.
1961
- */
1962
- updateTabsetComponent(activeIndex, regenerateTabButtons = false) {
1963
- // Activate/deactivate tab components.
1964
- this.tabs.forEach((tab) => {
1965
- this.tabsetService.tabIndexesEqual(tab.tabIndex, activeIndex)
1966
- ? tab.activate()
1967
- : tab.deactivate();
1968
- });
1969
- // Update the tab button models.
1970
- if (regenerateTabButtons || !this.tabButtons.length) {
1971
- this.tabButtons = this.createTabButtons(activeIndex);
1972
- }
1973
- else {
1974
- this.updateTabButtons(activeIndex);
1975
- }
1976
- // Update the dropdown trigger button text.
1977
- this.dropdownTriggerButtonText = this.tabButtons.find((b) => {
1978
- return this.tabsetService.tabIndexesEqual(b.tabIndex, activeIndex);
1979
- })?.buttonText;
1980
- // Set the query params based on active tab.
1981
- if (this.permalinkId) {
1982
- const activeTabComponent = this.tabs.find((tab) => {
1983
- return this.tabsetService.tabIndexesEqual(tab.tabIndex, activeIndex);
1984
- });
1985
- this.permalinkService.setParam(this.permalinkId, activeTabComponent.permalinkValue);
1986
- }
1987
- // Wait for tab button view models to render before gauging dimensions.
1988
- setTimeout(() => {
1989
- this.adapterService.detectOverflow();
2208
+ else {
2209
+ __classPrivateFieldGet(this, _SkyTabsetComponent_instances, "m", _SkyTabsetComponent_updateTabButtons).call(this, activeIndex);
2210
+ }
2211
+ // Update the dropdown trigger button text.
2212
+ this.dropdownTriggerButtonText =
2213
+ this.tabButtons.find((b) => {
2214
+ return __classPrivateFieldGet(this, _SkyTabsetComponent_tabsetService, "f").tabIndexesEqual(b.tabIndex, activeIndex);
2215
+ })?.buttonText ?? '';
2216
+ // Set the query params based on active tab.
2217
+ if (this.permalinkId) {
2218
+ const activeTabComponent = this.tabs?.find((tab) => {
2219
+ return __classPrivateFieldGet(this, _SkyTabsetComponent_tabsetService, "f").tabIndexesEqual(tab.tabIndex, activeIndex);
1990
2220
  });
1991
- this.changeDetector.markForCheck();
1992
- // Emit the new active index value to consumers.
1993
- if (this.lastActiveTabIndex !== activeIndex) {
1994
- this.lastActiveTabIndex = activeIndex;
1995
- this.activeChange.emit(activeIndex);
2221
+ if (activeTabComponent) {
2222
+ __classPrivateFieldGet(this, _SkyTabsetComponent_permalinkService, "f").setParam(this.permalinkId, activeTabComponent.permalinkValueOrDefault);
1996
2223
  }
1997
2224
  }
1998
- }
2225
+ // Wait for tab button view models to render before gauging dimensions.
2226
+ setTimeout(() => {
2227
+ __classPrivateFieldGet(this, _SkyTabsetComponent_adapterService, "f").detectOverflow();
2228
+ });
2229
+ __classPrivateFieldGet(this, _SkyTabsetComponent_changeDetector, "f").markForCheck();
2230
+ // Emit the new active index value to consumers.
2231
+ if (this.lastActiveTabIndex !== activeIndex) {
2232
+ this.lastActiveTabIndex = activeIndex;
2233
+ this.activeChange.emit(activeIndex);
2234
+ }
2235
+ };
1999
2236
  SkyTabsetComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.0", ngImport: i0, type: SkyTabsetComponent, deps: [{ token: i0.ChangeDetectorRef }, { token: i0.ElementRef }, { token: SkyTabsetAdapterService }, { token: SkyTabsetPermalinkService }, { token: SkyTabsetService }], target: i0.ɵɵFactoryTarget.Component });
2000
2237
  SkyTabsetComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.2.0", type: SkyTabsetComponent, selector: "sky-tabset", inputs: { active: "active", ariaLabel: "ariaLabel", ariaLabelledBy: "ariaLabelledBy", permalinkId: "permalinkId", tabStyle: "tabStyle" }, outputs: { activeChange: "activeChange", newTab: "newTab", openTab: "openTab", tabIndexesChange: "tabIndexesChange" }, providers: [
2001
2238
  SkyTabsetAdapterService,
@@ -2032,159 +2269,14 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.0", ngImpor
2032
2269
  args: [SkyTabComponent]
2033
2270
  }] } });
2034
2271
 
2035
- var _SkyTabsetNavButtonComponent_instances, _SkyTabsetNavButtonComponent__buttonType, _SkyTabsetNavButtonComponent__disabled, _SkyTabsetNavButtonComponent__tabset, _SkyTabsetNavButtonComponent_activeIndexNumber, _SkyTabsetNavButtonComponent_activeSkyTabIndex, _SkyTabsetNavButtonComponent_currentTabsetSub, _SkyTabsetNavButtonComponent_logger, _SkyTabsetNavButtonComponent_tabCount, _SkyTabsetNavButtonComponent_tabToSelect, _SkyTabsetNavButtonComponent_ngUnsubscribe, _SkyTabsetNavButtonComponent_updateButtonVisibility, _SkyTabsetNavButtonComponent_updateButtonProperties, _SkyTabsetNavButtonComponent_updateTabToSelect;
2036
- const buttonTypeNext = 'next';
2037
- const buttonTypePrevious = 'previous';
2038
- const buttonTypeFinish = 'finish';
2039
- class SkyTabsetNavButtonComponent {
2040
- constructor(logger) {
2041
- _SkyTabsetNavButtonComponent_instances.add(this);
2042
- this.isVisible = false;
2043
- _SkyTabsetNavButtonComponent__buttonType.set(this, void 0);
2044
- _SkyTabsetNavButtonComponent__disabled.set(this, void 0);
2045
- _SkyTabsetNavButtonComponent__tabset.set(this, void 0);
2046
- _SkyTabsetNavButtonComponent_activeIndexNumber.set(this, void 0);
2047
- _SkyTabsetNavButtonComponent_activeSkyTabIndex.set(this, void 0);
2048
- _SkyTabsetNavButtonComponent_currentTabsetSub.set(this, void 0);
2049
- _SkyTabsetNavButtonComponent_logger.set(this, void 0);
2050
- _SkyTabsetNavButtonComponent_tabCount.set(this, void 0);
2051
- _SkyTabsetNavButtonComponent_tabToSelect.set(this, void 0);
2052
- _SkyTabsetNavButtonComponent_ngUnsubscribe.set(this, new Subject());
2053
- __classPrivateFieldSet(this, _SkyTabsetNavButtonComponent_logger, logger, "f");
2054
- }
2055
- /**
2056
- * Specifies the tabset wizard component to associate with the nav button.
2057
- * @required
2058
- */
2059
- get tabset() {
2060
- return __classPrivateFieldGet(this, _SkyTabsetNavButtonComponent__tabset, "f");
2061
- }
2062
- set tabset(value) {
2063
- __classPrivateFieldSet(this, _SkyTabsetNavButtonComponent__tabset, value, "f");
2064
- if (__classPrivateFieldGet(this, _SkyTabsetNavButtonComponent_currentTabsetSub, "f")) {
2065
- __classPrivateFieldGet(this, _SkyTabsetNavButtonComponent_currentTabsetSub, "f").unsubscribe();
2066
- }
2067
- if (value) {
2068
- __classPrivateFieldSet(this, _SkyTabsetNavButtonComponent_currentTabsetSub, __classPrivateFieldGet(this, _SkyTabsetNavButtonComponent__tabset, "f").activeChange
2069
- .pipe(distinctUntilChanged(), takeUntil(__classPrivateFieldGet(this, _SkyTabsetNavButtonComponent_ngUnsubscribe, "f")))
2070
- .subscribe((index) => {
2071
- __classPrivateFieldSet(this, _SkyTabsetNavButtonComponent_activeSkyTabIndex, index, "f");
2072
- __classPrivateFieldSet(this, _SkyTabsetNavButtonComponent_tabCount, __classPrivateFieldGet(this, _SkyTabsetNavButtonComponent__tabset, "f").tabs.length, "f");
2073
- __classPrivateFieldGet(this, _SkyTabsetNavButtonComponent_instances, "m", _SkyTabsetNavButtonComponent_updateTabToSelect).call(this);
2074
- __classPrivateFieldGet(this, _SkyTabsetNavButtonComponent_instances, "m", _SkyTabsetNavButtonComponent_updateButtonVisibility).call(this);
2075
- __classPrivateFieldGet(this, _SkyTabsetNavButtonComponent_instances, "m", _SkyTabsetNavButtonComponent_updateButtonProperties).call(this);
2076
- }), "f");
2077
- }
2078
- else {
2079
- __classPrivateFieldGet(this, _SkyTabsetNavButtonComponent_logger, "f").error('The SkyTabsetNavButtonComponent requires a reference to the SkyTabsetComponent it controls.');
2080
- }
2081
- }
2082
- /**
2083
- * Specifies the type of nav button to include.
2084
- * @required
2085
- */
2086
- get buttonType() {
2087
- return __classPrivateFieldGet(this, _SkyTabsetNavButtonComponent__buttonType, "f");
2088
- }
2089
- set buttonType(value) {
2090
- __classPrivateFieldSet(this, _SkyTabsetNavButtonComponent__buttonType, value, "f");
2091
- __classPrivateFieldGet(this, _SkyTabsetNavButtonComponent_instances, "m", _SkyTabsetNavButtonComponent_updateTabToSelect).call(this);
2092
- __classPrivateFieldGet(this, _SkyTabsetNavButtonComponent_instances, "m", _SkyTabsetNavButtonComponent_updateButtonProperties).call(this);
2093
- __classPrivateFieldGet(this, _SkyTabsetNavButtonComponent_instances, "m", _SkyTabsetNavButtonComponent_updateButtonVisibility).call(this);
2094
- if (value === buttonTypeFinish) {
2095
- this.type = 'submit';
2096
- }
2097
- else {
2098
- this.type = 'button';
2099
- }
2100
- }
2101
- /**
2102
- * Indicates whether to disable the nav button.
2103
- * Defaults to the disabled state of the next tab for `next`, the existence of a previous tab for `previous`,
2104
- * and false for `finish`.
2105
- */
2106
- set disabled(value) {
2107
- __classPrivateFieldSet(this, _SkyTabsetNavButtonComponent__disabled, value, "f");
2108
- }
2109
- get disabled() {
2110
- if (__classPrivateFieldGet(this, _SkyTabsetNavButtonComponent__disabled, "f") !== undefined) {
2111
- return __classPrivateFieldGet(this, _SkyTabsetNavButtonComponent__disabled, "f");
2112
- }
2113
- else if (this.buttonType === buttonTypeFinish) {
2114
- return false;
2115
- }
2116
- return !__classPrivateFieldGet(this, _SkyTabsetNavButtonComponent_tabToSelect, "f") || __classPrivateFieldGet(this, _SkyTabsetNavButtonComponent_tabToSelect, "f").disabled;
2117
- }
2118
- ngOnDestroy() {
2119
- __classPrivateFieldGet(this, _SkyTabsetNavButtonComponent_ngUnsubscribe, "f").next();
2120
- __classPrivateFieldGet(this, _SkyTabsetNavButtonComponent_ngUnsubscribe, "f").complete();
2121
- }
2122
- buttonClick() {
2123
- /* istanbul ignore else */
2124
- if (__classPrivateFieldGet(this, _SkyTabsetNavButtonComponent_tabToSelect, "f") && !__classPrivateFieldGet(this, _SkyTabsetNavButtonComponent_tabToSelect, "f").disabled) {
2125
- this.tabset.active = __classPrivateFieldGet(this, _SkyTabsetNavButtonComponent_tabToSelect, "f").tabIndex;
2126
- }
2127
- }
2128
- }
2129
- _SkyTabsetNavButtonComponent__buttonType = new WeakMap(), _SkyTabsetNavButtonComponent__disabled = new WeakMap(), _SkyTabsetNavButtonComponent__tabset = new WeakMap(), _SkyTabsetNavButtonComponent_activeIndexNumber = new WeakMap(), _SkyTabsetNavButtonComponent_activeSkyTabIndex = new WeakMap(), _SkyTabsetNavButtonComponent_currentTabsetSub = new WeakMap(), _SkyTabsetNavButtonComponent_logger = new WeakMap(), _SkyTabsetNavButtonComponent_tabCount = new WeakMap(), _SkyTabsetNavButtonComponent_tabToSelect = new WeakMap(), _SkyTabsetNavButtonComponent_ngUnsubscribe = new WeakMap(), _SkyTabsetNavButtonComponent_instances = new WeakSet(), _SkyTabsetNavButtonComponent_updateButtonVisibility = function _SkyTabsetNavButtonComponent_updateButtonVisibility() {
2130
- const isLastStep = __classPrivateFieldGet(this, _SkyTabsetNavButtonComponent_activeIndexNumber, "f") === __classPrivateFieldGet(this, _SkyTabsetNavButtonComponent_tabCount, "f") - 1;
2131
- if (this.buttonType === buttonTypeFinish) {
2132
- this.isVisible = isLastStep;
2133
- }
2134
- else if (this.buttonType === buttonTypeNext) {
2135
- this.isVisible = !isLastStep;
2136
- }
2137
- else {
2138
- this.isVisible = true;
2139
- }
2140
- }, _SkyTabsetNavButtonComponent_updateButtonProperties = function _SkyTabsetNavButtonComponent_updateButtonProperties() {
2141
- if (this.buttonType === buttonTypeNext ||
2142
- this.buttonType === buttonTypeFinish) {
2143
- this.buttonClassName = 'sky-btn-primary';
2144
- }
2145
- else {
2146
- this.buttonClassName = 'sky-btn-default';
2147
- }
2148
- this.ariaControls = __classPrivateFieldGet(this, _SkyTabsetNavButtonComponent_tabToSelect, "f")?.tabPanelId;
2149
- }, _SkyTabsetNavButtonComponent_updateTabToSelect = function _SkyTabsetNavButtonComponent_updateTabToSelect() {
2150
- if (this.tabset?.tabs) {
2151
- const tabs = this.tabset.tabs.toArray();
2152
- __classPrivateFieldSet(this, _SkyTabsetNavButtonComponent_tabToSelect, undefined, "f");
2153
- // tab index can be a number or a string, but we need the actual number index
2154
- __classPrivateFieldSet(this, _SkyTabsetNavButtonComponent_activeIndexNumber, tabs.findIndex((tab) => tab.tabIndex === __classPrivateFieldGet(this, _SkyTabsetNavButtonComponent_activeSkyTabIndex, "f")), "f");
2155
- /* istanbul ignore else */
2156
- if (__classPrivateFieldGet(this, _SkyTabsetNavButtonComponent_activeIndexNumber, "f") !== undefined) {
2157
- if (this.buttonType === buttonTypeNext) {
2158
- __classPrivateFieldSet(this, _SkyTabsetNavButtonComponent_tabToSelect, tabs[__classPrivateFieldGet(this, _SkyTabsetNavButtonComponent_activeIndexNumber, "f") + 1], "f");
2159
- }
2160
- else if (this.buttonType === buttonTypePrevious) {
2161
- __classPrivateFieldSet(this, _SkyTabsetNavButtonComponent_tabToSelect, tabs[__classPrivateFieldGet(this, _SkyTabsetNavButtonComponent_activeIndexNumber, "f") - 1], "f");
2162
- }
2163
- }
2164
- }
2165
- };
2166
- SkyTabsetNavButtonComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.0", ngImport: i0, type: SkyTabsetNavButtonComponent, deps: [{ token: i1.SkyLogService }], target: i0.ɵɵFactoryTarget.Component });
2167
- SkyTabsetNavButtonComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.2.0", type: SkyTabsetNavButtonComponent, selector: "sky-tabset-nav-button", inputs: { tabset: "tabset", buttonType: "buttonType", buttonText: "buttonText", disabled: "disabled" }, ngImport: i0, template: "<button\n *ngIf=\"isVisible\"\n class=\"sky-btn sky-margin-inline-sm\"\n [attr.aria-controls]=\"ariaControls\"\n [disabled]=\"disabled\"\n [ngClass]=\"buttonClassName\"\n [type]=\"type\"\n (click)=\"buttonType === 'finish' ? null : buttonClick()\"\n>\n {{ buttonText || ('skyux_tabs_navigator_' + buttonType | skyLibResources) }}\n</button>\n", dependencies: [{ kind: "directive", type: i4.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i4.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "pipe", type: i3.SkyLibResourcesPipe, name: "skyLibResources" }] });
2168
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.0", ngImport: i0, type: SkyTabsetNavButtonComponent, decorators: [{
2169
- type: Component,
2170
- args: [{ selector: 'sky-tabset-nav-button', template: "<button\n *ngIf=\"isVisible\"\n class=\"sky-btn sky-margin-inline-sm\"\n [attr.aria-controls]=\"ariaControls\"\n [disabled]=\"disabled\"\n [ngClass]=\"buttonClassName\"\n [type]=\"type\"\n (click)=\"buttonType === 'finish' ? null : buttonClick()\"\n>\n {{ buttonText || ('skyux_tabs_navigator_' + buttonType | skyLibResources) }}\n</button>\n" }]
2171
- }], ctorParameters: function () { return [{ type: i1.SkyLogService }]; }, propDecorators: { tabset: [{
2172
- type: Input
2173
- }], buttonType: [{
2174
- type: Input
2175
- }], buttonText: [{
2176
- type: Input
2177
- }], disabled: [{
2178
- type: Input
2179
- }] } });
2180
-
2181
2272
  class SkyTabsModule {
2182
2273
  }
2183
2274
  SkyTabsModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.0", ngImport: i0, type: SkyTabsModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
2184
2275
  SkyTabsModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "14.2.0", ngImport: i0, type: SkyTabsModule, declarations: [SkyTabButtonComponent,
2185
2276
  SkyTabComponent,
2186
2277
  SkyTabsetComponent,
2187
- SkyTabsetNavButtonComponent], imports: [CommonModule,
2278
+ SkyTabsetNavButtonComponent,
2279
+ SkyTabsetNavButtonDisabledPipe], imports: [CommonModule,
2188
2280
  RouterModule,
2189
2281
  SkyDropdownModule,
2190
2282
  SkyI18nModule,
@@ -2206,6 +2298,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.0", ngImpor
2206
2298
  SkyTabComponent,
2207
2299
  SkyTabsetComponent,
2208
2300
  SkyTabsetNavButtonComponent,
2301
+ SkyTabsetNavButtonDisabledPipe,
2209
2302
  ],
2210
2303
  imports: [
2211
2304
  CommonModule,