carbon-components-angular 5.23.2 → 5.24.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/docs/documentation/components/Table.html +131 -130
- package/docs/documentation/components/Tooltip.html +63 -29
- package/docs/documentation/components/TooltipDefinition.html +52 -18
- package/docs/documentation/coverage.html +6 -6
- package/docs/documentation/js/search/search_index.js +2 -2
- package/docs/documentation/modules/ToggleModule/dependencies.svg +4 -4
- package/docs/documentation/modules/ToggleModule.html +4 -4
- package/docs/documentation/modules/ToggletipModule/dependencies.svg +4 -4
- package/docs/documentation/modules/ToggletipModule.html +4 -4
- package/docs/documentation/modules/TooltipModule/dependencies.svg +4 -4
- package/docs/documentation/modules/TooltipModule.html +4 -4
- package/docs/documentation/modules/TreeviewModule/dependencies.svg +4 -4
- package/docs/documentation/modules/TreeviewModule.html +4 -4
- package/docs/documentation.json +164 -144
- package/docs/storybook/{4578.0721a3f2.iframe.bundle.js → 4578.2ddca843.iframe.bundle.js} +1 -1
- package/docs/storybook/5868.9e6e15e4.iframe.bundle.js +1 -0
- package/docs/storybook/{button-icon-button-stories.fe454546.iframe.bundle.js → button-icon-button-stories.19a7bba3.iframe.bundle.js} +1 -1
- package/docs/storybook/iframe.html +2 -2
- package/docs/storybook/{main.2d2aac90.iframe.bundle.js → main.7445afdc.iframe.bundle.js} +1 -1
- package/docs/storybook/project.json +1 -1
- package/docs/storybook/{runtime~main.c5140788.iframe.bundle.js → runtime~main.f7ceaed5.iframe.bundle.js} +1 -1
- package/docs/storybook/tooltip-definition-tooptip-stories.d4d53243.iframe.bundle.js +1 -0
- package/docs/storybook/tooltip-tooltip-stories.fafd3535.iframe.bundle.js +1 -0
- package/esm2020/button/icon-button.component.mjs +1 -1
- package/esm2020/table/table.component.mjs +3 -5
- package/esm2020/tooltip/definition-tooptip.component.mjs +6 -4
- package/esm2020/tooltip/tooltip.component.mjs +6 -4
- package/fesm2015/carbon-components-angular-button.mjs +1 -1
- package/fesm2015/carbon-components-angular-button.mjs.map +1 -1
- package/fesm2015/carbon-components-angular-table.mjs +3 -4
- package/fesm2015/carbon-components-angular-table.mjs.map +1 -1
- package/fesm2015/carbon-components-angular-tooltip.mjs +10 -6
- package/fesm2015/carbon-components-angular-tooltip.mjs.map +1 -1
- package/fesm2020/carbon-components-angular-button.mjs +1 -1
- package/fesm2020/carbon-components-angular-button.mjs.map +1 -1
- package/fesm2020/carbon-components-angular-table.mjs +2 -4
- package/fesm2020/carbon-components-angular-table.mjs.map +1 -1
- package/fesm2020/carbon-components-angular-tooltip.mjs +10 -6
- package/fesm2020/carbon-components-angular-tooltip.mjs.map +1 -1
- package/package.json +1 -1
- package/tooltip/definition-tooptip.component.d.ts +5 -1
- package/tooltip/tooltip.component.d.ts +5 -1
- package/docs/storybook/5868.f5a4be2e.iframe.bundle.js +0 -1
- package/docs/storybook/tooltip-definition-tooptip-stories.af07fda0.iframe.bundle.js +0 -1
- package/docs/storybook/tooltip-tooltip-stories.18664f1b.iframe.bundle.js +0 -1
|
@@ -90,7 +90,7 @@ class Tooltip extends PopoverContainer {
|
|
|
90
90
|
}
|
|
91
91
|
Tooltip.tooltipCount = 0;
|
|
92
92
|
Tooltip.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: Tooltip, deps: [{ token: i0.ElementRef }, { token: i0.NgZone }, { token: i0.Renderer2 }, { token: i0.ChangeDetectorRef }], target: i0.ɵɵFactoryTarget.Component });
|
|
93
|
-
Tooltip.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.3.0", type: Tooltip, selector: "cds-tooltip, ibm-tooltip", inputs: { id: "id", enterDelayMs: "enterDelayMs", leaveDelayMs: "leaveDelayMs", disabled: "disabled", description: "description" }, host: { listeners: { "mouseenter": "mouseenter($event)", "mouseleave": "mouseleave($event)", "keyup": "hostkeys($event)", "focusin": "handleFocus($event)", "focusout": "handleFocusOut($event)" }, properties: { "class.cds--tooltip": "this.tooltipClass" } }, viewQueries: [{ propertyName: "wrapper", first: true, predicate: ["contentWrapper"], descendants: true }], usesInheritance: true, ngImport: i0, template: `
|
|
93
|
+
Tooltip.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.3.0", type: Tooltip, selector: "cds-tooltip, ibm-tooltip", inputs: { id: "id", enterDelayMs: "enterDelayMs", leaveDelayMs: "leaveDelayMs", disabled: "disabled", description: "description", templateContext: "templateContext" }, host: { listeners: { "mouseenter": "mouseenter($event)", "mouseleave": "mouseleave($event)", "keyup": "hostkeys($event)", "focusin": "handleFocus($event)", "focusout": "handleFocusOut($event)" }, properties: { "class.cds--tooltip": "this.tooltipClass" } }, viewQueries: [{ propertyName: "wrapper", first: true, predicate: ["contentWrapper"], descendants: true }], usesInheritance: true, ngImport: i0, template: `
|
|
94
94
|
<span #contentWrapper>
|
|
95
95
|
<ng-content></ng-content>
|
|
96
96
|
</span>
|
|
@@ -103,7 +103,7 @@ Tooltip.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.3
|
|
|
103
103
|
<ng-container *ngIf="!disabled">
|
|
104
104
|
<span class="cds--popover-content cds--tooltip-content">
|
|
105
105
|
<ng-container *ngIf="!isTemplate(description)">{{description}}</ng-container>
|
|
106
|
-
<ng-template *ngIf="isTemplate(description)" [ngTemplateOutlet]="description"></ng-template>
|
|
106
|
+
<ng-template *ngIf="isTemplate(description)" [ngTemplateOutlet]="description" [ngTemplateOutletContext]="{ $implicit: templateContext }"></ng-template>
|
|
107
107
|
<span *ngIf="autoAlign" class="cds--popover-caret cds--popover--auto-align"></span>
|
|
108
108
|
</span>
|
|
109
109
|
<span *ngIf="!autoAlign" class="cds--popover-caret"></span>
|
|
@@ -128,7 +128,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.3.0", ngImpor
|
|
|
128
128
|
<ng-container *ngIf="!disabled">
|
|
129
129
|
<span class="cds--popover-content cds--tooltip-content">
|
|
130
130
|
<ng-container *ngIf="!isTemplate(description)">{{description}}</ng-container>
|
|
131
|
-
<ng-template *ngIf="isTemplate(description)" [ngTemplateOutlet]="description"></ng-template>
|
|
131
|
+
<ng-template *ngIf="isTemplate(description)" [ngTemplateOutlet]="description" [ngTemplateOutletContext]="{ $implicit: templateContext }"></ng-template>
|
|
132
132
|
<span *ngIf="autoAlign" class="cds--popover-caret cds--popover--auto-align"></span>
|
|
133
133
|
</span>
|
|
134
134
|
<span *ngIf="!autoAlign" class="cds--popover-caret"></span>
|
|
@@ -149,6 +149,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.3.0", ngImpor
|
|
|
149
149
|
type: Input
|
|
150
150
|
}], description: [{
|
|
151
151
|
type: Input
|
|
152
|
+
}], templateContext: [{
|
|
153
|
+
type: Input
|
|
152
154
|
}], wrapper: [{
|
|
153
155
|
type: ViewChild,
|
|
154
156
|
args: ["contentWrapper"]
|
|
@@ -210,7 +212,7 @@ class TooltipDefinition extends PopoverContainer {
|
|
|
210
212
|
}
|
|
211
213
|
TooltipDefinition.tooltipCount = 0;
|
|
212
214
|
TooltipDefinition.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: TooltipDefinition, deps: [{ token: i0.ElementRef }, { token: i0.NgZone }, { token: i0.Renderer2 }, { token: i0.ChangeDetectorRef }], target: i0.ɵɵFactoryTarget.Component });
|
|
213
|
-
TooltipDefinition.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.3.0", type: TooltipDefinition, selector: "cds-tooltip-definition, ibm-tooltip-definition", inputs: { id: "id", description: "description" }, host: { listeners: { "keyup": "hostkeys($event)", "mouseleave": "mouseleave($event)" } }, usesInheritance: true, ngImport: i0, template: `
|
|
215
|
+
TooltipDefinition.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.3.0", type: TooltipDefinition, selector: "cds-tooltip-definition, ibm-tooltip-definition", inputs: { id: "id", description: "description", templateContext: "templateContext" }, host: { listeners: { "keyup": "hostkeys($event)", "mouseleave": "mouseleave($event)" } }, usesInheritance: true, ngImport: i0, template: `
|
|
214
216
|
<button
|
|
215
217
|
class="cds--definition-term"
|
|
216
218
|
[attr.aria-controls]="id"
|
|
@@ -228,7 +230,7 @@ TooltipDefinition.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", vers
|
|
|
228
230
|
role="tooltip">
|
|
229
231
|
<span class="cds--popover-content cds--definition-tooltip">
|
|
230
232
|
<ng-container *ngIf="!isTemplate(description)">{{description}}</ng-container>
|
|
231
|
-
<ng-template *ngIf="isTemplate(description)" [ngTemplateOutlet]="description"></ng-template>
|
|
233
|
+
<ng-template *ngIf="isTemplate(description)" [ngTemplateOutlet]="description" [ngTemplateOutletContext]="{ $implicit: templateContext }"></ng-template>
|
|
232
234
|
<span *ngIf="autoAlign" class="cds--popover-caret cds--popover--auto-align"></span>
|
|
233
235
|
</span>
|
|
234
236
|
<span *ngIf="!autoAlign" class="cds--popover-caret"></span>
|
|
@@ -257,7 +259,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.3.0", ngImpor
|
|
|
257
259
|
role="tooltip">
|
|
258
260
|
<span class="cds--popover-content cds--definition-tooltip">
|
|
259
261
|
<ng-container *ngIf="!isTemplate(description)">{{description}}</ng-container>
|
|
260
|
-
<ng-template *ngIf="isTemplate(description)" [ngTemplateOutlet]="description"></ng-template>
|
|
262
|
+
<ng-template *ngIf="isTemplate(description)" [ngTemplateOutlet]="description" [ngTemplateOutletContext]="{ $implicit: templateContext }"></ng-template>
|
|
261
263
|
<span *ngIf="autoAlign" class="cds--popover-caret cds--popover--auto-align"></span>
|
|
262
264
|
</span>
|
|
263
265
|
<span *ngIf="!autoAlign" class="cds--popover-caret"></span>
|
|
@@ -268,6 +270,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.3.0", ngImpor
|
|
|
268
270
|
type: Input
|
|
269
271
|
}], description: [{
|
|
270
272
|
type: Input
|
|
273
|
+
}], templateContext: [{
|
|
274
|
+
type: Input
|
|
271
275
|
}], hostkeys: [{
|
|
272
276
|
type: HostListener,
|
|
273
277
|
args: ["keyup", ["$event"]]
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"carbon-components-angular-tooltip.mjs","sources":["../../src/tooltip/tooltip.interface.ts","../../src/tooltip/tooltip.component.ts","../../src/tooltip/definition-tooptip.component.ts","../../src/tooltip/tooltip.module.ts","../../src/tooltip/carbon-components-angular-tooltip.ts"],"sourcesContent":["import { TemplateRef } from \"@angular/core\";\n\nexport type TooltipAlignments = \"top\" | \"top-left\" | \"top-right\" |\n\t\"bottom\" | \"bottom-left\" | \"bottom-right\" |\n\t\"left\" | \"left-bottom\" | \"left-top\" |\n\t\"right\" | \"right-bottom\" | \"right-top\";\n\n/**\n * Tooltip attributes\n */\nexport interface TooltipConfig {\n\t/**\n\t * The string or template content to be exposed by the tooltip.\n\t */\n\tdescription: string | TemplateRef<any>;\n\t/**\n\t * Specify the tooltip alignement\n\t */\n\talign?: TooltipAlignments;\n\t/**\n\t * Set to `false` to hide caret\n\t */\n\tcaret?: boolean;\n\t/**\n\t * Set to `false` to hide shadow\n\t */\n\tdropShadow?: boolean;\n\t/**\n\t * Set to `true` to enable high contrast\n\t */\n\thighContrast?: boolean;\n\t/**\n\t * Set to `true` to have the popover open by default\n\t * Tooltip will not remain open if user interacts with it (mouseenter & leave) or clicks anywhere in window\n\t */\n\tisOpen?: boolean;\n\t/**\n\t * Set delay before tooltip is shown\n\t */\n\tenterDelayMs?: number;\n\t/**\n\t * Set delay when tooltip disappears\n\t */\n\tleaveDelayMs?: number;\n}\n\n/**\n * Default tooltip configuration for components to populate missing interface attributes\n */\nexport const DEFAULT_TOOLTIP_CONFIG = {\n\talign: \"bottom\" as TooltipAlignments,\n\tcaret: true,\n\tdropShadow: true,\n\thighContrast: true,\n\tisOpen: false,\n\tenterDelayMs: 100,\n\tleaveDelayMs: 300\n};\n","import {\n\tAfterContentChecked,\n\tChangeDetectionStrategy,\n\tChangeDetectorRef,\n\tComponent,\n\tElementRef,\n\tHostBinding,\n\tHostListener,\n\tInput,\n\tNgZone,\n\tRenderer2,\n\tTemplateRef,\n\tViewChild\n} from \"@angular/core\";\nimport { PopoverContainer } from \"carbon-components-angular/popover\";\n\n/**\n * Get started with importing the module:\n *\n * ```typescript\n * import { TooltipModule } from 'carbon-components-angular';\n * ```\n *\n * [See demo](../../?path=/story/components-tooltip--basic)\n */\n@Component({\n\tselector: \"cds-tooltip, ibm-tooltip\",\n\tchangeDetection: ChangeDetectionStrategy.OnPush,\n\ttemplate: `\n\t\t<span #contentWrapper>\n\t\t\t<ng-content></ng-content>\n\t\t</span>\n\t\t<span\n\t\t\t*ngIf=\"description\"\n\t\t\tclass=\"cds--popover\"\n\t\t\t[id]=\"id\"\n\t\t\t[attr.aria-hidden]=\"!isOpen\"\n\t\t\trole=\"tooltip\">\n\t\t\t<ng-container *ngIf=\"!disabled\">\n\t\t\t\t<span class=\"cds--popover-content cds--tooltip-content\">\n\t\t\t\t\t<ng-container *ngIf=\"!isTemplate(description)\">{{description}}</ng-container>\n\t\t\t\t\t<ng-template *ngIf=\"isTemplate(description)\" [ngTemplateOutlet]=\"description\"></ng-template>\n\t\t\t\t\t<span *ngIf=\"autoAlign\" class=\"cds--popover-caret cds--popover--auto-align\"></span>\n\t\t\t\t</span>\n\t\t\t\t<span *ngIf=\"!autoAlign\" class=\"cds--popover-caret\"></span>\n\t\t\t</ng-container>\n\t\t</span>\n\t`\n})\nexport class Tooltip extends PopoverContainer implements AfterContentChecked {\n\tstatic tooltipCount = 0;\n\n\t@HostBinding(\"class.cds--tooltip\") tooltipClass = true;\n\n\t@Input() id = `tooltip-${Tooltip.tooltipCount++}`;\n\t/**\n\t * Set delay before tooltip is shown\n\t */\n\t@Input() enterDelayMs = 100;\n\t/**\n\t * Set delay when tooltip disappears\n\t */\n\t@Input() leaveDelayMs = 300;\n\t/**\n\t * Prevent tooltip from showing, used by icon button\n\t */\n\t@Input() disabled = false;\n\t/**\n\t * The string or template content to be exposed by the tooltip.\n\t */\n\t@Input() description: string | TemplateRef<any>;\n\n\t@ViewChild(\"contentWrapper\") wrapper: ElementRef<HTMLSpanElement>;\n\n\tconstructor(\n\t\tprotected elementRef: ElementRef,\n\t\tprotected ngZone: NgZone,\n\t\tprotected renderer: Renderer2,\n\t\tprotected changeDetectorRef: ChangeDetectorRef\n\t) {\n\t\tsuper(elementRef, ngZone, renderer, changeDetectorRef);\n\t\tthis.highContrast = true;\n\t\tthis.dropShadow = false;\n\t}\n\n\t@HostListener(\"mouseenter\", [\"$event\"])\n\tmouseenter(event) {\n\t\tsetTimeout(() => {\n\t\t\tthis.handleChange(true, event);\n\t\t}, this.enterDelayMs);\n\t}\n\n\t@HostListener(\"mouseleave\", [\"$event\"])\n\tmouseleave(event) {\n\t\tsetTimeout(() => {\n\t\t\tthis.handleChange(false, event);\n\t\t}, this.leaveDelayMs);\n\t}\n\n\t@HostListener(\"keyup\", [\"$event\"])\n\thostkeys(event: KeyboardEvent) {\n\t\tif (open && event.key === \"Escape\") {\n\t\t\tevent.stopPropagation();\n\t\t\tthis.handleChange(false, event);\n\t\t}\n\t}\n\n\t// We are not focusing on entire popover, only the trigger\n\t@HostListener(\"focusin\", [\"$event\"])\n\thandleFocus(event: Event) {\n\t\tthis.handleChange(true, event);\n\t}\n\n\t@HostListener(\"focusout\", [\"$event\"])\n\thandleFocusOut(event: Event) {\n\t\tthis.handleChange(false, event);\n\t}\n\n\tisTemplate(value) {\n\t\treturn value instanceof TemplateRef;\n\t}\n\n\t/**\n\t * Check for any changes in the projected content & apply accessibility attribute if needed\n\t */\n\tngAfterContentChecked() {\n\t\tif (this.wrapper) {\n\t\t\tconst buttonElement = this.wrapper.nativeElement.querySelector(\"button\");\n\t\t\tif (buttonElement && !buttonElement.getAttribute(\"aria-labelledby\")) {\n\t\t\t\tbuttonElement.setAttribute(\"aria-labelledby\", this.id);\n\t\t\t}\n\t\t}\n\t}\n}\n","import {\n\tChangeDetectionStrategy,\n\tChangeDetectorRef,\n\tComponent,\n\tElementRef,\n\tHostListener,\n\tInput,\n\tNgZone,\n\tRenderer2,\n\tTemplateRef\n} from \"@angular/core\";\nimport { PopoverContainer } from \"carbon-components-angular/popover\";\n\n/**\n * Get started with importing the module:\n *\n * ```typescript\n * import { TooltipModule } from 'carbon-components-angular';\n * ```\n *\n * [See demo](../../?path=/story/components-tooltip-definition--basic)\n */\n@Component({\n\tselector: \"cds-tooltip-definition, ibm-tooltip-definition\",\n\tchangeDetection: ChangeDetectionStrategy.OnPush,\n\ttemplate: `\n\t\t<button\n\t\t\tclass=\"cds--definition-term\"\n\t\t\t[attr.aria-controls]=\"id\"\n\t\t\t[attr.aria-expanded]=\"isOpen\"\n\t\t\t(blur)=\"onBlur($event)\"\n\t\t\t(click)=\"onClick($event)\"\n\t\t\ttype=\"button\">\n\t\t\t<ng-content></ng-content>\n\t\t</button>\n\t\t<span\n\t\t\t*ngIf=\"description\"\n\t\t\tclass=\"cds--popover\"\n\t\t\t[id]=\"id\"\n\t\t\t[attr.aria-hidden]=\"isOpen\"\n\t\t\trole=\"tooltip\">\n\t\t\t<span class=\"cds--popover-content cds--definition-tooltip\">\n\t\t\t\t<ng-container *ngIf=\"!isTemplate(description)\">{{description}}</ng-container>\n\t\t\t\t<ng-template *ngIf=\"isTemplate(description)\" [ngTemplateOutlet]=\"description\"></ng-template>\n\t\t\t\t<span *ngIf=\"autoAlign\" class=\"cds--popover-caret cds--popover--auto-align\"></span>\n\t\t\t</span>\n\t\t\t<span *ngIf=\"!autoAlign\" class=\"cds--popover-caret\"></span>\n\t\t</span>\n\t`\n})\nexport class TooltipDefinition extends PopoverContainer {\n\tstatic tooltipCount = 0;\n\n\t@Input() id = `tooltip-definition-${TooltipDefinition.tooltipCount++}`;\n\n\t/**\n\t * The string or template content to be exposed by the tooltip.\n\t */\n\t@Input() description: string | TemplateRef<any>;\n\n\tconstructor(\n\t\tprotected elementRef: ElementRef,\n\t\tprotected ngZone: NgZone,\n\t\tprotected renderer: Renderer2,\n\t\tprotected changeDetectorRef: ChangeDetectorRef\n\t) {\n\t\tsuper(elementRef, ngZone, renderer, changeDetectorRef);\n\t\tthis.highContrast = true;\n\t\tthis.dropShadow = false;\n\t}\n\n\tonBlur(event: Event) {\n\t\tthis.handleChange(false, event);\n\t}\n\n\tonClick(event: Event) {\n\t\tthis.handleChange(!this.isOpen, event);\n\t}\n\n\t@HostListener(\"keyup\", [\"$event\"])\n\thostkeys(event: KeyboardEvent) {\n\t\tif (this.isOpen && event.key === \"Escape\") {\n\t\t\tevent.stopPropagation();\n\t\t\tthis.handleChange(false, event);\n\t\t}\n\t}\n\n\t@HostListener(\"mouseleave\", [\"$event\"])\n\tmouseleave(event) {\n\t\tthis.handleChange(false, event);\n\t}\n\n\tpublic isTemplate(value) {\n\t\treturn value instanceof TemplateRef;\n\t}\n}\n","import { NgModule } from \"@angular/core\";\nimport { CommonModule } from \"@angular/common\";\n\nimport { PopoverModule } from \"carbon-components-angular/popover\";\nimport { Tooltip } from \"./tooltip.component\";\nimport { TooltipDefinition } from \"./definition-tooptip.component\";\n\n@NgModule({\n\tdeclarations: [\n\t\tTooltip,\n\t\tTooltipDefinition\n\t],\n\texports: [\n\t\tTooltip,\n\t\tTooltipDefinition\n\t],\n\timports: [CommonModule, PopoverModule]\n})\nexport class TooltipModule {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;AA8CA;;AAEG;AACU,MAAA,sBAAsB,GAAG;AACrC,IAAA,KAAK,EAAE,QAA6B;AACpC,IAAA,KAAK,EAAE,IAAI;AACX,IAAA,UAAU,EAAE,IAAI;AAChB,IAAA,YAAY,EAAE,IAAI;AAClB,IAAA,MAAM,EAAE,KAAK;AACb,IAAA,YAAY,EAAE,GAAG;AACjB,IAAA,YAAY,EAAE,GA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EAAA,CAAA;sBADP,YAAY;uBAAC,OAAO,EAAE,CAAC,QAAQ,CAAC,CAAA;gBASjC,UAAU,EAAA,CAAA;sBADT,YAAY;uBAAC,YAAY,EAAE,CAAC,QAAQ,CAAC,CAAA;;;MCrE1B,aAAa,CAAA;;0GAAb,aAAa,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,QAAA,EAAA,CAAA,CAAA;AAAb,aAAA,CAAA,IAAA,GAAA,EAAA,CAAA,mBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,aAAa,iBATxB,OAAO;AACP,QAAA,iBAAiB,CAMR,EAAA,OAAA,EAAA,CAAA,YAAY,EAAE,aAAa,aAHpC,OAAO;QACP,iBAAiB,CAAA,EAAA,CAAA,CAAA;2GAIN,aAAa,EAAA,OAAA,EAAA,CAFf,YAAY,EAAE,aAAa,CAAA,EAAA,CAAA,CAAA;2FAEzB,aAAa,EAAA,UAAA,EAAA,CAAA;kBAXzB,QAAQ;AAAC,YAAA,IAAA,EAAA,CAAA;AACT,oBAAA,YAAY,EAAE;wBACb,OAAO;wBACP,iBAAiB;AACjB,qBAAA;AACD,oBAAA,OAAO,EAAE;wBACR,OAAO;wBACP,iBAAiB;AACjB,qBAAA;AACD,oBAAA,OAAO,EAAE,CAAC,YAAY,EAAE,aAAa,CAAC;AACtC,iBAAA,CAAA;;;ACjBD;;AAEG;;;;"}
|
|
1
|
+
{"version":3,"file":"carbon-components-angular-tooltip.mjs","sources":["../../src/tooltip/tooltip.interface.ts","../../src/tooltip/tooltip.component.ts","../../src/tooltip/definition-tooptip.component.ts","../../src/tooltip/tooltip.module.ts","../../src/tooltip/carbon-components-angular-tooltip.ts"],"sourcesContent":["import { TemplateRef } from \"@angular/core\";\n\nexport type TooltipAlignments = \"top\" | \"top-left\" | \"top-right\" |\n\t\"bottom\" | \"bottom-left\" | \"bottom-right\" |\n\t\"left\" | \"left-bottom\" | \"left-top\" |\n\t\"right\" | \"right-bottom\" | \"right-top\";\n\n/**\n * Tooltip attributes\n */\nexport interface TooltipConfig {\n\t/**\n\t * The string or template content to be exposed by the tooltip.\n\t */\n\tdescription: string | TemplateRef<any>;\n\t/**\n\t * Specify the tooltip alignement\n\t */\n\talign?: TooltipAlignments;\n\t/**\n\t * Set to `false` to hide caret\n\t */\n\tcaret?: boolean;\n\t/**\n\t * Set to `false` to hide shadow\n\t */\n\tdropShadow?: boolean;\n\t/**\n\t * Set to `true` to enable high contrast\n\t */\n\thighContrast?: boolean;\n\t/**\n\t * Set to `true` to have the popover open by default\n\t * Tooltip will not remain open if user interacts with it (mouseenter & leave) or clicks anywhere in window\n\t */\n\tisOpen?: boolean;\n\t/**\n\t * Set delay before tooltip is shown\n\t */\n\tenterDelayMs?: number;\n\t/**\n\t * Set delay when tooltip disappears\n\t */\n\tleaveDelayMs?: number;\n}\n\n/**\n * Default tooltip configuration for components to populate missing interface attributes\n */\nexport const DEFAULT_TOOLTIP_CONFIG = {\n\talign: \"bottom\" as TooltipAlignments,\n\tcaret: true,\n\tdropShadow: true,\n\thighContrast: true,\n\tisOpen: false,\n\tenterDelayMs: 100,\n\tleaveDelayMs: 300\n};\n","import {\n\tAfterContentChecked,\n\tChangeDetectionStrategy,\n\tChangeDetectorRef,\n\tComponent,\n\tElementRef,\n\tHostBinding,\n\tHostListener,\n\tInput,\n\tNgZone,\n\tRenderer2,\n\tTemplateRef,\n\tViewChild\n} from \"@angular/core\";\nimport { PopoverContainer } from \"carbon-components-angular/popover\";\n\n/**\n * Get started with importing the module:\n *\n * ```typescript\n * import { TooltipModule } from 'carbon-components-angular';\n * ```\n *\n * [See demo](../../?path=/story/components-tooltip--basic)\n */\n@Component({\n\tselector: \"cds-tooltip, ibm-tooltip\",\n\tchangeDetection: ChangeDetectionStrategy.OnPush,\n\ttemplate: `\n\t\t<span #contentWrapper>\n\t\t\t<ng-content></ng-content>\n\t\t</span>\n\t\t<span\n\t\t\t*ngIf=\"description\"\n\t\t\tclass=\"cds--popover\"\n\t\t\t[id]=\"id\"\n\t\t\t[attr.aria-hidden]=\"!isOpen\"\n\t\t\trole=\"tooltip\">\n\t\t\t<ng-container *ngIf=\"!disabled\">\n\t\t\t\t<span class=\"cds--popover-content cds--tooltip-content\">\n\t\t\t\t\t<ng-container *ngIf=\"!isTemplate(description)\">{{description}}</ng-container>\n\t\t\t\t\t<ng-template *ngIf=\"isTemplate(description)\" [ngTemplateOutlet]=\"description\" [ngTemplateOutletContext]=\"{ $implicit: templateContext }\"></ng-template>\n\t\t\t\t\t<span *ngIf=\"autoAlign\" class=\"cds--popover-caret cds--popover--auto-align\"></span>\n\t\t\t\t</span>\n\t\t\t\t<span *ngIf=\"!autoAlign\" class=\"cds--popover-caret\"></span>\n\t\t\t</ng-container>\n\t\t</span>\n\t`\n})\nexport class Tooltip extends PopoverContainer implements AfterContentChecked {\n\tstatic tooltipCount = 0;\n\n\t@HostBinding(\"class.cds--tooltip\") tooltipClass = true;\n\n\t@Input() id = `tooltip-${Tooltip.tooltipCount++}`;\n\t/**\n\t * Set delay before tooltip is shown\n\t */\n\t@Input() enterDelayMs = 100;\n\t/**\n\t * Set delay when tooltip disappears\n\t */\n\t@Input() leaveDelayMs = 300;\n\t/**\n\t * Prevent tooltip from showing, used by icon button\n\t */\n\t@Input() disabled = false;\n\t/**\n\t * The string or template content to be exposed by the tooltip.\n\t */\n\t@Input() description: string | TemplateRef<any>;\n\t/**\n\t * Optional data for templates passed as implicit context\n\t */\n\t@Input() templateContext: any\n\n\t@ViewChild(\"contentWrapper\") wrapper: ElementRef<HTMLSpanElement>;\n\n\tconstructor(\n\t\tprotected elementRef: ElementRef,\n\t\tprotected ngZone: NgZone,\n\t\tprotected renderer: Renderer2,\n\t\tprotected changeDetectorRef: ChangeDetectorRef\n\t) {\n\t\tsuper(elementRef, ngZone, renderer, changeDetectorRef);\n\t\tthis.highContrast = true;\n\t\tthis.dropShadow = false;\n\t}\n\n\t@HostListener(\"mouseenter\", [\"$event\"])\n\tmouseenter(event) {\n\t\tsetTimeout(() => {\n\t\t\tthis.handleChange(true, event);\n\t\t}, this.enterDelayMs);\n\t}\n\n\t@HostListener(\"mouseleave\", [\"$event\"])\n\tmouseleave(event) {\n\t\tsetTimeout(() => {\n\t\t\tthis.handleChange(false, event);\n\t\t}, this.leaveDelayMs);\n\t}\n\n\t@HostListener(\"keyup\", [\"$event\"])\n\thostkeys(event: KeyboardEvent) {\n\t\tif (open && event.key === \"Escape\") {\n\t\t\tevent.stopPropagation();\n\t\t\tthis.handleChange(false, event);\n\t\t}\n\t}\n\n\t// We are not focusing on entire popover, only the trigger\n\t@HostListener(\"focusin\", [\"$event\"])\n\thandleFocus(event: Event) {\n\t\tthis.handleChange(true, event);\n\t}\n\n\t@HostListener(\"focusout\", [\"$event\"])\n\thandleFocusOut(event: Event) {\n\t\tthis.handleChange(false, event);\n\t}\n\n\tisTemplate(value) {\n\t\treturn value instanceof TemplateRef;\n\t}\n\n\t/**\n\t * Check for any changes in the projected content & apply accessibility attribute if needed\n\t */\n\tngAfterContentChecked() {\n\t\tif (this.wrapper) {\n\t\t\tconst buttonElement = this.wrapper.nativeElement.querySelector(\"button\");\n\t\t\tif (buttonElement && !buttonElement.getAttribute(\"aria-labelledby\")) {\n\t\t\t\tbuttonElement.setAttribute(\"aria-labelledby\", this.id);\n\t\t\t}\n\t\t}\n\t}\n}\n","import {\n\tChangeDetectionStrategy,\n\tChangeDetectorRef,\n\tComponent,\n\tElementRef,\n\tHostListener,\n\tInput,\n\tNgZone,\n\tRenderer2,\n\tTemplateRef\n} from \"@angular/core\";\nimport { PopoverContainer } from \"carbon-components-angular/popover\";\n\n/**\n * Get started with importing the module:\n *\n * ```typescript\n * import { TooltipModule } from 'carbon-components-angular';\n * ```\n *\n * [See demo](../../?path=/story/components-tooltip-definition--basic)\n */\n@Component({\n\tselector: \"cds-tooltip-definition, ibm-tooltip-definition\",\n\tchangeDetection: ChangeDetectionStrategy.OnPush,\n\ttemplate: `\n\t\t<button\n\t\t\tclass=\"cds--definition-term\"\n\t\t\t[attr.aria-controls]=\"id\"\n\t\t\t[attr.aria-expanded]=\"isOpen\"\n\t\t\t(blur)=\"onBlur($event)\"\n\t\t\t(click)=\"onClick($event)\"\n\t\t\ttype=\"button\">\n\t\t\t<ng-content></ng-content>\n\t\t</button>\n\t\t<span\n\t\t\t*ngIf=\"description\"\n\t\t\tclass=\"cds--popover\"\n\t\t\t[id]=\"id\"\n\t\t\t[attr.aria-hidden]=\"isOpen\"\n\t\t\trole=\"tooltip\">\n\t\t\t<span class=\"cds--popover-content cds--definition-tooltip\">\n\t\t\t\t<ng-container *ngIf=\"!isTemplate(description)\">{{description}}</ng-container>\n\t\t\t\t<ng-template *ngIf=\"isTemplate(description)\" [ngTemplateOutlet]=\"description\" [ngTemplateOutletContext]=\"{ $implicit: templateContext }\"></ng-template>\n\t\t\t\t<span *ngIf=\"autoAlign\" class=\"cds--popover-caret cds--popover--auto-align\"></span>\n\t\t\t</span>\n\t\t\t<span *ngIf=\"!autoAlign\" class=\"cds--popover-caret\"></span>\n\t\t</span>\n\t`\n})\nexport class TooltipDefinition extends PopoverContainer {\n\tstatic tooltipCount = 0;\n\n\t@Input() id = `tooltip-definition-${TooltipDefinition.tooltipCount++}`;\n\n\t/**\n\t * The string or template content to be exposed by the tooltip.\n\t */\n\t@Input() description: string | TemplateRef<any>;\n\t/**\n\t * Optional data for templates passed as implicit context\n\t */\n\t@Input() templateContext: any;\n\n\tconstructor(\n\t\tprotected elementRef: ElementRef,\n\t\tprotected ngZone: NgZone,\n\t\tprotected renderer: Renderer2,\n\t\tprotected changeDetectorRef: ChangeDetectorRef\n\t) {\n\t\tsuper(elementRef, ngZone, renderer, changeDetectorRef);\n\t\tthis.highContrast = true;\n\t\tthis.dropShadow = false;\n\t}\n\n\tonBlur(event: Event) {\n\t\tthis.handleChange(false, event);\n\t}\n\n\tonClick(event: Event) {\n\t\tthis.handleChange(!this.isOpen, event);\n\t}\n\n\t@HostListener(\"keyup\", [\"$event\"])\n\thostkeys(event: KeyboardEvent) {\n\t\tif (this.isOpen && event.key === \"Escape\") {\n\t\t\tevent.stopPropagation();\n\t\t\tthis.handleChange(false, event);\n\t\t}\n\t}\n\n\t@HostListener(\"mouseleave\", [\"$event\"])\n\tmouseleave(event) {\n\t\tthis.handleChange(false, event);\n\t}\n\n\tpublic isTemplate(value) {\n\t\treturn value instanceof TemplateRef;\n\t}\n}\n","import { NgModule } from \"@angular/core\";\nimport { CommonModule } from \"@angular/common\";\n\nimport { PopoverModule } from \"carbon-components-angular/popover\";\nimport { Tooltip } from \"./tooltip.component\";\nimport { TooltipDefinition } from \"./definition-tooptip.component\";\n\n@NgModule({\n\tdeclarations: [\n\t\tTooltip,\n\t\tTooltipDefinition\n\t],\n\texports: [\n\t\tTooltip,\n\t\tTooltipDefinition\n\t],\n\timports: [CommonModule, PopoverModule]\n})\nexport class TooltipModule {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;AA8CA;;AAEG;AACU,MAAA,sBAAsB,GAAG;AACrC,IAAA,KAAK,EAAE,QAA6B;AACpC,IAAA,KAAK,EAAE,IAAI;AACX,IAAA,UAAU,EAAE,IAAI;AAChB,IAAA,YAAY,EAAE,IAAI;AAClB,IAAA,MAAM,EAAE,KAAK;AACb,IAAA,YAAY,EAAE,GAAG;AACjB,IAAA,YAAY,EAAE,GAAG;;;ACxClB;;;;;;;;AAQG;AAyBG,MAAO,OAAQ,SAAQ,gBAAgB,CAAA;AA6B5C,IAAA,WAAA,CACW,UAAsB,EACtB,MAAc,EACd,QAAmB,EACnB,iBAAoC,EAAA;QAE9C,KAAK,CAAC,UAAU,EAAE,MAAM,EAAE,QAAQ,EAAE,iBAAiB,CAAC,CAAC;QAL7C,IAAU,CAAA,UAAA,GAAV,UAAU,CAAY;QACtB,IAAM,CAAA,MAAA,GAAN,MAAM,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A;;0GAAb,aAAa,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,QAAA,EAAA,CAAA,CAAA;AAAb,aAAA,CAAA,IAAA,GAAA,EAAA,CAAA,mBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,aAAa,iBATxB,OAAO;AACP,QAAA,iBAAiB,CAMR,EAAA,OAAA,EAAA,CAAA,YAAY,EAAE,aAAa,aAHpC,OAAO;QACP,iBAAiB,CAAA,EAAA,CAAA,CAAA;2GAIN,aAAa,EAAA,OAAA,EAAA,CAFf,YAAY,EAAE,aAAa,CAAA,EAAA,CAAA,CAAA;2FAEzB,aAAa,EAAA,UAAA,EAAA,CAAA;kBAXzB,QAAQ;AAAC,YAAA,IAAA,EAAA,CAAA;AACT,oBAAA,YAAY,EAAE;wBACb,OAAO;wBACP,iBAAiB;AACjB,qBAAA;AACD,oBAAA,OAAO,EAAE;wBACR,OAAO;wBACP,iBAAiB;AACjB,qBAAA;AACD,oBAAA,OAAO,EAAE,CAAC,YAAY,EAAE,aAAa,CAAC;AACtC,iBAAA,CAAA;;;ACjBD;;AAEG;;;;"}
|
package/package.json
CHANGED
|
@@ -41,6 +41,10 @@ export declare class TooltipDefinition extends PopoverContainer {
|
|
|
41
41
|
* The string or template content to be exposed by the tooltip.
|
|
42
42
|
*/
|
|
43
43
|
description: string | TemplateRef<any>;
|
|
44
|
+
/**
|
|
45
|
+
* Optional data for templates passed as implicit context
|
|
46
|
+
*/
|
|
47
|
+
templateContext: any;
|
|
44
48
|
constructor(elementRef: ElementRef, ngZone: NgZone, renderer: Renderer2, changeDetectorRef: ChangeDetectorRef);
|
|
45
49
|
onBlur(event: Event): void;
|
|
46
50
|
onClick(event: Event): void;
|
|
@@ -48,5 +52,5 @@ export declare class TooltipDefinition extends PopoverContainer {
|
|
|
48
52
|
mouseleave(event: any): void;
|
|
49
53
|
isTemplate(value: any): boolean;
|
|
50
54
|
static ɵfac: i0.ɵɵFactoryDeclaration<TooltipDefinition, never>;
|
|
51
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<TooltipDefinition, "cds-tooltip-definition, ibm-tooltip-definition", never, { "id": "id"; "description": "description"; }, {}, never, ["*"], false>;
|
|
55
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<TooltipDefinition, "cds-tooltip-definition, ibm-tooltip-definition", never, { "id": "id"; "description": "description"; "templateContext": "templateContext"; }, {}, never, ["*"], false>;
|
|
52
56
|
}
|
|
@@ -54,6 +54,10 @@ export declare class Tooltip extends PopoverContainer implements AfterContentChe
|
|
|
54
54
|
* The string or template content to be exposed by the tooltip.
|
|
55
55
|
*/
|
|
56
56
|
description: string | TemplateRef<any>;
|
|
57
|
+
/**
|
|
58
|
+
* Optional data for templates passed as implicit context
|
|
59
|
+
*/
|
|
60
|
+
templateContext: any;
|
|
57
61
|
wrapper: ElementRef<HTMLSpanElement>;
|
|
58
62
|
constructor(elementRef: ElementRef, ngZone: NgZone, renderer: Renderer2, changeDetectorRef: ChangeDetectorRef);
|
|
59
63
|
mouseenter(event: any): void;
|
|
@@ -67,5 +71,5 @@ export declare class Tooltip extends PopoverContainer implements AfterContentChe
|
|
|
67
71
|
*/
|
|
68
72
|
ngAfterContentChecked(): void;
|
|
69
73
|
static ɵfac: i0.ɵɵFactoryDeclaration<Tooltip, never>;
|
|
70
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<Tooltip, "cds-tooltip, ibm-tooltip", never, { "id": "id"; "enterDelayMs": "enterDelayMs"; "leaveDelayMs": "leaveDelayMs"; "disabled": "disabled"; "description": "description"; }, {}, never, ["*"], false>;
|
|
74
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<Tooltip, "cds-tooltip, ibm-tooltip", never, { "id": "id"; "enterDelayMs": "enterDelayMs"; "leaveDelayMs": "leaveDelayMs"; "disabled": "disabled"; "description": "description"; "templateContext": "templateContext"; }, {}, never, ["*"], false>;
|
|
71
75
|
}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";(self.webpackChunkcarbon_components_angular=self.webpackChunkcarbon_components_angular||[]).push([[5868],{"./src/search/index.ts":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{__webpack_require__.d(__webpack_exports__,{o:()=>Search,t:()=>SearchModule});var tslib_es6=__webpack_require__("./node_modules/tslib/tslib.es6.js"),search_componentngResource=__webpack_require__("./src/search/search.component.html?ngResource"),core=__webpack_require__("./node_modules/@angular/core/fesm2020/core.mjs"),fesm2020_forms=__webpack_require__("./node_modules/@angular/forms/fesm2020/forms.mjs"),i18n=__webpack_require__("./src/i18n/index.ts");let Search=class Search{constructor(elementRef,i18n){this.elementRef=elementRef,this.i18n=i18n,this.theme="dark",this.size="md",this.disabled=!1,this.toolbar=!1,this.expandable=!1,this.skeleton=!1,this.active=!1,this.tableSearch=!1,this.id=`search-${Search.searchCount}`,this.value="",this.autocomplete="on",this.label=this.i18n.get().SEARCH.LABEL,this.placeholder=this.i18n.get().SEARCH.PLACEHOLDER,this.clearButtonTitle=this.i18n.get().SEARCH.CLEAR_BUTTON,this.searchTitle="",this.valueChange=new core.EventEmitter,this.open=new core.EventEmitter,this.clear=new core.EventEmitter,this.search=new core.EventEmitter,this.isComposing=!1,this.onTouched=()=>{},this.propagateChange=_=>{},Search.searchCount++}get containerClass(){return!(this.toolbar||this.expandable)}writeValue(value){this.value=value}registerOnChange(fn){this.propagateChange=fn}registerOnTouched(fn){this.onTouched=fn}onSearch(search){this.isComposing||(this.value=search,this.doValueChange())}onEnter(){this.search.emit(this.value)}clearSearch(){this.value="",this.clear.emit(),this.propagateChange(this.value)}doValueChange(){this.valueChange.emit(this.value),this.propagateChange(this.value)}openSearch(){this.active=!0,this.open.emit(this.active),setTimeout((()=>this.inputRef.nativeElement.focus()))}keyDown(event){(this.toolbar||this.expandable)&&("Escape"===event.key?""===this.value&&(this.active=!1,this.open.emit(this.active)):"Enter"===event.key&&this.openSearch()),"Escape"===event.key&&""!==this.value&&this.clearSearch()}focusOut(event){this.onTouched(),(this.expandable||this.toolbar)&&this.inputRef&&""===this.inputRef.nativeElement.value&&!this.elementRef.nativeElement.contains(event.relatedTarget)&&(this.active=!1,this.open.emit(this.active))}focusIn(event){this.onTouched(),!this.expandable&&!this.toolbar||!this.inputRef||event.relatedTarget||this.elementRef.nativeElement.contains(event.relatedTarget)||this.openSearch()}compositionStart(event){this.isComposing=!0}compositionEnd(event){this.isComposing=!1,this.onSearch(this.value+event.data)}};Search.searchCount=0,Search.ctorParameters=()=>[{type:core.ElementRef},{type:i18n.oc}],Search.propDecorators={containerClass:[{type:core.HostBinding,args:["class.cds--form-item"]}],theme:[{type:core.Input}],size:[{type:core.Input}],disabled:[{type:core.Input}],toolbar:[{type:core.Input}],expandable:[{type:core.Input}],skeleton:[{type:core.Input}],active:[{type:core.Input}],tableSearch:[{type:core.Input}],name:[{type:core.Input}],id:[{type:core.Input}],required:[{type:core.Input}],value:[{type:core.Input}],autocomplete:[{type:core.Input}],label:[{type:core.Input}],placeholder:[{type:core.Input}],clearButtonTitle:[{type:core.Input}],searchTitle:[{type:core.Input}],ariaLabel:[{type:core.Input}],valueChange:[{type:core.Output}],open:[{type:core.Output}],clear:[{type:core.Output}],search:[{type:core.Output}],inputRef:[{type:core.ViewChild,args:["input"]}],keyDown:[{type:core.HostListener,args:["keydown",["$event"]]}],focusOut:[{type:core.HostListener,args:["focusout",["$event"]]}],focusIn:[{type:core.HostListener,args:["focusin",["$event"]]}],compositionStart:[{type:core.HostListener,args:["compositionstart",["$event"]]}],compositionEnd:[{type:core.HostListener,args:["compositionend",["$event"]]}]},Search=(0,tslib_es6.gn)([(0,core.Component)({selector:"cds-search, ibm-search",template:search_componentngResource,providers:[{provide:fesm2020_forms.JU,useExisting:Search,multi:!0}]})],Search);var common=__webpack_require__("./node_modules/@angular/common/fesm2020/common.mjs"),icon=__webpack_require__("./src/icon/index.ts");let SearchModule=class SearchModule{};SearchModule=(0,tslib_es6.gn)([(0,core.NgModule)({declarations:[Search],exports:[Search],imports:[fesm2020_forms.u5,common.CommonModule,i18n.LU,icon.QX]})],SearchModule)},"./src/table/index.ts":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{__webpack_require__.d(__webpack_exports__,{iA:()=>Table,jr:()=>table_header_item_class.j,r8:()=>table_item_class.r,G0:()=>table_model_class.G,U$:()=>TableModule,SC:()=>TableRow});var tslib_es6=__webpack_require__("./node_modules/tslib/tslib.es6.js"),core=__webpack_require__("./node_modules/@angular/core/fesm2020/core.mjs"),i18n=__webpack_require__("./src/i18n/index.ts");let TableToolbar=class TableToolbar{constructor(i18n){this.i18n=i18n,this.size="md",this.cancel=new core.EventEmitter,this.actionBarLabel=this.i18n.getOverridable("TABLE_TOOLBAR.ACTION_BAR"),this._cancelText=this.i18n.getOverridable("TABLE_TOOLBAR.CANCEL"),this._batchTextLegacy=this.i18n.getOverridable("TABLE_TOOLBAR.BATCH_TEXT"),this._batchTextSingle=this.i18n.getOverridable("TABLE_TOOLBAR.BATCH_TEXT_SINGLE"),this._batchTextMultiple=this.i18n.getOverridable("TABLE_TOOLBAR.BATCH_TEXT_MULTIPLE")}set batchText(value){"object"==typeof value?(this._batchTextSingle.override(value.SINGLE),this._batchTextMultiple.override(value.MULTIPLE)):this._batchTextLegacy.override(value)}set ariaLabel(value){this.actionBarLabel.override(value.ACTION_BAR)}set cancelText(value){this._cancelText.override(value.CANCEL)}get cancelText(){return{CANCEL:this._cancelText.value}}get count(){return this.model.totalDataLength>0?this.model.rowsSelected.reduce(((previous,current)=>previous+(current?1:0)),0):0}get selected(){return this.model.totalDataLength>0&&this.model.rowsSelected.some((item=>item))}onCancel(){this.model.selectAll(!1),this.cancel.emit()}};TableToolbar.ctorParameters=()=>[{type:i18n.oc}],TableToolbar.propDecorators={model:[{type:core.Input}],batchText:[{type:core.Input}],ariaLabel:[{type:core.Input}],cancelText:[{type:core.Input}],size:[{type:core.Input}],cancel:[{type:core.Output}]},TableToolbar=(0,tslib_es6.gn)([(0,core.Component)({selector:"cds-table-toolbar, ibm-table-toolbar",template:'\n\t<section\n\t\tclass="cds--table-toolbar"\n\t\t[ngClass]="{\'cds--table-toolbar--sm\' : size === \'sm\'}"\n\t\t[attr.aria-label]="actionBarLabel.subject | async">\n\t\t<div\n\t\t\t*ngIf="model"\n\t\t\tclass="cds--batch-actions"\n\t\t\t[ngClass]="{\n\t\t\t\t\'cds--batch-actions--active\': selected\n\t\t\t}">\n\t\t\t<div class="cds--batch-summary">\n\t\t\t\t<p class="cds--batch-summary__para" *ngIf="count as n">\n\t\t\t\t\t<ng-container *ngIf="_batchTextLegacy.subject | async as legacyText; else batchTextBlock">\n\t\t\t\t\t\t<span>{{n}}</span> {{legacyText}}\n\t\t\t\t\t</ng-container>\n\t\t\t\t\t<ng-template #batchTextBlock>\n\t\t\t\t\t\t<span *ngIf="n === 1">{{_batchTextSingle.subject | async}}</span>\n\t\t\t\t\t\t<span *ngIf="n !== 1">{{_batchTextMultiple.subject | i18nReplace: {count: n} | async}}</span>\n\t\t\t\t\t</ng-template>\n\t\t\t\t</p>\n\t\t\t</div>\n\t\t\t<div class="cds--action-list">\n\t\t\t\t<ng-content select="cds-table-toolbar-actions,ibm-table-toolbar-actions"></ng-content>\n\t\t\t\t<button\n\t\t\t\t\tcdsButton="primary"\n\t\t\t\t\tclass="cds--batch-summary__cancel"\n\t\t\t\t\t[tabindex]="selected ? 0 : -1"\n\t\t\t\t\t(click)="onCancel()">\n\t\t\t\t\t{{_cancelText.subject | async}}\n\t\t\t\t</button>\n\t\t\t</div>\n\t\t</div>\n\t\t<ng-content></ng-content>\n\t</section>\n\t'})],TableToolbar);let TableToolbarActions=class TableToolbarActions{};TableToolbarActions=(0,tslib_es6.gn)([(0,core.Component)({selector:"cds-table-toolbar-actions, ibm-table-toolbar-actions",template:"<ng-content></ng-content>"})],TableToolbarActions);var search_componentngResource=__webpack_require__("./src/search/search.component.html?ngResource"),search=__webpack_require__("./src/search/index.ts"),fesm2020_forms=__webpack_require__("./node_modules/@angular/forms/fesm2020/forms.mjs");let TableToolbarSearch=class TableToolbarSearch extends search.o{constructor(){super(...arguments),this.tableSearch=!0,this.size="lg",this.hostClass=!0}ngAfterViewInit(){setTimeout((()=>{this.value&&this.openSearch()}))}};TableToolbarSearch.propDecorators={hostClass:[{type:core.HostBinding,args:["class.cds--toolbar-content"]}]},TableToolbarSearch=(0,tslib_es6.gn)([(0,core.Component)({selector:"cds-table-toolbar-search, ibm-table-toolbar-search",template:search_componentngResource,providers:[{provide:fesm2020_forms.JU,useExisting:TableToolbarSearch,multi:!0}]})],TableToolbarSearch);let TableToolbarContent=class TableToolbarContent{constructor(){this.class=!0}};TableToolbarContent.propDecorators={class:[{type:core.HostBinding,args:["class.cds--toolbar-content"]}]},TableToolbarContent=(0,tslib_es6.gn)([(0,core.Component)({selector:"cds-table-toolbar-content, ibm-table-toolbar-content",template:"<ng-content></ng-content>"})],TableToolbarContent);let TableHeaderDescription=class TableHeaderDescription{constructor(){this.id="table-description-"+TableHeaderDescription.counter++,this.descriptionClass=!0}};TableHeaderDescription.counter=0,TableHeaderDescription.propDecorators={id:[{type:core.HostBinding,args:["attr.id"]},{type:core.Input}],descriptionClass:[{type:core.HostBinding,args:["class.cds--data-table-header__description"]}]},TableHeaderDescription=(0,tslib_es6.gn)([(0,core.Directive)({selector:"[cdsTableHeaderDescription], [ibmTableHeaderDescription]"})],TableHeaderDescription);let TableHeaderTitle=class TableHeaderTitle{constructor(){this.id="table-title-"+TableHeaderTitle.counter++,this.titleClass=!0}};TableHeaderTitle.counter=0,TableHeaderTitle.propDecorators={id:[{type:core.HostBinding,args:["attr.id"]},{type:core.Input}],titleClass:[{type:core.HostBinding,args:["class.cds--data-table-header__title"]}]},TableHeaderTitle=(0,tslib_es6.gn)([(0,core.Directive)({selector:"[cdsTableHeaderTitle], [ibmTableHeaderTitle]"})],TableHeaderTitle);var TableDomSpanDirection,Subscription=__webpack_require__("./node_modules/rxjs/dist/esm5/internal/Subscription.js"),fromEvent=__webpack_require__("./node_modules/rxjs/dist/esm5/internal/observable/fromEvent.js"),table_model_class=__webpack_require__("./src/table/table-model.class.ts"),table_header_item_class=__webpack_require__("./src/table/table-header-item.class.ts"),table_item_class=__webpack_require__("./src/table/table-item.class.ts"),tab_service=__webpack_require__("./src/common/tab.service.ts"),utils=__webpack_require__("./src/utils/index.ts"),BehaviorSubject=__webpack_require__("./node_modules/rxjs/dist/esm5/internal/BehaviorSubject.js"),combineLatest=__webpack_require__("./node_modules/rxjs/dist/esm5/internal/observable/combineLatest.js"),map=__webpack_require__("./node_modules/rxjs/dist/esm5/internal/operators/map.js");class DataGridInteractionModel{constructor(keyboardEventStream,clickEventStream,tableAdapter){this.keyboardEventStream=keyboardEventStream,this.clickEventStream=clickEventStream,this.tableAdapter=tableAdapter,this.rowSubject=new BehaviorSubject.X({current:0,previous:-1}),this.columnSubject=new BehaviorSubject.X({current:0,previous:-1}),this.rowIndex=this.rowSubject.asObservable(),this.columnIndex=this.columnSubject.asObservable(),this.position=(0,combineLatest.a)(this.rowIndex,this.columnIndex).pipe((0,map.U)((positions=>{const[row,column]=positions;return{current:[row.current,column.current],previous:[row.previous,column.previous]}}))),this.keyboardEventStream.subscribe(this.handleKeyboardEvent.bind(this)),this.clickEventStream.subscribe(this.handleClickEvent.bind(this))}get currentRow(){return this.rowSubject.getValue().current}get currentColumn(){return this.columnSubject.getValue().current}get lastColumn(){return this.tableAdapter.lastColumnIndex}get lastRow(){return this.tableAdapter.lastRowIndex}handleKeyboardEvent(event){const currentCell=this.tableAdapter.getCell(this.currentRow,this.currentColumn);let currentColumn=this.tableAdapter.findColumnIndex(currentCell),currentRow=this.tableAdapter.findRowIndex(currentCell);switch(event.key){case"ArrowRight":event.preventDefault(),this.goToColumn(currentColumn+currentCell.colSpan);break;case"ArrowLeft":event.preventDefault(),this.goToColumn(currentColumn-1);break;case"ArrowDown":event.preventDefault(),this.goToRow(currentRow+currentCell.rowSpan);break;case"ArrowUp":event.preventDefault(),this.goToRow(currentRow-1);break;case"Home":event.preventDefault(),event.ctrlKey?this.goTo({row:0,column:0}):this.goToColumn(0);break;case"End":event.preventDefault(),event.ctrlKey?this.goTo({row:this.lastRow,column:this.lastColumn}):this.goToColumn(this.lastColumn)}}handleClickEvent(event){const cell=event.target.closest("td, th"),[rowIndex,cellIndex]=this.tableAdapter.findIndex(cell);this.goTo({row:rowIndex,column:cellIndex})}goToColumn(index){index>this.lastColumn||index<0||this.goTo({row:this.currentRow,column:index})}goToRow(index){index>this.lastRow||index<0||this.goTo({row:index,column:this.currentColumn})}goTo({row,column}){this.rowSubject.next({current:row,previous:this.currentRow}),this.columnSubject.next({current:column,previous:this.currentColumn})}resetTabIndexes(newTabIndex=-1){for(let i=0;i<this.tableAdapter.lastRowIndex;i++){const row=this.tableAdapter.getRow(i);for(const cell of Array.from(row.cells)){(0,tab_service.ZW)(cell,tab_service.X9).forEach((node=>node.tabIndex=newTabIndex)),cell.tabIndex=newTabIndex}}this.reset()}reset(){this.rowSubject.next({current:0,previous:-1}),this.columnSubject.next({current:0,previous:-1})}}!function(TableDomSpanDirection){TableDomSpanDirection.colSpan="colSpan",TableDomSpanDirection.rowSpan="rowSpan"}(TableDomSpanDirection||(TableDomSpanDirection={}));class TableDomAdapter{constructor(tableElement){this.tableElement=tableElement}get lastColumnIndex(){return this.getRealRowLength(this.tableElement.rows[0])}get lastRowIndex(){return this.tableElement.rows.length-1}getCell(row,column){const col=this.getColumn(column);return this.findCellInColumn(col,row).cell}getColumn(column){const firstHeader=Array.from(this.tableElement.rows[0].cells),{cell:header,realIndex:realColumnIndex}=this.findCellInRow(firstHeader,column),linkedCells=[];for(let i=1;i<this.tableElement.rows.length;i++){const linkedRowCells=this.tableElement.rows[i].querySelectorAll(`[headers~='${header.id}']`);if(linkedRowCells.length>1){const{cell}=this.findCellInRow(Array.from(linkedRowCells),column-realColumnIndex);linkedCells.push(cell)}else linkedRowCells[0]&&linkedCells.push(linkedRowCells[0])}return linkedCells?[header,...linkedCells]:[]}getRow(row){return this.tableElement.rows[row]}findColumnIndex(cell){const row=this.getRow(this.findRowIndex(cell));if(!row)return;if(cell&&cell.headers){const ids=cell.headers.split(" "),headerRows=Array.from(this.tableElement.tHead.rows),indexes=[];for(const headerRow of headerRows.reverse()){const headerCells=Array.from(headerRow.cells),header=headerCells.find((headerCell=>ids.includes(headerCell.id)));if(header){let cellIndex=0;for(const c of headerCells){if(c===header)break;cellIndex+=c.colSpan}indexes.push(cellIndex)}}const firstIndex=indexes.sort(((a,b)=>b-a))[0];let similarCells=[];for(const id of ids){const rowCells=Array.from(row.querySelectorAll(`[headers~='${id}']`));for(const rowCell of rowCells)similarCells.includes(rowCell)||similarCells.push(rowCell)}return similarCells=similarCells.sort(((a,b)=>a.cellIndex-b.cellIndex)),firstIndex+similarCells.indexOf(cell)}let cellIndex=0;for(const c of Array.from(row.cells)){if(c===cell)break;cellIndex+=c.colSpan}return cellIndex}findRowIndex(cell){for(const row of Array.from(this.tableElement.rows))if(row.contains(cell))return row.rowIndex}findIndex(cell){return[this.findRowIndex(cell),this.findColumnIndex(cell)]}getRealRowLength(row){return Array.from(row.cells).reduce(((count,cell)=>count+cell.colSpan),-1)}findCell(cells,targetIndex,spanDirection){let realIndex=0;for(let i=0;i<targetIndex&&(i+=cells[realIndex][spanDirection],!(i>targetIndex));)realIndex++;return{cell:cells[realIndex],realIndex}}findCellInRow(row,index){return this.findCell(row,index,TableDomSpanDirection.colSpan)}findCellInColumn(col,index){return this.findCell(col,index,TableDomSpanDirection.rowSpan)}}let Table=class Table{constructor(elementRef,applicationRef,i18n){this.elementRef=elementRef,this.applicationRef=applicationRef,this.i18n=i18n,this.size="md",this.skeleton=!1,this.sortable=!0,this.noBorder=!0,this.showSelectionColumn=!0,this.enableSingleSelect=!1,this.scrollLoadDistance=0,this.striped=!0,this.tableContent=!0,this.stickyHeader=!1,this.sort=new core.EventEmitter,this.selectAll=new core.EventEmitter,this.deselectAll=new core.EventEmitter,this.selectRow=new core.EventEmitter,this.deselectRow=new core.EventEmitter,this.rowClick=new core.EventEmitter,this.scrollLoad=new core.EventEmitter,this.selectAllCheckbox=!1,this.selectAllCheckboxSomeSelected=!1,this.isColumnDragging=!1,this.columnDraggedHoverIndex=-1,this.columnDraggedPosition="",this._isDataGrid=!1,this.isViewReady=!1,this.subscriptions=new Subscription.w0,this._expandButtonAriaLabel=this.i18n.getOverridable("TABLE.EXPAND_BUTTON"),this._sortDescendingLabel=this.i18n.getOverridable("TABLE.SORT_DESCENDING"),this._sortAscendingLabel=this.i18n.getOverridable("TABLE.SORT_ASCENDING"),this._checkboxHeaderLabel=this.i18n.getOverridable("TABLE.CHECKBOX_HEADER"),this._checkboxRowLabel=this.i18n.getOverridable("TABLE.CHECKBOX_ROW"),this._endOfDataText=this.i18n.getOverridable("TABLE.END_OF_DATA"),this._scrollTopText=this.i18n.getOverridable("TABLE.SCROLL_TOP"),this._filterTitle=this.i18n.getOverridable("TABLE.FILTER")}static skeletonModel(rowCount,columnCount){const model=new table_model_class.G;let header=new Array,data=new Array,row=new Array;for(let i=0;i<columnCount;i++)header.push(new table_header_item_class.j),row.push(new table_item_class.r);for(let i=0;i<rowCount-1;i++)data.push(row);return model.header=header,model.data=data,model}static setTabIndex(element,index){const focusElementList=(0,tab_service.ZW)(element,tab_service.X9);element.firstElementChild&&element.firstElementChild.classList.contains("cds--table-sort")&&focusElementList.length>1?focusElementList[1].tabIndex=index:focusElementList.length>0?focusElementList[0].tabIndex=index:element.tabIndex=index}static focus(element){const focusElementList=(0,tab_service.ZW)(element,tab_service.X9);element.firstElementChild&&element.firstElementChild.classList.contains("cds--table-sort")&&focusElementList.length>1?focusElementList[1].focus():focusElementList.length>0?focusElementList[0].focus():element.focus()}set model(m){this._model&&(this.subscriptions.unsubscribe(),this.subscriptions=new Subscription.w0),this._model=m;const rowsChange=this._model.rowsSelectedChange.subscribe((()=>this.updateSelectAllCheckbox())),dataChange=this._model.dataChange.subscribe((()=>{this.isDataGrid&&this.resetTabIndex(),this.updateSelectAllCheckbox()}));if(this.subscriptions.add(rowsChange),this.subscriptions.add(dataChange),this.isDataGrid){const expandedChange=this._model.rowsExpandedChange.subscribe((()=>{setTimeout((()=>{const expandedRows=this.elementRef.nativeElement.querySelectorAll(".cds--expandable-row:not(.cds--parent-row)");Array.from(expandedRows).forEach((row=>{void 0!==row.firstElementChild.tabIndex&&-1===row.firstElementChild.tabIndex||(row.firstElementChild.tabIndex=-1)}))}))}));this.subscriptions.add(expandedChange)}}get model(){return this._model}set isDataGrid(value){this._isDataGrid=value,this.isViewReady&&(value?this.enableDataGridInteractions():this.disableDataGridInteractions())}get isDataGrid(){return this._isDataGrid}set expandButtonAriaLabel(value){this._expandButtonAriaLabel.override(value)}get expandButtonAriaLabel(){return this._expandButtonAriaLabel.value}set sortDescendingLabel(value){this._sortDescendingLabel.override(value)}get sortDescendingLabel(){return this._sortDescendingLabel.value}set sortAscendingLabel(value){this._sortAscendingLabel.override(value)}get sortAscendingLabel(){return this._sortAscendingLabel.value}set translations(value){const valueWithDefaults=(0,utils.TS)(this.i18n.getMultiple("TABLE"),value);this._filterTitle.override(valueWithDefaults.FILTER),this._endOfDataText.override(valueWithDefaults.END_OF_DATA),this._scrollTopText.override(valueWithDefaults.SCROLL_TOP),this._checkboxHeaderLabel.override(valueWithDefaults.CHECKBOX_HEADER),this._checkboxRowLabel.override(valueWithDefaults.CHECKBOX_ROW)}get noData(){return!this.model.data||0===this.model.data.length||1===this.model.data.length&&0===this.model.data[0].length}ngAfterViewInit(){this.isViewReady=!0,this.isDataGrid&&this.enableDataGridInteractions()}ngOnDestroy(){this.subscriptions.unsubscribe(),this.positionSubscription&&this.positionSubscription.unsubscribe()}enableDataGridInteractions(){if(this.interactionModel)return;const table=this.elementRef.nativeElement.querySelector("table"),tableAdapter=new TableDomAdapter(table),keydownEventStream=(0,fromEvent.R)(table,"keydown"),clickEventStream=(0,fromEvent.R)(table,"click");this.interactionModel=new DataGridInteractionModel(keydownEventStream,clickEventStream,tableAdapter),this.positionSubscription=this.interactionModel.position.subscribe((event=>{const[currentRow,currentColumn]=event.current,[previousRow,previousColumn]=event.previous,currentElement=tableAdapter.getCell(currentRow,currentColumn);if(Table.setTabIndex(currentElement,0),-1!==previousRow&&-1!==previousColumn){if(previousRow!==currentRow||previousColumn!==currentColumn){const previousElement=tableAdapter.getCell(previousRow,previousColumn);Table.setTabIndex(previousElement,-1)}Table.focus(currentElement)}})),this.resetTabIndex()}disableDataGridInteractions(){this.positionSubscription&&this.positionSubscription.unsubscribe(),this.resetTabIndex(0),this.interactionModel=null}onSelectAll(){this.model.selectAll(!0),this.selectAll.emit(this.model)}onDeselectAll(){this.model.selectAll(!1),this.deselectAll.emit(this.model)}onSelectRow(event){Object.keys(event).includes("selectedRowIndex")?(this.enableSingleSelect&&this.model.selectAll(!1),this.model.selectRow(event.selectedRowIndex,!0),this.selectRow.emit(event)):(this.model.selectRow(event.deselectedRowIndex,!1),this.deselectRow.emit(event))}onRowClick(index){this.rowClick.emit(index)}updateSelectAllCheckbox(){const selectedRowsCount=this.model.selectedRowsCount();selectedRowsCount<=0?(this.selectAllCheckbox=!1,this.selectAllCheckboxSomeSelected=!1):selectedRowsCount<this.model.data.length?(this.selectAllCheckbox=!0,this.selectAllCheckboxSomeSelected=!0):(this.selectAllCheckbox=!0,this.selectAllCheckboxSomeSelected=!1)}resetTabIndex(newTabIndex=-1){setTimeout((()=>{const focusElementList=(0,tab_service.ZW)(this.elementRef.nativeElement,tab_service.X9);focusElementList&&focusElementList.forEach((tabbable=>{tabbable.tabIndex=newTabIndex})),this.interactionModel&&this.interactionModel.resetTabIndexes(newTabIndex)}))}columnResizeStart(event,column){this.columnResizeWidth=parseInt(column.style.width,10),this.columnResizeMouseX=event.clientX,event.preventDefault(),this.mouseMoveSubscription=(0,fromEvent.R)(document.body,"mousemove").subscribe((event=>{this.columnResizeProgress(event,column)})),this.mouseUpSubscription=(0,fromEvent.R)(document.body,"mouseup").subscribe((event=>{this.columnResizeEnd(event,column)}))}columnResizeProgress(event,column){const move=event.clientX-this.columnResizeMouseX;column.style.width=`${this.columnResizeWidth+move}px`}columnResizeEnd(event,column){this.mouseMoveSubscription.unsubscribe(),this.mouseUpSubscription.unsubscribe()}onScroll(event){event.target.scrollHeight-event.target.clientHeight-event.target.scrollTop<=this.scrollLoadDistance?this.scrollLoad.emit(this.model):this.model.isEnd=!1}columnDragStart(event,columnIndex){this.isColumnDragging=!0,this.columnDraggedHoverIndex=columnIndex,event.dataTransfer.setData("columnIndex",JSON.stringify(columnIndex))}columnDragEnd(event,columnIndex){this.isColumnDragging=!1,this.columnDraggedHoverIndex=-1}columnDragEnter(event,position,columnIndex){this.columnDraggedPosition=position,this.columnDraggedHoverIndex=columnIndex}columnDragLeave(event,position,columnIndex){this.columnDraggedPosition=""}columnDragover(event,position,columnIndex){this.columnDraggedHoverIndex=columnIndex,this.columnDraggedPosition=position,event.preventDefault()}columnDrop(event,position,columnIndex){this.isColumnDragging=!1,this.columnDraggedHoverIndex=-1,this.columnDraggedPosition="",this.model.moveColumn(parseInt(event.dataTransfer.getData("columnIndex"),10),columnIndex+("right"===position?1:0))}doSort(index){0===this.sort.observers.length&&(this.model.cycleSortState(index),this.model.sort(index)),this.sort.emit(index)}scrollToTop(event){event.target.parentElement.parentElement.parentElement.parentElement.children[1].scrollTop=0,this.model.isEnd=!1}getSelectionLabelValue(row){return this.selectionLabelColumn?{value:row[this.selectionLabelColumn].data}:{value:this.i18n.get().TABLE.ROW}}getExpandButtonAriaLabel(){return this._expandButtonAriaLabel.subject}getSortDescendingLabel(){return this._sortDescendingLabel.subject}getSortAscendingLabel(){return this._sortAscendingLabel.subject}getCheckboxHeaderLabel(){return this._checkboxHeaderLabel.subject}getCheckboxRowLabel(){return this._checkboxRowLabel.subject}getEndOfDataText(){return this._endOfDataText.subject}getScrollTopText(){return this._scrollTopText.subject}getFilterTitle(){return this._filterTitle.subject}};Table.ctorParameters=()=>[{type:core.ElementRef},{type:core.ApplicationRef},{type:i18n.oc}],Table.propDecorators={ariaLabelledby:[{type:core.Input}],ariaDescribedby:[{type:core.Input}],model:[{type:core.Input}],size:[{type:core.Input}],skeleton:[{type:core.Input}],isDataGrid:[{type:core.Input}],sortable:[{type:core.Input}],noBorder:[{type:core.Input}],showSelectionColumn:[{type:core.Input}],enableSingleSelect:[{type:core.Input}],scrollLoadDistance:[{type:core.Input}],expandButtonAriaLabel:[{type:core.Input}],sortDescendingLabel:[{type:core.Input}],sortAscendingLabel:[{type:core.Input}],translations:[{type:core.Input}],striped:[{type:core.Input}],tableContent:[{type:core.HostBinding,args:["class.cds--data-table-content"]}],stickyHeader:[{type:core.HostBinding,args:["class.cds--data-table_inner-container"]},{type:core.Input}],footerTemplate:[{type:core.Input}],selectionLabelColumn:[{type:core.Input}],sort:[{type:core.Output}],selectAll:[{type:core.Output}],deselectAll:[{type:core.Output}],selectRow:[{type:core.Output}],deselectRow:[{type:core.Output}],rowClick:[{type:core.Output}],scrollLoad:[{type:core.Output}]},Table=(0,tslib_es6.gn)([(0,core.Component)({selector:"cds-table, ibm-table",template:'\n\t<table\n\t\tcdsTable\n\t\t[sortable]="sortable"\n\t\t[noBorder]="noBorder"\n\t\t[ngClass]="{\'cds--data-table--sticky-header\': stickyHeader}"\n\t\t[size]="size"\n\t\t[striped]="striped"\n\t\t[skeleton]="skeleton"\n\t\t[attr.aria-labelledby]="ariaLabelledby"\n\t\t[attr.aria-describedby]="ariaDescribedby">\n\t\t<thead\n\t\t\tcdsTableHead\n\t\t\t[sortable]="sortable"\n\t\t\t(deselectAll)="onDeselectAll()"\n\t\t\t(selectAll)="onSelectAll()"\n\t\t\t(sort)="doSort($event)"\n\t\t\t[checkboxHeaderLabel]="getCheckboxHeaderLabel()"\n\t\t\t[filterTitle]="getFilterTitle()"\n\t\t\t[model]="model"\n\t\t\t[selectAllCheckbox]="selectAllCheckbox"\n\t\t\t[selectAllCheckboxSomeSelected]="selectAllCheckboxSomeSelected"\n\t\t\t[showSelectionColumn]="showSelectionColumn"\n\t\t\t[enableSingleSelect]="enableSingleSelect"\n\t\t\t[skeleton]="skeleton"\n\t\t\t[sortAscendingLabel]="sortAscendingLabel"\n\t\t\t[sortDescendingLabel]="sortDescendingLabel"\n\t\t\t[stickyHeader]="stickyHeader">\n\t\t</thead>\n\t\t<tbody\n\t\t\tcdsTableBody\n\t\t\t(deselectRow)="onSelectRow($event)"\n\t\t\t(scroll)="onScroll($event)"\n\t\t\t(selectRow)="onSelectRow($event)"\n\t\t\t[checkboxRowLabel]="getCheckboxRowLabel()"\n\t\t\t[enableSingleSelect]="enableSingleSelect"\n\t\t\t(rowClick)="onRowClick($event)"\n\t\t\t[expandButtonAriaLabel]="expandButtonAriaLabel"\n\t\t\t[model]="model"\n\t\t\t[size]="size"\n\t\t\t[ngStyle]="{\'overflow-y\': \'scroll\'}"\n\t\t\t[selectionLabelColumn]="selectionLabelColumn"\n\t\t\t[showSelectionColumn]="showSelectionColumn"\n\t\t\t[skeleton]="skeleton"\n\t\t\t*ngIf="!noData; else noDataTemplate">\n\t\t</tbody>\n\t\t<ng-template #noDataTemplate><ng-content></ng-content></ng-template>\n\t\t<tfoot>\n\t\t\t<ng-template\n\t\t\t\t[ngTemplateOutlet]="footerTemplate">\n\t\t\t</ng-template>\n\t\t\t<tr *ngIf="this.model.isLoading">\n\t\t\t\t<td class="table_loading-indicator">\n\t\t\t\t\t<div class="cds--loading cds--loading--small">\n\t\t\t\t\t\t<svg class="cds--loading__svg" viewBox="-75 -75 150 150">\n\t\t\t\t\t\t\t<circle class="cds--loading__stroke" cx="0" cy="0" r="37.5" />\n\t\t\t\t\t\t</svg>\n\t\t\t\t\t</div>\n\t\t\t\t</td>\n\t\t\t</tr>\n\t\t\t<tr *ngIf="this.model.isEnd">\n\t\t\t\t<td class="table_end-indicator">\n\t\t\t\t\t<h5>{{getEndOfDataText() | async}}</h5>\n\t\t\t\t\t<button (click)="scrollToTop($event)" class="btn--secondary-sm">\n\t\t\t\t\t\t{{getScrollTopText() | async}}\n\t\t\t\t\t</button>\n\t\t\t\t</td>\n\t\t\t</tr>\n\t\t</tfoot>\n\t</table>\n\t',styles:["\n\t\t:host {\n\t\t\tdisplay: block;\n\t\t}\n\t"]})],Table);let TableContainer=class TableContainer{constructor(){this.containerClass=!0}ngAfterContentInit(){this.table&&(this.table.ariaLabelledby=this.headerTitle?.id,this.table.ariaDescribedby=this.headerDescription?.id)}};TableContainer.propDecorators={containerClass:[{type:core.HostBinding,args:["class.cds--data-table-container"]}],headerTitle:[{type:core.ContentChild,args:[TableHeaderTitle]}],headerDescription:[{type:core.ContentChild,args:[TableHeaderDescription]}],table:[{type:core.ContentChild,args:[Table]}]},TableContainer=(0,tslib_es6.gn)([(0,core.Component)({selector:"cds-table-container, ibm-table-container",template:"<ng-content></ng-content>",styles:["\n\t\t:host { display: block }\n\t"]})],TableContainer);let TableHeader=class TableHeader{constructor(){this.headerClass=!0,this.displayStyle="block"}};TableHeader.propDecorators={headerClass:[{type:core.HostBinding,args:["class.cds--data-table-header"]}],displayStyle:[{type:core.HostBinding,args:["style.display"]}]},TableHeader=(0,tslib_es6.gn)([(0,core.Component)({selector:"cds-table-header, ibm-table-header",template:"\n\t\t<ng-content></ng-content>\n\t"})],TableHeader);let TableHeadCellLabel=class TableHeadCellLabel{constructor(){this.baseClass=!0}};TableHeadCellLabel.propDecorators={baseClass:[{type:core.HostBinding,args:["class.cds--table-header-label"]}]},TableHeadCellLabel=(0,tslib_es6.gn)([(0,core.Directive)({selector:"[cdsTableHeadCellLabel], [ibmTableHeadCellLabel]"})],TableHeadCellLabel);let ExpandedRowHover=class ExpandedRowHover{addHoverClass(event){event.target.previousElementSibling.classList.add("cds--expandable-row--hover")}removeHoverClass(event){event.target.previousElementSibling.classList.remove("cds--expandable-row--hover")}};ExpandedRowHover.propDecorators={addHoverClass:[{type:core.HostListener,args:["mouseenter",["$event"]]}],removeHoverClass:[{type:core.HostListener,args:["mouseleave",["$event"]]}]},ExpandedRowHover=(0,tslib_es6.gn)([(0,core.Directive)({selector:"[cdsExpandedRowHover], [ibmExpandedRowHover]"})],ExpandedRowHover);let TableDirective=class TableDirective{constructor(){this.sortable=!0,this.noBorder=!0,this.striped=!1,this.skeleton=!1,this.size="md",this.tableClass=!0}get extraSmallSize(){return"xs"===this.size}get smallSize(){return"sm"===this.size}get mediumSize(){return"md"===this.size}get LargeSize(){return"lg"===this.size}get extraLargeSize(){return"xl"===this.size}};TableDirective.propDecorators={sortable:[{type:core.Input},{type:core.HostBinding,args:["class.cds--data-table--sort"]}],noBorder:[{type:core.Input},{type:core.HostBinding,args:["class.cds--data-table--no-border"]}],striped:[{type:core.Input},{type:core.HostBinding,args:["class.cds--data-table--zebra"]}],skeleton:[{type:core.Input},{type:core.HostBinding,args:["class.cds--skeleton"]}],size:[{type:core.Input}],tableClass:[{type:core.HostBinding,args:["class.cds--data-table"]}],extraSmallSize:[{type:core.HostBinding,args:["class.cds--data-table--xs"]}],smallSize:[{type:core.HostBinding,args:["class.cds--data-table--sm"]}],mediumSize:[{type:core.HostBinding,args:["class.cds--data-table--md"]}],LargeSize:[{type:core.HostBinding,args:["class.cds--data-table--lg"]}],extraLargeSize:[{type:core.HostBinding,args:["class.cds--data-table--xl"]}]},TableDirective=(0,tslib_es6.gn)([(0,core.Directive)({selector:"[cdsTable], [ibmTable]"})],TableDirective);let TableHead=class TableHead{constructor(i18n){this.i18n=i18n,this.showSelectionColumn=!0,this.enableSingleSelect=!1,this.selectAllCheckboxSomeSelected=!1,this.selectAllCheckbox=!1,this.skeleton=!1,this.stickyHeader=!1,this.sortable=!0,this.sort=new core.EventEmitter,this.selectAll=new core.EventEmitter,this.deselectAll=new core.EventEmitter,this.scrollbarWidth=0,this._checkboxHeaderLabel=this.i18n.getOverridable("TABLE.CHECKBOX_HEADER"),this._sortDescendingLabel=this.i18n.getOverridable("TABLE.SORT_DESCENDING"),this._sortAscendingLabel=this.i18n.getOverridable("TABLE.SORT_ASCENDING"),this._filterTitle=this.i18n.getOverridable("TABLE.FILTER")}set checkboxHeaderLabel(value){this._checkboxHeaderLabel.override(value)}get checkboxHeaderLabel(){return this._checkboxHeaderLabel.value}set sortDescendingLabel(value){this._sortDescendingLabel.override(value)}get sortDescendingLabel(){return this._sortDescendingLabel.value}set sortAscendingLabel(value){this._sortAscendingLabel.override(value)}get sortAscendingLabel(){return this._sortAscendingLabel.value}set filterTitle(value){this._filterTitle.override(value)}get filterTitle(){return this._filterTitle.value}ngAfterViewInit(){setTimeout((()=>{this.scrollbarWidth=(0,utils.np)()}))}onSelectAllCheckboxChange(){this.selectAllCheckbox||this.selectAllCheckboxSomeSelected?this.deselectAll.emit(this.model):this.selectAll.emit(this.model)}getCheckboxHeaderLabel(){return this._checkboxHeaderLabel.subject}getSortDescendingLabel(){return this._sortDescendingLabel.subject}getSortAscendingLabel(){return this._sortAscendingLabel.subject}getFilterTitle(){return this._filterTitle.subject}};TableHead.ctorParameters=()=>[{type:i18n.oc}],TableHead.propDecorators={model:[{type:core.Input}],showSelectionColumn:[{type:core.Input}],enableSingleSelect:[{type:core.Input}],selectAllCheckboxSomeSelected:[{type:core.Input}],selectAllCheckbox:[{type:core.Input}],skeleton:[{type:core.Input}],stickyHeader:[{type:core.Input}],sortable:[{type:core.Input}],checkboxHeaderLabel:[{type:core.Input}],sortDescendingLabel:[{type:core.Input}],sortAscendingLabel:[{type:core.Input}],filterTitle:[{type:core.Input}],sort:[{type:core.Output}],selectAll:[{type:core.Output}],deselectAll:[{type:core.Output}]},TableHead=(0,tslib_es6.gn)([(0,core.Component)({selector:"[cdsTableHead], [ibmTableHead]",template:'\n\t<ng-container *ngIf="model">\n\t\t<tr>\n\t\t\t<th\n\t\t\t\tcdsTableHeadExpand\n\t\t\t\t*ngIf="model.hasExpandableRows()"\n\t\t\t\tscope="col"\n\t\t\t\t[ngClass]="{\'cds--table-expand-v2\': stickyHeader}"\n\t\t\t\t[id]="model.getId(\'expand\')">\n\t\t\t</th>\n\t\t\t<th\n\t\t\t\t*ngIf="!skeleton && showSelectionColumn && enableSingleSelect"\n\t\t\t\tscope="col"\n\t\t\t\tstyle="width: 0;"\n\t\t\t\t[id]="model.getId(\'select\')">\n\t\t\t\t\x3c!-- add width 0; since the carbon styles don\'t seem to constrain this headers width --\x3e\n\t\t\t</th>\n\t\t\t<th\n\t\t\t\tcdsTableHeadCheckbox\n\t\t\t\t*ngIf="!skeleton && showSelectionColumn && !enableSingleSelect"\n\t\t\t\tscope="col"\n\t\t\t\t[checked]="selectAllCheckbox"\n\t\t\t\t[indeterminate]="selectAllCheckboxSomeSelected"\n\t\t\t\t[ariaLabel]="getCheckboxHeaderLabel()"\n\t\t\t\t[skeleton]="skeleton"\n\t\t\t\t[name]="model.getHeaderId(\'select\')"\n\t\t\t\t(change)="onSelectAllCheckboxChange()"\n\t\t\t\t[id]="model.getId(\'select\')">\n\t\t\t</th>\n\t\t\t<ng-container *ngFor="let column of model.header; let i = index">\n\t\t\t\t<th\n\t\t\t\t\t*ngIf="column && column.visible"\n\t\t\t\t\t[ngStyle]="column.style"\n\t\t\t\t\tcdsTableHeadCell\n\t\t\t\t\tscope="col"\n\t\t\t\t\t[class]="column.className"\n\t\t\t\t\t[sortable]="sortable"\n\t\t\t\t\t[skeleton]="skeleton"\n\t\t\t\t\t[id]="model.getId(i)"\n\t\t\t\t\t[column]="column"\n\t\t\t\t\t[filterTitle]="getFilterTitle()"\n\t\t\t\t\t[attr.colspan]="column.colSpan"\n\t\t\t\t\t[attr.rowspan]="column.rowSpan"\n\t\t\t\t\t(sort)="sort.emit(i)">\n\t\t\t\t</th>\n\t\t\t</ng-container>\n\t\t\t<th *ngIf="!skeleton && stickyHeader && scrollbarWidth"\n\t\t\t\tscope="col"\n\t\t\t\t[ngStyle]="{\'width\': scrollbarWidth + \'px\', \'padding\': 0, \'border\': 0}">\n\t\t\t\t\x3c!--\n\t\t\t\t\tScrollbar pushes body to the left so this header column is added to push\n\t\t\t\t\tthe title bar the same amount and keep the header and body columns aligned.\n\t\t\t\t--\x3e\n\t\t\t</th>\n\t\t</tr>\n\t</ng-container>\n\t<ng-content></ng-content>\n\t',styles:["\n\t\t.cds--table-expand-v2 {\n\t\t\tpadding-left: 2.5rem;\n\t\t}\n\t"]})],TableHead);let TableHeadCell=class TableHeadCell{constructor(i18n){this.i18n=i18n,this.skeleton=!1,this.sortable=!0,this.sort=new core.EventEmitter,this.theadAction=!1,this._sortDescendingLabel=this.i18n.getOverridable("TABLE.SORT_DESCENDING"),this._sortAscendingLabel=this.i18n.getOverridable("TABLE.SORT_ASCENDING"),this._filterTitle=this.i18n.getOverridable("TABLE.FILTER")}set sortDescendingLabel(value){this._sortDescendingLabel.override(value)}get sortDescendingLabel(){return this._sortDescendingLabel.value}set sortAscendingLabel(value){this._sortAscendingLabel.override(value)}get sortAscendingLabel(){return this._sortAscendingLabel.value}set filterTitle(value){this._filterTitle.override(value)}get filterTitle(){return this._filterTitle.value}ngOnChanges(){this.theadAction=!!this.column.filterTemplate||this.sort.observers.length>0}getSortDescendingLabel(){return this._sortDescendingLabel.subject.pipe(this.sortLabelMap())}getSortAscendingLabel(){return this._sortAscendingLabel.subject.pipe(this.sortLabelMap())}onClick(){this.skeleton||this.sort.emit()}sortLabelMap(){return(0,map.U)((str=>this.column.ariaSortLabel?this.column.ariaSortLabel:this.column.formatSortLabel?this.column.formatSortLabel(str,this.column.ariaSortLabel):`${this.column.data} - ${str}`))}};TableHeadCell.ctorParameters=()=>[{type:i18n.oc}],TableHeadCell.propDecorators={column:[{type:core.Input}],skeleton:[{type:core.Input}],sortable:[{type:core.Input}],sortDescendingLabel:[{type:core.Input}],sortAscendingLabel:[{type:core.Input}],filterTitle:[{type:core.Input}],sort:[{type:core.Output}],theadAction:[{type:core.HostBinding,args:["class.thead_action"]}]},TableHeadCell=(0,tslib_es6.gn)([(0,core.Component)({selector:"[cdsTableHeadCell], [ibmTableHeadCell]",template:'\n\t\t<button\n\t\t\tclass="cds--table-sort"\n\t\t\t*ngIf="sortable && this.sort.observers.length > 0 && column.sortable"\n\t\t\t[attr.aria-label]="(column.sorted && column.ascending ? getSortDescendingLabel() : getSortAscendingLabel()) | async"\n\t\t\taria-live="polite"\n\t\t\t[ngClass]="{\n\t\t\t\t\'cds--table-sort--active\': column.sorted,\n\t\t\t\t\'cds--table-sort--descending\': column.ascending\n\t\t\t}"\n\t\t\t(click)="onClick()">\n\t\t\t<span\n\t\t\t\tclass="cds--table-sort__flex"\n\t\t\t\t[title]="column.title"\n\t\t\t\ttabindex="-1">\n\t\t\t\t<div *ngIf="!skeleton && !column.template" cdsTableHeadCellLabel>\n\t\t\t\t\t{{column.data}}\n\t\t\t\t</div>\n\t\t\t\t<ng-template\n\t\t\t\t\t*ngIf="!skeleton && column.template"\n\t\t\t\t\t[ngTemplateOutlet]="column.template"\n\t\t\t\t\t[ngTemplateOutletContext]="{data: column.data}">\n\t\t\t\t</ng-template>\n\t\t\t\t<svg\n\t\t\t\t\t*ngIf="!skeleton"\n\t\t\t\t\tfocusable="false"\n\t\t\t\t\tpreserveAspectRatio="xMidYMid meet"\n\t\t\t\t\tstyle="will-change: transform;"\n\t\t\t\t\txmlns="http://www.w3.org/2000/svg"\n\t\t\t\t\tclass="cds--table-sort__icon"\n\t\t\t\t\twidth="16"\n\t\t\t\t\theight="16"\n\t\t\t\t\tviewBox="0 0 16 16"\n\t\t\t\t\taria-hidden="true">\n\t\t\t\t\t<path d="M12.3 9.3l-3.8 3.8V1h-1v12.1L3.7 9.3 3 10l5 5 5-5z"></path>\n\t\t\t\t</svg>\n\t\t\t\t<svg\n\t\t\t\t\t*ngIf="!skeleton"\n\t\t\t\t\tfocusable="false"\n\t\t\t\t\tpreserveAspectRatio="xMidYMid meet"\n\t\t\t\t\tstyle="will-change: transform;"\n\t\t\t\t\txmlns="http://www.w3.org/2000/svg"\n\t\t\t\t\tclass="cds--table-sort__icon-unsorted"\n\t\t\t\t\twidth="16"\n\t\t\t\t\theight="16"\n\t\t\t\t\tviewBox="0 0 16 16"\n\t\t\t\t\taria-hidden="true">\n\t\t\t\t\t<path d="M13.8 10.3L12 12.1V2h-1v10.1l-1.8-1.8-.7.7 3 3 3-3zM4.5 2l-3 3 .7.7L4 3.9V14h1V3.9l1.8 1.8.7-.7z"></path>\n\t\t\t\t</svg>\n\t\t\t</span>\n\t\t</button>\n\t\t<div\n\t\t\tclass="cds--table-header-label"\n\t\t\t*ngIf="!skeleton && this.sort.observers.length === 0 || (this.sort.observers.length > 0 && !column.sortable) || !sortable">\n\t\t\t<span *ngIf="!column.template" [title]="column.data">\n\t\t\t\t<ng-container *ngIf="!skeleton">\n\t\t\t\t\t{{column.data}}\n\t\t\t\t</ng-container>\n\t\t\t</span>\n\t\t\t<ng-template\n\t\t\t\t[ngTemplateOutlet]="column.template" [ngTemplateOutletContext]="{data: column.data}">\n\t\t\t</ng-template>\n\t\t</div>\n\t'})],TableHeadCell);let TableHeadCheckbox=class TableHeadCheckbox{constructor(i18n){this.i18n=i18n,this.checked=!1,this.indeterminate=!1,this.skeleton=!1,this.name="select-all-"+TableHeadCheckbox.tableSelectAllCount++,this.change=new core.EventEmitter,this.hostClass=!0,this._ariaLabel=this.i18n.getOverridable("TABLE.CHECKBOX_HEADER")}set ariaLabel(value){this._ariaLabel.override(value)}get ariaLabel(){return this._ariaLabel.value}getAriaLabel(){return this._ariaLabel.subject}};TableHeadCheckbox.tableSelectAllCount=0,TableHeadCheckbox.ctorParameters=()=>[{type:i18n.oc}],TableHeadCheckbox.propDecorators={checked:[{type:core.Input}],indeterminate:[{type:core.Input}],skeleton:[{type:core.Input}],name:[{type:core.Input}],ariaLabel:[{type:core.Input}],change:[{type:core.Output}],hostClass:[{type:core.HostBinding,args:["class.cds--table-column-checkbox"]}]},TableHeadCheckbox=(0,tslib_es6.gn)([(0,core.Component)({selector:"[cdsTableHeadCheckbox], [ibmTableHeadCheckbox]",template:'\n\t\t<cds-checkbox\n\t\t\t*ngIf="!skeleton"\n\t\t\tinline="true"\n\t\t\t[name]="name"\n\t\t\t[checked]="checked"\n\t\t\t[indeterminate]="indeterminate"\n\t\t\t(checkedChange)="change.emit()"\n\t\t\t[ariaLabel]="getAriaLabel() | async">\n\t\t</cds-checkbox>\n\t',styles:["\n :host { width: 10px; }\n "]})],TableHeadCheckbox);let TableHeadExpand=class TableHeadExpand{constructor(){this.hostClass=!0}};TableHeadExpand.propDecorators={hostClass:[{type:core.HostBinding,args:["class.cds--table-expand"]}]},TableHeadExpand=(0,tslib_es6.gn)([(0,core.Component)({selector:"[cdsTableHeadExpand], [ibmTableHeadExpand]",template:"\n\t\t<ng-content></ng-content>\n\t"})],TableHeadExpand);let TableBody=class TableBody{constructor(i18n){this.i18n=i18n,this.enableSingleSelect=!1,this.showSelectionColumn=!0,this.size="md",this.skeleton=!1,this.selectRow=new core.EventEmitter,this.deselectRow=new core.EventEmitter,this.rowClick=new core.EventEmitter,this._checkboxRowLabel=this.i18n.getOverridable("TABLE.CHECKBOX_ROW"),this._expandButtonAriaLabel=this.i18n.getOverridable("TABLE.EXPAND_BUTTON")}set expandButtonAriaLabel(value){this._expandButtonAriaLabel.override(value)}get expandButtonAriaLabel(){return this._expandButtonAriaLabel.value}set checkboxRowLabel(value){this._checkboxRowLabel.override(value)}get checkboxRowLabel(){return this._checkboxRowLabel.value}onRowCheckboxChange(index){this.model.isRowSelected(index)?this.deselectRow.emit({model:this.model,deselectedRowIndex:index}):this.selectRow.emit({model:this.model,selectedRowIndex:index})}onRowClick(index){this.rowClick.emit(index)}getCheckboxRowLabel(){return this._checkboxRowLabel.subject}getExpandButtonAriaLabel(){return this._expandButtonAriaLabel.subject}firstExpandedDataInRow(row){const found=row.find((d=>d.expandedData));return found?found.expandedData:found}shouldExpandAsTable(row){return row.some((d=>d.expandAsTable))}};TableBody.ctorParameters=()=>[{type:i18n.oc}],TableBody.propDecorators={model:[{type:core.Input}],enableSingleSelect:[{type:core.Input}],expandButtonAriaLabel:[{type:core.Input}],checkboxRowLabel:[{type:core.Input}],showSelectionColumn:[{type:core.Input}],size:[{type:core.Input}],selectionLabelColumn:[{type:core.Input}],skeleton:[{type:core.Input}],selectRow:[{type:core.Output}],deselectRow:[{type:core.Output}],rowClick:[{type:core.Output}]},TableBody=(0,tslib_es6.gn)([(0,core.Component)({selector:"[cdsTableBody], [ibmTableBody]",template:'\n\t\t<ng-container *ngIf="model">\n\t\t\t<ng-container *ngFor="let row of model.data; let i = index">\n\t\t\t\t<tr\n\t\t\t\t\tcdsTableRow\n\t\t\t\t\t[model]="model"\n\t\t\t\t\t[row]="row"\n\t\t\t\t\t[size]="size"\n\t\t\t\t\t[selected]="model.isRowSelected(i)"\n\t\t\t\t\t[expandable]="model.isRowExpandable(i)"\n\t\t\t\t\t[expanded]="model.isRowExpanded(i)"\n\t\t\t\t\t[checkboxLabel]="getCheckboxRowLabel()"\n\t\t\t\t\t[expandButtonAriaLabel]="getExpandButtonAriaLabel()"\n\t\t\t\t\t[showSelectionColumn]="showSelectionColumn"\n\t\t\t\t\t[enableSingleSelect]="enableSingleSelect"\n\t\t\t\t\t[skeleton]="skeleton"\n\t\t\t\t\t(selectRow)="onRowCheckboxChange(i)"\n\t\t\t\t\t(deselectRow)="onRowCheckboxChange(i)"\n\t\t\t\t\t(expandRow)="model.expandRow(i, !model.isRowExpanded(i))"\n\t\t\t\t\t(rowClick)="onRowClick(i)"\n\t\t\t\t\t*ngIf="!model.isRowFiltered(i)"\n\t\t\t\t\t[class]="(model.rowsClass[i] ? model.rowsClass[i] : null)"\n\t\t\t\t\t[ngClass]="{\n\t\t\t\t\t\t\'tbody_row--success\': !model.isRowSelected(i) && model.getRowContext(i) === \'success\',\n\t\t\t\t\t\t\'tbody_row--warning\': !model.isRowSelected(i) && model.getRowContext(i) === \'warning\',\n\t\t\t\t\t\t\'tbody_row--info\': !model.isRowSelected(i) && model.getRowContext(i) === \'info\',\n\t\t\t\t\t\t\'tbody_row--error\': !model.isRowSelected(i) && model.getRowContext(i) === \'error\'\n\t\t\t\t\t}">\n\t\t\t\t</tr>\n\t\t\t\t<tr\n\t\t\t\t\t*ngIf="model.isRowExpandable(i) && !shouldExpandAsTable(row) && !model.isRowFiltered(i)"\n\t\t\t\t\tcdsTableExpandedRow\n\t\t\t\t\tcdsExpandedRowHover\n\t\t\t\t\t[row]="row"\n\t\t\t\t\t[expanded]="model.isRowExpanded(i)"\n\t\t\t\t\t[skeleton]="skeleton">\n\t\t\t\t</tr>\n\t\t\t\t<ng-container\n\t\t\t\t\t*ngIf="model.isRowExpandable(i) && shouldExpandAsTable(row) && model.isRowExpanded(i) && !model.isRowFiltered(i)">\n\t\t\t\t\t<tr\n\t\t\t\t\t\t*ngFor="let expandedDataRow of firstExpandedDataInRow(row)"\n\t\t\t\t\t\tcdsTableRow\n\t\t\t\t\t\t[model]="model"\n\t\t\t\t\t\t[showSelectionColumnCheckbox]="false"\n\t\t\t\t\t\t[showSelectionColumn]="showSelectionColumn"\n\t\t\t\t\t\t[row]="expandedDataRow"\n\t\t\t\t\t\t[size]="size"\n\t\t\t\t\t\t[skeleton]="skeleton">\n\t\t\t\t\t</tr>\n\t\t\t\t</ng-container>\n\t\t\t</ng-container>\n\t\t</ng-container>\n\t\t<ng-content></ng-content>\n\t'})],TableBody);let TableRowComponent=class TableRowComponent{constructor(i18n){this.i18n=i18n,this.expanded=!1,this.expandable=!1,this.selected=!1,this.size="md",this.enableSingleSelect=!1,this.showSelectionColumn=!0,this.showSelectionColumnCheckbox=!0,this.skeleton=!1,this.selectRow=new core.EventEmitter,this.deselectRow=new core.EventEmitter,this.expandRow=new core.EventEmitter,this.rowClick=new core.EventEmitter,this._checkboxLabel=this.i18n.getOverridable("TABLE.CHECKBOX_ROW"),this._expandButtonAriaLabel=this.i18n.getOverridable("TABLE.EXPAND_BUTTON")}set expandButtonAriaLabel(value){this._expandButtonAriaLabel.override(value)}get expandButtonAriaLabel(){return this._expandButtonAriaLabel.value}set checkboxLabel(value){this._checkboxLabel.override(value)}get checkboxLabel(){return this._checkboxLabel.value}get selectedClass(){return this.selected}get parentRowClass(){return this.expandable}get expandableRowClass(){return this.expanded}get selectableClass(){return!1}get isParentRow(){return!!this.expandable||null}get isAccessible(){return this.enableSingleSelect&&!this.showSelectionColumn?0:null}onHostClick(){this.enableSingleSelect&&!this.showSelectionColumn&&this.onSelectionChange()}onRowClick(){this.rowClick.emit()}onSelectionChange(){this.selected?this.deselectRow.emit():this.selectRow.emit()}getCheckboxLabel(){return this._checkboxLabel.subject}getExpandButtonAriaLabel(){return this._expandButtonAriaLabel.subject}};TableRowComponent.ctorParameters=()=>[{type:i18n.oc}],TableRowComponent.propDecorators={model:[{type:core.Input}],row:[{type:core.Input}],expanded:[{type:core.Input}],expandable:[{type:core.Input}],selected:[{type:core.Input}],size:[{type:core.Input}],enableSingleSelect:[{type:core.Input}],expandButtonAriaLabel:[{type:core.Input}],checkboxLabel:[{type:core.Input}],showSelectionColumn:[{type:core.Input}],showSelectionColumnCheckbox:[{type:core.Input}],selectionLabelColumn:[{type:core.Input}],skeleton:[{type:core.Input}],selectRow:[{type:core.Output}],deselectRow:[{type:core.Output}],expandRow:[{type:core.Output}],rowClick:[{type:core.Output}],selectedClass:[{type:core.HostBinding,args:["class.cds--data-table--selected"]}],parentRowClass:[{type:core.HostBinding,args:["class.cds--parent-row"]}],expandableRowClass:[{type:core.HostBinding,args:["class.cds--expandable-row"]}],selectableClass:[{type:core.HostBinding,args:["class.tbody_row--selectable"]}],isParentRow:[{type:core.HostBinding,args:["attr.data-parent-row"]}],isAccessible:[{type:core.HostBinding,args:["attr.tabindex"]}],onHostClick:[{type:core.HostListener,args:["click"]}]},TableRowComponent=(0,tslib_es6.gn)([(0,core.Component)({selector:"[cdsTableRow], [ibmTableRow]",template:'\n\t\t<ng-container *ngIf="model">\n\t\t\t<td\n\t\t\t\t*ngIf="model.hasExpandableRows()"\n\t\t\t\tcdsTableExpandButton\n\t\t\t\tclass="cds--table-expand-v2"\n\t\t\t\t[expanded]="expanded"\n\t\t\t\t[expandable]="expandable"\n\t\t\t\t[skeleton]="skeleton"\n\t\t\t\t[ariaLabel]="getExpandButtonAriaLabel()"\n\t\t\t\t[headers]="model.getHeaderId(\'expand\')"\n\t\t\t\t(expandRow)="expandRow.emit()">\n\t\t\t</td>\n\t\t\t<ng-container *ngIf="!skeleton && showSelectionColumn && !enableSingleSelect">\n\t\t\t\t<td\n\t\t\t\t\t*ngIf="!showSelectionColumnCheckbox; else tableCheckboxTemplate">\n\t\t\t\t</td>\n\t\t\t\t<ng-template #tableCheckboxTemplate>\n\t\t\t\t\t<td\n\t\t\t\t\t\tcdsTableCheckbox\n\t\t\t\t\t\tclass="cds--table-column-checkbox"\n\t\t\t\t\t\t[size]="size"\n\t\t\t\t\t\t[selected]="selected"\n\t\t\t\t\t\t[label]="getCheckboxLabel()"\n\t\t\t\t\t\t[row]="row"\n\t\t\t\t\t\t[skeleton]="skeleton"\n\t\t\t\t\t\t[headers]="model.getHeaderId(\'select\')"\n\t\t\t\t\t\t(selectedChange)="onSelectionChange()">\n\t\t\t\t\t</td>\n\t\t\t\t</ng-template>\n\t\t\t</ng-container>\n\t\t\t<td\n\t\t\t\t*ngIf="!skeleton && showSelectionColumn && enableSingleSelect"\n\t\t\t\tcdsTableRadio\n\t\t\t\t[selected]="selected"\n\t\t\t\t[label]="getCheckboxLabel()"\n\t\t\t\t[row]="row"\n\t\t\t\t[skeleton]="skeleton"\n\t\t\t\t[headers]="model.getHeaderId(\'select\')"\n\t\t\t\t(change)="onSelectionChange()">\n\t\t\t</td>\n\t\t\t<ng-container *ngFor="let item of row; let j = index">\n\t\t\t\t<td\n\t\t\t\t\t*ngIf="item && model.getHeader(j) && model.getHeader(j).visible"\n\t\t\t\t\tcdsTableData\n\t\t\t\t\t[headers]="model.getHeaderId(j, item.colSpan)"\n\t\t\t\t\t[item]="item"\n\t\t\t\t\t[title]="item.title"\n\t\t\t\t\t[class]="model.getHeader(j).className"\n\t\t\t\t\t[ngStyle]="model.getHeader(j).style"\n\t\t\t\t\t[skeleton]="skeleton"\n\t\t\t\t\t[attr.colspan]="item.colSpan"\n\t\t\t\t\t[attr.rowspan]="item.rowSpan"\n\t\t\t\t\t(click)="onRowClick()"\n\t\t\t\t\t(keydown.enter)="onRowClick()">\n\t\t\t\t</td>\n\t\t\t\t<td\n\t\t\t\t\t*ngIf="item && model.getHeader(j) == null"\n\t\t\t\t\tcdsTableData\n\t\t\t\t\t[headers]="model.getHeaderId(j, item.colSpan)"\n\t\t\t\t\t[item]="item"\n\t\t\t\t\t[title]="item.title"\n\t\t\t\t\t[skeleton]="skeleton"\n\t\t\t\t\t[attr.colspan]="item.colSpan"\n\t\t\t\t\t[attr.rowspan]="item.rowSpan"\n\t\t\t\t\t(click)="onRowClick()"\n\t\t\t\t\t(keydown.enter)="onRowClick()">\n\t\t\t\t</td>\n\t\t\t</ng-container>\n\t\t</ng-container>\n\t\t<ng-content></ng-content>\n\t'})],TableRowComponent);let TableExpandedRow=class TableExpandedRow{constructor(){this.skeleton=!1,this.expandableRowClass=!0,this.dataChildRow=!0,this.expanded=!1}get displayStyle(){return this.expanded?null:"none"}firstExpandedTemplateInRow(row){const found=row.find((d=>d.expandedTemplate));return found?found.expandedTemplate:found}firstExpandedDataInRow(row){const found=row.find((d=>d.expandedData));return found?found.expandedData:found}};TableExpandedRow.propDecorators={row:[{type:core.Input}],skeleton:[{type:core.Input}],expandableRowClass:[{type:core.HostBinding,args:["class.cds--expandable-row"]}],dataChildRow:[{type:core.HostBinding,args:["attr.data-child-row"]}],expanded:[{type:core.Input}],displayStyle:[{type:core.HostBinding,args:["style.display"]}]},TableExpandedRow=(0,tslib_es6.gn)([(0,core.Component)({selector:"[cdsTableExpandedRow], [ibmTableExpandedRow]",template:'\n\t\t<td [attr.colspan]="row.length + 2">\n\t\t\t<ng-container *ngIf="!firstExpandedTemplateInRow(row)">\n\t\t\t\t{{firstExpandedDataInRow(row)}}\n\t\t\t</ng-container>\n\t\t\t<ng-template\n\t\t\t\t[ngTemplateOutlet]="firstExpandedTemplateInRow(row)"\n\t\t\t\t[ngTemplateOutletContext]="{data: firstExpandedDataInRow(row)}">\n\t\t\t</ng-template>\n\t\t</td>\n\t'})],TableExpandedRow);let TableData=class TableData{constructor(){this.skeleton=!1}};TableData.propDecorators={item:[{type:core.Input}],skeleton:[{type:core.Input}]},TableData=(0,tslib_es6.gn)([(0,core.Component)({selector:"[cdsTableData], [ibmTableData]",template:'\n\t\t<ng-container *ngIf="!skeleton && !item.template">{{item.data}}</ng-container>\n\t\t<ng-template\n\t\t\t*ngIf="!skeleton"\n\t\t\t[ngTemplateOutlet]="item.template"\n\t\t\t[ngTemplateOutletContext]="{data: item.data}">\n\t\t</ng-template>\n\t'})],TableData);let TableCheckbox=class TableCheckbox{constructor(i18n){this.i18n=i18n,this.selected=!1,this.name="",this.size="md",this.skeleton=!1,this.selectedChange=new core.EventEmitter,this._label=this.i18n.getOverridable("TABLE.CHECKBOX_ROW")}get disabled(){return!!this.row&&!!this.row.disabled}set label(value){this._label.override(value)}get label(){return this._label.value}getSelectionLabelValue(row){return this.selectionLabelColumn?{value:row[this.selectionLabelColumn].data}:{value:this.i18n.get().TABLE.ROW}}getLabel(){return this._label.subject}};TableCheckbox.ctorParameters=()=>[{type:i18n.oc}],TableCheckbox.propDecorators={row:[{type:core.Input}],selected:[{type:core.Input}],name:[{type:core.Input}],size:[{type:core.Input}],label:[{type:core.Input}],selectionLabelColumn:[{type:core.Input}],skeleton:[{type:core.Input}],selectedChange:[{type:core.Output}]},TableCheckbox=(0,tslib_es6.gn)([(0,core.Component)({selector:"[cdsTableCheckbox], [ibmTableCheckbox]",template:'\n\t\t<cds-checkbox\n\t\t\t*ngIf="!skeleton"\n\t\t\tinline="true"\n\t\t\t[name]="name"\n\t\t\t[ariaLabel]="getLabel() | i18nReplace:getSelectionLabelValue(row) | async"\n\t\t\t[checked]="selected"\n\t\t\t[disabled]="disabled"\n\t\t\t(checkedChange)="selectedChange.emit()">\n\t\t</cds-checkbox>\n\t'})],TableCheckbox);let TableRadio=class TableRadio{constructor(i18n){this.i18n=i18n,this.selected=!1,this.skeleton=!1,this.change=new core.EventEmitter,this._label=this.i18n.getOverridable("TABLE.CHECKBOX_ROW")}set label(value){this._label.override(value)}get label(){return this._label.value}get disabled(){return!!this.row&&!!this.row.disabled}getSelectionLabelValue(row){return this.selectionLabelColumn?{value:row[this.selectionLabelColumn].data}:{value:this.i18n.get().TABLE.ROW}}getLabel(){return this._label.subject}};TableRadio.ctorParameters=()=>[{type:i18n.oc}],TableRadio.propDecorators={row:[{type:core.Input}],selected:[{type:core.Input}],label:[{type:core.Input}],selectionLabelColumn:[{type:core.Input}],skeleton:[{type:core.Input}],change:[{type:core.Output}]},TableRadio=(0,tslib_es6.gn)([(0,core.Component)({selector:"[cdsTableRadio], [ibmTableRadio]",template:'\n\t\t<cds-radio\n\t\t\t*ngIf="!skeleton"\n\t\t\t[attr.aria-label]="getLabel() | i18nReplace:getSelectionLabelValue(row) | async"\n\t\t\t[ariaLabel]="getLabel() | i18nReplace:getSelectionLabelValue(row) | async"\n\t\t\t[checked]="selected"\n\t\t\t[disabled]="disabled"\n\t\t\t(change)="change.emit()">\n\t\t</cds-radio>\n\t'})],TableRadio);let TableExpandButton=class TableExpandButton{constructor(i18n){this.i18n=i18n,this.expanded=!1,this.expandable=!1,this.skeleton=!1,this.expandClass=!0,this.expandRow=new core.EventEmitter,this._ariaLabel=this.i18n.getOverridable("TABLE.EXPAND_BUTTON")}set ariaLabel(value){this._ariaLabel.override(value)}get ariaLabel(){return this._ariaLabel.value}get previousValue(){return this.expanded?"collapsed":null}getAriaLabel(){return this._ariaLabel.subject}};TableExpandButton.ctorParameters=()=>[{type:i18n.oc}],TableExpandButton.propDecorators={expanded:[{type:core.Input}],expandable:[{type:core.Input}],ariaLabel:[{type:core.Input}],skeleton:[{type:core.Input}],expandClass:[{type:core.HostBinding,args:["class.cds--table-expand"]}],previousValue:[{type:core.HostBinding,args:["attr.data-previous-value"]}],expandRow:[{type:core.Output}]},TableExpandButton=(0,tslib_es6.gn)([(0,core.Component)({selector:"[cdsTableExpandButton], [ibmTableExpandButton]",template:'\n\t\t<button\n\t\t\t*ngIf="expandable"\n\t\t\tclass="cds--table-expand__button"\n\t\t\t[attr.aria-label]="getAriaLabel() | async"\n\t\t\t(click)="expandRow.emit()">\n\t\t\t<svg cdsIcon="chevron--right" size="16" class="cds--table-expand__svg"></svg>\n\t\t</button>\n\t'})],TableExpandButton);var common=__webpack_require__("./node_modules/@angular/common/fesm2020/common.mjs"),src_forms=__webpack_require__("./src/forms/index.ts"),dialog=__webpack_require__("./src/dialog/index.ts"),src_button=__webpack_require__("./src/button/index.ts"),icon=__webpack_require__("./src/icon/index.ts");class TableRow extends Array{constructor(){super(...arguments),this.disabled=!1}}let TableModule=class TableModule{};TableModule=(0,tslib_es6.gn)([(0,core.NgModule)({declarations:[TableToolbar,TableContainer,TableHeader,TableHeaderTitle,TableHeaderDescription,TableHeadCellLabel,TableToolbarActions,TableToolbarSearch,TableToolbarContent,ExpandedRowHover,Table,TableDirective,TableHead,TableHeadCell,TableHeadCheckbox,TableHeadExpand,TableBody,TableRowComponent,TableExpandedRow,TableData,TableCheckbox,TableRadio,TableExpandButton],exports:[TableToolbar,TableContainer,TableHeader,TableHeaderTitle,TableHeaderDescription,TableHeadCellLabel,TableToolbarActions,TableToolbarSearch,TableToolbarContent,ExpandedRowHover,Table,TableDirective,TableHead,TableHeadCell,TableHeadCheckbox,TableHeadExpand,TableBody,TableRowComponent,TableExpandedRow,TableData,TableCheckbox,TableRadio,TableExpandButton],imports:[common.CommonModule,src_forms.s,fesm2020_forms.u5,dialog.Su,src_button.hJ,search.t,i18n.LU,icon.QX]})],TableModule)},"./src/table/table-header-item.class.ts":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{__webpack_require__.d(__webpack_exports__,{j:()=>TableHeaderItem});class TableHeaderItem{constructor(rawData){this.visible=!0,this.sorted=!1,this.sortable=!0,this.filterCount=0,this.rowSpan=1,this.colSpan=1,this.style={},this.sortDirection="NONE";const defaults={data:"",visible:this.visible,style:this.style,filterCount:this.filterCount,filterData:{data:""}},data=Object.assign({},defaults,rawData);for(let property of Object.getOwnPropertyNames(data))data.hasOwnProperty(property)&&(this[property]=data[property])}set ascending(asc){this.sortDirection=asc?"ASCENDING":"DESCENDING"}get ascending(){return"ASCENDING"===this.sortDirection}set descending(desc){this.sortDirection=desc?"DESCENDING":"ASCENDING"}get descending(){return"DESCENDING"===this.sortDirection}get title(){return this._title?this._title:this.data?"string"==typeof this.data?this.data:this.data.toString&&this.data.constructor!=={}.constructor?this.data.toString():"":""}set title(title){this._title=title}compare(one,two){return one&&two?"string"==typeof one.data?one.data.localeCompare(two.data):one.data<two.data?-1:one.data>two.data?1:0:0}filter(item){return this.filterCount=0,!1}}},"./src/table/table-item.class.ts":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{__webpack_require__.d(__webpack_exports__,{r:()=>TableItem});class TableItem{constructor(rawData){this.rowSpan=1,this.colSpan=1;const data=Object.assign({},{data:""},rawData);for(const property of Object.getOwnPropertyNames(data))data.hasOwnProperty(property)&&(this[property]=data[property])}get title(){return"string"==typeof this._title?this._title:this.data?"string"==typeof this.data?this.data:this.data.toString&&this.data.constructor!=={}.constructor?this.data.toString():"":""}set title(title){this._title=title}}},"./src/table/table-model.class.ts":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{__webpack_require__.d(__webpack_exports__,{G:()=>TableModel});var _angular_core__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__("./node_modules/@angular/core/fesm2020/core.mjs"),_table_header_item_class__WEBPACK_IMPORTED_MODULE_2__=__webpack_require__("./src/table/table-header-item.class.ts"),_table_item_class__WEBPACK_IMPORTED_MODULE_3__=__webpack_require__("./src/table/table-item.class.ts"),rxjs__WEBPACK_IMPORTED_MODULE_1__=__webpack_require__("./node_modules/rxjs/dist/esm5/internal/Subject.js");class TableModel{constructor(){this.dataChange=new _angular_core__WEBPACK_IMPORTED_MODULE_0__.EventEmitter,this.rowsSelectedChange=new _angular_core__WEBPACK_IMPORTED_MODULE_0__.EventEmitter,this.rowsExpandedChange=new _angular_core__WEBPACK_IMPORTED_MODULE_0__.EventEmitter,this.selectAllChange=new rxjs__WEBPACK_IMPORTED_MODULE_1__.x,this.rowsSelected=[],this.rowsExpanded=[],this.rowsIndices=[],this.rowsContext=[],this.rowsClass=[],this.header=[],this.currentPage=1,this.pageLength=10,this.isEnd=!1,this.isLoading=!1,this._data=[[]],this.tableModelCount=0,this.tableModelCount=TableModel.COUNT++}set data(newData){if((!newData||Array.isArray(newData)&&0===newData.length)&&(newData=[[]]),this._data=newData,this.rowsSelected=new Array(this._data.length).fill(!1),this.rowsExpanded=new Array(this._data.length).fill(!1),this.rowsIndices=[...Array(this._data.length).keys()],this.rowsContext=new Array(this._data.length),this.rowsClass=new Array(this._data.length),null==this.header||this.header.length!==this._data[0].length&&this._data[0].length>0){let header=new Array;for(let i=0;i<this._data[0].length;i++)header.push(new _table_header_item_class__WEBPACK_IMPORTED_MODULE_2__.j);this.header=header}this.dataChange.emit()}get data(){return this._data}set totalDataLength(length){this._totalDataLength=isNaN(length)?null:length}get totalDataLength(){return null!==this._totalDataLength&&this._totalDataLength>=0?this._totalDataLength:this.data&&1===this.data.length&&0===this.data[0].length?0:this.data.length}getId(column,row=0){return`table-header-${row}-${column}-${this.tableModelCount}`}getHeaderId(column,colSpan=1){if("select"===column||"expand"===column)return this.getId(column);let ids=[];for(let i=column;i>=0;i--)if(this.header[i]){for(let j=0;j<colSpan;j++)ids.push(this.getId(i+j));break}return ids.join(" ")}getHeader(column){if(!this.header)return null;for(let i=column;i>=0;i--){const headerCell=this.header[i];if(headerCell)return headerCell}return null}selectedRowsCount(){let count=0;return this.rowsSelected&&this.rowsSelected.forEach((rowSelected=>{rowSelected&&count++})),count}expandedRowsCount(){let count=0;return this.rowsExpanded&&this.rowsExpanded.forEach((rowExpanded=>{rowExpanded&&count++})),count}row(index){return this.data[this.realRowIndex(index)]}addRow(row,index){if(!this.data||0===this.data.length||0===this.data[0].length){let newData=new Array;return newData.push(row||[new _table_item_class__WEBPACK_IMPORTED_MODULE_3__.r]),void(this.data=newData)}let realRow=row;const columnCount=this.data[0].length;if(null==row){realRow=new Array;for(let i=0;i<columnCount;i++)realRow.push(new _table_item_class__WEBPACK_IMPORTED_MODULE_3__.r)}if(realRow.length<columnCount){const difference=columnCount-realRow.length;for(let i=0;i<difference;i++)realRow.push(new _table_item_class__WEBPACK_IMPORTED_MODULE_3__.r)}else if(realRow.length>columnCount){let difference=realRow.length-this.header.length;for(let j=0;j<difference;j++)this.header.push(new _table_header_item_class__WEBPACK_IMPORTED_MODULE_2__.j);for(let i=0;i<this.data.length;i++){let currentRow=this.data[i];difference=realRow.length-currentRow.length;for(let j=0;j<difference;j++)currentRow.push(new _table_item_class__WEBPACK_IMPORTED_MODULE_3__.r)}}if(null==index)this.data.push(realRow),this.rowsSelected.push(!1),this.rowsExpanded.push(!1),this.rowsContext.push(void 0),this.rowsClass.push(void 0),this.rowsIndices.push(this.data.length-1);else{const ri=this.realRowIndex(index);this.data.splice(ri,0,realRow),this.rowsSelected.splice(ri,0,!1),this.rowsExpanded.splice(ri,0,!1),this.rowsContext.splice(ri,0,void 0),this.rowsClass.splice(ri,0,void 0),this.rowsIndices.splice(ri,0,this.data.length-1)}this.dataChange.emit()}deleteRow(index){const rri=this.realRowIndex(index);this.data.splice(rri,1),this.rowsSelected.splice(rri,1),this.rowsExpanded.splice(rri,1),this.rowsContext.splice(rri,1),this.rowsClass.splice(rri,1);const rowIndex=this.rowsIndices[rri];this.rowsIndices.splice(rri,1),this.rowsIndices=this.rowsIndices.map((value=>value>rowIndex?--value:value)),this.dataChange.emit()}hasExpandableRows(){return this.data.some((data=>data.some((d=>d&&d.expandedData))))}isRowExpandable(index){return this.data[index].some((d=>d&&d.expandedData))}isRowExpanded(index){return this.rowsExpanded[index]}getRowContext(index){return this.rowsContext[index]}column(index){let column=new Array;const ri=this.realColumnIndex(index),rc=this.data.length;for(let i=0;i<rc;i++){const row=this.data[i];column.push(row[ri])}return column}addColumn(column,index){if(!this.data||0===this.data.length||0===this.data[0].length){let newData=new Array;if(null==column)newData.push([new _table_item_class__WEBPACK_IMPORTED_MODULE_3__.r]);else for(let i=0;i<column.length;i++){let item=column[i];newData.push([item])}return void(this.data=newData)}let rc=this.data.length,ci=this.realColumnIndex(index);for(let i=0;null!=column&&i<column.length-rc;i++)this.addRow();if(rc=this.data.length,null==index){for(let i=0;i<rc;i++){this.data[i].push(null==column||null==column[i]?new _table_item_class__WEBPACK_IMPORTED_MODULE_3__.r:column[i])}this.header.length<this.data[0].length&&this.header.push(new _table_header_item_class__WEBPACK_IMPORTED_MODULE_2__.j)}else{index>=this.data[0].length&&ci++;for(let i=0;i<rc;i++){this.data[i].splice(ci,0,null==column||null==column[i]?new _table_item_class__WEBPACK_IMPORTED_MODULE_3__.r:column[i])}this.header.length<this.data[0].length&&this.header.splice(ci,0,new _table_header_item_class__WEBPACK_IMPORTED_MODULE_2__.j)}this.dataChange.emit()}deleteColumn(index){const rci=this.realColumnIndex(index),rowCount=this.data.length;for(let i=0;i<rowCount;i++)this.data[i].splice(rci,1);this.header.length>this.data[0].length&&this.header.splice(rci,1),this.dataChange.emit()}moveColumn(indexFrom,indexTo){const headerFrom=this.header[indexFrom];this.addColumn(this.column(indexFrom),indexTo),this.deleteColumn(indexFrom+(indexTo<indexFrom?1:0)),this.header[indexTo+(indexTo>indexFrom?-1:0)]=headerFrom}cycleSortState(index){switch(this.header[index].sortDirection){case"ASCENDING":this.header[index].sortDirection="DESCENDING";break;case"DESCENDING":this.header[index].sortDirection="NONE";break;default:this.header[index].sortDirection="ASCENDING"}}sort(index){this.pushRowStateToModelData();const headerSorted=this.header[index].sorted;if(this.header.forEach((column=>column.sorted=!1)),"NONE"===this.header[index].sortDirection&&headerSorted){const oldData=this._data;this._data=[];for(let i=0;i<this.rowsIndices.length;i++){const ri=this.rowsIndices[i];this._data[ri]=oldData[i]}}else{const descending="DESCENDING"===this.header[index].sortDirection?-1:1;this.data.sort(((a,b)=>descending*this.header[index].compare(a[index],b[index]))),this.header[index].sorted=!0}this.popRowStateFromModelData()}pushRowStateToModelData(){for(let i=0;i<this.data.length;i++){const rowSelectedMark=new _table_item_class__WEBPACK_IMPORTED_MODULE_3__.r;rowSelectedMark.data=this.rowsSelected[i],this.data[i].push(rowSelectedMark);const rowExpandedMark=new _table_item_class__WEBPACK_IMPORTED_MODULE_3__.r;rowExpandedMark.data=this.rowsExpanded[i],this.data[i].push(rowExpandedMark);const rowContext=new _table_item_class__WEBPACK_IMPORTED_MODULE_3__.r;rowContext.data=this.rowsContext[i],this.data[i].push(rowContext);const rowClass=new _table_item_class__WEBPACK_IMPORTED_MODULE_3__.r;rowClass.data=this.rowsClass[i],this.data[i].push(rowClass);const rowIndex=new _table_item_class__WEBPACK_IMPORTED_MODULE_3__.r;rowIndex.data=this.rowsIndices[i],this.data[i].push(rowIndex)}}popRowStateFromModelData(){for(let i=0;i<this.data.length;i++)this.rowsIndices[i]=this.data[i].pop().data,this.rowsClass[i]=this.data[i].pop().data,this.rowsContext[i]=this.data[i].pop().data,this.rowsExpanded[i]=!!this.data[i].pop().data,this.rowsSelected[i]=!!this.data[i].pop().data}isRowFiltered(index){const realIndex=this.realRowIndex(index);return this.header.some(((item,i)=>item&&item.filter(this.row(realIndex)[i])))}selectRow(index,value=!0){this.isRowDisabled(index)||(this.rowsSelected[index]=value,this.rowsSelectedChange.emit(index))}selectAll(value=!0){if(this.data.length>=1&&this.data[0].length>=1)for(let i=0;i<this.rowsSelected.length;i++)this.selectRow(i,value);this.selectAllChange.next(value)}isRowSelected(index){return this.rowsSelected[index]}isRowDisabled(index){return!!this.data[index].disabled}expandRow(index,value=!0){this.rowsExpanded[index]=value,this.rowsExpandedChange.emit(index)}realRowIndex(index){return this.realIndex(index,this.data.length)}realColumnIndex(index){return this.realIndex(index,this.data[0].length)}realIndex(index,length){return null==index?length-1:index>=0?index>=length?length-1:index:-index>=length?0:length+index}}TableModel.COUNT=0},"./src/search/search.component.html?ngResource":module=>{module.exports='<div\n\tclass="cds--search"\n\t[ngClass]="{\n\t\t\'cds--search--sm\': size === \'sm\',\n\t\t\'cds--search--md\': size === \'md\',\n\t\t\'cds--search--lg\': size === \'lg\',\n\t\t\'cds--search--light\': theme === \'light\',\n\t\t\'cds--skeleton\': skeleton,\n\t\t\'cds--search--expandable\': expandable && !tableSearch,\n\t\t\'cds--search--expanded\': expandable && !tableSearch && active,\n\t\t\'cds--toolbar-search\': toolbar && !expandable,\n\t\t\'cds--toolbar-search--active\': toolbar && !expandable && active,\n\t\t\'cds--toolbar-search-container-persistent\': tableSearch && !expandable,\n\t\t\'cds--toolbar-search-container-expandable\': tableSearch && expandable,\n\t\t\'cds--toolbar-search-container-active\': tableSearch && expandable && active\n\t}"\n\trole="search"\n\t[attr.aria-label]="ariaLabel"\n\t(click)="openSearch()">\n\t<label class="cds--label" [for]="id">{{label}}</label>\n\n\t<div *ngIf="skeleton; else enableInput" class="cds--search-input"></div>\n\t<ng-template #enableInput>\n\t\t<input\n\t\t\t#input\n\t\t\tclass="cds--search-input"\n\t\t\t[type]="tableSearch || !toolbar ? \'text\' : \'search\'"\n\t\t\t[id]="id"\n\t\t\t[value]="value"\n\t\t\t[autocomplete]="autocomplete"\n\t\t\t[placeholder]="placeholder"\n\t\t\t[disabled]="disabled"\n\t\t\t[required]="required"\n\t\t\t(input)="onSearch($event.target.value)"\n\t\t\t(keyup.enter)="onEnter()"/>\n\t\t<button\n\t\t\t*ngIf="!tableSearch && toolbar"\n\t\t\tclass="cds--toolbar-search__btn"\n\t\t\t(click)="openSearch()"\n\t\t\taria-label="Open search">\n\t\t\t<svg cdsIcon="search" size="16" class="cds--search-magnifier-icon"></svg>\n\t\t</button>\n\t\t<svg\n\t\t\tcdsIcon="search"\n\t\t\t*ngIf="tableSearch || !toolbar"\n\t\t\tclass="cds--search-magnifier-icon"\n\t\t\tsize="16">\n\t\t</svg>\n\t</ng-template>\n\n\t<button\n\t\t*ngIf="tableSearch || !toolbar"\n\t\tclass="cds--search-close"\n\t\t[ngClass]="{\n\t\t\t\'cds--search-close--hidden\': !value || value.length === 0\n\t\t}"\n\t\t[title]="clearButtonTitle"\n\t\t(click)="clearSearch()">\n\t\t<span class="cds--visually-hidden">{{ clearButtonTitle }}</span>\n\t\t<svg cdsIcon="close" size="16"></svg>\n\t</button>\n</div>\n'}}]);
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";(self.webpackChunkcarbon_components_angular=self.webpackChunkcarbon_components_angular||[]).push([[6274],{"./src/popover/index.ts":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{__webpack_require__.d(__webpack_exports__,{OI:()=>PopoverContainer,yk:()=>PopoverContent,UU:()=>PopoverModule});var asyncToGenerator=__webpack_require__("./node_modules/@babel/runtime/helpers/esm/asyncToGenerator.js"),tslib_es6=__webpack_require__("./node_modules/tslib/tslib.es6.js"),core=__webpack_require__("./node_modules/@angular/core/fesm2020/core.mjs"),floating_ui_dom=__webpack_require__("./node_modules/@floating-ui/dom/dist/floating-ui.dom.mjs"),floating_ui_core=__webpack_require__("./node_modules/@floating-ui/core/dist/floating-ui.core.mjs");let PopoverContainer=class PopoverContainer{constructor(elementRef,ngZone,renderer,changeDetectorRef){this.elementRef=elementRef,this.ngZone=ngZone,this.renderer=renderer,this.changeDetectorRef=changeDetectorRef,this._align="bottom",this.alignmentClassPrefix="cds--popover--",this.onClose=new core.EventEmitter,this.onOpen=new core.EventEmitter,this.isOpenChange=new core.EventEmitter,this.caret=!0,this.dropShadow=!0,this.highContrast=!1,this.autoAlign=!1,this.containerClass=!0,this.isOpen=!1}set align(alignment){if(!alignment)return;const previousAlignment=this._align;switch(alignment){case"top-left":this._align="top-start";break;case"top-right":this._align="top-end";break;case"bottom-left":this._align="bottom-start";break;case"bottom-right":this._align="bottom-end";break;case"left-top":this._align="left-start";break;case"left-bottom":this._align="left-end";break;case"right-top":this._align="right-start";break;case"right-bottom":this._align="right-end";break;default:this._align=alignment}this.updateAlignmentClass(this._align,previousAlignment)}handleChange(open,event){if(this.isOpen!==open&&event&&this.isOpenChange.emit(open),open){if(event&&this.onOpen.emit(event),this.autoAlign){if(this.caretRef){const computedStyle=getComputedStyle(this.caretRef),offset=computedStyle.getPropertyValue("--cds-popover-offset"),height=computedStyle.getPropertyValue("--cds-popover-caret-height");this.caretOffset=(offset?.includes("px")?Number(offset.split("px",1)[0]):16*Number(offset.split("rem",1)[0]))||10,this.caretHeight=(height?.includes("px")?Number(height.split("px",1)[0]):16*Number(height.split("rem",1)[0]))||6}this.elementRef.nativeElement&&this.popoverContentRef&&(this.unmountFloatingElement=(0,floating_ui_dom.Me)(this.elementRef.nativeElement,this.popoverContentRef,this.recomputePosition.bind(this)))}}else this.cleanUp(),event&&this.onClose.emit(event);this.isOpen=open,this.changeDetectorRef.markForCheck()}roundByDPR(value){const dpr=window.devicePixelRatio||1;return Math.round(value*dpr)/dpr}recomputePosition(){var _this=this;this.ngZone.runOutsideAngular((0,asyncToGenerator.Z)((function*(){const{x,y,placement,middlewareData}=yield(0,floating_ui_dom.oo)(_this.elementRef.nativeElement,_this.popoverContentRef,{placement:_this._align,strategy:"fixed",middleware:[(0,floating_ui_core.cv)(_this.caretOffset),(0,floating_ui_dom.RR)({fallbackAxisSideDirection:"start"}),(0,floating_ui_dom.x7)({element:_this.caretRef})]}),previousAlignment=_this._align;if(_this._align=placement,_this.updateAlignmentClass(_this._align,previousAlignment),Object.assign(_this.popoverContentRef.style,{position:"fixed",top:"0",left:"0",transform:`translate(${_this.roundByDPR(x)}px,${_this.roundByDPR(y)}px)`}),middlewareData.arrow){const{x:arrowX,y:arrowY}=middlewareData.arrow,staticSide={top:"bottom",right:"left",bottom:"top",left:"right"}[placement.split("-")[0]];_this.caretRef.style.left=null!=arrowX?`${arrowX}px`:"",_this.caretRef.style.top=null!=arrowY?`${arrowY}px`:"",_this.caretRef.style.right="",_this.caretRef.style.bottom="",staticSide&&(_this.caretRef.style[staticSide]=-_this.caretHeight+"px")}})))}ngOnChanges(changes){const originalState=this.isOpen;this.handleChange(!1),changes.autoAlign&&!changes.autoAlign.firstChange&&(this.popoverContentRef=this.elementRef.nativeElement.querySelector(".cds--popover-content"),this.popoverContentRef.setAttribute("style",""),this.caretRef=this.elementRef.nativeElement.querySelector("span.cds--popover-caret")),this.handleChange(originalState)}ngAfterViewInit(){this.initializeReferences()}initializeReferences(){this.updateAlignmentClass(this._align),this.popoverContentRef=this.elementRef.nativeElement.querySelector(".cds--popover-content"),this.caretRef=this.elementRef.nativeElement.querySelector("span.cds--popover-caret"),this.handleChange(this.isOpen)}ngOnDestroy(){this.cleanUp()}cleanUp(){this.unmountFloatingElement&&this.unmountFloatingElement(),this.unmountFloatingElement=void 0}updateAlignmentClass(newAlignment,previousAlignment){if(this.elementRef.nativeElement&&previousAlignment!==newAlignment){const regexp=new RegExp("right|top|left|bottom");this.elementRef.nativeElement.classList.forEach((className=>{regexp.test(className)&&this.renderer.removeClass(this.elementRef.nativeElement,`${className}`)})),this.renderer.addClass(this.elementRef.nativeElement,`${this.alignmentClassPrefix}${newAlignment}`)}}};PopoverContainer.ctorParameters=()=>[{type:core.ElementRef},{type:core.NgZone},{type:core.Renderer2},{type:core.ChangeDetectorRef}],PopoverContainer.propDecorators={align:[{type:core.Input}],onClose:[{type:core.Output}],onOpen:[{type:core.Output}],isOpenChange:[{type:core.Output}],caret:[{type:core.HostBinding,args:["class.cds--popover--caret"]},{type:core.Input}],dropShadow:[{type:core.HostBinding,args:["class.cds--popover--drop-shadow"]},{type:core.Input}],highContrast:[{type:core.HostBinding,args:["class.cds--popover--high-contrast"]},{type:core.Input}],autoAlign:[{type:core.HostBinding,args:["class.cds--popover--auto-align"]},{type:core.Input}],containerClass:[{type:core.HostBinding,args:["class.cds--popover-container"]}],isOpen:[{type:core.Input},{type:core.HostBinding,args:["class.cds--popover--open"]}]},PopoverContainer=(0,tslib_es6.gn)([(0,core.Directive)({selector:"[cdsPopover], [ibmPopover]"})],PopoverContainer);let PopoverContent=class PopoverContent{constructor(changeDetectorRef){this.changeDetectorRef=changeDetectorRef,this.popoverClass=!0,this.autoAlign=!1}ngAfterViewInit(){this.popoverContent&&(this.autoAlign=!!this.popoverContent.nativeElement.closest(".cds--popover--auto-align"),this.changeDetectorRef.detectChanges())}};PopoverContent.ctorParameters=()=>[{type:core.ChangeDetectorRef}],PopoverContent.propDecorators={popoverClass:[{type:core.HostBinding,args:["class.cds--popover"]}],popoverContent:[{type:core.ViewChild,args:["content"]}]},PopoverContent=(0,tslib_es6.gn)([(0,core.Component)({selector:"cds-popover-content, ibm-popover-content",template:'\n\t\t<span class="cds--popover-content" #content>\n\t\t\t<div>\n\t\t\t\t<ng-content></ng-content>\n\t\t\t</div>\n\t\t\t<span *ngIf="autoAlign" class="cds--popover-caret cds--popover--auto-align"></span>\n\t\t</span>\n\t\t<span *ngIf="!autoAlign" class="cds--popover-caret"></span>\n\t'})],PopoverContent);var common=__webpack_require__("./node_modules/@angular/common/fesm2020/common.mjs");let PopoverModule=class PopoverModule{};PopoverModule=(0,tslib_es6.gn)([(0,core.NgModule)({declarations:[PopoverContainer,PopoverContent],exports:[PopoverContainer,PopoverContent],imports:[common.CommonModule]})],PopoverModule)},"./src/tooltip/index.ts":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{__webpack_require__.d(__webpack_exports__,{u:()=>Tooltip,vD:()=>TooltipDefinition,z8:()=>TooltipModule});var tslib_es6=__webpack_require__("./node_modules/tslib/tslib.es6.js"),core=__webpack_require__("./node_modules/@angular/core/fesm2020/core.mjs"),popover=__webpack_require__("./src/popover/index.ts");let Tooltip=class Tooltip extends popover.OI{constructor(elementRef,ngZone,renderer,changeDetectorRef){super(elementRef,ngZone,renderer,changeDetectorRef),this.elementRef=elementRef,this.ngZone=ngZone,this.renderer=renderer,this.changeDetectorRef=changeDetectorRef,this.tooltipClass=!0,this.id="tooltip-"+Tooltip.tooltipCount++,this.enterDelayMs=100,this.leaveDelayMs=300,this.disabled=!1,this.highContrast=!0,this.dropShadow=!1}mouseenter(event){setTimeout((()=>{this.handleChange(!0,event)}),this.enterDelayMs)}mouseleave(event){setTimeout((()=>{this.handleChange(!1,event)}),this.leaveDelayMs)}hostkeys(event){open&&"Escape"===event.key&&(event.stopPropagation(),this.handleChange(!1,event))}handleFocus(event){this.handleChange(!0,event)}handleFocusOut(event){this.handleChange(!1,event)}isTemplate(value){return value instanceof core.TemplateRef}ngAfterContentChecked(){if(this.wrapper){const buttonElement=this.wrapper.nativeElement.querySelector("button");buttonElement&&!buttonElement.getAttribute("aria-labelledby")&&buttonElement.setAttribute("aria-labelledby",this.id)}}};Tooltip.tooltipCount=0,Tooltip.ctorParameters=()=>[{type:core.ElementRef},{type:core.NgZone},{type:core.Renderer2},{type:core.ChangeDetectorRef}],Tooltip.propDecorators={tooltipClass:[{type:core.HostBinding,args:["class.cds--tooltip"]}],id:[{type:core.Input}],enterDelayMs:[{type:core.Input}],leaveDelayMs:[{type:core.Input}],disabled:[{type:core.Input}],description:[{type:core.Input}],wrapper:[{type:core.ViewChild,args:["contentWrapper"]}],mouseenter:[{type:core.HostListener,args:["mouseenter",["$event"]]}],mouseleave:[{type:core.HostListener,args:["mouseleave",["$event"]]}],hostkeys:[{type:core.HostListener,args:["keyup",["$event"]]}],handleFocus:[{type:core.HostListener,args:["focusin",["$event"]]}],handleFocusOut:[{type:core.HostListener,args:["focusout",["$event"]]}]},Tooltip=(0,tslib_es6.gn)([(0,core.Component)({selector:"cds-tooltip, ibm-tooltip",changeDetection:core.ChangeDetectionStrategy.OnPush,template:'\n\t\t<span #contentWrapper>\n\t\t\t<ng-content></ng-content>\n\t\t</span>\n\t\t<span\n\t\t\t*ngIf="description"\n\t\t\tclass="cds--popover"\n\t\t\t[id]="id"\n\t\t\t[attr.aria-hidden]="!isOpen"\n\t\t\trole="tooltip">\n\t\t\t<ng-container *ngIf="!disabled">\n\t\t\t\t<span class="cds--popover-content cds--tooltip-content">\n\t\t\t\t\t<ng-container *ngIf="!isTemplate(description)">{{description}}</ng-container>\n\t\t\t\t\t<ng-template *ngIf="isTemplate(description)" [ngTemplateOutlet]="description"></ng-template>\n\t\t\t\t\t<span *ngIf="autoAlign" class="cds--popover-caret cds--popover--auto-align"></span>\n\t\t\t\t</span>\n\t\t\t\t<span *ngIf="!autoAlign" class="cds--popover-caret"></span>\n\t\t\t</ng-container>\n\t\t</span>\n\t'})],Tooltip);let TooltipDefinition=class TooltipDefinition extends popover.OI{constructor(elementRef,ngZone,renderer,changeDetectorRef){super(elementRef,ngZone,renderer,changeDetectorRef),this.elementRef=elementRef,this.ngZone=ngZone,this.renderer=renderer,this.changeDetectorRef=changeDetectorRef,this.id="tooltip-definition-"+TooltipDefinition.tooltipCount++,this.highContrast=!0,this.dropShadow=!1}onBlur(event){this.handleChange(!1,event)}onClick(event){this.handleChange(!this.isOpen,event)}hostkeys(event){this.isOpen&&"Escape"===event.key&&(event.stopPropagation(),this.handleChange(!1,event))}mouseleave(event){this.handleChange(!1,event)}isTemplate(value){return value instanceof core.TemplateRef}};TooltipDefinition.tooltipCount=0,TooltipDefinition.ctorParameters=()=>[{type:core.ElementRef},{type:core.NgZone},{type:core.Renderer2},{type:core.ChangeDetectorRef}],TooltipDefinition.propDecorators={id:[{type:core.Input}],description:[{type:core.Input}],hostkeys:[{type:core.HostListener,args:["keyup",["$event"]]}],mouseleave:[{type:core.HostListener,args:["mouseleave",["$event"]]}]},TooltipDefinition=(0,tslib_es6.gn)([(0,core.Component)({selector:"cds-tooltip-definition, ibm-tooltip-definition",changeDetection:core.ChangeDetectionStrategy.OnPush,template:'\n\t\t<button\n\t\t\tclass="cds--definition-term"\n\t\t\t[attr.aria-controls]="id"\n\t\t\t[attr.aria-expanded]="isOpen"\n\t\t\t(blur)="onBlur($event)"\n\t\t\t(click)="onClick($event)"\n\t\t\ttype="button">\n\t\t\t<ng-content></ng-content>\n\t\t</button>\n\t\t<span\n\t\t\t*ngIf="description"\n\t\t\tclass="cds--popover"\n\t\t\t[id]="id"\n\t\t\t[attr.aria-hidden]="isOpen"\n\t\t\trole="tooltip">\n\t\t\t<span class="cds--popover-content cds--definition-tooltip">\n\t\t\t\t<ng-container *ngIf="!isTemplate(description)">{{description}}</ng-container>\n\t\t\t\t<ng-template *ngIf="isTemplate(description)" [ngTemplateOutlet]="description"></ng-template>\n\t\t\t\t<span *ngIf="autoAlign" class="cds--popover-caret cds--popover--auto-align"></span>\n\t\t\t</span>\n\t\t\t<span *ngIf="!autoAlign" class="cds--popover-caret"></span>\n\t\t</span>\n\t'})],TooltipDefinition);var common=__webpack_require__("./node_modules/@angular/common/fesm2020/common.mjs");let TooltipModule=class TooltipModule{};TooltipModule=(0,tslib_es6.gn)([(0,core.NgModule)({declarations:[Tooltip,TooltipDefinition],exports:[Tooltip,TooltipDefinition],imports:[common.CommonModule,popover.UU]})],TooltipModule)},"./node_modules/@storybook/angular/dist/client/argsToTemplate.js":(__unused_webpack_module,exports)=>{Object.defineProperty(exports,"__esModule",{value:!0}),exports.argsToTemplate=void 0,exports.argsToTemplate=function argsToTemplate(args,options={}){const includeSet=options.include?new Set(options.include):null,excludeSet=options.exclude?new Set(options.exclude):null;return Object.entries(args).filter((([key])=>void 0!==args[key])).filter((([key])=>includeSet?includeSet.has(key):!excludeSet||!excludeSet.has(key))).map((([key,value])=>"function"==typeof value?`(${key})="${key}($event)"`:`[${key}]="${key}"`)).join(" ")}},"./node_modules/@storybook/angular/dist/client/decorators.js":(__unused_webpack_module,exports,__webpack_require__)=>{Object.defineProperty(exports,"__esModule",{value:!0}),exports.componentWrapperDecorator=exports.applicationConfig=exports.moduleMetadata=void 0;const ComputesTemplateFromComponent_1=__webpack_require__("./node_modules/@storybook/angular/dist/client/angular-beta/ComputesTemplateFromComponent.js"),NgComponentAnalyzer_1=__webpack_require__("./node_modules/@storybook/angular/dist/client/angular-beta/utils/NgComponentAnalyzer.js");exports.moduleMetadata=metadata=>storyFn=>{const story=storyFn(),storyMetadata=story.moduleMetadata||{};return metadata=metadata||{},{...story,moduleMetadata:{declarations:[...metadata.declarations||[],...storyMetadata.declarations||[]],entryComponents:[...metadata.entryComponents||[],...storyMetadata.entryComponents||[]],imports:[...metadata.imports||[],...storyMetadata.imports||[]],schemas:[...metadata.schemas||[],...storyMetadata.schemas||[]],providers:[...metadata.providers||[],...storyMetadata.providers||[]]}}},exports.applicationConfig=function applicationConfig(config){return storyFn=>{const story=storyFn(),storyConfig=story.applicationConfig;return{...story,applicationConfig:storyConfig||config?{...config,...storyConfig,providers:[...config?.providers||[],...storyConfig?.providers||[]]}:void 0}}};exports.componentWrapperDecorator=(element,props)=>(storyFn,storyContext)=>{const story=storyFn(),currentProps="function"==typeof props?props(storyContext):props,template=(0,NgComponentAnalyzer_1.isComponent)(element)?(0,ComputesTemplateFromComponent_1.computesTemplateFromComponent)(element,currentProps??{},story.template):element(story.template);return{...story,template,...currentProps||story.props?{props:{...currentProps,...story.props}}:{}}}},"./node_modules/@storybook/angular/dist/client/index.js":function(__unused_webpack_module,exports,__webpack_require__){var __createBinding=this&&this.__createBinding||(Object.create?function(o,m,k,k2){void 0===k2&&(k2=k);var desc=Object.getOwnPropertyDescriptor(m,k);desc&&!("get"in desc?!m.__esModule:desc.writable||desc.configurable)||(desc={enumerable:!0,get:function(){return m[k]}}),Object.defineProperty(o,k2,desc)}:function(o,m,k,k2){void 0===k2&&(k2=k),o[k2]=m[k]}),__exportStar=this&&this.__exportStar||function(m,exports){for(var p in m)"default"===p||Object.prototype.hasOwnProperty.call(exports,p)||__createBinding(exports,m,p)};Object.defineProperty(exports,"__esModule",{value:!0}),exports.argsToTemplate=exports.applicationConfig=exports.componentWrapperDecorator=exports.moduleMetadata=void 0,__webpack_require__("./node_modules/@storybook/angular/dist/client/globals.js"),__exportStar(__webpack_require__("./node_modules/@storybook/angular/dist/client/public-api.js"),exports),__exportStar(__webpack_require__("./node_modules/@storybook/angular/dist/client/public-types.js"),exports);var decorators_1=__webpack_require__("./node_modules/@storybook/angular/dist/client/decorators.js");Object.defineProperty(exports,"moduleMetadata",{enumerable:!0,get:function(){return decorators_1.moduleMetadata}}),Object.defineProperty(exports,"componentWrapperDecorator",{enumerable:!0,get:function(){return decorators_1.componentWrapperDecorator}}),Object.defineProperty(exports,"applicationConfig",{enumerable:!0,get:function(){return decorators_1.applicationConfig}});var argsToTemplate_1=__webpack_require__("./node_modules/@storybook/angular/dist/client/argsToTemplate.js");Object.defineProperty(exports,"argsToTemplate",{enumerable:!0,get:function(){return argsToTemplate_1.argsToTemplate}})},"./node_modules/@storybook/angular/dist/client/public-api.js":function(__unused_webpack_module,exports,__webpack_require__){var __createBinding=this&&this.__createBinding||(Object.create?function(o,m,k,k2){void 0===k2&&(k2=k);var desc=Object.getOwnPropertyDescriptor(m,k);desc&&!("get"in desc?!m.__esModule:desc.writable||desc.configurable)||(desc={enumerable:!0,get:function(){return m[k]}}),Object.defineProperty(o,k2,desc)}:function(o,m,k,k2){void 0===k2&&(k2=k),o[k2]=m[k]}),__exportStar=this&&this.__exportStar||function(m,exports){for(var p in m)"default"===p||Object.prototype.hasOwnProperty.call(exports,p)||__createBinding(exports,m,p)},__importDefault=this&&this.__importDefault||function(mod){return mod&&mod.__esModule?mod:{default:mod}};Object.defineProperty(exports,"__esModule",{value:!0}),exports.raw=exports.forceReRender=exports.configure=exports.storiesOf=void 0;const preview_api_1=__webpack_require__("@storybook/preview-api"),render_1=__webpack_require__("./node_modules/@storybook/angular/dist/client/render.js"),decorateStory_1=__importDefault(__webpack_require__("./node_modules/@storybook/angular/dist/client/decorateStory.js"));__exportStar(__webpack_require__("./node_modules/@storybook/angular/dist/client/public-types.js"),exports);const api=(0,preview_api_1.start)(render_1.renderToCanvas,{decorateStory:decorateStory_1.default,render:render_1.render});exports.storiesOf=(kind,m)=>api.clientApi.storiesOf(kind,m).addParameters({renderer:"angular"});exports.configure=(...args)=>api.configure("angular",...args),exports.forceReRender=api.forceReRender,exports.raw=api.clientApi.raw},"./node_modules/@storybook/angular/dist/client/public-types.js":(__unused_webpack_module,exports)=>{Object.defineProperty(exports,"__esModule",{value:!0})},"./node_modules/@storybook/angular/dist/index.mjs":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{var _client_index__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__("./node_modules/@storybook/angular/dist/client/index.js");__webpack_require__.o(_client_index__WEBPACK_IMPORTED_MODULE_0__,"applicationConfig")&&__webpack_require__.d(__webpack_exports__,{applicationConfig:function(){return _client_index__WEBPACK_IMPORTED_MODULE_0__.applicationConfig}}),__webpack_require__.o(_client_index__WEBPACK_IMPORTED_MODULE_0__,"componentWrapperDecorator")&&__webpack_require__.d(__webpack_exports__,{componentWrapperDecorator:function(){return _client_index__WEBPACK_IMPORTED_MODULE_0__.componentWrapperDecorator}}),__webpack_require__.o(_client_index__WEBPACK_IMPORTED_MODULE_0__,"moduleMetadata")&&__webpack_require__.d(__webpack_exports__,{moduleMetadata:function(){return _client_index__WEBPACK_IMPORTED_MODULE_0__.moduleMetadata}})},"./src/tooltip/definition-tooptip.stories.ts":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{__webpack_require__.r(__webpack_exports__),__webpack_require__.d(__webpack_exports__,{Basic:()=>Basic,WithAutoAlign:()=>WithAutoAlign,__namedExportsOrder:()=>__namedExportsOrder,default:()=>__WEBPACK_DEFAULT_EXPORT__});var _storybook_angular__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__("./node_modules/@storybook/angular/dist/index.mjs"),___WEBPACK_IMPORTED_MODULE_1__=__webpack_require__("./src/tooltip/index.ts");const __WEBPACK_DEFAULT_EXPORT__={title:"Components/Definition Tooltip",decorators:[(0,_storybook_angular__WEBPACK_IMPORTED_MODULE_0__.moduleMetadata)({imports:[___WEBPACK_IMPORTED_MODULE_1__.z8]})],parameters:{docs:{story:{inline:!1,iframeHeight:"18rem"}}},args:{isOpen:!0,caret:!0,description:"Uniform Resource Locator; the address of a resource (such as a document or website) on the Internet.",align:"bottom",autoAlign:!1},argTypes:{autoAlign:{control:!1},onOpen:{control:"Opened!"},onClose:{control:"Closed!"},isOpenChange:{control:"Is Open Change!"},align:{options:["top","top-left","top-right","bottom","bottom-left","bottom-right"],control:"select"}},component:___WEBPACK_IMPORTED_MODULE_1__.vD},Basic=(args=>({props:args,template:'\n <div style="height:3000px">\n Scrolling will update the position of the popover:\n <div style="position: absolute; top: 500px; left: 500px;">\n <p>Custom domains direct requests for your apps in this Cloud Foundry organization to a\n <cds-tooltip-definition\n [isOpen]="isOpen"\n [caret]="caret"\n [align]="align"\n (onOpen)="onOpen($event)"\n (onClose)="onClose($event)"\n (isOpenChange)="isOpenChange($event)"\n [description]="description">\n URL\n </cds-tooltip-definition>\n that you own. A custom domain can be a shared domain, a shared subdomain, or a shared domain and host.</p>\n </div>\n </div>\n ',styles:["\n .tooltip-trigger {\n box-sizing: border-box;\n margin: 0;\n display: flex;\n align-items: center;\n justify-content: center;\n width: 2rem;\n height: 2rem;\n background: white;\n border: 1px solid var(--cds-border-subtle);\n cursor: pointer;\n }\n svg { fill: var(--cds-background-inverse); }\n "]})).bind({}),WithAutoAlign=(args=>({props:args,template:'\n <div style="height:3000px">\n Scrolling will update the position of the popover:\n <div style="position: absolute; top: 500px; left: 500px;">\n <p>Custom domains direct requests for your apps in this Cloud Foundry organization to a\n <cds-tooltip-definition\n [isOpen]="isOpen"\n [caret]="caret"\n [align]="align"\n [autoAlign]="true"\n (onOpen)="onOpen($event)"\n (onClose)="onClose($event)"\n (isOpenChange)="isOpenChange($event)"\n [description]="description">\n URL\n </cds-tooltip-definition>\n that you own. A custom domain can be a shared domain, a shared subdomain, or a shared domain and host.</p>\n </div>\n </div>\n ',styles:["\n .tooltip-trigger {\n box-sizing: border-box;\n margin: 0;\n display: flex;\n align-items: center;\n justify-content: center;\n width: 2rem;\n height: 2rem;\n background: white;\n border: 1px solid var(--cds-border-subtle);\n cursor: pointer;\n }\n svg { fill: var(--cds-background-inverse); }\n "]})).bind({});WithAutoAlign.args={autoAlign:!0,align:"top"},Basic.parameters={...Basic.parameters,docs:{...Basic.parameters?.docs,source:{originalSource:'args => ({\n props: args,\n template: `\n <div style="height:3000px">\n Scrolling will update the position of the popover:\n <div style="position: absolute; top: 500px; left: 500px;">\n <p>Custom domains direct requests for your apps in this Cloud Foundry organization to a\n <cds-tooltip-definition\n [isOpen]="isOpen"\n [caret]="caret"\n [align]="align"\n (onOpen)="onOpen($event)"\n (onClose)="onClose($event)"\n (isOpenChange)="isOpenChange($event)"\n [description]="description">\n URL\n </cds-tooltip-definition>\n that you own. A custom domain can be a shared domain, a shared subdomain, or a shared domain and host.</p>\n </div>\n </div>\n `,\n styles: [`\n .tooltip-trigger {\n box-sizing: border-box;\n margin: 0;\n display: flex;\n align-items: center;\n justify-content: center;\n width: 2rem;\n height: 2rem;\n background: white;\n border: 1px solid var(--cds-border-subtle);\n cursor: pointer;\n }\n svg { fill: var(--cds-background-inverse); }\n `]\n})',...Basic.parameters?.docs?.source}}},WithAutoAlign.parameters={...WithAutoAlign.parameters,docs:{...WithAutoAlign.parameters?.docs,source:{originalSource:'args => ({\n props: args,\n template: `\n <div style="height:3000px">\n Scrolling will update the position of the popover:\n <div style="position: absolute; top: 500px; left: 500px;">\n <p>Custom domains direct requests for your apps in this Cloud Foundry organization to a\n <cds-tooltip-definition\n [isOpen]="isOpen"\n [caret]="caret"\n [align]="align"\n [autoAlign]="true"\n (onOpen)="onOpen($event)"\n (onClose)="onClose($event)"\n (isOpenChange)="isOpenChange($event)"\n [description]="description">\n URL\n </cds-tooltip-definition>\n that you own. A custom domain can be a shared domain, a shared subdomain, or a shared domain and host.</p>\n </div>\n </div>\n `,\n styles: [`\n .tooltip-trigger {\n box-sizing: border-box;\n margin: 0;\n display: flex;\n align-items: center;\n justify-content: center;\n width: 2rem;\n height: 2rem;\n background: white;\n border: 1px solid var(--cds-border-subtle);\n cursor: pointer;\n }\n svg { fill: var(--cds-background-inverse); }\n `]\n})',...WithAutoAlign.parameters?.docs?.source}}};const __namedExportsOrder=["Basic","WithAutoAlign"]}}]);
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";(self.webpackChunkcarbon_components_angular=self.webpackChunkcarbon_components_angular||[]).push([[4253],{"./src/popover/index.ts":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{__webpack_require__.d(__webpack_exports__,{OI:()=>PopoverContainer,yk:()=>PopoverContent,UU:()=>PopoverModule});var asyncToGenerator=__webpack_require__("./node_modules/@babel/runtime/helpers/esm/asyncToGenerator.js"),tslib_es6=__webpack_require__("./node_modules/tslib/tslib.es6.js"),core=__webpack_require__("./node_modules/@angular/core/fesm2020/core.mjs"),floating_ui_dom=__webpack_require__("./node_modules/@floating-ui/dom/dist/floating-ui.dom.mjs"),floating_ui_core=__webpack_require__("./node_modules/@floating-ui/core/dist/floating-ui.core.mjs");let PopoverContainer=class PopoverContainer{constructor(elementRef,ngZone,renderer,changeDetectorRef){this.elementRef=elementRef,this.ngZone=ngZone,this.renderer=renderer,this.changeDetectorRef=changeDetectorRef,this._align="bottom",this.alignmentClassPrefix="cds--popover--",this.onClose=new core.EventEmitter,this.onOpen=new core.EventEmitter,this.isOpenChange=new core.EventEmitter,this.caret=!0,this.dropShadow=!0,this.highContrast=!1,this.autoAlign=!1,this.containerClass=!0,this.isOpen=!1}set align(alignment){if(!alignment)return;const previousAlignment=this._align;switch(alignment){case"top-left":this._align="top-start";break;case"top-right":this._align="top-end";break;case"bottom-left":this._align="bottom-start";break;case"bottom-right":this._align="bottom-end";break;case"left-top":this._align="left-start";break;case"left-bottom":this._align="left-end";break;case"right-top":this._align="right-start";break;case"right-bottom":this._align="right-end";break;default:this._align=alignment}this.updateAlignmentClass(this._align,previousAlignment)}handleChange(open,event){if(this.isOpen!==open&&event&&this.isOpenChange.emit(open),open){if(event&&this.onOpen.emit(event),this.autoAlign){if(this.caretRef){const computedStyle=getComputedStyle(this.caretRef),offset=computedStyle.getPropertyValue("--cds-popover-offset"),height=computedStyle.getPropertyValue("--cds-popover-caret-height");this.caretOffset=(offset?.includes("px")?Number(offset.split("px",1)[0]):16*Number(offset.split("rem",1)[0]))||10,this.caretHeight=(height?.includes("px")?Number(height.split("px",1)[0]):16*Number(height.split("rem",1)[0]))||6}this.elementRef.nativeElement&&this.popoverContentRef&&(this.unmountFloatingElement=(0,floating_ui_dom.Me)(this.elementRef.nativeElement,this.popoverContentRef,this.recomputePosition.bind(this)))}}else this.cleanUp(),event&&this.onClose.emit(event);this.isOpen=open,this.changeDetectorRef.markForCheck()}roundByDPR(value){const dpr=window.devicePixelRatio||1;return Math.round(value*dpr)/dpr}recomputePosition(){var _this=this;this.ngZone.runOutsideAngular((0,asyncToGenerator.Z)((function*(){const{x,y,placement,middlewareData}=yield(0,floating_ui_dom.oo)(_this.elementRef.nativeElement,_this.popoverContentRef,{placement:_this._align,strategy:"fixed",middleware:[(0,floating_ui_core.cv)(_this.caretOffset),(0,floating_ui_dom.RR)({fallbackAxisSideDirection:"start"}),(0,floating_ui_dom.x7)({element:_this.caretRef})]}),previousAlignment=_this._align;if(_this._align=placement,_this.updateAlignmentClass(_this._align,previousAlignment),Object.assign(_this.popoverContentRef.style,{position:"fixed",top:"0",left:"0",transform:`translate(${_this.roundByDPR(x)}px,${_this.roundByDPR(y)}px)`}),middlewareData.arrow){const{x:arrowX,y:arrowY}=middlewareData.arrow,staticSide={top:"bottom",right:"left",bottom:"top",left:"right"}[placement.split("-")[0]];_this.caretRef.style.left=null!=arrowX?`${arrowX}px`:"",_this.caretRef.style.top=null!=arrowY?`${arrowY}px`:"",_this.caretRef.style.right="",_this.caretRef.style.bottom="",staticSide&&(_this.caretRef.style[staticSide]=-_this.caretHeight+"px")}})))}ngOnChanges(changes){const originalState=this.isOpen;this.handleChange(!1),changes.autoAlign&&!changes.autoAlign.firstChange&&(this.popoverContentRef=this.elementRef.nativeElement.querySelector(".cds--popover-content"),this.popoverContentRef.setAttribute("style",""),this.caretRef=this.elementRef.nativeElement.querySelector("span.cds--popover-caret")),this.handleChange(originalState)}ngAfterViewInit(){this.initializeReferences()}initializeReferences(){this.updateAlignmentClass(this._align),this.popoverContentRef=this.elementRef.nativeElement.querySelector(".cds--popover-content"),this.caretRef=this.elementRef.nativeElement.querySelector("span.cds--popover-caret"),this.handleChange(this.isOpen)}ngOnDestroy(){this.cleanUp()}cleanUp(){this.unmountFloatingElement&&this.unmountFloatingElement(),this.unmountFloatingElement=void 0}updateAlignmentClass(newAlignment,previousAlignment){if(this.elementRef.nativeElement&&previousAlignment!==newAlignment){const regexp=new RegExp("right|top|left|bottom");this.elementRef.nativeElement.classList.forEach((className=>{regexp.test(className)&&this.renderer.removeClass(this.elementRef.nativeElement,`${className}`)})),this.renderer.addClass(this.elementRef.nativeElement,`${this.alignmentClassPrefix}${newAlignment}`)}}};PopoverContainer.ctorParameters=()=>[{type:core.ElementRef},{type:core.NgZone},{type:core.Renderer2},{type:core.ChangeDetectorRef}],PopoverContainer.propDecorators={align:[{type:core.Input}],onClose:[{type:core.Output}],onOpen:[{type:core.Output}],isOpenChange:[{type:core.Output}],caret:[{type:core.HostBinding,args:["class.cds--popover--caret"]},{type:core.Input}],dropShadow:[{type:core.HostBinding,args:["class.cds--popover--drop-shadow"]},{type:core.Input}],highContrast:[{type:core.HostBinding,args:["class.cds--popover--high-contrast"]},{type:core.Input}],autoAlign:[{type:core.HostBinding,args:["class.cds--popover--auto-align"]},{type:core.Input}],containerClass:[{type:core.HostBinding,args:["class.cds--popover-container"]}],isOpen:[{type:core.Input},{type:core.HostBinding,args:["class.cds--popover--open"]}]},PopoverContainer=(0,tslib_es6.gn)([(0,core.Directive)({selector:"[cdsPopover], [ibmPopover]"})],PopoverContainer);let PopoverContent=class PopoverContent{constructor(changeDetectorRef){this.changeDetectorRef=changeDetectorRef,this.popoverClass=!0,this.autoAlign=!1}ngAfterViewInit(){this.popoverContent&&(this.autoAlign=!!this.popoverContent.nativeElement.closest(".cds--popover--auto-align"),this.changeDetectorRef.detectChanges())}};PopoverContent.ctorParameters=()=>[{type:core.ChangeDetectorRef}],PopoverContent.propDecorators={popoverClass:[{type:core.HostBinding,args:["class.cds--popover"]}],popoverContent:[{type:core.ViewChild,args:["content"]}]},PopoverContent=(0,tslib_es6.gn)([(0,core.Component)({selector:"cds-popover-content, ibm-popover-content",template:'\n\t\t<span class="cds--popover-content" #content>\n\t\t\t<div>\n\t\t\t\t<ng-content></ng-content>\n\t\t\t</div>\n\t\t\t<span *ngIf="autoAlign" class="cds--popover-caret cds--popover--auto-align"></span>\n\t\t</span>\n\t\t<span *ngIf="!autoAlign" class="cds--popover-caret"></span>\n\t'})],PopoverContent);var common=__webpack_require__("./node_modules/@angular/common/fesm2020/common.mjs");let PopoverModule=class PopoverModule{};PopoverModule=(0,tslib_es6.gn)([(0,core.NgModule)({declarations:[PopoverContainer,PopoverContent],exports:[PopoverContainer,PopoverContent],imports:[common.CommonModule]})],PopoverModule)},"./src/tooltip/index.ts":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{__webpack_require__.d(__webpack_exports__,{u:()=>Tooltip,vD:()=>TooltipDefinition,z8:()=>TooltipModule});var tslib_es6=__webpack_require__("./node_modules/tslib/tslib.es6.js"),core=__webpack_require__("./node_modules/@angular/core/fesm2020/core.mjs"),popover=__webpack_require__("./src/popover/index.ts");let Tooltip=class Tooltip extends popover.OI{constructor(elementRef,ngZone,renderer,changeDetectorRef){super(elementRef,ngZone,renderer,changeDetectorRef),this.elementRef=elementRef,this.ngZone=ngZone,this.renderer=renderer,this.changeDetectorRef=changeDetectorRef,this.tooltipClass=!0,this.id="tooltip-"+Tooltip.tooltipCount++,this.enterDelayMs=100,this.leaveDelayMs=300,this.disabled=!1,this.highContrast=!0,this.dropShadow=!1}mouseenter(event){setTimeout((()=>{this.handleChange(!0,event)}),this.enterDelayMs)}mouseleave(event){setTimeout((()=>{this.handleChange(!1,event)}),this.leaveDelayMs)}hostkeys(event){open&&"Escape"===event.key&&(event.stopPropagation(),this.handleChange(!1,event))}handleFocus(event){this.handleChange(!0,event)}handleFocusOut(event){this.handleChange(!1,event)}isTemplate(value){return value instanceof core.TemplateRef}ngAfterContentChecked(){if(this.wrapper){const buttonElement=this.wrapper.nativeElement.querySelector("button");buttonElement&&!buttonElement.getAttribute("aria-labelledby")&&buttonElement.setAttribute("aria-labelledby",this.id)}}};Tooltip.tooltipCount=0,Tooltip.ctorParameters=()=>[{type:core.ElementRef},{type:core.NgZone},{type:core.Renderer2},{type:core.ChangeDetectorRef}],Tooltip.propDecorators={tooltipClass:[{type:core.HostBinding,args:["class.cds--tooltip"]}],id:[{type:core.Input}],enterDelayMs:[{type:core.Input}],leaveDelayMs:[{type:core.Input}],disabled:[{type:core.Input}],description:[{type:core.Input}],wrapper:[{type:core.ViewChild,args:["contentWrapper"]}],mouseenter:[{type:core.HostListener,args:["mouseenter",["$event"]]}],mouseleave:[{type:core.HostListener,args:["mouseleave",["$event"]]}],hostkeys:[{type:core.HostListener,args:["keyup",["$event"]]}],handleFocus:[{type:core.HostListener,args:["focusin",["$event"]]}],handleFocusOut:[{type:core.HostListener,args:["focusout",["$event"]]}]},Tooltip=(0,tslib_es6.gn)([(0,core.Component)({selector:"cds-tooltip, ibm-tooltip",changeDetection:core.ChangeDetectionStrategy.OnPush,template:'\n\t\t<span #contentWrapper>\n\t\t\t<ng-content></ng-content>\n\t\t</span>\n\t\t<span\n\t\t\t*ngIf="description"\n\t\t\tclass="cds--popover"\n\t\t\t[id]="id"\n\t\t\t[attr.aria-hidden]="!isOpen"\n\t\t\trole="tooltip">\n\t\t\t<ng-container *ngIf="!disabled">\n\t\t\t\t<span class="cds--popover-content cds--tooltip-content">\n\t\t\t\t\t<ng-container *ngIf="!isTemplate(description)">{{description}}</ng-container>\n\t\t\t\t\t<ng-template *ngIf="isTemplate(description)" [ngTemplateOutlet]="description"></ng-template>\n\t\t\t\t\t<span *ngIf="autoAlign" class="cds--popover-caret cds--popover--auto-align"></span>\n\t\t\t\t</span>\n\t\t\t\t<span *ngIf="!autoAlign" class="cds--popover-caret"></span>\n\t\t\t</ng-container>\n\t\t</span>\n\t'})],Tooltip);let TooltipDefinition=class TooltipDefinition extends popover.OI{constructor(elementRef,ngZone,renderer,changeDetectorRef){super(elementRef,ngZone,renderer,changeDetectorRef),this.elementRef=elementRef,this.ngZone=ngZone,this.renderer=renderer,this.changeDetectorRef=changeDetectorRef,this.id="tooltip-definition-"+TooltipDefinition.tooltipCount++,this.highContrast=!0,this.dropShadow=!1}onBlur(event){this.handleChange(!1,event)}onClick(event){this.handleChange(!this.isOpen,event)}hostkeys(event){this.isOpen&&"Escape"===event.key&&(event.stopPropagation(),this.handleChange(!1,event))}mouseleave(event){this.handleChange(!1,event)}isTemplate(value){return value instanceof core.TemplateRef}};TooltipDefinition.tooltipCount=0,TooltipDefinition.ctorParameters=()=>[{type:core.ElementRef},{type:core.NgZone},{type:core.Renderer2},{type:core.ChangeDetectorRef}],TooltipDefinition.propDecorators={id:[{type:core.Input}],description:[{type:core.Input}],hostkeys:[{type:core.HostListener,args:["keyup",["$event"]]}],mouseleave:[{type:core.HostListener,args:["mouseleave",["$event"]]}]},TooltipDefinition=(0,tslib_es6.gn)([(0,core.Component)({selector:"cds-tooltip-definition, ibm-tooltip-definition",changeDetection:core.ChangeDetectionStrategy.OnPush,template:'\n\t\t<button\n\t\t\tclass="cds--definition-term"\n\t\t\t[attr.aria-controls]="id"\n\t\t\t[attr.aria-expanded]="isOpen"\n\t\t\t(blur)="onBlur($event)"\n\t\t\t(click)="onClick($event)"\n\t\t\ttype="button">\n\t\t\t<ng-content></ng-content>\n\t\t</button>\n\t\t<span\n\t\t\t*ngIf="description"\n\t\t\tclass="cds--popover"\n\t\t\t[id]="id"\n\t\t\t[attr.aria-hidden]="isOpen"\n\t\t\trole="tooltip">\n\t\t\t<span class="cds--popover-content cds--definition-tooltip">\n\t\t\t\t<ng-container *ngIf="!isTemplate(description)">{{description}}</ng-container>\n\t\t\t\t<ng-template *ngIf="isTemplate(description)" [ngTemplateOutlet]="description"></ng-template>\n\t\t\t\t<span *ngIf="autoAlign" class="cds--popover-caret cds--popover--auto-align"></span>\n\t\t\t</span>\n\t\t\t<span *ngIf="!autoAlign" class="cds--popover-caret"></span>\n\t\t</span>\n\t'})],TooltipDefinition);var common=__webpack_require__("./node_modules/@angular/common/fesm2020/common.mjs");let TooltipModule=class TooltipModule{};TooltipModule=(0,tslib_es6.gn)([(0,core.NgModule)({declarations:[Tooltip,TooltipDefinition],exports:[Tooltip,TooltipDefinition],imports:[common.CommonModule,popover.UU]})],TooltipModule)},"./node_modules/@storybook/angular/dist/client/argsToTemplate.js":(__unused_webpack_module,exports)=>{Object.defineProperty(exports,"__esModule",{value:!0}),exports.argsToTemplate=void 0,exports.argsToTemplate=function argsToTemplate(args,options={}){const includeSet=options.include?new Set(options.include):null,excludeSet=options.exclude?new Set(options.exclude):null;return Object.entries(args).filter((([key])=>void 0!==args[key])).filter((([key])=>includeSet?includeSet.has(key):!excludeSet||!excludeSet.has(key))).map((([key,value])=>"function"==typeof value?`(${key})="${key}($event)"`:`[${key}]="${key}"`)).join(" ")}},"./node_modules/@storybook/angular/dist/client/decorators.js":(__unused_webpack_module,exports,__webpack_require__)=>{Object.defineProperty(exports,"__esModule",{value:!0}),exports.componentWrapperDecorator=exports.applicationConfig=exports.moduleMetadata=void 0;const ComputesTemplateFromComponent_1=__webpack_require__("./node_modules/@storybook/angular/dist/client/angular-beta/ComputesTemplateFromComponent.js"),NgComponentAnalyzer_1=__webpack_require__("./node_modules/@storybook/angular/dist/client/angular-beta/utils/NgComponentAnalyzer.js");exports.moduleMetadata=metadata=>storyFn=>{const story=storyFn(),storyMetadata=story.moduleMetadata||{};return metadata=metadata||{},{...story,moduleMetadata:{declarations:[...metadata.declarations||[],...storyMetadata.declarations||[]],entryComponents:[...metadata.entryComponents||[],...storyMetadata.entryComponents||[]],imports:[...metadata.imports||[],...storyMetadata.imports||[]],schemas:[...metadata.schemas||[],...storyMetadata.schemas||[]],providers:[...metadata.providers||[],...storyMetadata.providers||[]]}}},exports.applicationConfig=function applicationConfig(config){return storyFn=>{const story=storyFn(),storyConfig=story.applicationConfig;return{...story,applicationConfig:storyConfig||config?{...config,...storyConfig,providers:[...config?.providers||[],...storyConfig?.providers||[]]}:void 0}}};exports.componentWrapperDecorator=(element,props)=>(storyFn,storyContext)=>{const story=storyFn(),currentProps="function"==typeof props?props(storyContext):props,template=(0,NgComponentAnalyzer_1.isComponent)(element)?(0,ComputesTemplateFromComponent_1.computesTemplateFromComponent)(element,currentProps??{},story.template):element(story.template);return{...story,template,...currentProps||story.props?{props:{...currentProps,...story.props}}:{}}}},"./node_modules/@storybook/angular/dist/client/index.js":function(__unused_webpack_module,exports,__webpack_require__){var __createBinding=this&&this.__createBinding||(Object.create?function(o,m,k,k2){void 0===k2&&(k2=k);var desc=Object.getOwnPropertyDescriptor(m,k);desc&&!("get"in desc?!m.__esModule:desc.writable||desc.configurable)||(desc={enumerable:!0,get:function(){return m[k]}}),Object.defineProperty(o,k2,desc)}:function(o,m,k,k2){void 0===k2&&(k2=k),o[k2]=m[k]}),__exportStar=this&&this.__exportStar||function(m,exports){for(var p in m)"default"===p||Object.prototype.hasOwnProperty.call(exports,p)||__createBinding(exports,m,p)};Object.defineProperty(exports,"__esModule",{value:!0}),exports.argsToTemplate=exports.applicationConfig=exports.componentWrapperDecorator=exports.moduleMetadata=void 0,__webpack_require__("./node_modules/@storybook/angular/dist/client/globals.js"),__exportStar(__webpack_require__("./node_modules/@storybook/angular/dist/client/public-api.js"),exports),__exportStar(__webpack_require__("./node_modules/@storybook/angular/dist/client/public-types.js"),exports);var decorators_1=__webpack_require__("./node_modules/@storybook/angular/dist/client/decorators.js");Object.defineProperty(exports,"moduleMetadata",{enumerable:!0,get:function(){return decorators_1.moduleMetadata}}),Object.defineProperty(exports,"componentWrapperDecorator",{enumerable:!0,get:function(){return decorators_1.componentWrapperDecorator}}),Object.defineProperty(exports,"applicationConfig",{enumerable:!0,get:function(){return decorators_1.applicationConfig}});var argsToTemplate_1=__webpack_require__("./node_modules/@storybook/angular/dist/client/argsToTemplate.js");Object.defineProperty(exports,"argsToTemplate",{enumerable:!0,get:function(){return argsToTemplate_1.argsToTemplate}})},"./node_modules/@storybook/angular/dist/client/public-api.js":function(__unused_webpack_module,exports,__webpack_require__){var __createBinding=this&&this.__createBinding||(Object.create?function(o,m,k,k2){void 0===k2&&(k2=k);var desc=Object.getOwnPropertyDescriptor(m,k);desc&&!("get"in desc?!m.__esModule:desc.writable||desc.configurable)||(desc={enumerable:!0,get:function(){return m[k]}}),Object.defineProperty(o,k2,desc)}:function(o,m,k,k2){void 0===k2&&(k2=k),o[k2]=m[k]}),__exportStar=this&&this.__exportStar||function(m,exports){for(var p in m)"default"===p||Object.prototype.hasOwnProperty.call(exports,p)||__createBinding(exports,m,p)},__importDefault=this&&this.__importDefault||function(mod){return mod&&mod.__esModule?mod:{default:mod}};Object.defineProperty(exports,"__esModule",{value:!0}),exports.raw=exports.forceReRender=exports.configure=exports.storiesOf=void 0;const preview_api_1=__webpack_require__("@storybook/preview-api"),render_1=__webpack_require__("./node_modules/@storybook/angular/dist/client/render.js"),decorateStory_1=__importDefault(__webpack_require__("./node_modules/@storybook/angular/dist/client/decorateStory.js"));__exportStar(__webpack_require__("./node_modules/@storybook/angular/dist/client/public-types.js"),exports);const api=(0,preview_api_1.start)(render_1.renderToCanvas,{decorateStory:decorateStory_1.default,render:render_1.render});exports.storiesOf=(kind,m)=>api.clientApi.storiesOf(kind,m).addParameters({renderer:"angular"});exports.configure=(...args)=>api.configure("angular",...args),exports.forceReRender=api.forceReRender,exports.raw=api.clientApi.raw},"./node_modules/@storybook/angular/dist/client/public-types.js":(__unused_webpack_module,exports)=>{Object.defineProperty(exports,"__esModule",{value:!0})},"./node_modules/@storybook/angular/dist/index.mjs":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{var _client_index__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__("./node_modules/@storybook/angular/dist/client/index.js");__webpack_require__.o(_client_index__WEBPACK_IMPORTED_MODULE_0__,"applicationConfig")&&__webpack_require__.d(__webpack_exports__,{applicationConfig:function(){return _client_index__WEBPACK_IMPORTED_MODULE_0__.applicationConfig}}),__webpack_require__.o(_client_index__WEBPACK_IMPORTED_MODULE_0__,"componentWrapperDecorator")&&__webpack_require__.d(__webpack_exports__,{componentWrapperDecorator:function(){return _client_index__WEBPACK_IMPORTED_MODULE_0__.componentWrapperDecorator}}),__webpack_require__.o(_client_index__WEBPACK_IMPORTED_MODULE_0__,"moduleMetadata")&&__webpack_require__.d(__webpack_exports__,{moduleMetadata:function(){return _client_index__WEBPACK_IMPORTED_MODULE_0__.moduleMetadata}})},"./src/tooltip/tooltip.stories.ts":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{__webpack_require__.r(__webpack_exports__),__webpack_require__.d(__webpack_exports__,{Basic:()=>Basic,Ellipses:()=>Ellipses,WithAutoAlign:()=>WithAutoAlign,__namedExportsOrder:()=>__namedExportsOrder,default:()=>__WEBPACK_DEFAULT_EXPORT__});var _storybook_angular__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__("./node_modules/@storybook/angular/dist/index.mjs"),___WEBPACK_IMPORTED_MODULE_1__=__webpack_require__("./src/tooltip/index.ts");const __WEBPACK_DEFAULT_EXPORT__={title:"Components/Tooltip",decorators:[(0,_storybook_angular__WEBPACK_IMPORTED_MODULE_0__.moduleMetadata)({imports:[___WEBPACK_IMPORTED_MODULE_1__.z8]})],args:{isOpen:!0,caret:!0,description:"Occassionally, services are updated in a specified time window to ensure no down time for customers.",align:"bottom",autoAlign:!1},argTypes:{autoAlign:{control:!1},onOpen:{control:"Opened!"},onClose:{control:"Closed!"},isOpenChange:{control:"Is Open Change!"},align:{options:["top","top-start","top-end","right","right-start","right-end","bottom","bottom-start","bottom-end","left","left-start","left-end"],control:"select"}},component:___WEBPACK_IMPORTED_MODULE_1__.u},Basic=(args=>({props:args,template:'\n <cds-tooltip\n [isOpen]="isOpen"\n [caret]="caret"\n [align]="align"\n (onOpen)="onOpen($event)"\n (onClose)="onClose($event)"\n (isOpenChange)="isOpenChange($event)"\n [description]="description">\n <button type="button" class="tooltip-trigger">\n <svg preserveAspectRatio="xMidYMid meet" xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 32 32">\n <path d="M26,4H6A2,2,0,0,0,4,6V26a2,2,0,0,0,2,2H26a2,2,0,0,0,2-2V6A2,2,0,0,0,26,4ZM6,26V6H26V26Z"></path>\n </svg>\n </button>\n </cds-tooltip>\n ',styles:["\n .tooltip-trigger {\n box-sizing: border-box;\n margin: 0;\n display: flex;\n align-items: center;\n justify-content: center;\n width: 2rem;\n height: 2rem;\n background: white;\n border: 1px solid var(--cds-border-subtle);\n cursor: pointer;\n }\n svg { fill: var(--cds-background-inverse); }\n "]})).bind({});Basic.parameters={docs:{story:{inline:!1,iframeHeight:"18rem"}},layout:"centered"};const Ellipses=(args=>({props:args,template:'\n <cds-tooltip\n [isOpen]="isOpen"\n [caret]="caret"\n [align]="align"\n description="Tooltip for ellipsis because I can and I am really really long">\n <span class="overflowText">\n Tooltip for ellipsis because I can and I am really really long\n </span>\n </cds-tooltip>\n ',styles:["\n .overflowText {\n white-space: nowrap;\n overflow: hidden;\n text-overflow: ellipsis;\n width: 100px;\n display: inline-block;\n }\n "]})).bind({});Ellipses.argTypes={description:{control:!1}},Ellipses.parameters={docs:{story:{inline:!1,iframeHeight:"18rem"}},layout:"centered"};const WithAutoAlign=(args=>({props:args,template:'\n <div style="height:3000px">\n Scrolling will update the position of the popover:\n <div style="position: absolute; top: 500px; left: 500px;">\n <cds-tooltip\n [isOpen]="isOpen"\n [caret]="caret"\n [align]="align"\n [autoAlign]="true"\n (onOpen)="onOpen($event)"\n (onClose)="onClose($event)"\n (isOpenChange)="isOpenChange($event)"\n [description]="description">\n <button type="button" class="tooltip-trigger">\n <svg preserveAspectRatio="xMidYMid meet" xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 32 32">\n <path d="M26,4H6A2,2,0,0,0,4,6V26a2,2,0,0,0,2,2H26a2,2,0,0,0,2-2V6A2,2,0,0,0,26,4ZM6,26V6H26V26Z"></path>\n </svg>\n </button>\n </cds-tooltip>\n </div>\n </div>\n ',styles:["\n .tooltip-trigger {\n box-sizing: border-box;\n margin: 0;\n display: flex;\n align-items: center;\n justify-content: center;\n width: 2rem;\n height: 2rem;\n background: white;\n border: 1px solid var(--cds-border-subtle);\n cursor: pointer;\n }\n svg { fill: var(--cds-background-inverse); }\n "]})).bind({});WithAutoAlign.args={autoAlign:!0,align:"top"},Basic.parameters={...Basic.parameters,docs:{...Basic.parameters?.docs,source:{originalSource:'args => ({\n props: args,\n template: `\n <cds-tooltip\n [isOpen]="isOpen"\n [caret]="caret"\n [align]="align"\n (onOpen)="onOpen($event)"\n (onClose)="onClose($event)"\n (isOpenChange)="isOpenChange($event)"\n [description]="description">\n <button type="button" class="tooltip-trigger">\n <svg preserveAspectRatio="xMidYMid meet" xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 32 32">\n <path d="M26,4H6A2,2,0,0,0,4,6V26a2,2,0,0,0,2,2H26a2,2,0,0,0,2-2V6A2,2,0,0,0,26,4ZM6,26V6H26V26Z"></path>\n </svg>\n </button>\n </cds-tooltip>\n `,\n styles: [`\n .tooltip-trigger {\n box-sizing: border-box;\n margin: 0;\n display: flex;\n align-items: center;\n justify-content: center;\n width: 2rem;\n height: 2rem;\n background: white;\n border: 1px solid var(--cds-border-subtle);\n cursor: pointer;\n }\n svg { fill: var(--cds-background-inverse); }\n `]\n})',...Basic.parameters?.docs?.source}}},Ellipses.parameters={...Ellipses.parameters,docs:{...Ellipses.parameters?.docs,source:{originalSource:'args => ({\n props: args,\n template: `\n <cds-tooltip\n [isOpen]="isOpen"\n [caret]="caret"\n [align]="align"\n description="Tooltip for ellipsis because I can and I am really really long">\n <span class="overflowText">\n Tooltip for ellipsis because I can and I am really really long\n </span>\n </cds-tooltip>\n `,\n styles: [`\n .overflowText {\n white-space: nowrap;\n overflow: hidden;\n text-overflow: ellipsis;\n width: 100px;\n display: inline-block;\n }\n `]\n})',...Ellipses.parameters?.docs?.source}}},WithAutoAlign.parameters={...WithAutoAlign.parameters,docs:{...WithAutoAlign.parameters?.docs,source:{originalSource:'args => ({\n props: args,\n template: `\n <div style="height:3000px">\n Scrolling will update the position of the popover:\n <div style="position: absolute; top: 500px; left: 500px;">\n <cds-tooltip\n [isOpen]="isOpen"\n [caret]="caret"\n [align]="align"\n [autoAlign]="true"\n (onOpen)="onOpen($event)"\n (onClose)="onClose($event)"\n (isOpenChange)="isOpenChange($event)"\n [description]="description">\n <button type="button" class="tooltip-trigger">\n <svg preserveAspectRatio="xMidYMid meet" xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 32 32">\n <path d="M26,4H6A2,2,0,0,0,4,6V26a2,2,0,0,0,2,2H26a2,2,0,0,0,2-2V6A2,2,0,0,0,26,4ZM6,26V6H26V26Z"></path>\n </svg>\n </button>\n </cds-tooltip>\n </div>\n </div>\n `,\n styles: [`\n .tooltip-trigger {\n box-sizing: border-box;\n margin: 0;\n display: flex;\n align-items: center;\n justify-content: center;\n width: 2rem;\n height: 2rem;\n background: white;\n border: 1px solid var(--cds-border-subtle);\n cursor: pointer;\n }\n svg { fill: var(--cds-background-inverse); }\n `]\n})',...WithAutoAlign.parameters?.docs?.source}}};const __namedExportsOrder=["Basic","Ellipses","WithAutoAlign"]}}]);
|