@brightspace-ui/core 1.210.0 → 1.213.0

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.
@@ -6208,8 +6208,8 @@
6208
6208
  ]
6209
6209
  },
6210
6210
  {
6211
- "name": "d2l-list-demo-drag-and-drop-usage",
6212
- "path": "./components/list/demo/list-demo-drag-and-drop-usage.js",
6211
+ "name": "d2l-demo-list-drag-and-drop-position",
6212
+ "path": "./components/list/demo/list-drag-and-drop-position.js",
6213
6213
  "attributes": [
6214
6214
  {
6215
6215
  "name": "grid",
@@ -6253,6 +6253,25 @@
6253
6253
  }
6254
6254
  ]
6255
6255
  },
6256
+ {
6257
+ "name": "d2l-demo-list-drag-and-drop",
6258
+ "path": "./components/list/demo/list-drag-and-drop.js",
6259
+ "attributes": [
6260
+ {
6261
+ "name": "items",
6262
+ "type": "array",
6263
+ "default": "[{\"key\":\"1\",\"primaryText\":\"Introductory Earth Sciences\",\"supportingText\":\"This course explores the geological processes of the Earth's interior and surface. These include volcanism, earthquakes, mountain building, glaciation and weathering.\",\"imgSrc\":\"https://s.brightspace.com/course-images/images/63b162ab-b582-4bf9-8c1d-1dad04714121/tile-high-density-max-size.jpg\",\"items\":[{\"key\":\"1-1\",\"primaryText\":\"Glaciation\",\"supportingText\":\"Supporting Info\",\"imgSrc\":\"\",\"items\":[]},{\"key\":\"1-2\",\"primaryText\":\"Weathering\",\"supportingText\":\"Supporting Info\",\"imgSrc\":\"\",\"items\":[]},{\"key\":\"1-3\",\"primaryText\":\"Volcanism\",\"supportingText\":\"Supporting Info\",\"imgSrc\":\"\",\"items\":[]}]},{\"key\":\"2\",\"primaryText\":\"Flow and Transport Through Fractured Rocks\",\"supportingText\":\"Fractures are ubiquitous in geologic media and important in disciplines such as physical and contaminant hydrogeology, geotechnical engineering, civil and environmental engineering, petroleum engineering among other areas.\",\"imgSrc\":\"https://s.brightspace.com/course-images/images/e5fd575a-bc14-4a80-89e1-46f349a76178/tile-high-density-max-size.jpg\",\"items\":[{\"key\":\"2-1\",\"primaryText\":\"Contaminant Transport\",\"supportingText\":\"Supporting Info\",\"imgSrc\":\"\",\"items\":[]},{\"key\":\"2-2\",\"primaryText\":\"Modelling Flow in Fractured Media\",\"supportingText\":\"Supporting Info\",\"imgSrc\":\"\",\"items\":[]}]},{\"key\":\"3\",\"primaryText\":\"Applied Wetland Science\",\"supportingText\":\"Advanced concepts on wetland ecosystems in the context of regional and global earth systems processes such as carbon and nitrogen cycling and climate change, applications of wetland paleoecology, use of isotopes and other geochemical tools in wetland science, and wetland engineering in landscape rehabilitation and ecotechnology.\",\"imgSrc\":\"https://s.brightspace.com/course-images/images/38e839b1-37fa-470c-8830-b189ce4ae134/tile-high-density-max-size.jpg\",\"items\":[{\"key\":\"3-1\",\"primaryText\":\"Carbon & Nitrogen Cycling\",\"supportingText\":\"Supporting Info\",\"imgSrc\":\"\",\"items\":[]},{\"key\":\"3-2\",\"primaryText\":\"Wetland Engineering\",\"supportingText\":\"Supporting Info\",\"imgSrc\":\"\",\"items\":[]}]}]"
6264
+ }
6265
+ ],
6266
+ "properties": [
6267
+ {
6268
+ "name": "items",
6269
+ "attribute": "items",
6270
+ "type": "array",
6271
+ "default": "[{\"key\":\"1\",\"primaryText\":\"Introductory Earth Sciences\",\"supportingText\":\"This course explores the geological processes of the Earth's interior and surface. These include volcanism, earthquakes, mountain building, glaciation and weathering.\",\"imgSrc\":\"https://s.brightspace.com/course-images/images/63b162ab-b582-4bf9-8c1d-1dad04714121/tile-high-density-max-size.jpg\",\"items\":[{\"key\":\"1-1\",\"primaryText\":\"Glaciation\",\"supportingText\":\"Supporting Info\",\"imgSrc\":\"\",\"items\":[]},{\"key\":\"1-2\",\"primaryText\":\"Weathering\",\"supportingText\":\"Supporting Info\",\"imgSrc\":\"\",\"items\":[]},{\"key\":\"1-3\",\"primaryText\":\"Volcanism\",\"supportingText\":\"Supporting Info\",\"imgSrc\":\"\",\"items\":[]}]},{\"key\":\"2\",\"primaryText\":\"Flow and Transport Through Fractured Rocks\",\"supportingText\":\"Fractures are ubiquitous in geologic media and important in disciplines such as physical and contaminant hydrogeology, geotechnical engineering, civil and environmental engineering, petroleum engineering among other areas.\",\"imgSrc\":\"https://s.brightspace.com/course-images/images/e5fd575a-bc14-4a80-89e1-46f349a76178/tile-high-density-max-size.jpg\",\"items\":[{\"key\":\"2-1\",\"primaryText\":\"Contaminant Transport\",\"supportingText\":\"Supporting Info\",\"imgSrc\":\"\",\"items\":[]},{\"key\":\"2-2\",\"primaryText\":\"Modelling Flow in Fractured Media\",\"supportingText\":\"Supporting Info\",\"imgSrc\":\"\",\"items\":[]}]},{\"key\":\"3\",\"primaryText\":\"Applied Wetland Science\",\"supportingText\":\"Advanced concepts on wetland ecosystems in the context of regional and global earth systems processes such as carbon and nitrogen cycling and climate change, applications of wetland paleoecology, use of isotopes and other geochemical tools in wetland science, and wetland engineering in landscape rehabilitation and ecotechnology.\",\"imgSrc\":\"https://s.brightspace.com/course-images/images/38e839b1-37fa-470c-8830-b189ce4ae134/tile-high-density-max-size.jpg\",\"items\":[{\"key\":\"3-1\",\"primaryText\":\"Carbon & Nitrogen Cycling\",\"supportingText\":\"Supporting Info\",\"imgSrc\":\"\",\"items\":[]},{\"key\":\"3-2\",\"primaryText\":\"Wetland Engineering\",\"supportingText\":\"Supporting Info\",\"imgSrc\":\"\",\"items\":[]}]}]"
6272
+ }
6273
+ ]
6274
+ },
6256
6275
  {
6257
6276
  "name": "d2l-demo-list-item-custom",
6258
6277
  "path": "./components/list/demo/list-item-custom.js",
@@ -6269,11 +6288,6 @@
6269
6288
  "type": "boolean",
6270
6289
  "default": "false"
6271
6290
  },
6272
- {
6273
- "name": "draggable",
6274
- "description": "**Drag & drop:** Whether the item is draggable",
6275
- "type": "boolean"
6276
- },
6277
6291
  {
6278
6292
  "name": "drag-handle-text",
6279
6293
  "description": "**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.",
@@ -6284,6 +6298,18 @@
6284
6298
  "description": "**Drag & drop:** Text to drag and drop",
6285
6299
  "type": "string"
6286
6300
  },
6301
+ {
6302
+ "name": "draggable",
6303
+ "description": "**Drag & drop:** Whether the item is draggable",
6304
+ "type": "boolean",
6305
+ "default": "false"
6306
+ },
6307
+ {
6308
+ "name": "drop-nested",
6309
+ "description": "**Drag & drop:** Whether the items can be dropped as nested children",
6310
+ "type": "boolean",
6311
+ "default": "false"
6312
+ },
6287
6313
  {
6288
6314
  "name": "disabled",
6289
6315
  "description": "**Selection:** Disables the input",
@@ -6338,12 +6364,6 @@
6338
6364
  "type": "boolean",
6339
6365
  "default": "false"
6340
6366
  },
6341
- {
6342
- "name": "draggable",
6343
- "attribute": "draggable",
6344
- "description": "**Drag & drop:** Whether the item is draggable",
6345
- "type": "boolean"
6346
- },
6347
6367
  {
6348
6368
  "name": "dragHandleText",
6349
6369
  "attribute": "drag-handle-text",
@@ -6356,6 +6376,20 @@
6356
6376
  "description": "**Drag & drop:** Text to drag and drop",
6357
6377
  "type": "string"
6358
6378
  },
6379
+ {
6380
+ "name": "draggable",
6381
+ "attribute": "draggable",
6382
+ "description": "**Drag & drop:** Whether the item is draggable",
6383
+ "type": "boolean",
6384
+ "default": "false"
6385
+ },
6386
+ {
6387
+ "name": "dropNested",
6388
+ "attribute": "drop-nested",
6389
+ "description": "**Drag & drop:** Whether the items can be dropped as nested children",
6390
+ "type": "boolean",
6391
+ "default": "false"
6392
+ },
6359
6393
  {
6360
6394
  "name": "disabled",
6361
6395
  "attribute": "disabled",
@@ -6415,6 +6449,9 @@
6415
6449
  "name": "d2l-list-item-position-change",
6416
6450
  "description": "Dispatched when a draggable list item's position changes in the list. See [Event Details: d2l-list-item-position-change](#event-details%3A-d2l-list-item-position-change)."
6417
6451
  },
6452
+ {
6453
+ "name": "d2l-list-items-move"
6454
+ },
6418
6455
  {
6419
6456
  "name": "d2l-list-item-selected",
6420
6457
  "description": "Dispatched when the component item is selected"
@@ -6460,11 +6497,6 @@
6460
6497
  "type": "boolean",
6461
6498
  "default": "false"
6462
6499
  },
6463
- {
6464
- "name": "draggable",
6465
- "description": "**Drag & drop:** Whether the item is draggable",
6466
- "type": "boolean"
6467
- },
6468
6500
  {
6469
6501
  "name": "drag-handle-text",
6470
6502
  "description": "**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.",
@@ -6475,6 +6507,18 @@
6475
6507
  "description": "**Drag & drop:** Text to drag and drop",
6476
6508
  "type": "string"
6477
6509
  },
6510
+ {
6511
+ "name": "draggable",
6512
+ "description": "**Drag & drop:** Whether the item is draggable",
6513
+ "type": "boolean",
6514
+ "default": "false"
6515
+ },
6516
+ {
6517
+ "name": "drop-nested",
6518
+ "description": "**Drag & drop:** Whether the items can be dropped as nested children",
6519
+ "type": "boolean",
6520
+ "default": "false"
6521
+ },
6478
6522
  {
6479
6523
  "name": "disabled",
6480
6524
  "description": "**Selection:** Disables the input",
@@ -6528,12 +6572,6 @@
6528
6572
  "type": "boolean",
6529
6573
  "default": "false"
6530
6574
  },
6531
- {
6532
- "name": "draggable",
6533
- "attribute": "draggable",
6534
- "description": "**Drag & drop:** Whether the item is draggable",
6535
- "type": "boolean"
6536
- },
6537
6575
  {
6538
6576
  "name": "dragHandleText",
6539
6577
  "attribute": "drag-handle-text",
@@ -6546,6 +6584,20 @@
6546
6584
  "description": "**Drag & drop:** Text to drag and drop",
6547
6585
  "type": "string"
6548
6586
  },
6587
+ {
6588
+ "name": "draggable",
6589
+ "attribute": "draggable",
6590
+ "description": "**Drag & drop:** Whether the item is draggable",
6591
+ "type": "boolean",
6592
+ "default": "false"
6593
+ },
6594
+ {
6595
+ "name": "dropNested",
6596
+ "attribute": "drop-nested",
6597
+ "description": "**Drag & drop:** Whether the items can be dropped as nested children",
6598
+ "type": "boolean",
6599
+ "default": "false"
6600
+ },
6549
6601
  {
6550
6602
  "name": "disabled",
6551
6603
  "attribute": "disabled",
@@ -6608,6 +6660,9 @@
6608
6660
  "name": "d2l-list-item-position-change",
6609
6661
  "description": "Dispatched when a draggable list item's position changes in the list. See [Event Details: d2l-list-item-position-change](#event-details%3A-d2l-list-item-position-change)."
6610
6662
  },
6663
+ {
6664
+ "name": "d2l-list-items-move"
6665
+ },
6611
6666
  {
6612
6667
  "name": "d2l-list-item-selected",
6613
6668
  "description": "Dispatched when the component item is selected"
@@ -6777,11 +6832,6 @@
6777
6832
  "type": "boolean",
6778
6833
  "default": "false"
6779
6834
  },
6780
- {
6781
- "name": "draggable",
6782
- "description": "**Drag & drop:** Whether the item is draggable",
6783
- "type": "boolean"
6784
- },
6785
6835
  {
6786
6836
  "name": "drag-handle-text",
6787
6837
  "description": "**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.",
@@ -6792,6 +6842,18 @@
6792
6842
  "description": "**Drag & drop:** Text to drag and drop",
6793
6843
  "type": "string"
6794
6844
  },
6845
+ {
6846
+ "name": "draggable",
6847
+ "description": "**Drag & drop:** Whether the item is draggable",
6848
+ "type": "boolean",
6849
+ "default": "false"
6850
+ },
6851
+ {
6852
+ "name": "drop-nested",
6853
+ "description": "**Drag & drop:** Whether the items can be dropped as nested children",
6854
+ "type": "boolean",
6855
+ "default": "false"
6856
+ },
6795
6857
  {
6796
6858
  "name": "disabled",
6797
6859
  "description": "**Selection:** Disables the input",
@@ -6857,12 +6919,6 @@
6857
6919
  "type": "boolean",
6858
6920
  "default": "false"
6859
6921
  },
6860
- {
6861
- "name": "draggable",
6862
- "attribute": "draggable",
6863
- "description": "**Drag & drop:** Whether the item is draggable",
6864
- "type": "boolean"
6865
- },
6866
6922
  {
6867
6923
  "name": "dragHandleText",
6868
6924
  "attribute": "drag-handle-text",
@@ -6875,6 +6931,20 @@
6875
6931
  "description": "**Drag & drop:** Text to drag and drop",
6876
6932
  "type": "string"
6877
6933
  },
6934
+ {
6935
+ "name": "draggable",
6936
+ "attribute": "draggable",
6937
+ "description": "**Drag & drop:** Whether the item is draggable",
6938
+ "type": "boolean",
6939
+ "default": "false"
6940
+ },
6941
+ {
6942
+ "name": "dropNested",
6943
+ "attribute": "drop-nested",
6944
+ "description": "**Drag & drop:** Whether the items can be dropped as nested children",
6945
+ "type": "boolean",
6946
+ "default": "false"
6947
+ },
6878
6948
  {
6879
6949
  "name": "disabled",
6880
6950
  "attribute": "disabled",
@@ -6937,6 +7007,9 @@
6937
7007
  "name": "d2l-list-item-position-change",
6938
7008
  "description": "Dispatched when a draggable list item's position changes in the list. See [Event Details: d2l-list-item-position-change](#event-details%3A-d2l-list-item-position-change)."
6939
7009
  },
7010
+ {
7011
+ "name": "d2l-list-items-move"
7012
+ },
6940
7013
  {
6941
7014
  "name": "d2l-list-item-selected",
6942
7015
  "description": "Dispatched when the component item is selected"
@@ -6968,6 +7041,12 @@
6968
7041
  "type": "'all'|'between'|'none'",
6969
7042
  "default": "\"\\\"all\\\"\""
6970
7043
  },
7044
+ {
7045
+ "name": "drag-multiple",
7046
+ "description": "Whether to the user can drag multiple items",
7047
+ "type": "boolean",
7048
+ "default": "false"
7049
+ },
6971
7050
  {
6972
7051
  "name": "extend-separators",
6973
7052
  "description": "Whether to extend the separators beyond the content's edge",
@@ -6995,6 +7074,13 @@
6995
7074
  "type": "'all'|'between'|'none'",
6996
7075
  "default": "\"\\\"all\\\"\""
6997
7076
  },
7077
+ {
7078
+ "name": "dragMultiple",
7079
+ "attribute": "drag-multiple",
7080
+ "description": "Whether to the user can drag multiple items",
7081
+ "type": "boolean",
7082
+ "default": "false"
7083
+ },
6998
7084
  {
6999
7085
  "name": "extendSeparators",
7000
7086
  "attribute": "extend-separators",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@brightspace-ui/core",
3
- "version": "1.210.0",
3
+ "version": "1.213.0",
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",
@@ -14,7 +14,7 @@
14
14
  "build": "npm run build:clean && npm run build:icons && npm run build:sass",
15
15
  "lint": "npm run lint:eslint && npm run lint:style && npm run lint:lit",
16
16
  "lint:eslint": "eslint . --ext .js,.html",
17
- "lint:lit": "lit-analyzer \"{components,directives,helpers,mixins,templates,test,tools}/**/*.js\" --strict",
17
+ "lint:lit": "lit-analyzer \"{components,controllers,directives,helpers,mixins,templates,test,tools}/**/*.js\" --strict",
18
18
  "lint:style": "stylelint \"**/*.{js,html}\"",
19
19
  "start": "web-dev-server --node-resolve --watch --open",
20
20
  "test": "npm run lint && npm run test:headless && npm run test:axe",
@@ -26,6 +26,7 @@
26
26
  "files": [
27
27
  "custom-elements.json",
28
28
  "/components",
29
+ "/controllers",
29
30
  "/directives",
30
31
  "/generated",
31
32
  "/helpers",
@@ -57,9 +58,10 @@
57
58
  "eslint-plugin-lit": "^1",
58
59
  "eslint-plugin-sort-class-members": "^1",
59
60
  "lit-analyzer": "^1",
60
- "node-sass": "^6",
61
+ "node-sass": "^7",
61
62
  "sinon": "^12",
62
- "stylelint": "^14"
63
+ "stylelint": "^14",
64
+ "web-test-runner-performance": "^0.1.4"
63
65
  },
64
66
  "dependencies": {
65
67
  "@brightspace-ui/intl": "^3",
@@ -1,45 +0,0 @@
1
- import chai from '@open-wc/testing/import-wrappers/chai.js';
2
- import { fixture } from '@open-wc/testing';
3
-
4
- const numComponents = 1000;
5
-
6
- export async function runTest(element) {
7
- return new Promise((resolve) => {
8
-
9
- let total = 0;
10
- let count = 0;
11
- window.d2lPerfTestInProgress = true;
12
- document.body.addEventListener('d2l-component-perf', (e) => {
13
- count++;
14
- total += e.detail.value;
15
- if (count === numComponents) {
16
- const avg = Math.round(total / count);
17
- delete window.d2lPerfTestInProgress;
18
- resolve(avg);
19
- }
20
- });
21
-
22
- for (let i = 0; i < numComponents; i++) {
23
- fixture(element);
24
- }
25
-
26
- });
27
- }
28
-
29
- export const chaiPerf = (_chai, utils) => {
30
-
31
- utils.addMethod(_chai.Assertion.prototype, 'performant', function perfTest(baseline) {
32
- // eslint-disable-next-line no-invalid-this
33
- const fixture = this._obj;
34
- const result = runTest(fixture).then(results => {
35
- new _chai.Assertion(results).to.be.below(baseline);
36
- });
37
- // eslint-disable-next-line no-invalid-this
38
- this.then = result.then.bind(result);
39
- // eslint-disable-next-line no-invalid-this
40
- return this;
41
- });
42
-
43
- };
44
-
45
- chai.use(chaiPerf);