carbon-components-angular 5.42.0 → 5.43.1
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/Pagination.html +22 -16
- package/docs/documentation/components/Select.html +281 -76
- package/docs/documentation/components/TimePickerSelect.html +180 -27
- package/docs/documentation/coverage.html +6 -6
- package/docs/documentation/interfaces/PaginationTranslations.html +8 -2
- package/docs/documentation/js/search/search_index.js +2 -2
- package/docs/documentation/modules/ComboBoxModule/dependencies.svg +4 -4
- package/docs/documentation/modules/ComboBoxModule.html +4 -4
- package/docs/documentation/modules/ContentSwitcherModule/dependencies.svg +4 -4
- package/docs/documentation/modules/ContentSwitcherModule.html +4 -4
- package/docs/documentation/modules/DatePickerInputModule/dependencies.svg +37 -41
- package/docs/documentation/modules/DatePickerInputModule.html +37 -41
- package/docs/documentation/modules/DatePickerModule/dependencies.svg +38 -38
- package/docs/documentation/modules/DatePickerModule.html +38 -38
- package/docs/documentation/modules/GridModule/dependencies.svg +60 -60
- package/docs/documentation/modules/GridModule.html +60 -60
- package/docs/documentation/modules/LoadingModule/dependencies.svg +4 -4
- package/docs/documentation/modules/LoadingModule.html +4 -4
- package/docs/documentation/modules/NFormsModule/dependencies.svg +4 -4
- package/docs/documentation/modules/NFormsModule.html +4 -4
- package/docs/documentation/modules/NumberModule/dependencies.svg +4 -4
- package/docs/documentation/modules/NumberModule.html +4 -4
- package/docs/documentation/modules/ProgressIndicatorModule/dependencies.svg +4 -4
- package/docs/documentation/modules/ProgressIndicatorModule.html +4 -4
- package/docs/documentation/modules/RadioModule/dependencies.svg +4 -4
- package/docs/documentation/modules/RadioModule.html +4 -4
- package/docs/documentation/modules/SelectModule/dependencies.svg +58 -58
- package/docs/documentation/modules/SelectModule.html +58 -58
- package/docs/documentation/modules/SliderModule/dependencies.svg +4 -4
- package/docs/documentation/modules/SliderModule.html +4 -4
- package/docs/documentation/modules/TableModule/dependencies.svg +216 -216
- package/docs/documentation/modules/TableModule.html +216 -216
- package/docs/documentation/modules/TabsModule/dependencies.svg +69 -69
- package/docs/documentation/modules/TabsModule.html +69 -69
- package/docs/documentation/modules/TagModule/dependencies.svg +4 -4
- package/docs/documentation/modules/TagModule.html +4 -4
- package/docs/documentation/modules/ThemeModule/dependencies.svg +4 -4
- package/docs/documentation/modules/ThemeModule.html +4 -4
- package/docs/documentation/modules/TilesModule/dependencies.svg +102 -102
- package/docs/documentation/modules/TilesModule.html +102 -102
- package/docs/documentation/modules/TimePickerModule/dependencies.svg +4 -4
- package/docs/documentation/modules/TimePickerModule.html +4 -4
- package/docs/documentation/modules/TimePickerSelectModule/dependencies.svg +30 -30
- package/docs/documentation/modules/TimePickerSelectModule.html +30 -30
- package/docs/documentation/modules/ToggleModule/dependencies.svg +4 -4
- package/docs/documentation/modules/ToggleModule.html +4 -4
- package/docs/documentation/modules/ToggletipModule/dependencies.svg +4 -4
- package/docs/documentation/modules/ToggletipModule.html +4 -4
- package/docs/documentation/modules/TooltipModule/dependencies.svg +4 -4
- package/docs/documentation/modules/TooltipModule.html +4 -4
- package/docs/documentation/modules/TreeviewModule/dependencies.svg +8 -8
- package/docs/documentation/modules/TreeviewModule.html +8 -8
- package/docs/documentation/modules/UIShellModule/dependencies.svg +4 -4
- package/docs/documentation/modules/UIShellModule.html +4 -4
- package/docs/documentation.json +222 -85
- package/docs/storybook/8341.2bf88948.iframe.bundle.js +1 -0
- package/docs/storybook/{9672.7b7a4af9.iframe.bundle.js → 9672.84e90325.iframe.bundle.js} +1 -1
- package/docs/storybook/iframe.html +2 -2
- package/docs/storybook/index.json +1 -1
- package/docs/storybook/main.d05d9d76.iframe.bundle.js +1 -0
- package/docs/storybook/project.json +1 -1
- package/docs/storybook/{runtime~main.f3aed674.iframe.bundle.js → runtime~main.11c14460.iframe.bundle.js} +1 -1
- package/docs/storybook/select-select-stories.5ddb23ab.iframe.bundle.js +1 -0
- package/docs/storybook/stories.json +1 -1
- package/esm2020/pagination/pagination.component.mjs +9 -3
- package/esm2020/select/select.component.mjs +102 -32
- package/fesm2015/carbon-components-angular-pagination.mjs +8 -2
- package/fesm2015/carbon-components-angular-pagination.mjs.map +1 -1
- package/fesm2015/carbon-components-angular-select.mjs +101 -31
- package/fesm2015/carbon-components-angular-select.mjs.map +1 -1
- package/fesm2020/carbon-components-angular-pagination.mjs +8 -2
- package/fesm2020/carbon-components-angular-pagination.mjs.map +1 -1
- package/fesm2020/carbon-components-angular-select.mjs +101 -31
- package/fesm2020/carbon-components-angular-select.mjs.map +1 -1
- package/package.json +1 -1
- package/select/select.component.d.ts +7 -1
- package/docs/storybook/8341.a544f9e9.iframe.bundle.js +0 -1
- package/docs/storybook/main.a2b57351.iframe.bundle.js +0 -1
- package/docs/storybook/select-select-stories.c1077d92.iframe.bundle.js +0 -1
package/docs/documentation.json
CHANGED
|
@@ -1494,12 +1494,12 @@
|
|
|
1494
1494
|
},
|
|
1495
1495
|
{
|
|
1496
1496
|
"name": "PaginationTranslations",
|
|
1497
|
-
"id": "interface-PaginationTranslations-
|
|
1497
|
+
"id": "interface-PaginationTranslations-68e44f1d874d0084c3576887d1f200e8de5d280aa1a937a63ba62b784e025e51ebb3911f25da596d94907ae47db094993997fc8e2b9d08cde1d63d69567770a1",
|
|
1498
1498
|
"file": "src/pagination/pagination.component.ts",
|
|
1499
1499
|
"deprecated": false,
|
|
1500
1500
|
"deprecationMessage": "",
|
|
1501
1501
|
"type": "interface",
|
|
1502
|
-
"sourceCode": "import { PaginationModel } from \"./pagination-model.class\";\nimport {\n\tComponent,\n\tInput,\n\tOutput,\n\tEventEmitter\n} from \"@angular/core\";\n\nimport { I18n, Overridable } from \"carbon-components-angular/i18n\";\nimport { ExperimentalService } from \"carbon-components-angular/experimental\";\nimport { merge } from \"carbon-components-angular/utils\";\n\nexport interface PaginationTranslations {\n\tITEMS_PER_PAGE: string;\n\tOPEN_LIST_OF_OPTIONS: string;\n\tBACKWARD: string;\n\tFORWARD: string;\n\tTOTAL_ITEMS_UNKNOWN: string;\n\tTOTAL_ITEMS: string;\n\tTOTAL_ITEM: string;\n\tOF_LAST_PAGES: string;\n\tOF_LAST_PAGE: string;\n}\n\n/**\n * Use pagination when you have multiple pages of data to handle. Get started with importing the module:\n *\n * ```typescript\n * import { PaginationModule } from 'carbon-components-angular';\n * ```\n *\n * ```html\n *\t<cds-pagination [model]=\"model\" (selectPage)=\"selectPage($event)\"></cds-pagination>\n * ```\n *\n * In your `selectPage()` method set the `model.currentPage` to selected page, _after_\n * you load the page.\n *\n * ```typescript\n * selectPage(page) {\n * \t// ... your code to load the page goes here\n *\n * \tthis.model.currentPage = page;\n *\n * \t// ... anything you want to do after page selection changes goes here\n * }\n * ```\n *\n * [See demo](../../?path=/story/components-pagination--basic)\n */\n@Component({\n\tselector: \"cds-pagination, ibm-pagination\",\n\ttemplate: `\n\t<div\n\t\tclass=\"cds--pagination\"\n\t\t[ngClass]=\"{\n\t\t\t'cds--skeleton': skeleton\n\t\t}\">\n\t\t<!-- left skeleton div -->\n\t\t<div *ngIf=\"skeleton\" class=\"cds--pagination__left\">\n\t\t\t<p class=\"cds--skeleton__text\" style=\"width: 70px\"></p>\n\t\t\t<p class=\"cds--skeleton__text\" style=\"width: 35px\"></p>\n\t\t\t<p class=\"cds--skeleton__text\" style=\"width: 105px\"></p>\n\t\t</div>\n\n\t\t<div *ngIf=\"!skeleton\" class=\"cds--pagination__left\">\n\t\t\t<ng-container *ngIf=\"showPageInput\">\n\t\t\t\t<label class=\"cds--pagination__text\" [for]=\"itemsPerPageSelectId\">\n\t\t\t\t\t{{itemsPerPageText.subject | async}}\n\t\t\t\t</label>\n\t\t\t\t<div\n\t\t\t\t\tclass=\"cds--select cds--select--inline cds--select__item-count\"\n\t\t\t\t\t[class.cds--select--disabled]=\"pageInputDisabled\">\n\t\t\t\t\t<select\n\t\t\t\t\t\t[id]=\"itemsPerPageSelectId\"\n\t\t\t\t\t\t[(ngModel)]=\"itemsPerPage\"\n\t\t\t\t\t\t[disabled]=\"pageInputDisabled\"\n\t\t\t\t\t\tclass=\"cds--select-input\">\n\t\t\t\t\t\t<option\n\t\t\t\t\t\t\tclass=\"cds--select-option\"\n\t\t\t\t\t\t\t*ngFor=\"let option of itemsPerPageOptions\"\n\t\t\t\t\t\t\t[value]=\"option\">\n\t\t\t\t\t\t\t\t{{ option }}\n\t\t\t\t\t\t</option>\n\t\t\t\t\t</select>\n\t\t\t\t\t<svg\n\t\t\t\t\t\tcdsIcon=\"chevron--down\"\n\t\t\t\t\t\tsize=\"16\"\n\t\t\t\t\t\tstyle=\"display: inherit\"\n\t\t\t\t\t\tclass=\"cds--select__arrow\"\n\t\t\t\t\t\taria-hidden=\"true\"\n\t\t\t\t\t\t[attr.ariaLabel]=\"optionsListText.subject | async\">\n\t\t\t\t\t</svg>\n\t\t\t\t</div>\n\t\t\t</ng-container>\n\t\t\t<span *ngIf=\"!pagesUnknown && totalDataLength <= 1\" class=\"cds--pagination__text cds--pagination__items-count\" [ngStyle]=\"{'margin-left': showPageInput ? null : 0}\">\n\t\t\t\t{{totalItemText.subject | i18nReplace:{start: startItemIndex, end: endItemIndex, total: totalDataLength } | async}}\n\t\t\t</span>\n\t\t\t<span *ngIf=\"!pagesUnknown && totalDataLength > 1\" class=\"cds--pagination__text cds--pagination__items-count\" [ngStyle]=\"{'margin-left': showPageInput ? null : 0}\">\n\t\t\t\t{{totalItemsText.subject | i18nReplace:{start: startItemIndex, end: endItemIndex, total: totalDataLength } | async}}\n\t\t\t</span>\n\t\t\t<span *ngIf=\"pagesUnknown\" class=\"cds--pagination__text cds--pagination__items-count\" [ngStyle]=\"{'margin-left': showPageInput ? null : 0}\">\n\t\t\t\t{{totalItemsUnknownText.subject | i18nReplace:{start: startItemIndex, end: endItemIndex } | async}}\n\t\t\t</span>\n\t\t</div>\n\n\t\t<!-- right skeleton div -->\n\t\t<div *ngIf=\"skeleton\" class=\"cds--pagination__right\">\n\t\t\t<p class=\"cds--skeleton__text\" style=\"width: 70px\"></p>\n\t\t</div>\n\n\t\t<div *ngIf=\"!skeleton\" class=\"cds--pagination__right\">\n\t\t\t<span *ngIf=\"pagesUnknown\" class=\"cds--pagination__text cds--pagination__page-text\">\n\t\t\t\t<ng-container *ngIf=\"!showPageInput\">{{currentPage}}</ng-container>\n\t\t\t\t{{pageText.subject | async}}\n\t\t\t</span>\n\t\t\t<ng-container *ngIf=\"showPageInput\">\n\t\t\t\t<div\n\t\t\t\t\tclass=\"cds--select cds--select--inline cds--select__page-number\"\n\t\t\t\t\t[class.cds--select--disabled]=\"pageInputDisabled\">\n\t\t\t\t\t<label [for]=\"currentPageSelectId\" class=\"cds--label cds--visually-hidden\">{{pageText.subject | async}}</label>\n\t\t\t\t\t<input\n\t\t\t\t\t\t*ngIf=\"pageOptions.length > pageSelectThreshold\"\n\t\t\t\t\t\tstyle=\"padding-right: 1rem; margin-right: 1rem;\"\n\t\t\t\t\t\t[id]=\"currentPageSelectId\"\n\t\t\t\t\t\ttype=\"number\"\n\t\t\t\t\t\tmin=\"1\"\n\t\t\t\t\t\t[max]=\"pageOptions.length\"\n\t\t\t\t\t\tclass=\"cds--select-input\"\n\t\t\t\t\t\t[(ngModel)]=\"currentPage\">\n\t\t\t\t\t<select\n\t\t\t\t\t\t*ngIf=\"pageOptions.length <= pageSelectThreshold\"\n\t\t\t\t\t\t[id]=\"currentPageSelectId\"\n\t\t\t\t\t\tclass=\"cds--select-input\"\n\t\t\t\t\t\t[disabled]=\"pageInputDisabled\"\n\t\t\t\t\t\t[(ngModel)]=\"currentPage\">\n\t\t\t\t\t\t<option *ngFor=\"let page of pageOptions; let i = index;\" class=\"cds--select-option\" [value]=\"i + 1\">{{i + 1}}</option>\n\t\t\t\t\t</select>\n\t\t\t\t\t<svg\n\t\t\t\t\t\t*ngIf=\"pageOptions.length <= 1000\"\n\t\t\t\t\t\tcdsIcon=\"chevron--down\"\n\t\t\t\t\t\tsize=\"16\"\n\t\t\t\t\t\tstyle=\"display: inherit;\"\n\t\t\t\t\t\tclass=\"cds--select__arrow\"\n\t\t\t\t\t\t[attr.ariaLabel]=\"optionsListText.subject | async\">\n\t\t\t\t\t</svg>\n\t\t\t\t</div>\n\t\t\t</ng-container>\n\n\t\t\t<span *ngIf=\"!pagesUnknown && lastPage <= 1\" class=\"cds--pagination__text\">\n\t\t\t\t<ng-container *ngIf=\"!showPageInput\">{{currentPage}}</ng-container>\n\t\t\t\t{{ofLastPageText.subject | i18nReplace: {last: lastPage} | async}}\n\t\t\t</span>\n\t\t\t<span *ngIf=\"!pagesUnknown && lastPage > 1\" class=\"cds--pagination__text\">\n\t\t\t\t<ng-container *ngIf=\"!showPageInput\">{{currentPage}}</ng-container>\n\t\t\t\t{{ofLastPagesText.subject | i18nReplace: {last: lastPage} | async}}\n\t\t\t</span>\n\t\t\t<div class=\"cds--pagination__control-buttons\">\n\t\t\t\t<button\n\t\t\t\t\tcdsButton=\"ghost\"\n\t\t\t\t\ticonOnly=\"true\"\n\t\t\t\t\tclass=\"cds--pagination__button cds--pagination__button--backward\"\n\t\t\t\t\t[ngClass]=\"{\n\t\t\t\t\t\t'cds--pagination__button--no-index': currentPage <= 1 || disabled\n\t\t\t\t\t}\"\n\t\t\t\t\ttabindex=\"0\"\n\t\t\t\t\t[attr.aria-label]=\"backwardText.subject | async\"\n\t\t\t\t\t(click)=\"selectPage.emit(previousPage)\"\n\t\t\t\t\t[disabled]=\"(currentPage <= 1 || disabled ? true : null)\">\n\t\t\t\t\t<svg cdsIcon=\"caret--left\" size=\"16\" class=\"cds--btn__icon\"></svg>\n\t\t\t\t</button>\n\n\t\t\t\t<button\n\t\t\t\t\tcdsButton=\"ghost\"\n\t\t\t\t\ticonOnly=\"true\"\n\t\t\t\t\tclass=\"\n\t\t\t\t\t\tcds--pagination__button\n\t\t\t\t\t\tcds--pagination__button--forward\"\n\t\t\t\t\t[ngClass]=\"{\n\t\t\t\t\t\t'cds--pagination__button--no-index': currentPage >= lastPage || disabled\n\t\t\t\t\t}\"\n\t\t\t\t\ttabindex=\"0\"\n\t\t\t\t\t[attr.aria-label]=\"forwardText.subject | async\"\n\t\t\t\t\t(click)=\"selectPage.emit(nextPage)\"\n\t\t\t\t\t[disabled]=\"(currentPage >= lastPage || disabled ? true : null)\">\n\t\t\t\t\t<svg cdsIcon=\"caret--right\" size=\"16\" class=\"cds--btn__icon\"></svg>\n\t\t\t\t</button>\n\t\t\t</div>\n\t\t</div>\n\t</div>\n\t`\n})\nexport class Pagination {\n\tstatic paginationCounter = 0;\n\n\t/**\n\t * Set to `true` for a loading pagination component.\n\t */\n\t@Input() skeleton = false;\n\t/**\n\t * `PaginationModel` with the information about pages you're controlling.\n\t */\n\t@Input() model: PaginationModel;\n\t/**\n \t * Set to `true` to disable the backward/forward buttons.\n\t */\n\t@Input() disabled = false;\n\t/**\n\t * Set to `true` to disable the select box that changes the page.\n\t */\n\t@Input() pageInputDisabled = false;\n\t/**\n\t * Controls wether or not to show the page selects\n\t */\n\t@Input() showPageInput = true;\n\t/**\n\t * Set to `true` if the total number of items is unknown.\n\t */\n\t@Input() pagesUnknown = false;\n\t@Input() pageSelectThreshold = 1000;\n\n\t/**\n\t * Expects an object that contains some or all of:\n\t * ```\n\t * {\n\t *\t\t\"ITEMS_PER_PAGE\": \"Items per page:\",\n\t *\t\t\"OPEN_LIST_OF_OPTIONS\": \"Open list of options\",\n\t *\t\t\"BACKWARD\": \"Backward\",\n\t *\t\t\"FORWARD\": \"Forward\",\n\t *\t\t\"TOTAL_ITEMS_UNKNOWN\": \"{{start}}-{{end}} items\",\n\t *\t\t\"TOTAL_ITEMS\": \"{{start}}-{{end}} of {{total}} items\",\n\t *\t\t\"TOTAL_ITEM\": \"{{start}}-{{end}} of {{total}} item\",\n\t *\t\t\"OF_LAST_PAGES\": \"of {{last}} pages\",\n\t *\t\t\"OF_LAST_PAGE\": \"of {{last}} page\"\n\t * }\n\t * ```\n\t */\n\t@Input()\n\tset translations (value: PaginationTranslations) {\n\t\tconst valueWithDefaults = merge(this.i18n.getMultiple(\"PAGINATION\"), value);\n\t\tthis.itemsPerPageText.override(valueWithDefaults.ITEMS_PER_PAGE);\n\t\tthis.optionsListText.override(valueWithDefaults.OPEN_LIST_OF_OPTIONS);\n\t\tthis.backwardText.override(valueWithDefaults.BACKWARD);\n\t\tthis.forwardText.override(valueWithDefaults.FORWARD);\n\t\tthis.totalItemsText.override(valueWithDefaults.TOTAL_ITEMS);\n\t\tthis.totalItemText.override(valueWithDefaults.TOTAL_ITEM);\n\t\tthis.totalItemsUnknownText.override(valueWithDefaults.TOTAL_ITEMS_UNKNOWN);\n\t\tthis.pageText.override(valueWithDefaults.PAGE);\n\t\tthis.ofLastPagesText.override(valueWithDefaults.OF_LAST_PAGES);\n\t\tthis.ofLastPageText.override(valueWithDefaults.OF_LAST_PAGE);\n\t}\n\n\t/**\n\t * Options for items per page select\n\t *\n\t * A default array of options will be defined: [10, 20, 30, 40, 50]\n\t */\n\t@Input() itemsPerPageOptions: number[] = [10, 20, 30, 40, 50];\n\n\t/**\n\t * Emits the new page number.\n\t *\n\t * You should tie into this and update `model.currentPage` once the fresh\n\t * data is finally loaded.\n\t */\n\t@Output() selectPage = new EventEmitter<number>();\n\n\tget itemsPerPage() {\n\t\treturn this.model.pageLength;\n\t}\n\tset itemsPerPage(value) {\n\t\tthis.model.pageLength = Number(value);\n\t\tthis.currentPage = 1; // reset page\n\t}\n\n\tget currentPage() {\n\t\treturn this.model.currentPage;\n\t}\n\tset currentPage(value) {\n\t\tvalue = Number(value);\n\t\t// emits the value to allow the user to update current page\n\t\t// in the model once the page is loaded\n\t\tthis.selectPage.emit(value);\n\t}\n\n\tget totalDataLength() {\n\t\treturn this.model.totalDataLength;\n\t}\n\t/**\n\t * The last page number to display in the pagination view.\n\t */\n\tget lastPage(): number {\n\t\tconst last = Math.ceil(this.totalDataLength / this.itemsPerPage);\n\t\treturn last > 0 ? last : 1;\n\t}\n\n\tget startItemIndex() {\n\t\treturn this.endItemIndex > 0 ? (this.currentPage - 1) * this.itemsPerPage + 1 : 0;\n\t}\n\n\tget endItemIndex() {\n\t\tconst projectedEndItemIndex = this.currentPage * this.itemsPerPage;\n\n\t\treturn projectedEndItemIndex < this.totalDataLength ? projectedEndItemIndex : this.totalDataLength;\n\t}\n\n\t/**\n\t * The previous page number to navigate to, from the current page.\n\t */\n\tget previousPage(): number {\n\t\treturn this.currentPage <= 1 ? 1 : this.currentPage - 1;\n\t}\n\n\t/**\n\t * The next page number to navigate to, from the current page.\n\t */\n\tget nextPage(): number {\n\t\tconst lastPage = this.lastPage;\n\t\treturn this.currentPage >= lastPage ? lastPage : this.currentPage + 1;\n\t}\n\n\tget pageOptions() {\n\t\tif (this.totalDataLength && this._pageOptions.length !== this.totalDataLength) {\n\t\t\tthis._pageOptions = Array(Math.ceil(this.totalDataLength / this.itemsPerPage));\n\t\t}\n\t\treturn this._pageOptions;\n\t}\n\n\titemsPerPageSelectId = `pagination-select-items-per-page-${Pagination.paginationCounter}`;\n\tcurrentPageSelectId = `pagination-select-current-page-${Pagination.paginationCounter}`;\n\n\titemsPerPageText = this.i18n.getOverridable(\"PAGINATION.ITEMS_PER_PAGE\");\n\toptionsListText = this.i18n.getOverridable(\"PAGINATION.OPEN_LIST_OF_OPTIONS\");\n\tbackwardText = this.i18n.getOverridable(\"PAGINATION.BACKWARD\");\n\tforwardText = this.i18n.getOverridable(\"PAGINATION.FORWARD\");\n\ttotalItemsText = this.i18n.getOverridable(\"PAGINATION.TOTAL_ITEMS\");\n\ttotalItemText = this.i18n.getOverridable(\"PAGINATION.TOTAL_ITEM\");\n\ttotalItemsUnknownText = this.i18n.getOverridable(\"PAGINATION.TOTAL_ITEMS_UNKNOWN\");\n\tpageText = this.i18n.getOverridable(\"PAGINATION.PAGE\");\n\tofLastPagesText = this.i18n.getOverridable(\"PAGINATION.OF_LAST_PAGES\");\n\tofLastPageText = this.i18n.getOverridable(\"PAGINATION.OF_LAST_PAGE\");\n\n\tprotected _pageOptions = [];\n\n\tconstructor(protected i18n: I18n, protected experimental: ExperimentalService) {\n\t\tPagination.paginationCounter++;\n\t}\n}\n",
|
|
1502
|
+
"sourceCode": "import { PaginationModel } from \"./pagination-model.class\";\nimport {\n\tComponent,\n\tInput,\n\tOutput,\n\tEventEmitter\n} from \"@angular/core\";\n\nimport { I18n, Overridable } from \"carbon-components-angular/i18n\";\nimport { ExperimentalService } from \"carbon-components-angular/experimental\";\nimport { merge } from \"carbon-components-angular/utils\";\n\nexport interface PaginationTranslations {\n\tITEMS_PER_PAGE: string;\n\tOPEN_LIST_OF_OPTIONS: string;\n\tBACKWARD: string;\n\tFORWARD: string;\n\tTOTAL_ITEMS_UNKNOWN: string;\n\tTOTAL_ITEMS: string;\n\tTOTAL_ITEM: string;\n\tOF_LAST_PAGES: string;\n\tOF_LAST_PAGE: string;\n}\n\n/**\n * Use pagination when you have multiple pages of data to handle. Get started with importing the module:\n *\n * ```typescript\n * import { PaginationModule } from 'carbon-components-angular';\n * ```\n *\n * ```html\n *\t<cds-pagination [model]=\"model\" (selectPage)=\"selectPage($event)\"></cds-pagination>\n * ```\n *\n * In your `selectPage()` method set the `model.currentPage` to selected page, _after_\n * you load the page.\n *\n * ```typescript\n * selectPage(page) {\n * \t// ... your code to load the page goes here\n *\n * \tthis.model.currentPage = page;\n *\n * \t// ... anything you want to do after page selection changes goes here\n * }\n * ```\n *\n * [See demo](../../?path=/story/components-pagination--basic)\n */\n@Component({\n\tselector: \"cds-pagination, ibm-pagination\",\n\ttemplate: `\n\t<div\n\t\tclass=\"cds--pagination\"\n\t\t[ngClass]=\"{\n\t\t\t'cds--skeleton': skeleton\n\t\t}\">\n\t\t<!-- left skeleton div -->\n\t\t<div *ngIf=\"skeleton\" class=\"cds--pagination__left\">\n\t\t\t<p class=\"cds--skeleton__text\" style=\"width: 70px\"></p>\n\t\t\t<p class=\"cds--skeleton__text\" style=\"width: 35px\"></p>\n\t\t\t<p class=\"cds--skeleton__text\" style=\"width: 105px\"></p>\n\t\t</div>\n\n\t\t<div *ngIf=\"!skeleton\" class=\"cds--pagination__left\">\n\t\t\t<ng-container *ngIf=\"showPageInput\">\n\t\t\t\t<label class=\"cds--pagination__text\" [for]=\"itemsPerPageSelectId\">\n\t\t\t\t\t{{itemsPerPageText.subject | async}}\n\t\t\t\t</label>\n\t\t\t\t<div\n\t\t\t\t\tclass=\"cds--select cds--select--inline cds--select__item-count\"\n\t\t\t\t\t[class.cds--select--disabled]=\"pageInputDisabled\">\n\t\t\t\t\t<select\n\t\t\t\t\t\t[id]=\"itemsPerPageSelectId\"\n\t\t\t\t\t\t[(ngModel)]=\"itemsPerPage\"\n\t\t\t\t\t\t[disabled]=\"pageInputDisabled\"\n\t\t\t\t\t\tclass=\"cds--select-input\">\n\t\t\t\t\t\t<option\n\t\t\t\t\t\t\tclass=\"cds--select-option\"\n\t\t\t\t\t\t\t*ngFor=\"let option of itemsPerPageOptions\"\n\t\t\t\t\t\t\t[value]=\"option\">\n\t\t\t\t\t\t\t\t{{ option }}\n\t\t\t\t\t\t</option>\n\t\t\t\t\t</select>\n\t\t\t\t\t<svg\n\t\t\t\t\t\tcdsIcon=\"chevron--down\"\n\t\t\t\t\t\tsize=\"16\"\n\t\t\t\t\t\tstyle=\"display: inherit\"\n\t\t\t\t\t\tclass=\"cds--select__arrow\"\n\t\t\t\t\t\taria-hidden=\"true\"\n\t\t\t\t\t\t[attr.ariaLabel]=\"optionsListText.subject | async\">\n\t\t\t\t\t</svg>\n\t\t\t\t</div>\n\t\t\t</ng-container>\n\t\t\t<span *ngIf=\"!pagesUnknown && totalDataLength <= 1\" class=\"cds--pagination__text cds--pagination__items-count\" [ngStyle]=\"{'margin-left': showPageInput ? null : 0}\">\n\t\t\t\t{{totalItemText.subject | i18nReplace:{start: startItemIndex, end: endItemIndex, total: totalDataLength } | async}}\n\t\t\t</span>\n\t\t\t<span *ngIf=\"!pagesUnknown && totalDataLength > 1\" class=\"cds--pagination__text cds--pagination__items-count\" [ngStyle]=\"{'margin-left': showPageInput ? null : 0}\">\n\t\t\t\t{{totalItemsText.subject | i18nReplace:{start: startItemIndex, end: endItemIndex, total: totalDataLength } | async}}\n\t\t\t</span>\n\t\t\t<span *ngIf=\"pagesUnknown\" class=\"cds--pagination__text cds--pagination__items-count\" [ngStyle]=\"{'margin-left': showPageInput ? null : 0}\">\n\t\t\t\t{{totalItemsUnknownText.subject | i18nReplace:{start: startItemIndex, end: endItemIndex } | async}}\n\t\t\t</span>\n\t\t</div>\n\n\t\t<!-- right skeleton div -->\n\t\t<div *ngIf=\"skeleton\" class=\"cds--pagination__right\">\n\t\t\t<p class=\"cds--skeleton__text\" style=\"width: 70px\"></p>\n\t\t</div>\n\n\t\t<div *ngIf=\"!skeleton\" class=\"cds--pagination__right\">\n\t\t\t<span *ngIf=\"pagesUnknown\" class=\"cds--pagination__text cds--pagination__page-text\">\n\t\t\t\t<ng-container *ngIf=\"!showPageInput\">{{currentPage}}</ng-container>\n\t\t\t\t{{pageText.subject | async}}\n\t\t\t</span>\n\t\t\t<ng-container *ngIf=\"showPageInput\">\n\t\t\t\t<div\n\t\t\t\t\tclass=\"cds--select cds--select--inline cds--select__page-number\"\n\t\t\t\t\t[class.cds--select--disabled]=\"pageInputDisabled\">\n\t\t\t\t\t<label [for]=\"currentPageSelectId\" class=\"cds--label cds--visually-hidden\">{{pageText.subject | async}}</label>\n\t\t\t\t\t<input\n\t\t\t\t\t\t*ngIf=\"pageOptions.length > pageSelectThreshold\"\n\t\t\t\t\t\tstyle=\"padding-right: 1rem; margin-right: 1rem;\"\n\t\t\t\t\t\t[id]=\"currentPageSelectId\"\n\t\t\t\t\t\ttype=\"number\"\n\t\t\t\t\t\tmin=\"1\"\n\t\t\t\t\t\t[max]=\"pageOptions.length\"\n\t\t\t\t\t\tclass=\"cds--select-input\"\n\t\t\t\t\t\t[(ngModel)]=\"currentPage\">\n\t\t\t\t\t<select\n\t\t\t\t\t\t*ngIf=\"pageOptions.length <= pageSelectThreshold\"\n\t\t\t\t\t\t[id]=\"currentPageSelectId\"\n\t\t\t\t\t\tclass=\"cds--select-input\"\n\t\t\t\t\t\t[disabled]=\"pageInputDisabled\"\n\t\t\t\t\t\t[(ngModel)]=\"currentPage\">\n\t\t\t\t\t\t<option *ngFor=\"let page of pageOptions; let i = index;\" class=\"cds--select-option\" [value]=\"i + 1\">{{i + 1}}</option>\n\t\t\t\t\t</select>\n\t\t\t\t\t<svg\n\t\t\t\t\t\t*ngIf=\"pageOptions.length <= 1000\"\n\t\t\t\t\t\tcdsIcon=\"chevron--down\"\n\t\t\t\t\t\tsize=\"16\"\n\t\t\t\t\t\tstyle=\"display: inherit;\"\n\t\t\t\t\t\tclass=\"cds--select__arrow\"\n\t\t\t\t\t\t[attr.ariaLabel]=\"optionsListText.subject | async\">\n\t\t\t\t\t</svg>\n\t\t\t\t</div>\n\t\t\t</ng-container>\n\n\t\t\t<span *ngIf=\"!pagesUnknown && lastPage <= 1\" class=\"cds--pagination__text\">\n\t\t\t\t<ng-container *ngIf=\"!showPageInput\">{{currentPage}}</ng-container>\n\t\t\t\t{{ofLastPageText.subject | i18nReplace: {last: lastPage} | async}}\n\t\t\t</span>\n\t\t\t<span *ngIf=\"!pagesUnknown && lastPage > 1\" class=\"cds--pagination__text\">\n\t\t\t\t<ng-container *ngIf=\"!showPageInput\">{{currentPage}}</ng-container>\n\t\t\t\t{{ofLastPagesText.subject | i18nReplace: {last: lastPage} | async}}\n\t\t\t</span>\n\t\t\t<div class=\"cds--pagination__control-buttons\">\n\t\t\t\t<button\n\t\t\t\t\tcdsButton=\"ghost\"\n\t\t\t\t\ticonOnly=\"true\"\n\t\t\t\t\tclass=\"cds--pagination__button cds--pagination__button--backward\"\n\t\t\t\t\t[ngClass]=\"{\n\t\t\t\t\t\t'cds--pagination__button--no-index': currentPage <= 1 || disabled\n\t\t\t\t\t}\"\n\t\t\t\t\ttabindex=\"0\"\n\t\t\t\t\t[attr.aria-label]=\"backwardText.subject | async\"\n\t\t\t\t\t(click)=\"selectPage.emit(previousPage)\"\n\t\t\t\t\t[disabled]=\"(currentPage <= 1 || disabled ? true : null)\">\n\t\t\t\t\t<svg cdsIcon=\"caret--left\" size=\"16\" class=\"cds--btn__icon\"></svg>\n\t\t\t\t</button>\n\n\t\t\t\t<button\n\t\t\t\t\tcdsButton=\"ghost\"\n\t\t\t\t\ticonOnly=\"true\"\n\t\t\t\t\tclass=\"\n\t\t\t\t\t\tcds--pagination__button\n\t\t\t\t\t\tcds--pagination__button--forward\"\n\t\t\t\t\t[ngClass]=\"{\n\t\t\t\t\t\t'cds--pagination__button--no-index': currentPage >= lastPage || disabled\n\t\t\t\t\t}\"\n\t\t\t\t\ttabindex=\"0\"\n\t\t\t\t\t[attr.aria-label]=\"forwardText.subject | async\"\n\t\t\t\t\t(click)=\"selectPage.emit(nextPage)\"\n\t\t\t\t\t[disabled]=\"(currentPage >= lastPage || disabled ? true : null)\">\n\t\t\t\t\t<svg cdsIcon=\"caret--right\" size=\"16\" class=\"cds--btn__icon\"></svg>\n\t\t\t\t</button>\n\t\t\t</div>\n\t\t</div>\n\t</div>\n\t`\n})\nexport class Pagination {\n\tstatic paginationCounter = 0;\n\n\t/**\n\t * Set to `true` for a loading pagination component.\n\t */\n\t@Input() skeleton = false;\n\t/**\n\t * `PaginationModel` with the information about pages you're controlling.\n\t */\n\t@Input() model: PaginationModel;\n\t/**\n \t * Set to `true` to disable the backward/forward buttons.\n\t */\n\t@Input() disabled = false;\n\t/**\n\t * Set to `true` to disable the select box that changes the page.\n\t */\n\t@Input() pageInputDisabled = false;\n\t/**\n\t * Controls wether or not to show the page selects\n\t */\n\t@Input() showPageInput = true;\n\t/**\n\t * Set to `true` if the total number of items is unknown.\n\t */\n\t@Input() pagesUnknown = false;\n\t@Input() pageSelectThreshold = 1000;\n\n\t/**\n\t * Expects an object that contains some or all of:\n\t * ```\n\t * {\n\t *\t\t\"ITEMS_PER_PAGE\": \"Items per page:\",\n\t *\t\t\"OPEN_LIST_OF_OPTIONS\": \"Open list of options\",\n\t *\t\t\"BACKWARD\": \"Backward\",\n\t *\t\t\"FORWARD\": \"Forward\",\n\t *\t\t\"TOTAL_ITEMS_UNKNOWN\": \"{{start}}-{{end}} items\",\n\t *\t\t\"TOTAL_ITEMS\": \"{{start}}-{{end}} of {{total}} items\",\n\t *\t\t\"TOTAL_ITEM\": \"{{start}}-{{end}} of {{total}} item\",\n\t *\t\t\"OF_LAST_PAGES\": \"of {{last}} pages\",\n\t *\t\t\"OF_LAST_PAGE\": \"of {{last}} page\"\n\t * }\n\t * ```\n\t */\n\t@Input()\n\tset translations (value: PaginationTranslations) {\n\t\tconst valueWithDefaults = merge(this.i18n.getMultiple(\"PAGINATION\"), value);\n\t\tthis.itemsPerPageText.override(valueWithDefaults.ITEMS_PER_PAGE);\n\t\tthis.optionsListText.override(valueWithDefaults.OPEN_LIST_OF_OPTIONS);\n\t\tthis.backwardText.override(valueWithDefaults.BACKWARD);\n\t\tthis.forwardText.override(valueWithDefaults.FORWARD);\n\t\tthis.totalItemsText.override(valueWithDefaults.TOTAL_ITEMS);\n\t\tthis.totalItemText.override(valueWithDefaults.TOTAL_ITEM);\n\t\tthis.totalItemsUnknownText.override(valueWithDefaults.TOTAL_ITEMS_UNKNOWN);\n\t\tthis.pageText.override(valueWithDefaults.PAGE);\n\t\tthis.ofLastPagesText.override(valueWithDefaults.OF_LAST_PAGES);\n\t\tthis.ofLastPageText.override(valueWithDefaults.OF_LAST_PAGE);\n\t}\n\n\t/**\n\t * Options for items per page select\n\t *\n\t * A default array of options will be defined: [10, 20, 30, 40, 50]\n\t */\n\t@Input() itemsPerPageOptions: number[] = [10, 20, 30, 40, 50];\n\n\t/**\n\t * Emits the new page number.\n\t *\n\t * You should tie into this and update `model.currentPage` once the fresh\n\t * data is finally loaded.\n\t */\n\t@Output() selectPage = new EventEmitter<number>();\n\n\tget itemsPerPage() {\n\t\treturn this.model.pageLength;\n\t}\n\tset itemsPerPage(value) {\n\t\tthis.model.pageLength = Number(value);\n\t\tthis.currentPage = 1; // reset page\n\t}\n\n\tget currentPage() {\n\t\treturn this.model.currentPage;\n\t}\n\tset currentPage(value) {\n\t\tvalue = Number(value);\n\t\t// emits the value to allow the user to update current page\n\t\t// in the model once the page is loaded\n\t\tthis.selectPage.emit(value);\n\t}\n\n\tget totalDataLength() {\n\t\treturn this.model.totalDataLength;\n\t}\n\t/**\n\t * The last page number to display in the pagination view.\n\t */\n\tget lastPage(): number {\n\t\tconst last = Math.ceil(this.totalDataLength / this.itemsPerPage);\n\t\treturn last > 0 ? last : 1;\n\t}\n\n\tget startItemIndex() {\n\t\treturn this.endItemIndex > 0 ? (this.currentPage - 1) * this.itemsPerPage + 1 : 0;\n\t}\n\n\tget endItemIndex() {\n\t\tconst projectedEndItemIndex = this.currentPage * this.itemsPerPage;\n\n\t\treturn projectedEndItemIndex < this.totalDataLength ? projectedEndItemIndex : this.totalDataLength;\n\t}\n\n\t/**\n\t * The previous page number to navigate to, from the current page.\n\t */\n\tget previousPage(): number {\n\t\treturn this.currentPage <= 1 ? 1 : this.currentPage - 1;\n\t}\n\n\t/**\n\t * The next page number to navigate to, from the current page.\n\t */\n\tget nextPage(): number {\n\t\tconst lastPage = this.lastPage;\n\t\treturn this.currentPage >= lastPage ? lastPage : this.currentPage + 1;\n\t}\n\n\tget pageOptions() {\n\t\t/**\n\t\t * Calculate number of pages based on totalDataLength and itemsPerPage.\n\t\t * Even if totalDataLength is 0, numberOfPages should be always at least 1.\n\t\t * New array will be constructed only if number of pages changes.\n\t\t */\n\t\tconst numberOfPages = Math.max(Math.ceil(this.totalDataLength / this.itemsPerPage), 1);\n\t\tif (this._pageOptions.length !== numberOfPages) {\n\t\t\tthis._pageOptions = Array(numberOfPages);\n\t\t}\n\t\treturn this._pageOptions;\n\t}\n\n\titemsPerPageSelectId = `pagination-select-items-per-page-${Pagination.paginationCounter}`;\n\tcurrentPageSelectId = `pagination-select-current-page-${Pagination.paginationCounter}`;\n\n\titemsPerPageText = this.i18n.getOverridable(\"PAGINATION.ITEMS_PER_PAGE\");\n\toptionsListText = this.i18n.getOverridable(\"PAGINATION.OPEN_LIST_OF_OPTIONS\");\n\tbackwardText = this.i18n.getOverridable(\"PAGINATION.BACKWARD\");\n\tforwardText = this.i18n.getOverridable(\"PAGINATION.FORWARD\");\n\ttotalItemsText = this.i18n.getOverridable(\"PAGINATION.TOTAL_ITEMS\");\n\ttotalItemText = this.i18n.getOverridable(\"PAGINATION.TOTAL_ITEM\");\n\ttotalItemsUnknownText = this.i18n.getOverridable(\"PAGINATION.TOTAL_ITEMS_UNKNOWN\");\n\tpageText = this.i18n.getOverridable(\"PAGINATION.PAGE\");\n\tofLastPagesText = this.i18n.getOverridable(\"PAGINATION.OF_LAST_PAGES\");\n\tofLastPageText = this.i18n.getOverridable(\"PAGINATION.OF_LAST_PAGE\");\n\n\tprotected _pageOptions = [];\n\n\tconstructor(protected i18n: I18n, protected experimental: ExperimentalService) {\n\t\tPagination.paginationCounter++;\n\t}\n}\n",
|
|
1503
1503
|
"properties": [
|
|
1504
1504
|
{
|
|
1505
1505
|
"name": "BACKWARD",
|
|
@@ -40764,7 +40764,7 @@
|
|
|
40764
40764
|
},
|
|
40765
40765
|
{
|
|
40766
40766
|
"name": "Pagination",
|
|
40767
|
-
"id": "component-Pagination-
|
|
40767
|
+
"id": "component-Pagination-68e44f1d874d0084c3576887d1f200e8de5d280aa1a937a63ba62b784e025e51ebb3911f25da596d94907ae47db094993997fc8e2b9d08cde1d63d69567770a1",
|
|
40768
40768
|
"file": "src/pagination/pagination.component.ts",
|
|
40769
40769
|
"encapsulation": [],
|
|
40770
40770
|
"entryComponents": [],
|
|
@@ -40896,7 +40896,7 @@
|
|
|
40896
40896
|
"type": "",
|
|
40897
40897
|
"optional": false,
|
|
40898
40898
|
"description": "",
|
|
40899
|
-
"line":
|
|
40899
|
+
"line": 340
|
|
40900
40900
|
},
|
|
40901
40901
|
{
|
|
40902
40902
|
"name": "currentPageSelectId",
|
|
@@ -40906,7 +40906,7 @@
|
|
|
40906
40906
|
"type": "",
|
|
40907
40907
|
"optional": false,
|
|
40908
40908
|
"description": "",
|
|
40909
|
-
"line":
|
|
40909
|
+
"line": 336
|
|
40910
40910
|
},
|
|
40911
40911
|
{
|
|
40912
40912
|
"name": "forwardText",
|
|
@@ -40916,7 +40916,7 @@
|
|
|
40916
40916
|
"type": "",
|
|
40917
40917
|
"optional": false,
|
|
40918
40918
|
"description": "",
|
|
40919
|
-
"line":
|
|
40919
|
+
"line": 341
|
|
40920
40920
|
},
|
|
40921
40921
|
{
|
|
40922
40922
|
"name": "itemsPerPageSelectId",
|
|
@@ -40926,7 +40926,7 @@
|
|
|
40926
40926
|
"type": "",
|
|
40927
40927
|
"optional": false,
|
|
40928
40928
|
"description": "",
|
|
40929
|
-
"line":
|
|
40929
|
+
"line": 335
|
|
40930
40930
|
},
|
|
40931
40931
|
{
|
|
40932
40932
|
"name": "itemsPerPageText",
|
|
@@ -40936,7 +40936,7 @@
|
|
|
40936
40936
|
"type": "",
|
|
40937
40937
|
"optional": false,
|
|
40938
40938
|
"description": "",
|
|
40939
|
-
"line":
|
|
40939
|
+
"line": 338
|
|
40940
40940
|
},
|
|
40941
40941
|
{
|
|
40942
40942
|
"name": "ofLastPagesText",
|
|
@@ -40946,7 +40946,7 @@
|
|
|
40946
40946
|
"type": "",
|
|
40947
40947
|
"optional": false,
|
|
40948
40948
|
"description": "",
|
|
40949
|
-
"line":
|
|
40949
|
+
"line": 346
|
|
40950
40950
|
},
|
|
40951
40951
|
{
|
|
40952
40952
|
"name": "ofLastPageText",
|
|
@@ -40956,7 +40956,7 @@
|
|
|
40956
40956
|
"type": "",
|
|
40957
40957
|
"optional": false,
|
|
40958
40958
|
"description": "",
|
|
40959
|
-
"line":
|
|
40959
|
+
"line": 347
|
|
40960
40960
|
},
|
|
40961
40961
|
{
|
|
40962
40962
|
"name": "optionsListText",
|
|
@@ -40966,7 +40966,7 @@
|
|
|
40966
40966
|
"type": "",
|
|
40967
40967
|
"optional": false,
|
|
40968
40968
|
"description": "",
|
|
40969
|
-
"line":
|
|
40969
|
+
"line": 339
|
|
40970
40970
|
},
|
|
40971
40971
|
{
|
|
40972
40972
|
"name": "pageText",
|
|
@@ -40976,7 +40976,7 @@
|
|
|
40976
40976
|
"type": "",
|
|
40977
40977
|
"optional": false,
|
|
40978
40978
|
"description": "",
|
|
40979
|
-
"line":
|
|
40979
|
+
"line": 345
|
|
40980
40980
|
},
|
|
40981
40981
|
{
|
|
40982
40982
|
"name": "paginationCounter",
|
|
@@ -40999,7 +40999,7 @@
|
|
|
40999
40999
|
"type": "",
|
|
41000
41000
|
"optional": false,
|
|
41001
41001
|
"description": "",
|
|
41002
|
-
"line":
|
|
41002
|
+
"line": 342
|
|
41003
41003
|
},
|
|
41004
41004
|
{
|
|
41005
41005
|
"name": "totalItemsUnknownText",
|
|
@@ -41009,7 +41009,7 @@
|
|
|
41009
41009
|
"type": "",
|
|
41010
41010
|
"optional": false,
|
|
41011
41011
|
"description": "",
|
|
41012
|
-
"line":
|
|
41012
|
+
"line": 344
|
|
41013
41013
|
},
|
|
41014
41014
|
{
|
|
41015
41015
|
"name": "totalItemText",
|
|
@@ -41019,7 +41019,7 @@
|
|
|
41019
41019
|
"type": "",
|
|
41020
41020
|
"optional": false,
|
|
41021
41021
|
"description": "",
|
|
41022
|
-
"line":
|
|
41022
|
+
"line": 343
|
|
41023
41023
|
}
|
|
41024
41024
|
],
|
|
41025
41025
|
"methodsClass": [],
|
|
@@ -41032,7 +41032,7 @@
|
|
|
41032
41032
|
"description": "<p>Use pagination when you have multiple pages of data to handle. Get started with importing the module:</p>\n<b>Example :</b><div><pre class=\"line-numbers\"><code class=\"language-typescript\">import { PaginationModule } from 'carbon-components-angular';</code></pre></div><b>Example :</b><div><pre class=\"line-numbers\"><code class=\"language-html\"> <cds-pagination [model]="model" (selectPage)="selectPage($event)"></cds-pagination></code></pre></div><p>In your <code>selectPage()</code> method set the <code>model.currentPage</code> to selected page, <em>after</em>\nyou load the page.</p>\n<b>Example :</b><div><pre class=\"line-numbers\"><code class=\"language-typescript\">selectPage(page) {\n // ... your code to load the page goes here\n\n this.model.currentPage = page;\n\n // ... anything you want to do after page selection changes goes here\n}</code></pre></div><p><a href=\"../../?path=/story/components-pagination--basic\">See demo</a></p>\n",
|
|
41033
41033
|
"rawdescription": "\n\nUse pagination when you have multiple pages of data to handle. Get started with importing the module:\n\n```typescript\nimport { PaginationModule } from 'carbon-components-angular';\n```\n\n```html\n\t<cds-pagination [model]=\"model\" (selectPage)=\"selectPage($event)\"></cds-pagination>\n```\n\nIn your `selectPage()` method set the `model.currentPage` to selected page, _after_\nyou load the page.\n\n```typescript\nselectPage(page) {\n\t// ... your code to load the page goes here\n\n\tthis.model.currentPage = page;\n\n\t// ... anything you want to do after page selection changes goes here\n}\n```\n\n[See demo](../../?path=/story/components-pagination--basic)\n",
|
|
41034
41034
|
"type": "component",
|
|
41035
|
-
"sourceCode": "import { PaginationModel } from \"./pagination-model.class\";\nimport {\n\tComponent,\n\tInput,\n\tOutput,\n\tEventEmitter\n} from \"@angular/core\";\n\nimport { I18n, Overridable } from \"carbon-components-angular/i18n\";\nimport { ExperimentalService } from \"carbon-components-angular/experimental\";\nimport { merge } from \"carbon-components-angular/utils\";\n\nexport interface PaginationTranslations {\n\tITEMS_PER_PAGE: string;\n\tOPEN_LIST_OF_OPTIONS: string;\n\tBACKWARD: string;\n\tFORWARD: string;\n\tTOTAL_ITEMS_UNKNOWN: string;\n\tTOTAL_ITEMS: string;\n\tTOTAL_ITEM: string;\n\tOF_LAST_PAGES: string;\n\tOF_LAST_PAGE: string;\n}\n\n/**\n * Use pagination when you have multiple pages of data to handle. Get started with importing the module:\n *\n * ```typescript\n * import { PaginationModule } from 'carbon-components-angular';\n * ```\n *\n * ```html\n *\t<cds-pagination [model]=\"model\" (selectPage)=\"selectPage($event)\"></cds-pagination>\n * ```\n *\n * In your `selectPage()` method set the `model.currentPage` to selected page, _after_\n * you load the page.\n *\n * ```typescript\n * selectPage(page) {\n * \t// ... your code to load the page goes here\n *\n * \tthis.model.currentPage = page;\n *\n * \t// ... anything you want to do after page selection changes goes here\n * }\n * ```\n *\n * [See demo](../../?path=/story/components-pagination--basic)\n */\n@Component({\n\tselector: \"cds-pagination, ibm-pagination\",\n\ttemplate: `\n\t<div\n\t\tclass=\"cds--pagination\"\n\t\t[ngClass]=\"{\n\t\t\t'cds--skeleton': skeleton\n\t\t}\">\n\t\t<!-- left skeleton div -->\n\t\t<div *ngIf=\"skeleton\" class=\"cds--pagination__left\">\n\t\t\t<p class=\"cds--skeleton__text\" style=\"width: 70px\"></p>\n\t\t\t<p class=\"cds--skeleton__text\" style=\"width: 35px\"></p>\n\t\t\t<p class=\"cds--skeleton__text\" style=\"width: 105px\"></p>\n\t\t</div>\n\n\t\t<div *ngIf=\"!skeleton\" class=\"cds--pagination__left\">\n\t\t\t<ng-container *ngIf=\"showPageInput\">\n\t\t\t\t<label class=\"cds--pagination__text\" [for]=\"itemsPerPageSelectId\">\n\t\t\t\t\t{{itemsPerPageText.subject | async}}\n\t\t\t\t</label>\n\t\t\t\t<div\n\t\t\t\t\tclass=\"cds--select cds--select--inline cds--select__item-count\"\n\t\t\t\t\t[class.cds--select--disabled]=\"pageInputDisabled\">\n\t\t\t\t\t<select\n\t\t\t\t\t\t[id]=\"itemsPerPageSelectId\"\n\t\t\t\t\t\t[(ngModel)]=\"itemsPerPage\"\n\t\t\t\t\t\t[disabled]=\"pageInputDisabled\"\n\t\t\t\t\t\tclass=\"cds--select-input\">\n\t\t\t\t\t\t<option\n\t\t\t\t\t\t\tclass=\"cds--select-option\"\n\t\t\t\t\t\t\t*ngFor=\"let option of itemsPerPageOptions\"\n\t\t\t\t\t\t\t[value]=\"option\">\n\t\t\t\t\t\t\t\t{{ option }}\n\t\t\t\t\t\t</option>\n\t\t\t\t\t</select>\n\t\t\t\t\t<svg\n\t\t\t\t\t\tcdsIcon=\"chevron--down\"\n\t\t\t\t\t\tsize=\"16\"\n\t\t\t\t\t\tstyle=\"display: inherit\"\n\t\t\t\t\t\tclass=\"cds--select__arrow\"\n\t\t\t\t\t\taria-hidden=\"true\"\n\t\t\t\t\t\t[attr.ariaLabel]=\"optionsListText.subject | async\">\n\t\t\t\t\t</svg>\n\t\t\t\t</div>\n\t\t\t</ng-container>\n\t\t\t<span *ngIf=\"!pagesUnknown && totalDataLength <= 1\" class=\"cds--pagination__text cds--pagination__items-count\" [ngStyle]=\"{'margin-left': showPageInput ? null : 0}\">\n\t\t\t\t{{totalItemText.subject | i18nReplace:{start: startItemIndex, end: endItemIndex, total: totalDataLength } | async}}\n\t\t\t</span>\n\t\t\t<span *ngIf=\"!pagesUnknown && totalDataLength > 1\" class=\"cds--pagination__text cds--pagination__items-count\" [ngStyle]=\"{'margin-left': showPageInput ? null : 0}\">\n\t\t\t\t{{totalItemsText.subject | i18nReplace:{start: startItemIndex, end: endItemIndex, total: totalDataLength } | async}}\n\t\t\t</span>\n\t\t\t<span *ngIf=\"pagesUnknown\" class=\"cds--pagination__text cds--pagination__items-count\" [ngStyle]=\"{'margin-left': showPageInput ? null : 0}\">\n\t\t\t\t{{totalItemsUnknownText.subject | i18nReplace:{start: startItemIndex, end: endItemIndex } | async}}\n\t\t\t</span>\n\t\t</div>\n\n\t\t<!-- right skeleton div -->\n\t\t<div *ngIf=\"skeleton\" class=\"cds--pagination__right\">\n\t\t\t<p class=\"cds--skeleton__text\" style=\"width: 70px\"></p>\n\t\t</div>\n\n\t\t<div *ngIf=\"!skeleton\" class=\"cds--pagination__right\">\n\t\t\t<span *ngIf=\"pagesUnknown\" class=\"cds--pagination__text cds--pagination__page-text\">\n\t\t\t\t<ng-container *ngIf=\"!showPageInput\">{{currentPage}}</ng-container>\n\t\t\t\t{{pageText.subject | async}}\n\t\t\t</span>\n\t\t\t<ng-container *ngIf=\"showPageInput\">\n\t\t\t\t<div\n\t\t\t\t\tclass=\"cds--select cds--select--inline cds--select__page-number\"\n\t\t\t\t\t[class.cds--select--disabled]=\"pageInputDisabled\">\n\t\t\t\t\t<label [for]=\"currentPageSelectId\" class=\"cds--label cds--visually-hidden\">{{pageText.subject | async}}</label>\n\t\t\t\t\t<input\n\t\t\t\t\t\t*ngIf=\"pageOptions.length > pageSelectThreshold\"\n\t\t\t\t\t\tstyle=\"padding-right: 1rem; margin-right: 1rem;\"\n\t\t\t\t\t\t[id]=\"currentPageSelectId\"\n\t\t\t\t\t\ttype=\"number\"\n\t\t\t\t\t\tmin=\"1\"\n\t\t\t\t\t\t[max]=\"pageOptions.length\"\n\t\t\t\t\t\tclass=\"cds--select-input\"\n\t\t\t\t\t\t[(ngModel)]=\"currentPage\">\n\t\t\t\t\t<select\n\t\t\t\t\t\t*ngIf=\"pageOptions.length <= pageSelectThreshold\"\n\t\t\t\t\t\t[id]=\"currentPageSelectId\"\n\t\t\t\t\t\tclass=\"cds--select-input\"\n\t\t\t\t\t\t[disabled]=\"pageInputDisabled\"\n\t\t\t\t\t\t[(ngModel)]=\"currentPage\">\n\t\t\t\t\t\t<option *ngFor=\"let page of pageOptions; let i = index;\" class=\"cds--select-option\" [value]=\"i + 1\">{{i + 1}}</option>\n\t\t\t\t\t</select>\n\t\t\t\t\t<svg\n\t\t\t\t\t\t*ngIf=\"pageOptions.length <= 1000\"\n\t\t\t\t\t\tcdsIcon=\"chevron--down\"\n\t\t\t\t\t\tsize=\"16\"\n\t\t\t\t\t\tstyle=\"display: inherit;\"\n\t\t\t\t\t\tclass=\"cds--select__arrow\"\n\t\t\t\t\t\t[attr.ariaLabel]=\"optionsListText.subject | async\">\n\t\t\t\t\t</svg>\n\t\t\t\t</div>\n\t\t\t</ng-container>\n\n\t\t\t<span *ngIf=\"!pagesUnknown && lastPage <= 1\" class=\"cds--pagination__text\">\n\t\t\t\t<ng-container *ngIf=\"!showPageInput\">{{currentPage}}</ng-container>\n\t\t\t\t{{ofLastPageText.subject | i18nReplace: {last: lastPage} | async}}\n\t\t\t</span>\n\t\t\t<span *ngIf=\"!pagesUnknown && lastPage > 1\" class=\"cds--pagination__text\">\n\t\t\t\t<ng-container *ngIf=\"!showPageInput\">{{currentPage}}</ng-container>\n\t\t\t\t{{ofLastPagesText.subject | i18nReplace: {last: lastPage} | async}}\n\t\t\t</span>\n\t\t\t<div class=\"cds--pagination__control-buttons\">\n\t\t\t\t<button\n\t\t\t\t\tcdsButton=\"ghost\"\n\t\t\t\t\ticonOnly=\"true\"\n\t\t\t\t\tclass=\"cds--pagination__button cds--pagination__button--backward\"\n\t\t\t\t\t[ngClass]=\"{\n\t\t\t\t\t\t'cds--pagination__button--no-index': currentPage <= 1 || disabled\n\t\t\t\t\t}\"\n\t\t\t\t\ttabindex=\"0\"\n\t\t\t\t\t[attr.aria-label]=\"backwardText.subject | async\"\n\t\t\t\t\t(click)=\"selectPage.emit(previousPage)\"\n\t\t\t\t\t[disabled]=\"(currentPage <= 1 || disabled ? true : null)\">\n\t\t\t\t\t<svg cdsIcon=\"caret--left\" size=\"16\" class=\"cds--btn__icon\"></svg>\n\t\t\t\t</button>\n\n\t\t\t\t<button\n\t\t\t\t\tcdsButton=\"ghost\"\n\t\t\t\t\ticonOnly=\"true\"\n\t\t\t\t\tclass=\"\n\t\t\t\t\t\tcds--pagination__button\n\t\t\t\t\t\tcds--pagination__button--forward\"\n\t\t\t\t\t[ngClass]=\"{\n\t\t\t\t\t\t'cds--pagination__button--no-index': currentPage >= lastPage || disabled\n\t\t\t\t\t}\"\n\t\t\t\t\ttabindex=\"0\"\n\t\t\t\t\t[attr.aria-label]=\"forwardText.subject | async\"\n\t\t\t\t\t(click)=\"selectPage.emit(nextPage)\"\n\t\t\t\t\t[disabled]=\"(currentPage >= lastPage || disabled ? true : null)\">\n\t\t\t\t\t<svg cdsIcon=\"caret--right\" size=\"16\" class=\"cds--btn__icon\"></svg>\n\t\t\t\t</button>\n\t\t\t</div>\n\t\t</div>\n\t</div>\n\t`\n})\nexport class Pagination {\n\tstatic paginationCounter = 0;\n\n\t/**\n\t * Set to `true` for a loading pagination component.\n\t */\n\t@Input() skeleton = false;\n\t/**\n\t * `PaginationModel` with the information about pages you're controlling.\n\t */\n\t@Input() model: PaginationModel;\n\t/**\n \t * Set to `true` to disable the backward/forward buttons.\n\t */\n\t@Input() disabled = false;\n\t/**\n\t * Set to `true` to disable the select box that changes the page.\n\t */\n\t@Input() pageInputDisabled = false;\n\t/**\n\t * Controls wether or not to show the page selects\n\t */\n\t@Input() showPageInput = true;\n\t/**\n\t * Set to `true` if the total number of items is unknown.\n\t */\n\t@Input() pagesUnknown = false;\n\t@Input() pageSelectThreshold = 1000;\n\n\t/**\n\t * Expects an object that contains some or all of:\n\t * ```\n\t * {\n\t *\t\t\"ITEMS_PER_PAGE\": \"Items per page:\",\n\t *\t\t\"OPEN_LIST_OF_OPTIONS\": \"Open list of options\",\n\t *\t\t\"BACKWARD\": \"Backward\",\n\t *\t\t\"FORWARD\": \"Forward\",\n\t *\t\t\"TOTAL_ITEMS_UNKNOWN\": \"{{start}}-{{end}} items\",\n\t *\t\t\"TOTAL_ITEMS\": \"{{start}}-{{end}} of {{total}} items\",\n\t *\t\t\"TOTAL_ITEM\": \"{{start}}-{{end}} of {{total}} item\",\n\t *\t\t\"OF_LAST_PAGES\": \"of {{last}} pages\",\n\t *\t\t\"OF_LAST_PAGE\": \"of {{last}} page\"\n\t * }\n\t * ```\n\t */\n\t@Input()\n\tset translations (value: PaginationTranslations) {\n\t\tconst valueWithDefaults = merge(this.i18n.getMultiple(\"PAGINATION\"), value);\n\t\tthis.itemsPerPageText.override(valueWithDefaults.ITEMS_PER_PAGE);\n\t\tthis.optionsListText.override(valueWithDefaults.OPEN_LIST_OF_OPTIONS);\n\t\tthis.backwardText.override(valueWithDefaults.BACKWARD);\n\t\tthis.forwardText.override(valueWithDefaults.FORWARD);\n\t\tthis.totalItemsText.override(valueWithDefaults.TOTAL_ITEMS);\n\t\tthis.totalItemText.override(valueWithDefaults.TOTAL_ITEM);\n\t\tthis.totalItemsUnknownText.override(valueWithDefaults.TOTAL_ITEMS_UNKNOWN);\n\t\tthis.pageText.override(valueWithDefaults.PAGE);\n\t\tthis.ofLastPagesText.override(valueWithDefaults.OF_LAST_PAGES);\n\t\tthis.ofLastPageText.override(valueWithDefaults.OF_LAST_PAGE);\n\t}\n\n\t/**\n\t * Options for items per page select\n\t *\n\t * A default array of options will be defined: [10, 20, 30, 40, 50]\n\t */\n\t@Input() itemsPerPageOptions: number[] = [10, 20, 30, 40, 50];\n\n\t/**\n\t * Emits the new page number.\n\t *\n\t * You should tie into this and update `model.currentPage` once the fresh\n\t * data is finally loaded.\n\t */\n\t@Output() selectPage = new EventEmitter<number>();\n\n\tget itemsPerPage() {\n\t\treturn this.model.pageLength;\n\t}\n\tset itemsPerPage(value) {\n\t\tthis.model.pageLength = Number(value);\n\t\tthis.currentPage = 1; // reset page\n\t}\n\n\tget currentPage() {\n\t\treturn this.model.currentPage;\n\t}\n\tset currentPage(value) {\n\t\tvalue = Number(value);\n\t\t// emits the value to allow the user to update current page\n\t\t// in the model once the page is loaded\n\t\tthis.selectPage.emit(value);\n\t}\n\n\tget totalDataLength() {\n\t\treturn this.model.totalDataLength;\n\t}\n\t/**\n\t * The last page number to display in the pagination view.\n\t */\n\tget lastPage(): number {\n\t\tconst last = Math.ceil(this.totalDataLength / this.itemsPerPage);\n\t\treturn last > 0 ? last : 1;\n\t}\n\n\tget startItemIndex() {\n\t\treturn this.endItemIndex > 0 ? (this.currentPage - 1) * this.itemsPerPage + 1 : 0;\n\t}\n\n\tget endItemIndex() {\n\t\tconst projectedEndItemIndex = this.currentPage * this.itemsPerPage;\n\n\t\treturn projectedEndItemIndex < this.totalDataLength ? projectedEndItemIndex : this.totalDataLength;\n\t}\n\n\t/**\n\t * The previous page number to navigate to, from the current page.\n\t */\n\tget previousPage(): number {\n\t\treturn this.currentPage <= 1 ? 1 : this.currentPage - 1;\n\t}\n\n\t/**\n\t * The next page number to navigate to, from the current page.\n\t */\n\tget nextPage(): number {\n\t\tconst lastPage = this.lastPage;\n\t\treturn this.currentPage >= lastPage ? lastPage : this.currentPage + 1;\n\t}\n\n\tget pageOptions() {\n\t\tif (this.totalDataLength && this._pageOptions.length !== this.totalDataLength) {\n\t\t\tthis._pageOptions = Array(Math.ceil(this.totalDataLength / this.itemsPerPage));\n\t\t}\n\t\treturn this._pageOptions;\n\t}\n\n\titemsPerPageSelectId = `pagination-select-items-per-page-${Pagination.paginationCounter}`;\n\tcurrentPageSelectId = `pagination-select-current-page-${Pagination.paginationCounter}`;\n\n\titemsPerPageText = this.i18n.getOverridable(\"PAGINATION.ITEMS_PER_PAGE\");\n\toptionsListText = this.i18n.getOverridable(\"PAGINATION.OPEN_LIST_OF_OPTIONS\");\n\tbackwardText = this.i18n.getOverridable(\"PAGINATION.BACKWARD\");\n\tforwardText = this.i18n.getOverridable(\"PAGINATION.FORWARD\");\n\ttotalItemsText = this.i18n.getOverridable(\"PAGINATION.TOTAL_ITEMS\");\n\ttotalItemText = this.i18n.getOverridable(\"PAGINATION.TOTAL_ITEM\");\n\ttotalItemsUnknownText = this.i18n.getOverridable(\"PAGINATION.TOTAL_ITEMS_UNKNOWN\");\n\tpageText = this.i18n.getOverridable(\"PAGINATION.PAGE\");\n\tofLastPagesText = this.i18n.getOverridable(\"PAGINATION.OF_LAST_PAGES\");\n\tofLastPageText = this.i18n.getOverridable(\"PAGINATION.OF_LAST_PAGE\");\n\n\tprotected _pageOptions = [];\n\n\tconstructor(protected i18n: I18n, protected experimental: ExperimentalService) {\n\t\tPagination.paginationCounter++;\n\t}\n}\n",
|
|
41035
|
+
"sourceCode": "import { PaginationModel } from \"./pagination-model.class\";\nimport {\n\tComponent,\n\tInput,\n\tOutput,\n\tEventEmitter\n} from \"@angular/core\";\n\nimport { I18n, Overridable } from \"carbon-components-angular/i18n\";\nimport { ExperimentalService } from \"carbon-components-angular/experimental\";\nimport { merge } from \"carbon-components-angular/utils\";\n\nexport interface PaginationTranslations {\n\tITEMS_PER_PAGE: string;\n\tOPEN_LIST_OF_OPTIONS: string;\n\tBACKWARD: string;\n\tFORWARD: string;\n\tTOTAL_ITEMS_UNKNOWN: string;\n\tTOTAL_ITEMS: string;\n\tTOTAL_ITEM: string;\n\tOF_LAST_PAGES: string;\n\tOF_LAST_PAGE: string;\n}\n\n/**\n * Use pagination when you have multiple pages of data to handle. Get started with importing the module:\n *\n * ```typescript\n * import { PaginationModule } from 'carbon-components-angular';\n * ```\n *\n * ```html\n *\t<cds-pagination [model]=\"model\" (selectPage)=\"selectPage($event)\"></cds-pagination>\n * ```\n *\n * In your `selectPage()` method set the `model.currentPage` to selected page, _after_\n * you load the page.\n *\n * ```typescript\n * selectPage(page) {\n * \t// ... your code to load the page goes here\n *\n * \tthis.model.currentPage = page;\n *\n * \t// ... anything you want to do after page selection changes goes here\n * }\n * ```\n *\n * [See demo](../../?path=/story/components-pagination--basic)\n */\n@Component({\n\tselector: \"cds-pagination, ibm-pagination\",\n\ttemplate: `\n\t<div\n\t\tclass=\"cds--pagination\"\n\t\t[ngClass]=\"{\n\t\t\t'cds--skeleton': skeleton\n\t\t}\">\n\t\t<!-- left skeleton div -->\n\t\t<div *ngIf=\"skeleton\" class=\"cds--pagination__left\">\n\t\t\t<p class=\"cds--skeleton__text\" style=\"width: 70px\"></p>\n\t\t\t<p class=\"cds--skeleton__text\" style=\"width: 35px\"></p>\n\t\t\t<p class=\"cds--skeleton__text\" style=\"width: 105px\"></p>\n\t\t</div>\n\n\t\t<div *ngIf=\"!skeleton\" class=\"cds--pagination__left\">\n\t\t\t<ng-container *ngIf=\"showPageInput\">\n\t\t\t\t<label class=\"cds--pagination__text\" [for]=\"itemsPerPageSelectId\">\n\t\t\t\t\t{{itemsPerPageText.subject | async}}\n\t\t\t\t</label>\n\t\t\t\t<div\n\t\t\t\t\tclass=\"cds--select cds--select--inline cds--select__item-count\"\n\t\t\t\t\t[class.cds--select--disabled]=\"pageInputDisabled\">\n\t\t\t\t\t<select\n\t\t\t\t\t\t[id]=\"itemsPerPageSelectId\"\n\t\t\t\t\t\t[(ngModel)]=\"itemsPerPage\"\n\t\t\t\t\t\t[disabled]=\"pageInputDisabled\"\n\t\t\t\t\t\tclass=\"cds--select-input\">\n\t\t\t\t\t\t<option\n\t\t\t\t\t\t\tclass=\"cds--select-option\"\n\t\t\t\t\t\t\t*ngFor=\"let option of itemsPerPageOptions\"\n\t\t\t\t\t\t\t[value]=\"option\">\n\t\t\t\t\t\t\t\t{{ option }}\n\t\t\t\t\t\t</option>\n\t\t\t\t\t</select>\n\t\t\t\t\t<svg\n\t\t\t\t\t\tcdsIcon=\"chevron--down\"\n\t\t\t\t\t\tsize=\"16\"\n\t\t\t\t\t\tstyle=\"display: inherit\"\n\t\t\t\t\t\tclass=\"cds--select__arrow\"\n\t\t\t\t\t\taria-hidden=\"true\"\n\t\t\t\t\t\t[attr.ariaLabel]=\"optionsListText.subject | async\">\n\t\t\t\t\t</svg>\n\t\t\t\t</div>\n\t\t\t</ng-container>\n\t\t\t<span *ngIf=\"!pagesUnknown && totalDataLength <= 1\" class=\"cds--pagination__text cds--pagination__items-count\" [ngStyle]=\"{'margin-left': showPageInput ? null : 0}\">\n\t\t\t\t{{totalItemText.subject | i18nReplace:{start: startItemIndex, end: endItemIndex, total: totalDataLength } | async}}\n\t\t\t</span>\n\t\t\t<span *ngIf=\"!pagesUnknown && totalDataLength > 1\" class=\"cds--pagination__text cds--pagination__items-count\" [ngStyle]=\"{'margin-left': showPageInput ? null : 0}\">\n\t\t\t\t{{totalItemsText.subject | i18nReplace:{start: startItemIndex, end: endItemIndex, total: totalDataLength } | async}}\n\t\t\t</span>\n\t\t\t<span *ngIf=\"pagesUnknown\" class=\"cds--pagination__text cds--pagination__items-count\" [ngStyle]=\"{'margin-left': showPageInput ? null : 0}\">\n\t\t\t\t{{totalItemsUnknownText.subject | i18nReplace:{start: startItemIndex, end: endItemIndex } | async}}\n\t\t\t</span>\n\t\t</div>\n\n\t\t<!-- right skeleton div -->\n\t\t<div *ngIf=\"skeleton\" class=\"cds--pagination__right\">\n\t\t\t<p class=\"cds--skeleton__text\" style=\"width: 70px\"></p>\n\t\t</div>\n\n\t\t<div *ngIf=\"!skeleton\" class=\"cds--pagination__right\">\n\t\t\t<span *ngIf=\"pagesUnknown\" class=\"cds--pagination__text cds--pagination__page-text\">\n\t\t\t\t<ng-container *ngIf=\"!showPageInput\">{{currentPage}}</ng-container>\n\t\t\t\t{{pageText.subject | async}}\n\t\t\t</span>\n\t\t\t<ng-container *ngIf=\"showPageInput\">\n\t\t\t\t<div\n\t\t\t\t\tclass=\"cds--select cds--select--inline cds--select__page-number\"\n\t\t\t\t\t[class.cds--select--disabled]=\"pageInputDisabled\">\n\t\t\t\t\t<label [for]=\"currentPageSelectId\" class=\"cds--label cds--visually-hidden\">{{pageText.subject | async}}</label>\n\t\t\t\t\t<input\n\t\t\t\t\t\t*ngIf=\"pageOptions.length > pageSelectThreshold\"\n\t\t\t\t\t\tstyle=\"padding-right: 1rem; margin-right: 1rem;\"\n\t\t\t\t\t\t[id]=\"currentPageSelectId\"\n\t\t\t\t\t\ttype=\"number\"\n\t\t\t\t\t\tmin=\"1\"\n\t\t\t\t\t\t[max]=\"pageOptions.length\"\n\t\t\t\t\t\tclass=\"cds--select-input\"\n\t\t\t\t\t\t[(ngModel)]=\"currentPage\">\n\t\t\t\t\t<select\n\t\t\t\t\t\t*ngIf=\"pageOptions.length <= pageSelectThreshold\"\n\t\t\t\t\t\t[id]=\"currentPageSelectId\"\n\t\t\t\t\t\tclass=\"cds--select-input\"\n\t\t\t\t\t\t[disabled]=\"pageInputDisabled\"\n\t\t\t\t\t\t[(ngModel)]=\"currentPage\">\n\t\t\t\t\t\t<option *ngFor=\"let page of pageOptions; let i = index;\" class=\"cds--select-option\" [value]=\"i + 1\">{{i + 1}}</option>\n\t\t\t\t\t</select>\n\t\t\t\t\t<svg\n\t\t\t\t\t\t*ngIf=\"pageOptions.length <= 1000\"\n\t\t\t\t\t\tcdsIcon=\"chevron--down\"\n\t\t\t\t\t\tsize=\"16\"\n\t\t\t\t\t\tstyle=\"display: inherit;\"\n\t\t\t\t\t\tclass=\"cds--select__arrow\"\n\t\t\t\t\t\t[attr.ariaLabel]=\"optionsListText.subject | async\">\n\t\t\t\t\t</svg>\n\t\t\t\t</div>\n\t\t\t</ng-container>\n\n\t\t\t<span *ngIf=\"!pagesUnknown && lastPage <= 1\" class=\"cds--pagination__text\">\n\t\t\t\t<ng-container *ngIf=\"!showPageInput\">{{currentPage}}</ng-container>\n\t\t\t\t{{ofLastPageText.subject | i18nReplace: {last: lastPage} | async}}\n\t\t\t</span>\n\t\t\t<span *ngIf=\"!pagesUnknown && lastPage > 1\" class=\"cds--pagination__text\">\n\t\t\t\t<ng-container *ngIf=\"!showPageInput\">{{currentPage}}</ng-container>\n\t\t\t\t{{ofLastPagesText.subject | i18nReplace: {last: lastPage} | async}}\n\t\t\t</span>\n\t\t\t<div class=\"cds--pagination__control-buttons\">\n\t\t\t\t<button\n\t\t\t\t\tcdsButton=\"ghost\"\n\t\t\t\t\ticonOnly=\"true\"\n\t\t\t\t\tclass=\"cds--pagination__button cds--pagination__button--backward\"\n\t\t\t\t\t[ngClass]=\"{\n\t\t\t\t\t\t'cds--pagination__button--no-index': currentPage <= 1 || disabled\n\t\t\t\t\t}\"\n\t\t\t\t\ttabindex=\"0\"\n\t\t\t\t\t[attr.aria-label]=\"backwardText.subject | async\"\n\t\t\t\t\t(click)=\"selectPage.emit(previousPage)\"\n\t\t\t\t\t[disabled]=\"(currentPage <= 1 || disabled ? true : null)\">\n\t\t\t\t\t<svg cdsIcon=\"caret--left\" size=\"16\" class=\"cds--btn__icon\"></svg>\n\t\t\t\t</button>\n\n\t\t\t\t<button\n\t\t\t\t\tcdsButton=\"ghost\"\n\t\t\t\t\ticonOnly=\"true\"\n\t\t\t\t\tclass=\"\n\t\t\t\t\t\tcds--pagination__button\n\t\t\t\t\t\tcds--pagination__button--forward\"\n\t\t\t\t\t[ngClass]=\"{\n\t\t\t\t\t\t'cds--pagination__button--no-index': currentPage >= lastPage || disabled\n\t\t\t\t\t}\"\n\t\t\t\t\ttabindex=\"0\"\n\t\t\t\t\t[attr.aria-label]=\"forwardText.subject | async\"\n\t\t\t\t\t(click)=\"selectPage.emit(nextPage)\"\n\t\t\t\t\t[disabled]=\"(currentPage >= lastPage || disabled ? true : null)\">\n\t\t\t\t\t<svg cdsIcon=\"caret--right\" size=\"16\" class=\"cds--btn__icon\"></svg>\n\t\t\t\t</button>\n\t\t\t</div>\n\t\t</div>\n\t</div>\n\t`\n})\nexport class Pagination {\n\tstatic paginationCounter = 0;\n\n\t/**\n\t * Set to `true` for a loading pagination component.\n\t */\n\t@Input() skeleton = false;\n\t/**\n\t * `PaginationModel` with the information about pages you're controlling.\n\t */\n\t@Input() model: PaginationModel;\n\t/**\n \t * Set to `true` to disable the backward/forward buttons.\n\t */\n\t@Input() disabled = false;\n\t/**\n\t * Set to `true` to disable the select box that changes the page.\n\t */\n\t@Input() pageInputDisabled = false;\n\t/**\n\t * Controls wether or not to show the page selects\n\t */\n\t@Input() showPageInput = true;\n\t/**\n\t * Set to `true` if the total number of items is unknown.\n\t */\n\t@Input() pagesUnknown = false;\n\t@Input() pageSelectThreshold = 1000;\n\n\t/**\n\t * Expects an object that contains some or all of:\n\t * ```\n\t * {\n\t *\t\t\"ITEMS_PER_PAGE\": \"Items per page:\",\n\t *\t\t\"OPEN_LIST_OF_OPTIONS\": \"Open list of options\",\n\t *\t\t\"BACKWARD\": \"Backward\",\n\t *\t\t\"FORWARD\": \"Forward\",\n\t *\t\t\"TOTAL_ITEMS_UNKNOWN\": \"{{start}}-{{end}} items\",\n\t *\t\t\"TOTAL_ITEMS\": \"{{start}}-{{end}} of {{total}} items\",\n\t *\t\t\"TOTAL_ITEM\": \"{{start}}-{{end}} of {{total}} item\",\n\t *\t\t\"OF_LAST_PAGES\": \"of {{last}} pages\",\n\t *\t\t\"OF_LAST_PAGE\": \"of {{last}} page\"\n\t * }\n\t * ```\n\t */\n\t@Input()\n\tset translations (value: PaginationTranslations) {\n\t\tconst valueWithDefaults = merge(this.i18n.getMultiple(\"PAGINATION\"), value);\n\t\tthis.itemsPerPageText.override(valueWithDefaults.ITEMS_PER_PAGE);\n\t\tthis.optionsListText.override(valueWithDefaults.OPEN_LIST_OF_OPTIONS);\n\t\tthis.backwardText.override(valueWithDefaults.BACKWARD);\n\t\tthis.forwardText.override(valueWithDefaults.FORWARD);\n\t\tthis.totalItemsText.override(valueWithDefaults.TOTAL_ITEMS);\n\t\tthis.totalItemText.override(valueWithDefaults.TOTAL_ITEM);\n\t\tthis.totalItemsUnknownText.override(valueWithDefaults.TOTAL_ITEMS_UNKNOWN);\n\t\tthis.pageText.override(valueWithDefaults.PAGE);\n\t\tthis.ofLastPagesText.override(valueWithDefaults.OF_LAST_PAGES);\n\t\tthis.ofLastPageText.override(valueWithDefaults.OF_LAST_PAGE);\n\t}\n\n\t/**\n\t * Options for items per page select\n\t *\n\t * A default array of options will be defined: [10, 20, 30, 40, 50]\n\t */\n\t@Input() itemsPerPageOptions: number[] = [10, 20, 30, 40, 50];\n\n\t/**\n\t * Emits the new page number.\n\t *\n\t * You should tie into this and update `model.currentPage` once the fresh\n\t * data is finally loaded.\n\t */\n\t@Output() selectPage = new EventEmitter<number>();\n\n\tget itemsPerPage() {\n\t\treturn this.model.pageLength;\n\t}\n\tset itemsPerPage(value) {\n\t\tthis.model.pageLength = Number(value);\n\t\tthis.currentPage = 1; // reset page\n\t}\n\n\tget currentPage() {\n\t\treturn this.model.currentPage;\n\t}\n\tset currentPage(value) {\n\t\tvalue = Number(value);\n\t\t// emits the value to allow the user to update current page\n\t\t// in the model once the page is loaded\n\t\tthis.selectPage.emit(value);\n\t}\n\n\tget totalDataLength() {\n\t\treturn this.model.totalDataLength;\n\t}\n\t/**\n\t * The last page number to display in the pagination view.\n\t */\n\tget lastPage(): number {\n\t\tconst last = Math.ceil(this.totalDataLength / this.itemsPerPage);\n\t\treturn last > 0 ? last : 1;\n\t}\n\n\tget startItemIndex() {\n\t\treturn this.endItemIndex > 0 ? (this.currentPage - 1) * this.itemsPerPage + 1 : 0;\n\t}\n\n\tget endItemIndex() {\n\t\tconst projectedEndItemIndex = this.currentPage * this.itemsPerPage;\n\n\t\treturn projectedEndItemIndex < this.totalDataLength ? projectedEndItemIndex : this.totalDataLength;\n\t}\n\n\t/**\n\t * The previous page number to navigate to, from the current page.\n\t */\n\tget previousPage(): number {\n\t\treturn this.currentPage <= 1 ? 1 : this.currentPage - 1;\n\t}\n\n\t/**\n\t * The next page number to navigate to, from the current page.\n\t */\n\tget nextPage(): number {\n\t\tconst lastPage = this.lastPage;\n\t\treturn this.currentPage >= lastPage ? lastPage : this.currentPage + 1;\n\t}\n\n\tget pageOptions() {\n\t\t/**\n\t\t * Calculate number of pages based on totalDataLength and itemsPerPage.\n\t\t * Even if totalDataLength is 0, numberOfPages should be always at least 1.\n\t\t * New array will be constructed only if number of pages changes.\n\t\t */\n\t\tconst numberOfPages = Math.max(Math.ceil(this.totalDataLength / this.itemsPerPage), 1);\n\t\tif (this._pageOptions.length !== numberOfPages) {\n\t\t\tthis._pageOptions = Array(numberOfPages);\n\t\t}\n\t\treturn this._pageOptions;\n\t}\n\n\titemsPerPageSelectId = `pagination-select-items-per-page-${Pagination.paginationCounter}`;\n\tcurrentPageSelectId = `pagination-select-current-page-${Pagination.paginationCounter}`;\n\n\titemsPerPageText = this.i18n.getOverridable(\"PAGINATION.ITEMS_PER_PAGE\");\n\toptionsListText = this.i18n.getOverridable(\"PAGINATION.OPEN_LIST_OF_OPTIONS\");\n\tbackwardText = this.i18n.getOverridable(\"PAGINATION.BACKWARD\");\n\tforwardText = this.i18n.getOverridable(\"PAGINATION.FORWARD\");\n\ttotalItemsText = this.i18n.getOverridable(\"PAGINATION.TOTAL_ITEMS\");\n\ttotalItemText = this.i18n.getOverridable(\"PAGINATION.TOTAL_ITEM\");\n\ttotalItemsUnknownText = this.i18n.getOverridable(\"PAGINATION.TOTAL_ITEMS_UNKNOWN\");\n\tpageText = this.i18n.getOverridable(\"PAGINATION.PAGE\");\n\tofLastPagesText = this.i18n.getOverridable(\"PAGINATION.OF_LAST_PAGES\");\n\tofLastPageText = this.i18n.getOverridable(\"PAGINATION.OF_LAST_PAGE\");\n\n\tprotected _pageOptions = [];\n\n\tconstructor(protected i18n: I18n, protected experimental: ExperimentalService) {\n\t\tPagination.paginationCounter++;\n\t}\n}\n",
|
|
41036
41036
|
"assetsDirs": [],
|
|
41037
41037
|
"styleUrlsData": "",
|
|
41038
41038
|
"stylesData": "",
|
|
@@ -41055,7 +41055,7 @@
|
|
|
41055
41055
|
"deprecationMessage": ""
|
|
41056
41056
|
}
|
|
41057
41057
|
],
|
|
41058
|
-
"line":
|
|
41058
|
+
"line": 349,
|
|
41059
41059
|
"jsdoctags": [
|
|
41060
41060
|
{
|
|
41061
41061
|
"name": "i18n",
|
|
@@ -48072,7 +48072,7 @@
|
|
|
48072
48072
|
},
|
|
48073
48073
|
{
|
|
48074
48074
|
"name": "Select",
|
|
48075
|
-
"id": "component-Select-
|
|
48075
|
+
"id": "component-Select-1e2d51c6aa5587000b16796804ed1f037899fa0a087b582a31939dce30d877ec70027b593f8dd0a00a6ecb3c6f4407523beb9a9199b9e9f32c5171a66f733cbd",
|
|
48076
48076
|
"file": "src/select/select.component.ts",
|
|
48077
48077
|
"encapsulation": [],
|
|
48078
48078
|
"entryComponents": [],
|
|
@@ -48086,7 +48086,7 @@
|
|
|
48086
48086
|
"selector": "cds-select, ibm-select",
|
|
48087
48087
|
"styleUrls": [],
|
|
48088
48088
|
"styles": [],
|
|
48089
|
-
"template": "<div
|
|
48089
|
+
"template": "<div\n\t[ngClass]=\"{\n\t\t'cds--form-item': !skeleton,\n\t\t'cds--select--fluid': fluid && !skeleton\n\t}\">\n\t<ng-container *ngIf=\"skeleton && !fluid\">\n\t\t<div *ngIf=\"label\" class=\"cds--label cds--skeleton\"></div>\n\t\t<div class=\"cds--select cds--skeleton\"></div>\n\t</ng-container>\n\t<ng-container *ngIf=\"skeleton && fluid\">\n\t\t<div class=\"cds--list-box__wrapper--fluid\">\n\t\t\t<div class=\"cds--list-box cds--skeleton\">\n\t\t\t\t<div class=\"cds--list-box__label\"></div>\n\t\t\t\t<div class=\"cds--list-box__field\"></div>\n\t\t\t</div>\n\t\t</div>\n\t</ng-container>\n\t<div\n\t\t*ngIf=\"!skeleton\"\n\t\tclass=\"cds--select\"\n\t\t[ngClass]=\"{\n\t\t\t'cds--select--inline': display === 'inline',\n\t\t\t'cds--select--light': theme === 'light',\n\t\t\t'cds--select--invalid': invalid,\n\t\t\t'cds--select--warning': warn,\n\t\t\t'cds--select--disabled': disabled,\n\t\t\t'cds--select--readonly': readonly,\n\t\t\t'cds--select--fluid--invalid': fluid && invalid,\n\t\t\t'cds--select--fluid--focus': fluid && focused\n\t\t}\">\n\t\t<label\n\t\t\t*ngIf=\"label\"\n\t\t\t[for]=\"id\"\n\t\t\tclass=\"cds--label\"\n\t\t\t[ngClass]=\"{'cds--label--disabled': disabled}\">\n\t\t\t<ng-container *ngIf=\"!isTemplate(label)\">{{label}}</ng-container>\n\t\t\t<ng-template *ngIf=\"isTemplate(label)\" [ngTemplateOutlet]=\"label\"></ng-template>\n\t\t</label>\n\t\t<div *ngIf=\"display === 'inline'; else noInline\" class=\"cds--select-input--inline__wrapper\">\n\t\t\t<ng-container *ngTemplateOutlet=\"noInline\"></ng-container>\n\t\t</div>\n\t\t<div\n\t\t\t*ngIf=\"helperText && !invalid && !warn && !skeleton && !fluid\"\n\t\t\tclass=\"cds--form__helper-text\"\n\t\t\t[ngClass]=\"{\n\t\t\t\t'cds--form__helper-text--disabled': disabled\n\t\t\t}\">\n\t\t\t<ng-container *ngIf=\"!isTemplate(helperText)\">{{helperText}}</ng-container>\n\t\t\t<ng-template *ngIf=\"isTemplate(helperText)\" [ngTemplateOutlet]=\"helperText\"></ng-template>\n\t\t</div>\n\t</div>\n</div>\n\n<!-- select element: dynamically projected based on 'display' variant -->\n<ng-template #noInline>\n\t<div class=\"cds--select-input__wrapper\" [attr.data-invalid]=\"(invalid ? true : null)\">\n\t\t<select\n\t\t\t#select\n\t\t\t[attr.id]=\"id\"\n\t\t\t[attr.aria-label]=\"ariaLabel\"\n\t\t\t[disabled]=\"disabled\"\n\t\t\t(change)=\"onChange($event)\"\n\t\t\t[attr.aria-invalid]=\"invalid ? 'true' : null\"\n\t\t\t[attr.aria-readonly]=\"readonly ? 'true' : null\"\n\t\t\tclass=\"cds--select-input\"\n\t\t\t[ngClass]=\"{\n\t\t\t\t'cds--select-input--sm': size === 'sm',\n\t\t\t\t'cds--select-input--md': size === 'md',\n\t\t\t\t'cds--select-input--lg': size === 'lg'\n\t\t\t}\"\n\t\t\t(mousedown)=\"onMouseDown($event)\"\n\t\t\t(keydown)=\"onKeyDown($event)\"\n\t\t\t(focus)=\"fluid ? handleFocus($event) : null\"\n\t\t\t(blur)=\"fluid ? handleFocus($event) : null\">\n\t\t\t<ng-content></ng-content>\n\t\t</select>\n\t\t<svg\n\t\t\tfocusable=\"false\"\n\t\t\tpreserveAspectRatio=\"xMidYMid meet\"\n\t\t\tstyle=\"will-change: transform;\"\n\t\t\txmlns=\"http://www.w3.org/2000/svg\"\n\t\t\tclass=\"cds--select__arrow\"\n\t\t\twidth=\"16\"\n\t\t\theight=\"16\"\n\t\t\tviewBox=\"0 0 16 16\"\n\t\t\taria-hidden=\"true\">\n\t\t\t<path d=\"M8 11L3 6 3.7 5.3 8 9.6 12.3 5.3 13 6z\"></path>\n\t\t</svg>\n\t\t<svg\n\t\t\t*ngIf=\"invalid\"\n\t\t\tcdsIcon=\"warning--filled\"\n\t\t\tsize=\"16\"\n\t\t\tclass=\"cds--select__invalid-icon\">\n\t\t</svg>\n\t\t<svg\n\t\t\t*ngIf=\"!invalid && warn\"\n\t\t\tcdsIcon=\"warning--alt--filled\"\n\t\t\tsize=\"16\"\n\t\t\tclass=\"cds--select__invalid-icon cds--select__invalid-icon--warning\">\n\t\t</svg>\n\t\t<ng-container *ngIf=\"fluid\">\n\t\t\t<hr class=\"cds--select__divider\" />\n\t\t\t<div\n\t\t\t\t*ngIf=\"invalid && invalidText\" role=\"alert\" class=\"cds--form-requirement\" aria-live=\"polite\">\n\t\t\t\t<ng-container *ngIf=\"!isTemplate(invalidText)\">{{invalidText}}</ng-container>\n\t\t\t\t<ng-template *ngIf=\"isTemplate(invalidText)\" [ngTemplateOutlet]=\"invalidText\"></ng-template>\n\t\t\t</div>\n\t\t\t<div *ngIf=\"!invalid && warn\" class=\"cds--form-requirement\">\n\t\t\t\t<ng-container *ngIf=\"!isTemplate(warnText)\">{{warnText}}</ng-container>\n\t\t\t\t<ng-template *ngIf=\"isTemplate(warnText)\" [ngTemplateOutlet]=\"warnText\"></ng-template>\n\t\t\t</div>\n\t\t</ng-container>\n\t</div>\n\t<ng-container *ngIf=\"!fluid\">\n\t\t<div\n\t\t\t*ngIf=\"invalid && invalidText\" role=\"alert\" class=\"cds--form-requirement\" aria-live=\"polite\">\n\t\t\t<ng-container *ngIf=\"!isTemplate(invalidText)\">{{invalidText}}</ng-container>\n\t\t\t<ng-template *ngIf=\"isTemplate(invalidText)\" [ngTemplateOutlet]=\"invalidText\"></ng-template>\n\t\t</div>\n\t\t<div *ngIf=\"!invalid && warn\" class=\"cds--form-requirement\">\n\t\t\t<ng-container *ngIf=\"!isTemplate(warnText)\">{{warnText}}</ng-container>\n\t\t\t<ng-template *ngIf=\"isTemplate(warnText)\" [ngTemplateOutlet]=\"warnText\"></ng-template>\n\t\t</div>\n\t</ng-container>\n</ng-template>\n\t",
|
|
48090
48090
|
"templateUrl": [],
|
|
48091
48091
|
"viewProviders": [],
|
|
48092
48092
|
"hostDirectives": [],
|
|
@@ -48095,7 +48095,7 @@
|
|
|
48095
48095
|
"name": "ariaLabel",
|
|
48096
48096
|
"deprecated": false,
|
|
48097
48097
|
"deprecationMessage": "",
|
|
48098
|
-
"line":
|
|
48098
|
+
"line": 240,
|
|
48099
48099
|
"type": "string",
|
|
48100
48100
|
"decorators": []
|
|
48101
48101
|
},
|
|
@@ -48106,7 +48106,7 @@
|
|
|
48106
48106
|
"deprecationMessage": "",
|
|
48107
48107
|
"rawdescription": "\n\nSet to true to disable component.\n",
|
|
48108
48108
|
"description": "<p>Set to true to disable component.</p>\n",
|
|
48109
|
-
"line":
|
|
48109
|
+
"line": 221,
|
|
48110
48110
|
"type": "boolean",
|
|
48111
48111
|
"decorators": []
|
|
48112
48112
|
},
|
|
@@ -48117,17 +48117,28 @@
|
|
|
48117
48117
|
"deprecationMessage": "",
|
|
48118
48118
|
"rawdescription": "\n\n`inline` or `default` select displays\n",
|
|
48119
48119
|
"description": "<p><code>inline</code> or <code>default</code> select displays</p>\n",
|
|
48120
|
-
"line":
|
|
48120
|
+
"line": 189,
|
|
48121
48121
|
"type": "\"inline\" | \"default\"",
|
|
48122
48122
|
"decorators": []
|
|
48123
48123
|
},
|
|
48124
|
+
{
|
|
48125
|
+
"name": "fluid",
|
|
48126
|
+
"defaultValue": "false",
|
|
48127
|
+
"deprecated": false,
|
|
48128
|
+
"deprecationMessage": "",
|
|
48129
|
+
"rawdescription": "\n\nExperimental: enable fluid state\n",
|
|
48130
|
+
"description": "<p>Experimental: enable fluid state</p>\n",
|
|
48131
|
+
"line": 245,
|
|
48132
|
+
"type": "boolean",
|
|
48133
|
+
"decorators": []
|
|
48134
|
+
},
|
|
48124
48135
|
{
|
|
48125
48136
|
"name": "helperText",
|
|
48126
48137
|
"deprecated": false,
|
|
48127
48138
|
"deprecationMessage": "",
|
|
48128
48139
|
"rawdescription": "\n\nOptional helper text that appears under the label.\n",
|
|
48129
48140
|
"description": "<p>Optional helper text that appears under the label.</p>\n",
|
|
48130
|
-
"line":
|
|
48141
|
+
"line": 197,
|
|
48131
48142
|
"type": "string | TemplateRef<any>",
|
|
48132
48143
|
"decorators": []
|
|
48133
48144
|
},
|
|
@@ -48138,7 +48149,7 @@
|
|
|
48138
48149
|
"deprecationMessage": "",
|
|
48139
48150
|
"rawdescription": "\n\nSets the unique ID. Defaults to `select-${total count of selects instantiated}`\n",
|
|
48140
48151
|
"description": "<p>Sets the unique ID. Defaults to <code>select-${total count of selects instantiated}</code></p>\n",
|
|
48141
|
-
"line":
|
|
48152
|
+
"line": 213,
|
|
48142
48153
|
"type": "string",
|
|
48143
48154
|
"decorators": []
|
|
48144
48155
|
},
|
|
@@ -48149,7 +48160,7 @@
|
|
|
48149
48160
|
"deprecationMessage": "",
|
|
48150
48161
|
"rawdescription": "\n\nSet to `true` for an invalid select component.\n",
|
|
48151
48162
|
"description": "<p>Set to <code>true</code> for an invalid select component.</p>\n",
|
|
48152
|
-
"line":
|
|
48163
|
+
"line": 229,
|
|
48153
48164
|
"type": "boolean",
|
|
48154
48165
|
"decorators": []
|
|
48155
48166
|
},
|
|
@@ -48159,7 +48170,7 @@
|
|
|
48159
48170
|
"deprecationMessage": "",
|
|
48160
48171
|
"rawdescription": "\n\nSets the invalid text.\n",
|
|
48161
48172
|
"description": "<p>Sets the invalid text.</p>\n",
|
|
48162
|
-
"line":
|
|
48173
|
+
"line": 201,
|
|
48163
48174
|
"type": "string | TemplateRef<any>",
|
|
48164
48175
|
"decorators": []
|
|
48165
48176
|
},
|
|
@@ -48169,7 +48180,7 @@
|
|
|
48169
48180
|
"deprecationMessage": "",
|
|
48170
48181
|
"rawdescription": "\n\nLabel for the select. Appears above the input.\n",
|
|
48171
48182
|
"description": "<p>Label for the select. Appears above the input.</p>\n",
|
|
48172
|
-
"line":
|
|
48183
|
+
"line": 193,
|
|
48173
48184
|
"type": "string | TemplateRef<any>",
|
|
48174
48185
|
"decorators": []
|
|
48175
48186
|
},
|
|
@@ -48180,7 +48191,7 @@
|
|
|
48180
48191
|
"deprecationMessage": "",
|
|
48181
48192
|
"rawdescription": "\n\nSet to `true` for readonly state.\n",
|
|
48182
48193
|
"description": "<p>Set to <code>true</code> for readonly state.</p>\n",
|
|
48183
|
-
"line":
|
|
48194
|
+
"line": 233,
|
|
48184
48195
|
"type": "boolean",
|
|
48185
48196
|
"decorators": []
|
|
48186
48197
|
},
|
|
@@ -48191,7 +48202,7 @@
|
|
|
48191
48202
|
"deprecationMessage": "",
|
|
48192
48203
|
"rawdescription": "\n\nNumber input field render size\n",
|
|
48193
48204
|
"description": "<p>Number input field render size</p>\n",
|
|
48194
|
-
"line":
|
|
48205
|
+
"line": 217,
|
|
48195
48206
|
"type": "\"sm\" | \"md\" | \"lg\"",
|
|
48196
48207
|
"decorators": []
|
|
48197
48208
|
},
|
|
@@ -48202,7 +48213,7 @@
|
|
|
48202
48213
|
"deprecationMessage": "",
|
|
48203
48214
|
"rawdescription": "\n\nSet to true for a loading select.\n",
|
|
48204
48215
|
"description": "<p>Set to true for a loading select.</p>\n",
|
|
48205
|
-
"line":
|
|
48216
|
+
"line": 225,
|
|
48206
48217
|
"type": "boolean",
|
|
48207
48218
|
"decorators": []
|
|
48208
48219
|
},
|
|
@@ -48213,15 +48224,15 @@
|
|
|
48213
48224
|
"deprecationMessage": "since v5 - Use `cdsLayer` directive instead\n`light` or `dark` select theme",
|
|
48214
48225
|
"jsdoctags": [
|
|
48215
48226
|
{
|
|
48216
|
-
"pos":
|
|
48217
|
-
"end":
|
|
48227
|
+
"pos": 7049,
|
|
48228
|
+
"end": 7142,
|
|
48218
48229
|
"flags": 16842752,
|
|
48219
48230
|
"modifierFlagsCache": 0,
|
|
48220
48231
|
"transformFlags": 0,
|
|
48221
48232
|
"kind": 338,
|
|
48222
48233
|
"tagName": {
|
|
48223
|
-
"pos":
|
|
48224
|
-
"end":
|
|
48234
|
+
"pos": 7050,
|
|
48235
|
+
"end": 7060,
|
|
48225
48236
|
"flags": 16842752,
|
|
48226
48237
|
"modifierFlagsCache": 0,
|
|
48227
48238
|
"transformFlags": 0,
|
|
@@ -48231,7 +48242,7 @@
|
|
|
48231
48242
|
"comment": "<p>since v5 - Use <code>cdsLayer</code> directive instead\n<code>light</code> or <code>dark</code> select theme</p>\n"
|
|
48232
48243
|
}
|
|
48233
48244
|
],
|
|
48234
|
-
"line":
|
|
48245
|
+
"line": 239,
|
|
48235
48246
|
"type": "\"light\" | \"dark\"",
|
|
48236
48247
|
"decorators": []
|
|
48237
48248
|
},
|
|
@@ -48239,7 +48250,7 @@
|
|
|
48239
48250
|
"name": "value",
|
|
48240
48251
|
"deprecated": false,
|
|
48241
48252
|
"deprecationMessage": "",
|
|
48242
|
-
"line":
|
|
48253
|
+
"line": 170,
|
|
48243
48254
|
"type": "any",
|
|
48244
48255
|
"decorators": []
|
|
48245
48256
|
},
|
|
@@ -48250,7 +48261,7 @@
|
|
|
48250
48261
|
"deprecationMessage": "",
|
|
48251
48262
|
"rawdescription": "\n\nSet to `true` to show a warning (contents set by warningText)\n",
|
|
48252
48263
|
"description": "<p>Set to <code>true</code> to show a warning (contents set by warningText)</p>\n",
|
|
48253
|
-
"line":
|
|
48264
|
+
"line": 205,
|
|
48254
48265
|
"type": "boolean",
|
|
48255
48266
|
"decorators": []
|
|
48256
48267
|
},
|
|
@@ -48260,7 +48271,7 @@
|
|
|
48260
48271
|
"deprecationMessage": "",
|
|
48261
48272
|
"rawdescription": "\n\nSets the warning text\n",
|
|
48262
48273
|
"description": "<p>Sets the warning text</p>\n",
|
|
48263
|
-
"line":
|
|
48274
|
+
"line": 209,
|
|
48264
48275
|
"type": "string | TemplateRef<any>",
|
|
48265
48276
|
"decorators": []
|
|
48266
48277
|
}
|
|
@@ -48271,11 +48282,21 @@
|
|
|
48271
48282
|
"defaultValue": "new EventEmitter()",
|
|
48272
48283
|
"deprecated": false,
|
|
48273
48284
|
"deprecationMessage": "",
|
|
48274
|
-
"line":
|
|
48285
|
+
"line": 247,
|
|
48275
48286
|
"type": "EventEmitter"
|
|
48276
48287
|
}
|
|
48277
48288
|
],
|
|
48278
48289
|
"propertiesClass": [
|
|
48290
|
+
{
|
|
48291
|
+
"name": "focused",
|
|
48292
|
+
"defaultValue": "false",
|
|
48293
|
+
"deprecated": false,
|
|
48294
|
+
"deprecationMessage": "",
|
|
48295
|
+
"type": "",
|
|
48296
|
+
"optional": false,
|
|
48297
|
+
"description": "",
|
|
48298
|
+
"line": 251
|
|
48299
|
+
},
|
|
48279
48300
|
{
|
|
48280
48301
|
"name": "select",
|
|
48281
48302
|
"deprecated": false,
|
|
@@ -48283,7 +48304,7 @@
|
|
|
48283
48304
|
"type": "ElementRef",
|
|
48284
48305
|
"optional": false,
|
|
48285
48306
|
"description": "",
|
|
48286
|
-
"line":
|
|
48307
|
+
"line": 249,
|
|
48287
48308
|
"decorators": [
|
|
48288
48309
|
{
|
|
48289
48310
|
"name": "ViewChild",
|
|
@@ -48302,7 +48323,7 @@
|
|
|
48302
48323
|
"type": "number",
|
|
48303
48324
|
"optional": false,
|
|
48304
48325
|
"description": "<p>Tracks the total number of selects instantiated. Used to generate unique IDs</p>\n",
|
|
48305
|
-
"line":
|
|
48326
|
+
"line": 184,
|
|
48306
48327
|
"rawdescription": "\n\nTracks the total number of selects instantiated. Used to generate unique IDs\n",
|
|
48307
48328
|
"modifierKind": [
|
|
48308
48329
|
126
|
|
@@ -48316,7 +48337,7 @@
|
|
|
48316
48337
|
"optional": false,
|
|
48317
48338
|
"returnType": "void",
|
|
48318
48339
|
"typeParameters": [],
|
|
48319
|
-
"line":
|
|
48340
|
+
"line": 308,
|
|
48320
48341
|
"deprecated": false,
|
|
48321
48342
|
"deprecationMessage": "",
|
|
48322
48343
|
"rawdescription": "\n\nListens for the host blurring, and notifies the model\n",
|
|
@@ -48331,6 +48352,34 @@
|
|
|
48331
48352
|
170
|
|
48332
48353
|
]
|
|
48333
48354
|
},
|
|
48355
|
+
{
|
|
48356
|
+
"name": "handleFocus",
|
|
48357
|
+
"args": [
|
|
48358
|
+
{
|
|
48359
|
+
"name": "event",
|
|
48360
|
+
"type": "FocusEvent",
|
|
48361
|
+
"deprecated": false,
|
|
48362
|
+
"deprecationMessage": ""
|
|
48363
|
+
}
|
|
48364
|
+
],
|
|
48365
|
+
"optional": false,
|
|
48366
|
+
"returnType": "void",
|
|
48367
|
+
"typeParameters": [],
|
|
48368
|
+
"line": 336,
|
|
48369
|
+
"deprecated": false,
|
|
48370
|
+
"deprecationMessage": "",
|
|
48371
|
+
"jsdoctags": [
|
|
48372
|
+
{
|
|
48373
|
+
"name": "event",
|
|
48374
|
+
"type": "FocusEvent",
|
|
48375
|
+
"deprecated": false,
|
|
48376
|
+
"deprecationMessage": "",
|
|
48377
|
+
"tagName": {
|
|
48378
|
+
"text": "param"
|
|
48379
|
+
}
|
|
48380
|
+
}
|
|
48381
|
+
]
|
|
48382
|
+
},
|
|
48334
48383
|
{
|
|
48335
48384
|
"name": "isTemplate",
|
|
48336
48385
|
"args": [
|
|
@@ -48344,7 +48393,7 @@
|
|
|
48344
48393
|
"optional": false,
|
|
48345
48394
|
"returnType": "boolean",
|
|
48346
48395
|
"typeParameters": [],
|
|
48347
|
-
"line":
|
|
48396
|
+
"line": 312,
|
|
48348
48397
|
"deprecated": false,
|
|
48349
48398
|
"deprecationMessage": "",
|
|
48350
48399
|
"modifierKind": [
|
|
@@ -48375,7 +48424,7 @@
|
|
|
48375
48424
|
"optional": false,
|
|
48376
48425
|
"returnType": "void",
|
|
48377
48426
|
"typeParameters": [],
|
|
48378
|
-
"line":
|
|
48427
|
+
"line": 298,
|
|
48379
48428
|
"deprecated": false,
|
|
48380
48429
|
"deprecationMessage": "",
|
|
48381
48430
|
"rawdescription": "\n\nHandles the change event from the `select`.\nSends events to the change handler and emits a `selected` event.\n",
|
|
@@ -48405,7 +48454,7 @@
|
|
|
48405
48454
|
"optional": false,
|
|
48406
48455
|
"returnType": "void",
|
|
48407
48456
|
"typeParameters": [],
|
|
48408
|
-
"line":
|
|
48457
|
+
"line": 326,
|
|
48409
48458
|
"deprecated": false,
|
|
48410
48459
|
"deprecationMessage": "",
|
|
48411
48460
|
"jsdoctags": [
|
|
@@ -48433,7 +48482,7 @@
|
|
|
48433
48482
|
"optional": false,
|
|
48434
48483
|
"returnType": "void",
|
|
48435
48484
|
"typeParameters": [],
|
|
48436
|
-
"line":
|
|
48485
|
+
"line": 316,
|
|
48437
48486
|
"deprecated": false,
|
|
48438
48487
|
"deprecationMessage": "",
|
|
48439
48488
|
"jsdoctags": [
|
|
@@ -48461,7 +48510,7 @@
|
|
|
48461
48510
|
"optional": false,
|
|
48462
48511
|
"returnType": "void",
|
|
48463
48512
|
"typeParameters": [],
|
|
48464
|
-
"line":
|
|
48513
|
+
"line": 276,
|
|
48465
48514
|
"deprecated": false,
|
|
48466
48515
|
"deprecationMessage": "",
|
|
48467
48516
|
"rawdescription": "\n\nRegisters a listener that notifies the model when the control updates\n",
|
|
@@ -48491,7 +48540,7 @@
|
|
|
48491
48540
|
"optional": false,
|
|
48492
48541
|
"returnType": "void",
|
|
48493
48542
|
"typeParameters": [],
|
|
48494
|
-
"line":
|
|
48543
|
+
"line": 283,
|
|
48495
48544
|
"deprecated": false,
|
|
48496
48545
|
"deprecationMessage": "",
|
|
48497
48546
|
"rawdescription": "\n\nRegisters a listener that notifies the model when the control is blurred\n",
|
|
@@ -48521,7 +48570,7 @@
|
|
|
48521
48570
|
"optional": false,
|
|
48522
48571
|
"returnType": "void",
|
|
48523
48572
|
"typeParameters": [],
|
|
48524
|
-
"line":
|
|
48573
|
+
"line": 290,
|
|
48525
48574
|
"deprecated": false,
|
|
48526
48575
|
"deprecationMessage": "",
|
|
48527
48576
|
"rawdescription": "\n\nSets the disabled state through the model\n",
|
|
@@ -48551,7 +48600,7 @@
|
|
|
48551
48600
|
"optional": false,
|
|
48552
48601
|
"returnType": "void",
|
|
48553
48602
|
"typeParameters": [],
|
|
48554
|
-
"line":
|
|
48603
|
+
"line": 269,
|
|
48555
48604
|
"deprecated": false,
|
|
48556
48605
|
"deprecationMessage": "",
|
|
48557
48606
|
"rawdescription": "\n\nReceives a value from the model.\n",
|
|
@@ -48581,7 +48630,7 @@
|
|
|
48581
48630
|
"deprecationMessage": "",
|
|
48582
48631
|
"rawdescription": "\n\nListens for the host blurring, and notifies the model\n",
|
|
48583
48632
|
"description": "<p>Listens for the host blurring, and notifies the model</p>\n",
|
|
48584
|
-
"line":
|
|
48633
|
+
"line": 308
|
|
48585
48634
|
}
|
|
48586
48635
|
],
|
|
48587
48636
|
"standalone": false,
|
|
@@ -48589,7 +48638,7 @@
|
|
|
48589
48638
|
"description": "<p><code>cds-select</code> provides a styled <code>select</code> component. Get started with importing the module:</p>\n<b>Example :</b><div><pre class=\"line-numbers\"><code class=\"language-typescript\">import { SelectModule } from 'carbon-components-angular';</code></pre></div><b>Example :</b><div><pre class=\"line-numbers\"><code class=\"language-html\"><cds-select [(ngModel)]="model">\n <option value="default" disabled selected hidden>Choose an option</option>\n <option value="option1">Option 1</option>\n <option value="option2">Option 2</option>\n <option value="option3">Option 3</option>\n</cds-select>\n ```\n\n[See demo](../../?path=/story/components-select--basic)</code></pre></div>",
|
|
48590
48639
|
"rawdescription": "\n\n`cds-select` provides a styled `select` component. Get started with importing the module:\n\n```typescript\nimport { SelectModule } from 'carbon-components-angular';\n```\n\n```html\n<cds-select [(ngModel)]=\"model\">\n\t<option value=\"default\" disabled selected hidden>Choose an option</option>\n\t<option value=\"option1\">Option 1</option>\n\t<option value=\"option2\">Option 2</option>\n\t<option value=\"option3\">Option 3</option>\n</cds-select>\n\t```\n\n[See demo](../../?path=/story/components-select--basic)\n",
|
|
48591
48640
|
"type": "component",
|
|
48592
|
-
"sourceCode": "import {\n\tAfterViewInit,\n\tComponent,\n\tElementRef,\n\tInput,\n\tOutput,\n\tHostListener,\n\tEventEmitter,\n\tTemplateRef,\n\tViewChild\n} from \"@angular/core\";\nimport { ControlValueAccessor, NG_VALUE_ACCESSOR } from \"@angular/forms\";\n\n/**\n * `cds-select` provides a styled `select` component. Get started with importing the module:\n *\n * ```typescript\n * import { SelectModule } from 'carbon-components-angular';\n * ```\n *\n * ```html\n * <cds-select [(ngModel)]=\"model\">\n * \t<option value=\"default\" disabled selected hidden>Choose an option</option>\n * \t<option value=\"option1\">Option 1</option>\n *\t<option value=\"option2\">Option 2</option>\n * \t<option value=\"option3\">Option 3</option>\n * </cds-select>\n *\t```\n *\n * [See demo](../../?path=/story/components-select--basic)\n */\n@Component({\n\tselector: \"cds-select, ibm-select\",\n\ttemplate: `\n\t\t<div class=\"cds--form-item\">\n\t\t\t<ng-template [ngIf]=\"skeleton\">\n\t\t\t\t<div *ngIf=\"label\" class=\"cds--label cds--skeleton\"></div>\n\t\t\t\t<div class=\"cds--select cds--skeleton\"></div>\n\t\t\t</ng-template>\n\t\t\t<div\n\t\t\t\t*ngIf=\"!skeleton\"\n\t\t\t\tclass=\"cds--select\"\n\t\t\t\t[ngClass]=\"{\n\t\t\t\t\t'cds--select--inline': display === 'inline',\n\t\t\t\t\t'cds--select--light': theme === 'light',\n\t\t\t\t\t'cds--select--invalid': invalid,\n\t\t\t\t\t'cds--select--warning': warn,\n\t\t\t\t\t'cds--select--disabled': disabled,\n\t\t\t\t\t'cds--select--readonly': readonly\n\t\t\t\t}\">\n\t\t\t\t<label\n\t\t\t\t\t*ngIf=\"label\"\n\t\t\t\t\t[for]=\"id\"\n\t\t\t\t\tclass=\"cds--label\"\n\t\t\t\t\t[ngClass]=\"{'cds--label--disabled': disabled}\">\n\t\t\t\t\t<ng-container *ngIf=\"!isTemplate(label)\">{{label}}</ng-container>\n\t\t\t\t\t<ng-template *ngIf=\"isTemplate(label)\" [ngTemplateOutlet]=\"label\"></ng-template>\n\t\t\t\t</label>\n\t\t\t\t<div *ngIf=\"display === 'inline'; else noInline\" class=\"cds--select-input--inline__wrapper\">\n\t\t\t\t\t<ng-container *ngTemplateOutlet=\"noInline\"></ng-container>\n\t\t\t\t</div>\n\t\t\t\t<div\n\t\t\t\t\t*ngIf=\"helperText\"\n\t\t\t\t\tclass=\"cds--form__helper-text\"\n\t\t\t\t\t[ngClass]=\"{\n\t\t\t\t\t\t'cds--form__helper-text--disabled': disabled\n\t\t\t\t\t}\">\n\t\t\t\t\t<ng-container *ngIf=\"!isTemplate(helperText)\">{{helperText}}</ng-container>\n\t\t\t\t\t<ng-template *ngIf=\"isTemplate(helperText)\" [ngTemplateOutlet]=\"helperText\"></ng-template>\n\t\t\t\t</div>\n\t\t\t</div>\n\t\t</div>\n\n\t\t<!-- select element: dynamically projected based on 'display' variant -->\n\t\t<ng-template #noInline>\n\t\t\t<div class=\"cds--select-input__wrapper\" [attr.data-invalid]=\"(invalid ? true : null)\">\n\t\t\t\t<select\n\t\t\t\t\t#select\n\t\t\t\t\t[attr.id]=\"id\"\n\t\t\t\t\t[attr.aria-label]=\"ariaLabel\"\n\t\t\t\t\t[disabled]=\"disabled\"\n\t\t\t\t\t(change)=\"onChange($event)\"\n\t\t\t\t\t[attr.aria-invalid]=\"invalid ? 'true' : null\"\n\t\t\t\t\t[attr.aria-readonly]=\"readonly ? 'true' : null\"\n\t\t\t\t\tclass=\"cds--select-input\"\n\t\t\t\t\t[ngClass]=\"{\n\t\t\t\t\t\t'cds--select-input--sm': size === 'sm',\n\t\t\t\t\t\t'cds--select-input--md': size === 'md',\n\t\t\t\t\t\t'cds--select-input--lg': size === 'lg'\n\t\t\t\t\t}\"\n\t\t\t\t\t(mousedown)=\"onMouseDown($event)\"\n\t\t\t\t\t(keydown)=\"onKeyDown($event)\">\n\t\t\t\t\t<ng-content></ng-content>\n\t\t\t\t</select>\n\t\t\t\t<svg\n\t\t\t\t\tfocusable=\"false\"\n\t\t\t\t\tpreserveAspectRatio=\"xMidYMid meet\"\n\t\t\t\t\tstyle=\"will-change: transform;\"\n\t\t\t\t\txmlns=\"http://www.w3.org/2000/svg\"\n\t\t\t\t\tclass=\"cds--select__arrow\"\n\t\t\t\t\twidth=\"16\"\n\t\t\t\t\theight=\"16\"\n\t\t\t\t\tviewBox=\"0 0 16 16\"\n\t\t\t\t\taria-hidden=\"true\">\n\t\t\t\t\t<path d=\"M8 11L3 6 3.7 5.3 8 9.6 12.3 5.3 13 6z\"></path>\n\t\t\t\t</svg>\n\t\t\t\t<svg\n\t\t\t\t\t*ngIf=\"invalid\"\n\t\t\t\t\tcdsIcon=\"warning--filled\"\n\t\t\t\t\tsize=\"16\"\n\t\t\t\t\tclass=\"cds--select__invalid-icon\">\n\t\t\t\t</svg>\n\t\t\t\t<svg\n\t\t\t\t\t*ngIf=\"!invalid && warn\"\n\t\t\t\t\tcdsIcon=\"warning--alt--filled\"\n\t\t\t\t\tsize=\"16\"\n\t\t\t\t\tclass=\"cds--select__invalid-icon cds--select__invalid-icon--warning\">\n\t\t\t\t</svg>\n\t\t\t</div>\n\t\t\t<div\n\t\t\t\t*ngIf=\"invalid && invalidText\" role=\"alert\" class=\"cds--form-requirement\" aria-live=\"polite\">\n\t\t\t\t<ng-container *ngIf=\"!isTemplate(invalidText)\">{{invalidText}}</ng-container>\n\t\t\t\t<ng-template *ngIf=\"isTemplate(invalidText)\" [ngTemplateOutlet]=\"invalidText\"></ng-template>\n\t\t\t</div>\n\t\t\t<div *ngIf=\"!invalid && warn\" class=\"cds--form-requirement\">\n\t\t\t\t<ng-container *ngIf=\"!isTemplate(warnText)\">{{warnText}}</ng-container>\n\t\t\t\t<ng-template *ngIf=\"isTemplate(warnText)\" [ngTemplateOutlet]=\"warnText\"></ng-template>\n\t\t\t</div>\n\t\t</ng-template>\n\t`,\n\tproviders: [\n\t\t{\n\t\t\tprovide: NG_VALUE_ACCESSOR,\n\t\t\tuseExisting: Select,\n\t\t\tmulti: true\n\t\t}\n\t]\n})\nexport class Select implements ControlValueAccessor, AfterViewInit {\n\t@Input() set value(v) {\n\t\tthis._value = v;\n\t\tif (this.select) {\n\t\t\tthis.select.nativeElement.value = this._value;\n\t\t}\n\t}\n\n\tget value() {\n\t\treturn this._value;\n\t}\n\n\t/**\n\t * Tracks the total number of selects instantiated. Used to generate unique IDs\n\t */\n\tstatic selectCount = 0;\n\n\t/**\n\t * `inline` or `default` select displays\n\t */\n\t@Input() display: \"inline\" | \"default\" = \"default\";\n\t/**\n\t * Label for the select. Appears above the input.\n\t */\n\t@Input() label: string | TemplateRef<any>;\n\t/**\n\t * Optional helper text that appears under the label.\n\t */\n\t@Input() helperText: string | TemplateRef<any>;\n\t/**\n\t * Sets the invalid text.\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\t/**\n\t * Sets the unique ID. Defaults to `select-${total count of selects instantiated}`\n\t */\n\t@Input() id = `select-${Select.selectCount++}`;\n\t/**\n\t * Number input field render size\n\t */\n\t@Input() size: \"sm\" | \"md\" | \"lg\" = \"md\";\n\t/**\n\t * Set to true to disable component.\n\t */\n\t@Input() disabled = false;\n\t/**\n\t * Set to true for a loading select.\n\t */\n\t@Input() skeleton = false;\n\t/**\n\t * Set to `true` for an invalid select component.\n\t */\n\t@Input() invalid = false;\n\t/**\n\t * Set to `true` for readonly state.\n\t */\n\t@Input() readonly = false;\n\n\t/**\n\t * @deprecated since v5 - Use `cdsLayer` directive instead\n\t * `light` or `dark` select theme\n\t */\n\t@Input() theme: \"light\" | \"dark\" = \"dark\";\n\t@Input() ariaLabel: string;\n\n\t@Output() valueChange = new EventEmitter();\n\n\t@ViewChild(\"select\") select: ElementRef;\n\n\tprotected _value;\n\n\tngAfterViewInit() {\n\t\tif (\n\t\t\tthis.value !== undefined &&\n\t\t\tthis.value !== null &&\n\t\t\tthis.select &&\n\t\t\tthis.select.nativeElement.value !== this.value\n\t\t) {\n\t\t\tthis.select.nativeElement.value = this.value;\n\t\t}\n\t}\n\n\t/**\n\t * Receives a value from the model.\n\t */\n\twriteValue(obj: any) {\n\t\tthis.value = obj;\n\t}\n\n\t/**\n\t * Registers a listener that notifies the model when the control updates\n\t */\n\tregisterOnChange(fn: any) {\n\t\tthis.onChangeHandler = fn;\n\t}\n\n\t/**\n\t * Registers a listener that notifies the model when the control is blurred\n\t */\n\tregisterOnTouched(fn: any) {\n\t\tthis.onTouchedHandler = fn;\n\t}\n\n\t/**\n\t * Sets the disabled state through the model\n\t */\n\tsetDisabledState(isDisabled: boolean) {\n\t\tthis.disabled = isDisabled;\n\t}\n\n\t/**\n\t * Handles the change event from the `select`.\n\t * Sends events to the change handler and emits a `selected` event.\n\t */\n\tonChange(event) {\n\t\tthis.value = event.target.value;\n\t\tthis.onChangeHandler(event.target.value);\n\t\tthis.valueChange.emit(event.target.value);\n\t}\n\n\t/**\n\t * Listens for the host blurring, and notifies the model\n\t */\n\t@HostListener(\"focusout\")\n\tfocusOut() {\n\t\tthis.onTouchedHandler();\n\t}\n\n\tpublic isTemplate(value) {\n\t\treturn value instanceof TemplateRef;\n\t}\n\n\tonMouseDown(event: MouseEvent) {\n\t\t/**\n\t\t * This prevents the select from opening with mouse\n\t\t */\n\t\tif (this.readonly) {\n\t\t\tevent.preventDefault();\n\t\t\t(<HTMLElement>event.target).focus();\n\t\t}\n\t}\n\n\tonKeyDown(event: KeyboardEvent) {\n\t\tconst selectAccessKeys = [\"ArrowDown\", \"ArrowUp\", \"ArrowLeft\", \"ArrowRight\", \" \"];\n\t\t/**\n\t\t * This prevents the select from opening for the above keys\n\t\t */\n\t\tif (this.readonly && selectAccessKeys.includes(event.key)) {\n\t\t\tevent.preventDefault();\n\t\t}\n\t}\n\n\t/**\n\t * placeholder declarations. Replaced by the functions provided to `registerOnChange` and `registerOnTouched`\n\t */\n\tprotected onChangeHandler = (_: any) => { };\n\tprotected onTouchedHandler = () => { };\n}\n",
|
|
48641
|
+
"sourceCode": "import {\n\tAfterViewInit,\n\tComponent,\n\tElementRef,\n\tInput,\n\tOutput,\n\tHostListener,\n\tEventEmitter,\n\tTemplateRef,\n\tViewChild\n} from \"@angular/core\";\nimport { ControlValueAccessor, NG_VALUE_ACCESSOR } from \"@angular/forms\";\n\n/**\n * `cds-select` provides a styled `select` component. Get started with importing the module:\n *\n * ```typescript\n * import { SelectModule } from 'carbon-components-angular';\n * ```\n *\n * ```html\n * <cds-select [(ngModel)]=\"model\">\n * \t<option value=\"default\" disabled selected hidden>Choose an option</option>\n * \t<option value=\"option1\">Option 1</option>\n *\t<option value=\"option2\">Option 2</option>\n * \t<option value=\"option3\">Option 3</option>\n * </cds-select>\n *\t```\n *\n * [See demo](../../?path=/story/components-select--basic)\n */\n@Component({\n\tselector: \"cds-select, ibm-select\",\n\ttemplate: `\n\t\t<div\n\t\t\t[ngClass]=\"{\n\t\t\t\t'cds--form-item': !skeleton,\n\t\t\t\t'cds--select--fluid': fluid && !skeleton\n\t\t\t}\">\n\t\t\t<ng-container *ngIf=\"skeleton && !fluid\">\n\t\t\t\t<div *ngIf=\"label\" class=\"cds--label cds--skeleton\"></div>\n\t\t\t\t<div class=\"cds--select cds--skeleton\"></div>\n\t\t\t</ng-container>\n\t\t\t<ng-container *ngIf=\"skeleton && fluid\">\n\t\t\t\t<div class=\"cds--list-box__wrapper--fluid\">\n\t\t\t\t\t<div class=\"cds--list-box cds--skeleton\">\n\t\t\t\t\t\t<div class=\"cds--list-box__label\"></div>\n\t\t\t\t\t\t<div class=\"cds--list-box__field\"></div>\n\t\t\t\t\t</div>\n\t\t\t\t</div>\n\t\t\t</ng-container>\n\t\t\t<div\n\t\t\t\t*ngIf=\"!skeleton\"\n\t\t\t\tclass=\"cds--select\"\n\t\t\t\t[ngClass]=\"{\n\t\t\t\t\t'cds--select--inline': display === 'inline',\n\t\t\t\t\t'cds--select--light': theme === 'light',\n\t\t\t\t\t'cds--select--invalid': invalid,\n\t\t\t\t\t'cds--select--warning': warn,\n\t\t\t\t\t'cds--select--disabled': disabled,\n\t\t\t\t\t'cds--select--readonly': readonly,\n\t\t\t\t\t'cds--select--fluid--invalid': fluid && invalid,\n\t\t\t\t\t'cds--select--fluid--focus': fluid && focused\n\t\t\t\t}\">\n\t\t\t\t<label\n\t\t\t\t\t*ngIf=\"label\"\n\t\t\t\t\t[for]=\"id\"\n\t\t\t\t\tclass=\"cds--label\"\n\t\t\t\t\t[ngClass]=\"{'cds--label--disabled': disabled}\">\n\t\t\t\t\t<ng-container *ngIf=\"!isTemplate(label)\">{{label}}</ng-container>\n\t\t\t\t\t<ng-template *ngIf=\"isTemplate(label)\" [ngTemplateOutlet]=\"label\"></ng-template>\n\t\t\t\t</label>\n\t\t\t\t<div *ngIf=\"display === 'inline'; else noInline\" class=\"cds--select-input--inline__wrapper\">\n\t\t\t\t\t<ng-container *ngTemplateOutlet=\"noInline\"></ng-container>\n\t\t\t\t</div>\n\t\t\t\t<div\n\t\t\t\t\t*ngIf=\"helperText && !invalid && !warn && !skeleton && !fluid\"\n\t\t\t\t\tclass=\"cds--form__helper-text\"\n\t\t\t\t\t[ngClass]=\"{\n\t\t\t\t\t\t'cds--form__helper-text--disabled': disabled\n\t\t\t\t\t}\">\n\t\t\t\t\t<ng-container *ngIf=\"!isTemplate(helperText)\">{{helperText}}</ng-container>\n\t\t\t\t\t<ng-template *ngIf=\"isTemplate(helperText)\" [ngTemplateOutlet]=\"helperText\"></ng-template>\n\t\t\t\t</div>\n\t\t\t</div>\n\t\t</div>\n\n\t\t<!-- select element: dynamically projected based on 'display' variant -->\n\t\t<ng-template #noInline>\n\t\t\t<div class=\"cds--select-input__wrapper\" [attr.data-invalid]=\"(invalid ? true : null)\">\n\t\t\t\t<select\n\t\t\t\t\t#select\n\t\t\t\t\t[attr.id]=\"id\"\n\t\t\t\t\t[attr.aria-label]=\"ariaLabel\"\n\t\t\t\t\t[disabled]=\"disabled\"\n\t\t\t\t\t(change)=\"onChange($event)\"\n\t\t\t\t\t[attr.aria-invalid]=\"invalid ? 'true' : null\"\n\t\t\t\t\t[attr.aria-readonly]=\"readonly ? 'true' : null\"\n\t\t\t\t\tclass=\"cds--select-input\"\n\t\t\t\t\t[ngClass]=\"{\n\t\t\t\t\t\t'cds--select-input--sm': size === 'sm',\n\t\t\t\t\t\t'cds--select-input--md': size === 'md',\n\t\t\t\t\t\t'cds--select-input--lg': size === 'lg'\n\t\t\t\t\t}\"\n\t\t\t\t\t(mousedown)=\"onMouseDown($event)\"\n\t\t\t\t\t(keydown)=\"onKeyDown($event)\"\n\t\t\t\t\t(focus)=\"fluid ? handleFocus($event) : null\"\n\t\t\t\t\t(blur)=\"fluid ? handleFocus($event) : null\">\n\t\t\t\t\t<ng-content></ng-content>\n\t\t\t\t</select>\n\t\t\t\t<svg\n\t\t\t\t\tfocusable=\"false\"\n\t\t\t\t\tpreserveAspectRatio=\"xMidYMid meet\"\n\t\t\t\t\tstyle=\"will-change: transform;\"\n\t\t\t\t\txmlns=\"http://www.w3.org/2000/svg\"\n\t\t\t\t\tclass=\"cds--select__arrow\"\n\t\t\t\t\twidth=\"16\"\n\t\t\t\t\theight=\"16\"\n\t\t\t\t\tviewBox=\"0 0 16 16\"\n\t\t\t\t\taria-hidden=\"true\">\n\t\t\t\t\t<path d=\"M8 11L3 6 3.7 5.3 8 9.6 12.3 5.3 13 6z\"></path>\n\t\t\t\t</svg>\n\t\t\t\t<svg\n\t\t\t\t\t*ngIf=\"invalid\"\n\t\t\t\t\tcdsIcon=\"warning--filled\"\n\t\t\t\t\tsize=\"16\"\n\t\t\t\t\tclass=\"cds--select__invalid-icon\">\n\t\t\t\t</svg>\n\t\t\t\t<svg\n\t\t\t\t\t*ngIf=\"!invalid && warn\"\n\t\t\t\t\tcdsIcon=\"warning--alt--filled\"\n\t\t\t\t\tsize=\"16\"\n\t\t\t\t\tclass=\"cds--select__invalid-icon cds--select__invalid-icon--warning\">\n\t\t\t\t</svg>\n\t\t\t\t<ng-container *ngIf=\"fluid\">\n\t\t\t\t\t<hr class=\"cds--select__divider\" />\n\t\t\t\t\t<div\n\t\t\t\t\t\t*ngIf=\"invalid && invalidText\" role=\"alert\" class=\"cds--form-requirement\" aria-live=\"polite\">\n\t\t\t\t\t\t<ng-container *ngIf=\"!isTemplate(invalidText)\">{{invalidText}}</ng-container>\n\t\t\t\t\t\t<ng-template *ngIf=\"isTemplate(invalidText)\" [ngTemplateOutlet]=\"invalidText\"></ng-template>\n\t\t\t\t\t</div>\n\t\t\t\t\t<div *ngIf=\"!invalid && warn\" class=\"cds--form-requirement\">\n\t\t\t\t\t\t<ng-container *ngIf=\"!isTemplate(warnText)\">{{warnText}}</ng-container>\n\t\t\t\t\t\t<ng-template *ngIf=\"isTemplate(warnText)\" [ngTemplateOutlet]=\"warnText\"></ng-template>\n\t\t\t\t\t</div>\n\t\t\t\t</ng-container>\n\t\t\t</div>\n\t\t\t<ng-container *ngIf=\"!fluid\">\n\t\t\t\t<div\n\t\t\t\t\t*ngIf=\"invalid && invalidText\" role=\"alert\" class=\"cds--form-requirement\" aria-live=\"polite\">\n\t\t\t\t\t<ng-container *ngIf=\"!isTemplate(invalidText)\">{{invalidText}}</ng-container>\n\t\t\t\t\t<ng-template *ngIf=\"isTemplate(invalidText)\" [ngTemplateOutlet]=\"invalidText\"></ng-template>\n\t\t\t\t</div>\n\t\t\t\t<div *ngIf=\"!invalid && warn\" class=\"cds--form-requirement\">\n\t\t\t\t\t<ng-container *ngIf=\"!isTemplate(warnText)\">{{warnText}}</ng-container>\n\t\t\t\t\t<ng-template *ngIf=\"isTemplate(warnText)\" [ngTemplateOutlet]=\"warnText\"></ng-template>\n\t\t\t\t</div>\n\t\t\t</ng-container>\n\t\t</ng-template>\n\t`,\n\tproviders: [\n\t\t{\n\t\t\tprovide: NG_VALUE_ACCESSOR,\n\t\t\tuseExisting: Select,\n\t\t\tmulti: true\n\t\t}\n\t]\n})\nexport class Select implements ControlValueAccessor, AfterViewInit {\n\t@Input() set value(v) {\n\t\tthis._value = v;\n\t\tif (this.select) {\n\t\t\tthis.select.nativeElement.value = this._value;\n\t\t}\n\t}\n\n\tget value() {\n\t\treturn this._value;\n\t}\n\n\t/**\n\t * Tracks the total number of selects instantiated. Used to generate unique IDs\n\t */\n\tstatic selectCount = 0;\n\n\t/**\n\t * `inline` or `default` select displays\n\t */\n\t@Input() display: \"inline\" | \"default\" = \"default\";\n\t/**\n\t * Label for the select. Appears above the input.\n\t */\n\t@Input() label: string | TemplateRef<any>;\n\t/**\n\t * Optional helper text that appears under the label.\n\t */\n\t@Input() helperText: string | TemplateRef<any>;\n\t/**\n\t * Sets the invalid text.\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\t/**\n\t * Sets the unique ID. Defaults to `select-${total count of selects instantiated}`\n\t */\n\t@Input() id = `select-${Select.selectCount++}`;\n\t/**\n\t * Number input field render size\n\t */\n\t@Input() size: \"sm\" | \"md\" | \"lg\" = \"md\";\n\t/**\n\t * Set to true to disable component.\n\t */\n\t@Input() disabled = false;\n\t/**\n\t * Set to true for a loading select.\n\t */\n\t@Input() skeleton = false;\n\t/**\n\t * Set to `true` for an invalid select component.\n\t */\n\t@Input() invalid = false;\n\t/**\n\t * Set to `true` for readonly state.\n\t */\n\t@Input() readonly = false;\n\n\t/**\n\t * @deprecated since v5 - Use `cdsLayer` directive instead\n\t * `light` or `dark` select theme\n\t */\n\t@Input() theme: \"light\" | \"dark\" = \"dark\";\n\t@Input() ariaLabel: string;\n\n\t/**\n\t * Experimental: enable fluid state\n\t */\n\t@Input() fluid = false;\n\n\t@Output() valueChange = new EventEmitter();\n\n\t@ViewChild(\"select\") select: ElementRef;\n\n\tfocused = false;\n\n\tprotected _value;\n\n\tngAfterViewInit() {\n\t\tif (\n\t\t\tthis.value !== undefined &&\n\t\t\tthis.value !== null &&\n\t\t\tthis.select &&\n\t\t\tthis.select.nativeElement.value !== this.value\n\t\t) {\n\t\t\tthis.select.nativeElement.value = this.value;\n\t\t}\n\t}\n\n\t/**\n\t * Receives a value from the model.\n\t */\n\twriteValue(obj: any) {\n\t\tthis.value = obj;\n\t}\n\n\t/**\n\t * Registers a listener that notifies the model when the control updates\n\t */\n\tregisterOnChange(fn: any) {\n\t\tthis.onChangeHandler = fn;\n\t}\n\n\t/**\n\t * Registers a listener that notifies the model when the control is blurred\n\t */\n\tregisterOnTouched(fn: any) {\n\t\tthis.onTouchedHandler = fn;\n\t}\n\n\t/**\n\t * Sets the disabled state through the model\n\t */\n\tsetDisabledState(isDisabled: boolean) {\n\t\tthis.disabled = isDisabled;\n\t}\n\n\t/**\n\t * Handles the change event from the `select`.\n\t * Sends events to the change handler and emits a `selected` event.\n\t */\n\tonChange(event) {\n\t\tthis.value = event.target.value;\n\t\tthis.onChangeHandler(event.target.value);\n\t\tthis.valueChange.emit(event.target.value);\n\t}\n\n\t/**\n\t * Listens for the host blurring, and notifies the model\n\t */\n\t@HostListener(\"focusout\")\n\tfocusOut() {\n\t\tthis.onTouchedHandler();\n\t}\n\n\tpublic isTemplate(value) {\n\t\treturn value instanceof TemplateRef;\n\t}\n\n\tonMouseDown(event: MouseEvent) {\n\t\t/**\n\t\t * This prevents the select from opening with mouse\n\t\t */\n\t\tif (this.readonly) {\n\t\t\tevent.preventDefault();\n\t\t\t(<HTMLElement>event.target).focus();\n\t\t}\n\t}\n\n\tonKeyDown(event: KeyboardEvent) {\n\t\tconst selectAccessKeys = [\"ArrowDown\", \"ArrowUp\", \"ArrowLeft\", \"ArrowRight\", \" \"];\n\t\t/**\n\t\t * This prevents the select from opening for the above keys\n\t\t */\n\t\tif (this.readonly && selectAccessKeys.includes(event.key)) {\n\t\t\tevent.preventDefault();\n\t\t}\n\t}\n\n\thandleFocus(event: FocusEvent) {\n\t\tthis.focused = event.type === \"focus\";\n\t}\n\n\t/**\n\t * placeholder declarations. Replaced by the functions provided to `registerOnChange` and `registerOnTouched`\n\t */\n\tprotected onChangeHandler = (_: any) => { };\n\tprotected onTouchedHandler = () => { };\n\n}\n",
|
|
48593
48642
|
"assetsDirs": [],
|
|
48594
48643
|
"styleUrlsData": "",
|
|
48595
48644
|
"stylesData": "",
|
|
@@ -48615,7 +48664,7 @@
|
|
|
48615
48664
|
}
|
|
48616
48665
|
],
|
|
48617
48666
|
"returnType": "void",
|
|
48618
|
-
"line":
|
|
48667
|
+
"line": 170,
|
|
48619
48668
|
"jsdoctags": [
|
|
48620
48669
|
{
|
|
48621
48670
|
"name": "v",
|
|
@@ -48632,7 +48681,7 @@
|
|
|
48632
48681
|
"name": "value",
|
|
48633
48682
|
"type": "",
|
|
48634
48683
|
"returnType": "",
|
|
48635
|
-
"line":
|
|
48684
|
+
"line": 177
|
|
48636
48685
|
}
|
|
48637
48686
|
}
|
|
48638
48687
|
}
|
|
@@ -62461,7 +62510,7 @@
|
|
|
62461
62510
|
"deprecationMessage": "",
|
|
62462
62511
|
"rawdescription": "\n\nSet to true to disable component.\n",
|
|
62463
62512
|
"description": "<p>Set to true to disable component.</p>\n",
|
|
62464
|
-
"line":
|
|
62513
|
+
"line": 221,
|
|
62465
62514
|
"type": "boolean",
|
|
62466
62515
|
"decorators": [],
|
|
62467
62516
|
"inheritance": {
|
|
@@ -62475,20 +62524,34 @@
|
|
|
62475
62524
|
"deprecationMessage": "",
|
|
62476
62525
|
"rawdescription": "\n\n`inline` or `default` select displays\n",
|
|
62477
62526
|
"description": "<p><code>inline</code> or <code>default</code> select displays</p>\n",
|
|
62478
|
-
"line":
|
|
62527
|
+
"line": 189,
|
|
62479
62528
|
"type": "\"inline\" | \"default\"",
|
|
62480
62529
|
"decorators": [],
|
|
62481
62530
|
"inheritance": {
|
|
62482
62531
|
"file": "Select"
|
|
62483
62532
|
}
|
|
62484
62533
|
},
|
|
62534
|
+
{
|
|
62535
|
+
"name": "fluid",
|
|
62536
|
+
"defaultValue": "false",
|
|
62537
|
+
"deprecated": false,
|
|
62538
|
+
"deprecationMessage": "",
|
|
62539
|
+
"rawdescription": "\n\nExperimental: enable fluid state\n",
|
|
62540
|
+
"description": "<p>Experimental: enable fluid state</p>\n",
|
|
62541
|
+
"line": 245,
|
|
62542
|
+
"type": "boolean",
|
|
62543
|
+
"decorators": [],
|
|
62544
|
+
"inheritance": {
|
|
62545
|
+
"file": "Select"
|
|
62546
|
+
}
|
|
62547
|
+
},
|
|
62485
62548
|
{
|
|
62486
62549
|
"name": "helperText",
|
|
62487
62550
|
"deprecated": false,
|
|
62488
62551
|
"deprecationMessage": "",
|
|
62489
62552
|
"rawdescription": "\n\nOptional helper text that appears under the label.\n",
|
|
62490
62553
|
"description": "<p>Optional helper text that appears under the label.</p>\n",
|
|
62491
|
-
"line":
|
|
62554
|
+
"line": 197,
|
|
62492
62555
|
"type": "string | TemplateRef<any>",
|
|
62493
62556
|
"decorators": [],
|
|
62494
62557
|
"inheritance": {
|
|
@@ -62502,7 +62565,7 @@
|
|
|
62502
62565
|
"deprecationMessage": "",
|
|
62503
62566
|
"rawdescription": "\n\nSet to `true` for an invalid select component.\n",
|
|
62504
62567
|
"description": "<p>Set to <code>true</code> for an invalid select component.</p>\n",
|
|
62505
|
-
"line":
|
|
62568
|
+
"line": 229,
|
|
62506
62569
|
"type": "boolean",
|
|
62507
62570
|
"decorators": [],
|
|
62508
62571
|
"inheritance": {
|
|
@@ -62515,7 +62578,7 @@
|
|
|
62515
62578
|
"deprecationMessage": "",
|
|
62516
62579
|
"rawdescription": "\n\nSets the invalid text.\n",
|
|
62517
62580
|
"description": "<p>Sets the invalid text.</p>\n",
|
|
62518
|
-
"line":
|
|
62581
|
+
"line": 201,
|
|
62519
62582
|
"type": "string | TemplateRef<any>",
|
|
62520
62583
|
"decorators": [],
|
|
62521
62584
|
"inheritance": {
|
|
@@ -62529,7 +62592,7 @@
|
|
|
62529
62592
|
"deprecationMessage": "",
|
|
62530
62593
|
"rawdescription": "\n\nSet to `true` for readonly state.\n",
|
|
62531
62594
|
"description": "<p>Set to <code>true</code> for readonly state.</p>\n",
|
|
62532
|
-
"line":
|
|
62595
|
+
"line": 233,
|
|
62533
62596
|
"type": "boolean",
|
|
62534
62597
|
"decorators": [],
|
|
62535
62598
|
"inheritance": {
|
|
@@ -62543,7 +62606,7 @@
|
|
|
62543
62606
|
"deprecationMessage": "",
|
|
62544
62607
|
"rawdescription": "\n\nNumber input field render size\n",
|
|
62545
62608
|
"description": "<p>Number input field render size</p>\n",
|
|
62546
|
-
"line":
|
|
62609
|
+
"line": 217,
|
|
62547
62610
|
"type": "\"sm\" | \"md\" | \"lg\"",
|
|
62548
62611
|
"decorators": [],
|
|
62549
62612
|
"inheritance": {
|
|
@@ -62554,7 +62617,7 @@
|
|
|
62554
62617
|
"name": "value",
|
|
62555
62618
|
"deprecated": false,
|
|
62556
62619
|
"deprecationMessage": "",
|
|
62557
|
-
"line":
|
|
62620
|
+
"line": 170,
|
|
62558
62621
|
"type": "any",
|
|
62559
62622
|
"decorators": [],
|
|
62560
62623
|
"inheritance": {
|
|
@@ -62568,7 +62631,7 @@
|
|
|
62568
62631
|
"deprecationMessage": "",
|
|
62569
62632
|
"rawdescription": "\n\nSet to `true` to show a warning (contents set by warningText)\n",
|
|
62570
62633
|
"description": "<p>Set to <code>true</code> to show a warning (contents set by warningText)</p>\n",
|
|
62571
|
-
"line":
|
|
62634
|
+
"line": 205,
|
|
62572
62635
|
"type": "boolean",
|
|
62573
62636
|
"decorators": [],
|
|
62574
62637
|
"inheritance": {
|
|
@@ -62581,7 +62644,7 @@
|
|
|
62581
62644
|
"deprecationMessage": "",
|
|
62582
62645
|
"rawdescription": "\n\nSets the warning text\n",
|
|
62583
62646
|
"description": "<p>Sets the warning text</p>\n",
|
|
62584
|
-
"line":
|
|
62647
|
+
"line": 209,
|
|
62585
62648
|
"type": "string | TemplateRef<any>",
|
|
62586
62649
|
"decorators": [],
|
|
62587
62650
|
"inheritance": {
|
|
@@ -62595,7 +62658,7 @@
|
|
|
62595
62658
|
"defaultValue": "new EventEmitter()",
|
|
62596
62659
|
"deprecated": false,
|
|
62597
62660
|
"deprecationMessage": "",
|
|
62598
|
-
"line":
|
|
62661
|
+
"line": 247,
|
|
62599
62662
|
"type": "EventEmitter",
|
|
62600
62663
|
"inheritance": {
|
|
62601
62664
|
"file": "Select"
|
|
@@ -62660,6 +62723,19 @@
|
|
|
62660
62723
|
170
|
|
62661
62724
|
]
|
|
62662
62725
|
},
|
|
62726
|
+
{
|
|
62727
|
+
"name": "focused",
|
|
62728
|
+
"defaultValue": "false",
|
|
62729
|
+
"deprecated": false,
|
|
62730
|
+
"deprecationMessage": "",
|
|
62731
|
+
"type": "",
|
|
62732
|
+
"optional": false,
|
|
62733
|
+
"description": "",
|
|
62734
|
+
"line": 251,
|
|
62735
|
+
"inheritance": {
|
|
62736
|
+
"file": "Select"
|
|
62737
|
+
}
|
|
62738
|
+
},
|
|
62663
62739
|
{
|
|
62664
62740
|
"name": "select",
|
|
62665
62741
|
"deprecated": false,
|
|
@@ -62667,7 +62743,7 @@
|
|
|
62667
62743
|
"type": "ElementRef",
|
|
62668
62744
|
"optional": false,
|
|
62669
62745
|
"description": "",
|
|
62670
|
-
"line":
|
|
62746
|
+
"line": 249,
|
|
62671
62747
|
"decorators": [
|
|
62672
62748
|
{
|
|
62673
62749
|
"name": "ViewChild",
|
|
@@ -62689,7 +62765,7 @@
|
|
|
62689
62765
|
"type": "number",
|
|
62690
62766
|
"optional": false,
|
|
62691
62767
|
"description": "<p>Tracks the total number of selects instantiated. Used to generate unique IDs</p>\n",
|
|
62692
|
-
"line":
|
|
62768
|
+
"line": 184,
|
|
62693
62769
|
"rawdescription": "\n\nTracks the total number of selects instantiated. Used to generate unique IDs\n",
|
|
62694
62770
|
"modifierKind": [
|
|
62695
62771
|
126
|
|
@@ -62706,7 +62782,7 @@
|
|
|
62706
62782
|
"optional": false,
|
|
62707
62783
|
"returnType": "void",
|
|
62708
62784
|
"typeParameters": [],
|
|
62709
|
-
"line":
|
|
62785
|
+
"line": 308,
|
|
62710
62786
|
"deprecated": false,
|
|
62711
62787
|
"deprecationMessage": "",
|
|
62712
62788
|
"rawdescription": "\n\nListens for the host blurring, and notifies the model\n",
|
|
@@ -62724,6 +62800,37 @@
|
|
|
62724
62800
|
"file": "Select"
|
|
62725
62801
|
}
|
|
62726
62802
|
},
|
|
62803
|
+
{
|
|
62804
|
+
"name": "handleFocus",
|
|
62805
|
+
"args": [
|
|
62806
|
+
{
|
|
62807
|
+
"name": "event",
|
|
62808
|
+
"type": "FocusEvent",
|
|
62809
|
+
"deprecated": false,
|
|
62810
|
+
"deprecationMessage": ""
|
|
62811
|
+
}
|
|
62812
|
+
],
|
|
62813
|
+
"optional": false,
|
|
62814
|
+
"returnType": "void",
|
|
62815
|
+
"typeParameters": [],
|
|
62816
|
+
"line": 336,
|
|
62817
|
+
"deprecated": false,
|
|
62818
|
+
"deprecationMessage": "",
|
|
62819
|
+
"jsdoctags": [
|
|
62820
|
+
{
|
|
62821
|
+
"name": "event",
|
|
62822
|
+
"type": "FocusEvent",
|
|
62823
|
+
"deprecated": false,
|
|
62824
|
+
"deprecationMessage": "",
|
|
62825
|
+
"tagName": {
|
|
62826
|
+
"text": "param"
|
|
62827
|
+
}
|
|
62828
|
+
}
|
|
62829
|
+
],
|
|
62830
|
+
"inheritance": {
|
|
62831
|
+
"file": "Select"
|
|
62832
|
+
}
|
|
62833
|
+
},
|
|
62727
62834
|
{
|
|
62728
62835
|
"name": "isTemplate",
|
|
62729
62836
|
"args": [
|
|
@@ -62737,7 +62844,7 @@
|
|
|
62737
62844
|
"optional": false,
|
|
62738
62845
|
"returnType": "boolean",
|
|
62739
62846
|
"typeParameters": [],
|
|
62740
|
-
"line":
|
|
62847
|
+
"line": 312,
|
|
62741
62848
|
"deprecated": false,
|
|
62742
62849
|
"deprecationMessage": "",
|
|
62743
62850
|
"modifierKind": [
|
|
@@ -62771,7 +62878,7 @@
|
|
|
62771
62878
|
"optional": false,
|
|
62772
62879
|
"returnType": "void",
|
|
62773
62880
|
"typeParameters": [],
|
|
62774
|
-
"line":
|
|
62881
|
+
"line": 298,
|
|
62775
62882
|
"deprecated": false,
|
|
62776
62883
|
"deprecationMessage": "",
|
|
62777
62884
|
"rawdescription": "\n\nHandles the change event from the `select`.\nSends events to the change handler and emits a `selected` event.\n",
|
|
@@ -62804,7 +62911,7 @@
|
|
|
62804
62911
|
"optional": false,
|
|
62805
62912
|
"returnType": "void",
|
|
62806
62913
|
"typeParameters": [],
|
|
62807
|
-
"line":
|
|
62914
|
+
"line": 326,
|
|
62808
62915
|
"deprecated": false,
|
|
62809
62916
|
"deprecationMessage": "",
|
|
62810
62917
|
"jsdoctags": [
|
|
@@ -62835,7 +62942,7 @@
|
|
|
62835
62942
|
"optional": false,
|
|
62836
62943
|
"returnType": "void",
|
|
62837
62944
|
"typeParameters": [],
|
|
62838
|
-
"line":
|
|
62945
|
+
"line": 316,
|
|
62839
62946
|
"deprecated": false,
|
|
62840
62947
|
"deprecationMessage": "",
|
|
62841
62948
|
"jsdoctags": [
|
|
@@ -62866,7 +62973,7 @@
|
|
|
62866
62973
|
"optional": false,
|
|
62867
62974
|
"returnType": "void",
|
|
62868
62975
|
"typeParameters": [],
|
|
62869
|
-
"line":
|
|
62976
|
+
"line": 276,
|
|
62870
62977
|
"deprecated": false,
|
|
62871
62978
|
"deprecationMessage": "",
|
|
62872
62979
|
"rawdescription": "\n\nRegisters a listener that notifies the model when the control updates\n",
|
|
@@ -62899,7 +63006,7 @@
|
|
|
62899
63006
|
"optional": false,
|
|
62900
63007
|
"returnType": "void",
|
|
62901
63008
|
"typeParameters": [],
|
|
62902
|
-
"line":
|
|
63009
|
+
"line": 283,
|
|
62903
63010
|
"deprecated": false,
|
|
62904
63011
|
"deprecationMessage": "",
|
|
62905
63012
|
"rawdescription": "\n\nRegisters a listener that notifies the model when the control is blurred\n",
|
|
@@ -62932,7 +63039,7 @@
|
|
|
62932
63039
|
"optional": false,
|
|
62933
63040
|
"returnType": "void",
|
|
62934
63041
|
"typeParameters": [],
|
|
62935
|
-
"line":
|
|
63042
|
+
"line": 290,
|
|
62936
63043
|
"deprecated": false,
|
|
62937
63044
|
"deprecationMessage": "",
|
|
62938
63045
|
"rawdescription": "\n\nSets the disabled state through the model\n",
|
|
@@ -62965,7 +63072,7 @@
|
|
|
62965
63072
|
"optional": false,
|
|
62966
63073
|
"returnType": "void",
|
|
62967
63074
|
"typeParameters": [],
|
|
62968
|
-
"line":
|
|
63075
|
+
"line": 269,
|
|
62969
63076
|
"deprecated": false,
|
|
62970
63077
|
"deprecationMessage": "",
|
|
62971
63078
|
"rawdescription": "\n\nReceives a value from the model.\n",
|
|
@@ -63034,7 +63141,7 @@
|
|
|
63034
63141
|
"deprecationMessage": "",
|
|
63035
63142
|
"rawdescription": "\n\nListens for the host blurring, and notifies the model\n",
|
|
63036
63143
|
"description": "<p>Listens for the host blurring, and notifies the model</p>\n",
|
|
63037
|
-
"line":
|
|
63144
|
+
"line": 308,
|
|
63038
63145
|
"inheritance": {
|
|
63039
63146
|
"file": "Select"
|
|
63040
63147
|
}
|
|
@@ -72812,6 +72919,16 @@
|
|
|
72812
72919
|
"type": "",
|
|
72813
72920
|
"defaultValue": "Template.bind({})"
|
|
72814
72921
|
},
|
|
72922
|
+
{
|
|
72923
|
+
"name": "Fluid",
|
|
72924
|
+
"ctype": "miscellaneous",
|
|
72925
|
+
"subtype": "variable",
|
|
72926
|
+
"file": "src/select/select.stories.ts",
|
|
72927
|
+
"deprecated": false,
|
|
72928
|
+
"deprecationMessage": "",
|
|
72929
|
+
"type": "",
|
|
72930
|
+
"defaultValue": "Template.bind({})"
|
|
72931
|
+
},
|
|
72815
72932
|
{
|
|
72816
72933
|
"name": "FormModal",
|
|
72817
72934
|
"ctype": "miscellaneous",
|
|
@@ -73526,7 +73643,7 @@
|
|
|
73526
73643
|
"deprecated": false,
|
|
73527
73644
|
"deprecationMessage": "",
|
|
73528
73645
|
"type": "",
|
|
73529
|
-
"defaultValue": "(args) => ({\n\tprops: args,\n\ttemplate: `\n\t\t<cds-select\n\t\t\t[(ngModel)]=\"model\"\n\t\t\t[skeleton]=\"skeleton\"\n\t\t\t[disabled]=\"disabled\"\n\t\t\t[readonly]=\"readonly\"\n\t\t\t[size]=\"size\"\n\t\t\t[invalid]=\"invalid\"\n\t\t\t[invalidText]=\"invalidText\"\n\t\t\t[warn]=\"warn\"\n\t\t\t[warnText]=\"warnText\"\n\t\t\t[label]=\"label\"\n\t\t\t[helperText]=\"helperText\"\n\t\t\t[theme]=\"theme\"\n\t\t\t[(ngModel)]=\"model\"\n\t\t\t[display]=\"display\"\n\t\t\tariaLabel='ngModel select'>\n\t\t\t<option value=\"default\" disabled selected hidden>Choose an option</option>\n\t\t\t<option value=\"option1\">Option 1</option>\n\t\t\t<option value=\"option2\">Option 2</option>\n\t\t\t<option value=\"option3\">Option 3</option>\n\t\t</cds-select>\n\t`\n})"
|
|
73646
|
+
"defaultValue": "(args) => ({\n\tprops: args,\n\ttemplate: `\n\t\t<cds-select\n\t\t\t[(ngModel)]=\"model\"\n\t\t\t[skeleton]=\"skeleton\"\n\t\t\t[disabled]=\"disabled\"\n\t\t\t[readonly]=\"readonly\"\n\t\t\t[size]=\"size\"\n\t\t\t[invalid]=\"invalid\"\n\t\t\t[invalidText]=\"invalidText\"\n\t\t\t[warn]=\"warn\"\n\t\t\t[warnText]=\"warnText\"\n\t\t\t[label]=\"label\"\n\t\t\t[helperText]=\"helperText\"\n\t\t\t[theme]=\"theme\"\n\t\t\t[(ngModel)]=\"model\"\n\t\t\t[fluid]=\"fluid\"\n\t\t\t[display]=\"display\"\n\t\t\tariaLabel='ngModel select'>\n\t\t\t<option value=\"default\" disabled selected hidden>Choose an option</option>\n\t\t\t<option value=\"option1\">Option 1</option>\n\t\t\t<option value=\"option2\">Option 2</option>\n\t\t\t<option value=\"option3\">Option 3</option>\n\t\t</cds-select>\n\t`\n})"
|
|
73530
73647
|
},
|
|
73531
73648
|
{
|
|
73532
73649
|
"name": "NgTemplate",
|
|
@@ -74821,7 +74938,7 @@
|
|
|
74821
74938
|
"deprecated": false,
|
|
74822
74939
|
"deprecationMessage": "",
|
|
74823
74940
|
"type": "",
|
|
74824
|
-
"defaultValue": "(args) => ({\n\tprops: args,\n\ttemplate: `\n\t\t<cds-select\n\t\t\t[skeleton]=\"skeleton\"\n\t\t\t[disabled]=\"disabled\"\n\t\t\t[readonly]=\"readonly\"\n\t\t\t[size]=\"size\"\n\t\t\t[invalid]=\"invalid\"\n\t\t\t[invalidText]=\"invalidText\"\n\t\t\t[warn]=\"warn\"\n\t\t\t[warnText]=\"warnText\"\n\t\t\t[label]=\"label\"\n\t\t\t[helperText]=\"helperText\"\n\t\t\t[theme]=\"theme\"\n\t\t\t[(ngModel)]=\"model\"\n\t\t\t[display]=\"display\">\n\t\t\t<option value=\"default\" disabled selected hidden>Choose an option</option>\n\t\t\t<option value=\"solong\">A much longer option that is worth having around to check how text flows</option>\n\t\t\t<optgroup label=\"Category 1\">\n\t\t\t\t<option value=\"option1\">Option 1</option>\n\t\t\t\t<option value=\"option2\">Option 2</option>\n\t\t\t</optgroup>\n\t\t\t<optgroup label=\"Category 2\">\n\t\t\t\t<option value=\"option1\">Option 1</option>\n\t\t\t\t<option value=\"option2\">Option 2</option>\n\t\t\t</optgroup>\n\t\t</cds-select>\n\t`\n})"
|
|
74941
|
+
"defaultValue": "(args) => ({\n\tprops: args,\n\ttemplate: `\n\t\t<cds-select\n\t\t\t[skeleton]=\"skeleton\"\n\t\t\t[disabled]=\"disabled\"\n\t\t\t[readonly]=\"readonly\"\n\t\t\t[size]=\"size\"\n\t\t\t[invalid]=\"invalid\"\n\t\t\t[invalidText]=\"invalidText\"\n\t\t\t[warn]=\"warn\"\n\t\t\t[warnText]=\"warnText\"\n\t\t\t[label]=\"label\"\n\t\t\t[helperText]=\"helperText\"\n\t\t\t[theme]=\"theme\"\n\t\t\t[(ngModel)]=\"model\"\n\t\t\t[fluid]=\"fluid\"\n\t\t\t[display]=\"display\">\n\t\t\t<option value=\"default\" disabled selected hidden>Choose an option</option>\n\t\t\t<option value=\"solong\">A much longer option that is worth having around to check how text flows</option>\n\t\t\t<optgroup label=\"Category 1\">\n\t\t\t\t<option value=\"option1\">Option 1</option>\n\t\t\t\t<option value=\"option2\">Option 2</option>\n\t\t\t</optgroup>\n\t\t\t<optgroup label=\"Category 2\">\n\t\t\t\t<option value=\"option1\">Option 1</option>\n\t\t\t\t<option value=\"option2\">Option 2</option>\n\t\t\t</optgroup>\n\t\t</cds-select>\n\t`\n})"
|
|
74825
74942
|
},
|
|
74826
74943
|
{
|
|
74827
74944
|
"name": "Template",
|
|
@@ -79947,6 +80064,16 @@
|
|
|
79947
80064
|
"type": "",
|
|
79948
80065
|
"defaultValue": "Template.bind({})"
|
|
79949
80066
|
},
|
|
80067
|
+
{
|
|
80068
|
+
"name": "Fluid",
|
|
80069
|
+
"ctype": "miscellaneous",
|
|
80070
|
+
"subtype": "variable",
|
|
80071
|
+
"file": "src/select/select.stories.ts",
|
|
80072
|
+
"deprecated": false,
|
|
80073
|
+
"deprecationMessage": "",
|
|
80074
|
+
"type": "",
|
|
80075
|
+
"defaultValue": "Template.bind({})"
|
|
80076
|
+
},
|
|
79950
80077
|
{
|
|
79951
80078
|
"name": "NgModel",
|
|
79952
80079
|
"ctype": "miscellaneous",
|
|
@@ -79965,7 +80092,7 @@
|
|
|
79965
80092
|
"deprecated": false,
|
|
79966
80093
|
"deprecationMessage": "",
|
|
79967
80094
|
"type": "",
|
|
79968
|
-
"defaultValue": "(args) => ({\n\tprops: args,\n\ttemplate: `\n\t\t<cds-select\n\t\t\t[(ngModel)]=\"model\"\n\t\t\t[skeleton]=\"skeleton\"\n\t\t\t[disabled]=\"disabled\"\n\t\t\t[readonly]=\"readonly\"\n\t\t\t[size]=\"size\"\n\t\t\t[invalid]=\"invalid\"\n\t\t\t[invalidText]=\"invalidText\"\n\t\t\t[warn]=\"warn\"\n\t\t\t[warnText]=\"warnText\"\n\t\t\t[label]=\"label\"\n\t\t\t[helperText]=\"helperText\"\n\t\t\t[theme]=\"theme\"\n\t\t\t[(ngModel)]=\"model\"\n\t\t\t[display]=\"display\"\n\t\t\tariaLabel='ngModel select'>\n\t\t\t<option value=\"default\" disabled selected hidden>Choose an option</option>\n\t\t\t<option value=\"option1\">Option 1</option>\n\t\t\t<option value=\"option2\">Option 2</option>\n\t\t\t<option value=\"option3\">Option 3</option>\n\t\t</cds-select>\n\t`\n})"
|
|
80095
|
+
"defaultValue": "(args) => ({\n\tprops: args,\n\ttemplate: `\n\t\t<cds-select\n\t\t\t[(ngModel)]=\"model\"\n\t\t\t[skeleton]=\"skeleton\"\n\t\t\t[disabled]=\"disabled\"\n\t\t\t[readonly]=\"readonly\"\n\t\t\t[size]=\"size\"\n\t\t\t[invalid]=\"invalid\"\n\t\t\t[invalidText]=\"invalidText\"\n\t\t\t[warn]=\"warn\"\n\t\t\t[warnText]=\"warnText\"\n\t\t\t[label]=\"label\"\n\t\t\t[helperText]=\"helperText\"\n\t\t\t[theme]=\"theme\"\n\t\t\t[(ngModel)]=\"model\"\n\t\t\t[fluid]=\"fluid\"\n\t\t\t[display]=\"display\"\n\t\t\tariaLabel='ngModel select'>\n\t\t\t<option value=\"default\" disabled selected hidden>Choose an option</option>\n\t\t\t<option value=\"option1\">Option 1</option>\n\t\t\t<option value=\"option2\">Option 2</option>\n\t\t\t<option value=\"option3\">Option 3</option>\n\t\t</cds-select>\n\t`\n})"
|
|
79969
80096
|
},
|
|
79970
80097
|
{
|
|
79971
80098
|
"name": "OptionsSelected",
|
|
@@ -80015,7 +80142,7 @@
|
|
|
80015
80142
|
"deprecated": false,
|
|
80016
80143
|
"deprecationMessage": "",
|
|
80017
80144
|
"type": "",
|
|
80018
|
-
"defaultValue": "(args) => ({\n\tprops: args,\n\ttemplate: `\n\t\t<cds-select\n\t\t\t[skeleton]=\"skeleton\"\n\t\t\t[disabled]=\"disabled\"\n\t\t\t[readonly]=\"readonly\"\n\t\t\t[size]=\"size\"\n\t\t\t[invalid]=\"invalid\"\n\t\t\t[invalidText]=\"invalidText\"\n\t\t\t[warn]=\"warn\"\n\t\t\t[warnText]=\"warnText\"\n\t\t\t[label]=\"label\"\n\t\t\t[helperText]=\"helperText\"\n\t\t\t[theme]=\"theme\"\n\t\t\t[(ngModel)]=\"model\"\n\t\t\t[display]=\"display\">\n\t\t\t<option value=\"default\" disabled selected hidden>Choose an option</option>\n\t\t\t<option value=\"solong\">A much longer option that is worth having around to check how text flows</option>\n\t\t\t<optgroup label=\"Category 1\">\n\t\t\t\t<option value=\"option1\">Option 1</option>\n\t\t\t\t<option value=\"option2\">Option 2</option>\n\t\t\t</optgroup>\n\t\t\t<optgroup label=\"Category 2\">\n\t\t\t\t<option value=\"option1\">Option 1</option>\n\t\t\t\t<option value=\"option2\">Option 2</option>\n\t\t\t</optgroup>\n\t\t</cds-select>\n\t`\n})"
|
|
80145
|
+
"defaultValue": "(args) => ({\n\tprops: args,\n\ttemplate: `\n\t\t<cds-select\n\t\t\t[skeleton]=\"skeleton\"\n\t\t\t[disabled]=\"disabled\"\n\t\t\t[readonly]=\"readonly\"\n\t\t\t[size]=\"size\"\n\t\t\t[invalid]=\"invalid\"\n\t\t\t[invalidText]=\"invalidText\"\n\t\t\t[warn]=\"warn\"\n\t\t\t[warnText]=\"warnText\"\n\t\t\t[label]=\"label\"\n\t\t\t[helperText]=\"helperText\"\n\t\t\t[theme]=\"theme\"\n\t\t\t[(ngModel)]=\"model\"\n\t\t\t[fluid]=\"fluid\"\n\t\t\t[display]=\"display\">\n\t\t\t<option value=\"default\" disabled selected hidden>Choose an option</option>\n\t\t\t<option value=\"solong\">A much longer option that is worth having around to check how text flows</option>\n\t\t\t<optgroup label=\"Category 1\">\n\t\t\t\t<option value=\"option1\">Option 1</option>\n\t\t\t\t<option value=\"option2\">Option 2</option>\n\t\t\t</optgroup>\n\t\t\t<optgroup label=\"Category 2\">\n\t\t\t\t<option value=\"option1\">Option 1</option>\n\t\t\t\t<option value=\"option2\">Option 2</option>\n\t\t\t</optgroup>\n\t\t</cds-select>\n\t`\n})"
|
|
80019
80146
|
},
|
|
80020
80147
|
{
|
|
80021
80148
|
"name": "ValueProperty",
|
|
@@ -87442,8 +87569,8 @@
|
|
|
87442
87569
|
"type": "component",
|
|
87443
87570
|
"linktype": "component",
|
|
87444
87571
|
"name": "Select",
|
|
87445
|
-
"coveragePercent":
|
|
87446
|
-
"coverageCount": "
|
|
87572
|
+
"coveragePercent": 68,
|
|
87573
|
+
"coverageCount": "22/32",
|
|
87447
87574
|
"status": "good"
|
|
87448
87575
|
},
|
|
87449
87576
|
{
|
|
@@ -87456,6 +87583,16 @@
|
|
|
87456
87583
|
"coverageCount": "0/1",
|
|
87457
87584
|
"status": "low"
|
|
87458
87585
|
},
|
|
87586
|
+
{
|
|
87587
|
+
"filePath": "src/select/select.stories.ts",
|
|
87588
|
+
"type": "variable",
|
|
87589
|
+
"linktype": "miscellaneous",
|
|
87590
|
+
"linksubtype": "variable",
|
|
87591
|
+
"name": "Fluid",
|
|
87592
|
+
"coveragePercent": 0,
|
|
87593
|
+
"coverageCount": "0/1",
|
|
87594
|
+
"status": "low"
|
|
87595
|
+
},
|
|
87459
87596
|
{
|
|
87460
87597
|
"filePath": "src/select/select.stories.ts",
|
|
87461
87598
|
"type": "variable",
|
|
@@ -89048,8 +89185,8 @@
|
|
|
89048
89185
|
"type": "component",
|
|
89049
89186
|
"linktype": "component",
|
|
89050
89187
|
"name": "TimePickerSelect",
|
|
89051
|
-
"coveragePercent":
|
|
89052
|
-
"coverageCount": "
|
|
89188
|
+
"coveragePercent": 51,
|
|
89189
|
+
"coverageCount": "20/39",
|
|
89053
89190
|
"status": "good"
|
|
89054
89191
|
},
|
|
89055
89192
|
{
|