1"use strict"; 2(self["webpackChunkprep"] = self["webpackChunkprep"] || []).push([["default-node_modules_progress_kendo-angular-buttons___ivy_ngcc___dist_fesm2015_index_js"],{ 3 4/***/ 27237: 5/*!******************************************************************************************!*\ 6 !*** ./node_modules/@progress/kendo-angular-buttons/__ivy_ngcc__/dist/fesm2015/index.js ***! 7 \******************************************************************************************/ 8/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { 9 10__webpack_require__.r(__webpack_exports__); 11/* harmony export */ __webpack_require__.d(__webpack_exports__, { 12/* harmony export */ "KendoButtonService": () => (/* binding */ KendoButtonService), 13/* harmony export */ "DialItemComponent": () => (/* binding */ DialItemComponent), 14/* harmony export */ "DialListComponent": () => (/* binding */ DialListComponent), 15/* harmony export */ "FocusService": () => (/* binding */ FocusService), 16/* harmony export */ "FocusableDirective": () => (/* binding */ FocusableDirective), 17/* harmony export */ "ButtonItemTemplateDirective": () => (/* binding */ ButtonItemTemplateDirective), 18/* harmony export */ "ListButton": () => (/* binding */ ListButton), 19/* harmony export */ "ListComponent": () => (/* binding */ ListComponent), 20/* harmony export */ "ListModule": () => (/* binding */ ListModule), 21/* harmony export */ "TemplateContextDirective": () => (/* binding */ TemplateContextDirective), 22/* harmony export */ "NAVIGATION_CONFIG": () => (/* binding */ NAVIGATION_CONFIG), 23/* harmony export */ "NavigationService": () => (/* binding */ NavigationService), 24/* harmony export */ "LocalizedSplitButtonMessagesDirective": () => (/* binding */ LocalizedSplitButtonMessagesDirective), 25/* harmony export */ "Messages": () => (/* binding */ Messages), 26/* harmony export */ "ButtonDirective": () => (/* binding */ ButtonDirective), 27/* harmony export */ "Button": () => (/* binding */ ButtonDirective), 28/* harmony export */ "ButtonGroupComponent": () => (/* binding */ ButtonGroupComponent), 29/* harmony export */ "ButtonGroup": () => (/* binding */ ButtonGroupComponent), 30/* harmony export */ "ButtonGroupModule": () => (/* binding */ ButtonGroupModule), 31/* harmony export */ "ButtonModule": () => (/* binding */ ButtonModule), 32/* harmony export */ "ButtonsModule": () => (/* binding */ ButtonsModule), 33/* harmony export */ "SplitButtonComponent": () => (/* binding */ SplitButtonComponent), 34/* harmony export */ "SplitButton": () => (/* binding */ SplitButtonComponent), 35/* harmony export */ "SplitButtonModule": () => (/* binding */ SplitButtonModule), 36/* harmony export */ "SplitButtonCustomMessagesComponent": () => (/* binding */ SplitButtonCustomMessagesComponent), 37/* harmony export */ "DropDownButtonComponent": () => (/* binding */ DropDownButtonComponent), 38/* harmony export */ "DropDownButton": () => (/* binding */ DropDownButtonComponent), 39/* harmony export */ "DropDownButtonModule": () => (/* binding */ DropDownButtonModule), 40/* harmony export */ "ChipComponent": () => (/* binding */ ChipComponent), 41/* harmony export */ "ChipListComponent": () => (/* binding */ ChipListComponent), 42/* harmony export */ "ChipModule": () => (/* binding */ ChipModule), 43/* harmony export */ "FloatingActionButtonModule": () => (/* binding */ FloatingActionButtonModule), 44/* harmony export */ "FloatingActionButtonComponent": () => (/* binding */ FloatingActionButtonComponent), 45/* harmony export */ "FloatingActionButtonTemplateDirective": () => (/* binding */ FloatingActionButtonTemplateDirective), 46/* harmony export */ "DialItemTemplateDirective": () => (/* binding */ DialItemTemplateDirective) 47/* harmony export */ }); 48/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! tslib */ 72421); 49/* harmony import */ var _angular_core__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @angular/core */ 3184); 50/* harmony import */ var rxjs__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! rxjs */ 92218); 51/* harmony import */ var rxjs__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! rxjs */ 36312); 52/* harmony import */ var rxjs__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! rxjs */ 88623); 53/* harmony import */ var rxjs__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! rxjs */ 32425); 54/* harmony import */ var _progress_kendo_angular_common__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @progress/kendo-angular-common */ 57436); 55/* harmony import */ var _progress_kendo_angular_l10n__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! @progress/kendo-angular-l10n */ 34131); 56/* harmony import */ var _progress_kendo_licensing__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @progress/kendo-licensing */ 59958); 57/* harmony import */ var _angular_common__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! @angular/common */ 36362); 58/* harmony import */ var _progress_kendo_angular_popup__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! @progress/kendo-angular-popup */ 6034); 59/* harmony import */ var rxjs_operators__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! rxjs/operators */ 59151); 60/* harmony import */ var rxjs_operators__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! rxjs/operators */ 83910); 61/* harmony import */ var _angular_animations__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! @angular/animations */ 31631); 62/**----------------------------------------------------------------------------------------- 63* Copyright © 2021 Progress Software Corporation. All rights reserved. 64* Licensed under commercial license. See LICENSE.md in the project root for more information 65*-------------------------------------------------------------------------------------------*/ 66 67 68 69 70 71 72 73 74 75 76 77/** 78 * @hidden 79 */ 80 81 82 83 84 85 86 87const _c0 = [[["", "kendoButton", ""]]]; 88const _c1 = ["[kendoButton]"]; 89function ListComponent_li_1_ng_template_1_ng_template_1_Template(rf, ctx) { } 90const _c2 = function (a0, a1) { return { templateRef: a0, $implicit: a1 }; }; 91function ListComponent_li_1_ng_template_1_Template(rf, ctx) { if (rf & 1) { 92 _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵelementStart"](0, "span", 4); 93 _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵtemplate"](1, ListComponent_li_1_ng_template_1_ng_template_1_Template, 0, 0, "ng-template", 5); 94 _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵelementEnd"](); 95} if (rf & 2) { 96 const ctx_r6 = _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵnextContext"](); 97 const dataItem_r1 = ctx_r6.$implicit; 98 const index_r2 = ctx_r6.index; 99 const ctx_r3 = _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵnextContext"](); 100 _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵclassProp"]("k-disabled", dataItem_r1.disabled); 101 _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵproperty"]("index", index_r2); 102 _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵadvance"](1); 103 _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵproperty"]("templateContext", _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵpureFunction2"](4, _c2, ctx_r3.itemTemplate == null ? null : ctx_r3.itemTemplate.templateRef, dataItem_r1)); 104} } 105function ListComponent_li_1_ng_template_2_span_1_Template(rf, ctx) { if (rf & 1) { 106 _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵelement"](0, "span", 9); 107} if (rf & 2) { 108 const dataItem_r1 = _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵnextContext"](2).$implicit; 109 const ctx_r7 = _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵnextContext"](); 110 _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵproperty"]("ngClass", ctx_r7.getIconClasses(dataItem_r1)); 111} } 112function ListComponent_li_1_ng_template_2_img_2_Template(rf, ctx) { if (rf & 1) { 113 _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵelement"](0, "img", 10); 114} if (rf & 2) { 115 const dataItem_r1 = _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵnextContext"](2).$implicit; 116 _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵproperty"]("src", dataItem_r1.imageUrl, _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵsanitizeUrl"]); 117} } 118function ListComponent_li_1_ng_template_2_span_3_Template(rf, ctx) { if (rf & 1) { 119 _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵelementStart"](0, "span", 11); 120 _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵtext"](1); 121 _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵelementEnd"](); 122} if (rf & 2) { 123 const dataItem_r1 = _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵnextContext"](2).$implicit; 124 const ctx_r9 = _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵnextContext"](); 125 _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵadvance"](1); 126 _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵtextInterpolate1"](" ", ctx_r9.getText(dataItem_r1), " "); 127} } 128function ListComponent_li_1_ng_template_2_Template(rf, ctx) { if (rf & 1) { 129 _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵelementStart"](0, "span", 4); 130 _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵtemplate"](1, ListComponent_li_1_ng_template_2_span_1_Template, 1, 1, "span", 6); 131 _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵtemplate"](2, ListComponent_li_1_ng_template_2_img_2_Template, 1, 1, "img", 7); 132 _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵtemplate"](3, ListComponent_li_1_ng_template_2_span_3_Template, 2, 1, "span", 8); 133 _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵelementEnd"](); 134} if (rf & 2) { 135 const ctx_r13 = _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵnextContext"](); 136 const dataItem_r1 = ctx_r13.$implicit; 137 const index_r2 = ctx_r13.index; 138 const ctx_r4 = _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵnextContext"](); 139 _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵclassProp"]("k-disabled", dataItem_r1.disabled); 140 _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵproperty"]("index", index_r2); 141 _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵadvance"](1); 142 _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵproperty"]("ngIf", dataItem_r1.icon || dataItem_r1.iconClass); 143 _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵadvance"](1); 144 _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵproperty"]("ngIf", dataItem_r1.imageUrl); 145 _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵadvance"](1); 146 _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵproperty"]("ngIf", ctx_r4.getText(dataItem_r1)); 147} } 148function ListComponent_li_1_Template(rf, ctx) { if (rf & 1) { 149 const _r15 = _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵgetCurrentView"](); 150 _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵelementStart"](0, "li", 2); 151 _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵlistener"]("click", function ListComponent_li_1_Template_li_click_0_listener() { const restoredCtx = _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵrestoreView"](_r15); const index_r2 = restoredCtx.index; const ctx_r14 = _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵnextContext"](); return ctx_r14.onClick(index_r2); })("blur", function ListComponent_li_1_Template_li_blur_0_listener() { _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵrestoreView"](_r15); const ctx_r16 = _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵnextContext"](); return ctx_r16.onBlur(); }); 152 _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵtemplate"](1, ListComponent_li_1_ng_template_1_Template, 2, 7, "ng-template", 3); 153 _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵtemplate"](2, ListComponent_li_1_ng_template_2_Template, 4, 6, "ng-template", 3); 154 _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵelementEnd"](); 155} if (rf & 2) { 156 const dataItem_r1 = ctx.$implicit; 157 const ctx_r0 = _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵnextContext"](); 158 _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵattribute"]("aria-disabled", dataItem_r1.disabled ? true : false); 159 _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵadvance"](1); 160 _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵproperty"]("ngIf", ctx_r0.itemTemplate == null ? null : ctx_r0.itemTemplate.templateRef); 161 _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵadvance"](1); 162 _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵproperty"]("ngIf", !(ctx_r0.itemTemplate == null ? null : ctx_r0.itemTemplate.templateRef)); 163} } 164const _c3 = ["button"]; 165const _c4 = ["arrowButton"]; 166const _c5 = ["popupTemplate"];
167const _c6 = ["container"]; 168function SplitButtonComponent_span_4_Template(rf, ctx) { if (rf & 1) { 169 _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵelementStart"](0, "span", 9); 170 _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵtext"](1); 171 _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵelementEnd"](); 172} if (rf & 2) { 173 const ctx_r1 = _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵnextContext"](); 174 _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵadvance"](1); 175 _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵtextInterpolate1"](" ", ctx_r1.text, " "); 176} } 177function SplitButtonComponent_ng_template_8_Template(rf, ctx) { if (rf & 1) { 178 const _r7 = _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵgetCurrentView"](); 179 _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵelementStart"](0, "kendo-button-list", 10); 180 _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵlistener"]("onItemClick", function SplitButtonComponent_ng_template_8_Template_kendo_button_list_onItemClick_0_listener($event) { _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵrestoreView"](_r7); const ctx_r6 = _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵnextContext"](); return ctx_r6.onItemClick($event); })("keydown", function SplitButtonComponent_ng_template_8_Template_kendo_button_list_keydown_0_listener($event) { _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵrestoreView"](_r7); const ctx_r8 = _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵnextContext"](); return ctx_r8.keyDownHandler($event); })("keypress", function SplitButtonComponent_ng_template_8_Template_kendo_button_list_keypress_0_listener($event) { _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵrestoreView"](_r7); const ctx_r9 = _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵnextContext"](); return ctx_r9.keyPressHandler($event); })("keyup", function SplitButtonComponent_ng_template_8_Template_kendo_button_list_keyup_0_listener($event) { _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵrestoreView"](_r7); const ctx_r10 = _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵnextContext"](); return ctx_r10.keyUpHandler($event); }); 181 _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵelementEnd"](); 182} if (rf & 2) { 183 const ctx_r4 = _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵnextContext"](); 184 _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵproperty"]("id", ctx_r4.listId)("data", ctx_r4.data)("textField", ctx_r4.textField)("itemTemplate", ctx_r4.itemTemplate)("size", ctx_r4.size); 185 _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵattribute"]("dir", ctx_r4.dir); 186} } 187const _c9 = ["*"]; 188const _c10 = ["buttonList"]; 189function DropDownButtonComponent_ng_template_3_Template(rf, ctx) { if (rf & 1) { 190 const _r6 = _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵgetCurrentView"](); 191 _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵelementStart"](0, "kendo-button-list", 4, 5); 192 _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵlistener"]("onItemClick", function DropDownButtonComponent_ng_template_3_Template_kendo_button_list_onItemClick_0_listener($event) { _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵrestoreView"](_r6); const ctx_r5 = _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵnextContext"](); return ctx_r5.onItemClick($event); })("keydown", function DropDownButtonComponent_ng_template_3_Template_kendo_button_list_keydown_0_listener($event) { _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵrestoreView"](_r6); const ctx_r7 = _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵnextContext"](); return ctx_r7.keyDownHandler($event); })("keypress", function DropDownButtonComponent_ng_template_3_Template_kendo_button_list_keypress_0_listener($event) { _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵrestoreView"](_r6); const ctx_r8 = _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵnextContext"](); return ctx_r8.keyPressHandler($event); })("keyup", function DropDownButtonComponent_ng_template_3_Template_kendo_button_list_keyup_0_listener($event) { _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵrestoreView"](_r6); const ctx_r9 = _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵnextContext"](); return ctx_r9.keyUpHandler($event); }); 193 _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵelementEnd"](); 194} if (rf & 2) { 195 const ctx_r2 = _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵnextContext"](); 196 _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵproperty"]("id", ctx_r2.listId)("data", ctx_r2.data)("textField", ctx_r2.textField)("itemTemplate", ctx_r2.itemTemplate)("size", ctx_r2.size); 197 _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵattribute"]("dir", ctx_r2.dir); 198} } 199function ChipComponent_span_0_Template(rf, ctx) { if (rf & 1) { 200 _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵelement"](0, "span", 8); 201} if (rf & 2) { 202 const ctx_r0 = _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵnextContext"](); 203 _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵproperty"]("ngClass", ctx_r0.kendoIconClass); 204} } 205function ChipComponent_span_1_Template(rf, ctx) { if (rf & 1) { 206 _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵelement"](0, "span", 9); 207} if (rf & 2) { 208 const ctx_r1 = _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵnextContext"](); 209 _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵproperty"]("ngClass", ctx_r1.customIconClass); 210} } 211function ChipComponent_span_2_Template(rf, ctx) { if (rf & 1) { 212 _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵelementStart"](0, "span", 10); 213 _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵelement"](1, "span", 11); 214 _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵelementEnd"](); 215} if (rf & 2) { 216 const ctx_r2 = _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵnextContext"](); 217 _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵadvance"](1); 218 _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵproperty"]("ngClass", ctx_r2.chipAvatarClass); 219} } 220function ChipComponent_span_4_Template(rf, ctx) { if (rf & 1) { 221 _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵelementStart"](0, "span", 12); 222 _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵtext"](1); 223 _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵelementEnd"](); 224} if (rf & 2) { 225 const ctx_r3 = _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵnextContext"](); 226 _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵadvance"](1); 227 _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵtextInterpolate1"](" ", ctx_r3.label, " "); 228} } 229function ChipComponent_ng_content_5_Template(rf, ctx) { if (rf & 1) { 230 _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵprojection"](0, 0, ["*ngIf", "!label"]); 231} } 232function ChipComponent_span_7_Template(rf, ctx) { if (rf & 1) { 233 const _r7 = _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵgetCurrentView"](); 234 _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵelementStart"](0, "span", 13); 235 _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵlistener"]("click", function ChipComponent_span_7_Template_span_click_0_listener($event) { _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵrestoreView"](_r7); const ctx_r6 = _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵnextContext"](); return ctx_r6.onRemoveClick($event); }); 236 _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵelement"](1, "span", 14); 237 _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵelementEnd"](); 238} if (rf & 2) { 239 const ctx_r5 = _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵnextContext"](); 240 _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵadvance"](1); 241 _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵproperty"]("ngClass", ctx_r5.removeIconClass); 242} } 243function FloatingActionButtonComponent_2_ng_template_0_Template(rf, ctx) { } 244function FloatingActionButtonComponent_2_Template(rf, ctx) { if (rf & 1) { 245 _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵtemplate"](0, FloatingActionButtonComponent_2_ng_template_0_Template, 0, 0, "ng-template", 4); 246} if (rf & 2) { 247 const ctx_r1 = _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵnextContext"](); 248 _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵproperty"]("ngTemplateOutlet", ctx_r1.fabTemplate == null ? null : ctx_r1.fabTemplate.templateRef); 249} } 250function FloatingActionButtonComponent_ng_container_3_span_1_Template(rf, ctx) { if (rf & 1) { 251 _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵelement"](0, "span", 7); 252} if (rf & 2) { 253 const ctx_r6 = _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵnextContext"](2); 254 _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵproperty"]("ngClass", ctx_r6.iconClasses); 255} } 256function FloatingActionButtonComponent_ng_container_3_span_2_Template(rf, ctx) { if (rf & 1) { 257 _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵelementStart"](0, "span", 8); 258 _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵtext"](1); 259 _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵelementEnd"](); 260} if (rf & 2) { 261 const ctx_r7 = _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵnextContext"](2); 262 _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵadvance"](1); 263 _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵtextInterpolate"](ctx_r7.text); 264} } 265function FloatingActionButtonComponent_ng_container_3_Template(rf, ctx) { if (rf & 1) { 266 _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵelementContainerStart"](0); 267 _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵtemplate"](1, FloatingActionButtonComponent_ng_container_3_span_1_Template, 1, 1, "span", 5); 268 _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵtemplate"](2, FloatingActionButtonComponent_ng_container_3_span_2_Template, 2, 1, "span", 6); 269 _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵelementContainerEnd"](); 270} if (rf & 2) { 271 const ctx_r2 = _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵnextContext"](); 272 _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵadvance"](1); 273 _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵproperty"]("ngIf", ctx_r2.icon || ctx_r2.iconClass); 274 _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵadvance"](1); 275 _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵproperty"]("ngIf", ctx_r2.text); 276} } 277function FloatingActionButtonComponent_ng_template_4_Template(rf, ctx) { if (rf & 1) { 278 const _r9 = _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵgetCurrentView"](); 279 _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵelementStart"](0, "ul", 9); 280 _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵlistener"]("click", function FloatingActionButtonComponent_ng_template_4_Template_ul_click_0_listener($event) { _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵrestoreView"](_r9); const ctx_r8 = _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵnextContext"](); return ctx_r8.onItemClick($event); }); 281 _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵelementEnd"](); 282} if (rf & 2) { 283 const ctx_r4 = _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵnextContext"](); 284 _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵproperty"]("ngClass", ctx_r4.dialClass)("dialItems", ctx_r4.dialItems)("dialItemTemplate", ctx_r4.dialItemTemplate == null ? null : ctx_r4.dialItemTemplate.templateRef)("align", ctx_r4.align); 285 _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵattribute"]("aria-labelledby", ctx_r4.id); 286} } 287const _c11 = function (a0, a1) { return { keydown: a0, click: a1 }; }; 288const _c12 = ["kendoDialList", ""]; 289function DialListComponent_ng_container_0_Template(rf, ctx) { if (rf & 1) { 290 _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵelementContainerStart"](0); 291 _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵelement"](1, "li", 1); 292 _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵelementContainerEnd"](); 293} if (rf & 2) { 294 const item_r1 = ctx.$implicit; 295 const idx_r2 = ctx.index; 296 const ctx_r0 = _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵnextContext"](); 297 _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵadvance"](1); 298 _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵproperty"]("item", ctx_r0.dialItems[idx_r2])("index", idx_r2)("dialItemTemplate", ctx_r0.dialItemTemplate)("isFocused", ctx_r0.isFocused(idx_r2))("ngClass", item_r1.cssClass)("ngStyle", item_r1.cssStyle)("align", ctx_r0.align); 299} } 300const _c13 = ["kendoDialItem", ""]; 301function DialItemComponent_0_ng_template_0_Template(rf, ctx) { } 302const _c14 = function (a0, a1, a2) { return { $implicit: a0, index: a1, isFocused: a2 }; }; 303function DialItemComponent_0_Template(rf, ctx) { if (rf & 1) { 304 _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵtemplate"](0, DialItemComponent_0_ng_template_0_Template, 0, 0, "ng-template", 1); 305} if (rf & 2) { 306 const ctx_r0 = _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵnextContext"](); 307 _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵproperty"]("ngTemplateOutlet", ctx_r0.dialItemTemplate)("ngTemplateOutletContext", _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵpureFunction3"](2, _c14, ctx_r0.item, ctx_r0.index, ctx_r0.isFocused)); 308} } 309function DialItemComponent_ng_container_1_span_1_Template(rf, ctx) { if (rf & 1) { 310 _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵelementStart"](0, "span", 4); 311 _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵtext"](1); 312 _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵelementEnd"](); 313} if (rf & 2) { 314 const ctx_r3 = _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵnextContext"](2); 315 _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵadvance"](1); 316 _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵtextInterpolate"](ctx_r3.item.label); 317} } 318function DialItemComponent_ng_container_1_span_2_Template(rf, ctx) { if (rf & 1) { 319 _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵelement"](0, "span", 5); 320} if (rf & 2) { 321 const ctx_r4 = _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵnextContext"](2); 322 _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵproperty"]("ngClass", ctx_r4.iconClasses); 323} } 324function DialItemComponent_ng_container_1_Template(rf, ctx) { if (rf & 1) { 325 _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵelementContainerStart"](0); 326 _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵtemplate"](1, DialItemComponent_ng_container_1_span_1_Template, 2, 1, "span", 2); 327 _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵtemplate"](2, DialItemComponent_ng_container_1_span_2_Template, 1, 1, "span", 3); 328 _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵelementContainerEnd"](); 329} if (rf & 2) { 330 const ctx_r1 = _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵnextContext"](); 331 _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵadvance"](1); 332 _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵproperty"]("ngIf", ctx_r1.item.label); 333 _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵadvance"](1); 334 _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵproperty"]("ngIf", ctx_r1.item.icon || ctx_r1.item.iconClass); 335} } 336let KendoButtonService = class KendoButtonService { 337 /** 338 * @hidden 339 */ 340 constructor() { 341 this.buttonClicked = new rxjs__WEBPACK_IMPORTED_MODULE_1__.Subject(); 342 this.buttonClicked$ = this.buttonClicked.asObservable(); 343 } 344 click(button) { 345 this.buttonClicked.next(button); 346 } 347}; 348KendoButtonService.ɵfac = function KendoButtonService_Factory(t) { return new (t || KendoButtonService)(); }; 349KendoButtonService.ɵprov = /*@__PURE__*/ _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵdefineInjectable"]({ token: KendoButtonService, factory: function (t) { return KendoButtonService.ɵfac(t); } }); 350 351/** 352 * @hidden 353 */ 354const packageMetadata = { 355 name: '@progress/kendo-angular-buttons', 356 productName: 'Kendo UI for Angular',
357 productCodes: ['KENDOUIANGULAR', 'KENDOUICOMPLETE'], 358 publishDate: 1642682315, 359 version: '', 360 licensingDocsUrl: 'https://www.telerik.com/kendo-angular-ui/my-license/?utm_medium=product&utm_source=kendoangular&utm_campaign=kendo-ui-angular-purchase-license-keys-warning' 361}; 362 363/* tslint:disable:no-null-keyword */ 364/* tslint:disable:no-bitwise */ 365const resolvedPromise = Promise.resolve(null); 366/** 367 * @hidden 368 */ 369const isPresent = (value) => value !== null && value !== undefined; 370/** 371 * @hidden 372 */ 373const tick = (f) => (resolvedPromise.then(f)); 374/** 375 * @hidden 376 */ 377function isDocumentNode(container) { 378 return container.nodeType === 9; 379} 380/** 381 * @hidden 382 */ 383function closest(element, selector) { 384 if (element.closest) { 385 return element.closest(selector); 386 } 387 const matches = Element.prototype.matches ? 388 (el, sel) => el.matches(sel) 389 : (el, sel) => el.msMatchesSelector(sel); 390 let node = element; 391 while (node && !isDocumentNode(node)) { 392 if (matches(node, selector)) { 393 return node; 394 } 395 node = node.parentNode; 396 } 397} 398/** 399 * @hidden 400 */ 401const replaceMessagePlaceholder = (message, name, value) => message.replace(new RegExp(`\{\\s*${name}\\s*\}`, 'g'), value); 402/** 403 * @hidden 404 */ 405const SIZES = { 406 small: 'sm', 407 medium: 'md', 408 large: 'lg' 409}; 410const ROUNDNESS = { 411 small: 'sm', 412 medium: 'md', 413 large: 'lg', 414 full: 'full' 415}; 416/** 417 * @hidden 418 * 419 * Returns the styling classes to be added and removed 420 */ 421const getStylingClasses = (componentType, stylingOption, previousValue, newValue) => { 422 switch (stylingOption) { 423 case 'size': 424 return { 425 toRemove: `k-${componentType}-${SIZES[previousValue]}`, 426 toAdd: newValue ? `k-${componentType}-${SIZES[newValue]}` : null 427 }; 428 case 'rounded': 429 return { 430 toRemove: `k-rounded-${ROUNDNESS[previousValue]}`, 431 toAdd: newValue ? `k-rounded-${ROUNDNESS[newValue]}` : null 432 }; 433 case 'fillMode': 434 case 'shape': 435 return { 436 toRemove: `k-${componentType}-${previousValue}`, 437 toAdd: newValue ? `k-${componentType}-${newValue}` : null 438 }; 439 default: 440 break; 441 } 442}; 443/** 444 * @hidden 445 * 446 * Returns the themeColor classes to be added and removed 447 */ 448const getThemeColorClasses = (componentType, prevFillMode, fillMode, previousValue, newValue) => { 449 return { 450 toRemove: `k-${componentType}-${prevFillMode}-${previousValue}`, 451 toAdd: newValue ? `k-${componentType}-${fillMode}-${newValue}` : null 452 }; 453}; 454 455const SPAN_TAG_NAME = 'SPAN'; 456/** 457 * Represents the Kendo UI Button component for Angular. 458 */ 459let ButtonDirective = class ButtonDirective { 460 constructor(element, renderer, service, localization, ngZone) { 461 this.service = service; 462 this.ngZone = ngZone; 463 /** 464 * Provides visual styling that indicates if the Button is active. 465 * By default, `toggleable` is set to `false`. 466 */ 467 this.toggleable = false; 468 /** 469 * @hidden 470 */ 471 this.role = 'button'; 472 /** 473 * Fires each time the selected state of a toggleable button is changed. 474 * 475 * The event argument is the new selected state (boolean). 476 */ 477 this.selectedChange = new _angular_core__WEBPACK_IMPORTED_MODULE_0__.EventEmitter(); 478 /** 479 * Fires each time the user clicks the button. 480 */ 481 this.click = new _angular_core__WEBPACK_IMPORTED_MODULE_0__.EventEmitter(); 482 this.isDisabled = false; 483 this.isIcon = false; 484 this.isIconClass = false; 485 this._size = 'medium'; 486 this._rounded = 'medium'; 487 this._shape = 'rectangle'; 488 this._fillMode = 'solid'; 489 this._themeColor = 'base'; 490 this._focused = false; 491 this.domEvents = []; 492 (0,_progress_kendo_licensing__WEBPACK_IMPORTED_MODULE_2__.validatePackage)(packageMetadata); 493 this.direction = localization.rtl ? 'rtl' : 'ltr'; 494 this.localizationChangeSubscription = localization.changes.subscribe(({ rtl }) => (this.direction = rtl ? 'rtl' : 'ltr')); 495 this.element = element.nativeElement; 496 this.renderer = renderer; 497 } 498 /** 499 * Backwards-compatible alias 500 * 501 * @hidden 502 */ 503 get togglable() { 504 return this.toggleable; 505 } 506 /** 507 * @hidden 508 */ 509 set togglable(value) { 510 this.toggleable = value; 511 } 512 /** 513 * Sets the selected state of the Button. 514 */ 515 get selected() { 516 return this._selected || false; 517 } 518 set selected(value) { 519 this._selected = value; 520 } 521 /** 522 * @hidden 523 */ 524 set tabIndex(index) { 525 this.element.tabIndex = index; 526 } 527 get tabIndex() { 528 return this.element.tabIndex; 529 } 530 /** 531 * Defines the name for an existing icon in a Kendo UI theme. 532 * The icon is rendered inside the Button by a `span.k-icon` element. 533 */ 534 set icon(icon) { 535 if (icon) {
536 this.iconSetter(icon, () => { 537 this.isIcon = true; 538 const classes = 'k-button-icon k-icon k-i-' + icon; 539 this.addIcon(classes); 540 }); 541 } 542 else { 543 this.isIcon = false; 544 this.updateIconNode(); 545 } 546 } 547 /** 548 * Defines a CSS class—or multiple classes separated by spaces— 549 * which are applied to a `span` element inside the Button. Allows the usage of custom icons. 550 */ 551 set iconClass(iconClassName) { 552 if (iconClassName) { 553 this.iconSetter(iconClassName, () => { 554 this.isIconClass = true; 555 const classes = 'k-button-icon k-icon ' + iconClassName; 556 this.addIcon(classes); 557 }); 558 } 559 else { 560 this.isIconClass = false; 561 this.updateIconNode(); 562 } 563 } 564 /** 565 * Defines a URL which is used for an `img` element inside the Button. 566 * The URL can be relative or absolute. If relative, it is evaluated with relation to the web page URL. 567 */ 568 set imageUrl(imageUrl) { 569 if (imageUrl) { 570 this.iconSetter(imageUrl, this.addImgIcon.bind(this)); 571 } 572 else { 573 this.removeImageNode(); 574 } 575 } 576 /** 577 * If set to `true`, it disables the Button. 578 */ 579 set disabled(disabled) { 580 this.isDisabled = disabled; 581 this.renderer.setProperty(this.element, 'disabled', disabled); 582 } 583 get disabled() { 584 return this.isDisabled; 585 } 586 /** 587 * The size property specifies the padding of the Button 588 * ([see example]({% slug appearance_button %}#toc-size)). 589 * 590 * The possible values are: 591 * * `'small'` 592 * * `'medium'` (default) 593 * * `'large'` 594 * * `null` 595 */ 596 set size(size) { 597 this.handleClasses(size, 'size'); 598 this._size = size; 599 } 600 get size() { 601 return this._size; 602 } 603 /** 604 * The rounded property specifies the border radius of the Button 605 * ([see example]({% slug appearance_button %}#toc-rounded)). 606 * 607 * The possible values are: 608 * * `'small'` 609 * * `'medium'` (default) 610 * * `'large'` 611 * * `'full'` 612 * * `null` 613 */ 614 set rounded(rounded) { 615 this.handleClasses(rounded, 'rounded'); 616 this._rounded = rounded; 617 } 618 get rounded() { 619 return this._rounded; 620 } 621 /** 622 * The fillMode property specifies the background and border styles of the Button 623 * ([see example]({% slug appearance_button %}#toc-fillMode)). 624 * 625 * The possible values are: 626 * * `'flat'` 627 * * `'solid'` (default) 628 * * `'outline'` 629 * * `'clear'` 630 * * `'link'` 631 * * `null` 632 */ 633 set fillMode(fillMode) { 634 this.handleClasses(fillMode, 'fillMode'); 635 this._fillMode = fillMode; 636 } 637 get fillMode() { 638 return this._fillMode; 639 } 640 /** 641 * The Button allows you to specify predefined theme colors. 642 * The theme color will be applied as a background and border color while also amending the text color accordingly 643 * ([see example]({% slug appearance_button %}#toc-themeColor)). 644 * 645 * The possible values are: 646 * * `'base'` (default) 647 * * `'primary'` 648 * * `'secondary'` 649 * * `'tertiary'` 650 * * `'info'` 651 * * `'success'` 652 * * `'warning'` 653 * * `'error'`
654 * * `'dark'` 655 * * `'light`' 656 * * `'inverse'` 657 */ 658 set themeColor(themeColor) { 659 this.handleThemeColor(themeColor); 660 this._themeColor = themeColor; 661 } 662 get themeColor() { 663 return this._themeColor; 664 } 665 /** 666 * The shape property specifies if the Button will form a rectangle or square. 667 * ([see example]({% slug appearance_button %}#toc-shape)). 668 * 669 * The possible values are: 670 * * `'square'` 671 * * `'rectangle'` (default) 672 */ 673 set shape(shape) { 674 this.handleClasses(shape, 'shape'); 675 this._shape = shape; 676 } 677 get shape() { 678 return this._shape; 679 } 680 set isFocused(isFocused) { 681 this.toggleClass('k-focus', isFocused); 682 this._focused = isFocused; 683 } 684 get isFocused() { 685 return this._focused; 686 } 687 get classButton() { 688 return true; 689 } 690 get isToggleable() { 691 return this.toggleable; 692 } 693 get roleSetter() { 694 return this.role; 695 } 696 get classDisabled() { 697 return this.isDisabled; 698 } 699 get classActive() { 700 return this.selected; 701 } 702 get getDirection() { 703 return this.direction; 704 } 705 /** 706 * @hidden 707 */ 708 onFocus() { 709 this.isFocused = true; 710 } 711 /** 712 * @hidden 713 */ 714 onBlur() { 715 this.isFocused = false; 716 } 717 /** 718 * @hidden 719 */ 720 set primary(value) { 721 this.themeColor = value ? 'primary' : 'base'; 722 } 723 /** 724 * @hidden 725 */ 726 set look(value) { 727 switch (value) { 728 case 'default': 729 this.fillMode = 'solid'; 730 break; 731 default: 732 this.fillMode = value; 733 break; 734 } 735 } 736 ngOnInit() { 737 const isSpan = this.element.tagName === SPAN_TAG_NAME; 738 this.addTextSpan(); 739 if (!this.element.hasAttribute('role') && this.togglable) { 740 this.toggleAriaPressed(this.toggleable); 741 } 742 if (this.role) { 743 this.setAttribute('role', this.role); 744 } 745 this.ngZone.runOutsideAngular(() => { 746 this.domEvents.push(this.renderer.listen(this.element, 'click', this._onButtonClick.bind(this))); 747 this.domEvents.push(this.renderer.listen(this.element, 'keydown', (event) => { 748 const isSpaceOrEnter = event.keyCode === _progress_kendo_angular_common__WEBPACK_IMPORTED_MODULE_3__.Keys.Space || event.keyCode === _progress_kendo_angular_common__WEBPACK_IMPORTED_MODULE_3__.Keys.Enter; 749 if (isSpan && isSpaceOrEnter) { 750 this.click.emit(event); 751 this._onButtonClick(); 752 } 753 })); 754 }); 755 } 756 ngOnChanges(change) { 757 if ((0,_progress_kendo_angular_common__WEBPACK_IMPORTED_MODULE_3__.isChanged)('togglable', change) || (0,_progress_kendo_angular_common__WEBPACK_IMPORTED_MODULE_3__.isChanged)('toggleable', change)) { 758 this.toggleAriaPressed(this.toggleable); 759 } 760 } 761 ngAfterViewInit() { 762 const stylingOptions = ['size', 'rounded', 'shape', 'fillMode']; 763 stylingOptions.forEach(input => { 764 this.handleClasses(this[input], input); 765 }); 766 } 767 ngAfterViewChecked() { 768 this.setIconTextClasses(); 769 } 770 ngOnDestroy() { 771 this.imageNode = null; 772 this.iconNode = null; 773 this.iconSpanNode = null; 774 this.renderer = null; 775 this.localizationChangeSubscription.unsubscribe(); 776 clearTimeout(this.deferTimeout); 777 this.domEvents.forEach(unbindHandler => unbindHandler()); 778 } 779 /** 780 * Focuses the Button component. 781 */ 782 focus() { 783 if ((0,_progress_kendo_angular_common__WEBPACK_IMPORTED_MODULE_3__.isDocumentAvailable)()) { 784 this.element.focus(); 785 this.isFocused = true; 786 } 787 } 788 /** 789 * Blurs the Button component. 790 */ 791 blur() { 792 if ((0,_progress_kendo_angular_common__WEBPACK_IMPORTED_MODULE_3__.isDocumentAvailable)()) { 793 this.element.blur(); 794 this.isFocused = false;
795 } 796 } 797 /** 798 * @hidden 799 */ 800 setAttribute(attribute, value) { 801 this.renderer.setAttribute(this.element, attribute, value); 802 } 803 /** 804 * @hidden 805 */ 806 removeAttribute(attribute) { 807 this.renderer.removeAttribute(this.element, attribute); 808 } 809 /** 810 * @hidden 811 * 812 * Internal setter that triggers selectedChange 813 */ 814 setSelected(value) { 815 const changed = this.selected !== value; 816 this.selected = value; 817 this.setAttribute('aria-pressed', this.selected.toString()); 818 this.toggleClass('k-selected', this.selected); 819 if (changed && (0,_progress_kendo_angular_common__WEBPACK_IMPORTED_MODULE_3__.hasObservers)(this.selectedChange)) { 820 this.ngZone.run(() => { 821 this.selectedChange.emit(value); 822 }); 823 } 824 } 825 toggleAriaPressed(shouldSet) { 826 if (!(0,_progress_kendo_angular_common__WEBPACK_IMPORTED_MODULE_3__.isDocumentAvailable)()) { 827 return; 828 } 829 if (shouldSet) { 830 this.setAttribute('aria-pressed', this.selected.toString()); 831 } 832 else { 833 this.removeAttribute('aria-pressed'); 834 } 835 } 836 hasText() { 837 return (0,_progress_kendo_angular_common__WEBPACK_IMPORTED_MODULE_3__.isDocumentAvailable)() && this.element.textContent.trim().length > 0; 838 } 839 addImgIcon(imageUrl) { 840 let renderer = this.renderer; 841 this.iconSpanNode = renderer.createElement('span'); 842 renderer.setProperty(this.iconSpanNode, 'className', 'k-button-icon k-icon'); 843 if (this.imageNode) { 844 renderer.setProperty(this.imageNode, 'src', imageUrl); 845 } 846 else if ((0,_progress_kendo_angular_common__WEBPACK_IMPORTED_MODULE_3__.isDocumentAvailable)()) { 847 this.imageNode = renderer.createElement('img'); 848 renderer.setProperty(this.imageNode, 'src', imageUrl); 849 renderer.setProperty(this.imageNode, 'className', 'k-image'); 850 renderer.setAttribute(this.imageNode, 'role', 'presentation'); 851 } 852 this.iconSpanNode.appendChild(this.imageNode);
853 this.prependChild(this.iconSpanNode); 854 } 855 addIcon(classNames) { 856 let renderer = this.renderer; 857 if (this.iconNode) { 858 renderer.setProperty(this.iconNode, 'className', classNames); 859 } 860 else if ((0,_progress_kendo_angular_common__WEBPACK_IMPORTED_MODULE_3__.isDocumentAvailable)()) { 861 this.iconNode = renderer.createElement('span'); 862 renderer.setProperty(this.iconNode, 'className', classNames); 863 renderer.setAttribute(this.iconNode, 'role', 'presentation'); 864 this.prependChild(this.iconNode); 865 } 866 } 867 addTextSpan() { 868 if ((0,_progress_kendo_angular_common__WEBPACK_IMPORTED_MODULE_3__.isDocumentAvailable)() && this.hasText()) { 869 const span = this.renderer.createElement('span'); 870 this.renderer.addClass(span, 'k-button-text'); 871 const buttonContentNodes = Array.from(this.element.childNodes); 872 buttonContentNodes.forEach(node => this.renderer.appendChild(span, node)); 873 this.renderer.appendChild(this.element, span); 874 } 875 } 876 prependChild(node) { 877 this.defer(() => { 878 if (this.renderer && node !== this.element.firstChild) { 879 this.renderer.insertBefore(this.element, node, this.element.firstChild); 880 } 881 }); 882 } 883 defer(callback) { 884 this.ngZone.runOutsideAngular(() => { 885 this.deferTimeout = setTimeout(callback, 0); 886 }); 887 } 888 iconSetter(icon, insertIcon) { 889 if (icon) { 890 insertIcon(icon); 891 } 892 this.setIconTextClasses(); 893 } 894 removeImageNode() { 895 if (this.imageNode && this.renderer.parentNode(this.imageNode)) { 896 this.renderer.removeChild(this.element, this.imageNode); 897 this.renderer.removeChild(this.element, this.iconSpanNode); 898 this.imageNode = null; 899 this.iconSpanNode = null; 900 } 901 } 902 removeIconNode() { 903 if (this.iconNode && this.renderer.parentNode(this.iconNode)) { 904 this.renderer.removeChild(this.element, this.iconNode); 905 this.iconNode = null; 906 } 907 if (this.iconSpanNode) { 908 this.renderer.removeChild(this.element, this.iconSpanNode); 909 this.iconSpanNode = null; 910 } 911 } 912 updateIconNode() { 913 if (!this.isIcon && !this.isIconClass) { 914 this.removeIconNode(); 915 } 916 } 917 setIconTextClasses() { 918 const hasIcon = this.isIcon || this.isIconClass || this.imageNode; 919 this.toggleClass('k-icon-button', hasIcon && !this.hasText()); 920 } 921 toggleClass(className, add) { 922 if (add) { 923 this.renderer.addClass(this.element, className); 924 } 925 else { 926 this.renderer.removeClass(this.element, className); 927 } 928 } 929 _onButtonClick() { 930 if (!this.disabled && this.service) { 931 this.ngZone.run(() => { 932 this.service.click(this); 933 }); 934 } 935 if (this.togglable && !this.service) { 936 this.setSelected(!this.selected); 937 } 938 } 939 handleClasses(value, input) { 940 const elem = this.element; 941 const classes = getStylingClasses('button', input, this[input], value); 942 if (input === 'fillMode') { 943 this.handleThemeColor(this.themeColor, this[input], value); 944 } 945 if (classes.toRemove) { 946 this.renderer.removeClass(elem, classes.toRemove); 947 } 948 if (classes.toAdd) { 949 this.renderer.addClass(elem, classes.toAdd); 950 } 951 } 952 handleThemeColor(value, prevFillMode, fillMode) { 953 const elem = this.element; 954 const removeFillMode = prevFillMode ? prevFillMode : this.fillMode; 955 const addFillMode = fillMode ? fillMode : this.fillMode; 956 const themeColorClass = getThemeColorClasses('button', removeFillMode, addFillMode, this.themeColor, value); 957 this.renderer.removeClass(elem, themeColorClass.toRemove); 958 if (addFillMode !== null && fillMode !== null) { 959 if (themeColorClass.toAdd) { 960 this.renderer.addClass(elem, themeColorClass.toAdd); 961 } 962 } 963 } 964}; 965ButtonDirective.ɵfac = function ButtonDirective_Factory(t) { return new (t || ButtonDirective)(_angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵdirectiveInject"](_angular_core__WEBPACK_IMPORTED_MODULE_0__.ElementRef), _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵdirectiveInject"](_angular_core__WEBPACK_IMPORTED_MODULE_0__.Renderer2), _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵdirectiveInject"](KendoButtonService, 8), _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵdirectiveInject"](_progress_kendo_angular_l10n__WEBPACK_IMPORTED_MODULE_4__.LocalizationService), _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵdirectiveInject"](_angular_core__WEBPACK_IMPORTED_MODULE_0__.NgZone)); }; 966ButtonDirective.ɵdir = /*@__PURE__*/ _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵdefineDirective"]({ type: ButtonDirective, selectors: [["button", "kendoButton", ""], ["span", "kendoButton", ""]], hostVars: 11, hostBindings: function ButtonDirective_HostBindings(rf, ctx) { if (rf & 1) { 967 _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵlistener"]("focus", function ButtonDirective_focus_HostBindingHandler() { return ctx.onFocus(); })("blur", function ButtonDirective_blur_HostBindingHandler() { return ctx.onBlur(); }); 968 } if (rf & 2) { 969 _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵattribute"]("role", ctx.roleSetter)("aria-disabled", ctx.classDisabled)("dir", ctx.getDirection); 970 _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵclassProp"]("k-button", ctx.classButton)("k-toggle-button", ctx.isToggleable)("k-disabled", ctx.classDisabled)("k-selected", ctx.classActive); 971 } }, inputs: { toggleable: "toggleable", role: "role", togglable: "togglable", selected: "selected", tabIndex: "tabIndex", icon: "icon", iconClass: "iconClass", imageUrl: "imageUrl", disabled: "disabled", size: "size", rounded: "rounded", fillMode: "fillMode", themeColor: "themeColor", shape: "shape", primary: "primary", look: "look" }, outputs: { selectedChange: "selectedChange", click: "click" }, exportAs: ["kendoButton"], features: [_angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵProvidersFeature"]([ 972 _progress_kendo_angular_l10n__WEBPACK_IMPORTED_MODULE_4__.LocalizationService, 973 { 974 provide: _progress_kendo_angular_l10n__WEBPACK_IMPORTED_MODULE_4__.L10N_PREFIX, 975 useValue: 'kendo.button' 976 } 977 ]), _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵNgOnChangesFeature"]] }); 978(0,tslib__WEBPACK_IMPORTED_MODULE_5__.__decorate)([ 979 (0,_angular_core__WEBPACK_IMPORTED_MODULE_0__.Input)(), 980 (0,tslib__WEBPACK_IMPORTED_MODULE_5__.__metadata)("design:type", Boolean) 981], ButtonDirective.prototype, "toggleable", void 0); 982(0,tslib__WEBPACK_IMPORTED_MODULE_5__.__decorate)([ 983 (0,_angular_core__WEBPACK_IMPORTED_MODULE_0__.Input)(), 984 (0,tslib__WEBPACK_IMPORTED_MODULE_5__.__metadata)("design:type", Boolean), 985 (0,tslib__WEBPACK_IMPORTED_MODULE_5__.__metadata)("design:paramtypes", [Boolean]) 986], ButtonDirective.prototype, "togglable", null); 987(0,tslib__WEBPACK_IMPORTED_MODULE_5__.__decorate)([ 988 (0,_angular_core__WEBPACK_IMPORTED_MODULE_0__.Input)(), 989 (0,tslib__WEBPACK_IMPORTED_MODULE_5__.__metadata)("design:type", Boolean), 990 (0,tslib__WEBPACK_IMPORTED_MODULE_5__.__metadata)("design:paramtypes", [Boolean]) 991], ButtonDirective.prototype, "selected", null); 992(0,tslib__WEBPACK_IMPORTED_MODULE_5__.__decorate)([ 993 (0,_angular_core__WEBPACK_IMPORTED_MODULE_0__.Input)(), 994 (0,tslib__WEBPACK_IMPORTED_MODULE_5__.__metadata)("design:type", Number), 995 (0,tslib__WEBPACK_IMPORTED_MODULE_5__.__metadata)("design:paramtypes", [Number]) 996], ButtonDirective.prototype, "tabIndex", null); 997(0,tslib__WEBPACK_IMPORTED_MODULE_5__.__decorate)([ 998 (0,_angular_core__WEBPACK_IMPORTED_MODULE_0__.Input)(), 999 (0,tslib__WEBPACK_IMPORTED_MODULE_5__.__metadata)("design:type", String), 1000 (0,tslib__WEBPACK_IMPORTED_MODULE_5__.__metadata)("design:paramtypes", [String]) 1001], ButtonDirective.prototype, "icon", null); 1002(0,tslib__WEBPACK_IMPORTED_MODULE_5__.__decorate)([ 1003 (0,_angular_core__WEBPACK_IMPORTED_MODULE_0__.Input)(), 1004 (0,tslib__WEBPACK_IMPORTED_MODULE_5__.__metadata)("design:type", String), 1005 (0,tslib__WEBPACK_IMPORTED_MODULE_5__.__metadata)("design:paramtypes", [String]) 1006], ButtonDirective.prototype, "iconClass", null); 1007(0,tslib__WEBPACK_IMPORTED_MODULE_5__.__decorate)([ 1008 (0,_angular_core__WEBPACK_IMPORTED_MODULE_0__.Input)(), 1009 (0,tslib__WEBPACK_IMPORTED_MODULE_5__.__metadata)("design:type", String), 1010 (0,tslib__WEBPACK_IMPORTED_MODULE_5__.__metadata)("design:paramtypes", [String]) 1011], ButtonDirective.prototype, "imageUrl", null); 1012(0,tslib__WEBPACK_IMPORTED_MODULE_5__.__decorate)([ 1013 (0,_angular_core__WEBPACK_IMPORTED_MODULE_0__.Input)(), 1014 (0,tslib__WEBPACK_IMPORTED_MODULE_5__.__metadata)("design:type", Boolean), 1015 (0,tslib__WEBPACK_IMPORTED_MODULE_5__.__metadata)("design:paramtypes", [Boolean]) 1016], ButtonDirective.prototype, "disabled", null); 1017(0,tslib__WEBPACK_IMPORTED_MODULE_5__.__decorate)([ 1018 (0,_angular_core__WEBPACK_IMPORTED_MODULE_0__.Input)(), 1019 (0,tslib__WEBPACK_IMPORTED_MODULE_5__.__metadata)("design:type", String), 1020 (0,tslib__WEBPACK_IMPORTED_MODULE_5__.__metadata)("design:paramtypes", [String]) 1021], ButtonDirective.prototype, "size", null); 1022(0,tslib__WEBPACK_IMPORTED_MODULE_5__.__decorate)([ 1023 (0,_angular_core__WEBPACK_IMPORTED_MODULE_0__.Input)(), 1024 (0,tslib__WEBPACK_IMPORTED_MODULE_5__.__metadata)("design:type", String), 1025 (0,tslib__WEBPACK_IMPORTED_MODULE_5__.__metadata)("design:paramtypes", [String]) 1026], ButtonDirective.prototype, "rounded", null); 1027(0,tslib__WEBPACK_IMPORTED_MODULE_5__.__decorate)([ 1028 (0,_angular_core__WEBPACK_IMPORTED_MODULE_0__.Input)(), 1029 (0,tslib__WEBPACK_IMPORTED_MODULE_5__.__metadata)("design:type", String), 1030 (0,tslib__WEBPACK_IMPORTED_MODULE_5__.__metadata)("design:paramtypes", [String]) 1031], ButtonDirective.prototype, "fillMode", null); 1032(0,tslib__WEBPACK_IMPORTED_MODULE_5__.__decorate)([ 1033 (0,_angular_core__WEBPACK_IMPORTED_MODULE_0__.Input)(), 1034 (0,tslib__WEBPACK_IMPORTED_MODULE_5__.__metadata)("design:type", String), 1035 (0,tslib__WEBPACK_IMPORTED_MODULE_5__.__metadata)("design:paramtypes", [String]) 1036], ButtonDirective.prototype, "themeColor", null); 1037(0,tslib__WEBPACK_IMPORTED_MODULE_5__.__decorate)([ 1038 (0,_angular_core__WEBPACK_IMPORTED_MODULE_0__.Input)(), 1039 (0,tslib__WEBPACK_IMPORTED_MODULE_5__.__metadata)("design:type", String), 1040 (0,tslib__WEBPACK_IMPORTED_MODULE_5__.__metadata)("design:paramtypes", [String]) 1041], ButtonDirective.prototype, "shape", null); 1042(0,tslib__WEBPACK_IMPORTED_MODULE_5__.__decorate)([ 1043 (0,_angular_core__WEBPACK_IMPORTED_MODULE_0__.Input)(), 1044 (0,tslib__WEBPACK_IMPORTED_MODULE_5__.__metadata)("design:type", String) 1045], ButtonDirective.prototype, "role", void 0); 1046(0,tslib__WEBPACK_IMPORTED_MODULE_5__.__decorate)([ 1047 (0,_angular_core__WEBPACK_IMPORTED_MODULE_0__.Output)(), 1048 (0,tslib__WEBPACK_IMPORTED_MODULE_5__.__metadata)("design:type", _angular_core__WEBPACK_IMPORTED_MODULE_0__.EventEmitter) 1049], ButtonDirective.prototype, "selectedChange", void 0); 1050(0,tslib__WEBPACK_IMPORTED_MODULE_5__.__decorate)([ 1051 (0,_angular_core__WEBPACK_IMPORTED_MODULE_0__.Output)(), 1052 (0,tslib__WEBPACK_IMPORTED_MODULE_5__.__metadata)("design:type", _angular_core__WEBPACK_IMPORTED_MODULE_0__.EventEmitter) 1053], ButtonDirective.prototype, "click", void 0); 1054(0,tslib__WEBPACK_IMPORTED_MODULE_5__.__decorate)([ 1055 (0,_angular_core__WEBPACK_IMPORTED_MODULE_0__.HostBinding)('class.k-button'), 1056 (0,tslib__WEBPACK_IMPORTED_MODULE_5__.__metadata)("design:type", Boolean), 1057 (0,tslib__WEBPACK_IMPORTED_MODULE_5__.__metadata)("design:paramtypes", []) 1058], ButtonDirective.prototype, "classButton", null); 1059(0,tslib__WEBPACK_IMPORTED_MODULE_5__.__decorate)([ 1060 (0,_angular_core__WEBPACK_IMPORTED_MODULE_0__.HostBinding)('class.k-toggle-button'), 1061 (0,tslib__WEBPACK_IMPORTED_MODULE_5__.__metadata)("design:type", Boolean), 1062 (0,tslib__WEBPACK_IMPORTED_MODULE_5__.__metadata)("design:paramtypes", []) 1063], ButtonDirective.prototype, "isToggleable", null); 1064(0,tslib__WEBPACK_IMPORTED_MODULE_5__.__decorate)([ 1065 (0,_angular_core__WEBPACK_IMPORTED_MODULE_0__.HostBinding)('attr.role'), 1066 (0,tslib__WEBPACK_IMPORTED_MODULE_5__.__metadata)("design:type", String), 1067 (0,tslib__WEBPACK_IMPORTED_MODULE_5__.__metadata)("design:paramtypes", []) 1068], ButtonDirective.prototype, "roleSetter", null); 1069(0,tslib__WEBPACK_IMPORTED_MODULE_5__.__decorate)([ 1070 (0,_angular_core__WEBPACK_IMPORTED_MODULE_0__.HostBinding)('attr.aria-disabled'), 1071 (0,_angular_core__WEBPACK_IMPORTED_MODULE_0__.HostBinding)('class.k-disabled'), 1072 (0,tslib__WEBPACK_IMPORTED_MODULE_5__.__metadata)("design:type", Boolean), 1073 (0,tslib__WEBPACK_IMPORTED_MODULE_5__.__metadata)("design:paramtypes", []) 1074], ButtonDirective.prototype, "classDisabled", null); 1075(0,tslib__WEBPACK_IMPORTED_MODULE_5__.__decorate)([ 1076 (0,_angular_core__WEBPACK_IMPORTED_MODULE_0__.HostBinding)('class.k-selected'), 1077 (0,tslib__WEBPACK_IMPORTED_MODULE_5__.__metadata)("design:type", Boolean), 1078 (0,tslib__WEBPACK_IMPORTED_MODULE_5__.__metadata)("design:paramtypes", []) 1079], ButtonDirective.prototype, "classActive", null); 1080(0,tslib__WEBPACK_IMPORTED_MODULE_5__.__decorate)([ 1081 (0,_angular_core__WEBPACK_IMPORTED_MODULE_0__.HostBinding)('attr.dir'), 1082 (0,tslib__WEBPACK_IMPORTED_MODULE_5__.__metadata)("design:type", String), 1083 (0,tslib__WEBPACK_IMPORTED_MODULE_5__.__metadata)("design:paramtypes", []) 1084], ButtonDirective.prototype, "getDirection", null); 1085(0,tslib__WEBPACK_IMPORTED_MODULE_5__.__decorate)([ 1086 (0,_angular_core__WEBPACK_IMPORTED_MODULE_0__.HostListener)('focus'), 1087 (0,tslib__WEBPACK_IMPORTED_MODULE_5__.__metadata)("design:type", Function), 1088 (0,tslib__WEBPACK_IMPORTED_MODULE_5__.__metadata)("design:paramtypes", []), 1089 (0,tslib__WEBPACK_IMPORTED_MODULE_5__.__metadata)("design:returntype", void 0) 1090], ButtonDirective.prototype, "onFocus", null); 1091(0,tslib__WEBPACK_IMPORTED_MODULE_5__.__decorate)([ 1092 (0,_angular_core__WEBPACK_IMPORTED_MODULE_0__.HostListener)('blur'), 1093 (0,tslib__WEBPACK_IMPORTED_MODULE_5__.__metadata)("design:type", Function), 1094 (0,tslib__WEBPACK_IMPORTED_MODULE_5__.__metadata)("design:paramtypes", []), 1095 (0,tslib__WEBPACK_IMPORTED_MODULE_5__.__metadata)("design:returntype", void 0) 1096], ButtonDirective.prototype, "onBlur", null); 1097(0,tslib__WEBPACK_IMPORTED_MODULE_5__.__decorate)([ 1098 (0,_angular_core__WEBPACK_IMPORTED_MODULE_0__.Input)(), 1099 (0,tslib__WEBPACK_IMPORTED_MODULE_5__.__metadata)("design:type", Boolean), 1100 (0,tslib__WEBPACK_IMPORTED_MODULE_5__.__metadata)("design:paramtypes", [Boolean]) 1101], ButtonDirective.prototype, "primary", null); 1102(0,tslib__WEBPACK_IMPORTED_MODULE_5__.__decorate)([ 1103 (0,_angular_core__WEBPACK_IMPORTED_MODULE_0__.Input)(), 1104 (0,tslib__WEBPACK_IMPORTED_MODULE_5__.__metadata)("design:type", String), 1105 (0,tslib__WEBPACK_IMPORTED_MODULE_5__.__metadata)("design:paramtypes", [String]) 1106], ButtonDirective.prototype, "look", null); 1107ButtonDirective = (0,tslib__WEBPACK_IMPORTED_MODULE_5__.__decorate)([ (0,tslib__WEBPACK_IMPORTED_MODULE_5__.__param)(2, (0,_angular_core__WEBPACK_IMPORTED_MODULE_0__.Optional)()), 1108 (0,tslib__WEBPACK_IMPORTED_MODULE_5__.__metadata)("design:paramtypes", [_angular_core__WEBPACK_IMPORTED_MODULE_0__.ElementRef, 1109 _angular_core__WEBPACK_IMPORTED_MODULE_0__.Renderer2, 1110 KendoButtonService, 1111 _progress_kendo_angular_l10n__WEBPACK_IMPORTED_MODULE_4__.LocalizationService, 1112 _angular_core__WEBPACK_IMPORTED_MODULE_0__.NgZone]) 1113], ButtonDirective); 1114 1115/** 1116 * @hidden 1117 */ 1118class PreventableEvent { 1119 constructor() { 1120 this.prevented = false;
1121 } 1122 /** 1123 * Prevents the default action for a specified event. 1124 * In this way, the source component suppresses the built-in behavior that follows the event. 1125 */ 1126 preventDefault() { 1127 this.prevented = true; 1128 } 1129 /** 1130 * If the event is prevented by any of its subscribers, returns `true`. 1131 * 1132 * @returns `true` if the default action was prevented. Otherwise, returns `false`. 1133 */ 1134 isDefaultPrevented() { 1135 return this.prevented; 1136 } 1137} 1138 1139/** 1140 * @hidden 1141 */ 1142const tabindex = 'tabindex'; 1143/** 1144 * Represents the Kendo UI ButtonGroup component for Angular. 1145 */ 1146let ButtonGroupComponent = class ButtonGroupComponent { 1147 constructor(service, localization, element) { 1148 this.service = service; 1149 this.element = element; 1150 /** 1151 * By default, the selection mode of the ButtonGroup is set to `multiple`. 1152 */ 1153 this.selection = 'multiple'; 1154 /** 1155 * Fires every time keyboard navigation occurs. 1156 */ 1157 this.navigate = new _angular_core__WEBPACK_IMPORTED_MODULE_0__.EventEmitter(); 1158 this._tabIndex = 0; 1159 this.currentTabIndex = 0; 1160 (0,_progress_kendo_licensing__WEBPACK_IMPORTED_MODULE_2__.validatePackage)(packageMetadata); 1161 this.localizationChangeSubscription = localization.changes.subscribe(({ rtl }) => this.direction = rtl ? 'rtl' : 'ltr'); 1162 } 1163 /** 1164 * Specifies the [`tabIndex`](https://developer.mozilla.org/en-US/docs/Web/HTML/Global_attributes/tabindex) of the component. 1165 */ 1166 set tabIndex(value) { 1167 this._tabIndex = value; 1168 this.currentTabIndex = value; 1169 } 1170 get tabIndex() { 1171 return this._tabIndex; 1172 } 1173 get wrapperClass() { 1174 return true; 1175 } 1176 get disabledClass() { 1177 return this.disabled; 1178 } 1179 get stretchedClass() { 1180 return !!this.width; 1181 } 1182 get getRole() { 1183 return this.isSelectionSingle() ? 'radiogroup' : 'group'; 1184 } 1185 get dir() { 1186 return this.direction; 1187 } 1188 get ariaDisabled() { 1189 return this.disabled; 1190 } 1191 get wrapperWidth() { 1192 return this.width; 1193 } 1194 get wrapperTabIndex() { 1195 return this.disabled ? undefined : this.currentTabIndex; 1196 } 1197 /** 1198 * @hidden 1199 */ 1200 keydown(event) { 1201 if (!this.disabled) { 1202 this.navigateFocus(event); 1203 } 1204 } 1205 /** 1206 * @hidden 1207 */ 1208 onFocus() { 1209 this.currentTabIndex = -1; 1210 const focusedIndex = this.buttons.toArray().findIndex(current => current.element.tabIndex !== -1); 1211 const index = focusedIndex === -1 ? 0 : focusedIndex; 1212 this.focus(this.buttons.filter((_current, i) => { 1213 return i === index; 1214 })); 1215 } 1216 /** 1217 * @hidden 1218 */ 1219 focusout(event) { 1220 if (event.relatedTarget && event.relatedTarget.parentNode !== this.element.nativeElement) { 1221 this.defocus(this.buttons.toArray()); 1222 this.currentTabIndex = this.tabIndex; 1223 } 1224 } 1225 ngOnInit() { 1226 this.subscription = this.service.buttonClicked$.subscribe((button) => { 1227 let newSelectionValue; 1228 if (this.isSelectionSingle()) { 1229 newSelectionValue = true; 1230 this.deactivate(this.buttons.filter(current => current !== button)); 1231 } 1232 else { 1233 this.defocus(this.buttons.toArray()); 1234 newSelectionValue = !button.selected; 1235 } 1236 if (button.togglable) { 1237 button.setSelected(newSelectionValue); 1238 } 1239 button.setAttribute(tabindex, '0'); 1240 }); 1241 } 1242 ngOnChanges(change) { 1243 if ((0,_progress_kendo_angular_common__WEBPACK_IMPORTED_MODULE_3__.isChanged)('disabled', change)) { 1244 this.buttons.forEach((button) => { 1245 if (isPresent(this.disabled)) { 1246 button.disabled = this.disabled; 1247 } 1248 }); 1249 } 1250 } 1251 ngAfterContentInit() { 1252 this.buttons.forEach((button) => { 1253 if (button.selected) { 1254 button.setAttribute(tabindex, '0'); 1255 } 1256 else { 1257 button.setAttribute(tabindex, '-1'); 1258 } 1259 }); 1260 } 1261 ngAfterViewChecked() { 1262 if (this.buttons.length) { 1263 this.buttons.first.renderer.addClass(this.buttons.first.element, 'k-group-start'); 1264 this.buttons.last.renderer.addClass(this.buttons.last.element, 'k-group-end'); 1265 } 1266 } 1267 ngOnDestroy() { 1268 this.subscription.unsubscribe(); 1269 this.localizationChangeSubscription.unsubscribe(); 1270 } 1271 ngAfterContentChecked() { 1272 this.verifySettings(); 1273 } 1274 navigateFocus(event) { 1275 let focusedIndex = this.buttons.toArray().findIndex(current => current.element.tabIndex !== -1); 1276 const firstIndex = 0; 1277 const lastIndex = this.buttons.length - 1; 1278 const eventArgs = new PreventableEvent(); 1279 if (event.keyCode === _progress_kendo_angular_common__WEBPACK_IMPORTED_MODULE_3__.Keys.ArrowRight && focusedIndex < lastIndex) { 1280 this.navigate.emit(eventArgs); 1281 if (!eventArgs.isDefaultPrevented()) { 1282 this.defocus(this.buttons.toArray()); 1283 this.focus(this.buttons.filter((_current, index) => { 1284 return index === focusedIndex + 1; 1285 })); 1286 } 1287 } 1288 if (event.keyCode === _progress_kendo_angular_common__WEBPACK_IMPORTED_MODULE_3__.Keys.ArrowLeft && focusedIndex > firstIndex) { 1289 this.navigate.emit(eventArgs); 1290 if (!eventArgs.isDefaultPrevented()) { 1291 this.defocus(this.buttons.toArray()); 1292 this.focus(this.buttons.filter((_current, index) => { 1293 return index === focusedIndex - 1; 1294 })); 1295 } 1296 } 1297 } 1298 deactivate(buttons) { 1299 buttons.forEach((button) => { 1300 button.setSelected(false); 1301 button.setAttribute(tabindex, '-1'); 1302 }); 1303 } 1304 activate(buttons) { 1305 buttons.forEach((button) => { 1306 button.setSelected(true); 1307 button.setAttribute(tabindex, '0'); 1308 button.focus(); 1309 }); 1310 } 1311 defocus(buttons) { 1312 buttons.forEach((button) => { 1313 button.setAttribute(tabindex, '-1'); 1314 }); 1315 } 1316 focus(buttons) { 1317 buttons.forEach((button) => { 1318 button.setAttribute(tabindex, '0'); 1319 button.focus(); 1320 }); 1321 } 1322 verifySettings() { 1323 if ((0,_angular_core__WEBPACK_IMPORTED_MODULE_0__.isDevMode)()) { 1324 if (this.isSelectionSingle() && this.buttons.filter(button => button.selected).length > 1) { 1325 throw new Error('Having multiple selected buttons with single selection mode is not supported'); 1326 } 1327 } 1328 } 1329 isSelectionSingle() { 1330 return this.selection === 'single'; 1331 } 1332}; 1333ButtonGroupComponent.ɵfac = function ButtonGroupComponent_Factory(t) { return new (t || ButtonGroupComponent)(_angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵdirectiveInject"](KendoButtonService), _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵdirectiveInject"](_progress_kendo_angular_l10n__WEBPACK_IMPORTED_MODULE_4__.LocalizationService), _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵdirectiveInject"](_angular_core__WEBPACK_IMPORTED_MODULE_0__.ElementRef)); }; 1334ButtonGroupComponent.ɵcmp = /*@__PURE__*/ _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵdefineComponent"]({ type: ButtonGroupComponent, selectors: [["kendo-buttongroup"]], contentQueries: function ButtonGroupComponent_ContentQueries(rf, ctx, dirIndex) { if (rf & 1) { 1335 _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵcontentQuery"](dirIndex, ButtonDirective, 4); 1336 } if (rf & 2) { 1337 let _t; 1338 _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵqueryRefresh"](_t = _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵloadQuery"]()) && (ctx.buttons = _t); 1339 } }, hostVars: 12, hostBindings: function ButtonGroupComponent_HostBindings(rf, ctx) { if (rf & 1) { 1340 _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵlistener"]("keydown", function ButtonGroupComponent_keydown_HostBindingHandler($event) { return ctx.keydown($event); })("focus", function ButtonGroupComponent_focus_HostBindingHandler() { return ctx.onFocus(); })("focusout", function ButtonGroupComponent_focusout_HostBindingHandler($event) { return ctx.focusout($event); }); 1341 } if (rf & 2) { 1342 _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵattribute"]("role", ctx.getRole)("dir", ctx.dir)("aria-disabled", ctx.ariaDisabled)("tabindex", ctx.wrapperTabIndex); 1343 _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵstyleProp"]("width", ctx.wrapperW
1343idth); 1344 _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵclassProp"]("k-button-group", ctx.wrapperClass)("k-disabled", ctx.disabledClass)("k-button-group-stretched", ctx.stretchedClass); 1345 } }, inputs: { selection: "selection", tabIndex: "tabIndex", disabled: "disabled", width: "width" }, outputs: { navigate: "navigate" }, exportAs: ["kendoButtonGroup"], features: [_angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵProvidersFeature"]([ 1346 KendoButtonService, 1347 _progress_kendo_angular_l10n__WEBPACK_IMPORTED_MODULE_4__.LocalizationService, 1348 { 1349 provide: _progress_kendo_angular_l10n__WEBPACK_IMPORTED_MODULE_4__.L10N_PREFIX, 1350 useValue: 'kendo.buttongroup' 1351 } 1352 ]), _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵNgOnChangesFeature"]], ngContentSelectors: _c1, decls: 1, vars: 0, template: function ButtonGroupComponent_Template(rf, ctx) { if (rf & 1) { 1353 _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵprojectionDef"](_c0); 1354 _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵprojection"](0); 1355 } }, encapsulation: 2 }); 1356(0,tslib__WEBPACK_IMPORTED_MODULE_5__.__decorate)([ 1357 (0,_angular_core__WEBPACK_IMPORTED_MODULE_0__.Input)('disabled'), 1358 (0,tslib__WEBPACK_IMPORTED_MODULE_5__.__metadata)("design:type", Boolean) 1359], ButtonGroupComponent.prototype, "disabled", void 0); 1360(0,tslib__WEBPACK_IMPORTED_MODULE_5__.__decorate)([ 1361 (0,_angular_core__WEBPACK_IMPORTED_MODULE_0__.Input)('selection'), 1362 (0,tslib__WEBPACK_IMPORTED_MODULE_5__.__metadata)("design:type", String) 1363], ButtonGroupComponent.prototype, "selection", void 0); 1364(0,tslib__WEBPACK_IMPORTED_MODULE_5__.__decorate)([ 1365 (0,_angular_core__WEBPACK_IMPORTED_MODULE_0__.Input)('width'), 1366 (0,tslib__WEBPACK_IMPORTED_MODULE_5__.__metadata)("design:type", String) 1367], ButtonGroupComponent.prototype, "width", void 0); 1368(0,tslib__WEBPACK_IMPORTED_MODULE_5__.__decorate)([ 1369 (0,_angular_core__WEBPACK_IMPORTED_MODULE_0__.Input)(), 1370 (0,tslib__WEBPACK_IMPORTED_MODULE_5__.__metadata)("design:type", Number), 1371 (0,tslib__WEBPACK_IMPORTED_MODULE_5__.__metadata)("design:paramtypes", [Number]) 1372], ButtonGroupComponent.prototype, "tabIndex", null); 1373(0,tslib__WEBPACK_IMPORTED_MODULE_5__.__decorate)([ 1374 (0,_angular_core__WEBPACK_IMPORTED_MODULE_0__.Output)(), 1375 (0,tslib__WEBPACK_IMPORTED_MODULE_5__.__metadata)("design:type", _angular_core__WEBPACK_IMPORTED_MODULE_0__.EventEmitter) 1376], ButtonGroupComponent.prototype, "navigate", void 0); 1377(0,tslib__WEBPACK_IMPORTED_MODULE_5__.__decorate)([ 1378 (0,_angular_core__WEBPACK_IMPORTED_MODULE_0__.ContentChildren)(ButtonDirective), 1379 (0,tslib__WEBPACK_IMPORTED_MODULE_5__.__metadata)("design:type", _angular_core__WEBPACK_IMPORTED_MODULE_0__.QueryList) 1380], ButtonGroupComponent.prototype, "buttons", void 0); 1381(0,tslib__WEBPACK_IMPORTED_MODULE_5__.__decorate)([ 1382 (0,_angular_core__WEBPACK_IMPORTED_MODULE_0__.HostBinding)('class.k-button-group'), 1383 (0,tslib__WEBPACK_IMPORTED_MODULE_5__.__metadata)("design:type", Boolean), 1384 (0,tslib__WEBPACK_IMPORTED_MODULE_5__.__metadata)("design:paramtypes", []) 1385], ButtonGroupComponent.prototype, "wrapperClass", null); 1386(0,tslib__WEBPACK_IMPORTED_MODULE_5__.__decorate)([ 1387 (0,_angular_core__WEBPACK_IMPORTED_MODULE_0__.HostBinding)('class.k-disabled'), 1388 (0,tslib__WEBPACK_IMPORTED_MODULE_5__.__metadata)("design:type", Boolean), 1389 (0,tslib__WEBPACK_IMPORTED_MODULE_5__.__metadata)("design:paramtypes", []) 1390], ButtonGroupComponent.prototype, "disabledClass", null); 1391(0,tslib__WEBPACK_IMPORTED_MODULE_5__.__decorate)([ 1392 (0,_angular_core__WEBPACK_IMPORTED_MODULE_0__.HostBinding)('class.k-button-group-stretched'), 1393 (0,tslib__WEBPACK_IMPORTED_MODULE_5__.__metadata)("design:type", Boolean), 1394 (0,tslib__WEBPACK_IMPORTED_MODULE_5__.__metadata)("design:paramtypes", []) 1395], ButtonGroupComponent.prototype, "stretchedClass", null); 1396(0,tslib__WEBPACK_IMPORTED_MODULE_5__.__decorate)([ 1397 (0,_angular_core__WEBPACK_IMPORTED_MODULE_0__.HostBinding)('attr.role'), 1398 (0,tslib__WEBPACK_IMPORTED_MODULE_5__.__metadata)("design:type", String), 1399 (0,tslib__WEBPACK_IMPORTED_MODULE_5__.__metadata)("design:paramtypes", []) 1400], ButtonGroupComponent.prototype, "getRole", null); 1401(0,tslib__WEBPACK_IMPORTED_MODULE_5__.__decorate)([ 1402 (0,_angular_core__WEBPACK_IMPORTED_MODULE_0__.HostBinding)('attr.dir'), 1403 (0,tslib__WEBPACK_IMPORTED_MODULE_5__.__metadata)("design:type", String), 1404 (0,tslib__WEBPACK_IMPORTED_MODULE_5__.__metadata)("design:paramtypes", []) 1405], ButtonGroupComponent.prototype, "dir", null); 1406(0,tslib__WEBPACK_IMPORTED_MODULE_5__.__decorate)([ 1407 (0,_angular_core__WEBPACK_IMPORTED_MODULE_0__.HostBinding)('attr.aria-disabled'), 1408 (0,tslib__WEBPACK_IMPORTED_MODULE_5__.__metadata)("design:type", Boolean), 1409 (0,tslib__WEBPACK_IMPORTED_MODULE_5__.__metadata)("design:paramtypes", []) 1410], ButtonGroupComponent.prototype, "ariaDisabled", null); 1411(0,tslib__WEBPACK_IMPORTED_MODULE_5__.__decorate)([ 1412 (0,_angular_core__WEBPACK_IMPORTED_MODULE_0__.HostBinding)('style.width'), 1413 (0,tslib__WEBPACK_IMPORTED_MODULE_5__.__metadata)("design:type", String), 1414 (0,tslib__WEBPACK_IMPORTED_MODULE_5__.__metadata)("design:paramtypes", [])
1415], ButtonGroupComponent.prototype, "wrapperWidth", null); 1416(0,tslib__WEBPACK_IMPORTED_MODULE_5__.__decorate)([ 1417 (0,_angular_core__WEBPACK_IMPORTED_MODULE_0__.HostBinding)('attr.tabindex'), 1418 (0,tslib__WEBPACK_IMPORTED_MODULE_5__.__metadata)("design:type", Number), 1419 (0,tslib__WEBPACK_IMPORTED_MODULE_5__.__metadata)("design:paramtypes", []) 1420], ButtonGroupComponent.prototype, "wrapperTabIndex", null); 1421(0,tslib__WEBPACK_IMPORTED_MODULE_5__.__decorate)([ 1422 (0,_angular_core__WEBPACK_IMPORTED_MODULE_0__.HostListener)('keydown', ['$event']), 1423 (0,tslib__WEBPACK_IMPORTED_MODULE_5__.__metadata)("design:type", Function), 1424 (0,tslib__WEBPACK_IMPORTED_MODULE_5__.__metadata)("design:paramtypes", [Object]), 1425 (0,tslib__WEBPACK_IMPORTED_MODULE_5__.__metadata)("design:returntype", void 0) 1426], ButtonGroupComponent.prototype, "keydown", null); 1427(0,tslib__WEBPACK_IMPORTED_MODULE_5__.__decorate)([ 1428 (0,_angular_core__WEBPACK_IMPORTED_MODULE_0__.HostListener)('focus'), 1429 (0,tslib__WEBPACK_IMPORTED_MODULE_5__.__metadata)("design:type", Function), 1430 (0,tslib__WEBPACK_IMPORTED_MODULE_5__.__metadata)("design:paramtypes", []), 1431 (0,tslib__WEBPACK_IMPORTED_MODULE_5__.__metadata)("design:returntype", void 0) 1432], ButtonGroupComponent.prototype, "onFocus", null); 1433(0,tslib__WEBPACK_IMPORTED_MODULE_5__.__decorate)([ 1434 (0,_angular_core__WEBPACK_IMPORTED_MODULE_0__.HostListener)('focusout', ['$event']), 1435 (0,tslib__WEBPACK_IMPORTED_MODULE_5__.__metadata)("design:type", Function), 1436 (0,tslib__WEBPACK_IMPORTED_MODULE_5__.__metadata)("design:paramtypes", [Object]), 1437 (0,tslib__WEBPACK_IMPORTED_MODULE_5__.__metadata)("design:returntype", void 0) 1438], ButtonGroupComponent.prototype, "focusout", null); 1439ButtonGroupComponent = (0,tslib__WEBPACK_IMPORTED_MODULE_5__.__decorate)([ (0,tslib__WEBPACK_IMPORTED_MODULE_5__.__metadata)("design:paramtypes", [KendoButtonService, 1440 _progress_kendo_angular_l10n__WEBPACK_IMPORTED_MODULE_4__.LocalizationService, 1441 _angular_core__WEBPACK_IMPORTED_MODULE_0__.ElementRef]) 1442], ButtonGroupComponent); 1443 1444/** 1445 * Represents the [NgModule]({{ site.data.urls.angular['ngmodules'] }}) 1446 * definition for the Button directive. 1447 * 1448 * @example 1449 * 1450 * ```ts-no-run 1451 * // Import the Button module 1452 * import { ButtonModule } from '@progress/kendo-angular-buttons'; 1453 * 1454 * // The browser platform with a compiler 1455 * import { platformBrowserDynamic } from '@angular/platform-browser-dynamic'; 1456 * 1457 * import { NgModule } from '@angular/core'; 1458 * 1459 * // Import the app component 1460 * import { AppComponent } from './app.component'; 1461 * 1462 * // Define the app module 1463 * _@NgModule({ 1464 * declarations: [AppComponent], // declare app component 1465 * imports: [BrowserModule, ButtonModule], // import Button module 1466 * bootstrap: [AppComponent] 1467 * }) 1468 * export class AppModule {} 1469 * 1470 * // Compile and launch the module 1471 * platformBrowserDynamic().bootstrapModule(AppModule); 1472 * 1473 * ``` 1474 */ 1475let ButtonModule = class ButtonModule { 1476}; 1477ButtonModule.ɵfac = function ButtonModule_Factory(t) { return new (t || ButtonModule)(); }; 1478ButtonModule.ɵmod = /*@__PURE__*/ _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵdefineNgModule"]({ type: ButtonModule }); 1479ButtonModule.ɵinj = /*@__PURE__*/ _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵdefineInjector"]({}); 1480 1481/** 1482 * @hidden 1483 * 1484 * The exported package module. 1485 * 1486 * The package exports: 1487 * - `ButtonGroupComponent`—The ButtonGroupComponent component class. 1488 */ 1489let ButtonGroupModule = class ButtonGroupModule { 1490}; 1491ButtonGroupModule.ɵfac = function ButtonGroupModule_Factory(t) { return new (t || ButtonGroupModule)(); }; 1492ButtonGroupModule.ɵmod = /*@__PURE__*/ _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵdefineNgModule"]({ type: ButtonGroupModule }); 1493ButtonGroupModule.ɵinj = /*@__PURE__*/ _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵdefineInjector"]({ imports: [[_angular_common__WEBPACK_IMPORTED_MODULE_6__.CommonModule, ButtonModule]] }); 1494 1495/** 1496 * Used for rendering the list item content. 1497 * 1498 * To define the item template, nest a `<ng-template>` tag with the `kendo<ComponentName>ItemTemplate` directive inside the component tag. 1499 * 1500 * For the DropDownButton, use the `kendoDropDownButtonItemTemplate` directive. 1501 * For the SplitButton, use the `kendoSplitButtonItemTemplate` directive. 1502 * 1503 * The template context is set to the current component. To get a reference to the current data item, use the `let-dataItem` directive. 1504 * 1505 * @example 1506 * ```ts 1507 * _@Component({ 1508 * selector: 'my-app', 1509 * template: ` 1510 * <kendo-splitbutton [data]="listItems"> 1511 * <ng-template kendoSplitButtonItemTemplate let-dataItem>
1512 * <span>{{dataItem}} option</span> 1513 * </ng-template> 1514 * </kendo-splitbutton> 1515 * <kendo-dropdownbutton [data]="listItems"> 1516 * <ng-template kendoDropDownButtonItemTemplate let-dataItem> 1517 * <span>{{dataItem}} option</span> 1518 * </ng-template> 1519 * </kendo-dropdownbutton> 1520 * ` 1521 * }) 1522 * class AppComponent { 1523 * public listItems: Array<any> = [{ 1524 * text: 'item1', 1525 * icon: 'refresh', 1526 * disabled: false, 1527 * click: (dataItem: any) => { 1528 * //action 1529 * } 1530 * }, { 1531 * text: 'item2', 1532 * icon: 'refresh', 1533 * disabled: false, 1534 * click: (dataItem: any) => { 1535 * //action 1536 * } 1537 * }] 1538 * } 1539 * ``` 1540 * 1541 * For more examples, refer to the article on the [DropDownList templates]({% slug overview_ddl %}#templates). 1542 */ 1543let ButtonItemTemplateDirective = class ButtonItemTemplateDirective { 1544 constructor(templateRef) { 1545 this.templateRef = templateRef; 1546 } 1547}; 1548ButtonItemTemplateDirective.ɵfac = function ButtonItemTemplateDirective_Factory(t) { return new (t || ButtonItemTemplateDirective)(_angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵdirectiveInject"](_angular_core__WEBPACK_IMPORTED_MODULE_0__.TemplateRef)); }; 1549ButtonItemTemplateDirective.ɵdir = /*@__PURE__*/ _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵdefineDirective"]({ type: ButtonItemTemplateDirective, selectors: [["", "kendoDropDownButtonItemTemplate", ""], ["", "kendoSplitButtonItemTemplate", ""]] }); 1550ButtonItemTemplateDirective = (0,tslib__WEBPACK_IMPORTED_MODULE_5__.__decorate)([ (0,tslib__WEBPACK_IMPORTED_MODULE_5__.__metadata)("design:paramtypes", [_angular_core__WEBPACK_IMPORTED_MODULE_0__.TemplateRef]) 1551], ButtonItemTemplateDirective); 1552 1553/** 1554 * @hidden 1555 */ 1556let ListComponent = class ListComponent { 1557 constructor() { 1558 this.onItemClick = new _angular_core__WEBPACK_IMPORTED_MODULE_0__.EventEmitter(); 1559 this.onItemBlur = new _angular_core__WEBPACK_IMPORTED_MODULE_0__.EventEmitter(); 1560 this.sizeClass = ''; 1561 (0,_progress_kendo_licensing__WEBPACK_IMPORTED_MODULE_2__.validatePackage)(packageMetadata); 1562 } 1563 set size(size) { 1564 if (size) { 1565 this.sizeClass = `k-menu-group-${SIZES[size]}`; 1566 } 1567 else { 1568 this.sizeClass = ''; 1569 } 1570 } 1571 getText(dataItem) { 1572 if (dataItem) { 1573 return this.textField ? dataItem[this.textField] : dataItem.text || dataItem; 1574 } 1575 return undefined; 1576 } 1577 getIconClasses(dataItem) { 1578 const icon = dataItem.icon ? 'k-icon k-i-' + dataItem.icon : undefined; 1579 const classes = {}; 1580 classes[icon || dataItem.iconClass] = true; 1581 return classes; 1582 } 1583 onClick(index) { 1584 this.onItemClick.emit(index); 1585 } 1586 onBlur() { 1587 this.onItemBlur.emit(); 1588 } 1589}; 1590ListComponent.ɵfac = function ListComponent_Factory(t) { return new (t || ListComponent)(); }; 1591ListComponent.ɵcmp = /*@__PURE__*/ _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵdefineComponent"]({ type: ListComponent, selectors: [["kendo-button-list"]], inputs: { size: "size", data: "data", textField: "textField", itemTemplate: "
1591itemTemplate" }, outputs: { onItemClick: "onItemClick", onItemBlur: "onItemBlur" }, decls: 2, vars: 2, consts: [["unselectable", "on", "role", "menu", 1, "k-group", "k-menu-group", "k-reset", 3, "ngClass"], ["role", "menuitem", "unselectable", "on", "kendoButtonFocusable", "", "class", "k-item k-menu-item", 3, "click", "blur", 4, "ngFor", "ngForOf"], ["role", "menuitem", "unselectable", "on", "kendoButtonFocusable", "", 1, "k-item", "k-menu-item", 3, "click", "blur"], [3, "ngIf"], ["kendoButtonFocusable", "", "tabindex", "-1", 1, "k-link", "k-menu-link", 3, "index"], [3, "templateContext"], [3, "ngClass", 4, "ngIf"], ["class", "k-image", "alt", "", 3, "src", 4, "ngIf"], ["class", "k-menu-link-text", 4, "ngIf"], [3, "ngClass"], ["alt", "", 1, "k-image", 3, "src"], [1, "k-menu-link-text"]], template: function ListComponent_Template(rf, ctx) { if (rf & 1) { 1592 _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵelementStart"](0, "ul", 0); 1593 _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵtemplate"](1, ListComponent_li_1_Template, 3, 3, "li", 1); 1594 _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵelementEnd"](); 1595 } if (rf & 2) { 1596 _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵproperty"]("ngClass", ctx.sizeClass); 1597 _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵadvance"](1); 1598 _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵproperty"]("ngForOf", ctx.data); 1599 } }, directives: function () { return [_angular_common__WEBPACK_IMPORTED_MODULE_6__.NgClass, _angular_common__WEBPACK_IMPORTED_MODULE_6__.NgForOf, FocusableDirective, _angular_common__WEBPACK_IMPORTED_MODULE_6__.NgIf, TemplateContextDirective]; }, encapsulation: 2 }); 1600(0,tslib__WEBPACK_IMPORTED_MODULE_5__.__decorate)([ 1601 (0,_angular_core__WEBPACK_IMPORTED_MODULE_0__.Input)(), 1602 (0,tslib__WEBPACK_IMPORTED_MODULE_5__.__metadata)("design:type", Array) 1603], ListComponent.prototype, "data", void 0); 1604(0,tslib__WEBPACK_IMPORTED_MODULE_5__.__decorate)([ 1605 (0,_angular_core__WEBPACK_IMPORTED_MODULE_0__.Input)(), 1606 (0,tslib__WEBPACK_IMPORTED_MODULE_5__.__metadata)("design:type", String) 1607], ListComponent.prototype, "textField", void 0); 1608(0,tslib__WEBPACK_IMPORTED_MODULE_5__.__decorate)([ 1609 (0,_angular_core__WEBPACK_IMPORTED_MODULE_0__.Input)(), 1610 (0,tslib__WEBPACK_IMPORTED_MODULE_5__.__metadata)("design:type", ButtonItemTemplateDirective) 1611], ListComponent.prototype, "itemTemplate", void 0); 1612(0,tslib__WEBPACK_IMPORTED_MODULE_5__.__decorate)([ 1613 (0,_angular_core__WEBPACK_IMPORTED_MODULE_0__.Output)(), 1614 (0,tslib__WEBPACK_IMPORTED_MODULE_5__.__metadata)("design:type", _angular_core__WEBPACK_IMPORTED_MODULE_0__.EventEmitter) 1615], ListComponent.prototype, "onItemClick", void 0); 1616(0,tslib__WEBPACK_IMPORTED_MODULE_5__.__decorate)([ 1617 (0,_angular_core__WEBPACK_IMPORTED_MODULE_0__.Output)(), 1618 (0,tslib__WEBPACK_IMPORTED_MODULE_5__.__metadata)("design:type", _angular_core__WEBPACK_IMPORTED_MODULE_0__.EventEmitter) 1619], ListComponent.prototype, "onItemBlur", void 0); 1620(0,tslib__WEBPACK_IMPORTED_MODULE_5__.__decorate)([ 1621 (0,_angular_core__WEBPACK_IMPORTED_MODULE_0__.Input)(), 1622 (0,tslib__WEBPACK_IMPORTED_MODULE_5__.__metadata)("design:type", String), 1623 (0,tslib__WEBPACK_IMPORTED_MODULE_5__.__metadata)("design:paramtypes", [String]) 1624], ListComponent.prototype, "size", null); 1625ListComponent = (0,tslib__WEBPACK_IMPORTED_MODULE_5__.__decorate)([ (0,tslib__WEBPACK_IMPORTED_MODULE_5__.__metadata)("design:paramtypes", []) 1626], ListComponent); 1627 1628/** 1629 * @hidden 1630 */ 1631let FocusService = class FocusService { 1632 /** 1633 * @hidden 1634 */ 1635 constructor() { 1636 this.onFocus = new _angular_core__WEBPACK_IMPORTED_MODULE_0__.EventEmitter(); 1637 } 1638 isFocused(index) { 1639 return index === this.focused; 1640 } 1641 focus(index) { 1642 if (this.isFocused(index)) { 1643 return; 1644 } 1645 this.focused = index; 1646 this.onFocus.emit(index); 1647 } 1648 resetFocus() { 1649 this.focused = -1; 1650 } 1651 get focused() { 1652 return this.focusedIndex; 1653 } 1654 set focused(index) { 1655 this.focusedIndex = index; 1656 this.onFocus.emit(index); 1657 } 1658}; 1659FocusService.ɵfac = function FocusService_Factory(t) { return new (t || FocusService)(); }; 1660FocusService.ɵprov = /*@__PURE__*/ _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵdefineInjectable"]({ token: FocusService, factory: function (t) { return FocusService.ɵfac(t); } }); 1661 1662/** 1663 * @hidden 1664 */ 1665let FocusableDirective = class FocusableDirective { 1666 constructor(focusService, elementRef, renderer) { 1667 this.focusService = focusService; 1668 this.renderer = renderer; 1669 this.element = elementRef.nativeElement; 1670 this.subscribeEvents(); 1671 } 1672 ngOnInit() { 1673 if (this.index === this.focusService.focused) { 1674 this.renderer.addClass(this.element, 'k-focus'); 1675 } 1676 else { 1677 this.renderer.removeClass(this.element, 'k-focus'); 1678 } 1679 } 1680 /** 1681 * @hidden 1682 */ 1683 ngOnDestroy() { 1684 this.unsubscribeEvents(); 1685 } 1686 subscribeEvents() { 1687 if (!(0,_progress_kendo_angular_common__WEBPACK_IMPORTED_MODULE_3__.isDocumentAvailable)()) { 1688 return; 1689 } 1690 this.focusSubscription = this.focusService.onFocus.subscribe((index) => { 1691 if (this.index === index) { 1692 this.renderer.addClass(this.element, 'k-focus'); 1693 this.element.focus(); 1694 } 1695 else { 1696 this.renderer.removeClass(this.element, 'k-focus'); 1697 } 1698 }); 1699 } 1700 unsubscribeEvents() { 1701 if (!(0,_progress_kendo_angular_common__WEBPACK_IMPORTED_MODULE_3__.isDocumentAvailable)()) { 1702 return; 1703 } 1704 if (this.focusSubscription) { 1705 this.focusSubscription.unsubscribe(); 1706 } 1707 } 1708}; 1709FocusableDirective.ɵfac = function FocusableDirective_Factory(t) { return new (t || FocusableDirective)(_angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵdirectiveInject"](FocusService), _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵdirectiveInject"](_angular_core__WEBPACK_IMPORTED_MODULE_0__.ElementRef), _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵdirectiveInject"](_angular_core__WEBPACK_IMPORTED_MODULE_0__.Renderer2)); }; 1710FocusableDirective.ɵdir = /*@__PURE__*/ _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵdefineDirective"]({ type: FocusableDirective, selectors: [["", "kendoButtonFocusable", ""]], inputs: { index: "index" } }); 1711(0,tslib__WEBPACK_IMPORTED_MODULE_5__.__decorate)([ 1712 (0,_angular_core__WEBPACK_IMPORTED_MODULE_0__.Input)(), 1713 (0,tslib__WEBPACK_IMPORTED_MODULE_5__.__metadata)("design:type", Number) 1714], FocusableDirective.prototype, "index", void 0); 1715FocusableDirective = (0,tslib__WEBPACK_IMPORTED_MODULE_5__.__decorate)([ (0,tslib__WEBPACK_IMPORTED_MODULE_5__.__metadata)("design:paramtypes", [FocusService, _angular_core__WEBPACK_IMPORTED_MODULE_0__.ElementRef, _angular_core__WEBPACK_IMPORTED_MODULE_0__.Renderer2]) 1716], FocusableDirective); 1717 1718/** 1719 * @hidden 1720 */ 1721let TemplateContextDirective = class TemplateContextDirective { 1722 constructor(viewContainerRef) { 1723 this.viewContainerRef = viewContainerRef; 1724 } 1725 set templateContext(context) { 1726 if (this.insertedViewRef) { 1727 this.viewContainerRef.remove(this.viewContainerRef.indexOf(this.insertedViewRef)); 1728 this.insertedViewRef = undefined; 1729 } 1730 if (context.templateRef) { 1731 this.insertedViewRef = this.viewContainerRef.createEmbeddedView(context.templateRef, context); 1732 } 1733 } 1734}; 1735TemplateContextDirective.ɵfac = function TemplateContextDirective_Factory(t) { return new (t || TemplateContextDirective)(_angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵdirectiveInject"](_angular_core__WEBPACK_IMPORTED_MODULE_0__.ViewContainerRef)); }; 1736TemplateContextDirective.ɵdir = /*@__PURE__*/ _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵdefineDirective"]({ type: TemplateContextDirective, selectors: [["", "templateContext", ""]], inputs: { templateContext: "templateContext" } }); 1737(0,tslib__WEBPACK_IMPORTED_MODULE_5__.__decorate)([ 1738 (0,_angular_core__WEBPACK_IMPORTED_MODULE_0__.Input)(), 1739 (0,tslib__WEBPACK_IMPORTED_MODULE_5__.__metadata)("design:type", Object), 1740 (0,tslib__WEBPACK_IMPORTED_MODULE_5__.__metadata)("design:paramtypes", [Object]) 1741], TemplateContextDirective.prototype, "templateContext", null); 1742TemplateContextDirective = (0,tslib__WEBPACK_IMPORTED_MODULE_5__.__decorate)([ (0,tslib__WEBPACK_IMPORTED_MODULE_5__.__metadata)("design:paramtypes", [_angular_core__WEBPACK_IMPORTED_MODULE_0__.ViewContainerRef]) 1743], TemplateContextDirective); 1744 1745const EXPORTED_DIRECTIVES = [ 1746 ListComponent, 1747 FocusableDirective, 1748 ButtonItemTemplateDirective, 1749 TemplateContextDirective 1750]; 1751/** 1752 * @hidden 1753 */ 1754let ListModule = class ListModule { 1755}; 1756ListModule.ɵfac = function ListModule_Factory(t) { return new (t || ListModule)(); }; 1757ListModule.ɵmod = /*@__PURE__*/ _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵdefineNgModule"]({ type: ListModule }); 1758ListModule.ɵinj = /*@__PURE__*/ _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵdefineInjector"]({ imports: [[_angular_common__WEBPACK_IMPORTED_MODULE_6__.CommonModule]] }); 1759 1760/** 1761 * @hidden 1762 */ 1763var KeyEvents; 1764(function (KeyEvents) {
1765 KeyEvents[KeyEvents["keydown"] = 0] = "keydown"; 1766 KeyEvents[KeyEvents["keypress"] = 1] = "keypress"; 1767 KeyEvents[KeyEvents["keyup"] = 2] = "keyup"; 1768})(KeyEvents || (KeyEvents = {})); 1769 1770/** 1771 * @hidden 1772 */ 1773var NavigationAction; 1774(function (NavigationAction) { 1775 NavigationAction[NavigationAction["Undefined"] = 0] = "Undefined"; 1776 NavigationAction[NavigationAction["Open"] = 1] = "Open"; 1777 NavigationAction[NavigationAction["Close"] = 2] = "Close"; 1778 NavigationAction[NavigationAction["Enter"] = 3] = "Enter"; 1779 NavigationAction[NavigationAction["EnterPress"] = 4] = "EnterPress"; 1780 NavigationAction[NavigationAction["EnterUp"] = 5] = "EnterUp"; 1781 NavigationAction[NavigationAction["Tab"] = 6] = "Tab"; 1782 NavigationAction[NavigationAction["Esc"] = 7] = "Esc"; 1783 NavigationAction[NavigationAction["Navigate"] = 8] = "Navigate"; 1784})(NavigationAction || (NavigationAction = {})); 1785 1786/* tslint:disable:deprecation */ 1787/** 1788 * @hidden 1789 */ 1790class ListButton { 1791 constructor(focusService, navigationService, wrapperRef, _zone, localization, cdr) { 1792 this.focusService = focusService; 1793 this.navigationService = navigationService; 1794 this.wrapperRef = wrapperRef; 1795 this._zone = _zone; 1796 this.cdr = cdr; 1797 this._open = false; 1798 this._disabled = false; 1799 this._active = false; 1800 this._popupSettings = { animate: true, popupClass: '' }; 1801 this.listId = (0,_progress_kendo_angular_common__WEBPACK_IMPORTED_MODULE_3__.guid)(); 1802 this._isFocused = false; 1803 (0,_progress_kendo_licensing__WEBPACK_IMPORTED_MODULE_2__.validatePackage)(packageMetadata); 1804 this.focusService = focusService; 1805 this.navigationService = navigationService; 1806 this.wrapper = wrapperRef.nativeElement; 1807 this.localizationChangeSubscription = localization.changes.subscribe(({ rtl }) => (this.direction = rtl ? 'rtl' : 'ltr')); 1808 this.subscribeEvents(); 1809 } 1810 get popupClasses() { 1811 const popupClasses = ['k-menu-popup']; 1812 if (this._popupSettings.popupClass) { 1813 popupClasses.push(this._popupSettings.popupClass); 1814 } 1815 return popupClasses.join(' '); 1816 } 1817 get openState() { 1818 return this._open; 1819 } 1820 set openState(open) { 1821 this._open = open; 1822 } 1823 /** 1824 * @hidden 1825 */ 1826 togglePopupVisibility() { 1827 if (this._disabled) { 1828 return; 1829 } 1830 this.openState = !this.openState; 1831 if (!this.openState) { 1832 this.focusService.focus(-1); 1833 } 1834 } 1835 /** 1836 * @hidden 1837 */ 1838 onItemClick(index) { 1839 this.emitItemClickHandler(index); 1840 setTimeout(() => this.focusWrapper(), 1); 1841 } 1842 ngOnDestroy() { 1843 this.openState = false; 1844 this.unsubscribeEvents(); 1845 clearTimeout(this.focusFirstTimeout); 1846 clearTimeout(this.blurTimeout); 1847 if (this.localizationChangeSubscription) { 1848 this.localizationChangeSubscription.unsubscribe(); 1849 } 1850 } 1851 subscribeEvents() { 1852 if (!(0,_progress_kendo_angular_common__WEBPACK_IMPORTED_MODULE_3__.isDocumentAvailable)()) { 1853 return; 1854 } 1855 this.subscribeListItemFocusEvent(); 1856 this.subscribeComponentBlurredEvent(); 1857 this.subscribeNavigationEvents(); 1858 } 1859 subscribeListItemFocusEvent() { 1860 this.focusSubscription = this.focusService.onFocus.subscribe(() => { 1861 this._isFocused = true; 1862 }); 1863 } 1864 subscribeComponentBlurredEvent() { 1865 this._zone.runOutsideAngular(() => { 1866 this.tabSubscription = this.navigationService.tab.pipe((0,rxjs_operators__WEBPACK_IMPORTED_MODULE_7__.filter)(() => this._isFocused)).subscribe(this.handleTab.bind(this)); 1867 this.componentBlurredSubscription = (0,rxjs__WEBPACK_IMPORTED_MODULE_8__.fromEvent)(document, 'click') 1868 .pipe((0,rxjs_operators__WEBPACK_IMPORTED_MODULE_7__.filter)((event) => !this.wrapperContains(event.target)), (0,rxjs_operators__WEBPACK_IMPORTED_MODULE_7__.filter)(() => this._isFocused)) 1869 .subscribe(() => this._zone.run(() => this.blurWrapper())); 1870 }); 1871 } 1872 subscribeNavigationEvents() { 1873 this.navigationSubscription = this.navigationService.navigate.subscribe(this.focusService.focus.bind(this.focusService)); 1874 this.enterUpSubscription = this.navigationService.enterup.subscribe(() => { 1875 this.enterHandler(); 1876 this.focusWrapper(); 1877 }); 1878 this.openSubscription = this.navigationService.open.subscribe(() => { 1879 if (!this._open) { 1880 this.togglePopupVisibility(); 1881 this.focusFirstItem(); 1882 } 1883 else { 1884 this.focusWrapper(); 1885 } 1886 }); 1887 this.closeSubscription = (0,rxjs__WEBPACK_IMPORTED_MODULE_9__.merge)(this.navigationService.close, this.navigationService.esc).subscribe(() => this.focusWrapper()); 1888 } 1889 enterHandler() { } // tslint:disable-line 1890 unsubscribeEvents() { 1891 if (!(0,_progress_kendo_angular_common__WEBPACK_IMPORTED_MODULE_3__.isDocumentAvailable)()) { 1892 return; 1893 } 1894 this.unsubscribe(this.componentBlurredSubscription); 1895 this.unsubscribe(this.focusSubscription); 1896 this.unsubscribe(this.navigationSubscription); 1897 this.unsubscribe(this.enterPressSubscription); 1898 this.unsubscribe(this.enterUpSubscription); 1899 this.unsubscribe(this.openSubscription); 1900 this.unsubscribe(this.closeSubscription); 1901 this.unsubscribe(this.tabSubscription); 1902 } 1903 unsubscribe(subscription) { 1904 if (subscription) { 1905 subscription.unsubscribe(); 1906 } 1907 } 1908 /** 1909 * @hidden 1910 */ 1911 keyDownHandler(event) { 1912 this.keyHandler(event); 1913 } 1914 /** 1915 * @hidden 1916 */ 1917 keyPressHandler(event) { 1918 this.keyHandler(event, KeyEvents.keypress); 1919 } 1920 /** 1921 * @hidden 1922 */ 1923 keyUpHandler(event) { 1924 this.keyHandler(event, KeyEvents.keyup); 1925 } 1926 /** 1927 * @hidden 1928 */ 1929 keyHandler(event, keyEvent) { 1930 if (this._disabled) { 1931 return; 1932 } 1933 let focused = this.focusService.focused || 0; 1934 const eventData = event; 1935 const action = this.navigationService.process({ 1936 altKey: eventData.altKey, 1937 current: focused, 1938 keyCode: eventData.keyCode, 1939 keyEvent: keyEvent, 1940 max: this._data ? this._data.length - 1 : 0, 1941 min: 0 1942 }); 1943 if (action !== NavigationAction.Undefined && 1944 action !== NavigationAction.Tab && 1945 (action !== NavigationAction.Enter || (action === NavigationAction.Enter && this._open))) { 1946 if (event.keyCode === _progress_kendo_angular_common__WEBPACK_IMPORTED_MODULE_3__.Keys.Space && action === NavigationAction.EnterUp) { 1947 this._open = false;
1948 } 1949 else { 1950 eventData.preventDefault(); 1951 } 1952 } 1953 } 1954 emitItemClickHandler(index) { 1955 const dataItem = this._data[index]; 1956 if (this._itemClick) { 1957 this._itemClick.emit(dataItem); 1958 } 1959 if (dataItem && dataItem.click && !dataItem.disabled) { 1960 dataItem.click(dataItem); 1961 } 1962 } 1963 focusFirstItem() { 1964 if (this._data && isPresent(this._data[0])) { 1965 this.focusFirstTimeout = setTimeout(() => this.focusService.focus(0), 1); 1966 } 1967 } 1968 focusWrapper() { 1969 if (this._open) { 1970 this.togglePopupVisibility(); 1971 this.focusButton(); 1972 } 1973 } 1974 wrapperContains(element) { 1975 return this.wrapper === element || this.wrapper.contains(element); 1976 } 1977 blurWrapper(emit = true) { 1978 if (this._open) { 1979 this.togglePopupVisibility(); 1980 } 1981 this._isFocused = false; 1982 if (emit) { 1983 this._blur.emit(); 1984 this.cdr.markForCheck(); 1985 } 1986 } 1987 focusButton() { 1988 if (this.button) { 1989 this.button.nativeElement.focus(); 1990 } 1991 } 1992 handleTab() { 1993 this.focusButton(); 1994 this.blurWrapper(false); 1995 } 1996} 1997ListButton.ɵfac = function ListButton_Factory(t) { _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵinvalidFactory"](); }; 1998ListButton.ɵdir = /*@__PURE__*/ _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵdefineDirective"]({ type: ListButton }); 1999 2000/** 2001 * @hidden 2002 */ 2003const NAVIGATION_CONFIG = new _angular_core__WEBPACK_IMPORTED_MODULE_0__.InjectionToken('navigation.config'); 2004 2005/** 2006 * @hidden 2007 */ 2008let NavigationService = class NavigationService { 2009 constructor(config) { 2010 this.navigate = new _angular_core__WEBPACK_IMPORTED_MODULE_0__.EventEmitter(); 2011 this.open = new _angular_core__WEBPACK_IMPORTED_MODULE_0__.EventEmitter(); 2012 this.close = new _angular_core__WEBPACK_IMPORTED_MODULE_0__.EventEmitter(); 2013 this.enter = new _angular_core__WEBPACK_IMPORTED_MODULE_0__.EventEmitter(); 2014 this.enterpress = new _angular_core__WEBPACK_IMPORTED_MODULE_0__.EventEmitter(); 2015 this.enterup = new _angular_core__WEBPACK_IMPORTED_MODULE_0__.EventEmitter(); 2016 this.tab = new _angular_core__WEBPACK_IMPORTED_MODULE_0__.EventEmitter(); 2017 this.esc = new _angular_core__WEBPACK_IMPORTED_MODULE_0__.EventEmitter(); 2018 this.useLeftRightArrows = config.useLeftRightArrows; 2019 } 2020 process(args) { 2021 const keyCode = args.keyCode; 2022 const keyEvent = args.keyEvent; 2023 let index; 2024 let action = NavigationAction.Undefined; 2025 if (keyEvent === KeyEvents.keypress) { 2026 if (this.isEnter(keyCode)) { 2027 action = NavigationAction.EnterPress; 2028 } 2029 } 2030 else if (keyEvent === KeyEvents.keyup) { 2031 if (this.isEnter(keyCode)) { 2032 action = NavigationAction.EnterUp; 2033 } 2034 } 2035 else { 2036 if (args.altKey && keyCode === _progress_kendo_angular_common__WEBPACK_IMPORTED_MODULE_3__.Keys.ArrowDown) { 2037 action = NavigationAction.Open; 2038 } 2039 else if (args.altKey && keyCode === _progress_kendo_angular_common__WEBPACK_IMPORTED_MODULE_3__.Keys.ArrowUp) { 2040 action = NavigationAction.Close; 2041 } 2042 else if (this.isEnter(keyCode)) { 2043 action = NavigationAction.Enter; 2044 } 2045 else if (keyCode === _progress_kendo_angular_common__WEBPACK_IMPORTED_MODULE_3__.Keys.Escape) { 2046 action = NavigationAction.Esc; 2047 } 2048 else if (keyCode === _progress_kendo_angular_common__WEBPACK_IMPORTED_MODULE_3__.Keys.Tab) { 2049 action = NavigationAction.Tab; 2050 } 2051 else if (keyCode === _progress_kendo_angular_common__WEBPACK_IMPORTED_MODULE_3__.Keys.ArrowUp || (this.useLeftRightArrows && keyCode === _progress_kendo_angular_common__WEBPACK_IMPORTED_MODULE_3__.Keys.ArrowLeft)) { 2052 const step = args.flipNavigation ? 1 : -1; 2053 const start = args.flipNavigation ? args.min : args.max; 2054 const end = args.flipNavigation ? args.max : args.min; 2055 index = this.next({ 2056 current: args.current, 2057 start: start, 2058 end: end, 2059 step: step 2060 }); 2061 action = NavigationAction.Navigate; 2062 } 2063 else if (keyCode === _progress_kendo_angular_common__WEBPACK_IMPORTED_MODULE_3__.Keys.ArrowDown || (this.useLeftRightArrows && keyCode === _progress_kendo_angular_common__WEBPACK_IMPORTED_MODULE_3__.Keys.ArrowRight)) { 2064 const step = args.flipNavigation ? -1 : 1; 2065 const start = args.flipNavigation ? args.max : args.min; 2066 const end = args.flipNavigation ? args.min : args.max; 2067 index = this.next({ 2068 current: args.current, 2069 start: start, 2070 end: end, 2071 step: step 2072 }); 2073 action = NavigationAction.Navigate; 2074 } 2075 else if (keyCode === _progress_kendo_angular_common__WEBPACK_IMPORTED_MODULE_3__.Keys.Home) { 2076 index = args.min; 2077 action = NavigationAction.Navigate; 2078 } 2079 else if (keyCode === _progress_kendo_angular_common__WEBPACK_IMPORTED_MODULE_3__.Keys.End) { 2080 index = args.max; 2081 action = NavigationAction.Navigate; 2082 } 2083 } 2084 if (action !== NavigationAction.Undefined) { 2085 this[NavigationAction[action].toLowerCase()].emit(index); 2086 } 2087 return action; 2088 } 2089 isEnter(keyCode) { 2090 return keyCode === _progress_kendo_angular_common__WEBPACK_IMPORTED_MODULE_3__.Keys.Enter || keyCode === _progress_kendo_angular_common__WEBPACK_IMPORTED_MODULE_3__.Keys.Space; 2091 } 2092 next(args) { 2093 if (!isPresent(args.current)) { 2094 return args.start; 2095 } 2096 else { 2097 return args.current !== args.end ? args.current + args.step : args.end; 2098 } 2099 } 2100}; 2101NavigationService.ɵfac = function NavigationService_Factory(t) { return new (t || NavigationService)(_angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵinject"](NAVIGATION_CONFIG)); }; 2102NavigationService.ɵprov = /*@__PURE__*/ _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵdefineInjectable"]({ token: NavigationService, factory: function (t) { return NavigationService.ɵfac(t); } }); 2103NavigationService = (0,tslib__WEBPACK_IMPORTED_MODULE_5__.__decorate)([ (0,tslib__WEBPACK_IMPORTED_MODULE_5__.__param)(0, (0,_angular_core__WEBPACK_IMPORTED_MODULE_0__.Inject)(NAVIGATION_CONFIG)), 2104 (0,tslib__WEBPACK_IMPORTED_MODULE_5__.__metadata)("design:paramtypes", [Object]) 2105], NavigationService); 2106 2107const NAVIGATION_SETTINGS = { 2108 useLeftRightArrows: true 2109}; 2110const ɵ0 = NAVIGATION_SETTINGS; 2111const NAVIGATION_SETTINGS_PROVIDER = { 2112 provide: NAVIGATION_CONFIG, 2113 useValue: ɵ0 2114}
2114; 2115/** 2116 * Represents the Kendo UI SplitButton component for Angular. 2117 * 2118 * @example 2119 * ```ts 2120 * _@Component({ 2121 * selector: 'my-app', 2122 * template: ` 2123 * <kendo-splitbutton [data]="data" icon="paste" 2124 * (itemClick)="onSplitButtonItemClick($event)" 2125 * (buttonClick)="onSplitButtonClick()">Paste</kendo-splitbutton> 2126 * ` 2127 * }) 2128 * 2129 * class AppComponent { 2130 * public data: Array<any> = [{ 2131 * text: 'Keep Text Only', 2132 * icon: 'paste-plain-text', 2133 * click: () => { console.log('Keep Text Only click handler'); } 2134 * }, { 2135 * text: 'Paste as HTML', 2136 * icon: 'paste-as-html' 2137 * }, { 2138 * text: 'Paste Markdown', 2139 * icon: 'paste-markdown' 2140 * }, { 2141 * text: 'Set Default Paste' 2142 * }]; 2143 * 2144 * public onSplitButtonClick(dataItem: any): void { 2145 * console.log('Paste'); 2146 * } 2147 * 2148 * public onSplitButtonItemClick(dataItem: any): void { 2149 * if (dataItem) { 2150 * console.log(dataItem.text); 2151 * } 2152 * } 2153 * } 2154 * ``` 2155 */ 2156let SplitButtonComponent = class SplitButtonComponent extends ListButton { 2157 constructor(focusService, navigationService, wrapperRef, zone, popupService, elRef, localization, cdr, renderer) { 2158 super(focusService, navigationService, wrapperRef, zone, localization, cdr); 2159 this.popupService = popupService; 2160 this.elRef = elRef; 2161 this.localization = localization; 2162 this.renderer = renderer; 2163 /** 2164 * Sets the text of the SplitButton. 2165 */ 2166 this.text = ''; 2167 /** 2168 * Defines an icon to be rendered next to the button text 2169 * ([see example]({% slug databinding_splitbutton %}#toc-arrays-of-complex-data)). 2170 */ 2171 this.icon = ''; 2172 /** 2173 * Defines an icon with a custom CSS class to be rendered next to the button text 2174 * ([see example]({% slug databinding_splitbutton %}#toc-arrays-of-complex-data)). 2175 */ 2176 this.iconClass = ''; 2177 /** 2178 * Defines the type attribute of the main button 2179 */ 2180 this.type = 'button'; 2181 /** 2182 * Defines the location of an image to be displayed next to the button text 2183 * ([see example]({% slug databinding_splitbutton %}#toc-arrays-of-complex-data)). 2184 */ 2185 this.imageUrl = ''; 2186 /** 2187 * The size property specifies the padding of the SplitButton 2188 * ([see example]({% slug api_buttons_splitbuttoncomponent %}#toc-size)). 2189 * 2190 * The possible values are: 2191 * * `'small'` 2192 * * `'medium'` (default) 2193 * * `'large'` 2194 * * `null` 2195 */ 2196 this.size = 'medium'; 2197 /** 2198 * The SplitButton allows you to specify predefined theme colors. 2199 * The theme color will be applied as a background and border color while also amending the text color accordingly 2200 * ([see example]({% slug api_buttons_splitbuttoncomponent %}#toc-themeColor)). 2201 * 2202 * The possible values are: 2203 * * `base` —Applies coloring based on the `base` theme color. (default) 2204 * * `primary` —Applies coloring based on the `primary` theme color. 2205 * * `secondary`—Applies coloring based on the `secondary` theme color. 2206 * * `tertiary`— Applies coloring based on the `tertiary` theme color. 2207 * * `info`—Applies coloring based on the `info` theme color. 2208 * * `success`— Applies coloring based on the `success` theme color. 2209 * * `warning`— Applies coloring based on the `warning` theme color. 2210 * * `error`— Applies coloring based on the `error` theme color. 2211 * * `dark`— Applies coloring based on the `dark` theme color. 2212 * * `light`— Applies coloring based on the `light` theme color. 2213 * * `inverse`— Applies coloring based on the `inverse` theme color. 2214 */ 2215 this.themeColor = 'base'; 2216 /** 2217 * Specifies the [`tabIndex`](https://developer.mozilla.org/en-US/docs/Web/HTML/Global_attributes/tabindex) of the component. 2218 */ 2219 this.tabIndex = 0; 2220 /** 2221 * Specifies the name of the [font icon]({% slug icons %}#toc-list-of-font-icons) that will 2222 * be rendered for the button which opens the popup. 2223 */ 2224 this.arrowButtonIcon = 'arrow-s'; 2225 /** 2226 * Fires each time the user clicks the main button. 2227 * 2228 * @example 2229 * ```ts 2230 * _@Component({ 2231 * selector: 'my-app', 2232 * template: ` 2233 * <kendo-splitbutton (buttonClick)="onSplitButtonClick()" [data]="data"> 2234 * Reply 2235 * </kendo-splitbutton> 2236 * ` 2237 * }) 2238 * class AppComponent { 2239 * public data: Array<any> = ['Reply All', 'Forward', 'Reply & Delete']; 2240 * 2241 * public onSplitButtonClick(): void { 2242 * console.log('SplitButton click'); 2243 * } 2244 * } 2245 * ``` 2246 * 2247 */ 2248 this.buttonClick = new _angular_core__WEBPACK_IMPORTED_MODULE_0__.EventEmitter(); 2249 /** 2250 * Fires each time the user clicks on the drop-down list. The event data contains the data item bound to the clicked list item. 2251 * 2252 * @example 2253 * ```ts 2254 * _@Component({ 2255 * selector: 'my-app', 2256 * template: ` 2257 * <kendo-splitbutton (itemClick)="onSplitButtonItemClick($event)" [data]="data"> 2258 * Reply 2259 * </kendo-splitbutton> 2260 * ` 2261 * }) 2262 * class AppComponent { 2263 * public data: Array<any> = ['Reply All', 'Forward', 'Reply & Delete']; 2264 * 2265 * public onSplitButtonItemClick(dataItem?: string): void { 2266 * if (dataItem) { 2267 * console.log(dataItem); 2268 * } 2269 * } 2270 * } 2271 * ``` 2272 * 2273 */ 2274 this.itemClick = new _angular_core__WEBPACK_IMPORTED_MODULE_0__.EventEmitter(); 2275 /**
2276 * Fires each time the SplitButton gets focused. 2277 */ 2278 this.onFocus = new _angular_core__WEBPACK_IMPORTED_MODULE_0__.EventEmitter(); //tslint:disable-line:no-output-rename 2279 /** 2280 * Fires each time the SplitButton gets blurred. 2281 */ 2282 this.onBlur = new _angular_core__WEBPACK_IMPORTED_MODULE_0__.EventEmitter(); //tslint:disable-line:no-output-rename 2283 /** 2284 * Fires each time the popup is about to open. 2285 * This event is preventable. If you cancel the event, the popup will remain closed. 2286 */ 2287 this.open = new _angular_core__WEBPACK_IMPORTED_MODULE_0__.EventEmitter(); 2288 /** 2289 * Fires each time the popup is about to close. 2290 * This event is preventable. If you cancel the event, the popup will remain open. 2291 */ 2292 this.close = new _angular_core__WEBPACK_IMPORTED_MODULE_0__.EventEmitter(); 2293 /** 2294 * @hidden 2295 */ 2296 this.activeArrow = false; 2297 this.listId = (0,_progress_kendo_angular_common__WEBPACK_IMPORTED_MODULE_3__.guid)(); 2298 this.buttonText = ''; 2299 this.lockFocus = false; 2300 this._rounded = 'medium'; 2301 this._fillMode = "solid"; 2302 this._itemClick = this.itemClick; 2303 this._blur = this.onBlur; 2304 } 2305 /** 2306 * The rounded property specifies the border radius of the SplitButton 2307 * ([see example]({% slug api_buttons_splitbuttoncomponent %}#toc-rounded)). 2308 * 2309 * The possible values are: 2310 * * `'small'` 2311 * * `'medium'` (default) 2312 * * `'large'` 2313 * * `'full'` 2314 * * `null` 2315 */ 2316 set rounded(rounded) { 2317 this.handleClasses(rounded, 'rounded'); 2318 this._rounded = rounded; 2319 } 2320 get rounded() { 2321 return this._rounded; 2322 } 2323 /** 2324 * The fillMode property specifies the background and border styles of the SplitButton 2325 * ([see example]({% slug api_buttons_splitbuttoncomponent %}#toc-fillMode)). 2326 * 2327 * The available values are: 2328 * * `solid` (default) 2329 * * `flat` 2330 * * `outline` 2331 * * `link` 2332 */ 2333 set fillMode(fillMode) { 2334 this._fillMode = fillMode === 'clear' ? 'flat' : fillMode; 2335 } 2336 get fillMode() { 2337 return this._fillMode; 2338 } 2339 /** 2340 * When set to `true`, disables a SplitButton item 2341 * ([see example]({% slug databinding_splitbutton %}#toc-arrays-of-complex-data)). 2342 */ 2343 set disabled(value) { 2344 if (this.isOpen) { 2345 this.toggle(false); 2346 } 2347 this._disabled = value; 2348 } 2349 get disabled() { 2350 return this._disabled; 2351 } 2352 /** 2353 * Configures the popup of the SplitButton. 2354 * 2355 * The available options are: 2356 * - `animate: Boolean`—Controls the popup animation. By default, the open and close animations are enabled. 2357 * - `popupClass: String`—Specifies a list of CSS classes that are used to style the popup. 2358 * - `appendTo: "root" | "component" | ViewContainerRef`—Specifies the component to which the popup will be appended. 2359 * - `align: "left" | "center" | "right"`—Specifies the alignment of the popup. 2360 */ 2361 set popupSettings(settings) { 2362 this._popupSettings = Object.assign({ animate: true, popupClass: '' }, settings); 2363 } 2364 get popupSettings() { 2365 return this._popupSettings; 2366 } 2367 /** 2368 * Sets the data of the SplitButton. 2369 * 2370 * > The data has to be provided in an array-like list. 2371 */ 2372 set data(data) { 2373 this._data = data || []; 2374 } 2375 get data() { 2376 if (!this._data) { 2377 this.data = []; 2378 } 2379 return this._data; 2380 } 2381 /** 2382 * @hidden 2383 */ 2384 set openState(open) { 2385 if (this.disabled) { 2386 return; 2387 } 2388 const eventArgs = new PreventableEvent(); 2389 if (open) { 2390 this.open.emit(eventArgs); 2391 } 2392 else { 2393 this.close.emit(eventArgs); 2394 } 2395 if (eventArgs.isDefaultPrevented()) { 2396 return; 2397 } 2398 this._toggle(open); 2399 } 2400 /** 2401 * @hidden 2402 */ 2403 get openState() { 2404 return this._open; 2405 } 2406 /** 2407 * @hidden 2408 */ 2409 get active() { 2410 return this._active; 2411 } 2412 /** 2413 * @hidden 2414 */ 2415 get componentTabIndex() { 2416 return this.disabled ? -1 : this.tabIndex; 2417 } 2418 set isFocused(value) { 2419 this._isFocused = value; 2420 } 2421 get isFocused() { 2422 return this._isFocused && !this._disabled; 2423 } 2424 get widgetClasses() { 2425 return true; 2426 } 2427 get dir() { 2428 return this.direction; 2429 } 2430 /** 2431 * @hidden 2432 */ 2433 get ariaLabel() { 2434 const localizationMsg = this.localization.get('splitButtonLabel') || ''; 2435 return replaceMessagePlaceholder(localizationMsg, 'buttonText', this.buttonText); 2436 } 2437 /** 2438 * @hidden 2439 */ 2440 onButtonFocus() { 2441 if (!this.isFocused) { 2442 this._isFocused = true; 2443 this.onFocus.emit(); 2444 } 2445 } 2446 /** 2447 * @hidden 2448 */ 2449 onArrowButtonClick() { 2450 this.lockFocus = true; 2451 this.togglePopupVisibility(); 2452 } 2453 /** 2454 * @hidden 2455 */ 2456 toggleButtonActiveState(enable) { 2457 this._active = enable; 2458 } 2459 /** 2460 * @hidden 2461 */ 2462 toggleArrowButtonActiveState(enable) { 2463 this.activeArrow = enable; 2464 } 2465 /** 2466 * @hidden 2467 */ 2468 onButtonClick() { 2469 this.lockFocus = true; 2470 this.buttonClick.emit(); 2471 } 2472 /** 2473 * @hidden 2474 */ 2475 onButtonBlur() { 2476 if (!this.isOpen && !this.lockFocus) { 2477 this.blurWrapper(); 2478 } 2479 this.lockFocus = false;
2480 } 2481 /** 2482 * @hidden 2483 */ 2484 keydown(event) { 2485 this.keyDownHandler(event); 2486 if (event.keyCode === _progress_kendo_angular_common__WEBPACK_IMPORTED_MODULE_3__.Keys.Space) { 2487 this._active = true; 2488 } 2489 } 2490 /** 2491 * @hidden 2492 */ 2493 keypress(event) { 2494 this.keyPressHandler(event); 2495 } 2496 /** 2497 * @hidden 2498 */ 2499 keyup(event) { 2500 this._active = false; 2501 if (event.keyCode !== _progress_kendo_angular_common__WEBPACK_IMPORTED_MODULE_3__.Keys.Space) { 2502 this.keyUpHandler(event); 2503 } 2504 } 2505 /** 2506 * @hidden 2507 */ 2508 ngAfterViewInit() { 2509 this.updateButtonText(); 2510 this.handleClasses(this.rounded, 'rounded'); 2511 } 2512 /** 2513 * @hidden 2514 */ 2515 ngOnChanges(changes) { 2516 if (changes.hasOwnProperty('text')) { 2517 this.updateButtonText(); 2518 } 2519 if ((0,_progress_kendo_angular_common__WEBPACK_IMPORTED_MODULE_3__.isChanged)("popupSettings", changes) && isPresent(this.popupRef)) { 2520 const popup = this.popupRef.popup.instance; 2521 const newSettings = changes.popupSettings.currentValue; 2522 popup.popupClass = newSettings.popupClass; 2523 popup.animate = newSettings.animate; 2524 popup.popupAlign = this.popupAlign; 2525 } 2526 } 2527 /** 2528 * @hidden 2529 */ 2530 togglePopupVisibility() { 2531 super.togglePopupVisibility(); 2532 if ((0,_progress_kendo_angular_common__WEBPACK_IMPORTED_MODULE_3__.isDocumentAvailable)() && this.lockFocus) { 2533 this.button.nativeElement.focus(); 2534 } 2535 } 2536 /** 2537 * @hidden 2538 */ 2539 wrapperContains(element) { 2540 return (this.wrapper === element || this.wrapper.contains(element) || (this.popupRef && this.popupRef.popupElement.contains(element))); 2541 } 2542 /** 2543 * @hidden 2544 */ 2545 get anchorAlign() { 2546 let align = { horizontal: this.popupSettings.align || 'left', vertical: 'bottom' }; 2547 if (this.direction === 'rtl' && !isPresent(this.popupSettings.align)) { 2548 align.horizontal = 'right'; 2549 } 2550 return align; 2551 } 2552 /** 2553 * @hidden 2554 */ 2555 get popupAlign() { 2556 let align = { horizontal: this.popupSettings.align || 'left', vertical: 'top' }; 2557 if (this.direction === 'rtl' && !isPresent(this.popupSettings.align)) { 2558 align.horizontal = 'right'; 2559 } 2560 return align; 2561 } 2562 /** 2563 * Focuses the SplitButton component. 2564 */ 2565 focus() { 2566 if ((0,_progress_kendo_angular_common__WEBPACK_IMPORTED_MODULE_3__.isDocumentAvailable)()) { 2567 this.button.nativeElement.focus(); 2568 } 2569 } 2570 /** 2571 * Blurs the SplitButton component. 2572 */ 2573 blur() { 2574 if ((0,_progress_kendo_angular_common__WEBPACK_IMPORTED_MODULE_3__.isDocumentAvailable)()) { 2575 this.button.nativeElement.blur(); 2576 this.blurWrapper(); 2577 } 2578 } 2579 ngOnDestroy() { 2580 super.ngOnDestroy(); 2581 this.destroyPopup(); 2582 } 2583 /** 2584 * Toggles the visibility of the popup. 2585 * If the `toggle` method is used to open or close the popup, the `open` and `close` events will not be fired. 2586 * 2587 * @param open - The state of the popup. 2588 */ 2589 toggle(open) { 2590 if (this.disabled) { 2591 return; 2592 } 2593 tick(() => this._toggle(open === undefined ? !this._open : open)); 2594 } 2595 /** 2596 * Returns the current open state of the popup. 2597 */ 2598 get isOpen() { 2599 return this.openState; 2600 } 2601 enterHandler() { 2602 if (this.disabled) { 2603 return; 2604 } 2605 if (this.openState) { 2606 let focused = this.focusService.focused; 2607 if (isPresent(focused) && focused !== -1) { 2608 this.emitItemClickHandler(focused); 2609 } 2610 } 2611 else { 2612 this.buttonClick.emit(); 2613 } 2614 } 2615 updateButtonText() { 2616 if ((0,_progress_kendo_angular_common__WEBPACK_IMPORTED_MODULE_3__.isDocumentAvailable)()) { 2617 let innerText = this.wrapper.innerText 2618 .split('\n') 2619 .join('') 2620 .trim(); 2621 //setTimout is needed because of `Expression has changed after it was checked.` error; 2622 setTimeout(() => (this.buttonText = innerText), 0); 2623 } 2624 } 2625 get appendTo() { 2626 const { appendTo } = this.popupSettings; 2627 if (!appendTo || appendTo === 'root') { 2628 return undefined; 2629 } 2630 return appendTo === 'component' ? this.containerRef : appendTo; 2631 } 2632 _toggle(open) { 2633 this._open = open; 2634 this.destroyPopup(); 2635 if (this._open) { 2636 this.createPopup(); 2637 } 2638 } 2639 createPopup() { 2640 this.popupRef = this.popupService.open({ 2641 anchor: this.elRef, 2642 anchorAlign: this.anchorAlign, 2643 animate: this.popupSettings.animate, 2644 appendTo: this.appendTo, 2645 content: this.popupTemplate, 2646 popupAlign: this.popupAlign, 2647 popupClass: this.popupClasses 2648 }); 2649 this.popupRef.popupAnchorViewportLeave.subscribe(() => (this.openState = false)); 2650 this.popupRef.popupOpen.subscribe(this.focusFirstItem.bind(this)); 2651 } 2652 destroyPopup() { 2653 if (this.popupRef) { 2654 this.popupRef.close(); 2655 this.popupRef = null; 2656 } 2657 } 2658 handleClasses(value, input) { 2659 const elem = this.wrapperRef.nativeElement; 2660 const classes = getStylingClasses('button', input, this[input], value); 2661 if (classes.toRemove) { 2662 this.renderer.removeClass(elem, classes.toRemove); 2663 } 2664 if (classes.toAdd) { 2665 this.renderer.addClass(elem, classes.toAdd); 2666 } 2667 } 2668}; 2669SplitButtonComponent.ɵfac = function SplitButtonComponent_Factory(t) { return new (t || SplitButtonComponent)(_angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵdirectiveInject"](FocusService), _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵdirectiveInject"](NavigationService), _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵdirectiveInject"](_angular_core__WEBPACK_IMPORTED_MODULE_0__.ElementRef), _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵdirectiveInject"](_angular_core__WEBPACK_IMPORTED_MODULE_0__.NgZone), _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵdirectiveInject"](_progress_kendo_angular_popup__WEBPACK_IMPORTED_MODULE_10__.PopupService), _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵdirectiveInject"](_angular_core__WEBPACK_IMPORTED_MODULE_0__.ElementRef), _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵdirectiveInject"](_progress_kendo_angular_l10n__WEBPACK_IMPORTED_MODULE_4__.LocalizationService), _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵdirectiveInject"](_angular_core__WEBPACK_IMPORTED_MODULE_0__.ChangeDetectorRef), _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵdirectiveInject"](_angular_core__WEBPACK_IMPORTED_MODULE_0__.Renderer2)); }; 2670SplitButtonComponent.ɵcmp = /*@__PURE__*/ _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵdefineComponent"]({ type: SplitButtonComponent, selectors: [["kendo-splitbutton"]], contentQueries: function SplitButtonComponent_ContentQueries(rf, ctx, dirIndex) { if (rf & 1) { 2671 _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵcontentQuery"](dirIndex, ButtonItemTemplateDirective, 5); 2672 } if (rf & 2) { 2673 let _t; 2674 _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵqueryRefresh"](_t = _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵloadQuery"]()) && (ctx.itemTemplate = _t.first); 2675 } }, viewQuery: function SplitButtonComponent_Query(rf, ctx) { if (rf & 1) { 2676 _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵviewQuery"](_c3, 7); 2677 _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵviewQuery"](_c4, 7, _angular_core__WEBPACK_IMPORTED_MODULE_0__.ElementRef); 2678 _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵviewQuery"](_c5, 7); 2679 _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵviewQuery"](_c6, 7, _angular_core__WEBPACK_IMPORTED_MODULE_0__.ViewContainerRef); 2680 } if (rf & 2) { 2681 let _t; 2682 _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵqueryRefresh"](_t = _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵloadQuery"]()) && (ctx.button = _t.first); 2683 _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵqueryRefresh"](_t = _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵloadQuery"]()) && (ctx.arrowButton = _t.first); 2684 _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵqueryRefresh"](_t = _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵloadQuery"]()) && (ctx.popupTemplate = _t.first); 2685 _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵqueryRefresh"](_t = _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵloadQuery"]()) && (ctx.containerRef = _t.first); 2686 } }, hostVars: 7, hostBindings: function SplitButtonComponent_HostBindings(rf, ctx) { if (rf & 1) { 2687 _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵlistener"]("keydown", function SplitButtonComponent_keydown_HostBindingHandler($event) { return ctx.keydown($event); })("keypress", function SplitButtonComponent_keypress_HostBindingHandler($event) { return ctx.keypress($event); })("keyup", function SplitButtonComponent_keyup_HostBindingHandler($event) { return ctx.keyup($event); }); 2688 } if (rf & 2) { 2689 _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵattribute"]("dir", ctx.dir); 2690 _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵclassProp"]("k-focus", ctx.isFocused)("k-split-button", ctx.widgetClasses)("k-button-group", ctx.widgetClasses); 2691 } }, inputs: { text: "text", icon: "icon", iconClass: "iconClass", type: "type", imageUrl: "imageUrl", size: "size", themeColor: "themeColor", tabIndex: "tabIndex", arrowButtonIcon: "arrowButtonIcon", rounded: "rounded", fillMode: "fillMode", disabled: "disabled", popupSettings: "popupSettings", data: "data", textField: "textField", buttonClass: "buttonClass", arrowButtonClass: "arrowButtonClass" }, outputs: { buttonClick: "buttonClick", itemClick: "itemClick", onFocus: "focus", onBlur: "blur", open: "open", close: "close" }, exportAs: ["kendoSplitButton"], features: [_angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵProvidersFeature"]([ 2692 FocusService, 2693 NavigationService, 2694 NAVIGATION_SETTINGS_PROVIDER, 2695 _progress_kendo_angular_l10n__WEBPACK_IMPORTED_MODULE_4__.LocalizationService, 2696 { 2697 provide: _progress_kendo_angular_l10n__WEBPACK_IMPORTED_MODULE_4__.L10N_PREFIX, 2698 useValue: 'kendo.splitbutton' 2699 } 2700 ]), _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵInheritDefinitionFeature"], _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵNgOnChangesFeature"]], ngContentSelectors: _c9, decls: 12, vars: 32, consts: function () { let i18n_7; if (typeof ngI18nClosureMode !== "undefined" && ngI18nClosureMode) { 2701 /**
2702 * @desc The text for the SplitButton aria-label 2703 * @meaning kendo.splitbutton.splitButtonLabel 2704 */ 2705 const MSG_EXTERNAL_109169670915733361$$DIST_FESM2015_INDEX_JS_8 = goog.getMsg("{$interpolation}", { "interpolation": "\uFFFD0\uFFFD" }); 2706 i18n_7 = MSG_EXTERNAL_109169670915733361$$DIST_FESM2015_INDEX_JS_8; 2707 } 2708 else { 2709 i18n_7 = $localize `:kendo.splitbutton.splitButtonLabel|The text for the SplitButton aria-labelâee2d4273142c9694614c71170691ca688717ef31â109169670915733361:${"\uFFFD0\uFFFD"}:INTERPOLATION:`; 2710 } return [["kendoSplitButtonLocalizedMessages", "", 6, "splitButtonLabel"], ["splitButtonLabel", i18n_7], ["kendoButton", "", 3, "type", "tabindex", "disabled", "size", "rounded", "fillMode", "themeColor", "icon", "iconClass", "imageUrl", "ngClass", "focus", "click", "blur", "mousedown", "mouseup"], ["button", ""], ["class", "k-button-text", 4, "ngIf"], ["kendoButton", "", "type", "button", 3, "disabled", "icon", "size", "rounded", "fillMode", "themeColor", "tabindex", "ngClass", "click", "mousedown", "mouseup"], ["arrowButton", ""], ["popupTemplate", ""], ["container", ""], [1, "k-button-text"], [3, "id", "data", "textField", "itemTemplate", "size", "onItemClick", "keydown", "keypress", "keyup"]]; }, template: function SplitButtonComponent_Template(rf, ctx) { if (rf & 1) { 2711 _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵprojectionDef"](); 2712 _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵelementContainerStart"](0, 0); 2713 _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵi18nAttributes"](1, 1); 2714 _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵelementContainerEnd"](); 2715 _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵelementStart"](2, "button", 2, 3); 2716 _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵlistener"]("focus", function SplitButtonComponent_Template_button_focus_2_listener() { return ctx.onButtonFocus(); })("click", function SplitButtonComponent_Template_button_click_2_listener() { return ctx.onButtonClick(); })("blur", function SplitButtonComponent_Template_button_blur_2_listener() { return ctx.onButtonBlur(); })("mousedown", function SplitButtonComponent_Template_button_mousedown_2_listener() { return ctx.toggleButtonActiveState(true); })("mouseup", function SplitButtonComponent_Template_button_mouseup_2_listener() { return ctx.toggleButtonActiveState(false); }); 2717 _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵtemplate"](4, SplitButtonComponent_span_4_Template, 2, 1, "span", 4); 2718 _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵprojection"](5); 2719 _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵelementEnd"](); 2720 _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵelementStart"](6, "button", 5, 6); 2721 _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵlistener"]("click", function SplitButtonComponent_Template_button_click_6_listener() { return ctx.onArrowButtonClick(); })("mousedown", function SplitButtonComponent_Template_button_mousedown_6_listener() { return ctx.toggleArrowButtonActiveState(true); })("mouseup", function SplitButtonComponent_Template_button_mouseup_6_listener() { return ctx.toggleArrowButtonActiveState(false); }); 2722 _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵelementEnd"](); 2723 _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵtemplate"](8, SplitButtonComponent_ng_template_8_Template, 1, 6, "ng-template", null, 7, _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵtemplateRefExtractor"]); 2724 _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵelementContainer"](10, null, 8); 2725 } if (rf & 2) { 2726 _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵi18nExp"]("{buttonText} splitbutton"); 2727 _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵi18nApply"](1); 2728 _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵadvance"](2); 2729 _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵclassProp"]("k-active", ctx.active)("k-icon-button", !ctx.text && ctx.icon); 2730 _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵproperty"]("type", ctx.type)("tabindex", ctx.componentTabIndex)("disabled", ctx.disabled)("size", ctx.size)("roun
2730ded", ctx.rounded)("fillMode", ctx.fillMode)("themeColor", ctx.themeColor)("icon", ctx.icon)("iconClass", ctx.iconClass)("imageUrl", ctx.imageUrl)("ngClass", ctx.buttonClass); 2731 _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵattribute"]("aria-disabled", ctx.disabled)("aria-expanded", ctx.openState)("aria-haspopup", true)("aria-owns", ctx.listId)("aria-label", ctx.ariaLabel); 2732 _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵadvance"](2); 2733 _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵproperty"]("ngIf", ctx.text); 2734 _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵadvance"](2); 2735 _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵclassProp"]("k-active", ctx.activeArrow); 2736 _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵproperty"]("disabled", ctx.disabled)("icon", ctx.arrowButtonIcon)("size", ctx.size)("rounded", ctx.rounded)("fillMode", ctx.fillMode)("themeColor", ctx.fillMode ? ctx.themeColor : null)("tabindex", -1)("ngClass", ctx.arrowButtonClass); 2737 } }, directives: function () { return [LocalizedSplitButtonMessagesDirective, ButtonDirective, _angular_common__WEBPACK_IMPORTED_MODULE_6__.NgClass, _angular_common__WEBPACK_IMPORTED_MODULE_6__.NgIf, ListComponent]; }, encapsulation: 2 }); 2738(0,tslib__WEBPACK_IMPORTED_MODULE_5__.__decorate)([ 2739 (0,_angular_core__WEBPACK_IMPORTED_MODULE_0__.Input)(), 2740 (0,tslib__WEBPACK_IMPORTED_MODULE_5__.__metadata)("design:type", String) 2741], SplitButtonComponent.prototype, "text", void 0); 2742(0,tslib__WEBPACK_IMPORTED_MODULE_5__.__decorate)([ 2743 (0,_angular_core__WEBPACK_IMPORTED_MODULE_0__.Input)(), 2744 (0,tslib__WEBPACK_IMPORTED_MODULE_5__.__metadata)("design:type", String) 2745], SplitButtonComponent.prototype, "icon", void 0); 2746(0,tslib__WEBPACK_IMPORTED_MODULE_5__.__decorate)([ 2747 (0,_angular_core__WEBPACK_IMPORTED_MODULE_0__.Input)(), 2748 (0,tslib__WEBPACK_IMPORTED_MODULE_5__.__metadata)("design:type", String) 2749], SplitButtonComponent.prototype, "iconClass", void 0); 2750(0,tslib__WEBPACK_IMPORTED_MODULE_5__.__decorate)([ 2751 (0,_angular_core__WEBPACK_IMPORTED_MODULE_0__.Input)(), 2752 (0,tslib__WEBPACK_IMPORTED_MODULE_5__.__metadata)("design:type", String) 2753], SplitButtonComponent.prototype, "type", void 0); 2754(0,tslib__WEBPACK_IMPORTED_MODULE_5__.__decorate)([ 2755 (0,_angular_core__WEBPACK_IMPORTED_MODULE_0__.Input)(), 2756 (0,tslib__WEBPACK_IMPORTED_MODULE_5__.__metadata)("design:type", String) 2757], SplitButtonComponent.prototype, "imageUrl", void 0); 2758(0,tslib__WEBPACK_IMPORTED_MODULE_5__.__decorate)([ 2759 (0,_angular_core__WEBPACK_IMPORTED_MODULE_0__.Input)(), 2760 (0,tslib__WEBPACK_IMPORTED_MODULE_5__.__metadata)("design:type", String) 2761], SplitButtonComponent.prototype, "size", void 0); 2762(0,tslib__WEBPACK_IMPORTED_MODULE_5__.__decorate)([ 2763 (0,_angular_core__WEBPACK_IMPORTED_MODULE_0__.Input)(), 2764 (0,tslib__WEBPACK_IMPORTED_MODULE_5__.__metadata)("design:type", String), 2765 (0,tslib__WEBPACK_IMPORTED_MODULE_5__.__metadata)("design:paramtypes", [String]) 2766], SplitButtonComponent.prototype, "rounded", null); 2767(0,tslib__WEBPACK_IMPORTED_MODULE_5__.__decorate)([ 2768 (0,_angular_core__WEBPACK_IMPORTED_MODULE_0__.Input)(), 2769 (0,tslib__WEBPACK_IMPORTED_MODULE_5__.__metadata)("design:type", String), 2770 (0,tslib__WEBPACK_IMPORTED_MODULE_5__.__metadata)("design:paramtypes", [String]) 2771], SplitButtonComponent.prototype, "fillMode", null); 2772(0,tslib__WEBPACK_IMPORTED_MODULE_5__.__decorate)([ 2773 (0,_angular_core__WEBPACK_IMPORTED_MODULE_0__.Input)(), 2774 (0,tslib__WEBPACK_IMPORTED_MODULE_5__.__metadata)("design:type", String) 2775], SplitButtonComponent.prototype, "themeColor", void 0); 2776(0,tslib__WEBPACK_IMPORTED_MODULE_5__.__decorate)([ 2777 (0,_angular_core__WEBPACK_IMPORTED_MODULE_0__.Input)(), 2778 (0,tslib__WEBPACK_IMPORTED_MODULE_5__.__metadata)("design:type", Boolean), 2779 (0,tslib__WEBPACK_IMPORTED_MODULE_5__.__metadata)("design:paramtypes", [Boolean]) 2780], SplitButtonComponent.prototype, "disabled", null); 2781(0,tslib__WEBPACK_IMPORTED_MODULE_5__.__decorate)([ 2782 (0,_angular_core__WEBPACK_IMPORTED_MODULE_0__.Input)(), 2783 (0,tslib__WEBPACK_IMPORTED_MODULE_5__.__metadata)("design:type", Object), 2784 (0,tslib__WEBPACK_IMPORTED_MODULE_5__.__metadata)("design:paramtypes", [Object]) 2785], SplitButtonComponent.prototype, "popupSettings", null); 2786(0,tslib__WEBPACK_IMPORTED_MODULE_5__.__decorate)([ 2787 (0,_angular_core__WEBPACK_IMPORTED_MODULE_0__.Input)(), 2788 (0,tslib__WEBPACK_IMPORTED_MODULE_5__.__metadata)("design:type", Number) 2789], SplitButtonComponent.prototype, "tabIndex", void 0); 2790(0,tslib__WEBPACK_IMPORTED_MODULE_5__.__decorate)([ 2791 (0,_angular_core__WEBPACK_IMPORTED_MODULE_0__.Input)(), 2792 (0,tslib__WEBPACK_IMPORTED_MODULE_5__.__metadata)("design:type", String) 2793], SplitButtonComponent.prototype, "textField", void 0); 2794(0,tslib__WEBPACK_IMPORTED_MODULE_5__.__decorate)([ 2795 (0,_angular_core__WEBPACK_IMPORTED_MODULE_0__.Input)(), 2796 (0,tslib__WEBPACK_IMPORTED_MODULE_5__.__metadata)("design:type", Object), 2797 (0,tslib__WEBPACK_IMPORTED_MODULE_5__.__metadata)("design:paramtypes", [Object]) 2798], SplitButtonComponent.prototype, "data", null); 2799(0,tslib__WEBPACK_IMPORTED_MODULE_5__.__decorate)([ 2800 (0,_angular_core__WEBPACK_IMPORTED_MODULE_0__.Input)(), 2801 (0,tslib__WEBPACK_IMPORTED_MODULE_5__.__metadata)("design:type", Object) 2802], SplitButtonComponent.prototype, "buttonClass", void 0); 2803(0,tslib__WEBPACK_IMPORTED_MODULE_5__.__decorate)([ 2804 (0,_angular_core__WEBPACK_IMPORTED_MODULE_0__.Input)(), 2805 (0,tslib__WEBPACK_IMPORTED_MODULE_5__.__metadata)("design:type", Object) 2806], SplitButtonComponent.prototype, "arrowButtonClass", void 0); 2807(0,tslib__WEBPACK_IMPORTED_MODULE_5__.__decorate)([ 2808 (0,_angular_core__WEBPACK_IMPORTED_MODULE_0__.Input)(), 2809 (0,tslib__WEBPACK_IMPORTED_MODULE_5__.__metadata)("design:type", String) 2810], SplitButtonComponent.prototype, "arrowButtonIcon", void 0); 2811(0,tslib__WEBPACK_IMPORTED_MODULE_5__.__decorate)([ 2812 (0,_angular_core__WEBPACK_IMPORTED_MODULE_0__.Output)(), 2813 (0,tslib__WEBPACK_IMPORTED_MODULE_5__.__metadata)("design:type", _angular_core__WEBPACK_IMPORTED_MODULE_0__.EventEmitter) 2814], SplitButtonComponent.prototype, "buttonClick", void 0); 2815(0,tslib__WEBPACK_IMPORTED_MODULE_5__.__decorate)([ 2816 (0,_angular_core__WEBPACK_IMPORTED_MODULE_0__.Output)(), 2817 (0,tslib__WEBPACK_IMPORTED_MODULE_5__.__metadata)("design:type", _angular_core__WEBPACK_IMPORTED_MODULE_0__.EventEmitter) 2818], SplitButtonComponent.prototype, "itemClick", void 0); 2819(0,tslib__WEBPACK_IMPORTED_MODULE_5__.__decorate)([ 2820 (0,_angular_core__WEBPACK_IMPORTED_MODULE_0__.Output)('focus'), 2821 (0,tslib__WEBPACK_IMPORTED_MODULE_5__.__metadata)("design:type", _angular_core__WEBPACK_IMPORTED_MODULE_0__.EventEmitter) 2822], SplitButtonComponent.prototype, "onFocus", void 0); 2823(0,tslib__WEBPACK_IMPORTED_MODULE_5__.__decorate)([ 2824 (0,_angular_core__WEBPACK_IMPORTED_MODULE_0__.Output)('blur'), 2825 (0,tslib__WEBPACK_IMPORTED_MODULE_5__.__metadata)("design:type", _angular_core__WEBPACK_IMPORTED_MODULE_0__.EventEmitter) 2826], SplitButtonComponent.prototype, "onBlur", void 0); 2827(0,tslib__WEBPACK_IMPORTED_MODULE_5__.__decorate)([ 2828 (0,_angular_core__WEBPACK_IMPORTED_MODULE_0__.Output)(), 2829 (0,tslib__WEBPACK_IMPORTED_MODULE_5__.__metadata)("design:type", _angular_core__WEBPACK_IMPORTED_MODULE_0__.EventEmitter) 2830], SplitButtonComponent.prototype, "open", void 0); 2831(0,tslib__WEBPACK_IMPORTED_MODULE_5__.__decorate)([ 2832 (0,_angular_core__WEBPACK_IMPORTED_MODULE_0__.Output)(), 2833 (0,tslib__WEBPACK_IMPORTED_MODULE_5__.__metadata)("design:type", _angular_core__WEBPACK_IMPORTED_MODULE_0__.EventEmitter) 2834], SplitButtonComponent.prototype, "close", void 0); 2835(0,tslib__WEBPACK_IMPORTED_MODULE_5__.__decorate)([ 2836 (0,_angular_core__WEBPACK_IMPORTED_MODULE_0__.ContentChild)(ButtonItemTemplateDirective, { static: false }), 2837 (0,tslib__WEBPACK_IMPORTED_MODULE_5__.__metadata)("design:type", ButtonItemTemplateDirective) 2838], SplitButtonComponent.prototype, "itemTemplate", void 0); 2839(0,tslib__WEBPACK_IMPORTED_MODULE_5__.__decorate)([ 2840 (0,_angular_core__WEBPACK_IMPORTED_MODULE_0__.ViewChild)('button', { static: true }), 2841 (0,tslib__WEBPACK_IMPORTED_MODULE_5__.__metadata)("design:type", _angular_core__WEBPACK_IMPORTED_MODULE_0__.ElementRef) 2842], SplitButtonComponent.prototype, "button", void 0); 2843(0,tslib__WEBPACK_IMPORTED_MODULE_5__.__decorate)([ 2844 (0,_angular_core__WEBPACK_IMPORTED_MODULE_0__.ViewChild)('arrowButton', { static: true, read: _angular_core__WEBPACK_IMPORTED_MODULE_0__.ElementRef }), 2845 (0,tslib__WEBPACK_IMPORTED_MODULE_5__.__metadata)("design:type", _angular_core__WEBPACK_IMPORTED_MODULE_0__.ElementRef) 2846], SplitButtonComponent.prototype, "arrowButton", void 0); 2847(0,tslib__WEBPACK_IMPORTED_MODULE_5__.__decorate)([ 2848 (0,_angular_core__WEBPACK_IMPORTED_MODULE_0__.ViewChild)('popupTemplate', { static: true }), 2849 (0,tslib__WEBPACK_IMPORTED_MODULE_5__.__metadata)("design:type", _angular_core__WEBPACK_IMPORTED_MODULE_0__.TemplateRef) 2850], SplitButtonComponent.prototype, "popupTemplate", void 0); 2851(0,tslib__WEBPACK_IMPORTED_MODULE_5__.__decorate)([ 2852 (0,_angular_core__WEBPACK_IMPORTED_MODULE_0__.ViewChild)('container', { read: _angular_core__WEBPACK_IMPORTED_MODULE_0__.ViewContainerRef, static: true }), 2853 (0,tslib__WEBPACK_IMPORTED_MODULE_5__.__metadata)("design:type", _angular_core__WEBPACK_IMPORTED_MODULE_0__.ViewContainerRef) 2854], SplitButtonComponent.prototype, "containerRef", void 0); 2855(0,tslib__WEBPACK_IMPORTED_MODULE_5__.__decorate)([ 2856 (0,_angular_core__WEBPACK_IMPORTED_MODULE_0__.HostBinding)('class.k-focus'), 2857 (0,tslib__WEBPACK_IMPORTED_MODULE_5__.__metadata)("design:type", Boolean), 2858 (0,tslib__WEBPACK_IMPORTED_MODULE_5__.__metadata)("design:paramtypes", [Boolean]) 2859], SplitButtonComponent.prototype, "isFocused", null); 2860(0,tslib__WEBPACK_IMPORTED_MODULE_5__.__decorate)([ 2861 (0,_angular_core__WEBPACK_IMPORTED_MODULE_0__.HostBinding)('class.k-split-button'), 2862 (0,_angular_core__WEBPACK_IMPORTED_MODULE_0__.HostBinding)('class.k-button-group'), 2863 (0,tslib__WEBPACK_IMPORTED_MODULE_5__.__metadata)("design:type", Boolean), 2864 (0,tslib__WEBPACK_IMPORTED_MODULE_5__.__metadata)("design:paramtypes", []) 2865], SplitButtonComponent.prototype, "widgetClasses", null); 2866(0,tslib__WEBPACK_IMPORTED_MODULE_5__.__decorate)([ 2867 (0,_angular_core__WEBPACK_IMPORTED_MODULE_0__.HostBinding)('attr.dir'), 2868 (0,tslib__WEBPACK_IMPORTED_MODULE_5__.__metadata)("design:type", String), 2869 (0,tslib__WEBPACK_IMPORTED_MODULE_5__.__metadata)("design:paramtypes", []) 2870], SplitButtonComponent.prototype, "dir", null); 2871(0,tslib__WEBPACK_IMPORTED_MODULE_5__.__decorate)([ 2872 (0,_angular_core__WEBPACK_IMPORTED_MODULE_0__.HostListener)('keydown', ['$event']), 2873 (0,tslib__WEBPACK_IMPORTED_MODULE_5__.__metadata)("design:type", Function), 2874 (0,tslib__WEBPACK_IMPORTED_MODULE_5__.__metadata)("design:paramtypes", [Object]), 2875 (0,tslib__WEBPACK_IMPORTED_MODULE_5__.__metadata)("design:returntype", void 0) 2876], SplitButtonComponent.prototype, "keydown", null); 2877(0,tslib__WEBPACK_IMPORTED_MODULE_5__.__decorate)([ 2878 (0,_angular_core__WEBPACK_IMPORTED_MODULE_0__.HostListener)('keypress', ['$event']), 2879 (0,tslib__WEBPACK_IMPORTED_MODULE_5__.__metadata)("design:type", Function), 2880 (0,tslib__WEBPACK_IMPORTED_MODULE_5__.__metadata)("design:paramtypes", [Object]), 2881 (0,tslib__WEBPACK_IMPORTED_MODULE_5__.__metadata)("design:returntype", void 0) 2882], SplitButtonComponent.prototype, "keypress", null); 2883(0,tslib__WEBPACK_IMPORTED_MODULE_5__.__decorate)([ 2884 (0,_angular_core__WEBPACK_IMPORTED_MODULE_0__.HostListener)('keyup', ['$event']), 2885 (0,tslib__WEBPACK_IMPORTED_MODULE_5__.__metadata)("design:type", Function), 2886 (0,tslib__WEBPACK_IMPORTED_MODULE_5__.__metadata)("design:paramtypes", [Object]), 2887 (0,tslib__WEBPACK_IMPORTED_MODULE_5__.__metadata)("design:returntype", void 0) 2888], SplitButtonComponent.prototype, "keyup", null); 2889SplitButtonComponent = (0,tslib__WEBPACK_IMPORTED_MODULE_5__.__decorate)([ (0,tslib__WEBPACK_IMPORTED_MODULE_5__.__metadata)("design:paramtypes", [FocusService, 2890 NavigationService, 2891 _angular_core__WEBPACK_IMPORTED_MODULE_0__.ElementRef, 2892 _angular_core__WEBPACK_IMPORTED_MODULE_0__.NgZone, 2893 _progress_kendo_angular_popup__WEBPACK_IMPORTED_MODULE_10__.PopupService, 2894 _angular_core__WEBPACK_IMPORTED_MODULE_0__.ElementRef, 2895 _progress_kendo_angular_l10n__WEBPACK_IMPORTED_MODULE_4__.LocalizationService, 2896 _angular_core__WEBPACK_IMPORTED_MODULE_0__.ChangeDetectorRef, 2897 _angular_core__WEBPACK_IMPORTED_MODULE_0__.Renderer2]) 2898], SplitButtonComponent); 2899 2900/** 2901 * @hidden 2902 */ 2903class Messages extends _progress_kendo_angular_l10n__WEBPACK_IMPORTED_MODULE_4__.ComponentMessages { 2904} 2905Messages.ɵfac = /*@__PURE__*/ function () { let ɵMessages_BaseFactory; return function Messages_Factory(t) { return (ɵMessages_BaseFactory || (ɵMessages_BaseFactory = _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵgetInheritedFactory"](Messages)))(t || Messages); }; }(); 2906Messages.ɵdir = /*@__PURE__*/ _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵdefineDirective"]({ type: Messages, inputs: { splitButtonLabel: "splitButtonLabel" }, features: [_angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵInheritDefinitionFeature"]] }); 2907(0,tslib__WEBPACK_IMPORTED_MODULE_5__.__decorate)([ 2908 (0,_angular_core__WEBPACK_IMPORTED_MODULE_0__.Input)(), 2909 (0,tslib__WEBPACK_IMPORTED_MODULE_5__.__metadata)("design:type", String) 2910], Messages.prototype, "splitButtonLabel", void 0); 2911 2912var LocalizedSplitButtonMessagesDirective_1; 2913/** 2914 * @hidden 2915 */ 2916let LocalizedSplitButtonMessagesDirective = LocalizedSplitButtonMessagesDirective_1 = class LocalizedSplitButtonMessagesDirective extends Messages { 2917 constructor(service) { 2918 super(); 2919 this.service = service; 2920 } 2921}; 2922LocalizedSplitButtonMessagesDirective.ɵfac = function LocalizedSplitButtonMessagesDirective_Factory(t) { return new (t || LocalizedSplitButtonMessagesDirective)(_angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵdirectiveInject"](_progress_kendo_angular_l10n__WEBPACK_IMPORTED_MODULE_4__.LocalizationService)); }; 2923LocalizedSplitButtonMessagesDirective.ɵdir = /*@__PURE__*/ _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵdefineDirective"]({ type: LocalizedSplitButtonMessagesDirective, selectors: [["", "kendoSplitButtonLocalizedMessages", ""]], features: [_angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵProvidersFeature"]([ 2924 { 2925 provide: Messages, 2926 useExisting: (0,_angular_core__WEBPACK_IMPORTED_MODULE_0__.forwardRef)(() => LocalizedSplitButtonMessagesDirective_1) 2927 } 2928 ]), _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵInheritDefinitionFeature"]] }); 2929LocalizedSplitButtonMessagesDirective = LocalizedSplitButtonMessagesDirective_1 = (0,tslib__WEBPACK_IMPORTED_MODULE_5__.__decorate)([ (0,tslib__WEBPACK_IMPORTED_MODULE_5__.__metadata)("design:paramtypes", [_progress_kendo_angular_l10n__WEBPACK_IMPORTED_MODULE_4__.LocalizationService]) 2930], LocalizedSplitButtonMessagesDirective); 2931 2932var SplitButtonCustomMessagesComponent_1; 2933/** 2934 * Custom component messages override default component messages 2935 * ([see example]({% slug rtl_buttons %}). 2936 */ 2937let SplitButtonCustomMessagesComponent = SplitButtonCustomMessagesComponent_1 = class SplitButtonCustomMessagesComponent extends Messages { 2938 constructor(service) { 2939 super(); 2940 this.service = service; 2941 } 2942 get override() { 2943 return true; 2944 } 2945}; 2946SplitButtonCustomMessagesComponent.ɵfac = function SplitButtonCustomMessagesComponent_Factory(t) { return new (t || SplitButtonCustomMessagesComponent)(_angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵdirectiveInject"](_progress_kendo_angular_l10n__WEBPACK_IMPORTED_MODULE_4__.LocalizationService)); }; 2947SplitButtonCustomMessagesComponent.ɵcmp = /*@__PURE__*/ _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵdefineComponent"]({ type: SplitButtonCustomMessagesComponent, selectors: [["kendo-splitbutton-messages"]], features: [_angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵProvidersFeature"]([ 2948 { 2949 provide: Messages, 2950 useExisting: (0,_angular_core__WEBPACK_IMPORTED_MODULE_0__.forwardRef)(() => SplitButtonCustomMessagesComponent_1) 2951 } 2952 ]), _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵInheritDefinitionFeature"]], decls: 0, vars: 0, template: function SplitButtonCustomMessagesComponent_Template(rf, ctx) {
2952 }, encapsulation: 2 }); 2953SplitButtonCustomMessagesComponent = SplitButtonCustomMessagesComponent_1 = (0,tslib__WEBPACK_IMPORTED_MODULE_5__.__decorate)([ (0,tslib__WEBPACK_IMPORTED_MODULE_5__.__metadata)("design:paramtypes", [_progress_kendo_angular_l10n__WEBPACK_IMPORTED_MODULE_4__.LocalizationService]) 2954], SplitButtonCustomMessagesComponent); 2955 2956/** 2957 * @hidden 2958 * 2959 * The exported package module. 2960 * 2961 * The package exports: 2962 * - `SplitButtonComponent`—The SplitButtonComponent component class. 2963 */ 2964let SplitButtonModule = class SplitButtonModule { 2965}; 2966SplitButtonModule.ɵfac = function SplitButtonModule_Factory(t) { return new (t || SplitButtonModule)(); }; 2967SplitButtonModule.ɵmod = /*@__PURE__*/ _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵdefineNgModule"]({ type: SplitButtonModule }); 2968SplitButtonModule.ɵinj = /*@__PURE__*/ _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵdefineInjector"]({ imports: [[_angular_common__WEBPACK_IMPORTED_MODULE_6__.CommonModule, _progress_kendo_angular_popup__WEBPACK_IMPORTED_MODULE_10__.PopupModule, ButtonModule, ListModule], ListModule] }); 2969 2970const NAVIGATION_SETTINGS$1 = { 2971 useLeftRightArrows: true 2972}; 2973const ɵ0$1 = NAVIGATION_SETTINGS$1; 2974const NAVIGATION_SETTINGS_PROVIDER$1 = { 2975 provide: NAVIGATION_CONFIG, 2976 useValue: ɵ0$1 2977}; 2978/** 2979 * Represents the Kendo UI DropDownButton component for Angular. 2980 * 2981 * @example 2982 * ```ts 2983 * _@Component({ 2984 * selector: 'my-app', 2985 * template: ` 2986 * <kendo-dropdownbutton [data]="data"> 2987 * User Settings 2988 * </kendo-dropdownbutton> 2989 * ` 2990 * }) 2991 * class AppComponent { 2992 * public data: Array<any> = [{ 2993 * text: 'My Profile' 2994 * }, { 2995 * text: 'Friend Requests' 2996 * }, { 2997 * text: 'Account Settings' 2998 * }, { 2999 * text: 'Support' 3000 * }, { 3001 * text: 'Log Out' 3002 * }]; 3003 * } 3004 * ``` 3005 */ 3006let DropDownButtonComponent = class DropDownButtonComponent extends ListButton { 3007 constructor(focusService, navigationService, wrapperRef, zone, popupService, elRef, localization, cdr) { 3008 super(focusService, navigationService, wrapperRef, zone, localization, cdr); 3009 this.popupService = popupService; 3010 this.elRef = elRef; 3011 /** 3012 * Defines the name of an existing icon in a Kendo UI theme. 3013 */ 3014 this.icon = ''; 3015 /** 3016 * Defines the list of CSS classes which are used for styling the Button with custom icons. 3017 */ 3018 this.iconClass = ''; 3019 /** 3020 * Defines a URL for styling the button with a custom image. 3021 */ 3022 this.imageUrl = ''; 3023 /** 3024 * The size property specifies the padding of the DropDownButton 3025 * ([see example]({% slug api_buttons_dropdownbuttoncomponent %}#toc-size)). 3026 * 3027 * The possible values are: 3028 * * `'small'` 3029 * * `'medium'` (default) 3030 * * `'large'` 3031 * * `null` 3032 */ 3033 this.size = 'medium'; 3034 /** 3035 * The shape property specifies if the DropDownButton will be a square or rectangle. 3036 * ([see example]({% slug api_buttons_dropdownbuttoncomponent %}#toc-shape)). 3037 * 3038 * The possible values are: 3039 * * `'rectangle'` (default) 3040 * * `'square'` 3041 * * `null` 3042 */ 3043 this.shape = 'rectangle'; 3044 /** 3045 * The rounded property specifies the border radius of the DropDownButton 3046 * ([see example]({% slug api_buttons_dropdownbuttoncomponent %}#toc-rounded)). 3047 * 3048 * The possible values are: 3049 * * `'small'` 3050 * * `'medium'` (default) 3051 * * `'large'` 3052 * * `'full'` 3053 * * `null` 3054 */ 3055 this.rounded = 'medium'; 3056 /** 3057 * The DropDownButton allows you to specify predefined theme colors. 3058 * The theme color will be applied as a background and border color while also amending the text color accordingly 3059 * ([see example]({% slug api_buttons_dropdownbuttoncomponent %}#toc-themeColor)). 3060 * 3061 * The possible values are: 3062 * * `base` —Applies coloring based on the `base` theme color. (default) 3063 * * `primary` —Applies coloring based on the `primary` theme color. 3064 * * `secondary`—Applies coloring based on the `secondary` theme color. 3065 * * `tertiary`— Applies coloring based on the `tertiary` theme color. 3066 * * `info`—Applies coloring based on the `info` theme color. 3067 * * `success`— Applies coloring based on the `success` theme color. 3068 * * `warning`— Applies coloring based on the `warning` theme color. 3069 * * `error`— Applies coloring based on the `error` theme color. 3070 * * `dark`— Applies coloring based on the `dark` theme color. 3071 * * `light`— Applies coloring based on the `light` theme color. 3072 * * `inverse`— Applies coloring based on the `inverse` theme color. 3073 * * `null` —Removes the default CSS class (no class would be rendered). 3074 */ 3075 this.themeColor = 'base'; 3076 /** 3077 * Specifies the [`tabIndex`](https://developer.mozilla.org/en-US/docs/Web/HTML/Global_attributes/tabindex) of the component. 3078 */ 3079 this.tabIndex = 0; 3080 /** 3081 * Fires each time the user clicks on a drop-down list item. The event data contains the data item bound to the clicked list item. 3082 */ 3083 this.itemClick = new _angular_core__WEBPACK_IMPORTED_MODULE_0__.EventEmitter(); 3084 /** 3085 * Fires each time the popup is about to open. 3086 * This event is preventable. If you cancel the event, the popup will remain closed. 3087 */ 3088 this.open = new _angular_core__WEBPACK_IMPORTED_MODULE_0__.EventEmitter(); 3089 /** 3090 * Fires each time the popup is about to close. 3091 * This event is preventable. If you cancel the event, the popup will remain open. 3092 */ 3093 this.close = new _angular_core__WEBPACK_IMPORTED_MODULE_0__.EventEmitter(); 3094 /**
3095 * Fires each time the DropDownButton gets focused. 3096 */ 3097 this.onFocus = new _angular_core__WEBPACK_IMPORTED_MODULE_0__.EventEmitter(); //tslint:disable-line:no-output-rename 3098 /** 3099 * Fires each time the DropDownButton gets blurred. 3100 */ 3101 this.onBlur = new _angular_core__WEBPACK_IMPORTED_MODULE_0__.EventEmitter(); //tslint:disable-line:no-output-rename 3102 this.listId = (0,_progress_kendo_angular_common__WEBPACK_IMPORTED_MODULE_3__.guid)(); 3103 this._fillMode = 'solid'; 3104 this._itemClick = this.itemClick; 3105 this._blur = this.onBlur; 3106 } 3107 /** 3108 * Configures the popup of the DropDownButton. 3109 * 3110 * The available options are: 3111 * - `animate: Boolean`—Controls the popup animation. By default, the open and close animations are enabled. 3112 * - `popupClass: String`—Specifies a list of CSS classes that are used to style the popup. 3113 * - `appendTo: "root" | "component" | ViewContainerRef`—Specifies the component to which the popup will be appended. 3114 * - `align: "left" | "center" | "right"`—Specifies the alignment of the popup. 3115 */ 3116 set popupSettings(settings) { 3117 this._popupSettings = Object.assign({ animate: true, popupClass: '' }, settings); 3118 } 3119 get popupSettings() { 3120 return this._popupSettings; 3121 } 3122 /** 3123 * Sets the disabled state of the DropDownButton. 3124 */ 3125 set disabled(value) { 3126 if (value && this.openState) { 3127 this.openState = false; 3128 } 3129 this._disabled = value; 3130 } 3131 get disabled() { 3132 return this._disabled; 3133 } 3134 /** 3135 * Sets or gets the data of the DropDownButton. 3136 * 3137 * > The data has to be provided in an array-like list. 3138 */ 3139 set data(data) { 3140 this._data = data || []; 3141 } 3142 get data() { 3143 return this._data; 3144 } 3145 /** 3146 * The fillMode property specifies the background and border styles of the DropDownButton 3147 * ([see example]({% slug api_buttons_dropdownbuttoncomponent %}#toc-fillMode)). 3148 * 3149 * The available values are: 3150 * * `solid` (default) 3151 * * `flat` 3152 * * `outline` 3153 * * `link` 3154 * * `null` 3155 */ 3156 set fillMode(fillMode) { 3157 this._fillMode = fillMode === 'clear' ? 'flat' : fillMode; 3158 } 3159 get fillMode() { 3160 return this._fillMode; 3161 } 3162 /** 3163 * @hidden 3164 */ 3165 set openState(open) { 3166 if (this.disabled) { 3167 return; 3168 } 3169 const eventArgs = new PreventableEvent(); 3170 if (open) { 3171 this.open.emit(eventArgs); 3172 } 3173 else { 3174 this.close.emit(eventArgs); 3175 } 3176 if (eventArgs.isDefaultPrevented()) { 3177 return; 3178 } 3179 this._toggle(open); 3180 } 3181 /** 3182 * @hidden 3183 */ 3184 get openState() { 3185 return this._open; 3186 } 3187 /** 3188 * @hidden 3189 */ 3190 get componentTabIndex() { 3191 return this.disabled ? (-1) : this.tabIndex; 3192 } 3193 get appendTo() { 3194 const { appendTo } = this.popupSettings; 3195 if (!appendTo || appendTo === 'root') { 3196 return undefined; 3197 } 3198 return appendTo === 'component' ? this.container : appendTo; 3199 } 3200 get focused() { 3201 return this._isFocused && !this._disabled; 3202 } 3203 get widgetClasses() { 3204 return true; 3205 } 3206 get dir() { 3207 return this.direction; 3208 } 3209 /** 3210 * @hidden 3211 */ 3212 get active() { 3213 return this._active; 3214 } 3215 /** 3216 * @hidden 3217 */ 3218 keydown(event) { 3219 this.keyDownHandler(event); 3220 if (event.keyCode === _progress_kendo_angular_common__WEBPACK_IMPORTED_MODULE_3__.Keys.Space) { 3221 this._active = true; 3222 } 3223 } 3224 /** 3225 * @hidden 3226 */ 3227 keypress(event) { 3228 this.keyPressHandler(event); 3229 } 3230 /** 3231 * @hidden 3232 */ 3233 keyup(event) { 3234 this.keyUpHandler(event); 3235 this._active = false; 3236 } 3237 /** 3238 * @hidden 3239 */ 3240 mousedown(event) { 3241 if (this._disabled) { 3242 event.preventDefault(); 3243 } 3244 this._active = true; 3245 } 3246 /** 3247 * @hidden 3248 */ 3249 mouseup(event) { 3250 if (this._disabled) { 3251 event.preventDefault(); 3252 } 3253 this._active = false;
3254 } 3255 /** 3256 * @hidden 3257 */ 3258 openPopup() { 3259 this.togglePopupVisibility(); 3260 } 3261 /** 3262 * @hidden 3263 */ 3264 onButtonBlur() { 3265 if (!this.isOpen) { 3266 this.blurWrapper(); 3267 } 3268 } 3269 /** 3270 * @hidden 3271 */ 3272 get anchorAlign() { 3273 let align = { horizontal: this.popupSettings.align || 'left', vertical: 'bottom' }; 3274 if (this.direction === 'rtl' && !isPresent(this.popupSettings.align)) { 3275 align.horizontal = 'right'; 3276 } 3277 return align; 3278 } 3279 /** 3280 * @hidden 3281 */ 3282 get popupAlign() { 3283 let align = { horizontal: this.popupSettings.align || 'left', vertical: 'top' }; 3284 if (this.direction === 'rtl' && !isPresent(this.popupSettings.align)) { 3285 align.horizontal = 'right'; 3286 } 3287 return align; 3288 } 3289 /** 3290 * Focuses the DropDownButton component. 3291 */ 3292 focus() { 3293 if ((0,_progress_kendo_angular_common__WEBPACK_IMPORTED_MODULE_3__.isDocumentAvailable)()) { 3294 this.button.nativeElement.focus(); 3295 } 3296 } 3297 /** 3298 * Blurs the DropDownButton component. 3299 */ 3300 blur() { 3301 if ((0,_progress_kendo_angular_common__WEBPACK_IMPORTED_MODULE_3__.isDocumentAvailable)()) { 3302 this.button.nativeElement.blur(); 3303 this.blurWrapper(); 3304 } 3305 } 3306 ngOnChanges(changes) { 3307 if ((0,_progress_kendo_angular_common__WEBPACK_IMPORTED_MODULE_3__.isChanged)("popupSettings", changes) && isPresent(this.popupRef)) { 3308 const popup = this.popupRef.popup.instance; 3309 const newSettings = changes.popupSettings.currentValue; 3310 popup.popupClass = newSettings.popupClass; 3311 popup.animate = newSettings.animate; 3312 popup.popupAlign = this.popupAlign; 3313 } 3314 } 3315 ngOnDestroy() { 3316 super.ngOnDestroy(); 3317 this.destroyPopup(); 3318 } 3319 /** 3320 * Toggles the visibility of the popup. 3321 * If the `toggle` method is used to open or close the popup, the `open` and `close` events will not be fired. 3322 * 3323 * @param open - The state of the popup. 3324 */ 3325 toggle(open) { 3326 if (this.disabled) { 3327 return; 3328 } 3329 tick(() => (this._toggle((open === undefined) ? !this._open : open))); 3330 } 3331 /** 3332 * Returns the current open state of the popup. 3333 */ 3334 get isOpen() { 3335 return this.openState; 3336 } 3337 /** 3338 * @hidden 3339 */ 3340 handleFocus() { 3341 if (!this._disabled && !this._isFocused) { 3342 this._isFocused = true; 3343 this.onFocus.emit(); 3344 } 3345 } 3346 /** 3347 * @hidden 3348 */ 3349 wrapperContains(element) { 3350 return this.wrapper === element 3351 || this.wrapper.contains(element) 3352 || (this.popupRef && this.popupRef.popupElement.contains(element)); 3353 } 3354 subscribeNavigationEvents() { 3355 this.navigationSubscription = this.navigationService.navigate 3356 .subscribe(this.onArrowKeyNavigate.bind(this)); 3357 this.enterUpSubscription = this.navigationService.enterup.subscribe(this.onNavigationEnterUp.bind(this)); 3358 this.openSubscription = this.navigationService.open.subscribe(this.onNavigationOpen.bind(this)); 3359 this.closeSubscription = (0,rxjs__WEBPACK_IMPORTED_MODULE_9__.merge)(this.navigationService.close, this.navigationService.esc).subscribe(this.onNavigationClose.bind(this)); 3360 } 3361 onNavigationEnterUp() { 3362 if (!this._disabled && !this.openState) { 3363 this._active = false; 3364 } 3365 if (this.openState) { 3366 let focused = this.focusService.focused; 3367 if (isPresent(focused) && focused !== -1) { 3368 this.emitItemClickHandler(focused); 3369 } 3370 } 3371 this.togglePopupVisibility(); 3372 if (!this.openState && (0,_progress_kendo_angular_common__WEBPACK_IMPORTED_MODULE_3__.isDocumentAvailable)()) { 3373 this.button.nativeElement.focus(); 3374 } 3375 } 3376 onNavigationOpen() { 3377 if (!this._disabled && !this.openState) { 3378 this.togglePopupVisibility(); 3379 } 3380 } 3381 onNavigationClose() { 3382 if (this.openState) { 3383 this.togglePopupVisibility(); 3384 if ((0,_progress_kendo_angular_common__WEBPACK_IMPORTED_MODULE_3__.isDocumentAvailable)()) { 3385 this.button.nativeElement.focus(); 3386 } 3387 } 3388 } 3389 onArrowKeyNavigate(index) { 3390 this.focusService.focus(index); 3391 } 3392 _toggle(open) { 3393 if (this._open === open) { 3394 return; 3395 } 3396 this._open = open; 3397 this.destroyPopup(); 3398 if (this._open) { 3399 this.createPopup(); 3400 } 3401 } 3402 createPopup() { 3403 this.popupRef = this.popupService.open({ 3404 anchor: this.elRef, 3405 anchorAlign: this.anchorAlign, 3406 animate: this.popupSettings.animate, 3407 appendTo: this.appendTo, 3408 content: this.popupTemplate, 3409 popupAlign: this.popupAlign, 3410 popupClass: this.popupClasses 3411 }); 3412 this.popupRef.popupAnchorViewportLeave.subscribe(() => this.openState = false); 3413 this.popupRef.popupOpen.subscribe(this.focusFirstItem.bind(this)); 3414 } 3415 destroyPopup() { 3416 if (this.popupRef) { 3417 this.popupRef.close(); 3418 this.popupRef = null; 3419 } 3420 } 3421}; 3422DropDownButtonComponent.ɵfac = function DropDownButtonComponent_Factory(t) { return new (t || DropDownButtonComponent)(_angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵdirectiveInject"](FocusService), _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵdirectiveInject"](NavigationService), _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵdirectiveInject"](_angular_core__WEBPACK_IMPORTED_MODULE_0__.ElementRef), _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵdirectiveInject"](_angular_core__WEBPACK_IMPORTED_MODULE_0__.NgZone), _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵdirectiveInject"](_progress_kendo_angular_popup__WEBPACK_IMPORTED_MODULE_10__.PopupService), _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵdirectiveInject"](_angular_core__WEBPACK_IMPORTED_MODULE_0__.ElementRef), _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵdirectiveInject"](_progress_kendo_angular_l10n__WEBPACK_IMPORTED_MODULE_4__.LocalizationService), _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵdirectiveInject"](_angular_core__WEBPACK_IMPORTED_MODULE_0__.ChangeDetectorRef)); }; 3423DropDownButtonComponent.ɵcmp = /*@__PURE__*/ _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵdefineComponent"]({ type: DropDownButtonComponent, selectors: [["kendo-dropdownbutton"]], contentQueries: function DropDownButtonComponent_ContentQueries(rf, ctx, dirIndex) { if (rf & 1) { 3424 _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵcontentQuery"](dirIndex, ButtonItemTemplateDirective, 5); 3425 } if (rf & 2) { 3426 let _t; 3427 _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵqueryRefresh"](_t = _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵloadQuery"]()) && (ctx.itemTemplate = _t.first); 3428 } }, viewQuery: function DropDownButtonComponent_Query(rf, ctx) { if (rf & 1) { 3429 _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵviewQuery"](_c3, 7); 3430 _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵviewQuery"](_c10, 5); 3431 _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵviewQuery"](_c5, 7); 3432 _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵviewQuery"](_c6, 7, _angular_core__WEBPACK_IMPORTED_MODULE_0__.ViewContainerRef); 3433 } if (rf & 2) { 3434 let _t; 3435 _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵqueryRefresh"](_t = _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵloadQuery"]()) && (ctx.button = _t.first); 3436 _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵqueryRefresh"](_t = _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵloadQuery"]()) && (ctx.buttonList = _t.first); 3437 _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵqueryRefresh"](_t = _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵloadQuery"]()) && (ctx.popupTemplate = _t.first); 3438 _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵqueryRefresh"](_t = _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵloadQuery"]()) && (ctx.container = _t.first); 3439 } }, hostVars: 5, hostBindings: function DropDownButtonComponent_HostBindings(rf, ctx) { if (rf & 1) { 3440 _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵlistener"]("keydown", function DropDownButtonComponent_keydown_HostBindingHandler($event) { return ctx.keydown($event); })("keypress", function DropDownButtonComponent_keypress_HostBindingHandler($event) { return ctx.keypress($event); })("keyup", function DropDownButtonComponent_keyup_HostBindingHandler($event) { return ctx.keyup($event); })("mousedown", function DropDownButtonComponent_mousedown_HostBindingHandler($event) { return ctx.mousedown($event); })("mouseup", function DropDownButtonComponent_mouseup_HostBindingHandler($event) { return ctx.mouseup($event); }); 3441 } if (rf & 2) { 3442 _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵattribute"]("dir", ctx.dir); 3443 _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵclassProp"]("k-focus", ctx.focused)("k-dropdown-button", ctx.widgetClasses); 3444 } }, inputs: { icon: "icon", iconClass: "iconClass", imageUrl: "imageUrl", size: "size", shape: "shape", rounded: "rounded", themeColor: "themeColor", tabIndex: "tabIndex", popupSettings: "popupSettings", disabled: "disabled", data: "data", fillMode: "fillMode", textField: "textField", buttonClass: "buttonClass" }, outputs: { itemClick: "itemClick", open: "open", close: "close", onFocus: "focus", onBlur: "blur" }, exportAs: ["kendoDropDownButton"], features: [_angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵProvidersFeature"]([ 3445 FocusService, 3446 NavigationService, 3447 NAVIGATION_SETTINGS_PROVIDER$1, 3448 _progress_kendo_angular_l10n__WEBPACK_IMPORTED_MODULE_4__.LocalizationService, 3449 { 3450 provide: _progress_kendo_angular_l10n__WEBPACK_IMPORTED_MODULE_4__.L10N_PREFIX, 3451 useValue: 'kendo.dropdownbutton' 3452 } 3453 ]), _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵInheritDefinitionFeature"], _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵNgOnChangesFeature"]], ngContentSelectors: _c9, decls: 7, vars: 17, consts: [["kendoButton", "", "role", "menu", "type", "button", 3, "tabindex", "disabled", "icon", "iconClass", "imageUrl", "ngClass", "size", "shape", "rounded", "fillMode", "themeColor", "click", "focus", "blur"], ["button", ""], ["popupTemplate", ""], ["container", ""], [3, "id", "data", "textField", "itemTemplate", "size", "onItemClick", "keydown", "keypress", "keyup"], ["buttonList", ""]], template: function DropDownButtonComponent_Template(rf, ctx) { if (rf & 1) { 3454 _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵprojectionDef"](); 3455 _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵelementStart"](0, "button", 0, 1); 3456 _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵlistener"]("click", function DropDownButtonComponent_Template_button_click_0_listener() { return ctx.openPopup(); })("focus", function DropDownButtonComponent_Template_button_focus_0_listener() { return ctx.handleFocus(); })("blur", function DropDownButtonComponent_Template_button_blur_0_listener() { return ctx.onButtonBlur(); }); 3457 _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵprojection"](2); 3458 _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵelementEnd"](); 3459 _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵtemplate"](3, DropDownButtonComponent_ng_template_3_Template, 2, 6, "ng-template", null, 2, _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵtemplateRefExtractor"]); 3460 _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵelementContainer"](5, null, 3); 3461 } if (rf & 2) { 3462 _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵclassProp"]("k-active", ctx.active); 3463 _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵproperty"]("tabindex", ctx.componentTabIndex)("disabled", ctx.disabled)("icon", ctx.icon)("iconClass", ctx.iconClass)("imageUrl", ctx.imageUrl)("ngClass", ctx.buttonClass)("size", ctx.size)("shape", ctx.shape)("rounded", ctx.rounded)("fillMode", ctx.fillMode)("themeColor", ctx.fillMode ? ctx.themeColor : null); 3464 _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵattribute"]("aria-disabled", ctx.disabled)("aria-expanded", ctx.openState)("aria-haspopup", true)("aria-owns", ctx.listId); 3465 } }, directives: [ButtonDirective, _angular_common__WEBPACK_IMPORTED_MODULE_6__.NgClass, ListComponent], encapsulation: 2 }); 3466(0,tslib__WEBPACK_IMPORTED_MODULE_5__.__decorate)([ 3467 (0,_angular_core__WEBPACK_IMPORTED_MODULE_0__.Input)(), 3468 (0,tslib__WEBPACK_IMPORTED_MODULE_5__.__metadata)("design:type", String) 3469], DropDownButtonComponent.prototype, "icon", void 0); 3470(0,tslib__WEBPACK_IMPORTED_MODULE_5__.__decorate)([ 3471 (0,_angular_core__WEBPACK_IMPORTED_MODULE_0__.Input)(), 3472 (0,tslib__WEBPACK_IMPORTED_MODULE_5__.__metadata)("design:type", String) 3473], DropDownButtonComponent.prototype, "iconClass", void 0); 3474(0,tslib__WEBPACK_IMPORTED_MODULE_5__.__decorate)([ 3475 (0,_angular_core__WEBPACK_IMPORTED_MODULE_0__.Input)(), 3476 (0,tslib__WEBPACK_IMPORTED_MODULE_5__.__metadata)("design:type", String) 3477], DropDownButtonComponent.prototype, "imageUrl", void 0); 3478(0,tslib__WEBPACK_IMPORTED_MODULE_5__.__decorate)([ 3479 (0,_angular_core__WEBPACK_IMPORTED_MODULE_0__.Input)(), 3480 (0,tslib__WEBPACK_IMPORTED_MODULE_5__.__metadata)("design:type", Object), 3481 (0,tslib__WEBPACK_IMPORTED_MODULE_5__.__metadata)("design:paramtypes", [Object]) 3482], DropDownButtonComponent.prototype, "popupSettings", null); 3483(0,tslib__WEBPACK_IMPORTED_MODULE_5__.__decorate)([ 3484 (0,_angular_core__WEBPACK_IMPORTED_MODULE_0__.Input)(), 3485 (0,tslib__WEBPACK_IMPORTED_MODULE_5__.__metadata)("design:type", String) 3486], DropDownButtonComponent.prototype, "textField", void 0); 3487(0,tslib__WEBPACK_IMPORTED_MODULE_5__.__decorate)([ 3488 (0,_angular_core__WEBPACK_IMPORTED_MODULE_0__.Input)(), 3489 (0,tslib__WEBPACK_IMPORTED_MODULE_5__.__metadata)("design:type", Boolean), 3490 (0,tslib__WEBPACK_IMPORTED_MODULE_5__.__metadata)("design:paramtypes", [Boolean]) 3491], DropDownButtonComponent.prototype, "disabled", null); 3492(0,tslib__WEBPACK_IMPORTED_MODULE_5__.__decorate)([ 3493 (0,_angular_core__WEBPACK_IMPORTED_MODULE_0__.Input)(), 3494 (0,tslib__WEBPACK_IMPORTED_MODULE_5__.__metadata)("design:type", Object), 3495 (0,tslib__WEBPACK_IMPORTED_MODULE_5__.__metadata)("design:paramtypes", [Object]) 3496], DropDownButtonComponent.prototype, "data", null); 3497(0,tslib__WEBPACK_IMPORTED_MODULE_5__.__decorate)([ 3498 (0,_angular_core__WEBPACK_IMPORTED_MODULE_0__.Input)(), 3499 (0,tslib__WEBPACK_IMPORTED_MODULE_5__.__metadata)("design:type", String) 3500], DropDownButtonComponent.prototype, "size", void 0); 3501(0,tslib__WEBPACK_IMPORTED_MODULE_5__.__decorate)([ 3502 (0,_angular_core__WEBPACK_IMPORTED_MODULE_0__.Input)(), 3503 (0,tslib__WEBPACK_IMPORTED_MODULE_5__.__metadata)("design:type", String) 3504], DropDownButtonComponent.prototype, "shape", void 0); 3505(0,tslib__WEBPACK_IMPORTED_MODULE_5__.__decorate)([ 3506 (0,_angular_core__WEBPACK_IMPORTED_MODULE_0__.Input)(), 3507 (0,tslib__WEBPACK_IMPORTED_MODULE_5__.__metadata)("design:type", String) 3508], DropDownButtonComponent.prototype, "rounded", void 0); 3509(0,tslib__WEBPACK_IMPORTED_MODULE_5__.__decorate)([ 3510 (0,_angular_core__WEBPACK_IMPORTED_MODULE_0__.Input)(), 3511 (0,tslib__WEBPACK_IMPORTED_MODULE_5__.__metadata)("design:type", String), 3512 (0,tslib__WEBPACK_IMPORTED_MODULE_5__.__metadata)("design:paramtypes", [String]) 3513], DropDownButtonComponent.prototype, "fillMode", null); 3514(0,tslib__WEBPACK_IMPORTED_MODULE_5__.__decorate)([ 3515 (0,_angular_core__WEBPACK_IMPORTED_MODULE_0__.Input)(), 3516 (0,tslib__WEBPACK_IMPORTED_MODULE_5__.__metadata)("design:type", String) 3517], DropDownButtonComponent.prototype, "themeColor", void 0); 3518(0,tslib__WEBPACK_IMPORTED_MODULE_5__.__decorate)([ 3519 (0,_angular_core__WEBPACK_IMPORTED_MODULE_0__.Input)(), 3520 (0,tslib__WEBPACK_IMPORTED_MODULE_5__.__metadata)("design:type", Object) 3521], DropDownButtonComponent.prototype, "buttonClass", void 0); 3522(0,tslib__WEBPACK_IMPORTED_MODULE_5__.__decorate)([ 3523 (0,_angular_core__WEBPACK_IMPORTED_MODULE_0__.Input)(), 3524 (0,tslib__WEBPACK_IMPORTED_MODULE_5__.__metadata)("design:type", Number) 3525], DropDownButtonComponent.prototype, "tabIndex", void 0); 3526(0,tslib__WEBPACK_IMPORTED_MODULE_5__.__dec
3526orate)([ 3527 (0,_angular_core__WEBPACK_IMPORTED_MODULE_0__.Output)(), 3528 (0,tslib__WEBPACK_IMPORTED_MODULE_5__.__metadata)("design:type", _angular_core__WEBPACK_IMPORTED_MODULE_0__.EventEmitter) 3529], DropDownButtonComponent.prototype, "itemClick", void 0); 3530(0,tslib__WEBPACK_IMPORTED_MODULE_5__.__decorate)([ 3531 (0,_angular_core__WEBPACK_IMPORTED_MODULE_0__.Output)(), 3532 (0,tslib__WEBPACK_IMPORTED_MODULE_5__.__metadata)("design:type", _angular_core__WEBPACK_IMPORTED_MODULE_0__.EventEmitter) 3533], DropDownButtonComponent.prototype, "open", void 0); 3534(0,tslib__WEBPACK_IMPORTED_MODULE_5__.__decorate)([ 3535 (0,_angular_core__WEBPACK_IMPORTED_MODULE_0__.Output)(), 3536 (0,tslib__WEBPACK_IMPORTED_MODULE_5__.__metadata)("design:type", _angular_core__WEBPACK_IMPORTED_MODULE_0__.EventEmitter) 3537], DropDownButtonComponent.prototype, "close", void 0); 3538(0,tslib__WEBPACK_IMPORTED_MODULE_5__.__decorate)([ 3539 (0,_angular_core__WEBPACK_IMPORTED_MODULE_0__.Output)('focus'), 3540 (0,tslib__WEBPACK_IMPORTED_MODULE_5__.__metadata)("design:type", _angular_core__WEBPACK_IMPORTED_MODULE_0__.EventEmitter) 3541], DropDownButtonComponent.prototype, "onFocus", void 0); 3542(0,tslib__WEBPACK_IMPORTED_MODULE_5__.__decorate)([ 3543 (0,_angular_core__WEBPACK_IMPORTED_MODULE_0__.Output)('blur'), 3544 (0,tslib__WEBPACK_IMPORTED_MODULE_5__.__metadata)("design:type", _angular_core__WEBPACK_IMPORTED_MODULE_0__.EventEmitter) 3545], DropDownButtonComponent.prototype, "onBlur", void 0); 3546(0,tslib__WEBPACK_IMPORTED_MODULE_5__.__decorate)([ 3547 (0,_angular_core__WEBPACK_IMPORTED_MODULE_0__.HostBinding)('class.k-focus'), 3548 (0,tslib__WEBPACK_IMPORTED_MODULE_5__.__metadata)("design:type", Boolean), 3549 (0,tslib__WEBPACK_IMPORTED_MODULE_5__.__metadata)("design:paramtypes", []) 3550], DropDownButtonComponent.prototype, "focused", null); 3551(0,tslib__WEBPACK_IMPORTED_MODULE_5__.__decorate)([ 3552 (0,_angular_core__WEBPACK_IMPORTED_MODULE_0__.HostBinding)('class.k-dropdown-button'), 3553 (0,tslib__WEBPACK_IMPORTED_MODULE_5__.__metadata)("design:type", Boolean), 3554 (0,tslib__WEBPACK_IMPORTED_MODULE_5__.__metadata)("design:paramtypes", []) 3555], DropDownButtonComponent.prototype, "widgetClasses", null); 3556(0,tslib__WEBPACK_IMPORTED_MODULE_5__.__decorate)([ 3557 (0,_angular_core__WEBPACK_IMPORTED_MODULE_0__.HostBinding)('attr.dir'), 3558 (0,tslib__WEBPACK_IMPORTED_MODULE_5__.__metadata)("design:type", String), 3559 (0,tslib__WEBPACK_IMPORTED_MODULE_5__.__metadata)("design:paramtypes", []) 3560], DropDownButtonComponent.prototype, "dir", null); 3561(0,tslib__WEBPACK_IMPORTED_MODULE_5__.__decorate)([ 3562 (0,_angular_core__WEBPACK_IMPORTED_MODULE_0__.ContentChild)(ButtonItemTemplateDirective, { static: false }), 3563 (0,tslib__WEBPACK_IMPORTED_MODULE_5__.__metadata)("design:type", ButtonItemTemplateDirective) 3564], DropDownButtonComponent.prototype, "itemTemplate", void 0); 3565(0,tslib__WEBPACK_IMPORTED_MODULE_5__.__decorate)([ 3566 (0,_angular_core__WEBPACK_IMPORTED_MODULE_0__.ViewChild)('button', { static: true }), 3567 (0,tslib__WEBPACK_IMPORTED_MODULE_5__.__metadata)("design:type", _angular_core__WEBPACK_IMPORTED_MODULE_0__.ElementRef) 3568], DropDownButtonComponent.prototype, "button", void 0); 3569(0,tslib__WEBPACK_IMPORTED_MODULE_5__.__decorate)([ 3570 (0,_angular_core__WEBPACK_IMPORTED_MODULE_0__.ViewChild)('buttonList', { static: false }), 3571 (0,tslib__WEBPACK_IMPORTED_MODULE_5__.__metadata)("design:type", ListComponent) 3572], DropDownButtonComponent.prototype, "buttonList", void 0); 3573(0,tslib__WEBPACK_IMPORTED_MODULE_5__.__decorate)([ 3574 (0,_angular_core__WEBPACK_IMPORTED_MODULE_0__.ViewChild)('popupTemplate', { static: true }), 3575 (0,tslib__WEBPACK_IMPORTED_MODULE_5__.__metadata)("design:type", _angular_core__WEBPACK_IMPORTED_MODULE_0__.TemplateRef) 3576], DropDownButtonComponent.prototype, "popupTemplate", void 0); 3577(0,tslib__WEBPACK_IMPORTED_MODULE_5__.__decorate)([ 3578 (0,_angular_core__WEBPACK_IMPORTED_MODULE_0__.ViewChild)('container', { read: _angular_core__WEBPACK_IMPORTED_MODULE_0__.ViewContainerRef, static: true }), 3579 (0,tslib__WEBPACK_IMPORTED_MODULE_5__.__metadata)("design:type", _angular_core__WEBPACK_IMPORTED_MODULE_0__.ViewContainerRef) 3580], DropDownButtonComponent.prototype, "container", void 0); 3581(0,tslib__WEBPACK_IMPORTED_MODULE_5__.__decorate)([ 3582 (0,_angular_core__WEBPACK_IMPORTED_MODULE_0__.HostListener)('keydown', ['$event']), 3583 (0,tslib__WEBPACK_IMPORTED_MODULE_5__.__metadata)("design:type", Function), 3584 (0,tslib__WEBPACK_IMPORTED_MODULE_5__.__metadata)("design:paramtypes", [Object]), 3585 (0,tslib__WEBPACK_IMPORTED_MODULE_5__.__metadata)("design:returntype", void 0) 3586], DropDownButtonComponent.prototype, "keydown", null); 3587(0,tslib__WEBPACK_IMPORTED_MODULE_5__.__decorate)([ 3588 (0,_angular_core__WEBPACK_IMPORTED_MODULE_0__.HostListener)('keypress', ['$event']), 3589 (0,tslib__WEBPACK_IMPORTED_MODULE_5__.__metadata)("design:type", Function), 3590 (0,tslib__WEBPACK_IMPORTED_MODULE_5__.__metadata)("design:paramtypes", [Object]), 3591 (0,tslib__WEBPACK_IMPORTED_MODULE_5__.__metadata)("design:returntype", void 0) 3592], DropDownButtonComponent.prototype, "keypress", null); 3593(0,tslib__WEBPACK_IMPORTED_MODULE_5__.__decorate)([ 3594 (0,_angular_core__WEBPACK_IMPORTED_MODULE_0__.HostListener)('keyup', ['$event']), 3595 (0,tslib__WEBPACK_IMPORTED_MODULE_5__.__metadata)("design:type", Function), 3596 (0,tslib__WEBPACK_IMPORTED_MODULE_5__.__metadata)("design:paramtypes", [Object]), 3597 (0,tslib__WEBPACK_IMPORTED_MODULE_5__.__metadata)("design:returntype", void 0) 3598], DropDownButtonComponent.prototype, "keyup", null); 3599(0,tslib__WEBPACK_IMPORTED_MODULE_5__.__decorate)([ 3600 (0,_angular_core__WEBPACK_IMPORTED_MODULE_0__.HostListener)('mousedown', ['$event']), 3601 (0,tslib__WEBPACK_IMPORTED_MODULE_5__.__metadata)("design:type", Function), 3602 (0,tslib__WEBPACK_IMPORTED_MODULE_5__.__metadata)("design:paramtypes", [Object]), 3603 (0,tslib__WEBPACK_IMPORTED_MODULE_5__.__metadata)("design:returntype", void 0) 3604], DropDownButtonComponent.prototype, "mousedown", null); 3605(0,tslib__WEBPACK_IMPORTED_MODULE_5__.__decorate)([ 3606 (0,_angular_core__WEBPACK_IMPORTED_MODULE_0__.HostListener)('mouseup', ['$event']), 3607 (0,tslib__WEBPACK_IMPORTED_MODULE_5__.__metadata)("design:type", Function), 3608 (0,tslib__WEBPACK_IMPORTED_MODULE_5__.__metadata)("design:paramtypes", [Object]), 3609 (0,tslib__WEBPACK_IMPORTED_MODULE_5__.__metadata)("design:returntype", void 0) 3610], DropDownButtonComponent.prototype, "mouseup", null); 3611DropDownButtonComponent = (0,tslib__WEBPACK_IMPORTED_MODULE_5__.__decorate)([ (0,tslib__WEBPACK_IMPORTED_MODULE_5__.__metadata)("design:paramtypes", [FocusService, 3612 NavigationService, 3613 _angular_core__WEBPACK_IMPORTED_MODULE_0__.ElementRef, 3614 _angular_core__WEBPACK_IMPORTED_MODULE_0__.NgZone, 3615 _progress_kendo_angular_popup__WEBPACK_IMPORTED_MODULE_10__.PopupService, 3616 _angular_core__WEBPACK_IMPORTED_MODULE_0__.ElementRef, 3617 _progress_kendo_angular_l10n__WEBPACK_IMPORTED_MODULE_4__.LocalizationService, 3618 _angular_core__WEBPACK_IMPORTED_MODULE_0__.ChangeDetectorRef]) 3619], DropDownButtonComponent); 3620 3621/** 3622 * @hidden 3623 * 3624 * The exported package module. 3625 * 3626 * The package exports: 3627 * - `DropDownButtonComponent`—The DropDownButtonComponent component class. 3628 */ 3629let DropDownButtonModule = class DropDownButtonModule { 3630}; 3631DropDownButtonModule.ɵfac = function DropDownButtonModule_Factory(t) { return new (t || DropDownButtonModule)(); }; 3632DropDownButtonModule.ɵmod = /*@__PURE__*/ _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵdefineNgModule"]({ type: DropDownButtonModule }); 3633DropDownButtonModule.ɵinj = /*@__PURE__*/ _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵdefineInjector"]({ imports: [[_angular_common__WEBPACK_IMPORTED_MODULE_6__.CommonModule, _progress_kendo_angular_popup__WEBPACK_IMPORTED_MODULE_10__.PopupModule, ListModule, ButtonModule], ListModule] }); 3634 3635/** 3636 * Displays a Chip that represents an input, attribute or an action. 3637 */ 3638let ChipComponent = class ChipComponent { 3639 constructor(element, renderer, ngZone, localizationService) { 3640 this.element = element; 3641 this.renderer = renderer; 3642 this.ngZone = ngZone; 3643 this.localizationService = localizationService; 3644 /** 3645 * Specifies the selected state of the Chip. 3646 * @default false 3647 */ 3648 this.selected = false;
3649 /** 3650 * Specifies if the Chip will be removable or not. 3651 * If the property is set to `true`, the Chip renders a remove icon. 3652 * @default false 3653 */ 3654 this.removable = false; 3655 /** 3656 * If set to `true`, the Chip will be disabled. 3657 * @default false 3658 */ 3659 this.disabled = false; 3660 /** 3661 * Fires each time the user clicks the remove icon of the Chip. 3662 */ 3663 this.remove = new _angular_core__WEBPACK_IMPORTED_MODULE_0__.EventEmitter(); 3664 /** 3665 * Fires each time the user clicks the content of the Chip. 3666 */ 3667 this.contentClick = new _angular_core__WEBPACK_IMPORTED_MODULE_0__.EventEmitter(); 3668 this.tabIndex = 0; 3669 this.hostClass = true; 3670 this._size = 'medium'; 3671 this._rounded = 'medium'; 3672 this._fillMode = 'solid'; 3673 this._themeColor = 'base'; 3674 this.focused = false; 3675 (0,_progress_kendo_licensing__WEBPACK_IMPORTED_MODULE_2__.validatePackage)(packageMetadata); 3676 this.direction = localizationService.rtl ? 'rtl' : 'ltr'; 3677 } 3678 /** 3679 * The size property specifies the padding of the Chip 3680 * ([see example]({% slug appearance_chip %}#toc-size)). 3681 * 3682 * The possible values are: 3683 * * `'small'` 3684 * * `'medium'` (default) 3685 * * `'large'` 3686 * * `null` 3687 */ 3688 set size(size) { 3689 this.handleClasses(size, 'size'); 3690 this._size = size; 3691 } 3692 get size() { 3693 return this._size; 3694 } 3695 /** 3696 * The rounded property specifies the border radius of the Chip 3697 * ([see example]({% slug appearance_chip %}#toc-rounded)). 3698 * 3699 * The possible values are: 3700 * * `'small'` 3701 * * `'medium'` (default) 3702 * * `'large'` 3703 * * `'full'` 3704 * * `null` 3705 */ 3706 set rounded(rounded) { 3707 this.handleClasses(rounded, 'rounded'); 3708 this._rounded = rounded; 3709 } 3710 get rounded() { 3711 return this._rounded; 3712 } 3713 /** 3714 * The fillMode property specifies the background and border styles of the Chip 3715 * ([see example]({% slug appearance_chip %}#toc-fillMode)). 3716 * 3717 * The possible values are: 3718 * * `'solid'` (default) 3719 * * `'outline'` 3720 * * `null` 3721 */ 3722 set fillMode(fillMode) { 3723 this.handleClasses(fillMode, 'fillMode'); 3724 this._fillMode = fillMode; 3725 } 3726 get fillMode() { 3727 return this._fillMode; 3728 } 3729 /** 3730 * The Chip allows you to specify predefined theme colors. 3731 * The theme color will be applied as a background and border color while also amending the text color accordingly 3732 * ([see example]({% slug appearance_chip %}#toc-themeColor)). 3733 * 3734 * The possible values are: 3735 * * `'base'` (default) 3736 * * `'info'` 3737 * * `'success'` 3738 * * `'warning'` 3739 * * `'error'`
3740 * * `null` 3741 */ 3742 set themeColor(themeColor) { 3743 this.handleThemeColor(themeColor); 3744 this._themeColor = themeColor; 3745 } 3746 get themeColor() { 3747 return this._themeColor; 3748 } 3749 get ariaChecked() { 3750 return this.selected; 3751 } 3752 get hasIconClass() { 3753 return this.icon || this.iconClass || this.avatarClass ? true : false; 3754 } 3755 get disabledClass() { 3756 return this.disabled; 3757 } 3758 get selectedClass() { 3759 return this.selected; 3760 } 3761 get focusedClass() { 3762 return this.focused; 3763 } 3764 ngOnInit() { 3765 this.dynamicRTLSubscription = this.localizationService.changes 3766 .subscribe(({ rtl }) => this.direction = rtl ? 'rtl' : 'ltr'); 3767 } 3768 ngOnDestroy() { 3769 if (this.dynamicRTLSubscription) { 3770 this.dynamicRTLSubscription.unsubscribe(); 3771 } 3772 if (this.detachDomEvents) { 3773 this.detachDomEvents(); 3774 } 3775 } 3776 ngAfterViewInit() { 3777 const chip = this.element.nativeElement; 3778 const stylingOptions = ['size', 'rounded', 'fillMode']; 3779 stylingOptions.forEach(input => { 3780 this.handleClasses(this[input], input); 3781 }); 3782 this.attachElementEventHandlers(chip); 3783 } 3784 /** 3785 * @hidden 3786 */ 3787 get kendoIconClass() { 3788 this.verifyIconSettings([this.iconClass, this.avatarClass]); 3789 return `k-i-${this.icon}`; 3790 } 3791 /** 3792 * @hidden 3793 */ 3794 get customIconClass() { 3795 this.verifyIconSettings([this.icon, this.avatarClass]); 3796 return `${this.iconClass}`; 3797 } 3798 /** 3799 * @hidden 3800 */ 3801 get chipAvatarClass() { 3802 this.verifyIconSettings([this.icon, this.iconClass]); 3803 return `${this.avatarClass}`; 3804 } 3805 /** 3806 * @hidden 3807 */ 3808 get removeIconClass() { 3809 if (this.removeIcon) { 3810 return `${this.removeIcon}`; 3811 } 3812 return `k-i-close-circle`; 3813 } 3814 /** 3815 * Focuses the Chip component. 3816 */ 3817 focus() { 3818 if ((0,_progress_kendo_angular_common__WEBPACK_IMPORTED_MODULE_3__.isDocumentAvailable)()) { 3819 this.element.nativeElement.focus(); 3820 } 3821 } 3822 /** 3823 * Blurs the Chip component. 3824 */ 3825 blur() { 3826 if ((0,_progress_kendo_angular_common__WEBPACK_IMPORTED_MODULE_3__.isDocumentAvailable)()) { 3827 this.element.nativeElement.blur(); 3828 } 3829 } 3830 /** 3831 * @hidden 3832 */ 3833 onRemoveClick(e) { 3834 if (this.removable) { 3835 this.remove.emit({ sender: this, originalEvent: e }); 3836 } 3837 } 3838 attachElementEventHandlers(chip) { 3839 this.ngZone.runOutsideAngular(() => { 3840 const focusListener = this.renderer.listen(chip, 'focus', () => { 3841 this.renderer.addClass(chip, 'k-focus'); 3842 }); 3843 const blurListener = this.renderer.listen(chip, 'blur', () => { 3844 this.renderer.removeClass(chip, 'k-focus'); 3845 }); 3846 const contentClickListener = this.renderer.listen(chip, 'click', (e) => { 3847 const isRemoveClicked = closest(e.target, '.k-chip-remove-action'); 3848 if (!isRemoveClicked) { 3849 this.ngZone.run(() => { 3850 this.contentClick.emit({ sender: this, originalEvent: e }); 3851 }); 3852 } 3853 }); 3854 this.detachDomEvents = () => { 3855 focusListener(); 3856 blurListener(); 3857 contentClickListener(); 3858 }; 3859 }); 3860 } 3861 /** 3862 * @hidden 3863 */ 3864 verifyIconSettings(iconsToCheck) { 3865 if ((0,_angular_core__WEBPACK_IMPORTED_MODULE_0__.isDevMode)()) { 3866 if (iconsToCheck.filter(icon => icon !== null && icon !== undefined).length > 0) { 3867 this.renderer.removeClass(this.element.nativeElement, 'k-chip-has-icon'); 3868 throw new Error('Invalid configuration: Having multiple icons is not supported. Only a single icon on a chip can be displayed.'); 3869 } 3870 } 3871 } 3872 handleClasses(value, input) { 3873 const elem = this.element.nativeElement; 3874 const classes = getStylingClasses('chip', input, this[input], value); 3875 if (input === 'fillMode') { 3876 this.handleThemeColor(this.themeColor, this[input], value); 3877 } 3878 if (classes.toRemove) { 3879 this.renderer.removeClass(elem, classes.toRemove); 3880 } 3881 if (classes.toAdd) { 3882 this.renderer.addClass(elem, classes.toAdd); 3883 } 3884 } 3885 handleThemeColor(value, prevFillMode, fillMode) { 3886 const elem = this.element.nativeElement; 3887 const removeFillMode = prevFillMode ? prevFillMode : this.fillMode; 3888 const addFillMode = fillMode ? fillMode : this.fillMode;
3889 const themeColorClass = getThemeColorClasses('chip', removeFillMode, addFillMode, this.themeColor, value); 3890 this.renderer.removeClass(elem, themeColorClass.toRemove); 3891 if (addFillMode !== null && fillMode !== null) { 3892 if (themeColorClass.toAdd) { 3893 this.renderer.addClass(elem, themeColorClass.toAdd); 3894 } 3895 } 3896 } 3897}; 3898ChipComponent.ɵfac = function ChipComponent_Factory(t) { return new (t || ChipComponent)(_angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵdirectiveInject"](_angular_core__WEBPACK_IMPORTED_MODULE_0__.ElementRef), _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵdirectiveInject"](_angular_core__WEBPACK_IMPORTED_MODULE_0__.Renderer2), _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵdirectiveInject"](_angular_core__WEBPACK_IMPORTED_MODULE_0__.NgZone), _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵdirectiveInject"](_progress_kendo_angular_l10n__WEBPACK_IMPORTED_MODULE_4__.LocalizationService)); }; 3899ChipComponent.ɵcmp = /*@__PURE__*/ _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵdefineComponent"]({ type: ChipComponent, selectors: [["kendo-chip"]], hostVars: 14, hostBindings: function ChipComponent_HostBindings(rf, ctx) { if (rf & 2) { 3900 _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵattribute"]("tabindex", ctx.tabIndex)("dir", ctx.direction)("aria-checked", ctx.ariaChecked)("aria-disabled", ctx.disabledClass); 3901 _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵclassProp"]("k-chip", ctx.hostClass)("k-chip-has-icon", ctx.hasIconClass)("k-disabled", ctx.disabledClass)("k-selected", ctx.selectedClass)("k-focus", ctx.focusedClass); 3902 } }, inputs: { selected: "selected", removable: "removable", disabled: "disabled", size: "size", rounded: "rounded", fillMode: "fillMode", themeColor: "themeColor", label: "label", icon: "icon", iconClass: "iconClass", avatarClass: "avatarClass", removeIcon: "removeIcon" }, outputs: { remove: "remove", contentClick: "contentClick" }, features: [_angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵProvidersFeature"]([ 3903 _progress_kendo_angular_l10n__WEBPACK_IMPORTED_MODULE_4__.LocalizationService, 3904 { 3905 provide: _progress_kendo_angular_l10n__WEBPACK_IMPORTED_MODULE_4__.L10N_PREFIX, 3906 useValue: 'kendo.chip' 3907 } 3908 ])], ngContentSelectors: _c9, decls: 8, vars: 6, consts: [["class", "k-chip-icon k-icon", 3, "ngClass", 4, "ngIf"], ["class", "k-chip-icon", 3, "ngClass", 4, "ngIf"], ["class", "k-chip-avatar k-avatar k-rounded-full", 4, "ngIf"], [1, "k-chip-content"], ["class", "k-chip-label", 4, "ngIf"], [4, "ngIf"], [1, "k-chip-actions"], ["class", "k-chip-action k-chip-remove-action", 3, "click", 4, "ngIf"], [1, "k-chip-icon", "k-icon", 3, "ngClass"], [1, "k-chip-icon", 3, "ngClass"], [1, "k-chip-avatar", "k-avatar", "k-rounded-full"], [1, "k-avatar-image", 3, "ngClass"], [1, "k-chip-label"], [1, "k-chip-action", "k-chip-remove-action", 3, "click"], [1, "k-icon", 3, "ngClass"]], template: function ChipComponent_Template(rf, ctx) { if (rf & 1) { 3909 _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵprojectionDef"](); 3910 _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵtemplate"](0, ChipComponent_span_0_Template, 1, 1, "span", 0); 3911 _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵtemplate"](1, ChipComponent_span_1_Template, 1, 1, "span", 1); 3912 _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵtemplate"](2, ChipComponent_span_2_Template, 2, 1, "span", 2); 3913 _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵelementStart"](3, "span", 3); 3914 _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵtemplate"](4, ChipComponent_span_4_Template, 2, 1, "span", 4); 3915 _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵtemplate"](5, ChipComponent_ng_content_5_Template, 1, 0, "ng-content", 5); 3916 _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵelementEnd"](); 3917 _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵelementStart"](6, "span", 6); 3918 _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵtemplate"](7, ChipComponent_span_7_Template, 2, 1, "span", 7); 3919 _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵelementEnd"](); 3920 } if (rf & 2) { 3921 _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵproperty"]("ngIf", ctx.icon); 3922 _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵadvance"](1); 3923 _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵproperty"]("ngIf", ctx.iconClass); 3924 _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵadvance"](1); 3925 _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵproperty"]("ngIf", ctx.avatarClass); 3926 _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵadvance"](2); 3927 _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵproperty"]("ngIf", ctx.label); 3928 _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵadvance"](1); 3929 _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵproperty"]("ngIf", !ctx.label); 3930 _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵadvance"](2); 3931 _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵproperty"]("ngIf", ctx.removable); 3932 } }, directives: [_angular_common__WEBPACK_IMPORTED_MODULE_6__.NgIf, _angular_common__WEBPACK_IMPORTED_MODULE_6__.NgClass], encapsulation: 2 }); 3933(0,tslib__WEBPACK_IMPORTED_MODULE_5__.__decorate)([ 3934 (0,_angular_core__WEBPACK_IMPORTED_MODULE_0__.Input)(), 3935 (0,tslib__WEBPACK_IMPORTED_MODULE_5__.__metadata)("design:type", String) 3936], ChipComponent.prototype, "label", void 0); 3937(0,tslib__WEBPACK_IMPORTED_MODULE_5__.__decorate)([ 3938 (0,_angular_core__WEBPACK_IMPORTED_MODULE_0__.Input)(), 3939 (0,tslib__WEBPACK_IMPORTED_MODULE_5__.__metadata)("design:type", String) 3940], ChipComponent.prototype, "icon", void 0); 3941(0,tslib__WEBPACK_IMPORTED_MODULE_5__.__decorate)([ 3942 (0,_angular_core__WEBPACK_IMPORTED_MODULE_0__.Input)(), 3943 (0,tslib__WEBPACK_IMPORTED_MODULE_5__.__metadata)("design:type", String) 3944], ChipComponent.prototype, "iconClass", void 0); 3945(0,tslib__WEBPACK_IMPORTED_MODULE_5__.__decorate)([ 3946 (0,_angular_core__WEBPACK_IMPORTED_MODULE_0__.Input)(), 3947 (0,tslib__WEBPACK_IMPORTED_MODULE_5__.__metadata)("design:type", String) 3948], ChipComponent.prototype, "avatarClass", void 0); 3949(0,tslib__WEBPACK_IMPORTED_MODULE_5__.__decorate)([ 3950 (0,_angular_core__WEBPACK_IMPORTED_MODULE_0__.Input)(), 3951 (0,tslib__WEBPACK_IMPORTED_MODULE_5__.__metadata)("design:type", Boolean) 3952], ChipComponent.prototype, "selected", void 0); 3953(0,tslib__WEBPACK_IMPORTED_MODULE_5__.__decorate)([ 3954 (0,_angular_core__WEBPACK_IMPORTED_MODULE_0__.Input)(), 3955 (0,tslib__WEBPACK_IMPORTED_MODULE_5__.__metadata)("design:type", Boolean) 3956], ChipComponent.prototype, "removable", void 0); 3957(0,tslib__WEBPACK_IMPORTED_MODULE_5__.__decorate)([ 3958 (0,_angular_core__WEBPACK_IMPORTED_MODULE_0__.Input)(), 3959 (0,tslib__WEBPACK_IMPORTED_MODULE_5__.__metadata)("design:type", String) 3960], ChipComponent.prototype, "removeIcon", void 0); 3961(0,tslib__WEBPACK_IMPORTED_MODULE_5__.__decorate)([ 3962 (0,_angular_core__WEBPACK_IMPORTED_MODULE_0__.Input)(), 3963 (0,tslib__WEBPACK_IMPORTED_MODULE_5__.__metadata)("design:type", Boolean) 3964], ChipComponent.prototype, "disabled", void 0); 3965(0,tslib__WEBPACK_IMPORTED_MODULE_5__.__decorate)([ 3966 (0,_angular_core__WEBPACK_IMPORTED_MODULE_0__.Input)(), 3967 (0,tslib__WEBPACK_IMPORTED_MODULE_5__.__metadata)("design:type", String), 3968 (0,tslib__WEBPACK_IMPORTED_MODULE_5__.__metadata)("design:paramtypes", [String]) 3969], ChipComponent.prototype, "size", null); 3970(0,tslib__WEBPACK_IMPORTED_MODULE_5__.__decorate)([ 3971 (0,_angular_core__WEBPACK_IMPORTED_MODULE_0__.Input)(), 3972 (0,tslib__WEBPACK_IMPORTED_MODULE_5__.__metadata)("design:type", String), 3973 (0,tslib__WEBPACK_IMPORTED_MODULE_5__.__metadata)("design:paramtypes", [String]) 3974], ChipComponent.prototype, "rounded", null); 3975(0,tslib__WEBPACK_IMPORTED_MODULE_5__.__decorate)([ 3976 (0,_angular_core__WEBPACK_IMPORTED_MODULE_0__.Input)(), 3977 (0,tslib__WEBPACK_IMPORTED_MODULE_5__.__metadata)("design:type", String), 3978 (0,tslib__WEBPACK_IMPORTED_MODULE_5__.__metadata)("design:paramtypes", [String]) 3979], ChipComponent.prototype, "fillMode", null); 3980(0,tslib__WEBPACK_IMPORTED_MODULE_5__.__decorate)([ 3981 (0,_angular_core__WEBPACK_IMPORTED_MODULE_0__.Input)(), 3982 (0,tslib__WEBPACK_IMPORTED_MODULE_5__.__metadata)("design:type", String), 3983 (0,tslib__WEBPACK_IMPORTED_MODULE_5__.__metadata)("design:paramtypes", [String]) 3984], ChipComponent.prototype, "themeColor", null); 3985(0,tslib__WEBPACK_IMPORTED_MODULE_5__.__decorate)([ 3986 (0,_angular_core__WEBPACK_IMPORTED_MODULE_0__.Output)(), 3987 (0,tslib__WEBPACK_IMPORTED_MODULE_5__.__metadata)("design:type", _angular_core__WEBPACK_IMPORTED_MODULE_0__.EventEmitter) 3988], ChipComponent.prototype, "remove", void 0); 3989(0,tslib__WEBPACK_IMPORTED_MODULE_5__.__decorate)([ 3990 (0,_angular_core__WEBPACK_IMPORTED_MODULE_0__.Output)(), 3991 (0,tslib__WEBPACK_IMPORTED_MODULE_5__.__metadata)("design:type", _angular_core__WEBPACK_IMPORTED_MODULE_0__.EventEmitter) 3992], ChipComponent.prototype, "contentClick", void 0); 3993(0,tslib__WEBPACK_IMPORTED_MODULE_5__.__decorate)([ 3994 (0,_angular_core__WEBPACK_IMPORTED_MODULE_0__.HostBinding)('attr.tabindex'), 3995 (0,tslib__WEBPACK_IMPORTED_MODULE_5__.__metadata)("design:type", Number) 3996], ChipComponent.prototype, "tabIndex", void 0); 3997(0,tslib__WEBPACK_IMPORTED_MODULE_5__.__decorate)([ 3998 (0,_angular_core__WEBPACK_IMPORTED_MODULE_0__.HostBinding)('attr.aria-checked'), 3999 (0,tslib__WEBPACK_IMPORTED_MODULE_5__.__metadata)("design:type", Boolean), 4000 (0,tslib__WEBPACK_IMPORTED_MODULE_5__.__metadata)("design:paramtypes", []) 4001], ChipComponent.prototype, "ariaChecked", null); 4002(0,tslib__WEBPACK_IMPORTED_MODULE_5__.__decorate)([ 4003 (0,_angular_core__WEBPACK_IMPORTED_MODULE_0__.HostBinding)('class.k-chip'), 4004 (0,tslib__WEBPACK_IMPORTED_MODULE_5__.__metadata)("design:type", Boolean) 4005], ChipComponent.prototype, "hostClass", void 0); 4006(0,tslib__WEBPACK_IMPORTED_MODULE_5__.__decorate)([ 4007 (0,_angular_core__WEBPACK_IMPORTED_MODULE_0__.HostBinding)('class.k-chip-has-icon'), 4008 (0,tslib__WEBPACK_IMPORTED_MODULE_5__.__metadata)("design:type", Boolean), 4009 (0,tslib__WEBPACK_IMPORTED_MODULE_5__.__metadata)("design:paramtypes", []) 4010], ChipComponent.prototype, "hasIconClass", null); 4011(0,tslib__WEBPACK_IMPORTED_MODULE_5__.__decorate)([ 4012 (0,_angular_core__WEBPACK_IMPORTED_MODULE_0__.HostBinding)('attr.aria-disabled'), 4013 (0,_angular_core__WEBPACK_IMPORTED_MODULE_0__.HostBinding)('class.k-disabled'), 4014 (0,tslib__WEBPACK_IMPORTED_MODULE_5__.__metadata)("design:type", Boolean), 4015 (0,tslib__WEBPACK_IMPORTED_MODULE_5__.__metadata)("design:paramtypes", []) 4016], ChipComponent.prototype, "disabledClass", null); 4017(0,tslib__WEBPACK_IMPORTED_MODULE_5__.__decorate)([ 4018 (0,_angular_core__WEBPACK_IMPORTED_MODULE_0__.HostBinding)('class.k-selected'), 4019 (0,tslib__WEBPACK_IMPORTED_MODULE_5__.__metadata)("design:type", Boolean), 4020 (0,tslib__WEBPACK_IMPORTED_MODULE_5__.__metadata)("design:paramtypes", []) 4021], ChipComponent.prototype, "selectedClass", null); 4022(0,tslib__WEBPACK_IMPORTED_MODULE_5__.__decorate)([ 4023 (0,_angular_core__WEBPACK_IMPORTED_MODULE_0__.HostBinding)('class.k-focus'), 4024 (0,tslib__WEBPACK_IMPORTED_MODULE_5__.__metadata)("design:type", Boolean), 4025 (0,tslib__WEBPACK_IMPORTED_MODULE_5__.__metadata)("design:paramtypes", [])
4026], ChipComponent.prototype, "focusedClass", null); 4027(0,tslib__WEBPACK_IMPORTED_MODULE_5__.__decorate)([ 4028 (0,_angular_core__WEBPACK_IMPORTED_MODULE_0__.HostBinding)('attr.dir'), 4029 (0,tslib__WEBPACK_IMPORTED_MODULE_5__.__metadata)("design:type", String) 4030], ChipComponent.prototype, "direction", void 0); 4031ChipComponent = (0,tslib__WEBPACK_IMPORTED_MODULE_5__.__decorate)([ (0,tslib__WEBPACK_IMPORTED_MODULE_5__.__metadata)("design:paramtypes", [_angular_core__WEBPACK_IMPORTED_MODULE_0__.ElementRef, 4032 _angular_core__WEBPACK_IMPORTED_MODULE_0__.Renderer2, 4033 _angular_core__WEBPACK_IMPORTED_MODULE_0__.NgZone, 4034 _progress_kendo_angular_l10n__WEBPACK_IMPORTED_MODULE_4__.LocalizationService]) 4035], ChipComponent); 4036 4037let ChipListComponent = class ChipListComponent { 4038 constructor(localizationService, renderer, element) { 4039 this.localizationService = localizationService; 4040 this.renderer = renderer; 4041 this.element = element; 4042 this.hostClass = true; 4043 /** 4044 * Sets the selection mode of the ChipList. 4045 * 4046 * The available values are: 4047 * * `none` (default) 4048 * * `single` 4049 * * `multiple` 4050 */ 4051 this.selection = 'none'; 4052 /** 4053 * Fires each time when the ChipList selection is changed. 4054 */ 4055 this.selectedChange = new _angular_core__WEBPACK_IMPORTED_MODULE_0__.EventEmitter(); 4056 /** 4057 * Fires each time the user clicks on the remove icon of the Chip. 4058 */ 4059 this.remove = new _angular_core__WEBPACK_IMPORTED_MODULE_0__.EventEmitter(); 4060 this.role = 'listbox'; 4061 this._size = 'medium'; 4062 (0,_progress_kendo_licensing__WEBPACK_IMPORTED_MODULE_2__.validatePackage)(packageMetadata); 4063 this.direction = localizationService.rtl ? 'rtl' : 'ltr'; 4064 } 4065 /** 4066 * The size property specifies the gap between the Chips in the ChipList 4067 * ([see example]({% slug appearance_chiplist %}#toc-size)). 4068 * 4069 * The possible values are: 4070 * * `'small'` 4071 * * `'medium'` (default) 4072 * * `'large'` 4073 * * `null` 4074 */ 4075 set size(size) { 4076 this.handleClasses(size, 'size'); 4077 this._size = size; 4078 } 4079 get size() { 4080 return this._size; 4081 } 4082 get single() { 4083 return this.selection === 'single'; 4084 } 4085 get multiple() { 4086 return this.selection === 'multiple'; 4087 } 4088 /** 4089 * @hidden 4090 */ 4091 onClick($event) { 4092 const target = $event.target; 4093 const isRemoveClicked = closest(target, '.k-chip-remove-action'); 4094 const clickedChip = closest(target, '.k-chip'); 4095 const chip = this.chips.find((chip) => clickedChip === chip.element.nativeElement); 4096 if (isRemoveClicked && clickedChip) { 4097 const removeEventArgs = { sender: this, originalEvent: $event, removedChip: chip }; 4098 this.remove.emit(removeEventArgs); 4099 } 4100 if (this.selection !== 'none' && clickedChip && !isRemoveClicked) { 4101 this.setSelection(chip); 4102 } 4103 } 4104 ngOnInit() { 4105 this.dynamicRTLSubscription = this.localizationService.changes 4106 .subscribe(({ rtl }) => this.direction = rtl ? 'rtl' : 'ltr'); 4107 } 4108 ngAfterViewInit() { 4109 const stylingInputs = ['size']; 4110 stylingInputs.forEach(input => { 4111 this.handleClasses(this[input], input); 4112 }); 4113 } 4114 ngAfterContentInit() { 4115 this.chips.forEach((chip) => { 4116 this.renderer.setAttribute(chip.element.nativeElement, 'role', 'option'); 4117 }); 4118 } 4119 ngOnDestroy() { 4120 if (this.dynamicRTLSubscription) { 4121 this.dynamicRTLSubscription.unsubscribe(); 4122 } 4123 } 4124 selectedChips() { 4125 return this.chips.reduce((acc, cur, idx) => { return cur.selected ? acc.concat(idx) : acc; }, []); 4126 } 4127 /** 4128 * Updates the selection on click of a Chip. Emits events. 4129 */ 4130 setSelection(chip) { 4131 if (this.selection === 'single') { 4132 this.clearSelection(chip); 4133 } 4134 chip.selected = !chip.selected; 4135 this.selectedChange.emit(this.selectedChips()); 4136 } 4137 clearSelection(chip) { 4138 this.chips.forEach((c) => { 4139 if (chip !== c) { 4140 c.selected = false;
4141 } 4142 }); 4143 } 4144 handleClasses(value, input) { 4145 const elem = this.element.nativeElement; 4146 const classes = getStylingClasses('chip-list', input, this[input], value); 4147 if (classes.toRemove) { 4148 this.renderer.removeClass(elem, classes.toRemove); 4149 } 4150 if (classes.toAdd) { 4151 this.renderer.addClass(elem, classes.toAdd); 4152 } 4153 } 4154}; 4155ChipListComponent.ɵfac = function ChipListComponent_Factory(t) { return new (t || ChipListComponent)(_angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵdirectiveInject"](_progress_kendo_angular_l10n__WEBPACK_IMPORTED_MODULE_4__.LocalizationService), _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵdirectiveInject"](_angular_core__WEBPACK_IMPORTED_MODULE_0__.Renderer2), _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵdirectiveInject"](_angular_core__WEBPACK_IMPORTED_MODULE_0__.ElementRef)); }; 4156ChipListComponent.ɵcmp = /*@__PURE__*/ _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵdefineComponent"]({ type: ChipListComponent, selectors: [["kendo-chiplist"], ["kendo-chip-list"]], contentQueries: function ChipListComponent_ContentQueries(rf, ctx, dirIndex) { if (rf & 1) { 4157 _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵcontentQuery"](dirIndex, ChipComponent, 4); 4158 } if (rf & 2) { 4159 let _t; 4160 _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵqueryRefresh"](_t = _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵloadQuery"]()) && (ctx.chips = _t); 4161 } }, hostVars: 8, hostBindings: function ChipListComponent_HostBindings(rf, ctx) { if (rf & 1) { 4162 _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵlistener"]("click", function ChipListComponent_click_HostBindingHandler($event) { return ctx.onClick($event); }); 4163 } if (rf & 2) { 4164 _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵattribute"]("role", ctx.role)("dir", ctx.direction); 4165 _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵclassProp"]("k-chip-list", ctx.hostClass)("k-selection-single", ctx.single)("k-selection-multiple", ctx.multiple); 4166 } }, inputs: { selection: "selection", size: "size" }, outputs: { selectedChange: "selectedChange", remove: "remove" }, features: [_angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵProvidersFeature"]([ 4167 _progress_kendo_angular_l10n__WEBPACK_IMPORTED_MODULE_4__.LocalizationService, 4168 { 4169 provide: _progress_kendo_angular_l10n__WEBPACK_IMPORTED_MODULE_4__.L10N_PREFIX, 4170 useValue: 'kendo.chiplist' 4171 } 4172 ])], ngContentSelectors: _c9, decls: 1, vars: 0, template: function ChipListComponent_Template(rf, ctx) { if (rf & 1) { 4173 _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵprojectionDef"](); 4174 _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵprojection"](0); 4175 } }, encapsulation: 2 }); 4176(0,tslib__WEBPACK_IMPORTED_MODULE_5__.__decorate)([ 4177 (0,_angular_core__WEBPACK_IMPORTED_MODULE_0__.HostBinding)('class.k-chip-list'), 4178 (0,tslib__WEBPACK_IMPORTED_MODULE_5__.__metadata)("design:type", Boolean) 4179], ChipListComponent.prototype, "hostClass", void 0); 4180(0,tslib__WEBPACK_IMPORTED_MODULE_5__.__decorate)([ 4181 (0,_angular_core__WEBPACK_IMPORTED_MODULE_0__.HostBinding)('attr.dir'), 4182 (0,tslib__WEBPACK_IMPORTED_MODULE_5__.__metadata)("design:type", String) 4183], ChipListComponent.prototype, "direction", void 0); 4184(0,tslib__WEBPACK_IMPORTED_MODULE_5__.__decorate)([ 4185 (0,_angular_core__WEBPACK_IMPORTED_MODULE_0__.Input)(), 4186 (0,tslib__WEBPACK_IMPORTED_MODULE_5__.__metadata)("design:type", String) 4187], ChipListComponent.prototype, "selection", void 0); 4188(0,tslib__WEBPACK_IMPORTED_MODULE_5__.__decorate)([ 4189 (0,_angular_core__WEBPACK_IMPORTED_MODULE_0__.Input)(), 4190 (0,tslib__WEBPACK_IMPORTED_MODULE_5__.__metadata)("design:type", String), 4191 (0,tslib__WEBPACK_IMPORTED_MODULE_5__.__metadata)("design:paramtypes", [String]) 4192], ChipListComponent.prototype, "size", null); 4193(0,tslib__WEBPACK_IMPORTED_MODULE_5__.__decorate)([ 4194 (0,_angular_core__WEBPACK_IMPORTED_MODULE_0__.Output)(), 4195 (0,tslib__WEBPACK_IMPORTED_MODULE_5__.__metadata)("design:type", _angular_core__WEBPACK_IMPORTED_MODULE_0__.EventEmitter) 4196], ChipListComponent.prototype, "selectedChange", void 0); 4197(0,tslib__WEBPACK_IMPORTED_MODULE_5__.__decorate)([ 4198 (0,_angular_core__WEBPACK_IMPORTED_MODULE_0__.Output)(), 4199 (0,tslib__WEBPACK_IMPORTED_MODULE_5__.__metadata)("design:type", _angular_core__WEBPACK_IMPORTED_MODULE_0__.EventEmitter) 4200], ChipListComponent.prototype, "remove", void 0); 4201(0,tslib__WEBPACK_IMPORTED_MODULE_5__.__decorate)([ 4202 (0,_angular_core__WEBPACK_IMPORTED_MODULE_0__.ContentChildren)(ChipComponent), 4203 (0,tslib__WEBPACK_IMPORTED_MODULE_5__.__metadata)("design:type", _angular_core__WEBPACK_IMPORTED_MODULE_0__.QueryList) 4204], ChipListComponent.prototype, "chips", void 0); 4205(0,tslib__WEBPACK_IMPORTED_MODULE_5__.__decorate)([ 4206 (0,_angular_core__WEBPACK_IMPORTED_MODULE_0__.HostBinding)('class.k-selection-single'), 4207 (0,tslib__WEBPACK_IMPORTED_MODULE_5__.__metadata)("design:type", Boolean), 4208 (0,tslib__WEBPACK_IMPORTED_MODULE_5__.__metadata)("design:paramtypes", []) 4209], ChipListComponent.prototype, "single", null); 4210(0,tslib__WEBPACK_IMPORTED_MODULE_5__.__decorate)([ 4211 (0,_angular_core__WEBPACK_IMPORTED_MODULE_0__.HostBinding)('class.k-selection-multiple'), 4212 (0,tslib__WEBPACK_IMPORTED_MODULE_5__.__metadata)("design:type", Boolean), 4213 (0,tslib__WEBPACK_IMPORTED_MODULE_5__.__metadata)("design:paramtypes", []) 4214], ChipListComponent.prototype, "multiple", null); 4215(0,tslib__WEBPACK_IMPORTED_MODULE_5__.__decorate)([ 4216 (0,_angular_core__WEBPACK_IMPORTED_MODULE_0__.HostBinding)('attr.role'), 4217 (0,tslib__WEBPACK_IMPORTED_MODULE_5__.__metadata)("design:type", String) 4218], ChipListComponent.prototype, "role", void 0); 4219(0,tslib__WEBPACK_IMPORTED_MODULE_5__.__decorate)([ 4220 (0,_angular_core__WEBPACK_IMPORTED_MODULE_0__.HostListener)('click', ['$event']), 4221 (0,tslib__WEBPACK_IMPORTED_MODULE_5__.__metadata)("design:type", Function), 4222 (0,tslib__WEBPACK_IMPORTED_MODULE_5__.__metadata)("design:paramtypes", [Object]), 4223 (0,tslib__WEBPACK_IMPORTED_MODULE_5__.__metadata)("design:returntype", void 0) 4224], ChipListComponent.prototype, "onClick", null); 4225ChipListComponent = (0,tslib__WEBPACK_IMPORTED_MODULE_5__.__decorate)([ (0,tslib__WEBPACK_IMPORTED_MODULE_5__.__metadata)("design:paramtypes", [_progress_kendo_angular_l10n__WEBPACK_IMPORTED_MODULE_4__.LocalizationService, 4226 _angular_core__WEBPACK_IMPORTED_MODULE_0__.Renderer2, 4227 _angular_core__WEBPACK_IMPORTED_MODULE_0__.ElementRef]) 4228], ChipListComponent); 4229 4230const exportedModules = [ 4231 ChipComponent, 4232 ChipListComponent 4233]; 4234const declarations = [ 4235 ...exportedModules 4236]; 4237/** 4238 * Represents the [NgModule]({{ site.data.urls.angular['ngmoduleapi'] }}) 4239 * definition for the Chip and ChipList components. 4240 * 4241 * @example 4242 * 4243 * ```ts-no-run 4244 * // Import the Chip module 4245 * import { ChipModule } from '@progress/kendo-angular-buttons'; 4246 * 4247 * // The browser platform with a compiler 4248 * import { platformBrowserDynamic } from '@angular/platform-browser-dynamic'; 4249 * 4250 * import { NgModule } from '@angular/core'; 4251 * 4252 * // Import the app component 4253 * import { AppComponent } from './app.component'; 4254 * 4255 * // Define the app module 4256 * _@NgModule({ 4257 * declarations: [AppComponent], // declare app component 4258 * imports: [BrowserModule, ChipModule], // import Chip module 4259 * bootstrap: [AppComponent] 4260 * }) 4261 * export class AppModule {} 4262 * 4263 * ``` 4264 */ 4265let ChipModule = class ChipModule { 4266}; 4267ChipModule.ɵfac = function ChipModule_Factory(t) { return new (t || ChipModule)(); }; 4268ChipModule.ɵmod = /*@__PURE__*/ _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵdefineNgModule"]({ type: ChipModule }); 4269ChipModule.ɵinj = /*@__PURE__*/ _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵdefineInjector"]({ imports: [[_angular_common__WEBPACK_IMPORTED_MODULE_6__.CommonModule]] }); 4270 4271/** 4272 * @hidden 4273 */ 4274function getAnchorAlign(fabAlign, rtl) { 4275 let align = { horizontal: (rtl ? 'right' : 'left'), vertical: 'bottom' }; 4276 if (fabAlign.horizontal === 'end') { 4277 align.horizontal = rtl ? 'left' : 'right'; 4278 } 4279 if (fabAlign.vertical === 'bottom') { 4280 align.vertical = 'top'; 4281 } 4282 if (fabAlign.vertical === 'bottom' && fabAlign.horizontal === 'end') { 4283 align.horizontal = rtl ? 'left' : 'right'; 4284 align.vertical = 'top'; 4285 } 4286 return align; 4287} 4288/** 4289 * @hidden 4290 */ 4291function getPopupAlign(fabAlign, rtl) { 4292 let align = { horizontal: (rtl ? 'right' : 'left'), vertical: 'top' }; 4293 if (fabAlign.horizontal === 'end') { 4294 align.horizontal = rtl ? 'left' : 'right'; 4295 } 4296 if (fabAlign.vertical === 'bottom') { 4297 align.vertical = 'bottom'; 4298 } 4299 if (fabAlign.vertical === 'bottom' && fabAlign.horizontal === 'end') { 4300 align.horizontal = rtl ? 'left' : 'right'; 4301 align.vertical = 'bottom'; 4302 } 4303 return align; 4304} 4305 4306/** 4307 * @hidden 4308 */ 4309function openAnimation(animationSettings) { 4310 const isBottom = animationSettings.align.vertical === 'bottom'; 4311 const duration = animationSettings.duration; 4312 const gap = animationSettings.gap; 4313 return (0,_angular_animations__WEBPACK_IMPORTED_MODULE_11__.sequence)([ 4314 (0,_angular_animations__WEBPACK_IMPORTED_MODULE_11__.query)(`.k-fab-item`, [ 4315 (0,_angular_animations__WEBPACK_IMPORTED_MODULE_11__.style)({ opacity: 0, transform: `translateY(${isBottom ? '8px' : '-8px'})` }), 4316 (0,_angular_animations__WEBPACK_IMPORTED_MODULE_11__.stagger)(gap, [(0,_angular_animations__WEBPACK_IMPORTED_MODULE_11__.animate)(`${duration}ms ease-in`, (0,_angular_animations__WEBPACK_IMPORTED_MODULE_11__.style)({ opacity: '*', transform: 'translateY(0)' }))]) 4317 ], { optional: true }) 4318 ]); 4319} 4320/** 4321 * @hidden 4322 */ 4323function closeAnimation(animationSettings) { 4324 const isBottom = animationSettings.align.vertical === 'bottom'; 4325 const duration = animationSettings.duration; 4326 const gap = animationSettings.gap; 4327 return (0,_angular_animations__WEBPACK_IMPORTED_MODULE_11__.sequence)([ 4328 (0,_angular_animations__WEBPACK_IMPORTED_MODULE_11__.query)(`.k-fab-item`, [ 4329 (0,_angular_animations__WEBPACK_IMPORTED_MODULE_11__.style)({ opacity: '*', transform: 'translateY(0)' }), 4330 (0,_angular_animations__WEBPACK_IMPORTED_MODULE_11__.stagger)(-gap, [(0,_angular_animations__WEBPACK_IMPORTED_MODULE_11__.animate)(`${duration}ms ease-in`, (0,_angular_animations__WEBPACK_IMPORTED_MODULE_11__.style)({ opacity: 0, transform: `translateY(${isBottom ? '8px' : '-8px'})` }))]) 4331 ], { optional: true }) 4332 ]); 4333} 4334 4335/** 4336 * Represents a template that defines the content of the whole dial item. 4337 * To define the template, nest an `<ng-template>` tag 4338 * with the `kendoDialItemTemplate` directive inside the `<kendo-floatingactionbutton>
4338` tag 4339 * ([see example]({% slug templates_floatingactionbutton %}#toc-dial-item-template)). 4340 */ 4341let DialItemTemplateDirective = class DialItemTemplateDirective { 4342 constructor(templateRef) { 4343 this.templateRef = templateRef; 4344 } 4345}; 4346DialItemTemplateDirective.ɵfac = function DialItemTemplateDirective_Factory(t) { return new (t || DialItemTemplateDirective)(_angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵdirectiveInject"](_angular_core__WEBPACK_IMPORTED_MODULE_0__.TemplateRef, 8)); }; 4347DialItemTemplateDirective.ɵdir = /*@__PURE__*/ _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵdefineDirective"]({ type: DialItemTemplateDirective, selectors: [["", "kendoDialItemTemplate", ""]] }); 4348DialItemTemplateDirective = (0,tslib__WEBPACK_IMPORTED_MODULE_5__.__decorate)([ (0,tslib__WEBPACK_IMPORTED_MODULE_5__.__param)(0, (0,_angular_core__WEBPACK_IMPORTED_MODULE_0__.Optional)()), 4349 (0,tslib__WEBPACK_IMPORTED_MODULE_5__.__metadata)("design:paramtypes", [_angular_core__WEBPACK_IMPORTED_MODULE_0__.TemplateRef]) 4350], DialItemTemplateDirective); 4351 4352/** 4353 * Represents a template that defines the content of the FloatingActionButton. 4354 * To define the template, nest an `<ng-template>` tag 4355 * with the `kendoFloatingActionButtonTemplate` directive inside the `<kendo-floatingactionbutton>` tag 4356 * ([see example]({% slug templates_floatingactionbutton %}#toc-floatingactionbutton-template)). 4357 */ 4358let FloatingActionButtonTemplateDirective = class FloatingActionButtonTemplateDirective { 4359 constructor(templateRef) { 4360 this.templateRef = templateRef; 4361 } 4362}; 4363FloatingActionButtonTemplateDirective.ɵfac = function FloatingActionButtonTemplateDirective_Factory(t) { return new (t || FloatingActionButtonTemplateDirective)(_angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵdirectiveInject"](_angular_core__WEBPACK_IMPORTED_MODULE_0__.TemplateRef, 8)); }; 4364FloatingActionButtonTemplateDirective.ɵdir = /*@__PURE__*/ _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵdefineDirective"]({ type: FloatingActionButtonTemplateDirective, selectors: [["", "kendoFloatingActionButtonTemplate", ""]] }); 4365FloatingActionButtonTemplateDirective = (0,tslib__WEBPACK_IMPORTED_MODULE_5__.__decorate)([ (0,tslib__WEBPACK_IMPORTED_MODULE_5__.__param)(0, (0,_angular_core__WEBPACK_IMPORTED_MODULE_0__.Optional)()), 4366 (0,tslib__WEBPACK_IMPORTED_MODULE_5__.__metadata)("design:paramtypes", [_angular_core__WEBPACK_IMPORTED_MODULE_0__.TemplateRef]) 4367], FloatingActionButtonTemplateDirective); 4368 4369const NAVIGATION_SETTINGS$2 = { 4370 useLeftRightArrows: false 4371}; 4372const ɵ0$2 = NAVIGATION_SETTINGS$2; 4373const NAVIGATION_SETTINGS_PROVIDER$2 = { 4374 provide: NAVIGATION_CONFIG, 4375 useValue: ɵ0$2 4376}; 4377const SIZE_CLASSES = { 4378 small: 'k-fab-sm', 4379 medium: 'k-fab-md', 4380 large: 'k-fab-lg' 4381}; 4382const SHAPE_CLASSES = { 4383 rectangle: 'k-fab-rectangle', 4384 square: 'k-fab-square' 4385}; 4386const ROUNDED_CLASSES = { 4387 small: 'k-rounded-sm', 4388 medium: 'k-rounded-md', 4389 large: 'k-rounded-lg', 4390 full: 'k-rounded-full' 4391}; 4392const FILLMODE_CLASS = 'k-fab-solid'; 4393const DEFAULT_DURATION = 180; 4394const DEFAULT_ITEM_GAP = 90; 4395const DEFAULT_OFFSET = '16px'; 4396/** 4397 * 4398 * Represents the [Kendo UI FloatingActionButton component for Angular]({% slug overview_floatingactionbutton %}). 4399 * Used to specify the primary or the most common action in an application. 4400 * 4401 */ 4402let FloatingActionButtonComponent = class FloatingActionButtonComponent { 4403 constructor(renderer, element, focusService, navigationService, ngZone, popupService, builder, localizationService) { 4404 this.renderer = renderer; 4405 this.element = element; 4406 this.focusService = focusService; 4407 this.navigationService = navigationService; 4408 this.ngZone = ngZone; 4409 this.popupService = popupService; 4410 this.builder = builder; 4411 this.localizationService = localizationService; 4412 /** 4413 * Specifies the positionMode of the FloatingActionButton 4414 * ([see example]({% slug positioning_floatingactionbutton %}#toc-positionMode)). 4415 * 4416 * * The possible values are: 4417 * * `absolute`—Positions the FloatingActionButton absolutely to its first positioned parent element. 4418 * * `fixed` (Default)—Positions the FloatingActionButton relative to the viewport. It always stays in the same place even if the page is scrolled. 4419 */ 4420 this.positionMode = 'fixed'; 4421 /** 4422 * Specifies the animation settings of the FloatingActionButton dial items. 4423 * ([see example]({% slug dialitems_floatingactionbutton %}#toc-animation)). 4424 * 4425 * The possible values are: 4426 * * Boolean 4427 * * (Default) `true`—Applies the default [`DialItemAnimation`]({% slug api_buttons_dialitemanimation %}) settings. 4428 * * `false` 4429 * * `DialItemAnimation` 4430 * * `duration`—Specifies the animation duration in milliseconds for each dial item. Defaults to `180ms`. 4431 * * `gap`—Specifies the animation duration gap in milliseconds after each dial item is animated. Defaults to `90ms`. 4432 */ 4433 this.dialItemAnimation = true; 4434 /** 4435 * Specifies the [`tabIndex`](https://developer.mozilla.org/en-US/docs/Web/HTML/Global_attributes/tabindex) of the FloatingActionButton. 4436 */ 4437 this.tabIndex = 0; 4438 /** 4439 * Specifies the collection of the dial items that will be rendered in the FloatingActionButton popup. 4440 */ 4441 this.dialItems = []; 4442 /** 4443 * Fires each time the FloatingActionButton gets blurred. 4444 */ 4445 this.onBlur = new _angular_core__WEBPACK_IMPORTED_MODULE_0__.EventEmitter(); 4446 /**
4447 * Fires each time the FloatingActionButton gets focused. 4448 */ 4449 this.onFocus = new _angular_core__WEBPACK_IMPORTED_MODULE_0__.EventEmitter(); 4450 /** 4451 * Fires each time a dial item is clicked. 4452 */ 4453 this.dialItemClick = new _angular_core__WEBPACK_IMPORTED_MODULE_0__.EventEmitter(); 4454 /** 4455 * Fires each time the popup is about to open. 4456 * This event is preventable. If you cancel the event, the popup will remain closed 4457 * ([more information and example]({% slug overview_floatingactionbutton %}#toc-events)). 4458 */ 4459 this.open = new _angular_core__WEBPACK_IMPORTED_MODULE_0__.EventEmitter(); 4460 /** 4461 * Fires each time the popup is about to close. 4462 * This event is preventable. If you cancel the event, the popup will remain open 4463 * ([more information and example]({% slug overview_floatingactionbutton %}#toc-events)). 4464 */ 4465 this.close = new _angular_core__WEBPACK_IMPORTED_MODULE_0__.EventEmitter(); 4466 /** 4467 * @hidden 4468 */ 4469 this.id = `k-${(0,_progress_kendo_angular_common__WEBPACK_IMPORTED_MODULE_3__.guid)()}`; 4470 this._themeColor = 'primary'; 4471 this._size = 'medium'; 4472 this._shape = 'rectangle'; 4473 this._disabled = false; 4474 this._align = { horizontal: 'end', vertical: 'bottom' }; 4475 this._offset = { x: DEFAULT_OFFSET, y: DEFAULT_OFFSET }; 4476 this._rounded = 'full'; 4477 this.subscriptions = new rxjs__WEBPACK_IMPORTED_MODULE_12__.Subscription(); 4478 this.rtl = false; 4479 this.animationEnd = new _angular_core__WEBPACK_IMPORTED_MODULE_0__.EventEmitter(); 4480 this.initialSetup = true; 4481 (0,_progress_kendo_licensing__WEBPACK_IMPORTED_MODULE_2__.validatePackage)(packageMetadata); 4482 this.subscribeNavigationEvents(); 4483 this.subscriptions.add(this.localizationService.changes.subscribe(({ rtl }) => { 4484 this.rtl = rtl; 4485 this.direction = this.rtl ? 'rtl' : 'ltr'; 4486 })); 4487 } 4488 get fixedClass() { 4489 return this.positionMode === 'fixed'; 4490 } 4491 get absoluteClass() { 4492 return this.positionMode === 'absolute'; 4493 } 4494 /** 4495 * Specifies the theme color of the FloatingActionButton 4496 * ([see example]({% slug appearance_floatingactionbutton %}#toc-themeColor)). 4497 * The theme color will be applied as background color of the component. 4498 * 4499 * The possible values are: 4500 * * `'primary'` (Default)—Applies coloring based on the `primary` theme color. 4501 * * `'secondary'`—Applies coloring based on the `secondary` theme color. 4502 * * `'tertiary'`— Applies coloring based on the `tertiary` theme color. 4503 * * `'info'`—Applies coloring based on the `info` theme color. 4504 * * `'success'`— Applies coloring based on the `success` theme color. 4505 * * `'warning'`— Applies coloring based on the `warning` theme color. 4506 * * `'error'`— Applies coloring based on the `error` theme color. 4507 * * `'dark'`— Applies coloring based on the `dark` theme color. 4508 * * `'light'`— Applies coloring based on the `light` theme color. 4509 * * `'inverse'`— Applies coloring based on the `inverse` theme color. 4510 */ 4511 set themeColor(themeColor) { 4512 this.handleClasses(themeColor, 'themeColor'); 4513 this._themeColor = themeColor; 4514 } 4515 get themeColor() { 4516 return this._themeColor; 4517 } 4518 /** 4519 * Specifies the size of the FloatingActionButton 4520 * ([see example]({% slug appearance_floatingactionbutton %}#toc-size)). 4521 * 4522 * The possible values are: 4523 * * `'small'` 4524 * * `'medium'` (Default) 4525 * * `'large'` 4526 */ 4527 set size(size) { 4528 this.handleClasses(size, 'size'); 4529 this._size = size; 4530 } 4531 get size() { 4532 return this._size; 4533 } 4534 /** 4535 * The rounded property specifies the border radius of the FloatingActionButton. 4536 * 4537 * The possible values are: 4538 * * `'small'` 4539 * * `'medium'` 4540 * * `'large'` 4541 * * `'full'` (default) 4542 * * `null` 4543 */ 4544 set rounded(rounded) { 4545 this.handleClasses(rounded, 'rounded'); 4546 this._rounded = rounded; 4547 } 4548 get rounded() { 4549 return this._rounded; 4550 } 4551 /** 4552 * Specifies the shape of the FloatingActionButton 4553 * ([see example]({% slug appearance_floatingactionbutton %}#toc-shape)). 4554 * 4555 * The possible values are: 4556 * * `rectangle` (Default)—Applies rectangular shape on the FloatingActionButton. 4557 * * `square`—Applies square shape on the FloatingActionButton. 4558 * 4559 */ 4560 set shape(shape) { 4561 this.handleClasses(shape, 'shape'); 4562 this._shape = shape; 4563 } 4564 get shape() { 4565 return this._shape; 4566 } 4567 /** 4568 * Specifies whether the FloatingActionButton is disabled. 4569 */ 4570 set disabled(disabled) { 4571 this._disabled = disabled; 4572 } 4573 get disabled() { 4574 return this._disabled; 4575 } 4576 /** 4577 * Specifies the horizontal and vertical alignment of the FloatingActionButton 4578 * ([see example]({% slug positioning_floatingactionbutton %}#toc-align)). 4579 * 4580 * The possible values are: 4581 * * `{ horizontal: 'start'|'center'|'end', vertical: 'top'|'middle'|'bottom' }` 4582 * 4583 * The default value is: 4584 * * `{ horizontal: 'end', vertical: 'bottom' }` 4585 * 4586 */ 4587 set align(align) { 4588 this._align = Object.assign(this._align, align); 4589 } 4590 get align() { 4591 return this._align; 4592 } 4593 /** 4594 * Specifies the horizontal and vertical offset position of the FloatingActionButton 4595 * ([see example]({% slug positioning_floatingactionbutton %}#toc-offset)). 4596 * 4597 * * The default value is: 4598 * * `{ x: '16px', y: '16px' }` 4599 */ 4600 set offset(offset) { 4601 this._offset = Object.assign(this._offset, offset); 4602 this.offsetStyles(); 4603 } 4604 get offset() { 4605 return this._offset; 4606 } 4607 /** 4608 * @hidden 4609 */ 4610 get componentTabIndex() { 4611 return this.disabled ? (-1) : this.tabIndex; 4612 } 4613 ngAfterViewInit() { 4614 ['shape', 'size', 'rounded', 'themeColor'].forEach(option => this.handleClasses(this[option], option)); 4615 this.renderer.addClass(this.element.nativeElement, this.alignClass()); 4616 this.offsetStyles(); 4617 this.initialSetup = false;
4618 } 4619 ngOnDestroy() { 4620 this.subscriptions.unsubscribe(); 4621 } 4622 /** 4623 * Indicates whether the FloatingActionButton is currently open. 4624 */ 4625 get isOpen() { return isPresent(this.popupRef); } 4626 /** 4627 * Focuses the FloatingActionButton. 4628 */ 4629 focus() { 4630 if ((0,_progress_kendo_angular_common__WEBPACK_IMPORTED_MODULE_3__.isDocumentAvailable)()) { 4631 this.button.nativeElement.focus(); 4632 } 4633 } 4634 /** 4635 * Blurs the FloatingActionButton. 4636 */ 4637 blur() { 4638 if ((0,_progress_kendo_angular_common__WEBPACK_IMPORTED_MODULE_3__.isDocumentAvailable)()) { 4639 this.button.nativeElement.blur(); 4640 } 4641 } 4642 /** 4643 * Toggles the visibility of the FloatingActionButton dial items popup. 4644 * 4645 * If you use the `toggleDial` method to open or close the dial items, 4646 * the `open` and `close` events do not fire ([more information and examples]({% slug openstate_floatingactionbutton %}#toc-events)). 4647 * 4648 * @param open - The state of dial items popup. 4649 */ 4650 toggleDial(open) { 4651 if (this.disabled || !this.hasDialItems) { 4652 return; 4653 } 4654 const shouldOpen = isPresent(open) ? open : !this.isOpen; 4655 if (this.disabled || shouldOpen === this.isOpen) { 4656 return; 4657 } 4658 shouldOpen ? setTimeout(() => this.openDial()) : this.closeDial(); 4659 } 4660 /** 4661 * @hidden 4662 */ 4663 get role() { 4664 return (this.dialItems && this.dialItems.length) ? 'menubutton' : 'button'; 4665 } 4666 /** 4667 * @hidden 4668 */ 4669 get ariaExpanded() { 4670 return isPresent(this.isOpen); 4671 } 4672 /** 4673 * @hidden 4674 */ 4675 get ariaHasPopup() { 4676 return isPresent(this.isOpen); 4677 } 4678 /** 4679 * @hidden 4680 */ 4681 get iconClasses() { 4682 const classes = []; 4683 if (this.iconClass) { 4684 classes.push(`${this.iconClass}`); 4685 } 4686 if (this.icon) { 4687 classes.push(`k-fab-icon k-icon k-i-${this.icon}`); 4688 } 4689 return classes; 4690 } 4691 /** 4692 * @hidden 4693 */ 4694 clickHandler() { 4695 if (this.disabled || !this.hasDialItems) { 4696 return; 4697 } 4698 this.ngZone.run(() => { 4699 const shouldOpen = !this.isOpen; 4700 this.toggleDialWithEvents(shouldOpen); 4701 }); 4702 } 4703 /** 4704 * @hidden 4705 */ 4706 keyDownHandler(event) { 4707 this.keyHandler(event); 4708 } 4709 /** 4710 * @hidden 4711 */ 4712 keyHandler(event, keyEvent) { 4713 if (this.disabled) { 4714 return; 4715 } 4716 const focused = this.focusService.focused || 0; 4717 const keyCode = event.keyCode; 4718 const action = this.navigationService.process({ 4719 altKey: event.altKey, 4720 current: focused, 4721 keyCode, 4722 keyEvent: keyEvent, 4723 max: this.dialItems ? this.dialItems.length - 1 : 0, 4724 min: 0, 4725 flipNavigation: this.align.vertical === 'bottom' 4726 }); 4727 if (action !== NavigationAction.Undefined && 4728 action !== NavigationAction.Tab) { 4729 event.preventDefault(); 4730 } 4731 } 4732 /** 4733 * @hidden 4734 */ 4735 onItemClick(event) { 4736 const item = closest(event.target, '.k-fab-item'); 4737 if (!item) { 4738 return; 4739 } 4740 const index = item.getAttribute('data-fab-item-index'); 4741 this.emitItemClick(index); 4742 } 4743 /** 4744 * @hidden 4745 */ 4746 focusHandler() { 4747 if (!this.disabled) { 4748 this.onFocus.emit(); 4749 } 4750 } 4751 /** 4752 * @hidden 4753 */ 4754 blurHandler() { 4755 this.onBlur.emit(); 4756 this.toggleDialWithEvents(false); 4757 } 4758 handleClasses(inputValue, input) { 4759 if (isPresent(this.button) && (this[input] !== inputValue || this.initialSetup)) { 4760 const button = this.button.nativeElement; 4761 const classesToRemove = { 4762 themeColor: `${FILLMODE_CLASS}-${this.themeColor}`, 4763 size: SIZE_CLASSES[this.size], 4764 shape: SHAPE_CLASSES[this.shape], 4765 rounded: ROUNDED_CLASSES[this.rounded] 4766 }; 4767 const classesToAdd = {
4768 themeColor: inputValue ? `${FILLMODE_CLASS}-${inputValue}` : null, 4769 size: SIZE_CLASSES[inputValue], 4770 shape: SHAPE_CLASSES[inputValue], 4771 rounded: ROUNDED_CLASSES[inputValue] 4772 }; 4773 this.renderer.removeClass(button, classesToRemove[input]); 4774 if (classesToAdd[input]) { 4775 this.renderer.addClass(button, classesToAdd[input]); 4776 } 4777 } 4778 } 4779 onEnterPressed() { 4780 const index = this.focusService.focused; 4781 this.emitItemClick(index); 4782 } 4783 emitItemClick(index) { 4784 const item = this.dialItems[index]; 4785 if (item && !item.disabled) { 4786 const clickEventArgs = { item: item, index: index }; 4787 this.dialItemClick.emit(clickEventArgs); 4788 this.toggleDialWithEvents(false); 4789 } 4790 } 4791 subscribeNavigationEvents() { 4792 this.subscriptions.add(this.navigationService.navigate.subscribe(this.onArrowKeyNavigate.bind(this))); 4793 this.subscriptions.add(this.navigationService.enter.subscribe(this.onNavigationEnterPress.bind(this))); 4794 this.subscriptions.add((0,rxjs__WEBPACK_IMPORTED_MODULE_9__.merge)(this.navigationService.close, this.navigationService.esc).subscribe(this.onNavigationClose.bind(this))); 4795 } 4796 onArrowKeyNavigate(index) { 4797 this.focusService.focus(index); 4798 } 4799 onNavigationEnterPress() { 4800 this.ngZone.run(() => { 4801 if (this.isOpen) { 4802 let focusedIndex = this.focusService.focused; 4803 const focusedItem = this.dialItems[focusedIndex]; 4804 if (focusedItem && focusedItem.disabled) { 4805 return; 4806 } 4807 if (isPresent(focusedIndex) && focusedIndex !== -1) { 4808 this.onEnterPressed(); 4809 return; 4810 } 4811 } 4812 if (!this.isOpen && (0,_progress_kendo_angular_common__WEBPACK_IMPORTED_MODULE_3__.isDocumentAvailable)()) { 4813 this.toggleDialWithEvents(true); 4814 this.button.nativeElement.focus(); 4815 } 4816 }); 4817 } 4818 onNavigationClose() { 4819 if (this.isOpen) { 4820 this.ngZone.run(() => { 4821 this.toggleDialWithEvents(false); 4822 if ((0,_progress_kendo_angular_common__WEBPACK_IMPORTED_MODULE_3__.isDocumentAvailable)()) { 4823 this.button.nativeElement.focus(); 4824 } 4825 }); 4826 } 4827 } 4828 alignClass() { 4829 return `k-pos-${this.align.vertical}-${this.align.horizontal}`; 4830 } 4831 toggleDialWithEvents(open) { 4832 if (open === this.isOpen) { 4833 return; 4834 } 4835 const event = new PreventableEvent(); 4836 open ? this.open.emit(event) : this.close.emit(event); 4837 if (event.isDefaultPrevented()) { 4838 return; 4839 } 4840 open ? this.openDial() : this.closeDial(); 4841 } 4842 openPopup() { 4843 if (this.isOpen) { 4844 return; 4845 } 4846 const isIconFab = this.icon && !this.text; 4847 const rtl = this.rtl; 4848 const align = this.align; 4849 this.popupRef = this.popupService.open({ 4850 anchor: this.element.nativeElement, 4851 animate: false, 4852 content: this.popupTemplate, 4853 anchorAlign: getAnchorAlign(align, rtl), 4854 popupAlign: getPopupAlign(align, rtl), 4855 popupClass: 'k-fab-popup k-popup-transparent' 4856 }); 4857 const popupElement = this.popupRef.popupElement; 4858 this.renderer.setStyle(popupElement, 'box-shadow', 'none'); 4859 if (isIconFab) { 4860 this.subscriptions.add(this.popupRef.popupOpen.subscribe(() => this.positionPopup())); 4861 } 4862 this.ngZone.runOutsideAngular(() => { 4863 this.popupMouseDownListener = this.renderer.listen(popupElement, 'mousedown', (event) => { 4864 event.preventDefault(); 4865 }); 4866 }); 4867 this.popupRef.popupAnchorViewportLeave.subscribe(() => this.toggleDialWithEvents(false)); 4868 } 4869 closePopup() { 4870 if (this.isOpen) { 4871 if (this.popupMouseDownListener) { 4872 this.popupMouseDownListener(); 4873 } 4874 this.popupRef.close(); 4875 this.popupRef = null; 4876 } 4877 } 4878 openDial() { 4879 this.openPopup(); 4880 this.focusService.focus(0); 4881 if (this.dialItemAnimation && this.isValidAnimation()) { 4882 this.playAnimation(true); 4883 } 4884 } 4885 closeDial() { 4886 if (this.dialItemAnimation && this.isValidAnimation()) { 4887 this.playAnimation(false); 4888 this.animationEnd.pipe((0,rxjs_operators__WEBPACK_IMPORTED_MODULE_13__.take)(1)).subscribe(() => this.closePopup()); 4889 } 4890 else { 4891 this.closePopup(); 4892 } 4893 } 4894 isValidAnimation() { 4895 const animation = this.dialItemAnimation; 4896 if (typeof animation !== 'boolean') { 4897 return animation.duration !== 0; 4898 } 4899 return true; 4900 } 4901 positionPopup() { 4902 if (this.dialItemTemplate) { 4903 return; 4904 } 4905 const fab = this.element.nativeElement; 4906 const fabWidth = fab.getBoundingClientRect().width; 4907 const popupEl = this.popupRef.popupElement; 4908 const icon = popupEl.querySelector('.k-fab-item-icon'); 4909 if (!icon) { 4910 return; 4911 } 4912 const iconWidth = icon.getBoundingClientRect().width; 4913 const left = (fabWidth / 2) - (iconWidth / 2); 4914 const popupLeft = popupEl.getBoundingClientRect().left; 4915 const isEndAlign = this.align.horizontal === 'end'; 4916 const leftValue = isEndAlign ? (popupLeft - left) : (left + popupLeft); 4917 const rtlLeftValue = isEndAlign ? (left + popupLeft) : (popupLeft - left); 4918 popupEl.style.left = this.rtl ? `${rtlLeftValue}px` : `${leftValue}px`; 4919 } 4920 offsetStyles() { 4921 const hostElement = this.element.nativeElement; 4922 this.renderer.setStyle(hostElement, this.horizontalPosition, this.horizontalOffset); 4923 this.renderer.setStyle(hostElement, this.verticalPosition, this.verticalOffset); 4924 } 4925 get hasDialItems() { 4926 return isPresent(this.dialItems) && this.dialItems.length !== 0; 4927 } 4928 /** 4929 * Gets the CSS prop name of the selected vertical position (`top`/`bottom`); 4930 */ 4931 get verticalPosition() { 4932 return { 4933 top: 'top', 4934 middle: 'top', 4935 bottom: 'bottom' 4936 }[this.align.vertical]; 4937 } 4938 /** 4939 * Gets the offset according to the selected vertical position. 4940 */ 4941 get verticalOffset() { 4942 if (this.align.vertical === 'middle') { 4943 return this.offset.y === DEFAULT_OFFSET ? '50%' : `calc(50% + ${this.offset.y})`; 4944 } 4945 return this.offset.y; 4946 } 4947 /** 4948 * Gets the CSS prop name of the selected horizontal position (`left`/`right`); 4949 */ 4950 get horizontalPosition() { 4951 const { horizontal } = this.align; 4952 return { 4953 end: this.rtl ? 'left' : 'right', 4954 center: 'left', 4955 start: this.rtl ? 'right' : 'left' 4956 }[horizontal]; 4957 } 4958 /** 4959 * Gets the offset according to the selected horizontal position. 4960 */ 4961 get horizontalOffset() { 4962 if (this.align.horizontal === 'center') { 4963 return this.offset.x === DEFAULT_OFFSET ? '50%' : `calc(50% + ${this.offset.x})`; 4964 } 4965 return this.offset.x; 4966 } 4967 playerFor(element, animation) { 4968 const factory = this.builder.build(animation); 4969 return factory.create(element); 4970 } 4971 playAnimation(open) { 4972 const durationSettings = this.durationSettings(); 4973 const animationSettings = { 4974 duration: durationSettings.duration, 4975 gap: durationSettings.gap, 4976 align: this.align 4977 }; 4978 const animation = open ? openAnimation(animationSettings) : closeAnimation(animationSettings); 4979 let player = this.playerFor(this.popupRef.popupElement, animation); 4980 player.play(); 4981 player.onDone(() => { 4982 if (player) { 4983 this.animationEnd.emit(); 4984 player.destroy(); 4985 player = null; 4986 } 4987 }); 4988 } 4989 durationSettings() { 4990 return { 4991 duration: this.animationDuration(), 4992 gap: this.animationGap() 4993 }; 4994 } 4995 animationGap() { 4996 const animation = this.dialItemAnimation; 4997 if (typeof animation !== 'boolean' && isPresent(animation.gap)) { 4998 return animation.gap; 4999 } 5000 return DEFAULT_ITEM_GAP; 5001 } 5002 animationDuration() { 5003 const animation = this.dialItemAnimation; 5004 if (typeof animation !== 'boolean' && isPresent(animation.duration)) { 5005 return animation.duration; 5006 } 5007 return DEFAULT_DURATION; 5008 } 5009}; 5010FloatingActionButtonComponent.ɵfac = function FloatingActionButtonComponent_Factory(t) { return new (t || FloatingActionButtonComponent)(_angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵdirectiveInject"](_angular_core__WEBPACK_IMPORTED_MODULE_0__.Renderer2), _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵdirectiveInject"](_angular_core__WEBPACK_IMPORTED_MODULE_0__.ElementRef), _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵdirectiveInject"](FocusService), _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵdirectiveInject"](NavigationService), _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵdirectiveInject"](_angular_core__WEBPACK_IMPORTED_MODULE_0__.NgZone), _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵdirectiveInject"](_progress_kendo_angular_popup__WEBPACK_IMPORTED_MODULE_10__.PopupService), _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵdirectiveInject"](_angular_animations__WEBPACK_IMPORTED_MODULE_11__.AnimationBuilder), _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵdirectiveInject"](_progress_kendo_angular_l10n__WEBPACK_IMPORTED_MODULE_4__.LocalizationService)); }; 5011FloatingActionButtonComponent.ɵcmp = /*@__PURE__*/ _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵdefineComponent"]({ type: FloatingActionButtonComponent, selectors: [["kendo-floatingactionbutton"]], contentQueries: function FloatingActionButtonComponent_ContentQueries(rf, ctx, dirIndex) { if (rf & 1) { 5012 _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵcontentQuery"](dirIndex, DialItemTemplateDirective, 7); 5013 _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵcontentQuery"](dirIndex, FloatingActionButtonTemplateDirective, 7); 5014 } if (rf & 2) { 5015 let _t; 5016 _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵqueryRefresh"](_t = _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵloadQuery"]()) && (ctx.dialItemTemplate = _t.first); 5017 _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵqueryRefresh"](_t = _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵloadQuery"]()) && (ctx.fabTemplate = _t.first); 5018 } }, viewQuery: function FloatingActionButtonComponent_Query(rf, ctx) { if (rf & 1) { 5019 _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵviewQuery"](_c3, 7); 5020 _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵviewQuery"](_c5, 7); 5021 } if (rf & 2) { 5022 let _t; 5023 _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵqueryRefresh"](_t = _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵloadQuery"]()) && (ctx.button = _t.first); 5024 _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵqueryRefresh"](_t = _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵloadQuery"]()) && (ctx.popupTemplate = _t.first); 5025 } }, hostVars: 5, hostBindings: function FloatingActionButtonComponent_HostBindings(rf, ctx) { if (rf & 2) { 5026 _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵattribute"]("dir", ctx.direction); 5027 _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵclassProp"]("k-pos-fixed", ctx.fixedClass)("k-p
5027os-absolute", ctx.absoluteClass); 5028 } }, inputs: { positionMode: "positionMode", dialItemAnimation: "dialItemAnimation", tabIndex: "tabIndex", dialItems: "dialItems", themeColor: "themeColor", size: "size", rounded: "rounded", shape: "shape", disabled: "disabled", align: "align", offset: "offset", icon: "icon", iconClass: "iconClass", buttonClass: "buttonClass", dialClass: "dialClass", text: "text" }, outputs: { onBlur: "blur", onFocus: "focus", dialItemClick: "dialItemClick", open: "open", close: "close" }, features: [_angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵProvidersFeature"]([ 5029 FocusService, 5030 NavigationService, 5031 NAVIGATION_SETTINGS_PROVIDER$2, 5032 _progress_kendo_angular_l10n__WEBPACK_IMPORTED_MODULE_4__.LocalizationService, 5033 { 5034 provide: _progress_kendo_angular_l10n__WEBPACK_IMPORTED_MODULE_4__.L10N_PREFIX, 5035 useValue: 'kendo.floatingactionbutton' 5036 } 5037 ])], decls: 6, vars: 17, consts: [["type", "button", 1, "k-fab", "k-fab-solid", 3, "tabIndex", "ngClass", "disabled", "kendoEventsOutsideAngular", "scope", "focus", "blur"], ["button", ""], [4, "ngIf"], ["popupTemplate", ""], [3, "ngTemplateOutlet"], [3, "ngClass", 4, "ngIf"], ["class", "k-fab-text", 4, "ngIf"], [3, "ngClass"], [1, "k-fab-text"], ["kendoDialList", "", 3, "ngClass", "dialItems", "dialItemTemplate", "align", "click"]], template: function FloatingActionButtonComponent_Template(rf, ctx) { if (rf & 1) { 5038 _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵelementStart"](0, "button", 0, 1); 5039 _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵlistener"]("focus", function FloatingActionButtonComponent_Template_button_focus_0_listener() { return ctx.focusHandler(); })("blur", function FloatingActionButtonComponent_Template_button_blur_0_listener() { return ctx.blurHandler(); }); 5040 _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵtemplate"](2, FloatingActionButtonComponent_2_Template, 1, 1, null, 2); 5041 _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵtemplate"](3, FloatingActionButtonComponent_ng_container_3_Template, 3, 2, "ng-container", 2); 5042 _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵelementEnd"](); 5043 _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵtemplate"](4, FloatingActionButtonComponent_ng_template_4_Template, 1, 5, "ng-template", null, 3, _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵtemplateRefExtractor"]); 5044 } if (rf & 2) { 5045 _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵclassProp"]("k-disabled", ctx.disabled); 5046 _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵproperty"]("tabIndex", ctx.componentTabIndex)("ngClass", ctx.buttonClass)("disabled", ctx.disabled)("kendoEventsOutsideAngular", _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵpureFunction2"](14, _c11, ctx.keyDownHandler, ctx.clickHandler))("scope", ctx); 5047 _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵattribute"]("id", ctx.id)("role", ctx.role)("aria-disabled", ctx.disabled)("aria-expanded", ctx.ariaExpanded)("aria-haspopup", ctx.ariaHasPopup); 5048 _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵadvance"](2); 5049 _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵproperty"]("ngIf", ctx.fabTemplate); 5050 _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵadvance"](1); 5051 _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵproperty"]("ngIf", !ctx.fabTemplate); 5052 } }, directives: function () { return [_angular_common__WEBPACK_IMPORTED_MODULE_6__.NgClass, _progress_kendo_angular_common__WEBPACK_IMPORTED_MODULE_3__.EventsOutsideAngularDirective, _angular_common__WEBPACK_IMPORTED_MODULE_6__.NgIf, _angular_common__WEBPACK_IMPORTED_MODULE_6__.NgTemplateOutlet, DialListComponent]; }, encapsulation: 2 }); 5053(0,tslib__WEBPACK_IMPORTED_MODULE_5__.__decorate)([ 5054 (0,_angular_core__WEBPACK_IMPORTED_MODULE_0__.HostBinding)('class.k-pos-fixed'), 5055 (0,tslib__WEBPACK_IMPORTED_MODULE_5__.__metadata)("design:type", Boolean), 5056 (0,tslib__WEBPACK_IMPORTED_MODULE_5__.__metadata)("design:paramtypes", []) 5057], FloatingActionButtonComponent.prototype, "fixedClass", null); 5058(0,tslib__WEBPACK_IMPORTED_MODULE_5__.__decorate)([ 5059 (0,_angular_core__WEBPACK_IMPORTED_MODULE_0__.HostBinding)('class.k-pos-absolute'), 5060 (0,tslib__WEBPACK_IMPORTED_MODULE_5__.__metadata)("design:type", Boolean), 5061 (0,tslib__WEBPACK_IMPORTED_MODULE_5__.__metadata)("design:paramtypes", []) 5062], FloatingActionButtonComponent.prototype, "absoluteClass", null); 5063(0,tslib__WEBPACK_IMPORTED_MODULE_5__.__decorate)([ 5064 (0,_angular_core__WEBPACK_IMPORTED_MODULE_0__.HostBinding)('attr.dir'), 5065 (0,tslib__WEBPACK_IMPORTED_MODULE_5__.__metadata)("design:type", String) 5066], FloatingActionButtonComponent.prototype, "direction", void 0); 5067(0,tslib__WEBPACK_IMPORTED_MODULE_5__.__decorate)([ 5068 (0,_angular_core__WEBPACK_IMPORTED_MODULE_0__.ViewChild)('button', { static: true }), 5069 (0,tslib__WEBPACK_IMPORTED_MODULE_5__.__metadata)("design:type", _angular_core__WEBPACK_IMPORTED_MODULE_0__.ElementRef) 5070], FloatingActionButtonComponent.prototype, "button", void 0); 5071(0,tslib__WEBPACK_IMPORTED_MODULE_5__.__decorate)([ 5072 (0,_angular_core__WEBPACK_IMPORTED_MODULE_0__.ViewChild)('popupTemplate', { static: true }), 5073 (0,tslib__WEBPACK_IMPORTED_MODULE_5__.__metadata)("design:type", _angular_core__WEBPACK_IMPORTED_MODULE_0__.TemplateRef) 5074], FloatingActionButtonComponent.prototype, "popupTemplate", void 0); 5075(0,tslib__WEBPACK_IMPORTED_MODULE_5__.__decorate)([ 5076 (0,_angular_core__WEBPACK_IMPORTED_MODULE_0__.ContentChild)(DialItemTemplateDirective, { static: true }), 5077 (0,tslib__WEBPACK_IMPORTED_MODULE_5__.__metadata)("design:type", DialItemTemplateDirective) 5078], FloatingActionButtonComponent.prototype, "dialItemTemplate", void 0); 5079(0,tslib__WEBPACK_IMPORTED_MODULE_5__.__decorate)([ 5080 (0,_angular_core__WEBPACK_IMPORTED_MODULE_0__.ContentChild)(FloatingActionButtonTemplateDirective, { static: true }), 5081 (0,tslib__WEBPACK_IMPORTED_MODULE_5__.__metadata)("design:type", FloatingActionButtonTemplateDirective) 5082], FloatingActionButtonComponent.prototype, "fabTemplate", void 0); 5083(0,tslib__WEBPACK_IMPORTED_MODULE_5__.__decorate)([ 5084 (0,_angular_core__WEBPACK_IMPORTED_MODULE_0__.Input)(), 5085 (0,tslib__WEBPACK_IMPORTED_MODULE_5__.__metadata)("design:type", String), 5086 (0,tslib__WEBPACK_IMPORTED_MODULE_5__.__metadata)("design:paramtypes", [String]) 5087], FloatingActionButtonComponent.prototype, "themeColor", null); 5088(0,tslib__WEBPACK_IMPORTED_MODULE_5__.__decorate)([ 5089 (0,_angular_core__WEBPACK_IMPORTED_MODULE_0__.Input)(), 5090 (0,tslib__WEBPACK_IMPORTED_MODULE_5__.__metadata)("design:type", String), 5091 (0,tslib__WEBPACK_IMPORTED_MODULE_5__.__metadata)("design:paramtypes", [String]) 5092], FloatingActionButtonComponent.prototype, "size", null); 5093(0,tslib__WEBPACK_IMPORTED_MODULE_5__.__decorate)([ 5094 (0,_angular_core__WEBPACK_IMPORTED_MODULE_0__.Input)(), 5095 (0,tslib__WEBPACK_IMPORTED_MODULE_5__.__metadata)("design:type", String), 5096 (0,tslib__WEBPACK_IMPORTED_MODULE_5__.__metadata)("design:paramtypes", [String]) 5097], FloatingActionButtonComponent.prototype, "rounded", null); 5098(0,tslib__WEBPACK_IMPORTED_MODULE_5__.__decorate)([ 5099 (0,_angular_core__WEBPACK_IMPORTED_MODULE_0__.Input)(), 5100 (0,tslib__WEBPACK_IMPORTED_MODULE_5__.__metadata)("design:type", String), 5101 (0,tslib__WEBPACK_IMPORTED_MODULE_5__.__metadata)("design:paramtypes", [String]) 5102], FloatingActionButtonComponent.prototype, "shape", null); 5103(0,tslib__WEBPACK_IMPORTED_MODULE_5__.__decorate)([ 5104 (0,_angular_core__WEBPACK_IMPORTED_MODULE_0__.Input)(), 5105 (0,tslib__WEBPACK_IMPORTED_MODULE_5__.__metadata)("design:type", Boolean), 5106 (0,tslib__WEBPACK_IMPORTED_MODULE_5__.__metadata)("design:paramtypes", [Boolean]) 5107], FloatingActionButtonComponent.prototype, "disabled", null); 5108(0,tslib__WEBPACK_IMPORTED_MODULE_5__.__decorate)([ 5109 (0,_angular_core__WEBPACK_IMPORTED_MODULE_0__.Input)(), 5110 (0,tslib__WEBPACK_IMPORTED_MODULE_5__.__metadata)("design:type", Object), 5111 (0,tslib__WEBPACK_IMPORTED_MODULE_5__.__metadata)("design:paramtypes", [Object]) 5112], FloatingActionButtonComponent.prototype, "align", null); 5113(0,tslib__WEBPACK_IMPORTED_MODULE_5__.__decorate)([ 5114 (0,_angular_core__WEBPACK_IMPORTED_MODULE_0__.Input)(), 5115 (0,tslib__WEBPACK_IMPORTED_MODULE_5__.__metadata)("design:type", Object), 5116 (0,tslib__WEBPACK_IMPORTED_MODULE_5__.__metadata)("design:paramtypes", [Object]) 5117], FloatingActionButtonComponent.prototype, "offset", null); 5118(0,tslib__WEBPACK_IMPORTED_MODULE_5__.__decorate)([ 5119 (0,_angular_core__WEBPACK_IMPORTED_MODULE_0__.Input)(), 5120 (0,tslib__WEBPACK_IMPORTED_MODULE_5__.__metadata)("design:type", String) 5121], FloatingActionButtonComponent.prototype, "positionMode", void 0); 5122(0,tslib__WEBPACK_IMPORTED_MODULE_5__.__decorate)([ 5123 (0,_angular_core__WEBPACK_IMPORTED_MODULE_0__.Input)(), 5124 (0,tslib__WEBPACK_IMPORTED_MODULE_5__.__metadata)("design:type", String) 5125], FloatingActionButtonComponent.prototype, "icon", void 0); 5126(0,tslib__WEBPACK_IMPORTED_MODULE_5__.__decorate)([ 5127 (0,_angular_core__WEBPACK_IMPORTED_MODULE_0__.Input)(), 5128 (0,tslib__WEBPACK_IMPORTED_MODULE_5__.__metadata)("design:type", String) 5129], FloatingActionButtonComponent.prototype, "iconClass", void 0); 5130(0,tslib__WEBPACK_IMPORTED_MODULE_5__.__decorate)([ 5131 (0,_angular_core__WEBPACK_IMPORTED_MODULE_0__.Input)(), 5132 (0,tslib__WEBPACK_IMPORTED_MODULE_5__.__metadata)("design:type", Object) 5133], FloatingActionButtonComponent.prototype, "buttonClass", void 0); 5134(0,tslib__WEBPACK_IMPORTED_MODULE_5__.__decorate)([ 5135 (0,_angular_core__WEBPACK_IMPORTED_MODULE_0__.Input)(), 5136 (0,tslib__WEBPACK_IMPORTED_MODULE_5__.__metadata)("design:type", Object) 5137], FloatingActionButtonComponent.prototype, "dialClass", void 0); 5138(0,tslib__WEBPACK_IMPORTED_MODULE_5__.__decorate)([ 5139 (0,_angular_core__WEBPACK_IMPORTED_MODULE_0__.Input)(), 5140 (0,tslib__WEBPACK_IMPORTED_MODULE_5__.__metadata)("design:type", String) 5141], FloatingActionButtonComponent.prototype, "text", void 0); 5142(0,tslib__WEBPACK_IMPORTED_MODULE_5__.__decorate)([ 5143 (0,_angular_core__WEBPACK_IMPORTED_MODULE_0__.Input)(), 5144 (0,tslib__WEBPACK_IMPORTED_MODULE_5__.__metadata)("design:type", Object) 5145], FloatingActionButtonComponent.prototype, "dialItemAnimation", void 0); 5146(0,tslib__WEBPACK_IMPORTED_MODULE_5__.__decorate)([ 5147 (0,_angular_core__WEBPACK_IMPORTED_MODULE_0__.Input)(), 5148 (0,tslib__WEBPACK_IMPORTED_MODULE_5__.__metadata)("design:type", Number) 5149], FloatingActionButtonComponent.prototype, "tabIndex", void 0); 5150(0,tslib__WEBPACK_IMPORTED_MODULE_5__.__decorate)([ 5151 (0,_angular_core__WEBPACK_IMPORTED_MODULE_0__.Input)(), 5152 (0,tslib__WEBPACK_IMPORTED_MODULE_5__.__metadata)("design:type", Array) 5153], FloatingActionButtonComponent.prototype, "dialItems", void 0); 5154(0,tslib__WEBPACK_IMPORTED_MODULE_5__.__decorate)([ 5155 (0,_angular_core__WEBPACK_IMPORTED_MODULE_0__.Output)('blur'), 5156 (0,tslib__WEBPACK_IMPORTED_MODULE_5__.__metadata)("design:type", _angular_core__WEBPACK_IMPORTED_MODULE_0__.EventEmitter) 5157], FloatingActionButtonComponent.prototype, "onBlur", void 0); 5158(0,tslib__WEBPACK_IMPORTED_MODULE_5__.__decorate)([ 5159 (0,_angular_core__WEBPACK_IMPORTED_MODULE_0__.Output)('focus'), 5160 (0,tslib__WEBPACK_IMPORTED_MODULE_5__.__metadata)("design:type", _angular_core__WEBPACK_IMPORTED_MODULE_0__.EventEmitter) 5161], FloatingActionButtonComponent.prototype, "onFocus", void 0); 5162(0,tslib__WEBPACK_IMPORTED_MODULE_5__.__decorate)([ 5163 (0,_angular_core__WEBPACK_IMPORTED_MODULE_0__.Output)('dialItemClick'), 5164 (0,tslib__WEBPACK_IMPORTED_MODULE_5__.__metadata)("design:type", _angular_core__WEBPACK_IMPORTED_MODULE_0__.EventEmitter) 5165], FloatingActionButtonComponent.prototype, "dialItemClick", void 0); 5166(0,tslib__WEBPACK_IMPORTED_MODULE_5__.__decorate)([ 5167 (0,_angular_core__WEBPACK_IMPORTED_MODULE_0__.Output)(), 5168 (0,tslib__WEBPACK_IMPORTED_MODULE_5__.__metadata)("design:type", _angular_core__WEBPACK_IMPORTED_MODULE_0__.EventEmitter) 5169], FloatingActionButtonComponent.prototype, "open", void 0); 5170(0,tslib__WEBPACK_IMPORTED_MODULE_5__.__decorate)([ 5171 (0,_angular_core__WEBPACK_IMPORTED_MODULE_0__.Output)(), 5172 (0,tslib__WEBPACK_IMPORTED_MODULE_5__.__metadata)("design:type", _angular_core__WEBPACK_IMPORTED_MODULE_0__.EventEmitter) 5173], FloatingActionButtonComponent.prototype, "close", void 0); 5174FloatingActionButtonComponent = (0,tslib__WEBPACK_IMPORTED_MODULE_5__.__decorate)([ (0,tslib__WEBPACK_IMPORTED_MODULE_5__.__metadata)("design:paramtypes", [_angular_core__WEBPACK_IMPORTED_MODULE_0__.Renderer2, 5175 _angular_core__WEBPACK_IMPORTED_MODULE_0__.ElementRef, 5176 FocusService, 5177 NavigationService, 5178 _angular_core__WEBPACK_IMPORTED_MODULE_0__.NgZone, 5179 _progress_kendo_angular_popup__WEBPACK_IMPORTED_MODULE_10__.PopupService, 5180 _angular_animations__WEBPACK_IMPORTED_MODULE_11__.AnimationBuilder, 5181 _progress_kendo_angular_l10n__WEBPACK_IMPORTED_MODULE_4__.LocalizationService]) 5182], FloatingActionButtonComponent); 5183 5184/** 5185 * @hidden 5186 */ 5187let DialListComponent = class DialListComponent { 5188 constructor(focusService, cdr) { 5189 this.focusService = focusService; 5190 this.cdr = cdr; 5191 this.hostClass = true; 5192 this.subscriptions = new rxjs__WEBPACK_IMPORTED_MODULE_12__.Subscription(); 5193 this.subscriptions.add(this.focusService.onFocus.subscribe(() => this.cdr.detectChanges())); 5194 } 5195 get bottomClass() { 5196 return this.align.vertical === 'top' || this.align.vertical === 'middle'; 5197 } 5198 get topClass() { 5199 return this.align.vertical === 'bottom'; 5200 } 5201 isFocused(index) { 5202 return this.focusService.isFocused(index); 5203 } 5204 ngOnDestroy() { 5205 this.subscriptions.unsubscribe(); 5206 } 5207}; 5208DialListComponent.ɵfac = function DialListComponent_Factory(t) { return new (t || DialListComponent)(_angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵdirectiveInject"](FocusService), _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵdirectiveInject"](_angular_core__WEBPACK_IMPORTED_MODULE_0__.ChangeDetectorRef)); }; 5209DialListComponent.ɵcmp = /*@__PURE__*/ _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵdefineComponent"]({ type: DialListComponent, selectors: [["", "kendoDialList", ""]], hostVars: 6, hostBindings: function DialListComponent_HostBindings(rf, ctx) { if (rf & 2) { 5210 _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵclassProp"]("k-fab-items", ctx.hostClass)("k-fab-items-bottom", ctx.bottomClass)("k-fab-items-top", ctx.topClass); 5211 } }, inputs: { dialItems: "dialItems", dialItemTemplate: "dialItemTemplate", align: "align" }, attrs: _c12, decls: 1, vars: 1, consts: [[4, "ngFor", "ngForOf"], ["kendoButtonFocusable", "", "kendoDialItem", "", 3, "item", "index", "dialItemTemplate", "isFocused", "ngClass", "ngStyle", "align"]], template: function DialListComponent_Template(rf, ctx) { if (rf & 1) { 5212 _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵtemplate"](0, DialListComponent_ng_container_0_Template, 2, 7, "ng-container", 0); 5213 } if (rf & 2) { 5214 _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵproperty"]("ngForOf", ctx.dialItems); 5215 } }, directives: function () { return [_angular_common__WEBPACK_IMPORTED_MODULE_6__.NgForOf, FocusableDirective, DialItemComponent, _angular_common__WEBPACK_IMPORTED_MODULE_6__.NgClass, _angular_common__WEBPACK_IMPORTED_MODULE_6__.NgStyle]; }, encapsulation: 2 }); 5216(0,tslib__WEBPACK_IMPORTED_MODULE_5__.__decorate)([ 5217 (0,_angular_core__WEBPACK_IMPORTED_MODULE_0__.HostBinding)('class.k-fab-items'), 5218 (0,tslib__WEBPACK_IMPORTED_MODULE_5__.__metadata)("design:type", Boolean) 5219], DialListComponent.prototype, "hostClass", void 0); 5220(0,tslib__WEBPACK_IMPORTED_MODULE_5__.__decorate)([ 5221 (0,_angular_core__WEBPACK_IMPORTED_MODULE_0__.HostBinding)('class.k-fab-items-bottom'), 5222 (0,tslib__WEBPACK_IMPORTED_MODULE_5__.__metadata)("design:type", Boolean), 5223 (0,tslib__WEBPACK_IMPORTED_MODULE_5__.__metadata)("design:paramtypes", []) 5224], DialListComponent.prototype, "bottomClass", null); 5225(0,tslib__WEBPACK_IMPORTED_MODULE_5__.__decorate)([ 5226 (0,_angular_core__WEBPACK_IMPORTED_MODULE_0__.HostBinding)('class.k-fab-items-top'), 5227 (0,tslib__WEBPACK_IMPORTED_MODULE_5__.__metadata)("design:type", Boolean), 5228 (0,tslib__WEBPACK_IMPORTED_MODULE_5__.__metadata)("design:paramtypes", []) 5229], DialListComponent.prototype, "topClass", null); 5230(0,tslib__WEBPACK_IMPORTED_MODULE_5__.__decorate)([ 5231
5231 (0,_angular_core__WEBPACK_IMPORTED_MODULE_0__.Input)(), 5232 (0,tslib__WEBPACK_IMPORTED_MODULE_5__.__metadata)("design:type", Array) 5233], DialListComponent.prototype, "dialItems", void 0); 5234(0,tslib__WEBPACK_IMPORTED_MODULE_5__.__decorate)([ 5235 (0,_angular_core__WEBPACK_IMPORTED_MODULE_0__.Input)(), 5236 (0,tslib__WEBPACK_IMPORTED_MODULE_5__.__metadata)("design:type", _angular_core__WEBPACK_IMPORTED_MODULE_0__.TemplateRef) 5237], DialListComponent.prototype, "dialItemTemplate", void 0); 5238(0,tslib__WEBPACK_IMPORTED_MODULE_5__.__decorate)([ 5239 (0,_angular_core__WEBPACK_IMPORTED_MODULE_0__.Input)(), 5240 (0,tslib__WEBPACK_IMPORTED_MODULE_5__.__metadata)("design:type", Object) 5241], DialListComponent.prototype, "align", void 0); 5242DialListComponent = (0,tslib__WEBPACK_IMPORTED_MODULE_5__.__decorate)([ (0,tslib__WEBPACK_IMPORTED_MODULE_5__.__metadata)("design:paramtypes", [FocusService, _angular_core__WEBPACK_IMPORTED_MODULE_0__.ChangeDetectorRef]) 5243], DialListComponent); 5244 5245/** 5246 * @hidden 5247 */ 5248let DialItemComponent = class DialItemComponent { 5249 constructor(element, renderer, localisationService) { 5250 this.element = element; 5251 this.renderer = renderer; 5252 this.localisationService = localisationService; 5253 this.hostClass = true; 5254 this.role = 'menuitem'; 5255 } 5256 get disabledClass() { 5257 return this.item.disabled; 5258 } 5259 get title() { 5260 const label = this.item.label; 5261 return label ? label : this.itemTitle; 5262 } 5263 get indexAttr() { 5264 return this.index; 5265 } 5266 get iconClasses() { 5267 const classes = []; 5268 if (this.item.iconClass) { 5269 classes.push(`${this.item.iconClass}`); 5270 } 5271 if (this.item.icon) { 5272 classes.push(`k-fab-item-icon k-icon k-i-${this.item.icon}`); 5273 } 5274 return classes; 5275 } 5276 get itemTitle() { 5277 const icon = this.item.icon; 5278 const itemTitle = this.item.itemTitle; 5279 return (icon && itemTitle) ? itemTitle : icon; 5280 } 5281 ngAfterViewInit() { 5282 const element = this.element.nativeElement; 5283 const rtl = this.localisationService.rtl; 5284 const hAlign = this.align.horizontal; 5285 this.renderer.addClass(element, this.getTextDirectionClass(rtl, hAlign)); 5286 } 5287 getTextDirectionClass(rtl, hAlign) { 5288 const dir = rtl ? 'rtl' : 'ltr'; 5289 const align = hAlign === 'end' ? 'end' : 'start'; 5290 const directions = { 5291 rtl: { end: 'k-text-left', start: 'k-text-right' }, 5292 ltr: { start: 'k-text-left', end: 'k-text-right' } 5293 }; 5294 return directions[dir][align]; 5295 } 5296}; 5297DialItemComponent.ɵfac = function DialItemComponent_Factory(t) { return new (t || DialItemComponent)(_angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵdirectiveInject"](_angular_core__WEBPACK_IMPORTED_MODULE_0__.ElementRef), _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵdirectiveInject"](_angular_core__WEBPACK_IMPORTED_MODULE_0__.Renderer2), _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵdirectiveInject"](_progress_kendo_angular_l10n__WEBPACK_IMPORTED_MODULE_4__.LocalizationService)); }; 5298DialItemComponent.ɵcmp = /*@__PURE__*/ _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵdefineComponent"]({ type: DialItemComponent, selectors: [["", "kendoDialItem", ""]], hostVars: 9, hostBindings: function DialItemComponent_HostBindings(rf, ctx) { if (rf & 2) { 5299 _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵattribute"]("role", ctx.role)("aria-disabled", ctx.disabledClass)("title", ctx.title)("aria-label", ctx.title)("data-fab-item-index", ctx.indexAttr); 5300 _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵclassProp"]("k-fab-item", ctx.hostClass)("k-disabled", ctx.disabledClass); 5301 } }, inputs: { cssClass: "cssClass", cssStyle: "cssStyle", isFocused: "isFocused", index: "index", item: "item", dialItemTemplate: "dialItemTemplate", align: "align" }, attrs: _c13, decls: 2, vars: 2, consts: [[4, "ngIf"], [3, "ngTemplateOutlet", "ngTemplateOutletContext"], ["class", "k-fab-item-text", 4, "ngIf"], [3, "ngClass", 4, "ngIf"], [1, "k-fab-item-text"], [3, "ngClass"]], template: function DialItemComponent_Template(rf, ctx) { if (rf & 1) { 5302 _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵtemplate"](0, DialItemComponent_0_Template, 1, 6, null, 0); 5303 _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵtemplate"](1, DialItemComponent_ng_container_1_Template, 3, 2, "ng-container", 0); 5304 } if (rf & 2) { 5305 _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵproperty"]("ngIf", ctx.dialItemTemplate); 5306 _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵadvance"](1); 5307 _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵproperty"]("ngIf", !ctx.dialItemTemplate); 5308 } }, directives: [_angular_common__WEBPACK_IMPORTED_MODULE_6__.NgIf, _angular_common__WEBPACK_IMPORTED_MODULE_6__.NgTemplateOutlet, _angular_common__WEBPACK_IMPORTED_MODULE_6__.NgClass], encapsulation: 2 }); 5309(0,tslib__WEBPACK_IMPORTED_MODULE_5__.__decorate)([ 5310 (0,_angular_core__WEBPACK_IMPORTED_MODULE_0__.HostBinding)('class.k-fab-item'), 5311 (0,tslib__WEBPACK_IMPORTED_MODULE_5__.__metadata)("design:type", Boolean) 5312], DialItemComponent.prototype, "hostClass", void 0); 5313(0,tslib__WEBPACK_IMPORTED_MODULE_5__.__decorate)([ 5314 (0,_angular_core__WEBPACK_IMPORTED_MODULE_0__.HostBinding)('attr.role'), 5315 (0,tslib__WEBPACK_IMPORTED_MODULE_5__.__metadata)("design:type", String) 5316], DialItemComponent.prototype, "role", void 0); 5317(0,tslib__WEBPACK_IMPORTED_MODULE_5__.__decorate)([ 5318 (0,_angular_core__WEBPACK_IMPORTED_MODULE_0__.HostBinding)('attr.aria-disabled'), 5319 (0,_angular_core__WEBPACK_IMPORTED_MODULE_0__.HostBinding)('class.k-disabled'), 5320 (0,tslib__WEBPACK_IMPORTED_MODULE_5__.__metadata)("design:type", Boolean), 5321 (0,tslib__WEBPACK_IMPORTED_MODULE_5__.__metadata)("design:paramtypes", []) 5322], DialItemComponent.prototype, "disabledClass", null); 5323(0,tslib__WEBPACK_IMPORTED_MODULE_5__.__decorate)([ 5324 (0,_angular_core__WEBPACK_IMPORTED_MODULE_0__.HostBinding)('attr.title'), 5325 (0,_angular_core__WEBPACK_IMPORTED_MODULE_0__.HostBinding)('attr.aria-label'), 5326 (0,tslib__WEBPACK_IMPORTED_MODULE_5__.__metadata)("design:type", String), 5327 (0,tslib__WEBPACK_IMPORTED_MODULE_5__.__metadata)("design:paramtypes", []) 5328], DialItemComponent.prototype, "title", null); 5329(0,tslib__WEBPACK_IMPORTED_MODULE_5__.__decorate)([ 5330 (0,_angular_core__WEBPACK_IMPORTED_MODULE_0__.HostBinding)('attr.data-fab-item-index'),
5331 (0,tslib__WEBPACK_IMPORTED_MODULE_5__.__metadata)("design:type", String), 5332 (0,tslib__WEBPACK_IMPORTED_MODULE_5__.__metadata)("design:paramtypes", []) 5333], DialItemComponent.prototype, "indexAttr", null); 5334(0,tslib__WEBPACK_IMPORTED_MODULE_5__.__decorate)([ 5335 (0,_angular_core__WEBPACK_IMPORTED_MODULE_0__.Input)(), 5336 (0,tslib__WEBPACK_IMPORTED_MODULE_5__.__metadata)("design:type", Object) 5337], DialItemComponent.prototype, "cssClass", void 0); 5338(0,tslib__WEBPACK_IMPORTED_MODULE_5__.__decorate)([ 5339 (0,_angular_core__WEBPACK_IMPORTED_MODULE_0__.Input)(), 5340 (0,tslib__WEBPACK_IMPORTED_MODULE_5__.__metadata)("design:type", Object) 5341], DialItemComponent.prototype, "cssStyle", void 0); 5342(0,tslib__WEBPACK_IMPORTED_MODULE_5__.__decorate)([ 5343 (0,_angular_core__WEBPACK_IMPORTED_MODULE_0__.Input)(), 5344 (0,tslib__WEBPACK_IMPORTED_MODULE_5__.__metadata)("design:type", Boolean) 5345], DialItemComponent.prototype, "isFocused", void 0); 5346(0,tslib__WEBPACK_IMPORTED_MODULE_5__.__decorate)([ 5347 (0,_angular_core__WEBPACK_IMPORTED_MODULE_0__.Input)(), 5348 (0,tslib__WEBPACK_IMPORTED_MODULE_5__.__metadata)("design:type", Object) 5349], DialItemComponent.prototype, "index", void 0); 5350(0,tslib__WEBPACK_IMPORTED_MODULE_5__.__decorate)([ 5351 (0,_angular_core__WEBPACK_IMPORTED_MODULE_0__.Input)(), 5352 (0,tslib__WEBPACK_IMPORTED_MODULE_5__.__metadata)("design:type", Object) 5353], DialItemComponent.prototype, "item", void 0); 5354(0,tslib__WEBPACK_IMPORTED_MODULE_5__.__decorate)([ 5355 (0,_angular_core__WEBPACK_IMPORTED_MODULE_0__.Input)(), 5356 (0,tslib__WEBPACK_IMPORTED_MODULE_5__.__metadata)("design:type", _angular_core__WEBPACK_IMPORTED_MODULE_0__.TemplateRef) 5357], DialItemComponent.prototype, "dialItemTemplate", void 0); 5358(0,tslib__WEBPACK_IMPORTED_MODULE_5__.__decorate)([ 5359 (0,_angular_core__WEBPACK_IMPORTED_MODULE_0__.Input)(), 5360 (0,tslib__WEBPACK_IMPORTED_MODULE_5__.__metadata)("design:type", Object) 5361], DialItemComponent.prototype, "align", void 0); 5362DialItemComponent = (0,tslib__WEBPACK_IMPORTED_MODULE_5__.__decorate)([ (0,tslib__WEBPACK_IMPORTED_MODULE_5__.__metadata)("design:paramtypes", [_angular_core__WEBPACK_IMPORTED_MODULE_0__.ElementRef, 5363 _angular_core__WEBPACK_IMPORTED_MODULE_0__.Renderer2, 5364 _progress_kendo_angular_l10n__WEBPACK_IMPORTED_MODULE_4__.LocalizationService]) 5365], DialItemComponent); 5366 5367const exportedModules$1 = [ 5368 FloatingActionButtonComponent, 5369 DialItemTemplateDirective, 5370 FloatingActionButtonTemplateDirective 5371]; 5372const declarations$1 = [ 5373 ...exportedModules$1, 5374 DialListComponent, 5375 DialItemComponent 5376]; 5377/** 5378 * Represents the [NgModule]({{ site.data.urls.angular['ngmoduleapi'] }}) 5379 * definition for the FloatingActionButton component. 5380 * 5381 * @example 5382 * 5383 * ```ts-no-run 5384 * // Import the FloatingActionButton module 5385 * import { FloatingActionButtonModule } from '@progress/kendo-angular-buttons'; 5386 * 5387 * // The browser platform with a compiler 5388 * import { platformBrowserDynamic } from '@angular/platform-browser-dynamic'; 5389 * 5390 * import { NgModule } from '@angular/core'; 5391 * 5392 * // Import the app component 5393 * import { AppComponent } from './app.component'; 5394 * 5395 * // Define the app module 5396 * _@NgModule({ 5397 * declarations: [AppComponent], // declare app component 5398 * imports: [BrowserModule, FloatingActionButtonModule], // import FloatingActionButton module 5399 * bootstrap: [AppComponent] 5400 * }) 5401 * export class AppModule {} 5402 * 5403 * ``` 5404 */ 5405let FloatingActionButtonModule = class FloatingActionButtonModule { 5406}; 5407FloatingActionButtonModule.ɵfac = function FloatingActionButtonModule_Factory(t) { return new (t || FloatingActionButtonModule)(); }; 5408FloatingActionButtonModule.ɵmod = /*@__PURE__*/ _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵdefineNgModule"]({ type: FloatingActionButtonModule }); 5409FloatingActionButtonModule.ɵinj = /*@__PURE__*/ _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵdefineInjector"]({ imports: [[_angular_common__WEBPACK_IMPORTED_MODULE_6__.CommonModule, _progress_kendo_angular_popup__WEBPACK_IMPORTED_MODULE_10__.PopupModule, ListModule, _progress_kendo_angular_common__WEBPACK_IMPORTED_MODULE_3__.EventsModule]] }); 5410 5411/** 5412 * Represents the [NgModule]({{ site.data.urls.angular['ngmodules'] }}) 5413 * definition for the Buttons components. 5414 * 5415 * @example 5416 * 5417 * ```ts-no-run 5418 * // Import the Buttons module 5419 * import { ButtonsModule } from '@progress/kendo-angular-buttons'; 5420 * 5421 * // The browser platform with a compiler 5422 * import { platformBrowserDynamic } from '@angular/platform-browser-dynamic'; 5423 * 5424 * import { NgModule } from '@angular/core'; 5425 * 5426 * // Import the app component 5427 * import { AppComponent } from './app.component'; 5428 * 5429 * // Define the app module 5430 * _@NgModule({ 5431 * declarations: [AppComponent], // declare app component 5432 * imports: [BrowserModule, ButtonsModule], // import Buttons module 5433 * bootstrap: [AppComponent] 5434 * }) 5435 * export class AppModule {} 5436 * 5437 * // Compile and launch the module 5438 * platformBrowserDynamic().bootstrapModule(AppModule); 5439 * 5440 * ``` 5441 */ 5442let ButtonsModule = class ButtonsModule { 5443}; 5444ButtonsModule.ɵfac = function ButtonsModule_Factory(t) { return new (t || ButtonsModule)(); }; 5445ButtonsModule.ɵmod = /*@__PURE__*/ _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵdefineNgModule"]({ type: ButtonsModule }); 5446ButtonsModule.ɵinj = /*@__PURE__*/ _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵdefineInjector"]({ imports: [ButtonGroupModule, ButtonModule, SplitButtonModule, DropDownButtonModule, ChipModule, FloatingActionButtonModule] }); 5447(function () { (typeof ngDevMode === "undefined" || ngDevMode) && _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵsetClassMetadata"](KendoButtonService, [{ 5448 type: _angular_core__WEBPACK_IMPORTED_MODULE_0__.Injectable 5449 }], function () { return []; }, null); })(); 5450(function () { (typeof ngDevMode === "undefined" || ngDevMode) && _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵsetClassMetadata"](ButtonDirective, [{ 5451 type: _angular_core__WEBPACK_IMPORTED_MODULE_0__.Directive, 5452 args: [{ 5453 exportAs: 'kendoButton', 5454 providers: [ 5455 _progress_kendo_angular_l10n__WEBPACK_IMPORTED_MODULE_4__.LocalizationService, 5456 { 5457 provide: _progress_kendo_angular_l10n__WEBPACK_IMPORTED_MODULE_4__.L10N_PREFIX, 5458 useValue: 'kendo.button' 5459 } 5460 ], 5461 selector: 'button[kendoButton], span[kendoButton]' 5462 }] 5463 }], function () { return [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_0__.ElementRef }, { type: _angular_core__WEBPACK_IMPORTED_MODULE_0__.Renderer2 }, { type: KendoButtonService, decorators: [{ 5464 type: _angular_core__WEBPACK_IMPORTED_MODULE_0__.Optional 5465 }] }, { type: _progress_kendo_angular_l10n__WEBPACK_IMPORTED_MODULE_4__.LocalizationService }, { type: _angular_core__WEBPACK_IMPORTED_MODULE_0__.NgZone }]; }, { toggleable: [{ 5466 type: _angular_core__WEBPACK_IMPORTED_MODULE_0__.Input 5467 }], role: [{ 5468 type: _angular_core__WEBPACK_IMPORTED_MODULE_0__.Input 5469 }], selectedChange: [{ 5470 type: _angular_core__WEBPACK_IMPORTED_MODULE_0__.Output 5471 }], click: [{ 5472 type: _angular_core__WEBPACK_IMPORTED_MODULE_0__.Output 5473 }], togglable: [{ 5474 type: _angular_core__WEBPACK_IMPORTED_MODULE_0__.Input 5475 }], selected: [{ 5476 type: _angular_core__WEBPACK_IMPORTED_MODULE_0__.Input 5477 }], tabIndex: [{ 5478 type: _angular_core__WEBPACK_IMPORTED_MODULE_0__.Input 5479 }], icon: [{ 5480 type: _angular_core__WEBPACK_IMPORTED_MODULE_0__.Input 5481 }], iconClass: [{ 5482 type: _angular_core__WEBPACK_IMPORTED_MODULE_0__.Input 5483 }], imageUrl: [{ 5484 type: _angular_core__WEBPACK_IMPORTED_MODULE_0__.Input 5485 }], disabled: [{ 5486 type: _angular_core__WEBPACK_IMPORTED_MODULE_0__.Input 5487 }], size: [{ 5488 type: _angular_core__WEBPACK_IMPORTED_MODULE_0__.Input 5489 }], rounded: [{ 5490 type: _angular_core__WEBPACK_IMPORTED_MODULE_0__.Input 5491 }], fillMode: [{ 5492 type: _angular_core__WEBPACK_IMPORTED_MODULE_0__.Input 5493 }
5493], themeColor: [{ 5494 type: _angular_core__WEBPACK_IMPORTED_MODULE_0__.Input 5495 }], shape: [{ 5496 type: _angular_core__WEBPACK_IMPORTED_MODULE_0__.Input 5497 }], classButton: [{ 5498 type: _angular_core__WEBPACK_IMPORTED_MODULE_0__.HostBinding, 5499 args: ['class.k-button'] 5500 }], isToggleable: [{ 5501 type: _angular_core__WEBPACK_IMPORTED_MODULE_0__.HostBinding, 5502 args: ['class.k-toggle-button'] 5503 }], roleSetter: [{ 5504 type: _angular_core__WEBPACK_IMPORTED_MODULE_0__.HostBinding, 5505 args: ['attr.role'] 5506 }], classDisabled: [{ 5507 type: _angular_core__WEBPACK_IMPORTED_MODULE_0__.HostBinding, 5508 args: ['attr.aria-disabled'] 5509 }, { 5510 type: _angular_core__WEBPACK_IMPORTED_MODULE_0__.HostBinding, 5511 args: ['class.k-disabled'] 5512 }], classActive: [{ 5513 type: _angular_core__WEBPACK_IMPORTED_MODULE_0__.HostBinding, 5514 args: ['class.k-selected'] 5515 }], getDirection: [{ 5516 type: _angular_core__WEBPACK_IMPORTED_MODULE_0__.HostBinding, 5517 args: ['attr.dir'] 5518 }], 5519 /** 5520 * @hidden 5521 */ 5522 onFocus: [{ 5523 type: _angular_core__WEBPACK_IMPORTED_MODULE_0__.HostListener, 5524 args: ['focus'] 5525 }], 5526 /** 5527 * @hidden 5528 */ 5529 onBlur: [{ 5530 type: _angular_core__WEBPACK_IMPORTED_MODULE_0__.HostListener, 5531 args: ['blur'] 5532 }], primary: [{ 5533 type: _angular_core__WEBPACK_IMPORTED_MODULE_0__.Input 5534 }], look: [{ 5535 type: _angular_core__WEBPACK_IMPORTED_MODULE_0__.Input 5536 }] }); })(); 5537(function () { (typeof ngDevMode === "undefined" || ngDevMode) && _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵsetClassMetadata"](ButtonGroupComponent, [{ 5538 type: _angular_core__WEBPACK_IMPORTED_MODULE_0__.Component, 5539 args: [{ 5540 exportAs: 'kendoButtonGroup', 5541 providers: [ 5542 KendoButtonService, 5543 _progress_kendo_angular_l10n__WEBPACK_IMPORTED_MODULE_4__.LocalizationService, 5544 { 5545 provide: _progress_kendo_angular_l10n__WEBPACK_IMPORTED_MODULE_4__.L10N_PREFIX, 5546 useValue: 'kendo.buttongroup' 5547 } 5548 ], 5549 selector: 'kendo-buttongroup', 5550 template: ` 5551 <ng-content select="[kendoButton]"></ng-content> 5552 ` 5553 }] 5554 }], function () { return [{ type: KendoButtonService }, { type: _progress_kendo_angular_l10n__WEBPACK_IMPORTED_MODULE_4__.LocalizationService }, { type: _angular_core__WEBPACK_IMPORTED_MODULE_0__.ElementRef }]; }, { selection: [{ 5555 type: _angular_core__WEBPACK_IMPORTED_MODULE_0__.Input, 5556 args: ['selection'] 5557 }], navigate: [{ 5558 type: _angular_core__WEBPACK_IMPORTED_MODULE_0__.Output 5559 }], tabIndex: [{ 5560 type: _angular_core__WEBPACK_IMPORTED_MODULE_0__.Input 5561 }], wrapperClass: [{ 5562 type: _angular_core__WEBPACK_IMPORTED_MODULE_0__.HostBinding, 5563 args: ['class.k-button-group'] 5564 }], disabledClass: [{ 5565 type: _angular_core__WEBPACK_IMPORTED_MODULE_0__.HostBinding, 5566 args: ['class.k-disabled'] 5567 }], stretchedClass: [{ 5568 type: _angular_core__WEBPACK_IMPORTED_MODULE_0__.HostBinding, 5569 args: ['class.k-button-group-stretched'] 5570 }], getRole: [{ 5571 type: _angular_core__WEBPACK_IMPORTED_MODULE_0__.HostBinding, 5572 args: ['attr.role'] 5573 }], dir: [{ 5574 type: _angular_core__WEBPACK_IMPORTED_MODULE_0__.HostBinding, 5575 args: ['attr.dir'] 5576 }], ariaDisabled: [{ 5577 type: _angular_core__WEBPACK_IMPORTED_MODULE_0__.HostBinding, 5578 args: ['attr.aria-disabled'] 5579 }], wrapperWidth: [{ 5580 type: _angular_core__WEBPACK_IMPORTED_MODULE_0__.HostBinding, 5581 args: ['style.width'] 5582 }], wrapperTabIndex: [{ 5583 type: _angular_core__WEBPACK_IMPORTED_MODULE_0__.HostBinding, 5584 args: ['attr.tabindex'] 5585 }], 5586 /** 5587 * @hidden 5588 */ 5589 keydown: [{ 5590 type: _angular_core__WEBPACK_IMPORTED_MODULE_0__.HostListener, 5591 args: ['keydown', ['$event']] 5592 }], 5593 /** 5594 * @hidden 5595 */ 5596 onFocus: [{ 5597 type: _angular_core__WEBPACK_IMPORTED_MODULE_0__.HostListener, 5598 args: ['focus'] 5599 }], 5600 /** 5601 * @hidden 5602 */ 5603 focusout: [{ 5604 type: _angular_core__WEBPACK_IMPORTED_MODULE_0__.HostListener, 5605 args: ['focusout', ['$event']] 5606 }], disabled: [{ 5607 type: _angular_core__WEBPACK_IMPORTED_MODULE_0__.Input, 5608 args: ['disabled'] 5609 }], width: [{ 5610 type: _angular_core__WEBPACK_IMPORTED_MODULE_0__.Input, 5611 args: ['width'] 5612 }], buttons: [{ 5613 type: _angular_core__WEBPACK_IMPORTED_MODULE_0__.ContentChildren, 5614 args: [ButtonDirective] 5615 }] }); })(); 5616(function () { (typeof ngDevMode === "undefined" || ngDevMode) && _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵsetClassMetadata"](ButtonModule, [{ 5617 type: _angular_core__WEBPACK_IMPORTED_MODULE_0__.NgModule, 5618 args: [{ 5619 declarations: [ButtonDirective], 5620 exports: [ButtonDirective] 5621 }] 5622 }], null, null); })(); 5623(function () { (typeof ngJitMode === "undefined" || ngJitMode) && _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵsetNgModuleScope"](ButtonModule, { declarations: [ButtonDirective], exports: [ButtonDirective] }); })(); 5624(function () { (typeof ngDevMode === "undefined" || ngDevMode) && _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵsetClassMetadata"](ButtonGroupModule, [{ 5625 type: _angular_core__WEBPACK_IMPORTED_MODULE_0__.NgModule, 5626 args: [{ 5627 declarations: [ButtonGroupComponent], 5628 exports: [ButtonGroupComponent], 5629 imports: [_angular_common__WEBPACK_IMPORTED_MODULE_6__.CommonModule, ButtonModule] 5630 }] 5631 }], null, null); })(); 5632(function () { (typeof ngJitMode === "undefined" || ngJitMode) && _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵsetNgModuleScope"](ButtonGroupModule, { declarations: function () { return [ButtonGroupComponent]; }, imports: function () { return [_angular_common__WEBPACK_IMPORTED_MODULE_6__.CommonModule, ButtonModule]; }, exports: function () { return [ButtonGroupComponent]; } }); })(); 5633(function () { (typeof ngDevMode === "undefined" || ngDevMode) && _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵsetClassMetadata"](ButtonItemTemplateDirective, [{ 5634 type: _angular_core__WEBPACK_IMPORTED_MODULE_0__.Directive, 5635 args: [{ 5636 selector: '[kendoDropDownButtonItemTemplate],[kendoSplitButtonItemTemplate]' 5637 }] 5638 }], function () { return [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_0__.TemplateRef }]; }, null); })(); 5639(function () { (typeof ngDevMode === "undefined" || ngDevMode) && _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵsetClassMetadata"](ListComponent, [{ 5640 type: _angular_core__WEBPACK_IMPORTED_MODULE_0__.Component, 5641 args: [{ 5642 selector: 'kendo-button-list', 5643 template: ` 5644 <ul class="k-group k-menu-group k-reset" [ngClass]="sizeClass" unselectable="on" role="menu"> 5645 <li role="menuitem" unselectable="on" 5646 kendoButtonFocusable 5647 *ngFor="let dataItem of data; let index = index;" 5648 class="k-item k-menu-item" 5649 (click)="onClick(index)" 5650 (blur)="onBlur()" 5651 [attr.aria-disabled]="dataItem.disabled ? true : false"> 5652 <ng-template [ngIf]="itemTemplate?.templateRef">
5653 <span kendoButtonFocusable [index]="index" class="k-link k-menu-link" [class.k-disabled]="dataItem.disabled" tabindex="-1"> 5654 <ng-template [templateContext]="{templateRef: itemTemplate?.templateRef, $implicit: dataItem}"></ng-template> 5655 </span> 5656 </ng-template> 5657 <ng-template [ngIf]="!itemTemplate?.templateRef"> 5658 <span kendoButtonFocusable [index]="index" class="k-link k-menu-link" [class.k-disabled]="dataItem.disabled" tabindex="-1"> 5659 <span 5660 *ngIf="dataItem.icon || dataItem.iconClass" 5661 [ngClass]="getIconClasses(dataItem)" 5662 ></span> 5663 <img 5664 *ngIf="dataItem.imageUrl" 5665 class="k-image" 5666 [src]="dataItem.imageUrl" 5667 alt="" 5668 > 5669 <span *ngIf="getText(dataItem)" class="k-menu-link-text"> 5670 {{ getText(dataItem) }} 5671 </span> 5672 </span> 5673 </ng-template> 5674 </li> 5675 </ul> 5676 ` 5677 }] 5678 }], function () { return []; }, { onItemClick: [{ 5679 type: _angular_core__WEBPACK_IMPORTED_MODULE_0__.Output 5680 }], onItemBlur: [{ 5681 type: _angular_core__WEBPACK_IMPORTED_MODULE_0__.Output 5682 }], size: [{ 5683 type: _angular_core__WEBPACK_IMPORTED_MODULE_0__.Input 5684 }], data: [{ 5685 type: _angular_core__WEBPACK_IMPORTED_MODULE_0__.Input 5686 }], textField: [{ 5687 type: _angular_core__WEBPACK_IMPORTED_MODULE_0__.Input 5688 }], itemTemplate: [{ 5689 type: _angular_core__WEBPACK_IMPORTED_MODULE_0__.Input 5690 }] }); })(); 5691(function () { (typeof ngDevMode === "undefined" || ngDevMode) && _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵsetClassMetadata"](FocusService, [{ 5692 type: _angular_core__WEBPACK_IMPORTED_MODULE_0__.Injectable 5693 }], function () { return []; }, null); })(); 5694(function () { (typeof ngDevMode === "undefined" || ngDevMode) && _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵsetClassMetadata"](FocusableDirective, [{ 5695 type: _angular_core__WEBPACK_IMPORTED_MODULE_0__.Directive, 5696 args: [{ 5697 selector: '[kendoButtonFocusable]' 5698 }] 5699 }], function () { return [{ type: FocusService }, { type: _angular_core__WEBPACK_IMPORTED_MODULE_0__.ElementRef }, { type: _angular_core__WEBPACK_IMPORTED_MODULE_0__.Renderer2 }]; }, { index: [{ 5700 type: _angular_core__WEBPACK_IMPORTED_MODULE_0__.Input 5701 }] }); })(); 5702(function () { (typeof ngDevMode === "undefined" || ngDevMode) && _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵsetClassMetadata"](TemplateContextDirective, [{ 5703 type: _angular_core__WEBPACK_IMPORTED_MODULE_0__.Directive, 5704 args: [{ 5705 selector: '[templateContext]' // tslint:disable-line:directive-selector 5706 }] 5707 }], function () { return [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_0__.ViewContainerRef }]; }, { templateContext: [{ 5708 type: _angular_core__WEBPACK_IMPORTED_MODULE_0__.Input 5709 }] }); })(); 5710(function () { (typeof ngDevMode === "undefined" || ngDevMode) && _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵsetClassMetadata"](ListModule, [{ 5711 type: _angular_core__WEBPACK_IMPORTED_MODULE_0__.NgModule, 5712 args: [{ 5713 declarations: [EXPORTED_DIRECTIVES], 5714 exports: [EXPORTED_DIRECTIVES], 5715 imports: [_angular_common__WEBPACK_IMPORTED_MODULE_6__.CommonModule] 5716 }] 5717 }], null, null); })(); 5718(function () { (typeof ngJitMode === "undefined" || ngJitMode) && _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵsetNgModuleScope"](ListModule, { declarations: function () { return [ListComponent, FocusableDirective, ButtonItemTemplateDirective, TemplateContextDirective]; }, imports: function () { return [_angular_common__WEBPACK_IMPORTED_MODULE_6__.CommonModule]; }, exports: function () { return [ListComponent, FocusableDirective, ButtonItemTemplateDirective, TemplateContextDirective]; } }); })(); 5719 5720(function () { (typeof ngDevMode === "undefined" || ngDevMode) && _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵsetClassMetadata"](NavigationService, [{ 5721 type: _angular_core__WEBPACK_IMPORTED_MODULE_0__.Injectable 5722 }], function () { return [{ type: Object, decorators: [{ 5723 type: _angular_core__WEBPACK_IMPORTED_MODULE_0__.Inject, 5724 args: [NAVIGATION_CONFIG] 5725 }] }]; }, null); })(); 5726(function () { (typeof ngDevMode === "undefined" || ngDevMode) && _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵsetClassMetadata"](SplitButtonComponent, [{ 5727 type: _angular_core__WEBPACK_IMPORTED_MODULE_0__.Component, 5728 args: [{ 5729 exportAs: 'kendoSplitButton', 5730 providers: [ 5731 FocusService, 5732 NavigationService, 5733 NAVIGATION_SETTINGS_PROVIDER, 5734 _progress_kendo_angular_l10n__WEBPACK_IMPORTED_MODULE_4__.LocalizationService, 5735 { 5736 provide: _progress_kendo_angular_l10n__WEBPACK_IMPORTED_MODULE_4__.L10N_PREFIX, 5737 useValue: 'kendo.splitbutton' 5738 } 5739 ], 5740 selector: 'kendo-splitbutton', 5741 template: ` 5742 <ng-container kendoSplitButtonLocalizedMessages 5743 i18n-splitButtonLabel="kendo.splitbutton.splitButtonLabel|The text for the SplitButton aria-label" 5744 splitButtonLabel="{{ '{buttonText} splitbutton' }}"> 5745 </ng-container> 5746 <button 5747 kendoButton 5748 #button 5749 [type]="type"
5750 [tabindex]="componentTabIndex" 5751 [disabled]="disabled" 5752 [size]="size" 5753 [rounded]="rounded" 5754 [fillMode]="fillMode" 5755 [themeColor]="themeColor" 5756 [icon]="icon" 5757 [class.k-active]="active" 5758 [class.k-icon-button]="!text && icon" 5759 [iconClass]="iconClass" 5760 [imageUrl]="imageUrl" 5761 [ngClass]="buttonClass" 5762 (focus)="onButtonFocus()" 5763 (click)="onButtonClick()" 5764 (blur)="onButtonBlur()" 5765 (mousedown)="toggleButtonActiveState(true)" 5766 (mouseup)="toggleButtonActiveState(false)" 5767 [attr.aria-disabled]="disabled" 5768 [attr.aria-expanded]="openState" 5769 [attr.aria-haspopup]="true" 5770 [attr.aria-owns]="listId" 5771 [attr.aria-label]="ariaLabel" 5772 > 5773 <span *ngIf="text" class="k-button-text"> 5774 {{ text }} 5775 </span><ng-content></ng-content> 5776 </button> 5777 <button 5778 kendoButton 5779 #arrowButton 5780 type="button" 5781 [class.k-active]="activeArrow" 5782 [disabled]="disabled" 5783 [icon]="arrowButtonIcon" 5784 [size]="size" 5785 [rounded]="rounded" 5786 [fillMode]="fillMode" 5787 [themeColor]="fillMode ? themeColor : null" 5788 [tabindex]="-1" 5789 [ngClass]="arrowButtonClass" 5790 (click)="onArrowButtonClick()" 5791 (mousedown)="toggleArrowButtonActiveState(true)" 5792 (mouseup)="toggleArrowButtonActiveState(false)" 5793 ></button> 5794 <ng-template #popupTemplate> 5795 <kendo-button-list 5796 [id]="listId" 5797 [data]="data" 5798 [textField]="textField" 5799 [itemTemplate]="itemTemplate" 5800 (onItemClick)="onItemClick($event)" 5801 (keydown)="keyDownHandler($event)" 5802 (keypress)="keyPressHandler($event)" 5803 (keyup)="keyUpHandler($event)" 5804 [attr.dir]="dir" 5805 [size]="size" 5806 > 5807 </kendo-button-list> 5808 </ng-template> 5809 <ng-container #container></ng-container> 5810 ` 5811 }] 5812 }], function () { return [{ type: FocusService }, { type: NavigationService }, { type: _angular_core__WEBPACK_IMPORTED_MODULE_0__.ElementRef }, { type: _angular_core__WEBPACK_IMPORTED_MODULE_0__.NgZone }, { type: _progress_kendo_angular_popup__WEBPACK_IMPORTED_MODULE_10__.PopupService }, { type: _angular_core__WEBPACK_IMPORTED_MODULE_0__.ElementRef }, { type: _progress_kendo_angular_l10n__WEBPACK_IMPORTED_MODULE_4__.LocalizationService }, { type: _angular_core__WEBPACK_IMPORTED_MODULE_0__.ChangeDetectorRef }, { type: _angular_core__WEBPACK_IMPORTED_MODULE_0__.Renderer2 }]; }, { text: [{ 5813 type: _angular_core__WEBPACK_IMPORTED_MODULE_0__.Input 5814 }], icon: [{ 5815 type: _angular_core__WEBPACK_IMPORTED_MODULE_0__.Input 5816 }], iconClass: [{ 5817 type: _angular_core__WEBPACK_IMPORTED_MODULE_0__.Input 5818 }], type: [{ 5819 type: _angular_core__WEBPACK_IMPORTED_MODULE_0__.Input 5820 }], imageUrl: [{ 5821 type: _angular_core__WEBPACK_IMPORTED_MODULE_0__.Input 5822 }], size: [{ 5823 type: _angular_core__WEBPACK_IMPORTED_MODULE_0__.Input 5824 }], themeColor: [{ 5825 type: _angular_core__WEBPACK_IMPORTED_MODULE_0__.Input 5826 }], tabIndex: [{ 5827 type: _angular_core__WEBPACK_IMPORTED_MODULE_0__.Input 5828 }], arrowButtonIcon: [{ 5829 type: _angular_core__WEBPACK_IMPORTED_MODULE_0__.Input 5830 }], buttonClick: [{ 5831 type: _angular_core__WEBPACK_IMPORTED_MODULE_0__.Output 5832 }], itemClick: [{ 5833 type: _angular_core__WEBPACK_IMPORTED_MODULE_0__.Output 5834 }], onFocus: [{ 5835 type: _angular_core__WEBPACK_IMPORTED_MODULE_0__.Output, 5836 args: ['focus'] 5837 }], onBlur: [{ 5838 type: _angular_core__WEBPACK_IMPORTED_MODULE_0__.Output, 5839 args: ['blur'] 5840 }], open: [{ 5841 type: _angular_core__WEBPACK_IMPORTED_MODULE_0__.Output 5842 }], close: [{ 5843 type: _angular_core__WEBPACK_IMPORTED_MODULE_0__.Output 5844 }], rounded: [{ 5845 type: _angular_core__WEBPACK_IMPORTED_MODULE_0__.Input 5846 }], fillMode: [{ 5847 type: _angular_core__WEBPACK_IMPORTED_MODULE_0__.Input 5848 }], disabled: [{ 5849 type: _angular_core__WEBPACK_IMPORTED_MODULE_0__.Input 5850 }], popupSettings: [{ 5851 type: _angular_core__WEBPACK_IMPORTED_MODULE_0__.Input 5852 }], data: [{ 5853 type: _angular_core__WEBPACK_IMPORTED_MODULE_0__.Input 5854 }], isFocused: [{ 5855 type: _angular_core__WEBPACK_IMPORTED_MODULE_0__.HostBinding, 5856 args: ['class.k-focus'] 5857 }], widgetClasses: [{ 5858 type: _angular_core__WEBPACK_IMPORTED_MODULE_0__.HostBinding, 5859 args: ['class.k-split-button'] 5860 }, { 5861 type: _angular_core__WEBPACK_IMPORTED_MODULE_0__.HostBinding, 5862 args: ['class.k-button-group'] 5863 }], dir: [{ 5864 type: _angular_core__WEBPACK_IMPORTED_MODULE_0__.HostBinding, 5865 args: ['attr.dir'] 5866 }], 5867 /** 5868 * @hidden 5869 */ 5870 keydown: [{ 5871 type: _angular_core__WEBPACK_IMPORTED_MODULE_0__.HostListener, 5872 args: ['keydown', ['$event']] 5873 }], 5874 /** 5875 * @hidden 5876 */ 5877 keypress: [{ 5878 type: _angular_core__WEBPACK_IMPORTED_MODULE_0__.HostListener, 5879 args: ['keypress', ['$event']] 5880 }], 5881 /** 5882 * @hidden 5883 */ 5884 keyup: [{ 5885 type: _angular_core__WEBPACK_IMPORTED_MODULE_0__.HostListener, 5886 args: ['keyup', ['$event']] 5887 }], textField: [{ 5888 type: _angular_core__WEBPACK_IMPORTED_MODULE_0__.Input 5889 }], buttonClass: [{ 5890 type: _angular_core__WEBPACK_IMPORTED_MODULE_0__.Input 5891 }], arrowButtonClass: [{ 5892 type: _angular_core__WEBPACK_IMPORTED_MODULE_0__.Input 5893 }], itemTemplate: [{ 5894 type: _angular_core__WEBPACK_IMPORTED_MODULE_0__.ContentChild, 5895 args: [ButtonItemTemplateDirective, { static: false }] 5896 }], button: [{ 5897 type: _angular_core__WEBPACK_IMPORTED_MODULE_0__.ViewChild, 5898 args: ['button', { static: true }] 5899 }], arrowButton: [{ 5900 type: _angular_core__WEBPACK_IMPORTED_MODULE_0__.ViewChild, 5901 args: ['arrowButton', { static: true, read: _angular_core__WEBPACK_IMPORTED_MODULE_0__.ElementRef }] 5902 }], popupTemplate: [{ 5903 type: _angular_core__WEBPACK_IMPORTED_MODULE_0__.ViewChild, 5904 args: ['popupTemplate', { static: true }] 5905 }], containerRef: [{ 5906 type: _angular_core__WEBPACK_IMPORTED_MODULE_0__.ViewChild, 5907 args: ['container', { read: _angular_core__WEBPACK_IMPORTED_MODULE_0__.ViewContainerRef, static: true }] 5908 }] }); })(); 5909 5910(function () { (typeof ngDevMode === "undefined" || ngDevMode) && _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵsetClassMetadata"](LocalizedSplitButtonMessagesDirective, [{ 5911 type: _angular_core__WEBPACK_IMPORTED_MODULE_0__.Directive, 5912 args: [{ 5913 providers: [ 5914 { 5915 provide: Messages, 5916 useExisting: (0,_angular_core__WEBPACK_IMPORTED_MODULE_0__.forwardRef)(() => LocalizedSplitButtonMessagesDirective_1) 5917 } 5918 ], 5919 selector: '[kendoSplitButtonLocalizedMessages]' 5920 }] 5921 }], function () { return [{ type: _progress_kendo_angular_l10n__WEBPACK_IMPORTED_MODULE_4__.LocalizationService }]; }, null); })(); 5922(function () { (typeof ngDevMode === "undefined" || ngDevMode) && _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵsetClassMetadata"](SplitButtonCustomMessagesComponent, [{ 5923 type: _angular_core__WEBPACK_IMPORTED_MODULE_0__.Component, 5924 args: [{ 5925 providers: [ 5926 { 5927 provide: Messages, 5928 useExisting: (0,_angular_core__WEBPACK_IMPORTED_MODULE_0__.forwardRef)(() => SplitButtonCustomMessagesComponent_1) 5929 } 5930 ], 5931 selector: 'kendo-splitbutton-messages', 5932 template: `` 5933 }] 5934 }], function () { return [{ type: _progress_kendo_angular_l10n__WEBPACK_IMPORTED_MODULE_4__.LocalizationService }]; }, null); })(); 5935(function () { (typeof ngDevMode === "undefined" || ngDevMode) && _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵsetClassMetadata"](SplitButtonModule, [{ 5936 type: _angular_core__WEBPACK_IMPORTED_MODULE_0__.NgModule, 5937 args: [{ 5938 declarations: [SplitButtonComponent, LocalizedSplitButtonMessagesDirective, SplitButtonCustomMessagesComponent], 5939 exports: [SplitButtonComponent, ListModule, LocalizedSplitButtonMessagesDirective, SplitButtonCustomMessagesComponent], 5940 imports: [_angular_common__WEBPACK_IMPORTED_MODULE_6__.CommonModule, _progress_kendo_angular_popup__WEBPACK_IMPORTED_MODULE_10__.PopupModule, ButtonModule, ListModule] 5941 }] 5942 }], null, null); })(); 5943(function () { (typeof ngJitMode === "undefined" || ngJitMode) && _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵsetNgModuleScope"](SplitButtonModule, { declarations: function () { return [SplitButtonComponent, LocalizedSplitButtonMessagesDirective, SplitButtonCustomMessagesComponent]; }, imports: function () { return [_angular_common__WEBPACK_IMPORTED_MODULE_6__.CommonModule, _progress_kendo_angular_popup__WEBPACK_IMPORTED_MODULE_10__.PopupModule, ButtonModule, ListModule]; }, exports: function () { return [SplitButtonComponent, ListModule, LocalizedSplitButtonMessagesDirective, SplitButtonCustomMessagesComponent]; } }); })(); 5944(function () { (typeof ngDevMode === "undefined" || ngDevMode) && _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵsetClassMetadata"](DropDownButtonComponent, [{ 5945 type: _angular_core__WEBPACK_IMPORTED_MODULE_0__.Component, 5946 args: [{ 5947 exportAs: 'kendoDropDownButton', 5948 providers: [ 5949 FocusService, 5950 NavigationService, 5951 NAVIGATION_SETTINGS_PROVIDER$1, 5952 _progress_kendo_angular_l10n__WEBPACK_IMPORTED_MODULE_4__.LocalizationService, 5953 { 5954 provide: _progress_kendo_angular_l10n__WEBPACK_IMPORTED_MODULE_4__.L10N_PREFIX, 5955 useValue: 'kendo.dropdownbutton' 5956 } 5957 ], 5958 selector: 'kendo-dropdownbutton', 5959 template: ` 5960 <button kendoButton #button 5961 role="menu" 5962 type="button"
5963 [tabindex]="componentTabIndex" 5964 [class.k-active]="active" 5965 [disabled]="disabled" 5966 [icon]="icon" 5967 [iconClass]="iconClass" 5968 [imageUrl]="imageUrl" 5969 [ngClass]="buttonClass" 5970 [size]="size" 5971 [shape]="shape" 5972 [rounded]="rounded" 5973 [fillMode]="fillMode" 5974 [themeColor]="fillMode ? themeColor : null" 5975 (click)="openPopup()" 5976 (focus)="handleFocus()" 5977 (blur)="onButtonBlur()" 5978 [attr.aria-disabled]="disabled" 5979 [attr.aria-expanded]="openState" 5980 [attr.aria-haspopup]="true" 5981 [attr.aria-owns]="listId" 5982 > 5983 <ng-content></ng-content> 5984 </button> 5985 <ng-template #popupTemplate> 5986 <kendo-button-list 5987 #buttonList 5988 [id]="listId" 5989 [data]="data" 5990 [textField]="textField" 5991 [itemTemplate]="itemTemplate" 5992 (onItemClick)="onItemClick($event)" 5993 (keydown)="keyDownHandler($event)" 5994 (keypress)="keyPressHandler($event)" 5995 (keyup)="keyUpHandler($event)" 5996 [attr.dir]="dir" 5997 [size]="size" 5998 > 5999 </kendo-button-list> 6000 </ng-template> 6001 <ng-container #container></ng-container> 6002 ` 6003 }] 6004 }], function () { return [{ type: FocusService }, { type: NavigationService }, { type: _angular_core__WEBPACK_IMPORTED_MODULE_0__.ElementRef }, { type: _angular_core__WEBPACK_IMPORTED_MODULE_0__.NgZone }, { type: _progress_kendo_angular_popup__WEBPACK_IMPORTED_MODULE_10__.PopupService }, { type: _angular_core__WEBPACK_IMPORTED_MODULE_0__.ElementRef }, { type: _progress_kendo_angular_l10n__WEBPACK_IMPORTED_MODULE_4__.LocalizationService }, { type: _angular_core__WEBPACK_IMPORTED_MODULE_0__.ChangeDetectorRef }]; }, { icon: [{ 6005 type: _angular_core__WEBPACK_IMPORTED_MODULE_0__.Input 6006 }], iconClass: [{ 6007 type: _angular_core__WEBPACK_IMPORTED_MODULE_0__.Input 6008 }], imageUrl: [{ 6009 type: _angular_core__WEBPACK_IMPORTED_MODULE_0__.Input 6010 }], size: [{ 6011 type: _angular_core__WEBPACK_IMPORTED_MODULE_0__.Input 6012 }], shape: [{ 6013 type: _angular_core__WEBPACK_IMPORTED_MODULE_0__.Input 6014 }], rounded: [{ 6015 type: _angular_core__WEBPACK_IMPORTED_MODULE_0__.Input 6016 }], themeColor: [{ 6017 type: _angular_core__WEBPACK_IMPORTED_MODULE_0__.Input 6018 }], tabIndex: [{ 6019 type: _angular_core__WEBPACK_IMPORTED_MODULE_0__.Input 6020 }], itemClick: [{ 6021 type: _angular_core__WEBPACK_IMPORTED_MODULE_0__.Output 6022 }], open: [{ 6023 type: _angular_core__WEBPACK_IMPORTED_MODULE_0__.Output 6024 }], close: [{ 6025 type: _angular_core__WEBPACK_IMPORTED_MODULE_0__.Output 6026 }], onFocus: [{ 6027 type: _angular_core__WEBPACK_IMPORTED_MODULE_0__.Output, 6028 args: ['focus'] 6029 }], onBlur: [{ 6030 type: _angular_core__WEBPACK_IMPORTED_MODULE_0__.Output, 6031 args: ['blur'] 6032 }], popupSettings: [{ 6033 type: _angular_core__WEBPACK_IMPORTED_MODULE_0__.Input 6034 }], disabled: [{ 6035 type: _angular_core__WEBPACK_IMPORTED_MODULE_0__.Input 6036 }], data: [{ 6037 type: _angular_core__WEBPACK_IMPORTED_MODULE_0__.Input 6038 }], fillMode: [{ 6039 type: _angular_core__WEBPACK_IMPORTED_MODULE_0__.Input 6040 }], focused: [{ 6041 type: _angular_core__WEBPACK_IMPORTED_MODULE_0__.HostBinding, 6042 args: ['class.k-focus'] 6043 }], widgetClasses: [{ 6044 type: _angular_core__WEBPACK_IMPORTED_MODULE_0__.HostBinding, 6045 args: ['class.k-dropdown-button'] 6046 }], dir: [{ 6047 type: _angular_core__WEBPACK_IMPORTED_MODULE_0__.HostBinding, 6048 args: ['attr.dir'] 6049 }], 6050 /** 6051 * @hidden 6052 */ 6053 keydown: [{ 6054 type: _angular_core__WEBPACK_IMPORTED_MODULE_0__.HostListener, 6055 args: ['keydown', ['$event']] 6056 }], 6057 /** 6058 * @hidden 6059 */ 6060 keypress: [{ 6061 type: _angular_core__WEBPACK_IMPORTED_MODULE_0__.HostListener, 6062 args: ['keypress', ['$event']] 6063 }], 6064 /** 6065 * @hidden 6066 */ 6067 keyup: [{ 6068 type: _angular_core__WEBPACK_IMPORTED_MODULE_0__.HostListener, 6069 args: ['keyup', ['$event']] 6070 }], 6071 /** 6072 * @hidden 6073 */ 6074 mousedown: [{ 6075 type: _angular_core__WEBPACK_IMPORTED_MODULE_0__.HostListener, 6076 args: ['mousedown', ['$event']] 6077 }], 6078 /** 6079 * @hidden 6080 */ 6081 mouseup: [{ 6082 type: _angular_core__WEBPACK_IMPORTED_MODULE_0__.HostListener, 6083 args: ['mouseup', ['$event']] 6084 }], textField: [{ 6085 type: _angular_core__WEBPACK_IMPORTED_MODULE_0__.Input 6086 }], buttonClass: [{ 6087 type: _angular_core__WEBPACK_IMPORTED_MODULE_0__.Input 6088 }], itemTemplate: [{ 6089 type: _angular_core__WEBPACK_IMPORTED_MODULE_0__.ContentChild, 6090 args: [ButtonItemTemplateDirective, { static: false }] 6091 }], button: [{ 6092 type: _angular_core__WEBPACK_IMPORTED_MODULE_0__.ViewChild, 6093 args: ['button', { static: true }] 6094 }], buttonList: [{ 6095 type: _angular_core__WEBPACK_IMPORTED_MODULE_0__.ViewChild, 6096 args: ['buttonList', { static: false }] 6097 }], popupTemplate: [{ 6098 type: _angular_core__WEBPACK_IMPORTED_MODULE_0__.ViewChild, 6099 args: ['popupTemplate', { static: true }] 6100 }], container: [{ 6101 type: _angular_core__WEBPACK_IMPORTED_MODULE_0__.ViewChild, 6102 args: ['container', { read: _angular_core__WEBPACK_IMPORTED_MODULE_0__.ViewContainerRef, static: true }] 6103 }] }); })(); 6104(function () { (typeof ngDevMode === "undefined" || ngDevMode) && _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵsetClassMetadata"](DropDownButtonModule, [{ 6105 type: _angular_core__WEBPACK_IMPORTED_MODULE_0__.NgModule, 6106 args: [{ 6107 declarations: [DropDownButtonComponent], 6108 exports: [DropDownButtonComponent, ListModule], 6109 imports: [_angular_common__WEBPACK_IMPORTED_MODULE_6__.CommonModule, _progress_kendo_angular_popup__WEBPACK_IMPORTED_MODULE_10__.PopupModule, ListModule, ButtonModule] 6110 }] 6111 }], null, null); })(); 6112(function () { (typeof ngJitMode === "undefined" || ngJitMode) && _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵsetNgModuleScope"](DropDownButtonModule, { declarations: function () { return [DropDownButtonComponent]; }, imports: function () { return [_angular_common__WEBPACK_IMPORTED_MODULE_6__.CommonModule, _progress_kendo_angular_popup__WEBPACK_IMPORTED_MODULE_10__.PopupModule, ListModule, ButtonModule]; }, exports: function () { return [DropDownButtonComponent, ListModule]; } }); })(); 6113(function () { (typeof ngDevMode === "undefined" || ngDevMode) && _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵsetClassMetadata"](ChipComponent, [{ 6114 type: _angular_core__WEBPACK_IMPORTED_MODULE_0__.Component, 6115 args: [{ 6116 selector: 'kendo-chip', 6117 template: `
6118 <span 6119 *ngIf="icon" 6120 class="k-chip-icon k-icon" 6121 [ngClass]="kendoIconClass" 6122 > 6123 </span> 6124 6125 <span 6126 *ngIf="iconClass" 6127 class="k-chip-icon" 6128 [ngClass]="customIconClass" 6129 > 6130 </span> 6131 6132 <span 6133 *ngIf="avatarClass" 6134 class="k-chip-avatar k-avatar k-rounded-full" 6135 > 6136 <span class="k-avatar-image" [ngClass]="chipAvatarClass"></span> 6137 </span> 6138 6139 <span class="k-chip-content"> 6140 <span class="k-chip-label" *ngIf="label"> 6141 {{ label }} 6142 </span> 6143 <ng-content *ngIf="!label"></ng-content> 6144 </span> 6145 6146 <span class="k-chip-actions"> 6147 <span class="k-chip-action k-chip-remove-action" 6148 *ngIf="removable" 6149 (click)="onRemoveClick($event)" 6150 > 6151 <span 6152 class="k-icon" 6153 [ngClass]="removeIconClass" 6154 > 6155 </span> 6156 </span> 6157 </span> 6158 `, 6159 providers: [ 6160 _progress_kendo_angular_l10n__WEBPACK_IMPORTED_MODULE_4__.LocalizationService, 6161 { 6162 provide: _progress_kendo_angular_l10n__WEBPACK_IMPORTED_MODULE_4__.L10N_PREFIX, 6163 useValue: 'kendo.chip' 6164 } 6165 ] 6166 }] 6167 }], function () { return [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_0__.ElementRef }, { type: _angular_core__WEBPACK_IMPORTED_MODULE_0__.Renderer2 }, { type: _angular_core__WEBPACK_IMPORTED_MODULE_0__.NgZone }, { type: _progress_kendo_angular_l10n__WEBPACK_IMPORTED_MODULE_4__.LocalizationService }]; }, { selected: [{ 6168 type: _angular_core__WEBPACK_IMPORTED_MODULE_0__.Input 6169 }], removable: [{ 6170 type: _angular_core__WEBPACK_IMPORTED_MODULE_0__.Input 6171 }], disabled: [{ 6172 type: _angular_core__WEBPACK_IMPORTED_MODULE_0__.Input 6173 }], remove: [{ 6174 type: _angular_core__WEBPACK_IMPORTED_MODULE_0__.Output 6175 }], contentClick: [{ 6176 type: _angular_core__WEBPACK_IMPORTED_MODULE_0__.Output 6177 }], tabIndex: [{ 6178 type: _angular_core__WEBPACK_IMPORTED_MODULE_0__.HostBinding, 6179 args: ['attr.tabindex'] 6180 }], hostClass: [{ 6181 type: _angular_core__WEBPACK_IMPORTED_MODULE_0__.HostBinding, 6182 args: ['class.k-chip'] 6183 }], direction: [{ 6184 type: _angular_core__WEBPACK_IMPORTED_MODULE_0__.HostBinding, 6185 args: ['attr.dir'] 6186 }], size: [{ 6187 type: _angular_core__WEBPACK_IMPORTED_MODULE_0__.Input 6188 }], rounded: [{ 6189 type: _angular_core__WEBPACK_IMPORTED_MODULE_0__.Input 6190 }], fillMode: [{ 6191 type: _angular_core__WEBPACK_IMPORTED_MODULE_0__.Input 6192 }], themeColor: [{ 6193 type: _angular_core__WEBPACK_IMPORTED_MODULE_0__.Input 6194 }], ariaChecked: [{ 6195 type: _angular_core__WEBPACK_IMPORTED_MODULE_0__.HostBinding, 6196 args: ['attr.aria-checked'] 6197 }], hasIconClass: [{ 6198 type: _angular_core__WEBPACK_IMPORTED_MODULE_0__.HostBinding, 6199 args: ['class.k-chip-has-icon'] 6200 }], disabledClass: [{ 6201 type: _angular_core__WEBPACK_IMPORTED_MODULE_0__.HostBinding, 6202 args: ['attr.aria-disabled'] 6203 }, { 6204 type: _angular_core__WEBPACK_IMPORTED_MODULE_0__.HostBinding, 6205 args: ['class.k-disabled'] 6206 }], selectedClass: [{ 6207 type: _angular_core__WEBPACK_IMPORTED_MODULE_0__.HostBinding, 6208 args: ['class.k-selected'] 6209 }], focusedClass: [{ 6210 type: _angular_core__WEBPACK_IMPORTED_MODULE_0__.HostBinding, 6211 args: ['class.k-focus'] 6212 }], label: [{ 6213 type: _angular_core__WEBPACK_IMPORTED_MODULE_0__.Input 6214 }], icon: [{ 6215 type: _angular_core__WEBPACK_IMPORTED_MODULE_0__.Input 6216 }], iconClass: [{ 6217 type: _angular_core__WEBPACK_IMPORTED_MODULE_0__.Input 6218 }], avatarClass: [{ 6219 type: _angular_core__WEBPACK_IMPORTED_MODULE_0__.Input 6220 }], removeIcon: [{ 6221 type: _angular_core__WEBPACK_IMPORTED_MODULE_0__.Input 6222 }] }); })(); 6223(function () { (typeof ngDevMode === "undefined" || ngDevMode) && _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵsetClassMetadata"](ChipListComponent, [{ 6224 type: _angular_core__WEBPACK_IMPORTED_MODULE_0__.Component, 6225 args: [{ 6226 selector: 'kendo-chiplist, kendo-chip-list', 6227 template: ` 6228 <ng-content></ng-content> 6229 `, 6230 providers: [ 6231 _progress_kendo_angular_l10n__WEBPACK_IMPORTED_MODULE_4__.LocalizationService, 6232 { 6233 provide: _progress_kendo_angular_l10n__WEBPACK_IMPORTED_MODULE_4__.L10N_PREFIX, 6234 useValue: 'kendo.chiplist' 6235 } 6236 ] 6237 }] 6238 }], function () { return [{ type: _progress_kendo_angular_l10n__WEBPACK_IMPORTED_MODULE_4__.LocalizationService }, { type: _angular_core__WEBPACK_IMPORTED_MODULE_0__.Renderer2 }, { type: _angular_core__WEBPACK_IMPORTED_MODULE_0__.ElementRef }]; }, { hostClass: [{ 6239 type: _angular_core__WEBPACK_IMPORTED_MODULE_0__.HostBinding, 6240 args: ['class.k-chip-list'] 6241 }], selection: [{ 6242 type: _angular_core__WEBPACK_IMPORTED_MODULE_0__.Input 6243 }], selectedChange: [{ 6244 type: _angular_core__WEBPACK_IMPORTED_MODULE_0__.Output 6245 }], remove: [{ 6246 type: _angular_core__WEBPACK_IMPORTED_MODULE_0__.Output 6247 }], role: [{ 6248 type: _angular_core__WEBPACK_IMPORTED_MODULE_0__.HostBinding, 6249 args: ['attr.role'] 6250 }], direction: [{ 6251 type: _angular_core__WEBPACK_IMPORTED_MODULE_0__.HostBinding, 6252 args: ['attr.dir'] 6253 }], size: [{ 6254 type: _angular_core__WEBPACK_IMPORTED_MODULE_0__.Input 6255 }], single: [{ 6256 type: _angular_core__WEBPACK_IMPORTED_MODULE_0__.HostBinding, 6257 args: ['class.k-selection-single'] 6258 }], multiple: [{ 6259 type: _angular_core__WEBPACK_IMPORTED_MODULE_0__.HostBinding, 6260 args: ['class.k-selection-multiple'] 6261 }], 6262 /** 6263 * @hidden 6264 */ 6265 onClick: [{ 6266 type: _angular_core__WEBPACK_IMPORTED_MODULE_0__.HostListener, 6267 args: ['click', ['$event']] 6268 }], chips: [{ 6269 type: _angular_core__WEBPACK_IMPORTED_MODULE_0__.ContentChildren, 6270 args: [ChipComponent] 6271 }] }); })(); 6272(function () { (typeof ngDevMode === "undefined" || ngDevMode) && _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵsetClassMetadata"](ChipModule, [{ 6273 type: _angular_core__WEBPACK_IMPORTED_MODULE_0__.NgModule, 6274 args: [{ 6275 declarations: [declarations], 6276 exports: [exportedModules], 6277 imports: [_angular_common__WEBPACK_IMPORTED_MODULE_6__.CommonModule] 6278 }] 6279 }], null, null); })(); 6280(function () { (typeof ngJitMode === "undefined" || ngJitMode) && _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵsetNgModuleScope"](ChipModule, { declarations: function () { return [ChipComponent, ChipListComponent]; }, imports: function () { return [_angular_common__WEBPACK_IMPORTED_MODULE_6__.CommonModule]; }, exports: function () { return [ChipComponent, ChipListComponent]; } }); })(); 6281(function () { (typeof ngDevMode === "undefined" || ngDevMode) && _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵsetClassMetadata"](DialItemTemplateDirective, [{ 6282 type: _angular_core__WEBPACK_IMPORTED_MODULE_0__.Directive, 6283 args: [{ 6284 selector: '[kendoDialItemTemplate]' 6285 }] 6286 }], function () { return [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_0__.TemplateRef, decorators: [{ 6287 type: _angular_core__WEBPACK_IMPORTED_MODULE_0__.Optional 6288 }] }]; }, null); })(); 6289(function () { (typeof ngDevMode === "undefined" || ngDevMode) && _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵsetClassMetadata"](FloatingActionButtonTemplateDirective, [{ 6290 type: _angular_core__WEBPACK_IMPORTED_MODULE_0__.Directive, 6291 args: [{ 6292 selector: '[kendoFloatingActionButtonTemplate]' 6293 }] 6294 }], function () { return [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_0__.TemplateRef, decorators: [{ 6295 type: _angular_core__WEBPACK_IMPORTED_MODULE_0__.Optional 6296 }] }]; }, null); })(); 6297(function () { (typeof ngDevMode === "undefined" || ngDevMode) && _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵsetClassMetadata"](FloatingActionButtonComponent, [{ 6298 type: _angular_core__WEBPACK_IMPORTED_MODULE_0__.Component, 6299 args: [{ 6300 selector: 'kendo-floatingactionbutton', 6301 providers: [ 6302 FocusService, 6303 NavigationService, 6304 NAVIGATION_SETTINGS_PROVIDER$2, 6305 _progress_kendo_angular_l10n__WEBPACK_IMPORTED_MODULE_4__.LocalizationService, 6306 { 6307 provide: _progress_kendo_angular_l10n__WEBPACK_IMPORTED_MODULE_4__.L10N_PREFIX, 6308 useValue: 'kendo.floatingactionbutton' 6309 } 6310 ], 6311 template: ` 6312 <button 6313 #button 6314 [attr.id]="id" 6315 [attr.role]="role"
6316 [tabIndex]="componentTabIndex" 6317 type="button" 6318 class="k-fab k-fab-solid" 6319 [class.k-disabled]="disabled" 6320 [ngClass]="buttonClass" 6321 [disabled]="disabled" 6322 [attr.aria-disabled]="disabled" 6323 [attr.aria-expanded]="ariaExpanded" 6324 [attr.aria-haspopup]="ariaHasPopup" 6325 (focus)="focusHandler()" 6326 (blur)="blurHandler()" 6327 [kendoEventsOutsideAngular]="{ 6328 keydown: keyDownHandler, 6329 click: clickHandler 6330 }" 6331 [scope]="this" 6332 > 6333 <ng-template *ngIf="fabTemplate" 6334 [ngTemplateOutlet]="fabTemplate?.templateRef" 6335 > 6336 </ng-template> 6337 6338 <ng-container *ngIf="!fabTemplate"> 6339 <span *ngIf="icon || iconClass" [ngClass]="iconClasses"></span> 6340 <span *ngIf="text" class="k-fab-text">{{ text }}</span> 6341 </ng-container> 6342 </button> 6343 6344 <ng-template #popupTemplate> 6345 <ul 6346 kendoDialList 6347 [ngClass]="dialClass" 6348 [dialItems]="dialItems" 6349 [dialItemTemplate]='dialItemTemplate?.templateRef' 6350 [align]="align" 6351 [attr.aria-labelledby]="id" 6352 (click)="onItemClick($event)" 6353 > 6354 </ul> 6355 </ng-template> 6356 ` 6357 }] 6358 }], function () { return [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_0__.Renderer2 }, { type: _angular_core__WEBPACK_IMPORTED_MODULE_0__.ElementRef }, { type: FocusService }, { type: NavigationService }, { type: _angular_core__WEBPACK_IMPORTED_MODULE_0__.NgZone }, { type: _progress_kendo_angular_popup__WEBPACK_IMPORTED_MODULE_10__.PopupService }, { type: _angular_animations__WEBPACK_IMPORTED_MODULE_11__.AnimationBuilder }, { type: _progress_kendo_angular_l10n__WEBPACK_IMPORTED_MODULE_4__.LocalizationService }]; }, { positionMode: [{ 6359 type: _angular_core__WEBPACK_IMPORTED_MODULE_0__.Input 6360 }], dialItemAnimation: [{ 6361 type: _angular_core__WEBPACK_IMPORTED_MODULE_0__.Input 6362 }], tabIndex: [{ 6363 type: _angular_core__WEBPACK_IMPORTED_MODULE_0__.Input 6364 }], dialItems: [{ 6365 type: _angular_core__WEBPACK_IMPORTED_MODULE_0__.Input 6366 }], onBlur: [{ 6367 type: _angular_core__WEBPACK_IMPORTED_MODULE_0__.Output, 6368 args: ['blur'] 6369 }], onFocus: [{ 6370 type: _angular_core__WEBPACK_IMPORTED_MODULE_0__.Output, 6371 args: ['focus'] 6372 }], dialItemClick: [{ 6373 type: _angular_core__WEBPACK_IMPORTED_MODULE_0__.Output, 6374 args: ['dialItemClick'] 6375 }], open: [{ 6376 type: _angular_core__WEBPACK_IMPORTED_MODULE_0__.Output 6377 }], close: [{ 6378 type: _angular_core__WEBPACK_IMPORTED_MODULE_0__.Output 6379 }], direction: [{ 6380 type: _angular_core__WEBPACK_IMPORTED_MODULE_0__.HostBinding, 6381 args: ['attr.dir'] 6382 }], fixedClass: [{ 6383 type: _angular_core__WEBPACK_IMPORTED_MODULE_0__.HostBinding, 6384 args: ['class.k-pos-fixed'] 6385 }], absoluteClass: [{ 6386 type: _angular_core__WEBPACK_IMPORTED_MODULE_0__.HostBinding, 6387 args: ['class.k-pos-absolute'] 6388 }], themeColor: [{ 6389 type: _angular_core__WEBPACK_IMPORTED_MODULE_0__.Input 6390 }], size: [{ 6391 type: _angular_core__WEBPACK_IMPORTED_MODULE_0__.Input 6392 }], rounded: [{ 6393 type: _angular_core__WEBPACK_IMPORTED_MODULE_0__.Input 6394 }], shape: [{ 6395 type: _angular_core__WEBPACK_IMPORTED_MODULE_0__.Input 6396 }], disabled: [{ 6397 type: _angular_core__WEBPACK_IMPORTED_MODULE_0__.Input 6398 }], align: [{ 6399 type: _angular_core__WEBPACK_IMPORTED_MODULE_0__.Input 6400 }], offset: [{ 6401 type: _angular_core__WEBPACK_IMPORTED_MODULE_0__.Input 6402 }], button: [{ 6403 type: _angular_core__WEBPACK_IMPORTED_MODULE_0__.ViewChild, 6404 args: ['button', { static: true }] 6405 }], popupTemplate: [{ 6406 type: _angular_core__WEBPACK_IMPORTED_MODULE_0__.ViewChild, 6407 args: ['popupTemplate', { static: true }] 6408 }], dialItemTemplate: [{ 6409 type: _angular_core__WEBPACK_IMPORTED_MODULE_0__.ContentChild, 6410 args: [DialItemTemplateDirective, { static: true }] 6411 }], fabTemplate: [{ 6412 type: _angular_core__WEBPACK_IMPORTED_MODULE_0__.ContentChild, 6413 args: [FloatingActionButtonTemplateDirective, { static: true }] 6414 }], icon: [{ 6415 type: _angular_core__WEBPACK_IMPORTED_MODULE_0__.Input 6416 }], iconClass: [{ 6417 type: _angular_core__WEBPACK_IMPORTED_MODULE_0__.Input 6418 }], buttonClass: [{ 6419 type: _angular_core__WEBPACK_IMPORTED_MODULE_0__.Input 6420 }], dialClass: [{ 6421 type: _angular_core__WEBPACK_IMPORTED_MODULE_0__.Input 6422 }], text: [{ 6423 type: _angular_core__WEBPACK_IMPORTED_MODULE_0__.Input 6424 }] }); })(); 6425(function () { (typeof ngDevMode === "undefined" || ngDevMode) && _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵsetClassMetadata"](DialListComponent, [{ 6426 type: _angular_core__WEBPACK_IMPORTED_MODULE_0__.Component, 6427 args: [{ 6428 selector: '[kendoDialList]', 6429 template: ` 6430 <ng-container *ngFor='let item of dialItems; let idx = index'> 6431 <li 6432 kendoButtonFocusable 6433 kendoDialItem 6434 [item]="dialItems[idx]" 6435 [index]="idx" 6436 [dialItemTemplate]="dialItemTemplate" 6437 [isFocused]="isFocused(idx)" 6438 [ngClass]='item.cssClass' 6439 [ngStyle]='item.cssStyle' 6440 [align]="align" 6441 > 6442 </li> 6443 </ng-container> 6444 ` 6445 }] 6446 }], function () { return [{ type: FocusService }, { type: _angular_core__WEBPACK_IMPORTED_MODULE_0__.ChangeDetectorRef }]; }, { hostClass: [{ 6447 type: _angular_core__WEBPACK_IMPORTED_MODULE_0__.HostBinding, 6448 args: ['class.k-fab-items'] 6449 }], bottomClass: [{ 6450 type: _angular_core__WEBPACK_IMPORTED_MODULE_0__.HostBinding, 6451 args: ['class.k-fab-items-bottom'] 6452 }], topClass: [{ 6453 type: _angular_core__WEBPACK_IMPORTED_MODULE_0__.HostBinding, 6454 args: ['class.k-fab-items-top'] 6455 }], dialItems: [{ 6456 type: _angular_core__WEBPACK_IMPORTED_MODULE_0__.Input 6457 }], dialItemTemplate: [{ 6458 type: _angular_core__WEBPACK_IMPORTED_MODULE_0__.Input 6459 }
6459], align: [{ 6460 type: _angular_core__WEBPACK_IMPORTED_MODULE_0__.Input 6461 }] }); })(); 6462(function () { (typeof ngDevMode === "undefined" || ngDevMode) && _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵsetClassMetadata"](DialItemComponent, [{ 6463 type: _angular_core__WEBPACK_IMPORTED_MODULE_0__.Component, 6464 args: [{ 6465 selector: '[kendoDialItem]', 6466 template: ` 6467 <ng-template *ngIf="dialItemTemplate" 6468 [ngTemplateOutlet]="dialItemTemplate" 6469 [ngTemplateOutletContext]="{ $implicit: item, index: index, isFocused: isFocused }" 6470 > 6471 </ng-template> 6472 6473 <ng-container *ngIf="!dialItemTemplate"> 6474 <span *ngIf="item.label" class="k-fab-item-text">{{ item.label }}</span> 6475 <span *ngIf="item.icon || item.iconClass" [ngClass]="iconClasses"></span> 6476 </ng-container> 6477 ` 6478 }] 6479 }], function () { return [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_0__.ElementRef }, { type: _angular_core__WEBPACK_IMPORTED_MODULE_0__.Renderer2 }, { type: _progress_kendo_angular_l10n__WEBPACK_IMPORTED_MODULE_4__.LocalizationService }]; }, { hostClass: [{ 6480 type: _angular_core__WEBPACK_IMPORTED_MODULE_0__.HostBinding, 6481 args: ['class.k-fab-item'] 6482 }], role: [{ 6483 type: _angular_core__WEBPACK_IMPORTED_MODULE_0__.HostBinding, 6484 args: ['attr.role'] 6485 }], disabledClass: [{ 6486 type: _angular_core__WEBPACK_IMPORTED_MODULE_0__.HostBinding, 6487 args: ['attr.aria-disabled'] 6488 }, { 6489 type: _angular_core__WEBPACK_IMPORTED_MODULE_0__.HostBinding, 6490 args: ['class.k-disabled'] 6491 }], title: [{ 6492 type: _angular_core__WEBPACK_IMPORTED_MODULE_0__.HostBinding, 6493 args: ['attr.title'] 6494 }, { 6495 type: _angular_core__WEBPACK_IMPORTED_MODULE_0__.HostBinding, 6496 args: ['attr.aria-label'] 6497 }], indexAttr: [{ 6498 type: _angular_core__WEBPACK_IMPORTED_MODULE_0__.HostBinding, 6499 args: ['attr.data-fab-item-index'] 6500 }], cssClass: [{ 6501 type: _angular_core__WEBPACK_IMPORTED_MODULE_0__.Input 6502 }], cssStyle: [{ 6503 type: _angular_core__WEBPACK_IMPORTED_MODULE_0__.Input 6504 }], isFocused: [{ 6505 type: _angular_core__WEBPACK_IMPORTED_MODULE_0__.Input 6506 }], index: [{ 6507 type: _angular_core__WEBPACK_IMPORTED_MODULE_0__.Input 6508 }], item: [{ 6509 type: _angular_core__WEBPACK_IMPORTED_MODULE_0__.Input 6510 }], dialItemTemplate: [{ 6511 type: _angular_core__WEBPACK_IMPORTED_MODULE_0__.Input 6512 }], align: [{ 6513 type: _angular_core__WEBPACK_IMPORTED_MODULE_0__.Input 6514 }] }); })(); 6515(function () { (typeof ngDevMode === "undefined" || ngDevMode) && _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵsetClassMetadata"](FloatingActionButtonModule, [{ 6516 type: _angular_core__WEBPACK_IMPORTED_MODULE_0__.NgModule, 6517 args: [{ 6518 declarations: [declarations$1], 6519 exports: [exportedModules$1], 6520 imports: [_angular_common__WEBPACK_IMPORTED_MODULE_6__.CommonModule, _progress_kendo_angular_popup__WEBPACK_IMPORTED_MODULE_10__.PopupModule, ListModule, _progress_kendo_angular_common__WEBPACK_IMPORTED_MODULE_3__.EventsModule] 6521 }] 6522 }], null, null); })(); 6523(function () { (typeof ngJitMode === "undefined" || ngJitMode) && _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵsetNgModuleScope"](FloatingActionButtonModule, { declarations: function () { return [FloatingActionButtonComponent, DialItemTemplateDirective, FloatingActionButtonTemplateDirective, DialListComponent, DialItemComponent]; }, imports: function () { return [_angular_common__WEBPACK_IMPORTED_MODULE_6__.CommonModule, _progress_kendo_angular_popup__WEBPACK_IMPORTED_MODULE_10__.PopupModule, ListModule, _progress_kendo_angular_common__WEBPACK_IMPORTED_MODULE_3__.EventsModule]; }, exports: function () { return [FloatingActionButtonComponent, DialItemTemplateDirective, FloatingActionButtonTemplateDirective]; } }); })(); 6524(function () { (typeof ngDevMode === "undefined" || ngDevMode) && _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵsetClassMetadata"](ButtonsModule, [{ 6525 type: _angular_core__WEBPACK_IMPORTED_MODULE_0__.NgModule, 6526 args: [{ 6527 exports: [ButtonGroupModule, ButtonModule, SplitButtonModule, DropDownButtonModule, ChipModule, FloatingActionButtonModule] 6528 }] 6529 }], null, null); })(); 6530(function () { (typeof ngJitMode === "undefined" || ngJitMode) && _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵsetNgModuleScope"](ButtonsModule, { exports: [ButtonGroupModule, ButtonModule, SplitButtonModule, DropDownButtonModule, ChipModule, FloatingActionButtonModule] }); })(); 6531 6532/** 6533 * Generated bundle index. Do not edit. 6534 */ 6535 6536 6537 6538 6539 6540/***/ }), 6541 6542/***/ 72421: 6543/*!**************************************************************************************!*\ 6544 !*** ./node_modules/@progress/kendo-angular-buttons/node_modules/tslib/tslib.es6.js ***! 6545 \**************************************************************************************/ 6546/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { 6547 6548__webpack_require__.r(__webpack_exports__); 6549/* harmony export */ __webpack_require__.d(__webpack_exports__, { 6550/* harmony export */ "__extends": () => (/* binding */ __extends), 6551/* harmony export */ "__assign": () => (/* binding */ __assign), 6552/* harmony export */ "__rest": () => (/* binding */ __rest), 6553/* harmony export */ "__decorate": () => (/* binding */ __decorate), 6554/* harmony export */ "__param": () => (/* binding */ __param), 6555/* harmony export */ "__metadata": () => (/* binding */ __metadata), 6556/* harmony export */ "__awaiter": () => (/* binding */ __awaiter), 6557/* harmony export */ "__generator": () => (/* binding */ __generator), 6558/* harmony export */ "__createBinding": () => (/* binding */ __createBinding),
6559/* harmony export */ "__exportStar": () => (/* binding */ __exportStar), 6560/* harmony export */ "__values": () => (/* binding */ __values), 6561/* harmony export */ "__read": () => (/* binding */ __read), 6562/* harmony export */ "__spread": () => (/* binding */ __spread), 6563/* harmony export */ "__spreadArrays": () => (/* binding */ __spreadArrays), 6564/* harmony export */ "__await": () => (/* binding */ __await), 6565/* harmony export */ "__asyncGenerator": () => (/* binding */ __asyncGenerator), 6566/* harmony export */ "__asyncDelegator": () => (/* binding */ __asyncDelegator), 6567/* harmony export */ "__asyncValues": () => (/* binding */ __asyncValues), 6568/* harmony export */ "__makeTemplateObject": () => (/* binding */ __makeTemplateObject), 6569/* harmony export */ "__importStar": () => (/* binding */ __importStar), 6570/* harmony export */ "__importDefault": () => (/* binding */ __importDefault), 6571/* harmony export */ "__classPrivateFieldGet": () => (/* binding */ __classPrivateFieldGet), 6572/* harmony export */ "__classPrivateFieldSet": () => (/* binding */ __classPrivateFieldSet
vendor: 10,150 bytes, lines 6572-6794
6572) 6573/* harmony export */ }); 6574/*! ***************************************************************************** 6575Copyright (c) Microsoft Corporation. 6576 6577Permission to use, copy, modify, and/or distribute this software for any 6578purpose with or without fee is hereby granted. 6579 6580THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH 6581REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY 6582AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, 6583INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM 6584LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR 6585OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR 6586PERFORMANCE OF THIS SOFTWARE. 6587***************************************************************************** */ 6588/* global Reflect, Promise */ 6589 6590var extendStatics = function(d, b) { 6591 extendStatics = Object.setPrototypeOf || 6592 ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || 6593 function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; 6594 return extendStatics(d, b); 6595}; 6596 6597function __extends(d, b) { 6598 extendStatics(d, b); 6599 function __() { this.constructor = d; } 6600 d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); 6601} 6602 6603var __assign = function() { 6604 __assign = Object.assign || function __assign(t) { 6605 for (var s, i = 1, n = arguments.length; i < n; i++) { 6606 s = arguments[i]; 6607 for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p]; 6608 } 6609 return t; 6610 } 6611 return __assign.apply(this, arguments); 6612} 6613 6614function __rest(s, e) { 6615 var t = {}; 6616 for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) 6617 t[p] = s[p]; 6618 if (s != null && typeof Object.getOwnPropertySymbols === "function") 6619 for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) { 6620 if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) 6621 t[p[i]] = s[p[i]]; 6622 } 6623 return t; 6624} 6625 6626function __decorate(decorators, target, key, desc) { 6627 var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d; 6628 if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc); 6629 else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r; 6630 return c > 3 && r && Object.defineProperty(target, key, r), r; 6631} 6632 6633function __param(paramIndex, decorator) { 6634 return function (target, key) { decorator(target, key, paramIndex); } 6635} 6636 6637function __metadata(metadataKey, metadataValue) { 6638 if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(metadataKey, metadataValue); 6639} 6640 6641function __awaiter(thisArg, _arguments, P, generator) { 6642 function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); } 6643 return new (P || (P = Promise))(function (resolve, reject) { 6644 function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } } 6645 function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } } 6646 function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); } 6647 step((generator = generator.apply(thisArg, _arguments || [])).next()); 6648 }); 6649} 6650 6651function __generator(thisArg, body) { 6652 var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g; 6653 return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g; 6654 function verb(n) { return function (v) { return step([n, v]); }; } 6655 function step(op) { 6656 if (f) throw new TypeError("Generator is already executing."); 6657 while (_) try { 6658 if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t; 6659 if (y = 0, t) op = [op[0] & 2, t.value]; 6660 switch (op[0]) { 6661 case 0: case 1: t = op; break; 6662 case 4: _.label++; return { value: op[1], done: false }; 6663 case 5: _.label++; y = op[1]; op = [0]; continue; 6664 case 7: op = _.ops.pop(); _.trys.pop(); continue; 6665 default: 6666 if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; } 6667 if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; } 6668 if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; } 6669 if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; } 6670 if (t[2]) _.ops.pop(); 6671 _.trys.pop(); continue; 6672 } 6673 op = body.call(thisArg, _); 6674 } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; } 6675 if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true }; 6676 } 6677} 6678 6679function __createBinding(o, m, k, k2) { 6680 if (k2 === undefined) k2 = k; 6681 o[k2] = m[k]; 6682} 6683 6684function __exportStar(m, exports) { 6685 for (var p in m) if (p !== "default" && !exports.hasOwnProperty(p)) exports[p] = m[p]; 6686} 6687 6688function __values(o) { 6689 var s = typeof Symbol === "function" && Symbol.iterator, m = s && o[s], i = 0; 6690 if (m) return m.call(o); 6691 if (o && typeof o.length === "number") return { 6692 next: function () { 6693 if (o && i >= o.length) o = void 0; 6694 return { value: o && o[i++], done: !o }; 6695 } 6696 }; 6697 throw new TypeError(s ? "Object is not iterable." : "Symbol.iterator is not defined."); 6698} 6699 6700function __read(o, n) { 6701 var m = typeof Symbol === "function" && o[Symbol.iterator]; 6702 if (!m) return o; 6703 var i = m.call(o), r, ar = [], e; 6704 try { 6705 while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value); 6706 } 6707 catch (error) { e = { error: error }; } 6708 finally { 6709 try { 6710 if (r && !r.done && (m = i["return"])) m.call(i); 6711 } 6712 finally { if (e) throw e.error; } 6713 } 6714 return ar; 6715} 6716 6717function __spread() { 6718 for (var ar = [], i = 0; i < arguments.length; i++) 6719 ar = ar.concat(__read(arguments[i])); 6720 return ar; 6721} 6722 6723function __spreadArrays() { 6724 for (var s = 0, i = 0, il = arguments.length; i < il; i++) s += arguments[i].length; 6725 for (var r = Array(s), k = 0, i = 0; i < il; i++) 6726 for (var a = arguments[i], j = 0, jl = a.length; j < jl; j++, k++) 6727 r[k] = a[j]; 6728 return r; 6729}; 6730 6731function __await(v) { 6732 return this instanceof __await ? (this.v = v, this) : new __await(v); 6733} 6734 6735function __asyncGenerator(thisArg, _arguments, generator) { 6736 if (!Symbol.asyncIterator) throw new TypeError("Symbol.asyncIterator is not defined."); 6737 var g = generator.apply(thisArg, _arguments || []), i, q = []; 6738 return i = {}, verb("next"), verb("throw"), verb("return"), i[Symbol.asyncIterator] = function () { return this; }, i; 6739 function verb(n) { if (g[n]) i[n] = function (v) { return new Promise(function (a, b) { q.push([n, v, a, b]) > 1 || resume(n, v); }); }; } 6740 function resume(n, v) { try { step(g[n](v)); } catch (e) { settle(q[0][3], e); } } 6741 function step(r) { r.value instanceof __await ? Promise.resolve(r.value.v).then(fulfill, reject) : settle(q[0][2], r); } 6742 function fulfill(value) { resume("next", value); } 6743 function reject(value) { resume("throw", value); } 6744 function settle(f, v) { if (f(v), q.shift(), q.length) resume(q[0][0], q[0][1]); } 6745} 6746 6747function __asyncDelegator(o) { 6748 var i, p; 6749 return i = {}, verb("next"), verb("throw", function (e) { throw e; }), verb("return"), i[Symbol.iterator] = function () { return this; }, i; 6750 function verb(n, f) { i[n] = o[n] ? function (v) { return (p = !p) ? { value: __await(o[n](v)), done: n === "return" } : f ? f(v) : v; } : f; } 6751} 6752 6753function __asyncValues(o) { 6754 if (!Symbol.asyncIterator) throw new TypeError("Symbol.asyncIterator is not defined."); 6755 var m = o[Symbol.asyncIterator], i; 6756 return m ? m.call(o) : (o = typeof __values === "function" ? __values(o) : o[Symbol.iterator](), i = {}, verb("next"), verb("throw"), verb("return"), i[Symbol.asyncIterator] = function () { return this; }, i); 6757 function verb(n) { i[n] = o[n] && function (v) { return new Promise(function (resolve, reject) { v = o[n](v), settle(resolve, reject, v.done, v.value); }); }; } 6758 function settle(resolve, reject, d, v) { Promise.resolve(v).then(function(v) { resolve({ value: v, done: d }); }, reject); } 6759} 6760 6761function __makeTemplateObject(cooked, raw) { 6762 if (Object.defineProperty) { Object.defineProperty(cooked, "raw", { value: raw }); } else { cooked.raw = raw; } 6763 return cooked; 6764}; 6765 6766function __importStar(mod) { 6767 if (mod && mod.__esModule) return mod; 6768 var result = {}; 6769 if (mod != null) for (var k in mod) if (Object.hasOwnProperty.call(mod, k)) result[k] = mod[k]; 6770 result.default = mod; 6771 return result; 6772} 6773 6774function __importDefault(mod) { 6775 return (mod && mod.__esModule) ? mod : { default: mod }; 6776} 6777 6778function __classPrivateFieldGet(receiver, privateMap) { 6779 if (!privateMap.has(receiver)) { 6780 throw new TypeError("attempted to get private field on non-instance"); 6781 } 6782 return privateMap.get(receiver); 6783} 6784 6785function __classPrivateFieldSet(receiver, privateMap, value) { 6786 if (!privateMap.has(receiver)) { 6787 throw new TypeError("attempted to set private field on non-instance"); 6788 } 6789 privateMap.set(receiver, value); 6790 return value; 6791} 6792 6793 6794/***/ })
6794 6795 6796}]); 6797//# sourceMappingURL=default-node_modules_progress_kendo-angular-buttons___ivy_ngcc___dist_fesm2015_index_js.8b70ecc1330cc200.js.map
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.