carbon-components-angular 5.28.2 → 5.28.4
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/README.md +1 -1
- package/docs/documentation/components/ComboBox.html +20 -16
- package/docs/documentation/components/DropdownList.html +41 -27
- package/docs/documentation/index.html +1 -1
- package/docs/documentation/js/search/search_index.js +2 -2
- package/docs/documentation/modules/TagModule/dependencies.svg +4 -4
- package/docs/documentation/modules/TagModule.html +4 -4
- package/docs/documentation/modules/ThemeModule/dependencies.svg +13 -13
- package/docs/documentation/modules/ThemeModule.html +13 -13
- package/docs/documentation/modules/TilesModule/dependencies.svg +101 -101
- package/docs/documentation/modules/TilesModule.html +101 -101
- package/docs/documentation/modules/TimePickerModule/dependencies.svg +42 -46
- package/docs/documentation/modules/TimePickerModule.html +42 -46
- package/docs/documentation/modules/TimePickerSelectModule/dependencies.svg +41 -45
- package/docs/documentation/modules/TimePickerSelectModule.html +41 -45
- package/docs/documentation/modules/ToggleModule/dependencies.svg +44 -40
- package/docs/documentation/modules/ToggleModule.html +44 -40
- package/docs/documentation/modules/TooltipModule/dependencies.svg +4 -4
- package/docs/documentation/modules/TooltipModule.html +4 -4
- package/docs/documentation/modules/TreeviewModule/dependencies.svg +28 -28
- package/docs/documentation/modules/TreeviewModule.html +28 -28
- package/docs/documentation/modules/UIShellModule/dependencies.svg +4 -4
- package/docs/documentation/modules/UIShellModule.html +4 -4
- package/docs/documentation.json +19 -19
- package/docs/storybook/{3224.a6cd0578.iframe.bundle.js → 3224.2942835b.iframe.bundle.js} +1 -1
- package/docs/storybook/{combobox-combobox-stories.92875119.iframe.bundle.js → combobox-combobox-stories.57374785.iframe.bundle.js} +1 -1
- package/docs/storybook/iframe.html +2 -2
- package/docs/storybook/main.7bcedca9.iframe.bundle.js +1 -0
- package/docs/storybook/project.json +1 -1
- package/docs/storybook/{runtime~main.65e5750e.iframe.bundle.js → runtime~main.6f9ba53e.iframe.bundle.js} +1 -1
- package/esm2020/combobox/combobox.component.mjs +4 -1
- package/esm2020/dropdown/list/dropdown-list.component.mjs +22 -10
- package/fesm2015/carbon-components-angular-combobox.mjs +3 -0
- package/fesm2015/carbon-components-angular-combobox.mjs.map +1 -1
- package/fesm2015/carbon-components-angular-dropdown.mjs +21 -9
- package/fesm2015/carbon-components-angular-dropdown.mjs.map +1 -1
- package/fesm2020/carbon-components-angular-combobox.mjs +3 -0
- package/fesm2020/carbon-components-angular-combobox.mjs.map +1 -1
- package/fesm2020/carbon-components-angular-dropdown.mjs +21 -9
- package/fesm2020/carbon-components-angular-dropdown.mjs.map +1 -1
- package/package.json +1 -1
- package/docs/storybook/main.7f1e6078.iframe.bundle.js +0 -1
package/README.md
CHANGED
|
@@ -101,7 +101,7 @@ How to read this table:
|
|
|
101
101
|
- **if you are contributing a fix**:
|
|
102
102
|
- add your fix, update the documentation as needed
|
|
103
103
|
- consider adding or modifying a test case to cover the fix
|
|
104
|
-
- follow the [Angular style guide](https://angular.
|
|
104
|
+
- follow the [Angular style guide](https://angular.dev/style-guide)
|
|
105
105
|
- be sure to run `npm test` and `npm run lint` to make sure the tests and linter pass
|
|
106
106
|
- submit a PR
|
|
107
107
|
|
|
@@ -1899,8 +1899,8 @@ Multi-select comboboxes also provide "pills" of selected items.</p>
|
|
|
1899
1899
|
|
|
1900
1900
|
<tr>
|
|
1901
1901
|
<td class="col-md-4">
|
|
1902
|
-
<div class="io-line">Defined in <a href="" data-line="
|
|
1903
|
-
class="link-to-prism">src/combobox/combobox.component.ts:
|
|
1902
|
+
<div class="io-line">Defined in <a href="" data-line="825"
|
|
1903
|
+
class="link-to-prism">src/combobox/combobox.component.ts:825</a></div>
|
|
1904
1904
|
</td>
|
|
1905
1905
|
</tr>
|
|
1906
1906
|
|
|
@@ -1938,8 +1938,8 @@ Multi-select comboboxes also provide "pills" of selected items.</p>
|
|
|
1938
1938
|
|
|
1939
1939
|
<tr>
|
|
1940
1940
|
<td class="col-md-4">
|
|
1941
|
-
<div class="io-line">Defined in <a href="" data-line="
|
|
1942
|
-
class="link-to-prism">src/combobox/combobox.component.ts:
|
|
1941
|
+
<div class="io-line">Defined in <a href="" data-line="836"
|
|
1942
|
+
class="link-to-prism">src/combobox/combobox.component.ts:836</a></div>
|
|
1943
1943
|
</td>
|
|
1944
1944
|
</tr>
|
|
1945
1945
|
|
|
@@ -1977,8 +1977,8 @@ Multi-select comboboxes also provide "pills" of selected items.</p>
|
|
|
1977
1977
|
|
|
1978
1978
|
<tr>
|
|
1979
1979
|
<td class="col-md-4">
|
|
1980
|
-
<div class="io-line">Defined in <a href="" data-line="
|
|
1981
|
-
class="link-to-prism">src/combobox/combobox.component.ts:
|
|
1980
|
+
<div class="io-line">Defined in <a href="" data-line="805"
|
|
1981
|
+
class="link-to-prism">src/combobox/combobox.component.ts:805</a></div>
|
|
1982
1982
|
</td>
|
|
1983
1983
|
</tr>
|
|
1984
1984
|
|
|
@@ -2083,8 +2083,8 @@ Multi-select comboboxes also provide "pills" of selected items.</p>
|
|
|
2083
2083
|
|
|
2084
2084
|
<tr>
|
|
2085
2085
|
<td class="col-md-4">
|
|
2086
|
-
<div class="io-line">Defined in <a href="" data-line="
|
|
2087
|
-
class="link-to-prism">src/combobox/combobox.component.ts:
|
|
2086
|
+
<div class="io-line">Defined in <a href="" data-line="865"
|
|
2087
|
+
class="link-to-prism">src/combobox/combobox.component.ts:865</a></div>
|
|
2088
2088
|
</td>
|
|
2089
2089
|
</tr>
|
|
2090
2090
|
|
|
@@ -2148,8 +2148,8 @@ Multi-select comboboxes also provide "pills" of selected items.</p>
|
|
|
2148
2148
|
|
|
2149
2149
|
<tr>
|
|
2150
2150
|
<td class="col-md-4">
|
|
2151
|
-
<div class="io-line">Defined in <a href="" data-line="
|
|
2152
|
-
class="link-to-prism">src/combobox/combobox.component.ts:
|
|
2151
|
+
<div class="io-line">Defined in <a href="" data-line="845"
|
|
2152
|
+
class="link-to-prism">src/combobox/combobox.component.ts:845</a></div>
|
|
2153
2153
|
</td>
|
|
2154
2154
|
</tr>
|
|
2155
2155
|
|
|
@@ -2190,8 +2190,8 @@ This can be overridden by passing in a value to the <code>dropUp</code> input.</
|
|
|
2190
2190
|
|
|
2191
2191
|
<tr>
|
|
2192
2192
|
<td class="col-md-4">
|
|
2193
|
-
<div class="io-line">Defined in <a href="" data-line="
|
|
2194
|
-
class="link-to-prism">src/combobox/combobox.component.ts:
|
|
2193
|
+
<div class="io-line">Defined in <a href="" data-line="886"
|
|
2194
|
+
class="link-to-prism">src/combobox/combobox.component.ts:886</a></div>
|
|
2195
2195
|
</td>
|
|
2196
2196
|
</tr>
|
|
2197
2197
|
|
|
@@ -2476,8 +2476,8 @@ This can be overridden by passing in a value to the <code>dropUp</code> input.</
|
|
|
2476
2476
|
|
|
2477
2477
|
<tr>
|
|
2478
2478
|
<td class="col-md-4">
|
|
2479
|
-
<div class="io-line">Defined in <a href="" data-line="
|
|
2480
|
-
class="link-to-prism">src/combobox/combobox.component.ts:
|
|
2479
|
+
<div class="io-line">Defined in <a href="" data-line="798"
|
|
2480
|
+
class="link-to-prism">src/combobox/combobox.component.ts:798</a></div>
|
|
2481
2481
|
</td>
|
|
2482
2482
|
</tr>
|
|
2483
2483
|
|
|
@@ -3242,8 +3242,8 @@ Updates pills if necessary.</p>
|
|
|
3242
3242
|
|
|
3243
3243
|
<tr>
|
|
3244
3244
|
<td class="col-md-4">
|
|
3245
|
-
<div class="io-line">Defined in <a href="" data-line="
|
|
3246
|
-
class="link-to-prism">src/combobox/combobox.component.ts:
|
|
3245
|
+
<div class="io-line">Defined in <a href="" data-line="874"
|
|
3246
|
+
class="link-to-prism">src/combobox/combobox.component.ts:874</a></div>
|
|
3247
3247
|
</td>
|
|
3248
3248
|
</tr>
|
|
3249
3249
|
|
|
@@ -5352,6 +5352,10 @@ export class ComboBox implements OnChanges, AfterViewInit, AfterContentInit, OnD
|
|
|
5352
5352
|
clearInput(event) {
|
|
5353
5353
|
event.stopPropagation();
|
|
5354
5354
|
event.preventDefault();
|
|
5355
|
+
|
|
5356
|
+
if (this.disabled) {
|
|
5357
|
+
return;
|
|
5358
|
+
}
|
|
5355
5359
|
|
|
5356
5360
|
if (this.type === "single") { // don't want to clear selected or close if multi
|
|
5357
5361
|
this.clearSelected(event);
|
|
@@ -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 {
|
|
@@ -280,7 +280,7 @@ $ npm i --save carbon-components-angular @carbon/styles</code></pre></div><p
|
|
|
280
280
|
<li>consider adding or modifying a test case to cover the fix</li>
|
|
281
281
|
</ul>
|
|
282
282
|
</li>
|
|
283
|
-
<li>follow the <a href="https://angular.
|
|
283
|
+
<li>follow the <a href="https://angular.dev/style-guide">Angular style guide</a></li>
|
|
284
284
|
<li>be sure to run <code>npm test</code> and <code>npm run lint</code> to make sure the tests and linter pass</li>
|
|
285
285
|
<li>submit a PR</li>
|
|
286
286
|
</ul>
|