cps-ui-kit 0.163.0 → 0.164.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/esm2020/lib/components/cps-tab-group/cps-tab-group.component.mjs +21 -15
- package/fesm2015/cps-ui-kit.mjs +20 -14
- package/fesm2015/cps-ui-kit.mjs.map +1 -1
- package/fesm2020/cps-ui-kit.mjs +20 -14
- package/fesm2020/cps-ui-kit.mjs.map +1 -1
- package/lib/components/cps-tab-group/cps-tab-group.component.d.ts +1 -1
- package/package.json +1 -1
package/fesm2020/cps-ui-kit.mjs
CHANGED
|
@@ -10195,7 +10195,7 @@ class CpsTabGroupComponent {
|
|
|
10195
10195
|
}
|
|
10196
10196
|
}
|
|
10197
10197
|
ngAfterContentInit() {
|
|
10198
|
-
this.selectTab();
|
|
10198
|
+
this.selectTab(true);
|
|
10199
10199
|
}
|
|
10200
10200
|
ngAfterViewInit() {
|
|
10201
10201
|
this._updateNavBtnsState();
|
|
@@ -10215,7 +10215,7 @@ class CpsTabGroupComponent {
|
|
|
10215
10215
|
this.selectedIndex = index;
|
|
10216
10216
|
this.selectTab();
|
|
10217
10217
|
}
|
|
10218
|
-
selectTab() {
|
|
10218
|
+
selectTab(silent = false) {
|
|
10219
10219
|
const _tabs = this.tabs.toArray();
|
|
10220
10220
|
const currentSelectedTab = _tabs && _tabs[this._previousTabIndex];
|
|
10221
10221
|
currentSelectedTab && (currentSelectedTab.active = false);
|
|
@@ -10224,28 +10224,34 @@ class CpsTabGroupComponent {
|
|
|
10224
10224
|
if (this._currentTabIndex === this._previousTabIndex) {
|
|
10225
10225
|
return;
|
|
10226
10226
|
}
|
|
10227
|
-
|
|
10228
|
-
|
|
10229
|
-
|
|
10230
|
-
|
|
10227
|
+
if (!silent) {
|
|
10228
|
+
this.beforeTabChanged.emit({
|
|
10229
|
+
previousIndex: this._previousTabIndex,
|
|
10230
|
+
newIndex: this._currentTabIndex
|
|
10231
|
+
});
|
|
10232
|
+
}
|
|
10231
10233
|
if (this.animationType === 'slide') {
|
|
10232
10234
|
this.animationState =
|
|
10233
10235
|
this._currentTabIndex < this._previousTabIndex
|
|
10234
10236
|
? 'slideLeft'
|
|
10235
10237
|
: 'slideRight';
|
|
10236
|
-
|
|
10237
|
-
|
|
10238
|
-
|
|
10239
|
-
|
|
10238
|
+
if (!silent) {
|
|
10239
|
+
this.afterTabChanged.emit({
|
|
10240
|
+
previousIndex: this._previousTabIndex,
|
|
10241
|
+
newIndex: this._currentTabIndex
|
|
10242
|
+
});
|
|
10243
|
+
}
|
|
10240
10244
|
}
|
|
10241
10245
|
else if (this.animationType === 'fade') {
|
|
10242
10246
|
this.animationState = 'fadeOut';
|
|
10243
10247
|
setTimeout(() => {
|
|
10244
10248
|
this.animationState = 'fadeIn';
|
|
10245
|
-
|
|
10246
|
-
|
|
10247
|
-
|
|
10248
|
-
|
|
10249
|
+
if (!silent) {
|
|
10250
|
+
this.afterTabChanged.emit({
|
|
10251
|
+
previousIndex: this._previousTabIndex,
|
|
10252
|
+
newIndex: this._currentTabIndex
|
|
10253
|
+
});
|
|
10254
|
+
}
|
|
10249
10255
|
}, 100);
|
|
10250
10256
|
}
|
|
10251
10257
|
}
|