carbon-components-angular 5.28.1 → 5.28.3
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.
- package/docs/documentation/components/DropdownList.html +41 -27
- package/docs/documentation/components/TreeNodeComponent.html +96 -50
- package/docs/documentation/coverage.html +4 -4
- package/docs/documentation/interfaces/Node.html +47 -1
- package/docs/documentation/js/search/search_index.js +2 -2
- package/docs/documentation/modules/ToggleModule/dependencies.svg +4 -4
- package/docs/documentation/modules/ToggleModule.html +4 -4
- package/docs/documentation/modules/ToggletipModule/dependencies.svg +37 -37
- package/docs/documentation/modules/ToggletipModule.html +37 -37
- package/docs/documentation/modules/TooltipModule/dependencies.svg +4 -4
- package/docs/documentation/modules/TooltipModule.html +4 -4
- package/docs/documentation/modules/TreeviewModule/dependencies.svg +34 -34
- package/docs/documentation/modules/TreeviewModule.html +34 -34
- package/docs/documentation.json +155 -138
- package/docs/storybook/{3224.a6cd0578.iframe.bundle.js → 3224.2942835b.iframe.bundle.js} +1 -1
- package/docs/storybook/iframe.html +2 -2
- package/docs/storybook/main.01f7c071.iframe.bundle.js +1 -0
- package/docs/storybook/project.json +1 -1
- package/docs/storybook/{runtime~main.ad02d1c9.iframe.bundle.js → runtime~main.e288ebe6.iframe.bundle.js} +1 -1
- package/docs/storybook/{treeview-treeview-stories.0b6b2e75.iframe.bundle.js → treeview-treeview-stories.67d5b54c.iframe.bundle.js} +1 -1
- package/esm2020/dropdown/list/dropdown-list.component.mjs +22 -10
- package/esm2020/treeview/tree-node.component.mjs +30 -7
- package/esm2020/treeview/tree-node.types.mjs +1 -1
- package/esm2020/treeview/treeview.component.mjs +1 -1
- package/fesm2015/carbon-components-angular-dropdown.mjs +21 -9
- package/fesm2015/carbon-components-angular-dropdown.mjs.map +1 -1
- package/fesm2015/carbon-components-angular-treeview.mjs +37 -14
- package/fesm2015/carbon-components-angular-treeview.mjs.map +1 -1
- package/fesm2020/carbon-components-angular-dropdown.mjs +21 -9
- package/fesm2020/carbon-components-angular-dropdown.mjs.map +1 -1
- package/fesm2020/carbon-components-angular-treeview.mjs +30 -7
- package/fesm2020/carbon-components-angular-treeview.mjs.map +1 -1
- package/package.json +1 -1
- package/treeview/tree-node.component.d.ts +2 -1
- package/treeview/tree-node.types.d.ts +1 -0
- package/docs/storybook/main.498528cf.iframe.bundle.js +0 -1
|
@@ -836,8 +836,8 @@ ArrowUp -> emit event</p>
|
|
|
836
836
|
|
|
837
837
|
<tr>
|
|
838
838
|
<td class="col-md-4">
|
|
839
|
-
<div class="io-line">Defined in <a href="" data-line="
|
|
840
|
-
class="link-to-prism">src/dropdown/list/dropdown-list.component.ts:
|
|
839
|
+
<div class="io-line">Defined in <a href="" data-line="551"
|
|
840
|
+
class="link-to-prism">src/dropdown/list/dropdown-list.component.ts:551</a></div>
|
|
841
841
|
</td>
|
|
842
842
|
</tr>
|
|
843
843
|
|
|
@@ -977,8 +977,8 @@ ArrowUp -> emit event</p>
|
|
|
977
977
|
|
|
978
978
|
<tr>
|
|
979
979
|
<td class="col-md-4">
|
|
980
|
-
<div class="io-line">Defined in <a href="" data-line="
|
|
981
|
-
class="link-to-prism">src/dropdown/list/dropdown-list.component.ts:
|
|
980
|
+
<div class="io-line">Defined in <a href="" data-line="586"
|
|
981
|
+
class="link-to-prism">src/dropdown/list/dropdown-list.component.ts:586</a></div>
|
|
982
982
|
</td>
|
|
983
983
|
</tr>
|
|
984
984
|
|
|
@@ -1572,8 +1572,8 @@ ArrowUp -> emit event</p>
|
|
|
1572
1572
|
|
|
1573
1573
|
<tr>
|
|
1574
1574
|
<td class="col-md-4">
|
|
1575
|
-
<div class="io-line">Defined in <a href="" data-line="
|
|
1576
|
-
class="link-to-prism">src/dropdown/list/dropdown-list.component.ts:
|
|
1575
|
+
<div class="io-line">Defined in <a href="" data-line="493"
|
|
1576
|
+
class="link-to-prism">src/dropdown/list/dropdown-list.component.ts:493</a></div>
|
|
1577
1577
|
</td>
|
|
1578
1578
|
</tr>
|
|
1579
1579
|
|
|
@@ -1611,8 +1611,8 @@ ArrowUp -> emit event</p>
|
|
|
1611
1611
|
|
|
1612
1612
|
<tr>
|
|
1613
1613
|
<td class="col-md-4">
|
|
1614
|
-
<div class="io-line">Defined in <a href="" data-line="
|
|
1615
|
-
class="link-to-prism">src/dropdown/list/dropdown-list.component.ts:
|
|
1614
|
+
<div class="io-line">Defined in <a href="" data-line="519"
|
|
1615
|
+
class="link-to-prism">src/dropdown/list/dropdown-list.component.ts:519</a></div>
|
|
1616
1616
|
</td>
|
|
1617
1617
|
</tr>
|
|
1618
1618
|
|
|
@@ -1759,8 +1759,8 @@ Additionally, any Observables for the <code>DropdownList</code> are initialized.
|
|
|
1759
1759
|
|
|
1760
1760
|
<tr>
|
|
1761
1761
|
<td class="col-md-4">
|
|
1762
|
-
<div class="io-line">Defined in <a href="" data-line="
|
|
1763
|
-
class="link-to-prism">src/dropdown/list/dropdown-list.component.ts:
|
|
1762
|
+
<div class="io-line">Defined in <a href="" data-line="577"
|
|
1763
|
+
class="link-to-prism">src/dropdown/list/dropdown-list.component.ts:577</a></div>
|
|
1764
1764
|
</td>
|
|
1765
1765
|
</tr>
|
|
1766
1766
|
|
|
@@ -1822,8 +1822,8 @@ Additionally, any Observables for the <code>DropdownList</code> are initialized.
|
|
|
1822
1822
|
|
|
1823
1823
|
<tr>
|
|
1824
1824
|
<td class="col-md-4">
|
|
1825
|
-
<div class="io-line">Defined in <a href="" data-line="
|
|
1826
|
-
class="link-to-prism">src/dropdown/list/dropdown-list.component.ts:
|
|
1825
|
+
<div class="io-line">Defined in <a href="" data-line="571"
|
|
1826
|
+
class="link-to-prism">src/dropdown/list/dropdown-list.component.ts:571</a></div>
|
|
1827
1827
|
</td>
|
|
1828
1828
|
</tr>
|
|
1829
1829
|
|
|
@@ -1885,8 +1885,8 @@ Additionally, any Observables for the <code>DropdownList</code> are initialized.
|
|
|
1885
1885
|
|
|
1886
1886
|
<tr>
|
|
1887
1887
|
<td class="col-md-4">
|
|
1888
|
-
<div class="io-line">Defined in <a href="" data-line="
|
|
1889
|
-
class="link-to-prism">src/dropdown/list/dropdown-list.component.ts:
|
|
1888
|
+
<div class="io-line">Defined in <a href="" data-line="596"
|
|
1889
|
+
class="link-to-prism">src/dropdown/list/dropdown-list.component.ts:596</a></div>
|
|
1890
1890
|
</td>
|
|
1891
1891
|
</tr>
|
|
1892
1892
|
|
|
@@ -2023,8 +2023,8 @@ Additionally, any Observables for the <code>DropdownList</code> are initialized.
|
|
|
2023
2023
|
|
|
2024
2024
|
<tr>
|
|
2025
2025
|
<td class="col-md-4">
|
|
2026
|
-
<div class="io-line">Defined in <a href="" data-line="
|
|
2027
|
-
class="link-to-prism">src/dropdown/list/dropdown-list.component.ts:
|
|
2026
|
+
<div class="io-line">Defined in <a href="" data-line="601"
|
|
2027
|
+
class="link-to-prism">src/dropdown/list/dropdown-list.component.ts:601</a></div>
|
|
2028
2028
|
</td>
|
|
2029
2029
|
</tr>
|
|
2030
2030
|
|
|
@@ -2130,8 +2130,8 @@ key input matching the first letter of the item in the list.</p>
|
|
|
2130
2130
|
|
|
2131
2131
|
<tr>
|
|
2132
2132
|
<td class="col-md-4">
|
|
2133
|
-
<div class="io-line">Defined in <a href="" data-line="
|
|
2134
|
-
class="link-to-prism">src/dropdown/list/dropdown-list.component.ts:
|
|
2133
|
+
<div class="io-line">Defined in <a href="" data-line="504"
|
|
2134
|
+
class="link-to-prism">src/dropdown/list/dropdown-list.component.ts:504</a></div>
|
|
2135
2135
|
</td>
|
|
2136
2136
|
</tr>
|
|
2137
2137
|
|
|
@@ -3223,24 +3223,38 @@ export class DropdownList implements AbstractDropdownView, AfterViewInit, OnDest
|
|
|
3223
3223
|
console.error(`${this.constructor.name}.propagateSelected expects an Array<ListItem>, got ${JSON.stringify(value)}`);
|
|
3224
3224
|
}
|
|
3225
3225
|
this.onItemsReady(() => {
|
|
3226
|
+
const selectedNewItems = [];
|
|
3227
|
+
for (let newItem of value) {
|
|
3228
|
+
if (newItem && newItem.selected) {
|
|
3229
|
+
// copy the item
|
|
3230
|
+
let tempNewItem: string | ListItem = Object.assign({}, newItem);
|
|
3231
|
+
// deleted selected because it's what we _want_ to change
|
|
3232
|
+
delete tempNewItem.selected;
|
|
3233
|
+
// stringify for compare later
|
|
3234
|
+
tempNewItem = JSON.stringify(tempNewItem);
|
|
3235
|
+
// add to the list of selected items
|
|
3236
|
+
selectedNewItems.push(tempNewItem);
|
|
3237
|
+
}
|
|
3238
|
+
}
|
|
3239
|
+
|
|
3226
3240
|
// loop through the list items and update the `selected` state for matching items in `value`
|
|
3227
3241
|
for (let oldItem of this.getListItems()) {
|
|
3242
|
+
// fast path when no items are selected
|
|
3243
|
+
if (selectedNewItems.length === 0) {
|
|
3244
|
+
oldItem.selected = false;
|
|
3245
|
+
continue;
|
|
3246
|
+
}
|
|
3247
|
+
|
|
3228
3248
|
// copy the item
|
|
3229
3249
|
let tempOldItem: string | ListItem = Object.assign({}, oldItem);
|
|
3230
3250
|
// deleted selected because it's what we _want_ to change
|
|
3231
3251
|
delete tempOldItem.selected;
|
|
3232
3252
|
// stringify for compare
|
|
3233
3253
|
tempOldItem = JSON.stringify(tempOldItem);
|
|
3234
|
-
for (let
|
|
3235
|
-
// copy the item
|
|
3236
|
-
let tempNewItem: string | ListItem = Object.assign({}, newItem);
|
|
3237
|
-
// deleted selected because it's what we _want_ to change
|
|
3238
|
-
delete tempNewItem.selected;
|
|
3239
|
-
// stringify for compare
|
|
3240
|
-
tempNewItem = JSON.stringify(tempNewItem);
|
|
3254
|
+
for (let selectedNewItem of selectedNewItems) {
|
|
3241
3255
|
// do the compare
|
|
3242
|
-
if (tempOldItem.includes(
|
|
3243
|
-
oldItem.selected =
|
|
3256
|
+
if (tempOldItem.includes(selectedNewItem)) {
|
|
3257
|
+
oldItem.selected = true;
|
|
3244
3258
|
// if we've found a matching item, we can stop looping
|
|
3245
3259
|
break;
|
|
3246
3260
|
} else {
|