@brightspace-ui/core 3.206.3 → 3.207.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.
@@ -34,6 +34,7 @@ class ListDemoNested extends LitElement {
34
34
  showLoadMore: { type: Boolean, attribute: 'show-load-more' },
35
35
  noPrimaryAction: { type: Boolean, attribute: 'no-primary-action' },
36
36
  disableListGrid: { type: Boolean, attribute: 'disable-list-grid' },
37
+ dragHandleShowAlways: { type: Boolean, attribute: 'drag-handle-show-always' },
37
38
  _items: { state: true },
38
39
  _loadedItems: { state: true },
39
40
  _remainingItemCount: { state: true },
@@ -176,6 +177,7 @@ class ListDemoNested extends LitElement {
176
177
  <d2l-list
177
178
  ?grid="${!this.disableListGrid}"
178
179
  drag-multiple
180
+ ?drag-handle-show-always="${this.dragHandleShowAlways}"
179
181
  ?drop-nested-only="${this.dropNestedOnly}"
180
182
  slot="${ifDefined(nested ? 'nested' : undefined)}"
181
183
  item-count="${this._items.length}"
@@ -62,6 +62,13 @@
62
62
  </template>
63
63
  </d2l-demo-snippet>
64
64
 
65
+ <h2>Always Show Handle</h2>
66
+
67
+ <d2l-demo-snippet>
68
+ <template>
69
+ <d2l-demo-list-nested demo-item-key="imgPrimaryAndSupporting" is-draggable selectable drag-handle-show-always></d2l-demo-list-nested>
70
+ </template>
71
+ </d2l-demo-snippet>
65
72
 
66
73
  </d2l-demo-page>
67
74
 
@@ -268,23 +268,24 @@ export const ListItemDragDropMixin = superclass => class extends superclass {
268
268
  /**
269
269
  * **Drag & drop:** The drag-handle label for assistive technology. If implementing drag & drop, you should change this to dynamically announce what the drag-handle is moving for assistive technology in keyboard mode.
270
270
  * @type {string}
271
- */
271
+ */
272
272
  dragHandleText: { type: String, attribute: 'drag-handle-text' },
273
273
  /**
274
274
  * **Drag & drop:** Whether nested items can be dropped on this item
275
275
  * @type {boolean}
276
- */
276
+ */
277
277
  dropNested: { type: Boolean, attribute: 'drop-nested' },
278
278
  /**
279
279
  * **Drag & drop:** Text to drag and drop
280
280
  * @type {string}
281
- */
281
+ */
282
282
  dropText: { type: String, attribute: 'drop-text' },
283
283
  /**
284
284
  * Value to identify item if selectable
285
285
  * @type {string}
286
- */
286
+ */
287
287
  key: { type: String, reflect: true },
288
+ _dragHandleShowAlways: { type: Boolean, attribute: '_drag-handle-show-always', reflect: true },
288
289
  _draggingOver: { type: Boolean },
289
290
  _dropLocation: { type: Number, reflect: true, attribute: '_drop-location' },
290
291
  _focusingDragHandle: { type: Boolean },
@@ -345,6 +346,7 @@ export const ListItemDragDropMixin = superclass => class extends superclass {
345
346
  }
346
347
  :host([selected]) d2l-list-item-drag-handle,
347
348
  :host([current]) d2l-list-item-drag-handle,
349
+ :host([_drag-handle-show-always]) d2l-list-item-drag-handle,
348
350
  :host([_focusing]) d2l-list-item-drag-handle,
349
351
  d2l-list-item-drag-handle:hover,
350
352
  d2l-list-item-drag-handle.d2l-hovering,
@@ -379,6 +381,7 @@ export const ListItemDragDropMixin = superclass => class extends superclass {
379
381
  const list = this.getRootList();
380
382
  this._dragMultiple = list?.hasAttribute('drag-multiple');
381
383
  this._dropNestedOnly = list?.hasAttribute('drop-nested-only');
384
+ this._dragHandleShowAlways = list?.dragHandleShowAlways;
382
385
  }
383
386
 
384
387
  firstUpdated(changedProperties) {
@@ -53,6 +53,11 @@ class List extends PageableMixin(SelectionMixin(LitElement)) {
53
53
  * @type {array}
54
54
  */
55
55
  breakpoints: { type: Array },
56
+ /**
57
+ * Always show drag handle
58
+ * @type {boolean}
59
+ */
60
+ dragHandleShowAlways: { type: Boolean, attribute: 'drag-handle-show-always' },
56
61
  /**
57
62
  * Whether the user can drag multiple items
58
63
  * @type {boolean}
@@ -264,6 +269,9 @@ class List extends PageableMixin(SelectionMixin(LitElement)) {
264
269
  if (changedProperties.has('layout') && changedProperties.get('layout') !== undefined && this.layout) {
265
270
  this._updateItemLayouts();
266
271
  }
272
+ if (changedProperties.has('dragHandleShowAlways')) {
273
+ this._updateItemDragHandleShowAlways();
274
+ }
267
275
  }
268
276
 
269
277
  getItems(slot) {
@@ -500,6 +508,7 @@ class List extends PageableMixin(SelectionMixin(LitElement)) {
500
508
  });
501
509
 
502
510
  this._updateItemLayouts(items);
511
+ this._updateItemDragHandleShowAlways(items);
503
512
 
504
513
  /** @ignore */
505
514
  this.dispatchEvent(new CustomEvent('d2l-list-item-showing-count-change', {
@@ -522,11 +531,15 @@ class List extends PageableMixin(SelectionMixin(LitElement)) {
522
531
  });
523
532
  }
524
533
 
534
+ _updateItemDragHandleShowAlways(items) {
535
+ if (!items) items = this.getItems();
536
+ items.forEach(item => item._dragHandleShowAlways = this.dragHandleShowAlways);
537
+ }
538
+
525
539
  _updateItemLayouts(items) {
526
540
  if (!items) items = this.getItems();
527
541
  items.forEach(item => item.layout = (this.layout === listLayouts.tiles ? 'tile' : 'normal'));
528
542
  }
529
-
530
543
  }
531
544
 
532
545
  customElements.define('d2l-list', List);
@@ -8759,6 +8759,10 @@
8759
8759
  {
8760
8760
  "name": "disable-list-grid",
8761
8761
  "type": "boolean"
8762
+ },
8763
+ {
8764
+ "name": "drag-handle-show-always",
8765
+ "type": "boolean"
8762
8766
  }
8763
8767
  ],
8764
8768
  "properties": [
@@ -8836,6 +8840,11 @@
8836
8840
  "name": "disableListGrid",
8837
8841
  "attribute": "disable-list-grid",
8838
8842
  "type": "boolean"
8843
+ },
8844
+ {
8845
+ "name": "dragHandleShowAlways",
8846
+ "attribute": "drag-handle-show-always",
8847
+ "type": "boolean"
8839
8848
  }
8840
8849
  ]
8841
8850
  },
@@ -10589,6 +10598,11 @@
10589
10598
  "description": "Text to show in label tooltip on inline add button. Defaults to \"Add Item\".",
10590
10599
  "type": "string"
10591
10600
  },
10601
+ {
10602
+ "name": "drag-handle-show-always",
10603
+ "description": "Always show drag handle",
10604
+ "type": "boolean"
10605
+ },
10592
10606
  {
10593
10607
  "name": "drop-nested-only",
10594
10608
  "description": "Disable ability to drop items above or below this item",
@@ -10660,6 +10674,12 @@
10660
10674
  "description": "Text to show in label tooltip on inline add button. Defaults to \"Add Item\".",
10661
10675
  "type": "string"
10662
10676
  },
10677
+ {
10678
+ "name": "dragHandleShowAlways",
10679
+ "attribute": "drag-handle-show-always",
10680
+ "description": "Always show drag handle",
10681
+ "type": "boolean"
10682
+ },
10663
10683
  {
10664
10684
  "name": "dropNestedOnly",
10665
10685
  "attribute": "drop-nested-only",
package/lang/fr-fr.js CHANGED
@@ -174,7 +174,6 @@ export default {
174
174
  "components.selection.select-all": "Tout sélectionner",
175
175
  "components.selection.select-all-items":
176
176
  `{count, plural,
177
- =1 {Sélectionner 1 élément}
178
177
  one {Sélectionner {countFormatted} élément}
179
178
  other {Sélectionner {countFormatted} éléments}
180
179
  }`,
package/lang/vi.js CHANGED
@@ -1,20 +1,20 @@
1
1
  export default {
2
2
  "components.alert.close": "Đóng Cảnh Báo",
3
- "components.breadcrumbs.breadcrumb": "Breadcrumb",
3
+ "components.breadcrumbs.breadcrumb": "Đường dẫn",
4
4
  "components.button-add.addItem": "Thêm mục",
5
5
  "components.button-copy.copied": "Đã sao chép!",
6
- "components.button-copy.error": "Sao chép không thành công. Hãy thử lại hoặc thử sao chép thủ công.",
6
+ "components.button-copy.error": "Sao chép không thành công. Hãy thử lại, hoặc thử sao chép thủ công.",
7
7
  "components.button-split.otherOptions": "Các lựa chọn khác",
8
8
  "components.calendar.hasEvents": "Có các sự kiện.",
9
9
  "components.calendar.notSelected": "Không được chọn.",
10
10
  "components.calendar.selected": "Được chọn.",
11
11
  "components.calendar.show": "Hiển thị {month}",
12
12
  "components.count-badge.plus": "{number}+",
13
- "components.dialog.close": "Đóng hộp thoại",
14
- "components.dialog.critical": "Nghiêm trọng!",
13
+ "components.dialog.close": "Đóng hộp thoại này",
14
+ "components.dialog.critical": "Rất quan trọng!",
15
15
  "components.dropdown.close": "Đóng",
16
- "components.filter.activeFilters": "Các bộ lọc hoạt động:",
17
- "components.filter.additionalContentTooltip": "Sử dụng <b>các phím mũi tên trái/phải</b> để di chuyển tiêu điểm trong mục danh sách này",
16
+ "components.filter.activeFilters": "Các bộ lọc Hoạt động:",
17
+ "components.filter.additionalContentTooltip": "Sử dụng <b>các phím mũi tên trái/phải</b> để di chuyển trọng tâm bên trong mục danh sách này",
18
18
  "components.filter.clear": "Xóa",
19
19
  "components.filter.clearAll": "Xóa tất cả",
20
20
  "components.filter.clearAllAnnounce": "Xóa tất cả các bộ lọc",
@@ -30,17 +30,16 @@ export default {
30
30
  }`,
31
31
  "components.filter.filters": "Bộ lọc",
32
32
  "components.filter.loading": "Đang tải các bộ lọc",
33
- "components.filter.noFilters": "Không có bộ lọc nào khả dụng",
33
+ "components.filter.noFilters": "Không có bộ lọc nào tính khả dụng",
34
34
  "components.filter.searchResults":
35
35
  `{number, plural,
36
- =0 {Không có kết quả tìm kiếm}
37
- other {{number} kết quả tìm kiếm}
36
+ other {{number} Không có kết quả tìm kiếm nào}
38
37
  }`,
39
38
  "components.filter.selectedFirstListLabel": "{headerText}. Các bộ lọc được chọn xuất hiện đầu tiên.",
40
39
  "components.filter.singleDimensionDescription": "Lọc theo: {filterName}",
41
40
  "components.filter-dimension-set-date-text-value.textDays":
42
41
  `{num, plural,
43
- =0 {hôm nay}
42
+ =0 {Hôm nay}
44
43
  other {{num} ngày trước}
45
44
  }`,
46
45
  "components.filter-dimension-set-date-text-value.textHours":
@@ -48,12 +47,12 @@ export default {
48
47
  =1 {Giờ trước}
49
48
  other {{num} giờ trước}
50
49
  }`,
51
- "components.filter-dimension-set-date-text-value.textMonths": "{num} tháng trước",
50
+ "components.filter-dimension-set-date-text-value.textMonths": "{num} tháng qua",
52
51
  "components.filter-dimension-set-date-time-range-value.label": "{text}, mở rộng để chọn ngày",
53
52
  "components.filter-dimension-set-date-time-range-value.text": "Phạm vi ngày tùy chỉnh",
54
- "components.filter-dimension-set-date-time-range-value.valueTextRange": "{startValue} đến {endValue}",
55
- "components.filter-dimension-set-date-time-range-value.valueTextRangeEndOnly": "Trước {endValue}",
56
- "components.filter-dimension-set-date-time-range-value.valueTextRangeStartOnly": "Sau {startValue}",
53
+ "components.filter-dimension-set-date-time-range-value.valueTextRange": "{startValue} tới {endValue}",
54
+ "components.filter-dimension-set-date-time-range-value.valueTextRangeEndOnly": "Trước khi {endValue}",
55
+ "components.filter-dimension-set-date-time-range-value.valueTextRangeStartOnly": "Sau khi {startValue}",
57
56
  "components.form-element.defaultError": "{label} không hợp lệ",
58
57
  "components.form-element.defaultFieldLabel": "Trường",
59
58
  "components.form-element.input.email.typeMismatch": "Email không hợp lệ",
@@ -85,7 +84,7 @@ export default {
85
84
  `{count, plural,
86
85
  other {Có {count} lỗi được tìm thấy trong thông tin bạn đã gửi}
87
86
  }`,
88
- "components.form-error-summary.text": "Chuyển đổi chi tiết lỗi",
87
+ "components.form-error-summary.text": "Chuyển đổi các chi tiết lỗi",
89
88
  "components.input-color.backgroundColor": "Màu nền",
90
89
  "components.input-color.foregroundColor": "Màu tiền cảnh",
91
90
  "components.input-color.none": "Không",
@@ -94,14 +93,14 @@ export default {
94
93
  "components.input-date.errorMinDateOnly": "Ngày phải nằm trong hoặc sau {minDate}",
95
94
  "components.input-date.errorOutsideRange": "Ngày phải nằm trong khoảng giữa {minDate} và {maxDate}",
96
95
  "components.input-date.now": "Bây giờ",
97
- "components.input-date.openInstructions": "Sử dụng định dạng ngày {format}. Nhấn phím mũi tên xuống hoặc phím Enter để truy cập lịch nhỏ.",
96
+ "components.input-date.openInstructions": "Sử dụng định dạng ngày {format}. Nhấn phím mũi tên xuống hoặc nhấn Enter để truy cập lịch nhỏ.",
98
97
  "components.input-date.revert": "{label} được trả về giá trị trước đó.",
99
- "components.input-date.today": "Ngày nay",
98
+ "components.input-date.today": "Hôm nay",
100
99
  "components.input-date.useDateFormat": "Sử dụng định dạng ngày {format}.",
101
100
  "components.input-date-range.endDate": "Ngày Kết thúc",
102
101
  "components.input-date-range.errorBadInput": "{startLabel} phải nằm trước {endLabel}",
103
- "components.input-date-range.interactive-label": "Phạm vi ngày",
104
- "components.input-date-range.startDate": "Ngày bắt đầu",
102
+ "components.input-date-range.interactive-label": "Trường nhập phạm vi ngày",
103
+ "components.input-date-range.startDate": "Ngày Bắt đầu",
105
104
  "components.input-date-time.date": "Ngày tháng",
106
105
  "components.input-date-time.errorMaxDateOnly": "Ngày phải là ngày trước hoặc vào {maxDate}",
107
106
  "components.input-date-time.errorMinDateOnly": "Ngày phải nằm trong hoặc sau {minDate}",
@@ -110,7 +109,7 @@ export default {
110
109
  "components.input-date-time-range.endDate": "Ngày Kết thúc",
111
110
  "components.input-date-time-range.errorBadInput": "{startLabel} phải nằm trước {endLabel}",
112
111
  "components.input-date-time-range.interactive-label": "Nhập phạm vi ngày và thời gian",
113
- "components.input-date-time-range.startDate": "Ngày bắt đầu",
112
+ "components.input-date-time-range.startDate": "Ngày Bắt đầu",
114
113
  "components.input-date-time-range-to.to": "đến",
115
114
  "components.input-number.hintDecimalDuplicate": "Đã có một dấu thập phân trong số này",
116
115
  "components.input-number.hintDecimalIncorrectComma": "Để thêm một dấu thập phân, hãy sử dụng ký tự dấu phẩy “,”",
@@ -120,31 +119,31 @@ export default {
120
119
  "components.input-search.defaultPlaceholder": "Tìm kiếm...",
121
120
  "components.input-search.search": "Tìm kiếm",
122
121
  "components.input-time-range.endTime": "Thời gian Kết thúc",
123
- "components.input-time-range.errorBadInput": "{startLabel} phải nằm trước {endLabel}",
124
- "components.input-time-range.startTime": "Thời gian bắt đầu",
122
+ "components.input-time-range.errorBadInput": "{startLabel} phải trước {endLabel}",
123
+ "components.input-time-range.startTime": "Thời gian Bắt đầu",
125
124
  "components.interactive.instructions": "Nhấn phím Enter để tương tác, Nhấn Escape để thoát",
126
- "components.link.open-in-new-window": "Mở trong một cửa sổ mới được mở.",
127
- "components.list.keyboard": "Sử dụng <b>các phím mũi tên</b> để di chuyển tiêu điểm trong danh sách này hoặc <b>trang lên/xuống</b> để di chuyển lên hoặc xuống 5 mục",
128
- "components.list-controls.label": "Các hành động cho danh sách.",
125
+ "components.link.open-in-new-window": "Mở trong một cửa sổ mới.",
126
+ "components.list.keyboard": "Sử dụng <b>phím mũi tên</b> để di chuyển trọng tâm bên trong danh sách này hoặc <b>page up/down</b> để di chuyển lên hoặc xuống 5",
127
+ "components.list-controls.label": "Các hành động cho danh sách",
129
128
  "components.list-item.addItem": "Thêm mục",
130
- "components.list-item-drag-handle.default": "Sắp xếp lại hành động mục cho {name}",
129
+ "components.list-item-drag-handle.default": "Sắp xếp lại mục hành động cho {name}",
131
130
  "components.list-item-drag-handle.keyboard": "Sắp xếp lại mục, vị trí hiện tại là {currentPosition} trong tổng số {size}. Để di chuyển mục này, nhấn phím mũi tên lên hoặc xuống.",
132
131
  "components.list-item-drag-handle-tooltip.enter-desc": "Bật chế độ sắp xếp lại bằng bàn phím.",
133
132
  "components.list-item-drag-handle-tooltip.enter-key": "Phím Enter.",
134
133
  "components.list-item-drag-handle-tooltip.left-right-desc": "Thay đổi cấp độ lồng ghép.",
135
134
  "components.list-item-drag-handle-tooltip.left-right-key": "Trái/Phải",
136
- "components.list-item-drag-handle-tooltip.title": "Các điều khiển bàn phím để sắp xếp lại:",
135
+ "components.list-item-drag-handle-tooltip.title": "Các điều khiển Bàn phím để Sắp xếp lại:",
137
136
  "components.list-item-drag-handle-tooltip.up-down-desc": "Di chuyển mục lên hoặc xuống trong danh sách.",
138
137
  "components.list-item-drag-handle-tooltip.up-down-key": "Lên/Xuống",
139
- "components.menu-item-return.return": "Quay lại menu trước đó.",
140
- "components.menu-item-return.returnCurrentlyShowing": "Quay lại menu trước đó. Bạn đang xem {menuTitle}.",
138
+ "components.menu-item-return.return": "Quay lại tới menu trước.",
139
+ "components.menu-item-return.returnCurrentlyShowing": "Quay lại tới menu trước. Bạn đang xem {menuTitle}.",
141
140
  "components.meter-mixin.commaSeperatedAria": "{term1}, {term2}",
142
141
  "components.meter-mixin.fraction": "{x}⁄{y}",
143
142
  "components.meter-mixin.fractionAria": "{x} trên tổng số {y}",
144
143
  "components.meter-mixin.progressIndicator": "Chỉ báo tiến trình",
145
- "components.more-less.less": "ít",
144
+ "components.more-less.less": "ít hơn",
146
145
  "components.more-less.more": "thêm",
147
- "components.object-property-list.item-placeholder-text": "Mục giữ chỗ",
146
+ "components.object-property-list.item-placeholder-text": "Mục Giữ chỗ",
148
147
  "components.overflow-group.moreActions": "Thêm các Tác vụ",
149
148
  "components.pageable.info":
150
149
  `{count, plural,
@@ -167,7 +166,6 @@ export default {
167
166
  "components.selection.select-all": "Chọn Tất cả",
168
167
  "components.selection.select-all-items":
169
168
  `{count, plural,
170
- =1 {Chọn mục}
171
169
  other {Chọn tất cả {countFormatted} mục}
172
170
  }`,
173
171
  "components.selection.selected": "{count} mục được chọn",
@@ -175,7 +173,7 @@ export default {
175
173
  "components.selection-controls.label": "Các thao tác để chọn",
176
174
  "components.sort.label": "Sắp xếp",
177
175
  "components.sort.text": "Sắp xếp: {selectedItemText}",
178
- "components.switch.conditions": "Phải đáp ứng các điều kiện",
176
+ "components.switch.conditions": "Các điều kiện phải được đáp ứng",
179
177
  "components.switch.hidden": "Bị ẩn",
180
178
  "components.switch.visible": "Nhìn thấy được",
181
179
  "components.switch.visibleWithPeriod": "Hiển thị.",
@@ -204,11 +202,11 @@ export default {
204
202
  "components.table-controls.label": "Các tác vụ cho bảng",
205
203
  "components.tabs.next": "Cuộn tới",
206
204
  "components.tabs.previous": "Cuộn ngược",
207
- "components.tag-list.clear": "Bấm, nhấn phím xoá lùi hoặc nhấn phím xoá để xoá mục {value}",
205
+ "components.tag-list.clear": "Nhấp, nhấn phím xoá lùi hoặc nhấn phím xoá để xoá mục {value}",
208
206
  "components.tag-list.clear-all": "Xóa tất cả",
209
- "components.tag-list.cleared-all": "Xóa tất cả các mục danh sách thẻ",
210
- "components.tag-list.cleared-item": "Xóa mục danh sách thẻ {value}",
211
- "components.tag-list.interactive-label": "Danh sách thẻ, {count} mục",
207
+ "components.tag-list.cleared-all": "Đã xóa tất cả các mục danh sách thẻ",
208
+ "components.tag-list.cleared-item": "Đã xóa mục danh sách thẻ {value}",
209
+ "components.tag-list.interactive-label": "Danh sách Thẻ, {count} mục",
212
210
  "components.tag-list.num-hidden": "+ {count} mục nữa",
213
211
  "components.tag-list.role-description":
214
212
  `{count, plural,
@@ -218,11 +216,11 @@ export default {
218
216
  "components.tag-list.show-less": "Ẩn bớt",
219
217
  "components.tag-list.show-more-description": "Chọn để hiển thị các mục danh sách thẻ ẩn",
220
218
  "components.tag-list-item.role-description": "Thẻ",
221
- "components.tag-list-item.tooltip-arrow-keys": "Các phím mũi tên",
219
+ "components.tag-list-item.tooltip-arrow-keys": "Phím mũi tên",
222
220
  "components.tag-list-item.tooltip-arrow-keys-desc": "Di chuyển giữa các thẻ",
223
221
  "components.tag-list-item.tooltip-delete-key": "Phím lùi/Xóa",
224
222
  "components.tag-list-item.tooltip-delete-key-desc": "Xóa thẻ được chọn",
225
- "components.tag-list-item.tooltip-title": "Các điều khiển bàn phím",
223
+ "components.tag-list-item.tooltip-title": "Điều khiển Bàn phím",
226
224
  "components.view-switcher.role-description":
227
225
  `{count, plural,
228
226
  =0 {Xem Trình chuyển đổi với 0 mục}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@brightspace-ui/core",
3
- "version": "3.206.3",
3
+ "version": "3.207.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",