svg-table 0.0.1 → 0.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGES.md +5 -0
- package/README.md +447 -1
- package/{tableData.ts → TableData.ts} +2 -3
- package/TableFormatter.ts +587 -0
- package/{tableStyler.ts → TableStyler.ts} +75 -6
- package/dist/{tableData.d.ts → TableData.d.ts} +2 -2
- package/dist/{tableData.d.ts.map → TableData.d.ts.map} +1 -1
- package/dist/{tableData.js → TableData.js} +10 -10
- package/dist/{tableData.js.map → TableData.js.map} +1 -1
- package/dist/TableFormatter.d.ts +459 -0
- package/dist/TableFormatter.d.ts.map +1 -0
- package/dist/TableFormatter.js +579 -0
- package/dist/TableFormatter.js.map +1 -0
- package/dist/{tableStyler.d.ts → TableStyler.d.ts} +58 -3
- package/dist/TableStyler.d.ts.map +1 -0
- package/dist/{tableStyler.js → TableStyler.js} +90 -31
- package/dist/TableStyler.js.map +1 -0
- package/dist/index.d.ts +5 -5
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +12 -12
- package/dist/index.js.map +1 -1
- package/dist/tableData.test.js +15 -15
- package/dist/tableFormatter.test.js +54 -15
- package/dist/tableFormatter.test.js.map +1 -1
- package/dist/tableStyler.test.js +236 -20
- package/dist/tableStyler.test.js.map +1 -1
- package/dist/tableSvg.d.ts +2 -2
- package/dist/tableSvg.js +7 -7
- package/index.ts +13 -12
- package/package.json +2 -2
- package/svg-table-0.0.1.tgz +0 -0
- package/tableData.test.ts +1 -1
- package/tableFormatter.test.ts +48 -4
- package/tableStyler.test.ts +133 -10
- package/tableSvg.ts +3 -3
- package/dist/tableFormatter.d.ts +0 -179
- package/dist/tableFormatter.d.ts.map +0 -1
- package/dist/tableFormatter.js +0 -298
- package/dist/tableFormatter.js.map +0 -1
- package/dist/tableStyler.d.ts.map +0 -1
- package/dist/tableStyler.js.map +0 -1
- package/svg-table-0.0.1-snapshot.tgz +0 -0
- package/tableFormatter.ts +0 -306
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { TableData } from "./
|
|
1
|
+
import { TableData } from "./TableData";
|
|
2
2
|
import { DataFrame } from "data-frame-ts";
|
|
3
3
|
import { type Result } from "result-fn";
|
|
4
|
-
import { type Background, type Border, type CellStyle, type ColumnHeaderStyle, type ColumnStyle, type Dimension, type FooterStyle, type Padding, type RowHeaderStyle, type RowStyle, type Styling, type TableFont, type TableStylerProps
|
|
4
|
+
import { type Background, type Border, type CellStyle, type ColumnHeaderStyle, type ColumnStyle, type Dimension, type FooterStyle, Margin, type Padding, type RowHeaderStyle, type RowStyle, type Styling, type TableFont, type TableStylerProps } from "./stylings";
|
|
5
5
|
/**
|
|
6
6
|
* Represents a table with applied styles.
|
|
7
7
|
* Provides methods to access the styling information for different parts of the table.
|
|
@@ -76,8 +76,20 @@ export declare class StyledTable<V> {
|
|
|
76
76
|
* @private
|
|
77
77
|
*/
|
|
78
78
|
private rowTagsFor;
|
|
79
|
+
/**
|
|
80
|
+
* Checks if the table has a row header.
|
|
81
|
+
* @returns `true` if the table has a row header, `false` otherwise
|
|
82
|
+
*/
|
|
79
83
|
hasRowHeader(): boolean;
|
|
84
|
+
/**
|
|
85
|
+
* Checks if the table has a column header.
|
|
86
|
+
* @returns `true` if the table has a row header, `false` otherwise
|
|
87
|
+
*/
|
|
80
88
|
hasColumnHeader(): boolean;
|
|
89
|
+
/**
|
|
90
|
+
* Checks if the table has a footer header.
|
|
91
|
+
* @returns `true` if the table has a row header, `false` otherwise
|
|
92
|
+
*/
|
|
81
93
|
hasFooter(): boolean;
|
|
82
94
|
/**
|
|
83
95
|
* Gets the style for the row header.
|
|
@@ -89,6 +101,10 @@ export declare class StyledTable<V> {
|
|
|
89
101
|
* @returns A Result containing the column header style if found, or an error message
|
|
90
102
|
*/
|
|
91
103
|
columnHeaderStyle(): Result<Styling<ColumnHeaderStyle>, string>;
|
|
104
|
+
/**
|
|
105
|
+
* Gets the style for the footer.
|
|
106
|
+
* @returns A Result containing the footer style if found, or an error message
|
|
107
|
+
*/
|
|
92
108
|
footerStyle(): Result<Styling<FooterStyle>, string>;
|
|
93
109
|
/**
|
|
94
110
|
* Gets the style for a specific row.
|
|
@@ -194,6 +210,14 @@ export declare class TableStyler<V> {
|
|
|
194
210
|
* @returns A new TableStyler instance with updated properties
|
|
195
211
|
*/
|
|
196
212
|
update(properties: Partial<TableStylerProps<V>>): TableStyler<V>;
|
|
213
|
+
/**
|
|
214
|
+
* Applies the specified font settings for the table and returns a new {@link TableStyler}
|
|
215
|
+
* instance with the updated font configuration.
|
|
216
|
+
*
|
|
217
|
+
* @param font - The font configuration to be applied. This object can include partial
|
|
218
|
+
* properties of the TableFont.
|
|
219
|
+
* @return A new {@link TableStyler} instance with the updated font settings.
|
|
220
|
+
*/
|
|
197
221
|
withTableFont(font: Partial<TableFont>): TableStyler<V>;
|
|
198
222
|
/**
|
|
199
223
|
* Sets the background for the table.
|
|
@@ -277,6 +301,17 @@ export declare class TableStyler<V> {
|
|
|
277
301
|
* @returns A new TableStyler instance with the row style applied
|
|
278
302
|
*/
|
|
279
303
|
withRowStyle(rowIndex: number, rowStyle: Partial<RowStyle>, priority?: number): TableStyler<V>;
|
|
304
|
+
/**
|
|
305
|
+
* Applies specific styles to rows in a table based on the provided row indexes.
|
|
306
|
+
*
|
|
307
|
+
* @param rowIndexes - An array of row indexes to which the styles will be applied. If the
|
|
308
|
+
* array is empty, all rows will be styled.
|
|
309
|
+
* @param rowStyle - An object representing the styles to apply to the specified rows.
|
|
310
|
+
* @param [priority=0] - An optional priority value for the styles. Higher priority values
|
|
311
|
+
* override lower ones.
|
|
312
|
+
* @return A new TableStyler instance with the specified row styles applied.
|
|
313
|
+
* @see withRowStyle
|
|
314
|
+
*/
|
|
280
315
|
withRowStyles(rowIndexes: Array<number>, rowStyle: Partial<RowStyle>, priority?: number): TableStyler<V>;
|
|
281
316
|
private static withRowStyles;
|
|
282
317
|
/**
|
|
@@ -288,6 +323,16 @@ export declare class TableStyler<V> {
|
|
|
288
323
|
* @returns A new TableStyler instance with the column style applied
|
|
289
324
|
*/
|
|
290
325
|
withColumnStyle(columnIndex: number, columnStyle: Partial<ColumnStyle>, priority?: number): TableStyler<V>;
|
|
326
|
+
/**
|
|
327
|
+
* Applies specified styles to the columns of a table.
|
|
328
|
+
*
|
|
329
|
+
* @param columnIndexes - Array of column indexes to which the style should be applied. If the array
|
|
330
|
+
* is empty, styles will be applied to all columns.
|
|
331
|
+
* @param columnStyle - Partial column style configuration object defining the styles to be applied.
|
|
332
|
+
* @param [priority=0] - Optional priority value to determine the precedence of this style over others.
|
|
333
|
+
* @return Returns an instance of TableStyler with the updated column styles applied.
|
|
334
|
+
* @see withColumnStyle
|
|
335
|
+
*/
|
|
291
336
|
withColumnStyles(columnIndexes: Array<number>, columnStyle: Partial<ColumnStyle>, priority?: number): TableStyler<V>;
|
|
292
337
|
private static withColumnStyles;
|
|
293
338
|
/**
|
|
@@ -300,6 +345,16 @@ export declare class TableStyler<V> {
|
|
|
300
345
|
* @returns A new TableStyler instance with the cell style applied
|
|
301
346
|
*/
|
|
302
347
|
withCellStyle(rowIndex: number, columnIndex: number, cellStyle: Partial<CellStyle>, priority?: number): TableStyler<V>;
|
|
348
|
+
/**
|
|
349
|
+
* Sets the style for a specific cell based on a predicate.
|
|
350
|
+
* @param predicate A function that accepts the value, row-index, and column-index of the cell, and
|
|
351
|
+
* returns `true` if the cell should be styled, or `false` otherwise.
|
|
352
|
+
* @param cellStyle The style to apply to the cell if the predicate is `true`.
|
|
353
|
+
* @param priority The style's priority. Higher priority values override lower ones.
|
|
354
|
+
* @returns A new TableStyler instance with the cell style applied.
|
|
355
|
+
* @see withCellStyle
|
|
356
|
+
* @see withCellStyles
|
|
357
|
+
*/
|
|
303
358
|
withCellStyleWhen(predicate: (value: V, rowIndex: number, columnIndex: number) => boolean, cellStyle: Partial<CellStyle>, priority?: number): TableStyler<V>;
|
|
304
359
|
/**
|
|
305
360
|
* Finalizes the styling process and creates a StyledTable instance.
|
|
@@ -307,4 +362,4 @@ export declare class TableStyler<V> {
|
|
|
307
362
|
*/
|
|
308
363
|
styleTable(): StyledTable<V>;
|
|
309
364
|
}
|
|
310
|
-
//# sourceMappingURL=
|
|
365
|
+
//# sourceMappingURL=TableStyler.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"TableStyler.d.ts","sourceRoot":"","sources":["../TableStyler.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,SAAS,EAAC,MAAM,aAAa,CAAC;AACtC,OAAO,EAAmC,SAAS,EAAyC,MAAM,eAAe,CAAC;AAClH,OAAO,EAAgB,KAAK,MAAM,EAAgB,MAAM,WAAW,CAAC;AACpE,OAAO,EACH,KAAK,UAAU,EACf,KAAK,MAAM,EACX,KAAK,SAAS,EACd,KAAK,iBAAiB,EACtB,KAAK,WAAW,EAahB,KAAK,SAAS,EACd,KAAK,WAAW,EAChB,MAAM,EACN,KAAK,OAAO,EACZ,KAAK,cAAc,EACnB,KAAK,QAAQ,EACb,KAAK,OAAO,EAGZ,KAAK,SAAS,EACd,KAAK,gBAAgB,EAExB,MAAM,YAAY,CAAC;AAEpB;;;GAGG;AACH,qBAAa,WAAW,CAAC,CAAC;IAalB,OAAO,CAAC,QAAQ,CAAC,SAAS;IAC1B,OAAO,CAAC,QAAQ,CAAC,IAAI;IACrB,OAAO,CAAC,QAAQ,CAAC,MAAM;IACvB,OAAO,CAAC,QAAQ,CAAC,UAAU;IAC3B,OAAO,CAAC,QAAQ,CAAC,SAAS;IAC1B,OAAO,CAAC,QAAQ,CAAC,OAAO;IACxB,OAAO,CAAC,QAAQ,CAAC,MAAM;IAjB3B;;;;;;;;;OASG;gBAEkB,SAAS,EAAE,SAAS,CAAC,CAAC,CAAC,EACvB,IAAI,EAAE,SAAS,EACf,MAAM,EAAE,MAAM,EACd,UAAU,EAAE,UAAU,EACtB,SAAS,EAAE,IAAI,CAAC,SAAS,EAAE,OAAO,GAAG,QAAQ,CAAC,E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Aa;IAgB5B;;;;;;;OAOG;IACH,eAAe,CAAC,WAAW,EAAE,MAAM,EAAE,WAAW,EAAE,OAAO,CAAC,WAAW,CAAC,EAAE,QAAQ,GAAE,MAAU,GAAG,WAAW,CAAC,CAAC,CAAC;IAa7G;;;;;;;;;OASG;IACH,gBAAgB,CACZ,aAAa,EAAE,KAAK,CAAC,MAAM,CAAC,EAC5B,WAAW,EAAE,OAAO,CAAC,WAAW,CAAC,EACjC,QAAQ,GAAE,MAAU,GACrB,WAAW,CAAC,CAAC,CAAC;IAOjB,OAAO,CAAC,MAAM,CAAC,gBAAgB;IAgB/B;;;;;;;;OAQG;IACH,aAAa,CAAC,QAAQ,EAAE,MAAM,EAAE,WAAW,EAAE,MAAM,EAAE,SAAS,EAAE,OAAO,CAAC,SAAS,CAAC,EAAE,QAAQ,GAAE,MAAU,GAAG,WAAW,CAAC,CAAC,CAAC;IAoBzH;;;;;;;;;OASG;IACH,iBAAiB,CACb,SAAS,EAAE,CAAC,KAAK,EAAE,CAAC,EAAE,QAAQ,EAAE,MAAM,EAAE,WAAW,EAAE,MAAM,KAAK,OAAO,EACvE,SAAS,EAAE,OAAO,CAAC,SAAS,CAAC,EAC7B,QAAQ,GAAE,MAAU,GACrB,WAAW,CAAC,CAAC,CAAC;IAWjB;;;OAGG;IACH,UAAU,IAAI,WAAW,CAAC,CAAC,CAAC;CAc/B"}
|
|
@@ -12,7 +12,7 @@ var __assign = (this && this.__assign) || function () {
|
|
|
12
12
|
};
|
|
13
13
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
14
14
|
exports.TableStyler = exports.StyledTable = void 0;
|
|
15
|
-
var
|
|
15
|
+
var TableData_1 = require("./TableData");
|
|
16
16
|
var data_frame_ts_1 = require("data-frame-ts");
|
|
17
17
|
var result_fn_1 = require("result-fn");
|
|
18
18
|
var stylings_1 = require("./stylings");
|
|
@@ -48,7 +48,7 @@ var StyledTable = /** @class */ (function () {
|
|
|
48
48
|
};
|
|
49
49
|
StyledTable.prototype.tableData = function () {
|
|
50
50
|
// fromDataFrame makes a copy of the data frame
|
|
51
|
-
return
|
|
51
|
+
return TableData_1.TableData.fromDataFrame(this.dataFrame);
|
|
52
52
|
};
|
|
53
53
|
/**
|
|
54
54
|
* Returns the font settings for the table.
|
|
@@ -142,21 +142,33 @@ var StyledTable = /** @class */ (function () {
|
|
|
142
142
|
}
|
|
143
143
|
return (0, result_fn_1.successResult)(tags[0]);
|
|
144
144
|
};
|
|
145
|
+
/**
|
|
146
|
+
* Checks if the table has a row header.
|
|
147
|
+
* @returns `true` if the table has a row header, `false` otherwise
|
|
148
|
+
*/
|
|
145
149
|
StyledTable.prototype.hasRowHeader = function () {
|
|
146
|
-
return
|
|
150
|
+
return TableData_1.TableData.hasRowHeader(this.dataFrame);
|
|
147
151
|
};
|
|
152
|
+
/**
|
|
153
|
+
* Checks if the table has a column header.
|
|
154
|
+
* @returns `true` if the table has a row header, `false` otherwise
|
|
155
|
+
*/
|
|
148
156
|
StyledTable.prototype.hasColumnHeader = function () {
|
|
149
|
-
return
|
|
157
|
+
return TableData_1.TableData.hasColumnHeader(this.dataFrame);
|
|
150
158
|
};
|
|
159
|
+
/**
|
|
160
|
+
* Checks if the table has a footer header.
|
|
161
|
+
* @returns `true` if the table has a row header, `false` otherwise
|
|
162
|
+
*/
|
|
151
163
|
StyledTable.prototype.hasFooter = function () {
|
|
152
|
-
return
|
|
164
|
+
return TableData_1.TableData.hasFooter(this.dataFrame);
|
|
153
165
|
};
|
|
154
166
|
/**
|
|
155
167
|
* Gets the style for the row header.
|
|
156
168
|
* @returns A Result containing the row header style if found, or an error message
|
|
157
169
|
*/
|
|
158
170
|
StyledTable.prototype.rowHeaderStyle = function () {
|
|
159
|
-
if (!
|
|
171
|
+
if (!TableData_1.TableData.hasRowHeader(this.dataFrame)) {
|
|
160
172
|
return (0, result_fn_1.failureResult)("(StyledTable::rowHeaderStyle) The table data does not have a row header");
|
|
161
173
|
}
|
|
162
174
|
return this
|
|
@@ -168,15 +180,19 @@ var StyledTable = /** @class */ (function () {
|
|
|
168
180
|
* @returns A Result containing the column header style if found, or an error message
|
|
169
181
|
*/
|
|
170
182
|
StyledTable.prototype.columnHeaderStyle = function () {
|
|
171
|
-
if (!
|
|
183
|
+
if (!TableData_1.TableData.hasColumnHeader(this.dataFrame)) {
|
|
172
184
|
return (0, result_fn_1.failureResult)("(StyledTable::columnHeaderStyle) The table data does not have a column header");
|
|
173
185
|
}
|
|
174
186
|
return this
|
|
175
187
|
.rowTagsFor(0, stylings_1.TableStyleType.COLUMN_HEADER)
|
|
176
188
|
.map(function (tag) { return tag.value; });
|
|
177
189
|
};
|
|
190
|
+
/**
|
|
191
|
+
* Gets the style for the footer.
|
|
192
|
+
* @returns A Result containing the footer style if found, or an error message
|
|
193
|
+
*/
|
|
178
194
|
StyledTable.prototype.footerStyle = function () {
|
|
179
|
-
if (!
|
|
195
|
+
if (!TableData_1.TableData.hasFooter(this.dataFrame)) {
|
|
180
196
|
return (0, result_fn_1.failureResult)("(StyledTable::footerStyle) The table data does not have a footer");
|
|
181
197
|
}
|
|
182
198
|
return this
|
|
@@ -244,18 +260,18 @@ var StyledTable = /** @class */ (function () {
|
|
|
244
260
|
* message if they are not.
|
|
245
261
|
*/
|
|
246
262
|
StyledTable.prototype.stylesForDataCoordinates = function (rowIndex, columnIndex) {
|
|
247
|
-
if (rowIndex < 0 || rowIndex >=
|
|
248
|
-
columnIndex < 0 || columnIndex >=
|
|
263
|
+
if (rowIndex < 0 || rowIndex >= TableData_1.TableData.dataRowCount(this.dataFrame) ||
|
|
264
|
+
columnIndex < 0 || columnIndex >= TableData_1.TableData.dataColumnCount(this.dataFrame)) {
|
|
249
265
|
return (0, result_fn_1.failureResult)("(StyledTable::dataCellStyles) Invalid row and/or column index for data; row_index".concat(rowIndex) +
|
|
250
266
|
"; column_index: ".concat(columnIndex) +
|
|
251
|
-
"; valid_row_index: [0, ".concat(
|
|
252
|
-
"; valid_column_index: [0, ".concat(
|
|
253
|
-
"; has_column_header: ".concat(
|
|
254
|
-
"; has_row_header: ".concat(
|
|
255
|
-
"; has_footer: ".concat(
|
|
267
|
+
"; valid_row_index: [0, ".concat(TableData_1.TableData.dataRowCount(this.dataFrame), ")") +
|
|
268
|
+
"; valid_column_index: [0, ".concat(TableData_1.TableData.dataColumnCount(this.dataFrame), ")") +
|
|
269
|
+
"; has_column_header: ".concat(TableData_1.TableData.hasColumnHeader(this.dataFrame)) +
|
|
270
|
+
"; has_row_header: ".concat(TableData_1.TableData.hasRowHeader(this.dataFrame)) +
|
|
271
|
+
"; has_footer: ".concat(TableData_1.TableData.hasFooter(this.dataFrame)));
|
|
256
272
|
}
|
|
257
|
-
var columnHeaderOffset =
|
|
258
|
-
var rowHeaderOffset =
|
|
273
|
+
var columnHeaderOffset = TableData_1.TableData.hasColumnHeader(this.dataFrame) ? 1 : 0;
|
|
274
|
+
var rowHeaderOffset = TableData_1.TableData.hasRowHeader(this.dataFrame) ? 1 : 0;
|
|
259
275
|
return this.stylesForTableCoordinates(rowIndex + columnHeaderOffset, columnIndex + rowHeaderOffset);
|
|
260
276
|
};
|
|
261
277
|
/**
|
|
@@ -398,6 +414,14 @@ var TableStyler = /** @class */ (function () {
|
|
|
398
414
|
var _a = properties.dataFrame, dataFrame = _a === void 0 ? this.dataFrame : _a, _b = properties.font, font = _b === void 0 ? this.font : _b, _c = properties.border, border = _c === void 0 ? this.border : _c, _d = properties.background, background = _d === void 0 ? this.background : _d, _e = properties.dimension, dimension = _e === void 0 ? this.dimension : _e, _f = properties.padding, padding = _f === void 0 ? this.padding : _f, _g = properties.margin, margin = _g === void 0 ? this.margin : _g;
|
|
399
415
|
return new TableStyler(dataFrame, font, border, background, dimension, padding, margin, this.errors);
|
|
400
416
|
};
|
|
417
|
+
/**
|
|
418
|
+
* Applies the specified font settings for the table and returns a new {@link TableStyler}
|
|
419
|
+
* instance with the updated font configuration.
|
|
420
|
+
*
|
|
421
|
+
* @param font - The font configuration to be applied. This object can include partial
|
|
422
|
+
* properties of the TableFont.
|
|
423
|
+
* @return A new {@link TableStyler} instance with the updated font settings.
|
|
424
|
+
*/
|
|
401
425
|
TableStyler.prototype.withTableFont = function (font) {
|
|
402
426
|
var builder = this.copy();
|
|
403
427
|
builder.font = __assign(__assign({}, stylings_1.defaultTableFont), font);
|
|
@@ -496,7 +520,7 @@ var TableStyler = /** @class */ (function () {
|
|
|
496
520
|
TableStyler.prototype.withColumnHeaderStyle = function (columnHeaderStyle, priority) {
|
|
497
521
|
if (columnHeaderStyle === void 0) { columnHeaderStyle = stylings_1.defaultColumnHeaderStyle; }
|
|
498
522
|
if (priority === void 0) { priority = Infinity; }
|
|
499
|
-
if (!
|
|
523
|
+
if (!TableData_1.TableData.hasColumnHeader(this.dataFrame)) {
|
|
500
524
|
this.errors.push("The column header style can only be supplied when the table data has a column header");
|
|
501
525
|
return this;
|
|
502
526
|
}
|
|
@@ -514,7 +538,7 @@ var TableStyler = /** @class */ (function () {
|
|
|
514
538
|
*/
|
|
515
539
|
TableStyler.prototype.withRowHeaderStyle = function (rowHeaderStyle, priority) {
|
|
516
540
|
if (priority === void 0) { priority = Infinity; }
|
|
517
|
-
if (!
|
|
541
|
+
if (!TableData_1.TableData.hasRowHeader(this.dataFrame)) {
|
|
518
542
|
this.errors.push("The row header style can only be supplied when the table data has row headers");
|
|
519
543
|
return this;
|
|
520
544
|
}
|
|
@@ -532,12 +556,12 @@ var TableStyler = /** @class */ (function () {
|
|
|
532
556
|
*/
|
|
533
557
|
TableStyler.prototype.withFooterStyle = function (footerStyle, priority) {
|
|
534
558
|
if (priority === void 0) { priority = Infinity; }
|
|
535
|
-
if (!
|
|
559
|
+
if (!TableData_1.TableData.hasFooter(this.dataFrame)) {
|
|
536
560
|
this.errors.push("The footer style can only be supplied when the table data has a footer");
|
|
537
561
|
return this;
|
|
538
562
|
}
|
|
539
563
|
// tag the row the footer style, and if it fails, then return this (unmodified) builder
|
|
540
|
-
var footerIndex =
|
|
564
|
+
var footerIndex = TableData_1.TableData.tableRowCount(this.dataFrame) - 1;
|
|
541
565
|
return this
|
|
542
566
|
.tagRow(footerIndex, stylings_1.TableStyleType.FOOTER, (0, stylings_1.stylingFor)(footerStyle, stylings_1.defaultFooterStyle, priority))
|
|
543
567
|
.getOrElse(this);
|
|
@@ -552,8 +576,8 @@ var TableStyler = /** @class */ (function () {
|
|
|
552
576
|
*/
|
|
553
577
|
TableStyler.prototype.withRowStyle = function (rowIndex, rowStyle, priority) {
|
|
554
578
|
if (priority === void 0) { priority = 0; }
|
|
555
|
-
if (rowIndex < 0 || rowIndex >=
|
|
556
|
-
this.errors.push("The row index, when setting a row-style, must be between 0 and ".concat(
|
|
579
|
+
if (rowIndex < 0 || rowIndex >= TableData_1.TableData.tableRowCount(this.dataFrame)) {
|
|
580
|
+
this.errors.push("The row index, when setting a row-style, must be between 0 and ".concat(TableData_1.TableData.tableRowCount(this.dataFrame) - 1));
|
|
557
581
|
return this;
|
|
558
582
|
}
|
|
559
583
|
// tag the row with a style, and if it fails, then return this (unmodified) builder
|
|
@@ -561,9 +585,22 @@ var TableStyler = /** @class */ (function () {
|
|
|
561
585
|
.tagRow(rowIndex, stylings_1.TableStyleType.ROW, (0, stylings_1.stylingFor)(rowStyle, stylings_1.defaultRowStyle, priority))
|
|
562
586
|
.getOrElse(this);
|
|
563
587
|
};
|
|
588
|
+
/**
|
|
589
|
+
* Applies specific styles to rows in a table based on the provided row indexes.
|
|
590
|
+
*
|
|
591
|
+
* @param rowIndexes - An array of row indexes to which the styles will be applied. If the
|
|
592
|
+
* array is empty, all rows will be styled.
|
|
593
|
+
* @param rowStyle - An object representing the styles to apply to the specified rows.
|
|
594
|
+
* @param [priority=0] - An optional priority value for the styles. Higher priority values
|
|
595
|
+
* override lower ones.
|
|
596
|
+
* @return A new TableStyler instance with the specified row styles applied.
|
|
597
|
+
* @see withRowStyle
|
|
598
|
+
*/
|
|
564
599
|
TableStyler.prototype.withRowStyles = function (rowIndexes, rowStyle, priority) {
|
|
565
600
|
if (priority === void 0) { priority = 0; }
|
|
566
|
-
var indexes = rowIndexes.length > 0 ?
|
|
601
|
+
var indexes = rowIndexes.length > 0 ?
|
|
602
|
+
rowIndexes :
|
|
603
|
+
new Array(this.dataFrame.rowCount()).fill(0).map(function (_, i) { return i; });
|
|
567
604
|
return TableStyler.withRowStyles(this, indexes, rowStyle, priority);
|
|
568
605
|
};
|
|
569
606
|
TableStyler.withRowStyles = function (tableStyler, rowIndexes, rowStyle, priority) {
|
|
@@ -587,8 +624,8 @@ var TableStyler = /** @class */ (function () {
|
|
|
587
624
|
*/
|
|
588
625
|
TableStyler.prototype.withColumnStyle = function (columnIndex, columnStyle, priority) {
|
|
589
626
|
if (priority === void 0) { priority = 0; }
|
|
590
|
-
if (columnIndex < 0 || columnIndex >=
|
|
591
|
-
this.errors.push("The column index, when setting a column-style, must be between 0 and ".concat(
|
|
627
|
+
if (columnIndex < 0 || columnIndex >= TableData_1.TableData.tableColumnCount(this.dataFrame)) {
|
|
628
|
+
this.errors.push("The column index, when setting a column-style, must be between 0 and ".concat(TableData_1.TableData.tableColumnCount(this.dataFrame) - 1));
|
|
592
629
|
return this;
|
|
593
630
|
}
|
|
594
631
|
// tag the row with a style, and if it fails, then return this (unmodified) builder
|
|
@@ -596,9 +633,21 @@ var TableStyler = /** @class */ (function () {
|
|
|
596
633
|
.tagColumn(columnIndex, stylings_1.TableStyleType.COLUMN, (0, stylings_1.stylingFor)(columnStyle, stylings_1.defaultColumnStyle, priority))
|
|
597
634
|
.getOrElse(this);
|
|
598
635
|
};
|
|
636
|
+
/**
|
|
637
|
+
* Applies specified styles to the columns of a table.
|
|
638
|
+
*
|
|
639
|
+
* @param columnIndexes - Array of column indexes to which the style should be applied. If the array
|
|
640
|
+
* is empty, styles will be applied to all columns.
|
|
641
|
+
* @param columnStyle - Partial column style configuration object defining the styles to be applied.
|
|
642
|
+
* @param [priority=0] - Optional priority value to determine the precedence of this style over others.
|
|
643
|
+
* @return Returns an instance of TableStyler with the updated column styles applied.
|
|
644
|
+
* @see withColumnStyle
|
|
645
|
+
*/
|
|
599
646
|
TableStyler.prototype.withColumnStyles = function (columnIndexes, columnStyle, priority) {
|
|
600
647
|
if (priority === void 0) { priority = 0; }
|
|
601
|
-
var indexes = columnIndexes.length > 0 ?
|
|
648
|
+
var indexes = columnIndexes.length > 0 ?
|
|
649
|
+
columnIndexes :
|
|
650
|
+
new Array(this.dataFrame.columnCount()).fill(0).map(function (_, i) { return i; });
|
|
602
651
|
return TableStyler.withColumnStyles(this, indexes, columnStyle, priority);
|
|
603
652
|
};
|
|
604
653
|
TableStyler.withColumnStyles = function (tableStyler, columnIndexes, columnStyle, priority) {
|
|
@@ -624,10 +673,10 @@ var TableStyler = /** @class */ (function () {
|
|
|
624
673
|
TableStyler.prototype.withCellStyle = function (rowIndex, columnIndex, cellStyle, priority) {
|
|
625
674
|
var _this = this;
|
|
626
675
|
if (priority === void 0) { priority = 0; }
|
|
627
|
-
if (rowIndex < 0 || rowIndex >=
|
|
628
|
-
columnIndex < 0 || columnIndex >=
|
|
676
|
+
if (rowIndex < 0 || rowIndex >= TableData_1.TableData.tableRowCount(this.dataFrame) ||
|
|
677
|
+
columnIndex < 0 || columnIndex >= TableData_1.TableData.tableColumnCount(this.dataFrame)) {
|
|
629
678
|
this.errors.push("The (row, column) indices, when setting a cell-style, must be in " +
|
|
630
|
-
"([0, ".concat(
|
|
679
|
+
"([0, ".concat(TableData_1.TableData.tableRowCount(this.dataFrame), "), [0, ").concat(TableData_1.TableData.tableColumnCount(this.dataFrame), "))"));
|
|
631
680
|
return this;
|
|
632
681
|
}
|
|
633
682
|
// tag the cell with the cell-style
|
|
@@ -640,6 +689,16 @@ var TableStyler = /** @class */ (function () {
|
|
|
640
689
|
// when failed, return this (unmodified) builder
|
|
641
690
|
.getOrElse(this);
|
|
642
691
|
};
|
|
692
|
+
/**
|
|
693
|
+
* Sets the style for a specific cell based on a predicate.
|
|
694
|
+
* @param predicate A function that accepts the value, row-index, and column-index of the cell, and
|
|
695
|
+
* returns `true` if the cell should be styled, or `false` otherwise.
|
|
696
|
+
* @param cellStyle The style to apply to the cell if the predicate is `true`.
|
|
697
|
+
* @param priority The style's priority. Higher priority values override lower ones.
|
|
698
|
+
* @returns A new TableStyler instance with the cell style applied.
|
|
699
|
+
* @see withCellStyle
|
|
700
|
+
* @see withCellStyles
|
|
701
|
+
*/
|
|
643
702
|
TableStyler.prototype.withCellStyleWhen = function (predicate, cellStyle, priority) {
|
|
644
703
|
var _this = this;
|
|
645
704
|
if (priority === void 0) { priority = 0; }
|
|
@@ -662,4 +721,4 @@ var TableStyler = /** @class */ (function () {
|
|
|
662
721
|
return TableStyler;
|
|
663
722
|
}());
|
|
664
723
|
exports.TableStyler = TableStyler;
|
|
665
|
-
//# sourceMappingURL=
|
|
724
|
+
//# sourceMappingURL=TableStyler.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"TableStyler.js","sourceRoot":"","sources":["../TableStyler.ts"],"names":[],"mappings":";;;;;;;;;;;;;;AAAA,yCAAsC;AACtC,+CAAkH;AAClH,uCAAoE;AACpE,uCA8BoB;AAEpB;;;GAGG;AACH;IAEI;;;;;;;;;OASG;IACH,qBACqB,SAAuB,EACvB,IAAe,EACf,MAAc,EACd,UAAsB,EACtB,SAA8C,EAC9C,OAAgB,EAChB,MAAc;QANd,cAAS,GAAT,SAAS,CAAc;QACvB,SAAI,GAAJ,IAAI,CAAW;QACf,WAAM,GAAN,MAAM,CAAQ;QACd,eAAU,GAAV,UAAU,CAAY;QACtB,cAAS,GAAT,SAAS,CAAqC;QAC9C,YAAO,GAAP,OAAO,CAAS;QAChB,WAAM,GAAN,MAAM,CAAQ;IAEnC,CAAC;IAED;;OAEG;IACH,0BAAI,GAAJ;QACI,OAAO,IAAI,CAAC,SAAS,CAAC,IAAI,EAAE,CAAA;IAChC,CAAC;IAED,+BAAS,GAAT;QACI,+CAA+C;QAC/C,OAAO,qBAAS,CAAC,aAAa,CAAC,IAAI,CAAC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KAAK,CAAC,EAAvB,CAAuB,CAAC;YAC5C,gDAAgD;aAC/C,SAAS,CAAC,IAAI,CAAC,CAAA;IACxB,CAAC;IAED;;;OAGG;IACH,gCAAU,GAAV;QACI,OAAO,IAAI,WAAW,CAClB,IAAI,CAAC,SAAS,EAEd,IAAI,CAAC,IAAI,EAET,IAAI,CAAC,MAAM,EACX,IAAI,CAAC,UAAU,EAEf,IAAI,CAAC,SAAS,EACd,IAAI,CAAC,OAAO,EACZ,IAAI,CAAC,MAAM,CACd,CAAA;IACL,CAAC;IACL,kBAAC;AAAD,CAAC,AAxbD,IAwbC;AAxbY,kCAAW"}
|
package/dist/index.d.ts
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
export type { GroupSelection, TextSelection, RectSelection, LineSelection, BorderSelection } from './d3types';
|
|
2
1
|
export type { Styling, TableStylerProps, TableFont, Background, Padding, Margin, BorderElement, Border, Dimension, ColumnStyle, RowStyle, TextAlignment, VerticalTextAlignment, CellStyle, ColumnHeaderStyle, RowHeaderStyle, FooterStyle, Stylings, } from './stylings';
|
|
3
2
|
export { stylingFor, TableStyleType, defaultTableFont, defaultTableBackground, defaultTablePadding, defaultTableMargin, defaultBorderElement, defaultBorder, defaultDimension, defaultColumnStyle, defaultRowStyle, defaultCellStyle, defaultColumnHeaderStyle, defaultRowHeaderStyle, defaultFooterStyle, } from './stylings';
|
|
4
|
-
export { TableData, TableTagType } from './
|
|
5
|
-
export type { Formatter, Formatting, } from './
|
|
6
|
-
export { defaultFormatter, defaultFormatting, TableFormatterType, isFormattingTag, TableFormatter } from './
|
|
7
|
-
export { StyledTable, TableStyler } from './
|
|
3
|
+
export { TableData, TableTagType } from './TableData';
|
|
4
|
+
export type { Formatter, Formatting, } from './TableFormatter';
|
|
5
|
+
export { defaultFormatter, defaultFormatting, TableFormatterType, isFormattingTag, TableFormatter } from './TableFormatter';
|
|
6
|
+
export { StyledTable, TableStyler } from './TableStyler';
|
|
8
7
|
export type { ElementPlacementInfo, TextAnchor, DominantBaseline, CellRenderingDimensions, TableRenderingInfo } from './tableSvg';
|
|
9
8
|
export { elementInfoFrom, createTable, tableId, } from './tableSvg';
|
|
9
|
+
export type { GroupSelection, TextSelection, RectSelection, LineSelection, BorderSelection } from './d3types';
|
|
10
10
|
//# sourceMappingURL=index.d.ts.map
|
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../index.ts"],"names":[],"mappings":"AAAA,YAAY,EACR,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../index.ts"],"names":[],"mappings":"AAAA,YAAY,EACR,OAAO,EACP,gBAAgB,EAChB,SAAS,EACT,UAAU,EACV,OAAO,EACP,MAAM,EACN,aAAa,EACb,MAAM,EACN,SAAS,EACT,WAAW,EACX,QAAQ,EACR,aAAa,EACb,qBAAqB,EACrB,SAAS,EACT,iBAAiB,EACjB,cAAc,EACd,WAAW,EACX,QAAQ,GACX,MAAM,YAAY,CAAC;AACpB,OAAO,EACH,UAAU,EACV,cAAc,EACd,gBAAgB,EAChB,sBAAsB,EACtB,mBAAmB,EACnB,kBAAkB,EAClB,oBAAoB,EACpB,aAAa,EACb,gBAAgB,EAChB,kBAAkB,EAClB,eAAe,EACf,gBAAgB,EAChB,wBAAwB,EACxB,qBAAqB,EACrB,kBAAkB,GACrB,MAAM,YAAY,CAAC;AAEpB,OAAO,EACH,SAAS,EACT,YAAY,EACf,MAAM,aAAa,CAAC;AAErB,YAAY,EACR,SAAS,EACT,UAAU,GACb,MAAM,kBAAkB,CAAC;AAE1B,OAAO,EACH,gBAAgB,EAChB,iBAAiB,EACjB,kBAAkB,EAClB,eAAe,EACf,cAAc,EACjB,MAAM,kBAAkB,CAAC;AAE1B,OAAO,EACH,WAAW,EACX,WAAW,EACd,MAAM,eAAe,CAAC;AAEvB,YAAY,EACR,oBAAoB,EACpB,UAAU,EACV,gBAAgB,EAChB,uBAAuB,EACvB,kBAAkB,EACrB,MAAM,YAAY,CAAC;AAEpB,OAAO,EACH,eAAe,EACf,WAAW,EACX,OAAO,GACV,MAAM,YAAY,CAAC;AAEpB,YAAY,EACR,cAAc,EACd,aAAa,EACb,aAAa,EACb,aAAa,EACb,eAAe,EAClB,MAAM,WAAW,CAAC"}
|
package/dist/index.js
CHANGED
|
@@ -17,18 +17,18 @@ Object.defineProperty(exports, "defaultCellStyle", { enumerable: true, get: func
|
|
|
17
17
|
Object.defineProperty(exports, "defaultColumnHeaderStyle", { enumerable: true, get: function () { return stylings_1.defaultColumnHeaderStyle; } });
|
|
18
18
|
Object.defineProperty(exports, "defaultRowHeaderStyle", { enumerable: true, get: function () { return stylings_1.defaultRowHeaderStyle; } });
|
|
19
19
|
Object.defineProperty(exports, "defaultFooterStyle", { enumerable: true, get: function () { return stylings_1.defaultFooterStyle; } });
|
|
20
|
-
var
|
|
21
|
-
Object.defineProperty(exports, "TableData", { enumerable: true, get: function () { return
|
|
22
|
-
Object.defineProperty(exports, "TableTagType", { enumerable: true, get: function () { return
|
|
23
|
-
var
|
|
24
|
-
Object.defineProperty(exports, "defaultFormatter", { enumerable: true, get: function () { return
|
|
25
|
-
Object.defineProperty(exports, "defaultFormatting", { enumerable: true, get: function () { return
|
|
26
|
-
Object.defineProperty(exports, "TableFormatterType", { enumerable: true, get: function () { return
|
|
27
|
-
Object.defineProperty(exports, "isFormattingTag", { enumerable: true, get: function () { return
|
|
28
|
-
Object.defineProperty(exports, "TableFormatter", { enumerable: true, get: function () { return
|
|
29
|
-
var
|
|
30
|
-
Object.defineProperty(exports, "StyledTable", { enumerable: true, get: function () { return
|
|
31
|
-
Object.defineProperty(exports, "TableStyler", { enumerable: true, get: function () { return
|
|
20
|
+
var TableData_1 = require("./TableData");
|
|
21
|
+
Object.defineProperty(exports, "TableData", { enumerable: true, get: function () { return TableData_1.TableData; } });
|
|
22
|
+
Object.defineProperty(exports, "TableTagType", { enumerable: true, get: function () { return TableData_1.TableTagType; } });
|
|
23
|
+
var TableFormatter_1 = require("./TableFormatter");
|
|
24
|
+
Object.defineProperty(exports, "defaultFormatter", { enumerable: true, get: function () { return TableFormatter_1.defaultFormatter; } });
|
|
25
|
+
Object.defineProperty(exports, "defaultFormatting", { enumerable: true, get: function () { return TableFormatter_1.defaultFormatting; } });
|
|
26
|
+
Object.defineProperty(exports, "TableFormatterType", { enumerable: true, get: function () { return TableFormatter_1.TableFormatterType; } });
|
|
27
|
+
Object.defineProperty(exports, "isFormattingTag", { enumerable: true, get: function () { return TableFormatter_1.isFormattingTag; } });
|
|
28
|
+
Object.defineProperty(exports, "TableFormatter", { enumerable: true, get: function () { return TableFormatter_1.TableFormatter; } });
|
|
29
|
+
var TableStyler_1 = require("./TableStyler");
|
|
30
|
+
Object.defineProperty(exports, "StyledTable", { enumerable: true, get: function () { return TableStyler_1.StyledTable; } });
|
|
31
|
+
Object.defineProperty(exports, "TableStyler", { enumerable: true, get: function () { return TableStyler_1.TableStyler; } });
|
|
32
32
|
var tableSvg_1 = require("./tableSvg");
|
|
33
33
|
Object.defineProperty(exports, "elementInfoFrom", { enumerable: true, get: function () { return tableSvg_1.elementInfoFrom; } });
|
|
34
34
|
Object.defineProperty(exports, "createTable", { enumerable: true, get: function () { return tableSvg_1.createTable; } });
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../index.ts"],"names":[],"mappings":";;;
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../index.ts"],"names":[],"mappings":";;;AAoBA,uCAgBoB;AAfhB,sGAAA,UAAU,OAAA;AACV,0GAAA,cAAc,OAAA;AACd,4GAAA,gBAAgB,OAAA;AAChB,kHAAA,sBAAsB,OAAA;AACtB,+GAAA,mBAAmB,OAAA;AACnB,8GAAA,kBAAkB,OAAA;AAClB,gHAAA,oBAAoB,OAAA;AACpB,yGAAA,aAAa,OAAA;AACb,4GAAA,gBAAgB,OAAA;AAChB,8GAAA,kBAAkB,OAAA;AAClB,2GAAA,eAAe,OAAA;AACf,4GAAA,gBAAgB,OAAA;AAChB,oHAAA,wBAAwB,OAAA;AACxB,iHAAA,qBAAqB,OAAA;AACrB,8GAAA,kBAAkB,OAAA;AAGtB,yCAGqB;AAFjB,sGAAA,SAAS,OAAA;AACT,yGAAA,YAAY,OAAA;AAQhB,mDAM0B;AALtB,kHAAA,gBAAgB,OAAA;AAChB,mHAAA,iBAAiB,OAAA;AACjB,oHAAA,kBAAkB,OAAA;AAClB,iHAAA,eAAe,OAAA;AACf,gHAAA,cAAc,OAAA;AAGlB,6CAGuB;AAFnB,0GAAA,WAAW,OAAA;AACX,0GAAA,WAAW,OAAA;AAWf,uCAIoB;AAHhB,2GAAA,eAAe,OAAA;AACf,uGAAA,WAAW,OAAA;AACX,mGAAA,OAAO,OAAA"}
|
package/dist/tableData.test.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
var data_frame_ts_1 = require("data-frame-ts");
|
|
4
|
-
var
|
|
4
|
+
var TableData_1 = require("./TableData");
|
|
5
5
|
describe('creating and manipulating table data', function () {
|
|
6
6
|
test('should be able to create a simple table from row data without a footer', function () {
|
|
7
7
|
var columnHeader = ['A', 'B', 'C', 'D', 'E'];
|
|
@@ -12,7 +12,7 @@ describe('creating and manipulating table data', function () {
|
|
|
12
12
|
['a3', 'b3', 'c3', 'd3', 'e3'],
|
|
13
13
|
['a4', 'b4', 'c4', 'd4', 'e4'],
|
|
14
14
|
]).getOrThrow();
|
|
15
|
-
var tableData =
|
|
15
|
+
var tableData = TableData_1.TableData.fromDataFrame(data)
|
|
16
16
|
.withColumnHeader(columnHeader)
|
|
17
17
|
.flatMap(function (table) { return table.withRowHeader(rowHeader); })
|
|
18
18
|
.getOrThrow();
|
|
@@ -37,7 +37,7 @@ describe('creating and manipulating table data', function () {
|
|
|
37
37
|
['a3', 'b3', 'c3', 'd3', 'e3'],
|
|
38
38
|
['a4', 'b4', 'c4', 'd4', 'e4'],
|
|
39
39
|
]).getOrThrow();
|
|
40
|
-
var tableData =
|
|
40
|
+
var tableData = TableData_1.TableData.fromDataFrame(data)
|
|
41
41
|
.withColumnHeader(columnHeader)
|
|
42
42
|
.flatMap(function (table) { return table.withFooter(footer); })
|
|
43
43
|
.flatMap(function (table) { return table.withRowHeader(rowHeader); })
|
|
@@ -61,7 +61,7 @@ describe('creating and manipulating table data', function () {
|
|
|
61
61
|
['a3', 'b3', 'c3', 'd3', 'e3'],
|
|
62
62
|
['a4', 'b4', 'c4', 'd4', 'e4'],
|
|
63
63
|
]).getOrThrow();
|
|
64
|
-
var tableData =
|
|
64
|
+
var tableData = TableData_1.TableData.fromDataFrame(data)
|
|
65
65
|
.withColumnHeader(columnHeader)
|
|
66
66
|
.flatMap(function (table) { return table.withRowHeader(rowHeader); })
|
|
67
67
|
.flatMap(function (table) { return table.withFooter(footer); })
|
|
@@ -85,7 +85,7 @@ describe('creating and manipulating table data', function () {
|
|
|
85
85
|
['a3', 'b3', 'c3', 'd3', 'e3'],
|
|
86
86
|
['a4', 'b4', 'c4', 'd4', 'e4'],
|
|
87
87
|
]).getOrThrow();
|
|
88
|
-
var tableData =
|
|
88
|
+
var tableData = TableData_1.TableData.fromDataFrame(data)
|
|
89
89
|
.withFooter(footer)
|
|
90
90
|
.flatMap(function (table) { return table.withColumnHeader(columnHeader); })
|
|
91
91
|
.flatMap(function (table) { return table.withRowHeader(rowHeader); })
|
|
@@ -109,7 +109,7 @@ describe('creating and manipulating table data', function () {
|
|
|
109
109
|
['a3', 'b3', 'c3', 'd3', 'e3'],
|
|
110
110
|
['a4', 'b4', 'c4', 'd4', 'e4'],
|
|
111
111
|
]).getOrThrow();
|
|
112
|
-
var tableData =
|
|
112
|
+
var tableData = TableData_1.TableData.fromDataFrame(data)
|
|
113
113
|
.withColumnHeader(columnHeader)
|
|
114
114
|
.flatMap(function (table) { return table.withFooter(footer); })
|
|
115
115
|
.flatMap(function (table) { return table.withRowHeader(rowHeader); })
|
|
@@ -132,7 +132,7 @@ describe('creating and manipulating table data', function () {
|
|
|
132
132
|
['a3', 'b3', 'c3', 'd3', 'e3'],
|
|
133
133
|
['a4', 'b4', 'c4', 'd4', 'e4'],
|
|
134
134
|
]).getOrThrow();
|
|
135
|
-
var tableData =
|
|
135
|
+
var tableData = TableData_1.TableData.fromDataFrame(data)
|
|
136
136
|
.withColumnHeader(columnHeader)
|
|
137
137
|
.flatMap(function (table) { return table.withRowHeader(rowHeader); })
|
|
138
138
|
.getOrThrow();
|
|
@@ -153,7 +153,7 @@ describe('creating and manipulating table data', function () {
|
|
|
153
153
|
['a3', 'b3', 'c3', 'd3', 'e3'],
|
|
154
154
|
['a4', 'b4', 'c4', 'd4', 'e4'],
|
|
155
155
|
]).getOrThrow();
|
|
156
|
-
var tableData =
|
|
156
|
+
var tableData = TableData_1.TableData.fromDataFrame(data)
|
|
157
157
|
.withRowHeader(rowHeader)
|
|
158
158
|
.flatMap(function (table) { return table.withColumnHeader(columnHeader); })
|
|
159
159
|
.getOrThrow();
|
|
@@ -173,7 +173,7 @@ describe('creating and manipulating table data', function () {
|
|
|
173
173
|
['a3', 'b3', 'c3', 'd3', 'e3'],
|
|
174
174
|
['a4', 'b4', 'c4', 'd4', 'e4'],
|
|
175
175
|
]).getOrThrow();
|
|
176
|
-
var tableData =
|
|
176
|
+
var tableData = TableData_1.TableData.fromDataFrame(data)
|
|
177
177
|
.withColumnHeader(header)
|
|
178
178
|
.getOrThrow();
|
|
179
179
|
expect(tableData.tableRowCount()).toBe(6);
|
|
@@ -184,30 +184,30 @@ describe('creating and manipulating table data', function () {
|
|
|
184
184
|
});
|
|
185
185
|
test('should throw error when the data dimensions are inconsistent with the header dimensions', function () {
|
|
186
186
|
var result = data_frame_ts_1.DataFrame.from([['a1'], ['a2']])
|
|
187
|
-
.map(function (df) { return
|
|
187
|
+
.map(function (df) { return TableData_1.TableData.fromDataFrame(df); })
|
|
188
188
|
.flatMap(function (table) { return table.withColumnHeader(['a', 'b']); });
|
|
189
189
|
expect(result.failed).toBeTruthy();
|
|
190
190
|
expect(result.error).toEqual("(DataFrame::insertRowBefore) The row must have the same number of elements as the data has columns. num_rows: 2; num_columns: 2");
|
|
191
191
|
result = data_frame_ts_1.DataFrame.fromColumnData([['a1'], ['a2'], ['a3']])
|
|
192
|
-
.map(function (df) { return
|
|
192
|
+
.map(function (df) { return TableData_1.TableData.fromDataFrame(df); })
|
|
193
193
|
.flatMap(function (table) { return table.withColumnHeader(['a', 'b']); });
|
|
194
194
|
expect(result.failed).toBeTruthy();
|
|
195
195
|
expect(result.error).toEqual("(DataFrame::insertRowBefore) The row must have the same number of elements as the data has columns. num_rows: 1; num_columns: 2");
|
|
196
196
|
});
|
|
197
197
|
test('should throw error when the rows do not all have the same number of columns', function () {
|
|
198
198
|
var result = data_frame_ts_1.DataFrame.from([['a1', 'a2'], ['b2']])
|
|
199
|
-
.map(function (df) { return
|
|
199
|
+
.map(function (df) { return TableData_1.TableData.fromDataFrame(df); })
|
|
200
200
|
.flatMap(function (table) { return table.withColumnHeader(['a', 'b']); });
|
|
201
201
|
expect(result.failed).toBeTruthy();
|
|
202
202
|
expect(result.error).toEqual("(DataFrame.validateDimensions) All rows must have the same number of columns; min_num_columns: 1, maximum_columns: 2");
|
|
203
203
|
result = data_frame_ts_1.DataFrame.fromColumnData([['a1'], ['a2', 'b2']])
|
|
204
|
-
.map(function (df) { return
|
|
204
|
+
.map(function (df) { return TableData_1.TableData.fromDataFrame(df); })
|
|
205
205
|
.flatMap(function (table) { return table.withColumnHeader(['a', 'b']); });
|
|
206
206
|
expect(result.failed).toBeTruthy();
|
|
207
207
|
expect(result.error).toEqual("(DataFrame.validateDimensions) All columns must have the same number of rows; min_num_rows: 1, maximum_rows: 2");
|
|
208
208
|
});
|
|
209
209
|
test('should be able to create a table of numbers when no formatter is specified', function () {
|
|
210
|
-
var tableData =
|
|
210
|
+
var tableData = TableData_1.TableData.fromDataFrame(data_frame_ts_1.DataFrame.from([[11, 12, 13], [21, 22, 23]]).getOrThrow());
|
|
211
211
|
expect(tableData.tableRowCount()).toEqual(2);
|
|
212
212
|
expect(tableData.data().flatMap(function (df) { return df.rowSlice(0).map(function (row) { return row.length; }); }).getOrThrow()).toEqual(3);
|
|
213
213
|
expect(tableData.data().flatMap(function (df) { return df.rowSlice(1).map(function (row) { return row.length; }); }).getOrThrow()).toEqual(3);
|
|
@@ -222,7 +222,7 @@ describe('creating and manipulating table data', function () {
|
|
|
222
222
|
['a3', 'b3', 'c3', 'd3', 'e3'],
|
|
223
223
|
['a4', 'b4', 'c4', 'd4', 'e4'],
|
|
224
224
|
]).getOrThrow();
|
|
225
|
-
var tableData =
|
|
225
|
+
var tableData = TableData_1.TableData.fromDataFrame(data)
|
|
226
226
|
.withColumnHeader(columnHeader)
|
|
227
227
|
.flatMap(function (table) { return table.withRowHeader(rowHeader); })
|
|
228
228
|
.flatMap(function (table) { return table.withFooter(footer); })
|