@trebco/treb 28.7.0 → 28.10.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/dist/treb-spreadsheet-light.mjs +14 -14
- package/dist/treb-spreadsheet.mjs +12 -12
- package/dist/treb.d.ts +37 -6
- package/package.json +1 -1
- package/treb-base-types/src/gradient.ts +1 -1
- package/treb-base-types/src/localization.ts +6 -0
- package/treb-calculator/src/calculator.ts +23 -30
- package/treb-calculator/src/dag/calculation_leaf_vertex.ts +7 -0
- package/treb-calculator/src/dag/graph.ts +7 -0
- package/treb-calculator/src/functions/base-functions.ts +30 -1
- package/treb-charts/src/chart-functions.ts +11 -0
- package/treb-charts/src/chart-types.ts +18 -0
- package/treb-charts/src/chart-utils.ts +87 -0
- package/treb-charts/src/chart.ts +4 -0
- package/treb-charts/src/default-chart-renderer.ts +26 -1
- package/treb-charts/src/renderer.ts +81 -0
- package/treb-charts/style/charts.scss +8 -0
- package/treb-embed/markup/toolbar.html +35 -34
- package/treb-embed/src/custom-element/treb-global.ts +10 -2
- package/treb-embed/src/embedded-spreadsheet.ts +57 -101
- package/treb-embed/src/options.ts +7 -0
- package/treb-embed/style/layout.scss +4 -0
- package/treb-embed/style/toolbar.scss +37 -0
- package/treb-grid/src/types/conditional_format.ts +1 -1
- package/treb-grid/src/types/grid.ts +11 -1
- package/treb-grid/src/types/grid_base.ts +127 -5
- package/treb-grid/src/types/grid_command.ts +32 -0
- package/treb-grid/src/types/grid_events.ts +7 -0
- package/treb-grid/src/types/grid_options.ts +8 -0
- package/treb-grid/src/types/sheet.ts +0 -56
- package/treb-grid/src/types/update_flags.ts +1 -0
|
@@ -3232,62 +3232,6 @@ export class Sheet {
|
|
|
3232
3232
|
|
|
3233
3233
|
}
|
|
3234
3234
|
|
|
3235
|
-
/*
|
|
3236
|
-
public ApplyConditionalFormats() {
|
|
3237
|
-
|
|
3238
|
-
this.FlushConditionalFormatCache();
|
|
3239
|
-
|
|
3240
|
-
for (const entry of this.conditional_formats) {
|
|
3241
|
-
|
|
3242
|
-
console.info({entry});
|
|
3243
|
-
|
|
3244
|
-
if (entry.applied) {
|
|
3245
|
-
this.ApplyConditionalFormatCache(entry);
|
|
3246
|
-
}
|
|
3247
|
-
}
|
|
3248
|
-
|
|
3249
|
-
}
|
|
3250
|
-
|
|
3251
|
-
public FlushConditionalFormatCache() {
|
|
3252
|
-
|
|
3253
|
-
// FIXME: need to flush any styles that are set, unless they match;
|
|
3254
|
-
// perhaps we should use an alternate cache so we can compare? TODO/FIXME
|
|
3255
|
-
|
|
3256
|
-
for (const [row, row_data] of this.conditional_format_cache.entries()) {
|
|
3257
|
-
if (row_data) {
|
|
3258
|
-
for (const [column, column_data] of row_data.entries()) {
|
|
3259
|
-
if (column_data) {
|
|
3260
|
-
|
|
3261
|
-
this.CellData({row, column}).FlushStyle();
|
|
3262
|
-
|
|
3263
|
-
}
|
|
3264
|
-
}
|
|
3265
|
-
}
|
|
3266
|
-
}
|
|
3267
|
-
|
|
3268
|
-
this.conditional_format_cache = [];
|
|
3269
|
-
|
|
3270
|
-
}
|
|
3271
|
-
|
|
3272
|
-
public ApplyConditionalFormatCache(format: ConditionalFormat) {
|
|
3273
|
-
|
|
3274
|
-
for (let row = format.area.start.row; row <= format.area.end.row; row++ ) {
|
|
3275
|
-
for (let column = format.area.start.column; column <= format.area.end.column; column++ ) {
|
|
3276
|
-
if (!this.conditional_format_cache[row]) {
|
|
3277
|
-
this.conditional_format_cache[row] = [];
|
|
3278
|
-
}
|
|
3279
|
-
if (!this.conditional_format_cache[row][column]) {
|
|
3280
|
-
this.conditional_format_cache[row][column] = [];
|
|
3281
|
-
}
|
|
3282
|
-
this.conditional_format_cache[row][column].push(format.style);
|
|
3283
|
-
this.CellData({row, column}).FlushStyle();
|
|
3284
|
-
|
|
3285
|
-
}
|
|
3286
|
-
}
|
|
3287
|
-
|
|
3288
|
-
}
|
|
3289
|
-
*/
|
|
3290
|
-
|
|
3291
3235
|
private ConditionalFormatForCell(address: ICellAddress): CellStyle[] {
|
|
3292
3236
|
if (this.conditional_format_cache[address.row]) {
|
|
3293
3237
|
return this.conditional_format_cache[address.row][address.column] || [];
|