@forgeroute/ui 0.4.89 → 0.4.90

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.
@@ -70651,6 +70651,7 @@ var KanbanBoardComponent = class KanbanBoardComponent {
70651
70651
  this.emptyText = computed(() => this.emptyTextInput() ?? this.labels.t("kanban.emptyColumnText"), ...ngDevMode ? [{ debugName: "emptyText" }] : /* istanbul ignore next */ []);
70652
70652
  this.cardMove = output();
70653
70653
  this.cardClick = output();
70654
+ this.columnMore = output();
70654
70655
  this.card = contentChild(KanbanCardDirective, ...ngDevMode ? [{ debugName: "card" }] : /* istanbul ignore next */ []);
70655
70656
  this.hintId = `kb-hint-${nextBoardId++}`;
70656
70657
  this.pickUpKeys = "Space";
@@ -70689,12 +70690,16 @@ var KanbanBoardComponent = class KanbanBoardComponent {
70689
70690
  }
70690
70691
  }
70691
70692
  const hidden = list.length - limit;
70693
+ const remaining = Math.max(0, Math.floor(col.remaining ?? 0));
70692
70694
  return {
70693
70695
  col,
70694
70696
  list,
70695
70697
  shown: hidden > 0 ? list.slice(0, limit) : list,
70696
70698
  hidden,
70697
- next: Math.min(size, hidden)
70699
+ next: Math.min(size, hidden),
70700
+ remaining,
70701
+ count: list.length + remaining,
70702
+ nextRemote: Math.min(remaining, Math.max(1, Math.floor(col.nextCount ?? (size > 0 ? size : remaining))))
70698
70703
  };
70699
70704
  });
70700
70705
  }, ...ngDevMode ? [{ debugName: "views" }] : /* istanbul ignore next */ []);
@@ -70806,6 +70811,10 @@ var KanbanBoardComponent = class KanbanBoardComponent {
70806
70811
  const slot = this.slot();
70807
70812
  return !!slot && slot.col === colKey && slot.beforeKey === beforeKey;
70808
70813
  }
70814
+ loadMore(col) {
70815
+ if (col.loadingMore) return;
70816
+ this.columnMore.emit(col.key);
70817
+ }
70809
70818
  showMore(colKey) {
70810
70819
  const size = Math.floor(this.pageSize());
70811
70820
  const view = this.views().find((v) => v.col.key === colKey);
@@ -71399,7 +71408,8 @@ var KanbanBoardComponent = class KanbanBoardComponent {
71399
71408
  },
71400
71409
  outputs: {
71401
71410
  cardMove: "cardMove",
71402
- cardClick: "cardClick"
71411
+ cardClick: "cardClick",
71412
+ columnMore: "columnMore"
71403
71413
  },
71404
71414
  queries: [{
71405
71415
  propertyName: "card",
@@ -71431,7 +71441,7 @@ var KanbanBoardComponent = class KanbanBoardComponent {
71431
71441
  [class.kb-col--blocked]="isBlocked(col.key)"
71432
71442
  [attr.data-kb-col]="col.key"
71433
71443
  [attr.aria-disabled]="isBlocked(col.key) ? 'true' : null"
71434
- [attr.aria-label]="columnLabel(col, view.list.length)">
71444
+ [attr.aria-label]="columnLabel(col, view.count)">
71435
71445
  <div class="kb-col__header">
71436
71446
  <span class="kb-col__dot" [style.background]="dot(col.color)" aria-hidden="true"></span>
71437
71447
  <span class="kb-col__title">{{ col.label }}</span>
@@ -71439,10 +71449,10 @@ var KanbanBoardComponent = class KanbanBoardComponent {
71439
71449
  <span class="kb-col__prob" aria-hidden="true">{{ percent(col.probability) }}</span>
71440
71450
  <span class="kb-sr">{{ labels.t('kanban.probability', { percent: percent(col.probability) }) }}</span>
71441
71451
  }
71442
- <span class="kb-col__count" aria-hidden="true">{{ view.list.length }}</span>
71452
+ <span class="kb-col__count" aria-hidden="true">{{ view.count }}</span>
71443
71453
  @if (isBlocked(col.key)) { <span class="kb-col__blocked">{{ labels.t('kanban.blocked') }}</span> }
71444
71454
  </div>
71445
- <div class="kb-col__cards" [attr.role]="view.list.length ? 'list' : null">
71455
+ <div class="kb-col__cards" [attr.role]="view.list.length || view.remaining > 0 ? 'list' : null">
71446
71456
  @for (item of view.shown; track cardId()(item); let i = $index) {
71447
71457
  @let key = cardId()(item);
71448
71458
  @if (slotBefore(col.key, key)) { <div class="kb-slot" aria-hidden="true"></div> }
@@ -71488,7 +71498,13 @@ var KanbanBoardComponent = class KanbanBoardComponent {
71488
71498
  [ariaLabel]="labels.t('kanban.showMore', { next: view.next, hidden: view.hidden }) + ', ' + col.label">{{ labels.t('kanban.showMore', { next: view.next, hidden: view.hidden }) }}</ui-button>
71489
71499
  </div>
71490
71500
  }
71491
- @if (view.list.length === 0 && !slotBefore(col.key, null)) {
71501
+ @if (view.hidden === 0 && view.remaining > 0) {
71502
+ <div class="kb-more kb-more--server" role="listitem">
71503
+ <ui-button variant="secondary" size="sm" [fullWidth]="true" [loading]="!!col.loadingMore" (click)="loadMore(col)"
71504
+ [ariaLabel]="labels.t('kanban.showMore', { next: view.nextRemote, hidden: view.remaining }) + ', ' + col.label">{{ labels.t('kanban.showMore', { next: view.nextRemote, hidden: view.remaining }) }}</ui-button>
71505
+ </div>
71506
+ }
71507
+ @if (view.list.length === 0 && view.remaining === 0 && !slotBefore(col.key, null)) {
71492
71508
  <div class="kb-col__empty" role="status">{{ col.emptyText || emptyText() }}</div>
71493
71509
  }
71494
71510
  </div>
@@ -71596,7 +71612,7 @@ i0.ɵɵngDeclareClassMetadata({
71596
71612
  [class.kb-col--blocked]="isBlocked(col.key)"
71597
71613
  [attr.data-kb-col]="col.key"
71598
71614
  [attr.aria-disabled]="isBlocked(col.key) ? 'true' : null"
71599
- [attr.aria-label]="columnLabel(col, view.list.length)">
71615
+ [attr.aria-label]="columnLabel(col, view.count)">
71600
71616
  <div class="kb-col__header">
71601
71617
  <span class="kb-col__dot" [style.background]="dot(col.color)" aria-hidden="true"></span>
71602
71618
  <span class="kb-col__title">{{ col.label }}</span>
@@ -71604,10 +71620,10 @@ i0.ɵɵngDeclareClassMetadata({
71604
71620
  <span class="kb-col__prob" aria-hidden="true">{{ percent(col.probability) }}</span>
71605
71621
  <span class="kb-sr">{{ labels.t('kanban.probability', { percent: percent(col.probability) }) }}</span>
71606
71622
  }
71607
- <span class="kb-col__count" aria-hidden="true">{{ view.list.length }}</span>
71623
+ <span class="kb-col__count" aria-hidden="true">{{ view.count }}</span>
71608
71624
  @if (isBlocked(col.key)) { <span class="kb-col__blocked">{{ labels.t('kanban.blocked') }}</span> }
71609
71625
  </div>
71610
- <div class="kb-col__cards" [attr.role]="view.list.length ? 'list' : null">
71626
+ <div class="kb-col__cards" [attr.role]="view.list.length || view.remaining > 0 ? 'list' : null">
71611
71627
  @for (item of view.shown; track cardId()(item); let i = $index) {
71612
71628
  @let key = cardId()(item);
71613
71629
  @if (slotBefore(col.key, key)) { <div class="kb-slot" aria-hidden="true"></div> }
@@ -71653,7 +71669,13 @@ i0.ɵɵngDeclareClassMetadata({
71653
71669
  [ariaLabel]="labels.t('kanban.showMore', { next: view.next, hidden: view.hidden }) + ', ' + col.label">{{ labels.t('kanban.showMore', { next: view.next, hidden: view.hidden }) }}</ui-button>
71654
71670
  </div>
71655
71671
  }
71656
- @if (view.list.length === 0 && !slotBefore(col.key, null)) {
71672
+ @if (view.hidden === 0 && view.remaining > 0) {
71673
+ <div class="kb-more kb-more--server" role="listitem">
71674
+ <ui-button variant="secondary" size="sm" [fullWidth]="true" [loading]="!!col.loadingMore" (click)="loadMore(col)"
71675
+ [ariaLabel]="labels.t('kanban.showMore', { next: view.nextRemote, hidden: view.remaining }) + ', ' + col.label">{{ labels.t('kanban.showMore', { next: view.nextRemote, hidden: view.remaining }) }}</ui-button>
71676
+ </div>
71677
+ }
71678
+ @if (view.list.length === 0 && view.remaining === 0 && !slotBefore(col.key, null)) {
71657
71679
  <div class="kb-col__empty" role="status">{{ col.emptyText || emptyText() }}</div>
71658
71680
  }
71659
71681
  </div>
@@ -71793,6 +71815,10 @@ i0.ɵɵngDeclareClassMetadata({
71793
71815
  type: i0.Output,
71794
71816
  args: ["cardClick"]
71795
71817
  }],
71818
+ columnMore: [{
71819
+ type: i0.Output,
71820
+ args: ["columnMore"]
71821
+ }],
71796
71822
  card: [{
71797
71823
  type: i0.ContentChild,
71798
71824
  args: [i0.forwardRef(() => KanbanCardDirective), { isSignal: true }]