@salesforce/design-system-react 0.10.35 → 0.10.39
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/assets/styles/table.css +70 -0
- package/components/builder-header/utilities.d.ts +20 -0
- package/components/card/__docs__/__snapshots__/storybook-stories.storyshot +20 -5
- package/components/combobox/__docs__/__snapshots__/storybook-stories.storyshot +178 -169
- package/components/combobox/__tests__/combobox.browser-test.jsx +4 -5
- package/components/combobox/combobox.jsx +20 -18
- package/components/component-docs.json +160 -0
- package/components/data-table/__docs__/__snapshots__/storybook-stories.storyshot +17997 -11862
- package/components/data-table/__docs__/storybook-stories.jsx +5 -1
- package/components/data-table/__examples__/advanced-single-select-fixed-header.jsx +1 -0
- package/components/data-table/__examples__/basic-fluid-headless.jsx +105 -0
- package/components/data-table/__examples__/interactive-elements.jsx +14 -0
- package/components/data-table/__examples__/joined-with-page-header.jsx +11 -18
- package/components/data-table/__examples__/resizable-columns.jsx +237 -0
- package/components/data-table/__tests__/data-table.browser-test.jsx +133 -0
- package/components/data-table/column.resizer.d.ts +1 -0
- package/components/data-table/component.json +11 -7
- package/components/data-table/index.jsx +431 -80
- package/components/data-table/private/head.jsx +8 -3
- package/components/data-table/private/header-cell.jsx +9 -1
- package/components/data-table.d.ts +8 -0
- package/components/date-picker/__tests__/__snapshots__/datepicker.dom-snapshot-test.jsx.snap +17 -17
- package/components/expression/__docs__/__snapshots__/storybook-stories.storyshot +90 -90
- package/components/global-header/__docs__/__snapshots__/storybook-stories.storyshot +9 -9
- package/components/index.d.ts +2 -0
- package/components/menu-dropdown/__docs__/__snapshots__/storybook-stories.storyshot +552 -26
- package/components/menu-dropdown/__docs__/storybook-stories.jsx +4 -16
- package/components/menu-dropdown/__examples__/checkmark.jsx +48 -31
- package/components/menu-dropdown/__tests__/dropdown.browser-test.jsx +12 -7
- package/components/modal/__tests__/modal.browser-test.jsx +4 -10
- package/components/portal-settings/__docs__/__snapshots__/storybook-stories.storyshot +6 -6
- package/components/progress-indicator/__docs__/__snapshots__/storybook-stories.storyshot +161 -14
- package/components/progress-indicator/private/step-vertical.jsx +28 -2
- package/components/setup-assistant/__docs__/__snapshots__/storybook-stories.storyshot +180 -13
- package/components/site-stories.js +16 -4
- package/components/utilities/menu-list/index.jsx +3 -0
- package/components/utilities/menu-list/item.jsx +5 -2
- package/components/vertical-navigation/__docs__/__snapshots__/storybook-stories.storyshot +326 -0
- package/components/vertical-navigation/__docs__/storybook-stories.jsx +4 -0
- package/components/vertical-navigation/__examples__/icons.jsx +70 -0
- package/components/vertical-navigation/__examples__/notifications.jsx +66 -0
- package/components/vertical-navigation/component.json +8 -0
- package/components/vertical-navigation/private/item.d.ts +2 -0
- package/components/vertical-navigation/private/item.jsx +23 -1
- package/docs/PULL_REQUEST_TEMPLATE.md +1 -1
- package/lib/assets/styles/table.css +70 -0
- package/lib/components/builder-header/utilities.d.ts +20 -0
- package/lib/components/card/__docs__/__snapshots__/storybook-stories.storyshot +20 -5
- package/lib/components/combobox/__docs__/__snapshots__/storybook-stories.storyshot +178 -169
- package/lib/components/combobox/__tests__/combobox.browser-test.jsx +4 -5
- package/lib/components/combobox/combobox.js +27 -23
- package/lib/components/component-docs.json +160 -0
- package/lib/components/data-table/__docs__/__snapshots__/storybook-stories.storyshot +17997 -11862
- package/lib/components/data-table/__docs__/storybook-stories.jsx +5 -1
- package/lib/components/data-table/__examples__/advanced-single-select-fixed-header.jsx +1 -0
- package/lib/components/data-table/__examples__/basic-fluid-headless.jsx +105 -0
- package/lib/components/data-table/__examples__/interactive-elements.jsx +14 -0
- package/lib/components/data-table/__examples__/joined-with-page-header.jsx +11 -18
- package/lib/components/data-table/__examples__/resizable-columns.jsx +237 -0
- package/lib/components/data-table/__tests__/data-table.browser-test.jsx +133 -0
- package/lib/components/data-table/column.resizer.d.ts +1 -0
- package/lib/components/data-table/component.json +11 -7
- package/lib/components/data-table/index.js +444 -107
- package/lib/components/data-table/private/head.js +8 -3
- package/lib/components/data-table/private/header-cell.js +3 -1
- package/lib/components/data-table.d.ts +8 -0
- package/lib/components/date-picker/__tests__/__snapshots__/datepicker.dom-snapshot-test.jsx.snap +17 -17
- package/lib/components/expression/__docs__/__snapshots__/storybook-stories.storyshot +90 -90
- package/lib/components/global-header/__docs__/__snapshots__/storybook-stories.storyshot +9 -9
- package/lib/components/index.d.ts +2 -0
- package/lib/components/menu-dropdown/__docs__/__snapshots__/storybook-stories.storyshot +552 -26
- package/lib/components/menu-dropdown/__docs__/storybook-stories.jsx +4 -16
- package/lib/components/menu-dropdown/__examples__/checkmark.jsx +48 -31
- package/lib/components/menu-dropdown/__tests__/dropdown.browser-test.jsx +12 -7
- package/lib/components/modal/__tests__/modal.browser-test.jsx +4 -10
- package/lib/components/portal-settings/__docs__/__snapshots__/storybook-stories.storyshot +6 -6
- package/lib/components/progress-indicator/__docs__/__snapshots__/storybook-stories.storyshot +161 -14
- package/lib/components/progress-indicator/private/step-vertical.js +18 -4
- package/lib/components/setup-assistant/__docs__/__snapshots__/storybook-stories.storyshot +180 -13
- package/lib/components/site-stories.js +12 -3
- package/lib/components/utilities/menu-list/index.js +5 -2
- package/lib/components/utilities/menu-list/item.js +3 -2
- package/lib/components/vertical-navigation/__docs__/__snapshots__/storybook-stories.storyshot +326 -0
- package/lib/components/vertical-navigation/__docs__/storybook-stories.jsx +4 -0
- package/lib/components/vertical-navigation/__examples__/icons.jsx +70 -0
- package/lib/components/vertical-navigation/__examples__/notifications.jsx +66 -0
- package/lib/components/vertical-navigation/component.json +8 -0
- package/lib/components/vertical-navigation/private/item.d.ts +2 -0
- package/lib/components/vertical-navigation/private/item.js +5 -1
- package/lib/docs/PULL_REQUEST_TEMPLATE.md +1 -1
- package/lib/package.json +19 -6
- package/module/assets/styles/table.css +70 -0
- package/module/components/builder-header/utilities.d.ts +20 -0
- package/module/components/card/__docs__/__snapshots__/storybook-stories.storyshot +20 -5
- package/module/components/combobox/__docs__/__snapshots__/storybook-stories.storyshot +178 -169
- package/module/components/combobox/__tests__/combobox.browser-test.js +5 -6
- package/module/components/combobox/__tests__/combobox.browser-test.js.map +1 -1
- package/module/components/combobox/combobox.js +27 -23
- package/module/components/combobox/combobox.js.map +1 -1
- package/module/components/component-docs.json +160 -0
- package/module/components/data-table/__docs__/__snapshots__/storybook-stories.storyshot +17997 -11862
- package/module/components/data-table/__docs__/storybook-stories.js +6 -0
- package/module/components/data-table/__docs__/storybook-stories.js.map +1 -1
- package/module/components/data-table/__examples__/advanced-single-select-fixed-header.js +1 -0
- package/module/components/data-table/__examples__/advanced-single-select-fixed-header.js.map +1 -1
- package/module/components/data-table/__examples__/basic-fluid-headless.js +152 -0
- package/module/components/data-table/__examples__/basic-fluid-headless.js.map +1 -0
- package/module/components/data-table/__examples__/interactive-elements.js +9 -0
- package/module/components/data-table/__examples__/interactive-elements.js.map +1 -1
- package/module/components/data-table/__examples__/joined-with-page-header.js +9 -20
- package/module/components/data-table/__examples__/joined-with-page-header.js.map +1 -1
- package/module/components/data-table/__examples__/resizable-columns.js +266 -0
- package/module/components/data-table/__examples__/resizable-columns.js.map +1 -0
- package/module/components/data-table/__tests__/data-table.browser-test.js +99 -0
- package/module/components/data-table/__tests__/data-table.browser-test.js.map +1 -1
- package/module/components/data-table/column.resizer.d.ts +1 -0
- package/module/components/data-table/component.json +11 -7
- package/module/components/data-table/index.js +443 -107
- package/module/components/data-table/index.js.map +1 -1
- package/module/components/data-table/private/head.js +8 -3
- package/module/components/data-table/private/head.js.map +1 -1
- package/module/components/data-table/private/header-cell.js +3 -1
- package/module/components/data-table/private/header-cell.js.map +1 -1
- package/module/components/data-table.d.ts +8 -0
- package/module/components/date-picker/__tests__/__snapshots__/datepicker.dom-snapshot-test.jsx.snap +17 -17
- package/module/components/expression/__docs__/__snapshots__/storybook-stories.storyshot +90 -90
- package/module/components/global-header/__docs__/__snapshots__/storybook-stories.storyshot +9 -9
- package/module/components/index.d.ts +2 -0
- package/module/components/menu-dropdown/__docs__/__snapshots__/storybook-stories.storyshot +552 -26
- package/module/components/menu-dropdown/__docs__/storybook-stories.js +9 -15
- package/module/components/menu-dropdown/__docs__/storybook-stories.js.map +1 -1
- package/module/components/menu-dropdown/__examples__/checkmark.js +53 -33
- package/module/components/menu-dropdown/__examples__/checkmark.js.map +1 -1
- package/module/components/menu-dropdown/__tests__/dropdown.browser-test.js +7 -4
- package/module/components/menu-dropdown/__tests__/dropdown.browser-test.js.map +1 -1
- package/module/components/modal/__tests__/modal.browser-test.js +4 -10
- package/module/components/modal/__tests__/modal.browser-test.js.map +1 -1
- package/module/components/portal-settings/__docs__/__snapshots__/storybook-stories.storyshot +6 -6
- package/module/components/progress-indicator/__docs__/__snapshots__/storybook-stories.storyshot +161 -14
- package/module/components/progress-indicator/private/step-vertical.js +18 -4
- package/module/components/progress-indicator/private/step-vertical.js.map +1 -1
- package/module/components/setup-assistant/__docs__/__snapshots__/storybook-stories.storyshot +180 -13
- package/module/components/site-stories.js +12 -3
- package/module/components/site-stories.js.map +1 -1
- package/module/components/utilities/menu-list/index.js +5 -2
- package/module/components/utilities/menu-list/index.js.map +1 -1
- package/module/components/utilities/menu-list/item.js +3 -2
- package/module/components/utilities/menu-list/item.js.map +1 -1
- package/module/components/vertical-navigation/__docs__/__snapshots__/storybook-stories.storyshot +326 -0
- package/module/components/vertical-navigation/__docs__/storybook-stories.js +10 -0
- package/module/components/vertical-navigation/__docs__/storybook-stories.js.map +1 -1
- package/module/components/vertical-navigation/__examples__/icons.js +149 -0
- package/module/components/vertical-navigation/__examples__/icons.js.map +1 -0
- package/module/components/vertical-navigation/__examples__/notifications.js +143 -0
- package/module/components/vertical-navigation/__examples__/notifications.js.map +1 -0
- package/module/components/vertical-navigation/component.json +8 -0
- package/module/components/vertical-navigation/private/item.d.ts +2 -0
- package/module/components/vertical-navigation/private/item.js +5 -1
- package/module/components/vertical-navigation/private/item.js.map +1 -1
- package/package.json +19 -6
- package/design-system-react-components.js +0 -62702
- package/design-system-react-components.js.map +0 -1
- package/design-system-react-components.min.js +0 -3
- package/design-system-react-components.min.js.LICENSE.txt +0 -83
- package/design-system-react-components.min.js.map +0 -1
- package/design-system-react.js +0 -73487
- package/design-system-react.js.map +0 -1
- package/design-system-react.min.js +0 -3
- package/design-system-react.min.js.LICENSE.txt +0 -83
- package/design-system-react.min.js.map +0 -1
- package/lib/design-system-react-components.min.js.LICENSE.txt +0 -83
- package/lib/design-system-react.min.js.LICENSE.txt +0 -83
package/module/components/vertical-navigation/__docs__/__snapshots__/storybook-stories.storyshot
CHANGED
|
@@ -289,3 +289,329 @@ exports[`DOM snapshots SLDSVerticalNavigation Default 1`] = `
|
|
|
289
289
|
</div>
|
|
290
290
|
</div>
|
|
291
291
|
`;
|
|
292
|
+
|
|
293
|
+
exports[`DOM snapshots SLDSVerticalNavigation With icons 1`] = `
|
|
294
|
+
<div
|
|
295
|
+
className="slds-p-around_medium"
|
|
296
|
+
>
|
|
297
|
+
<div
|
|
298
|
+
style={
|
|
299
|
+
Object {
|
|
300
|
+
"width": "320px",
|
|
301
|
+
}
|
|
302
|
+
}
|
|
303
|
+
>
|
|
304
|
+
<nav
|
|
305
|
+
className="slds-nav-vertical"
|
|
306
|
+
id="sample-navigation"
|
|
307
|
+
>
|
|
308
|
+
<div
|
|
309
|
+
className="slds-nav-vertical__section"
|
|
310
|
+
>
|
|
311
|
+
<h2
|
|
312
|
+
className="slds-nav-vertical__title"
|
|
313
|
+
id="sample-navigation-reports"
|
|
314
|
+
>
|
|
315
|
+
Reports
|
|
316
|
+
</h2>
|
|
317
|
+
<ul>
|
|
318
|
+
<li
|
|
319
|
+
className="slds-nav-vertical__item slds-is-active"
|
|
320
|
+
>
|
|
321
|
+
<a
|
|
322
|
+
aria-current={true}
|
|
323
|
+
aria-describedby="sample-navigation-reports"
|
|
324
|
+
className="slds-nav-vertical__action"
|
|
325
|
+
data-id="recent_reports"
|
|
326
|
+
href="#"
|
|
327
|
+
onClick={[Function]}
|
|
328
|
+
>
|
|
329
|
+
Recent
|
|
330
|
+
</a>
|
|
331
|
+
</li>
|
|
332
|
+
<li
|
|
333
|
+
className="slds-nav-vertical__item"
|
|
334
|
+
>
|
|
335
|
+
<a
|
|
336
|
+
aria-describedby="sample-navigation-reports"
|
|
337
|
+
className="slds-nav-vertical__action"
|
|
338
|
+
data-id="my_reports"
|
|
339
|
+
href="#"
|
|
340
|
+
onClick={[Function]}
|
|
341
|
+
>
|
|
342
|
+
Created by Me
|
|
343
|
+
</a>
|
|
344
|
+
</li>
|
|
345
|
+
<li
|
|
346
|
+
className="slds-nav-vertical__item"
|
|
347
|
+
>
|
|
348
|
+
<a
|
|
349
|
+
aria-describedby="sample-navigation-reports"
|
|
350
|
+
className="slds-nav-vertical__action"
|
|
351
|
+
data-id="private_reports"
|
|
352
|
+
href="#"
|
|
353
|
+
onClick={[Function]}
|
|
354
|
+
>
|
|
355
|
+
Private Reports
|
|
356
|
+
</a>
|
|
357
|
+
</li>
|
|
358
|
+
<li
|
|
359
|
+
className="slds-nav-vertical__item"
|
|
360
|
+
>
|
|
361
|
+
<a
|
|
362
|
+
aria-describedby="sample-navigation-reports"
|
|
363
|
+
className="slds-nav-vertical__action"
|
|
364
|
+
data-id="public_reports"
|
|
365
|
+
href="#"
|
|
366
|
+
onClick={[Function]}
|
|
367
|
+
>
|
|
368
|
+
Public Reports
|
|
369
|
+
</a>
|
|
370
|
+
</li>
|
|
371
|
+
<li
|
|
372
|
+
className="slds-nav-vertical__item"
|
|
373
|
+
>
|
|
374
|
+
<a
|
|
375
|
+
aria-describedby="sample-navigation-reports"
|
|
376
|
+
className="slds-nav-vertical__action"
|
|
377
|
+
data-id="all_reports"
|
|
378
|
+
href="#"
|
|
379
|
+
onClick={[Function]}
|
|
380
|
+
>
|
|
381
|
+
All Reports
|
|
382
|
+
</a>
|
|
383
|
+
</li>
|
|
384
|
+
</ul>
|
|
385
|
+
</div>
|
|
386
|
+
<div
|
|
387
|
+
className="slds-nav-vertical__section"
|
|
388
|
+
>
|
|
389
|
+
<h2
|
|
390
|
+
className="slds-nav-vertical__title"
|
|
391
|
+
id="sample-navigation-folders"
|
|
392
|
+
>
|
|
393
|
+
Folders
|
|
394
|
+
</h2>
|
|
395
|
+
<ul>
|
|
396
|
+
<li
|
|
397
|
+
className="slds-nav-vertical__item"
|
|
398
|
+
>
|
|
399
|
+
<a
|
|
400
|
+
aria-describedby="sample-navigation-folders"
|
|
401
|
+
className="slds-nav-vertical__action"
|
|
402
|
+
data-id="my_folders"
|
|
403
|
+
href="#"
|
|
404
|
+
onClick={[Function]}
|
|
405
|
+
>
|
|
406
|
+
<span>
|
|
407
|
+
<svg
|
|
408
|
+
aria-hidden="true"
|
|
409
|
+
className="slds-m-right_x-small slds-icon slds-icon_x-small slds-icon-text-default"
|
|
410
|
+
>
|
|
411
|
+
<use
|
|
412
|
+
href="/assets/icons/utility-sprite/svg/symbols.svg#open_folder"
|
|
413
|
+
/>
|
|
414
|
+
</svg>
|
|
415
|
+
|
|
416
|
+
</span>
|
|
417
|
+
Created by Me
|
|
418
|
+
</a>
|
|
419
|
+
</li>
|
|
420
|
+
<li
|
|
421
|
+
className="slds-nav-vertical__item"
|
|
422
|
+
>
|
|
423
|
+
<a
|
|
424
|
+
aria-describedby="sample-navigation-folders"
|
|
425
|
+
className="slds-nav-vertical__action"
|
|
426
|
+
data-id="shared_folders"
|
|
427
|
+
href="#"
|
|
428
|
+
onClick={[Function]}
|
|
429
|
+
>
|
|
430
|
+
<span>
|
|
431
|
+
<svg
|
|
432
|
+
aria-hidden="true"
|
|
433
|
+
className="slds-m-right_x-small slds-icon slds-icon_x-small slds-icon-text-default"
|
|
434
|
+
>
|
|
435
|
+
<use
|
|
436
|
+
href="/assets/icons/utility-sprite/svg/symbols.svg#open_folder"
|
|
437
|
+
/>
|
|
438
|
+
</svg>
|
|
439
|
+
|
|
440
|
+
</span>
|
|
441
|
+
Shared with Me
|
|
442
|
+
</a>
|
|
443
|
+
</li>
|
|
444
|
+
<li
|
|
445
|
+
className="slds-nav-vertical__item"
|
|
446
|
+
>
|
|
447
|
+
<a
|
|
448
|
+
aria-describedby="sample-navigation-folders"
|
|
449
|
+
className="slds-nav-vertical__action"
|
|
450
|
+
data-id="all_folders"
|
|
451
|
+
href="#"
|
|
452
|
+
onClick={[Function]}
|
|
453
|
+
>
|
|
454
|
+
All Folders
|
|
455
|
+
</a>
|
|
456
|
+
</li>
|
|
457
|
+
</ul>
|
|
458
|
+
</div>
|
|
459
|
+
</nav>
|
|
460
|
+
</div>
|
|
461
|
+
</div>
|
|
462
|
+
`;
|
|
463
|
+
|
|
464
|
+
exports[`DOM snapshots SLDSVerticalNavigation With notifications 1`] = `
|
|
465
|
+
<div
|
|
466
|
+
className="slds-p-around_medium"
|
|
467
|
+
>
|
|
468
|
+
<div
|
|
469
|
+
style={
|
|
470
|
+
Object {
|
|
471
|
+
"width": "320px",
|
|
472
|
+
}
|
|
473
|
+
}
|
|
474
|
+
>
|
|
475
|
+
<nav
|
|
476
|
+
className="slds-nav-vertical"
|
|
477
|
+
id="sample-navigation"
|
|
478
|
+
>
|
|
479
|
+
<div
|
|
480
|
+
className="slds-nav-vertical__section"
|
|
481
|
+
>
|
|
482
|
+
<h2
|
|
483
|
+
className="slds-nav-vertical__title"
|
|
484
|
+
id="sample-navigation-reports"
|
|
485
|
+
>
|
|
486
|
+
Reports
|
|
487
|
+
</h2>
|
|
488
|
+
<ul>
|
|
489
|
+
<li
|
|
490
|
+
className="slds-nav-vertical__item slds-is-active"
|
|
491
|
+
>
|
|
492
|
+
<a
|
|
493
|
+
aria-current={true}
|
|
494
|
+
aria-describedby="sample-navigation-reports"
|
|
495
|
+
className="slds-nav-vertical__action"
|
|
496
|
+
data-id="recent_reports"
|
|
497
|
+
href="#"
|
|
498
|
+
onClick={[Function]}
|
|
499
|
+
>
|
|
500
|
+
Recent
|
|
501
|
+
</a>
|
|
502
|
+
</li>
|
|
503
|
+
<li
|
|
504
|
+
className="slds-nav-vertical__item"
|
|
505
|
+
>
|
|
506
|
+
<a
|
|
507
|
+
aria-describedby="sample-navigation-reports"
|
|
508
|
+
className="slds-nav-vertical__action"
|
|
509
|
+
data-id="my_reports"
|
|
510
|
+
href="#"
|
|
511
|
+
onClick={[Function]}
|
|
512
|
+
>
|
|
513
|
+
Created by Me
|
|
514
|
+
</a>
|
|
515
|
+
</li>
|
|
516
|
+
<li
|
|
517
|
+
className="slds-nav-vertical__item"
|
|
518
|
+
>
|
|
519
|
+
<a
|
|
520
|
+
aria-describedby="sample-navigation-reports"
|
|
521
|
+
className="slds-nav-vertical__action"
|
|
522
|
+
data-id="private_reports"
|
|
523
|
+
href="#"
|
|
524
|
+
onClick={[Function]}
|
|
525
|
+
>
|
|
526
|
+
Private Reports
|
|
527
|
+
</a>
|
|
528
|
+
</li>
|
|
529
|
+
<li
|
|
530
|
+
className="slds-nav-vertical__item"
|
|
531
|
+
>
|
|
532
|
+
<a
|
|
533
|
+
aria-describedby="sample-navigation-reports"
|
|
534
|
+
className="slds-nav-vertical__action"
|
|
535
|
+
data-id="public_reports"
|
|
536
|
+
href="#"
|
|
537
|
+
onClick={[Function]}
|
|
538
|
+
>
|
|
539
|
+
Public Reports
|
|
540
|
+
</a>
|
|
541
|
+
</li>
|
|
542
|
+
<li
|
|
543
|
+
className="slds-nav-vertical__item"
|
|
544
|
+
>
|
|
545
|
+
<a
|
|
546
|
+
aria-describedby="sample-navigation-reports"
|
|
547
|
+
className="slds-nav-vertical__action"
|
|
548
|
+
data-id="all_reports"
|
|
549
|
+
href="#"
|
|
550
|
+
onClick={[Function]}
|
|
551
|
+
>
|
|
552
|
+
All Reports
|
|
553
|
+
</a>
|
|
554
|
+
</li>
|
|
555
|
+
</ul>
|
|
556
|
+
</div>
|
|
557
|
+
<div
|
|
558
|
+
className="slds-nav-vertical__section"
|
|
559
|
+
>
|
|
560
|
+
<h2
|
|
561
|
+
className="slds-nav-vertical__title"
|
|
562
|
+
id="sample-navigation-folders"
|
|
563
|
+
>
|
|
564
|
+
Folders
|
|
565
|
+
</h2>
|
|
566
|
+
<ul>
|
|
567
|
+
<li
|
|
568
|
+
className="slds-nav-vertical__item"
|
|
569
|
+
>
|
|
570
|
+
<a
|
|
571
|
+
aria-describedby="sample-navigation-folders"
|
|
572
|
+
className="slds-nav-vertical__action"
|
|
573
|
+
data-id="my_folders"
|
|
574
|
+
href="#"
|
|
575
|
+
onClick={[Function]}
|
|
576
|
+
>
|
|
577
|
+
Created by Me
|
|
578
|
+
<span
|
|
579
|
+
className="slds-badge slds-col_bump-left"
|
|
580
|
+
id="notification-badge"
|
|
581
|
+
>
|
|
582
|
+
3
|
|
583
|
+
</span>
|
|
584
|
+
</a>
|
|
585
|
+
</li>
|
|
586
|
+
<li
|
|
587
|
+
className="slds-nav-vertical__item"
|
|
588
|
+
>
|
|
589
|
+
<a
|
|
590
|
+
aria-describedby="sample-navigation-folders"
|
|
591
|
+
className="slds-nav-vertical__action"
|
|
592
|
+
data-id="shared_folders"
|
|
593
|
+
href="#"
|
|
594
|
+
onClick={[Function]}
|
|
595
|
+
>
|
|
596
|
+
Shared with Me
|
|
597
|
+
</a>
|
|
598
|
+
</li>
|
|
599
|
+
<li
|
|
600
|
+
className="slds-nav-vertical__item"
|
|
601
|
+
>
|
|
602
|
+
<a
|
|
603
|
+
aria-describedby="sample-navigation-folders"
|
|
604
|
+
className="slds-nav-vertical__action"
|
|
605
|
+
data-id="all_folders"
|
|
606
|
+
href="#"
|
|
607
|
+
onClick={[Function]}
|
|
608
|
+
>
|
|
609
|
+
All Folders
|
|
610
|
+
</a>
|
|
611
|
+
</li>
|
|
612
|
+
</ul>
|
|
613
|
+
</div>
|
|
614
|
+
</nav>
|
|
615
|
+
</div>
|
|
616
|
+
</div>
|
|
617
|
+
`;
|
|
@@ -4,6 +4,8 @@ import { action } from '@storybook/addon-actions';
|
|
|
4
4
|
import IconSettings from '../../icon-settings';
|
|
5
5
|
import { VERTICAL_NAVIGATION } from '../../../utilities/constants';
|
|
6
6
|
import Default from '../__examples__/default';
|
|
7
|
+
import IconExample from '../__examples__/icons';
|
|
8
|
+
import NotificationExample from '../__examples__/notifications';
|
|
7
9
|
import SnaphotDefault from '../__examples__/snapshot-default';
|
|
8
10
|
storiesOf(VERTICAL_NAVIGATION, module).addDecorator(function (getStory) {
|
|
9
11
|
return /*#__PURE__*/React.createElement("div", {
|
|
@@ -15,6 +17,14 @@ storiesOf(VERTICAL_NAVIGATION, module).addDecorator(function (getStory) {
|
|
|
15
17
|
return /*#__PURE__*/React.createElement(Default, {
|
|
16
18
|
action: action
|
|
17
19
|
});
|
|
20
|
+
}).add('With icons', function () {
|
|
21
|
+
return /*#__PURE__*/React.createElement(IconExample, {
|
|
22
|
+
action: action
|
|
23
|
+
});
|
|
24
|
+
}).add('With notifications', function () {
|
|
25
|
+
return /*#__PURE__*/React.createElement(NotificationExample, {
|
|
26
|
+
action: action
|
|
27
|
+
});
|
|
18
28
|
}).add('DOM Snapshot', function () {
|
|
19
29
|
return /*#__PURE__*/React.createElement(SnaphotDefault, null);
|
|
20
30
|
});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../../.tmp-es/components/vertical-navigation/__docs__/storybook-stories.jsx"],"names":["React","storiesOf","action","IconSettings","VERTICAL_NAVIGATION","Default","SnaphotDefault","module","addDecorator","getStory","add"],"mappings":"AAAA,OAAOA,KAAP,MAAkB,OAAlB;AACA,SAASC,SAAT,QAA0B,kBAA1B;AACA,SAASC,MAAT,QAAuB,0BAAvB;AACA,OAAOC,YAAP,MAAyB,qBAAzB;AAEA,SAASC,mBAAT,QAAoC,8BAApC;AAEA,OAAOC,OAAP,MAAoB,yBAApB;AACA,OAAOC,cAAP,MAA2B,kCAA3B;
|
|
1
|
+
{"version":3,"sources":["../../../../.tmp-es/components/vertical-navigation/__docs__/storybook-stories.jsx"],"names":["React","storiesOf","action","IconSettings","VERTICAL_NAVIGATION","Default","IconExample","NotificationExample","SnaphotDefault","module","addDecorator","getStory","add"],"mappings":"AAAA,OAAOA,KAAP,MAAkB,OAAlB;AACA,SAASC,SAAT,QAA0B,kBAA1B;AACA,SAASC,MAAT,QAAuB,0BAAvB;AACA,OAAOC,YAAP,MAAyB,qBAAzB;AAEA,SAASC,mBAAT,QAAoC,8BAApC;AAEA,OAAOC,OAAP,MAAoB,yBAApB;AACA,OAAOC,WAAP,MAAwB,uBAAxB;AACA,OAAOC,mBAAP,MAAgC,+BAAhC;AACA,OAAOC,cAAP,MAA2B,kCAA3B;AAEAP,SAAS,CAACG,mBAAD,EAAsBK,MAAtB,CAAT,CACEC,YADF,CACe,UAACC,QAAD;AAAA,sBACb;AAAK,IAAA,SAAS,EAAC;AAAf,kBACC,oBAAC,YAAD;AAAc,IAAA,QAAQ,EAAC;AAAvB,KAAwCA,QAAQ,EAAhD,CADD,CADa;AAAA,CADf,EAMEC,GANF,CAMM,SANN,EAMiB;AAAA,sBAAM,oBAAC,OAAD;AAAS,IAAA,MAAM,EAAEV;AAAjB,IAAN;AAAA,CANjB,EAOEU,GAPF,CAOM,YAPN,EAOoB;AAAA,sBAAM,oBAAC,WAAD;AAAa,IAAA,MAAM,EAAEV;AAArB,IAAN;AAAA,CAPpB,EAQEU,GARF,CAQM,oBARN,EAQ4B;AAAA,sBAAM,oBAAC,mBAAD;AAAqB,IAAA,MAAM,EAAEV;AAA7B,IAAN;AAAA,CAR5B,EASEU,GATF,CASM,cATN,EASsB;AAAA,sBAAM,oBAAC,cAAD,OAAN;AAAA,CATtB","sourcesContent":["import React from 'react';\nimport { storiesOf } from '@storybook/react';\nimport { action } from '@storybook/addon-actions';\nimport IconSettings from '../../icon-settings';\n\nimport { VERTICAL_NAVIGATION } from '../../../utilities/constants';\n\nimport Default from '../__examples__/default';\nimport IconExample from '../__examples__/icons';\nimport NotificationExample from '../__examples__/notifications';\nimport SnaphotDefault from '../__examples__/snapshot-default';\n\nstoriesOf(VERTICAL_NAVIGATION, module)\n\t.addDecorator((getStory) => (\n\t\t<div className=\"slds-p-around_medium\">\n\t\t\t<IconSettings iconPath=\"/assets/icons\">{getStory()}</IconSettings>\n\t\t</div>\n\t))\n\t.add('Default', () => <Default action={action} />)\n\t.add('With icons', () => <IconExample action={action} />)\n\t.add('With notifications', () => <NotificationExample action={action} />)\n\t.add('DOM Snapshot', () => <SnaphotDefault />);\n"],"file":"storybook-stories.js"}
|
|
@@ -0,0 +1,149 @@
|
|
|
1
|
+
function _typeof(obj) { "@babel/helpers - typeof"; if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); }
|
|
2
|
+
|
|
3
|
+
function _toConsumableArray(arr) { return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread(); }
|
|
4
|
+
|
|
5
|
+
function _nonIterableSpread() { throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
|
|
6
|
+
|
|
7
|
+
function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
|
|
8
|
+
|
|
9
|
+
function _iterableToArray(iter) { if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter); }
|
|
10
|
+
|
|
11
|
+
function _arrayWithoutHoles(arr) { if (Array.isArray(arr)) return _arrayLikeToArray(arr); }
|
|
12
|
+
|
|
13
|
+
function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; }
|
|
14
|
+
|
|
15
|
+
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
|
16
|
+
|
|
17
|
+
function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }
|
|
18
|
+
|
|
19
|
+
function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }
|
|
20
|
+
|
|
21
|
+
function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); if (superClass) _setPrototypeOf(subClass, superClass); }
|
|
22
|
+
|
|
23
|
+
function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
|
|
24
|
+
|
|
25
|
+
function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }
|
|
26
|
+
|
|
27
|
+
function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === "object" || typeof call === "function")) { return call; } return _assertThisInitialized(self); }
|
|
28
|
+
|
|
29
|
+
function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
|
|
30
|
+
|
|
31
|
+
function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }
|
|
32
|
+
|
|
33
|
+
function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }
|
|
34
|
+
|
|
35
|
+
function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
36
|
+
|
|
37
|
+
/* eslint-disable no-console, react/prop-types */
|
|
38
|
+
import React from 'react';
|
|
39
|
+
import IconSettings from "../../../../components/icon-settings";
|
|
40
|
+
import VerticalNavigation from "../../../../components/vertical-navigation";
|
|
41
|
+
import Icon from "../../../../components/icon";
|
|
42
|
+
var sampleReportWitchIconsCategories = [{
|
|
43
|
+
id: 'reports',
|
|
44
|
+
label: 'Reports',
|
|
45
|
+
items: [{
|
|
46
|
+
id: 'recent_reports',
|
|
47
|
+
label: 'Recent'
|
|
48
|
+
}, {
|
|
49
|
+
id: 'my_reports',
|
|
50
|
+
label: 'Created by Me'
|
|
51
|
+
}, {
|
|
52
|
+
id: 'private_reports',
|
|
53
|
+
label: 'Private Reports'
|
|
54
|
+
}, {
|
|
55
|
+
id: 'public_reports',
|
|
56
|
+
label: 'Public Reports'
|
|
57
|
+
}, {
|
|
58
|
+
id: 'all_reports',
|
|
59
|
+
label: 'All Reports'
|
|
60
|
+
}]
|
|
61
|
+
}, {
|
|
62
|
+
id: 'folders',
|
|
63
|
+
label: 'Folders',
|
|
64
|
+
items: [{
|
|
65
|
+
id: 'my_folders',
|
|
66
|
+
label: 'Created by Me',
|
|
67
|
+
icon: /*#__PURE__*/React.createElement(Icon, {
|
|
68
|
+
category: "utility",
|
|
69
|
+
name: "open_folder",
|
|
70
|
+
size: "x-small"
|
|
71
|
+
})
|
|
72
|
+
}, {
|
|
73
|
+
id: 'shared_folders',
|
|
74
|
+
label: 'Shared with Me',
|
|
75
|
+
icon: /*#__PURE__*/React.createElement(Icon, {
|
|
76
|
+
category: "utility",
|
|
77
|
+
name: "open_folder",
|
|
78
|
+
size: "x-small"
|
|
79
|
+
})
|
|
80
|
+
}, {
|
|
81
|
+
id: 'all_folders',
|
|
82
|
+
label: 'All Folders'
|
|
83
|
+
}]
|
|
84
|
+
}];
|
|
85
|
+
|
|
86
|
+
var Example = /*#__PURE__*/function (_React$Component) {
|
|
87
|
+
_inherits(Example, _React$Component);
|
|
88
|
+
|
|
89
|
+
var _super = _createSuper(Example);
|
|
90
|
+
|
|
91
|
+
function Example() {
|
|
92
|
+
var _this;
|
|
93
|
+
|
|
94
|
+
_classCallCheck(this, Example);
|
|
95
|
+
|
|
96
|
+
for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
|
|
97
|
+
args[_key] = arguments[_key];
|
|
98
|
+
}
|
|
99
|
+
|
|
100
|
+
_this = _super.call.apply(_super, [this].concat(args));
|
|
101
|
+
|
|
102
|
+
_defineProperty(_assertThisInitialized(_this), "state", {
|
|
103
|
+
selectedId: 'recent_reports'
|
|
104
|
+
});
|
|
105
|
+
|
|
106
|
+
return _this;
|
|
107
|
+
}
|
|
108
|
+
|
|
109
|
+
_createClass(Example, [{
|
|
110
|
+
key: "render",
|
|
111
|
+
value: function render() {
|
|
112
|
+
var _this2 = this;
|
|
113
|
+
|
|
114
|
+
return /*#__PURE__*/React.createElement(IconSettings, {
|
|
115
|
+
iconPath: "/assets/icons"
|
|
116
|
+
}, /*#__PURE__*/React.createElement("div", {
|
|
117
|
+
style: {
|
|
118
|
+
width: '320px'
|
|
119
|
+
}
|
|
120
|
+
}, /*#__PURE__*/React.createElement(VerticalNavigation, {
|
|
121
|
+
id: "sample-navigation",
|
|
122
|
+
categories: sampleReportWitchIconsCategories,
|
|
123
|
+
selectedId: this.state.selectedId,
|
|
124
|
+
onSelect: function onSelect(event, data) {
|
|
125
|
+
_this2.setState({
|
|
126
|
+
selectedId: data.item.id
|
|
127
|
+
});
|
|
128
|
+
|
|
129
|
+
if (_this2.props.action) {
|
|
130
|
+
var dataAsArray = Object.keys(data).map(function (key) {
|
|
131
|
+
return data[key];
|
|
132
|
+
});
|
|
133
|
+
|
|
134
|
+
_this2.props.action('onSelect').apply(void 0, [event, data].concat(_toConsumableArray(dataAsArray)));
|
|
135
|
+
} else if (console) {
|
|
136
|
+
console.log('[onSelect] (event, data)', event, data);
|
|
137
|
+
}
|
|
138
|
+
}
|
|
139
|
+
})));
|
|
140
|
+
}
|
|
141
|
+
}]);
|
|
142
|
+
|
|
143
|
+
return Example;
|
|
144
|
+
}(React.Component);
|
|
145
|
+
|
|
146
|
+
_defineProperty(Example, "displayName", 'NavigationExample');
|
|
147
|
+
|
|
148
|
+
export default Example; // export is replaced with `ReactDOM.render(<Example />, mountNode);` at runtime
|
|
149
|
+
//# sourceMappingURL=icons.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../../.tmp-es/components/vertical-navigation/__examples__/icons.jsx"],"names":["React","IconSettings","VerticalNavigation","Icon","sampleReportWitchIconsCategories","id","label","items","icon","Example","selectedId","width","state","event","data","setState","item","props","action","dataAsArray","Object","keys","map","key","console","log","Component"],"mappings":"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","sourcesContent":["/* eslint-disable no-console, react/prop-types */\nimport React from 'react';\n\nimport IconSettings from '~/components/icon-settings';\nimport VerticalNavigation from '~/components/vertical-navigation';\nimport Icon from '~/components/icon';\n\nconst sampleReportWitchIconsCategories = [\n\t{\n\t\tid: 'reports',\n\t\tlabel: 'Reports',\n\t\titems: [\n\t\t\t{ id: 'recent_reports', label: 'Recent' },\n\t\t\t{ id: 'my_reports', label: 'Created by Me' },\n\t\t\t{ id: 'private_reports', label: 'Private Reports' },\n\t\t\t{ id: 'public_reports', label: 'Public Reports' },\n\t\t\t{ id: 'all_reports', label: 'All Reports' },\n\t\t],\n\t},\n\t{\n\t\tid: 'folders',\n\t\tlabel: 'Folders',\n\t\titems: [\n\t\t\t{\n\t\t\t\tid: 'my_folders',\n\t\t\t\tlabel: 'Created by Me',\n\t\t\t\ticon: <Icon category=\"utility\" name=\"open_folder\" size=\"x-small\" />,\n\t\t\t},\n\t\t\t{\n\t\t\t\tid: 'shared_folders',\n\t\t\t\tlabel: 'Shared with Me',\n\t\t\t\ticon: <Icon category=\"utility\" name=\"open_folder\" size=\"x-small\" />,\n\t\t\t},\n\t\t\t{ id: 'all_folders', label: 'All Folders' },\n\t\t],\n\t},\n];\n\nclass Example extends React.Component {\n\tstatic displayName = 'NavigationExample';\n\n\tstate = {\n\t\tselectedId: 'recent_reports',\n\t};\n\n\trender() {\n\t\treturn (\n\t\t\t<IconSettings iconPath=\"/assets/icons\">\n\t\t\t\t<div style={{ width: '320px' }}>\n\t\t\t\t\t<VerticalNavigation\n\t\t\t\t\t\tid=\"sample-navigation\"\n\t\t\t\t\t\tcategories={sampleReportWitchIconsCategories}\n\t\t\t\t\t\tselectedId={this.state.selectedId}\n\t\t\t\t\t\tonSelect={(event, data) => {\n\t\t\t\t\t\t\tthis.setState({ selectedId: data.item.id });\n\t\t\t\t\t\t\tif (this.props.action) {\n\t\t\t\t\t\t\t\tconst dataAsArray = Object.keys(data).map((key) => data[key]);\n\t\t\t\t\t\t\t\tthis.props.action('onSelect')(event, data, ...dataAsArray);\n\t\t\t\t\t\t\t} else if (console) {\n\t\t\t\t\t\t\t\tconsole.log('[onSelect] (event, data)', event, data);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}}\n\t\t\t\t\t/>\n\t\t\t\t</div>\n\t\t\t</IconSettings>\n\t\t);\n\t}\n}\n\nexport default Example; // export is replaced with `ReactDOM.render(<Example />, mountNode);` at runtime\n"],"file":"icons.js"}
|
|
@@ -0,0 +1,143 @@
|
|
|
1
|
+
function _typeof(obj) { "@babel/helpers - typeof"; if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); }
|
|
2
|
+
|
|
3
|
+
function _toConsumableArray(arr) { return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread(); }
|
|
4
|
+
|
|
5
|
+
function _nonIterableSpread() { throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
|
|
6
|
+
|
|
7
|
+
function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
|
|
8
|
+
|
|
9
|
+
function _iterableToArray(iter) { if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter); }
|
|
10
|
+
|
|
11
|
+
function _arrayWithoutHoles(arr) { if (Array.isArray(arr)) return _arrayLikeToArray(arr); }
|
|
12
|
+
|
|
13
|
+
function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; }
|
|
14
|
+
|
|
15
|
+
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
|
16
|
+
|
|
17
|
+
function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }
|
|
18
|
+
|
|
19
|
+
function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }
|
|
20
|
+
|
|
21
|
+
function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); if (superClass) _setPrototypeOf(subClass, superClass); }
|
|
22
|
+
|
|
23
|
+
function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
|
|
24
|
+
|
|
25
|
+
function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }
|
|
26
|
+
|
|
27
|
+
function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === "object" || typeof call === "function")) { return call; } return _assertThisInitialized(self); }
|
|
28
|
+
|
|
29
|
+
function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
|
|
30
|
+
|
|
31
|
+
function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }
|
|
32
|
+
|
|
33
|
+
function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }
|
|
34
|
+
|
|
35
|
+
function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
36
|
+
|
|
37
|
+
/* eslint-disable no-console, react/prop-types */
|
|
38
|
+
import React from 'react';
|
|
39
|
+
import IconSettings from "../../../../components/icon-settings";
|
|
40
|
+
import VerticalNavigation from "../../../../components/vertical-navigation";
|
|
41
|
+
import Badge from "../../../../components/badge";
|
|
42
|
+
var sampleReportWitchNotificationCategories = [{
|
|
43
|
+
id: 'reports',
|
|
44
|
+
label: 'Reports',
|
|
45
|
+
items: [{
|
|
46
|
+
id: 'recent_reports',
|
|
47
|
+
label: 'Recent'
|
|
48
|
+
}, {
|
|
49
|
+
id: 'my_reports',
|
|
50
|
+
label: 'Created by Me'
|
|
51
|
+
}, {
|
|
52
|
+
id: 'private_reports',
|
|
53
|
+
label: 'Private Reports'
|
|
54
|
+
}, {
|
|
55
|
+
id: 'public_reports',
|
|
56
|
+
label: 'Public Reports'
|
|
57
|
+
}, {
|
|
58
|
+
id: 'all_reports',
|
|
59
|
+
label: 'All Reports'
|
|
60
|
+
}]
|
|
61
|
+
}, {
|
|
62
|
+
id: 'folders',
|
|
63
|
+
label: 'Folders',
|
|
64
|
+
items: [{
|
|
65
|
+
id: 'my_folders',
|
|
66
|
+
label: 'Created by Me',
|
|
67
|
+
notificationBadge: /*#__PURE__*/React.createElement(Badge, {
|
|
68
|
+
content: "3",
|
|
69
|
+
id: "notification-badge"
|
|
70
|
+
})
|
|
71
|
+
}, {
|
|
72
|
+
id: 'shared_folders',
|
|
73
|
+
label: 'Shared with Me'
|
|
74
|
+
}, {
|
|
75
|
+
id: 'all_folders',
|
|
76
|
+
label: 'All Folders'
|
|
77
|
+
}]
|
|
78
|
+
}];
|
|
79
|
+
|
|
80
|
+
var Example = /*#__PURE__*/function (_React$Component) {
|
|
81
|
+
_inherits(Example, _React$Component);
|
|
82
|
+
|
|
83
|
+
var _super = _createSuper(Example);
|
|
84
|
+
|
|
85
|
+
function Example() {
|
|
86
|
+
var _this;
|
|
87
|
+
|
|
88
|
+
_classCallCheck(this, Example);
|
|
89
|
+
|
|
90
|
+
for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
|
|
91
|
+
args[_key] = arguments[_key];
|
|
92
|
+
}
|
|
93
|
+
|
|
94
|
+
_this = _super.call.apply(_super, [this].concat(args));
|
|
95
|
+
|
|
96
|
+
_defineProperty(_assertThisInitialized(_this), "state", {
|
|
97
|
+
selectedId: 'recent_reports'
|
|
98
|
+
});
|
|
99
|
+
|
|
100
|
+
return _this;
|
|
101
|
+
}
|
|
102
|
+
|
|
103
|
+
_createClass(Example, [{
|
|
104
|
+
key: "render",
|
|
105
|
+
value: function render() {
|
|
106
|
+
var _this2 = this;
|
|
107
|
+
|
|
108
|
+
return /*#__PURE__*/React.createElement(IconSettings, {
|
|
109
|
+
iconPath: "/assets/icons"
|
|
110
|
+
}, /*#__PURE__*/React.createElement("div", {
|
|
111
|
+
style: {
|
|
112
|
+
width: '320px'
|
|
113
|
+
}
|
|
114
|
+
}, /*#__PURE__*/React.createElement(VerticalNavigation, {
|
|
115
|
+
id: "sample-navigation",
|
|
116
|
+
categories: sampleReportWitchNotificationCategories,
|
|
117
|
+
selectedId: this.state.selectedId,
|
|
118
|
+
onSelect: function onSelect(event, data) {
|
|
119
|
+
_this2.setState({
|
|
120
|
+
selectedId: data.item.id
|
|
121
|
+
});
|
|
122
|
+
|
|
123
|
+
if (_this2.props.action) {
|
|
124
|
+
var dataAsArray = Object.keys(data).map(function (key) {
|
|
125
|
+
return data[key];
|
|
126
|
+
});
|
|
127
|
+
|
|
128
|
+
_this2.props.action('onSelect').apply(void 0, [event, data].concat(_toConsumableArray(dataAsArray)));
|
|
129
|
+
} else if (console) {
|
|
130
|
+
console.log('[onSelect] (event, data)', event, data);
|
|
131
|
+
}
|
|
132
|
+
}
|
|
133
|
+
})));
|
|
134
|
+
}
|
|
135
|
+
}]);
|
|
136
|
+
|
|
137
|
+
return Example;
|
|
138
|
+
}(React.Component);
|
|
139
|
+
|
|
140
|
+
_defineProperty(Example, "displayName", 'NavigationExample');
|
|
141
|
+
|
|
142
|
+
export default Example; // export is replaced with `ReactDOM.render(<Example />, mountNode);` at runtime
|
|
143
|
+
//# sourceMappingURL=notifications.js.map
|