@brightspace-ui/core 2.109.0 → 2.110.1

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.
@@ -183,8 +183,7 @@ class List extends PageableMixin(SelectionMixin(LitElement)) {
183
183
  }
184
184
 
185
185
  _getItemByIndex(index) {
186
- const items = this.getItems();
187
- if (index > items.length - 1) return;
186
+ const items = this.getItems() || [];
188
187
  return items[index];
189
188
  }
190
189
 
@@ -16,6 +16,7 @@ export const PageableMixin = superclass => class extends CollectionMixin(supercl
16
16
  this._itemShowingCount = 0;
17
17
  this._pageableSubscriberRegistry = new SubscriberRegistryController(this, 'pageable', {
18
18
  onSubscribe: this._updatePageableSubscriber.bind(this),
19
+ onUnsubscribe: this._clearPageableSubscriber.bind(this),
19
20
  updateSubscribers: this._updatePageableSubscribers.bind(this)
20
21
  });
21
22
  }
@@ -33,6 +34,10 @@ export const PageableMixin = superclass => class extends CollectionMixin(supercl
33
34
  }
34
35
  }
35
36
 
37
+ _clearPageableSubscriber(subscriber) {
38
+ subscriber._pageableInfo = null;
39
+ }
40
+
36
41
  /* must be implemented by consumer */
37
42
  _getItemByIndex(index) { } // eslint-disable-line no-unused-vars
38
43
 
@@ -16,7 +16,7 @@ export const PageableSubscriberMixin = superclass => class extends superclass {
16
16
  constructor() {
17
17
  super();
18
18
 
19
- this._pageableInfo = { itemCount: null, itemShowingCount: 0 };
19
+ this._pageableInfo = null;
20
20
  this._pageableEventSubscriber = new EventSubscriberController(this, 'pageable');
21
21
  this._pageableIdSubscriber = new IdSubscriberController(this, 'pageable', { idPropertyName: 'pageableFor' });
22
22
  }
@@ -86,7 +86,7 @@ class LoadMore extends PageableSubscriberMixin(FocusMixin(LocalizeCoreElement(Li
86
86
  }
87
87
 
88
88
  render() {
89
- if (!this.hasMore) return nothing;
89
+ if (!this.hasMore || !this._pageableInfo) return nothing;
90
90
  const { itemCount, itemShowingCount } = this._pageableInfo;
91
91
 
92
92
  return html`
@@ -101,7 +101,7 @@ class LoadMore extends PageableSubscriberMixin(FocusMixin(LocalizeCoreElement(Li
101
101
  ${itemCount !== null ? html`
102
102
  <span class="d2l-offscreen">${getSeparator({ nonBreaking: true })}</span>
103
103
  <span class="separator"></span>
104
- <span class="info">${this.localize('components.pager-load-more.info', { showingCount: formatNumber(itemShowingCount), totalCount: itemCount, totalCountFormatted: formatNumber(itemCount) })}</span>
104
+ <span class="info">${this.localize('components.pageable.info-with-total', { countFormatted: formatNumber(itemShowingCount), totalCount: itemCount, totalCountFormatted: formatNumber(itemCount) })}</span>
105
105
  ` : nothing}
106
106
  `}
107
107
  </button>
@@ -1,7 +1,8 @@
1
1
  import { css, html, LitElement } from 'lit';
2
+ import { PageableMixin } from '../../paging/pageable-mixin.js';
2
3
  import { SelectionMixin } from '../selection-mixin.js';
3
4
 
4
- class DemoSelection extends SelectionMixin(LitElement) {
5
+ class DemoBase extends LitElement {
5
6
  static get styles() {
6
7
  return css`
7
8
  :host {
@@ -15,4 +16,20 @@ class DemoSelection extends SelectionMixin(LitElement) {
15
16
  `;
16
17
  }
17
18
  }
19
+
20
+ class DemoSelection extends SelectionMixin(DemoBase) {}
21
+
22
+ class DemoPageable extends PageableMixin(DemoBase) {
23
+ _getItemByIndex() {
24
+ return null;
25
+ }
26
+ _getItemShowingCount() {
27
+ return 3;
28
+ }
29
+ }
30
+
31
+ class DemoSelectionPageable extends SelectionMixin(DemoPageable) {}
32
+
18
33
  customElements.define('d2l-demo-selection', DemoSelection);
34
+ customElements.define('d2l-demo-pageable', DemoPageable);
35
+ customElements.define('d2l-demo-selection-pageable', DemoSelectionPageable);
@@ -8,6 +8,7 @@
8
8
  import '../../demo/demo-page.js';
9
9
  import '../../dropdown/dropdown-menu.js';
10
10
  import '../../menu/menu.js';
11
+ import '../../paging/pager-load-more.js';
11
12
  import '../selection-action.js';
12
13
  import '../selection-action-dropdown.js';
13
14
  import '../selection-action-menu-item.js';
@@ -93,6 +94,45 @@
93
94
  </template>
94
95
  </d2l-demo-snippet>
95
96
 
97
+ <h2>Selection controls with pageable + selection</h2>
98
+
99
+ <d2l-demo-snippet>
100
+ <template>
101
+ <d2l-demo-selection-pageable item-count="5">
102
+ <d2l-selection-controls select-all-pages-allowed>
103
+ <d2l-selection-action text="Bookmark" icon="tier1:bookmark-hollow" requires-selection></d2l-selection-action>
104
+ <d2l-selection-action text="Settings" icon="tier1:gear"></d2l-selection-action>
105
+ </d2l-selection-controls>
106
+
107
+ <ul>
108
+ <li><d2l-selection-input key="geo" label="Geography"></d2l-selection-input>Geography</li>
109
+ <li><d2l-selection-input key="sci" label="Science"></d2l-selection-input>Science</li>
110
+ <li><d2l-selection-input key="mth" label="Math"></d2l-selection-input>Math</li>
111
+ </ul>
112
+ <d2l-pager-load-more has-more page-size="1"></d2l-pager-load-more>
113
+ </d2l-demo-selection-pageable>
114
+ </template>
115
+ </d2l-demo-snippet>
116
+
117
+ <h2>Selection controls with pageable (no selection)</h2>
118
+
119
+ <d2l-demo-snippet>
120
+ <template>
121
+ <d2l-demo-pageable item-count="5">
122
+ <d2l-selection-controls>
123
+ <d2l-selection-action text="Bookmark" icon="tier1:bookmark-hollow" requires-selection></d2l-selection-action>
124
+ <d2l-selection-action text="Settings" icon="tier1:gear"></d2l-selection-action>
125
+ </d2l-selection-controls>
126
+
127
+ <ul>
128
+ <li><d2l-selection-input key="geo" label="Geography"></d2l-selection-input>Geography</li>
129
+ <li><d2l-selection-input key="sci" label="Science"></d2l-selection-input>Science</li>
130
+ <li><d2l-selection-input key="mth" label="Math"></d2l-selection-input>Math</li>
131
+ </ul>
132
+ <d2l-pager-load-more has-more page-size="1"></d2l-pager-load-more>
133
+ </d2l-demo-pageable>
134
+ </template>
135
+ </d2l-demo-snippet>
96
136
 
97
137
  <h2>No-sticky selection controls</h2>
98
138
 
@@ -120,17 +160,18 @@
120
160
  <div class="d2l-selection-collections">
121
161
  <div class="d2l-selection-collection">
122
162
  Pick Your Toppings
123
- <d2l-selection-controls selection-for="collection-1">
163
+ <d2l-selection-controls selection-for="collection-1" pageable-for="collection-1" select-all-pages-allowed>
124
164
  <d2l-selection-action selection-for="collection-1" text="Add Note" icon="tier1:add-message"></d2l-selection-action>
125
165
  </d2l-selection-controls>
126
166
 
127
- <d2l-demo-selection id="collection-1">
167
+ <d2l-demo-selection-pageable id="collection-1" item-count="5">
128
168
  <ul>
129
169
  <li><d2l-selection-input key="let" label="Lettuce" selected></d2l-selection-input>Lettuce</li>
130
170
  <li><d2l-selection-input key="tom" label="Tomato"></d2l-selection-input>Tomato</li>
131
171
  <li><d2l-selection-input key="onion" label="Onion"></d2l-selection-input>Onion</li>
132
172
  </ul>
133
- </d2l-demo-selection>
173
+ <d2l-pager-load-more has-more page-size="1"></d2l-pager-load-more>
174
+ </d2l-demo-selection-pageable>
134
175
  <d2l-selection-action selection-for="collection-1" text="Save" requires-selection></d2l-selection-action>
135
176
  </div>
136
177
 
@@ -4,8 +4,10 @@ import './selection-select-all-pages.js';
4
4
  import './selection-summary.js';
5
5
  import { css, html, LitElement, nothing } from 'lit';
6
6
  import { classMap } from 'lit/directives/class-map.js';
7
+ import { formatNumber } from '@brightspace-ui/intl/lib/number.js';
7
8
  import { ifDefined } from 'lit/directives/if-defined.js';
8
9
  import { LocalizeCoreElement } from '../../helpers/localize-core-element.js';
10
+ import { PageableSubscriberMixin } from '../paging/pageable-subscriber-mixin.js';
9
11
  import { RtlMixin } from '../../mixins/rtl/rtl-mixin.js';
10
12
  import { SelectionObserverMixin } from './selection-observer-mixin.js';
11
13
 
@@ -13,7 +15,7 @@ import { SelectionObserverMixin } from './selection-observer-mixin.js';
13
15
  * Controls for selection components (e.g. list, table-wrapper) containing select-all, etc.
14
16
  * @slot - Responsive container using `d2l-overflow-group` for `d2l-selection-action` elements
15
17
  */
16
- export class SelectionControls extends SelectionObserverMixin(RtlMixin(LocalizeCoreElement(LitElement))) {
18
+ export class SelectionControls extends PageableSubscriberMixin(SelectionObserverMixin(RtlMixin(LocalizeCoreElement(LitElement)))) {
17
19
 
18
20
  static get properties() {
19
21
  return {
@@ -33,6 +35,7 @@ export class SelectionControls extends SelectionObserverMixin(RtlMixin(LocalizeC
33
35
  */
34
36
  selectAllPagesAllowed: { type: Boolean, attribute: 'select-all-pages-allowed' },
35
37
  _hasActions: { state: true },
38
+ _noSelectionText: { state: true },
36
39
  _scrolled: { type: Boolean, reflect: true }
37
40
  };
38
41
  }
@@ -147,6 +150,18 @@ export class SelectionControls extends SelectionObserverMixin(RtlMixin(LocalizeC
147
150
  if (changedProperties.has('noSticky')) {
148
151
  this._stickyObserverUpdate();
149
152
  }
153
+ if (changedProperties.has('_pageableInfo')) {
154
+ this._noSelectionText = this._getNoSelectionText();
155
+ }
156
+ }
157
+
158
+ _getNoSelectionText() {
159
+ if (!this._pageableInfo) return null;
160
+ const { itemShowingCount: count, itemCount: totalCount } = this._pageableInfo;
161
+
162
+ return (totalCount === null || count === totalCount)
163
+ ? this.localize('components.pageable.info', { count, countFormatted: formatNumber(count) })
164
+ : this.localize('components.pageable.info-with-total', { totalCount, countFormatted: formatNumber(count), totalCountFormatted: formatNumber(totalCount) });
150
165
  }
151
166
 
152
167
  _getSelectionControlsContainerClasses() {
@@ -166,12 +181,8 @@ export class SelectionControls extends SelectionObserverMixin(RtlMixin(LocalizeC
166
181
 
167
182
  _renderSelection() {
168
183
  return html`
169
- <d2l-selection-select-all></d2l-selection-select-all>
170
- <d2l-selection-summary
171
- aria-hidden="true"
172
- no-selection-text="${this.localize('components.selection.select-all')}"
173
- >
174
- </d2l-selection-summary>
184
+ ${this._provider && !this._noSelectAll ? html`<d2l-selection-select-all></d2l-selection-select-all>` : nothing}
185
+ <d2l-selection-summary no-selection-text="${ifDefined(this._noSelectionText)}"></d2l-selection-summary>
175
186
  ${this.selectAllPagesAllowed ? html`<d2l-selection-select-all-pages></d2l-selection-select-all-pages>` : nothing}
176
187
  `;
177
188
  }
@@ -44,7 +44,7 @@ class SelectAll extends FocusMixin(LocalizeCoreElement(SelectionObserverMixin(Li
44
44
  }
45
45
 
46
46
  render() {
47
- if (this._provider && this._provider.selectionSingle) return;
47
+ if (!this._provider || this._provider.selectionSingle) return;
48
48
 
49
49
  const summary = (this.selectionInfo.state === SelectionInfo.states.none ? this.localize('components.selection.select-all')
50
50
  : this.localize('components.selection.selected', 'count', this.selectionInfo.keys.length));
@@ -50,7 +50,10 @@ class Summary extends LocalizeCoreElement(SelectionObserverMixin(LitElement)) {
50
50
  }
51
51
 
52
52
  _updateSelectSummary() {
53
- if (this._provider && this._provider.selectionSingle) return;
53
+ if (this._provider?.selectionSingle) {
54
+ this._summary = null;
55
+ return;
56
+ }
54
57
 
55
58
  let count;
56
59
  if (this._provider && this._provider.selectionCountOverride !== undefined) {
@@ -74,7 +77,7 @@ class Summary extends LocalizeCoreElement(SelectionObserverMixin(LitElement)) {
74
77
  }
75
78
  }
76
79
 
77
- count = this.selectionInfo.state === SelectionInfo.states.allPages ?
80
+ count = (this._provider && this.selectionInfo.state === SelectionInfo.states.allPages) ?
78
81
  this._provider.itemCount : this.selectionInfo.keys.length;
79
82
 
80
83
  if (this.selectionInfo.state === SelectionInfo.states.none && this.noSelectionText) {
@@ -65,8 +65,8 @@ class TestTable extends RtlMixin(DemoPassthroughMixin(TableWrapper, 'd2l-table-w
65
65
  return a.fruit[this._sortField] - b.fruit[this._sortField];
66
66
  });
67
67
  return html`
68
- <d2l-table-wrapper>
69
- <d2l-table-controls slot="controls" ?no-sticky="${!this.stickyControls}">
68
+ <d2l-table-wrapper item-count="500">
69
+ <d2l-table-controls slot="controls" ?no-sticky="${!this.stickyControls}" select-all-pages-allowed>
70
70
  <d2l-selection-action
71
71
  text="Sticky controls"
72
72
  icon="tier1:${this.stickyControls ? 'check' : 'close-default'}"
@@ -86,14 +86,16 @@ class TestTable extends RtlMixin(DemoPassthroughMixin(TableWrapper, 'd2l-table-w
86
86
  <th scope="col">Country</th>
87
87
  ${fruits.map(fruit => this._renderSortButton(fruit))}
88
88
  </tr>
89
- ${[1, 2].map(() => html`
90
- <tr>
91
- <th scope="col" sticky></th>
92
- ${thText.map(text => html`<th scope="col">${text}</th>`)}
93
- </tr>
94
- `)}
95
89
  </thead>
96
90
  <tbody>
91
+ <tr class="d2l-table-header">
92
+ <th scope="col" sticky></th>
93
+ ${thText.map(text => html`<th scope="col">${text}</th>`)}
94
+ </tr>
95
+ <tr header>
96
+ <th scope="col" sticky></th>
97
+ ${thText.map(text => html`<th scope="col">${text}</th>`)}
98
+ </tr>
97
99
  ${sorted.map(row => html`
98
100
  <tr ?selected="${row.selected}" data-name="${row.name}">
99
101
  <th scope="row" sticky>
@@ -1,6 +1,4 @@
1
- import '../selection/selection-select-all-pages.js';
2
- import '../selection/selection-summary.js';
3
- import { css, html, nothing } from 'lit';
1
+ import { css } from 'lit';
4
2
  import { SelectionControls } from '../selection/selection-controls.js';
5
3
 
6
4
  /**
@@ -30,19 +28,13 @@ class TableControls extends SelectionControls {
30
28
  `];
31
29
  }
32
30
 
33
- _getSelectionControlsLabel() {
34
- return this.localize('components.table-controls.label');
31
+ constructor() {
32
+ super();
33
+ this._noSelectAll = true;
35
34
  }
36
35
 
37
- _renderSelection() {
38
- return html`
39
- <d2l-selection-summary
40
- aria-hidden="true"
41
- no-selection-text="${this.localize('components.selection.select-all')}"
42
- >
43
- </d2l-selection-summary>
44
- ${this.selectAllPagesAllowed ? html`<d2l-selection-select-all-pages></d2l-selection-select-all-pages>` : nothing}
45
- `;
36
+ _getSelectionControlsLabel() {
37
+ return this.localize('components.table-controls.label');
46
38
  }
47
39
  }
48
40
 
@@ -1,6 +1,7 @@
1
1
  import '../colors/colors.js';
2
2
  import '../scroll-wrapper/scroll-wrapper.js';
3
3
  import { css, html, LitElement, nothing } from 'lit';
4
+ import { PageableMixin } from '../paging/pageable-mixin.js';
4
5
  import { RtlMixin } from '../../mixins/rtl/rtl-mixin.js';
5
6
  import { SelectionMixin } from '../selection/selection-mixin.js';
6
7
 
@@ -166,7 +167,7 @@ export const tableStyles = css`
166
167
  * @slot - Content to wrap
167
168
  * @slot controls - Slot for `d2l-table-controls` to be rendered above the table
168
169
  */
169
- export class TableWrapper extends RtlMixin(SelectionMixin(LitElement)) {
170
+ export class TableWrapper extends RtlMixin(PageableMixin(SelectionMixin(LitElement))) {
170
171
 
171
172
  static get properties() {
172
173
  return {
@@ -282,6 +283,8 @@ export class TableWrapper extends RtlMixin(SelectionMixin(LitElement)) {
282
283
  }
283
284
 
284
285
  updated(changedProperties) {
286
+ super.updated(changedProperties);
287
+
285
288
  // hack: grades/groups/outcomes in the LE use this CSS class on the
286
289
  // body to apply special CSS to the page when tables are sticky
287
290
  // Ideally they should be adding this class to the body.
@@ -335,6 +338,18 @@ export class TableWrapper extends RtlMixin(SelectionMixin(LitElement)) {
335
338
  });
336
339
  }
337
340
 
341
+ _getItemByIndex(index) {
342
+ return this._getItems()[index];
343
+ }
344
+
345
+ _getItems() {
346
+ return this._table?.querySelectorAll(':not(thead) > tr:not(.d2l-table-header):not([header])') || [];
347
+ }
348
+
349
+ _getItemShowingCount() {
350
+ return this._getItems().length;
351
+ }
352
+
338
353
  async _handleControlsChange() {
339
354
  if (this._controls) {
340
355
  await this._controls.updateComplete;
@@ -404,6 +419,7 @@ export class TableWrapper extends RtlMixin(SelectionMixin(LitElement)) {
404
419
  async _handleTableChange() {
405
420
  await new Promise(resolve => requestAnimationFrame(resolve));
406
421
 
422
+ this._updateItemShowingCount();
407
423
  this._applyClassNames();
408
424
  this._updateStickyTops();
409
425
  }
@@ -8032,6 +8032,11 @@
8032
8032
  "type": "boolean",
8033
8033
  "default": "false"
8034
8034
  },
8035
+ {
8036
+ "name": "pageable-for",
8037
+ "description": "Id of the `PageableMixin` component this component wants to observe (if not located within that component)",
8038
+ "type": "string"
8039
+ },
8035
8040
  {
8036
8041
  "name": "selection-for",
8037
8042
  "description": "Id of the `SelectionMixin` component this component wants to observe (if not located within that component)",
@@ -8060,6 +8065,12 @@
8060
8065
  "type": "boolean",
8061
8066
  "default": "false"
8062
8067
  },
8068
+ {
8069
+ "name": "pageableFor",
8070
+ "attribute": "pageable-for",
8071
+ "description": "Id of the `PageableMixin` component this component wants to observe (if not located within that component)",
8072
+ "type": "string"
8073
+ },
8063
8074
  {
8064
8075
  "name": "selectionFor",
8065
8076
  "attribute": "selection-for",
@@ -10251,6 +10262,68 @@
10251
10262
  }
10252
10263
  ]
10253
10264
  },
10265
+ {
10266
+ "name": "d2l-demo-pageable",
10267
+ "path": "./components/selection/demo/demo-selection.js",
10268
+ "attributes": [
10269
+ {
10270
+ "name": "item-count",
10271
+ "description": "Total number of items. If not specified, features like select-all-pages will be disabled.",
10272
+ "type": "number"
10273
+ }
10274
+ ],
10275
+ "properties": [
10276
+ {
10277
+ "name": "itemCount",
10278
+ "attribute": "item-count",
10279
+ "description": "Total number of items. If not specified, features like select-all-pages will be disabled.",
10280
+ "type": "number"
10281
+ }
10282
+ ]
10283
+ },
10284
+ {
10285
+ "name": "d2l-demo-selection-pageable",
10286
+ "path": "./components/selection/demo/demo-selection.js",
10287
+ "attributes": [
10288
+ {
10289
+ "name": "selection-count-override",
10290
+ "description": "ADVANCED: Temporary optional parameter used to override existing count. Will be removed soon, use with caution.",
10291
+ "type": "number"
10292
+ },
10293
+ {
10294
+ "name": "selection-single",
10295
+ "description": "Whether to render with single selection behaviour. If `selection-single` is specified, the nested `d2l-selection-input` elements will render radios instead of checkboxes, and the selection component will maintain a single selected item.",
10296
+ "type": "boolean",
10297
+ "default": "false"
10298
+ },
10299
+ {
10300
+ "name": "item-count",
10301
+ "description": "Total number of items. If not specified, features like select-all-pages will be disabled.",
10302
+ "type": "number"
10303
+ }
10304
+ ],
10305
+ "properties": [
10306
+ {
10307
+ "name": "selectionCountOverride",
10308
+ "attribute": "selection-count-override",
10309
+ "description": "ADVANCED: Temporary optional parameter used to override existing count. Will be removed soon, use with caution.",
10310
+ "type": "number"
10311
+ },
10312
+ {
10313
+ "name": "selectionSingle",
10314
+ "attribute": "selection-single",
10315
+ "description": "Whether to render with single selection behaviour. If `selection-single` is specified, the nested `d2l-selection-input` elements will render radios instead of checkboxes, and the selection component will maintain a single selected item.",
10316
+ "type": "boolean",
10317
+ "default": "false"
10318
+ },
10319
+ {
10320
+ "name": "itemCount",
10321
+ "attribute": "item-count",
10322
+ "description": "Total number of items. If not specified, features like select-all-pages will be disabled.",
10323
+ "type": "number"
10324
+ }
10325
+ ]
10326
+ },
10254
10327
  {
10255
10328
  "name": "d2l-selection-action-dropdown",
10256
10329
  "path": "./components/selection/selection-action-dropdown.js",
@@ -10584,6 +10657,11 @@
10584
10657
  "type": "boolean",
10585
10658
  "default": "false"
10586
10659
  },
10660
+ {
10661
+ "name": "pageable-for",
10662
+ "description": "Id of the `PageableMixin` component this component wants to observe (if not located within that component)",
10663
+ "type": "string"
10664
+ },
10587
10665
  {
10588
10666
  "name": "selection-for",
10589
10667
  "description": "Id of the `SelectionMixin` component this component wants to observe (if not located within that component)",
@@ -10612,6 +10690,12 @@
10612
10690
  "type": "boolean",
10613
10691
  "default": "false"
10614
10692
  },
10693
+ {
10694
+ "name": "pageableFor",
10695
+ "attribute": "pageable-for",
10696
+ "description": "Id of the `PageableMixin` component this component wants to observe (if not located within that component)",
10697
+ "type": "string"
10698
+ },
10615
10699
  {
10616
10700
  "name": "selectionFor",
10617
10701
  "attribute": "selection-for",
@@ -10941,6 +11025,68 @@
10941
11025
  }
10942
11026
  ]
10943
11027
  },
11028
+ {
11029
+ "name": "d2l-test-pageable",
11030
+ "path": "./components/selection/test/selection-component.js",
11031
+ "attributes": [
11032
+ {
11033
+ "name": "item-count",
11034
+ "description": "Total number of items. If not specified, features like select-all-pages will be disabled.",
11035
+ "type": "number"
11036
+ }
11037
+ ],
11038
+ "properties": [
11039
+ {
11040
+ "name": "itemCount",
11041
+ "attribute": "item-count",
11042
+ "description": "Total number of items. If not specified, features like select-all-pages will be disabled.",
11043
+ "type": "number"
11044
+ }
11045
+ ]
11046
+ },
11047
+ {
11048
+ "name": "d2l-test-selection-pageable",
11049
+ "path": "./components/selection/test/selection-component.js",
11050
+ "attributes": [
11051
+ {
11052
+ "name": "selection-count-override",
11053
+ "description": "ADVANCED: Temporary optional parameter used to override existing count. Will be removed soon, use with caution.",
11054
+ "type": "number"
11055
+ },
11056
+ {
11057
+ "name": "selection-single",
11058
+ "description": "Whether to render with single selection behaviour. If `selection-single` is specified, the nested `d2l-selection-input` elements will render radios instead of checkboxes, and the selection component will maintain a single selected item.",
11059
+ "type": "boolean",
11060
+ "default": "false"
11061
+ },
11062
+ {
11063
+ "name": "item-count",
11064
+ "description": "Total number of items. If not specified, features like select-all-pages will be disabled.",
11065
+ "type": "number"
11066
+ }
11067
+ ],
11068
+ "properties": [
11069
+ {
11070
+ "name": "selectionCountOverride",
11071
+ "attribute": "selection-count-override",
11072
+ "description": "ADVANCED: Temporary optional parameter used to override existing count. Will be removed soon, use with caution.",
11073
+ "type": "number"
11074
+ },
11075
+ {
11076
+ "name": "selectionSingle",
11077
+ "attribute": "selection-single",
11078
+ "description": "Whether to render with single selection behaviour. If `selection-single` is specified, the nested `d2l-selection-input` elements will render radios instead of checkboxes, and the selection component will maintain a single selected item.",
11079
+ "type": "boolean",
11080
+ "default": "false"
11081
+ },
11082
+ {
11083
+ "name": "itemCount",
11084
+ "attribute": "item-count",
11085
+ "description": "Total number of items. If not specified, features like select-all-pages will be disabled.",
11086
+ "type": "number"
11087
+ }
11088
+ ]
11089
+ },
10944
11090
  {
10945
11091
  "name": "d2l-test-skeleton-box",
10946
11092
  "path": "./components/skeleton/demo/skeleton-test-box.js",
@@ -11374,6 +11520,11 @@
11374
11520
  "type": "'default'|'light'",
11375
11521
  "default": "\"default\""
11376
11522
  },
11523
+ {
11524
+ "name": "item-count",
11525
+ "description": "Total number of items. If not specified, features like select-all-pages will be disabled.",
11526
+ "type": "number"
11527
+ },
11377
11528
  {
11378
11529
  "name": "selection-count-override",
11379
11530
  "description": "ADVANCED: Temporary optional parameter used to override existing count. Will be removed soon, use with caution.",
@@ -11418,6 +11569,12 @@
11418
11569
  "type": "'default'|'light'",
11419
11570
  "default": "\"default\""
11420
11571
  },
11572
+ {
11573
+ "name": "itemCount",
11574
+ "attribute": "item-count",
11575
+ "description": "Total number of items. If not specified, features like select-all-pages will be disabled.",
11576
+ "type": "number"
11577
+ },
11421
11578
  {
11422
11579
  "name": "selectionCountOverride",
11423
11580
  "attribute": "selection-count-override",
@@ -11507,6 +11664,11 @@
11507
11664
  "type": "boolean",
11508
11665
  "default": "false"
11509
11666
  },
11667
+ {
11668
+ "name": "pageable-for",
11669
+ "description": "Id of the `PageableMixin` component this component wants to observe (if not located within that component)",
11670
+ "type": "string"
11671
+ },
11510
11672
  {
11511
11673
  "name": "selection-for",
11512
11674
  "description": "Id of the `SelectionMixin` component this component wants to observe (if not located within that component)",
@@ -11535,6 +11697,12 @@
11535
11697
  "type": "boolean",
11536
11698
  "default": "false"
11537
11699
  },
11700
+ {
11701
+ "name": "pageableFor",
11702
+ "attribute": "pageable-for",
11703
+ "description": "Id of the `PageableMixin` component this component wants to observe (if not located within that component)",
11704
+ "type": "string"
11705
+ },
11538
11706
  {
11539
11707
  "name": "selectionFor",
11540
11708
  "attribute": "selection-for",
@@ -11584,6 +11752,11 @@
11584
11752
  "type": "'default'|'light'",
11585
11753
  "default": "\"default\""
11586
11754
  },
11755
+ {
11756
+ "name": "item-count",
11757
+ "description": "Total number of items. If not specified, features like select-all-pages will be disabled.",
11758
+ "type": "number"
11759
+ },
11587
11760
  {
11588
11761
  "name": "selection-count-override",
11589
11762
  "description": "ADVANCED: Temporary optional parameter used to override existing count. Will be removed soon, use with caution.",
@@ -11618,6 +11791,12 @@
11618
11791
  "type": "'default'|'light'",
11619
11792
  "default": "\"default\""
11620
11793
  },
11794
+ {
11795
+ "name": "itemCount",
11796
+ "attribute": "item-count",
11797
+ "description": "Total number of items. If not specified, features like select-all-pages will be disabled.",
11798
+ "type": "number"
11799
+ },
11621
11800
  {
11622
11801
  "name": "selectionCountOverride",
11623
11802
  "attribute": "selection-count-override",
package/lang/ar.js CHANGED
@@ -94,7 +94,8 @@ export default {
94
94
  "components.object-property-list.item-placeholder-text": "عنصر نائب",
95
95
  "components.overflow-group.moreActions": "مزيد من الإجراءات",
96
96
  "components.pager-load-more.action": "تحميل {count} إضافي",
97
- "components.pager-load-more.info": "{totalCount, plural, one {{showingCount} من أصل {totalCountFormatted} من العناصر} other {{showingCount} من أصل {totalCountFormatted} من العناصر}}",
97
+ "components.pageable.info": "{count, plural, one {{countFormatted} item} other {{countFormatted} items}}",
98
+ "components.pageable.info-with-total": "{totalCount, plural, one {{countFormatted} من أصل {totalCountFormatted} من العناصر} other {{countFormatted} من أصل {totalCountFormatted} من العناصر}}",
98
99
  "components.pager-load-more.status-loading": "تحميل المزيد من المواد",
99
100
  "components.selection.action-hint": "حدد مادة لتنفيذ هذا الإجراء.",
100
101
  "components.selection.select-all": "تحديد الكل",
package/lang/cy.js CHANGED
@@ -94,7 +94,8 @@ export default {
94
94
  "components.object-property-list.item-placeholder-text": "Eitem Dalfan",
95
95
  "components.overflow-group.moreActions": "Rhagor o Gamau Gweithredu",
96
96
  "components.pager-load-more.action": "Lwytho {count} Arall",
97
- "components.pager-load-more.info": "{totalCount, plural, one {{showingCount} o {totalCountFormatted} eitem} other {{showingCount} o {totalCountFormatted} eitem}}",
97
+ "components.pageable.info": "{count, plural, one {{countFormatted} item} other {{countFormatted} items}}",
98
+ "components.pageable.info-with-total": "{totalCount, plural, one {{countFormatted} o {totalCountFormatted} eitem} other {{countFormatted} o {totalCountFormatted} eitem}}",
98
99
  "components.pager-load-more.status-loading": "Llwytho rhagor o eitemau",
99
100
  "components.selection.action-hint": "Dewiswch eitem i gyflawni'r weithred hon.",
100
101
  "components.selection.select-all": "Dewis y Cyfan",
package/lang/da.js CHANGED
@@ -94,7 +94,8 @@ export default {
94
94
  "components.object-property-list.item-placeholder-text": "Pladsholder-element",
95
95
  "components.overflow-group.moreActions": "Flere handlinger",
96
96
  "components.pager-load-more.action": "Indlæs {count} mere",
97
- "components.pager-load-more.info": "{totalCount, plural, one {{showingCount} af {totalCountFormatted} element} other {{showingCount} af {totalCountFormatted} elementer}}",
97
+ "components.pageable.info": "{count, plural, one {{countFormatted} item} other {{countFormatted} items}}",
98
+ "components.pageable.info-with-total": "{totalCount, plural, one {{countFormatted} af {totalCountFormatted} element} other {{countFormatted} af {totalCountFormatted} elementer}}",
98
99
  "components.pager-load-more.status-loading": "Indlæser flere elementer",
99
100
  "components.selection.action-hint": "Vælg et element for at udføre denne handling.",
100
101
  "components.selection.select-all": "Vælg alle",
package/lang/de.js CHANGED
@@ -94,7 +94,8 @@ export default {
94
94
  "components.object-property-list.item-placeholder-text": "Platzhalterelement",
95
95
  "components.overflow-group.moreActions": "Weitere Aktionen",
96
96
  "components.pager-load-more.action": "{count} weitere laden",
97
- "components.pager-load-more.info": "{totalCount, plural, one {{showingCount} von {totalCountFormatted} Element} other {{showingCount} von {totalCountFormatted} Elementen}}",
97
+ "components.pageable.info": "{count, plural, one {{countFormatted} item} other {{countFormatted} items}}",
98
+ "components.pageable.info-with-total": "{totalCount, plural, one {{countFormatted} von {totalCountFormatted} Element} other {{countFormatted} von {totalCountFormatted} Elementen}}",
98
99
  "components.pager-load-more.status-loading": "Weitere Elemente werden geladen",
99
100
  "components.selection.action-hint": "Wählen Sie ein Element aus, um diese Aktion auszuführen.",
100
101
  "components.selection.select-all": "Alle auswählen",
package/lang/en-gb.js CHANGED
@@ -94,7 +94,8 @@ export default {
94
94
  "components.object-property-list.item-placeholder-text": "Placeholder Item",
95
95
  "components.overflow-group.moreActions": "More Actions",
96
96
  "components.pager-load-more.action": "Load {count} More",
97
- "components.pager-load-more.info": "{totalCount, plural, one {{showingCount} of {totalCountFormatted} item} other {{showingCount} of {totalCountFormatted} items}}",
97
+ "components.pageable.info": "{count, plural, one {{countFormatted} item} other {{countFormatted} items}}",
98
+ "components.pageable.info-with-total": "{totalCount, plural, one {{countFormatted} of {totalCountFormatted} item} other {{countFormatted} of {totalCountFormatted} items}}",
98
99
  "components.pager-load-more.status-loading": "Loading more items",
99
100
  "components.selection.action-hint": "Select an item to perform this action.",
100
101
  "components.selection.select-all": "Select All",
package/lang/en.js CHANGED
@@ -94,7 +94,8 @@ export default {
94
94
  "components.object-property-list.item-placeholder-text": "Placeholder Item",
95
95
  "components.overflow-group.moreActions": "More Actions",
96
96
  "components.pager-load-more.action": "Load {count} More",
97
- "components.pager-load-more.info": "{totalCount, plural, one {{showingCount} of {totalCountFormatted} item} other {{showingCount} of {totalCountFormatted} items}}",
97
+ "components.pageable.info": "{count, plural, one {{countFormatted} item} other {{countFormatted} items}}",
98
+ "components.pageable.info-with-total": "{totalCount, plural, one {{countFormatted} of {totalCountFormatted} item} other {{countFormatted} of {totalCountFormatted} items}}",
98
99
  "components.pager-load-more.status-loading": "Loading more items",
99
100
  "components.selection.action-hint": "Select an item to perform this action.",
100
101
  "components.selection.select-all": "Select All",
package/lang/es-es.js CHANGED
@@ -94,7 +94,8 @@ export default {
94
94
  "components.object-property-list.item-placeholder-text": "Elemento de marcador de posición",
95
95
  "components.overflow-group.moreActions": "Más acciones",
96
96
  "components.pager-load-more.action": "Cargar {count} más",
97
- "components.pager-load-more.info": "{totalCount, plural, one {{showingCount} de {totalCountFormatted} elemento} other {{showingCount} de {totalCountFormatted} elemento}}",
97
+ "components.pageable.info": "{count, plural, one {{countFormatted} item} other {{countFormatted} items}}",
98
+ "components.pageable.info-with-total": "{totalCount, plural, one {{countFormatted} de {totalCountFormatted} elemento} other {{countFormatted} de {totalCountFormatted} elemento}}",
98
99
  "components.pager-load-more.status-loading": "Cargando más elementos",
99
100
  "components.selection.action-hint": "Seleccione un elemento para realizar esta acción.",
100
101
  "components.selection.select-all": "Seleccionar todo",
package/lang/es.js CHANGED
@@ -94,7 +94,8 @@ export default {
94
94
  "components.object-property-list.item-placeholder-text": "Elemento de marcador de posición",
95
95
  "components.overflow-group.moreActions": "Más acciones",
96
96
  "components.pager-load-more.action": "Cargar {count} más",
97
- "components.pager-load-more.info": "{totalCount, plural, one {{showingCount} de {totalCountFormatted} elemento} other {{showingCount} de {totalCountFormatted} elemento}}",
97
+ "components.pageable.info": "{count, plural, one {{countFormatted} item} other {{countFormatted} items}}",
98
+ "components.pageable.info-with-total": "{totalCount, plural, one {{countFormatted} de {totalCountFormatted} elemento} other {{countFormatted} de {totalCountFormatted} elemento}}",
98
99
  "components.pager-load-more.status-loading": "Cargando más elementos",
99
100
  "components.selection.action-hint": "Seleccione un elemento para realizar esta acción.",
100
101
  "components.selection.select-all": "Seleccionar todo",
package/lang/fr-fr.js CHANGED
@@ -94,7 +94,8 @@ export default {
94
94
  "components.object-property-list.item-placeholder-text": "Élément d’espace réservé",
95
95
  "components.overflow-group.moreActions": "Plus d'actions",
96
96
  "components.pager-load-more.action": "Charger {count} supplémentaire(s)",
97
- "components.pager-load-more.info": "{totalCount, plural, one {{showingCount} sur {totalCountFormatted} élément} other {{showingCount} sur {totalCountFormatted} éléments}}",
97
+ "components.pageable.info": "{count, plural, one {{countFormatted} item} other {{countFormatted} items}}",
98
+ "components.pageable.info-with-total": "{totalCount, plural, one {{countFormatted} sur {totalCountFormatted} élément} other {{countFormatted} sur {totalCountFormatted} éléments}}",
98
99
  "components.pager-load-more.status-loading": "Charger plus d’éléments",
99
100
  "components.selection.action-hint": "Sélectionnez un élément pour exécuter cette action.",
100
101
  "components.selection.select-all": "Tout sélectionner",
package/lang/fr.js CHANGED
@@ -94,7 +94,8 @@ export default {
94
94
  "components.object-property-list.item-placeholder-text": "Élément de paramètre fictif",
95
95
  "components.overflow-group.moreActions": "Plus d'actions",
96
96
  "components.pager-load-more.action": "Charger {count} de plus",
97
- "components.pager-load-more.info": "{totalCount, plural, one {{showingCount} de {totalCountFormatted} élément} other {{showingCount} de {totalCountFormatted} éléments}}",
97
+ "components.pageable.info": "{count, plural, one {{countFormatted} item} other {{countFormatted} items}}",
98
+ "components.pageable.info-with-total": "{totalCount, plural, one {{countFormatted} de {totalCountFormatted} élément} other {{countFormatted} de {totalCountFormatted} éléments}}",
98
99
  "components.pager-load-more.status-loading": "Chargement d'autres d'éléments",
99
100
  "components.selection.action-hint": "Sélectionner un élément pour exécuter cette action.",
100
101
  "components.selection.select-all": "Tout sélectionner",
package/lang/hi.js CHANGED
@@ -94,7 +94,8 @@ export default {
94
94
  "components.object-property-list.item-placeholder-text": "प्लेसहोल्डर आइटम",
95
95
  "components.overflow-group.moreActions": "अधिक क्रियाएँ",
96
96
  "components.pager-load-more.action": "{count} और लोड करें",
97
- "components.pager-load-more.info": "{totalCount, plural, one {{totalCountFormatted} में से {showingCount} आइटम} other {{totalCountFormatted} में से {showingCount} आइटम}}",
97
+ "components.pageable.info": "{count, plural, one {{countFormatted} item} other {{countFormatted} items}}",
98
+ "components.pageable.info-with-total": "{totalCount, plural, one {{totalCountFormatted} में से {countFormatted} आइटम} other {{totalCountFormatted} में से {countFormatted} आइटम}}",
98
99
  "components.pager-load-more.status-loading": "और आइटम लोड करना",
99
100
  "components.selection.action-hint": "यह कार्रवाई निष्पादित करने के लिए कोई आइटम का चयन करें।",
100
101
  "components.selection.select-all": "सभी का चयन करें",
package/lang/ja.js CHANGED
@@ -94,7 +94,8 @@ export default {
94
94
  "components.object-property-list.item-placeholder-text": "プレースホルダの項目",
95
95
  "components.overflow-group.moreActions": "その他のアクション",
96
96
  "components.pager-load-more.action": "さらに {count} 件を読み込む",
97
- "components.pager-load-more.info": "{totalCount, plural, other {{showingCount}/{totalCountFormatted} 個の項目}}",
97
+ "components.pageable.info": "{count, plural, other {{countFormatted} items}}",
98
+ "components.pageable.info-with-total": "{totalCount, plural, other {{countFormatted}/{totalCountFormatted} 個の項目}}",
98
99
  "components.pager-load-more.status-loading": "さらに項目を読み込み中",
99
100
  "components.selection.action-hint": "このアクションを実行するための項目を選択します。",
100
101
  "components.selection.select-all": "すべて選択",
package/lang/ko.js CHANGED
@@ -94,7 +94,8 @@ export default {
94
94
  "components.object-property-list.item-placeholder-text": "자리표시자 항목",
95
95
  "components.overflow-group.moreActions": "추가 작업",
96
96
  "components.pager-load-more.action": "{count}개 더 로드",
97
- "components.pager-load-more.info": "{totalCount, plural, other {{totalCountFormatted} 항목 중 {showingCount}}}",
97
+ "components.pageable.info": "{count, plural, other {{countFormatted} items}}",
98
+ "components.pageable.info-with-total": "{totalCount, plural, other {{totalCountFormatted}개 항목 중 {countFormatted}개}}",
98
99
  "components.pager-load-more.status-loading": "더 많은 항목 로드",
99
100
  "components.selection.action-hint": "이 작업을 수행할 항목을 선택하십시오.",
100
101
  "components.selection.select-all": "모두 선택",
package/lang/nl.js CHANGED
@@ -94,7 +94,8 @@ export default {
94
94
  "components.object-property-list.item-placeholder-text": "Item tijdelijke aanduiding",
95
95
  "components.overflow-group.moreActions": "Meer acties",
96
96
  "components.pager-load-more.action": "Laad nog {count} extra",
97
- "components.pager-load-more.info": "{totalCount, plural, one {{showingCount} van {totalCountFormatted} artikel} other {{showingCount} van {totalCountFormatted} artikelen}}",
97
+ "components.pageable.info": "{count, plural, one {{countFormatted} item} other {{countFormatted} items}}",
98
+ "components.pageable.info-with-total": "{totalCount, plural, one {{countFormatted} van {totalCountFormatted} artikel} other {{countFormatted} van {totalCountFormatted} artikelen}}",
98
99
  "components.pager-load-more.status-loading": "Er worden meer items geladen",
99
100
  "components.selection.action-hint": "Selecteer een item om deze actie uit te voeren.",
100
101
  "components.selection.select-all": "Alles selecteren",
package/lang/pt.js CHANGED
@@ -94,7 +94,8 @@ export default {
94
94
  "components.object-property-list.item-placeholder-text": "Item de espaço reservado",
95
95
  "components.overflow-group.moreActions": "Mais ações",
96
96
  "components.pager-load-more.action": "Carregar mais {count}",
97
- "components.pager-load-more.info": "{totalCount, plural, one {{showingCount} de {totalCountFormatted} item} other {{showingCount} de {totalCountFormatted} itens}}",
97
+ "components.pageable.info": "{count, plural, one {{countFormatted} item} other {{countFormatted} items}}",
98
+ "components.pageable.info-with-total": "{totalCount, plural, one {{countFormatted} de {totalCountFormatted} item} other {{countFormatted} de {totalCountFormatted} itens}}",
98
99
  "components.pager-load-more.status-loading": "Carregando mais itens",
99
100
  "components.selection.action-hint": "Selecione um item para realizar esta ação.",
100
101
  "components.selection.select-all": "Selecionar tudo",
package/lang/sv.js CHANGED
@@ -94,7 +94,8 @@ export default {
94
94
  "components.object-property-list.item-placeholder-text": "Platshållarobjekt",
95
95
  "components.overflow-group.moreActions": "Fler åtgärder",
96
96
  "components.pager-load-more.action": "Läs in {count} till",
97
- "components.pager-load-more.info": "{totalCount, plural, one {{showingCount} av {totalCountFormatted} objekt} other {{showingCount} av {totalCountFormatted} objekt}}",
97
+ "components.pageable.info": "{count, plural, one {{countFormatted} item} other {{countFormatted} items}}",
98
+ "components.pageable.info-with-total": "{totalCount, plural, one {{countFormatted} av {totalCountFormatted} objekt} other {{countFormatted} av {totalCountFormatted} objekt}}",
98
99
  "components.pager-load-more.status-loading": "Läser in fler objekt",
99
100
  "components.selection.action-hint": "Välj ett objekt för att utföra åtgärden.",
100
101
  "components.selection.select-all": "Välj alla",
package/lang/tr.js CHANGED
@@ -94,7 +94,8 @@ export default {
94
94
  "components.object-property-list.item-placeholder-text": "Yer Tutucu Öğesi",
95
95
  "components.overflow-group.moreActions": "Daha Fazla Eylem",
96
96
  "components.pager-load-more.action": "{count} Tane Daha Yükle",
97
- "components.pager-load-more.info": "{totalCount, plural, one {{showingCount} / {totalCountFormatted} öğe} other {{showingCount} / {totalCountFormatted} öğe}}",
97
+ "components.pageable.info": "{count, plural, one {{countFormatted} item} other {{countFormatted} items}}",
98
+ "components.pageable.info-with-total": "{totalCount, plural, one {{countFormatted} / {totalCountFormatted} öğe} other {{countFormatted} / {totalCountFormatted} öğe}}",
98
99
  "components.pager-load-more.status-loading": "Daha fazla öğe yükleniyor",
99
100
  "components.selection.action-hint": "Bu eylemi gerçekleştirebilmek için bir öğe seçin.",
100
101
  "components.selection.select-all": "Tümünü Seç",
package/lang/zh-cn.js CHANGED
@@ -94,7 +94,8 @@ export default {
94
94
  "components.object-property-list.item-placeholder-text": "占位符项目",
95
95
  "components.overflow-group.moreActions": "更多操作",
96
96
  "components.pager-load-more.action": "再加载 {count} 个",
97
- "components.pager-load-more.info": "{totalCount, plural, other {{showingCount}/{totalCountFormatted} }}",
97
+ "components.pageable.info": "{count, plural, other {{countFormatted} items}}",
98
+ "components.pageable.info-with-total": "{totalCount, plural, other {{countFormatted}/{totalCountFormatted} 项}}",
98
99
  "components.pager-load-more.status-loading": "加载更多项目",
99
100
  "components.selection.action-hint": "选择一个项目后才能执行此操作。",
100
101
  "components.selection.select-all": "全选",
package/lang/zh-tw.js CHANGED
@@ -94,7 +94,8 @@ export default {
94
94
  "components.object-property-list.item-placeholder-text": "預留位置項目",
95
95
  "components.overflow-group.moreActions": "其他動作",
96
96
  "components.pager-load-more.action": "再載入 {count} 個",
97
- "components.pager-load-more.info": "{totalCount, plural, other {{showingCount} 項,共 {totalCountFormatted}}}",
97
+ "components.pageable.info": "{count, plural, other {{countFormatted} items}}",
98
+ "components.pageable.info-with-total": "{totalCount, plural, other {{countFormatted} 項,共 {totalCountFormatted} 項}}",
98
99
  "components.pager-load-more.status-loading": "正在載入更多項目",
99
100
  "components.selection.action-hint": "選取項目以執行此動作。",
100
101
  "components.selection.select-all": "全選",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@brightspace-ui/core",
3
- "version": "2.109.0",
3
+ "version": "2.110.1",
4
4
  "description": "A collection of accessible, free, open-source web components for building Brightspace applications",
5
5
  "type": "module",
6
6
  "repository": "https://github.com/BrightspaceUI/core.git",