carbon-components-angular 3.14.7 → 3.15.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/datepicker/datepicker.component.d.ts +8 -4
- package/datepicker/datepicker.component.js +26 -10
- package/datepicker/datepicker.component.js.map +1 -1
- package/datepicker/datepicker.component.metadata.json +1 -1
- package/datepicker/datepicker.component.ngfactory.js +1 -1
- package/datepicker/datepicker.component.ngsummary.json +1 -1
- package/dialog/dialog.component.js +5 -29
- package/dialog/dialog.component.js.map +1 -1
- package/dialog/dialog.component.metadata.json +1 -1
- package/dialog/overflow-menu/overflow-menu-option.component.js +1 -1
- package/dialog/overflow-menu/overflow-menu-option.component.js.map +1 -1
- package/dialog/overflow-menu/overflow-menu-option.component.metadata.json +1 -1
- package/dialog/overflow-menu/overflow-menu-option.component.ngfactory.js +2 -2
- package/dialog/overflow-menu/overflow-menu-option.component.ngfactory.js.map +1 -1
- package/docs/documentation/components/ClickableTile.html +173 -160
- package/docs/documentation/components/DatePicker.html +109 -36
- package/docs/documentation/components/Dialog.html +12 -41
- package/docs/documentation/components/Dropdown.html +82 -176
- package/docs/documentation/components/HeaderItem.html +241 -11
- package/docs/documentation/components/OverflowMenuOption.html +5 -5
- package/docs/documentation/components/OverflowMenuPane.html +7 -7
- package/docs/documentation/components/SideNavItem.html +236 -13
- package/docs/documentation/components/Tooltip.html +7 -7
- package/docs/documentation/coverage.html +64 -16
- package/docs/documentation/images/coverage-badge-documentation.svg +1 -1
- package/docs/documentation/js/search/search_index.js +2 -2
- package/docs/documentation/miscellaneous/variables.html +144 -0
- package/docs/storybook/iframe.html +3 -3
- package/docs/storybook/{main.12c0e82df31275c6b327.bundle.js → main.d9349fe343a2c719f60b.bundle.js} +352 -99
- package/docs/storybook/main.d9349fe343a2c719f60b.bundle.js.map +1 -0
- package/docs/storybook/{runtime~main.12c0e82df31275c6b327.bundle.js → runtime~main.d9349fe343a2c719f60b.bundle.js} +1 -1
- package/docs/storybook/{runtime~main.12c0e82df31275c6b327.bundle.js.map → runtime~main.d9349fe343a2c719f60b.bundle.js.map} +1 -1
- package/docs/storybook/{vendors~main.12c0e82df31275c6b327.bundle.js → vendors~main.d9349fe343a2c719f60b.bundle.js} +5472 -1
- package/docs/storybook/vendors~main.d9349fe343a2c719f60b.bundle.js.map +1 -0
- package/dropdown/dropdown.component.d.ts +0 -4
- package/dropdown/dropdown.component.js +14 -25
- package/dropdown/dropdown.component.js.map +1 -1
- package/dropdown/dropdown.component.metadata.json +1 -1
- package/dropdown/dropdown.component.ngsummary.json +1 -1
- package/modal/modal.component.d.ts +1 -1
- package/package.json +1 -1
- package/tiles/clickable-tile.component.d.ts +19 -13
- package/tiles/clickable-tile.component.js +26 -17
- package/tiles/clickable-tile.component.js.map +1 -1
- package/tiles/clickable-tile.component.metadata.json +1 -1
- package/tiles/clickable-tile.component.ngfactory.js +8 -11
- package/tiles/clickable-tile.component.ngfactory.js.map +1 -1
- package/tiles/clickable-tile.component.ngsummary.json +1 -1
- package/tiles/tiles.module.ngfactory.js.map +1 -1
- package/ui-shell/header/header-item.component.d.ts +19 -1
- package/ui-shell/header/header-item.component.js +22 -5
- package/ui-shell/header/header-item.component.js.map +1 -1
- package/ui-shell/header/header-item.component.metadata.json +1 -1
- package/ui-shell/header/header-item.component.ngfactory.js +7 -3
- package/ui-shell/header/header-item.component.ngfactory.js.map +1 -1
- package/ui-shell/header/header-item.component.ngsummary.json +1 -1
- package/ui-shell/header/header.module.ngfactory.js.map +1 -1
- package/ui-shell/sidenav/sidenav-item.component.d.ts +19 -1
- package/ui-shell/sidenav/sidenav-item.component.js +22 -5
- package/ui-shell/sidenav/sidenav-item.component.js.map +1 -1
- package/ui-shell/sidenav/sidenav-item.component.metadata.json +1 -1
- package/ui-shell/sidenav/sidenav-item.component.ngfactory.js +7 -3
- package/ui-shell/sidenav/sidenav-item.component.ngfactory.js.map +1 -1
- package/ui-shell/sidenav/sidenav-item.component.ngsummary.json +1 -1
- package/ui-shell/sidenav/sidenav.module.ngfactory.js.map +1 -1
- package/utils/scroll.d.ts +38 -0
- package/utils/scroll.js +66 -0
- package/utils/scroll.js.map +1 -0
- package/utils/scroll.metadata.json +1 -0
- package/utils/scroll.ngsummary.json +1 -0
- package/breadcrumb/breadcrumb.component.spec.d.ts +0 -21
- package/bundle/carbon-angular.umd.js +0 -60
- package/bundle/carbon-angular.umd.js.map +0 -1
- package/checkbox/checkbox.component.spec.d.ts +0 -21
- package/code-snippet/code-snippet.component.spec.d.ts +0 -21
- package/combobox/combobox.component.spec.d.ts +0 -21
- package/common/utils.spec.d.ts +0 -21
- package/dialog/tooltip/tooltip.directive.spec.d.ts +0 -21
- package/docs/storybook/main.12c0e82df31275c6b327.bundle.js.map +0 -1
- package/docs/storybook/vendors~main.12c0e82df31275c6b327.bundle.js.map +0 -1
- package/dropdown/dropdown.component.spec.d.ts +0 -21
- package/dropdown/list/dropdown-list.component.spec.d.ts +0 -21
- package/grid/grid.directive.spec.d.ts +0 -21
- package/i18n/i18n.spec.d.ts +0 -21
- package/inline-loading/inline-loading.spec.d.ts +0 -21
- package/input/label.component.spec.d.ts +0 -21
- package/link/link.spec.d.ts +0 -21
- package/loading/loading.component.spec.d.ts +0 -21
- package/modal/modal.component.spec.d.ts +0 -21
- package/notification/notification.component.spec.d.ts +0 -21
- package/number-input/number.component.spec.d.ts +0 -21
- package/radio/radio.component.spec.d.ts +0 -21
- package/sample/sample-base.class.d.ts +0 -35
- package/sample/sample.component.d.ts +0 -48
- package/sample/sample.component.spec.d.ts +0 -21
- package/sample/sample.interface.d.ts +0 -29
- package/sample/sample.module.d.ts +0 -26
- package/sample/subcomponent/sample-sub.component.d.ts +0 -38
- package/sample/subcomponent/sample-sub.component.spec.d.ts +0 -21
- package/search/search.component.spec.d.ts +0 -21
- package/table/table-model.class.spec.d.ts +0 -21
- package/table/table.component.spec.d.ts +0 -21
- package/tabs/tab-headers.component.spec.d.ts +0 -21
- package/tabs/tabs.component.spec.d.ts +0 -22
- package/tiles/clickable-tile.component.spec.d.ts +0 -22
- package/tiles/tile.component.spec.d.ts +0 -22
- package/toggle/toggle.component.spec.d.ts +0 -21
- package/ui-shell/header/header.component.spec.d.ts +0 -21
- package/utils/a11y.d.ts +0 -26
- package/utils/position.d.ts +0 -21
- package/utils/utils.d.ts +0 -21
package/docs/storybook/{main.12c0e82df31275c6b327.bundle.js → main.d9349fe343a2c719f60b.bundle.js}
RENAMED
|
@@ -3500,6 +3500,7 @@ var DatePicker = /** @class */ (function () {
|
|
|
3500
3500
|
onOpen: function () { _this.updateClassNames(); },
|
|
3501
3501
|
value: this.value
|
|
3502
3502
|
};
|
|
3503
|
+
this.flatpickrInstance = null;
|
|
3503
3504
|
this.onTouched = function () { };
|
|
3504
3505
|
this.propagateChange = function (_) { };
|
|
3505
3506
|
}
|
|
@@ -3549,7 +3550,7 @@ var DatePicker = /** @class */ (function () {
|
|
|
3549
3550
|
configurable: true
|
|
3550
3551
|
});
|
|
3551
3552
|
DatePicker.prototype.ngOnChanges = function (changes) {
|
|
3552
|
-
if (this.
|
|
3553
|
+
if (this.isFlatpickrLoaded()) {
|
|
3553
3554
|
var dates = this.flatpickrInstance.selectedDates;
|
|
3554
3555
|
if (changes.value && this.didDateValueChange(changes.value.currentValue, changes.value.previousValue)) {
|
|
3555
3556
|
dates = changes.value.currentValue;
|
|
@@ -3559,10 +3560,18 @@ var DatePicker = /** @class */ (function () {
|
|
|
3559
3560
|
this.setDateValues(dates);
|
|
3560
3561
|
}
|
|
3561
3562
|
};
|
|
3562
|
-
|
|
3563
|
-
|
|
3564
|
-
|
|
3565
|
-
|
|
3563
|
+
// because the actual view may be delayed in loading (think projection into a tab pane)
|
|
3564
|
+
// and because we rely on a library that operates outside the Angular view of the world
|
|
3565
|
+
// we need to keep trying to load the library, until the relevant DOM is actually live
|
|
3566
|
+
DatePicker.prototype.ngAfterViewChecked = function () {
|
|
3567
|
+
if (!this.isFlatpickrLoaded()) {
|
|
3568
|
+
this.flatpickrInstance = flatpickr__WEBPACK_IMPORTED_MODULE_2___default()("#" + this.id, this.flatpickrOptions);
|
|
3569
|
+
// if (and only if) the initialization succeeded, we can set the date values
|
|
3570
|
+
if (this.isFlatpickrLoaded()) {
|
|
3571
|
+
if (this.value.length > 0) {
|
|
3572
|
+
this.setDateValues(this.value);
|
|
3573
|
+
}
|
|
3574
|
+
}
|
|
3566
3575
|
}
|
|
3567
3576
|
};
|
|
3568
3577
|
DatePicker.prototype.onFocus = function () {
|
|
@@ -3570,7 +3579,7 @@ var DatePicker = /** @class */ (function () {
|
|
|
3570
3579
|
};
|
|
3571
3580
|
/**
|
|
3572
3581
|
* Writes a value from the model to the component. Expects the value to be `null` or `(Date | string)[]`
|
|
3573
|
-
* @param value value
|
|
3582
|
+
* @param value value received from the model
|
|
3574
3583
|
*/
|
|
3575
3584
|
DatePicker.prototype.writeValue = function (value) {
|
|
3576
3585
|
this.value = value;
|
|
@@ -3586,7 +3595,7 @@ var DatePicker = /** @class */ (function () {
|
|
|
3586
3595
|
* Cleans up our flatpickr instance
|
|
3587
3596
|
*/
|
|
3588
3597
|
DatePicker.prototype.ngOnDestroy = function () {
|
|
3589
|
-
if (!this.
|
|
3598
|
+
if (!this.isFlatpickrLoaded()) {
|
|
3590
3599
|
return;
|
|
3591
3600
|
}
|
|
3592
3601
|
this.flatpickrInstance.destroy();
|
|
@@ -3595,7 +3604,7 @@ var DatePicker = /** @class */ (function () {
|
|
|
3595
3604
|
* Handles the `valueChange` event from the primary/single input
|
|
3596
3605
|
*/
|
|
3597
3606
|
DatePicker.prototype.onValueChange = function (event) {
|
|
3598
|
-
if (this.
|
|
3607
|
+
if (this.isFlatpickrLoaded()) {
|
|
3599
3608
|
var date = this.flatpickrInstance.parseDate(event, this.dateFormat);
|
|
3600
3609
|
if (this.range) {
|
|
3601
3610
|
this.setDateValues([date, this.flatpickrInstance.selectedDates[1]]);
|
|
@@ -3610,7 +3619,7 @@ var DatePicker = /** @class */ (function () {
|
|
|
3610
3619
|
* Handles the `valueChange` event from the range input
|
|
3611
3620
|
*/
|
|
3612
3621
|
DatePicker.prototype.onRangeValueChange = function (event) {
|
|
3613
|
-
if (this.
|
|
3622
|
+
if (this.isFlatpickrLoaded()) {
|
|
3614
3623
|
var date = this.flatpickrInstance.parseDate(event, this.dateFormat);
|
|
3615
3624
|
this.setDateValues([this.flatpickrInstance.selectedDates[0], date]);
|
|
3616
3625
|
this.doSelect(this.flatpickrInstance.selectedDates);
|
|
@@ -3668,7 +3677,7 @@ var DatePicker = /** @class */ (function () {
|
|
|
3668
3677
|
* @param dates the date values to apply
|
|
3669
3678
|
*/
|
|
3670
3679
|
DatePicker.prototype.setDateValues = function (dates) {
|
|
3671
|
-
if (this.
|
|
3680
|
+
if (this.isFlatpickrLoaded()) {
|
|
3672
3681
|
var singleInput = this.elementRef.nativeElement.querySelector("#" + this.id);
|
|
3673
3682
|
var rangeInput = this.elementRef.nativeElement.querySelector("#" + this.id + "-rangeInput");
|
|
3674
3683
|
// set the date on the instance
|
|
@@ -3710,6 +3719,13 @@ var DatePicker = /** @class */ (function () {
|
|
|
3710
3719
|
DatePicker.prototype.didDateValueChange = function (currentValue, previousValue) {
|
|
3711
3720
|
return currentValue[0] !== previousValue[0] || currentValue[1] !== previousValue[1];
|
|
3712
3721
|
};
|
|
3722
|
+
/**
|
|
3723
|
+
* More advanced checking of the loaded state of flatpickr
|
|
3724
|
+
*/
|
|
3725
|
+
DatePicker.prototype.isFlatpickrLoaded = function () {
|
|
3726
|
+
// cast the instance to a boolean, and some method that has to exist for the library to be loaded in this case `setDate`
|
|
3727
|
+
return !!this.flatpickrInstance && !!this.flatpickrInstance.setDate;
|
|
3728
|
+
};
|
|
3713
3729
|
var DatePicker_1, _a, _b, _c, _d;
|
|
3714
3730
|
DatePicker.datePickerCount = 0;
|
|
3715
3731
|
__decorate([
|
|
@@ -3880,6 +3896,7 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
3880
3896
|
/* harmony import */ var _angular_core__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! @angular/core */ "./node_modules/@angular/core/fesm5/core.js");
|
|
3881
3897
|
/* harmony import */ var ___WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../ */ "./src/index.ts");
|
|
3882
3898
|
/* harmony import */ var _forms_forms_module__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../forms/forms.module */ "./src/forms/forms.module.ts");
|
|
3899
|
+
/* harmony import */ var _tabs_tabs_module__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../tabs/tabs.module */ "./src/tabs/tabs.module.ts");
|
|
3883
3900
|
var __decorate = (undefined && undefined.__decorate) || function (decorators, target, key, desc) {
|
|
3884
3901
|
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
3885
3902
|
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
@@ -3890,8 +3907,9 @@ var __metadata = (undefined && undefined.__metadata) || function (k, v) {
|
|
|
3890
3907
|
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
3891
3908
|
};
|
|
3892
3909
|
var withStorySource = __webpack_require__(/*! @storybook/addon-storysource */ "./node_modules/@storybook/addon-storysource/dist/index.js").withStorySource;
|
|
3893
|
-
var __STORY__ = "import { storiesOf, moduleMetadata } from '@storybook/angular';\nimport { action } from '@storybook/addon-actions';\nimport { withKnobs, array, select, text, boolean } from '@storybook/addon-knobs/angular';\nimport {\n FormBuilder,\n FormGroup,\n Validators,\n FormsModule,\n ReactiveFormsModule,\n} from '@angular/forms';\nimport { Component, Input, Output, EventEmitter } from '@angular/core';\nimport { DatePickerModule, DocumentationModule } from '../';\nimport { ButtonModule } from '../forms/forms.module';\n\n@Component({\n selector: 'app-date-picker',\n template: `\n <form [formGroup]=\"formGroup\">\n <ibm-date-picker\n formControlName=\"single\"\n label=\"Date Picker Label\"\n invalidText=\"Invalid date format\"\n [invalid]=\"invalidSingle\"\n (valueChange)=\"valueChange.emit($event)\"\n >\n </ibm-date-picker>\n <code>{{ formGroup.controls['single'].value | json }}</code>\n <br /><br />\n <ibm-date-picker\n range=\"true\"\n formControlName=\"range\"\n label=\"Date Picker Label\"\n rangeLabel=\"Date Picker Label\"\n invalidText=\"Invalid date format\"\n [pattern]=\"pattern\"\n [invalid]=\"invalidRange\"\n (valueChange)=\"valueChange.emit($event)\"\n >\n </ibm-date-picker>\n <code>{{ formGroup.controls['range'].value | json }}</code>\n </form>\n `,\n})\nclass DatePickerStory {\n @Output() valueChange = new EventEmitter();\n\n get invalidSingle() {\n return this.formGroup.controls['single'].invalid && this.formGroup.controls['single'].touched;\n }\n\n get invalidRange() {\n return this.formGroup.controls['range'].invalid && this.formGroup.controls['range'].touched;\n }\n\n formGroup: FormGroup;\n\n constructor(protected formBuilder: FormBuilder) {\n this.formGroup = this.formBuilder.group({\n single: [[new Date()], Validators.required],\n range: [\n [\n new Date(),\n new Date(new Date().getFullYear(), new Date().getMonth() + 1, new Date().getDate()),\n ],\n Validators.required,\n ],\n });\n }\n}\n\nstoriesOf('Date Picker', module)\n .addDecorator(\n moduleMetadata({\n imports: [\n DatePickerModule,\n FormsModule,\n ReactiveFormsModule,\n DocumentationModule,\n ButtonModule,\n ],\n declarations: [DatePickerStory],\n })\n )\n .addDecorator(withKnobs)\n .add('Simple', () => ({\n template: `\n\t\t<ibm-date-picker-input\n\t\t\t[theme]=\"theme\"\n\t\t\t[label]=\"label\"\n\t\t\t[placeholder]=\"placeholder\"\n\t\t\t[disabled]=\"disabled\"\n\t\t\t[invalid]=\"invalid\"\n\t\t\t[invalidText]=\"invalidText\"\n\t\t\t(valueChange)=\"valueChange($event)\">\n\t\t</ibm-date-picker-input>\n\t\t`,\n props: {\n theme: select('Theme', ['dark', 'light'], 'dark'),\n label: text('Label text', 'Date Picker Label'),\n placeholder: text('Placeholder text', 'mm/dd/yyyy'),\n invalidText: text('Form validation content', 'Invalid date format'),\n invalid: boolean('Show form validation', false),\n disabled: boolean('Disabled', false),\n valueChange: action('Date change fired!'),\n },\n }))\n .add('Single', () => ({\n template: `\n\t\t\t<p>With initial value</p>\n\t\t\t<ibm-date-picker\n\t\t\t\t[label]=\"label\"\n\t\t\t\t[placeholder]=\"placeholder\"\n\t\t\t\t[theme]=\"theme\"\n\t\t\t\t[value]=\"value\"\n\t\t\t\t[disabled]=\"disabled\"\n\t\t\t\t[invalid]=\"invalid\"\n\t\t\t\t[invalidText]=\"invalidText\"\n\t\t\t\t[dateFormat]=\"dateFormat\"\n\t\t\t\t(valueChange)=\"valueChange($event)\">\n\t\t\t</ibm-date-picker>\n\t\t\t<p style=\"margin-top: 20px;\">Without initial value</p>\n\t\t\t<ibm-date-picker\n\t\t\t\t[label]=\"label\"\n\t\t\t\t[placeholder]=\"placeholder\"\n\t\t\t\t[theme]=\"theme\"\n\t\t\t\t[disabled]=\"disabled\"\n\t\t\t\t[invalid]=\"invalid\"\n\t\t\t\t[invalidText]=\"invalidText\"\n\t\t\t\t[dateFormat]=\"dateFormat\"\n\t\t\t\t(valueChange)=\"valueChange($event)\">\n\t\t\t</ibm-date-picker>\n\t\t`,\n props: {\n valueChange: action('Date change fired!'),\n theme: select('Theme', ['dark', 'light'], 'dark'),\n label: text('Label text', 'Date Picker Label'),\n placeholder: text('Placeholder text', 'mm/dd/yyyy'),\n invalidText: text('Form validation content', 'Invalid date format'),\n invalid: boolean('Show form validation', false),\n disabled: boolean('Disabled', false),\n dateFormat: text('Date format', 'm/d/Y'),\n value: array('Value', ['10/19/2019']),\n },\n }))\n .add('Range', () => ({\n template: `\n\t\t<p>With initial value</p>\n\t\t<ibm-date-picker\n\t\t\t[label]=\"label\"\n\t\t\t[rangeLabel]=\"label\"\n\t\t\trange=\"true\"\n\t\t\t[placeholder]=\"placeholder\"\n\t\t\t[theme]=\"theme\"\n\t\t\t[disabled]=\"disabled\"\n\t\t\t[invalid]=\"invalid\"\n\t\t\t[invalidText]=\"invalidText\"\n\t\t\t[dateFormat]=\"dateFormat\"\n\t\t\t[value]=\"value\"\n\t\t\t(valueChange)=\"valueChange($event)\">\n\t\t</ibm-date-picker>\n\t\t<p style=\"margin-top: 20px;\">Without initial value</p>\n\t\t<ibm-date-picker\n\t\t\t[label]=\"label\"\n\t\t\t[rangeLabel]=\"label\"\n\t\t\trange=\"true\"\n\t\t\t[placeholder]=\"placeholder\"\n\t\t\t[theme]=\"theme\"\n\t\t\t[disabled]=\"disabled\"\n\t\t\t[invalid]=\"invalid\"\n\t\t\t[invalidText]=\"invalidText\"\n\t\t\t[dateFormat]=\"dateFormat\"\n\t\t\t(valueChange)=\"valueChange($event)\">\n\t\t</ibm-date-picker>\n\t\t`,\n props: {\n valueChange: action('Date change fired!'),\n theme: select('Theme', ['dark', 'light'], 'dark'),\n label: text('Label text', 'Date Picker Label'),\n placeholder: text('Placeholder text', 'mm/dd/yyyy'),\n invalidText: text('Form validation content', 'Invalid date format'),\n invalid: boolean('Show form validation', false),\n disabled: boolean('Disabled', false),\n dateFormat: text('Date format', 'm/d/Y'),\n value: array('Value', ['09/19/2019', '10/19/2019']),\n },\n }))\n .add('With reactive forms', () => ({\n template: `\n\t\t<app-date-picker\n\t\t\t(valueChange)=\"valueChange($event)\">\n\t\t</app-date-picker>\n\t\t`,\n props: {\n valueChange: action('Date change fired!'),\n },\n }))\n .add('With ngModel', () => ({\n template: `\n\t\t\t<div>\n\t\t\t\t<ibm-date-picker\n\t\t\t\t\tlabel=\"Date picker label\"\n\t\t\t\t\t[(ngModel)]=\"single\">\n\t\t\t\t</ibm-date-picker>\n\t\t\t\t<button\n\t\t\t\t\tibmButton\n\t\t\t\t\t(click)=\"single = null\"\n\t\t\t\t\tstyle=\"margin-top: 5px\">\n\t\t\t\t\tSend null\n\t\t\t\t</button>\n\t\t\t\t<button\n\t\t\t\t\tibmButton\n\t\t\t\t\t(click)=\"single = [date]\"\n\t\t\t\t\tstyle=\"margin-left: 5px\">\n\t\t\t\t\tSend date\n\t\t\t\t</button>\n\t\t\t\t<br>\n\t\t\t\t<code>{{ single | json }}</code>\n\t\t\t</div>\n\t\t\t<div style=\"margin-top: 15px;\">\n\t\t\t\t<ibm-date-picker\n\t\t\t\t\tlabel=\"Date picker\"\n\t\t\t\t\trangeLabel=\"Range label\"\n\t\t\t\t\trange=\"true\"\n\t\t\t\t\t[(ngModel)]=\"range\">\n\t\t\t\t</ibm-date-picker>\n\t\t\t\t<button\n\t\t\t\t\tibmButton\n\t\t\t\t\t(click)=\"range = null\"\n\t\t\t\t\tstyle=\"margin-top: 5px\">\n\t\t\t\t\tSend null\n\t\t\t\t</button>\n\t\t\t\t<button\n\t\t\t\t\tibmButton\n\t\t\t\t\t(click)=\"range = rangeDates\"\n\t\t\t\t\tstyle=\"margin-left: 5px\">\n\t\t\t\t\tSend date\n\t\t\t\t</button>\n\t\t\t\t<br>\n\t\t\t\t<code>{{ range | json }}</code>\n\t\t\t</div>\n\t\t`,\n props: {\n date: new Date(new Date().getFullYear(), 5, 15),\n rangeDates: [\n new Date(new Date().getFullYear(), 5, 15),\n new Date(new Date().getFullYear(), 8, 19),\n ],\n },\n }))\n .add('Skeleton', () => ({\n template: `\n\t\t<ibm-date-picker\n\t\t\trange=\"true\"\n\t\t\tskeleton=\"true\">\n\t\t</ibm-date-picker>\n\t\t`,\n }))\n .add('Documentation', () => ({\n template: `\n\t\t\t<ibm-documentation src=\"documentation/components/DatePicker.html\"></ibm-documentation>\n\t\t`,\n }));\n";
|
|
3894
|
-
var __ADDS_MAP__ = { "date-picker--documentation": { "startLoc": { "col": 7, "line":
|
|
3910
|
+
var __STORY__ = "import { storiesOf, moduleMetadata } from '@storybook/angular';\nimport { action } from '@storybook/addon-actions';\nimport { withKnobs, array, select, text, boolean } from '@storybook/addon-knobs/angular';\nimport {\n FormBuilder,\n FormGroup,\n Validators,\n FormsModule,\n ReactiveFormsModule,\n} from '@angular/forms';\nimport { Component, Input, Output, EventEmitter } from '@angular/core';\nimport { DatePickerModule, DocumentationModule } from '../';\nimport { ButtonModule } from '../forms/forms.module';\nimport { TabsModule } from '../tabs/tabs.module';\n\n@Component({\n selector: 'app-date-picker',\n template: `\n <form [formGroup]=\"formGroup\">\n <ibm-date-picker\n formControlName=\"single\"\n label=\"Date Picker Label\"\n invalidText=\"Invalid date format\"\n [invalid]=\"invalidSingle\"\n (valueChange)=\"valueChange.emit($event)\"\n >\n </ibm-date-picker>\n <code>{{ formGroup.controls['single'].value | json }}</code>\n <br /><br />\n <ibm-date-picker\n range=\"true\"\n formControlName=\"range\"\n label=\"Date Picker Label\"\n rangeLabel=\"Date Picker Label\"\n invalidText=\"Invalid date format\"\n [pattern]=\"pattern\"\n [invalid]=\"invalidRange\"\n (valueChange)=\"valueChange.emit($event)\"\n >\n </ibm-date-picker>\n <code>{{ formGroup.controls['range'].value | json }}</code>\n </form>\n `,\n})\nclass DatePickerStory {\n @Output() valueChange = new EventEmitter();\n\n get invalidSingle() {\n return this.formGroup.controls['single'].invalid && this.formGroup.controls['single'].touched;\n }\n\n get invalidRange() {\n return this.formGroup.controls['range'].invalid && this.formGroup.controls['range'].touched;\n }\n\n formGroup: FormGroup;\n\n constructor(protected formBuilder: FormBuilder) {\n this.formGroup = this.formBuilder.group({\n single: [[new Date()], Validators.required],\n range: [\n [\n new Date(),\n new Date(new Date().getFullYear(), new Date().getMonth() + 1, new Date().getDate()),\n ],\n Validators.required,\n ],\n });\n }\n}\n\nstoriesOf('Date Picker', module)\n .addDecorator(\n moduleMetadata({\n imports: [\n DatePickerModule,\n FormsModule,\n ReactiveFormsModule,\n DocumentationModule,\n ButtonModule,\n TabsModule,\n ],\n declarations: [DatePickerStory],\n })\n )\n .addDecorator(withKnobs)\n .add('Simple', () => ({\n template: `\n\t\t<ibm-date-picker-input\n\t\t\t[theme]=\"theme\"\n\t\t\t[label]=\"label\"\n\t\t\t[placeholder]=\"placeholder\"\n\t\t\t[disabled]=\"disabled\"\n\t\t\t[invalid]=\"invalid\"\n\t\t\t[invalidText]=\"invalidText\"\n\t\t\t(valueChange)=\"valueChange($event)\">\n\t\t</ibm-date-picker-input>\n\t\t`,\n props: {\n theme: select('Theme', ['dark', 'light'], 'dark'),\n label: text('Label text', 'Date Picker Label'),\n placeholder: text('Placeholder text', 'mm/dd/yyyy'),\n invalidText: text('Form validation content', 'Invalid date format'),\n invalid: boolean('Show form validation', false),\n disabled: boolean('Disabled', false),\n valueChange: action('Date change fired!'),\n },\n }))\n .add('Single', () => ({\n template: `\n\t\t\t<p>With initial value</p>\n\t\t\t<ibm-date-picker\n\t\t\t\t[label]=\"label\"\n\t\t\t\t[placeholder]=\"placeholder\"\n\t\t\t\t[theme]=\"theme\"\n\t\t\t\t[value]=\"value\"\n\t\t\t\t[disabled]=\"disabled\"\n\t\t\t\t[invalid]=\"invalid\"\n\t\t\t\t[invalidText]=\"invalidText\"\n\t\t\t\t[dateFormat]=\"dateFormat\"\n\t\t\t\t(valueChange)=\"valueChange($event)\">\n\t\t\t</ibm-date-picker>\n\t\t\t<p style=\"margin-top: 20px;\">Without initial value</p>\n\t\t\t<ibm-date-picker\n\t\t\t\t[label]=\"label\"\n\t\t\t\t[placeholder]=\"placeholder\"\n\t\t\t\t[theme]=\"theme\"\n\t\t\t\t[disabled]=\"disabled\"\n\t\t\t\t[invalid]=\"invalid\"\n\t\t\t\t[invalidText]=\"invalidText\"\n\t\t\t\t[dateFormat]=\"dateFormat\"\n\t\t\t\t(valueChange)=\"valueChange($event)\">\n\t\t\t</ibm-date-picker>\n\t\t`,\n props: {\n valueChange: action('Date change fired!'),\n theme: select('Theme', ['dark', 'light'], 'dark'),\n label: text('Label text', 'Date Picker Label'),\n placeholder: text('Placeholder text', 'mm/dd/yyyy'),\n invalidText: text('Form validation content', 'Invalid date format'),\n invalid: boolean('Show form validation', false),\n disabled: boolean('Disabled', false),\n dateFormat: text('Date format', 'm/d/Y'),\n value: array('Value', ['10/19/2019']),\n },\n }))\n .add('Range', () => ({\n template: `\n\t\t<p>With initial value</p>\n\t\t<ibm-date-picker\n\t\t\t[label]=\"label\"\n\t\t\t[rangeLabel]=\"label\"\n\t\t\trange=\"true\"\n\t\t\t[placeholder]=\"placeholder\"\n\t\t\t[theme]=\"theme\"\n\t\t\t[disabled]=\"disabled\"\n\t\t\t[invalid]=\"invalid\"\n\t\t\t[invalidText]=\"invalidText\"\n\t\t\t[dateFormat]=\"dateFormat\"\n\t\t\t[value]=\"value\"\n\t\t\t(valueChange)=\"valueChange($event)\">\n\t\t</ibm-date-picker>\n\t\t<p style=\"margin-top: 20px;\">Without initial value</p>\n\t\t<ibm-date-picker\n\t\t\t[label]=\"label\"\n\t\t\t[rangeLabel]=\"label\"\n\t\t\trange=\"true\"\n\t\t\t[placeholder]=\"placeholder\"\n\t\t\t[theme]=\"theme\"\n\t\t\t[disabled]=\"disabled\"\n\t\t\t[invalid]=\"invalid\"\n\t\t\t[invalidText]=\"invalidText\"\n\t\t\t[dateFormat]=\"dateFormat\"\n\t\t\t(valueChange)=\"valueChange($event)\">\n\t\t</ibm-date-picker>\n\t\t`,\n props: {\n valueChange: action('Date change fired!'),\n theme: select('Theme', ['dark', 'light'], 'dark'),\n label: text('Label text', 'Date Picker Label'),\n placeholder: text('Placeholder text', 'mm/dd/yyyy'),\n invalidText: text('Form validation content', 'Invalid date format'),\n invalid: boolean('Show form validation', false),\n disabled: boolean('Disabled', false),\n dateFormat: text('Date format', 'm/d/Y'),\n value: array('Value', ['09/19/2019', '10/19/2019']),\n },\n }))\n .add('With reactive forms', () => ({\n template: `\n\t\t<app-date-picker\n\t\t\t(valueChange)=\"valueChange($event)\">\n\t\t</app-date-picker>\n\t\t`,\n props: {\n valueChange: action('Date change fired!'),\n },\n }))\n .add('With ngModel', () => ({\n template: `\n\t\t\t<div>\n\t\t\t\t<ibm-date-picker\n\t\t\t\t\tlabel=\"Date picker label\"\n\t\t\t\t\t[(ngModel)]=\"single\">\n\t\t\t\t</ibm-date-picker>\n\t\t\t\t<button\n\t\t\t\t\tibmButton\n\t\t\t\t\t(click)=\"single = null\"\n\t\t\t\t\tstyle=\"margin-top: 5px\">\n\t\t\t\t\tSend null\n\t\t\t\t</button>\n\t\t\t\t<button\n\t\t\t\t\tibmButton\n\t\t\t\t\t(click)=\"single = [date]\"\n\t\t\t\t\tstyle=\"margin-left: 5px\">\n\t\t\t\t\tSend date\n\t\t\t\t</button>\n\t\t\t\t<br>\n\t\t\t\t<code>{{ single | json }}</code>\n\t\t\t</div>\n\t\t\t<div style=\"margin-top: 15px;\">\n\t\t\t\t<ibm-date-picker\n\t\t\t\t\tlabel=\"Date picker\"\n\t\t\t\t\trangeLabel=\"Range label\"\n\t\t\t\t\trange=\"true\"\n\t\t\t\t\t[(ngModel)]=\"range\">\n\t\t\t\t</ibm-date-picker>\n\t\t\t\t<button\n\t\t\t\t\tibmButton\n\t\t\t\t\t(click)=\"range = null\"\n\t\t\t\t\tstyle=\"margin-top: 5px\">\n\t\t\t\t\tSend null\n\t\t\t\t</button>\n\t\t\t\t<button\n\t\t\t\t\tibmButton\n\t\t\t\t\t(click)=\"range = rangeDates\"\n\t\t\t\t\tstyle=\"margin-left: 5px\">\n\t\t\t\t\tSend date\n\t\t\t\t</button>\n\t\t\t\t<br>\n\t\t\t\t<code>{{ range | json }}</code>\n\t\t\t</div>\n\t\t`,\n props: {\n date: new Date(new Date().getFullYear(), 5, 15),\n rangeDates: [\n new Date(new Date().getFullYear(), 5, 15),\n new Date(new Date().getFullYear(), 8, 19),\n ],\n },\n }))\n .add('In tabs', () => ({\n template: `\n\t\t\t<ibm-tabs>\n\t\t\t\t<ibm-tab heading=\"one\">\n\t\t\t\t\tTab Content 1\n\t\t\t\t\t<p>With initial value</p>\n\t\t\t\t\t<ibm-date-picker\n\t\t\t\t\t\t[label]=\"label\"\n\t\t\t\t\t\t[placeholder]=\"placeholder\"\n\t\t\t\t\t\t[theme]=\"theme\"\n\t\t\t\t\t\t[value]=\"value\"\n\t\t\t\t\t\t[disabled]=\"disabled\"\n\t\t\t\t\t\t[invalid]=\"invalid\"\n\t\t\t\t\t\t[invalidText]=\"invalidText\"\n\t\t\t\t\t\t[dateFormat]=\"dateFormat\"\n\t\t\t\t\t\t(valueChange)=\"valueChange($event)\">\n\t\t\t\t\t</ibm-date-picker>\n\t\t\t\t\t<p style=\"margin-top: 20px;\">Without initial value</p>\n\t\t\t\t\t<ibm-date-picker\n\t\t\t\t\t\t[label]=\"label\"\n\t\t\t\t\t\t[placeholder]=\"placeholder\"\n\t\t\t\t\t\t[theme]=\"theme\"\n\t\t\t\t\t\t[disabled]=\"disabled\"\n\t\t\t\t\t\t[invalid]=\"invalid\"\n\t\t\t\t\t\t[invalidText]=\"invalidText\"\n\t\t\t\t\t\t[dateFormat]=\"dateFormat\"\n\t\t\t\t\t\t(valueChange)=\"valueChange($event)\">\n\t\t\t\t\t</ibm-date-picker>\n\t\t\t\t</ibm-tab>\n\t\t\t\t<ibm-tab heading=\"two\">\n\t\t\t\t\t<p>With initial value</p>\n\t\t\t\t\t<ibm-date-picker\n\t\t\t\t\t\t[label]=\"label\"\n\t\t\t\t\t\t[placeholder]=\"placeholder\"\n\t\t\t\t\t\t[theme]=\"theme\"\n\t\t\t\t\t\t[value]=\"value\"\n\t\t\t\t\t\t[disabled]=\"disabled\"\n\t\t\t\t\t\t[invalid]=\"invalid\"\n\t\t\t\t\t\t[invalidText]=\"invalidText\"\n\t\t\t\t\t\t[dateFormat]=\"dateFormat\"\n\t\t\t\t\t\t(valueChange)=\"valueChange($event)\">\n\t\t\t\t\t</ibm-date-picker>\n\t\t\t\t\t<p style=\"margin-top: 20px;\">Without initial value</p>\n\t\t\t\t\t<ibm-date-picker\n\t\t\t\t\t\t[label]=\"label\"\n\t\t\t\t\t\t[placeholder]=\"placeholder\"\n\t\t\t\t\t\t[theme]=\"theme\"\n\t\t\t\t\t\t[disabled]=\"disabled\"\n\t\t\t\t\t\t[invalid]=\"invalid\"\n\t\t\t\t\t\t[invalidText]=\"invalidText\"\n\t\t\t\t\t\t[dateFormat]=\"dateFormat\"\n\t\t\t\t\t\t(valueChange)=\"valueChange($event)\">\n\t\t\t\t\t</ibm-date-picker>\n\t\t\t\t</ibm-tab>\n\t\t\t\t<ibm-tab heading=\"three\">Tab Content 3</ibm-tab>\n\t\t\t</ibm-tabs>\n\t\t`,\n props: {\n valueChange: action('Date change fired!'),\n theme: select('Theme', ['dark', 'light'], 'dark'),\n label: text('Label text', 'Date Picker Label'),\n placeholder: text('Placeholder text', 'mm/dd/yyyy'),\n invalidText: text('Form validation content', 'Invalid date format'),\n invalid: boolean('Show form validation', false),\n disabled: boolean('Disabled', false),\n dateFormat: text('Date format', 'm/d/Y'),\n value: array('Value', ['10/19/2019']),\n },\n }))\n .add('Skeleton', () => ({\n template: `\n\t\t<ibm-date-picker\n\t\t\trange=\"true\"\n\t\t\tskeleton=\"true\">\n\t\t</ibm-date-picker>\n\t\t`,\n }))\n .add('Documentation', () => ({\n template: `\n\t\t\t<ibm-documentation src=\"documentation/components/DatePicker.html\"></ibm-documentation>\n\t\t`,\n }));\n";
|
|
3911
|
+
var __ADDS_MAP__ = { "date-picker--documentation": { "startLoc": { "col": 7, "line": 329 }, "endLoc": { "col": 4, "line": 333 } }, "date-picker--skeleton": { "startLoc": { "col": 7, "line": 321 }, "endLoc": { "col": 4, "line": 328 } }, "date-picker--in-tabs": { "startLoc": { "col": 7, "line": 252 }, "endLoc": { "col": 4, "line": 320 } }, "date-picker--with-ngmodel": { "startLoc": { "col": 7, "line": 199 }, "endLoc": { "col": 4, "line": 251 } }, "date-picker--with-reactive-forms": { "startLoc": { "col": 7, "line": 189 }, "endLoc": { "col": 4, "line": 198 } }, "date-picker--range": { "startLoc": { "col": 7, "line": 147 }, "endLoc": { "col": 4, "line": 188 } }, "date-picker--single": { "startLoc": { "col": 7, "line": 109 }, "endLoc": { "col": 4, "line": 146 } }, "date-picker--simple": { "startLoc": { "col": 7, "line": 87 }, "endLoc": { "col": 4, "line": 108 } } };
|
|
3912
|
+
|
|
3895
3913
|
|
|
3896
3914
|
|
|
3897
3915
|
|
|
@@ -3952,7 +3970,8 @@ Object(_storybook_angular__WEBPACK_IMPORTED_MODULE_0__["storiesOf"])("Date Picke
|
|
|
3952
3970
|
_angular_forms__WEBPACK_IMPORTED_MODULE_3__["FormsModule"],
|
|
3953
3971
|
_angular_forms__WEBPACK_IMPORTED_MODULE_3__["ReactiveFormsModule"],
|
|
3954
3972
|
___WEBPACK_IMPORTED_MODULE_5__["DocumentationModule"],
|
|
3955
|
-
_forms_forms_module__WEBPACK_IMPORTED_MODULE_6__["ButtonModule"]
|
|
3973
|
+
_forms_forms_module__WEBPACK_IMPORTED_MODULE_6__["ButtonModule"],
|
|
3974
|
+
_tabs_tabs_module__WEBPACK_IMPORTED_MODULE_7__["TabsModule"]
|
|
3956
3975
|
],
|
|
3957
3976
|
declarations: [
|
|
3958
3977
|
DatePickerStory
|
|
@@ -4014,6 +4033,20 @@ Object(_storybook_angular__WEBPACK_IMPORTED_MODULE_0__["storiesOf"])("Date Picke
|
|
|
4014
4033
|
new Date(new Date().getFullYear(), 8, 19)
|
|
4015
4034
|
]
|
|
4016
4035
|
}
|
|
4036
|
+
}); })
|
|
4037
|
+
.add("In tabs", function () { return ({
|
|
4038
|
+
template: "\n\t\t\t<ibm-tabs>\n\t\t\t\t<ibm-tab heading=\"one\">\n\t\t\t\t\tTab Content 1\n\t\t\t\t\t<p>With initial value</p>\n\t\t\t\t\t<ibm-date-picker\n\t\t\t\t\t\t[label]=\"label\"\n\t\t\t\t\t\t[placeholder]=\"placeholder\"\n\t\t\t\t\t\t[theme]=\"theme\"\n\t\t\t\t\t\t[value]=\"value\"\n\t\t\t\t\t\t[disabled]=\"disabled\"\n\t\t\t\t\t\t[invalid]=\"invalid\"\n\t\t\t\t\t\t[invalidText]=\"invalidText\"\n\t\t\t\t\t\t[dateFormat]=\"dateFormat\"\n\t\t\t\t\t\t(valueChange)=\"valueChange($event)\">\n\t\t\t\t\t</ibm-date-picker>\n\t\t\t\t\t<p style=\"margin-top: 20px;\">Without initial value</p>\n\t\t\t\t\t<ibm-date-picker\n\t\t\t\t\t\t[label]=\"label\"\n\t\t\t\t\t\t[placeholder]=\"placeholder\"\n\t\t\t\t\t\t[theme]=\"theme\"\n\t\t\t\t\t\t[disabled]=\"disabled\"\n\t\t\t\t\t\t[invalid]=\"invalid\"\n\t\t\t\t\t\t[invalidText]=\"invalidText\"\n\t\t\t\t\t\t[dateFormat]=\"dateFormat\"\n\t\t\t\t\t\t(valueChange)=\"valueChange($event)\">\n\t\t\t\t\t</ibm-date-picker>\n\t\t\t\t</ibm-tab>\n\t\t\t\t<ibm-tab heading=\"two\">\n\t\t\t\t\t<p>With initial value</p>\n\t\t\t\t\t<ibm-date-picker\n\t\t\t\t\t\t[label]=\"label\"\n\t\t\t\t\t\t[placeholder]=\"placeholder\"\n\t\t\t\t\t\t[theme]=\"theme\"\n\t\t\t\t\t\t[value]=\"value\"\n\t\t\t\t\t\t[disabled]=\"disabled\"\n\t\t\t\t\t\t[invalid]=\"invalid\"\n\t\t\t\t\t\t[invalidText]=\"invalidText\"\n\t\t\t\t\t\t[dateFormat]=\"dateFormat\"\n\t\t\t\t\t\t(valueChange)=\"valueChange($event)\">\n\t\t\t\t\t</ibm-date-picker>\n\t\t\t\t\t<p style=\"margin-top: 20px;\">Without initial value</p>\n\t\t\t\t\t<ibm-date-picker\n\t\t\t\t\t\t[label]=\"label\"\n\t\t\t\t\t\t[placeholder]=\"placeholder\"\n\t\t\t\t\t\t[theme]=\"theme\"\n\t\t\t\t\t\t[disabled]=\"disabled\"\n\t\t\t\t\t\t[invalid]=\"invalid\"\n\t\t\t\t\t\t[invalidText]=\"invalidText\"\n\t\t\t\t\t\t[dateFormat]=\"dateFormat\"\n\t\t\t\t\t\t(valueChange)=\"valueChange($event)\">\n\t\t\t\t\t</ibm-date-picker>\n\t\t\t\t</ibm-tab>\n\t\t\t\t<ibm-tab heading=\"three\">Tab Content 3</ibm-tab>\n\t\t\t</ibm-tabs>\n\t\t",
|
|
4039
|
+
props: {
|
|
4040
|
+
valueChange: Object(_storybook_addon_actions__WEBPACK_IMPORTED_MODULE_1__["action"])("Date change fired!"),
|
|
4041
|
+
theme: Object(_storybook_addon_knobs_angular__WEBPACK_IMPORTED_MODULE_2__["select"])("Theme", ["dark", "light"], "dark"),
|
|
4042
|
+
label: Object(_storybook_addon_knobs_angular__WEBPACK_IMPORTED_MODULE_2__["text"])("Label text", "Date Picker Label"),
|
|
4043
|
+
placeholder: Object(_storybook_addon_knobs_angular__WEBPACK_IMPORTED_MODULE_2__["text"])("Placeholder text", "mm/dd/yyyy"),
|
|
4044
|
+
invalidText: Object(_storybook_addon_knobs_angular__WEBPACK_IMPORTED_MODULE_2__["text"])("Form validation content", "Invalid date format"),
|
|
4045
|
+
invalid: Object(_storybook_addon_knobs_angular__WEBPACK_IMPORTED_MODULE_2__["boolean"])("Show form validation", false),
|
|
4046
|
+
disabled: Object(_storybook_addon_knobs_angular__WEBPACK_IMPORTED_MODULE_2__["boolean"])("Disabled", false),
|
|
4047
|
+
dateFormat: Object(_storybook_addon_knobs_angular__WEBPACK_IMPORTED_MODULE_2__["text"])("Date format", "m/d/Y"),
|
|
4048
|
+
value: Object(_storybook_addon_knobs_angular__WEBPACK_IMPORTED_MODULE_2__["array"])("Value", ["10/19/2019"])
|
|
4049
|
+
}
|
|
4017
4050
|
}); })
|
|
4018
4051
|
.add("Skeleton", function () { return ({
|
|
4019
4052
|
template: "\n\t\t<ibm-date-picker\n\t\t\trange=\"true\"\n\t\t\tskeleton=\"true\">\n\t\t</ibm-date-picker>\n\t\t"
|
|
@@ -4132,6 +4165,7 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
4132
4165
|
/* harmony import */ var _common_tab_service__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./../common/tab.service */ "./src/common/tab.service.ts");
|
|
4133
4166
|
/* harmony import */ var _dialog_config_interface__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./dialog-config.interface */ "./src/dialog/dialog-config.interface.ts");
|
|
4134
4167
|
/* harmony import */ var _dialog_config_interface__WEBPACK_IMPORTED_MODULE_5___default = /*#__PURE__*/__webpack_require__.n(_dialog_config_interface__WEBPACK_IMPORTED_MODULE_5__);
|
|
4168
|
+
/* harmony import */ var _utils_scroll__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./../utils/scroll */ "./src/utils/scroll.ts");
|
|
4135
4169
|
var __decorate = (undefined && undefined.__decorate) || function (decorators, target, key, desc) {
|
|
4136
4170
|
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
4137
4171
|
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
@@ -4148,6 +4182,7 @@ var __metadata = (undefined && undefined.__metadata) || function (k, v) {
|
|
|
4148
4182
|
|
|
4149
4183
|
|
|
4150
4184
|
|
|
4185
|
+
|
|
4151
4186
|
/**
|
|
4152
4187
|
* Implements a `Dialog` that can be positioned anywhere on the page.
|
|
4153
4188
|
* Used to implement a popover or tooltip.
|
|
@@ -4218,7 +4253,7 @@ var Dialog = /** @class */ (function () {
|
|
|
4218
4253
|
Dialog.prototype.ngAfterViewInit = function () {
|
|
4219
4254
|
var _this = this;
|
|
4220
4255
|
var dialogElement = this.dialog.nativeElement;
|
|
4221
|
-
// split the wrapper class list and apply separately to avoid IE
|
|
4256
|
+
// split the wrapper class list and apply separately to avoid IE
|
|
4222
4257
|
// 1. throwing an error due to assigning a readonly property (classList)
|
|
4223
4258
|
// 2. throwing a SyntaxError due to passing an empty string to `add`
|
|
4224
4259
|
if (this.dialogConfig.wrapperClass) {
|
|
@@ -4231,41 +4266,16 @@ var Dialog = /** @class */ (function () {
|
|
|
4231
4266
|
if (Object(_common_tab_service__WEBPACK_IMPORTED_MODULE_4__["getFocusElementList"])(this.dialog.nativeElement).length > 0) {
|
|
4232
4267
|
dialogElement.focus();
|
|
4233
4268
|
}
|
|
4234
|
-
var
|
|
4235
|
-
var node = parentEl;
|
|
4236
|
-
var observables = [];
|
|
4237
|
-
// if the element has an overflow set as part of
|
|
4238
|
-
// its computed style it can scroll
|
|
4239
|
-
var isScrollableElement = function (element) {
|
|
4240
|
-
var computedStyle = getComputedStyle(element);
|
|
4241
|
-
return (computedStyle.overflow === "auto" ||
|
|
4242
|
-
computedStyle.overflow === "scroll" ||
|
|
4243
|
-
computedStyle["overflow-y"] === "auto" ||
|
|
4244
|
-
computedStyle["overflow-y"] === "scroll" ||
|
|
4245
|
-
computedStyle["overflow-x"] === "auto" ||
|
|
4246
|
-
computedStyle["overflow-x"] === "scroll");
|
|
4247
|
-
};
|
|
4248
|
-
var isVisibleInContainer = function (element, container) {
|
|
4249
|
-
var elementRect = element.getBoundingClientRect();
|
|
4250
|
-
var containerRect = container.getBoundingClientRect();
|
|
4251
|
-
return elementRect.bottom <= containerRect.bottom && elementRect.top >= containerRect.top;
|
|
4252
|
-
};
|
|
4269
|
+
var parentElement = this.dialogConfig.parentRef.nativeElement;
|
|
4253
4270
|
var placeDialogInContainer = function () {
|
|
4254
4271
|
// only do the work to find the scroll containers if we're appended to body
|
|
4255
4272
|
// or skip this work if we're inline
|
|
4256
4273
|
if (!_this.dialogConfig.appendInline) {
|
|
4257
|
-
// walk the parents and subscribe to all the scroll events we can
|
|
4258
|
-
while (node.parentElement && node !== document.body) {
|
|
4259
|
-
if (isScrollableElement(node)) {
|
|
4260
|
-
observables.push(Object(rxjs__WEBPACK_IMPORTED_MODULE_1__["fromEvent"])(node, "scroll"));
|
|
4261
|
-
}
|
|
4262
|
-
node = node.parentElement;
|
|
4263
|
-
}
|
|
4264
4274
|
// subscribe to the observable, and update the position and visibility
|
|
4265
|
-
var scrollObservable =
|
|
4275
|
+
var scrollObservable = Object(_utils_scroll__WEBPACK_IMPORTED_MODULE_6__["scrollableParentsObservable"])(parentElement);
|
|
4266
4276
|
_this.scrollSubscription = scrollObservable.subscribe(function (event) {
|
|
4267
4277
|
_this.placeDialog();
|
|
4268
|
-
if (!isVisibleInContainer(_this.dialogConfig.parentRef.nativeElement, event.target)) {
|
|
4278
|
+
if (!Object(_utils_scroll__WEBPACK_IMPORTED_MODULE_6__["isVisibleInContainer"])(_this.dialogConfig.parentRef.nativeElement, event.target)) {
|
|
4269
4279
|
_this.doClose();
|
|
4270
4280
|
}
|
|
4271
4281
|
});
|
|
@@ -5160,7 +5170,7 @@ var OverflowMenuOption = /** @class */ (function () {
|
|
|
5160
5170
|
OverflowMenuOption = __decorate([
|
|
5161
5171
|
Object(_angular_core__WEBPACK_IMPORTED_MODULE_0__["Component"])({
|
|
5162
5172
|
selector: "ibm-overflow-menu-option",
|
|
5163
|
-
template: "\n\t\t<button\n\t\t\t*ngIf=\"!href\"\n\t\t\tclass=\"bx--overflow-menu-options__btn\"\n\t\t\trole=\"menuitem\"\n\t\t\t[tabindex]=\"tabIndex\"\n\t\t\t(focus)=\"onFocus()\"\n\t\t\t(blur)=\"onBlur()\"\n\t\t\t(click)=\"onClick(
|
|
5173
|
+
template: "\n\t\t<button\n\t\t\t*ngIf=\"!href\"\n\t\t\tclass=\"bx--overflow-menu-options__btn\"\n\t\t\trole=\"menuitem\"\n\t\t\t[tabindex]=\"tabIndex\"\n\t\t\t(focus)=\"onFocus()\"\n\t\t\t(blur)=\"onBlur()\"\n\t\t\t(click)=\"onClick()\"\n\t\t\t[disabled]=\"disabled\"\n\t\t\t[attr.title]=\"title\">\n\t\t\t<ng-container *ngTemplateOutlet=\"tempOutlet\"></ng-container>\n\t\t</button>\n\n\t\t<a\n\t\t\t*ngIf=\"href\"\n\t\t\tclass=\"bx--overflow-menu-options__btn\"\n\t\t\trole=\"menuitem\"\n\t\t\t[tabindex]=\"tabIndex\"\n\t\t\t(focus)=\"onFocus()\"\n\t\t\t(blur)=\"onBlur()\"\n\t\t\t(click)=\"onClick()\"\n\t\t\t[attr.disabled]=\"disabled\"\n\t\t\t[href]=\"href\"\n\t\t\t[attr.title]=\"title\">\n\t\t\t<ng-container *ngTemplateOutlet=\"tempOutlet\"></ng-container>\n\t\t</a>\n\n\t\t<ng-template #tempOutlet>\n\t\t\t<div class=\"bx--overflow-menu-options__option-content\">\n\t\t\t\t<ng-content></ng-content>\n\t\t\t</div>\n\t\t</ng-template>\n\t"
|
|
5164
5174
|
}),
|
|
5165
5175
|
__metadata("design:paramtypes", [typeof (_d = typeof _angular_core__WEBPACK_IMPORTED_MODULE_0__["ElementRef"] !== "undefined" && _angular_core__WEBPACK_IMPORTED_MODULE_0__["ElementRef"]) === "function" && _d || Object])
|
|
5166
5176
|
], OverflowMenuOption);
|
|
@@ -6444,6 +6454,7 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
6444
6454
|
/* harmony import */ var _abstract_dropdown_view_class__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./abstract-dropdown-view.class */ "./src/dropdown/abstract-dropdown-view.class.ts");
|
|
6445
6455
|
/* harmony import */ var _i18n_i18n_module__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./../i18n/i18n.module */ "./src/i18n/i18n.module.ts");
|
|
6446
6456
|
/* harmony import */ var _dropdown_service__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./dropdown.service */ "./src/dropdown/dropdown.service.ts");
|
|
6457
|
+
/* harmony import */ var _utils_scroll__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./../utils/scroll */ "./src/utils/scroll.ts");
|
|
6447
6458
|
var __decorate = (undefined && undefined.__decorate) || function (decorators, target, key, desc) {
|
|
6448
6459
|
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
6449
6460
|
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
@@ -6460,6 +6471,7 @@ var __metadata = (undefined && undefined.__metadata) || function (k, v) {
|
|
|
6460
6471
|
|
|
6461
6472
|
|
|
6462
6473
|
|
|
6474
|
+
|
|
6463
6475
|
/**
|
|
6464
6476
|
* Drop-down lists enable users to select one or more items from a list.
|
|
6465
6477
|
*
|
|
@@ -6936,20 +6948,21 @@ var Dropdown = /** @class */ (function () {
|
|
|
6936
6948
|
*/
|
|
6937
6949
|
Dropdown.prototype.addScrollEventListener = function () {
|
|
6938
6950
|
var _this = this;
|
|
6951
|
+
var scrollObservable = Object(_utils_scroll__WEBPACK_IMPORTED_MODULE_6__["scrollableParentsObservable"])(this.elementRef.nativeElement);
|
|
6939
6952
|
if (this.scrollableContainer) {
|
|
6940
|
-
var
|
|
6941
|
-
if (
|
|
6942
|
-
|
|
6943
|
-
.subscribe(function () {
|
|
6944
|
-
if (_this.isVisibleInContainer(_this.elementRef.nativeElement, container_1)) {
|
|
6945
|
-
_this.dropdownService.updatePosition(_this.dropdownButton.nativeElement);
|
|
6946
|
-
}
|
|
6947
|
-
else {
|
|
6948
|
-
_this.closeMenu();
|
|
6949
|
-
}
|
|
6950
|
-
});
|
|
6953
|
+
var container = document.querySelector(this.scrollableContainer);
|
|
6954
|
+
if (container) {
|
|
6955
|
+
scrollObservable = Object(rxjs__WEBPACK_IMPORTED_MODULE_2__["merge"])(scrollObservable, Object(rxjs__WEBPACK_IMPORTED_MODULE_2__["fromEvent"])(container, "scroll"));
|
|
6951
6956
|
}
|
|
6952
6957
|
}
|
|
6958
|
+
this.scroll = scrollObservable.subscribe(function (event) {
|
|
6959
|
+
if (Object(_utils_scroll__WEBPACK_IMPORTED_MODULE_6__["isVisibleInContainer"])(_this.elementRef.nativeElement, event.target)) {
|
|
6960
|
+
_this.dropdownService.updatePosition(_this.dropdownButton.nativeElement);
|
|
6961
|
+
}
|
|
6962
|
+
else {
|
|
6963
|
+
_this.closeMenu();
|
|
6964
|
+
}
|
|
6965
|
+
});
|
|
6953
6966
|
};
|
|
6954
6967
|
/**
|
|
6955
6968
|
* Removes any `EventListeners` responsible for scroll functionality.
|
|
@@ -6970,19 +6983,6 @@ var Dropdown = /** @class */ (function () {
|
|
|
6970
6983
|
this.closeMenu();
|
|
6971
6984
|
}
|
|
6972
6985
|
};
|
|
6973
|
-
/**
|
|
6974
|
-
* Returns `true` if the `elem` is visible within the `container`.
|
|
6975
|
-
*/
|
|
6976
|
-
Dropdown.prototype.isVisibleInContainer = function (elem, container) {
|
|
6977
|
-
var containerTop = container.scrollTop;
|
|
6978
|
-
var containerBottom = containerTop + container.offsetHeight;
|
|
6979
|
-
var elemTop = elem.offsetTop + elem.offsetHeight;
|
|
6980
|
-
var elemBottom = elemTop;
|
|
6981
|
-
if ((elemBottom <= containerBottom) && (elemTop >= containerTop)) {
|
|
6982
|
-
return true;
|
|
6983
|
-
}
|
|
6984
|
-
return false;
|
|
6985
|
-
};
|
|
6986
6986
|
Dropdown.prototype.isTemplate = function (value) {
|
|
6987
6987
|
return value instanceof _angular_core__WEBPACK_IMPORTED_MODULE_0__["TemplateRef"];
|
|
6988
6988
|
};
|
|
@@ -21556,6 +21556,7 @@ Object(_storybook_angular__WEBPACK_IMPORTED_MODULE_0__["storiesOf"])("Tag", modu
|
|
|
21556
21556
|
__webpack_require__.r(__webpack_exports__);
|
|
21557
21557
|
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ClickableTile", function() { return ClickableTile; });
|
|
21558
21558
|
/* harmony import */ var _angular_core__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @angular/core */ "./node_modules/@angular/core/fesm5/core.js");
|
|
21559
|
+
/* harmony import */ var _angular_router__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @angular/router */ "./node_modules/@angular/router/fesm5/router.js");
|
|
21559
21560
|
var __decorate = (undefined && undefined.__decorate) || function (decorators, target, key, desc) {
|
|
21560
21561
|
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
21561
21562
|
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
@@ -21565,6 +21566,10 @@ var __decorate = (undefined && undefined.__decorate) || function (decorators, ta
|
|
|
21565
21566
|
var __metadata = (undefined && undefined.__metadata) || function (k, v) {
|
|
21566
21567
|
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
21567
21568
|
};
|
|
21569
|
+
var __param = (undefined && undefined.__param) || function (paramIndex, decorator) {
|
|
21570
|
+
return function (target, key) { decorator(target, key, paramIndex); }
|
|
21571
|
+
};
|
|
21572
|
+
|
|
21568
21573
|
|
|
21569
21574
|
/**
|
|
21570
21575
|
* Build application's clickable tiles using this component.
|
|
@@ -21576,32 +21581,34 @@ var __metadata = (undefined && undefined.__metadata) || function (k, v) {
|
|
|
21576
21581
|
* tile content
|
|
21577
21582
|
* </ibm-clickable-tile>
|
|
21578
21583
|
* ```
|
|
21579
|
-
*
|
|
21580
|
-
* @export
|
|
21581
|
-
* @class ClickableTile
|
|
21582
|
-
* @implements {OnInit}
|
|
21583
21584
|
*/
|
|
21584
21585
|
var ClickableTile = /** @class */ (function () {
|
|
21585
|
-
function ClickableTile() {
|
|
21586
|
+
function ClickableTile(router) {
|
|
21587
|
+
this.router = router;
|
|
21588
|
+
/**
|
|
21589
|
+
* Sets the `href` attribute on the `ibm-clickable-tile` element.
|
|
21590
|
+
*/
|
|
21591
|
+
this.href = "#";
|
|
21586
21592
|
/**
|
|
21587
21593
|
* Set to `true` to disable the clickable tile.
|
|
21588
|
-
* @type {boolean}
|
|
21589
|
-
* @memberof ClickableTile
|
|
21590
21594
|
*/
|
|
21591
21595
|
this.disabled = false;
|
|
21592
|
-
|
|
21596
|
+
/**
|
|
21597
|
+
* Emits the navigation status promise when the link is activated
|
|
21598
|
+
*/
|
|
21599
|
+
this.navigation = new _angular_core__WEBPACK_IMPORTED_MODULE_0__["EventEmitter"]();
|
|
21593
21600
|
}
|
|
21594
|
-
ClickableTile.prototype.
|
|
21595
|
-
this.
|
|
21596
|
-
|
|
21597
|
-
|
|
21598
|
-
|
|
21599
|
-
this.clicked = !this.clicked;
|
|
21601
|
+
ClickableTile.prototype.navigate = function (event) {
|
|
21602
|
+
if (this.router && this.route) {
|
|
21603
|
+
event.preventDefault();
|
|
21604
|
+
var status = this.router.navigate(this.route, this.routeExtras);
|
|
21605
|
+
this.navigation.emit(status);
|
|
21600
21606
|
}
|
|
21601
21607
|
};
|
|
21608
|
+
var _a;
|
|
21602
21609
|
__decorate([
|
|
21603
21610
|
Object(_angular_core__WEBPACK_IMPORTED_MODULE_0__["Input"])(),
|
|
21604
|
-
__metadata("design:type",
|
|
21611
|
+
__metadata("design:type", Object)
|
|
21605
21612
|
], ClickableTile.prototype, "href", void 0);
|
|
21606
21613
|
__decorate([
|
|
21607
21614
|
Object(_angular_core__WEBPACK_IMPORTED_MODULE_0__["Input"])(),
|
|
@@ -21611,11 +21618,25 @@ var ClickableTile = /** @class */ (function () {
|
|
|
21611
21618
|
Object(_angular_core__WEBPACK_IMPORTED_MODULE_0__["Input"])(),
|
|
21612
21619
|
__metadata("design:type", Object)
|
|
21613
21620
|
], ClickableTile.prototype, "disabled", void 0);
|
|
21621
|
+
__decorate([
|
|
21622
|
+
Object(_angular_core__WEBPACK_IMPORTED_MODULE_0__["Input"])(),
|
|
21623
|
+
__metadata("design:type", Array)
|
|
21624
|
+
], ClickableTile.prototype, "route", void 0);
|
|
21625
|
+
__decorate([
|
|
21626
|
+
Object(_angular_core__WEBPACK_IMPORTED_MODULE_0__["Input"])(),
|
|
21627
|
+
__metadata("design:type", Object)
|
|
21628
|
+
], ClickableTile.prototype, "routeExtras", void 0);
|
|
21629
|
+
__decorate([
|
|
21630
|
+
Object(_angular_core__WEBPACK_IMPORTED_MODULE_0__["Output"])(),
|
|
21631
|
+
__metadata("design:type", Object)
|
|
21632
|
+
], ClickableTile.prototype, "navigation", void 0);
|
|
21614
21633
|
ClickableTile = __decorate([
|
|
21615
21634
|
Object(_angular_core__WEBPACK_IMPORTED_MODULE_0__["Component"])({
|
|
21616
21635
|
selector: "ibm-clickable-tile",
|
|
21617
|
-
template: "\n\t<a\n\t\tibmLink\n\t\tclass=\"bx--tile bx--tile--clickable\"\n\t\
|
|
21618
|
-
})
|
|
21636
|
+
template: "\n\t<a\n\t\tibmLink\n\t\tclass=\"bx--tile bx--tile--clickable\"\n\t\ttabindex=\"0\"\n\t\t(click)=\"navigate($event)\"\n\t\t[href]=\"href\"\n\t\t[attr.target]=\"target\"\n\t\t[attr.aria-disabled]=\"disabled\">\n\t\t<ng-content></ng-content>\n\t</a>"
|
|
21637
|
+
}),
|
|
21638
|
+
__param(0, Object(_angular_core__WEBPACK_IMPORTED_MODULE_0__["Optional"])()),
|
|
21639
|
+
__metadata("design:paramtypes", [typeof (_a = typeof _angular_router__WEBPACK_IMPORTED_MODULE_1__["Router"] !== "undefined" && _angular_router__WEBPACK_IMPORTED_MODULE_1__["Router"]) === "function" && _a || Object])
|
|
21619
21640
|
], ClickableTile);
|
|
21620
21641
|
return ClickableTile;
|
|
21621
21642
|
}());
|
|
@@ -22137,18 +22158,69 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
22137
22158
|
/* harmony import */ var _storybook_addon_actions__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @storybook/addon-actions */ "./node_modules/@storybook/addon-actions/dist/index.js");
|
|
22138
22159
|
/* harmony import */ var _storybook_addon_actions__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_storybook_addon_actions__WEBPACK_IMPORTED_MODULE_2__);
|
|
22139
22160
|
/* harmony import */ var ___WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../ */ "./src/index.ts");
|
|
22161
|
+
/* harmony import */ var _angular_router__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! @angular/router */ "./node_modules/@angular/router/fesm5/router.js");
|
|
22162
|
+
/* harmony import */ var _angular_common__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! @angular/common */ "./node_modules/@angular/common/fesm5/common.js");
|
|
22163
|
+
/* harmony import */ var _angular_core__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! @angular/core */ "./node_modules/@angular/core/fesm5/core.js");
|
|
22164
|
+
var __decorate = (undefined && undefined.__decorate) || function (decorators, target, key, desc) {
|
|
22165
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
22166
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
22167
|
+
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
22168
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
22169
|
+
};
|
|
22140
22170
|
var withStorySource = __webpack_require__(/*! @storybook/addon-storysource */ "./node_modules/@storybook/addon-storysource/dist/index.js").withStorySource;
|
|
22141
|
-
var __STORY__ = "import { storiesOf, moduleMetadata } from '@storybook/angular';\nimport { withKnobs } from '@storybook/addon-knobs/angular';\nimport { action } from '@storybook/addon-actions';\n\nimport { TilesModule, DocumentationModule } from '../';\n\nstoriesOf('Tiles', module)\n .addDecorator(\n moduleMetadata({\n imports: [TilesModule,
|
|
22142
|
-
var __ADDS_MAP__ = { "tiles--documentation": { "startLoc": { "col": 7, "line":
|
|
22171
|
+
var __STORY__ = "import { storiesOf, moduleMetadata } from '@storybook/angular';\nimport { withKnobs } from '@storybook/addon-knobs/angular';\nimport { action } from '@storybook/addon-actions';\n\nimport { TilesModule, DocumentationModule } from '../';\nimport { RouterModule } from '@angular/router';\nimport { APP_BASE_HREF } from '@angular/common';\nimport { Component } from '@angular/core';\n\n@Component({\n selector: 'app-bar',\n template: '<h1>bar</h1>',\n})\nclass BarComponent {}\n\n@Component({\n selector: 'app-foo',\n template: '<h1>foo</h1>',\n})\nclass FooComponent {}\n\nstoriesOf('Tiles', module)\n .addDecorator(\n moduleMetadata({\n declarations: [FooComponent, BarComponent],\n imports: [\n TilesModule,\n DocumentationModule,\n RouterModule.forRoot(\n [\n {\n path: 'bar',\n component: BarComponent,\n },\n {\n path: 'foo',\n component: FooComponent,\n },\n ],\n {\n initialNavigation: false,\n useHash: true,\n }\n ),\n ],\n providers: [{ provide: APP_BASE_HREF, useValue: '/' }],\n })\n )\n .addDecorator(withKnobs)\n .add('Basic', () => ({\n template: `\n\t\t<ibm-tile>\n\t\t\ttile content goes here...\n\t\t</ibm-tile>\n\t\t`,\n }))\n .add('Multiple', () => ({\n template: `\n\t\t<div style=\"display: flex; flex-flow: row wrap; justify-content: space-around;\">\n\t\t\t<ibm-tile>\n\t\t\t\tTile 1\n\t\t\t</ibm-tile>\n\t\t\t<ibm-tile>\n\t\t\t\tTile 2\n\t\t\t</ibm-tile>\n\t\t\t<ibm-tile>\n\t\t\t\tTile 3\n\t\t\t</ibm-tile>\n\t\t</div>\n\t\t`,\n }))\n .add('Clickable', () => ({\n template: `\n\t\t<ibm-clickable-tile href=\"https://www.carbondesignsystem.com/\" target=\"_blank\">\n\t\t\tClick the tile to open the Carbon Design System\n\t\t</ibm-clickable-tile>\n\t\t`,\n }))\n .add('Routable', () => ({\n template: `\n\t\t\t<ibm-clickable-tile [route]=\"['foo']\">\n\t\t\t\tClick to trigger the <code>foo</code> route\n\t\t\t</ibm-clickable-tile>\n\t\t\t<ibm-clickable-tile [route]=\"['bar']\">\n\t\t\t\tClick to trigger the <code>bar</code> route\n\t\t\t</ibm-clickable-tile>\n\t\t\t<router-outlet></router-outlet>\n\t\t`,\n }))\n .add('Selectable', () => ({\n template: `\n\t\t\t<ibm-tile-group (selected)=\"selected($event)\">\n\t\t\t\t<ibm-selection-tile value=\"tile1\" [selected]=\"true\">Selectable Tile</ibm-selection-tile>\n\t\t\t\t<ibm-selection-tile value=\"tile2\">Selectable Tile</ibm-selection-tile>\n\t\t\t\t<ibm-selection-tile value=\"tile3\">Selectable Tile</ibm-selection-tile>\n\t\t\t</ibm-tile-group>\n\t\t`,\n props: {\n selected: action('tile selected'),\n },\n }))\n .add('Multi-select', () => ({\n template: `\n\t\t\t<ibm-tile-group (selected)=\"selected($event)\" [multiple]=\"true\">\n\t\t\t\t<ibm-selection-tile value=\"tile1\" [selected]=\"true\">Selectable Tile</ibm-selection-tile>\n\t\t\t\t<ibm-selection-tile value=\"tile2\">Selectable Tile</ibm-selection-tile>\n\t\t\t\t<ibm-selection-tile value=\"tile3\">Selectable Tile</ibm-selection-tile>\n\t\t\t</ibm-tile-group>\n\t\t`,\n props: {\n selected: action('tile selected'),\n },\n }))\n .add('Expandable', () => ({\n template: `\n\t\t<ibm-expandable-tile>\n\t\t\t<span class=\"bx--tile-content__above-the-fold\" style=\"height: 200px\">Above the fold content here</span>\n\t\t\t<span class=\"bx--tile-content__below-the-fold\" style=\"height: 400px\">Below the fold content here</span>\n\t\t</ibm-expandable-tile>\n\t\t`,\n }))\n .add('Documentation', () => ({\n template: `\n\t\t\t<ibm-documentation src=\"documentation/components/Tile.html\"></ibm-documentation>\n\t\t`,\n }));\n";
|
|
22172
|
+
var __ADDS_MAP__ = { "tiles--documentation": { "startLoc": { "col": 7, "line": 122 }, "endLoc": { "col": 4, "line": 126 } }, "tiles--expandable": { "startLoc": { "col": 7, "line": 114 }, "endLoc": { "col": 4, "line": 121 } }, "tiles--multi-select": { "startLoc": { "col": 7, "line": 102 }, "endLoc": { "col": 4, "line": 113 } }, "tiles--selectable": { "startLoc": { "col": 7, "line": 90 }, "endLoc": { "col": 4, "line": 101 } }, "tiles--routable": { "startLoc": { "col": 7, "line": 79 }, "endLoc": { "col": 4, "line": 89 } }, "tiles--clickable": { "startLoc": { "col": 7, "line": 72 }, "endLoc": { "col": 4, "line": 78 } }, "tiles--multiple": { "startLoc": { "col": 7, "line": 57 }, "endLoc": { "col": 4, "line": 71 } }, "tiles--basic": { "startLoc": { "col": 7, "line": 50 }, "endLoc": { "col": 4, "line": 56 } } };
|
|
22173
|
+
|
|
22174
|
+
|
|
22143
22175
|
|
|
22144
22176
|
|
|
22145
22177
|
|
|
22146
22178
|
|
|
22179
|
+
|
|
22180
|
+
var BarComponent = /** @class */ (function () {
|
|
22181
|
+
function BarComponent() {
|
|
22182
|
+
}
|
|
22183
|
+
BarComponent = __decorate([
|
|
22184
|
+
Object(_angular_core__WEBPACK_IMPORTED_MODULE_6__["Component"])({
|
|
22185
|
+
selector: "app-bar",
|
|
22186
|
+
template: "<h1>bar</h1>"
|
|
22187
|
+
})
|
|
22188
|
+
], BarComponent);
|
|
22189
|
+
return BarComponent;
|
|
22190
|
+
}());
|
|
22191
|
+
var FooComponent = /** @class */ (function () {
|
|
22192
|
+
function FooComponent() {
|
|
22193
|
+
}
|
|
22194
|
+
FooComponent = __decorate([
|
|
22195
|
+
Object(_angular_core__WEBPACK_IMPORTED_MODULE_6__["Component"])({
|
|
22196
|
+
selector: "app-foo",
|
|
22197
|
+
template: "<h1>foo</h1>"
|
|
22198
|
+
})
|
|
22199
|
+
], FooComponent);
|
|
22200
|
+
return FooComponent;
|
|
22201
|
+
}());
|
|
22147
22202
|
Object(_storybook_angular__WEBPACK_IMPORTED_MODULE_0__["storiesOf"])("Tiles", module).addDecorator(withStorySource(__STORY__, __ADDS_MAP__))
|
|
22148
22203
|
.addDecorator(Object(_storybook_angular__WEBPACK_IMPORTED_MODULE_0__["moduleMetadata"])({
|
|
22204
|
+
declarations: [FooComponent, BarComponent],
|
|
22149
22205
|
imports: [
|
|
22150
22206
|
___WEBPACK_IMPORTED_MODULE_3__["TilesModule"],
|
|
22151
|
-
___WEBPACK_IMPORTED_MODULE_3__["DocumentationModule"]
|
|
22207
|
+
___WEBPACK_IMPORTED_MODULE_3__["DocumentationModule"],
|
|
22208
|
+
_angular_router__WEBPACK_IMPORTED_MODULE_4__["RouterModule"].forRoot([
|
|
22209
|
+
{
|
|
22210
|
+
path: "bar",
|
|
22211
|
+
component: BarComponent
|
|
22212
|
+
},
|
|
22213
|
+
{
|
|
22214
|
+
path: "foo",
|
|
22215
|
+
component: FooComponent
|
|
22216
|
+
}
|
|
22217
|
+
], {
|
|
22218
|
+
initialNavigation: false,
|
|
22219
|
+
useHash: true
|
|
22220
|
+
})
|
|
22221
|
+
],
|
|
22222
|
+
providers: [
|
|
22223
|
+
{ provide: _angular_common__WEBPACK_IMPORTED_MODULE_5__["APP_BASE_HREF"], useValue: "/" }
|
|
22152
22224
|
]
|
|
22153
22225
|
}))
|
|
22154
22226
|
.addDecorator(_storybook_addon_knobs_angular__WEBPACK_IMPORTED_MODULE_1__["withKnobs"])
|
|
@@ -22160,6 +22232,9 @@ Object(_storybook_angular__WEBPACK_IMPORTED_MODULE_0__["storiesOf"])("Tiles", mo
|
|
|
22160
22232
|
}); })
|
|
22161
22233
|
.add("Clickable", function () { return ({
|
|
22162
22234
|
template: "\n\t\t<ibm-clickable-tile href=\"https://www.carbondesignsystem.com/\" target=\"_blank\">\n\t\t\tClick the tile to open the Carbon Design System\n\t\t</ibm-clickable-tile>\n\t\t"
|
|
22235
|
+
}); })
|
|
22236
|
+
.add("Routable", function () { return ({
|
|
22237
|
+
template: "\n\t\t\t<ibm-clickable-tile [route]=\"['foo']\">\n\t\t\t\tClick to trigger the <code>foo</code> route\n\t\t\t</ibm-clickable-tile>\n\t\t\t<ibm-clickable-tile [route]=\"['bar']\">\n\t\t\t\tClick to trigger the <code>bar</code> route\n\t\t\t</ibm-clickable-tile>\n\t\t\t<router-outlet></router-outlet>\n\t\t"
|
|
22163
22238
|
}); })
|
|
22164
22239
|
.add("Selectable", function () { return ({
|
|
22165
22240
|
template: "\n\t\t\t<ibm-tile-group (selected)=\"selected($event)\">\n\t\t\t\t<ibm-selection-tile value=\"tile1\" [selected]=\"true\">Selectable Tile</ibm-selection-tile>\n\t\t\t\t<ibm-selection-tile value=\"tile2\">Selectable Tile</ibm-selection-tile>\n\t\t\t\t<ibm-selection-tile value=\"tile3\">Selectable Tile</ibm-selection-tile>\n\t\t\t</ibm-tile-group>\n\t\t",
|
|
@@ -23130,6 +23205,7 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
23130
23205
|
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "HeaderItem", function() { return HeaderItem; });
|
|
23131
23206
|
/* harmony import */ var _angular_core__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @angular/core */ "./node_modules/@angular/core/fesm5/core.js");
|
|
23132
23207
|
/* harmony import */ var _angular_platform_browser__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @angular/platform-browser */ "./node_modules/@angular/platform-browser/fesm5/platform-browser.js");
|
|
23208
|
+
/* harmony import */ var _angular_router__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @angular/router */ "./node_modules/@angular/router/fesm5/router.js");
|
|
23133
23209
|
var __decorate = (undefined && undefined.__decorate) || function (decorators, target, key, desc) {
|
|
23134
23210
|
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
23135
23211
|
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
@@ -23139,14 +23215,23 @@ var __decorate = (undefined && undefined.__decorate) || function (decorators, ta
|
|
|
23139
23215
|
var __metadata = (undefined && undefined.__metadata) || function (k, v) {
|
|
23140
23216
|
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
23141
23217
|
};
|
|
23218
|
+
var __param = (undefined && undefined.__param) || function (paramIndex, decorator) {
|
|
23219
|
+
return function (target, key) { decorator(target, key, paramIndex); }
|
|
23220
|
+
};
|
|
23221
|
+
|
|
23142
23222
|
|
|
23143
23223
|
|
|
23144
23224
|
/**
|
|
23145
23225
|
* Individual item in the header. May be used a direct child of `HeaderNavigation` or `HeaderMenu`
|
|
23146
23226
|
*/
|
|
23147
23227
|
var HeaderItem = /** @class */ (function () {
|
|
23148
|
-
function HeaderItem(domSanitizer) {
|
|
23228
|
+
function HeaderItem(domSanitizer, router) {
|
|
23149
23229
|
this.domSanitizer = domSanitizer;
|
|
23230
|
+
this.router = router;
|
|
23231
|
+
/**
|
|
23232
|
+
* Emits the navigation status promise when the link is activated
|
|
23233
|
+
*/
|
|
23234
|
+
this.navigation = new _angular_core__WEBPACK_IMPORTED_MODULE_0__["EventEmitter"]();
|
|
23150
23235
|
this._href = "javascript:void(0)";
|
|
23151
23236
|
}
|
|
23152
23237
|
Object.defineProperty(HeaderItem.prototype, "href", {
|
|
@@ -23159,18 +23244,38 @@ var HeaderItem = /** @class */ (function () {
|
|
|
23159
23244
|
enumerable: true,
|
|
23160
23245
|
configurable: true
|
|
23161
23246
|
});
|
|
23162
|
-
|
|
23247
|
+
HeaderItem.prototype.navigate = function (event) {
|
|
23248
|
+
if (this.router && this.route) {
|
|
23249
|
+
event.preventDefault();
|
|
23250
|
+
var status = this.router.navigate(this.route, this.routeExtras);
|
|
23251
|
+
this.navigation.emit(status);
|
|
23252
|
+
}
|
|
23253
|
+
};
|
|
23254
|
+
var _a, _b;
|
|
23163
23255
|
__decorate([
|
|
23164
23256
|
Object(_angular_core__WEBPACK_IMPORTED_MODULE_0__["Input"])(),
|
|
23165
23257
|
__metadata("design:type", String),
|
|
23166
23258
|
__metadata("design:paramtypes", [String])
|
|
23167
23259
|
], HeaderItem.prototype, "href", null);
|
|
23260
|
+
__decorate([
|
|
23261
|
+
Object(_angular_core__WEBPACK_IMPORTED_MODULE_0__["Input"])(),
|
|
23262
|
+
__metadata("design:type", Array)
|
|
23263
|
+
], HeaderItem.prototype, "route", void 0);
|
|
23264
|
+
__decorate([
|
|
23265
|
+
Object(_angular_core__WEBPACK_IMPORTED_MODULE_0__["Input"])(),
|
|
23266
|
+
__metadata("design:type", Object)
|
|
23267
|
+
], HeaderItem.prototype, "routeExtras", void 0);
|
|
23268
|
+
__decorate([
|
|
23269
|
+
Object(_angular_core__WEBPACK_IMPORTED_MODULE_0__["Output"])(),
|
|
23270
|
+
__metadata("design:type", Object)
|
|
23271
|
+
], HeaderItem.prototype, "navigation", void 0);
|
|
23168
23272
|
HeaderItem = __decorate([
|
|
23169
23273
|
Object(_angular_core__WEBPACK_IMPORTED_MODULE_0__["Component"])({
|
|
23170
23274
|
selector: "ibm-header-item",
|
|
23171
|
-
template: "\n\t\t<li style=\"height: 100%\">\n\t\t\t<a
|
|
23275
|
+
template: "\n\t\t<li style=\"height: 100%\">\n\t\t\t<a\n\t\t\t\tclass=\"bx--header__menu-item\"\n\t\t\t\trole=\"menuitem\"\n\t\t\t\ttabindex=\"0\"\n\t\t\t\t[href]=\"href\"\n\t\t\t\t(click)=\"navigate($event)\">\n\t\t\t\t<ng-content></ng-content>\n\t\t\t</a>\n\t\t</li>\n\t"
|
|
23172
23276
|
}),
|
|
23173
|
-
|
|
23277
|
+
__param(1, Object(_angular_core__WEBPACK_IMPORTED_MODULE_0__["Optional"])()),
|
|
23278
|
+
__metadata("design:paramtypes", [typeof (_a = typeof _angular_platform_browser__WEBPACK_IMPORTED_MODULE_1__["DomSanitizer"] !== "undefined" && _angular_platform_browser__WEBPACK_IMPORTED_MODULE_1__["DomSanitizer"]) === "function" && _a || Object, typeof (_b = typeof _angular_router__WEBPACK_IMPORTED_MODULE_2__["Router"] !== "undefined" && _angular_router__WEBPACK_IMPORTED_MODULE_2__["Router"]) === "function" && _b || Object])
|
|
23174
23279
|
], HeaderItem);
|
|
23175
23280
|
return HeaderItem;
|
|
23176
23281
|
}());
|
|
@@ -23856,6 +23961,7 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
23856
23961
|
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "SideNavItem", function() { return SideNavItem; });
|
|
23857
23962
|
/* harmony import */ var _angular_core__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @angular/core */ "./node_modules/@angular/core/fesm5/core.js");
|
|
23858
23963
|
/* harmony import */ var _angular_platform_browser__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @angular/platform-browser */ "./node_modules/@angular/platform-browser/fesm5/platform-browser.js");
|
|
23964
|
+
/* harmony import */ var _angular_router__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @angular/router */ "./node_modules/@angular/router/fesm5/router.js");
|
|
23859
23965
|
var __decorate = (undefined && undefined.__decorate) || function (decorators, target, key, desc) {
|
|
23860
23966
|
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
23861
23967
|
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
@@ -23865,18 +23971,27 @@ var __decorate = (undefined && undefined.__decorate) || function (decorators, ta
|
|
|
23865
23971
|
var __metadata = (undefined && undefined.__metadata) || function (k, v) {
|
|
23866
23972
|
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
23867
23973
|
};
|
|
23974
|
+
var __param = (undefined && undefined.__param) || function (paramIndex, decorator) {
|
|
23975
|
+
return function (target, key) { decorator(target, key, paramIndex); }
|
|
23976
|
+
};
|
|
23977
|
+
|
|
23868
23978
|
|
|
23869
23979
|
|
|
23870
23980
|
/**
|
|
23871
23981
|
* `SideNavItem` can either be a child of `SideNav` or `SideNavMenu`
|
|
23872
23982
|
*/
|
|
23873
23983
|
var SideNavItem = /** @class */ (function () {
|
|
23874
|
-
function SideNavItem(domSanitizer) {
|
|
23984
|
+
function SideNavItem(domSanitizer, router) {
|
|
23875
23985
|
this.domSanitizer = domSanitizer;
|
|
23986
|
+
this.router = router;
|
|
23876
23987
|
/**
|
|
23877
23988
|
* Toggles the active (current page) state for the link.
|
|
23878
23989
|
*/
|
|
23879
23990
|
this.active = false;
|
|
23991
|
+
/**
|
|
23992
|
+
* Emits the navigation status promise when the link is activated
|
|
23993
|
+
*/
|
|
23994
|
+
this.navigation = new _angular_core__WEBPACK_IMPORTED_MODULE_0__["EventEmitter"]();
|
|
23880
23995
|
this.isSubMenu = false;
|
|
23881
23996
|
this._href = "javascript:void(0)";
|
|
23882
23997
|
}
|
|
@@ -23893,7 +24008,14 @@ var SideNavItem = /** @class */ (function () {
|
|
|
23893
24008
|
enumerable: true,
|
|
23894
24009
|
configurable: true
|
|
23895
24010
|
});
|
|
23896
|
-
|
|
24011
|
+
SideNavItem.prototype.navigate = function (event) {
|
|
24012
|
+
if (this.router && this.route) {
|
|
24013
|
+
event.preventDefault();
|
|
24014
|
+
var status = this.router.navigate(this.route, this.routeExtras);
|
|
24015
|
+
this.navigation.emit(status);
|
|
24016
|
+
}
|
|
24017
|
+
};
|
|
24018
|
+
var _a, _b;
|
|
23897
24019
|
__decorate([
|
|
23898
24020
|
Object(_angular_core__WEBPACK_IMPORTED_MODULE_0__["Input"])(),
|
|
23899
24021
|
__metadata("design:type", String),
|
|
@@ -23903,12 +24025,25 @@ var SideNavItem = /** @class */ (function () {
|
|
|
23903
24025
|
Object(_angular_core__WEBPACK_IMPORTED_MODULE_0__["Input"])(),
|
|
23904
24026
|
__metadata("design:type", Object)
|
|
23905
24027
|
], SideNavItem.prototype, "active", void 0);
|
|
24028
|
+
__decorate([
|
|
24029
|
+
Object(_angular_core__WEBPACK_IMPORTED_MODULE_0__["Input"])(),
|
|
24030
|
+
__metadata("design:type", Array)
|
|
24031
|
+
], SideNavItem.prototype, "route", void 0);
|
|
24032
|
+
__decorate([
|
|
24033
|
+
Object(_angular_core__WEBPACK_IMPORTED_MODULE_0__["Input"])(),
|
|
24034
|
+
__metadata("design:type", Object)
|
|
24035
|
+
], SideNavItem.prototype, "routeExtras", void 0);
|
|
24036
|
+
__decorate([
|
|
24037
|
+
Object(_angular_core__WEBPACK_IMPORTED_MODULE_0__["Output"])(),
|
|
24038
|
+
__metadata("design:type", Object)
|
|
24039
|
+
], SideNavItem.prototype, "navigation", void 0);
|
|
23906
24040
|
SideNavItem = __decorate([
|
|
23907
24041
|
Object(_angular_core__WEBPACK_IMPORTED_MODULE_0__["Component"])({
|
|
23908
24042
|
selector: "ibm-sidenav-item",
|
|
23909
|
-
template: "\n\t\t<li [ngClass]=\"{\n\t\t\t'bx--side-nav__item': !isSubMenu,\n\t\t\t'bx--side-nav__menu-item': isSubMenu\n\t\t}\"\n\t\t[attr.role]=\"(isSubMenu ? 'none' : null)\">\n\t\t\t<a\n\t\t\t\tclass=\"bx--side-nav__link\"\n\t\t\t\t[href]=\"href\"\n\t\t\t\t[attr.role]=\"(isSubMenu ? 'menuitem' : null)\"\n\t\t\t\t[attr.aria-current]=\"(active ? 'page' : null)\">\n\t\t\t\t<div *ngIf=\"!isSubMenu\" class=\"bx--side-nav__icon\">\n\t\t\t\t\t<ng-content select=\"[icon]\"></ng-content>\n\t\t\t\t</div>\n\t\t\t\t<span class=\"bx--side-nav__link-text\">\n\t\t\t\t\t<ng-content></ng-content>\n\t\t\t\t</span>\n\t\t\t</a>\n\t\t</li>\n\t"
|
|
24043
|
+
template: "\n\t\t<li [ngClass]=\"{\n\t\t\t'bx--side-nav__item': !isSubMenu,\n\t\t\t'bx--side-nav__menu-item': isSubMenu\n\t\t}\"\n\t\t[attr.role]=\"(isSubMenu ? 'none' : null)\">\n\t\t\t<a\n\t\t\t\tclass=\"bx--side-nav__link\"\n\t\t\t\t[href]=\"href\"\n\t\t\t\t[attr.role]=\"(isSubMenu ? 'menuitem' : null)\"\n\t\t\t\t[attr.aria-current]=\"(active ? 'page' : null)\"\n\t\t\t\t(click)=\"navigate($event)\">\n\t\t\t\t<div *ngIf=\"!isSubMenu\" class=\"bx--side-nav__icon\">\n\t\t\t\t\t<ng-content select=\"[icon]\"></ng-content>\n\t\t\t\t</div>\n\t\t\t\t<span class=\"bx--side-nav__link-text\">\n\t\t\t\t\t<ng-content></ng-content>\n\t\t\t\t</span>\n\t\t\t</a>\n\t\t</li>\n\t"
|
|
23910
24044
|
}),
|
|
23911
|
-
|
|
24045
|
+
__param(1, Object(_angular_core__WEBPACK_IMPORTED_MODULE_0__["Optional"])()),
|
|
24046
|
+
__metadata("design:paramtypes", [typeof (_a = typeof _angular_platform_browser__WEBPACK_IMPORTED_MODULE_1__["DomSanitizer"] !== "undefined" && _angular_platform_browser__WEBPACK_IMPORTED_MODULE_1__["DomSanitizer"]) === "function" && _a || Object, typeof (_b = typeof _angular_router__WEBPACK_IMPORTED_MODULE_2__["Router"] !== "undefined" && _angular_router__WEBPACK_IMPORTED_MODULE_2__["Router"]) === "function" && _b || Object])
|
|
23912
24047
|
], SideNavItem);
|
|
23913
24048
|
return SideNavItem;
|
|
23914
24049
|
}());
|
|
@@ -24257,9 +24392,18 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
24257
24392
|
/* harmony import */ var _search_search_module__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./../search/search.module */ "./src/search/search.module.ts");
|
|
24258
24393
|
/* harmony import */ var _dialog_dialog_module__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./../dialog/dialog.module */ "./src/dialog/dialog.module.ts");
|
|
24259
24394
|
/* harmony import */ var _documentation_component_documentation_module__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./../documentation-component/documentation.module */ "./src/documentation-component/documentation.module.ts");
|
|
24395
|
+
/* harmony import */ var _angular_core__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! @angular/core */ "./node_modules/@angular/core/fesm5/core.js");
|
|
24396
|
+
/* harmony import */ var _angular_router__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! @angular/router */ "./node_modules/@angular/router/fesm5/router.js");
|
|
24397
|
+
var __decorate = (undefined && undefined.__decorate) || function (decorators, target, key, desc) {
|
|
24398
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
24399
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
24400
|
+
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
24401
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
24402
|
+
};
|
|
24260
24403
|
var withStorySource = __webpack_require__(/*! @storybook/addon-storysource */ "./node_modules/@storybook/addon-storysource/dist/index.js").withStorySource;
|
|
24261
|
-
var __STORY__ = "import { action } from '@storybook/addon-actions';\nimport { storiesOf, moduleMetadata } from '@storybook/angular';\nimport { withKnobs, boolean } from '@storybook/addon-knobs/angular';\n\nimport { UIShellModule } from './ui-shell.module';\nimport { SearchModule } from './../search/search.module';\nimport { DialogModule } from './../dialog/dialog.module';\nimport { DocumentationModule } from './../documentation-component/documentation.module';\n\nstoriesOf('UI Shell', module)\n .addDecorator(\n moduleMetadata({\n imports: [UIShellModule, SearchModule, DialogModule, DocumentationModule],\n })\n )\n .addDecorator(withKnobs)\n .add('Header', () => ({\n template: `\n\t\t\t<ibm-header name=\"[Platform]\">\n\t\t\t\t<ibm-hamburger *ngIf=\"hasHamburger\" (click)=\"expanded($event)\"></ibm-hamburger>\n\t\t\t\t<ibm-header-navigation>\n\t\t\t\t\t<ibm-header-item>Catalog</ibm-header-item>\n\t\t\t\t\t<ibm-header-item>Docs</ibm-header-item>\n\t\t\t\t\t<ibm-header-item>Support</ibm-header-item>\n\t\t\t\t\t<ibm-header-menu title=\"Manage\">\n\t\t\t\t\t\t<ibm-header-item>Link 1</ibm-header-item>\n\t\t\t\t\t\t<ibm-header-item>Link 2</ibm-header-item>\n\t\t\t\t\t\t<ibm-header-item>Link 3</ibm-header-item>\n\t\t\t\t\t</ibm-header-menu>\n\t\t\t\t</ibm-header-navigation>\n\t\t\t\t<ibm-header-global>\n\t\t\t\t\t<ibm-header-action title=\"action\">\n\t\t\t\t\t\t<svg width=\"20\" height=\"20\" xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 32 32\" aria-hidden=\"true\">\n\t\t\t\t\t\t\t<path\n\t\t\t\t\t\t\t\td=\"M8.24 25.14L7 26.67a14 14 0 0 0 4.18 2.44l.68-1.88a12\n\t\t\t\t\t\t\t\t12 0 0 1-3.62-2.09zm-4.05-7.07l-2 .35A13.89 13.89 0 0 0 3.86\n\t\t\t\t\t\t\t\t23l1.73-1a11.9 11.9 0 0 1-1.4-3.93zm7.63-13.31l-.68-1.88A14\n\t\t\t\t\t\t\t\t14 0 0 0 7 5.33l1.24 1.53a12 12 0 0 1 3.58-2.1zM5.59\n\t\t\t\t\t\t\t\t10L3.86 9a13.89 13.89 0 0 0-1.64 4.54l2 .35A11.9 11.9 0 0 1 5.59\n\t\t\t\t\t\t\t\t10zM16 2v2a12 12 0 0 1 0 24v2a14 14 0 0 0 0-28z\" />\n\t\t\t\t\t\t</svg>\n\t\t\t\t\t</ibm-header-action>\n\t\t\t\t\t<ibm-header-action title=\"action\">\n\t\t\t\t\t\t<svg width=\"20\" height=\"20\" xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 32 32\" aria-hidden=\"true\">\n\t\t\t\t\t\t\t<path\n\t\t\t\t\t\t\t\td=\"M8.24 25.14L7 26.67a14 14 0 0 0 4.18 2.44l.68-1.88a12\n\t\t\t\t\t\t\t\t12 0 0 1-3.62-2.09zm-4.05-7.07l-2 .35A13.89 13.89 0 0 0 3.86\n\t\t\t\t\t\t\t\t23l1.73-1a11.9 11.9 0 0 1-1.4-3.93zm7.63-13.31l-.68-1.88A14\n\t\t\t\t\t\t\t\t14 0 0 0 7 5.33l1.24 1.53a12 12 0 0 1 3.58-2.1zM5.59\n\t\t\t\t\t\t\t\t10L3.86 9a13.89 13.89 0 0 0-1.64 4.54l2 .35A11.9 11.9 0 0 1 5.59\n\t\t\t\t\t\t\t\t10zM16 2v2a12 12 0 0 1 0 24v2a14 14 0 0 0 0-28z\" />\n\t\t\t\t\t\t</svg>\n\t\t\t\t\t</ibm-header-action>\n\t\t\t\t</ibm-header-global>\n\t\t\t</ibm-header>\n\t\t`,\n props: {\n hasHamburger: boolean('Show Hamburger', true),\n expanded: action('Menu clicked'),\n },\n }))\n .add('Side Navigation', () => ({\n template: `\n\t\t\t<ibm-sidenav>\n\t\t\t\t<ibm-sidenav-item>\n\t\t\t\t\t<svg icon width=\"20\" height=\"20\" xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 32 32\" aria-hidden=\"true\">\n\t\t\t\t\t\t<path\n\t\t\t\t\t\t\td=\"M8.24 25.14L7 26.67a14 14 0 0 0 4.18 2.44l.68-1.88a12\n\t\t\t\t\t\t\t12 0 0 1-3.62-2.09zm-4.05-7.07l-2 .35A13.89 13.89 0 0 0 3.86\n\t\t\t\t\t\t\t23l1.73-1a11.9 11.9 0 0 1-1.4-3.93zm7.63-13.31l-.68-1.88A14\n\t\t\t\t\t\t\t14 0 0 0 7 5.33l1.24 1.53a12 12 0 0 1 3.58-2.1zM5.59\n\t\t\t\t\t\t\t10L3.86 9a13.89 13.89 0 0 0-1.64 4.54l2 .35A11.9 11.9 0 0 1 5.59\n\t\t\t\t\t\t\t10zM16 2v2a12 12 0 0 1 0 24v2a14 14 0 0 0 0-28z\" />\n\t\t\t\t\t</svg>\n\t\t\t\t\tLink\n\t\t\t\t</ibm-sidenav-item>\n\t\t\t\t<ibm-sidenav-item>\n\t\t\t\t\t<svg icon width=\"20\" height=\"20\" xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 32 32\" aria-hidden=\"true\">\n\t\t\t\t\t\t<path\n\t\t\t\t\t\t\td=\"M8.24 25.14L7 26.67a14 14 0 0 0 4.18 2.44l.68-1.88a12\n\t\t\t\t\t\t\t12 0 0 1-3.62-2.09zm-4.05-7.07l-2 .35A13.89 13.89 0 0 0 3.86\n\t\t\t\t\t\t\t23l1.73-1a11.9 11.9 0 0 1-1.4-3.93zm7.63-13.31l-.68-1.88A14\n\t\t\t\t\t\t\t14 0 0 0 7 5.33l1.24 1.53a12 12 0 0 1 3.58-2.1zM5.59\n\t\t\t\t\t\t\t10L3.86 9a13.89 13.89 0 0 0-1.64 4.54l2 .35A11.9 11.9 0 0 1 5.59\n\t\t\t\t\t\t\t10zM16 2v2a12 12 0 0 1 0 24v2a14 14 0 0 0 0-28z\" />\n\t\t\t\t\t</svg>\n\t\t\t\t\tLink\n\t\t\t\t</ibm-sidenav-item>\n\t\t\t\t<ibm-sidenav-menu title=\"Category title\">\n\t\t\t\t\t<svg icon width=\"20\" height=\"20\" xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 32 32\" aria-hidden=\"true\">\n\t\t\t\t\t\t<path\n\t\t\t\t\t\t\td=\"M8.24 25.14L7 26.67a14 14 0 0 0 4.18 2.44l.68-1.88a12\n\t\t\t\t\t\t\t12 0 0 1-3.62-2.09zm-4.05-7.07l-2 .35A13.89 13.89 0 0 0 3.86\n\t\t\t\t\t\t\t23l1.73-1a11.9 11.9 0 0 1-1.4-3.93zm7.63-13.31l-.68-1.88A14\n\t\t\t\t\t\t\t14 0 0 0 7 5.33l1.24 1.53a12 12 0 0 1 3.58-2.1zM5.59\n\t\t\t\t\t\t\t10L3.86 9a13.89 13.89 0 0 0-1.64 4.54l2 .35A11.9 11.9 0 0 1 5.59\n\t\t\t\t\t\t\t10zM16 2v2a12 12 0 0 1 0 24v2a14 14 0 0 0 0-28z\" />\n\t\t\t\t\t</svg>\n\t\t\t\t\t<ibm-sidenav-item>Link</ibm-sidenav-item>\n\t\t\t\t\t<ibm-sidenav-item>Link</ibm-sidenav-item>\n\t\t\t\t\t<ibm-sidenav-item>Link</ibm-sidenav-item>\n\t\t\t\t</ibm-sidenav-menu>\n\t\t\t</ibm-sidenav>\n\t\t`,\n props: {\n options: [\n {\n content: 'Option 1',\n value: 1,\n },\n {\n content: 'Option 2',\n value: 2,\n },\n {\n content: 'Option 3',\n value: 3,\n },\n ],\n },\n }))\n .add('Together', () => ({\n template: `\n\t\t\t<ibm-header name=\"[Platform]\">\n\t\t\t\t<ibm-hamburger *ngIf=\"hasHamburger\" [active]=\"active\" (selected)=\"selected()\"></ibm-hamburger>\n\t\t\t\t<ibm-header-navigation>\n\t\t\t\t\t<ibm-header-item>Catalog</ibm-header-item>\n\t\t\t\t\t<ibm-header-item>Docs</ibm-header-item>\n\t\t\t\t\t<ibm-header-item>Support</ibm-header-item>\n\t\t\t\t\t<ibm-header-menu title=\"Manage\">\n\t\t\t\t\t\t<ibm-header-item>Link 1</ibm-header-item>\n\t\t\t\t\t\t<ibm-header-item>Link 2</ibm-header-item>\n\t\t\t\t\t\t<ibm-header-item>Link 3</ibm-header-item>\n\t\t\t\t\t</ibm-header-menu>\n\t\t\t\t</ibm-header-navigation>\n\t\t\t\t<ibm-header-global>\n\t\t\t\t\t<ibm-header-action #firstAction title=\"action\">\n\t\t\t\t\t\t<svg class=\"bx--navigation-menu-panel-expand-icon\"\n\t\t\t\t\t\t\twidth=\"20\" height=\"20\" xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 32 32\" aria-hidden=\"true\">\n\t\t\t\t\t\t\t<path\n\t\t\t\t\t\t\t\td=\"M8.24 25.14L7 26.67a14 14 0 0 0 4.18 2.44l.68-1.88a12\n\t\t\t\t\t\t\t\t12 0 0 1-3.62-2.09zm-4.05-7.07l-2 .35A13.89 13.89 0 0 0 3.86\n\t\t\t\t\t\t\t\t23l1.73-1a11.9 11.9 0 0 1-1.4-3.93zm7.63-13.31l-.68-1.88A14\n\t\t\t\t\t\t\t\t14 0 0 0 7 5.33l1.24 1.53a12 12 0 0 1 3.58-2.1zM5.59\n\t\t\t\t\t\t\t\t10L3.86 9a13.89 13.89 0 0 0-1.64 4.54l2 .35A11.9 11.9 0 0 1 5.59\n\t\t\t\t\t\t\t\t10zM16 2v2a12 12 0 0 1 0 24v2a14 14 0 0 0 0-28z\" />\n\t\t\t\t\t\t</svg>\n\t\t\t\t\t</ibm-header-action>\n\t\t\t\t\t<ibm-header-action #secondAction title=\"action\">\n\t\t\t\t\t\t<svg\n\t\t\t\t\t\t\tclass=\"bx--navigation-menu-panel-expand-icon\"\n\t\t\t\t\t\t\twidth=\"20\"\n\t\t\t\t\t\t\theight=\"20\" xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 32 32\" aria-hidden=\"true\">\n\t\t\t\t\t\t\t<path\n\t\t\t\t\t\t\t\td=\"M8.24 25.14L7 26.67a14 14 0 0 0 4.18 2.44l.68-1.88a12\n\t\t\t\t\t\t\t\t12 0 0 1-3.62-2.09zm-4.05-7.07l-2 .35A13.89 13.89 0 0 0 3.86\n\t\t\t\t\t\t\t\t23l1.73-1a11.9 11.9 0 0 1-1.4-3.93zm7.63-13.31l-.68-1.88A14\n\t\t\t\t\t\t\t\t14 0 0 0 7 5.33l1.24 1.53a12 12 0 0 1 3.58-2.1zM5.59\n\t\t\t\t\t\t\t\t10L3.86 9a13.89 13.89 0 0 0-1.64 4.54l2 .35A11.9 11.9 0 0 1 5.59\n\t\t\t\t\t\t\t\t10zM16 2v2a12 12 0 0 1 0 24v2a14 14 0 0 0 0-28z\" />\n\t\t\t\t\t\t</svg>\n\t\t\t\t\t</ibm-header-action>\n\t\t\t\t</ibm-header-global>\n\t\t\t</ibm-header>\n\t\t\t<ibm-sidenav [expanded]=\"active\">\n\t\t\t\t<ibm-sidenav-item>\n\t\t\t\t\t<svg icon width=\"20\" height=\"20\" xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 32 32\" aria-hidden=\"true\">\n\t\t\t\t\t\t<path\n\t\t\t\t\t\t\td=\"M8.24 25.14L7 26.67a14 14 0 0 0 4.18 2.44l.68-1.88a12\n\t\t\t\t\t\t\t12 0 0 1-3.62-2.09zm-4.05-7.07l-2 .35A13.89 13.89 0 0 0 3.86\n\t\t\t\t\t\t\t23l1.73-1a11.9 11.9 0 0 1-1.4-3.93zm7.63-13.31l-.68-1.88A14\n\t\t\t\t\t\t\t14 0 0 0 7 5.33l1.24 1.53a12 12 0 0 1 3.58-2.1zM5.59\n\t\t\t\t\t\t\t10L3.86 9a13.89 13.89 0 0 0-1.64 4.54l2 .35A11.9 11.9 0 0 1 5.59\n\t\t\t\t\t\t\t10zM16 2v2a12 12 0 0 1 0 24v2a14 14 0 0 0 0-28z\" />\n\t\t\t\t\t</svg>\n\t\t\t\t\tLink\n\t\t\t\t</ibm-sidenav-item>\n\t\t\t\t<ibm-sidenav-item>\n\t\t\t\t\t<svg icon width=\"20\" height=\"20\" xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 32 32\" aria-hidden=\"true\">\n\t\t\t\t\t\t<path\n\t\t\t\t\t\t\td=\"M8.24 25.14L7 26.67a14 14 0 0 0 4.18 2.44l.68-1.88a12\n\t\t\t\t\t\t\t12 0 0 1-3.62-2.09zm-4.05-7.07l-2 .35A13.89 13.89 0 0 0 3.86\n\t\t\t\t\t\t\t23l1.73-1a11.9 11.9 0 0 1-1.4-3.93zm7.63-13.31l-.68-1.88A14\n\t\t\t\t\t\t\t14 0 0 0 7 5.33l1.24 1.53a12 12 0 0 1 3.58-2.1zM5.59\n\t\t\t\t\t\t\t10L3.86 9a13.89 13.89 0 0 0-1.64 4.54l2 .35A11.9 11.9 0 0 1 5.59\n\t\t\t\t\t\t\t10zM16 2v2a12 12 0 0 1 0 24v2a14 14 0 0 0 0-28z\" />\n\t\t\t\t\t</svg>\n\t\t\t\t\tLink\n\t\t\t\t</ibm-sidenav-item>\n\t\t\t\t<ibm-sidenav-menu title=\"Category title\">\n\t\t\t\t\t<svg icon width=\"20\" height=\"20\" xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 32 32\" aria-hidden=\"true\">\n\t\t\t\t\t\t<path\n\t\t\t\t\t\t\td=\"M8.24 25.14L7 26.67a14 14 0 0 0 4.18 2.44l.68-1.88a12\n\t\t\t\t\t\t\t12 0 0 1-3.62-2.09zm-4.05-7.07l-2 .35A13.89 13.89 0 0 0 3.86\n\t\t\t\t\t\t\t23l1.73-1a11.9 11.9 0 0 1-1.4-3.93zm7.63-13.31l-.68-1.88A14\n\t\t\t\t\t\t\t14 0 0 0 7 5.33l1.24 1.53a12 12 0 0 1 3.58-2.1zM5.59\n\t\t\t\t\t\t\t10L3.86 9a13.89 13.89 0 0 0-1.64 4.54l2 .35A11.9 11.9 0 0 1 5.59\n\t\t\t\t\t\t\t10zM16 2v2a12 12 0 0 1 0 24v2a14 14 0 0 0 0-28z\" />\n\t\t\t\t\t</svg>\n\t\t\t\t\t<ibm-sidenav-item>Link</ibm-sidenav-item>\n\t\t\t\t\t<ibm-sidenav-item>Link</ibm-sidenav-item>\n\t\t\t\t\t<ibm-sidenav-item>Link</ibm-sidenav-item>\n\t\t\t\t</ibm-sidenav-menu>\n\t\t\t</ibm-sidenav>\n\t\t\t<ibm-panel [expanded]=\"firstAction.active\"></ibm-panel>\n\t\t\t<ibm-panel [expanded]=\"secondAction.active\">\n\t\t\t\t<ibm-switcher-list>\n\t\t\t\t\t<ibm-switcher-list-item active=\"true\">Switcher item one</ibm-switcher-list-item>\n\t\t\t\t\t<ibm-switcher-list-item>Switcher item two</ibm-switcher-list-item>\n\t\t\t\t\t<ibm-switcher-list-item>Switcher item three</ibm-switcher-list-item>\n\t\t\t\t\t<ibm-switcher-list-item>Switcher item four</ibm-switcher-list-item>\n\t\t\t\t</ibm-switcher-list>\n\t\t\t</ibm-panel>\n\t\t`,\n props: {\n hasHamburger: boolean('Show Hamburger', true),\n active: boolean('Left panel active', true),\n selected: () => {\n console.log('selected');\n },\n options: [\n {\n content: 'Option 1',\n value: 1,\n },\n {\n content: 'Option 2',\n value: 2,\n },\n {\n content: 'Option 3',\n value: 3,\n },\n ],\n },\n }))\n .add('Header Documentation', () => ({\n template: `\n\t\t\t<ibm-documentation src=\"documentation/components/Header.html\"></ibm-documentation>\n\t\t`,\n }))\n .add('Side Nav Documentation', () => ({\n template: `\n\t\t\t<ibm-documentation src=\"documentation/components/SideNav.html\"></ibm-documentation>\n\t\t`,\n }));\n";
|
|
24262
|
-
var __ADDS_MAP__ = { "ui-shell--side-nav-documentation": { "startLoc": { "col": 7, "line":
|
|
24404
|
+
var __STORY__ = "import { action } from '@storybook/addon-actions';\nimport { storiesOf, moduleMetadata } from '@storybook/angular';\nimport { withKnobs, boolean } from '@storybook/addon-knobs/angular';\n\nimport { UIShellModule } from './ui-shell.module';\nimport { SearchModule } from './../search/search.module';\nimport { DialogModule } from './../dialog/dialog.module';\nimport { DocumentationModule } from './../documentation-component/documentation.module';\nimport { Component } from '@angular/core';\nimport { RouterModule } from '@angular/router';\n\n@Component({\n selector: 'app-bar',\n template: '<h1>bar</h1>',\n})\nclass BarComponent {}\n\n@Component({\n selector: 'app-foo',\n template: '<h1>foo</h1>',\n})\nclass FooComponent {}\n\nstoriesOf('UI Shell', module)\n .addDecorator(\n moduleMetadata({\n declarations: [BarComponent, FooComponent],\n imports: [\n UIShellModule,\n SearchModule,\n DialogModule,\n DocumentationModule,\n RouterModule.forRoot(\n [\n {\n path: 'bar',\n component: BarComponent,\n },\n {\n path: 'foo',\n component: FooComponent,\n },\n ],\n {\n initialNavigation: false,\n useHash: true,\n }\n ),\n ],\n })\n )\n .addDecorator(withKnobs)\n .add('Header', () => ({\n template: `\n\t\t\t<ibm-header name=\"[Platform]\">\n\t\t\t\t<ibm-hamburger *ngIf=\"hasHamburger\" (click)=\"expanded($event)\"></ibm-hamburger>\n\t\t\t\t<ibm-header-navigation>\n\t\t\t\t\t<ibm-header-item>Catalog</ibm-header-item>\n\t\t\t\t\t<ibm-header-item>Docs</ibm-header-item>\n\t\t\t\t\t<ibm-header-item>Support</ibm-header-item>\n\t\t\t\t\t<ibm-header-menu title=\"Manage\">\n\t\t\t\t\t\t<ibm-header-item>Link 1</ibm-header-item>\n\t\t\t\t\t\t<ibm-header-item>Link 2</ibm-header-item>\n\t\t\t\t\t\t<ibm-header-item>Link 3</ibm-header-item>\n\t\t\t\t\t</ibm-header-menu>\n\t\t\t\t</ibm-header-navigation>\n\t\t\t\t<ibm-header-global>\n\t\t\t\t\t<ibm-header-action title=\"action\">\n\t\t\t\t\t\t<svg width=\"20\" height=\"20\" xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 32 32\" aria-hidden=\"true\">\n\t\t\t\t\t\t\t<path\n\t\t\t\t\t\t\t\td=\"M8.24 25.14L7 26.67a14 14 0 0 0 4.18 2.44l.68-1.88a12\n\t\t\t\t\t\t\t\t12 0 0 1-3.62-2.09zm-4.05-7.07l-2 .35A13.89 13.89 0 0 0 3.86\n\t\t\t\t\t\t\t\t23l1.73-1a11.9 11.9 0 0 1-1.4-3.93zm7.63-13.31l-.68-1.88A14\n\t\t\t\t\t\t\t\t14 0 0 0 7 5.33l1.24 1.53a12 12 0 0 1 3.58-2.1zM5.59\n\t\t\t\t\t\t\t\t10L3.86 9a13.89 13.89 0 0 0-1.64 4.54l2 .35A11.9 11.9 0 0 1 5.59\n\t\t\t\t\t\t\t\t10zM16 2v2a12 12 0 0 1 0 24v2a14 14 0 0 0 0-28z\" />\n\t\t\t\t\t\t</svg>\n\t\t\t\t\t</ibm-header-action>\n\t\t\t\t\t<ibm-header-action title=\"action\">\n\t\t\t\t\t\t<svg width=\"20\" height=\"20\" xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 32 32\" aria-hidden=\"true\">\n\t\t\t\t\t\t\t<path\n\t\t\t\t\t\t\t\td=\"M8.24 25.14L7 26.67a14 14 0 0 0 4.18 2.44l.68-1.88a12\n\t\t\t\t\t\t\t\t12 0 0 1-3.62-2.09zm-4.05-7.07l-2 .35A13.89 13.89 0 0 0 3.86\n\t\t\t\t\t\t\t\t23l1.73-1a11.9 11.9 0 0 1-1.4-3.93zm7.63-13.31l-.68-1.88A14\n\t\t\t\t\t\t\t\t14 0 0 0 7 5.33l1.24 1.53a12 12 0 0 1 3.58-2.1zM5.59\n\t\t\t\t\t\t\t\t10L3.86 9a13.89 13.89 0 0 0-1.64 4.54l2 .35A11.9 11.9 0 0 1 5.59\n\t\t\t\t\t\t\t\t10zM16 2v2a12 12 0 0 1 0 24v2a14 14 0 0 0 0-28z\" />\n\t\t\t\t\t\t</svg>\n\t\t\t\t\t</ibm-header-action>\n\t\t\t\t</ibm-header-global>\n\t\t\t</ibm-header>\n\t\t`,\n props: {\n hasHamburger: boolean('Show Hamburger', true),\n expanded: action('Menu clicked'),\n },\n }))\n .add('Header with router', () => ({\n template: `\n\t\t\t<ibm-header name=\"[Platform]\">\n\t\t\t\t<ibm-header-navigation>\n\t\t\t\t\t<ibm-header-item [route]=\"['foo']\">Catalog</ibm-header-item>\n\t\t\t\t\t<ibm-header-item [route]=\"['bar']\">Docs</ibm-header-item>\n\t\t\t\t\t<ibm-header-item [route]=\"['foo']\">Support</ibm-header-item>\n\t\t\t\t\t<ibm-header-menu title=\"Manage\">\n\t\t\t\t\t\t<ibm-header-item [route]=\"['foo']\">Link 1</ibm-header-item>\n\t\t\t\t\t\t<ibm-header-item [route]=\"['bar']\">Link 2</ibm-header-item>\n\t\t\t\t\t\t<ibm-header-item [route]=\"['foo']\">Link 3</ibm-header-item>\n\t\t\t\t\t</ibm-header-menu>\n\t\t\t\t</ibm-header-navigation>\n\t\t\t</ibm-header>\n\t\t\t<div style=\"margin-top: 2rem\">\n\t\t\t\t<router-outlet></router-outlet>\n\t\t\t</div>\n\t\t`,\n props: {\n expanded: action('Menu clicked'),\n },\n }))\n .add('Side Navigation', () => ({\n template: `\n\t\t\t<ibm-sidenav>\n\t\t\t\t<ibm-sidenav-item>\n\t\t\t\t\t<svg icon width=\"20\" height=\"20\" xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 32 32\" aria-hidden=\"true\">\n\t\t\t\t\t\t<path\n\t\t\t\t\t\t\td=\"M8.24 25.14L7 26.67a14 14 0 0 0 4.18 2.44l.68-1.88a12\n\t\t\t\t\t\t\t12 0 0 1-3.62-2.09zm-4.05-7.07l-2 .35A13.89 13.89 0 0 0 3.86\n\t\t\t\t\t\t\t23l1.73-1a11.9 11.9 0 0 1-1.4-3.93zm7.63-13.31l-.68-1.88A14\n\t\t\t\t\t\t\t14 0 0 0 7 5.33l1.24 1.53a12 12 0 0 1 3.58-2.1zM5.59\n\t\t\t\t\t\t\t10L3.86 9a13.89 13.89 0 0 0-1.64 4.54l2 .35A11.9 11.9 0 0 1 5.59\n\t\t\t\t\t\t\t10zM16 2v2a12 12 0 0 1 0 24v2a14 14 0 0 0 0-28z\" />\n\t\t\t\t\t</svg>\n\t\t\t\t\tLink\n\t\t\t\t</ibm-sidenav-item>\n\t\t\t\t<ibm-sidenav-item>\n\t\t\t\t\t<svg icon width=\"20\" height=\"20\" xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 32 32\" aria-hidden=\"true\">\n\t\t\t\t\t\t<path\n\t\t\t\t\t\t\td=\"M8.24 25.14L7 26.67a14 14 0 0 0 4.18 2.44l.68-1.88a12\n\t\t\t\t\t\t\t12 0 0 1-3.62-2.09zm-4.05-7.07l-2 .35A13.89 13.89 0 0 0 3.86\n\t\t\t\t\t\t\t23l1.73-1a11.9 11.9 0 0 1-1.4-3.93zm7.63-13.31l-.68-1.88A14\n\t\t\t\t\t\t\t14 0 0 0 7 5.33l1.24 1.53a12 12 0 0 1 3.58-2.1zM5.59\n\t\t\t\t\t\t\t10L3.86 9a13.89 13.89 0 0 0-1.64 4.54l2 .35A11.9 11.9 0 0 1 5.59\n\t\t\t\t\t\t\t10zM16 2v2a12 12 0 0 1 0 24v2a14 14 0 0 0 0-28z\" />\n\t\t\t\t\t</svg>\n\t\t\t\t\tLink\n\t\t\t\t</ibm-sidenav-item>\n\t\t\t\t<ibm-sidenav-menu title=\"Category title\">\n\t\t\t\t\t<svg icon width=\"20\" height=\"20\" xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 32 32\" aria-hidden=\"true\">\n\t\t\t\t\t\t<path\n\t\t\t\t\t\t\td=\"M8.24 25.14L7 26.67a14 14 0 0 0 4.18 2.44l.68-1.88a12\n\t\t\t\t\t\t\t12 0 0 1-3.62-2.09zm-4.05-7.07l-2 .35A13.89 13.89 0 0 0 3.86\n\t\t\t\t\t\t\t23l1.73-1a11.9 11.9 0 0 1-1.4-3.93zm7.63-13.31l-.68-1.88A14\n\t\t\t\t\t\t\t14 0 0 0 7 5.33l1.24 1.53a12 12 0 0 1 3.58-2.1zM5.59\n\t\t\t\t\t\t\t10L3.86 9a13.89 13.89 0 0 0-1.64 4.54l2 .35A11.9 11.9 0 0 1 5.59\n\t\t\t\t\t\t\t10zM16 2v2a12 12 0 0 1 0 24v2a14 14 0 0 0 0-28z\" />\n\t\t\t\t\t</svg>\n\t\t\t\t\t<ibm-sidenav-item>Link</ibm-sidenav-item>\n\t\t\t\t\t<ibm-sidenav-item>Link</ibm-sidenav-item>\n\t\t\t\t\t<ibm-sidenav-item>Link</ibm-sidenav-item>\n\t\t\t\t</ibm-sidenav-menu>\n\t\t\t</ibm-sidenav>\n\t\t`,\n props: {\n options: [\n {\n content: 'Option 1',\n value: 1,\n },\n {\n content: 'Option 2',\n value: 2,\n },\n {\n content: 'Option 3',\n value: 3,\n },\n ],\n },\n }))\n .add('Side Navigation with router', () => ({\n template: `\n\t\t\t<ibm-sidenav>\n\t\t\t\t<ibm-sidenav-item [route]=\"['foo']\">\n\t\t\t\t\t<svg icon width=\"20\" height=\"20\" xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 32 32\" aria-hidden=\"true\">\n\t\t\t\t\t\t<path\n\t\t\t\t\t\t\td=\"M8.24 25.14L7 26.67a14 14 0 0 0 4.18 2.44l.68-1.88a12\n\t\t\t\t\t\t\t12 0 0 1-3.62-2.09zm-4.05-7.07l-2 .35A13.89 13.89 0 0 0 3.86\n\t\t\t\t\t\t\t23l1.73-1a11.9 11.9 0 0 1-1.4-3.93zm7.63-13.31l-.68-1.88A14\n\t\t\t\t\t\t\t14 0 0 0 7 5.33l1.24 1.53a12 12 0 0 1 3.58-2.1zM5.59\n\t\t\t\t\t\t\t10L3.86 9a13.89 13.89 0 0 0-1.64 4.54l2 .35A11.9 11.9 0 0 1 5.59\n\t\t\t\t\t\t\t10zM16 2v2a12 12 0 0 1 0 24v2a14 14 0 0 0 0-28z\" />\n\t\t\t\t\t</svg>\n\t\t\t\t\tLink\n\t\t\t\t</ibm-sidenav-item>\n\t\t\t\t<ibm-sidenav-item [route]=\"['bar']\">\n\t\t\t\t\t<svg icon width=\"20\" height=\"20\" xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 32 32\" aria-hidden=\"true\">\n\t\t\t\t\t\t<path\n\t\t\t\t\t\t\td=\"M8.24 25.14L7 26.67a14 14 0 0 0 4.18 2.44l.68-1.88a12\n\t\t\t\t\t\t\t12 0 0 1-3.62-2.09zm-4.05-7.07l-2 .35A13.89 13.89 0 0 0 3.86\n\t\t\t\t\t\t\t23l1.73-1a11.9 11.9 0 0 1-1.4-3.93zm7.63-13.31l-.68-1.88A14\n\t\t\t\t\t\t\t14 0 0 0 7 5.33l1.24 1.53a12 12 0 0 1 3.58-2.1zM5.59\n\t\t\t\t\t\t\t10L3.86 9a13.89 13.89 0 0 0-1.64 4.54l2 .35A11.9 11.9 0 0 1 5.59\n\t\t\t\t\t\t\t10zM16 2v2a12 12 0 0 1 0 24v2a14 14 0 0 0 0-28z\" />\n\t\t\t\t\t</svg>\n\t\t\t\t\tLink\n\t\t\t\t</ibm-sidenav-item>\n\t\t\t\t<ibm-sidenav-menu title=\"Category title\">\n\t\t\t\t\t<svg icon width=\"20\" height=\"20\" xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 32 32\" aria-hidden=\"true\">\n\t\t\t\t\t\t<path\n\t\t\t\t\t\t\td=\"M8.24 25.14L7 26.67a14 14 0 0 0 4.18 2.44l.68-1.88a12\n\t\t\t\t\t\t\t12 0 0 1-3.62-2.09zm-4.05-7.07l-2 .35A13.89 13.89 0 0 0 3.86\n\t\t\t\t\t\t\t23l1.73-1a11.9 11.9 0 0 1-1.4-3.93zm7.63-13.31l-.68-1.88A14\n\t\t\t\t\t\t\t14 0 0 0 7 5.33l1.24 1.53a12 12 0 0 1 3.58-2.1zM5.59\n\t\t\t\t\t\t\t10L3.86 9a13.89 13.89 0 0 0-1.64 4.54l2 .35A11.9 11.9 0 0 1 5.59\n\t\t\t\t\t\t\t10zM16 2v2a12 12 0 0 1 0 24v2a14 14 0 0 0 0-28z\" />\n\t\t\t\t\t</svg>\n\t\t\t\t\t<ibm-sidenav-item [route]=\"['foo']\">Link</ibm-sidenav-item>\n\t\t\t\t\t<ibm-sidenav-item [route]=\"['bar']\">Link</ibm-sidenav-item>\n\t\t\t\t\t<ibm-sidenav-item [route]=\"['foo']\">Link</ibm-sidenav-item>\n\t\t\t\t</ibm-sidenav-menu>\n\t\t\t</ibm-sidenav>\n\t\t\t<div>\n\t\t\t\t<router-outlet></router-outlet>\n\t\t\t</div>\n\t\t`,\n }))\n .add('Together', () => ({\n template: `\n\t\t\t<ibm-header name=\"[Platform]\">\n\t\t\t\t<ibm-hamburger *ngIf=\"hasHamburger\" [active]=\"active\" (selected)=\"selected()\"></ibm-hamburger>\n\t\t\t\t<ibm-header-navigation>\n\t\t\t\t\t<ibm-header-item>Catalog</ibm-header-item>\n\t\t\t\t\t<ibm-header-item>Docs</ibm-header-item>\n\t\t\t\t\t<ibm-header-item>Support</ibm-header-item>\n\t\t\t\t\t<ibm-header-menu title=\"Manage\">\n\t\t\t\t\t\t<ibm-header-item>Link 1</ibm-header-item>\n\t\t\t\t\t\t<ibm-header-item>Link 2</ibm-header-item>\n\t\t\t\t\t\t<ibm-header-item>Link 3</ibm-header-item>\n\t\t\t\t\t</ibm-header-menu>\n\t\t\t\t</ibm-header-navigation>\n\t\t\t\t<ibm-header-global>\n\t\t\t\t\t<ibm-header-action #firstAction title=\"action\">\n\t\t\t\t\t\t<svg class=\"bx--navigation-menu-panel-expand-icon\"\n\t\t\t\t\t\t\twidth=\"20\" height=\"20\" xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 32 32\" aria-hidden=\"true\">\n\t\t\t\t\t\t\t<path\n\t\t\t\t\t\t\t\td=\"M8.24 25.14L7 26.67a14 14 0 0 0 4.18 2.44l.68-1.88a12\n\t\t\t\t\t\t\t\t12 0 0 1-3.62-2.09zm-4.05-7.07l-2 .35A13.89 13.89 0 0 0 3.86\n\t\t\t\t\t\t\t\t23l1.73-1a11.9 11.9 0 0 1-1.4-3.93zm7.63-13.31l-.68-1.88A14\n\t\t\t\t\t\t\t\t14 0 0 0 7 5.33l1.24 1.53a12 12 0 0 1 3.58-2.1zM5.59\n\t\t\t\t\t\t\t\t10L3.86 9a13.89 13.89 0 0 0-1.64 4.54l2 .35A11.9 11.9 0 0 1 5.59\n\t\t\t\t\t\t\t\t10zM16 2v2a12 12 0 0 1 0 24v2a14 14 0 0 0 0-28z\" />\n\t\t\t\t\t\t</svg>\n\t\t\t\t\t</ibm-header-action>\n\t\t\t\t\t<ibm-header-action #secondAction title=\"action\">\n\t\t\t\t\t\t<svg\n\t\t\t\t\t\t\tclass=\"bx--navigation-menu-panel-expand-icon\"\n\t\t\t\t\t\t\twidth=\"20\"\n\t\t\t\t\t\t\theight=\"20\" xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 32 32\" aria-hidden=\"true\">\n\t\t\t\t\t\t\t<path\n\t\t\t\t\t\t\t\td=\"M8.24 25.14L7 26.67a14 14 0 0 0 4.18 2.44l.68-1.88a12\n\t\t\t\t\t\t\t\t12 0 0 1-3.62-2.09zm-4.05-7.07l-2 .35A13.89 13.89 0 0 0 3.86\n\t\t\t\t\t\t\t\t23l1.73-1a11.9 11.9 0 0 1-1.4-3.93zm7.63-13.31l-.68-1.88A14\n\t\t\t\t\t\t\t\t14 0 0 0 7 5.33l1.24 1.53a12 12 0 0 1 3.58-2.1zM5.59\n\t\t\t\t\t\t\t\t10L3.86 9a13.89 13.89 0 0 0-1.64 4.54l2 .35A11.9 11.9 0 0 1 5.59\n\t\t\t\t\t\t\t\t10zM16 2v2a12 12 0 0 1 0 24v2a14 14 0 0 0 0-28z\" />\n\t\t\t\t\t\t</svg>\n\t\t\t\t\t</ibm-header-action>\n\t\t\t\t</ibm-header-global>\n\t\t\t</ibm-header>\n\t\t\t<ibm-sidenav [expanded]=\"active\">\n\t\t\t\t<ibm-sidenav-item>\n\t\t\t\t\t<svg icon width=\"20\" height=\"20\" xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 32 32\" aria-hidden=\"true\">\n\t\t\t\t\t\t<path\n\t\t\t\t\t\t\td=\"M8.24 25.14L7 26.67a14 14 0 0 0 4.18 2.44l.68-1.88a12\n\t\t\t\t\t\t\t12 0 0 1-3.62-2.09zm-4.05-7.07l-2 .35A13.89 13.89 0 0 0 3.86\n\t\t\t\t\t\t\t23l1.73-1a11.9 11.9 0 0 1-1.4-3.93zm7.63-13.31l-.68-1.88A14\n\t\t\t\t\t\t\t14 0 0 0 7 5.33l1.24 1.53a12 12 0 0 1 3.58-2.1zM5.59\n\t\t\t\t\t\t\t10L3.86 9a13.89 13.89 0 0 0-1.64 4.54l2 .35A11.9 11.9 0 0 1 5.59\n\t\t\t\t\t\t\t10zM16 2v2a12 12 0 0 1 0 24v2a14 14 0 0 0 0-28z\" />\n\t\t\t\t\t</svg>\n\t\t\t\t\tLink\n\t\t\t\t</ibm-sidenav-item>\n\t\t\t\t<ibm-sidenav-item>\n\t\t\t\t\t<svg icon width=\"20\" height=\"20\" xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 32 32\" aria-hidden=\"true\">\n\t\t\t\t\t\t<path\n\t\t\t\t\t\t\td=\"M8.24 25.14L7 26.67a14 14 0 0 0 4.18 2.44l.68-1.88a12\n\t\t\t\t\t\t\t12 0 0 1-3.62-2.09zm-4.05-7.07l-2 .35A13.89 13.89 0 0 0 3.86\n\t\t\t\t\t\t\t23l1.73-1a11.9 11.9 0 0 1-1.4-3.93zm7.63-13.31l-.68-1.88A14\n\t\t\t\t\t\t\t14 0 0 0 7 5.33l1.24 1.53a12 12 0 0 1 3.58-2.1zM5.59\n\t\t\t\t\t\t\t10L3.86 9a13.89 13.89 0 0 0-1.64 4.54l2 .35A11.9 11.9 0 0 1 5.59\n\t\t\t\t\t\t\t10zM16 2v2a12 12 0 0 1 0 24v2a14 14 0 0 0 0-28z\" />\n\t\t\t\t\t</svg>\n\t\t\t\t\tLink\n\t\t\t\t</ibm-sidenav-item>\n\t\t\t\t<ibm-sidenav-menu title=\"Category title\">\n\t\t\t\t\t<svg icon width=\"20\" height=\"20\" xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 32 32\" aria-hidden=\"true\">\n\t\t\t\t\t\t<path\n\t\t\t\t\t\t\td=\"M8.24 25.14L7 26.67a14 14 0 0 0 4.18 2.44l.68-1.88a12\n\t\t\t\t\t\t\t12 0 0 1-3.62-2.09zm-4.05-7.07l-2 .35A13.89 13.89 0 0 0 3.86\n\t\t\t\t\t\t\t23l1.73-1a11.9 11.9 0 0 1-1.4-3.93zm7.63-13.31l-.68-1.88A14\n\t\t\t\t\t\t\t14 0 0 0 7 5.33l1.24 1.53a12 12 0 0 1 3.58-2.1zM5.59\n\t\t\t\t\t\t\t10L3.86 9a13.89 13.89 0 0 0-1.64 4.54l2 .35A11.9 11.9 0 0 1 5.59\n\t\t\t\t\t\t\t10zM16 2v2a12 12 0 0 1 0 24v2a14 14 0 0 0 0-28z\" />\n\t\t\t\t\t</svg>\n\t\t\t\t\t<ibm-sidenav-item>Link</ibm-sidenav-item>\n\t\t\t\t\t<ibm-sidenav-item>Link</ibm-sidenav-item>\n\t\t\t\t\t<ibm-sidenav-item>Link</ibm-sidenav-item>\n\t\t\t\t</ibm-sidenav-menu>\n\t\t\t</ibm-sidenav>\n\t\t\t<ibm-panel [expanded]=\"firstAction.active\"></ibm-panel>\n\t\t\t<ibm-panel [expanded]=\"secondAction.active\">\n\t\t\t\t<ibm-switcher-list>\n\t\t\t\t\t<ibm-switcher-list-item active=\"true\">Switcher item one</ibm-switcher-list-item>\n\t\t\t\t\t<ibm-switcher-list-item>Switcher item two</ibm-switcher-list-item>\n\t\t\t\t\t<ibm-switcher-list-item>Switcher item three</ibm-switcher-list-item>\n\t\t\t\t\t<ibm-switcher-list-item>Switcher item four</ibm-switcher-list-item>\n\t\t\t\t</ibm-switcher-list>\n\t\t\t</ibm-panel>\n\t\t`,\n props: {\n hasHamburger: boolean('Show Hamburger', true),\n active: boolean('Left panel active', true),\n selected: () => {\n console.log('selected');\n },\n options: [\n {\n content: 'Option 1',\n value: 1,\n },\n {\n content: 'Option 2',\n value: 2,\n },\n {\n content: 'Option 3',\n value: 3,\n },\n ],\n },\n }))\n .add('Header Documentation', () => ({\n template: `\n\t\t\t<ibm-documentation src=\"documentation/components/Header.html\"></ibm-documentation>\n\t\t`,\n }))\n .add('Side Nav Documentation', () => ({\n template: `\n\t\t\t<ibm-documentation src=\"documentation/components/SideNav.html\"></ibm-documentation>\n\t\t`,\n }));\n";
|
|
24405
|
+
var __ADDS_MAP__ = { "ui-shell--side-nav-documentation": { "startLoc": { "col": 7, "line": 347 }, "endLoc": { "col": 4, "line": 351 } }, "ui-shell--header-documentation": { "startLoc": { "col": 7, "line": 342 }, "endLoc": { "col": 4, "line": 346 } }, "ui-shell--together": { "startLoc": { "col": 7, "line": 227 }, "endLoc": { "col": 4, "line": 341 } }, "ui-shell--side-navigation-with-router": { "startLoc": { "col": 7, "line": 180 }, "endLoc": { "col": 4, "line": 226 } }, "ui-shell--side-navigation": { "startLoc": { "col": 7, "line": 120 }, "endLoc": { "col": 4, "line": 179 } }, "ui-shell--header-with-router": { "startLoc": { "col": 7, "line": 98 }, "endLoc": { "col": 4, "line": 119 } }, "ui-shell--header": { "startLoc": { "col": 7, "line": 53 }, "endLoc": { "col": 4, "line": 97 } } };
|
|
24406
|
+
|
|
24263
24407
|
|
|
24264
24408
|
|
|
24265
24409
|
|
|
@@ -24267,13 +24411,50 @@ var __ADDS_MAP__ = { "ui-shell--side-nav-documentation": { "startLoc": { "col":
|
|
|
24267
24411
|
|
|
24268
24412
|
|
|
24269
24413
|
|
|
24414
|
+
|
|
24415
|
+
var BarComponent = /** @class */ (function () {
|
|
24416
|
+
function BarComponent() {
|
|
24417
|
+
}
|
|
24418
|
+
BarComponent = __decorate([
|
|
24419
|
+
Object(_angular_core__WEBPACK_IMPORTED_MODULE_7__["Component"])({
|
|
24420
|
+
selector: "app-bar",
|
|
24421
|
+
template: "<h1>bar</h1>"
|
|
24422
|
+
})
|
|
24423
|
+
], BarComponent);
|
|
24424
|
+
return BarComponent;
|
|
24425
|
+
}());
|
|
24426
|
+
var FooComponent = /** @class */ (function () {
|
|
24427
|
+
function FooComponent() {
|
|
24428
|
+
}
|
|
24429
|
+
FooComponent = __decorate([
|
|
24430
|
+
Object(_angular_core__WEBPACK_IMPORTED_MODULE_7__["Component"])({
|
|
24431
|
+
selector: "app-foo",
|
|
24432
|
+
template: "<h1>foo</h1>"
|
|
24433
|
+
})
|
|
24434
|
+
], FooComponent);
|
|
24435
|
+
return FooComponent;
|
|
24436
|
+
}());
|
|
24270
24437
|
Object(_storybook_angular__WEBPACK_IMPORTED_MODULE_1__["storiesOf"])("UI Shell", module).addDecorator(withStorySource(__STORY__, __ADDS_MAP__))
|
|
24271
24438
|
.addDecorator(Object(_storybook_angular__WEBPACK_IMPORTED_MODULE_1__["moduleMetadata"])({
|
|
24439
|
+
declarations: [BarComponent, FooComponent],
|
|
24272
24440
|
imports: [
|
|
24273
24441
|
_ui_shell_module__WEBPACK_IMPORTED_MODULE_3__["UIShellModule"],
|
|
24274
24442
|
_search_search_module__WEBPACK_IMPORTED_MODULE_4__["SearchModule"],
|
|
24275
24443
|
_dialog_dialog_module__WEBPACK_IMPORTED_MODULE_5__["DialogModule"],
|
|
24276
|
-
_documentation_component_documentation_module__WEBPACK_IMPORTED_MODULE_6__["DocumentationModule"]
|
|
24444
|
+
_documentation_component_documentation_module__WEBPACK_IMPORTED_MODULE_6__["DocumentationModule"],
|
|
24445
|
+
_angular_router__WEBPACK_IMPORTED_MODULE_8__["RouterModule"].forRoot([
|
|
24446
|
+
{
|
|
24447
|
+
path: "bar",
|
|
24448
|
+
component: BarComponent
|
|
24449
|
+
},
|
|
24450
|
+
{
|
|
24451
|
+
path: "foo",
|
|
24452
|
+
component: FooComponent
|
|
24453
|
+
}
|
|
24454
|
+
], {
|
|
24455
|
+
initialNavigation: false,
|
|
24456
|
+
useHash: true
|
|
24457
|
+
})
|
|
24277
24458
|
]
|
|
24278
24459
|
}))
|
|
24279
24460
|
.addDecorator(_storybook_addon_knobs_angular__WEBPACK_IMPORTED_MODULE_2__["withKnobs"])
|
|
@@ -24283,6 +24464,12 @@ Object(_storybook_angular__WEBPACK_IMPORTED_MODULE_1__["storiesOf"])("UI Shell",
|
|
|
24283
24464
|
hasHamburger: Object(_storybook_addon_knobs_angular__WEBPACK_IMPORTED_MODULE_2__["boolean"])("Show Hamburger", true),
|
|
24284
24465
|
expanded: Object(_storybook_addon_actions__WEBPACK_IMPORTED_MODULE_0__["action"])("Menu clicked")
|
|
24285
24466
|
}
|
|
24467
|
+
}); })
|
|
24468
|
+
.add("Header with router", function () { return ({
|
|
24469
|
+
template: "\n\t\t\t<ibm-header name=\"[Platform]\">\n\t\t\t\t<ibm-header-navigation>\n\t\t\t\t\t<ibm-header-item [route]=\"['foo']\">Catalog</ibm-header-item>\n\t\t\t\t\t<ibm-header-item [route]=\"['bar']\">Docs</ibm-header-item>\n\t\t\t\t\t<ibm-header-item [route]=\"['foo']\">Support</ibm-header-item>\n\t\t\t\t\t<ibm-header-menu title=\"Manage\">\n\t\t\t\t\t\t<ibm-header-item [route]=\"['foo']\">Link 1</ibm-header-item>\n\t\t\t\t\t\t<ibm-header-item [route]=\"['bar']\">Link 2</ibm-header-item>\n\t\t\t\t\t\t<ibm-header-item [route]=\"['foo']\">Link 3</ibm-header-item>\n\t\t\t\t\t</ibm-header-menu>\n\t\t\t\t</ibm-header-navigation>\n\t\t\t</ibm-header>\n\t\t\t<div style=\"margin-top: 2rem\">\n\t\t\t\t<router-outlet></router-outlet>\n\t\t\t</div>\n\t\t",
|
|
24470
|
+
props: {
|
|
24471
|
+
expanded: Object(_storybook_addon_actions__WEBPACK_IMPORTED_MODULE_0__["action"])("Menu clicked")
|
|
24472
|
+
}
|
|
24286
24473
|
}); })
|
|
24287
24474
|
.add("Side Navigation", function () { return ({
|
|
24288
24475
|
template: "\n\t\t\t<ibm-sidenav>\n\t\t\t\t<ibm-sidenav-item>\n\t\t\t\t\t<svg icon width=\"20\" height=\"20\" xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 32 32\" aria-hidden=\"true\">\n\t\t\t\t\t\t<path\n\t\t\t\t\t\t\td=\"M8.24 25.14L7 26.67a14 14 0 0 0 4.18 2.44l.68-1.88a12\n\t\t\t\t\t\t\t12 0 0 1-3.62-2.09zm-4.05-7.07l-2 .35A13.89 13.89 0 0 0 3.86\n\t\t\t\t\t\t\t23l1.73-1a11.9 11.9 0 0 1-1.4-3.93zm7.63-13.31l-.68-1.88A14\n\t\t\t\t\t\t\t14 0 0 0 7 5.33l1.24 1.53a12 12 0 0 1 3.58-2.1zM5.59\n\t\t\t\t\t\t\t10L3.86 9a13.89 13.89 0 0 0-1.64 4.54l2 .35A11.9 11.9 0 0 1 5.59\n\t\t\t\t\t\t\t10zM16 2v2a12 12 0 0 1 0 24v2a14 14 0 0 0 0-28z\" />\n\t\t\t\t\t</svg>\n\t\t\t\t\tLink\n\t\t\t\t</ibm-sidenav-item>\n\t\t\t\t<ibm-sidenav-item>\n\t\t\t\t\t<svg icon width=\"20\" height=\"20\" xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 32 32\" aria-hidden=\"true\">\n\t\t\t\t\t\t<path\n\t\t\t\t\t\t\td=\"M8.24 25.14L7 26.67a14 14 0 0 0 4.18 2.44l.68-1.88a12\n\t\t\t\t\t\t\t12 0 0 1-3.62-2.09zm-4.05-7.07l-2 .35A13.89 13.89 0 0 0 3.86\n\t\t\t\t\t\t\t23l1.73-1a11.9 11.9 0 0 1-1.4-3.93zm7.63-13.31l-.68-1.88A14\n\t\t\t\t\t\t\t14 0 0 0 7 5.33l1.24 1.53a12 12 0 0 1 3.58-2.1zM5.59\n\t\t\t\t\t\t\t10L3.86 9a13.89 13.89 0 0 0-1.64 4.54l2 .35A11.9 11.9 0 0 1 5.59\n\t\t\t\t\t\t\t10zM16 2v2a12 12 0 0 1 0 24v2a14 14 0 0 0 0-28z\" />\n\t\t\t\t\t</svg>\n\t\t\t\t\tLink\n\t\t\t\t</ibm-sidenav-item>\n\t\t\t\t<ibm-sidenav-menu title=\"Category title\">\n\t\t\t\t\t<svg icon width=\"20\" height=\"20\" xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 32 32\" aria-hidden=\"true\">\n\t\t\t\t\t\t<path\n\t\t\t\t\t\t\td=\"M8.24 25.14L7 26.67a14 14 0 0 0 4.18 2.44l.68-1.88a12\n\t\t\t\t\t\t\t12 0 0 1-3.62-2.09zm-4.05-7.07l-2 .35A13.89 13.89 0 0 0 3.86\n\t\t\t\t\t\t\t23l1.73-1a11.9 11.9 0 0 1-1.4-3.93zm7.63-13.31l-.68-1.88A14\n\t\t\t\t\t\t\t14 0 0 0 7 5.33l1.24 1.53a12 12 0 0 1 3.58-2.1zM5.59\n\t\t\t\t\t\t\t10L3.86 9a13.89 13.89 0 0 0-1.64 4.54l2 .35A11.9 11.9 0 0 1 5.59\n\t\t\t\t\t\t\t10zM16 2v2a12 12 0 0 1 0 24v2a14 14 0 0 0 0-28z\" />\n\t\t\t\t\t</svg>\n\t\t\t\t\t<ibm-sidenav-item>Link</ibm-sidenav-item>\n\t\t\t\t\t<ibm-sidenav-item>Link</ibm-sidenav-item>\n\t\t\t\t\t<ibm-sidenav-item>Link</ibm-sidenav-item>\n\t\t\t\t</ibm-sidenav-menu>\n\t\t\t</ibm-sidenav>\n\t\t",
|
|
@@ -24302,6 +24489,9 @@ Object(_storybook_angular__WEBPACK_IMPORTED_MODULE_1__["storiesOf"])("UI Shell",
|
|
|
24302
24489
|
}
|
|
24303
24490
|
]
|
|
24304
24491
|
}
|
|
24492
|
+
}); })
|
|
24493
|
+
.add("Side Navigation with router", function () { return ({
|
|
24494
|
+
template: "\n\t\t\t<ibm-sidenav>\n\t\t\t\t<ibm-sidenav-item [route]=\"['foo']\">\n\t\t\t\t\t<svg icon width=\"20\" height=\"20\" xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 32 32\" aria-hidden=\"true\">\n\t\t\t\t\t\t<path\n\t\t\t\t\t\t\td=\"M8.24 25.14L7 26.67a14 14 0 0 0 4.18 2.44l.68-1.88a12\n\t\t\t\t\t\t\t12 0 0 1-3.62-2.09zm-4.05-7.07l-2 .35A13.89 13.89 0 0 0 3.86\n\t\t\t\t\t\t\t23l1.73-1a11.9 11.9 0 0 1-1.4-3.93zm7.63-13.31l-.68-1.88A14\n\t\t\t\t\t\t\t14 0 0 0 7 5.33l1.24 1.53a12 12 0 0 1 3.58-2.1zM5.59\n\t\t\t\t\t\t\t10L3.86 9a13.89 13.89 0 0 0-1.64 4.54l2 .35A11.9 11.9 0 0 1 5.59\n\t\t\t\t\t\t\t10zM16 2v2a12 12 0 0 1 0 24v2a14 14 0 0 0 0-28z\" />\n\t\t\t\t\t</svg>\n\t\t\t\t\tLink\n\t\t\t\t</ibm-sidenav-item>\n\t\t\t\t<ibm-sidenav-item [route]=\"['bar']\">\n\t\t\t\t\t<svg icon width=\"20\" height=\"20\" xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 32 32\" aria-hidden=\"true\">\n\t\t\t\t\t\t<path\n\t\t\t\t\t\t\td=\"M8.24 25.14L7 26.67a14 14 0 0 0 4.18 2.44l.68-1.88a12\n\t\t\t\t\t\t\t12 0 0 1-3.62-2.09zm-4.05-7.07l-2 .35A13.89 13.89 0 0 0 3.86\n\t\t\t\t\t\t\t23l1.73-1a11.9 11.9 0 0 1-1.4-3.93zm7.63-13.31l-.68-1.88A14\n\t\t\t\t\t\t\t14 0 0 0 7 5.33l1.24 1.53a12 12 0 0 1 3.58-2.1zM5.59\n\t\t\t\t\t\t\t10L3.86 9a13.89 13.89 0 0 0-1.64 4.54l2 .35A11.9 11.9 0 0 1 5.59\n\t\t\t\t\t\t\t10zM16 2v2a12 12 0 0 1 0 24v2a14 14 0 0 0 0-28z\" />\n\t\t\t\t\t</svg>\n\t\t\t\t\tLink\n\t\t\t\t</ibm-sidenav-item>\n\t\t\t\t<ibm-sidenav-menu title=\"Category title\">\n\t\t\t\t\t<svg icon width=\"20\" height=\"20\" xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 32 32\" aria-hidden=\"true\">\n\t\t\t\t\t\t<path\n\t\t\t\t\t\t\td=\"M8.24 25.14L7 26.67a14 14 0 0 0 4.18 2.44l.68-1.88a12\n\t\t\t\t\t\t\t12 0 0 1-3.62-2.09zm-4.05-7.07l-2 .35A13.89 13.89 0 0 0 3.86\n\t\t\t\t\t\t\t23l1.73-1a11.9 11.9 0 0 1-1.4-3.93zm7.63-13.31l-.68-1.88A14\n\t\t\t\t\t\t\t14 0 0 0 7 5.33l1.24 1.53a12 12 0 0 1 3.58-2.1zM5.59\n\t\t\t\t\t\t\t10L3.86 9a13.89 13.89 0 0 0-1.64 4.54l2 .35A11.9 11.9 0 0 1 5.59\n\t\t\t\t\t\t\t10zM16 2v2a12 12 0 0 1 0 24v2a14 14 0 0 0 0-28z\" />\n\t\t\t\t\t</svg>\n\t\t\t\t\t<ibm-sidenav-item [route]=\"['foo']\">Link</ibm-sidenav-item>\n\t\t\t\t\t<ibm-sidenav-item [route]=\"['bar']\">Link</ibm-sidenav-item>\n\t\t\t\t\t<ibm-sidenav-item [route]=\"['foo']\">Link</ibm-sidenav-item>\n\t\t\t\t</ibm-sidenav-menu>\n\t\t\t</ibm-sidenav>\n\t\t\t<div>\n\t\t\t\t<router-outlet></router-outlet>\n\t\t\t</div>\n\t\t"
|
|
24305
24495
|
}); })
|
|
24306
24496
|
.add("Together", function () { return ({
|
|
24307
24497
|
template: "\n\t\t\t<ibm-header name=\"[Platform]\">\n\t\t\t\t<ibm-hamburger *ngIf=\"hasHamburger\" [active]=\"active\" (selected)=\"selected()\"></ibm-hamburger>\n\t\t\t\t<ibm-header-navigation>\n\t\t\t\t\t<ibm-header-item>Catalog</ibm-header-item>\n\t\t\t\t\t<ibm-header-item>Docs</ibm-header-item>\n\t\t\t\t\t<ibm-header-item>Support</ibm-header-item>\n\t\t\t\t\t<ibm-header-menu title=\"Manage\">\n\t\t\t\t\t\t<ibm-header-item>Link 1</ibm-header-item>\n\t\t\t\t\t\t<ibm-header-item>Link 2</ibm-header-item>\n\t\t\t\t\t\t<ibm-header-item>Link 3</ibm-header-item>\n\t\t\t\t\t</ibm-header-menu>\n\t\t\t\t</ibm-header-navigation>\n\t\t\t\t<ibm-header-global>\n\t\t\t\t\t<ibm-header-action #firstAction title=\"action\">\n\t\t\t\t\t\t<svg class=\"bx--navigation-menu-panel-expand-icon\"\n\t\t\t\t\t\t\twidth=\"20\" height=\"20\" xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 32 32\" aria-hidden=\"true\">\n\t\t\t\t\t\t\t<path\n\t\t\t\t\t\t\t\td=\"M8.24 25.14L7 26.67a14 14 0 0 0 4.18 2.44l.68-1.88a12\n\t\t\t\t\t\t\t\t12 0 0 1-3.62-2.09zm-4.05-7.07l-2 .35A13.89 13.89 0 0 0 3.86\n\t\t\t\t\t\t\t\t23l1.73-1a11.9 11.9 0 0 1-1.4-3.93zm7.63-13.31l-.68-1.88A14\n\t\t\t\t\t\t\t\t14 0 0 0 7 5.33l1.24 1.53a12 12 0 0 1 3.58-2.1zM5.59\n\t\t\t\t\t\t\t\t10L3.86 9a13.89 13.89 0 0 0-1.64 4.54l2 .35A11.9 11.9 0 0 1 5.59\n\t\t\t\t\t\t\t\t10zM16 2v2a12 12 0 0 1 0 24v2a14 14 0 0 0 0-28z\" />\n\t\t\t\t\t\t</svg>\n\t\t\t\t\t</ibm-header-action>\n\t\t\t\t\t<ibm-header-action #secondAction title=\"action\">\n\t\t\t\t\t\t<svg\n\t\t\t\t\t\t\tclass=\"bx--navigation-menu-panel-expand-icon\"\n\t\t\t\t\t\t\twidth=\"20\"\n\t\t\t\t\t\t\theight=\"20\" xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 32 32\" aria-hidden=\"true\">\n\t\t\t\t\t\t\t<path\n\t\t\t\t\t\t\t\td=\"M8.24 25.14L7 26.67a14 14 0 0 0 4.18 2.44l.68-1.88a12\n\t\t\t\t\t\t\t\t12 0 0 1-3.62-2.09zm-4.05-7.07l-2 .35A13.89 13.89 0 0 0 3.86\n\t\t\t\t\t\t\t\t23l1.73-1a11.9 11.9 0 0 1-1.4-3.93zm7.63-13.31l-.68-1.88A14\n\t\t\t\t\t\t\t\t14 0 0 0 7 5.33l1.24 1.53a12 12 0 0 1 3.58-2.1zM5.59\n\t\t\t\t\t\t\t\t10L3.86 9a13.89 13.89 0 0 0-1.64 4.54l2 .35A11.9 11.9 0 0 1 5.59\n\t\t\t\t\t\t\t\t10zM16 2v2a12 12 0 0 1 0 24v2a14 14 0 0 0 0-28z\" />\n\t\t\t\t\t\t</svg>\n\t\t\t\t\t</ibm-header-action>\n\t\t\t\t</ibm-header-global>\n\t\t\t</ibm-header>\n\t\t\t<ibm-sidenav [expanded]=\"active\">\n\t\t\t\t<ibm-sidenav-item>\n\t\t\t\t\t<svg icon width=\"20\" height=\"20\" xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 32 32\" aria-hidden=\"true\">\n\t\t\t\t\t\t<path\n\t\t\t\t\t\t\td=\"M8.24 25.14L7 26.67a14 14 0 0 0 4.18 2.44l.68-1.88a12\n\t\t\t\t\t\t\t12 0 0 1-3.62-2.09zm-4.05-7.07l-2 .35A13.89 13.89 0 0 0 3.86\n\t\t\t\t\t\t\t23l1.73-1a11.9 11.9 0 0 1-1.4-3.93zm7.63-13.31l-.68-1.88A14\n\t\t\t\t\t\t\t14 0 0 0 7 5.33l1.24 1.53a12 12 0 0 1 3.58-2.1zM5.59\n\t\t\t\t\t\t\t10L3.86 9a13.89 13.89 0 0 0-1.64 4.54l2 .35A11.9 11.9 0 0 1 5.59\n\t\t\t\t\t\t\t10zM16 2v2a12 12 0 0 1 0 24v2a14 14 0 0 0 0-28z\" />\n\t\t\t\t\t</svg>\n\t\t\t\t\tLink\n\t\t\t\t</ibm-sidenav-item>\n\t\t\t\t<ibm-sidenav-item>\n\t\t\t\t\t<svg icon width=\"20\" height=\"20\" xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 32 32\" aria-hidden=\"true\">\n\t\t\t\t\t\t<path\n\t\t\t\t\t\t\td=\"M8.24 25.14L7 26.67a14 14 0 0 0 4.18 2.44l.68-1.88a12\n\t\t\t\t\t\t\t12 0 0 1-3.62-2.09zm-4.05-7.07l-2 .35A13.89 13.89 0 0 0 3.86\n\t\t\t\t\t\t\t23l1.73-1a11.9 11.9 0 0 1-1.4-3.93zm7.63-13.31l-.68-1.88A14\n\t\t\t\t\t\t\t14 0 0 0 7 5.33l1.24 1.53a12 12 0 0 1 3.58-2.1zM5.59\n\t\t\t\t\t\t\t10L3.86 9a13.89 13.89 0 0 0-1.64 4.54l2 .35A11.9 11.9 0 0 1 5.59\n\t\t\t\t\t\t\t10zM16 2v2a12 12 0 0 1 0 24v2a14 14 0 0 0 0-28z\" />\n\t\t\t\t\t</svg>\n\t\t\t\t\tLink\n\t\t\t\t</ibm-sidenav-item>\n\t\t\t\t<ibm-sidenav-menu title=\"Category title\">\n\t\t\t\t\t<svg icon width=\"20\" height=\"20\" xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 32 32\" aria-hidden=\"true\">\n\t\t\t\t\t\t<path\n\t\t\t\t\t\t\td=\"M8.24 25.14L7 26.67a14 14 0 0 0 4.18 2.44l.68-1.88a12\n\t\t\t\t\t\t\t12 0 0 1-3.62-2.09zm-4.05-7.07l-2 .35A13.89 13.89 0 0 0 3.86\n\t\t\t\t\t\t\t23l1.73-1a11.9 11.9 0 0 1-1.4-3.93zm7.63-13.31l-.68-1.88A14\n\t\t\t\t\t\t\t14 0 0 0 7 5.33l1.24 1.53a12 12 0 0 1 3.58-2.1zM5.59\n\t\t\t\t\t\t\t10L3.86 9a13.89 13.89 0 0 0-1.64 4.54l2 .35A11.9 11.9 0 0 1 5.59\n\t\t\t\t\t\t\t10zM16 2v2a12 12 0 0 1 0 24v2a14 14 0 0 0 0-28z\" />\n\t\t\t\t\t</svg>\n\t\t\t\t\t<ibm-sidenav-item>Link</ibm-sidenav-item>\n\t\t\t\t\t<ibm-sidenav-item>Link</ibm-sidenav-item>\n\t\t\t\t\t<ibm-sidenav-item>Link</ibm-sidenav-item>\n\t\t\t\t</ibm-sidenav-menu>\n\t\t\t</ibm-sidenav>\n\t\t\t<ibm-panel [expanded]=\"firstAction.active\"></ibm-panel>\n\t\t\t<ibm-panel [expanded]=\"secondAction.active\">\n\t\t\t\t<ibm-switcher-list>\n\t\t\t\t\t<ibm-switcher-list-item active=\"true\">Switcher item one</ibm-switcher-list-item>\n\t\t\t\t\t<ibm-switcher-list-item>Switcher item two</ibm-switcher-list-item>\n\t\t\t\t\t<ibm-switcher-list-item>Switcher item three</ibm-switcher-list-item>\n\t\t\t\t\t<ibm-switcher-list-item>Switcher item four</ibm-switcher-list-item>\n\t\t\t\t</ibm-switcher-list>\n\t\t\t</ibm-panel>\n\t\t",
|
|
@@ -24375,6 +24565,69 @@ var merge = function (target) {
|
|
|
24375
24565
|
};
|
|
24376
24566
|
|
|
24377
24567
|
|
|
24568
|
+
/***/ }),
|
|
24569
|
+
|
|
24570
|
+
/***/ "./src/utils/scroll.ts":
|
|
24571
|
+
/*!*****************************!*\
|
|
24572
|
+
!*** ./src/utils/scroll.ts ***!
|
|
24573
|
+
\*****************************/
|
|
24574
|
+
/*! exports provided: isScrollableElement, isVisibleInContainer, scrollableParentsObservable */
|
|
24575
|
+
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
24576
|
+
|
|
24577
|
+
"use strict";
|
|
24578
|
+
__webpack_require__.r(__webpack_exports__);
|
|
24579
|
+
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "isScrollableElement", function() { return isScrollableElement; });
|
|
24580
|
+
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "isVisibleInContainer", function() { return isVisibleInContainer; });
|
|
24581
|
+
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "scrollableParentsObservable", function() { return scrollableParentsObservable; });
|
|
24582
|
+
/* harmony import */ var rxjs_operators__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! rxjs/operators */ "./node_modules/rxjs/_esm5/operators/index.js");
|
|
24583
|
+
/* harmony import */ var rxjs__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! rxjs */ "./node_modules/rxjs/_esm5/index.js");
|
|
24584
|
+
|
|
24585
|
+
|
|
24586
|
+
/**
|
|
24587
|
+
* Checks if a given element is scrollable.
|
|
24588
|
+
* If the element has an overflow set as part of its computed style it can scroll.
|
|
24589
|
+
* @param element the element to check scrollability
|
|
24590
|
+
*/
|
|
24591
|
+
var isScrollableElement = function (element) {
|
|
24592
|
+
var computedStyle = getComputedStyle(element);
|
|
24593
|
+
return (computedStyle.overflow === "auto" ||
|
|
24594
|
+
computedStyle.overflow === "scroll" ||
|
|
24595
|
+
computedStyle["overflow-y"] === "auto" ||
|
|
24596
|
+
computedStyle["overflow-y"] === "scroll" ||
|
|
24597
|
+
computedStyle["overflow-x"] === "auto" ||
|
|
24598
|
+
computedStyle["overflow-x"] === "scroll");
|
|
24599
|
+
};
|
|
24600
|
+
/**
|
|
24601
|
+
* Checks if an element is visible within a container
|
|
24602
|
+
* @param element the element to check
|
|
24603
|
+
* @param container the container to check
|
|
24604
|
+
*/
|
|
24605
|
+
var isVisibleInContainer = function (element, container) {
|
|
24606
|
+
var elementRect = element.getBoundingClientRect();
|
|
24607
|
+
var containerRect = container.getBoundingClientRect();
|
|
24608
|
+
return elementRect.bottom <= containerRect.bottom && elementRect.top >= containerRect.top;
|
|
24609
|
+
};
|
|
24610
|
+
/**
|
|
24611
|
+
* Returns an observable that emits whenever any scrollable parent element scrolls
|
|
24612
|
+
*
|
|
24613
|
+
* @param node root element to start finding scrolling parents from
|
|
24614
|
+
*/
|
|
24615
|
+
var scrollableParentsObservable = function (node) {
|
|
24616
|
+
var windowScroll = Object(rxjs__WEBPACK_IMPORTED_MODULE_1__["fromEvent"])(window, "scroll").pipe(Object(rxjs_operators__WEBPACK_IMPORTED_MODULE_0__["map"])(function (event) { return (
|
|
24617
|
+
// update the event target to be something useful. In this case `body` is a sensible replacement
|
|
24618
|
+
Object.assign({}, event, { target: document.body })); }));
|
|
24619
|
+
var observables = [windowScroll];
|
|
24620
|
+
// walk the parents and subscribe to all the scroll events we can
|
|
24621
|
+
while (node.parentElement && node !== document.body) {
|
|
24622
|
+
if (isScrollableElement(node)) {
|
|
24623
|
+
observables.push(Object(rxjs__WEBPACK_IMPORTED_MODULE_1__["fromEvent"])(node, "scroll"));
|
|
24624
|
+
}
|
|
24625
|
+
node = node.parentElement;
|
|
24626
|
+
}
|
|
24627
|
+
return rxjs__WEBPACK_IMPORTED_MODULE_1__["merge"].apply(void 0, observables);
|
|
24628
|
+
};
|
|
24629
|
+
|
|
24630
|
+
|
|
24378
24631
|
/***/ }),
|
|
24379
24632
|
|
|
24380
24633
|
/***/ "./src/utils/utils.ts":
|
|
@@ -24448,4 +24701,4 @@ module.exports = __webpack_require__(/*! /home/travis/build/IBM/carbon-component
|
|
|
24448
24701
|
/***/ })
|
|
24449
24702
|
|
|
24450
24703
|
},[[0,"runtime~main","vendors~main"]]]);
|
|
24451
|
-
//# sourceMappingURL=main.
|
|
24704
|
+
//# sourceMappingURL=main.d9349fe343a2c719f60b.bundle.js.map
|