@alauda/ui 6.0.4-beta.7 → 6.0.4-beta.8

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.
@@ -8023,6 +8023,7 @@
8023
8023
  { type: TabContextService }
8024
8024
  ]; };
8025
8025
  TabComponent.propDecorators = {
8026
+ name: [{ type: i0.Input }],
8026
8027
  textLabel: [{ type: i0.Input, args: ['label',] }],
8027
8028
  closeable: [{ type: i0.Input }],
8028
8029
  disabled: [{ type: i0.Input }],
@@ -8048,15 +8049,17 @@
8048
8049
  this._tabsSubscription = rxjs.Subscription.EMPTY;
8049
8050
  /** Subscription to changes in the tab labels. */
8050
8051
  this._tabLabelSubscription = rxjs.Subscription.EMPTY;
8052
+ this._selectedIndex = null;
8053
+ this._tab = null;
8051
8054
  this._type = TabType.Line;
8052
8055
  this._size = TabSize.Medium;
8053
8056
  /** Emits whenever the type changes */
8054
8057
  this._typeChange = new rxjs.Subject();
8055
8058
  /** Emits whenever the size changes */
8056
8059
  this._sizeChange = new rxjs.Subject();
8057
- this._selectedIndex = null;
8058
8060
  /** Output to enable support for two-way binding on `[(selectedIndex)]` */
8059
8061
  this.selectedIndexChange = new i0.EventEmitter();
8062
+ this.tabChange = new i0.EventEmitter();
8060
8063
  /** Event emitted when the tab selection has changed. */
8061
8064
  this.selectedTabChange = new i0.EventEmitter(true);
8062
8065
  /** Event emitted when focus has changed within a tab group. */
@@ -8075,6 +8078,21 @@
8075
8078
  enumerable: false,
8076
8079
  configurable: true
8077
8080
  });
8081
+ Object.defineProperty(TabGroupComponent.prototype, "tab", {
8082
+ get: function () {
8083
+ return this._tab;
8084
+ },
8085
+ set: function (value) {
8086
+ this.selectedIndex = this._tabs
8087
+ .toArray()
8088
+ .findIndex(function (_b) {
8089
+ var name = _b.name;
8090
+ return name === value;
8091
+ });
8092
+ },
8093
+ enumerable: false,
8094
+ configurable: true
8095
+ });
8078
8096
  Object.defineProperty(TabGroupComponent.prototype, "type", {
8079
8097
  get: function () {
8080
8098
  return this._type;
@@ -8152,7 +8170,10 @@
8152
8170
  this.selectedTabChange.emit(tabChangeEvent);
8153
8171
  // Emitting this value after change detection has run
8154
8172
  // since the checked content may contain this variable'
8155
- Promise.resolve().then(function () { return _this.selectedIndexChange.emit(indexToSelect); });
8173
+ Promise.resolve().then(function () {
8174
+ _this.selectedIndexChange.emit(indexToSelect);
8175
+ _this.tabChange.emit(_this._tabs.get(indexToSelect).name);
8176
+ });
8156
8177
  }
8157
8178
  // Setup the position for each tab and optionally setup an origin on the next selected tab.
8158
8179
  this._tabs.forEach(function (tab, index) {
@@ -8309,11 +8330,13 @@
8309
8330
  _tabHeader: [{ type: i0.ViewChild, args: [TabHeaderComponent, { static: false },] }],
8310
8331
  _tabTitle: [{ type: i0.ContentChild, args: [TabTitleDirective, { static: false },] }],
8311
8332
  selectedIndex: [{ type: i0.Input }],
8333
+ tab: [{ type: i0.Input }],
8312
8334
  type: [{ type: i0.Input }],
8313
8335
  title: [{ type: i0.Input }],
8314
8336
  size: [{ type: i0.Input }],
8315
8337
  lazy: [{ type: i0.Input }],
8316
8338
  selectedIndexChange: [{ type: i0.Output }],
8339
+ tabChange: [{ type: i0.Output }],
8317
8340
  selectedTabChange: [{ type: i0.Output }],
8318
8341
  focusChange: [{ type: i0.Output }]
8319
8342
  };