codexly-ui 0.10.20 → 0.10.22

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.
@@ -3898,7 +3898,7 @@ class ClxSelectComponent {
3898
3898
  }, ...(ngDevMode ? [{ debugName: "_singleDisplayClass" }] : /* istanbul ignore next */ []));
3899
3899
  _tagContainerClass = computed(() => {
3900
3900
  const s = this._sizeConfig();
3901
- return `flex flex-wrap flex-1 items-center ${s.py} pl-3 pr-10 ${s.gap}`;
3901
+ return `flex flex-wrap flex-1 items-center min-w-0 ${s.py} pl-3 ${s.gap}`;
3902
3902
  }, ...(ngDevMode ? [{ debugName: "_tagContainerClass" }] : /* istanbul ignore next */ []));
3903
3903
  _placeholderClass = computed(() => `${this._sizeConfig().text} ${CLX_TEXT_IDLE}`, ...(ngDevMode ? [{ debugName: "_placeholderClass" }] : /* istanbul ignore next */ []));
3904
3904
  _chevronBtnClass = computed(() => this._isOpen() ? 'transition-transform duration-200 rotate-180' : 'transition-transform duration-200', ...(ngDevMode ? [{ debugName: "_chevronBtnClass" }] : /* istanbul ignore next */ []));
@@ -4059,8 +4059,10 @@ class ClxSelectComponent {
4059
4059
  <span [class]="_singleDisplayClass()" [style.font-family]="_displayFontFamily()">{{ _displayValue() }}</span>
4060
4060
  }
4061
4061
 
4062
- <!-- Right controls: clear + chevron -->
4063
- <div class="absolute right-2 top-1/2 -translate-y-1/2 flex items-center gap-0.5">
4062
+ <!-- Right controls: clear + chevron — in normal flow (not absolute) so they never overlap
4063
+ wrapped tag chips in multi mode; reserving fixed pr-* space instead couldn't account
4064
+ for however many rows the chips wrap into. -->
4065
+ <div class="shrink-0 flex items-center gap-0.5 pr-2">
4064
4066
  @if (_hasValue() && !_disabled() && multiple()) {
4065
4067
  <button
4066
4068
  clx-button
@@ -4208,8 +4210,10 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.15", ngImpo
4208
4210
  <span [class]="_singleDisplayClass()" [style.font-family]="_displayFontFamily()">{{ _displayValue() }}</span>
4209
4211
  }
4210
4212
 
4211
- <!-- Right controls: clear + chevron -->
4212
- <div class="absolute right-2 top-1/2 -translate-y-1/2 flex items-center gap-0.5">
4213
+ <!-- Right controls: clear + chevron — in normal flow (not absolute) so they never overlap
4214
+ wrapped tag chips in multi mode; reserving fixed pr-* space instead couldn't account
4215
+ for however many rows the chips wrap into. -->
4216
+ <div class="shrink-0 flex items-center gap-0.5 pr-2">
4213
4217
  @if (_hasValue() && !_disabled() && multiple()) {
4214
4218
  <button
4215
4219
  clx-button
@@ -13175,6 +13179,13 @@ class ClxTableComponent {
13175
13179
  const start = this.pageIndex() * this.pageSize();
13176
13180
  return filtered.slice(start, start + this.pageSize());
13177
13181
  }, ...(ngDevMode ? [{ debugName: "_paginatedData" }] : /* istanbul ignore next */ []));
13182
+ /** The `index` passed into a cell template must refer to the row's position in the original
13183
+ * `data()` array the consumer owns (e.g. to splice/edit it directly) — never the position
13184
+ * within the current page, which silently gave every page's first row index 0 and broke
13185
+ * edit/remove handlers built around `data()[index]` as soon as a second page existed. */
13186
+ _absoluteIndex(item) {
13187
+ return this.data().indexOf(item);
13188
+ }
13178
13189
  _totalItems = computed(() => this.serverSide() ? (this.totalItems() ?? this.data().length) : this._filteredData().length, ...(ngDevMode ? [{ debugName: "_totalItems" }] : /* istanbul ignore next */ []));
13179
13190
  _emptyTitle = computed(() => this.emptyTitle() || (this.searchQuery() ? 'Sin resultados' : 'No hay datos'), ...(ngDevMode ? [{ debugName: "_emptyTitle" }] : /* istanbul ignore next */ []));
13180
13191
  _emptyDescription = computed(() => this.emptyDescription() ||
@@ -13346,7 +13357,7 @@ class ClxTableComponent {
13346
13357
  @if (_getColumnDef(col.key)?.cell()?.templateRef; as tpl) {
13347
13358
  <ng-container
13348
13359
  [ngTemplateOutlet]="tpl"
13349
- [ngTemplateOutletContext]="{ $implicit: item, index: i }">
13360
+ [ngTemplateOutletContext]="{ $implicit: item, index: _absoluteIndex(item) }">
13350
13361
  </ng-container>
13351
13362
  } @else {
13352
13363
  {{ _getCellValue(item, col.key) }}
@@ -13493,7 +13504,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.15", ngImpo
13493
13504
  @if (_getColumnDef(col.key)?.cell()?.templateRef; as tpl) {
13494
13505
  <ng-container
13495
13506
  [ngTemplateOutlet]="tpl"
13496
- [ngTemplateOutletContext]="{ $implicit: item, index: i }">
13507
+ [ngTemplateOutletContext]="{ $implicit: item, index: _absoluteIndex(item) }">
13497
13508
  </ng-container>
13498
13509
  } @else {
13499
13510
  {{ _getCellValue(item, col.key) }}