1 | 'use strict';
|
2 |
|
3 | Object.defineProperty(exports, "__esModule", {
|
4 | value: true
|
5 | });
|
6 | exports._formatToIndicesArray = exports.isChanged = undefined;
|
7 |
|
8 | var _util = require('tinper-sparrow/src/util');
|
9 |
|
10 | var isChanged = function isChanged() {
|
11 | var rows = this.getAllRows();
|
12 | for (var i = 0; i < rows.length; i++) {
|
13 | if (rows[i].status != Row.STATUS.NORMAL) return true;
|
14 | }
|
15 | return false;
|
16 | }; |
17 |
|
18 |
|
19 |
|
20 |
|
21 |
|
22 |
|
23 | var _formatToIndicesArray = function _formatToIndicesArray(dataTableObj, indices) {
|
24 | if (typeof indices == 'string' || typeof indices == 'number') {
|
25 | indices = [indices];
|
26 | } else if (indices instanceof Row) {
|
27 | indices = [dataTableObj.getIndexByRowId(indices.rowId)];
|
28 | } else if ((0, _util.isArray)(indices) && indices.length > 0 && indices[0] instanceof Row) {
|
29 | for (var i = 0; i < indices.length; i++) {
|
30 | indices[i] = dataTableObj.getIndexByRowId(indices[i].rowId);
|
31 | }
|
32 | }
|
33 | return indices;
|
34 | };
|
35 |
|
36 | exports.isChanged = isChanged;
|
37 | exports._formatToIndicesArray = _formatToIndicesArray; |
\ | No newline at end of file |