tabulator-tables 6.5.0 → 6.5.1
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/js/tabulator.js +1 -1
- package/dist/js/tabulator.min.js +1 -1
- package/dist/js/tabulator_esm.js +1 -1
- package/dist/js/tabulator_esm.min.js +1 -1
- package/dist/js/tabulator_esm.min.mjs +1 -1
- package/dist/js/tabulator_esm.mjs +1 -1
- package/package.json +2 -1
- package/src/js/builds/esm.js +16 -0
- package/src/js/builds/jquery_wrapper.js +63 -0
- package/src/js/builds/usd.js +1 -0
- package/src/js/core/ColumnManager.js +789 -0
- package/src/js/core/CoreFeature.js +140 -0
- package/src/js/core/FooterManager.js +102 -0
- package/src/js/core/Module.js +140 -0
- package/src/js/core/RowManager.js +1140 -0
- package/src/js/core/Tabulator.js +928 -0
- package/src/js/core/TabulatorFull.js +21 -0
- package/src/js/core/cell/Cell.js +299 -0
- package/src/js/core/cell/CellComponent.js +79 -0
- package/src/js/core/column/Column.js +978 -0
- package/src/js/core/column/ColumnComponent.js +151 -0
- package/src/js/core/column/defaults/options.js +18 -0
- package/src/js/core/defaults/options.js +66 -0
- package/src/js/core/modules/core.js +3 -0
- package/src/js/core/modules/optional.js +37 -0
- package/src/js/core/rendering/Renderer.js +204 -0
- package/src/js/core/rendering/renderers/BasicHorizontal.js +27 -0
- package/src/js/core/rendering/renderers/BasicVertical.js +103 -0
- package/src/js/core/rendering/renderers/VirtualDomHorizontal.js +587 -0
- package/src/js/core/rendering/renderers/VirtualDomVertical.js +642 -0
- package/src/js/core/row/PseudoRow.js +47 -0
- package/src/js/core/row/Row.js +487 -0
- package/src/js/core/row/RowComponent.js +94 -0
- package/src/js/core/tools/Alert.js +66 -0
- package/src/js/core/tools/ComponentFunctionBinder.js +32 -0
- package/src/js/core/tools/DataLoader.js +128 -0
- package/src/js/core/tools/DependencyRegistry.js +82 -0
- package/src/js/core/tools/DeprecationAdvisor.js +51 -0
- package/src/js/core/tools/ExternalEventBus.js +105 -0
- package/src/js/core/tools/Helpers.js +66 -0
- package/src/js/core/tools/InteractionMonitor.js +329 -0
- package/src/js/core/tools/InternalEventBus.js +162 -0
- package/src/js/core/tools/ModuleBinder.js +153 -0
- package/src/js/core/tools/OptionsList.js +45 -0
- package/src/js/core/tools/Popup.js +317 -0
- package/src/js/core/tools/TableRegistry.js +65 -0
- package/src/js/modules/Accessor/Accessor.js +115 -0
- package/src/js/modules/Accessor/defaults/accessors.js +5 -0
- package/src/js/modules/Ajax/Ajax.js +142 -0
- package/src/js/modules/Ajax/defaults/config.js +3 -0
- package/src/js/modules/Ajax/defaults/contentTypeFormatters.js +45 -0
- package/src/js/modules/Ajax/defaults/loaderPromise.js +87 -0
- package/src/js/modules/Ajax/defaults/urlGenerator.js +44 -0
- package/src/js/modules/Clipboard/Clipboard.js +282 -0
- package/src/js/modules/Clipboard/defaults/pasteActions.js +11 -0
- package/src/js/modules/Clipboard/defaults/pasteParsers.js +75 -0
- package/src/js/modules/Clipboard/extensions/extensions.js +9 -0
- package/src/js/modules/Clipboard/extensions/keybindings/actions.js +9 -0
- package/src/js/modules/Clipboard/extensions/keybindings/bindings.js +3 -0
- package/src/js/modules/ColumnCalcs/CalcComponent.js +46 -0
- package/src/js/modules/ColumnCalcs/ColumnCalcs.js +586 -0
- package/src/js/modules/ColumnCalcs/defaults/calculations.js +93 -0
- package/src/js/modules/Comms/Comms.js +49 -0
- package/src/js/modules/DataTree/DataTree.js +620 -0
- package/src/js/modules/Download/Download.js +146 -0
- package/src/js/modules/Download/defaults/downloaders/csv.js +61 -0
- package/src/js/modules/Download/defaults/downloaders/html.js +5 -0
- package/src/js/modules/Download/defaults/downloaders/json.js +34 -0
- package/src/js/modules/Download/defaults/downloaders/jsonLines.js +32 -0
- package/src/js/modules/Download/defaults/downloaders/pdf.js +113 -0
- package/src/js/modules/Download/defaults/downloaders/xlsx.js +103 -0
- package/src/js/modules/Download/defaults/downloaders.js +15 -0
- package/src/js/modules/Edit/Edit.js +845 -0
- package/src/js/modules/Edit/List.js +1060 -0
- package/src/js/modules/Edit/defaults/editors/adaptable.js +37 -0
- package/src/js/modules/Edit/defaults/editors/date.js +144 -0
- package/src/js/modules/Edit/defaults/editors/datetime.js +131 -0
- package/src/js/modules/Edit/defaults/editors/input.js +77 -0
- package/src/js/modules/Edit/defaults/editors/list.js +7 -0
- package/src/js/modules/Edit/defaults/editors/number.js +110 -0
- package/src/js/modules/Edit/defaults/editors/progress.js +127 -0
- package/src/js/modules/Edit/defaults/editors/range.js +81 -0
- package/src/js/modules/Edit/defaults/editors/star.js +146 -0
- package/src/js/modules/Edit/defaults/editors/textarea.js +123 -0
- package/src/js/modules/Edit/defaults/editors/tickCross.js +95 -0
- package/src/js/modules/Edit/defaults/editors/time.js +132 -0
- package/src/js/modules/Edit/defaults/editors.js +27 -0
- package/src/js/modules/Edit/inputMask.js +74 -0
- package/src/js/modules/Export/Export.js +654 -0
- package/src/js/modules/Export/ExportColumn.js +9 -0
- package/src/js/modules/Export/ExportRow.js +8 -0
- package/src/js/modules/Export/defaults/columnLookups.js +3 -0
- package/src/js/modules/Export/defaults/rowLookups.js +18 -0
- package/src/js/modules/Filter/Filter.js +902 -0
- package/src/js/modules/Filter/defaults/filters.js +215 -0
- package/src/js/modules/Format/Format.js +200 -0
- package/src/js/modules/Format/defaults/formatters/adaptable.js +32 -0
- package/src/js/modules/Format/defaults/formatters/array.js +30 -0
- package/src/js/modules/Format/defaults/formatters/buttonCross.js +3 -0
- package/src/js/modules/Format/defaults/formatters/buttonTick.js +3 -0
- package/src/js/modules/Format/defaults/formatters/color.js +4 -0
- package/src/js/modules/Format/defaults/formatters/datetime.js +39 -0
- package/src/js/modules/Format/defaults/formatters/datetimediff.js +43 -0
- package/src/js/modules/Format/defaults/formatters/handle.js +4 -0
- package/src/js/modules/Format/defaults/formatters/html.js +3 -0
- package/src/js/modules/Format/defaults/formatters/image.js +40 -0
- package/src/js/modules/Format/defaults/formatters/json.js +12 -0
- package/src/js/modules/Format/defaults/formatters/link.js +82 -0
- package/src/js/modules/Format/defaults/formatters/lookup.js +10 -0
- package/src/js/modules/Format/defaults/formatters/money.js +44 -0
- package/src/js/modules/Format/defaults/formatters/plaintext.js +3 -0
- package/src/js/modules/Format/defaults/formatters/progress.js +133 -0
- package/src/js/modules/Format/defaults/formatters/rownum.js +14 -0
- package/src/js/modules/Format/defaults/formatters/star.js +38 -0
- package/src/js/modules/Format/defaults/formatters/textarea.js +4 -0
- package/src/js/modules/Format/defaults/formatters/tickCross.js +22 -0
- package/src/js/modules/Format/defaults/formatters/toggle.js +48 -0
- package/src/js/modules/Format/defaults/formatters/traffic.js +47 -0
- package/src/js/modules/Format/defaults/formatters.js +47 -0
- package/src/js/modules/FrozenColumns/FrozenColumns.js +302 -0
- package/src/js/modules/FrozenRows/FrozenRows.js +175 -0
- package/src/js/modules/GroupRows/Group.js +615 -0
- package/src/js/modules/GroupRows/GroupComponent.js +69 -0
- package/src/js/modules/GroupRows/GroupRows.js +636 -0
- package/src/js/modules/History/History.js +172 -0
- package/src/js/modules/History/defaults/redoers.js +31 -0
- package/src/js/modules/History/defaults/undoers.js +33 -0
- package/src/js/modules/History/extensions/extensions.js +9 -0
- package/src/js/modules/History/extensions/keybindings/actions.js +27 -0
- package/src/js/modules/History/extensions/keybindings/bindings.js +4 -0
- package/src/js/modules/HtmlTableImport/HtmlTableImport.js +180 -0
- package/src/js/modules/Import/Import.js +303 -0
- package/src/js/modules/Import/defaults/importers/array.js +3 -0
- package/src/js/modules/Import/defaults/importers/csv.js +61 -0
- package/src/js/modules/Import/defaults/importers/json.js +8 -0
- package/src/js/modules/Import/defaults/importers/xlsx.js +7 -0
- package/src/js/modules/Import/defaults/importers.js +11 -0
- package/src/js/modules/Interaction/Interaction.js +339 -0
- package/src/js/modules/Keybindings/Keybindings.js +198 -0
- package/src/js/modules/Keybindings/defaults/actions.js +90 -0
- package/src/js/modules/Keybindings/defaults/bindings.js +12 -0
- package/src/js/modules/Layout/Layout.js +66 -0
- package/src/js/modules/Layout/defaults/modes/fitColumns.js +171 -0
- package/src/js/modules/Layout/defaults/modes/fitData.js +10 -0
- package/src/js/modules/Layout/defaults/modes/fitDataGeneral.js +10 -0
- package/src/js/modules/Layout/defaults/modes/fitDataStretch.js +40 -0
- package/src/js/modules/Layout/defaults/modes.js +12 -0
- package/src/js/modules/Localize/Localize.js +184 -0
- package/src/js/modules/Localize/defaults/langs.js +37 -0
- package/src/js/modules/Menu/Menu.js +302 -0
- package/src/js/modules/MoveColumns/MoveColumns.js +311 -0
- package/src/js/modules/MoveRows/MoveRows.js +604 -0
- package/src/js/modules/MoveRows/defaults/receivers.js +30 -0
- package/src/js/modules/MoveRows/defaults/senders.js +5 -0
- package/src/js/modules/Mutator/Mutator.js +164 -0
- package/src/js/modules/Mutator/defaults/mutators.js +1 -0
- package/src/js/modules/Page/Page.js +891 -0
- package/src/js/modules/Page/defaults/pageCounters/pages.js +33 -0
- package/src/js/modules/Page/defaults/pageCounters/rows.js +40 -0
- package/src/js/modules/Page/defaults/pageCounters.js +8 -0
- package/src/js/modules/Persistence/Persistence.js +473 -0
- package/src/js/modules/Persistence/defaults/readers.js +29 -0
- package/src/js/modules/Persistence/defaults/writers.js +13 -0
- package/src/js/modules/Popup/Popup.js +227 -0
- package/src/js/modules/Print/Print.js +136 -0
- package/src/js/modules/ReactiveData/ReactiveData.js +416 -0
- package/src/js/modules/ResizeColumns/ResizeColumns.js +365 -0
- package/src/js/modules/ResizeRows/ResizeRows.js +145 -0
- package/src/js/modules/ResizeTable/ResizeTable.js +158 -0
- package/src/js/modules/ResponsiveLayout/ResponsiveLayout.js +354 -0
- package/src/js/modules/ResponsiveLayout/extensions/extensions.js +9 -0
- package/src/js/modules/ResponsiveLayout/extensions/formatters/responsiveCollapse.js +44 -0
- package/src/js/modules/SelectRange/Range.js +366 -0
- package/src/js/modules/SelectRange/RangeComponent.js +91 -0
- package/src/js/modules/SelectRange/SelectRange.js +993 -0
- package/src/js/modules/SelectRange/extensions/clipboard/pasteActions.js +45 -0
- package/src/js/modules/SelectRange/extensions/clipboard/pasteParsers.js +57 -0
- package/src/js/modules/SelectRange/extensions/export/columnLookups.js +11 -0
- package/src/js/modules/SelectRange/extensions/export/rowLookups.js +5 -0
- package/src/js/modules/SelectRange/extensions/extensions.js +21 -0
- package/src/js/modules/SelectRange/extensions/keybindings/actions.js +38 -0
- package/src/js/modules/SelectRange/extensions/keybindings/bindings.js +14 -0
- package/src/js/modules/SelectRow/SelectRow.js +499 -0
- package/src/js/modules/SelectRow/extensions/extensions.js +9 -0
- package/src/js/modules/SelectRow/extensions/formatters/rowSelection.js +60 -0
- package/src/js/modules/Sort/Sort.js +480 -0
- package/src/js/modules/Sort/defaults/sorters/alphanum.js +44 -0
- package/src/js/modules/Sort/defaults/sorters/array.js +82 -0
- package/src/js/modules/Sort/defaults/sorters/boolean.js +7 -0
- package/src/js/modules/Sort/defaults/sorters/date.js +10 -0
- package/src/js/modules/Sort/defaults/sorters/datetime.js +48 -0
- package/src/js/modules/Sort/defaults/sorters/exists.js +7 -0
- package/src/js/modules/Sort/defaults/sorters/number.js +40 -0
- package/src/js/modules/Sort/defaults/sorters/string.js +34 -0
- package/src/js/modules/Sort/defaults/sorters/time.js +10 -0
- package/src/js/modules/Sort/defaults/sorters.js +21 -0
- package/src/js/modules/Spreadsheet/GridCalculator.js +64 -0
- package/src/js/modules/Spreadsheet/Sheet.js +243 -0
- package/src/js/modules/Spreadsheet/SheetComponent.js +59 -0
- package/src/js/modules/Spreadsheet/Spreadsheet.js +309 -0
- package/src/js/modules/Tooltip/Tooltip.js +128 -0
- package/src/js/modules/Validate/Validate.js +303 -0
- package/src/js/modules/Validate/defaults/validators.js +150 -0
- package/src/scss/tabulator.scss +1693 -0
- package/src/scss/themes/bootstrap/tabulator_bootstrap3.scss +302 -0
- package/src/scss/themes/bootstrap/tabulator_bootstrap4.scss +589 -0
- package/src/scss/themes/bootstrap/tabulator_bootstrap5.scss +979 -0
- package/src/scss/themes/bootstrap/variables3.scss +872 -0
- package/src/scss/themes/bootstrap/variables4.scss +1059 -0
- package/src/scss/themes/bootstrap/variables5.scss +1967 -0
- package/src/scss/themes/bulma/tabulator_bulma.scss +316 -0
- package/src/scss/themes/bulma/variables.scss +198 -0
- package/src/scss/themes/materialize/tabulator_materialize.scss +318 -0
- package/src/scss/themes/materialize/variables.scss +71 -0
- package/src/scss/themes/semanticui/tabulator_semanticui.scss +623 -0
- package/src/scss/themes/semanticui/variables.scss +843 -0
- package/src/scss/themes/semanticui/variables_table.scss +248 -0
- package/src/scss/themes/tabulator_midnight.scss +235 -0
- package/src/scss/themes/tabulator_modern.scss +308 -0
- package/src/scss/themes/tabulator_simple.scss +143 -0
- package/src/scss/themes/tabulator_site.scss +267 -0
- package/src/scss/themes/tabulator_site_dark.scss +496 -0
|
@@ -0,0 +1,586 @@
|
|
|
1
|
+
import Module from '../../core/Module.js';
|
|
2
|
+
|
|
3
|
+
import CalcComponent from './CalcComponent.js';
|
|
4
|
+
|
|
5
|
+
import Cell from '../../core/cell/Cell.js';
|
|
6
|
+
import Column from '../../core/column/Column.js';
|
|
7
|
+
import Row from '../../core/row/Row.js';
|
|
8
|
+
|
|
9
|
+
import defaultCalculations from './defaults/calculations.js';
|
|
10
|
+
|
|
11
|
+
export default class ColumnCalcs extends Module{
|
|
12
|
+
|
|
13
|
+
static moduleName = "columnCalcs";
|
|
14
|
+
|
|
15
|
+
//load defaults
|
|
16
|
+
static calculations = defaultCalculations;
|
|
17
|
+
|
|
18
|
+
constructor(table){
|
|
19
|
+
super(table);
|
|
20
|
+
|
|
21
|
+
this.topCalcs = [];
|
|
22
|
+
this.botCalcs = [];
|
|
23
|
+
this.genColumn = false;
|
|
24
|
+
this.topElement = this.createElement();
|
|
25
|
+
this.botElement = this.createElement();
|
|
26
|
+
this.topRow = false;
|
|
27
|
+
this.botRow = false;
|
|
28
|
+
this.topInitialized = false;
|
|
29
|
+
this.botInitialized = false;
|
|
30
|
+
|
|
31
|
+
this.blocked = false;
|
|
32
|
+
this.recalcAfterBlock = false;
|
|
33
|
+
|
|
34
|
+
this.registerTableOption("columnCalcs", true);
|
|
35
|
+
|
|
36
|
+
this.registerColumnOption("topCalc");
|
|
37
|
+
this.registerColumnOption("topCalcParams");
|
|
38
|
+
this.registerColumnOption("topCalcFormatter");
|
|
39
|
+
this.registerColumnOption("topCalcFormatterParams");
|
|
40
|
+
this.registerColumnOption("bottomCalc");
|
|
41
|
+
this.registerColumnOption("bottomCalcParams");
|
|
42
|
+
this.registerColumnOption("bottomCalcFormatter");
|
|
43
|
+
this.registerColumnOption("bottomCalcFormatterParams");
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
createElement (){
|
|
47
|
+
var el = document.createElement("div");
|
|
48
|
+
el.classList.add("tabulator-calcs-holder");
|
|
49
|
+
return el;
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
initialize(){
|
|
53
|
+
this.genColumn = new Column({field:"value"}, this);
|
|
54
|
+
|
|
55
|
+
this.subscribe("cell-value-changed", this.cellValueChanged.bind(this));
|
|
56
|
+
this.subscribe("column-init", this.initializeColumnCheck.bind(this));
|
|
57
|
+
this.subscribe("row-deleted", this.rowsUpdated.bind(this));
|
|
58
|
+
this.subscribe("scroll-horizontal", this.scrollHorizontal.bind(this));
|
|
59
|
+
this.subscribe("row-added", this.rowsUpdated.bind(this));
|
|
60
|
+
this.subscribe("column-moved", this.recalcActiveRows.bind(this));
|
|
61
|
+
this.subscribe("column-add", this.recalcActiveRows.bind(this));
|
|
62
|
+
this.subscribe("data-refreshed", this.recalcActiveRowsRefresh.bind(this));
|
|
63
|
+
this.subscribe("table-redraw", this.tableRedraw.bind(this));
|
|
64
|
+
this.subscribe("rows-visible", this.visibleRows.bind(this));
|
|
65
|
+
this.subscribe("scrollbar-vertical", this.adjustForScrollbar.bind(this));
|
|
66
|
+
|
|
67
|
+
this.subscribe("redraw-blocked", this.blockRedraw.bind(this));
|
|
68
|
+
this.subscribe("redraw-restored", this.restoreRedraw.bind(this));
|
|
69
|
+
|
|
70
|
+
this.subscribe("table-redrawing", this.resizeHolderWidth.bind(this));
|
|
71
|
+
this.subscribe("column-resized", this.resizeHolderWidth.bind(this));
|
|
72
|
+
this.subscribe("column-show", this.resizeHolderWidth.bind(this));
|
|
73
|
+
this.subscribe("column-hide", this.resizeHolderWidth.bind(this));
|
|
74
|
+
|
|
75
|
+
this.registerTableFunction("getCalcResults", this.getResults.bind(this));
|
|
76
|
+
this.registerTableFunction("recalc", this.userRecalc.bind(this));
|
|
77
|
+
|
|
78
|
+
|
|
79
|
+
this.resizeHolderWidth();
|
|
80
|
+
}
|
|
81
|
+
|
|
82
|
+
resizeHolderWidth(){
|
|
83
|
+
this.topElement.style.minWidth = this.table.columnManager.headersElement.offsetWidth + "px";
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
|
|
87
|
+
tableRedraw(force){
|
|
88
|
+
this.recalc(this.table.rowManager.activeRows);
|
|
89
|
+
|
|
90
|
+
if(force){
|
|
91
|
+
this.redraw();
|
|
92
|
+
}
|
|
93
|
+
}
|
|
94
|
+
|
|
95
|
+
blockRedraw(){
|
|
96
|
+
this.blocked = true;
|
|
97
|
+
this.recalcAfterBlock = false;
|
|
98
|
+
}
|
|
99
|
+
|
|
100
|
+
|
|
101
|
+
restoreRedraw(){
|
|
102
|
+
this.blocked = false;
|
|
103
|
+
|
|
104
|
+
if(this.recalcAfterBlock){
|
|
105
|
+
this.recalcAfterBlock = false;
|
|
106
|
+
this.recalcActiveRowsRefresh();
|
|
107
|
+
}
|
|
108
|
+
}
|
|
109
|
+
|
|
110
|
+
///////////////////////////////////
|
|
111
|
+
///////// Table Functions /////////
|
|
112
|
+
///////////////////////////////////
|
|
113
|
+
userRecalc(){
|
|
114
|
+
this.recalc(this.table.rowManager.activeRows);
|
|
115
|
+
}
|
|
116
|
+
|
|
117
|
+
///////////////////////////////////
|
|
118
|
+
///////// Internal Logic //////////
|
|
119
|
+
///////////////////////////////////
|
|
120
|
+
|
|
121
|
+
blockCheck(){
|
|
122
|
+
if(this.blocked){
|
|
123
|
+
this.recalcAfterBlock = true;
|
|
124
|
+
}
|
|
125
|
+
|
|
126
|
+
return this.blocked;
|
|
127
|
+
}
|
|
128
|
+
|
|
129
|
+
visibleRows(viewable, rows){
|
|
130
|
+
if(this.topRow){
|
|
131
|
+
rows.unshift(this.topRow);
|
|
132
|
+
}
|
|
133
|
+
|
|
134
|
+
if(this.botRow){
|
|
135
|
+
rows.push(this.botRow);
|
|
136
|
+
}
|
|
137
|
+
|
|
138
|
+
return rows;
|
|
139
|
+
}
|
|
140
|
+
|
|
141
|
+
rowsUpdated(row){
|
|
142
|
+
if(this.table.options.groupBy){
|
|
143
|
+
this.recalcRowGroup(row);
|
|
144
|
+
}else{
|
|
145
|
+
this.recalcActiveRows();
|
|
146
|
+
}
|
|
147
|
+
}
|
|
148
|
+
|
|
149
|
+
recalcActiveRowsRefresh(){
|
|
150
|
+
if(this.table.options.groupBy && this.table.options.dataTreeStartExpanded && this.table.options.dataTree){
|
|
151
|
+
this.recalcAll();
|
|
152
|
+
}else{
|
|
153
|
+
this.recalcActiveRows();
|
|
154
|
+
}
|
|
155
|
+
}
|
|
156
|
+
|
|
157
|
+
recalcActiveRows(){
|
|
158
|
+
this.recalc(this.table.rowManager.activeRows);
|
|
159
|
+
}
|
|
160
|
+
|
|
161
|
+
cellValueChanged(cell){
|
|
162
|
+
if(cell.column.definition.topCalc || cell.column.definition.bottomCalc){
|
|
163
|
+
if(this.table.options.groupBy){
|
|
164
|
+
if(this.table.options.columnCalcs == "table" || this.table.options.columnCalcs == "both"){
|
|
165
|
+
this.recalcActiveRows();
|
|
166
|
+
}
|
|
167
|
+
|
|
168
|
+
if(this.table.options.columnCalcs != "table"){
|
|
169
|
+
this.recalcRowGroup(cell.row);
|
|
170
|
+
}
|
|
171
|
+
}else{
|
|
172
|
+
this.recalcActiveRows();
|
|
173
|
+
}
|
|
174
|
+
}
|
|
175
|
+
}
|
|
176
|
+
|
|
177
|
+
initializeColumnCheck(column){
|
|
178
|
+
if(column.definition.topCalc || column.definition.bottomCalc){
|
|
179
|
+
this.initializeColumn(column);
|
|
180
|
+
}
|
|
181
|
+
}
|
|
182
|
+
|
|
183
|
+
//initialize column calcs
|
|
184
|
+
initializeColumn(column){
|
|
185
|
+
var def = column.definition;
|
|
186
|
+
|
|
187
|
+
var config = {
|
|
188
|
+
topCalcParams:def.topCalcParams || {},
|
|
189
|
+
botCalcParams:def.bottomCalcParams || {},
|
|
190
|
+
};
|
|
191
|
+
|
|
192
|
+
if(def.topCalc){
|
|
193
|
+
|
|
194
|
+
switch(typeof def.topCalc){
|
|
195
|
+
case "string":
|
|
196
|
+
if(ColumnCalcs.calculations[def.topCalc]){
|
|
197
|
+
config.topCalc = ColumnCalcs.calculations[def.topCalc];
|
|
198
|
+
}else{
|
|
199
|
+
console.warn("Column Calc Error - No such calculation found, ignoring: ", def.topCalc);
|
|
200
|
+
}
|
|
201
|
+
break;
|
|
202
|
+
|
|
203
|
+
case "function":
|
|
204
|
+
config.topCalc = def.topCalc;
|
|
205
|
+
break;
|
|
206
|
+
|
|
207
|
+
}
|
|
208
|
+
|
|
209
|
+
if(config.topCalc){
|
|
210
|
+
column.modules.columnCalcs = config;
|
|
211
|
+
this.topCalcs.push(column);
|
|
212
|
+
|
|
213
|
+
if(this.table.options.columnCalcs != "group"){
|
|
214
|
+
this.initializeTopRow();
|
|
215
|
+
}
|
|
216
|
+
}
|
|
217
|
+
|
|
218
|
+
}
|
|
219
|
+
|
|
220
|
+
if(def.bottomCalc){
|
|
221
|
+
switch(typeof def.bottomCalc){
|
|
222
|
+
case "string":
|
|
223
|
+
if(ColumnCalcs.calculations[def.bottomCalc]){
|
|
224
|
+
config.botCalc = ColumnCalcs.calculations[def.bottomCalc];
|
|
225
|
+
}else{
|
|
226
|
+
console.warn("Column Calc Error - No such calculation found, ignoring: ", def.bottomCalc);
|
|
227
|
+
}
|
|
228
|
+
break;
|
|
229
|
+
|
|
230
|
+
case "function":
|
|
231
|
+
config.botCalc = def.bottomCalc;
|
|
232
|
+
break;
|
|
233
|
+
|
|
234
|
+
}
|
|
235
|
+
|
|
236
|
+
if(config.botCalc){
|
|
237
|
+
column.modules.columnCalcs = config;
|
|
238
|
+
this.botCalcs.push(column);
|
|
239
|
+
|
|
240
|
+
if(this.table.options.columnCalcs != "group"){
|
|
241
|
+
this.initializeBottomRow();
|
|
242
|
+
}
|
|
243
|
+
}
|
|
244
|
+
}
|
|
245
|
+
|
|
246
|
+
}
|
|
247
|
+
|
|
248
|
+
//dummy functions to handle being mock column manager
|
|
249
|
+
registerColumnField(){}
|
|
250
|
+
|
|
251
|
+
removeCalcs(){
|
|
252
|
+
var changed = false;
|
|
253
|
+
|
|
254
|
+
if(this.topInitialized){
|
|
255
|
+
this.topInitialized = false;
|
|
256
|
+
this.topElement.parentNode.removeChild(this.topElement);
|
|
257
|
+
changed = true;
|
|
258
|
+
}
|
|
259
|
+
|
|
260
|
+
if(this.botInitialized){
|
|
261
|
+
this.botInitialized = false;
|
|
262
|
+
this.footerRemove(this.botElement);
|
|
263
|
+
changed = true;
|
|
264
|
+
}
|
|
265
|
+
|
|
266
|
+
if(changed){
|
|
267
|
+
this.table.rowManager.adjustTableSize();
|
|
268
|
+
}
|
|
269
|
+
}
|
|
270
|
+
|
|
271
|
+
reinitializeCalcs(){
|
|
272
|
+
if(this.topCalcs.length){
|
|
273
|
+
this.initializeTopRow();
|
|
274
|
+
}
|
|
275
|
+
|
|
276
|
+
if(this.botCalcs.length){
|
|
277
|
+
this.initializeBottomRow();
|
|
278
|
+
}
|
|
279
|
+
}
|
|
280
|
+
|
|
281
|
+
initializeTopRow(){
|
|
282
|
+
var fragment = document.createDocumentFragment();
|
|
283
|
+
|
|
284
|
+
if(!this.topInitialized){
|
|
285
|
+
|
|
286
|
+
fragment.appendChild(document.createElement("br"));
|
|
287
|
+
fragment.appendChild(this.topElement);
|
|
288
|
+
|
|
289
|
+
this.table.columnManager.getContentsElement().insertBefore(fragment, this.table.columnManager.headersElement.nextSibling);
|
|
290
|
+
this.topInitialized = true;
|
|
291
|
+
}
|
|
292
|
+
}
|
|
293
|
+
|
|
294
|
+
initializeBottomRow(){
|
|
295
|
+
if(!this.botInitialized){
|
|
296
|
+
this.footerPrepend(this.botElement);
|
|
297
|
+
this.botInitialized = true;
|
|
298
|
+
}
|
|
299
|
+
}
|
|
300
|
+
|
|
301
|
+
scrollHorizontal(left){
|
|
302
|
+
if(this.botInitialized && this.botRow){
|
|
303
|
+
this.botElement.scrollLeft = left;
|
|
304
|
+
}
|
|
305
|
+
}
|
|
306
|
+
|
|
307
|
+
recalc(rows){
|
|
308
|
+
var data, row;
|
|
309
|
+
|
|
310
|
+
if(!this.blockCheck()){
|
|
311
|
+
if(this.topInitialized || this.botInitialized){
|
|
312
|
+
data = this.rowsToData(rows);
|
|
313
|
+
|
|
314
|
+
if(this.topInitialized){
|
|
315
|
+
if(this.topRow){
|
|
316
|
+
this.topRow.deleteCells();
|
|
317
|
+
}
|
|
318
|
+
|
|
319
|
+
row = this.generateRow("top", data);
|
|
320
|
+
this.topRow = row;
|
|
321
|
+
while(this.topElement.firstChild) this.topElement.removeChild(this.topElement.firstChild);
|
|
322
|
+
this.topElement.appendChild(row.getElement());
|
|
323
|
+
row.initialize(true);
|
|
324
|
+
}
|
|
325
|
+
|
|
326
|
+
if(this.botInitialized){
|
|
327
|
+
if(this.botRow){
|
|
328
|
+
this.botRow.deleteCells();
|
|
329
|
+
}
|
|
330
|
+
|
|
331
|
+
row = this.generateRow("bottom", data);
|
|
332
|
+
this.botRow = row;
|
|
333
|
+
while(this.botElement.firstChild) this.botElement.removeChild(this.botElement.firstChild);
|
|
334
|
+
this.botElement.appendChild(row.getElement());
|
|
335
|
+
row.initialize(true);
|
|
336
|
+
}
|
|
337
|
+
|
|
338
|
+
this.table.rowManager.adjustTableSize();
|
|
339
|
+
|
|
340
|
+
//set resizable handles
|
|
341
|
+
if(this.table.modExists("frozenColumns")){
|
|
342
|
+
this.table.modules.frozenColumns.layout();
|
|
343
|
+
}
|
|
344
|
+
}
|
|
345
|
+
}
|
|
346
|
+
}
|
|
347
|
+
|
|
348
|
+
recalcRowGroup(row){
|
|
349
|
+
this.recalcGroup(this.table.modules.groupRows.getRowGroup(row));
|
|
350
|
+
}
|
|
351
|
+
|
|
352
|
+
recalcAll(){
|
|
353
|
+
if(this.topCalcs.length || this.botCalcs.length){
|
|
354
|
+
if(this.table.options.columnCalcs !== "group"){
|
|
355
|
+
this.recalcActiveRows();
|
|
356
|
+
}
|
|
357
|
+
|
|
358
|
+
if(this.table.options.groupBy && this.table.options.columnCalcs !== "table"){
|
|
359
|
+
|
|
360
|
+
var groups = this.table.modules.groupRows.getChildGroups();
|
|
361
|
+
|
|
362
|
+
groups.forEach((group) => {
|
|
363
|
+
this.recalcGroup(group);
|
|
364
|
+
});
|
|
365
|
+
}
|
|
366
|
+
}
|
|
367
|
+
}
|
|
368
|
+
|
|
369
|
+
recalcGroup(group){
|
|
370
|
+
var data, rowData;
|
|
371
|
+
|
|
372
|
+
if(!this.blockCheck()){
|
|
373
|
+
if(group){
|
|
374
|
+
if(group.calcs){
|
|
375
|
+
if(group.calcs.bottom){
|
|
376
|
+
data = this.rowsToData(group.rows);
|
|
377
|
+
rowData = this.generateRowData("bottom", data);
|
|
378
|
+
|
|
379
|
+
group.calcs.bottom.updateData(rowData);
|
|
380
|
+
group.calcs.bottom.reinitialize();
|
|
381
|
+
}
|
|
382
|
+
|
|
383
|
+
if(group.calcs.top){
|
|
384
|
+
data = this.rowsToData(group.rows);
|
|
385
|
+
rowData = this.generateRowData("top", data);
|
|
386
|
+
|
|
387
|
+
group.calcs.top.updateData(rowData);
|
|
388
|
+
group.calcs.top.reinitialize();
|
|
389
|
+
}
|
|
390
|
+
}
|
|
391
|
+
}
|
|
392
|
+
}
|
|
393
|
+
}
|
|
394
|
+
|
|
395
|
+
//generate top stats row
|
|
396
|
+
generateTopRow(rows){
|
|
397
|
+
return this.generateRow("top", this.rowsToData(rows));
|
|
398
|
+
}
|
|
399
|
+
//generate bottom stats row
|
|
400
|
+
generateBottomRow(rows){
|
|
401
|
+
return this.generateRow("bottom", this.rowsToData(rows));
|
|
402
|
+
}
|
|
403
|
+
|
|
404
|
+
rowsToData(rows){
|
|
405
|
+
var data = [],
|
|
406
|
+
hasDataTreeColumnCalcs = this.table.options.dataTree && this.table.options.dataTreeChildColumnCalcs,
|
|
407
|
+
dataTree = this.table.modules.dataTree;
|
|
408
|
+
|
|
409
|
+
rows.forEach((row) => {
|
|
410
|
+
data.push(row.getData());
|
|
411
|
+
|
|
412
|
+
if(hasDataTreeColumnCalcs && row.modules.dataTree?.open){
|
|
413
|
+
this.rowsToData(dataTree.getFilteredTreeChildren(row)).forEach(dataRow =>{
|
|
414
|
+
data.push(dataRow);
|
|
415
|
+
});
|
|
416
|
+
}
|
|
417
|
+
});
|
|
418
|
+
return data;
|
|
419
|
+
}
|
|
420
|
+
|
|
421
|
+
//generate stats row
|
|
422
|
+
generateRow(pos, data){
|
|
423
|
+
var rowData = this.generateRowData(pos, data),
|
|
424
|
+
row;
|
|
425
|
+
|
|
426
|
+
if(this.table.modExists("mutator")){
|
|
427
|
+
this.table.modules.mutator.disable();
|
|
428
|
+
}
|
|
429
|
+
|
|
430
|
+
row = new Row(rowData, this, "calc");
|
|
431
|
+
|
|
432
|
+
if(this.table.modExists("mutator")){
|
|
433
|
+
this.table.modules.mutator.enable();
|
|
434
|
+
}
|
|
435
|
+
|
|
436
|
+
row.getElement().classList.add("tabulator-calcs", "tabulator-calcs-" + pos);
|
|
437
|
+
|
|
438
|
+
row.component = false;
|
|
439
|
+
|
|
440
|
+
row.getComponent = () => {
|
|
441
|
+
if(!row.component){
|
|
442
|
+
row.component = new CalcComponent(row);
|
|
443
|
+
}
|
|
444
|
+
|
|
445
|
+
return row.component;
|
|
446
|
+
};
|
|
447
|
+
|
|
448
|
+
row.generateCells = () => {
|
|
449
|
+
|
|
450
|
+
var cells = [];
|
|
451
|
+
|
|
452
|
+
this.table.columnManager.columnsByIndex.forEach((column) => {
|
|
453
|
+
|
|
454
|
+
//set field name of mock column
|
|
455
|
+
this.genColumn.setField(column.getField());
|
|
456
|
+
this.genColumn.hozAlign = column.hozAlign;
|
|
457
|
+
|
|
458
|
+
if(column.definition[pos + "CalcFormatter"] && this.table.modExists("format")){
|
|
459
|
+
this.genColumn.modules.format = {
|
|
460
|
+
formatter: this.table.modules.format.lookupFormatter(column.definition[pos + "CalcFormatter"]),
|
|
461
|
+
params: column.definition[pos + "CalcFormatterParams"] || {},
|
|
462
|
+
};
|
|
463
|
+
}else{
|
|
464
|
+
this.genColumn.modules.format = {
|
|
465
|
+
formatter: this.table.modules.format.lookupFormatter("plaintext"),
|
|
466
|
+
params:{}
|
|
467
|
+
};
|
|
468
|
+
}
|
|
469
|
+
|
|
470
|
+
//ensure css class definition is replicated to calculation cell
|
|
471
|
+
this.genColumn.definition.cssClass = column.definition.cssClass;
|
|
472
|
+
|
|
473
|
+
//generate cell and assign to correct column
|
|
474
|
+
var cell = new Cell(this.genColumn, row);
|
|
475
|
+
cell.getElement();
|
|
476
|
+
cell.column = column;
|
|
477
|
+
cell.setWidth();
|
|
478
|
+
|
|
479
|
+
column.cells.push(cell);
|
|
480
|
+
cells.push(cell);
|
|
481
|
+
|
|
482
|
+
if(!column.visible){
|
|
483
|
+
cell.hide();
|
|
484
|
+
}
|
|
485
|
+
});
|
|
486
|
+
|
|
487
|
+
row.cells = cells;
|
|
488
|
+
};
|
|
489
|
+
|
|
490
|
+
return row;
|
|
491
|
+
}
|
|
492
|
+
|
|
493
|
+
//generate stats row
|
|
494
|
+
generateRowData(pos, data){
|
|
495
|
+
var rowData = {},
|
|
496
|
+
calcs = pos == "top" ? this.topCalcs : this.botCalcs,
|
|
497
|
+
type = pos == "top" ? "topCalc" : "botCalc",
|
|
498
|
+
params, paramKey;
|
|
499
|
+
|
|
500
|
+
calcs.forEach(function(column){
|
|
501
|
+
var values = [];
|
|
502
|
+
|
|
503
|
+
if(column.modules.columnCalcs && column.modules.columnCalcs[type]){
|
|
504
|
+
data.forEach(function(item){
|
|
505
|
+
values.push(column.getFieldValue(item));
|
|
506
|
+
});
|
|
507
|
+
|
|
508
|
+
paramKey = type + "Params";
|
|
509
|
+
params = typeof column.modules.columnCalcs[paramKey] === "function" ? column.modules.columnCalcs[paramKey](values, data) : column.modules.columnCalcs[paramKey];
|
|
510
|
+
|
|
511
|
+
column.setFieldValue(rowData, column.modules.columnCalcs[type](values, data, params));
|
|
512
|
+
}
|
|
513
|
+
});
|
|
514
|
+
|
|
515
|
+
return rowData;
|
|
516
|
+
}
|
|
517
|
+
|
|
518
|
+
hasTopCalcs(){
|
|
519
|
+
return !!(this.topCalcs.length);
|
|
520
|
+
}
|
|
521
|
+
|
|
522
|
+
hasBottomCalcs(){
|
|
523
|
+
return !!(this.botCalcs.length);
|
|
524
|
+
}
|
|
525
|
+
|
|
526
|
+
//handle table redraw
|
|
527
|
+
redraw(){
|
|
528
|
+
if(this.topRow){
|
|
529
|
+
this.topRow.normalizeHeight(true);
|
|
530
|
+
}
|
|
531
|
+
if(this.botRow){
|
|
532
|
+
this.botRow.normalizeHeight(true);
|
|
533
|
+
}
|
|
534
|
+
}
|
|
535
|
+
|
|
536
|
+
//return the calculated
|
|
537
|
+
getResults(){
|
|
538
|
+
var results = {},
|
|
539
|
+
groups;
|
|
540
|
+
|
|
541
|
+
if(this.table.options.groupBy && this.table.modExists("groupRows")){
|
|
542
|
+
groups = this.table.modules.groupRows.getGroups(true);
|
|
543
|
+
|
|
544
|
+
groups.forEach((group) => {
|
|
545
|
+
results[group.getKey()] = this.getGroupResults(group);
|
|
546
|
+
});
|
|
547
|
+
}else{
|
|
548
|
+
results = {
|
|
549
|
+
top: this.topRow ? this.topRow.getData() : {},
|
|
550
|
+
bottom: this.botRow ? this.botRow.getData() : {},
|
|
551
|
+
};
|
|
552
|
+
}
|
|
553
|
+
|
|
554
|
+
return results;
|
|
555
|
+
}
|
|
556
|
+
|
|
557
|
+
//get results from a group
|
|
558
|
+
getGroupResults(group){
|
|
559
|
+
var groupObj = group._getSelf(),
|
|
560
|
+
subGroups = group.getSubGroups(),
|
|
561
|
+
subGroupResults = {},
|
|
562
|
+
results = {};
|
|
563
|
+
|
|
564
|
+
subGroups.forEach((subgroup) => {
|
|
565
|
+
subGroupResults[subgroup.getKey()] = this.getGroupResults(subgroup);
|
|
566
|
+
});
|
|
567
|
+
|
|
568
|
+
results = {
|
|
569
|
+
top: groupObj.calcs.top ? groupObj.calcs.top.getData() : {},
|
|
570
|
+
bottom: groupObj.calcs.bottom ? groupObj.calcs.bottom.getData() : {},
|
|
571
|
+
groups: subGroupResults,
|
|
572
|
+
};
|
|
573
|
+
|
|
574
|
+
return results;
|
|
575
|
+
}
|
|
576
|
+
|
|
577
|
+
adjustForScrollbar(width){
|
|
578
|
+
if(this.botRow){
|
|
579
|
+
if(this.table.rtl){
|
|
580
|
+
this.botElement.style.paddingLeft = width + "px";
|
|
581
|
+
}else{
|
|
582
|
+
this.botElement.style.paddingRight = width + "px";
|
|
583
|
+
}
|
|
584
|
+
}
|
|
585
|
+
}
|
|
586
|
+
}
|
|
@@ -0,0 +1,93 @@
|
|
|
1
|
+
export default {
|
|
2
|
+
"avg":function(values, data, calcParams){
|
|
3
|
+
var output = 0,
|
|
4
|
+
precision = typeof calcParams.precision !== "undefined" ? calcParams.precision : 2;
|
|
5
|
+
|
|
6
|
+
if(values.length){
|
|
7
|
+
output = values.reduce(function(sum, value){
|
|
8
|
+
return Number(sum) + Number(value);
|
|
9
|
+
});
|
|
10
|
+
|
|
11
|
+
output = output / values.length;
|
|
12
|
+
|
|
13
|
+
output = precision !== false ? output.toFixed(precision) : output;
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
return parseFloat(output).toString();
|
|
17
|
+
},
|
|
18
|
+
"max":function(values, data, calcParams){
|
|
19
|
+
var output = null,
|
|
20
|
+
precision = typeof calcParams.precision !== "undefined" ? calcParams.precision : false;
|
|
21
|
+
|
|
22
|
+
values.forEach(function(value){
|
|
23
|
+
|
|
24
|
+
value = Number(value);
|
|
25
|
+
|
|
26
|
+
if(value > output || output === null){
|
|
27
|
+
output = value;
|
|
28
|
+
}
|
|
29
|
+
});
|
|
30
|
+
|
|
31
|
+
return output !== null ? (precision !== false ? output.toFixed(precision) : output) : "";
|
|
32
|
+
},
|
|
33
|
+
"min":function(values, data, calcParams){
|
|
34
|
+
var output = null,
|
|
35
|
+
precision = typeof calcParams.precision !== "undefined" ? calcParams.precision : false;
|
|
36
|
+
|
|
37
|
+
values.forEach(function(value){
|
|
38
|
+
|
|
39
|
+
value = Number(value);
|
|
40
|
+
|
|
41
|
+
if(value < output || output === null){
|
|
42
|
+
output = value;
|
|
43
|
+
}
|
|
44
|
+
});
|
|
45
|
+
|
|
46
|
+
return output !== null ? (precision !== false ? output.toFixed(precision) : output) : "";
|
|
47
|
+
},
|
|
48
|
+
"sum":function(values, data, calcParams){
|
|
49
|
+
var output = 0,
|
|
50
|
+
precision = typeof calcParams.precision !== "undefined" ? calcParams.precision : false;
|
|
51
|
+
|
|
52
|
+
if(values.length){
|
|
53
|
+
values.forEach(function(value){
|
|
54
|
+
value = Number(value);
|
|
55
|
+
|
|
56
|
+
output += !isNaN(value) ? Number(value) : 0;
|
|
57
|
+
});
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
return precision !== false ? output.toFixed(precision) : output;
|
|
61
|
+
},
|
|
62
|
+
"concat":function(values, data, calcParams){
|
|
63
|
+
var output = 0;
|
|
64
|
+
|
|
65
|
+
if(values.length){
|
|
66
|
+
output = values.reduce(function(sum, value){
|
|
67
|
+
return String(sum) + String(value);
|
|
68
|
+
});
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
return output;
|
|
72
|
+
},
|
|
73
|
+
"count":function(values, data, calcParams){
|
|
74
|
+
var output = 0;
|
|
75
|
+
|
|
76
|
+
if(values.length){
|
|
77
|
+
values.forEach(function(value){
|
|
78
|
+
if(value){
|
|
79
|
+
output ++;
|
|
80
|
+
}
|
|
81
|
+
});
|
|
82
|
+
}
|
|
83
|
+
|
|
84
|
+
return output;
|
|
85
|
+
},
|
|
86
|
+
"unique":function(values, data, calcParams){
|
|
87
|
+
var unique = values.filter((value, index) => {
|
|
88
|
+
return (values || value === 0) && values.indexOf(value) === index;
|
|
89
|
+
});
|
|
90
|
+
|
|
91
|
+
return unique.length;
|
|
92
|
+
},
|
|
93
|
+
};
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
import Module from '../../core/Module.js';
|
|
2
|
+
|
|
3
|
+
export default class Comms extends Module{
|
|
4
|
+
|
|
5
|
+
static moduleName = "comms";
|
|
6
|
+
|
|
7
|
+
constructor(table){
|
|
8
|
+
super(table);
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
initialize(){
|
|
12
|
+
this.registerTableFunction("tableComms", this.receive.bind(this));
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
getConnections(selectors){
|
|
16
|
+
var connections = [],
|
|
17
|
+
connection;
|
|
18
|
+
|
|
19
|
+
connection = this.table.constructor.registry.lookupTable(selectors);
|
|
20
|
+
|
|
21
|
+
connection.forEach((con) =>{
|
|
22
|
+
if(this.table !== con){
|
|
23
|
+
connections.push(con);
|
|
24
|
+
}
|
|
25
|
+
});
|
|
26
|
+
|
|
27
|
+
return connections;
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
send(selectors, module, action, data){
|
|
31
|
+
var connections = this.getConnections(selectors);
|
|
32
|
+
|
|
33
|
+
connections.forEach((connection) => {
|
|
34
|
+
connection.tableComms(this.table.element, module, action, data);
|
|
35
|
+
});
|
|
36
|
+
|
|
37
|
+
if(!connections.length && selectors){
|
|
38
|
+
console.warn("Table Connection Error - No tables matching selector found", selectors);
|
|
39
|
+
}
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
receive(table, module, action, data){
|
|
43
|
+
if(this.table.modExists(module)){
|
|
44
|
+
return this.table.modules[module].commsReceived(table, action, data);
|
|
45
|
+
}else{
|
|
46
|
+
console.warn("Inter-table Comms Error - no such module:", module);
|
|
47
|
+
}
|
|
48
|
+
}
|
|
49
|
+
}
|