carbon-components-angular 5.21.0 → 5.22.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.
Files changed (73) hide show
  1. package/datepicker/datepicker.component.d.ts +4 -39
  2. package/docs/documentation/components/DatePicker.html +108 -103
  3. package/docs/documentation/components/SideNav.html +59 -15
  4. package/docs/documentation/components/SideNavItem.html +123 -44
  5. package/docs/documentation/components/SideNavMenu.html +67 -25
  6. package/docs/documentation/coverage.html +10 -10
  7. package/docs/documentation/js/menu-wc.js +3 -3
  8. package/docs/documentation/js/menu-wc_es5.js +1 -1
  9. package/docs/documentation/js/search/search_index.js +2 -2
  10. package/docs/documentation/modules/SideNavModule.html +2 -1
  11. package/docs/documentation/modules/ThemeModule/dependencies.svg +15 -15
  12. package/docs/documentation/modules/ThemeModule.html +15 -15
  13. package/docs/documentation/modules/TilesModule/dependencies.svg +99 -99
  14. package/docs/documentation/modules/TilesModule.html +99 -99
  15. package/docs/documentation/modules/TimePickerModule/dependencies.svg +4 -4
  16. package/docs/documentation/modules/TimePickerModule.html +4 -4
  17. package/docs/documentation/modules/TimePickerSelectModule/dependencies.svg +45 -49
  18. package/docs/documentation/modules/TimePickerSelectModule.html +45 -49
  19. package/docs/documentation/modules/ToggleModule/dependencies.svg +26 -26
  20. package/docs/documentation/modules/ToggleModule.html +26 -26
  21. package/docs/documentation/modules/TooltipModule/dependencies.svg +29 -29
  22. package/docs/documentation/modules/TooltipModule.html +29 -29
  23. package/docs/documentation/modules/TreeviewModule/dependencies.svg +36 -36
  24. package/docs/documentation/modules/TreeviewModule.html +36 -36
  25. package/docs/documentation.json +225 -132
  26. package/docs/storybook/{1325.5502bfb0.iframe.bundle.js → 1325.3c39c950.iframe.bundle.js} +1 -1
  27. package/docs/storybook/3348.4c108918.iframe.bundle.js +1 -0
  28. package/docs/storybook/{checkbox-checkbox-stories.ea872c08.iframe.bundle.js → checkbox-checkbox-stories.3aeae19d.iframe.bundle.js} +1 -1
  29. package/docs/storybook/{content-switcher-content-switcher-stories.2f8cdd41.iframe.bundle.js → content-switcher-content-switcher-stories.8f3aa078.iframe.bundle.js} +1 -1
  30. package/docs/storybook/{grid-css-grid-stories.f5c396e2.iframe.bundle.js → grid-css-grid-stories.c703f9de.iframe.bundle.js} +1 -1
  31. package/docs/storybook/{grid-grid-stories.0b935617.iframe.bundle.js → grid-grid-stories.f7a88c02.iframe.bundle.js} +1 -1
  32. package/docs/storybook/iframe.html +2 -2
  33. package/docs/storybook/index.json +1 -1
  34. package/docs/storybook/{layer-layer-stories.8fdeec80.iframe.bundle.js → layer-layer-stories.9fc41371.iframe.bundle.js} +1 -1
  35. package/docs/storybook/{layout-stack-stories.e9f0fa18.iframe.bundle.js → layout-stack-stories.799a681c.iframe.bundle.js} +1 -1
  36. package/docs/storybook/{link-link-stories.23f8a587.iframe.bundle.js → link-link-stories.9e3dd976.iframe.bundle.js} +1 -1
  37. package/docs/storybook/{list-list-stories.79350958.iframe.bundle.js → list-list-stories.e906cf67.iframe.bundle.js} +1 -1
  38. package/docs/storybook/{loading-loading-stories.9594d513.iframe.bundle.js → loading-loading-stories.261bc118.iframe.bundle.js} +1 -1
  39. package/docs/storybook/main.d4ed0d37.iframe.bundle.js +1 -0
  40. package/docs/storybook/{popover-popover-stories.e8d6e7c9.iframe.bundle.js → popover-popover-stories.cc1684df.iframe.bundle.js} +1 -1
  41. package/docs/storybook/project.json +1 -1
  42. package/docs/storybook/{runtime~main.386e82b8.iframe.bundle.js → runtime~main.2883decf.iframe.bundle.js} +1 -1
  43. package/docs/storybook/{skeleton-skeleton-stories.48ffb189.iframe.bundle.js → skeleton-skeleton-stories.77f9485f.iframe.bundle.js} +1 -1
  44. package/docs/storybook/{slider-slider-stories.f608c3ca.iframe.bundle.js → slider-slider-stories.0a70e102.iframe.bundle.js} +1 -1
  45. package/docs/storybook/stories.json +1 -1
  46. package/docs/storybook/tabs-tabs-stories.183f4129.iframe.bundle.js +1 -0
  47. package/docs/storybook/{theme-theme-stories.781e4fdc.iframe.bundle.js → theme-theme-stories.66e1727e.iframe.bundle.js} +1 -1
  48. package/docs/storybook/{toggle-toggle-stories.7b2e3bc9.iframe.bundle.js → toggle-toggle-stories.def6c644.iframe.bundle.js} +1 -1
  49. package/docs/storybook/toggletip-toggletip-stories.22e37008.iframe.bundle.js +1 -0
  50. package/docs/storybook/{tooltip-definition-tooptip-stories.57864d79.iframe.bundle.js → tooltip-definition-tooptip-stories.2e1a211c.iframe.bundle.js} +1 -1
  51. package/docs/storybook/{tooltip-tooltip-stories.b15c3310.iframe.bundle.js → tooltip-tooltip-stories.6a4a1383.iframe.bundle.js} +1 -1
  52. package/docs/storybook/ui-shell-ui-shell-stories.a1fb87a2.iframe.bundle.js +1 -0
  53. package/esm2020/datepicker/datepicker.component.mjs +1 -1
  54. package/esm2020/ui-shell/sidenav/sidenav-item.component.mjs +55 -19
  55. package/esm2020/ui-shell/sidenav/sidenav-menu.component.mjs +11 -3
  56. package/esm2020/ui-shell/sidenav/sidenav.component.mjs +13 -3
  57. package/esm2020/ui-shell/sidenav/sidenav.module.mjs +5 -4
  58. package/fesm2015/carbon-components-angular-datepicker.mjs.map +1 -1
  59. package/fesm2015/carbon-components-angular-ui-shell.mjs +79 -25
  60. package/fesm2015/carbon-components-angular-ui-shell.mjs.map +1 -1
  61. package/fesm2020/carbon-components-angular-datepicker.mjs.map +1 -1
  62. package/fesm2020/carbon-components-angular-ui-shell.mjs +79 -25
  63. package/fesm2020/carbon-components-angular-ui-shell.mjs.map +1 -1
  64. package/package.json +1 -1
  65. package/ui-shell/sidenav/sidenav-item.component.d.ts +8 -4
  66. package/ui-shell/sidenav/sidenav-menu.component.d.ts +6 -2
  67. package/ui-shell/sidenav/sidenav.component.d.ts +5 -1
  68. package/ui-shell/sidenav/sidenav.module.d.ts +2 -1
  69. package/docs/storybook/3348.35ca85d6.iframe.bundle.js +0 -1
  70. package/docs/storybook/main.11f564c6.iframe.bundle.js +0 -1
  71. package/docs/storybook/tabs-tabs-stories.db9e209e.iframe.bundle.js +0 -1
  72. package/docs/storybook/toggletip-toggletip-stories.1da8eaf1.iframe.bundle.js +0 -1
  73. package/docs/storybook/ui-shell-ui-shell-stories.70551d65.iframe.bundle.js +0 -1
@@ -25300,7 +25300,7 @@
25300
25300
  },
25301
25301
  {
25302
25302
  "name": "DatePicker",
25303
- "id": "component-DatePicker-1725045e700be17edf7bf7d8a40a8c9c210d2bb0213f874cbd88b0d4c2f36846d0491ff32f0a8c567b7f7ae4aa2bb15823fca28523744262f985fc77c55735f0",
25303
+ "id": "component-DatePicker-a0acdcd291094fa05e95aec1ac1063610bdca7b867bd0cd327320cae558fcba75a6e639fc0b87bf879dff2d0ac3560ca8671a8273adfc73866db2b4c16f15b89",
25304
25304
  "file": "src/datepicker/datepicker.component.ts",
25305
25305
  "encapsulation": [
25306
25306
  "ViewEncapsulation.None"
@@ -25328,7 +25328,7 @@
25328
25328
  "deprecationMessage": "",
25329
25329
  "rawdescription": "\n\nAria label added to datepicker's calendar container.\n",
25330
25330
  "description": "<p>Aria label added to datepicker&#39;s calendar container.</p>\n",
25331
- "line": 158,
25331
+ "line": 159,
25332
25332
  "type": "string",
25333
25333
  "decorators": []
25334
25334
  },
@@ -25339,7 +25339,7 @@
25339
25339
  "deprecationMessage": "",
25340
25340
  "rawdescription": "\n\nFormat of date\n\nFor reference: https://flatpickr.js.org/formatting/\n",
25341
25341
  "description": "<p>Format of date</p>\n<p>For reference: <a href=\"https://flatpickr.js.org/formatting/\">https://flatpickr.js.org/formatting/</a></p>\n",
25342
- "line": 138,
25342
+ "line": 139,
25343
25343
  "type": "string",
25344
25344
  "decorators": []
25345
25345
  },
@@ -25348,7 +25348,7 @@
25348
25348
  "defaultValue": "false",
25349
25349
  "deprecated": false,
25350
25350
  "deprecationMessage": "",
25351
- "line": 184,
25351
+ "line": 185,
25352
25352
  "type": "boolean",
25353
25353
  "decorators": []
25354
25354
  },
@@ -25356,15 +25356,15 @@
25356
25356
  "name": "flatpickrOptions",
25357
25357
  "deprecated": false,
25358
25358
  "deprecationMessage": "",
25359
- "line": 225,
25360
- "type": "any",
25359
+ "line": 226,
25360
+ "type": "Partial<Options>",
25361
25361
  "decorators": []
25362
25362
  },
25363
25363
  {
25364
25364
  "name": "helperText",
25365
25365
  "deprecated": false,
25366
25366
  "deprecationMessage": "",
25367
- "line": 149,
25367
+ "line": 150,
25368
25368
  "type": "string | TemplateRef<any>",
25369
25369
  "decorators": []
25370
25370
  },
@@ -25373,7 +25373,7 @@
25373
25373
  "defaultValue": "`datepicker-${DatePicker.datePickerCount++}`",
25374
25374
  "deprecated": false,
25375
25375
  "deprecationMessage": "",
25376
- "line": 165,
25376
+ "line": 166,
25377
25377
  "type": "string",
25378
25378
  "decorators": []
25379
25379
  },
@@ -25384,7 +25384,7 @@
25384
25384
  "deprecationMessage": "",
25385
25385
  "rawdescription": "\n\nThe pattern for the underlying input element\n",
25386
25386
  "description": "<p>The pattern for the underlying input element</p>\n",
25387
- "line": 163,
25387
+ "line": 164,
25388
25388
  "type": "string",
25389
25389
  "decorators": []
25390
25390
  },
@@ -25395,7 +25395,7 @@
25395
25395
  "deprecationMessage": "",
25396
25396
  "rawdescription": "\n\nSet to `true` to display the invalid state.\n",
25397
25397
  "description": "<p>Set to <code>true</code> to display the invalid state.</p>\n",
25398
- "line": 188,
25398
+ "line": 189,
25399
25399
  "type": "boolean",
25400
25400
  "decorators": []
25401
25401
  },
@@ -25405,7 +25405,7 @@
25405
25405
  "deprecationMessage": "",
25406
25406
  "rawdescription": "\n\nValue displayed if datepicker is in an invalid state.\n",
25407
25407
  "description": "<p>Value displayed if datepicker is in an invalid state.</p>\n",
25408
- "line": 192,
25408
+ "line": 193,
25409
25409
  "type": "string | TemplateRef<any>",
25410
25410
  "decorators": []
25411
25411
  },
@@ -25413,7 +25413,7 @@
25413
25413
  "name": "label",
25414
25414
  "deprecated": false,
25415
25415
  "deprecationMessage": "",
25416
- "line": 148,
25416
+ "line": 149,
25417
25417
  "type": "string | TemplateRef<any>",
25418
25418
  "decorators": []
25419
25419
  },
@@ -25424,7 +25424,7 @@
25424
25424
  "deprecationMessage": "",
25425
25425
  "rawdescription": "\n\nLanguage of the flatpickr calendar.\n\nFor reference of the possible locales:\nhttps://github.com/flatpickr/flatpickr/blob/master/src/l10n/index.ts\n",
25426
25426
  "description": "<p>Language of the flatpickr calendar.</p>\n<p>For reference of the possible locales:\n<a href=\"https://github.com/flatpickr/flatpickr/blob/master/src/l10n/index.ts\">https://github.com/flatpickr/flatpickr/blob/master/src/l10n/index.ts</a></p>\n",
25427
- "line": 146,
25427
+ "line": 147,
25428
25428
  "type": "string",
25429
25429
  "decorators": []
25430
25430
  },
@@ -25433,7 +25433,7 @@
25433
25433
  "defaultValue": "\"mm/dd/yyyy\"",
25434
25434
  "deprecated": false,
25435
25435
  "deprecationMessage": "",
25436
- "line": 153,
25436
+ "line": 154,
25437
25437
  "type": "string",
25438
25438
  "decorators": []
25439
25439
  },
@@ -25442,7 +25442,7 @@
25442
25442
  "defaultValue": "[]",
25443
25443
  "deprecated": false,
25444
25444
  "deprecationMessage": "",
25445
- "line": 222,
25445
+ "line": 223,
25446
25446
  "type": "{}",
25447
25447
  "decorators": []
25448
25448
  },
@@ -25453,7 +25453,7 @@
25453
25453
  "deprecationMessage": "",
25454
25454
  "rawdescription": "\n\nSelect calendar range mode\n",
25455
25455
  "description": "<p>Select calendar range mode</p>\n",
25456
- "line": 131,
25456
+ "line": 132,
25457
25457
  "type": "boolean",
25458
25458
  "decorators": []
25459
25459
  },
@@ -25461,7 +25461,7 @@
25461
25461
  "name": "rangeHelperText",
25462
25462
  "deprecated": false,
25463
25463
  "deprecationMessage": "",
25464
- "line": 150,
25464
+ "line": 151,
25465
25465
  "type": "string | TemplateRef<any>",
25466
25466
  "decorators": []
25467
25467
  },
@@ -25472,7 +25472,7 @@
25472
25472
  "deprecationMessage": "",
25473
25473
  "rawdescription": "\n\nSet to `true` to display the invalid state for the second datepicker input.\n",
25474
25474
  "description": "<p>Set to <code>true</code> to display the invalid state for the second datepicker input.</p>\n",
25475
- "line": 206,
25475
+ "line": 207,
25476
25476
  "type": "boolean",
25477
25477
  "decorators": []
25478
25478
  },
@@ -25482,7 +25482,7 @@
25482
25482
  "deprecationMessage": "",
25483
25483
  "rawdescription": "\n\nValue displayed if the second datepicker input is in an invalid state.\n",
25484
25484
  "description": "<p>Value displayed if the second datepicker input is in an invalid state.</p>\n",
25485
- "line": 210,
25485
+ "line": 211,
25486
25486
  "type": "string | TemplateRef<any>",
25487
25487
  "decorators": []
25488
25488
  },
@@ -25490,7 +25490,7 @@
25490
25490
  "name": "rangeLabel",
25491
25491
  "deprecated": false,
25492
25492
  "deprecationMessage": "",
25493
- "line": 151,
25493
+ "line": 152,
25494
25494
  "type": "string",
25495
25495
  "decorators": []
25496
25496
  },
@@ -25501,7 +25501,7 @@
25501
25501
  "deprecationMessage": "",
25502
25502
  "rawdescription": "\n\nSet to `true` to show a warning in the second datepicker input (contents set by rangeWarningText)\n",
25503
25503
  "description": "<p>Set to <code>true</code> to show a warning in the second datepicker input (contents set by rangeWarningText)</p>\n",
25504
- "line": 214,
25504
+ "line": 215,
25505
25505
  "type": "boolean",
25506
25506
  "decorators": []
25507
25507
  },
@@ -25511,7 +25511,7 @@
25511
25511
  "deprecationMessage": "",
25512
25512
  "rawdescription": "\n\nSets the warning text for the second datepicker input\n",
25513
25513
  "description": "<p>Sets the warning text for the second datepicker input</p>\n",
25514
- "line": 218,
25514
+ "line": 219,
25515
25515
  "type": "string | TemplateRef<any>",
25516
25516
  "decorators": []
25517
25517
  },
@@ -25520,7 +25520,7 @@
25520
25520
  "defaultValue": "\"md\"",
25521
25521
  "deprecated": false,
25522
25522
  "deprecationMessage": "",
25523
- "line": 202,
25523
+ "line": 203,
25524
25524
  "type": "\"sm\" | \"md\" | \"lg\"",
25525
25525
  "decorators": []
25526
25526
  },
@@ -25529,7 +25529,7 @@
25529
25529
  "defaultValue": "false",
25530
25530
  "deprecated": false,
25531
25531
  "deprecationMessage": "",
25532
- "line": 220,
25532
+ "line": 221,
25533
25533
  "type": "boolean",
25534
25534
  "decorators": []
25535
25535
  },
@@ -25540,15 +25540,15 @@
25540
25540
  "deprecationMessage": "since v5 - Use `cdsLayer` directive instead\nSet to `\"light\"` to apply the light style",
25541
25541
  "jsdoctags": [
25542
25542
  {
25543
- "pos": 4527,
25544
- "end": 4631,
25543
+ "pos": 4583,
25544
+ "end": 4687,
25545
25545
  "flags": 8421376,
25546
25546
  "modifierFlagsCache": 0,
25547
25547
  "transformFlags": 0,
25548
25548
  "kind": 334,
25549
25549
  "tagName": {
25550
- "pos": 4528,
25551
- "end": 4538,
25550
+ "pos": 4584,
25551
+ "end": 4594,
25552
25552
  "flags": 8421376,
25553
25553
  "modifierFlagsCache": 0,
25554
25554
  "transformFlags": 0,
@@ -25558,7 +25558,7 @@
25558
25558
  "comment": "<p>since v5 - Use <code>cdsLayer</code> directive instead\nSet to <code>&quot;light&quot;</code> to apply the light style</p>\n"
25559
25559
  }
25560
25560
  ],
25561
- "line": 182,
25561
+ "line": 183,
25562
25562
  "type": "\"light\" | \"dark\"",
25563
25563
  "decorators": []
25564
25564
  },
@@ -25566,7 +25566,7 @@
25566
25566
  "name": "value",
25567
25567
  "deprecated": false,
25568
25568
  "deprecationMessage": "",
25569
- "line": 167,
25569
+ "line": 168,
25570
25570
  "type": "[]",
25571
25571
  "decorators": []
25572
25572
  },
@@ -25577,7 +25577,7 @@
25577
25577
  "deprecationMessage": "",
25578
25578
  "rawdescription": "\n\nSet to `true` to show a warning (contents set by warningText)\n",
25579
25579
  "description": "<p>Set to <code>true</code> to show a warning (contents set by warningText)</p>\n",
25580
- "line": 196,
25580
+ "line": 197,
25581
25581
  "type": "boolean",
25582
25582
  "decorators": []
25583
25583
  },
@@ -25587,7 +25587,7 @@
25587
25587
  "deprecationMessage": "",
25588
25588
  "rawdescription": "\n\nSets the warning text\n",
25589
25589
  "description": "<p>Sets the warning text</p>\n",
25590
- "line": 200,
25590
+ "line": 201,
25591
25591
  "type": "string | TemplateRef<any>",
25592
25592
  "decorators": []
25593
25593
  }
@@ -25600,7 +25600,7 @@
25600
25600
  "deprecationMessage": "",
25601
25601
  "rawdescription": "\n\nWe are overriding onClose event even if users pass it via flatpickr options\nEmits an event when date picker closes\n",
25602
25602
  "description": "<p>We are overriding onClose event even if users pass it via flatpickr options\nEmits an event when date picker closes</p>\n",
25603
- "line": 250,
25603
+ "line": 251,
25604
25604
  "type": "EventEmitter<any>"
25605
25605
  },
25606
25606
  {
@@ -25608,7 +25608,7 @@
25608
25608
  "defaultValue": "new EventEmitter()",
25609
25609
  "deprecated": false,
25610
25610
  "deprecationMessage": "",
25611
- "line": 244,
25611
+ "line": 245,
25612
25612
  "type": "EventEmitter<any>"
25613
25613
  }
25614
25614
  ],
@@ -25620,7 +25620,7 @@
25620
25620
  "type": "DatePickerInput",
25621
25621
  "optional": false,
25622
25622
  "description": "",
25623
- "line": 241,
25623
+ "line": 242,
25624
25624
  "decorators": [
25625
25625
  {
25626
25626
  "name": "ViewChild",
@@ -25639,7 +25639,7 @@
25639
25639
  "type": "function",
25640
25640
  "optional": false,
25641
25641
  "description": "",
25642
- "line": 405
25642
+ "line": 406
25643
25643
  },
25644
25644
  {
25645
25645
  "name": "propagateChange",
@@ -25649,7 +25649,7 @@
25649
25649
  "type": "",
25650
25650
  "optional": false,
25651
25651
  "description": "",
25652
- "line": 407
25652
+ "line": 408
25653
25653
  },
25654
25654
  {
25655
25655
  "name": "rangeInput",
@@ -25658,7 +25658,7 @@
25658
25658
  "type": "DatePickerInput",
25659
25659
  "optional": false,
25660
25660
  "description": "",
25661
- "line": 242,
25661
+ "line": 243,
25662
25662
  "decorators": [
25663
25663
  {
25664
25664
  "name": "ViewChild",
@@ -25677,7 +25677,7 @@
25677
25677
  "optional": false,
25678
25678
  "returnType": "void",
25679
25679
  "typeParameters": [],
25680
- "line": 354,
25680
+ "line": 355,
25681
25681
  "deprecated": false,
25682
25682
  "deprecationMessage": "",
25683
25683
  "decorators": [
@@ -25696,7 +25696,7 @@
25696
25696
  "optional": false,
25697
25697
  "returnType": "void",
25698
25698
  "typeParameters": [],
25699
- "line": 369,
25699
+ "line": 370,
25700
25700
  "deprecated": false,
25701
25701
  "deprecationMessage": "",
25702
25702
  "decorators": [
@@ -25722,7 +25722,7 @@
25722
25722
  "optional": false,
25723
25723
  "returnType": "void",
25724
25724
  "typeParameters": [],
25725
- "line": 435,
25725
+ "line": 436,
25726
25726
  "deprecated": false,
25727
25727
  "deprecationMessage": "",
25728
25728
  "rawdescription": "\n\nHandles the `valueChange` event from the range input\n",
@@ -25752,7 +25752,7 @@
25752
25752
  "optional": false,
25753
25753
  "returnType": "void",
25754
25754
  "typeParameters": [],
25755
- "line": 420,
25755
+ "line": 421,
25756
25756
  "deprecated": false,
25757
25757
  "deprecationMessage": "",
25758
25758
  "rawdescription": "\n\nHandles the `valueChange` event from the primary/single input\n",
@@ -25782,7 +25782,7 @@
25782
25782
  "optional": false,
25783
25783
  "returnType": "void",
25784
25784
  "typeParameters": [],
25785
- "line": 446,
25785
+ "line": 447,
25786
25786
  "deprecated": false,
25787
25787
  "deprecationMessage": "",
25788
25788
  "rawdescription": "\n\nHandles opening the calendar \"properly\" when the calendar icon is clicked.\n",
@@ -25812,7 +25812,7 @@
25812
25812
  "optional": false,
25813
25813
  "returnType": "void",
25814
25814
  "typeParameters": [],
25815
- "line": 397,
25815
+ "line": 398,
25816
25816
  "deprecated": false,
25817
25817
  "deprecationMessage": "",
25818
25818
  "jsdoctags": [
@@ -25840,7 +25840,7 @@
25840
25840
  "optional": false,
25841
25841
  "returnType": "void",
25842
25842
  "typeParameters": [],
25843
- "line": 401,
25843
+ "line": 402,
25844
25844
  "deprecated": false,
25845
25845
  "deprecationMessage": "",
25846
25846
  "jsdoctags": [
@@ -25868,7 +25868,7 @@
25868
25868
  "optional": false,
25869
25869
  "returnType": "void",
25870
25870
  "typeParameters": [],
25871
- "line": 393,
25871
+ "line": 394,
25872
25872
  "deprecated": false,
25873
25873
  "deprecationMessage": "",
25874
25874
  "rawdescription": "\n\n`ControlValueAccessor` method to programmatically disable the DatePicker.\n\nex: `this.formGroup.get(\"myDatePicker\").disable();`\n\n",
@@ -25876,8 +25876,8 @@
25876
25876
  "jsdoctags": [
25877
25877
  {
25878
25878
  "name": {
25879
- "pos": 11055,
25880
- "end": 11065,
25879
+ "pos": 11165,
25880
+ "end": 11175,
25881
25881
  "flags": 8421376,
25882
25882
  "modifierFlagsCache": 0,
25883
25883
  "transformFlags": 0,
@@ -25888,8 +25888,8 @@
25888
25888
  "deprecated": false,
25889
25889
  "deprecationMessage": "",
25890
25890
  "tagName": {
25891
- "pos": 11049,
25892
- "end": 11054,
25891
+ "pos": 11159,
25892
+ "end": 11164,
25893
25893
  "flags": 8421376,
25894
25894
  "modifierFlagsCache": 0,
25895
25895
  "transformFlags": 0,
@@ -25913,7 +25913,7 @@
25913
25913
  "optional": false,
25914
25914
  "returnType": "void",
25915
25915
  "typeParameters": [],
25916
- "line": 377,
25916
+ "line": 378,
25917
25917
  "deprecated": false,
25918
25918
  "deprecationMessage": "",
25919
25919
  "rawdescription": "\n\nWrites a value from the model to the component. Expects the value to be `null` or `(Date | string)[]`\n",
@@ -25921,8 +25921,8 @@
25921
25921
  "jsdoctags": [
25922
25922
  {
25923
25923
  "name": {
25924
- "pos": 10654,
25925
- "end": 10659,
25924
+ "pos": 10764,
25925
+ "end": 10769,
25926
25926
  "flags": 8421376,
25927
25927
  "modifierFlagsCache": 0,
25928
25928
  "transformFlags": 0,
@@ -25933,8 +25933,8 @@
25933
25933
  "deprecated": false,
25934
25934
  "deprecationMessage": "",
25935
25935
  "tagName": {
25936
- "pos": 10648,
25937
- "end": 10653,
25936
+ "pos": 10758,
25937
+ "end": 10763,
25938
25938
  "flags": 8421376,
25939
25939
  "modifierFlagsCache": 0,
25940
25940
  "transformFlags": 0,
@@ -25956,7 +25956,7 @@
25956
25956
  "argsDecorator": [],
25957
25957
  "deprecated": false,
25958
25958
  "deprecationMessage": "",
25959
- "line": 354
25959
+ "line": 355
25960
25960
  },
25961
25961
  {
25962
25962
  "name": "focusout",
@@ -25964,7 +25964,7 @@
25964
25964
  "argsDecorator": [],
25965
25965
  "deprecated": false,
25966
25966
  "deprecationMessage": "",
25967
- "line": 369
25967
+ "line": 370
25968
25968
  }
25969
25969
  ],
25970
25970
  "standalone": false,
@@ -25972,7 +25972,7 @@
25972
25972
  "description": "<p>Get started with importing the module:</p>\n<div><pre class=\"line-numbers\"><code class=\"language-typescript\">import { DatePickerModule } from &#39;carbon-components-angular&#39;;</code></pre></div><p><a href=\"../../?path=/story/components-date-picker--single\">See demo</a></p>\n",
25973
25973
  "rawdescription": "\n\nGet started with importing the module:\n\n```typescript\nimport { DatePickerModule } from 'carbon-components-angular';\n```\n\n[See demo](../../?path=/story/components-date-picker--single)\n",
25974
25974
  "type": "component",
25975
- "sourceCode": "import {\n\tComponent,\n\tInput,\n\tOutput,\n\tEventEmitter,\n\tViewEncapsulation,\n\tElementRef,\n\tOnDestroy,\n\tHostListener,\n\tTemplateRef,\n\tOnChanges,\n\tSimpleChanges,\n\tAfterViewChecked,\n\tAfterViewInit,\n\tViewChild,\n\tOnInit,\n\tSimpleChange\n} from \"@angular/core\";\nimport rangePlugin from \"flatpickr/dist/plugins/rangePlugin\";\nimport flatpickr from \"flatpickr\";\nimport { NG_VALUE_ACCESSOR } from \"@angular/forms\";\nimport { carbonFlatpickrMonthSelectPlugin } from \"./carbon-flatpickr-month-select\";\nimport * as languages from \"flatpickr/dist/l10n/index\";\nimport { DatePickerInput } from \"carbon-components-angular/datepicker-input\";\nimport { I18n } from \"carbon-components-angular/i18n\";\n\n/**\n * Due to type error, we have to use square brackets property accessor\n * There is a webpack issue when attempting to access exported languages from flatpickr l10n Angular 14+ apps\n * languages.default[locale] fails in app consuming CCA library but passes in test\n * languages.default.default[locale] fails in test but works in app consuming CCA library.\n *\n * To please both scenarios, we are adding a condition to prevent tests from failing\n */\nif (languages.default?.default[\"en\"]?.weekdays) {\n\t(languages.default.default[\"en\"].weekdays.shorthand as string[]) = languages.default.default[\"en\"].weekdays.longhand.map(day => {\n\t\tif (day === \"Thursday\") {\n\t\t\treturn \"Th\";\n\t\t}\n\t\treturn day.charAt(0);\n\t});\n}\n\n/**\n * Get started with importing the module:\n *\n * ```typescript\n * import { DatePickerModule } from 'carbon-components-angular';\n * ```\n *\n * [See demo](../../?path=/story/components-date-picker--single)\n */\n@Component({\n\tselector: \"cds-date-picker, ibm-date-picker\",\n\ttemplate: `\n\t<div class=\"cds--form-item\">\n\t\t<div\n\t\t\tclass=\"cds--date-picker\"\n\t\t\t[ngClass]=\"{\n\t\t\t\t'cds--date-picker--range' : range,\n\t\t\t\t'cds--date-picker--single' : !range,\n\t\t\t\t'cds--date-picker--light' : theme === 'light',\n\t\t\t\t'cds--skeleton' : skeleton\n\t\t\t}\">\n\t\t\t<div class=\"cds--date-picker-container\">\n\t\t\t\t<cds-date-picker-input\n\t\t\t\t\t#input\n\t\t\t\t\t[label]=\"label\"\n\t\t\t\t\t[placeholder]=\"placeholder\"\n\t\t\t\t\t[pattern]=\"inputPattern\"\n\t\t\t\t\t[id]=\"id + '-input'\"\n\t\t\t\t\t[size]=\"size\"\n\t\t\t\t\t[type]=\"(range ? 'range' : 'single')\"\n\t\t\t\t\t[hasIcon]=\"(range ? false : true)\"\n\t\t\t\t\t[disabled]=\"disabled\"\n\t\t\t\t\t[invalid]=\"invalid\"\n\t\t\t\t\t[invalidText]=\"invalidText\"\n\t\t\t\t\t[warn]=\"warn\"\n\t\t\t\t\t[warnText]=\"warnText\"\n\t\t\t\t\t[skeleton]=\"skeleton\"\n\t\t\t\t\t[helperText]=\"helperText\"\n\t\t\t\t\t(valueChange)=\"onValueChange($event)\"\n\t\t\t\t\t(click)=\"openCalendar(input)\">\n\t\t\t\t</cds-date-picker-input>\n\t\t\t</div>\n\n\t\t\t<div *ngIf=\"range\" class=\"cds--date-picker-container\">\n\t\t\t\t<cds-date-picker-input\n\t\t\t\t\t#rangeInput\n\t\t\t\t\t[label]=\"rangeLabel\"\n\t\t\t\t\t[placeholder]=\"placeholder\"\n\t\t\t\t\t[pattern]=\"inputPattern\"\n\t\t\t\t\t[id]=\"id + '-rangeInput'\"\n\t\t\t\t\t[size]=\"size\"\n\t\t\t\t\t[type]=\"(range ? 'range' : 'single')\"\n\t\t\t\t\t[hasIcon]=\"(range ? true : null)\"\n\t\t\t\t\t[disabled]=\"disabled\"\n\t\t\t\t\t[invalid]=\"rangeInvalid\"\n\t\t\t\t\t[invalidText]=\"rangeInvalidText\"\n\t\t\t\t\t[warn]=\"rangeWarn\"\n\t\t\t\t\t[warnText]=\"rangeWarnText\"\n\t\t\t\t\t[skeleton]=\"skeleton\"\n\t\t\t\t\t[helperText]=\"rangeHelperText\"\n\t\t\t\t\t(valueChange)=\"onRangeValueChange($event)\"\n\t\t\t\t\t(click)=\"openCalendar(rangeInput)\">\n\t\t\t\t</cds-date-picker-input>\n\t\t\t</div>\n\t\t</div>\n\t</div>\n\t`,\n\tproviders: [\n\t\t{\n\t\t\tprovide: NG_VALUE_ACCESSOR,\n\t\t\tuseExisting: DatePicker,\n\t\t\tmulti: true\n\t\t}\n\t],\n\tencapsulation: ViewEncapsulation.None\n})\nexport class DatePicker implements\n\tOnInit,\n\tOnDestroy,\n\tOnChanges,\n\tAfterViewChecked,\n\tAfterViewInit {\n\tprivate static datePickerCount = 0;\n\n\t/**\n\t * Select calendar range mode\n\t */\n\t@Input() range = false;\n\n\t/**\n\t * Format of date\n\t *\n\t * For reference: https://flatpickr.js.org/formatting/\n\t */\n\t@Input() dateFormat = \"m/d/Y\";\n\n\t/**\n\t * Language of the flatpickr calendar.\n\t *\n\t * For reference of the possible locales:\n\t * https://github.com/flatpickr/flatpickr/blob/master/src/l10n/index.ts\n\t */\n\t@Input() language = \"en\";\n\n\t@Input() label: string | TemplateRef<any>;\n\t@Input() helperText: string | TemplateRef<any>;\n\t@Input() rangeHelperText: string | TemplateRef<any>;\n\t@Input() rangeLabel: string;\n\n\t@Input() placeholder = \"mm/dd/yyyy\";\n\n\t/**\n\t * Aria label added to datepicker's calendar container.\n\t */\n\t@Input() ariaLabel = \"calendar container\";\n\n\t/**\n\t * The pattern for the underlying input element\n\t */\n\t@Input() inputPattern = \"^\\\\d{1,2}/\\\\d{1,2}/\\\\d{4}$\";\n\n\t@Input() id = `datepicker-${DatePicker.datePickerCount++}`;\n\n\t@Input() set value(v: (Date | string)[]) {\n\t\tif (!v) {\n\t\t\tv = [];\n\t\t}\n\t\tthis._value = v;\n\t}\n\n\tget value() {\n\t\treturn this._value;\n\t}\n\n\t/**\n\t * @deprecated since v5 - Use `cdsLayer` directive instead\n\t * Set to `\"light\"` to apply the light style\n\t */\n\t@Input() theme: \"light\" | \"dark\" = \"dark\";\n\n\t@Input() disabled = false;\n\t/**\n\t * Set to `true` to display the invalid state.\n\t */\n\t@Input() invalid = false;\n\t/**\n\t * Value displayed if datepicker is in an invalid state.\n\t */\n\t@Input() invalidText: string | TemplateRef<any>;\n\t/**\n\t * Set to `true` to show a warning (contents set by warningText)\n\t */\n\t@Input() warn = false;\n\t/**\n\t * Sets the warning text\n\t */\n\t@Input() warnText: string | TemplateRef<any>;\n\n\t@Input() size: \"sm\" | \"md\" | \"lg\" = \"md\";\n\t/**\n\t * Set to `true` to display the invalid state for the second datepicker input.\n\t */\n\t@Input() rangeInvalid = false;\n\t/**\n\t * Value displayed if the second datepicker input is in an invalid state.\n\t */\n\t@Input() rangeInvalidText: string | TemplateRef<any>;\n\t/**\n\t * Set to `true` to show a warning in the second datepicker input (contents set by rangeWarningText)\n\t */\n\t@Input() rangeWarn = false;\n\t/**\n\t * Sets the warning text for the second datepicker input\n\t */\n\t@Input() rangeWarnText: string | TemplateRef<any>;\n\n\t@Input() skeleton = false;\n\n\t@Input() plugins = [];\n\n\t@Input()\n\tset flatpickrOptions(options) {\n\t\tthis._flatpickrOptions = Object.assign({}, this._flatpickrOptions, options);\n\t}\n\tget flatpickrOptions() {\n\t\tconst plugins = [...this.plugins, carbonFlatpickrMonthSelectPlugin];\n\t\tif (this.range) {\n\t\t\tplugins.push(rangePlugin({ input: `#${this.id}-rangeInput`, position: \"left\" }));\n\t\t}\n\t\treturn Object.assign({}, this._flatpickrOptions, this.flatpickrBaseOptions, {\n\t\t\tmode: this.range ? \"range\" : \"single\",\n\t\t\tplugins,\n\t\t\tdateFormat: this.dateFormat,\n\t\t\tlocale: languages.default?.default[this.language] || languages.default[this.language]\n\t\t});\n\t}\n\n\t@ViewChild(\"input\", { static: true }) input: DatePickerInput;\n\t@ViewChild(\"rangeInput\") rangeInput: DatePickerInput;\n\n\t@Output() valueChange: EventEmitter<any> = new EventEmitter();\n\n\t/**\n\t * We are overriding onClose event even if users pass it via flatpickr options\n\t * Emits an event when date picker closes\n\t */\n\t@Output() onClose: EventEmitter<any> = new EventEmitter();\n\n\tprotected _value = [];\n\n\tprotected _flatpickrOptions = {\n\t\tallowInput: true\n\t};\n\n\tprotected flatpickrBaseOptions = {\n\t\tmode: \"single\",\n\t\tdateFormat: \"m/d/Y\",\n\t\tplugins: this.plugins,\n\t\tonOpen: () => {\n\t\t\tthis.updateClassNames();\n\t\t\tthis.updateAttributes();\n\t\t\tthis.updateCalendarListeners();\n\t\t},\n\t\tonClose: (date) => {\n\t\t\t// This makes sure that the `flatpickrInstance selectedDates` are in sync with the values of\n\t\t\t// the inputs when the calendar closes.\n\t\t\tif (this.range && this.flatpickrInstance) {\n\t\t\t\tif (this.flatpickrInstance.selectedDates.length !== 2) {\n\t\t\t\t\t// we could `this.flatpickrInstance.clear()` but it insists on opening the second picker\n\t\t\t\t\t// in some cases, so instead we do this\n\t\t\t\t\tthis.setDateValues([]);\n\t\t\t\t\tthis.doSelect([]);\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t\tconst inputValue = this.input.input.nativeElement.value;\n\t\t\t\tconst rangeInputValue = this.rangeInput.input.nativeElement.value;\n\t\t\t\tif (inputValue || rangeInputValue) {\n\t\t\t\t\tconst parseDate = (date: string) => this.flatpickrInstance.parseDate(date, this.dateFormat);\n\t\t\t\t\tthis.setDateValues([parseDate(inputValue), parseDate(rangeInputValue)]);\n\t\t\t\t\tthis.doSelect(this.flatpickrInstance.selectedDates);\n\t\t\t\t}\n\t\t\t}\n\t\t\tthis.onClose.emit(date);\n\t\t},\n\t\tonDayCreate: (_dObj, _dStr, _fp, dayElem) => {\n\t\t\tdayElem.classList.add(\"cds--date-picker__day\");\n\t\t},\n\t\tnextArrow: this.rightArrowHTML(),\n\t\tprevArrow: this.leftArrowHTML(),\n\t\tvalue: this.value\n\t};\n\n\tprotected flatpickrInstance = null;\n\n\tconstructor(\n\t\tprotected elementRef: ElementRef,\n\t\tprotected i18n: I18n\n\t) { }\n\n\tngOnInit() {\n\t\t// if i18n is set to anything other than en we'll want to change the language\n\t\t// otherwise we'll just use the local setting\n\t\tif (this.i18n.getLocale() !== \"en\") {\n\t\t\tthis.i18n.getLocaleObservable().subscribe(locale => {\n\t\t\t\tthis.language = locale;\n\t\t\t\tthis.resetFlatpickrInstance();\n\t\t\t});\n\t\t}\n\t}\n\n\tngOnChanges(changes: SimpleChanges) {\n\t\t// Reset the flatpickr instance on input changes that affect flatpickr.\n\t\tconst flatpickrChangeKeys = [\n\t\t\t\"range\",\n\t\t\t\"dateFormat\",\n\t\t\t\"language\",\n\t\t\t\"id\",\n\t\t\t\"value\",\n\t\t\t\"plugins\",\n\t\t\t\"flatpickrOptions\"\n\t\t];\n\t\tconst changeKeys = Object.keys(changes);\n\t\tif (changeKeys.some(key => flatpickrChangeKeys.includes(key))) {\n\t\t\tthis.resetFlatpickrInstance(changes.value);\n\t\t}\n\t}\n\n\tngAfterViewInit() {\n\t\tsetTimeout(() => {\n\t\t\tthis.addInputListeners();\n\t\t}, 0);\n\t}\n\n\t// because the actual view may be delayed in loading (think projection into a tab pane)\n\t// and because we rely on a library that operates outside the Angular view of the world\n\t// we need to keep trying to load the library, until the relevant DOM is actually live\n\tngAfterViewChecked() {\n\t\tif (!this.isFlatpickrLoaded()) {\n\t\t\t// @ts-ignore ts is unhappy with the below call to `flatpickr`\n\t\t\tthis.flatpickrInstance = flatpickr(`#${this.id}-input`, this.flatpickrOptions);\n\t\t\t// if (and only if) the initialization succeeded, we can set the date values\n\t\t\tif (this.isFlatpickrLoaded()) {\n\t\t\t\tif (this.value.length > 0) {\n\t\t\t\t\tthis.setDateValues(this.value);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\n\t@HostListener(\"focusin\")\n\tonFocus() {\n\t\t// Updates the month manually when calendar mode is range because month\n\t\t// will not update properly without manually updating them on focus.\n\t\tif (this.range) {\n\t\t\tif (this.rangeInput.input.nativeElement === document.activeElement && this.flatpickrInstance.selectedDates[1]) {\n\t\t\t\tconst currentMonth = this.flatpickrInstance.selectedDates[1].getMonth();\n\t\t\t\tthis.flatpickrInstance.changeMonth(currentMonth, false);\n\t\t\t} else if (this.input.input.nativeElement === document.activeElement && this.flatpickrInstance.selectedDates[0]) {\n\t\t\t\tconst currentMonth = this.flatpickrInstance.selectedDates[0].getMonth();\n\t\t\t\tthis.flatpickrInstance.changeMonth(currentMonth, false);\n\t\t\t}\n\t\t}\n\t}\n\n\t@HostListener(\"focusout\")\n\tonFocusOut() {\n\t\tthis.onTouched();\n\t}\n\n\t/**\n\t * Writes a value from the model to the component. Expects the value to be `null` or `(Date | string)[]`\n\t * @param value value received from the model\n\t */\n\twriteValue(value: (Date | string)[]) {\n\t\tthis.value = value;\n\t\tsetTimeout(() => {\n\t\t\tif (this.isFlatpickrLoaded() && this.flatpickrInstance.config) {\n\t\t\t\tthis.setDateValues(this.value);\n\t\t\t}\n\t\t});\n\t}\n\n\t/**\n\t * `ControlValueAccessor` method to programmatically disable the DatePicker.\n\t *\n\t * ex: `this.formGroup.get(\"myDatePicker\").disable();`\n\t *\n\t * @param isDisabled `true` to disable the DatePicker\n\t */\n\tsetDisabledState(isDisabled: boolean) {\n\t\tthis.disabled = isDisabled;\n\t}\n\n\tregisterOnChange(fn: any) {\n\t\tthis.propagateChange = fn;\n\t}\n\n\tregisterOnTouched(fn: any) {\n\t\tthis.onTouched = fn;\n\t}\n\n\tonTouched: () => any = () => { };\n\n\tpropagateChange = (_: any) => { };\n\n\t/**\n\t * Cleans up our flatpickr instance\n\t */\n\tngOnDestroy() {\n\t\tif (!this.isFlatpickrLoaded()) { return; }\n\t\tthis.flatpickrInstance.destroy();\n\t}\n\n\t/**\n\t * Handles the `valueChange` event from the primary/single input\n\t */\n\tonValueChange(event: string) {\n\t\tif (this.isFlatpickrLoaded()) {\n\t\t\tconst date = this.flatpickrInstance.parseDate(event, this.dateFormat);\n\t\t\tif (this.range) {\n\t\t\t\tthis.setDateValues([date, this.flatpickrInstance.selectedDates[1]]);\n\t\t\t} else {\n\t\t\t\tthis.setDateValues([date]);\n\t\t\t}\n\t\t\tthis.doSelect(this.flatpickrInstance.selectedDates);\n\t\t}\n\t}\n\n\t/**\n\t * Handles the `valueChange` event from the range input\n\t */\n\tonRangeValueChange(event: string) {\n\t\tif (this.isFlatpickrLoaded() && this.flatpickrInstance.isOpen) {\n\t\t\tconst date = this.flatpickrInstance.parseDate(event, this.dateFormat);\n\t\t\tthis.setDateValues([this.flatpickrInstance.selectedDates[0], date]);\n\t\t\tthis.doSelect(this.flatpickrInstance.selectedDates);\n\t\t}\n\t}\n\n\t/**\n\t * Handles opening the calendar \"properly\" when the calendar icon is clicked.\n\t */\n\topenCalendar(datepickerInput: DatePickerInput) {\n\t\tif (this.range) {\n\t\t\tdatepickerInput.input.nativeElement.click();\n\n\t\t\t// If the first input's calendar icon is clicked when calendar is in range mode, then\n\t\t\t// the month and year needs to be manually changed to the current selected month and\n\t\t\t// year otherwise the calendar view will not be updated upon opening.\n\t\t\tif (datepickerInput === this.input && this.flatpickrInstance.selectedDates[0]) {\n\t\t\t\tconst currentMonth = this.flatpickrInstance.selectedDates[0].getMonth();\n\n\t\t\t\tthis.flatpickrInstance.currentYear = this.flatpickrInstance.selectedDates[0].getFullYear();\n\t\t\t\tthis.flatpickrInstance.changeMonth(currentMonth, false);\n\t\t\t}\n\t\t} else {\n\t\t\t// Single-mode flatpickr handles mousedown but not click, so nativeElement.click() won't\n\t\t\t// work when the calendar icon is clicked. In this case we simply use flatpickr.open().\n\t\t\tthis.flatpickrInstance.open();\n\t\t}\n\t}\n\n\tprotected updateCalendarListeners() {\n\t\tconst calendarContainer = document.querySelectorAll(\".flatpickr-calendar\");\n\t\tArray.from(calendarContainer).forEach(calendar => {\n\t\t\tcalendar.removeEventListener(\"click\", this.preventCalendarClose);\n\t\t\tcalendar.addEventListener(\"click\", this.preventCalendarClose);\n\t\t});\n\t}\n\n\t/**\n\t * Handles the initialization of event listeners for the datepicker input and range input fields.\n\t */\n\tprotected addInputListeners() {\n\t\tif (!this.isFlatpickrLoaded()) {\n\t\t\treturn;\n\t\t}\n\n\t\t// Allows focus transition from the datepicker input or range input field to\n\t\t// flatpickr calendar using a keyboard.\n\t\tconst addFocusCalendarListener = (element: HTMLInputElement) => {\n\t\t\telement.addEventListener(\"keydown\", (event: KeyboardEvent) => {\n\t\t\t\tif (event.key === \"Escape\") {\n\t\t\t\t\tthis.flatpickrInstance.close();\n\t\t\t\t}\n\t\t\t\tif (event.key === \"ArrowDown\") {\n\t\t\t\t\tif (!this.flatpickrInstance.isOpen) {\n\t\t\t\t\t\tthis.flatpickrInstance.open();\n\t\t\t\t\t}\n\n\t\t\t\t\tconst calendarContainer = this.flatpickrInstance.calendarContainer;\n\t\t\t\t\tconst dayElement = calendarContainer && calendarContainer.querySelector(\".flatpickr-day[tabindex]\");\n\n\t\t\t\t\tif (dayElement) {\n\t\t\t\t\t\tdayElement.focus();\n\n\t\t\t\t\t\t// If the user manually inputs a value into the date field and presses arrow down,\n\t\t\t\t\t\t// datepicker input onchange will be triggered when focus is removed from it and\n\t\t\t\t\t\t// `flatpickrInstance.setDate` and `flatpickrInstance.changeMonth` will be invoked\n\t\t\t\t\t\t// which will automatically change focus to the beginning of the document.\n\t\t\t\t\t\tif (document.activeElement !== dayElement && this.flatpickrInstance.selectedDateElem) {\n\t\t\t\t\t\t\tthis.flatpickrInstance.selectedDateElem.focus();\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t});\n\t\t};\n\n\t\tif (this.input && this.input.input) {\n\t\t\taddFocusCalendarListener(this.input.input.nativeElement);\n\t\t}\n\n\t\tif (this.rangeInput && this.rangeInput.input) {\n\t\t\taddFocusCalendarListener(this.rangeInput.input.nativeElement);\n\t\t}\n\t}\n\n\t/**\n\t * Resets the flatpickr instance while keeping the date values (or updating them if newDates is provided)\n\t *\n\t * Used to pick up input changes or locale changes.\n\t *\n\t * @param newDates An optional SimpleChange of date values\n\t */\n\tprotected resetFlatpickrInstance(newDates?: SimpleChange) {\n\t\tif (this.isFlatpickrLoaded()) {\n\t\t\tlet dates = this.flatpickrInstance.selectedDates;\n\t\t\tif (newDates && this.didDateValueChange(newDates.currentValue, newDates.previousValue)) {\n\t\t\t\tdates = newDates.currentValue;\n\t\t\t}\n\t\t\t// only reset the flatpickr instance on Input changes\n\t\t\t// @ts-ignore ts is unhappy with the below call to `flatpickr`\n\t\t\tthis.flatpickrInstance = flatpickr(`#${this.id}-input`, this.flatpickrOptions);\n\t\t\tthis.setDateValues(dates);\n\t\t}\n\t}\n\n\t/**\n\t * Carbon uses a number of specific classnames for parts of the flatpickr - this idempotent method applies them if needed.\n\t */\n\tprotected updateClassNames() {\n\t\tif (!this.elementRef) { return; }\n\t\t// get all the possible flatpickrs in the document - we need to add classes to (potentially) all of them\n\t\tconst calendarContainer = document.querySelectorAll(\".flatpickr-calendar\");\n\t\tconst monthContainer = document.querySelectorAll(\".flatpickr-month\");\n\t\tconst weekdaysContainer = document.querySelectorAll(\".flatpickr-weekdays\");\n\t\tconst weekdayContainer = document.querySelectorAll(\".flatpickr-weekday\");\n\t\tconst daysContainer = document.querySelectorAll(\".flatpickr-days\");\n\t\tconst dayContainer = document.querySelectorAll(\".flatpickr-day\");\n\n\t\t// add classes to lists of elements\n\t\tconst addClassIfNotExists = (classname: string, elementList: NodeListOf<Element>) => {\n\t\t\tArray.from(elementList).forEach(element => {\n\t\t\t\tif (!element.classList.contains(classname)) {\n\t\t\t\t\telement.classList.add(classname);\n\t\t\t\t}\n\t\t\t});\n\t\t};\n\n\t\t// add classes (but only if they don't exist, small perf win)\n\t\taddClassIfNotExists(\"cds--date-picker__calendar\", calendarContainer);\n\t\taddClassIfNotExists(\"cds--date-picker__month\", monthContainer);\n\t\taddClassIfNotExists(\"cds--date-picker__weekdays\", weekdaysContainer);\n\t\taddClassIfNotExists(\"cds--date-picker__days\", daysContainer);\n\n\t\t// add weekday classes and format the text\n\t\tArray.from(weekdayContainer).forEach(element => {\n\t\t\telement.innerHTML = element.innerHTML.replace(/\\s+/g, \"\");\n\t\t\telement.classList.add(\"cds--date-picker__weekday\");\n\t\t});\n\n\t\t// add day classes and special case the \"today\" element based on `this.value`\n\t\tArray.from(dayContainer).forEach(element => {\n\t\t\telement.classList.add(\"cds--date-picker__day\");\n\t\t\tif (!this.value) {\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tif (element.classList.contains(\"today\") && this.value.length > 0) {\n\t\t\t\telement.classList.add(\"no-border\");\n\t\t\t} else if (element.classList.contains(\"today\") && this.value.length === 0) {\n\t\t\t\telement.classList.remove(\"no-border\");\n\t\t\t}\n\t\t});\n\t}\n\n\tprotected updateAttributes() {\n\t\tconst calendarContainer = document.querySelectorAll(\".flatpickr-calendar\");\n\t\tArray.from(calendarContainer).forEach(calendar => {\n\t\t\tcalendar.setAttribute(\"role\", \"region\");\n\t\t\tcalendar.setAttribute(\"aria-label\", this.ariaLabel);\n\t\t});\n\t}\n\n\t/**\n\t * Applies the given date value array to both the flatpickr instance and the `input`(s)\n\t * @param dates the date values to apply\n\t */\n\tprotected setDateValues(dates: (Date | string)[]) {\n\t\tif (this.isFlatpickrLoaded()) {\n\t\t\tconst singleInput = this.elementRef.nativeElement.querySelector(`#${this.id}-input`);\n\t\t\tconst rangeInput = this.elementRef.nativeElement.querySelector(`#${this.id}-rangeInput`);\n\n\t\t\t// `flatpickrInstance.setDate` removes the focus on the selected date element and will\n\t\t\t// automatically change focus to the beginning of the document. If a selected date is\n\t\t\t// focused before `flatpickrInstance.setDate` is invoked then it should remain focused.\n\t\t\tlet shouldRefocusDateElement = this.flatpickrInstance.selectedDateElem === document.activeElement;\n\n\t\t\t// set the date on the instance\n\t\t\tthis.flatpickrInstance.setDate(dates);\n\n\t\t\tif (shouldRefocusDateElement) {\n\t\t\t\tthis.flatpickrInstance.selectedDateElem.focus();\n\t\t\t}\n\n\t\t\t// we can either set a date value or an empty string, so we start with an empty string\n\t\t\tlet singleDate = \"\";\n\t\t\t// if date is a string, parse and format\n\t\t\tif (typeof this.flatpickrInstance.selectedDates[0] === \"string\") {\n\t\t\t\tsingleDate = this.flatpickrInstance.parseDate(this.flatpickrInstance.selectedDates[0], this.dateFormat);\n\t\t\t\tsingleDate = this.flatpickrInstance.formatDate(singleDate, this.dateFormat);\n\t\t\t// if date is not a string we can assume it's a Date and we should format\n\t\t\t} else if (!!this.flatpickrInstance.selectedDates[0]) {\n\t\t\t\tsingleDate = this.flatpickrInstance.formatDate(this.flatpickrInstance.selectedDates[0], this.dateFormat);\n\t\t\t}\n\n\t\t\tif (rangeInput) {\n\t\t\t\t// we can either set a date value or an empty string, so we start with an empty string\n\t\t\t\tlet rangeDate = \"\";\n\t\t\t\t// if date is a string, parse and format\n\t\t\t\tif (typeof this.flatpickrInstance.selectedDates[1] === \"string\") {\n\t\t\t\t\trangeDate = this.flatpickrInstance.parseDate(this.flatpickrInstance.selectedDates[1].toString(), this.dateFormat);\n\t\t\t\t\trangeDate = this.flatpickrInstance.formatDate(rangeDate, this.dateFormat);\n\t\t\t\t// if date is not a string we can assume it's a Date and we should format\n\t\t\t\t} else if (!!this.flatpickrInstance.selectedDates[1]) {\n\t\t\t\t\trangeDate = this.flatpickrInstance.formatDate(this.flatpickrInstance.selectedDates[1], this.dateFormat);\n\t\t\t\t}\n\t\t\t\tsetTimeout(() => {\n\t\t\t\t\t// apply the values\n\t\t\t\t\trangeInput.value = rangeDate;\n\t\t\t\t\tsingleInput.value = singleDate;\n\t\t\t\t});\n\t\t\t}\n\t\t}\n\t}\n\n\tprotected preventCalendarClose = event => event.stopPropagation();\n\n\tprotected doSelect(selectedValue: (Date | string)[]) {\n\t\t// In range mode, if a date is selected from the first calendar that is from the previous month,\n\t\t// the month will not be updated on the calendar until the calendar is re-opened.\n\t\t// This will make sure the calendar is updated with the correct month.\n\t\tif (this.range && this.flatpickrInstance.selectedDates[0]) {\n\t\t\tconst currentMonth = this.flatpickrInstance.selectedDates[0].getMonth();\n\n\t\t\t// `flatpickrInstance.changeMonth` removes the focus on the selected date element and will\n\t\t\t// automatically change focus to the beginning of the document. If a selected date is\n\t\t\t// focused before `flatpickrInstance.changeMonth` is invoked then it should remain focused.\n\t\t\tlet shouldRefocusDateElement = this.flatpickrInstance.selectedDateElem === document.activeElement;\n\n\t\t\tthis.flatpickrInstance.changeMonth(currentMonth, false);\n\n\t\t\tif (shouldRefocusDateElement) {\n\t\t\t\tthis.flatpickrInstance.selectedDateElem.focus();\n\t\t\t}\n\n\t\t}\n\t\tthis.valueChange.emit(selectedValue);\n\t\tthis.propagateChange(selectedValue);\n\t}\n\n\tprotected didDateValueChange(currentValue, previousValue) {\n\t\treturn currentValue[0] !== previousValue[0] || currentValue[1] !== previousValue[1];\n\t}\n\n\t/**\n\t * More advanced checking of the loaded state of flatpickr\n\t */\n\tprotected isFlatpickrLoaded() {\n\t\t// cast the instance to a boolean, and some method that has to exist for the library to be loaded in this case `setDate`\n\t\treturn !!this.flatpickrInstance && !!this.flatpickrInstance.setDate;\n\t}\n\n\t/**\n\t * Right arrow HTML passed to flatpickr\n\t */\n\tprotected rightArrowHTML() {\n\t\treturn `\n\t\t\t<svg width=\"16px\" height=\"16px\" viewBox=\"0 0 16 16\">\n\t\t\t\t<polygon points=\"11,8 6,13 5.3,12.3 9.6,8 5.3,3.7 6,3 \"/>\n\t\t\t\t<rect width=\"16\" height=\"16\" style=\"fill:none\" />\n\t\t\t</svg>`;\n\t}\n\n\t/**\n\t * Left arrow HTML passed to flatpickr\n\t */\n\tprotected leftArrowHTML() {\n\t\treturn `\n\t\t\t<svg width=\"16px\" height=\"16px\" viewBox=\"0 0 16 16\">\n\t\t\t\t<polygon points=\"5,8 10,3 10.7,3.7 6.4,8 10.7,12.3 10,13 \"/>\n\t\t\t\t<rect width=\"16\" height=\"16\" style=\"fill:none\" />\n\t\t\t</svg>`;\n\t}\n}\n",
25975
+ "sourceCode": "import {\n\tComponent,\n\tInput,\n\tOutput,\n\tEventEmitter,\n\tViewEncapsulation,\n\tElementRef,\n\tOnDestroy,\n\tHostListener,\n\tTemplateRef,\n\tOnChanges,\n\tSimpleChanges,\n\tAfterViewChecked,\n\tAfterViewInit,\n\tViewChild,\n\tOnInit,\n\tSimpleChange\n} from \"@angular/core\";\nimport rangePlugin from \"flatpickr/dist/plugins/rangePlugin\";\nimport flatpickr from \"flatpickr\";\nimport { NG_VALUE_ACCESSOR } from \"@angular/forms\";\nimport { carbonFlatpickrMonthSelectPlugin } from \"./carbon-flatpickr-month-select\";\nimport * as languages from \"flatpickr/dist/l10n/index\";\nimport { Options } from \"flatpickr/dist/types/options\";\nimport { DatePickerInput } from \"carbon-components-angular/datepicker-input\";\nimport { I18n } from \"carbon-components-angular/i18n\";\n\n/**\n * Due to type error, we have to use square brackets property accessor\n * There is a webpack issue when attempting to access exported languages from flatpickr l10n Angular 14+ apps\n * languages.default[locale] fails in app consuming CCA library but passes in test\n * languages.default.default[locale] fails in test but works in app consuming CCA library.\n *\n * To please both scenarios, we are adding a condition to prevent tests from failing\n */\nif (languages.default?.default[\"en\"]?.weekdays) {\n\t(languages.default.default[\"en\"].weekdays.shorthand as string[]) = languages.default.default[\"en\"].weekdays.longhand.map(day => {\n\t\tif (day === \"Thursday\") {\n\t\t\treturn \"Th\";\n\t\t}\n\t\treturn day.charAt(0);\n\t});\n}\n\n/**\n * Get started with importing the module:\n *\n * ```typescript\n * import { DatePickerModule } from 'carbon-components-angular';\n * ```\n *\n * [See demo](../../?path=/story/components-date-picker--single)\n */\n@Component({\n\tselector: \"cds-date-picker, ibm-date-picker\",\n\ttemplate: `\n\t<div class=\"cds--form-item\">\n\t\t<div\n\t\t\tclass=\"cds--date-picker\"\n\t\t\t[ngClass]=\"{\n\t\t\t\t'cds--date-picker--range' : range,\n\t\t\t\t'cds--date-picker--single' : !range,\n\t\t\t\t'cds--date-picker--light' : theme === 'light',\n\t\t\t\t'cds--skeleton' : skeleton\n\t\t\t}\">\n\t\t\t<div class=\"cds--date-picker-container\">\n\t\t\t\t<cds-date-picker-input\n\t\t\t\t\t#input\n\t\t\t\t\t[label]=\"label\"\n\t\t\t\t\t[placeholder]=\"placeholder\"\n\t\t\t\t\t[pattern]=\"inputPattern\"\n\t\t\t\t\t[id]=\"id + '-input'\"\n\t\t\t\t\t[size]=\"size\"\n\t\t\t\t\t[type]=\"(range ? 'range' : 'single')\"\n\t\t\t\t\t[hasIcon]=\"(range ? false : true)\"\n\t\t\t\t\t[disabled]=\"disabled\"\n\t\t\t\t\t[invalid]=\"invalid\"\n\t\t\t\t\t[invalidText]=\"invalidText\"\n\t\t\t\t\t[warn]=\"warn\"\n\t\t\t\t\t[warnText]=\"warnText\"\n\t\t\t\t\t[skeleton]=\"skeleton\"\n\t\t\t\t\t[helperText]=\"helperText\"\n\t\t\t\t\t(valueChange)=\"onValueChange($event)\"\n\t\t\t\t\t(click)=\"openCalendar(input)\">\n\t\t\t\t</cds-date-picker-input>\n\t\t\t</div>\n\n\t\t\t<div *ngIf=\"range\" class=\"cds--date-picker-container\">\n\t\t\t\t<cds-date-picker-input\n\t\t\t\t\t#rangeInput\n\t\t\t\t\t[label]=\"rangeLabel\"\n\t\t\t\t\t[placeholder]=\"placeholder\"\n\t\t\t\t\t[pattern]=\"inputPattern\"\n\t\t\t\t\t[id]=\"id + '-rangeInput'\"\n\t\t\t\t\t[size]=\"size\"\n\t\t\t\t\t[type]=\"(range ? 'range' : 'single')\"\n\t\t\t\t\t[hasIcon]=\"(range ? true : null)\"\n\t\t\t\t\t[disabled]=\"disabled\"\n\t\t\t\t\t[invalid]=\"rangeInvalid\"\n\t\t\t\t\t[invalidText]=\"rangeInvalidText\"\n\t\t\t\t\t[warn]=\"rangeWarn\"\n\t\t\t\t\t[warnText]=\"rangeWarnText\"\n\t\t\t\t\t[skeleton]=\"skeleton\"\n\t\t\t\t\t[helperText]=\"rangeHelperText\"\n\t\t\t\t\t(valueChange)=\"onRangeValueChange($event)\"\n\t\t\t\t\t(click)=\"openCalendar(rangeInput)\">\n\t\t\t\t</cds-date-picker-input>\n\t\t\t</div>\n\t\t</div>\n\t</div>\n\t`,\n\tproviders: [\n\t\t{\n\t\t\tprovide: NG_VALUE_ACCESSOR,\n\t\t\tuseExisting: DatePicker,\n\t\t\tmulti: true\n\t\t}\n\t],\n\tencapsulation: ViewEncapsulation.None\n})\nexport class DatePicker implements\n\tOnInit,\n\tOnDestroy,\n\tOnChanges,\n\tAfterViewChecked,\n\tAfterViewInit {\n\tprivate static datePickerCount = 0;\n\n\t/**\n\t * Select calendar range mode\n\t */\n\t@Input() range = false;\n\n\t/**\n\t * Format of date\n\t *\n\t * For reference: https://flatpickr.js.org/formatting/\n\t */\n\t@Input() dateFormat = \"m/d/Y\";\n\n\t/**\n\t * Language of the flatpickr calendar.\n\t *\n\t * For reference of the possible locales:\n\t * https://github.com/flatpickr/flatpickr/blob/master/src/l10n/index.ts\n\t */\n\t@Input() language = \"en\";\n\n\t@Input() label: string | TemplateRef<any>;\n\t@Input() helperText: string | TemplateRef<any>;\n\t@Input() rangeHelperText: string | TemplateRef<any>;\n\t@Input() rangeLabel: string;\n\n\t@Input() placeholder = \"mm/dd/yyyy\";\n\n\t/**\n\t * Aria label added to datepicker's calendar container.\n\t */\n\t@Input() ariaLabel = \"calendar container\";\n\n\t/**\n\t * The pattern for the underlying input element\n\t */\n\t@Input() inputPattern = \"^\\\\d{1,2}/\\\\d{1,2}/\\\\d{4}$\";\n\n\t@Input() id = `datepicker-${DatePicker.datePickerCount++}`;\n\n\t@Input() set value(v: (Date | string)[]) {\n\t\tif (!v) {\n\t\t\tv = [];\n\t\t}\n\t\tthis._value = v;\n\t}\n\n\tget value() {\n\t\treturn this._value;\n\t}\n\n\t/**\n\t * @deprecated since v5 - Use `cdsLayer` directive instead\n\t * Set to `\"light\"` to apply the light style\n\t */\n\t@Input() theme: \"light\" | \"dark\" = \"dark\";\n\n\t@Input() disabled = false;\n\t/**\n\t * Set to `true` to display the invalid state.\n\t */\n\t@Input() invalid = false;\n\t/**\n\t * Value displayed if datepicker is in an invalid state.\n\t */\n\t@Input() invalidText: string | TemplateRef<any>;\n\t/**\n\t * Set to `true` to show a warning (contents set by warningText)\n\t */\n\t@Input() warn = false;\n\t/**\n\t * Sets the warning text\n\t */\n\t@Input() warnText: string | TemplateRef<any>;\n\n\t@Input() size: \"sm\" | \"md\" | \"lg\" = \"md\";\n\t/**\n\t * Set to `true` to display the invalid state for the second datepicker input.\n\t */\n\t@Input() rangeInvalid = false;\n\t/**\n\t * Value displayed if the second datepicker input is in an invalid state.\n\t */\n\t@Input() rangeInvalidText: string | TemplateRef<any>;\n\t/**\n\t * Set to `true` to show a warning in the second datepicker input (contents set by rangeWarningText)\n\t */\n\t@Input() rangeWarn = false;\n\t/**\n\t * Sets the warning text for the second datepicker input\n\t */\n\t@Input() rangeWarnText: string | TemplateRef<any>;\n\n\t@Input() skeleton = false;\n\n\t@Input() plugins = [];\n\n\t@Input()\n\tset flatpickrOptions(options: Partial<Options>) {\n\t\tthis._flatpickrOptions = Object.assign({}, this._flatpickrOptions, options);\n\t}\n\tget flatpickrOptions(): Partial<Options> {\n\t\tconst plugins = [...this.plugins, carbonFlatpickrMonthSelectPlugin];\n\t\tif (this.range) {\n\t\t\tplugins.push(rangePlugin({ input: `#${this.id}-rangeInput`, position: \"left\" }));\n\t\t}\n\t\treturn Object.assign({}, this._flatpickrOptions, this.flatpickrBaseOptions, {\n\t\t\tmode: this.range ? \"range\" : \"single\",\n\t\t\tplugins,\n\t\t\tdateFormat: this.dateFormat,\n\t\t\tlocale: languages.default?.default[this.language] || languages.default[this.language]\n\t\t});\n\t}\n\n\t@ViewChild(\"input\", { static: true }) input: DatePickerInput;\n\t@ViewChild(\"rangeInput\") rangeInput: DatePickerInput;\n\n\t@Output() valueChange: EventEmitter<any> = new EventEmitter();\n\n\t/**\n\t * We are overriding onClose event even if users pass it via flatpickr options\n\t * Emits an event when date picker closes\n\t */\n\t@Output() onClose: EventEmitter<any> = new EventEmitter();\n\n\tprotected _value = [];\n\n\tprotected _flatpickrOptions: Partial<Options> = {\n\t\tallowInput: true\n\t};\n\n\tprotected flatpickrBaseOptions = {\n\t\tmode: \"single\",\n\t\tdateFormat: \"m/d/Y\",\n\t\tplugins: this.plugins,\n\t\tonOpen: () => {\n\t\t\tthis.updateClassNames();\n\t\t\tthis.updateAttributes();\n\t\t\tthis.updateCalendarListeners();\n\t\t},\n\t\tonClose: (date) => {\n\t\t\t// This makes sure that the `flatpickrInstance selectedDates` are in sync with the values of\n\t\t\t// the inputs when the calendar closes.\n\t\t\tif (this.range && this.flatpickrInstance) {\n\t\t\t\tif (this.flatpickrInstance.selectedDates.length !== 2) {\n\t\t\t\t\t// we could `this.flatpickrInstance.clear()` but it insists on opening the second picker\n\t\t\t\t\t// in some cases, so instead we do this\n\t\t\t\t\tthis.setDateValues([]);\n\t\t\t\t\tthis.doSelect([]);\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t\tconst inputValue = this.input.input.nativeElement.value;\n\t\t\t\tconst rangeInputValue = this.rangeInput.input.nativeElement.value;\n\t\t\t\tif (inputValue || rangeInputValue) {\n\t\t\t\t\tconst parseDate = (date: string) => this.flatpickrInstance.parseDate(date, this.dateFormat);\n\t\t\t\t\tthis.setDateValues([parseDate(inputValue), parseDate(rangeInputValue)]);\n\t\t\t\t\tthis.doSelect(this.flatpickrInstance.selectedDates);\n\t\t\t\t}\n\t\t\t}\n\t\t\tthis.onClose.emit(date);\n\t\t},\n\t\tonDayCreate: (_dObj, _dStr, _fp, dayElem) => {\n\t\t\tdayElem.classList.add(\"cds--date-picker__day\");\n\t\t},\n\t\tnextArrow: this.rightArrowHTML(),\n\t\tprevArrow: this.leftArrowHTML(),\n\t\tvalue: this.value\n\t};\n\n\tprotected flatpickrInstance = null;\n\n\tconstructor(\n\t\tprotected elementRef: ElementRef,\n\t\tprotected i18n: I18n\n\t) { }\n\n\tngOnInit() {\n\t\t// if i18n is set to anything other than en we'll want to change the language\n\t\t// otherwise we'll just use the local setting\n\t\tif (this.i18n.getLocale() !== \"en\") {\n\t\t\tthis.i18n.getLocaleObservable().subscribe(locale => {\n\t\t\t\tthis.language = locale;\n\t\t\t\tthis.resetFlatpickrInstance();\n\t\t\t});\n\t\t}\n\t}\n\n\tngOnChanges(changes: SimpleChanges) {\n\t\t// Reset the flatpickr instance on input changes that affect flatpickr.\n\t\tconst flatpickrChangeKeys = [\n\t\t\t\"range\",\n\t\t\t\"dateFormat\",\n\t\t\t\"language\",\n\t\t\t\"id\",\n\t\t\t\"value\",\n\t\t\t\"plugins\",\n\t\t\t\"flatpickrOptions\"\n\t\t];\n\t\tconst changeKeys = Object.keys(changes);\n\t\tif (changeKeys.some(key => flatpickrChangeKeys.includes(key))) {\n\t\t\tthis.resetFlatpickrInstance(changes.value);\n\t\t}\n\t}\n\n\tngAfterViewInit() {\n\t\tsetTimeout(() => {\n\t\t\tthis.addInputListeners();\n\t\t}, 0);\n\t}\n\n\t// because the actual view may be delayed in loading (think projection into a tab pane)\n\t// and because we rely on a library that operates outside the Angular view of the world\n\t// we need to keep trying to load the library, until the relevant DOM is actually live\n\tngAfterViewChecked() {\n\t\tif (!this.isFlatpickrLoaded()) {\n\t\t\t// @ts-ignore ts is unhappy with the below call to `flatpickr`\n\t\t\tthis.flatpickrInstance = flatpickr(`#${this.id}-input`, this.flatpickrOptions);\n\t\t\t// if (and only if) the initialization succeeded, we can set the date values\n\t\t\tif (this.isFlatpickrLoaded()) {\n\t\t\t\tif (this.value.length > 0) {\n\t\t\t\t\tthis.setDateValues(this.value);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\n\t@HostListener(\"focusin\")\n\tonFocus() {\n\t\t// Updates the month manually when calendar mode is range because month\n\t\t// will not update properly without manually updating them on focus.\n\t\tif (this.range) {\n\t\t\tif (this.rangeInput.input.nativeElement === document.activeElement && this.flatpickrInstance.selectedDates[1]) {\n\t\t\t\tconst currentMonth = this.flatpickrInstance.selectedDates[1].getMonth();\n\t\t\t\tthis.flatpickrInstance.changeMonth(currentMonth, false);\n\t\t\t} else if (this.input.input.nativeElement === document.activeElement && this.flatpickrInstance.selectedDates[0]) {\n\t\t\t\tconst currentMonth = this.flatpickrInstance.selectedDates[0].getMonth();\n\t\t\t\tthis.flatpickrInstance.changeMonth(currentMonth, false);\n\t\t\t}\n\t\t}\n\t}\n\n\t@HostListener(\"focusout\")\n\tonFocusOut() {\n\t\tthis.onTouched();\n\t}\n\n\t/**\n\t * Writes a value from the model to the component. Expects the value to be `null` or `(Date | string)[]`\n\t * @param value value received from the model\n\t */\n\twriteValue(value: (Date | string)[]) {\n\t\tthis.value = value;\n\t\tsetTimeout(() => {\n\t\t\tif (this.isFlatpickrLoaded() && this.flatpickrInstance.config) {\n\t\t\t\tthis.setDateValues(this.value);\n\t\t\t}\n\t\t});\n\t}\n\n\t/**\n\t * `ControlValueAccessor` method to programmatically disable the DatePicker.\n\t *\n\t * ex: `this.formGroup.get(\"myDatePicker\").disable();`\n\t *\n\t * @param isDisabled `true` to disable the DatePicker\n\t */\n\tsetDisabledState(isDisabled: boolean) {\n\t\tthis.disabled = isDisabled;\n\t}\n\n\tregisterOnChange(fn: any) {\n\t\tthis.propagateChange = fn;\n\t}\n\n\tregisterOnTouched(fn: any) {\n\t\tthis.onTouched = fn;\n\t}\n\n\tonTouched: () => any = () => { };\n\n\tpropagateChange = (_: any) => { };\n\n\t/**\n\t * Cleans up our flatpickr instance\n\t */\n\tngOnDestroy() {\n\t\tif (!this.isFlatpickrLoaded()) { return; }\n\t\tthis.flatpickrInstance.destroy();\n\t}\n\n\t/**\n\t * Handles the `valueChange` event from the primary/single input\n\t */\n\tonValueChange(event: string) {\n\t\tif (this.isFlatpickrLoaded()) {\n\t\t\tconst date = this.flatpickrInstance.parseDate(event, this.dateFormat);\n\t\t\tif (this.range) {\n\t\t\t\tthis.setDateValues([date, this.flatpickrInstance.selectedDates[1]]);\n\t\t\t} else {\n\t\t\t\tthis.setDateValues([date]);\n\t\t\t}\n\t\t\tthis.doSelect(this.flatpickrInstance.selectedDates);\n\t\t}\n\t}\n\n\t/**\n\t * Handles the `valueChange` event from the range input\n\t */\n\tonRangeValueChange(event: string) {\n\t\tif (this.isFlatpickrLoaded() && this.flatpickrInstance.isOpen) {\n\t\t\tconst date = this.flatpickrInstance.parseDate(event, this.dateFormat);\n\t\t\tthis.setDateValues([this.flatpickrInstance.selectedDates[0], date]);\n\t\t\tthis.doSelect(this.flatpickrInstance.selectedDates);\n\t\t}\n\t}\n\n\t/**\n\t * Handles opening the calendar \"properly\" when the calendar icon is clicked.\n\t */\n\topenCalendar(datepickerInput: DatePickerInput) {\n\t\tif (this.range) {\n\t\t\tdatepickerInput.input.nativeElement.click();\n\n\t\t\t// If the first input's calendar icon is clicked when calendar is in range mode, then\n\t\t\t// the month and year needs to be manually changed to the current selected month and\n\t\t\t// year otherwise the calendar view will not be updated upon opening.\n\t\t\tif (datepickerInput === this.input && this.flatpickrInstance.selectedDates[0]) {\n\t\t\t\tconst currentMonth = this.flatpickrInstance.selectedDates[0].getMonth();\n\n\t\t\t\tthis.flatpickrInstance.currentYear = this.flatpickrInstance.selectedDates[0].getFullYear();\n\t\t\t\tthis.flatpickrInstance.changeMonth(currentMonth, false);\n\t\t\t}\n\t\t} else {\n\t\t\t// Single-mode flatpickr handles mousedown but not click, so nativeElement.click() won't\n\t\t\t// work when the calendar icon is clicked. In this case we simply use flatpickr.open().\n\t\t\tthis.flatpickrInstance.open();\n\t\t}\n\t}\n\n\tprotected updateCalendarListeners() {\n\t\tconst calendarContainer = document.querySelectorAll(\".flatpickr-calendar\");\n\t\tArray.from(calendarContainer).forEach(calendar => {\n\t\t\tcalendar.removeEventListener(\"click\", this.preventCalendarClose);\n\t\t\tcalendar.addEventListener(\"click\", this.preventCalendarClose);\n\t\t});\n\t}\n\n\t/**\n\t * Handles the initialization of event listeners for the datepicker input and range input fields.\n\t */\n\tprotected addInputListeners() {\n\t\tif (!this.isFlatpickrLoaded()) {\n\t\t\treturn;\n\t\t}\n\n\t\t// Allows focus transition from the datepicker input or range input field to\n\t\t// flatpickr calendar using a keyboard.\n\t\tconst addFocusCalendarListener = (element: HTMLInputElement) => {\n\t\t\telement.addEventListener(\"keydown\", (event: KeyboardEvent) => {\n\t\t\t\tif (event.key === \"Escape\") {\n\t\t\t\t\tthis.flatpickrInstance.close();\n\t\t\t\t}\n\t\t\t\tif (event.key === \"ArrowDown\") {\n\t\t\t\t\tif (!this.flatpickrInstance.isOpen) {\n\t\t\t\t\t\tthis.flatpickrInstance.open();\n\t\t\t\t\t}\n\n\t\t\t\t\tconst calendarContainer = this.flatpickrInstance.calendarContainer;\n\t\t\t\t\tconst dayElement = calendarContainer && calendarContainer.querySelector(\".flatpickr-day[tabindex]\");\n\n\t\t\t\t\tif (dayElement) {\n\t\t\t\t\t\tdayElement.focus();\n\n\t\t\t\t\t\t// If the user manually inputs a value into the date field and presses arrow down,\n\t\t\t\t\t\t// datepicker input onchange will be triggered when focus is removed from it and\n\t\t\t\t\t\t// `flatpickrInstance.setDate` and `flatpickrInstance.changeMonth` will be invoked\n\t\t\t\t\t\t// which will automatically change focus to the beginning of the document.\n\t\t\t\t\t\tif (document.activeElement !== dayElement && this.flatpickrInstance.selectedDateElem) {\n\t\t\t\t\t\t\tthis.flatpickrInstance.selectedDateElem.focus();\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t});\n\t\t};\n\n\t\tif (this.input && this.input.input) {\n\t\t\taddFocusCalendarListener(this.input.input.nativeElement);\n\t\t}\n\n\t\tif (this.rangeInput && this.rangeInput.input) {\n\t\t\taddFocusCalendarListener(this.rangeInput.input.nativeElement);\n\t\t}\n\t}\n\n\t/**\n\t * Resets the flatpickr instance while keeping the date values (or updating them if newDates is provided)\n\t *\n\t * Used to pick up input changes or locale changes.\n\t *\n\t * @param newDates An optional SimpleChange of date values\n\t */\n\tprotected resetFlatpickrInstance(newDates?: SimpleChange) {\n\t\tif (this.isFlatpickrLoaded()) {\n\t\t\tlet dates = this.flatpickrInstance.selectedDates;\n\t\t\tif (newDates && this.didDateValueChange(newDates.currentValue, newDates.previousValue)) {\n\t\t\t\tdates = newDates.currentValue;\n\t\t\t}\n\t\t\t// only reset the flatpickr instance on Input changes\n\t\t\t// @ts-ignore ts is unhappy with the below call to `flatpickr`\n\t\t\tthis.flatpickrInstance = flatpickr(`#${this.id}-input`, this.flatpickrOptions);\n\t\t\tthis.setDateValues(dates);\n\t\t}\n\t}\n\n\t/**\n\t * Carbon uses a number of specific classnames for parts of the flatpickr - this idempotent method applies them if needed.\n\t */\n\tprotected updateClassNames() {\n\t\tif (!this.elementRef) { return; }\n\t\t// get all the possible flatpickrs in the document - we need to add classes to (potentially) all of them\n\t\tconst calendarContainer = document.querySelectorAll(\".flatpickr-calendar\");\n\t\tconst monthContainer = document.querySelectorAll(\".flatpickr-month\");\n\t\tconst weekdaysContainer = document.querySelectorAll(\".flatpickr-weekdays\");\n\t\tconst weekdayContainer = document.querySelectorAll(\".flatpickr-weekday\");\n\t\tconst daysContainer = document.querySelectorAll(\".flatpickr-days\");\n\t\tconst dayContainer = document.querySelectorAll(\".flatpickr-day\");\n\n\t\t// add classes to lists of elements\n\t\tconst addClassIfNotExists = (classname: string, elementList: NodeListOf<Element>) => {\n\t\t\tArray.from(elementList).forEach(element => {\n\t\t\t\tif (!element.classList.contains(classname)) {\n\t\t\t\t\telement.classList.add(classname);\n\t\t\t\t}\n\t\t\t});\n\t\t};\n\n\t\t// add classes (but only if they don't exist, small perf win)\n\t\taddClassIfNotExists(\"cds--date-picker__calendar\", calendarContainer);\n\t\taddClassIfNotExists(\"cds--date-picker__month\", monthContainer);\n\t\taddClassIfNotExists(\"cds--date-picker__weekdays\", weekdaysContainer);\n\t\taddClassIfNotExists(\"cds--date-picker__days\", daysContainer);\n\n\t\t// add weekday classes and format the text\n\t\tArray.from(weekdayContainer).forEach(element => {\n\t\t\telement.innerHTML = element.innerHTML.replace(/\\s+/g, \"\");\n\t\t\telement.classList.add(\"cds--date-picker__weekday\");\n\t\t});\n\n\t\t// add day classes and special case the \"today\" element based on `this.value`\n\t\tArray.from(dayContainer).forEach(element => {\n\t\t\telement.classList.add(\"cds--date-picker__day\");\n\t\t\tif (!this.value) {\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tif (element.classList.contains(\"today\") && this.value.length > 0) {\n\t\t\t\telement.classList.add(\"no-border\");\n\t\t\t} else if (element.classList.contains(\"today\") && this.value.length === 0) {\n\t\t\t\telement.classList.remove(\"no-border\");\n\t\t\t}\n\t\t});\n\t}\n\n\tprotected updateAttributes() {\n\t\tconst calendarContainer = document.querySelectorAll(\".flatpickr-calendar\");\n\t\tArray.from(calendarContainer).forEach(calendar => {\n\t\t\tcalendar.setAttribute(\"role\", \"region\");\n\t\t\tcalendar.setAttribute(\"aria-label\", this.ariaLabel);\n\t\t});\n\t}\n\n\t/**\n\t * Applies the given date value array to both the flatpickr instance and the `input`(s)\n\t * @param dates the date values to apply\n\t */\n\tprotected setDateValues(dates: (Date | string)[]) {\n\t\tif (this.isFlatpickrLoaded()) {\n\t\t\tconst singleInput = this.elementRef.nativeElement.querySelector(`#${this.id}-input`);\n\t\t\tconst rangeInput = this.elementRef.nativeElement.querySelector(`#${this.id}-rangeInput`);\n\n\t\t\t// `flatpickrInstance.setDate` removes the focus on the selected date element and will\n\t\t\t// automatically change focus to the beginning of the document. If a selected date is\n\t\t\t// focused before `flatpickrInstance.setDate` is invoked then it should remain focused.\n\t\t\tlet shouldRefocusDateElement = this.flatpickrInstance.selectedDateElem === document.activeElement;\n\n\t\t\t// set the date on the instance\n\t\t\tthis.flatpickrInstance.setDate(dates);\n\n\t\t\tif (shouldRefocusDateElement) {\n\t\t\t\tthis.flatpickrInstance.selectedDateElem.focus();\n\t\t\t}\n\n\t\t\t// we can either set a date value or an empty string, so we start with an empty string\n\t\t\tlet singleDate = \"\";\n\t\t\t// if date is a string, parse and format\n\t\t\tif (typeof this.flatpickrInstance.selectedDates[0] === \"string\") {\n\t\t\t\tsingleDate = this.flatpickrInstance.parseDate(this.flatpickrInstance.selectedDates[0], this.dateFormat);\n\t\t\t\tsingleDate = this.flatpickrInstance.formatDate(singleDate, this.dateFormat);\n\t\t\t// if date is not a string we can assume it's a Date and we should format\n\t\t\t} else if (!!this.flatpickrInstance.selectedDates[0]) {\n\t\t\t\tsingleDate = this.flatpickrInstance.formatDate(this.flatpickrInstance.selectedDates[0], this.dateFormat);\n\t\t\t}\n\n\t\t\tif (rangeInput) {\n\t\t\t\t// we can either set a date value or an empty string, so we start with an empty string\n\t\t\t\tlet rangeDate = \"\";\n\t\t\t\t// if date is a string, parse and format\n\t\t\t\tif (typeof this.flatpickrInstance.selectedDates[1] === \"string\") {\n\t\t\t\t\trangeDate = this.flatpickrInstance.parseDate(this.flatpickrInstance.selectedDates[1].toString(), this.dateFormat);\n\t\t\t\t\trangeDate = this.flatpickrInstance.formatDate(rangeDate, this.dateFormat);\n\t\t\t\t// if date is not a string we can assume it's a Date and we should format\n\t\t\t\t} else if (!!this.flatpickrInstance.selectedDates[1]) {\n\t\t\t\t\trangeDate = this.flatpickrInstance.formatDate(this.flatpickrInstance.selectedDates[1], this.dateFormat);\n\t\t\t\t}\n\t\t\t\tsetTimeout(() => {\n\t\t\t\t\t// apply the values\n\t\t\t\t\trangeInput.value = rangeDate;\n\t\t\t\t\tsingleInput.value = singleDate;\n\t\t\t\t});\n\t\t\t}\n\t\t}\n\t}\n\n\tprotected preventCalendarClose = event => event.stopPropagation();\n\n\tprotected doSelect(selectedValue: (Date | string)[]) {\n\t\t// In range mode, if a date is selected from the first calendar that is from the previous month,\n\t\t// the month will not be updated on the calendar until the calendar is re-opened.\n\t\t// This will make sure the calendar is updated with the correct month.\n\t\tif (this.range && this.flatpickrInstance.selectedDates[0]) {\n\t\t\tconst currentMonth = this.flatpickrInstance.selectedDates[0].getMonth();\n\n\t\t\t// `flatpickrInstance.changeMonth` removes the focus on the selected date element and will\n\t\t\t// automatically change focus to the beginning of the document. If a selected date is\n\t\t\t// focused before `flatpickrInstance.changeMonth` is invoked then it should remain focused.\n\t\t\tlet shouldRefocusDateElement = this.flatpickrInstance.selectedDateElem === document.activeElement;\n\n\t\t\tthis.flatpickrInstance.changeMonth(currentMonth, false);\n\n\t\t\tif (shouldRefocusDateElement) {\n\t\t\t\tthis.flatpickrInstance.selectedDateElem.focus();\n\t\t\t}\n\n\t\t}\n\t\tthis.valueChange.emit(selectedValue);\n\t\tthis.propagateChange(selectedValue);\n\t}\n\n\tprotected didDateValueChange(currentValue, previousValue) {\n\t\treturn currentValue[0] !== previousValue[0] || currentValue[1] !== previousValue[1];\n\t}\n\n\t/**\n\t * More advanced checking of the loaded state of flatpickr\n\t */\n\tprotected isFlatpickrLoaded() {\n\t\t// cast the instance to a boolean, and some method that has to exist for the library to be loaded in this case `setDate`\n\t\treturn !!this.flatpickrInstance && !!this.flatpickrInstance.setDate;\n\t}\n\n\t/**\n\t * Right arrow HTML passed to flatpickr\n\t */\n\tprotected rightArrowHTML() {\n\t\treturn `\n\t\t\t<svg width=\"16px\" height=\"16px\" viewBox=\"0 0 16 16\">\n\t\t\t\t<polygon points=\"11,8 6,13 5.3,12.3 9.6,8 5.3,3.7 6,3 \"/>\n\t\t\t\t<rect width=\"16\" height=\"16\" style=\"fill:none\" />\n\t\t\t</svg>`;\n\t}\n\n\t/**\n\t * Left arrow HTML passed to flatpickr\n\t */\n\tprotected leftArrowHTML() {\n\t\treturn `\n\t\t\t<svg width=\"16px\" height=\"16px\" viewBox=\"0 0 16 16\">\n\t\t\t\t<polygon points=\"5,8 10,3 10.7,3.7 6.4,8 10.7,12.3 10,13 \"/>\n\t\t\t\t<rect width=\"16\" height=\"16\" style=\"fill:none\" />\n\t\t\t</svg>`;\n\t}\n}\n",
25976
25976
  "assetsDirs": [],
25977
25977
  "styleUrlsData": "",
25978
25978
  "stylesData": "",
@@ -25995,7 +25995,7 @@
25995
25995
  "deprecationMessage": ""
25996
25996
  }
25997
25997
  ],
25998
- "line": 296,
25998
+ "line": 297,
25999
25999
  "jsdoctags": [
26000
26000
  {
26001
26001
  "name": "elementRef",
@@ -26041,7 +26041,7 @@
26041
26041
  }
26042
26042
  ],
26043
26043
  "returnType": "void",
26044
- "line": 167,
26044
+ "line": 168,
26045
26045
  "jsdoctags": [
26046
26046
  {
26047
26047
  "name": "v",
@@ -26058,7 +26058,7 @@
26058
26058
  "name": "value",
26059
26059
  "type": "",
26060
26060
  "returnType": "",
26061
- "line": 174
26061
+ "line": 175
26062
26062
  }
26063
26063
  },
26064
26064
  "flatpickrOptions": {
@@ -26071,17 +26071,17 @@
26071
26071
  "args": [
26072
26072
  {
26073
26073
  "name": "options",
26074
- "type": "",
26074
+ "type": "Partial<Options>",
26075
26075
  "deprecated": false,
26076
26076
  "deprecationMessage": ""
26077
26077
  }
26078
26078
  ],
26079
26079
  "returnType": "void",
26080
- "line": 225,
26080
+ "line": 226,
26081
26081
  "jsdoctags": [
26082
26082
  {
26083
26083
  "name": "options",
26084
- "type": "",
26084
+ "type": "Partial<Options>",
26085
26085
  "deprecated": false,
26086
26086
  "deprecationMessage": "",
26087
26087
  "tagName": {
@@ -26093,8 +26093,8 @@
26093
26093
  "getSignature": {
26094
26094
  "name": "flatpickrOptions",
26095
26095
  "type": "",
26096
- "returnType": "",
26097
- "line": 228
26096
+ "returnType": "Partial<Options>",
26097
+ "line": 229
26098
26098
  }
26099
26099
  }
26100
26100
  }
@@ -47167,7 +47167,7 @@
47167
47167
  },
47168
47168
  {
47169
47169
  "name": "SideNav",
47170
- "id": "component-SideNav-971427ecce046bab5c1bdd9e2f7411e3be9f461ffba908ae1c2a5321187f6178a1de8d126c1af993ad111ea2371d09751394ffda32787aa5a36762a98a5e6a72",
47170
+ "id": "component-SideNav-6ce82417fce75681aad2fef673a42b9263d40532de80989b047515ecfabe6ae2ecddc25dea6fd306bcd6aad713be9eb4e706967645eb6160c7510eabe04bc5e7",
47171
47171
  "file": "src/ui-shell/sidenav/sidenav.component.ts",
47172
47172
  "encapsulation": [
47173
47173
  "ViewEncapsulation.None"
@@ -47179,7 +47179,7 @@
47179
47179
  "selector": "cds-sidenav, ibm-sidenav",
47180
47180
  "styleUrls": [],
47181
47181
  "styles": [],
47182
- "template": "<nav class=\"cds--side-nav__items\" [attr.aria-label]=\"ariaLabel\">\n\t<ng-content select=\"cds-sidenav-header,ibm-sidenav-header\"></ng-content>\n\t<div role=\"list\">\n\t\t<div class=\"cds--side-nav__header-navigation cds--side-nav__header-divider\">\n\t\t\t<ng-container *ngFor=\"let navigationItem of navigationItems\">\n\t\t\t\t<cds-sidenav-item\n\t\t\t\t\t*ngIf=\"navigationItem.type === 'item'\"\n\t\t\t\t\t[href]=\"navigationItem.href\"\n\t\t\t\t\t[route]=\"navigationItem.route\"\n\t\t\t\t\t[routeExtras]=\"navigationItem.routeExtras\"\n\t\t\t\t\t[title]=\"navigationItem.title\">\n\t\t\t\t\t{{ navigationItem.content }}\n\t\t\t\t</cds-sidenav-item>\n\t\t\t\t<cds-sidenav-menu\n\t\t\t\t\t*ngIf=\"navigationItem.type === 'menu'\"\n\t\t\t\t\t[title]=\"navigationItem.title\"\n\t\t\t\t\t[menuItems]=\"navigationItem.menuItems\">\n\t\t\t\t</cds-sidenav-menu>\n\t\t\t</ng-container>\n\t\t</div>\n\t\t<ng-content></ng-content>\n\t</div>\n\t<footer class=\"cds--side-nav__footer\">\n\t\t<button\n\t\t\t*ngIf=\"allowExpansion\"\n\t\t\tclass=\"cds--side-nav__toggle\"\n\t\t\ttype=\"button\"\n\t\t\t[title]=\"(expanded ? i18n.get('UI_SHELL.SIDE_NAV.TOGGLE_CLOSE') : i18n.get('UI_SHELL.SIDE_NAV.TOGGLE_OPEN')) | async\"\n\t\t\t(click)=\"toggle()\">\n\t\t\t<div class=\"cds--side-nav__icon\">\n\t\t\t\t<svg\n\t\t\t\t\t*ngIf=\"expanded\"\n\t\t\t\t\tfocusable=\"false\"\n\t\t\t\t\tpreserveAspectRatio=\"xMidYMid meet\"\n\t\t\t\t\tstyle=\"will-change: transform;\"\n\t\t\t\t\txmlns=\"http://www.w3.org/2000/svg\"\n\t\t\t\t\twidth=\"20\"\n\t\t\t\t\theight=\"20\"\n\t\t\t\t\tviewBox=\"0 0 32 32\"\n\t\t\t\t\taria-hidden=\"true\">\n\t\t\t\t\t<path d=\"M24 9.4L22.6 8 16 14.6 9.4 8 8 9.4l6.6 6.6L8 22.6 9.4 24l6.6-6.6 6.6 6.6 1.4-1.4-6.6-6.6L24 9.4z\"></path>\n\t\t\t\t</svg>\n\t\t\t\t<svg\n\t\t\t\t\t*ngIf=\"!expanded\"\n\t\t\t\t\tfocusable=\"false\"\n\t\t\t\t\tpreserveAspectRatio=\"xMidYMid meet\"\n\t\t\t\t\tstyle=\"will-change: transform;\"\n\t\t\t\t\txmlns=\"http://www.w3.org/2000/svg\"\n\t\t\t\t\twidth=\"20\"\n\t\t\t\t\theight=\"20\"\n\t\t\t\t\tviewBox=\"0 0 32 32\"\n\t\t\t\t\taria-hidden=\"true\">\n\t\t\t\t\t<path d=\"M22 16L12 26l-1.4-1.4 8.6-8.6-8.6-8.6L12 6z\"></path>\n\t\t\t\t</svg>\n\t\t\t</div>\n\t\t\t<span class=\"cds--assistive-text\">\n\t\t\t\t{{(expanded ? i18n.get('UI_SHELL.SIDE_NAV.TOGGLE_CLOSE') : i18n.get('UI_SHELL.SIDE_NAV.TOGGLE_OPEN')) | async}}\n\t\t\t</span>\n\t\t</button>\n\t</footer>\n</nav>\n\t",
47182
+ "template": "<nav class=\"cds--side-nav__items\" [attr.aria-label]=\"ariaLabel\">\n\t<ng-content select=\"cds-sidenav-header,ibm-sidenav-header\"></ng-content>\n\t<div role=\"list\">\n\t\t<div class=\"cds--side-nav__header-navigation cds--side-nav__header-divider\">\n\t\t\t<ng-container *ngFor=\"let navigationItem of navigationItems\">\n\t\t\t\t<cds-sidenav-item\n\t\t\t\t\t*ngIf=\"navigationItem.type === 'item'\"\n\t\t\t\t\t[href]=\"navigationItem.href\"\n\t\t\t\t\t[route]=\"navigationItem.route\"\n\t\t\t\t\t[routeExtras]=\"navigationItem.routeExtras\"\n\t\t\t\t\t[useRouter]=\"useRouter\"\n\t\t\t\t\t[title]=\"navigationItem.title\">\n\t\t\t\t\t{{ navigationItem.content }}\n\t\t\t\t</cds-sidenav-item>\n\t\t\t\t<cds-sidenav-menu\n\t\t\t\t\t*ngIf=\"navigationItem.type === 'menu'\"\n\t\t\t\t\t[title]=\"navigationItem.title\"\n\t\t\t\t\t[useRouter]=\"useRouter\"\n\t\t\t\t\t[menuItems]=\"navigationItem.menuItems\">\n\t\t\t\t</cds-sidenav-menu>\n\t\t\t</ng-container>\n\t\t</div>\n\t\t<ng-content></ng-content>\n\t</div>\n\t<footer class=\"cds--side-nav__footer\">\n\t\t<button\n\t\t\t*ngIf=\"allowExpansion\"\n\t\t\tclass=\"cds--side-nav__toggle\"\n\t\t\ttype=\"button\"\n\t\t\t[title]=\"(expanded ? i18n.get('UI_SHELL.SIDE_NAV.TOGGLE_CLOSE') : i18n.get('UI_SHELL.SIDE_NAV.TOGGLE_OPEN')) | async\"\n\t\t\t(click)=\"toggle()\">\n\t\t\t<div class=\"cds--side-nav__icon\">\n\t\t\t\t<svg\n\t\t\t\t\t*ngIf=\"expanded\"\n\t\t\t\t\tfocusable=\"false\"\n\t\t\t\t\tpreserveAspectRatio=\"xMidYMid meet\"\n\t\t\t\t\tstyle=\"will-change: transform;\"\n\t\t\t\t\txmlns=\"http://www.w3.org/2000/svg\"\n\t\t\t\t\twidth=\"20\"\n\t\t\t\t\theight=\"20\"\n\t\t\t\t\tviewBox=\"0 0 32 32\"\n\t\t\t\t\taria-hidden=\"true\">\n\t\t\t\t\t<path d=\"M24 9.4L22.6 8 16 14.6 9.4 8 8 9.4l6.6 6.6L8 22.6 9.4 24l6.6-6.6 6.6 6.6 1.4-1.4-6.6-6.6L24 9.4z\"></path>\n\t\t\t\t</svg>\n\t\t\t\t<svg\n\t\t\t\t\t*ngIf=\"!expanded\"\n\t\t\t\t\tfocusable=\"false\"\n\t\t\t\t\tpreserveAspectRatio=\"xMidYMid meet\"\n\t\t\t\t\tstyle=\"will-change: transform;\"\n\t\t\t\t\txmlns=\"http://www.w3.org/2000/svg\"\n\t\t\t\t\twidth=\"20\"\n\t\t\t\t\theight=\"20\"\n\t\t\t\t\tviewBox=\"0 0 32 32\"\n\t\t\t\t\taria-hidden=\"true\">\n\t\t\t\t\t<path d=\"M22 16L12 26l-1.4-1.4 8.6-8.6-8.6-8.6L12 6z\"></path>\n\t\t\t\t</svg>\n\t\t\t</div>\n\t\t\t<span class=\"cds--assistive-text\">\n\t\t\t\t{{(expanded ? i18n.get('UI_SHELL.SIDE_NAV.TOGGLE_CLOSE') : i18n.get('UI_SHELL.SIDE_NAV.TOGGLE_OPEN')) | async}}\n\t\t\t</span>\n\t\t</button>\n\t</footer>\n</nav>\n\t",
47183
47183
  "templateUrl": [],
47184
47184
  "viewProviders": [],
47185
47185
  "hostDirectives": [],
@@ -47189,7 +47189,7 @@
47189
47189
  "defaultValue": "false",
47190
47190
  "deprecated": false,
47191
47191
  "deprecationMessage": "",
47192
- "line": 95,
47192
+ "line": 97,
47193
47193
  "type": "boolean",
47194
47194
  "decorators": []
47195
47195
  },
@@ -47198,7 +47198,7 @@
47198
47198
  "defaultValue": "\"Side navigation\"",
47199
47199
  "deprecated": false,
47200
47200
  "deprecationMessage": "",
47201
- "line": 84,
47201
+ "line": 86,
47202
47202
  "type": "string",
47203
47203
  "decorators": []
47204
47204
  },
@@ -47209,7 +47209,7 @@
47209
47209
  "deprecationMessage": "",
47210
47210
  "rawdescription": "\n\nControls the expanded (`true`) or collapsed (`false`) state when on a small screen.\n",
47211
47211
  "description": "<p>Controls the expanded (<code>true</code>) or collapsed (<code>false</code>) state when on a small screen.</p>\n",
47212
- "line": 88,
47212
+ "line": 90,
47213
47213
  "type": "boolean",
47214
47214
  "decorators": []
47215
47215
  },
@@ -47220,7 +47220,7 @@
47220
47220
  "deprecationMessage": "",
47221
47221
  "rawdescription": "\n\nControls the hidden (`true`) or visible (`false`) state\n",
47222
47222
  "description": "<p>Controls the hidden (<code>true</code>) or visible (<code>false</code>) state</p>\n",
47223
- "line": 92,
47223
+ "line": 94,
47224
47224
  "type": "boolean",
47225
47225
  "decorators": []
47226
47226
  },
@@ -47230,7 +47230,7 @@
47230
47230
  "deprecationMessage": "",
47231
47231
  "rawdescription": "\n\nNavigationItems from the header navigation component which are displayed on the sidenav when the window\ninnerWidth is small enough. Sidenav items and menus are created using the model used to create header\nnavigation items.\n",
47232
47232
  "description": "<p>NavigationItems from the header navigation component which are displayed on the sidenav when the window\ninnerWidth is small enough. Sidenav items and menus are created using the model used to create header\nnavigation items.</p>\n",
47233
- "line": 102,
47233
+ "line": 104,
47234
47234
  "type": "NavigationItem[]",
47235
47235
  "decorators": []
47236
47236
  },
@@ -47239,7 +47239,18 @@
47239
47239
  "defaultValue": "false",
47240
47240
  "deprecated": false,
47241
47241
  "deprecationMessage": "",
47242
- "line": 93,
47242
+ "line": 95,
47243
+ "type": "boolean",
47244
+ "decorators": []
47245
+ },
47246
+ {
47247
+ "name": "useRouter",
47248
+ "defaultValue": "false",
47249
+ "deprecated": false,
47250
+ "deprecationMessage": "",
47251
+ "rawdescription": "\n\nUse the routerLink attribute on <a> tag for navigation instead of using event handlers\n",
47252
+ "description": "<p>Use the routerLink attribute on <a> tag for navigation instead of using event handlers</p>\n",
47253
+ "line": 109,
47243
47254
  "type": "boolean",
47244
47255
  "decorators": []
47245
47256
  }
@@ -47254,7 +47265,7 @@
47254
47265
  "type": "",
47255
47266
  "optional": false,
47256
47267
  "description": "",
47257
- "line": 83,
47268
+ "line": 85,
47258
47269
  "decorators": [
47259
47270
  {
47260
47271
  "name": "HostBinding",
@@ -47272,7 +47283,7 @@
47272
47283
  "type": "I18n",
47273
47284
  "optional": false,
47274
47285
  "description": "",
47275
- "line": 104,
47286
+ "line": 111,
47276
47287
  "modifierKind": [
47277
47288
  123
47278
47289
  ]
@@ -47285,7 +47296,7 @@
47285
47296
  "type": "",
47286
47297
  "optional": false,
47287
47298
  "description": "",
47288
- "line": 94,
47299
+ "line": 96,
47289
47300
  "decorators": [
47290
47301
  {
47291
47302
  "name": "HostBinding",
@@ -47304,7 +47315,7 @@
47304
47315
  "optional": false,
47305
47316
  "returnType": "void",
47306
47317
  "typeParameters": [],
47307
- "line": 106,
47318
+ "line": 113,
47308
47319
  "deprecated": false,
47309
47320
  "deprecationMessage": ""
47310
47321
  }
@@ -47317,7 +47328,7 @@
47317
47328
  "defaultValue": "true",
47318
47329
  "deprecated": false,
47319
47330
  "deprecationMessage": "",
47320
- "line": 83,
47331
+ "line": 85,
47321
47332
  "type": "boolean",
47322
47333
  "decorators": []
47323
47334
  },
@@ -47326,7 +47337,7 @@
47326
47337
  "defaultValue": "true",
47327
47338
  "deprecated": false,
47328
47339
  "deprecationMessage": "",
47329
- "line": 94,
47340
+ "line": 96,
47330
47341
  "type": "boolean",
47331
47342
  "decorators": []
47332
47343
  }
@@ -47337,7 +47348,7 @@
47337
47348
  "description": "<p><code>Sidenav</code> is a fixed left navigation that may contain <code>SideNavItem</code>s or <code>SideNavMenu</code>s</p>\n<p><a href=\"../../?path=/story/components-ui-shell--side-navigation\">See demo</a></p>\n",
47338
47349
  "rawdescription": "\n\n`Sidenav` is a fixed left navigation that may contain `SideNavItem`s or `SideNavMenu`s\n\n[See demo](../../?path=/story/components-ui-shell--side-navigation)\n",
47339
47350
  "type": "component",
47340
- "sourceCode": "import {\n\tComponent,\n\tHostBinding,\n\tInput,\n\tViewEncapsulation\n} from \"@angular/core\";\nimport { I18n } from \"carbon-components-angular/i18n\";\nimport { NavigationItem } from \"../header/header-navigation-items.interface\";\n\n/**\n * `Sidenav` is a fixed left navigation that may contain `SideNavItem`s or `SideNavMenu`s\n *\n * [See demo](../../?path=/story/components-ui-shell--side-navigation)\n */\n@Component({\n\tselector: \"cds-sidenav, ibm-sidenav\",\n\ttemplate: `\n\t\t<nav class=\"cds--side-nav__items\" [attr.aria-label]=\"ariaLabel\">\n\t\t\t<ng-content select=\"cds-sidenav-header,ibm-sidenav-header\"></ng-content>\n\t\t\t<div role=\"list\">\n\t\t\t\t<div class=\"cds--side-nav__header-navigation cds--side-nav__header-divider\">\n\t\t\t\t\t<ng-container *ngFor=\"let navigationItem of navigationItems\">\n\t\t\t\t\t\t<cds-sidenav-item\n\t\t\t\t\t\t\t*ngIf=\"navigationItem.type === 'item'\"\n\t\t\t\t\t\t\t[href]=\"navigationItem.href\"\n\t\t\t\t\t\t\t[route]=\"navigationItem.route\"\n\t\t\t\t\t\t\t[routeExtras]=\"navigationItem.routeExtras\"\n\t\t\t\t\t\t\t[title]=\"navigationItem.title\">\n\t\t\t\t\t\t\t{{ navigationItem.content }}\n\t\t\t\t\t\t</cds-sidenav-item>\n\t\t\t\t\t\t<cds-sidenav-menu\n\t\t\t\t\t\t\t*ngIf=\"navigationItem.type === 'menu'\"\n\t\t\t\t\t\t\t[title]=\"navigationItem.title\"\n\t\t\t\t\t\t\t[menuItems]=\"navigationItem.menuItems\">\n\t\t\t\t\t\t</cds-sidenav-menu>\n\t\t\t\t\t</ng-container>\n\t\t\t\t</div>\n\t\t\t\t<ng-content></ng-content>\n\t\t\t</div>\n\t\t\t<footer class=\"cds--side-nav__footer\">\n\t\t\t\t<button\n\t\t\t\t\t*ngIf=\"allowExpansion\"\n\t\t\t\t\tclass=\"cds--side-nav__toggle\"\n\t\t\t\t\ttype=\"button\"\n\t\t\t\t\t[title]=\"(expanded ? i18n.get('UI_SHELL.SIDE_NAV.TOGGLE_CLOSE') : i18n.get('UI_SHELL.SIDE_NAV.TOGGLE_OPEN')) | async\"\n\t\t\t\t\t(click)=\"toggle()\">\n\t\t\t\t\t<div class=\"cds--side-nav__icon\">\n\t\t\t\t\t\t<svg\n\t\t\t\t\t\t\t*ngIf=\"expanded\"\n\t\t\t\t\t\t\tfocusable=\"false\"\n\t\t\t\t\t\t\tpreserveAspectRatio=\"xMidYMid meet\"\n\t\t\t\t\t\t\tstyle=\"will-change: transform;\"\n\t\t\t\t\t\t\txmlns=\"http://www.w3.org/2000/svg\"\n\t\t\t\t\t\t\twidth=\"20\"\n\t\t\t\t\t\t\theight=\"20\"\n\t\t\t\t\t\t\tviewBox=\"0 0 32 32\"\n\t\t\t\t\t\t\taria-hidden=\"true\">\n\t\t\t\t\t\t\t<path d=\"M24 9.4L22.6 8 16 14.6 9.4 8 8 9.4l6.6 6.6L8 22.6 9.4 24l6.6-6.6 6.6 6.6 1.4-1.4-6.6-6.6L24 9.4z\"></path>\n\t\t\t\t\t\t</svg>\n\t\t\t\t\t\t<svg\n\t\t\t\t\t\t\t*ngIf=\"!expanded\"\n\t\t\t\t\t\t\tfocusable=\"false\"\n\t\t\t\t\t\t\tpreserveAspectRatio=\"xMidYMid meet\"\n\t\t\t\t\t\t\tstyle=\"will-change: transform;\"\n\t\t\t\t\t\t\txmlns=\"http://www.w3.org/2000/svg\"\n\t\t\t\t\t\t\twidth=\"20\"\n\t\t\t\t\t\t\theight=\"20\"\n\t\t\t\t\t\t\tviewBox=\"0 0 32 32\"\n\t\t\t\t\t\t\taria-hidden=\"true\">\n\t\t\t\t\t\t\t<path d=\"M22 16L12 26l-1.4-1.4 8.6-8.6-8.6-8.6L12 6z\"></path>\n\t\t\t\t\t\t</svg>\n\t\t\t\t\t</div>\n\t\t\t\t\t<span class=\"cds--assistive-text\">\n\t\t\t\t\t\t{{(expanded ? i18n.get('UI_SHELL.SIDE_NAV.TOGGLE_CLOSE') : i18n.get('UI_SHELL.SIDE_NAV.TOGGLE_OPEN')) | async}}\n\t\t\t\t\t</span>\n\t\t\t\t</button>\n\t\t\t</footer>\n\t\t</nav>\n\t`,\n\tencapsulation: ViewEncapsulation.None\n})\nexport class SideNav {\n\t@HostBinding(\"class.cds--side-nav\") hostClass = true;\n\t@Input() ariaLabel = \"Side navigation\";\n\t/**\n\t * Controls the expanded (`true`) or collapsed (`false`) state when on a small screen.\n\t */\n\t@HostBinding(\"class.cds--side-nav--expanded\") @Input() expanded = true;\n\t/**\n\t * Controls the hidden (`true`) or visible (`false`) state\n\t */\n\t@HostBinding(\"class.cds--side-nav--hidden\") @Input() hidden = false;\n\t@HostBinding(\"class.cds--side-nav--rail\") @Input() rail = false;\n\t@HostBinding(\"class.cds--side-nav__navigation\") ux = true;\n\t@Input() allowExpansion = false;\n\n\t/**\n\t * NavigationItems from the header navigation component which are displayed on the sidenav when the window\n\t * innerWidth is small enough. Sidenav items and menus are created using the model used to create header\n\t * navigation items.\n\t */\n\t@Input() navigationItems: NavigationItem[];\n\n\tconstructor(public i18n: I18n) { }\n\n\ttoggle() {\n\t\tthis.expanded = !this.expanded;\n\t}\n}\n",
47351
+ "sourceCode": "import {\n\tComponent,\n\tHostBinding,\n\tInput,\n\tViewEncapsulation\n} from \"@angular/core\";\nimport { I18n } from \"carbon-components-angular/i18n\";\nimport { NavigationItem } from \"../header/header-navigation-items.interface\";\n\n/**\n * `Sidenav` is a fixed left navigation that may contain `SideNavItem`s or `SideNavMenu`s\n *\n * [See demo](../../?path=/story/components-ui-shell--side-navigation)\n */\n@Component({\n\tselector: \"cds-sidenav, ibm-sidenav\",\n\ttemplate: `\n\t\t<nav class=\"cds--side-nav__items\" [attr.aria-label]=\"ariaLabel\">\n\t\t\t<ng-content select=\"cds-sidenav-header,ibm-sidenav-header\"></ng-content>\n\t\t\t<div role=\"list\">\n\t\t\t\t<div class=\"cds--side-nav__header-navigation cds--side-nav__header-divider\">\n\t\t\t\t\t<ng-container *ngFor=\"let navigationItem of navigationItems\">\n\t\t\t\t\t\t<cds-sidenav-item\n\t\t\t\t\t\t\t*ngIf=\"navigationItem.type === 'item'\"\n\t\t\t\t\t\t\t[href]=\"navigationItem.href\"\n\t\t\t\t\t\t\t[route]=\"navigationItem.route\"\n\t\t\t\t\t\t\t[routeExtras]=\"navigationItem.routeExtras\"\n\t\t\t\t\t\t\t[useRouter]=\"useRouter\"\n\t\t\t\t\t\t\t[title]=\"navigationItem.title\">\n\t\t\t\t\t\t\t{{ navigationItem.content }}\n\t\t\t\t\t\t</cds-sidenav-item>\n\t\t\t\t\t\t<cds-sidenav-menu\n\t\t\t\t\t\t\t*ngIf=\"navigationItem.type === 'menu'\"\n\t\t\t\t\t\t\t[title]=\"navigationItem.title\"\n\t\t\t\t\t\t\t[useRouter]=\"useRouter\"\n\t\t\t\t\t\t\t[menuItems]=\"navigationItem.menuItems\">\n\t\t\t\t\t\t</cds-sidenav-menu>\n\t\t\t\t\t</ng-container>\n\t\t\t\t</div>\n\t\t\t\t<ng-content></ng-content>\n\t\t\t</div>\n\t\t\t<footer class=\"cds--side-nav__footer\">\n\t\t\t\t<button\n\t\t\t\t\t*ngIf=\"allowExpansion\"\n\t\t\t\t\tclass=\"cds--side-nav__toggle\"\n\t\t\t\t\ttype=\"button\"\n\t\t\t\t\t[title]=\"(expanded ? i18n.get('UI_SHELL.SIDE_NAV.TOGGLE_CLOSE') : i18n.get('UI_SHELL.SIDE_NAV.TOGGLE_OPEN')) | async\"\n\t\t\t\t\t(click)=\"toggle()\">\n\t\t\t\t\t<div class=\"cds--side-nav__icon\">\n\t\t\t\t\t\t<svg\n\t\t\t\t\t\t\t*ngIf=\"expanded\"\n\t\t\t\t\t\t\tfocusable=\"false\"\n\t\t\t\t\t\t\tpreserveAspectRatio=\"xMidYMid meet\"\n\t\t\t\t\t\t\tstyle=\"will-change: transform;\"\n\t\t\t\t\t\t\txmlns=\"http://www.w3.org/2000/svg\"\n\t\t\t\t\t\t\twidth=\"20\"\n\t\t\t\t\t\t\theight=\"20\"\n\t\t\t\t\t\t\tviewBox=\"0 0 32 32\"\n\t\t\t\t\t\t\taria-hidden=\"true\">\n\t\t\t\t\t\t\t<path d=\"M24 9.4L22.6 8 16 14.6 9.4 8 8 9.4l6.6 6.6L8 22.6 9.4 24l6.6-6.6 6.6 6.6 1.4-1.4-6.6-6.6L24 9.4z\"></path>\n\t\t\t\t\t\t</svg>\n\t\t\t\t\t\t<svg\n\t\t\t\t\t\t\t*ngIf=\"!expanded\"\n\t\t\t\t\t\t\tfocusable=\"false\"\n\t\t\t\t\t\t\tpreserveAspectRatio=\"xMidYMid meet\"\n\t\t\t\t\t\t\tstyle=\"will-change: transform;\"\n\t\t\t\t\t\t\txmlns=\"http://www.w3.org/2000/svg\"\n\t\t\t\t\t\t\twidth=\"20\"\n\t\t\t\t\t\t\theight=\"20\"\n\t\t\t\t\t\t\tviewBox=\"0 0 32 32\"\n\t\t\t\t\t\t\taria-hidden=\"true\">\n\t\t\t\t\t\t\t<path d=\"M22 16L12 26l-1.4-1.4 8.6-8.6-8.6-8.6L12 6z\"></path>\n\t\t\t\t\t\t</svg>\n\t\t\t\t\t</div>\n\t\t\t\t\t<span class=\"cds--assistive-text\">\n\t\t\t\t\t\t{{(expanded ? i18n.get('UI_SHELL.SIDE_NAV.TOGGLE_CLOSE') : i18n.get('UI_SHELL.SIDE_NAV.TOGGLE_OPEN')) | async}}\n\t\t\t\t\t</span>\n\t\t\t\t</button>\n\t\t\t</footer>\n\t\t</nav>\n\t`,\n\tencapsulation: ViewEncapsulation.None\n})\nexport class SideNav {\n\t@HostBinding(\"class.cds--side-nav\") hostClass = true;\n\t@Input() ariaLabel = \"Side navigation\";\n\t/**\n\t * Controls the expanded (`true`) or collapsed (`false`) state when on a small screen.\n\t */\n\t@HostBinding(\"class.cds--side-nav--expanded\") @Input() expanded = true;\n\t/**\n\t * Controls the hidden (`true`) or visible (`false`) state\n\t */\n\t@HostBinding(\"class.cds--side-nav--hidden\") @Input() hidden = false;\n\t@HostBinding(\"class.cds--side-nav--rail\") @Input() rail = false;\n\t@HostBinding(\"class.cds--side-nav__navigation\") ux = true;\n\t@Input() allowExpansion = false;\n\n\t/**\n\t * NavigationItems from the header navigation component which are displayed on the sidenav when the window\n\t * innerWidth is small enough. Sidenav items and menus are created using the model used to create header\n\t * navigation items.\n\t */\n\t@Input() navigationItems: NavigationItem[];\n\n\t/**\n\t * Use the routerLink attribute on <a> tag for navigation instead of using event handlers\n\t */\n\t@Input() useRouter = false;\n\n\tconstructor(public i18n: I18n) { }\n\n\ttoggle() {\n\t\tthis.expanded = !this.expanded;\n\t}\n}\n",
47341
47352
  "assetsDirs": [],
47342
47353
  "styleUrlsData": "",
47343
47354
  "stylesData": "",
@@ -47354,7 +47365,7 @@
47354
47365
  "deprecationMessage": ""
47355
47366
  }
47356
47367
  ],
47357
- "line": 102,
47368
+ "line": 109,
47358
47369
  "jsdoctags": [
47359
47370
  {
47360
47371
  "name": "i18n",
@@ -47370,7 +47381,7 @@
47370
47381
  },
47371
47382
  {
47372
47383
  "name": "SideNavItem",
47373
- "id": "component-SideNavItem-51cb2d7cae1120cc169374c46e49c1997f588f579393d6a6f3f9f3aa1e9ae98e85ab90b51326891f97e6656d0440e70d19902c62400c7406c312968dae59285f",
47384
+ "id": "component-SideNavItem-c7f33f795f7154b1ee127dad424fc25fed922d4948b47cd8720dbb64bf73001461f84b06a37c32193a9212b7c9c077e588fd16d866d175d3503c728024b82418",
47374
47385
  "file": "src/ui-shell/sidenav/sidenav-item.component.ts",
47375
47386
  "encapsulation": [],
47376
47387
  "entryComponents": [],
@@ -47382,7 +47393,7 @@
47382
47393
  "styles": [
47383
47394
  "\n\t\t:host {\n\t\t\tdisplay: list-item;\n\t\t}\n\t"
47384
47395
  ],
47385
- "template": "<a\n\tclass=\"cds--side-nav__link\"\n\t[ngClass]=\"{\n\t\t'cds--side-nav__item--active': active\n\t}\"\n\t[href]=\"href\"\n\t[attr.aria-current]=\"(active ? 'page' : null)\"\n\t[attr.title]=\"title ? title : null\"\n\t(click)=\"navigate($event)\">\n\t<div *ngIf=\"!isSubMenu\" class=\"cds--side-nav__icon\">\n\t\t<ng-content select=\"svg, [icon]\"></ng-content>\n\t</div>\n\t<span class=\"cds--side-nav__link-text\">\n\t\t<ng-content></ng-content>\n\t</span>\n</a>\n\t",
47396
+ "template": "<a *ngIf=\"!useRouter; else sidenavItemRouterTpl\"\n class=\"cds--side-nav__link\"\n [ngClass]=\"{\n\t\t'cds--side-nav__item--active': active\n\t}\"\n [href]=\"href\"\n [attr.aria-current]=\"(active ? 'page' : null)\"\n [attr.title]=\"title ? title : null\"\n (click)=\"navigate($event)\">\n\t<ng-template [ngTemplateOutlet]=\"sidenavItemContentTpl\"></ng-template>\n</a>\n\n<ng-template #sidenavItemRouterTpl>\n\t<a\n\t\t[routerLink]=\"route\"\n\t\trouterLinkActive=\"cds--side-nav__item--active\"\n\t\tariaCurrentWhenActive=\"page\"\n\t\t[attr.title]=\"title ? title : null\"\n\t\tclass=\"cds--side-nav__link\">\n\t\t<ng-template [ngTemplateOutlet]=\"sidenavItemContentTpl\"></ng-template>\n\t</a>\n</ng-template>\n\n<ng-template #sidenavItemContentTpl>\n\t<div *ngIf=\"!isSubMenu\" class=\"cds--side-nav__icon\">\n\t\t<ng-content select=\"svg, [icon]\"></ng-content>\n\t</div>\n\t<span class=\"cds--side-nav__link-text\">\n\t\t<ng-content></ng-content>\n\t</span>\n</ng-template>\n\t",
47386
47397
  "templateUrl": [],
47387
47398
  "viewProviders": [],
47388
47399
  "hostDirectives": [],
@@ -47394,7 +47405,7 @@
47394
47405
  "deprecationMessage": "",
47395
47406
  "rawdescription": "\n\nToggles the active (current page) state for the link.\n",
47396
47407
  "description": "<p>Toggles the active (current page) state for the link.</p>\n",
47397
- "line": 69,
47408
+ "line": 90,
47398
47409
  "type": "boolean",
47399
47410
  "decorators": []
47400
47411
  },
@@ -47404,7 +47415,7 @@
47404
47415
  "deprecationMessage": "",
47405
47416
  "rawdescription": "\n\nLink for the item. NOTE: *do not* pass unsafe or untrusted values, this has the potential to open you up to XSS attacks\n",
47406
47417
  "description": "<p>Link for the item. NOTE: <em>do not</em> pass unsafe or untrusted values, this has the potential to open you up to XSS attacks</p>\n",
47407
- "line": 46,
47418
+ "line": 62,
47408
47419
  "type": "string",
47409
47420
  "decorators": []
47410
47421
  },
@@ -47413,7 +47424,7 @@
47413
47424
  "defaultValue": "false",
47414
47425
  "deprecated": false,
47415
47426
  "deprecationMessage": "",
47416
- "line": 77,
47427
+ "line": 98,
47417
47428
  "type": "boolean",
47418
47429
  "decorators": []
47419
47430
  },
@@ -47423,7 +47434,7 @@
47423
47434
  "deprecationMessage": "",
47424
47435
  "rawdescription": "\n\nArray of commands to send to the router when the link is activated\nSee: https://angular.io/api/router/Router#navigate\n",
47425
47436
  "description": "<p>Array of commands to send to the router when the link is activated\nSee: <a href=\"https://angular.io/api/router/Router#navigate\">https://angular.io/api/router/Router#navigate</a></p>\n",
47426
- "line": 75,
47437
+ "line": 96,
47427
47438
  "type": "any[]",
47428
47439
  "decorators": []
47429
47440
  },
@@ -47433,7 +47444,7 @@
47433
47444
  "deprecationMessage": "",
47434
47445
  "rawdescription": "\n\nRouter options. Used in conjunction with `route`\nSee: https://angular.io/api/router/Router#navigate\n",
47435
47446
  "description": "<p>Router options. Used in conjunction with <code>route</code>\nSee: <a href=\"https://angular.io/api/router/Router#navigate\">https://angular.io/api/router/Router#navigate</a></p>\n",
47436
- "line": 83,
47447
+ "line": 104,
47437
47448
  "type": "any",
47438
47449
  "decorators": []
47439
47450
  },
@@ -47443,9 +47454,20 @@
47443
47454
  "deprecationMessage": "",
47444
47455
  "rawdescription": "\n\nTitle attribute of the anchor element.\n",
47445
47456
  "description": "<p>Title attribute of the anchor element.</p>\n",
47446
- "line": 88,
47457
+ "line": 109,
47447
47458
  "type": "string",
47448
47459
  "decorators": []
47460
+ },
47461
+ {
47462
+ "name": "useRouter",
47463
+ "defaultValue": "true",
47464
+ "deprecated": false,
47465
+ "deprecationMessage": "",
47466
+ "rawdescription": "\n\nUse the routerLink attribute on <a> tag for navigation instead of using event handlers\n",
47467
+ "description": "<p>Use the routerLink attribute on <a> tag for navigation instead of using event handlers</p>\n",
47468
+ "line": 77,
47469
+ "type": "boolean",
47470
+ "decorators": []
47449
47471
  }
47450
47472
  ],
47451
47473
  "outputsClass": [
@@ -47456,7 +47478,7 @@
47456
47478
  "deprecationMessage": "",
47457
47479
  "rawdescription": "\n\nEmits the navigation status promise when the link is activated\n",
47458
47480
  "description": "<p>Emits the navigation status promise when the link is activated</p>\n",
47459
- "line": 93,
47481
+ "line": 114,
47460
47482
  "type": "EventEmitter"
47461
47483
  },
47462
47484
  {
@@ -47466,7 +47488,7 @@
47466
47488
  "deprecationMessage": "",
47467
47489
  "rawdescription": "\n\nEmits when `active` input is changed. This is mainly used to indicate to any parent menu items that a\nchild sidenav item is active or not active.\n",
47468
47490
  "description": "<p>Emits when <code>active</code> input is changed. This is mainly used to indicate to any parent menu items that a\nchild sidenav item is active or not active.</p>\n",
47469
- "line": 99,
47491
+ "line": 120,
47470
47492
  "type": "EventEmitter"
47471
47493
  }
47472
47494
  ],
@@ -47479,7 +47501,7 @@
47479
47501
  "type": "string",
47480
47502
  "optional": false,
47481
47503
  "description": "",
47482
- "line": 101,
47504
+ "line": 122,
47483
47505
  "decorators": [
47484
47506
  {
47485
47507
  "name": "HostBinding",
@@ -47497,7 +47519,7 @@
47497
47519
  "args": [
47498
47520
  {
47499
47521
  "name": "event",
47500
- "type": "",
47522
+ "type": "MouseEvent",
47501
47523
  "deprecated": false,
47502
47524
  "deprecationMessage": ""
47503
47525
  }
@@ -47505,13 +47527,13 @@
47505
47527
  "optional": false,
47506
47528
  "returnType": "void",
47507
47529
  "typeParameters": [],
47508
- "line": 113,
47530
+ "line": 134,
47509
47531
  "deprecated": false,
47510
47532
  "deprecationMessage": "",
47511
47533
  "jsdoctags": [
47512
47534
  {
47513
47535
  "name": "event",
47514
- "type": "",
47536
+ "type": "MouseEvent",
47515
47537
  "deprecated": false,
47516
47538
  "deprecationMessage": "",
47517
47539
  "tagName": {
@@ -47529,7 +47551,7 @@
47529
47551
  "defaultValue": "\"listitem\"",
47530
47552
  "deprecated": false,
47531
47553
  "deprecationMessage": "",
47532
- "line": 101,
47554
+ "line": 122,
47533
47555
  "type": "string",
47534
47556
  "decorators": []
47535
47557
  },
@@ -47537,7 +47559,7 @@
47537
47559
  "name": "class.cds--side-nav__item",
47538
47560
  "deprecated": false,
47539
47561
  "deprecationMessage": "",
47540
- "line": 58,
47562
+ "line": 79,
47541
47563
  "type": "boolean",
47542
47564
  "decorators": []
47543
47565
  },
@@ -47545,7 +47567,7 @@
47545
47567
  "name": "class.cds--side-nav__menu-item",
47546
47568
  "deprecated": false,
47547
47569
  "deprecationMessage": "",
47548
- "line": 62,
47570
+ "line": 83,
47549
47571
  "type": "boolean",
47550
47572
  "decorators": []
47551
47573
  }
@@ -47556,7 +47578,7 @@
47556
47578
  "description": "<p><code>SideNavItem</code> can either be a child of <code>SideNav</code> or <code>SideNavMenu</code></p>\n",
47557
47579
  "rawdescription": "\n\n`SideNavItem` can either be a child of `SideNav` or `SideNavMenu`\n",
47558
47580
  "type": "component",
47559
- "sourceCode": "import {\n\tComponent,\n\tInput,\n\tOptional,\n\tOutput,\n\tEventEmitter,\n\tOnChanges,\n\tHostBinding\n} from \"@angular/core\";\nimport { DomSanitizer } from \"@angular/platform-browser\";\nimport { Router } from \"@angular/router\";\n\n/**\n * `SideNavItem` can either be a child of `SideNav` or `SideNavMenu`\n */\n@Component({\n\tselector: \"cds-sidenav-item, ibm-sidenav-item\",\n\ttemplate: `\n\t\t<a\n\t\t\tclass=\"cds--side-nav__link\"\n\t\t\t[ngClass]=\"{\n\t\t\t\t'cds--side-nav__item--active': active\n\t\t\t}\"\n\t\t\t[href]=\"href\"\n\t\t\t[attr.aria-current]=\"(active ? 'page' : null)\"\n\t\t\t[attr.title]=\"title ? title : null\"\n\t\t\t(click)=\"navigate($event)\">\n\t\t\t<div *ngIf=\"!isSubMenu\" class=\"cds--side-nav__icon\">\n\t\t\t\t<ng-content select=\"svg, [icon]\"></ng-content>\n\t\t\t</div>\n\t\t\t<span class=\"cds--side-nav__link-text\">\n\t\t\t\t<ng-content></ng-content>\n\t\t\t</span>\n\t\t</a>\n\t`,\n\tstyles: [`\n\t\t:host {\n\t\t\tdisplay: list-item;\n\t\t}\n\t`]\n})\nexport class SideNavItem implements OnChanges {\n\t/**\n\t * Link for the item. NOTE: *do not* pass unsafe or untrusted values, this has the potential to open you up to XSS attacks\n\t */\n\t@Input() set href(v: string) {\n\t\t// Needed when component is created dynamically with a model.\n\t\tif (v === undefined) {\n\t\t\treturn;\n\t\t}\n\t\tthis._href = v;\n\t}\n\n\tget href() {\n\t\treturn this.domSanitizer.bypassSecurityTrustUrl(this._href) as string;\n\t}\n\n\t@HostBinding(\"class.cds--side-nav__item\") get sideNav() {\n\t\treturn !this.isSubMenu;\n\t}\n\n\t@HostBinding(\"class.cds--side-nav__menu-item\") get menuItem() {\n\t\treturn this.isSubMenu;\n\t}\n\n\t/**\n\t * Toggles the active (current page) state for the link.\n\t */\n\t@Input() active = false;\n\n\t/**\n\t * Array of commands to send to the router when the link is activated\n\t * See: https://angular.io/api/router/Router#navigate\n\t */\n\t@Input() route: any[];\n\n\t@Input() isSubMenu = false;\n\n\t/**\n\t * Router options. Used in conjunction with `route`\n\t * See: https://angular.io/api/router/Router#navigate\n\t */\n\t@Input() routeExtras: any;\n\n\t/**\n\t * Title attribute of the anchor element.\n\t */\n\t@Input() title: string;\n\n\t/**\n\t * Emits the navigation status promise when the link is activated\n\t */\n\t@Output() navigation = new EventEmitter<Promise<boolean>>();\n\n\t/**\n\t * Emits when `active` input is changed. This is mainly used to indicate to any parent menu items that a\n\t * child sidenav item is active or not active.\n\t */\n\t@Output() selected = new EventEmitter<boolean>();\n\n\t@HostBinding(\"attr.role\") role = \"listitem\";\n\n\tprotected _href = \"#\";\n\n\tconstructor(protected domSanitizer: DomSanitizer, @Optional() protected router: Router) {}\n\n\tngOnChanges(changes) {\n\t\tif (changes.active) {\n\t\t\tthis.selected.emit(this.active);\n\t\t}\n\t}\n\n\tnavigate(event) {\n\t\tif (this.router && this.route) {\n\t\t\tevent.preventDefault();\n\t\t\tconst status = this.router.navigate(this.route, this.routeExtras);\n\t\t\tthis.navigation.emit(status);\n\t\t} else if (this._href === \"#\") {\n\t\t\tevent.preventDefault();\n\t\t}\n\t}\n}\n",
47581
+ "sourceCode": "import {\n\tComponent,\n\tInput,\n\tOptional,\n\tOutput,\n\tEventEmitter,\n\tOnChanges,\n\tHostBinding,\n\tSimpleChanges\n} from \"@angular/core\";\nimport { DomSanitizer } from \"@angular/platform-browser\";\nimport { Router } from \"@angular/router\";\n\n/**\n * `SideNavItem` can either be a child of `SideNav` or `SideNavMenu`\n */\n@Component({\n\tselector: \"cds-sidenav-item, ibm-sidenav-item\",\n\ttemplate: `\n\t\t<a *ngIf=\"!useRouter; else sidenavItemRouterTpl\"\n\t\t class=\"cds--side-nav__link\"\n\t\t [ngClass]=\"{\n\t\t\t\t'cds--side-nav__item--active': active\n\t\t\t}\"\n\t\t [href]=\"href\"\n\t\t [attr.aria-current]=\"(active ? 'page' : null)\"\n\t\t [attr.title]=\"title ? title : null\"\n\t\t (click)=\"navigate($event)\">\n\t\t\t<ng-template [ngTemplateOutlet]=\"sidenavItemContentTpl\"></ng-template>\n\t\t</a>\n\n\t\t<ng-template #sidenavItemRouterTpl>\n\t\t\t<a\n\t\t\t\t[routerLink]=\"route\"\n\t\t\t\trouterLinkActive=\"cds--side-nav__item--active\"\n\t\t\t\tariaCurrentWhenActive=\"page\"\n\t\t\t\t[attr.title]=\"title ? title : null\"\n\t\t\t\tclass=\"cds--side-nav__link\">\n\t\t\t\t<ng-template [ngTemplateOutlet]=\"sidenavItemContentTpl\"></ng-template>\n\t\t\t</a>\n\t\t</ng-template>\n\n\t\t<ng-template #sidenavItemContentTpl>\n\t\t\t<div *ngIf=\"!isSubMenu\" class=\"cds--side-nav__icon\">\n\t\t\t\t<ng-content select=\"svg, [icon]\"></ng-content>\n\t\t\t</div>\n\t\t\t<span class=\"cds--side-nav__link-text\">\n\t\t\t\t<ng-content></ng-content>\n\t\t\t</span>\n\t\t</ng-template>\n\t`,\n\tstyles: [`\n\t\t:host {\n\t\t\tdisplay: list-item;\n\t\t}\n\t`]\n})\nexport class SideNavItem implements OnChanges {\n\t/**\n\t * Link for the item. NOTE: *do not* pass unsafe or untrusted values, this has the potential to open you up to XSS attacks\n\t */\n\t@Input() set href(v: string) {\n\t\t// Needed when component is created dynamically with a model.\n\t\tif (v === undefined) {\n\t\t\treturn;\n\t\t}\n\t\tthis._href = v;\n\t}\n\n\tget href() {\n\t\treturn this.domSanitizer.bypassSecurityTrustUrl(this._href) as string;\n\t}\n\n\t/**\n\t * Use the routerLink attribute on <a> tag for navigation instead of using event handlers\n\t */\n\t@Input() useRouter = true;\n\n\t@HostBinding(\"class.cds--side-nav__item\") get sideNav() {\n\t\treturn !this.isSubMenu;\n\t}\n\n\t@HostBinding(\"class.cds--side-nav__menu-item\") get menuItem() {\n\t\treturn this.isSubMenu;\n\t}\n\n\t/**\n\t * Toggles the active (current page) state for the link.\n\t */\n\t@Input() active = false;\n\n\t/**\n\t * Array of commands to send to the router when the link is activated\n\t * See: https://angular.io/api/router/Router#navigate\n\t */\n\t@Input() route: any[];\n\n\t@Input() isSubMenu = false;\n\n\t/**\n\t * Router options. Used in conjunction with `route`\n\t * See: https://angular.io/api/router/Router#navigate\n\t */\n\t@Input() routeExtras: any;\n\n\t/**\n\t * Title attribute of the anchor element.\n\t */\n\t@Input() title: string;\n\n\t/**\n\t * Emits the navigation status promise when the link is activated\n\t */\n\t@Output() navigation = new EventEmitter<Promise<boolean>>();\n\n\t/**\n\t * Emits when `active` input is changed. This is mainly used to indicate to any parent menu items that a\n\t * child sidenav item is active or not active.\n\t */\n\t@Output() selected = new EventEmitter<boolean>();\n\n\t@HostBinding(\"attr.role\") role = \"listitem\";\n\n\tprotected _href = \"#\";\n\n\tconstructor(protected domSanitizer: DomSanitizer, @Optional() protected router: Router) {}\n\n\tngOnChanges(changes: SimpleChanges) {\n\t\tif (changes.active) {\n\t\t\tthis.selected.emit(this.active);\n\t\t}\n\t}\n\n\tnavigate(event: MouseEvent) {\n\t\tif (this.router && this.route) {\n\t\t\tevent.preventDefault();\n\t\t\tconst status = this.router.navigate(this.route, this.routeExtras);\n\t\t\tthis.navigation.emit(status);\n\t\t} else if (this._href === \"#\") {\n\t\t\tevent.preventDefault();\n\t\t}\n\t}\n}\n",
47560
47582
  "assetsDirs": [],
47561
47583
  "styleUrlsData": "",
47562
47584
  "stylesData": "\n\t\t:host {\n\t\t\tdisplay: list-item;\n\t\t}\n\t\n",
@@ -47579,7 +47601,7 @@
47579
47601
  "deprecationMessage": ""
47580
47602
  }
47581
47603
  ],
47582
- "line": 103,
47604
+ "line": 124,
47583
47605
  "jsdoctags": [
47584
47606
  {
47585
47607
  "name": "domSanitizer",
@@ -47621,7 +47643,7 @@
47621
47643
  }
47622
47644
  ],
47623
47645
  "returnType": "void",
47624
- "line": 46,
47646
+ "line": 62,
47625
47647
  "rawdescription": "\n\nLink for the item. NOTE: *do not* pass unsafe or untrusted values, this has the potential to open you up to XSS attacks\n",
47626
47648
  "description": "<p>Link for the item. NOTE: <em>do not</em> pass unsafe or untrusted values, this has the potential to open you up to XSS attacks</p>\n",
47627
47649
  "jsdoctags": [
@@ -47640,7 +47662,7 @@
47640
47662
  "name": "href",
47641
47663
  "type": "",
47642
47664
  "returnType": "",
47643
- "line": 54
47665
+ "line": 70
47644
47666
  }
47645
47667
  },
47646
47668
  "sideNav": {
@@ -47649,7 +47671,7 @@
47649
47671
  "name": "sideNav",
47650
47672
  "type": "",
47651
47673
  "returnType": "",
47652
- "line": 58
47674
+ "line": 79
47653
47675
  }
47654
47676
  },
47655
47677
  "menuItem": {
@@ -47658,14 +47680,14 @@
47658
47680
  "name": "menuItem",
47659
47681
  "type": "",
47660
47682
  "returnType": "",
47661
- "line": 62
47683
+ "line": 83
47662
47684
  }
47663
47685
  }
47664
47686
  }
47665
47687
  },
47666
47688
  {
47667
47689
  "name": "SideNavMenu",
47668
- "id": "component-SideNavMenu-bd726f1a0605662b47c7fc558b5e65d77e1d9c860eab8efedc5422c1d3f545ffda9f234c96fa9a0c174372be3b5766ce2de58a7a757d5564b1bd774318ba97a9",
47690
+ "id": "component-SideNavMenu-367a6d1f9a7d1546e5cc731dced52c8b64c395628932b674b0c178bc917de90f4b8fe173667fcb753f5d570ce323e93c82929fe0dde2d1bcef628209f2ae676b",
47669
47691
  "file": "src/ui-shell/sidenav/sidenav-menu.component.ts",
47670
47692
  "encapsulation": [],
47671
47693
  "entryComponents": [],
@@ -47675,7 +47697,7 @@
47675
47697
  "selector": "cds-sidenav-menu, ibm-sidenav-menu",
47676
47698
  "styleUrls": [],
47677
47699
  "styles": [],
47678
- "template": "<button\n\t(click)=\"toggle()\"\n\tclass=\"cds--side-nav__submenu\"\n\taria-haspopup=\"true\"\n\t[attr.aria-expanded]=\"expanded\"\n\ttype=\"button\">\n\t<div class=\"cds--side-nav__icon\">\n\t\t<ng-content select=\"svg, [icon]\"></ng-content>\n\t</div>\n\t<span class=\"cds--side-nav__submenu-title\">{{title}}</span>\n\t<div class=\"cds--side-nav__icon cds--side-nav__icon--small cds--side-nav__submenu-chevron\">\n\t\t<svg\n\t\t\tfocusable=\"false\"\n\t\t\tpreserveAspectRatio=\"xMidYMid meet\"\n\t\t\tstyle=\"will-change: transform;\"\n\t\t\txmlns=\"http://www.w3.org/2000/svg\"\n\t\t\twidth=\"20\"\n\t\t\theight=\"20\"\n\t\t\tviewBox=\"0 0 32 32\"\n\t\t\taria-hidden=\"true\">\n\t\t\t<path d=\"M16 22L6 12l1.4-1.4 8.6 8.6 8.6-8.6L26 12z\"></path>\n\t\t</svg>\n\t</div>\n</button>\n<div class=\"cds--side-nav__menu\" role=\"list\">\n\t<ng-content></ng-content>\n\t<ng-container *ngFor=\"let menuItem of menuItems\">\n\t\t<cds-sidenav-item\n\t\t\t[href]=\"menuItem.href\"\n\t\t\t[route]=\"menuItem.route\"\n\t\t\t[routeExtras]=\"menuItem.routeExtras\"\n\t\t\t[isSubMenu]=\"true\">\n\t\t\t{{ menuItem.content }}\n\t\t</cds-sidenav-item>\n\t</ng-container>\n</div>\n\t",
47700
+ "template": "<button\n\t(click)=\"toggle()\"\n\tclass=\"cds--side-nav__submenu\"\n\taria-haspopup=\"true\"\n\t[attr.aria-expanded]=\"expanded\"\n\ttype=\"button\">\n\t<div class=\"cds--side-nav__icon\">\n\t\t<ng-content select=\"svg, [icon]\"></ng-content>\n\t</div>\n\t<span class=\"cds--side-nav__submenu-title\">{{title}}</span>\n\t<div class=\"cds--side-nav__icon cds--side-nav__icon--small cds--side-nav__submenu-chevron\">\n\t\t<svg\n\t\t\tfocusable=\"false\"\n\t\t\tpreserveAspectRatio=\"xMidYMid meet\"\n\t\t\tstyle=\"will-change: transform;\"\n\t\t\txmlns=\"http://www.w3.org/2000/svg\"\n\t\t\twidth=\"20\"\n\t\t\theight=\"20\"\n\t\t\tviewBox=\"0 0 32 32\"\n\t\t\taria-hidden=\"true\">\n\t\t\t<path d=\"M16 22L6 12l1.4-1.4 8.6 8.6 8.6-8.6L26 12z\"></path>\n\t\t</svg>\n\t</div>\n</button>\n<div class=\"cds--side-nav__menu\" role=\"list\">\n\t<ng-content></ng-content>\n\t<ng-container *ngFor=\"let menuItem of menuItems\">\n\t\t<cds-sidenav-item\n\t\t\t[href]=\"menuItem.href\"\n\t\t\t[route]=\"menuItem.route\"\n\t\t\t[routeExtras]=\"menuItem.routeExtras\"\n\t\t\t[useRouter]=\"useRouter\"\n\t\t\t[isSubMenu]=\"true\">\n\t\t\t{{ menuItem.content }}\n\t\t</cds-sidenav-item>\n\t</ng-container>\n</div>\n\t",
47679
47701
  "templateUrl": [],
47680
47702
  "viewProviders": [],
47681
47703
  "hostDirectives": [],
@@ -47687,7 +47709,7 @@
47687
47709
  "deprecationMessage": "",
47688
47710
  "rawdescription": "\n\nControls the visibility of the child `SideNavItem`s\n",
47689
47711
  "description": "<p>Controls the visibility of the child <code>SideNavItem</code>s</p>\n",
47690
- "line": 73,
47712
+ "line": 79,
47691
47713
  "type": "boolean",
47692
47714
  "decorators": []
47693
47715
  },
@@ -47698,7 +47720,7 @@
47698
47720
  "deprecationMessage": "",
47699
47721
  "rawdescription": "\n\nControls the active status indicator on the menu if there is an active\nchild sidenav item.\n",
47700
47722
  "description": "<p>Controls the active status indicator on the menu if there is an active\nchild sidenav item.</p>\n",
47701
- "line": 78,
47723
+ "line": 84,
47702
47724
  "type": "boolean",
47703
47725
  "decorators": []
47704
47726
  },
@@ -47706,7 +47728,7 @@
47706
47728
  "name": "menuItems",
47707
47729
  "deprecated": false,
47708
47730
  "deprecationMessage": "",
47709
- "line": 80,
47731
+ "line": 86,
47710
47732
  "type": "SideNavItemInterface[]",
47711
47733
  "decorators": []
47712
47734
  },
@@ -47714,11 +47736,22 @@
47714
47736
  "name": "title",
47715
47737
  "deprecated": false,
47716
47738
  "deprecationMessage": "",
47717
- "rawdescription": "\n\nHeading for the gorup\n",
47718
- "description": "<p>Heading for the gorup</p>\n",
47719
- "line": 69,
47739
+ "rawdescription": "\n\nHeading for the group\n",
47740
+ "description": "<p>Heading for the group</p>\n",
47741
+ "line": 75,
47720
47742
  "type": "string",
47721
47743
  "decorators": []
47744
+ },
47745
+ {
47746
+ "name": "useRouter",
47747
+ "defaultValue": "false",
47748
+ "deprecated": false,
47749
+ "deprecationMessage": "",
47750
+ "rawdescription": "\n\nUse the routerLink attribute on <a> tag for navigation instead of using event handlers\n",
47751
+ "description": "<p>Use the routerLink attribute on <a> tag for navigation instead of using event handlers</p>\n",
47752
+ "line": 70,
47753
+ "type": "boolean",
47754
+ "decorators": []
47722
47755
  }
47723
47756
  ],
47724
47757
  "outputsClass": [],
@@ -47731,7 +47764,7 @@
47731
47764
  "type": "",
47732
47765
  "optional": false,
47733
47766
  "description": "",
47734
- "line": 59,
47767
+ "line": 60,
47735
47768
  "decorators": [
47736
47769
  {
47737
47770
  "name": "HostBinding",
@@ -47750,7 +47783,7 @@
47750
47783
  "type": "",
47751
47784
  "optional": false,
47752
47785
  "description": "",
47753
- "line": 60,
47786
+ "line": 61,
47754
47787
  "decorators": [
47755
47788
  {
47756
47789
  "name": "HostBinding",
@@ -47769,7 +47802,7 @@
47769
47802
  "type": "string",
47770
47803
  "optional": false,
47771
47804
  "description": "",
47772
- "line": 64,
47805
+ "line": 65,
47773
47806
  "decorators": [
47774
47807
  {
47775
47808
  "name": "HostBinding",
@@ -47787,7 +47820,7 @@
47787
47820
  "type": "QueryList<SideNavItem>",
47788
47821
  "optional": false,
47789
47822
  "description": "",
47790
- "line": 82,
47823
+ "line": 88,
47791
47824
  "decorators": [
47792
47825
  {
47793
47826
  "name": "ContentChildren",
@@ -47806,7 +47839,7 @@
47806
47839
  "optional": false,
47807
47840
  "returnType": "void",
47808
47841
  "typeParameters": [],
47809
- "line": 114,
47842
+ "line": 120,
47810
47843
  "deprecated": false,
47811
47844
  "deprecationMessage": ""
47812
47845
  }
@@ -47819,7 +47852,7 @@
47819
47852
  "defaultValue": "\"listitem\"",
47820
47853
  "deprecated": false,
47821
47854
  "deprecationMessage": "",
47822
- "line": 64,
47855
+ "line": 65,
47823
47856
  "type": "string",
47824
47857
  "decorators": []
47825
47858
  },
@@ -47828,7 +47861,7 @@
47828
47861
  "defaultValue": "true",
47829
47862
  "deprecated": false,
47830
47863
  "deprecationMessage": "",
47831
- "line": 59,
47864
+ "line": 60,
47832
47865
  "type": "boolean",
47833
47866
  "decorators": []
47834
47867
  },
@@ -47836,7 +47869,7 @@
47836
47869
  "name": "class.cds--side-nav__item--active",
47837
47870
  "deprecated": false,
47838
47871
  "deprecationMessage": "",
47839
- "line": 61,
47872
+ "line": 62,
47840
47873
  "type": "boolean",
47841
47874
  "decorators": []
47842
47875
  },
@@ -47845,7 +47878,7 @@
47845
47878
  "defaultValue": "true",
47846
47879
  "deprecated": false,
47847
47880
  "deprecationMessage": "",
47848
- "line": 60,
47881
+ "line": 61,
47849
47882
  "type": "boolean",
47850
47883
  "decorators": []
47851
47884
  }
@@ -47856,7 +47889,7 @@
47856
47889
  "description": "<p><code>SideNavMenu</code> provides a method to group <code>SideNavItem</code>s under a common heading.</p>\n",
47857
47890
  "rawdescription": "\n\n`SideNavMenu` provides a method to group `SideNavItem`s under a common heading.\n",
47858
47891
  "type": "component",
47859
- "sourceCode": "import {\n\tAfterContentInit,\n\tComponent,\n\tContentChildren,\n\tInput,\n\tQueryList,\n\tOnDestroy,\n\tHostBinding\n} from \"@angular/core\";\nimport { SideNavItem } from \"./sidenav-item.component\";\nimport { Subscription } from \"rxjs\";\nimport { SideNavItemInterface } from \"./sidenav-item.interface\";\n\n/**\n * `SideNavMenu` provides a method to group `SideNavItem`s under a common heading.\n */\n@Component({\n\tselector: \"cds-sidenav-menu, ibm-sidenav-menu\",\n\ttemplate: `\n\t\t<button\n\t\t\t(click)=\"toggle()\"\n\t\t\tclass=\"cds--side-nav__submenu\"\n\t\t\taria-haspopup=\"true\"\n\t\t\t[attr.aria-expanded]=\"expanded\"\n\t\t\ttype=\"button\">\n\t\t\t<div class=\"cds--side-nav__icon\">\n\t\t\t\t<ng-content select=\"svg, [icon]\"></ng-content>\n\t\t\t</div>\n\t\t\t<span class=\"cds--side-nav__submenu-title\">{{title}}</span>\n\t\t\t<div class=\"cds--side-nav__icon cds--side-nav__icon--small cds--side-nav__submenu-chevron\">\n\t\t\t\t<svg\n\t\t\t\t\tfocusable=\"false\"\n\t\t\t\t\tpreserveAspectRatio=\"xMidYMid meet\"\n\t\t\t\t\tstyle=\"will-change: transform;\"\n\t\t\t\t\txmlns=\"http://www.w3.org/2000/svg\"\n\t\t\t\t\twidth=\"20\"\n\t\t\t\t\theight=\"20\"\n\t\t\t\t\tviewBox=\"0 0 32 32\"\n\t\t\t\t\taria-hidden=\"true\">\n\t\t\t\t\t<path d=\"M16 22L6 12l1.4-1.4 8.6 8.6 8.6-8.6L26 12z\"></path>\n\t\t\t\t</svg>\n\t\t\t</div>\n\t\t</button>\n\t\t<div class=\"cds--side-nav__menu\" role=\"list\">\n\t\t\t<ng-content></ng-content>\n\t\t\t<ng-container *ngFor=\"let menuItem of menuItems\">\n\t\t\t\t<cds-sidenav-item\n\t\t\t\t\t[href]=\"menuItem.href\"\n\t\t\t\t\t[route]=\"menuItem.route\"\n\t\t\t\t\t[routeExtras]=\"menuItem.routeExtras\"\n\t\t\t\t\t[isSubMenu]=\"true\">\n\t\t\t\t\t{{ menuItem.content }}\n\t\t\t\t</cds-sidenav-item>\n\t\t\t</ng-container>\n\t\t</div>\n\t`\n})\nexport class SideNavMenu implements AfterContentInit, OnDestroy {\n\t@HostBinding(\"class.cds--side-nav__item\") navItem = true;\n\t@HostBinding(\"class.cds--side-nav__item--icon\") navItemIcon = true;\n\t@HostBinding(\"class.cds--side-nav__item--active\") get navItemActive() {\n\t\treturn this.hasActiveChild;\n\t}\n\t@HostBinding(\"attr.role\") role = \"listitem\";\n\n\t/**\n\t * Heading for the gorup\n\t */\n\t@Input() title: string;\n\t/**\n\t * Controls the visibility of the child `SideNavItem`s\n\t */\n\t@Input() expanded = false;\n\t/**\n\t * Controls the active status indicator on the menu if there is an active\n\t * child sidenav item.\n\t */\n\t@Input() hasActiveChild = false;\n\n\t@Input() menuItems: SideNavItemInterface[];\n\n\t@ContentChildren(SideNavItem) sidenavItems: QueryList<SideNavItem>;\n\n\tprotected activeItemsSubscription = new Subscription();\n\n\tngAfterContentInit() {\n\t\tsetTimeout(() => {\n\t\t\tthis.sidenavItems.forEach(item => {\n\t\t\t\titem.isSubMenu = true;\n\t\t\t\tthis.findActiveChildren();\n\t\t\t\tconst activeItemSubscription = item.selected.subscribe(() => {\n\t\t\t\t\tthis.findActiveChildren();\n\t\t\t\t});\n\t\t\t\tthis.activeItemsSubscription.add(activeItemSubscription);\n\t\t\t});\n\n\t\t\tthis.sidenavItems.changes.subscribe(() => {\n\t\t\t\tthis.sidenavItems.forEach(item => {\n\t\t\t\t\titem.isSubMenu = true;\n\t\t\t\t\tthis.findActiveChildren();\n\t\t\t\t\tconst activeItemSubscription = item.selected.subscribe(() => {\n\t\t\t\t\t\tthis.findActiveChildren();\n\t\t\t\t\t});\n\t\t\t\t\tthis.activeItemsSubscription.add(activeItemSubscription);\n\t\t\t\t});\n\t\t\t});\n\t\t});\n\t}\n\n\tngOnDestroy() {\n\t\tthis.activeItemsSubscription.unsubscribe();\n\t}\n\n\ttoggle() {\n\t\tthis.expanded = !this.expanded;\n\t}\n\n\tprotected findActiveChildren() {\n\t\tthis.hasActiveChild = this.sidenavItems.some(item => item.active);\n\t}\n}\n",
47892
+ "sourceCode": "import {\n\tAfterContentInit,\n\tComponent,\n\tContentChildren,\n\tInput,\n\tQueryList,\n\tOnDestroy,\n\tHostBinding\n} from \"@angular/core\";\nimport { SideNavItem } from \"./sidenav-item.component\";\nimport { Subscription } from \"rxjs\";\nimport { SideNavItemInterface } from \"./sidenav-item.interface\";\n\n/**\n * `SideNavMenu` provides a method to group `SideNavItem`s under a common heading.\n */\n@Component({\n\tselector: \"cds-sidenav-menu, ibm-sidenav-menu\",\n\ttemplate: `\n\t\t<button\n\t\t\t(click)=\"toggle()\"\n\t\t\tclass=\"cds--side-nav__submenu\"\n\t\t\taria-haspopup=\"true\"\n\t\t\t[attr.aria-expanded]=\"expanded\"\n\t\t\ttype=\"button\">\n\t\t\t<div class=\"cds--side-nav__icon\">\n\t\t\t\t<ng-content select=\"svg, [icon]\"></ng-content>\n\t\t\t</div>\n\t\t\t<span class=\"cds--side-nav__submenu-title\">{{title}}</span>\n\t\t\t<div class=\"cds--side-nav__icon cds--side-nav__icon--small cds--side-nav__submenu-chevron\">\n\t\t\t\t<svg\n\t\t\t\t\tfocusable=\"false\"\n\t\t\t\t\tpreserveAspectRatio=\"xMidYMid meet\"\n\t\t\t\t\tstyle=\"will-change: transform;\"\n\t\t\t\t\txmlns=\"http://www.w3.org/2000/svg\"\n\t\t\t\t\twidth=\"20\"\n\t\t\t\t\theight=\"20\"\n\t\t\t\t\tviewBox=\"0 0 32 32\"\n\t\t\t\t\taria-hidden=\"true\">\n\t\t\t\t\t<path d=\"M16 22L6 12l1.4-1.4 8.6 8.6 8.6-8.6L26 12z\"></path>\n\t\t\t\t</svg>\n\t\t\t</div>\n\t\t</button>\n\t\t<div class=\"cds--side-nav__menu\" role=\"list\">\n\t\t\t<ng-content></ng-content>\n\t\t\t<ng-container *ngFor=\"let menuItem of menuItems\">\n\t\t\t\t<cds-sidenav-item\n\t\t\t\t\t[href]=\"menuItem.href\"\n\t\t\t\t\t[route]=\"menuItem.route\"\n\t\t\t\t\t[routeExtras]=\"menuItem.routeExtras\"\n\t\t\t\t\t[useRouter]=\"useRouter\"\n\t\t\t\t\t[isSubMenu]=\"true\">\n\t\t\t\t\t{{ menuItem.content }}\n\t\t\t\t</cds-sidenav-item>\n\t\t\t</ng-container>\n\t\t</div>\n\t`\n})\nexport class SideNavMenu implements AfterContentInit, OnDestroy {\n\t@HostBinding(\"class.cds--side-nav__item\") navItem = true;\n\t@HostBinding(\"class.cds--side-nav__item--icon\") navItemIcon = true;\n\t@HostBinding(\"class.cds--side-nav__item--active\") get navItemActive() {\n\t\treturn this.hasActiveChild;\n\t}\n\t@HostBinding(\"attr.role\") role = \"listitem\";\n\n\t/**\n\t * Use the routerLink attribute on <a> tag for navigation instead of using event handlers\n\t */\n\t@Input() useRouter = false;\n\n\t/**\n\t * Heading for the group\n\t */\n\t@Input() title: string;\n\t/**\n\t * Controls the visibility of the child `SideNavItem`s\n\t */\n\t@Input() expanded = false;\n\t/**\n\t * Controls the active status indicator on the menu if there is an active\n\t * child sidenav item.\n\t */\n\t@Input() hasActiveChild = false;\n\n\t@Input() menuItems: SideNavItemInterface[];\n\n\t@ContentChildren(SideNavItem) sidenavItems: QueryList<SideNavItem>;\n\n\tprotected activeItemsSubscription = new Subscription();\n\n\tngAfterContentInit() {\n\t\tsetTimeout(() => {\n\t\t\tthis.sidenavItems.forEach(item => {\n\t\t\t\titem.isSubMenu = true;\n\t\t\t\tthis.findActiveChildren();\n\t\t\t\tconst activeItemSubscription = item.selected.subscribe(() => {\n\t\t\t\t\tthis.findActiveChildren();\n\t\t\t\t});\n\t\t\t\tthis.activeItemsSubscription.add(activeItemSubscription);\n\t\t\t});\n\n\t\t\tthis.sidenavItems.changes.subscribe(() => {\n\t\t\t\tthis.sidenavItems.forEach(item => {\n\t\t\t\t\titem.isSubMenu = true;\n\t\t\t\t\tthis.findActiveChildren();\n\t\t\t\t\tconst activeItemSubscription = item.selected.subscribe(() => {\n\t\t\t\t\t\tthis.findActiveChildren();\n\t\t\t\t\t});\n\t\t\t\t\tthis.activeItemsSubscription.add(activeItemSubscription);\n\t\t\t\t});\n\t\t\t});\n\t\t});\n\t}\n\n\tngOnDestroy() {\n\t\tthis.activeItemsSubscription.unsubscribe();\n\t}\n\n\ttoggle() {\n\t\tthis.expanded = !this.expanded;\n\t}\n\n\tprotected findActiveChildren() {\n\t\tthis.hasActiveChild = this.sidenavItems.some(item => item.active);\n\t}\n}\n",
47860
47893
  "assetsDirs": [],
47861
47894
  "styleUrlsData": "",
47862
47895
  "stylesData": "",
@@ -47871,7 +47904,7 @@
47871
47904
  "name": "navItemActive",
47872
47905
  "type": "",
47873
47906
  "returnType": "",
47874
- "line": 61
47907
+ "line": 62
47875
47908
  }
47876
47909
  }
47877
47910
  }
@@ -67579,13 +67612,13 @@
67579
67612
  },
67580
67613
  {
67581
67614
  "name": "SideNavModule",
67582
- "id": "module-SideNavModule-8abc8f4178079676eafae7d8b35bf88b2f873b13f48e01ae7a1fca260069d9da97b85cf09a0d43ad04ed69299c604c7836200e4e40635a7b4f8da955dd4d7122",
67615
+ "id": "module-SideNavModule-1610967950c32132f9d79a85c5f9a68964d706441e799842c0f364cd6226a51c042421f2c369d3c13bf4d8dd430bbaa01b8ff20b03bdf329e31210c556d8d179",
67583
67616
  "description": "",
67584
67617
  "deprecationMessage": "",
67585
67618
  "deprecated": false,
67586
67619
  "file": "src/ui-shell/sidenav/sidenav.module.ts",
67587
67620
  "methods": [],
67588
- "sourceCode": "import { NgModule } from \"@angular/core\";\nimport { CommonModule } from \"@angular/common\";\n\nimport { I18nModule } from \"carbon-components-angular/i18n\";\n\nimport { SideNav } from \"./sidenav.component\";\nimport { SideNavItem } from \"./sidenav-item.component\";\nimport { SideNavMenu } from \"./sidenav-menu.component\";\n\nexport { SideNavItemInterface } from \"./sidenav-item.interface\";\n\nexport {\n\tSideNav,\n\tSideNavItem,\n\tSideNavMenu\n};\n\n@NgModule({\n\tdeclarations: [\n\t\tSideNav,\n\t\tSideNavItem,\n\t\tSideNavMenu\n\t],\n\timports: [CommonModule, I18nModule],\n\texports: [\n\t\tSideNav,\n\t\tSideNavItem,\n\t\tSideNavMenu\n\t]\n})\nexport class SideNavModule { }\n",
67621
+ "sourceCode": "import { NgModule } from \"@angular/core\";\nimport { CommonModule } from \"@angular/common\";\nimport { RouterModule } from \"@angular/router\";\n\nimport { I18nModule } from \"carbon-components-angular/i18n\";\n\nimport { SideNav } from \"./sidenav.component\";\nimport { SideNavItem } from \"./sidenav-item.component\";\nimport { SideNavMenu } from \"./sidenav-menu.component\";\n\nexport { SideNavItemInterface } from \"./sidenav-item.interface\";\n\nexport {\n\tSideNav,\n\tSideNavItem,\n\tSideNavMenu\n};\n\n@NgModule({\n\tdeclarations: [\n\t\tSideNav,\n\t\tSideNavItem,\n\t\tSideNavMenu\n\t],\n\timports: [CommonModule, I18nModule, RouterModule],\n\texports: [\n\t\tSideNav,\n\t\tSideNavItem,\n\t\tSideNavMenu\n\t]\n})\nexport class SideNavModule { }\n",
67589
67622
  "children": [
67590
67623
  {
67591
67624
  "type": "providers",
@@ -71075,6 +71108,26 @@
71075
71108
  "type": "",
71076
71109
  "defaultValue": "(args) => ({\n\tprops: args,\n\ttemplate: `\n\t\t<div [cdsTheme]=\"theme\">\n\t\t\t<cds-sidenav>\n\t\t\t\t<cds-sidenav-item [active]=\"true\">\n\t\t\t\t\tLink\n\t\t\t\t</cds-sidenav-item>\n\t\t\t\t<cds-sidenav-item>\n\t\t\t\t\t<svg cdsIcon=\"fade\" size=\"16\"></svg>\n\t\t\t\t\tLink\n\t\t\t\t</cds-sidenav-item>\n\t\t\t\t<cds-sidenav-menu title=\"Category title\">\n\t\t\t\t\t<svg cdsIcon=\"fade\" icon size=\"16\"></svg>\n\t\t\t\t\t<cds-sidenav-item>Link</cds-sidenav-item>\n\t\t\t\t\t<cds-sidenav-item>Link</cds-sidenav-item>\n\t\t\t\t\t<cds-sidenav-item>Link</cds-sidenav-item>\n\t\t\t\t</cds-sidenav-menu>\n\t\t\t</cds-sidenav>\n\t\t</div>\n\t`\n})"
71077
71110
  },
71111
+ {
71112
+ "name": "SideNavigationUseRouter",
71113
+ "ctype": "miscellaneous",
71114
+ "subtype": "variable",
71115
+ "file": "src/ui-shell/ui-shell.stories.ts",
71116
+ "deprecated": false,
71117
+ "deprecationMessage": "",
71118
+ "type": "",
71119
+ "defaultValue": "SideNavigationUseRouterTemplate.bind({})"
71120
+ },
71121
+ {
71122
+ "name": "SideNavigationUseRouterTemplate",
71123
+ "ctype": "miscellaneous",
71124
+ "subtype": "variable",
71125
+ "file": "src/ui-shell/ui-shell.stories.ts",
71126
+ "deprecated": false,
71127
+ "deprecationMessage": "",
71128
+ "type": "",
71129
+ "defaultValue": "(args) => ({\n\tprops: args,\n\ttemplate: `\n\t\t<div [cdsTheme]=\"theme\">\n\t\t\t<cds-sidenav>\n\t\t\t\t<cds-sidenav-item [route]=\"['foo']\" [useRouter]=\"true\">\n\t\t\t\t\t<svg cdsIcon=\"fade\" size=\"16\"></svg>\n\t\t\t\t\tLink\n\t\t\t\t</cds-sidenav-item>\n\t\t\t\t<cds-sidenav-item [route]=\"['bar']\" [useRouter]=\"true\">\n\t\t\t\t\t<svg cdsIcon=\"fade\" size=\"16\"></svg>\n\t\t\t\t\tLink\n\t\t\t\t</cds-sidenav-item>\n\t\t\t\t<cds-sidenav-menu title=\"Category title\">\n\t\t\t\t\t<svg cdsIcon=\"fade\" icon size=\"16\"></svg>\n\t\t\t\t\t<cds-sidenav-item [route]=\"['foo']\" [useRouter]=\"true\">Link</cds-sidenav-item>\n\t\t\t\t\t<cds-sidenav-item [route]=\"['bar']\" [useRouter]=\"true\">Link</cds-sidenav-item>\n\t\t\t\t\t<cds-sidenav-item [route]=\"['foo']\" [useRouter]=\"true\">Link</cds-sidenav-item>\n\t\t\t\t</cds-sidenav-menu>\n\t\t\t</cds-sidenav>\n\t\t</div>\n\t\t<div style=\"margin-left: 256px\">\n\t\t\t<router-outlet></router-outlet>\n\t\t</div>\n\t`\n})"
71130
+ },
71078
71131
  {
71079
71132
  "name": "SidePanel",
71080
71133
  "ctype": "miscellaneous",
@@ -74631,6 +74684,26 @@
74631
74684
  "type": "",
74632
74685
  "defaultValue": "(args) => ({\n\tprops: args,\n\ttemplate: `\n\t\t<div [cdsTheme]=\"theme\">\n\t\t\t<cds-sidenav>\n\t\t\t\t<cds-sidenav-item [active]=\"true\">\n\t\t\t\t\tLink\n\t\t\t\t</cds-sidenav-item>\n\t\t\t\t<cds-sidenav-item>\n\t\t\t\t\t<svg cdsIcon=\"fade\" size=\"16\"></svg>\n\t\t\t\t\tLink\n\t\t\t\t</cds-sidenav-item>\n\t\t\t\t<cds-sidenav-menu title=\"Category title\">\n\t\t\t\t\t<svg cdsIcon=\"fade\" icon size=\"16\"></svg>\n\t\t\t\t\t<cds-sidenav-item>Link</cds-sidenav-item>\n\t\t\t\t\t<cds-sidenav-item>Link</cds-sidenav-item>\n\t\t\t\t\t<cds-sidenav-item>Link</cds-sidenav-item>\n\t\t\t\t</cds-sidenav-menu>\n\t\t\t</cds-sidenav>\n\t\t</div>\n\t`\n})"
74633
74686
  },
74687
+ {
74688
+ "name": "SideNavigationUseRouter",
74689
+ "ctype": "miscellaneous",
74690
+ "subtype": "variable",
74691
+ "file": "src/ui-shell/ui-shell.stories.ts",
74692
+ "deprecated": false,
74693
+ "deprecationMessage": "",
74694
+ "type": "",
74695
+ "defaultValue": "SideNavigationUseRouterTemplate.bind({})"
74696
+ },
74697
+ {
74698
+ "name": "SideNavigationUseRouterTemplate",
74699
+ "ctype": "miscellaneous",
74700
+ "subtype": "variable",
74701
+ "file": "src/ui-shell/ui-shell.stories.ts",
74702
+ "deprecated": false,
74703
+ "deprecationMessage": "",
74704
+ "type": "",
74705
+ "defaultValue": "(args) => ({\n\tprops: args,\n\ttemplate: `\n\t\t<div [cdsTheme]=\"theme\">\n\t\t\t<cds-sidenav>\n\t\t\t\t<cds-sidenav-item [route]=\"['foo']\" [useRouter]=\"true\">\n\t\t\t\t\t<svg cdsIcon=\"fade\" size=\"16\"></svg>\n\t\t\t\t\tLink\n\t\t\t\t</cds-sidenav-item>\n\t\t\t\t<cds-sidenav-item [route]=\"['bar']\" [useRouter]=\"true\">\n\t\t\t\t\t<svg cdsIcon=\"fade\" size=\"16\"></svg>\n\t\t\t\t\tLink\n\t\t\t\t</cds-sidenav-item>\n\t\t\t\t<cds-sidenav-menu title=\"Category title\">\n\t\t\t\t\t<svg cdsIcon=\"fade\" icon size=\"16\"></svg>\n\t\t\t\t\t<cds-sidenav-item [route]=\"['foo']\" [useRouter]=\"true\">Link</cds-sidenav-item>\n\t\t\t\t\t<cds-sidenav-item [route]=\"['bar']\" [useRouter]=\"true\">Link</cds-sidenav-item>\n\t\t\t\t\t<cds-sidenav-item [route]=\"['foo']\" [useRouter]=\"true\">Link</cds-sidenav-item>\n\t\t\t\t</cds-sidenav-menu>\n\t\t\t</cds-sidenav>\n\t\t</div>\n\t\t<div style=\"margin-left: 256px\">\n\t\t\t<router-outlet></router-outlet>\n\t\t</div>\n\t`\n})"
74706
+ },
74634
74707
  {
74635
74708
  "name": "SidePanel",
74636
74709
  "ctype": "miscellaneous",
@@ -86128,8 +86201,8 @@
86128
86201
  "type": "component",
86129
86202
  "linktype": "component",
86130
86203
  "name": "SideNavItem",
86131
- "coveragePercent": 53,
86132
- "coverageCount": "8/15",
86204
+ "coveragePercent": 56,
86205
+ "coverageCount": "9/16",
86133
86206
  "status": "good"
86134
86207
  },
86135
86208
  {
@@ -86146,8 +86219,8 @@
86146
86219
  "type": "component",
86147
86220
  "linktype": "component",
86148
86221
  "name": "SideNavMenu",
86149
- "coveragePercent": 28,
86150
- "coverageCount": "4/14",
86222
+ "coveragePercent": 33,
86223
+ "coverageCount": "5/15",
86151
86224
  "status": "medium"
86152
86225
  },
86153
86226
  {
@@ -86155,8 +86228,8 @@
86155
86228
  "type": "component",
86156
86229
  "linktype": "component",
86157
86230
  "name": "SideNav",
86158
- "coveragePercent": 28,
86159
- "coverageCount": "4/14",
86231
+ "coveragePercent": 33,
86232
+ "coverageCount": "5/15",
86160
86233
  "status": "medium"
86161
86234
  },
86162
86235
  {
@@ -86356,6 +86429,26 @@
86356
86429
  "coverageCount": "0/1",
86357
86430
  "status": "low"
86358
86431
  },
86432
+ {
86433
+ "filePath": "src/ui-shell/ui-shell.stories.ts",
86434
+ "type": "variable",
86435
+ "linktype": "miscellaneous",
86436
+ "linksubtype": "variable",
86437
+ "name": "SideNavigationUseRouter",
86438
+ "coveragePercent": 0,
86439
+ "coverageCount": "0/1",
86440
+ "status": "low"
86441
+ },
86442
+ {
86443
+ "filePath": "src/ui-shell/ui-shell.stories.ts",
86444
+ "type": "variable",
86445
+ "linktype": "miscellaneous",
86446
+ "linksubtype": "variable",
86447
+ "name": "SideNavigationUseRouterTemplate",
86448
+ "coveragePercent": 0,
86449
+ "coverageCount": "0/1",
86450
+ "status": "low"
86451
+ },
86359
86452
  {
86360
86453
  "filePath": "src/ui-shell/ui-shell.stories.ts",
86361
86454
  "type": "variable",