@pingux/astro 1.36.0-alpha.1 → 1.36.1-alpha.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 +11 -0
- package/lib/cjs/components/NavBar/NavBar.stories.js +10 -1
- package/lib/cjs/components/NavBar/NavBar.test.js +7 -0
- package/lib/cjs/components/NavBarSection/NavBarSection.js +5 -3
- package/lib/components/NavBar/NavBar.stories.js +10 -1
- package/lib/components/NavBar/NavBar.test.js +7 -0
- package/lib/components/NavBarSection/NavBarSection.js +7 -3
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
@@ -3,6 +3,17 @@
|
|
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
|
+
# [1.36.0](https://gitlab.corp.pingidentity.com/ux/pingux/compare/@pingux/astro@1.35.0...@pingux/astro@1.36.0) (2022-11-15)
|
7
|
+
|
8
|
+
|
9
|
+
### Features
|
10
|
+
|
11
|
+
* [UIP-5880] UiLibraryOverride theme - resolve navBar style conflicts ([d960e1f](https://gitlab.corp.pingidentity.com/ux/pingux/commit/d960e1f6f89794e7f56b73cd9a9d3766784118c3))
|
12
|
+
|
13
|
+
|
14
|
+
|
15
|
+
|
16
|
+
|
6
17
|
# [1.35.0](https://gitlab.corp.pingidentity.com/ux/pingux/compare/@pingux/astro@1.34.0...@pingux/astro@1.35.0) (2022-11-10)
|
7
18
|
|
8
19
|
|
@@ -128,9 +128,10 @@ var logo = (0, _react2.jsx)("svg", {
|
|
128
128
|
fill: "white"
|
129
129
|
}));
|
130
130
|
var data = [{
|
131
|
+
'data-id': 'dashboard-data-id',
|
132
|
+
heading: 'Dashboard',
|
131
133
|
icon: _ViewDashboardIcon["default"],
|
132
134
|
key: 'Dashboard',
|
133
|
-
heading: 'Dashboard',
|
134
135
|
children: [(0, _react2.jsx)(_index.NavBarItemLink, {
|
135
136
|
key: "Dashboard Link Group",
|
136
137
|
id: "Dashboard Link Group",
|
@@ -142,6 +143,7 @@ var data = [{
|
|
142
143
|
href: "https://pingidentity.com/"
|
143
144
|
}, "Populations")]
|
144
145
|
}, {
|
146
|
+
'data-id': 'identities-data-id',
|
145
147
|
icon: _AccountMultipleIcon["default"],
|
146
148
|
key: 'Identities',
|
147
149
|
heading: 'Identities',
|
@@ -167,6 +169,7 @@ var data = [{
|
|
167
169
|
href: "https://pingidentity.com/"
|
168
170
|
}, "Roles")]
|
169
171
|
}, {
|
172
|
+
'data-id': 'connections-data-id',
|
170
173
|
icon: _TransitConnectionVariantIcon["default"],
|
171
174
|
key: 'Connections',
|
172
175
|
heading: 'Connections',
|
@@ -225,6 +228,7 @@ var data = [{
|
|
225
228
|
href: "https://pingidentity.com/"
|
226
229
|
}, "Resources")]
|
227
230
|
}, {
|
231
|
+
'data-id': 'experiences-data-id',
|
228
232
|
icon: _EmoticonHappyOutlineIcon["default"],
|
229
233
|
key: 'Experiences',
|
230
234
|
heading: 'Experiences',
|
@@ -284,6 +288,7 @@ var data = [{
|
|
284
288
|
}, "Sender")]
|
285
289
|
}];
|
286
290
|
var secondData = [{
|
291
|
+
'data-id': 'mfa-data-id',
|
287
292
|
icon: _FingerprintIcon["default"],
|
288
293
|
key: 'MFA',
|
289
294
|
heading: 'MFA',
|
@@ -298,6 +303,7 @@ var secondData = [{
|
|
298
303
|
id: "MFA Button Group"
|
299
304
|
}, "Group Test")]
|
300
305
|
}, {
|
306
|
+
'data-id': 'risk-data-id',
|
301
307
|
icon: _ScaleBalanceIcon["default"],
|
302
308
|
key: 'Risk',
|
303
309
|
heading: 'Risk',
|
@@ -312,6 +318,7 @@ var secondData = [{
|
|
312
318
|
id: "Risk Button Group"
|
313
319
|
}, "Group")]
|
314
320
|
}, {
|
321
|
+
'data-id': 'verify-data-id',
|
315
322
|
icon: Verify,
|
316
323
|
key: 'Verify',
|
317
324
|
heading: 'Verify',
|
@@ -326,6 +333,7 @@ var secondData = [{
|
|
326
333
|
id: "Verify Button Group"
|
327
334
|
}, "Group")]
|
328
335
|
}, {
|
336
|
+
'data-id': 'credentials-data-id',
|
329
337
|
icon: Credentials,
|
330
338
|
key: 'Credentials',
|
331
339
|
heading: 'Credentials',
|
@@ -341,6 +349,7 @@ var secondData = [{
|
|
341
349
|
}, "Group")]
|
342
350
|
}];
|
343
351
|
var thirdData = [{
|
352
|
+
'data-id': 'environment-data-id',
|
344
353
|
icon: _EarthIcon["default"],
|
345
354
|
key: 'Environment',
|
346
355
|
heading: 'Environment title that is so long, it wraps',
|
@@ -35,7 +35,10 @@ var _testWrapper = require("../../utils/testUtils/testWrapper");
|
|
35
35
|
var _react2 = require("@emotion/react");
|
36
36
|
|
37
37
|
var DATA_ID = 'data-id';
|
38
|
+
var SECTION_BUTTON_DATA_ID = 'section-data-id';
|
38
39
|
var data = [{
|
40
|
+
'data-id': SECTION_BUTTON_DATA_ID,
|
41
|
+
'data-testid': SECTION_BUTTON_DATA_ID,
|
39
42
|
icon: _GlobeIcon["default"],
|
40
43
|
key: 'Overview',
|
41
44
|
heading: 'Overview',
|
@@ -361,4 +364,8 @@ test('should change focus between nav children on arrow key press', function ()
|
|
361
364
|
test('should render NavBarSection with data-id', function () {
|
362
365
|
getComponent();
|
363
366
|
expect(_testWrapper.screen.getByTestId(DATA_ID)).toHaveAttribute(DATA_ID);
|
367
|
+
});
|
368
|
+
test('should render NavBarSection button with data-id', function () {
|
369
|
+
getComponent();
|
370
|
+
expect(_testWrapper.screen.getByTestId(SECTION_BUTTON_DATA_ID)).toHaveAttribute(DATA_ID);
|
364
371
|
});
|
@@ -44,7 +44,8 @@ var _NavBarItemHeader = _interopRequireDefault(require("./NavBarItemHeader"));
|
|
44
44
|
|
45
45
|
var _react2 = require("@emotion/react");
|
46
46
|
|
47
|
-
var _excluded = ["hasSeparator", "title", "items"]
|
47
|
+
var _excluded = ["hasSeparator", "title", "items"],
|
48
|
+
_excluded2 = ["key", "children"];
|
48
49
|
|
49
50
|
function _getRequireWildcardCache(nodeInterop) { if (typeof _WeakMap !== "function") return null; var cacheBabelInterop = new _WeakMap(); var cacheNodeInterop = new _WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
|
50
51
|
|
@@ -96,7 +97,8 @@ var NavBarSection = function NavBarSection(_ref) {
|
|
96
97
|
var SectionItem = function SectionItem(_ref2) {
|
97
98
|
var item = _ref2.item;
|
98
99
|
var key = item.key,
|
99
|
-
children = item.children
|
100
|
+
children = item.children,
|
101
|
+
others = (0, _objectWithoutProperties2["default"])(item, _excluded2);
|
100
102
|
var headerButtonRef = (0, _react.useRef)();
|
101
103
|
var navBarState = (0, _NavBarContext.useNavBarContext)();
|
102
104
|
var expandedKeys = navBarState.expandedKeys,
|
@@ -171,7 +173,7 @@ var SectionItem = function SectionItem(_ref2) {
|
|
171
173
|
onPress: function onPress() {
|
172
174
|
return onExpandedChange(!isExpanded);
|
173
175
|
}
|
174
|
-
}, keyboardProps), (0, _react2.jsx)(_NavBarItemHeader["default"], {
|
176
|
+
}, keyboardProps, others), (0, _react2.jsx)(_NavBarItemHeader["default"], {
|
175
177
|
item: item
|
176
178
|
})), isExpanded && (0, _react2.jsx)(_NavBarItemBody["default"], {
|
177
179
|
item: item,
|
@@ -104,9 +104,10 @@ var logo = ___EmotionJSX("svg", {
|
|
104
104
|
}));
|
105
105
|
|
106
106
|
var data = [{
|
107
|
+
'data-id': 'dashboard-data-id',
|
108
|
+
heading: 'Dashboard',
|
107
109
|
icon: ViewDashboard,
|
108
110
|
key: 'Dashboard',
|
109
|
-
heading: 'Dashboard',
|
110
111
|
children: [___EmotionJSX(NavBarItemLink, {
|
111
112
|
key: "Dashboard Link Group",
|
112
113
|
id: "Dashboard Link Group",
|
@@ -118,6 +119,7 @@ var data = [{
|
|
118
119
|
href: "https://pingidentity.com/"
|
119
120
|
}, "Populations")]
|
120
121
|
}, {
|
122
|
+
'data-id': 'identities-data-id',
|
121
123
|
icon: AccountMultiple,
|
122
124
|
key: 'Identities',
|
123
125
|
heading: 'Identities',
|
@@ -143,6 +145,7 @@ var data = [{
|
|
143
145
|
href: "https://pingidentity.com/"
|
144
146
|
}, "Roles")]
|
145
147
|
}, {
|
148
|
+
'data-id': 'connections-data-id',
|
146
149
|
icon: TransitConnection,
|
147
150
|
key: 'Connections',
|
148
151
|
heading: 'Connections',
|
@@ -201,6 +204,7 @@ var data = [{
|
|
201
204
|
href: "https://pingidentity.com/"
|
202
205
|
}, "Resources")]
|
203
206
|
}, {
|
207
|
+
'data-id': 'experiences-data-id',
|
204
208
|
icon: EmoticonHappy,
|
205
209
|
key: 'Experiences',
|
206
210
|
heading: 'Experiences',
|
@@ -260,6 +264,7 @@ var data = [{
|
|
260
264
|
}, "Sender")]
|
261
265
|
}];
|
262
266
|
var secondData = [{
|
267
|
+
'data-id': 'mfa-data-id',
|
263
268
|
icon: Fingerprint,
|
264
269
|
key: 'MFA',
|
265
270
|
heading: 'MFA',
|
@@ -274,6 +279,7 @@ var secondData = [{
|
|
274
279
|
id: "MFA Button Group"
|
275
280
|
}, "Group Test")]
|
276
281
|
}, {
|
282
|
+
'data-id': 'risk-data-id',
|
277
283
|
icon: ScaleBalance,
|
278
284
|
key: 'Risk',
|
279
285
|
heading: 'Risk',
|
@@ -288,6 +294,7 @@ var secondData = [{
|
|
288
294
|
id: "Risk Button Group"
|
289
295
|
}, "Group")]
|
290
296
|
}, {
|
297
|
+
'data-id': 'verify-data-id',
|
291
298
|
icon: Verify,
|
292
299
|
key: 'Verify',
|
293
300
|
heading: 'Verify',
|
@@ -302,6 +309,7 @@ var secondData = [{
|
|
302
309
|
id: "Verify Button Group"
|
303
310
|
}, "Group")]
|
304
311
|
}, {
|
312
|
+
'data-id': 'credentials-data-id',
|
305
313
|
icon: Credentials,
|
306
314
|
key: 'Credentials',
|
307
315
|
heading: 'Credentials',
|
@@ -317,6 +325,7 @@ var secondData = [{
|
|
317
325
|
}, "Group")]
|
318
326
|
}];
|
319
327
|
var thirdData = [{
|
328
|
+
'data-id': 'environment-data-id',
|
320
329
|
icon: Earth,
|
321
330
|
key: 'Environment',
|
322
331
|
heading: 'Environment title that is so long, it wraps',
|
@@ -15,7 +15,10 @@ import axeTest from '../../utils/testUtils/testAxe';
|
|
15
15
|
import { render, screen, fireEvent } from '../../utils/testUtils/testWrapper';
|
16
16
|
import { jsx as ___EmotionJSX } from "@emotion/react";
|
17
17
|
var DATA_ID = 'data-id';
|
18
|
+
var SECTION_BUTTON_DATA_ID = 'section-data-id';
|
18
19
|
var data = [{
|
20
|
+
'data-id': SECTION_BUTTON_DATA_ID,
|
21
|
+
'data-testid': SECTION_BUTTON_DATA_ID,
|
19
22
|
icon: GlobeIcon,
|
20
23
|
key: 'Overview',
|
21
24
|
heading: 'Overview',
|
@@ -288,4 +291,8 @@ test('should change focus between nav children on arrow key press', function ()
|
|
288
291
|
test('should render NavBarSection with data-id', function () {
|
289
292
|
getComponent();
|
290
293
|
expect(screen.getByTestId(DATA_ID)).toHaveAttribute(DATA_ID);
|
294
|
+
});
|
295
|
+
test('should render NavBarSection button with data-id', function () {
|
296
|
+
getComponent();
|
297
|
+
expect(screen.getByTestId(SECTION_BUTTON_DATA_ID)).toHaveAttribute(DATA_ID);
|
291
298
|
});
|
@@ -3,7 +3,8 @@ import _extends from "@babel/runtime-corejs3/helpers/esm/extends";
|
|
3
3
|
import _mapInstanceProperty from "@babel/runtime-corejs3/core-js-stable/instance/map";
|
4
4
|
import _filterInstanceProperty from "@babel/runtime-corejs3/core-js-stable/instance/filter";
|
5
5
|
import _objectWithoutProperties from "@babel/runtime-corejs3/helpers/esm/objectWithoutProperties";
|
6
|
-
var _excluded = ["hasSeparator", "title", "items"]
|
6
|
+
var _excluded = ["hasSeparator", "title", "items"],
|
7
|
+
_excluded2 = ["key", "children"];
|
7
8
|
import React, { useRef } from 'react';
|
8
9
|
import { useFocusManager } from '@react-aria/focus';
|
9
10
|
import { useKeyboard } from '@react-aria/interactions';
|
@@ -63,8 +64,11 @@ var NavBarSection = function NavBarSection(_ref) {
|
|
63
64
|
|
64
65
|
var SectionItem = function SectionItem(_ref2) {
|
65
66
|
var item = _ref2.item;
|
67
|
+
|
66
68
|
var key = item.key,
|
67
|
-
children = item.children
|
69
|
+
children = item.children,
|
70
|
+
others = _objectWithoutProperties(item, _excluded2);
|
71
|
+
|
68
72
|
var headerButtonRef = useRef();
|
69
73
|
var navBarState = useNavBarContext();
|
70
74
|
var expandedKeys = navBarState.expandedKeys,
|
@@ -139,7 +143,7 @@ var SectionItem = function SectionItem(_ref2) {
|
|
139
143
|
onPress: function onPress() {
|
140
144
|
return onExpandedChange(!isExpanded);
|
141
145
|
}
|
142
|
-
}, keyboardProps), ___EmotionJSX(NavBarItemHeader, {
|
146
|
+
}, keyboardProps, others), ___EmotionJSX(NavBarItemHeader, {
|
143
147
|
item: item
|
144
148
|
})), isExpanded && ___EmotionJSX(NavBarItemBody, {
|
145
149
|
item: item,
|