carbon-components-angular 5.24.4 → 5.24.6
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/ActionableNotification.html +2 -2
- package/docs/documentation/components/DatePicker.html +55 -51
- package/docs/documentation/components/Notification.html +2 -2
- package/docs/documentation/components/TableHead.html +42 -44
- package/docs/documentation/components/TableRadio.html +179 -16
- package/docs/documentation/components/Toast.html +115 -29
- package/docs/documentation/coverage.html +3 -3
- package/docs/documentation/js/search/search_index.js +2 -2
- package/docs/documentation/modules/ToggleModule/dependencies.svg +40 -44
- package/docs/documentation/modules/ToggleModule.html +40 -44
- package/docs/documentation/modules/TooltipModule/dependencies.svg +4 -4
- package/docs/documentation/modules/TooltipModule.html +4 -4
- package/docs/documentation/modules/TreeviewModule/dependencies.svg +35 -35
- package/docs/documentation/modules/TreeviewModule.html +35 -35
- package/docs/documentation.json +211 -115
- package/docs/storybook/5868.4bc19136.iframe.bundle.js +1 -0
- package/docs/storybook/{901.fedd2c3b.iframe.bundle.js → 901.292c1079.iframe.bundle.js} +1 -1
- package/docs/storybook/datepicker-datepicker-stories.d5770b7c.iframe.bundle.js +1 -0
- package/docs/storybook/iframe.html +2 -2
- package/docs/storybook/main.64a750b3.iframe.bundle.js +1 -0
- package/docs/storybook/project.json +1 -1
- package/docs/storybook/{runtime~main.4af5c4ee.iframe.bundle.js → runtime~main.0366c773.iframe.bundle.js} +1 -1
- package/esm2020/datepicker/datepicker.component.mjs +5 -1
- package/esm2020/notification/actionable-notification.component.mjs +3 -3
- package/esm2020/notification/notification.component.mjs +3 -3
- package/esm2020/notification/toast.component.mjs +19 -4
- package/esm2020/table/cell/table-radio.component.mjs +11 -3
- package/esm2020/table/head/table-head.component.mjs +1 -3
- package/fesm2015/carbon-components-angular-datepicker.mjs +5 -0
- package/fesm2015/carbon-components-angular-datepicker.mjs.map +1 -1
- package/fesm2015/carbon-components-angular-notification.mjs +23 -9
- package/fesm2015/carbon-components-angular-notification.mjs.map +1 -1
- package/fesm2015/carbon-components-angular-table.mjs +9 -3
- package/fesm2015/carbon-components-angular-table.mjs.map +1 -1
- package/fesm2020/carbon-components-angular-datepicker.mjs +4 -0
- package/fesm2020/carbon-components-angular-datepicker.mjs.map +1 -1
- package/fesm2020/carbon-components-angular-notification.mjs +23 -9
- package/fesm2020/carbon-components-angular-notification.mjs.map +1 -1
- package/fesm2020/carbon-components-angular-table.mjs +9 -3
- package/fesm2020/carbon-components-angular-table.mjs.map +1 -1
- package/notification/toast.component.d.ts +2 -1
- package/package.json +1 -1
- package/table/cell/table-radio.component.d.ts +2 -0
- package/docs/storybook/5868.9e6e15e4.iframe.bundle.js +0 -1
- package/docs/storybook/datepicker-datepicker-stories.1d3d1000.iframe.bundle.js +0 -1
- package/docs/storybook/main.ff512697.iframe.bundle.js +0 -1
package/docs/documentation.json
CHANGED
|
@@ -17978,7 +17978,7 @@
|
|
|
17978
17978
|
},
|
|
17979
17979
|
{
|
|
17980
17980
|
"name": "ActionableNotification",
|
|
17981
|
-
"id": "component-ActionableNotification-
|
|
17981
|
+
"id": "component-ActionableNotification-57714382cfdef67a6be498b98366423e6cc43d51076620586300e8a374d103c10aa3214323b7015e2403c434cfd677f5e4de45bea20b25105eb746735eb45ebf",
|
|
17982
17982
|
"file": "src/notification/actionable-notification.component.ts",
|
|
17983
17983
|
"encapsulation": [],
|
|
17984
17984
|
"entryComponents": [],
|
|
@@ -18287,7 +18287,7 @@
|
|
|
18287
18287
|
"description": "<p>Actionable notification allows for interactive elements within a notification. There are two variants offered, inline & toast.</p>\n<p><a href=\"../../?path=/story/components-notification--actionable-notification\">See demo</a></p>\n",
|
|
18288
18288
|
"rawdescription": "\n\nActionable notification allows for interactive elements within a notification. There are two variants offered, inline & toast.\n\n[See demo](../../?path=/story/components-notification--actionable-notification)\n",
|
|
18289
18289
|
"type": "component",
|
|
18290
|
-
"sourceCode": "import {\n\tComponent,\n\tInput,\n\tHostBinding\n} from \"@angular/core\";\n\nimport { of } from \"rxjs\";\nimport { ActionableContent, NotificationVariants } from \"./notification-content.interface\";\nimport { I18n } from \"carbon-components-angular/i18n\";\nimport { NotificationDisplayService } from \"./notification-display.service\";\nimport { BaseNotification } from \"./base-notification.component\";\n\n/**\n * Actionable notification allows for interactive elements within a notification. There are two variants offered, inline & toast.\n *\n * [See demo](../../?path=/story/components-notification--actionable-notification)\n */\n@Component({\n\tselector: \"cds-actionable-notification, ibm-actionable-notification\",\n\ttemplate: `\n\t\t<div class=\"cds--actionable-notification__details\">\n\t\t\t<svg\n\t\t\t\t[cdsIcon]=\"iconDictionary[notificationObj.type]\"\n\t\t\t\tsize=\"20\"\n\t\t\t\t*ngIf=\"notificationObj.type\"\n\t\t\t\t[ngClass]=\"{\n\t\t\t\t\t'cds--inline-notification__icon': notificationObj.variant === 'inline',\n\t\t\t\t\t'cds--toast-notification__icon': notificationObj.variant === 'toast'\n\t\t\t\t}\"\n\t\t\t\tclass=\"cds--actionable-notification__icon\">\n\t\t\t</svg>\n\t\t\t<div class=\"cds--actionable-notification__text-wrapper\">\n\t\t\t\t<div class=\"cds--actionable-notification__content\">\n\t\t\t\t\t<div *ngIf=\"!notificationObj.template\" cdsActionableTitle [innerHTML]=\"notificationObj.title\"></div>\n\t\t\t\t\t<div *ngIf=\"!notificationObj.template\" cdsActionableSubtitle>\n\t\t\t\t\t\t<span [innerHTML]=\"notificationObj.message\"></span>\n\t\t\t\t\t\t<ng-container *ngFor=\"let link of notificationObj.links\">\n\t\t\t\t\t\t\t<a cdsLink [href]=\"link.href\">{{link.text}}</a>\n\t\t\t\t\t\t</ng-container>\n\t\t\t\t\t</div>\n\t\t\t\t\t<ng-container *ngTemplateOutlet=\"notificationObj.template; context: { $implicit: notificationObj }\"></ng-container>\n\t\t\t\t</div>\n\t\t\t</div>\n\t\t</div>\n\t\t<ng-container *ngIf=\"!notificationObj.actionsTemplate\">\n\t\t\t<button\n\t\t\t\t*ngFor=\"let action of notificationObj.actions\"\n\t\t\t\t(click)=\"onClick(action, $event)\"\n\t\t\t\t[cdsButton]=\"notificationObj.variant === 'inline' ? 'ghost' : 'tertiary'\"\n\t\t\t\tsize=\"sm\"\n\t\t\t\tcdsActionableButton>\n\t\t\t\t{{action.text}}\n\t\t\t</button>\n\t\t</ng-container>\n\t\t<ng-container *ngTemplateOutlet=\"notificationObj.actionsTemplate; context: { $implicit: notificationObj }\"></ng-container>\n\t\t<button\n\t\t\t*ngIf=\"!isCloseHidden\"\n\t\t\t(click)=\"onClose()\"\n\t\t\tclass=\"cds--actionable-notification__close-button\"\n\t\t\t[attr.aria-label]=\"notificationObj.closeLabel | async\"\n\t\t\ttype=\"button\">\n\t\t\t<svg cdsIcon=\"close\" size=\"16\" class=\"cds--actionable-notification__close-icon\"></svg>\n\t\t</button>\n\t`\n})\nexport class ActionableNotification extends BaseNotification {\n\tprivate static notificationCount = 0;\n\t/**\n\t * Can have `type`, `title`, and `message` members.\n\t *\n\t * `type` can be one of `\"error\"`, `\"info\"`, `\"info-square\"`, `\"warning\"`, `\"warning-alt\"`, or `\"success\"`\n\t *\n\t * `message` is the message to display\n\t */\n\t@Input() get notificationObj(): ActionableContent {\n\t\treturn this._notificationObj;\n\t}\n\tset notificationObj(obj: ActionableContent) {\n\t\tif (obj.closeLabel) {\n\t\t\tobj.closeLabel = of(obj.closeLabel);\n\t\t}\n\t\tthis._notificationObj = Object.assign({}, this.defaultNotificationObj, obj);\n\t}\n\n\t@HostBinding(\"attr.id\") notificationID = `notification-${ActionableNotification.notificationCount++}`;\n\t@HostBinding(\"class.cds--actionable-notification\") notificationClass = true;\n\t@HostBinding(\"class.cds--actionable-notification--toast\") get toastVariant() { return this.notificationObj.variant === \"toast\"; }\n\t@HostBinding(\"class.cds--actionable-notification--error\") get isError() { return this.notificationObj.type === \"error\"; }\n\t@HostBinding(\"class.cds--actionable-notification--info\") get isInfo() { return this.notificationObj.type === \"info\"; }\n\t@HostBinding(\"class.cds--actionable-notification--info-square\") get isInfoSquare() { return this.notificationObj.type === \"info-square\"; }\n\t@HostBinding(\"class.cds--actionable-notification--success\") get isSuccess() { return this.notificationObj.type === \"success\"; }\n\t@HostBinding(\"class.cds--actionable-notification--warning\") get isWarning() { return this.notificationObj.type === \"warning\"; }\n\t@HostBinding(\"class.cds--actionable-notification--warning-alt\") get isWarningAlt() { return this.notificationObj.type === \"warning-alt\"; }\n\t@HostBinding(\"class.cds--actionable-notification--low-contrast\") get isLowContrast() { return this.notificationObj.lowContrast; }\n\t@HostBinding(\"class.cds--actionable-notification--hide-close-button\") get isCloseHidden() { return !this._notificationObj.showClose; }\n\n\t/**\n\t * Set default variant & role, alternatives can be provided through notificationObj property\n\t */\n\tdefaultNotificationObj = {\n\t\t...this.defaultNotificationObj,\n\t\tvariant: \"inline\" as NotificationVariants,\n\t\trole: \"alertdialog\"\n\t};\n\n\tconstructor(protected notificationDisplayService: NotificationDisplayService, protected i18n: I18n) {\n\t\tsuper(notificationDisplayService, i18n);\n\t}\n}\n",
|
|
18290
|
+
"sourceCode": "import {\n\tComponent,\n\tInput,\n\tHostBinding\n} from \"@angular/core\";\n\nimport { isObservable, of } from \"rxjs\";\nimport { ActionableContent, NotificationVariants } from \"./notification-content.interface\";\nimport { I18n } from \"carbon-components-angular/i18n\";\nimport { NotificationDisplayService } from \"./notification-display.service\";\nimport { BaseNotification } from \"./base-notification.component\";\n\n/**\n * Actionable notification allows for interactive elements within a notification. There are two variants offered, inline & toast.\n *\n * [See demo](../../?path=/story/components-notification--actionable-notification)\n */\n@Component({\n\tselector: \"cds-actionable-notification, ibm-actionable-notification\",\n\ttemplate: `\n\t\t<div class=\"cds--actionable-notification__details\">\n\t\t\t<svg\n\t\t\t\t[cdsIcon]=\"iconDictionary[notificationObj.type]\"\n\t\t\t\tsize=\"20\"\n\t\t\t\t*ngIf=\"notificationObj.type\"\n\t\t\t\t[ngClass]=\"{\n\t\t\t\t\t'cds--inline-notification__icon': notificationObj.variant === 'inline',\n\t\t\t\t\t'cds--toast-notification__icon': notificationObj.variant === 'toast'\n\t\t\t\t}\"\n\t\t\t\tclass=\"cds--actionable-notification__icon\">\n\t\t\t</svg>\n\t\t\t<div class=\"cds--actionable-notification__text-wrapper\">\n\t\t\t\t<div class=\"cds--actionable-notification__content\">\n\t\t\t\t\t<div *ngIf=\"!notificationObj.template\" cdsActionableTitle [innerHTML]=\"notificationObj.title\"></div>\n\t\t\t\t\t<div *ngIf=\"!notificationObj.template\" cdsActionableSubtitle>\n\t\t\t\t\t\t<span [innerHTML]=\"notificationObj.message\"></span>\n\t\t\t\t\t\t<ng-container *ngFor=\"let link of notificationObj.links\">\n\t\t\t\t\t\t\t<a cdsLink [href]=\"link.href\">{{link.text}}</a>\n\t\t\t\t\t\t</ng-container>\n\t\t\t\t\t</div>\n\t\t\t\t\t<ng-container *ngTemplateOutlet=\"notificationObj.template; context: { $implicit: notificationObj }\"></ng-container>\n\t\t\t\t</div>\n\t\t\t</div>\n\t\t</div>\n\t\t<ng-container *ngIf=\"!notificationObj.actionsTemplate\">\n\t\t\t<button\n\t\t\t\t*ngFor=\"let action of notificationObj.actions\"\n\t\t\t\t(click)=\"onClick(action, $event)\"\n\t\t\t\t[cdsButton]=\"notificationObj.variant === 'inline' ? 'ghost' : 'tertiary'\"\n\t\t\t\tsize=\"sm\"\n\t\t\t\tcdsActionableButton>\n\t\t\t\t{{action.text}}\n\t\t\t</button>\n\t\t</ng-container>\n\t\t<ng-container *ngTemplateOutlet=\"notificationObj.actionsTemplate; context: { $implicit: notificationObj }\"></ng-container>\n\t\t<button\n\t\t\t*ngIf=\"!isCloseHidden\"\n\t\t\t(click)=\"onClose()\"\n\t\t\tclass=\"cds--actionable-notification__close-button\"\n\t\t\t[attr.aria-label]=\"notificationObj.closeLabel | async\"\n\t\t\ttype=\"button\">\n\t\t\t<svg cdsIcon=\"close\" size=\"16\" class=\"cds--actionable-notification__close-icon\"></svg>\n\t\t</button>\n\t`\n})\nexport class ActionableNotification extends BaseNotification {\n\tprivate static notificationCount = 0;\n\t/**\n\t * Can have `type`, `title`, and `message` members.\n\t *\n\t * `type` can be one of `\"error\"`, `\"info\"`, `\"info-square\"`, `\"warning\"`, `\"warning-alt\"`, or `\"success\"`\n\t *\n\t * `message` is the message to display\n\t */\n\t@Input() get notificationObj(): ActionableContent {\n\t\treturn this._notificationObj;\n\t}\n\tset notificationObj(obj: ActionableContent) {\n\t\tif (obj.closeLabel && !isObservable(obj.closeLabel)) {\n\t\t\tobj.closeLabel = of(obj.closeLabel);\n\t\t}\n\t\tthis._notificationObj = Object.assign({}, this.defaultNotificationObj, obj);\n\t}\n\n\t@HostBinding(\"attr.id\") notificationID = `notification-${ActionableNotification.notificationCount++}`;\n\t@HostBinding(\"class.cds--actionable-notification\") notificationClass = true;\n\t@HostBinding(\"class.cds--actionable-notification--toast\") get toastVariant() { return this.notificationObj.variant === \"toast\"; }\n\t@HostBinding(\"class.cds--actionable-notification--error\") get isError() { return this.notificationObj.type === \"error\"; }\n\t@HostBinding(\"class.cds--actionable-notification--info\") get isInfo() { return this.notificationObj.type === \"info\"; }\n\t@HostBinding(\"class.cds--actionable-notification--info-square\") get isInfoSquare() { return this.notificationObj.type === \"info-square\"; }\n\t@HostBinding(\"class.cds--actionable-notification--success\") get isSuccess() { return this.notificationObj.type === \"success\"; }\n\t@HostBinding(\"class.cds--actionable-notification--warning\") get isWarning() { return this.notificationObj.type === \"warning\"; }\n\t@HostBinding(\"class.cds--actionable-notification--warning-alt\") get isWarningAlt() { return this.notificationObj.type === \"warning-alt\"; }\n\t@HostBinding(\"class.cds--actionable-notification--low-contrast\") get isLowContrast() { return this.notificationObj.lowContrast; }\n\t@HostBinding(\"class.cds--actionable-notification--hide-close-button\") get isCloseHidden() { return !this._notificationObj.showClose; }\n\n\t/**\n\t * Set default variant & role, alternatives can be provided through notificationObj property\n\t */\n\tdefaultNotificationObj = {\n\t\t...this.defaultNotificationObj,\n\t\tvariant: \"inline\" as NotificationVariants,\n\t\trole: \"alertdialog\"\n\t};\n\n\tconstructor(protected notificationDisplayService: NotificationDisplayService, protected i18n: I18n) {\n\t\tsuper(notificationDisplayService, i18n);\n\t}\n}\n",
|
|
18291
18291
|
"assetsDirs": [],
|
|
18292
18292
|
"styleUrlsData": "",
|
|
18293
18293
|
"stylesData": "",
|
|
@@ -25402,7 +25402,7 @@
|
|
|
25402
25402
|
},
|
|
25403
25403
|
{
|
|
25404
25404
|
"name": "DatePicker",
|
|
25405
|
-
"id": "component-DatePicker-
|
|
25405
|
+
"id": "component-DatePicker-d295ff1ef16790bb751b53dd85141be6bf7ed89d4b550cc01bdaf6a34b65528f4f455d3912bb47f3eeaf2d39e24ac9814ea3a005fe4fca7ea284cf121a6c2ffe",
|
|
25406
25406
|
"file": "src/datepicker/datepicker.component.ts",
|
|
25407
25407
|
"encapsulation": [
|
|
25408
25408
|
"ViewEncapsulation.None"
|
|
@@ -25741,7 +25741,7 @@
|
|
|
25741
25741
|
"type": "function",
|
|
25742
25742
|
"optional": false,
|
|
25743
25743
|
"description": "",
|
|
25744
|
-
"line":
|
|
25744
|
+
"line": 403
|
|
25745
25745
|
},
|
|
25746
25746
|
{
|
|
25747
25747
|
"name": "propagateChange",
|
|
@@ -25751,7 +25751,7 @@
|
|
|
25751
25751
|
"type": "",
|
|
25752
25752
|
"optional": false,
|
|
25753
25753
|
"description": "",
|
|
25754
|
-
"line":
|
|
25754
|
+
"line": 405
|
|
25755
25755
|
},
|
|
25756
25756
|
{
|
|
25757
25757
|
"name": "rangeInput",
|
|
@@ -25779,7 +25779,7 @@
|
|
|
25779
25779
|
"optional": false,
|
|
25780
25780
|
"returnType": "void",
|
|
25781
25781
|
"typeParameters": [],
|
|
25782
|
-
"line":
|
|
25782
|
+
"line": 352,
|
|
25783
25783
|
"deprecated": false,
|
|
25784
25784
|
"deprecationMessage": "",
|
|
25785
25785
|
"decorators": [
|
|
@@ -25798,7 +25798,7 @@
|
|
|
25798
25798
|
"optional": false,
|
|
25799
25799
|
"returnType": "void",
|
|
25800
25800
|
"typeParameters": [],
|
|
25801
|
-
"line":
|
|
25801
|
+
"line": 367,
|
|
25802
25802
|
"deprecated": false,
|
|
25803
25803
|
"deprecationMessage": "",
|
|
25804
25804
|
"decorators": [
|
|
@@ -25824,7 +25824,7 @@
|
|
|
25824
25824
|
"optional": false,
|
|
25825
25825
|
"returnType": "void",
|
|
25826
25826
|
"typeParameters": [],
|
|
25827
|
-
"line":
|
|
25827
|
+
"line": 433,
|
|
25828
25828
|
"deprecated": false,
|
|
25829
25829
|
"deprecationMessage": "",
|
|
25830
25830
|
"rawdescription": "\n\nHandles the `valueChange` event from the range input\n",
|
|
@@ -25854,7 +25854,7 @@
|
|
|
25854
25854
|
"optional": false,
|
|
25855
25855
|
"returnType": "void",
|
|
25856
25856
|
"typeParameters": [],
|
|
25857
|
-
"line":
|
|
25857
|
+
"line": 418,
|
|
25858
25858
|
"deprecated": false,
|
|
25859
25859
|
"deprecationMessage": "",
|
|
25860
25860
|
"rawdescription": "\n\nHandles the `valueChange` event from the primary/single input\n",
|
|
@@ -25884,7 +25884,7 @@
|
|
|
25884
25884
|
"optional": false,
|
|
25885
25885
|
"returnType": "void",
|
|
25886
25886
|
"typeParameters": [],
|
|
25887
|
-
"line":
|
|
25887
|
+
"line": 444,
|
|
25888
25888
|
"deprecated": false,
|
|
25889
25889
|
"deprecationMessage": "",
|
|
25890
25890
|
"rawdescription": "\n\nHandles opening the calendar \"properly\" when the calendar icon is clicked.\n",
|
|
@@ -25914,7 +25914,7 @@
|
|
|
25914
25914
|
"optional": false,
|
|
25915
25915
|
"returnType": "void",
|
|
25916
25916
|
"typeParameters": [],
|
|
25917
|
-
"line":
|
|
25917
|
+
"line": 395,
|
|
25918
25918
|
"deprecated": false,
|
|
25919
25919
|
"deprecationMessage": "",
|
|
25920
25920
|
"jsdoctags": [
|
|
@@ -25942,7 +25942,7 @@
|
|
|
25942
25942
|
"optional": false,
|
|
25943
25943
|
"returnType": "void",
|
|
25944
25944
|
"typeParameters": [],
|
|
25945
|
-
"line":
|
|
25945
|
+
"line": 399,
|
|
25946
25946
|
"deprecated": false,
|
|
25947
25947
|
"deprecationMessage": "",
|
|
25948
25948
|
"jsdoctags": [
|
|
@@ -25970,7 +25970,7 @@
|
|
|
25970
25970
|
"optional": false,
|
|
25971
25971
|
"returnType": "void",
|
|
25972
25972
|
"typeParameters": [],
|
|
25973
|
-
"line":
|
|
25973
|
+
"line": 391,
|
|
25974
25974
|
"deprecated": false,
|
|
25975
25975
|
"deprecationMessage": "",
|
|
25976
25976
|
"rawdescription": "\n\n`ControlValueAccessor` method to programmatically disable the DatePicker.\n\nex: `this.formGroup.get(\"myDatePicker\").disable();`\n\n",
|
|
@@ -25978,8 +25978,8 @@
|
|
|
25978
25978
|
"jsdoctags": [
|
|
25979
25979
|
{
|
|
25980
25980
|
"name": {
|
|
25981
|
-
"pos":
|
|
25982
|
-
"end":
|
|
25981
|
+
"pos": 11063,
|
|
25982
|
+
"end": 11073,
|
|
25983
25983
|
"flags": 8421376,
|
|
25984
25984
|
"modifierFlagsCache": 0,
|
|
25985
25985
|
"transformFlags": 0,
|
|
@@ -25990,8 +25990,8 @@
|
|
|
25990
25990
|
"deprecated": false,
|
|
25991
25991
|
"deprecationMessage": "",
|
|
25992
25992
|
"tagName": {
|
|
25993
|
-
"pos":
|
|
25994
|
-
"end":
|
|
25993
|
+
"pos": 11057,
|
|
25994
|
+
"end": 11062,
|
|
25995
25995
|
"flags": 8421376,
|
|
25996
25996
|
"modifierFlagsCache": 0,
|
|
25997
25997
|
"transformFlags": 0,
|
|
@@ -26015,7 +26015,7 @@
|
|
|
26015
26015
|
"optional": false,
|
|
26016
26016
|
"returnType": "void",
|
|
26017
26017
|
"typeParameters": [],
|
|
26018
|
-
"line":
|
|
26018
|
+
"line": 375,
|
|
26019
26019
|
"deprecated": false,
|
|
26020
26020
|
"deprecationMessage": "",
|
|
26021
26021
|
"rawdescription": "\n\nWrites a value from the model to the component. Expects the value to be `null` or `(Date | string)[]`\n",
|
|
@@ -26023,8 +26023,8 @@
|
|
|
26023
26023
|
"jsdoctags": [
|
|
26024
26024
|
{
|
|
26025
26025
|
"name": {
|
|
26026
|
-
"pos":
|
|
26027
|
-
"end":
|
|
26026
|
+
"pos": 10662,
|
|
26027
|
+
"end": 10667,
|
|
26028
26028
|
"flags": 8421376,
|
|
26029
26029
|
"modifierFlagsCache": 0,
|
|
26030
26030
|
"transformFlags": 0,
|
|
@@ -26035,8 +26035,8 @@
|
|
|
26035
26035
|
"deprecated": false,
|
|
26036
26036
|
"deprecationMessage": "",
|
|
26037
26037
|
"tagName": {
|
|
26038
|
-
"pos":
|
|
26039
|
-
"end":
|
|
26038
|
+
"pos": 10656,
|
|
26039
|
+
"end": 10661,
|
|
26040
26040
|
"flags": 8421376,
|
|
26041
26041
|
"modifierFlagsCache": 0,
|
|
26042
26042
|
"transformFlags": 0,
|
|
@@ -26058,7 +26058,7 @@
|
|
|
26058
26058
|
"argsDecorator": [],
|
|
26059
26059
|
"deprecated": false,
|
|
26060
26060
|
"deprecationMessage": "",
|
|
26061
|
-
"line":
|
|
26061
|
+
"line": 352
|
|
26062
26062
|
},
|
|
26063
26063
|
{
|
|
26064
26064
|
"name": "focusout",
|
|
@@ -26066,7 +26066,7 @@
|
|
|
26066
26066
|
"argsDecorator": [],
|
|
26067
26067
|
"deprecated": false,
|
|
26068
26068
|
"deprecationMessage": "",
|
|
26069
|
-
"line":
|
|
26069
|
+
"line": 367
|
|
26070
26070
|
}
|
|
26071
26071
|
],
|
|
26072
26072
|
"standalone": false,
|
|
@@ -26074,7 +26074,7 @@
|
|
|
26074
26074
|
"description": "<p>Get started with importing the module:</p>\n<div><pre class=\"line-numbers\"><code class=\"language-typescript\">import { DatePickerModule } from 'carbon-components-angular';</code></pre></div><p><a href=\"../../?path=/story/components-date-picker--single\">See demo</a></p>\n",
|
|
26075
26075
|
"rawdescription": "\n\nGet started with importing the module:\n\n```typescript\nimport { DatePickerModule } from 'carbon-components-angular';\n```\n\n[See demo](../../?path=/story/components-date-picker--single)\n",
|
|
26076
26076
|
"type": "component",
|
|
26077
|
-
"sourceCode": "import {\n\tComponent,\n\tInput,\n\tOutput,\n\tEventEmitter,\n\tViewEncapsulation,\n\tElementRef,\n\tOnDestroy,\n\tHostListener,\n\tTemplateRef,\n\tOnChanges,\n\tSimpleChanges,\n\tAfterViewChecked,\n\tAfterViewInit,\n\tViewChild,\n\tOnInit,\n\tSimpleChange\n} from \"@angular/core\";\nimport rangePlugin from \"flatpickr/dist/plugins/rangePlugin\";\nimport flatpickr from \"flatpickr\";\nimport { NG_VALUE_ACCESSOR } from \"@angular/forms\";\nimport { carbonFlatpickrMonthSelectPlugin } from \"./carbon-flatpickr-month-select\";\nimport * as languages from \"flatpickr/dist/l10n/index\";\nimport { Options } from \"flatpickr/dist/types/options\";\nimport { DatePickerInput } from \"carbon-components-angular/datepicker-input\";\nimport { I18n } from \"carbon-components-angular/i18n\";\n\n/**\n * Due to type error, we have to use square brackets property accessor\n * There is a webpack issue when attempting to access exported languages from flatpickr l10n Angular 14+ apps\n * languages.default[locale] fails in app consuming CCA library but passes in test\n * languages.default.default[locale] fails in test but works in app consuming CCA library.\n *\n * To please both scenarios, we are adding a condition to prevent tests from failing\n */\nif (languages.default?.default[\"en\"]?.weekdays) {\n\t(languages.default.default[\"en\"].weekdays.shorthand as string[]) = languages.default.default[\"en\"].weekdays.longhand.map(day => {\n\t\tif (day === \"Thursday\") {\n\t\t\treturn \"Th\";\n\t\t}\n\t\treturn day.charAt(0);\n\t});\n}\n\n/**\n * Get started with importing the module:\n *\n * ```typescript\n * import { DatePickerModule } from 'carbon-components-angular';\n * ```\n *\n * [See demo](../../?path=/story/components-date-picker--single)\n */\n@Component({\n\tselector: \"cds-date-picker, ibm-date-picker\",\n\ttemplate: `\n\t<div class=\"cds--form-item\">\n\t\t<div\n\t\t\tclass=\"cds--date-picker\"\n\t\t\t[ngClass]=\"{\n\t\t\t\t'cds--date-picker--range' : range,\n\t\t\t\t'cds--date-picker--single' : !range,\n\t\t\t\t'cds--date-picker--light' : theme === 'light',\n\t\t\t\t'cds--skeleton' : skeleton\n\t\t\t}\">\n\t\t\t<div class=\"cds--date-picker-container\">\n\t\t\t\t<cds-date-picker-input\n\t\t\t\t\t#input\n\t\t\t\t\t[label]=\"label\"\n\t\t\t\t\t[placeholder]=\"placeholder\"\n\t\t\t\t\t[pattern]=\"inputPattern\"\n\t\t\t\t\t[id]=\"id + '-input'\"\n\t\t\t\t\t[size]=\"size\"\n\t\t\t\t\t[type]=\"(range ? 'range' : 'single')\"\n\t\t\t\t\t[hasIcon]=\"(range ? false : true)\"\n\t\t\t\t\t[disabled]=\"disabled\"\n\t\t\t\t\t[invalid]=\"invalid\"\n\t\t\t\t\t[invalidText]=\"invalidText\"\n\t\t\t\t\t[warn]=\"warn\"\n\t\t\t\t\t[warnText]=\"warnText\"\n\t\t\t\t\t[skeleton]=\"skeleton\"\n\t\t\t\t\t[helperText]=\"helperText\"\n\t\t\t\t\t(valueChange)=\"onValueChange($event)\"\n\t\t\t\t\t(click)=\"openCalendar(input)\">\n\t\t\t\t</cds-date-picker-input>\n\t\t\t</div>\n\n\t\t\t<div *ngIf=\"range\" class=\"cds--date-picker-container\">\n\t\t\t\t<cds-date-picker-input\n\t\t\t\t\t#rangeInput\n\t\t\t\t\t[label]=\"rangeLabel\"\n\t\t\t\t\t[placeholder]=\"placeholder\"\n\t\t\t\t\t[pattern]=\"inputPattern\"\n\t\t\t\t\t[id]=\"id + '-rangeInput'\"\n\t\t\t\t\t[size]=\"size\"\n\t\t\t\t\t[type]=\"(range ? 'range' : 'single')\"\n\t\t\t\t\t[hasIcon]=\"(range ? true : null)\"\n\t\t\t\t\t[disabled]=\"disabled\"\n\t\t\t\t\t[invalid]=\"rangeInvalid\"\n\t\t\t\t\t[invalidText]=\"rangeInvalidText\"\n\t\t\t\t\t[warn]=\"rangeWarn\"\n\t\t\t\t\t[warnText]=\"rangeWarnText\"\n\t\t\t\t\t[skeleton]=\"skeleton\"\n\t\t\t\t\t[helperText]=\"rangeHelperText\"\n\t\t\t\t\t(valueChange)=\"onRangeValueChange($event)\"\n\t\t\t\t\t(click)=\"openCalendar(rangeInput)\">\n\t\t\t\t</cds-date-picker-input>\n\t\t\t</div>\n\t\t</div>\n\t</div>\n\t`,\n\tproviders: [\n\t\t{\n\t\t\tprovide: NG_VALUE_ACCESSOR,\n\t\t\tuseExisting: DatePicker,\n\t\t\tmulti: true\n\t\t}\n\t],\n\tencapsulation: ViewEncapsulation.None\n})\nexport class DatePicker implements\n\tOnInit,\n\tOnDestroy,\n\tOnChanges,\n\tAfterViewChecked,\n\tAfterViewInit {\n\tprivate static datePickerCount = 0;\n\n\t/**\n\t * Select calendar range mode\n\t */\n\t@Input() range = false;\n\n\t/**\n\t * Format of date\n\t *\n\t * For reference: https://flatpickr.js.org/formatting/\n\t */\n\t@Input() dateFormat = \"m/d/Y\";\n\n\t/**\n\t * Language of the flatpickr calendar.\n\t *\n\t * For reference of the possible locales:\n\t * https://github.com/flatpickr/flatpickr/blob/master/src/l10n/index.ts\n\t */\n\t@Input() language = \"en\";\n\n\t@Input() label: string | TemplateRef<any>;\n\t@Input() helperText: string | TemplateRef<any>;\n\t@Input() rangeHelperText: string | TemplateRef<any>;\n\t@Input() rangeLabel: string;\n\n\t@Input() placeholder = \"mm/dd/yyyy\";\n\n\t/**\n\t * Aria label added to datepicker's calendar container.\n\t */\n\t@Input() ariaLabel = \"calendar container\";\n\n\t/**\n\t * The pattern for the underlying input element\n\t */\n\t@Input() inputPattern = \"^\\\\d{1,2}/\\\\d{1,2}/\\\\d{4}$\";\n\n\t@Input() id = `datepicker-${DatePicker.datePickerCount++}`;\n\n\t@Input() set value(v: (Date | string)[]) {\n\t\tif (!v) {\n\t\t\tv = [];\n\t\t}\n\t\tthis._value = v;\n\t}\n\n\tget value() {\n\t\treturn this._value;\n\t}\n\n\t/**\n\t * @deprecated since v5 - Use `cdsLayer` directive instead\n\t * Set to `\"light\"` to apply the light style\n\t */\n\t@Input() theme: \"light\" | \"dark\" = \"dark\";\n\n\t@Input() disabled = false;\n\t/**\n\t * Set to `true` to display the invalid state.\n\t */\n\t@Input() invalid = false;\n\t/**\n\t * Value displayed if datepicker is in an invalid state.\n\t */\n\t@Input() invalidText: string | TemplateRef<any>;\n\t/**\n\t * Set to `true` to show a warning (contents set by warningText)\n\t */\n\t@Input() warn = false;\n\t/**\n\t * Sets the warning text\n\t */\n\t@Input() warnText: string | TemplateRef<any>;\n\n\t@Input() size: \"sm\" | \"md\" | \"lg\" = \"md\";\n\t/**\n\t * Set to `true` to display the invalid state for the second datepicker input.\n\t */\n\t@Input() rangeInvalid = false;\n\t/**\n\t * Value displayed if the second datepicker input is in an invalid state.\n\t */\n\t@Input() rangeInvalidText: string | TemplateRef<any>;\n\t/**\n\t * Set to `true` to show a warning in the second datepicker input (contents set by rangeWarningText)\n\t */\n\t@Input() rangeWarn = false;\n\t/**\n\t * Sets the warning text for the second datepicker input\n\t */\n\t@Input() rangeWarnText: string | TemplateRef<any>;\n\n\t@Input() skeleton = false;\n\n\t@Input() plugins = [];\n\n\t@Input()\n\tset flatpickrOptions(options: Partial<Options>) {\n\t\tthis._flatpickrOptions = Object.assign({}, this._flatpickrOptions, options);\n\t}\n\tget flatpickrOptions(): Partial<Options> {\n\t\tconst plugins = [...this.plugins, carbonFlatpickrMonthSelectPlugin];\n\t\tif (this.range) {\n\t\t\tplugins.push(rangePlugin({ input: `#${this.id}-rangeInput`, position: \"left\" }));\n\t\t}\n\t\treturn Object.assign({}, this._flatpickrOptions, this.flatpickrBaseOptions, {\n\t\t\tmode: this.range ? \"range\" : \"single\",\n\t\t\tplugins,\n\t\t\tdateFormat: this.dateFormat,\n\t\t\tlocale: languages.default?.default[this.language] || languages.default[this.language]\n\t\t});\n\t}\n\n\t@ViewChild(\"input\", { static: true }) input: DatePickerInput;\n\t@ViewChild(\"rangeInput\") rangeInput: DatePickerInput;\n\n\t@Output() valueChange: EventEmitter<any> = new EventEmitter();\n\n\t/**\n\t * We are overriding onClose event even if users pass it via flatpickr options\n\t * Emits an event when date picker closes\n\t */\n\t@Output() onClose: EventEmitter<any> = new EventEmitter();\n\n\tprotected _value = [];\n\n\tprotected _flatpickrOptions: Partial<Options> = {\n\t\tallowInput: true\n\t};\n\n\tprotected flatpickrBaseOptions = {\n\t\tmode: \"single\",\n\t\tdateFormat: \"m/d/Y\",\n\t\tplugins: this.plugins,\n\t\tonOpen: () => {\n\t\t\tthis.updateClassNames();\n\t\t\tthis.updateAttributes();\n\t\t\tthis.updateCalendarListeners();\n\t\t},\n\t\tonClose: (date) => {\n\t\t\t// This makes sure that the `flatpickrInstance selectedDates` are in sync with the values of\n\t\t\t// the inputs when the calendar closes.\n\t\t\tif (this.range && this.flatpickrInstance) {\n\t\t\t\tconst inputValue = this.input.input.nativeElement.value;\n\t\t\t\tconst rangeInputValue = this.rangeInput.input.nativeElement.value;\n\t\t\t\tif (inputValue || rangeInputValue) {\n\t\t\t\t\tconst parseDate = (date: string) => this.flatpickrInstance.parseDate(date, this.dateFormat);\n\t\t\t\t\tthis.setDateValues([parseDate(inputValue), parseDate(rangeInputValue || inputValue)]);\n\t\t\t\t\tthis.doSelect(this.flatpickrInstance.selectedDates);\n\t\t\t\t}\n\t\t\t}\n\t\t\tthis.onClose.emit(date);\n\t\t},\n\t\tonDayCreate: (_dObj, _dStr, _fp, dayElem) => {\n\t\t\tdayElem.classList.add(\"cds--date-picker__day\");\n\t\t},\n\t\tnextArrow: this.rightArrowHTML(),\n\t\tprevArrow: this.leftArrowHTML(),\n\t\tvalue: this.value\n\t};\n\n\tprotected flatpickrInstance = null;\n\n\tconstructor(\n\t\tprotected elementRef: ElementRef,\n\t\tprotected i18n: I18n\n\t) { }\n\n\tngOnInit() {\n\t\t// if i18n is set to anything other than en we'll want to change the language\n\t\t// otherwise we'll just use the local setting\n\t\tif (this.i18n.getLocale() !== \"en\") {\n\t\t\tthis.i18n.getLocaleObservable().subscribe(locale => {\n\t\t\t\tthis.language = locale;\n\t\t\t\tthis.resetFlatpickrInstance();\n\t\t\t});\n\t\t}\n\t}\n\n\tngOnChanges(changes: SimpleChanges) {\n\t\t// Reset the flatpickr instance on input changes that affect flatpickr.\n\t\tconst flatpickrChangeKeys = [\n\t\t\t\"range\",\n\t\t\t\"dateFormat\",\n\t\t\t\"language\",\n\t\t\t\"id\",\n\t\t\t\"value\",\n\t\t\t\"plugins\",\n\t\t\t\"flatpickrOptions\"\n\t\t];\n\t\tconst changeKeys = Object.keys(changes);\n\t\tif (changeKeys.some(key => flatpickrChangeKeys.includes(key))) {\n\t\t\tthis.resetFlatpickrInstance(changes.value);\n\t\t}\n\t}\n\n\tngAfterViewInit() {\n\t\tsetTimeout(() => {\n\t\t\tthis.addInputListeners();\n\t\t}, 0);\n\t}\n\n\t// because the actual view may be delayed in loading (think projection into a tab pane)\n\t// and because we rely on a library that operates outside the Angular view of the world\n\t// we need to keep trying to load the library, until the relevant DOM is actually live\n\tngAfterViewChecked() {\n\t\tif (!this.isFlatpickrLoaded()) {\n\t\t\t// @ts-ignore ts is unhappy with the below call to `flatpickr`\n\t\t\tthis.flatpickrInstance = flatpickr(`#${this.id}-input`, this.flatpickrOptions);\n\t\t\t// if (and only if) the initialization succeeded, we can set the date values\n\t\t\tif (this.isFlatpickrLoaded()) {\n\t\t\t\tif (this.value.length > 0) {\n\t\t\t\t\tthis.setDateValues(this.value);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\n\t@HostListener(\"focusin\")\n\tonFocus() {\n\t\t// Updates the month manually when calendar mode is range because month\n\t\t// will not update properly without manually updating them on focus.\n\t\tif (this.range) {\n\t\t\tif (this.rangeInput.input.nativeElement === document.activeElement && this.flatpickrInstance.selectedDates[1]) {\n\t\t\t\tconst currentMonth = this.flatpickrInstance.selectedDates[1].getMonth();\n\t\t\t\tthis.flatpickrInstance.changeMonth(currentMonth, false);\n\t\t\t} else if (this.input.input.nativeElement === document.activeElement && this.flatpickrInstance.selectedDates[0]) {\n\t\t\t\tconst currentMonth = this.flatpickrInstance.selectedDates[0].getMonth();\n\t\t\t\tthis.flatpickrInstance.changeMonth(currentMonth, false);\n\t\t\t}\n\t\t}\n\t}\n\n\t@HostListener(\"focusout\")\n\tonFocusOut() {\n\t\tthis.onTouched();\n\t}\n\n\t/**\n\t * Writes a value from the model to the component. Expects the value to be `null` or `(Date | string)[]`\n\t * @param value value received from the model\n\t */\n\twriteValue(value: (Date | string)[]) {\n\t\tthis.value = value;\n\t\tsetTimeout(() => {\n\t\t\tif (this.isFlatpickrLoaded() && this.flatpickrInstance.config) {\n\t\t\t\tthis.setDateValues(this.value);\n\t\t\t}\n\t\t});\n\t}\n\n\t/**\n\t * `ControlValueAccessor` method to programmatically disable the DatePicker.\n\t *\n\t * ex: `this.formGroup.get(\"myDatePicker\").disable();`\n\t *\n\t * @param isDisabled `true` to disable the DatePicker\n\t */\n\tsetDisabledState(isDisabled: boolean) {\n\t\tthis.disabled = isDisabled;\n\t}\n\n\tregisterOnChange(fn: any) {\n\t\tthis.propagateChange = fn;\n\t}\n\n\tregisterOnTouched(fn: any) {\n\t\tthis.onTouched = fn;\n\t}\n\n\tonTouched: () => any = () => { };\n\n\tpropagateChange = (_: any) => { };\n\n\t/**\n\t * Cleans up our flatpickr instance\n\t */\n\tngOnDestroy() {\n\t\tif (!this.isFlatpickrLoaded()) { return; }\n\t\tthis.flatpickrInstance.destroy();\n\t}\n\n\t/**\n\t * Handles the `valueChange` event from the primary/single input\n\t */\n\tonValueChange(event: string) {\n\t\tif (this.isFlatpickrLoaded()) {\n\t\t\tconst date = this.flatpickrInstance.parseDate(event, this.dateFormat);\n\t\t\tif (this.range) {\n\t\t\t\tthis.setDateValues([date, this.flatpickrInstance.selectedDates[1]]);\n\t\t\t} else {\n\t\t\t\tthis.setDateValues([date]);\n\t\t\t}\n\t\t\tthis.doSelect(this.flatpickrInstance.selectedDates);\n\t\t}\n\t}\n\n\t/**\n\t * Handles the `valueChange` event from the range input\n\t */\n\tonRangeValueChange(event: string) {\n\t\tif (this.isFlatpickrLoaded() && this.flatpickrInstance.isOpen) {\n\t\t\tconst date = this.flatpickrInstance.parseDate(event, this.dateFormat);\n\t\t\tthis.setDateValues([this.flatpickrInstance.selectedDates[0], date]);\n\t\t\tthis.doSelect(this.flatpickrInstance.selectedDates);\n\t\t}\n\t}\n\n\t/**\n\t * Handles opening the calendar \"properly\" when the calendar icon is clicked.\n\t */\n\topenCalendar(datepickerInput: DatePickerInput) {\n\t\tif (this.range) {\n\t\t\tdatepickerInput.input.nativeElement.click();\n\n\t\t\t// If the first input's calendar icon is clicked when calendar is in range mode, then\n\t\t\t// the month and year needs to be manually changed to the current selected month and\n\t\t\t// year otherwise the calendar view will not be updated upon opening.\n\t\t\tif (datepickerInput === this.input && this.flatpickrInstance.selectedDates[0]) {\n\t\t\t\tconst currentMonth = this.flatpickrInstance.selectedDates[0].getMonth();\n\n\t\t\t\tthis.flatpickrInstance.currentYear = this.flatpickrInstance.selectedDates[0].getFullYear();\n\t\t\t\tthis.flatpickrInstance.changeMonth(currentMonth, false);\n\t\t\t}\n\t\t} else {\n\t\t\t// Single-mode flatpickr handles mousedown but not click, so nativeElement.click() won't\n\t\t\t// work when the calendar icon is clicked. In this case we simply use flatpickr.open().\n\t\t\tthis.flatpickrInstance.open();\n\t\t}\n\t}\n\n\tprotected updateCalendarListeners() {\n\t\tconst calendarContainer = document.querySelectorAll(\".flatpickr-calendar\");\n\t\tArray.from(calendarContainer).forEach(calendar => {\n\t\t\tcalendar.removeEventListener(\"click\", this.preventCalendarClose);\n\t\t\tcalendar.addEventListener(\"click\", this.preventCalendarClose);\n\t\t});\n\t}\n\n\t/**\n\t * Handles the initialization of event listeners for the datepicker input and range input fields.\n\t */\n\tprotected addInputListeners() {\n\t\tif (!this.isFlatpickrLoaded()) {\n\t\t\treturn;\n\t\t}\n\n\t\t// Allows focus transition from the datepicker input or range input field to\n\t\t// flatpickr calendar using a keyboard.\n\t\tconst addFocusCalendarListener = (element: HTMLInputElement) => {\n\t\t\telement.addEventListener(\"keydown\", (event: KeyboardEvent) => {\n\t\t\t\tif (event.key === \"Escape\") {\n\t\t\t\t\tthis.flatpickrInstance.close();\n\t\t\t\t}\n\t\t\t\tif (event.key === \"ArrowDown\") {\n\t\t\t\t\tif (!this.flatpickrInstance.isOpen) {\n\t\t\t\t\t\tthis.flatpickrInstance.open();\n\t\t\t\t\t}\n\n\t\t\t\t\tconst calendarContainer = this.flatpickrInstance.calendarContainer;\n\t\t\t\t\tconst dayElement = calendarContainer && calendarContainer.querySelector(\".flatpickr-day[tabindex]\");\n\n\t\t\t\t\tif (dayElement) {\n\t\t\t\t\t\tdayElement.focus();\n\n\t\t\t\t\t\t// If the user manually inputs a value into the date field and presses arrow down,\n\t\t\t\t\t\t// datepicker input onchange will be triggered when focus is removed from it and\n\t\t\t\t\t\t// `flatpickrInstance.setDate` and `flatpickrInstance.changeMonth` will be invoked\n\t\t\t\t\t\t// which will automatically change focus to the beginning of the document.\n\t\t\t\t\t\tif (document.activeElement !== dayElement && this.flatpickrInstance.selectedDateElem) {\n\t\t\t\t\t\t\tthis.flatpickrInstance.selectedDateElem.focus();\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t});\n\t\t};\n\n\t\tif (this.input && this.input.input) {\n\t\t\taddFocusCalendarListener(this.input.input.nativeElement);\n\t\t}\n\n\t\tif (this.rangeInput && this.rangeInput.input) {\n\t\t\taddFocusCalendarListener(this.rangeInput.input.nativeElement);\n\t\t}\n\t}\n\n\t/**\n\t * Resets the flatpickr instance while keeping the date values (or updating them if newDates is provided)\n\t *\n\t * Used to pick up input changes or locale changes.\n\t *\n\t * @param newDates An optional SimpleChange of date values\n\t */\n\tprotected resetFlatpickrInstance(newDates?: SimpleChange) {\n\t\tif (this.isFlatpickrLoaded()) {\n\t\t\tlet dates = this.flatpickrInstance.selectedDates;\n\t\t\tif (newDates && this.didDateValueChange(newDates.currentValue, newDates.previousValue)) {\n\t\t\t\tdates = newDates.currentValue;\n\t\t\t}\n\t\t\t// only reset the flatpickr instance on Input changes\n\t\t\t// @ts-ignore ts is unhappy with the below call to `flatpickr`\n\t\t\tthis.flatpickrInstance = flatpickr(`#${this.id}-input`, this.flatpickrOptions);\n\t\t\tthis.setDateValues(dates);\n\t\t}\n\t}\n\n\t/**\n\t * Carbon uses a number of specific classnames for parts of the flatpickr - this idempotent method applies them if needed.\n\t */\n\tprotected updateClassNames() {\n\t\tif (!this.elementRef) { return; }\n\t\t// get all the possible flatpickrs in the document - we need to add classes to (potentially) all of them\n\t\tconst calendarContainer = document.querySelectorAll(\".flatpickr-calendar\");\n\t\tconst monthContainer = document.querySelectorAll(\".flatpickr-month\");\n\t\tconst weekdaysContainer = document.querySelectorAll(\".flatpickr-weekdays\");\n\t\tconst weekdayContainer = document.querySelectorAll(\".flatpickr-weekday\");\n\t\tconst daysContainer = document.querySelectorAll(\".flatpickr-days\");\n\t\tconst dayContainer = document.querySelectorAll(\".flatpickr-day\");\n\n\t\t// add classes to lists of elements\n\t\tconst addClassIfNotExists = (classname: string, elementList: NodeListOf<Element>) => {\n\t\t\tArray.from(elementList).forEach(element => {\n\t\t\t\tif (!element.classList.contains(classname)) {\n\t\t\t\t\telement.classList.add(classname);\n\t\t\t\t}\n\t\t\t});\n\t\t};\n\n\t\t// add classes (but only if they don't exist, small perf win)\n\t\taddClassIfNotExists(\"cds--date-picker__calendar\", calendarContainer);\n\t\taddClassIfNotExists(\"cds--date-picker__month\", monthContainer);\n\t\taddClassIfNotExists(\"cds--date-picker__weekdays\", weekdaysContainer);\n\t\taddClassIfNotExists(\"cds--date-picker__days\", daysContainer);\n\n\t\t// add weekday classes and format the text\n\t\tArray.from(weekdayContainer).forEach(element => {\n\t\t\telement.innerHTML = element.innerHTML.replace(/\\s+/g, \"\");\n\t\t\telement.classList.add(\"cds--date-picker__weekday\");\n\t\t});\n\n\t\t// add day classes and special case the \"today\" element based on `this.value`\n\t\tArray.from(dayContainer).forEach(element => {\n\t\t\telement.classList.add(\"cds--date-picker__day\");\n\t\t\tif (!this.value) {\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tif (element.classList.contains(\"today\") && this.value.length > 0) {\n\t\t\t\telement.classList.add(\"no-border\");\n\t\t\t} else if (element.classList.contains(\"today\") && this.value.length === 0) {\n\t\t\t\telement.classList.remove(\"no-border\");\n\t\t\t}\n\t\t});\n\t}\n\n\tprotected updateAttributes() {\n\t\tconst calendarContainer = document.querySelectorAll(\".flatpickr-calendar\");\n\t\tArray.from(calendarContainer).forEach(calendar => {\n\t\t\tcalendar.setAttribute(\"role\", \"region\");\n\t\t\tcalendar.setAttribute(\"aria-label\", this.ariaLabel);\n\t\t});\n\t}\n\n\t/**\n\t * Applies the given date value array to both the flatpickr instance and the `input`(s)\n\t * @param dates the date values to apply\n\t */\n\tprotected setDateValues(dates: (Date | string)[]) {\n\t\tif (this.isFlatpickrLoaded()) {\n\t\t\tconst singleInput = this.elementRef.nativeElement.querySelector(`#${this.id}-input`);\n\t\t\tconst rangeInput = this.elementRef.nativeElement.querySelector(`#${this.id}-rangeInput`);\n\n\t\t\t// `flatpickrInstance.setDate` removes the focus on the selected date element and will\n\t\t\t// automatically change focus to the beginning of the document. If a selected date is\n\t\t\t// focused before `flatpickrInstance.setDate` is invoked then it should remain focused.\n\t\t\tlet shouldRefocusDateElement = this.flatpickrInstance.selectedDateElem === document.activeElement;\n\n\t\t\t// set the date on the instance\n\t\t\tthis.flatpickrInstance.setDate(dates);\n\n\t\t\tif (shouldRefocusDateElement) {\n\t\t\t\tthis.flatpickrInstance.selectedDateElem.focus();\n\t\t\t}\n\n\t\t\t// we can either set a date value or an empty string, so we start with an empty string\n\t\t\tlet singleDate = \"\";\n\t\t\t// if date is a string, parse and format\n\t\t\tif (typeof this.flatpickrInstance.selectedDates[0] === \"string\") {\n\t\t\t\tsingleDate = this.flatpickrInstance.parseDate(this.flatpickrInstance.selectedDates[0], this.dateFormat);\n\t\t\t\tsingleDate = this.flatpickrInstance.formatDate(singleDate, this.dateFormat);\n\t\t\t// if date is not a string we can assume it's a Date and we should format\n\t\t\t} else if (!!this.flatpickrInstance.selectedDates[0]) {\n\t\t\t\tsingleDate = this.flatpickrInstance.formatDate(this.flatpickrInstance.selectedDates[0], this.dateFormat);\n\t\t\t}\n\n\t\t\tif (rangeInput) {\n\t\t\t\t// we can either set a date value or an empty string, so we start with an empty string\n\t\t\t\tlet rangeDate = \"\";\n\t\t\t\t// if date is a string, parse and format\n\t\t\t\tif (typeof this.flatpickrInstance.selectedDates[1] === \"string\") {\n\t\t\t\t\trangeDate = this.flatpickrInstance.parseDate(this.flatpickrInstance.selectedDates[1].toString(), this.dateFormat);\n\t\t\t\t\trangeDate = this.flatpickrInstance.formatDate(rangeDate, this.dateFormat);\n\t\t\t\t// if date is not a string we can assume it's a Date and we should format\n\t\t\t\t} else if (!!this.flatpickrInstance.selectedDates[1]) {\n\t\t\t\t\trangeDate = this.flatpickrInstance.formatDate(this.flatpickrInstance.selectedDates[1], this.dateFormat);\n\t\t\t\t}\n\t\t\t\tsetTimeout(() => {\n\t\t\t\t\t// apply the values\n\t\t\t\t\trangeInput.value = rangeDate;\n\t\t\t\t\tsingleInput.value = singleDate;\n\t\t\t\t});\n\t\t\t}\n\t\t}\n\t}\n\n\tprotected preventCalendarClose = event => event.stopPropagation();\n\n\tprotected doSelect(selectedValue: (Date | string)[]) {\n\t\t// In range mode, if a date is selected from the first calendar that is from the previous month,\n\t\t// the month will not be updated on the calendar until the calendar is re-opened.\n\t\t// This will make sure the calendar is updated with the correct month.\n\t\tif (this.range && this.flatpickrInstance.selectedDates[0]) {\n\t\t\tconst currentMonth = this.flatpickrInstance.selectedDates[0].getMonth();\n\n\t\t\t// `flatpickrInstance.changeMonth` removes the focus on the selected date element and will\n\t\t\t// automatically change focus to the beginning of the document. If a selected date is\n\t\t\t// focused before `flatpickrInstance.changeMonth` is invoked then it should remain focused.\n\t\t\tlet shouldRefocusDateElement = this.flatpickrInstance.selectedDateElem === document.activeElement;\n\n\t\t\tthis.flatpickrInstance.changeMonth(currentMonth, false);\n\n\t\t\tif (shouldRefocusDateElement) {\n\t\t\t\tthis.flatpickrInstance.selectedDateElem.focus();\n\t\t\t}\n\n\t\t}\n\t\tthis.valueChange.emit(selectedValue);\n\t\tthis.propagateChange(selectedValue);\n\t}\n\n\tprotected didDateValueChange(currentValue, previousValue) {\n\t\treturn currentValue[0] !== previousValue[0] || currentValue[1] !== previousValue[1];\n\t}\n\n\t/**\n\t * More advanced checking of the loaded state of flatpickr\n\t */\n\tprotected isFlatpickrLoaded() {\n\t\t// cast the instance to a boolean, and some method that has to exist for the library to be loaded in this case `setDate`\n\t\treturn !!this.flatpickrInstance && !!this.flatpickrInstance.setDate;\n\t}\n\n\t/**\n\t * Right arrow HTML passed to flatpickr\n\t */\n\tprotected rightArrowHTML() {\n\t\treturn `\n\t\t\t<svg width=\"16px\" height=\"16px\" viewBox=\"0 0 16 16\">\n\t\t\t\t<polygon points=\"11,8 6,13 5.3,12.3 9.6,8 5.3,3.7 6,3 \"/>\n\t\t\t\t<rect width=\"16\" height=\"16\" style=\"fill:none\" />\n\t\t\t</svg>`;\n\t}\n\n\t/**\n\t * Left arrow HTML passed to flatpickr\n\t */\n\tprotected leftArrowHTML() {\n\t\treturn `\n\t\t\t<svg width=\"16px\" height=\"16px\" viewBox=\"0 0 16 16\">\n\t\t\t\t<polygon points=\"5,8 10,3 10.7,3.7 6.4,8 10.7,12.3 10,13 \"/>\n\t\t\t\t<rect width=\"16\" height=\"16\" style=\"fill:none\" />\n\t\t\t</svg>`;\n\t}\n}\n",
|
|
26077
|
+
"sourceCode": "import {\n\tComponent,\n\tInput,\n\tOutput,\n\tEventEmitter,\n\tViewEncapsulation,\n\tElementRef,\n\tOnDestroy,\n\tHostListener,\n\tTemplateRef,\n\tOnChanges,\n\tSimpleChanges,\n\tAfterViewChecked,\n\tAfterViewInit,\n\tViewChild,\n\tOnInit,\n\tSimpleChange\n} from \"@angular/core\";\nimport rangePlugin from \"flatpickr/dist/plugins/rangePlugin\";\nimport flatpickr from \"flatpickr\";\nimport { NG_VALUE_ACCESSOR } from \"@angular/forms\";\nimport { carbonFlatpickrMonthSelectPlugin } from \"./carbon-flatpickr-month-select\";\nimport * as languages from \"flatpickr/dist/l10n/index\";\nimport { Options } from \"flatpickr/dist/types/options\";\nimport { DatePickerInput } from \"carbon-components-angular/datepicker-input\";\nimport { I18n } from \"carbon-components-angular/i18n\";\n\n/**\n * Due to type error, we have to use square brackets property accessor\n * There is a webpack issue when attempting to access exported languages from flatpickr l10n Angular 14+ apps\n * languages.default[locale] fails in app consuming CCA library but passes in test\n * languages.default.default[locale] fails in test but works in app consuming CCA library.\n *\n * To please both scenarios, we are adding a condition to prevent tests from failing\n */\nif (languages.default?.default[\"en\"]?.weekdays) {\n\t(languages.default.default[\"en\"].weekdays.shorthand as string[]) = languages.default.default[\"en\"].weekdays.longhand.map(day => {\n\t\tif (day === \"Thursday\") {\n\t\t\treturn \"Th\";\n\t\t}\n\t\treturn day.charAt(0);\n\t});\n}\n\n/**\n * Get started with importing the module:\n *\n * ```typescript\n * import { DatePickerModule } from 'carbon-components-angular';\n * ```\n *\n * [See demo](../../?path=/story/components-date-picker--single)\n */\n@Component({\n\tselector: \"cds-date-picker, ibm-date-picker\",\n\ttemplate: `\n\t<div class=\"cds--form-item\">\n\t\t<div\n\t\t\tclass=\"cds--date-picker\"\n\t\t\t[ngClass]=\"{\n\t\t\t\t'cds--date-picker--range' : range,\n\t\t\t\t'cds--date-picker--single' : !range,\n\t\t\t\t'cds--date-picker--light' : theme === 'light',\n\t\t\t\t'cds--skeleton' : skeleton\n\t\t\t}\">\n\t\t\t<div class=\"cds--date-picker-container\">\n\t\t\t\t<cds-date-picker-input\n\t\t\t\t\t#input\n\t\t\t\t\t[label]=\"label\"\n\t\t\t\t\t[placeholder]=\"placeholder\"\n\t\t\t\t\t[pattern]=\"inputPattern\"\n\t\t\t\t\t[id]=\"id + '-input'\"\n\t\t\t\t\t[size]=\"size\"\n\t\t\t\t\t[type]=\"(range ? 'range' : 'single')\"\n\t\t\t\t\t[hasIcon]=\"(range ? false : true)\"\n\t\t\t\t\t[disabled]=\"disabled\"\n\t\t\t\t\t[invalid]=\"invalid\"\n\t\t\t\t\t[invalidText]=\"invalidText\"\n\t\t\t\t\t[warn]=\"warn\"\n\t\t\t\t\t[warnText]=\"warnText\"\n\t\t\t\t\t[skeleton]=\"skeleton\"\n\t\t\t\t\t[helperText]=\"helperText\"\n\t\t\t\t\t(valueChange)=\"onValueChange($event)\"\n\t\t\t\t\t(click)=\"openCalendar(input)\">\n\t\t\t\t</cds-date-picker-input>\n\t\t\t</div>\n\n\t\t\t<div *ngIf=\"range\" class=\"cds--date-picker-container\">\n\t\t\t\t<cds-date-picker-input\n\t\t\t\t\t#rangeInput\n\t\t\t\t\t[label]=\"rangeLabel\"\n\t\t\t\t\t[placeholder]=\"placeholder\"\n\t\t\t\t\t[pattern]=\"inputPattern\"\n\t\t\t\t\t[id]=\"id + '-rangeInput'\"\n\t\t\t\t\t[size]=\"size\"\n\t\t\t\t\t[type]=\"(range ? 'range' : 'single')\"\n\t\t\t\t\t[hasIcon]=\"(range ? true : null)\"\n\t\t\t\t\t[disabled]=\"disabled\"\n\t\t\t\t\t[invalid]=\"rangeInvalid\"\n\t\t\t\t\t[invalidText]=\"rangeInvalidText\"\n\t\t\t\t\t[warn]=\"rangeWarn\"\n\t\t\t\t\t[warnText]=\"rangeWarnText\"\n\t\t\t\t\t[skeleton]=\"skeleton\"\n\t\t\t\t\t[helperText]=\"rangeHelperText\"\n\t\t\t\t\t(valueChange)=\"onRangeValueChange($event)\"\n\t\t\t\t\t(click)=\"openCalendar(rangeInput)\">\n\t\t\t\t</cds-date-picker-input>\n\t\t\t</div>\n\t\t</div>\n\t</div>\n\t`,\n\tproviders: [\n\t\t{\n\t\t\tprovide: NG_VALUE_ACCESSOR,\n\t\t\tuseExisting: DatePicker,\n\t\t\tmulti: true\n\t\t}\n\t],\n\tencapsulation: ViewEncapsulation.None\n})\nexport class DatePicker implements\n\tOnInit,\n\tOnDestroy,\n\tOnChanges,\n\tAfterViewChecked,\n\tAfterViewInit {\n\tprivate static datePickerCount = 0;\n\n\t/**\n\t * Select calendar range mode\n\t */\n\t@Input() range = false;\n\n\t/**\n\t * Format of date\n\t *\n\t * For reference: https://flatpickr.js.org/formatting/\n\t */\n\t@Input() dateFormat = \"m/d/Y\";\n\n\t/**\n\t * Language of the flatpickr calendar.\n\t *\n\t * For reference of the possible locales:\n\t * https://github.com/flatpickr/flatpickr/blob/master/src/l10n/index.ts\n\t */\n\t@Input() language = \"en\";\n\n\t@Input() label: string | TemplateRef<any>;\n\t@Input() helperText: string | TemplateRef<any>;\n\t@Input() rangeHelperText: string | TemplateRef<any>;\n\t@Input() rangeLabel: string;\n\n\t@Input() placeholder = \"mm/dd/yyyy\";\n\n\t/**\n\t * Aria label added to datepicker's calendar container.\n\t */\n\t@Input() ariaLabel = \"calendar container\";\n\n\t/**\n\t * The pattern for the underlying input element\n\t */\n\t@Input() inputPattern = \"^\\\\d{1,2}/\\\\d{1,2}/\\\\d{4}$\";\n\n\t@Input() id = `datepicker-${DatePicker.datePickerCount++}`;\n\n\t@Input() set value(v: (Date | string)[]) {\n\t\tif (!v) {\n\t\t\tv = [];\n\t\t}\n\t\tthis._value = v;\n\t}\n\n\tget value() {\n\t\treturn this._value;\n\t}\n\n\t/**\n\t * @deprecated since v5 - Use `cdsLayer` directive instead\n\t * Set to `\"light\"` to apply the light style\n\t */\n\t@Input() theme: \"light\" | \"dark\" = \"dark\";\n\n\t@Input() disabled = false;\n\t/**\n\t * Set to `true` to display the invalid state.\n\t */\n\t@Input() invalid = false;\n\t/**\n\t * Value displayed if datepicker is in an invalid state.\n\t */\n\t@Input() invalidText: string | TemplateRef<any>;\n\t/**\n\t * Set to `true` to show a warning (contents set by warningText)\n\t */\n\t@Input() warn = false;\n\t/**\n\t * Sets the warning text\n\t */\n\t@Input() warnText: string | TemplateRef<any>;\n\n\t@Input() size: \"sm\" | \"md\" | \"lg\" = \"md\";\n\t/**\n\t * Set to `true` to display the invalid state for the second datepicker input.\n\t */\n\t@Input() rangeInvalid = false;\n\t/**\n\t * Value displayed if the second datepicker input is in an invalid state.\n\t */\n\t@Input() rangeInvalidText: string | TemplateRef<any>;\n\t/**\n\t * Set to `true` to show a warning in the second datepicker input (contents set by rangeWarningText)\n\t */\n\t@Input() rangeWarn = false;\n\t/**\n\t * Sets the warning text for the second datepicker input\n\t */\n\t@Input() rangeWarnText: string | TemplateRef<any>;\n\n\t@Input() skeleton = false;\n\n\t@Input() plugins = [];\n\n\t@Input()\n\tset flatpickrOptions(options: Partial<Options>) {\n\t\tthis._flatpickrOptions = Object.assign({}, this._flatpickrOptions, options);\n\t}\n\tget flatpickrOptions(): Partial<Options> {\n\t\tconst plugins = [...this.plugins, carbonFlatpickrMonthSelectPlugin];\n\t\tif (this.range) {\n\t\t\tplugins.push(rangePlugin({ input: `#${this.id}-rangeInput`, position: \"left\" }));\n\t\t}\n\t\treturn Object.assign({}, this._flatpickrOptions, this.flatpickrBaseOptions, {\n\t\t\tmode: this.range ? \"range\" : \"single\",\n\t\t\tplugins,\n\t\t\tdateFormat: this.dateFormat,\n\t\t\tlocale: languages.default?.default[this.language] || languages.default[this.language]\n\t\t});\n\t}\n\n\t@ViewChild(\"input\", { static: true }) input: DatePickerInput;\n\t@ViewChild(\"rangeInput\") rangeInput: DatePickerInput;\n\n\t@Output() valueChange: EventEmitter<any> = new EventEmitter();\n\n\t/**\n\t * We are overriding onClose event even if users pass it via flatpickr options\n\t * Emits an event when date picker closes\n\t */\n\t@Output() onClose: EventEmitter<any> = new EventEmitter();\n\n\tprotected _value = [];\n\n\tprotected _flatpickrOptions: Partial<Options> = {\n\t\tallowInput: true\n\t};\n\n\tprotected flatpickrBaseOptions = {\n\t\tmode: \"single\",\n\t\tdateFormat: \"m/d/Y\",\n\t\tplugins: this.plugins,\n\t\tonOpen: () => {\n\t\t\tthis.updateClassNames();\n\t\t\tthis.updateAttributes();\n\t\t\tthis.updateCalendarListeners();\n\t\t},\n\t\tonClose: (date) => {\n\t\t\t// This makes sure that the `flatpickrInstance selectedDates` are in sync with the values of\n\t\t\t// the inputs when the calendar closes.\n\t\t\tif (this.range && this.flatpickrInstance) {\n\t\t\t\tconst inputValue = this.input.input.nativeElement.value;\n\t\t\t\tconst rangeInputValue = this.rangeInput.input.nativeElement.value;\n\t\t\t\tif (inputValue || rangeInputValue) {\n\t\t\t\t\tconst parseDate = (date: string) => this.flatpickrInstance.parseDate(date, this.dateFormat);\n\t\t\t\t\tthis.setDateValues([parseDate(inputValue), parseDate(rangeInputValue || inputValue)]);\n\t\t\t\t\tthis.doSelect(this.flatpickrInstance.selectedDates);\n\t\t\t\t}\n\t\t\t}\n\t\t\tthis.onClose.emit(date);\n\t\t},\n\t\tonDayCreate: (_dObj, _dStr, _fp, dayElem) => {\n\t\t\tdayElem.classList.add(\"cds--date-picker__day\");\n\t\t},\n\t\tnextArrow: this.rightArrowHTML(),\n\t\tprevArrow: this.leftArrowHTML(),\n\t\tvalue: this.value\n\t};\n\n\tprotected flatpickrInstance = null;\n\n\tconstructor(\n\t\tprotected elementRef: ElementRef,\n\t\tprotected i18n: I18n\n\t) { }\n\n\tngOnInit() {\n\t\t// if i18n is set to anything other than en we'll want to change the language\n\t\t// otherwise we'll just use the local setting\n\t\tif (this.i18n.getLocale() !== \"en\") {\n\t\t\tthis.i18n.getLocaleObservable().subscribe(locale => {\n\t\t\t\tthis.language = locale;\n\t\t\t\tthis.resetFlatpickrInstance();\n\t\t\t});\n\t\t}\n\t}\n\n\tngOnChanges(changes: SimpleChanges) {\n\t\t// Reset the flatpickr instance on input changes that affect flatpickr.\n\t\tconst flatpickrChangeKeys = [\n\t\t\t\"range\",\n\t\t\t\"dateFormat\",\n\t\t\t\"language\",\n\t\t\t\"id\",\n\t\t\t\"value\",\n\t\t\t\"plugins\",\n\t\t\t\"flatpickrOptions\"\n\t\t];\n\t\tconst changeKeys = Object.keys(changes);\n\t\tif (changeKeys.some(key => flatpickrChangeKeys.includes(key))) {\n\t\t\tthis.resetFlatpickrInstance(changes.value);\n\t\t}\n\t}\n\n\tngAfterViewInit() {\n\t\tthis.input.input.nativeElement.value = this._value[0] ?? \"\";\n\t\tif (this.range) {\n\t\t\tthis.rangeInput.input.nativeElement.value = this._value[1] ?? \"\";\n\t\t}\n\t\tsetTimeout(() => {\n\t\t\tthis.addInputListeners();\n\t\t}, 0);\n\t}\n\n\t// because the actual view may be delayed in loading (think projection into a tab pane)\n\t// and because we rely on a library that operates outside the Angular view of the world\n\t// we need to keep trying to load the library, until the relevant DOM is actually live\n\tngAfterViewChecked() {\n\t\tif (!this.isFlatpickrLoaded()) {\n\t\t\t// @ts-ignore ts is unhappy with the below call to `flatpickr`\n\t\t\tthis.flatpickrInstance = flatpickr(`#${this.id}-input`, this.flatpickrOptions);\n\t\t\t// if (and only if) the initialization succeeded, we can set the date values\n\t\t\tif (this.isFlatpickrLoaded()) {\n\t\t\t\tif (this.value.length > 0) {\n\t\t\t\t\tthis.setDateValues(this.value);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\n\t@HostListener(\"focusin\")\n\tonFocus() {\n\t\t// Updates the month manually when calendar mode is range because month\n\t\t// will not update properly without manually updating them on focus.\n\t\tif (this.range) {\n\t\t\tif (this.rangeInput.input.nativeElement === document.activeElement && this.flatpickrInstance.selectedDates[1]) {\n\t\t\t\tconst currentMonth = this.flatpickrInstance.selectedDates[1].getMonth();\n\t\t\t\tthis.flatpickrInstance.changeMonth(currentMonth, false);\n\t\t\t} else if (this.input.input.nativeElement === document.activeElement && this.flatpickrInstance.selectedDates[0]) {\n\t\t\t\tconst currentMonth = this.flatpickrInstance.selectedDates[0].getMonth();\n\t\t\t\tthis.flatpickrInstance.changeMonth(currentMonth, false);\n\t\t\t}\n\t\t}\n\t}\n\n\t@HostListener(\"focusout\")\n\tonFocusOut() {\n\t\tthis.onTouched();\n\t}\n\n\t/**\n\t * Writes a value from the model to the component. Expects the value to be `null` or `(Date | string)[]`\n\t * @param value value received from the model\n\t */\n\twriteValue(value: (Date | string)[]) {\n\t\tthis.value = value;\n\t\tsetTimeout(() => {\n\t\t\tif (this.isFlatpickrLoaded() && this.flatpickrInstance.config) {\n\t\t\t\tthis.setDateValues(this.value);\n\t\t\t}\n\t\t});\n\t}\n\n\t/**\n\t * `ControlValueAccessor` method to programmatically disable the DatePicker.\n\t *\n\t * ex: `this.formGroup.get(\"myDatePicker\").disable();`\n\t *\n\t * @param isDisabled `true` to disable the DatePicker\n\t */\n\tsetDisabledState(isDisabled: boolean) {\n\t\tthis.disabled = isDisabled;\n\t}\n\n\tregisterOnChange(fn: any) {\n\t\tthis.propagateChange = fn;\n\t}\n\n\tregisterOnTouched(fn: any) {\n\t\tthis.onTouched = fn;\n\t}\n\n\tonTouched: () => any = () => { };\n\n\tpropagateChange = (_: any) => { };\n\n\t/**\n\t * Cleans up our flatpickr instance\n\t */\n\tngOnDestroy() {\n\t\tif (!this.isFlatpickrLoaded()) { return; }\n\t\tthis.flatpickrInstance.destroy();\n\t}\n\n\t/**\n\t * Handles the `valueChange` event from the primary/single input\n\t */\n\tonValueChange(event: string) {\n\t\tif (this.isFlatpickrLoaded()) {\n\t\t\tconst date = this.flatpickrInstance.parseDate(event, this.dateFormat);\n\t\t\tif (this.range) {\n\t\t\t\tthis.setDateValues([date, this.flatpickrInstance.selectedDates[1]]);\n\t\t\t} else {\n\t\t\t\tthis.setDateValues([date]);\n\t\t\t}\n\t\t\tthis.doSelect(this.flatpickrInstance.selectedDates);\n\t\t}\n\t}\n\n\t/**\n\t * Handles the `valueChange` event from the range input\n\t */\n\tonRangeValueChange(event: string) {\n\t\tif (this.isFlatpickrLoaded() && this.flatpickrInstance.isOpen) {\n\t\t\tconst date = this.flatpickrInstance.parseDate(event, this.dateFormat);\n\t\t\tthis.setDateValues([this.flatpickrInstance.selectedDates[0], date]);\n\t\t\tthis.doSelect(this.flatpickrInstance.selectedDates);\n\t\t}\n\t}\n\n\t/**\n\t * Handles opening the calendar \"properly\" when the calendar icon is clicked.\n\t */\n\topenCalendar(datepickerInput: DatePickerInput) {\n\t\tif (this.range) {\n\t\t\tdatepickerInput.input.nativeElement.click();\n\n\t\t\t// If the first input's calendar icon is clicked when calendar is in range mode, then\n\t\t\t// the month and year needs to be manually changed to the current selected month and\n\t\t\t// year otherwise the calendar view will not be updated upon opening.\n\t\t\tif (datepickerInput === this.input && this.flatpickrInstance.selectedDates[0]) {\n\t\t\t\tconst currentMonth = this.flatpickrInstance.selectedDates[0].getMonth();\n\n\t\t\t\tthis.flatpickrInstance.currentYear = this.flatpickrInstance.selectedDates[0].getFullYear();\n\t\t\t\tthis.flatpickrInstance.changeMonth(currentMonth, false);\n\t\t\t}\n\t\t} else {\n\t\t\t// Single-mode flatpickr handles mousedown but not click, so nativeElement.click() won't\n\t\t\t// work when the calendar icon is clicked. In this case we simply use flatpickr.open().\n\t\t\tthis.flatpickrInstance.open();\n\t\t}\n\t}\n\n\tprotected updateCalendarListeners() {\n\t\tconst calendarContainer = document.querySelectorAll(\".flatpickr-calendar\");\n\t\tArray.from(calendarContainer).forEach(calendar => {\n\t\t\tcalendar.removeEventListener(\"click\", this.preventCalendarClose);\n\t\t\tcalendar.addEventListener(\"click\", this.preventCalendarClose);\n\t\t});\n\t}\n\n\t/**\n\t * Handles the initialization of event listeners for the datepicker input and range input fields.\n\t */\n\tprotected addInputListeners() {\n\t\tif (!this.isFlatpickrLoaded()) {\n\t\t\treturn;\n\t\t}\n\n\t\t// Allows focus transition from the datepicker input or range input field to\n\t\t// flatpickr calendar using a keyboard.\n\t\tconst addFocusCalendarListener = (element: HTMLInputElement) => {\n\t\t\telement.addEventListener(\"keydown\", (event: KeyboardEvent) => {\n\t\t\t\tif (event.key === \"Escape\") {\n\t\t\t\t\tthis.flatpickrInstance.close();\n\t\t\t\t}\n\t\t\t\tif (event.key === \"ArrowDown\") {\n\t\t\t\t\tif (!this.flatpickrInstance.isOpen) {\n\t\t\t\t\t\tthis.flatpickrInstance.open();\n\t\t\t\t\t}\n\n\t\t\t\t\tconst calendarContainer = this.flatpickrInstance.calendarContainer;\n\t\t\t\t\tconst dayElement = calendarContainer && calendarContainer.querySelector(\".flatpickr-day[tabindex]\");\n\n\t\t\t\t\tif (dayElement) {\n\t\t\t\t\t\tdayElement.focus();\n\n\t\t\t\t\t\t// If the user manually inputs a value into the date field and presses arrow down,\n\t\t\t\t\t\t// datepicker input onchange will be triggered when focus is removed from it and\n\t\t\t\t\t\t// `flatpickrInstance.setDate` and `flatpickrInstance.changeMonth` will be invoked\n\t\t\t\t\t\t// which will automatically change focus to the beginning of the document.\n\t\t\t\t\t\tif (document.activeElement !== dayElement && this.flatpickrInstance.selectedDateElem) {\n\t\t\t\t\t\t\tthis.flatpickrInstance.selectedDateElem.focus();\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t});\n\t\t};\n\n\t\tif (this.input && this.input.input) {\n\t\t\taddFocusCalendarListener(this.input.input.nativeElement);\n\t\t}\n\n\t\tif (this.rangeInput && this.rangeInput.input) {\n\t\t\taddFocusCalendarListener(this.rangeInput.input.nativeElement);\n\t\t}\n\t}\n\n\t/**\n\t * Resets the flatpickr instance while keeping the date values (or updating them if newDates is provided)\n\t *\n\t * Used to pick up input changes or locale changes.\n\t *\n\t * @param newDates An optional SimpleChange of date values\n\t */\n\tprotected resetFlatpickrInstance(newDates?: SimpleChange) {\n\t\tif (this.isFlatpickrLoaded()) {\n\t\t\tlet dates = this.flatpickrInstance.selectedDates;\n\t\t\tif (newDates && this.didDateValueChange(newDates.currentValue, newDates.previousValue)) {\n\t\t\t\tdates = newDates.currentValue;\n\t\t\t}\n\t\t\t// only reset the flatpickr instance on Input changes\n\t\t\t// @ts-ignore ts is unhappy with the below call to `flatpickr`\n\t\t\tthis.flatpickrInstance = flatpickr(`#${this.id}-input`, this.flatpickrOptions);\n\t\t\tthis.setDateValues(dates);\n\t\t}\n\t}\n\n\t/**\n\t * Carbon uses a number of specific classnames for parts of the flatpickr - this idempotent method applies them if needed.\n\t */\n\tprotected updateClassNames() {\n\t\tif (!this.elementRef) { return; }\n\t\t// get all the possible flatpickrs in the document - we need to add classes to (potentially) all of them\n\t\tconst calendarContainer = document.querySelectorAll(\".flatpickr-calendar\");\n\t\tconst monthContainer = document.querySelectorAll(\".flatpickr-month\");\n\t\tconst weekdaysContainer = document.querySelectorAll(\".flatpickr-weekdays\");\n\t\tconst weekdayContainer = document.querySelectorAll(\".flatpickr-weekday\");\n\t\tconst daysContainer = document.querySelectorAll(\".flatpickr-days\");\n\t\tconst dayContainer = document.querySelectorAll(\".flatpickr-day\");\n\n\t\t// add classes to lists of elements\n\t\tconst addClassIfNotExists = (classname: string, elementList: NodeListOf<Element>) => {\n\t\t\tArray.from(elementList).forEach(element => {\n\t\t\t\tif (!element.classList.contains(classname)) {\n\t\t\t\t\telement.classList.add(classname);\n\t\t\t\t}\n\t\t\t});\n\t\t};\n\n\t\t// add classes (but only if they don't exist, small perf win)\n\t\taddClassIfNotExists(\"cds--date-picker__calendar\", calendarContainer);\n\t\taddClassIfNotExists(\"cds--date-picker__month\", monthContainer);\n\t\taddClassIfNotExists(\"cds--date-picker__weekdays\", weekdaysContainer);\n\t\taddClassIfNotExists(\"cds--date-picker__days\", daysContainer);\n\n\t\t// add weekday classes and format the text\n\t\tArray.from(weekdayContainer).forEach(element => {\n\t\t\telement.innerHTML = element.innerHTML.replace(/\\s+/g, \"\");\n\t\t\telement.classList.add(\"cds--date-picker__weekday\");\n\t\t});\n\n\t\t// add day classes and special case the \"today\" element based on `this.value`\n\t\tArray.from(dayContainer).forEach(element => {\n\t\t\telement.classList.add(\"cds--date-picker__day\");\n\t\t\tif (!this.value) {\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tif (element.classList.contains(\"today\") && this.value.length > 0) {\n\t\t\t\telement.classList.add(\"no-border\");\n\t\t\t} else if (element.classList.contains(\"today\") && this.value.length === 0) {\n\t\t\t\telement.classList.remove(\"no-border\");\n\t\t\t}\n\t\t});\n\t}\n\n\tprotected updateAttributes() {\n\t\tconst calendarContainer = document.querySelectorAll(\".flatpickr-calendar\");\n\t\tArray.from(calendarContainer).forEach(calendar => {\n\t\t\tcalendar.setAttribute(\"role\", \"region\");\n\t\t\tcalendar.setAttribute(\"aria-label\", this.ariaLabel);\n\t\t});\n\t}\n\n\t/**\n\t * Applies the given date value array to both the flatpickr instance and the `input`(s)\n\t * @param dates the date values to apply\n\t */\n\tprotected setDateValues(dates: (Date | string)[]) {\n\t\tif (this.isFlatpickrLoaded()) {\n\t\t\tconst singleInput = this.elementRef.nativeElement.querySelector(`#${this.id}-input`);\n\t\t\tconst rangeInput = this.elementRef.nativeElement.querySelector(`#${this.id}-rangeInput`);\n\n\t\t\t// `flatpickrInstance.setDate` removes the focus on the selected date element and will\n\t\t\t// automatically change focus to the beginning of the document. If a selected date is\n\t\t\t// focused before `flatpickrInstance.setDate` is invoked then it should remain focused.\n\t\t\tlet shouldRefocusDateElement = this.flatpickrInstance.selectedDateElem === document.activeElement;\n\n\t\t\t// set the date on the instance\n\t\t\tthis.flatpickrInstance.setDate(dates);\n\n\t\t\tif (shouldRefocusDateElement) {\n\t\t\t\tthis.flatpickrInstance.selectedDateElem.focus();\n\t\t\t}\n\n\t\t\t// we can either set a date value or an empty string, so we start with an empty string\n\t\t\tlet singleDate = \"\";\n\t\t\t// if date is a string, parse and format\n\t\t\tif (typeof this.flatpickrInstance.selectedDates[0] === \"string\") {\n\t\t\t\tsingleDate = this.flatpickrInstance.parseDate(this.flatpickrInstance.selectedDates[0], this.dateFormat);\n\t\t\t\tsingleDate = this.flatpickrInstance.formatDate(singleDate, this.dateFormat);\n\t\t\t// if date is not a string we can assume it's a Date and we should format\n\t\t\t} else if (!!this.flatpickrInstance.selectedDates[0]) {\n\t\t\t\tsingleDate = this.flatpickrInstance.formatDate(this.flatpickrInstance.selectedDates[0], this.dateFormat);\n\t\t\t}\n\n\t\t\tif (rangeInput) {\n\t\t\t\t// we can either set a date value or an empty string, so we start with an empty string\n\t\t\t\tlet rangeDate = \"\";\n\t\t\t\t// if date is a string, parse and format\n\t\t\t\tif (typeof this.flatpickrInstance.selectedDates[1] === \"string\") {\n\t\t\t\t\trangeDate = this.flatpickrInstance.parseDate(this.flatpickrInstance.selectedDates[1].toString(), this.dateFormat);\n\t\t\t\t\trangeDate = this.flatpickrInstance.formatDate(rangeDate, this.dateFormat);\n\t\t\t\t// if date is not a string we can assume it's a Date and we should format\n\t\t\t\t} else if (!!this.flatpickrInstance.selectedDates[1]) {\n\t\t\t\t\trangeDate = this.flatpickrInstance.formatDate(this.flatpickrInstance.selectedDates[1], this.dateFormat);\n\t\t\t\t}\n\t\t\t\tsetTimeout(() => {\n\t\t\t\t\t// apply the values\n\t\t\t\t\trangeInput.value = rangeDate;\n\t\t\t\t\tsingleInput.value = singleDate;\n\t\t\t\t});\n\t\t\t}\n\t\t}\n\t}\n\n\tprotected preventCalendarClose = event => event.stopPropagation();\n\n\tprotected doSelect(selectedValue: (Date | string)[]) {\n\t\t// In range mode, if a date is selected from the first calendar that is from the previous month,\n\t\t// the month will not be updated on the calendar until the calendar is re-opened.\n\t\t// This will make sure the calendar is updated with the correct month.\n\t\tif (this.range && this.flatpickrInstance.selectedDates[0]) {\n\t\t\tconst currentMonth = this.flatpickrInstance.selectedDates[0].getMonth();\n\n\t\t\t// `flatpickrInstance.changeMonth` removes the focus on the selected date element and will\n\t\t\t// automatically change focus to the beginning of the document. If a selected date is\n\t\t\t// focused before `flatpickrInstance.changeMonth` is invoked then it should remain focused.\n\t\t\tlet shouldRefocusDateElement = this.flatpickrInstance.selectedDateElem === document.activeElement;\n\n\t\t\tthis.flatpickrInstance.changeMonth(currentMonth, false);\n\n\t\t\tif (shouldRefocusDateElement) {\n\t\t\t\tthis.flatpickrInstance.selectedDateElem.focus();\n\t\t\t}\n\n\t\t}\n\t\tthis.valueChange.emit(selectedValue);\n\t\tthis.propagateChange(selectedValue);\n\t}\n\n\tprotected didDateValueChange(currentValue, previousValue) {\n\t\treturn currentValue[0] !== previousValue[0] || currentValue[1] !== previousValue[1];\n\t}\n\n\t/**\n\t * More advanced checking of the loaded state of flatpickr\n\t */\n\tprotected isFlatpickrLoaded() {\n\t\t// cast the instance to a boolean, and some method that has to exist for the library to be loaded in this case `setDate`\n\t\treturn !!this.flatpickrInstance && !!this.flatpickrInstance.setDate;\n\t}\n\n\t/**\n\t * Right arrow HTML passed to flatpickr\n\t */\n\tprotected rightArrowHTML() {\n\t\treturn `\n\t\t\t<svg width=\"16px\" height=\"16px\" viewBox=\"0 0 16 16\">\n\t\t\t\t<polygon points=\"11,8 6,13 5.3,12.3 9.6,8 5.3,3.7 6,3 \"/>\n\t\t\t\t<rect width=\"16\" height=\"16\" style=\"fill:none\" />\n\t\t\t</svg>`;\n\t}\n\n\t/**\n\t * Left arrow HTML passed to flatpickr\n\t */\n\tprotected leftArrowHTML() {\n\t\treturn `\n\t\t\t<svg width=\"16px\" height=\"16px\" viewBox=\"0 0 16 16\">\n\t\t\t\t<polygon points=\"5,8 10,3 10.7,3.7 6.4,8 10.7,12.3 10,13 \"/>\n\t\t\t\t<rect width=\"16\" height=\"16\" style=\"fill:none\" />\n\t\t\t</svg>`;\n\t}\n}\n",
|
|
26078
26078
|
"assetsDirs": [],
|
|
26079
26079
|
"styleUrlsData": "",
|
|
26080
26080
|
"stylesData": "",
|
|
@@ -36664,7 +36664,7 @@
|
|
|
36664
36664
|
},
|
|
36665
36665
|
{
|
|
36666
36666
|
"name": "Notification",
|
|
36667
|
-
"id": "component-Notification-
|
|
36667
|
+
"id": "component-Notification-954b6bd2010556ddca9849bd2d2c31fc4dae8f63a7b6d970ce5063dcea8f018a8b9a6592d6df4aa7a2a004174cac08bbc92389a288e88e002161b69f8c794101",
|
|
36668
36668
|
"file": "src/notification/notification.component.ts",
|
|
36669
36669
|
"encapsulation": [],
|
|
36670
36670
|
"entryComponents": [],
|
|
@@ -36954,7 +36954,7 @@
|
|
|
36954
36954
|
"description": "<p>Notification messages are displayed toward the top of the UI and do not interrupt user’s work.</p>\n<p><a href=\"../../?path=/story/components-notification--basic\">See demo</a></p>\n",
|
|
36955
36955
|
"rawdescription": "\n\nNotification messages are displayed toward the top of the UI and do not interrupt user’s work.\n\n[See demo](../../?path=/story/components-notification--basic)\n",
|
|
36956
36956
|
"type": "component",
|
|
36957
|
-
"sourceCode": "import {\n\tComponent,\n\tInput,\n\tHostBinding\n} from \"@angular/core\";\n\nimport { NotificationContent } from \"./notification-content.interface\";\nimport { I18n } from \"carbon-components-angular/i18n\";\nimport { NotificationDisplayService } from \"./notification-display.service\";\nimport { of } from \"rxjs\";\nimport { BaseNotification } from \"./base-notification.component\";\n\n/**\n * Notification messages are displayed toward the top of the UI and do not interrupt user’s work.\n *\n * [See demo](../../?path=/story/components-notification--basic)\n */\n@Component({\n\tselector: \"cds-notification, cds-inline-notification, ibm-notification, ibm-inline-notification\",\n\ttemplate: `\n\t\t<div class=\"cds--inline-notification__details\">\n\t\t\t<svg\n\t\t\t\t[cdsIcon]=\"iconDictionary[notificationObj.type]\"\n\t\t\t\tsize=\"20\"\n\t\t\t\t*ngIf=\"notificationObj.type\"\n\t\t\t\tclass=\"cds--inline-notification__icon\">\n\t\t\t</svg>\n\t\t\t<div class=\"cds--inline-notification__text-wrapper\">\n\t\t\t\t<div *ngIf=\"!notificationObj.template\" cdsNotificationTitle [innerHTML]=\"notificationObj.title\"></div>\n\t\t\t\t<div *ngIf=\"!notificationObj.template\" cdsNotificationSubtitle>\n\t\t\t\t\t<span [innerHTML]=\"notificationObj.message\"></span>\n\t\t\t\t</div>\n\t\t\t\t<ng-container *ngTemplateOutlet=\"notificationObj.template; context: { $implicit: notificationObj}\"></ng-container>\n\t\t\t</div>\n\t\t</div>\n\t\t<button\n\t\t\t*ngIf=\"!isCloseHidden\"\n\t\t\t(click)=\"onClose()\"\n\t\t\tclass=\"cds--inline-notification__close-button\"\n\t\t\t[attr.aria-label]=\"notificationObj.closeLabel | async\"\n\t\t\ttype=\"button\">\n\t\t\t<svg cdsIcon=\"close\" size=\"16\" class=\"cds--inline-notification__close-icon\"></svg>\n\t\t</button>\n\t`\n})\nexport class Notification extends BaseNotification {\n\tprivate static notificationCount = 0;\n\t/**\n\t * Can have `type`, `title`, and `message` members.\n\t *\n\t * `type` can be one of `\"error\"`, `\"info\"`, `\"info-square\"`, `\"warning\"`, `\"warning-alt\"`, or `\"success\"`\n\t *\n\t * `message` is the message to display\n\t */\n\t@Input() get notificationObj(): NotificationContent {\n\t\treturn this._notificationObj;\n\t}\n\tset notificationObj(obj: NotificationContent) {\n\t\tif (obj.closeLabel) {\n\t\t\tobj.closeLabel = of(obj.closeLabel);\n\t\t}\n\t\tthis._notificationObj = Object.assign({}, this.defaultNotificationObj, obj);\n\t}\n\n\t@HostBinding(\"attr.id\") notificationID = `notification-${Notification.notificationCount++}`;\n\t@HostBinding(\"class.cds--inline-notification\") notificationClass = true;\n\t@HostBinding(\"class.cds--inline-notification--error\") get isError() { return this.notificationObj.type === \"error\"; }\n\t@HostBinding(\"class.cds--inline-notification--info\") get isInfo() { return this.notificationObj.type === \"info\"; }\n\t@HostBinding(\"class.cds--inline-notification--info-square\") get isInfoSquare() { return this.notificationObj.type === \"info-square\"; }\n\t@HostBinding(\"class.cds--inline-notification--success\") get isSuccess() { return this.notificationObj.type === \"success\"; }\n\t@HostBinding(\"class.cds--inline-notification--warning\") get isWarning() { return this.notificationObj.type === \"warning\"; }\n\t@HostBinding(\"class.cds--inline-notification--warning-alt\") get isWarningAlt() { return this.notificationObj.type === \"warning-alt\"; }\n\t@HostBinding(\"class.cds--inline-notification--low-contrast\") get isLowContrast() { return this.notificationObj.lowContrast; }\n\t@HostBinding(\"class.cds--inline-notification--hide-close-button\") get isCloseHidden() { return !this.notificationObj.showClose; }\n\n\tconstructor(protected notificationDisplayService: NotificationDisplayService, protected i18n: I18n) {\n\t\tsuper(notificationDisplayService, i18n);\n\t}\n}\n",
|
|
36957
|
+
"sourceCode": "import {\n\tComponent,\n\tInput,\n\tHostBinding\n} from \"@angular/core\";\n\nimport { NotificationContent } from \"./notification-content.interface\";\nimport { I18n } from \"carbon-components-angular/i18n\";\nimport { NotificationDisplayService } from \"./notification-display.service\";\nimport { isObservable, of } from \"rxjs\";\nimport { BaseNotification } from \"./base-notification.component\";\n\n/**\n * Notification messages are displayed toward the top of the UI and do not interrupt user’s work.\n *\n * [See demo](../../?path=/story/components-notification--basic)\n */\n@Component({\n\tselector: \"cds-notification, cds-inline-notification, ibm-notification, ibm-inline-notification\",\n\ttemplate: `\n\t\t<div class=\"cds--inline-notification__details\">\n\t\t\t<svg\n\t\t\t\t[cdsIcon]=\"iconDictionary[notificationObj.type]\"\n\t\t\t\tsize=\"20\"\n\t\t\t\t*ngIf=\"notificationObj.type\"\n\t\t\t\tclass=\"cds--inline-notification__icon\">\n\t\t\t</svg>\n\t\t\t<div class=\"cds--inline-notification__text-wrapper\">\n\t\t\t\t<div *ngIf=\"!notificationObj.template\" cdsNotificationTitle [innerHTML]=\"notificationObj.title\"></div>\n\t\t\t\t<div *ngIf=\"!notificationObj.template\" cdsNotificationSubtitle>\n\t\t\t\t\t<span [innerHTML]=\"notificationObj.message\"></span>\n\t\t\t\t</div>\n\t\t\t\t<ng-container *ngTemplateOutlet=\"notificationObj.template; context: { $implicit: notificationObj}\"></ng-container>\n\t\t\t</div>\n\t\t</div>\n\t\t<button\n\t\t\t*ngIf=\"!isCloseHidden\"\n\t\t\t(click)=\"onClose()\"\n\t\t\tclass=\"cds--inline-notification__close-button\"\n\t\t\t[attr.aria-label]=\"notificationObj.closeLabel | async\"\n\t\t\ttype=\"button\">\n\t\t\t<svg cdsIcon=\"close\" size=\"16\" class=\"cds--inline-notification__close-icon\"></svg>\n\t\t</button>\n\t`\n})\nexport class Notification extends BaseNotification {\n\tprivate static notificationCount = 0;\n\t/**\n\t * Can have `type`, `title`, and `message` members.\n\t *\n\t * `type` can be one of `\"error\"`, `\"info\"`, `\"info-square\"`, `\"warning\"`, `\"warning-alt\"`, or `\"success\"`\n\t *\n\t * `message` is the message to display\n\t */\n\t@Input() get notificationObj(): NotificationContent {\n\t\treturn this._notificationObj;\n\t}\n\tset notificationObj(obj: NotificationContent) {\n\t\tif (obj.closeLabel && !isObservable(obj.closeLabel)) {\n\t\t\tobj.closeLabel = of(obj.closeLabel);\n\t\t}\n\t\tthis._notificationObj = Object.assign({}, this.defaultNotificationObj, obj);\n\t}\n\n\t@HostBinding(\"attr.id\") notificationID = `notification-${Notification.notificationCount++}`;\n\t@HostBinding(\"class.cds--inline-notification\") notificationClass = true;\n\t@HostBinding(\"class.cds--inline-notification--error\") get isError() { return this.notificationObj.type === \"error\"; }\n\t@HostBinding(\"class.cds--inline-notification--info\") get isInfo() { return this.notificationObj.type === \"info\"; }\n\t@HostBinding(\"class.cds--inline-notification--info-square\") get isInfoSquare() { return this.notificationObj.type === \"info-square\"; }\n\t@HostBinding(\"class.cds--inline-notification--success\") get isSuccess() { return this.notificationObj.type === \"success\"; }\n\t@HostBinding(\"class.cds--inline-notification--warning\") get isWarning() { return this.notificationObj.type === \"warning\"; }\n\t@HostBinding(\"class.cds--inline-notification--warning-alt\") get isWarningAlt() { return this.notificationObj.type === \"warning-alt\"; }\n\t@HostBinding(\"class.cds--inline-notification--low-contrast\") get isLowContrast() { return this.notificationObj.lowContrast; }\n\t@HostBinding(\"class.cds--inline-notification--hide-close-button\") get isCloseHidden() { return !this.notificationObj.showClose; }\n\n\tconstructor(protected notificationDisplayService: NotificationDisplayService, protected i18n: I18n) {\n\t\tsuper(notificationDisplayService, i18n);\n\t}\n}\n",
|
|
36958
36958
|
"assetsDirs": [],
|
|
36959
36959
|
"styleUrlsData": "",
|
|
36960
36960
|
"stylesData": "",
|
|
@@ -54796,7 +54796,7 @@
|
|
|
54796
54796
|
},
|
|
54797
54797
|
{
|
|
54798
54798
|
"name": "TableHead",
|
|
54799
|
-
"id": "component-TableHead-
|
|
54799
|
+
"id": "component-TableHead-2d68f7b9140d6b32f7f6cf1233835b396303e5a0283e237c8dc738c2262fafb8471a7499ed5c748c6c3b9942511775108a574ef38bbcb582b73fb3da583576b5",
|
|
54800
54800
|
"file": "src/table/head/table-head.component.ts",
|
|
54801
54801
|
"encapsulation": [],
|
|
54802
54802
|
"entryComponents": [],
|
|
@@ -54808,7 +54808,7 @@
|
|
|
54808
54808
|
"styles": [
|
|
54809
54809
|
"\n\t\t.cds--table-expand-v2 {\n\t\t\tpadding-left: 2.5rem;\n\t\t}\n\t"
|
|
54810
54810
|
],
|
|
54811
|
-
"template": "<ng-container *ngIf=\"model\">\n\t<tr>\n\t\t<th\n\t\t\tcdsTableHeadExpand\n\t\t\t*ngIf=\"model.hasExpandableRows()\"\n\t\t\tscope=\"col\"\n\t\t\t[ngClass]=\"{'cds--table-expand-v2': stickyHeader}\"\n\t\t\t[id]=\"model.getId('expand')\">\n\t\t</th>\n\t\t<th\n\t\t\t*ngIf=\"!skeleton && showSelectionColumn && enableSingleSelect\"\n\t\t\tscope=\"col\"\n\t\t\
|
|
54811
|
+
"template": "<ng-container *ngIf=\"model\">\n\t<tr>\n\t\t<th\n\t\t\tcdsTableHeadExpand\n\t\t\t*ngIf=\"model.hasExpandableRows()\"\n\t\t\tscope=\"col\"\n\t\t\t[ngClass]=\"{'cds--table-expand-v2': stickyHeader}\"\n\t\t\t[id]=\"model.getId('expand')\">\n\t\t</th>\n\t\t<th\n\t\t\t*ngIf=\"!skeleton && showSelectionColumn && enableSingleSelect\"\n\t\t\tscope=\"col\"\n\t\t\t[id]=\"model.getId('select')\">\n\t\t\t<!-- add width 0; since the carbon styles don't seem to constrain this headers width -->\n\t\t</th>\n\t\t<th\n\t\t\tcdsTableHeadCheckbox\n\t\t\t*ngIf=\"!skeleton && showSelectionColumn && !enableSingleSelect\"\n\t\t\tscope=\"col\"\n\t\t\t[checked]=\"selectAllCheckbox\"\n\t\t\t[indeterminate]=\"selectAllCheckboxSomeSelected\"\n\t\t\t[ariaLabel]=\"getCheckboxHeaderLabel()\"\n\t\t\t[skeleton]=\"skeleton\"\n\t\t\t[name]=\"model.getHeaderId('select')\"\n\t\t\t(change)=\"onSelectAllCheckboxChange()\"\n\t\t\t[id]=\"model.getId('select')\">\n\t\t</th>\n\t\t<ng-container *ngFor=\"let column of model.header; let i = index\">\n\t\t\t<th\n\t\t\t\t*ngIf=\"column && column.visible\"\n\t\t\t\t[ngStyle]=\"column.style\"\n\t\t\t\tcdsTableHeadCell\n\t\t\t\tscope=\"col\"\n\t\t\t\t[class]=\"column.className\"\n\t\t\t\t[sortable]=\"sortable\"\n\t\t\t\t[skeleton]=\"skeleton\"\n\t\t\t\t[id]=\"model.getId(i)\"\n\t\t\t\t[column]=\"column\"\n\t\t\t\t[filterTitle]=\"getFilterTitle()\"\n\t\t\t\t[attr.colspan]=\"column.colSpan\"\n\t\t\t\t[attr.rowspan]=\"column.rowSpan\"\n\t\t\t\t(sort)=\"sort.emit(i)\">\n\t\t\t</th>\n\t\t</ng-container>\n\t\t<th *ngIf=\"!skeleton && stickyHeader && scrollbarWidth\"\n\t\t\tscope=\"col\"\n\t\t\t[ngStyle]=\"{'width': scrollbarWidth + 'px', 'padding': 0, 'border': 0}\">\n\t\t\t<!--\n\t\t\t\tScrollbar pushes body to the left so this header column is added to push\n\t\t\t\tthe title bar the same amount and keep the header and body columns aligned.\n\t\t\t-->\n\t\t</th>\n\t</tr>\n</ng-container>\n<ng-content></ng-content>\n",
|
|
54812
54812
|
"templateUrl": [],
|
|
54813
54813
|
"viewProviders": [],
|
|
54814
54814
|
"hostDirectives": [],
|
|
@@ -54817,7 +54817,7 @@
|
|
|
54817
54817
|
"name": "checkboxHeaderLabel",
|
|
54818
54818
|
"deprecated": false,
|
|
54819
54819
|
"deprecationMessage": "",
|
|
54820
|
-
"line":
|
|
54820
|
+
"line": 112,
|
|
54821
54821
|
"type": "string | Observable",
|
|
54822
54822
|
"decorators": []
|
|
54823
54823
|
},
|
|
@@ -54826,7 +54826,7 @@
|
|
|
54826
54826
|
"defaultValue": "false",
|
|
54827
54827
|
"deprecated": false,
|
|
54828
54828
|
"deprecationMessage": "",
|
|
54829
|
-
"line":
|
|
54829
|
+
"line": 95,
|
|
54830
54830
|
"type": "boolean",
|
|
54831
54831
|
"decorators": []
|
|
54832
54832
|
},
|
|
@@ -54834,7 +54834,7 @@
|
|
|
54834
54834
|
"name": "filterTitle",
|
|
54835
54835
|
"deprecated": false,
|
|
54836
54836
|
"deprecationMessage": "",
|
|
54837
|
-
"line":
|
|
54837
|
+
"line": 139,
|
|
54838
54838
|
"type": "string | Observable",
|
|
54839
54839
|
"decorators": []
|
|
54840
54840
|
},
|
|
@@ -54842,7 +54842,7 @@
|
|
|
54842
54842
|
"name": "model",
|
|
54843
54843
|
"deprecated": false,
|
|
54844
54844
|
"deprecationMessage": "",
|
|
54845
|
-
"line":
|
|
54845
|
+
"line": 91,
|
|
54846
54846
|
"type": "TableModel",
|
|
54847
54847
|
"decorators": []
|
|
54848
54848
|
},
|
|
@@ -54851,7 +54851,7 @@
|
|
|
54851
54851
|
"defaultValue": "false",
|
|
54852
54852
|
"deprecated": false,
|
|
54853
54853
|
"deprecationMessage": "",
|
|
54854
|
-
"line":
|
|
54854
|
+
"line": 99,
|
|
54855
54855
|
"type": "boolean",
|
|
54856
54856
|
"decorators": []
|
|
54857
54857
|
},
|
|
@@ -54860,7 +54860,7 @@
|
|
|
54860
54860
|
"defaultValue": "false",
|
|
54861
54861
|
"deprecated": false,
|
|
54862
54862
|
"deprecationMessage": "",
|
|
54863
|
-
"line":
|
|
54863
|
+
"line": 97,
|
|
54864
54864
|
"type": "boolean",
|
|
54865
54865
|
"decorators": []
|
|
54866
54866
|
},
|
|
@@ -54869,7 +54869,7 @@
|
|
|
54869
54869
|
"defaultValue": "true",
|
|
54870
54870
|
"deprecated": false,
|
|
54871
54871
|
"deprecationMessage": "",
|
|
54872
|
-
"line":
|
|
54872
|
+
"line": 93,
|
|
54873
54873
|
"type": "boolean",
|
|
54874
54874
|
"decorators": []
|
|
54875
54875
|
},
|
|
@@ -54878,7 +54878,7 @@
|
|
|
54878
54878
|
"defaultValue": "false",
|
|
54879
54879
|
"deprecated": false,
|
|
54880
54880
|
"deprecationMessage": "",
|
|
54881
|
-
"line":
|
|
54881
|
+
"line": 101,
|
|
54882
54882
|
"type": "boolean",
|
|
54883
54883
|
"decorators": []
|
|
54884
54884
|
},
|
|
@@ -54889,7 +54889,7 @@
|
|
|
54889
54889
|
"deprecationMessage": "",
|
|
54890
54890
|
"rawdescription": "\n\nSetting sortable to false will disable all headers including headers which are sortable. Is is\npossible to set the sortable state on the header item to disable/enable sorting for only some headers.\n",
|
|
54891
54891
|
"description": "<p>Setting sortable to false will disable all headers including headers which are sortable. Is is\npossible to set the sortable state on the header item to disable/enable sorting for only some headers.</p>\n",
|
|
54892
|
-
"line":
|
|
54892
|
+
"line": 109,
|
|
54893
54893
|
"type": "boolean",
|
|
54894
54894
|
"decorators": []
|
|
54895
54895
|
},
|
|
@@ -54897,7 +54897,7 @@
|
|
|
54897
54897
|
"name": "sortAscendingLabel",
|
|
54898
54898
|
"deprecated": false,
|
|
54899
54899
|
"deprecationMessage": "",
|
|
54900
|
-
"line":
|
|
54900
|
+
"line": 130,
|
|
54901
54901
|
"type": "string | Observable",
|
|
54902
54902
|
"decorators": []
|
|
54903
54903
|
},
|
|
@@ -54905,7 +54905,7 @@
|
|
|
54905
54905
|
"name": "sortDescendingLabel",
|
|
54906
54906
|
"deprecated": false,
|
|
54907
54907
|
"deprecationMessage": "",
|
|
54908
|
-
"line":
|
|
54908
|
+
"line": 121,
|
|
54909
54909
|
"type": "string | Observable",
|
|
54910
54910
|
"decorators": []
|
|
54911
54911
|
},
|
|
@@ -54914,7 +54914,7 @@
|
|
|
54914
54914
|
"defaultValue": "false",
|
|
54915
54915
|
"deprecated": false,
|
|
54916
54916
|
"deprecationMessage": "",
|
|
54917
|
-
"line":
|
|
54917
|
+
"line": 103,
|
|
54918
54918
|
"type": "boolean",
|
|
54919
54919
|
"decorators": []
|
|
54920
54920
|
}
|
|
@@ -54929,15 +54929,15 @@
|
|
|
54929
54929
|
"description": "<p>Emits if all rows are deselected.</p>\n",
|
|
54930
54930
|
"jsdoctags": [
|
|
54931
54931
|
{
|
|
54932
|
-
"pos":
|
|
54933
|
-
"end":
|
|
54932
|
+
"pos": 4026,
|
|
54933
|
+
"end": 4041,
|
|
54934
54934
|
"flags": 8421376,
|
|
54935
54935
|
"modifierFlagsCache": 0,
|
|
54936
54936
|
"transformFlags": 0,
|
|
54937
54937
|
"kind": 344,
|
|
54938
54938
|
"tagName": {
|
|
54939
|
-
"pos":
|
|
54940
|
-
"end":
|
|
54939
|
+
"pos": 4027,
|
|
54940
|
+
"end": 4032,
|
|
54941
54941
|
"flags": 8421376,
|
|
54942
54942
|
"modifierFlagsCache": 0,
|
|
54943
54943
|
"transformFlags": 0,
|
|
@@ -54946,8 +54946,8 @@
|
|
|
54946
54946
|
},
|
|
54947
54947
|
"comment": "",
|
|
54948
54948
|
"name": {
|
|
54949
|
-
"pos":
|
|
54950
|
-
"end":
|
|
54949
|
+
"pos": 4033,
|
|
54950
|
+
"end": 4038,
|
|
54951
54951
|
"flags": 8421376,
|
|
54952
54952
|
"modifierFlagsCache": 0,
|
|
54953
54953
|
"transformFlags": 0,
|
|
@@ -54958,7 +54958,7 @@
|
|
|
54958
54958
|
"isBracketed": false
|
|
54959
54959
|
}
|
|
54960
54960
|
],
|
|
54961
|
-
"line":
|
|
54961
|
+
"line": 162,
|
|
54962
54962
|
"type": "EventEmitter"
|
|
54963
54963
|
},
|
|
54964
54964
|
{
|
|
@@ -54970,15 +54970,15 @@
|
|
|
54970
54970
|
"description": "<p>Emits if all rows are selected.</p>\n",
|
|
54971
54971
|
"jsdoctags": [
|
|
54972
54972
|
{
|
|
54973
|
-
"pos":
|
|
54974
|
-
"end":
|
|
54973
|
+
"pos": 3902,
|
|
54974
|
+
"end": 3917,
|
|
54975
54975
|
"flags": 8421376,
|
|
54976
54976
|
"modifierFlagsCache": 0,
|
|
54977
54977
|
"transformFlags": 0,
|
|
54978
54978
|
"kind": 344,
|
|
54979
54979
|
"tagName": {
|
|
54980
|
-
"pos":
|
|
54981
|
-
"end":
|
|
54980
|
+
"pos": 3903,
|
|
54981
|
+
"end": 3908,
|
|
54982
54982
|
"flags": 8421376,
|
|
54983
54983
|
"modifierFlagsCache": 0,
|
|
54984
54984
|
"transformFlags": 0,
|
|
@@ -54987,8 +54987,8 @@
|
|
|
54987
54987
|
},
|
|
54988
54988
|
"comment": "",
|
|
54989
54989
|
"name": {
|
|
54990
|
-
"pos":
|
|
54991
|
-
"end":
|
|
54990
|
+
"pos": 3909,
|
|
54991
|
+
"end": 3914,
|
|
54992
54992
|
"flags": 8421376,
|
|
54993
54993
|
"modifierFlagsCache": 0,
|
|
54994
54994
|
"transformFlags": 0,
|
|
@@ -54999,7 +54999,7 @@
|
|
|
54999
54999
|
"isBracketed": false
|
|
55000
55000
|
}
|
|
55001
55001
|
],
|
|
55002
|
-
"line":
|
|
55002
|
+
"line": 156,
|
|
55003
55003
|
"type": "EventEmitter"
|
|
55004
55004
|
},
|
|
55005
55005
|
{
|
|
@@ -55009,7 +55009,7 @@
|
|
|
55009
55009
|
"deprecationMessage": "",
|
|
55010
55010
|
"rawdescription": "\n\nEmits an index of the column that wants to be sorted.\n",
|
|
55011
55011
|
"description": "<p>Emits an index of the column that wants to be sorted.</p>\n",
|
|
55012
|
-
"line":
|
|
55012
|
+
"line": 150,
|
|
55013
55013
|
"type": "EventEmitter"
|
|
55014
55014
|
}
|
|
55015
55015
|
],
|
|
@@ -55022,7 +55022,7 @@
|
|
|
55022
55022
|
"type": "number",
|
|
55023
55023
|
"optional": false,
|
|
55024
55024
|
"description": "",
|
|
55025
|
-
"line":
|
|
55025
|
+
"line": 164,
|
|
55026
55026
|
"modifierKind": [
|
|
55027
55027
|
123
|
|
55028
55028
|
]
|
|
@@ -55035,7 +55035,7 @@
|
|
|
55035
55035
|
"optional": false,
|
|
55036
55036
|
"returnType": "Observable<string>",
|
|
55037
55037
|
"typeParameters": [],
|
|
55038
|
-
"line":
|
|
55038
|
+
"line": 187,
|
|
55039
55039
|
"deprecated": false,
|
|
55040
55040
|
"deprecationMessage": ""
|
|
55041
55041
|
},
|
|
@@ -55045,7 +55045,7 @@
|
|
|
55045
55045
|
"optional": false,
|
|
55046
55046
|
"returnType": "Observable<string>",
|
|
55047
55047
|
"typeParameters": [],
|
|
55048
|
-
"line":
|
|
55048
|
+
"line": 199,
|
|
55049
55049
|
"deprecated": false,
|
|
55050
55050
|
"deprecationMessage": ""
|
|
55051
55051
|
},
|
|
@@ -55055,7 +55055,7 @@
|
|
|
55055
55055
|
"optional": false,
|
|
55056
55056
|
"returnType": "Observable<string>",
|
|
55057
55057
|
"typeParameters": [],
|
|
55058
|
-
"line":
|
|
55058
|
+
"line": 195,
|
|
55059
55059
|
"deprecated": false,
|
|
55060
55060
|
"deprecationMessage": ""
|
|
55061
55061
|
},
|
|
@@ -55065,7 +55065,7 @@
|
|
|
55065
55065
|
"optional": false,
|
|
55066
55066
|
"returnType": "Observable<string>",
|
|
55067
55067
|
"typeParameters": [],
|
|
55068
|
-
"line":
|
|
55068
|
+
"line": 191,
|
|
55069
55069
|
"deprecated": false,
|
|
55070
55070
|
"deprecationMessage": ""
|
|
55071
55071
|
},
|
|
@@ -55075,7 +55075,7 @@
|
|
|
55075
55075
|
"optional": false,
|
|
55076
55076
|
"returnType": "void",
|
|
55077
55077
|
"typeParameters": [],
|
|
55078
|
-
"line":
|
|
55078
|
+
"line": 179,
|
|
55079
55079
|
"deprecated": false,
|
|
55080
55080
|
"deprecationMessage": ""
|
|
55081
55081
|
}
|
|
@@ -55089,7 +55089,7 @@
|
|
|
55089
55089
|
"description": "<p>A subcomponent that creates the thead of the table</p>\n<h2>Basic usage</h2>\n<div><pre class=\"line-numbers\"><code class=\"language-html\"> <thead cdsTableHead [model]="model"></thead></code></pre></div>",
|
|
55090
55090
|
"rawdescription": "\n\nA subcomponent that creates the thead of the table\n\n## Basic usage\n\n```html\n\t<thead cdsTableHead [model]=\"model\"></thead>\n```\n",
|
|
55091
55091
|
"type": "component",
|
|
55092
|
-
"sourceCode": "import {\n\tComponent,\n\tInput,\n\tOutput,\n\tEventEmitter,\n\tAfterViewInit\n} from \"@angular/core\";\n\nimport { TableModel } from \"../table-model.class\";\nimport { getScrollbarWidth } from \"carbon-components-angular/utils\";\nimport { I18n, Overridable } from \"carbon-components-angular/i18n\";\nimport { Observable } from \"rxjs\";\nimport { TableRowSize } from \"../table.types\";\n\n/**\n * A subcomponent that creates the thead of the table\n *\n * ## Basic usage\n *\n * ```html\n * \t<thead cdsTableHead [model]=\"model\"></thead>\n * ```\n */\n@Component({\n\t// tslint:disable-next-line:component-selector\n\tselector: \"[cdsTableHead], [ibmTableHead]\",\n\ttemplate: `\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\
|
|
55092
|
+
"sourceCode": "import {\n\tComponent,\n\tInput,\n\tOutput,\n\tEventEmitter,\n\tAfterViewInit\n} from \"@angular/core\";\n\nimport { TableModel } from \"../table-model.class\";\nimport { getScrollbarWidth } from \"carbon-components-angular/utils\";\nimport { I18n, Overridable } from \"carbon-components-angular/i18n\";\nimport { Observable } from \"rxjs\";\nimport { TableRowSize } from \"../table.types\";\n\n/**\n * A subcomponent that creates the thead of the table\n *\n * ## Basic usage\n *\n * ```html\n * \t<thead cdsTableHead [model]=\"model\"></thead>\n * ```\n */\n@Component({\n\t// tslint:disable-next-line:component-selector\n\tselector: \"[cdsTableHead], [ibmTableHead]\",\n\ttemplate: `\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\t[id]=\"model.getId('select')\">\n\t\t\t\t<!-- add width 0; since the carbon styles don't seem to constrain this headers width -->\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<!--\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-->\n\t\t\t</th>\n\t\t</tr>\n\t</ng-container>\n\t<ng-content></ng-content>\n\t`,\n\tstyles: [`\n\t\t.cds--table-expand-v2 {\n\t\t\tpadding-left: 2.5rem;\n\t\t}\n\t`]\n})\nexport class TableHead implements AfterViewInit {\n\t@Input() model: TableModel;\n\n\t@Input() showSelectionColumn = true;\n\n\t@Input() enableSingleSelect = false;\n\n\t@Input() selectAllCheckboxSomeSelected = false;\n\n\t@Input() selectAllCheckbox = false;\n\n\t@Input() skeleton = false;\n\n\t@Input() stickyHeader = false;\n\n\t/**\n\t * Setting sortable to false will disable all headers including headers which are sortable. Is is\n\t * possible to set the sortable state on the header item to disable/enable sorting for only some headers.\n\t */\n\t@Input() sortable = true;\n\n\t@Input()\n\tset checkboxHeaderLabel(value: string | Observable<string>) {\n\t\tthis._checkboxHeaderLabel.override(value);\n\t}\n\n\tget checkboxHeaderLabel() {\n\t\treturn this._checkboxHeaderLabel.value;\n\t}\n\n\t@Input()\n\tset sortDescendingLabel(value: string | Observable<string>) {\n\t\tthis._sortDescendingLabel.override(value);\n\t}\n\n\tget sortDescendingLabel() {\n\t\treturn this._sortDescendingLabel.value;\n\t}\n\n\t@Input()\n\tset sortAscendingLabel(value: string | Observable<string>) {\n\t\tthis._sortAscendingLabel.override(value);\n\t}\n\n\tget sortAscendingLabel() {\n\t\treturn this._sortAscendingLabel.value;\n\t}\n\n\t@Input()\n\tset filterTitle(value: string | Observable<string>) {\n\t\tthis._filterTitle.override(value);\n\t}\n\n\tget filterTitle() {\n\t\treturn this._filterTitle.value;\n\t}\n\n\t/**\n\t * Emits an index of the column that wants to be sorted.\n\t */\n\t@Output() sort = new EventEmitter<number>();\n\t/**\n\t * Emits if all rows are selected.\n\t *\n\t * @param model\n\t */\n\t@Output() selectAll = new EventEmitter<TableModel>();\n\t/**\n\t * Emits if all rows are deselected.\n\t *\n\t * @param model\n\t */\n\t@Output() deselectAll = new EventEmitter<TableModel>();\n\n\tpublic scrollbarWidth = 0;\n\n\tprotected _checkboxHeaderLabel = this.i18n.getOverridable(\"TABLE.CHECKBOX_HEADER\");\n\tprotected _sortDescendingLabel = this.i18n.getOverridable(\"TABLE.SORT_DESCENDING\");\n\tprotected _sortAscendingLabel = this.i18n.getOverridable(\"TABLE.SORT_ASCENDING\");\n\tprotected _filterTitle = this.i18n.getOverridable(\"TABLE.FILTER\");\n\n\tconstructor(protected i18n: I18n) {}\n\n\tngAfterViewInit() {\n\t\tsetTimeout(() => {\n\t\t\tthis.scrollbarWidth = getScrollbarWidth();\n\t\t});\n\t}\n\n\tonSelectAllCheckboxChange() {\n\t\tif (!this.selectAllCheckbox && !this.selectAllCheckboxSomeSelected) {\n\t\t\tthis.selectAll.emit(this.model);\n\t\t} else {\n\t\t\tthis.deselectAll.emit(this.model);\n\t\t}\n\t}\n\n\tgetCheckboxHeaderLabel(): Observable<string> {\n\t\treturn this._checkboxHeaderLabel.subject;\n\t}\n\n\tgetSortDescendingLabel(): Observable<string> {\n\t\treturn this._sortDescendingLabel.subject;\n\t}\n\n\tgetSortAscendingLabel(): Observable<string> {\n\t\treturn this._sortAscendingLabel.subject;\n\t}\n\n\tgetFilterTitle(): Observable<string> {\n\t\treturn this._filterTitle.subject;\n\t}\n}\n",
|
|
55093
55093
|
"assetsDirs": [],
|
|
55094
55094
|
"styleUrlsData": "",
|
|
55095
55095
|
"stylesData": "\n\t\t.cds--table-expand-v2 {\n\t\t\tpadding-left: 2.5rem;\n\t\t}\n\t\n",
|
|
@@ -55106,7 +55106,7 @@
|
|
|
55106
55106
|
"deprecationMessage": ""
|
|
55107
55107
|
}
|
|
55108
55108
|
],
|
|
55109
|
-
"line":
|
|
55109
|
+
"line": 169,
|
|
55110
55110
|
"jsdoctags": [
|
|
55111
55111
|
{
|
|
55112
55112
|
"name": "i18n",
|
|
@@ -55139,7 +55139,7 @@
|
|
|
55139
55139
|
}
|
|
55140
55140
|
],
|
|
55141
55141
|
"returnType": "void",
|
|
55142
|
-
"line":
|
|
55142
|
+
"line": 112,
|
|
55143
55143
|
"jsdoctags": [
|
|
55144
55144
|
{
|
|
55145
55145
|
"name": "value",
|
|
@@ -55156,7 +55156,7 @@
|
|
|
55156
55156
|
"name": "checkboxHeaderLabel",
|
|
55157
55157
|
"type": "",
|
|
55158
55158
|
"returnType": "",
|
|
55159
|
-
"line":
|
|
55159
|
+
"line": 116
|
|
55160
55160
|
}
|
|
55161
55161
|
},
|
|
55162
55162
|
"sortDescendingLabel": {
|
|
@@ -55175,7 +55175,7 @@
|
|
|
55175
55175
|
}
|
|
55176
55176
|
],
|
|
55177
55177
|
"returnType": "void",
|
|
55178
|
-
"line":
|
|
55178
|
+
"line": 121,
|
|
55179
55179
|
"jsdoctags": [
|
|
55180
55180
|
{
|
|
55181
55181
|
"name": "value",
|
|
@@ -55192,7 +55192,7 @@
|
|
|
55192
55192
|
"name": "sortDescendingLabel",
|
|
55193
55193
|
"type": "",
|
|
55194
55194
|
"returnType": "",
|
|
55195
|
-
"line":
|
|
55195
|
+
"line": 125
|
|
55196
55196
|
}
|
|
55197
55197
|
},
|
|
55198
55198
|
"sortAscendingLabel": {
|
|
@@ -55211,7 +55211,7 @@
|
|
|
55211
55211
|
}
|
|
55212
55212
|
],
|
|
55213
55213
|
"returnType": "void",
|
|
55214
|
-
"line":
|
|
55214
|
+
"line": 130,
|
|
55215
55215
|
"jsdoctags": [
|
|
55216
55216
|
{
|
|
55217
55217
|
"name": "value",
|
|
@@ -55228,7 +55228,7 @@
|
|
|
55228
55228
|
"name": "sortAscendingLabel",
|
|
55229
55229
|
"type": "",
|
|
55230
55230
|
"returnType": "",
|
|
55231
|
-
"line":
|
|
55231
|
+
"line": 134
|
|
55232
55232
|
}
|
|
55233
55233
|
},
|
|
55234
55234
|
"filterTitle": {
|
|
@@ -55247,7 +55247,7 @@
|
|
|
55247
55247
|
}
|
|
55248
55248
|
],
|
|
55249
55249
|
"returnType": "void",
|
|
55250
|
-
"line":
|
|
55250
|
+
"line": 139,
|
|
55251
55251
|
"jsdoctags": [
|
|
55252
55252
|
{
|
|
55253
55253
|
"name": "value",
|
|
@@ -55264,7 +55264,7 @@
|
|
|
55264
55264
|
"name": "filterTitle",
|
|
55265
55265
|
"type": "",
|
|
55266
55266
|
"returnType": "",
|
|
55267
|
-
"line":
|
|
55267
|
+
"line": 143
|
|
55268
55268
|
}
|
|
55269
55269
|
}
|
|
55270
55270
|
}
|
|
@@ -56020,7 +56020,7 @@
|
|
|
56020
56020
|
},
|
|
56021
56021
|
{
|
|
56022
56022
|
"name": "TableRadio",
|
|
56023
|
-
"id": "component-TableRadio-
|
|
56023
|
+
"id": "component-TableRadio-3efc3af9bbed3a84b40694053282346adf91a4efa2ce1669f7f10a66099534fdcf49a3fd05e094ddced37922d206fa5c0b75f0503428860d737373f03eccd698",
|
|
56024
56024
|
"file": "src/table/cell/table-radio.component.ts",
|
|
56025
56025
|
"encapsulation": [],
|
|
56026
56026
|
"entryComponents": [],
|
|
@@ -56039,7 +56039,7 @@
|
|
|
56039
56039
|
"name": "label",
|
|
56040
56040
|
"deprecated": false,
|
|
56041
56041
|
"deprecationMessage": "",
|
|
56042
|
-
"line":
|
|
56042
|
+
"line": 33,
|
|
56043
56043
|
"type": "string | Observable",
|
|
56044
56044
|
"decorators": []
|
|
56045
56045
|
},
|
|
@@ -56047,7 +56047,7 @@
|
|
|
56047
56047
|
"name": "row",
|
|
56048
56048
|
"deprecated": false,
|
|
56049
56049
|
"deprecationMessage": "",
|
|
56050
|
-
"line":
|
|
56050
|
+
"line": 28,
|
|
56051
56051
|
"type": "any[]",
|
|
56052
56052
|
"decorators": []
|
|
56053
56053
|
},
|
|
@@ -56056,7 +56056,7 @@
|
|
|
56056
56056
|
"defaultValue": "false",
|
|
56057
56057
|
"deprecated": false,
|
|
56058
56058
|
"deprecationMessage": "",
|
|
56059
|
-
"line":
|
|
56059
|
+
"line": 30,
|
|
56060
56060
|
"type": "boolean",
|
|
56061
56061
|
"decorators": []
|
|
56062
56062
|
},
|
|
@@ -56066,7 +56066,7 @@
|
|
|
56066
56066
|
"deprecationMessage": "",
|
|
56067
56067
|
"rawdescription": "\n\nUsed to populate the row selection checkbox label with a useful value if set.\n\nExample:\n```\n<cds-table [selectionLabelColumn]=\"0\"></cds-table>\n<!-- results in aria-label=\"Select first column value\"\n(where \"first column value\" is the value of the first column in the row -->\n```\n",
|
|
56068
56068
|
"description": "<p>Used to populate the row selection checkbox label with a useful value if set.</p>\n<p>Example:</p>\n<div><pre class=\"line-numbers\"><code class=\"language-none\"><cds-table [selectionLabelColumn]="0"></cds-table>\n<!-- results in aria-label="Select first column value"\n(where "first column value" is the value of the first column in the row --></code></pre></div>",
|
|
56069
|
-
"line":
|
|
56069
|
+
"line": 58,
|
|
56070
56070
|
"type": "number",
|
|
56071
56071
|
"decorators": []
|
|
56072
56072
|
},
|
|
@@ -56075,7 +56075,7 @@
|
|
|
56075
56075
|
"defaultValue": "false",
|
|
56076
56076
|
"deprecated": false,
|
|
56077
56077
|
"deprecationMessage": "",
|
|
56078
|
-
"line":
|
|
56078
|
+
"line": 60,
|
|
56079
56079
|
"type": "boolean",
|
|
56080
56080
|
"decorators": []
|
|
56081
56081
|
}
|
|
@@ -56088,11 +56088,50 @@
|
|
|
56088
56088
|
"deprecationMessage": "",
|
|
56089
56089
|
"rawdescription": "\n\nEmits if a single row is selected.\n",
|
|
56090
56090
|
"description": "<p>Emits if a single row is selected.</p>\n",
|
|
56091
|
-
"line":
|
|
56091
|
+
"line": 65,
|
|
56092
56092
|
"type": "EventEmitter"
|
|
56093
56093
|
}
|
|
56094
56094
|
],
|
|
56095
|
-
"propertiesClass": [
|
|
56095
|
+
"propertiesClass": [
|
|
56096
|
+
{
|
|
56097
|
+
"name": "radioColumn",
|
|
56098
|
+
"defaultValue": "true",
|
|
56099
|
+
"deprecated": false,
|
|
56100
|
+
"deprecationMessage": "",
|
|
56101
|
+
"type": "",
|
|
56102
|
+
"optional": false,
|
|
56103
|
+
"description": "",
|
|
56104
|
+
"line": 45,
|
|
56105
|
+
"decorators": [
|
|
56106
|
+
{
|
|
56107
|
+
"name": "HostBinding",
|
|
56108
|
+
"stringifiedArguments": "'class.cds--table-column-radio'"
|
|
56109
|
+
}
|
|
56110
|
+
],
|
|
56111
|
+
"modifierKind": [
|
|
56112
|
+
167
|
|
56113
|
+
]
|
|
56114
|
+
},
|
|
56115
|
+
{
|
|
56116
|
+
"name": "selectableColumn",
|
|
56117
|
+
"defaultValue": "true",
|
|
56118
|
+
"deprecated": false,
|
|
56119
|
+
"deprecationMessage": "",
|
|
56120
|
+
"type": "",
|
|
56121
|
+
"optional": false,
|
|
56122
|
+
"description": "",
|
|
56123
|
+
"line": 46,
|
|
56124
|
+
"decorators": [
|
|
56125
|
+
{
|
|
56126
|
+
"name": "HostBinding",
|
|
56127
|
+
"stringifiedArguments": "'class.cds--table-column-checkbox'"
|
|
56128
|
+
}
|
|
56129
|
+
],
|
|
56130
|
+
"modifierKind": [
|
|
56131
|
+
167
|
|
56132
|
+
]
|
|
56133
|
+
}
|
|
56134
|
+
],
|
|
56096
56135
|
"methodsClass": [
|
|
56097
56136
|
{
|
|
56098
56137
|
"name": "getLabel",
|
|
@@ -56100,7 +56139,7 @@
|
|
|
56100
56139
|
"optional": false,
|
|
56101
56140
|
"returnType": "Observable<string>",
|
|
56102
56141
|
"typeParameters": [],
|
|
56103
|
-
"line":
|
|
56142
|
+
"line": 78,
|
|
56104
56143
|
"deprecated": false,
|
|
56105
56144
|
"deprecationMessage": ""
|
|
56106
56145
|
},
|
|
@@ -56117,7 +56156,7 @@
|
|
|
56117
56156
|
"optional": false,
|
|
56118
56157
|
"returnType": "{ value: any; }",
|
|
56119
56158
|
"typeParameters": [],
|
|
56120
|
-
"line":
|
|
56159
|
+
"line": 71,
|
|
56121
56160
|
"deprecated": false,
|
|
56122
56161
|
"deprecationMessage": "",
|
|
56123
56162
|
"jsdoctags": [
|
|
@@ -56135,14 +56174,33 @@
|
|
|
56135
56174
|
],
|
|
56136
56175
|
"deprecated": false,
|
|
56137
56176
|
"deprecationMessage": "",
|
|
56138
|
-
"hostBindings": [
|
|
56177
|
+
"hostBindings": [
|
|
56178
|
+
{
|
|
56179
|
+
"name": "class.cds--table-column-checkbox",
|
|
56180
|
+
"defaultValue": "true",
|
|
56181
|
+
"deprecated": false,
|
|
56182
|
+
"deprecationMessage": "",
|
|
56183
|
+
"line": 46,
|
|
56184
|
+
"type": "boolean",
|
|
56185
|
+
"decorators": []
|
|
56186
|
+
},
|
|
56187
|
+
{
|
|
56188
|
+
"name": "class.cds--table-column-radio",
|
|
56189
|
+
"defaultValue": "true",
|
|
56190
|
+
"deprecated": false,
|
|
56191
|
+
"deprecationMessage": "",
|
|
56192
|
+
"line": 45,
|
|
56193
|
+
"type": "boolean",
|
|
56194
|
+
"decorators": []
|
|
56195
|
+
}
|
|
56196
|
+
],
|
|
56139
56197
|
"hostListeners": [],
|
|
56140
56198
|
"standalone": false,
|
|
56141
56199
|
"imports": [],
|
|
56142
56200
|
"description": "",
|
|
56143
56201
|
"rawdescription": "\n",
|
|
56144
56202
|
"type": "component",
|
|
56145
|
-
"sourceCode": "import {\n\tComponent,\n\tInput,\n\tOutput,\n\tEventEmitter\n} from \"@angular/core\";\nimport { I18n } from \"carbon-components-angular/i18n\";\nimport { TableItem } from \"../table-item.class\";\nimport { TableRow } from \"../table-row.class\";\nimport { Observable } from \"rxjs\";\n\n@Component({\n\t// tslint:disable-next-line: component-selector\n\tselector: \"[cdsTableRadio], [ibmTableRadio]\",\n\ttemplate: `\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`\n})\nexport class TableRadio {\n\t@Input() row: any[];\n\n\t@Input() selected = false;\n\n\t@Input()\n\tset label(value: string | Observable<string>) {\n\t\tthis._label.override(value);\n\t}\n\n\tget label() {\n\t\treturn this._label.value;\n\t}\n\n\tget disabled(): boolean {\n\t\treturn this.row ? !!(this.row as TableRow).disabled : false;\n\t}\n\n\t/**\n\t * Used to populate the row selection checkbox label with a useful value if set.\n\t *\n\t * Example:\n\t * ```\n\t * <cds-table [selectionLabelColumn]=\"0\"></cds-table>\n\t * <!-- results in aria-label=\"Select first column value\"\n\t * (where \"first column value\" is the value of the first column in the row -->\n\t * ```\n\t */\n\t@Input() selectionLabelColumn: number;\n\n\t@Input() skeleton = false;\n\n\t/**\n\t * Emits if a single row is selected.\n\t */\n\t@Output() change = new EventEmitter();\n\n\tprotected _label = this.i18n.getOverridable(\"TABLE.CHECKBOX_ROW\");\n\n\tconstructor(protected i18n: I18n) { }\n\n\tgetSelectionLabelValue(row: TableItem[]) {\n\t\tif (!this.selectionLabelColumn) {\n\t\t\treturn { value: this.i18n.get().TABLE.ROW };\n\t\t}\n\t\treturn { value: row[this.selectionLabelColumn].data };\n\t}\n\n\tgetLabel(): Observable<string> {\n\t\treturn this._label.subject;\n\t}\n}\n",
|
|
56203
|
+
"sourceCode": "import {\n\tComponent,\n\tInput,\n\tOutput,\n\tEventEmitter,\n\tHostBinding\n} from \"@angular/core\";\nimport { I18n } from \"carbon-components-angular/i18n\";\nimport { TableItem } from \"../table-item.class\";\nimport { TableRow } from \"../table-row.class\";\nimport { Observable } from \"rxjs\";\n\n@Component({\n\t// tslint:disable-next-line: component-selector\n\tselector: \"[cdsTableRadio], [ibmTableRadio]\",\n\ttemplate: `\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`\n})\nexport class TableRadio {\n\t@Input() row: any[];\n\n\t@Input() selected = false;\n\n\t@Input()\n\tset label(value: string | Observable<string>) {\n\t\tthis._label.override(value);\n\t}\n\n\tget label() {\n\t\treturn this._label.value;\n\t}\n\n\tget disabled(): boolean {\n\t\treturn this.row ? !!(this.row as TableRow).disabled : false;\n\t}\n\n\t@HostBinding(\"class.cds--table-column-radio\") radioColumn = true;\n\t@HostBinding(\"class.cds--table-column-checkbox\") selectableColumn = true;\n\n\t/**\n\t * Used to populate the row selection checkbox label with a useful value if set.\n\t *\n\t * Example:\n\t * ```\n\t * <cds-table [selectionLabelColumn]=\"0\"></cds-table>\n\t * <!-- results in aria-label=\"Select first column value\"\n\t * (where \"first column value\" is the value of the first column in the row -->\n\t * ```\n\t */\n\t@Input() selectionLabelColumn: number;\n\n\t@Input() skeleton = false;\n\n\t/**\n\t * Emits if a single row is selected.\n\t */\n\t@Output() change = new EventEmitter();\n\n\tprotected _label = this.i18n.getOverridable(\"TABLE.CHECKBOX_ROW\");\n\n\tconstructor(protected i18n: I18n) { }\n\n\tgetSelectionLabelValue(row: TableItem[]) {\n\t\tif (!this.selectionLabelColumn) {\n\t\t\treturn { value: this.i18n.get().TABLE.ROW };\n\t\t}\n\t\treturn { value: row[this.selectionLabelColumn].data };\n\t}\n\n\tgetLabel(): Observable<string> {\n\t\treturn this._label.subject;\n\t}\n}\n",
|
|
56146
56204
|
"assetsDirs": [],
|
|
56147
56205
|
"styleUrlsData": "",
|
|
56148
56206
|
"stylesData": "",
|
|
@@ -56159,7 +56217,7 @@
|
|
|
56159
56217
|
"deprecationMessage": ""
|
|
56160
56218
|
}
|
|
56161
56219
|
],
|
|
56162
|
-
"line":
|
|
56220
|
+
"line": 67,
|
|
56163
56221
|
"jsdoctags": [
|
|
56164
56222
|
{
|
|
56165
56223
|
"name": "i18n",
|
|
@@ -56189,7 +56247,7 @@
|
|
|
56189
56247
|
}
|
|
56190
56248
|
],
|
|
56191
56249
|
"returnType": "void",
|
|
56192
|
-
"line":
|
|
56250
|
+
"line": 33,
|
|
56193
56251
|
"jsdoctags": [
|
|
56194
56252
|
{
|
|
56195
56253
|
"name": "value",
|
|
@@ -56206,7 +56264,7 @@
|
|
|
56206
56264
|
"name": "label",
|
|
56207
56265
|
"type": "",
|
|
56208
56266
|
"returnType": "",
|
|
56209
|
-
"line":
|
|
56267
|
+
"line": 37
|
|
56210
56268
|
}
|
|
56211
56269
|
},
|
|
56212
56270
|
"disabled": {
|
|
@@ -56215,7 +56273,7 @@
|
|
|
56215
56273
|
"name": "disabled",
|
|
56216
56274
|
"type": "boolean",
|
|
56217
56275
|
"returnType": "boolean",
|
|
56218
|
-
"line":
|
|
56276
|
+
"line": 41
|
|
56219
56277
|
}
|
|
56220
56278
|
}
|
|
56221
56279
|
}
|
|
@@ -61053,7 +61111,7 @@
|
|
|
61053
61111
|
},
|
|
61054
61112
|
{
|
|
61055
61113
|
"name": "Toast",
|
|
61056
|
-
"id": "component-Toast-
|
|
61114
|
+
"id": "component-Toast-dbdb1ed91c8a893a349f8e2cdc59946fa62aed3a0bd25c0d6d8762afa82dfeb6866975150a36df3f9bdc941a2f88a8d84e25d5acd80cfab39604b35ba0431acc",
|
|
61057
61115
|
"file": "src/notification/toast.component.ts",
|
|
61058
61116
|
"encapsulation": [],
|
|
61059
61117
|
"entryComponents": [],
|
|
@@ -61063,7 +61121,7 @@
|
|
|
61063
61121
|
"selector": "cds-toast, ibm-toast",
|
|
61064
61122
|
"styleUrls": [],
|
|
61065
61123
|
"styles": [],
|
|
61066
|
-
"template": "<svg\n\t[cdsIcon]=\"iconDictionary[notificationObj.type]\"\n\tsize=\"20\"\n\t*ngIf=\"notificationObj.type\"\n\tclass=\"cds--toast-notification__icon\">\n</svg>\n<div class=\"cds--toast-notification__details\">\n\t<h3 *ngIf=\"!notificationObj.template\" cdsToastTitle [innerHTML]=\"notificationObj.title\"></h3>\n\t<div *ngIf=\"!notificationObj.template\" cdsToastSubtitle>\n\t\t<span [innerHTML]=\"notificationObj.subtitle\"></span>\n\t</div>\n\t<p *ngIf=\"!notificationObj.template\" cdsToastCaption [innerHTML]=\"notificationObj.caption\"></p>\n\t<ng-container *ngTemplateOutlet=\"notificationObj.template; context: { $implicit: notificationObj }\"></ng-container>\n</div>\n<button\n\t*ngIf=\"!isCloseHidden\"\n\tclass=\"cds--toast-notification__close-button\"\n\ttype=\"button\"\n\t[attr.aria-label]=\"notificationObj.closeLabel\"\n\t(click)=\"onClose()\">\n\t<svg cdsIcon=\"close\" size=\"16\" class=\"cds--toast-notification__close-icon\"></svg>\n</button>\n\t",
|
|
61124
|
+
"template": "<svg\n\t[cdsIcon]=\"iconDictionary[notificationObj.type]\"\n\tsize=\"20\"\n\t*ngIf=\"notificationObj.type\"\n\tclass=\"cds--toast-notification__icon\">\n</svg>\n<div class=\"cds--toast-notification__details\">\n\t<h3 *ngIf=\"!notificationObj.template\" cdsToastTitle [innerHTML]=\"notificationObj.title\"></h3>\n\t<div *ngIf=\"!notificationObj.template\" cdsToastSubtitle>\n\t\t<span [innerHTML]=\"notificationObj.subtitle\"></span>\n\t</div>\n\t<p *ngIf=\"!notificationObj.template\" cdsToastCaption [innerHTML]=\"notificationObj.caption\"></p>\n\t<ng-container *ngTemplateOutlet=\"notificationObj.template; context: { $implicit: notificationObj }\"></ng-container>\n</div>\n<button\n\t*ngIf=\"!isCloseHidden\"\n\tclass=\"cds--toast-notification__close-button\"\n\ttype=\"button\"\n\t[attr.aria-label]=\"notificationObj.closeLabel | async\"\n\t(click)=\"onClose()\">\n\t<svg cdsIcon=\"close\" size=\"16\" class=\"cds--toast-notification__close-icon\"></svg>\n</button>\n\t",
|
|
61067
61125
|
"templateUrl": [],
|
|
61068
61126
|
"viewProviders": [],
|
|
61069
61127
|
"hostDirectives": [],
|
|
@@ -61074,7 +61132,7 @@
|
|
|
61074
61132
|
"deprecationMessage": "",
|
|
61075
61133
|
"rawdescription": "\n\nCan have `type`, `title`, `subtitle`, and `caption` members.\n\n`type` can be one of `\"error\"`, `\"info\"`, `\"info-square\"`, `\"warning\"`, `\"warning-alt\"`, or `\"success\"`\n",
|
|
61076
61134
|
"description": "<p>Can have <code>type</code>, <code>title</code>, <code>subtitle</code>, and <code>caption</code> members.</p>\n<p><code>type</code> can be one of <code>"error"</code>, <code>"info"</code>, <code>"info-square"</code>, <code>"warning"</code>, <code>"warning-alt"</code>, or <code>"success"</code></p>\n",
|
|
61077
|
-
"line":
|
|
61135
|
+
"line": 53,
|
|
61078
61136
|
"type": "ToastContent",
|
|
61079
61137
|
"decorators": []
|
|
61080
61138
|
}
|
|
@@ -61103,7 +61161,7 @@
|
|
|
61103
61161
|
"type": "",
|
|
61104
61162
|
"optional": false,
|
|
61105
61163
|
"description": "",
|
|
61106
|
-
"line":
|
|
61164
|
+
"line": 66,
|
|
61107
61165
|
"decorators": [
|
|
61108
61166
|
{
|
|
61109
61167
|
"name": "HostBinding",
|
|
@@ -61122,7 +61180,7 @@
|
|
|
61122
61180
|
"type": "",
|
|
61123
61181
|
"optional": false,
|
|
61124
61182
|
"description": "",
|
|
61125
|
-
"line":
|
|
61183
|
+
"line": 65,
|
|
61126
61184
|
"decorators": [
|
|
61127
61185
|
{
|
|
61128
61186
|
"name": "HostBinding",
|
|
@@ -61246,7 +61304,7 @@
|
|
|
61246
61304
|
"defaultValue": "`toast-${Toast.toastCount++}`",
|
|
61247
61305
|
"deprecated": false,
|
|
61248
61306
|
"deprecationMessage": "",
|
|
61249
|
-
"line":
|
|
61307
|
+
"line": 65,
|
|
61250
61308
|
"type": "string",
|
|
61251
61309
|
"decorators": []
|
|
61252
61310
|
},
|
|
@@ -61255,7 +61313,7 @@
|
|
|
61255
61313
|
"defaultValue": "true",
|
|
61256
61314
|
"deprecated": false,
|
|
61257
61315
|
"deprecationMessage": "",
|
|
61258
|
-
"line":
|
|
61316
|
+
"line": 66,
|
|
61259
61317
|
"type": "boolean",
|
|
61260
61318
|
"decorators": []
|
|
61261
61319
|
},
|
|
@@ -61263,7 +61321,7 @@
|
|
|
61263
61321
|
"name": "class.cds--toast-notification--error",
|
|
61264
61322
|
"deprecated": false,
|
|
61265
61323
|
"deprecationMessage": "",
|
|
61266
|
-
"line":
|
|
61324
|
+
"line": 67,
|
|
61267
61325
|
"type": "boolean",
|
|
61268
61326
|
"decorators": []
|
|
61269
61327
|
},
|
|
@@ -61271,7 +61329,7 @@
|
|
|
61271
61329
|
"name": "class.cds--toast-notification--hide-close-button",
|
|
61272
61330
|
"deprecated": false,
|
|
61273
61331
|
"deprecationMessage": "",
|
|
61274
|
-
"line":
|
|
61332
|
+
"line": 74,
|
|
61275
61333
|
"type": "boolean",
|
|
61276
61334
|
"decorators": []
|
|
61277
61335
|
},
|
|
@@ -61279,7 +61337,7 @@
|
|
|
61279
61337
|
"name": "class.cds--toast-notification--info",
|
|
61280
61338
|
"deprecated": false,
|
|
61281
61339
|
"deprecationMessage": "",
|
|
61282
|
-
"line":
|
|
61340
|
+
"line": 68,
|
|
61283
61341
|
"type": "boolean",
|
|
61284
61342
|
"decorators": []
|
|
61285
61343
|
},
|
|
@@ -61287,7 +61345,7 @@
|
|
|
61287
61345
|
"name": "class.cds--toast-notification--info-square",
|
|
61288
61346
|
"deprecated": false,
|
|
61289
61347
|
"deprecationMessage": "",
|
|
61290
|
-
"line":
|
|
61348
|
+
"line": 69,
|
|
61291
61349
|
"type": "boolean",
|
|
61292
61350
|
"decorators": []
|
|
61293
61351
|
},
|
|
@@ -61295,7 +61353,7 @@
|
|
|
61295
61353
|
"name": "class.cds--toast-notification--low-contrast",
|
|
61296
61354
|
"deprecated": false,
|
|
61297
61355
|
"deprecationMessage": "",
|
|
61298
|
-
"line":
|
|
61356
|
+
"line": 73,
|
|
61299
61357
|
"type": "any",
|
|
61300
61358
|
"decorators": []
|
|
61301
61359
|
},
|
|
@@ -61303,7 +61361,7 @@
|
|
|
61303
61361
|
"name": "class.cds--toast-notification--success",
|
|
61304
61362
|
"deprecated": false,
|
|
61305
61363
|
"deprecationMessage": "",
|
|
61306
|
-
"line":
|
|
61364
|
+
"line": 70,
|
|
61307
61365
|
"type": "boolean",
|
|
61308
61366
|
"decorators": []
|
|
61309
61367
|
},
|
|
@@ -61311,7 +61369,7 @@
|
|
|
61311
61369
|
"name": "class.cds--toast-notification--warning",
|
|
61312
61370
|
"deprecated": false,
|
|
61313
61371
|
"deprecationMessage": "",
|
|
61314
|
-
"line":
|
|
61372
|
+
"line": 71,
|
|
61315
61373
|
"type": "boolean",
|
|
61316
61374
|
"decorators": []
|
|
61317
61375
|
},
|
|
@@ -61319,7 +61377,7 @@
|
|
|
61319
61377
|
"name": "class.cds--toast-notification--warning-alt",
|
|
61320
61378
|
"deprecated": false,
|
|
61321
61379
|
"deprecationMessage": "",
|
|
61322
|
-
"line":
|
|
61380
|
+
"line": 72,
|
|
61323
61381
|
"type": "boolean",
|
|
61324
61382
|
"decorators": []
|
|
61325
61383
|
},
|
|
@@ -61343,7 +61401,7 @@
|
|
|
61343
61401
|
"description": "<p>Toast messages are displayed toward the top of the UI and do not interrupt user’s work.</p>\n<p><a href=\"../../?path=/story/components-notification--toast\">See demo</a></p>\n",
|
|
61344
61402
|
"rawdescription": "\n\nToast messages are displayed toward the top of the UI and do not interrupt user’s work.\n\n[See demo](../../?path=/story/components-notification--toast)\n",
|
|
61345
61403
|
"type": "component",
|
|
61346
|
-
"sourceCode": "import {\n\tComponent,\n\tInput,\n\tOnInit,\n\tHostBinding\n} from \"@angular/core\";\n\nimport { ToastContent } from \"./notification-content.interface\";\nimport { NotificationDisplayService } from \"./notification-display.service\";\nimport { I18n } from \"carbon-components-angular/i18n\";\nimport { BaseNotification } from \"./base-notification.component\";\n\n/**\n * Toast messages are displayed toward the top of the UI and do not interrupt user’s work.\n *\n * [See demo](../../?path=/story/components-notification--toast)\n */\n@Component({\n\tselector: \"cds-toast, ibm-toast\",\n\ttemplate: `\n\t\t<svg\n\t\t\t[cdsIcon]=\"iconDictionary[notificationObj.type]\"\n\t\t\tsize=\"20\"\n\t\t\t*ngIf=\"notificationObj.type\"\n\t\t\tclass=\"cds--toast-notification__icon\">\n\t\t</svg>\n\t\t<div class=\"cds--toast-notification__details\">\n\t\t\t<h3 *ngIf=\"!notificationObj.template\" cdsToastTitle [innerHTML]=\"notificationObj.title\"></h3>\n\t\t\t<div *ngIf=\"!notificationObj.template\" cdsToastSubtitle>\n\t\t\t\t<span [innerHTML]=\"notificationObj.subtitle\"></span>\n\t\t\t</div>\n\t\t\t<p *ngIf=\"!notificationObj.template\" cdsToastCaption [innerHTML]=\"notificationObj.caption\"></p>\n\t\t\t<ng-container *ngTemplateOutlet=\"notificationObj.template; context: { $implicit: notificationObj }\"></ng-container>\n\t\t</div>\n\t\t<button\n\t\t\t*ngIf=\"!isCloseHidden\"\n\t\t\tclass=\"cds--toast-notification__close-button\"\n\t\t\ttype=\"button\"\n\t\t\t[attr.aria-label]=\"notificationObj.closeLabel\"\n\t\t\t(click)=\"onClose()\">\n\t\t\t<svg cdsIcon=\"close\" size=\"16\" class=\"cds--toast-notification__close-icon\"></svg>\n\t\t</button>\n\t`\n})\nexport class Toast extends BaseNotification implements OnInit {\n\tprivate static toastCount = 0;\n\t/**\n\t * Can have `type`, `title`, `subtitle`, and `caption` members.\n\t *\n\t * `type` can be one of `\"error\"`, `\"info\"`, `\"info-square\"`, `\"warning\"`, `\"warning-alt\"`, or `\"success\"`\n\t */\n\t@Input() notificationObj: ToastContent;\n\n\t@HostBinding(\"attr.id\") toastID = `toast-${Toast.toastCount++}`;\n\t@HostBinding(\"class.cds--toast-notification\") toastClass = true;\n\t@HostBinding(\"class.cds--toast-notification--error\") get isError() { return this.notificationObj.type === \"error\"; }\n\t@HostBinding(\"class.cds--toast-notification--info\") get isInfo() { return this.notificationObj.type === \"info\"; }\n\t@HostBinding(\"class.cds--toast-notification--info-square\") get isInfoSquare() { return this.notificationObj.type === \"info-square\"; }\n\t@HostBinding(\"class.cds--toast-notification--success\") get isSuccess() { return this.notificationObj.type === \"success\"; }\n\t@HostBinding(\"class.cds--toast-notification--warning\") get isWarning() { return this.notificationObj.type === \"warning\"; }\n\t@HostBinding(\"class.cds--toast-notification--warning-alt\") get isWarningAlt() { return this.notificationObj.type === \"warning-alt\"; }\n\t@HostBinding(\"class.cds--toast-notification--low-contrast\") get isLowContrast() { return this.notificationObj.lowContrast; }\n\t@HostBinding(\"class.cds--toast-notification--hide-close-button\") get isCloseHidden() { return !this.notificationObj.showClose; }\n\n\tconstructor(protected notificationDisplayService: NotificationDisplayService, protected i18n: I18n) {\n\t\tsuper(notificationDisplayService, i18n);\n\t}\n\n\tngOnInit() {\n\t\tif (!this.notificationObj.closeLabel) {\n\t\t\tthis.notificationObj.closeLabel = this.i18n.get().NOTIFICATION.CLOSE_BUTTON;\n\t\t}\n\t}\n}\n",
|
|
61404
|
+
"sourceCode": "import {\n\tComponent,\n\tInput,\n\tOnInit,\n\tHostBinding\n} from \"@angular/core\";\n\nimport { isObservable, of } from \"rxjs\";\nimport { ToastContent } from \"./notification-content.interface\";\nimport { NotificationDisplayService } from \"./notification-display.service\";\nimport { I18n } from \"carbon-components-angular/i18n\";\nimport { BaseNotification } from \"./base-notification.component\";\n\n/**\n * Toast messages are displayed toward the top of the UI and do not interrupt user’s work.\n *\n * [See demo](../../?path=/story/components-notification--toast)\n */\n@Component({\n\tselector: \"cds-toast, ibm-toast\",\n\ttemplate: `\n\t\t<svg\n\t\t\t[cdsIcon]=\"iconDictionary[notificationObj.type]\"\n\t\t\tsize=\"20\"\n\t\t\t*ngIf=\"notificationObj.type\"\n\t\t\tclass=\"cds--toast-notification__icon\">\n\t\t</svg>\n\t\t<div class=\"cds--toast-notification__details\">\n\t\t\t<h3 *ngIf=\"!notificationObj.template\" cdsToastTitle [innerHTML]=\"notificationObj.title\"></h3>\n\t\t\t<div *ngIf=\"!notificationObj.template\" cdsToastSubtitle>\n\t\t\t\t<span [innerHTML]=\"notificationObj.subtitle\"></span>\n\t\t\t</div>\n\t\t\t<p *ngIf=\"!notificationObj.template\" cdsToastCaption [innerHTML]=\"notificationObj.caption\"></p>\n\t\t\t<ng-container *ngTemplateOutlet=\"notificationObj.template; context: { $implicit: notificationObj }\"></ng-container>\n\t\t</div>\n\t\t<button\n\t\t\t*ngIf=\"!isCloseHidden\"\n\t\t\tclass=\"cds--toast-notification__close-button\"\n\t\t\ttype=\"button\"\n\t\t\t[attr.aria-label]=\"notificationObj.closeLabel | async\"\n\t\t\t(click)=\"onClose()\">\n\t\t\t<svg cdsIcon=\"close\" size=\"16\" class=\"cds--toast-notification__close-icon\"></svg>\n\t\t</button>\n\t`\n})\nexport class Toast extends BaseNotification implements OnInit {\n\tprivate static toastCount = 0;\n\t/**\n\t * Can have `type`, `title`, `subtitle`, and `caption` members.\n\t *\n\t * `type` can be one of `\"error\"`, `\"info\"`, `\"info-square\"`, `\"warning\"`, `\"warning-alt\"`, or `\"success\"`\n\t */\n\t@Input() set notificationObj(obj: ToastContent) {\n\t\tif (obj.closeLabel && !isObservable(obj.closeLabel)) {\n\t\t\tobj.closeLabel = of(obj.closeLabel);\n\t\t}\n\t\tthis._notificationObj = Object.assign({}, this.defaultNotificationObj, obj);\n\t}\n\n\tget notificationObj(): ToastContent {\n\t\treturn this._notificationObj as ToastContent;\n\t}\n\n\n\t@HostBinding(\"attr.id\") toastID = `toast-${Toast.toastCount++}`;\n\t@HostBinding(\"class.cds--toast-notification\") toastClass = true;\n\t@HostBinding(\"class.cds--toast-notification--error\") get isError() { return this.notificationObj.type === \"error\"; }\n\t@HostBinding(\"class.cds--toast-notification--info\") get isInfo() { return this.notificationObj.type === \"info\"; }\n\t@HostBinding(\"class.cds--toast-notification--info-square\") get isInfoSquare() { return this.notificationObj.type === \"info-square\"; }\n\t@HostBinding(\"class.cds--toast-notification--success\") get isSuccess() { return this.notificationObj.type === \"success\"; }\n\t@HostBinding(\"class.cds--toast-notification--warning\") get isWarning() { return this.notificationObj.type === \"warning\"; }\n\t@HostBinding(\"class.cds--toast-notification--warning-alt\") get isWarningAlt() { return this.notificationObj.type === \"warning-alt\"; }\n\t@HostBinding(\"class.cds--toast-notification--low-contrast\") get isLowContrast() { return this.notificationObj.lowContrast; }\n\t@HostBinding(\"class.cds--toast-notification--hide-close-button\") get isCloseHidden() { return !this.notificationObj.showClose; }\n\n\tconstructor(protected notificationDisplayService: NotificationDisplayService, protected i18n: I18n) {\n\t\tsuper(notificationDisplayService, i18n);\n\t}\n\n\tngOnInit() {\n\t\tif (!this.notificationObj.closeLabel) {\n\t\t\tthis.notificationObj.closeLabel = this.i18n.get().NOTIFICATION.CLOSE_BUTTON;\n\t\t}\n\t}\n}\n",
|
|
61347
61405
|
"assetsDirs": [],
|
|
61348
61406
|
"styleUrlsData": "",
|
|
61349
61407
|
"stylesData": "",
|
|
@@ -61366,7 +61424,7 @@
|
|
|
61366
61424
|
"deprecationMessage": ""
|
|
61367
61425
|
}
|
|
61368
61426
|
],
|
|
61369
|
-
"line":
|
|
61427
|
+
"line": 74,
|
|
61370
61428
|
"jsdoctags": [
|
|
61371
61429
|
{
|
|
61372
61430
|
"name": "notificationDisplayService",
|
|
@@ -61393,13 +61451,51 @@
|
|
|
61393
61451
|
"OnInit"
|
|
61394
61452
|
],
|
|
61395
61453
|
"accessors": {
|
|
61454
|
+
"notificationObj": {
|
|
61455
|
+
"name": "notificationObj",
|
|
61456
|
+
"setSignature": {
|
|
61457
|
+
"name": "notificationObj",
|
|
61458
|
+
"type": "void",
|
|
61459
|
+
"deprecated": false,
|
|
61460
|
+
"deprecationMessage": "",
|
|
61461
|
+
"args": [
|
|
61462
|
+
{
|
|
61463
|
+
"name": "obj",
|
|
61464
|
+
"type": "ToastContent",
|
|
61465
|
+
"deprecated": false,
|
|
61466
|
+
"deprecationMessage": ""
|
|
61467
|
+
}
|
|
61468
|
+
],
|
|
61469
|
+
"returnType": "void",
|
|
61470
|
+
"line": 53,
|
|
61471
|
+
"rawdescription": "\n\nCan have `type`, `title`, `subtitle`, and `caption` members.\n\n`type` can be one of `\"error\"`, `\"info\"`, `\"info-square\"`, `\"warning\"`, `\"warning-alt\"`, or `\"success\"`\n",
|
|
61472
|
+
"description": "<p>Can have <code>type</code>, <code>title</code>, <code>subtitle</code>, and <code>caption</code> members.</p>\n<p><code>type</code> can be one of <code>"error"</code>, <code>"info"</code>, <code>"info-square"</code>, <code>"warning"</code>, <code>"warning-alt"</code>, or <code>"success"</code></p>\n",
|
|
61473
|
+
"jsdoctags": [
|
|
61474
|
+
{
|
|
61475
|
+
"name": "obj",
|
|
61476
|
+
"type": "ToastContent",
|
|
61477
|
+
"deprecated": false,
|
|
61478
|
+
"deprecationMessage": "",
|
|
61479
|
+
"tagName": {
|
|
61480
|
+
"text": "param"
|
|
61481
|
+
}
|
|
61482
|
+
}
|
|
61483
|
+
]
|
|
61484
|
+
},
|
|
61485
|
+
"getSignature": {
|
|
61486
|
+
"name": "notificationObj",
|
|
61487
|
+
"type": "",
|
|
61488
|
+
"returnType": "ToastContent",
|
|
61489
|
+
"line": 60
|
|
61490
|
+
}
|
|
61491
|
+
},
|
|
61396
61492
|
"isError": {
|
|
61397
61493
|
"name": "isError",
|
|
61398
61494
|
"getSignature": {
|
|
61399
61495
|
"name": "isError",
|
|
61400
61496
|
"type": "",
|
|
61401
61497
|
"returnType": "",
|
|
61402
|
-
"line":
|
|
61498
|
+
"line": 67
|
|
61403
61499
|
}
|
|
61404
61500
|
},
|
|
61405
61501
|
"isInfo": {
|
|
@@ -61408,7 +61504,7 @@
|
|
|
61408
61504
|
"name": "isInfo",
|
|
61409
61505
|
"type": "",
|
|
61410
61506
|
"returnType": "",
|
|
61411
|
-
"line":
|
|
61507
|
+
"line": 68
|
|
61412
61508
|
}
|
|
61413
61509
|
},
|
|
61414
61510
|
"isInfoSquare": {
|
|
@@ -61417,7 +61513,7 @@
|
|
|
61417
61513
|
"name": "isInfoSquare",
|
|
61418
61514
|
"type": "",
|
|
61419
61515
|
"returnType": "",
|
|
61420
|
-
"line":
|
|
61516
|
+
"line": 69
|
|
61421
61517
|
}
|
|
61422
61518
|
},
|
|
61423
61519
|
"isSuccess": {
|
|
@@ -61426,7 +61522,7 @@
|
|
|
61426
61522
|
"name": "isSuccess",
|
|
61427
61523
|
"type": "",
|
|
61428
61524
|
"returnType": "",
|
|
61429
|
-
"line":
|
|
61525
|
+
"line": 70
|
|
61430
61526
|
}
|
|
61431
61527
|
},
|
|
61432
61528
|
"isWarning": {
|
|
@@ -61435,7 +61531,7 @@
|
|
|
61435
61531
|
"name": "isWarning",
|
|
61436
61532
|
"type": "",
|
|
61437
61533
|
"returnType": "",
|
|
61438
|
-
"line":
|
|
61534
|
+
"line": 71
|
|
61439
61535
|
}
|
|
61440
61536
|
},
|
|
61441
61537
|
"isWarningAlt": {
|
|
@@ -61444,7 +61540,7 @@
|
|
|
61444
61540
|
"name": "isWarningAlt",
|
|
61445
61541
|
"type": "",
|
|
61446
61542
|
"returnType": "",
|
|
61447
|
-
"line":
|
|
61543
|
+
"line": 72
|
|
61448
61544
|
}
|
|
61449
61545
|
},
|
|
61450
61546
|
"isLowContrast": {
|
|
@@ -61453,7 +61549,7 @@
|
|
|
61453
61549
|
"name": "isLowContrast",
|
|
61454
61550
|
"type": "",
|
|
61455
61551
|
"returnType": "",
|
|
61456
|
-
"line":
|
|
61552
|
+
"line": 73
|
|
61457
61553
|
}
|
|
61458
61554
|
},
|
|
61459
61555
|
"isCloseHidden": {
|
|
@@ -61462,7 +61558,7 @@
|
|
|
61462
61558
|
"name": "isCloseHidden",
|
|
61463
61559
|
"type": "",
|
|
61464
61560
|
"returnType": "",
|
|
61465
|
-
"line":
|
|
61561
|
+
"line": 74
|
|
61466
61562
|
}
|
|
61467
61563
|
}
|
|
61468
61564
|
}
|
|
@@ -85325,8 +85421,8 @@
|
|
|
85325
85421
|
"type": "component",
|
|
85326
85422
|
"linktype": "component",
|
|
85327
85423
|
"name": "TableRadio",
|
|
85328
|
-
"coveragePercent":
|
|
85329
|
-
"coverageCount": "2/
|
|
85424
|
+
"coveragePercent": 14,
|
|
85425
|
+
"coverageCount": "2/14",
|
|
85330
85426
|
"status": "low"
|
|
85331
85427
|
},
|
|
85332
85428
|
{
|