UNPKG

igniteui-react-grids

Version:

Ignite UI React grid components.

106 lines (105 loc) 3.59 kB
/* THIS INFRAGISTICS ULTIMATE SOFTWARE LICENSE AGREEMENT ("AGREEMENT") LOCATED HERE: https://www.infragistics.com/legal/license/igultimate-la https://www.infragistics.com/legal/license/igultimate-eula GOVERNS THE LICENSING, INSTALLATION AND USE OF INFRAGISTICS SOFTWARE. BY DOWNLOADING AND/OR INSTALLING AND USING INFRAGISTICS SOFTWARE: you are indicating that you have read and understand this Agreement, and agree to be legally bound by it on behalf of the yourself and your company. */ import { Base, Number_$type, markType } from "igniteui-react-core"; import { FastIterationDictionary$2 } from "igniteui-react-core"; import { CellModel } from "./CellModel"; /** * @hidden */ export let AccessibilityRow = /*@__PURE__*/ (() => { class AccessibilityRow extends Base { constructor() { super(...arguments); this.i = null; this.e = 0; this.d = 0; this.f = null; this.a = new FastIterationDictionary$2(Number_$type, CellModel.$, 0); } get c() { return this.e + 2; } get b() { return this.a; } j(a, b) { if (!this.b.d(a.l.a5)) { this.b.s(a.l.a5, a); } else if (this.b.item(a.l.a5) != a) { this.b.item(a.l.a5, a); } b.setAttribute("id", this.g(a)); b.setAttribute("role", this.f); if (a.l.a0) { b.setAttribute("aria-colindex", "1"); b.setAttribute("aria-colspan", this.d.toString()); } else { b.setAttribute("aria-colindex", (a.l.a5 + 1).toString()); } if (a.cq == 1) { b.setAttribute("aria-selected", "true"); } else { b.setAttribute("aria-selected", "false"); } if (a.l.g) { if (a.n == 1) { b.setAttribute("aria-sort", "ascending"); } else if (a.n == 2) { b.setAttribute("aria-sort", "descending"); } else { b.setAttribute("aria-sort", "none"); } } if (a.a2) { b.setAttribute("aria-expanded", a.ba ? "true" : "false"); } } h() { let a = ""; for (let b = 0; b < this.d; b++) { if (this.b.d(b)) { if (a.length > 0) { a += " "; } let c = this.g(this.b.item(b)); a += c; } } if (a == "") { for (let d = 0; d < this.b.o.count; d++) { let e = this.b.o._inner[d]; let f = this.b.item(e); let g = this.g(f); a += g; } } return a; } k() { this.b.u(); } g(a) { if (a.l.aj || (a.l.an && !a.l.h)) { if (a.l.a0) { return "cellid" + this.i + "r" + this.c + "span"; } return "cellid" + this.i + "r" + this.c + "c" + a.l.a5; } return null; } l(a, b) { a.getNativeElement().removeAttribute(b); } } AccessibilityRow.$t = /*@__PURE__*/ markType(AccessibilityRow, 'AccessibilityRow'); return AccessibilityRow; })();