@instructure/ui-drilldown 10.25.1-snapshot-13 → 10.26.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.
- package/CHANGELOG.md +6 -1
- package/es/Drilldown/index.js +8 -5
- package/lib/Drilldown/index.js +8 -5
- package/package.json +20 -20
- package/src/Drilldown/DrilldownPage/props.ts +1 -1
- package/src/Drilldown/index.tsx +10 -8
- package/tsconfig.build.tsbuildinfo +1 -1
- package/types/Drilldown/DrilldownPage/index.d.ts.map +1 -1
- package/types/Drilldown/DrilldownPage/props.d.ts +1 -1
- package/types/Drilldown/DrilldownPage/props.d.ts.map +1 -1
- package/types/Drilldown/index.d.ts.map +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
All notable changes to this project will be documented in this file.
|
|
4
4
|
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
|
5
5
|
|
|
6
|
-
|
|
6
|
+
# [10.26.0](https://github.com/instructure/instructure-ui/compare/v10.25.0...v10.26.0) (2025-10-01)
|
|
7
7
|
|
|
8
8
|
|
|
9
9
|
### Bug Fixes
|
|
@@ -11,6 +11,11 @@ See [Conventional Commits](https://conventionalcommits.org) for commit guideline
|
|
|
11
11
|
* **ui-utils,ui-drilldown:** make NDVA read options in Drilldown.Group correctly in Firefox ([994f158](https://github.com/instructure/instructure-ui/commit/994f15887ff7e1112208031514aa7e0ae134231b))
|
|
12
12
|
|
|
13
13
|
|
|
14
|
+
### Features
|
|
15
|
+
|
|
16
|
+
* **ui-drilldown:** make Drilldown.Page handle optional Options ([18f6a06](https://github.com/instructure/instructure-ui/commit/18f6a06f6a8b69ed0cd83bae7c11395f34375e9a))
|
|
17
|
+
|
|
18
|
+
|
|
14
19
|
|
|
15
20
|
|
|
16
21
|
|
package/es/Drilldown/index.js
CHANGED
|
@@ -641,11 +641,14 @@ let Drilldown = (_dec = withDeterministicId(), _dec2 = withStyle(generateStyle,
|
|
|
641
641
|
let containsDuplicate = false;
|
|
642
642
|
const childMap = new Map();
|
|
643
643
|
for (const child of children) {
|
|
644
|
-
|
|
645
|
-
|
|
646
|
-
|
|
647
|
-
|
|
648
|
-
|
|
644
|
+
var _child$props2;
|
|
645
|
+
if (child && typeof child === 'object' && (_child$props2 = child.props) !== null && _child$props2 !== void 0 && _child$props2.id) {
|
|
646
|
+
if (!childMap.has(child.props.id)) {
|
|
647
|
+
childMap.set(child.props.id, true);
|
|
648
|
+
} else {
|
|
649
|
+
warn(false, `Duplicate id: "${child.props.id}"! Make sure all options have unique ids, otherwise they won't be rendered.`);
|
|
650
|
+
return containsDuplicate = true;
|
|
651
|
+
}
|
|
649
652
|
}
|
|
650
653
|
}
|
|
651
654
|
return containsDuplicate;
|
package/lib/Drilldown/index.js
CHANGED
|
@@ -650,11 +650,14 @@ let Drilldown = exports.Drilldown = (_dec = (0, _withDeterministicId.withDetermi
|
|
|
650
650
|
let containsDuplicate = false;
|
|
651
651
|
const childMap = new Map();
|
|
652
652
|
for (const child of children) {
|
|
653
|
-
|
|
654
|
-
|
|
655
|
-
|
|
656
|
-
|
|
657
|
-
|
|
653
|
+
var _child$props2;
|
|
654
|
+
if (child && typeof child === 'object' && (_child$props2 = child.props) !== null && _child$props2 !== void 0 && _child$props2.id) {
|
|
655
|
+
if (!childMap.has(child.props.id)) {
|
|
656
|
+
childMap.set(child.props.id, true);
|
|
657
|
+
} else {
|
|
658
|
+
(0, _console.warn)(false, `Duplicate id: "${child.props.id}"! Make sure all options have unique ids, otherwise they won't be rendered.`);
|
|
659
|
+
return containsDuplicate = true;
|
|
660
|
+
}
|
|
658
661
|
}
|
|
659
662
|
}
|
|
660
663
|
return containsDuplicate;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@instructure/ui-drilldown",
|
|
3
|
-
"version": "10.
|
|
3
|
+
"version": "10.26.0",
|
|
4
4
|
"description": "A drilldown menu component",
|
|
5
5
|
"author": "Instructure, Inc. Engineering and Product Design",
|
|
6
6
|
"module": "./es/index.js",
|
|
@@ -24,28 +24,28 @@
|
|
|
24
24
|
"license": "MIT",
|
|
25
25
|
"dependencies": {
|
|
26
26
|
"@babel/runtime": "^7.27.6",
|
|
27
|
-
"@instructure/console": "10.
|
|
28
|
-
"@instructure/emotion": "10.
|
|
29
|
-
"@instructure/shared-types": "10.
|
|
30
|
-
"@instructure/ui-dom-utils": "10.
|
|
31
|
-
"@instructure/ui-icons": "10.
|
|
32
|
-
"@instructure/ui-options": "10.
|
|
33
|
-
"@instructure/ui-popover": "10.
|
|
34
|
-
"@instructure/ui-position": "10.
|
|
35
|
-
"@instructure/ui-prop-types": "10.
|
|
36
|
-
"@instructure/ui-react-utils": "10.
|
|
37
|
-
"@instructure/ui-selectable": "10.
|
|
38
|
-
"@instructure/ui-testable": "10.
|
|
39
|
-
"@instructure/ui-utils": "10.
|
|
40
|
-
"@instructure/ui-view": "10.
|
|
27
|
+
"@instructure/console": "10.26.0",
|
|
28
|
+
"@instructure/emotion": "10.26.0",
|
|
29
|
+
"@instructure/shared-types": "10.26.0",
|
|
30
|
+
"@instructure/ui-dom-utils": "10.26.0",
|
|
31
|
+
"@instructure/ui-icons": "10.26.0",
|
|
32
|
+
"@instructure/ui-options": "10.26.0",
|
|
33
|
+
"@instructure/ui-popover": "10.26.0",
|
|
34
|
+
"@instructure/ui-position": "10.26.0",
|
|
35
|
+
"@instructure/ui-prop-types": "10.26.0",
|
|
36
|
+
"@instructure/ui-react-utils": "10.26.0",
|
|
37
|
+
"@instructure/ui-selectable": "10.26.0",
|
|
38
|
+
"@instructure/ui-testable": "10.26.0",
|
|
39
|
+
"@instructure/ui-utils": "10.26.0",
|
|
40
|
+
"@instructure/ui-view": "10.26.0",
|
|
41
41
|
"prop-types": "^15.8.1"
|
|
42
42
|
},
|
|
43
43
|
"devDependencies": {
|
|
44
|
-
"@instructure/ui-axe-check": "10.
|
|
45
|
-
"@instructure/ui-babel-preset": "10.
|
|
46
|
-
"@instructure/ui-color-utils": "10.
|
|
47
|
-
"@instructure/ui-scripts": "10.
|
|
48
|
-
"@instructure/ui-themes": "10.
|
|
44
|
+
"@instructure/ui-axe-check": "10.26.0",
|
|
45
|
+
"@instructure/ui-babel-preset": "10.26.0",
|
|
46
|
+
"@instructure/ui-color-utils": "10.26.0",
|
|
47
|
+
"@instructure/ui-scripts": "10.26.0",
|
|
48
|
+
"@instructure/ui-themes": "10.26.0",
|
|
49
49
|
"@testing-library/jest-dom": "^6.6.3",
|
|
50
50
|
"@testing-library/react": "^16.0.1",
|
|
51
51
|
"@testing-library/user-event": "^14.6.1",
|
|
@@ -39,7 +39,7 @@ import DrilldownSeparator from '../DrilldownSeparator'
|
|
|
39
39
|
import type { OptionChild, SeparatorChild, GroupChild } from '../props'
|
|
40
40
|
import { Renderable } from '@instructure/shared-types'
|
|
41
41
|
|
|
42
|
-
type PageChildren = GroupChild | OptionChild | SeparatorChild
|
|
42
|
+
type PageChildren = GroupChild | OptionChild | SeparatorChild | null | false
|
|
43
43
|
|
|
44
44
|
type DrilldownPageOwnProps = {
|
|
45
45
|
id: string
|
package/src/Drilldown/index.tsx
CHANGED
|
@@ -528,15 +528,17 @@ class Drilldown extends Component<DrilldownProps, DrilldownState> {
|
|
|
528
528
|
const childMap = new Map<string, boolean>()
|
|
529
529
|
|
|
530
530
|
for (const child of children) {
|
|
531
|
-
if (
|
|
532
|
-
childMap.
|
|
533
|
-
|
|
534
|
-
|
|
535
|
-
|
|
536
|
-
|
|
537
|
-
|
|
531
|
+
if (child && typeof child === 'object' && child.props?.id) {
|
|
532
|
+
if (!childMap.has(child.props.id)) {
|
|
533
|
+
childMap.set(child.props.id, true)
|
|
534
|
+
} else {
|
|
535
|
+
warn(
|
|
536
|
+
false,
|
|
537
|
+
`Duplicate id: "${child.props.id}"! Make sure all options have unique ids, otherwise they won't be rendered.`
|
|
538
|
+
)
|
|
538
539
|
|
|
539
|
-
|
|
540
|
+
return (containsDuplicate = true)
|
|
541
|
+
}
|
|
540
542
|
}
|
|
541
543
|
}
|
|
542
544
|
|