UNPKG

igniteui-react-grids

Version:

Ignite UI React grid components.

116 lines (115 loc) 3.88 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 { __extends } from "tslib"; import { Base, Number_$type, markType } from "igniteui-react-core"; import { FastIterationDictionary$2 } from "igniteui-react-core"; import { CellModel } from "./CellModel"; /** * @hidden */ var AccessibilityRow = /** @class */ /*@__PURE__*/ (function (_super) { __extends(AccessibilityRow, _super); function AccessibilityRow() { var _this = _super !== null && _super.apply(this, arguments) || this; _this.i = null; _this.e = 0; _this.d = 0; _this.f = null; _this.a = new FastIterationDictionary$2(Number_$type, CellModel.$, 0); return _this; } Object.defineProperty(AccessibilityRow.prototype, "c", { get: function () { return this.e + 2; }, enumerable: false, configurable: true }); Object.defineProperty(AccessibilityRow.prototype, "b", { get: function () { return this.a; }, enumerable: false, configurable: true }); AccessibilityRow.prototype.j = function (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"); } }; AccessibilityRow.prototype.h = function () { var a = ""; for (var b = 0; b < this.d; b++) { if (this.b.d(b)) { if (a.length > 0) { a += " "; } var c = this.g(this.b.item(b)); a += c; } } if (a == "") { for (var d = 0; d < this.b.o.count; d++) { var e = this.b.o._inner[d]; var f = this.b.item(e); var g = this.g(f); a += g; } } return a; }; AccessibilityRow.prototype.k = function () { this.b.u(); }; AccessibilityRow.prototype.g = function (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; }; AccessibilityRow.prototype.l = function (a, b) { a.getNativeElement().removeAttribute(b); }; AccessibilityRow.$t = markType(AccessibilityRow, 'AccessibilityRow'); return AccessibilityRow; }(Base)); export { AccessibilityRow };