UNPKG

synapse-react-client

Version:

[![npm version](https://badge.fury.io/js/synapse-react-client.svg)](https://badge.fury.io/js/synapse-react-client) [![code style: prettier](https://img.shields.io/badge/code_style-prettier-ff69b4.svg?style=flat-square)](https://github.com/prettier/prettie

46 lines (45 loc) 977 B
function d(r, o) { const n = {}, t = o.api.getSnapshot(); if (l(t.rows, r.min.row, r.max.row)) n.rowSelectAll = !0; else { const e = o.api.arr(["rows"]); n.rowSelection = i( e, r.min.row, r.max.row ); } if (l(t.columnOrder, r.min.col, r.max.col)) n.columnSelectAll = !0; else { const e = o.api.arr(["columnOrder"]); n.columnSelection = i( e, r.min.col, r.max.col ); } return n; } function l(r, o, n) { return o === 0 && n === r.length - 1; } function i(r, o, n) { const t = []; for (let e = o; e <= n; e++) { const c = r.node.findChunk(e); if (c) { const [a, u] = c; t.push({ rep: a.id.sid, seq: a.id.time + u }); } else console.warn( `getCrdtIdsForArrayRange: No chunk found for array index ${e}. This may indicate an unexpected state.` ); } return t; } export { d as default }; //# sourceMappingURL=computeReplicaSelectionModel.js.map