react-pivottable-plus 1.0.13 → 1.0.16
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/PivotTableUI.js +133 -210
- package/dist/PivotTableUI.js.map +1 -1
- package/dist/TableRenderers.js +193 -28
- package/dist/TableRenderers.js.map +1 -1
- package/dist/core/CellPipeline.js +167 -0
- package/dist/core/CellPipeline.js.map +1 -0
- package/dist/core/ColumnEngine.js +299 -0
- package/dist/core/ColumnEngine.js.map +1 -0
- package/dist/core/EventBus.js +109 -0
- package/dist/core/EventBus.js.map +1 -0
- package/dist/core/ModuleRegistry.js +140 -0
- package/dist/core/ModuleRegistry.js.map +1 -0
- package/dist/core/PivotCore.js +254 -0
- package/dist/core/PivotCore.js.map +1 -0
- package/dist/core/PivotEngine.js +151 -0
- package/dist/core/PivotEngine.js.map +1 -0
- package/dist/core/StateManager.js +142 -0
- package/dist/core/StateManager.js.map +1 -0
- package/dist/core/VirtualScroller.js +138 -0
- package/dist/core/VirtualScroller.js.map +1 -0
- package/dist/core/api/ColumnApi.js +162 -0
- package/dist/core/api/ColumnApi.js.map +1 -0
- package/dist/core/api/GridApi.js +208 -0
- package/dist/core/api/GridApi.js.map +1 -0
- package/dist/core/index.js +89 -0
- package/dist/core/index.js.map +1 -0
- package/dist/core/rowModels/ClientSideRowModel.js +177 -0
- package/dist/core/rowModels/ClientSideRowModel.js.map +1 -0
- package/dist/core/rowModels/index.js +13 -0
- package/dist/core/rowModels/index.js.map +1 -0
- package/dist/hooks/usePivot.js +63 -155
- package/dist/hooks/usePivot.js.map +1 -1
- package/dist/modules/FilterModule.js +156 -0
- package/dist/modules/FilterModule.js.map +1 -0
- package/dist/modules/PaginationModule.js +115 -0
- package/dist/modules/PaginationModule.js.map +1 -0
- package/dist/modules/SortModule.js +88 -0
- package/dist/modules/SortModule.js.map +1 -0
- package/dist/modules/ThemeModule.js +83 -0
- package/dist/modules/ThemeModule.js.map +1 -0
- package/dist/modules/VirtualizationModule.js +89 -0
- package/dist/modules/VirtualizationModule.js.map +1 -0
- package/dist/modules/index.js +41 -0
- package/dist/modules/index.js.map +1 -0
- package/dist/react/index.js +13 -0
- package/dist/react/index.js.map +1 -0
- package/dist/react/usePivotGrid.js +116 -0
- package/dist/react/usePivotGrid.js.map +1 -0
- package/dist/renderers/RadixUI.js +1 -1
- package/dist/renderers/RadixUI.js.map +1 -1
- package/dist/renderers/ShadcnDashboardUI.js +1 -1
- package/dist/renderers/ShadcnDashboardUI.js.map +1 -1
- package/dist/renderers/TailwindUI.js +1 -1
- package/dist/renderers/TailwindUI.js.map +1 -1
- package/package.json +4 -2
- package/pivottable.css +56 -0
|
@@ -0,0 +1,167 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.CellPipeline = void 0;
|
|
7
|
+
function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
|
|
8
|
+
function _classCallCheck(a, n) { if (!(a instanceof n)) throw new TypeError("Cannot call a class as a function"); }
|
|
9
|
+
function _defineProperties(e, r) { for (var t = 0; t < r.length; t++) { var o = r[t]; o.enumerable = o.enumerable || !1, o.configurable = !0, "value" in o && (o.writable = !0), Object.defineProperty(e, _toPropertyKey(o.key), o); } }
|
|
10
|
+
function _createClass(e, r, t) { return r && _defineProperties(e.prototype, r), t && _defineProperties(e, t), Object.defineProperty(e, "prototype", { writable: !1 }), e; }
|
|
11
|
+
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; }
|
|
12
|
+
function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
|
|
13
|
+
/**
|
|
14
|
+
* CellPipeline — Pipeline de renderizado de celdas.
|
|
15
|
+
*
|
|
16
|
+
* Cada celda pasa por: valueGetter → valueFormatter → cellRenderer → cellStyle
|
|
17
|
+
*
|
|
18
|
+
* Uso:
|
|
19
|
+
* const pipeline = new CellPipeline({
|
|
20
|
+
* valueFormatter: ({ value }) => `$${value.toFixed(2)}`,
|
|
21
|
+
* cellStyle: ({ value }) => value < 0 ? { color: 'red' } : null,
|
|
22
|
+
* });
|
|
23
|
+
*
|
|
24
|
+
* const result = pipeline.process({ aggregator, rowKey, colKey, pivotData });
|
|
25
|
+
* // → { value, formattedValue, rendered, style, className }
|
|
26
|
+
*/
|
|
27
|
+
var CellPipeline = exports.CellPipeline = /*#__PURE__*/function () {
|
|
28
|
+
function CellPipeline() {
|
|
29
|
+
var config = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
|
|
30
|
+
_classCallCheck(this, CellPipeline);
|
|
31
|
+
this.valueGetter = config.valueGetter || CellPipeline.defaultValueGetter;
|
|
32
|
+
this.valueFormatter = config.valueFormatter || CellPipeline.defaultValueFormatter;
|
|
33
|
+
this.cellRenderer = config.cellRenderer || null;
|
|
34
|
+
this.cellStyle = config.cellStyle || null;
|
|
35
|
+
this.cellClass = config.cellClass || null;
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
/**
|
|
39
|
+
* Procesar una celda a través del pipeline completo.
|
|
40
|
+
* @param {Object} params
|
|
41
|
+
* @param {Object} params.aggregator - El aggregator de PivotData
|
|
42
|
+
* @param {Array} params.rowKey - Clave de la fila
|
|
43
|
+
* @param {Array} params.colKey - Clave de la columna
|
|
44
|
+
* @param {Object} [params.pivotData] - Instancia de PivotData (opcional)
|
|
45
|
+
* @returns {{ value, formattedValue, rendered, style, className }}
|
|
46
|
+
*/
|
|
47
|
+
return _createClass(CellPipeline, [{
|
|
48
|
+
key: "process",
|
|
49
|
+
value: function process(params) {
|
|
50
|
+
var aggregator = params.aggregator,
|
|
51
|
+
rowKey = params.rowKey,
|
|
52
|
+
colKey = params.colKey,
|
|
53
|
+
pivotData = params.pivotData;
|
|
54
|
+
|
|
55
|
+
// 1. Value Getter
|
|
56
|
+
var value = this.valueGetter({
|
|
57
|
+
aggregator: aggregator,
|
|
58
|
+
rowKey: rowKey,
|
|
59
|
+
colKey: colKey,
|
|
60
|
+
pivotData: pivotData
|
|
61
|
+
});
|
|
62
|
+
|
|
63
|
+
// 2. Value Formatter
|
|
64
|
+
var formattedValue = this.valueFormatter({
|
|
65
|
+
value: value,
|
|
66
|
+
aggregator: aggregator,
|
|
67
|
+
rowKey: rowKey,
|
|
68
|
+
colKey: colKey,
|
|
69
|
+
pivotData: pivotData
|
|
70
|
+
});
|
|
71
|
+
|
|
72
|
+
// 3. Cell Renderer (optional — if not set, use formattedValue)
|
|
73
|
+
var rendered = this.cellRenderer ? this.cellRenderer({
|
|
74
|
+
value: value,
|
|
75
|
+
formattedValue: formattedValue,
|
|
76
|
+
aggregator: aggregator,
|
|
77
|
+
rowKey: rowKey,
|
|
78
|
+
colKey: colKey,
|
|
79
|
+
pivotData: pivotData
|
|
80
|
+
}) : formattedValue;
|
|
81
|
+
|
|
82
|
+
// 4. Cell Style (optional)
|
|
83
|
+
var style = this.cellStyle ? this.cellStyle({
|
|
84
|
+
value: value,
|
|
85
|
+
formattedValue: formattedValue,
|
|
86
|
+
rowKey: rowKey,
|
|
87
|
+
colKey: colKey,
|
|
88
|
+
pivotData: pivotData
|
|
89
|
+
}) : null;
|
|
90
|
+
|
|
91
|
+
// 5. Cell Class (optional)
|
|
92
|
+
var className = this.cellClass ? this.cellClass({
|
|
93
|
+
value: value,
|
|
94
|
+
formattedValue: formattedValue,
|
|
95
|
+
rowKey: rowKey,
|
|
96
|
+
colKey: colKey,
|
|
97
|
+
pivotData: pivotData
|
|
98
|
+
}) : null;
|
|
99
|
+
return {
|
|
100
|
+
value: value,
|
|
101
|
+
formattedValue: formattedValue,
|
|
102
|
+
rendered: rendered,
|
|
103
|
+
style: style,
|
|
104
|
+
className: className
|
|
105
|
+
};
|
|
106
|
+
}
|
|
107
|
+
|
|
108
|
+
/**
|
|
109
|
+
* Procesar una celda de total (fila o columna).
|
|
110
|
+
*/
|
|
111
|
+
}, {
|
|
112
|
+
key: "processTotal",
|
|
113
|
+
value: function processTotal(params) {
|
|
114
|
+
var aggregator = params.aggregator,
|
|
115
|
+
_params$rowKey = params.rowKey,
|
|
116
|
+
rowKey = _params$rowKey === void 0 ? [] : _params$rowKey,
|
|
117
|
+
_params$colKey = params.colKey,
|
|
118
|
+
colKey = _params$colKey === void 0 ? [] : _params$colKey,
|
|
119
|
+
pivotData = params.pivotData,
|
|
120
|
+
_params$type = params.type,
|
|
121
|
+
type = _params$type === void 0 ? 'row' : _params$type;
|
|
122
|
+
var value = aggregator.value();
|
|
123
|
+
var formattedValue = aggregator.format(value);
|
|
124
|
+
var style = this.cellStyle ? this.cellStyle({
|
|
125
|
+
value: value,
|
|
126
|
+
formattedValue: formattedValue,
|
|
127
|
+
rowKey: rowKey,
|
|
128
|
+
colKey: colKey,
|
|
129
|
+
pivotData: pivotData,
|
|
130
|
+
isTotal: true,
|
|
131
|
+
totalType: type
|
|
132
|
+
}) : null;
|
|
133
|
+
return {
|
|
134
|
+
value: value,
|
|
135
|
+
formattedValue: formattedValue,
|
|
136
|
+
rendered: formattedValue,
|
|
137
|
+
style: style,
|
|
138
|
+
className: null
|
|
139
|
+
};
|
|
140
|
+
}
|
|
141
|
+
|
|
142
|
+
// ─── Defaults ─────────────────────────────────────────────────────────────────
|
|
143
|
+
}], [{
|
|
144
|
+
key: "defaultValueGetter",
|
|
145
|
+
value: function defaultValueGetter(_ref) {
|
|
146
|
+
var aggregator = _ref.aggregator;
|
|
147
|
+
return aggregator.value();
|
|
148
|
+
}
|
|
149
|
+
}, {
|
|
150
|
+
key: "defaultValueFormatter",
|
|
151
|
+
value: function defaultValueFormatter(_ref2) {
|
|
152
|
+
var value = _ref2.value,
|
|
153
|
+
aggregator = _ref2.aggregator;
|
|
154
|
+
return aggregator.format(value);
|
|
155
|
+
}
|
|
156
|
+
|
|
157
|
+
/**
|
|
158
|
+
* Crear un pipeline con defaults (backward compatible, no cambia nada).
|
|
159
|
+
*/
|
|
160
|
+
}, {
|
|
161
|
+
key: "default",
|
|
162
|
+
value: function _default() {
|
|
163
|
+
return new CellPipeline();
|
|
164
|
+
}
|
|
165
|
+
}]);
|
|
166
|
+
}();
|
|
167
|
+
//# sourceMappingURL=CellPipeline.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"CellPipeline.js","names":["CellPipeline","exports","config","arguments","length","undefined","_classCallCheck","valueGetter","defaultValueGetter","valueFormatter","defaultValueFormatter","cellRenderer","cellStyle","cellClass","_createClass","key","value","process","params","aggregator","rowKey","colKey","pivotData","formattedValue","rendered","style","className","processTotal","_params$rowKey","_params$colKey","_params$type","type","format","isTotal","totalType","_ref","_ref2","default"],"sources":["../../src/core/CellPipeline.js"],"sourcesContent":["/**\n * CellPipeline — Pipeline de renderizado de celdas.\n *\n * Cada celda pasa por: valueGetter → valueFormatter → cellRenderer → cellStyle\n *\n * Uso:\n * const pipeline = new CellPipeline({\n * valueFormatter: ({ value }) => `$${value.toFixed(2)}`,\n * cellStyle: ({ value }) => value < 0 ? { color: 'red' } : null,\n * });\n *\n * const result = pipeline.process({ aggregator, rowKey, colKey, pivotData });\n * // → { value, formattedValue, rendered, style, className }\n */\nexport class CellPipeline {\n constructor(config = {}) {\n this.valueGetter = config.valueGetter || CellPipeline.defaultValueGetter;\n this.valueFormatter = config.valueFormatter || CellPipeline.defaultValueFormatter;\n this.cellRenderer = config.cellRenderer || null;\n this.cellStyle = config.cellStyle || null;\n this.cellClass = config.cellClass || null;\n }\n\n /**\n * Procesar una celda a través del pipeline completo.\n * @param {Object} params\n * @param {Object} params.aggregator - El aggregator de PivotData\n * @param {Array} params.rowKey - Clave de la fila\n * @param {Array} params.colKey - Clave de la columna\n * @param {Object} [params.pivotData] - Instancia de PivotData (opcional)\n * @returns {{ value, formattedValue, rendered, style, className }}\n */\n process(params) {\n const { aggregator, rowKey, colKey, pivotData } = params;\n\n // 1. Value Getter\n const value = this.valueGetter({ aggregator, rowKey, colKey, pivotData });\n\n // 2. Value Formatter\n const formattedValue = this.valueFormatter({\n value,\n aggregator,\n rowKey,\n colKey,\n pivotData,\n });\n\n // 3. Cell Renderer (optional — if not set, use formattedValue)\n const rendered = this.cellRenderer\n ? this.cellRenderer({\n value,\n formattedValue,\n aggregator,\n rowKey,\n colKey,\n pivotData,\n })\n : formattedValue;\n\n // 4. Cell Style (optional)\n const style = this.cellStyle\n ? this.cellStyle({ value, formattedValue, rowKey, colKey, pivotData })\n : null;\n\n // 5. Cell Class (optional)\n const className = this.cellClass\n ? this.cellClass({ value, formattedValue, rowKey, colKey, pivotData })\n : null;\n\n return { value, formattedValue, rendered, style, className };\n }\n\n /**\n * Procesar una celda de total (fila o columna).\n */\n processTotal(params) {\n const { aggregator, rowKey = [], colKey = [], pivotData, type = 'row' } = params;\n const value = aggregator.value();\n const formattedValue = aggregator.format(value);\n\n const style = this.cellStyle\n ? this.cellStyle({ value, formattedValue, rowKey, colKey, pivotData, isTotal: true, totalType: type })\n : null;\n\n return { value, formattedValue, rendered: formattedValue, style, className: null };\n }\n\n // ─── Defaults ─────────────────────────────────────────────────────────────────\n\n static defaultValueGetter({ aggregator }) {\n return aggregator.value();\n }\n\n static defaultValueFormatter({ value, aggregator }) {\n return aggregator.format(value);\n }\n\n /**\n * Crear un pipeline con defaults (backward compatible, no cambia nada).\n */\n static default() {\n return new CellPipeline();\n }\n}\n"],"mappings":";;;;;;;;;;;;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAbA,IAcaA,YAAY,GAAAC,OAAA,CAAAD,Y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
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.ColumnEngine = exports.COLUMN_DEF_DEFAULTS = void 0;
|
|
7
|
+
function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
|
|
8
|
+
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
9
|
+
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
10
|
+
function _defineProperty(e, r, t) { return (r = _toPropertyKey(r)) in e ? Object.defineProperty(e, r, { value: t, enumerable: !0, configurable: !0, writable: !0 }) : e[r] = t, e; }
|
|
11
|
+
function _createForOfIteratorHelper(r, e) { var t = "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (!t) { if (Array.isArray(r) || (t = _unsupportedIterableToArray(r)) || e && r && "number" == typeof r.length) { t && (r = t); var _n = 0, F = function F() {}; return { s: F, n: function n() { return _n >= r.length ? { done: !0 } : { done: !1, value: r[_n++] }; }, e: function e(r) { throw r; }, f: F }; } throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } var o, a = !0, u = !1; return { s: function s() { t = t.call(r); }, n: function n() { var r = t.next(); return a = r.done, r; }, e: function e(r) { u = !0, o = r; }, f: function f() { try { a || null == t["return"] || t["return"](); } finally { if (u) throw o; } } }; }
|
|
12
|
+
function _unsupportedIterableToArray(r, a) { if (r) { if ("string" == typeof r) return _arrayLikeToArray(r, a); var t = {}.toString.call(r).slice(8, -1); return "Object" === t && r.constructor && (t = r.constructor.name), "Map" === t || "Set" === t ? Array.from(r) : "Arguments" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? _arrayLikeToArray(r, a) : void 0; } }
|
|
13
|
+
function _arrayLikeToArray(r, a) { (null == a || a > r.length) && (a = r.length); for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e]; return n; }
|
|
14
|
+
function _classCallCheck(a, n) { if (!(a instanceof n)) throw new TypeError("Cannot call a class as a function"); }
|
|
15
|
+
function _defineProperties(e, r) { for (var t = 0; t < r.length; t++) { var o = r[t]; o.enumerable = o.enumerable || !1, o.configurable = !0, "value" in o && (o.writable = !0), Object.defineProperty(e, _toPropertyKey(o.key), o); } }
|
|
16
|
+
function _createClass(e, r, t) { return r && _defineProperties(e.prototype, r), t && _defineProperties(e, t), Object.defineProperty(e, "prototype", { writable: !1 }), e; }
|
|
17
|
+
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; }
|
|
18
|
+
function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
|
|
19
|
+
/**
|
|
20
|
+
* ColumnEngine — Motor de columnas para pivot tables.
|
|
21
|
+
*
|
|
22
|
+
* En una pivot table, las "columnas" no son estáticas como en AG Grid.
|
|
23
|
+
* Son generadas dinámicamente de las combinaciones de datos.
|
|
24
|
+
* ColumnDef aquí define cómo se comporta cada ATRIBUTO del dataset
|
|
25
|
+
* cuando aparece como columna, fila, o filtro.
|
|
26
|
+
*
|
|
27
|
+
* Uso:
|
|
28
|
+
* const engine = new ColumnEngine([
|
|
29
|
+
* { field: 'Country', headerName: 'País', sortable: true, filterable: true, width: 120 },
|
|
30
|
+
* { field: 'Year', sortable: true, pinned: 'left' },
|
|
31
|
+
* { field: 'Sales', headerName: 'Ventas', valueFormatter: v => `$${v}`, width: 100 },
|
|
32
|
+
* ]);
|
|
33
|
+
*/
|
|
34
|
+
|
|
35
|
+
// Defaults para ColumnDef
|
|
36
|
+
var COLUMN_DEF_DEFAULTS = exports.COLUMN_DEF_DEFAULTS = {
|
|
37
|
+
headerName: null,
|
|
38
|
+
// null = usar field name
|
|
39
|
+
sortable: true,
|
|
40
|
+
filterable: true,
|
|
41
|
+
width: null,
|
|
42
|
+
// null = auto
|
|
43
|
+
minWidth: 50,
|
|
44
|
+
maxWidth: null,
|
|
45
|
+
flex: null,
|
|
46
|
+
// null = no flex
|
|
47
|
+
pinned: null,
|
|
48
|
+
// 'left' | 'right' | null
|
|
49
|
+
hide: false,
|
|
50
|
+
lockPosition: false,
|
|
51
|
+
// true = no se puede reordenar
|
|
52
|
+
lockVisible: false,
|
|
53
|
+
// true = no se puede ocultar
|
|
54
|
+
cellRenderer: null,
|
|
55
|
+
// Custom render function for cells of this attribute
|
|
56
|
+
valueFormatter: null,
|
|
57
|
+
// Custom format function
|
|
58
|
+
cellStyle: null,
|
|
59
|
+
// Dynamic cell style
|
|
60
|
+
cellClass: null,
|
|
61
|
+
// Dynamic cell class
|
|
62
|
+
headerClass: null,
|
|
63
|
+
// CSS class for header
|
|
64
|
+
tooltipField: null,
|
|
65
|
+
// Field to show as tooltip
|
|
66
|
+
suppressMenu: false,
|
|
67
|
+
// true = no mostrar menú de filtro
|
|
68
|
+
// Pivot-specific:
|
|
69
|
+
allowAsDimension: true,
|
|
70
|
+
// Puede ser fila o columna
|
|
71
|
+
allowAsValue: true,
|
|
72
|
+
// Puede ser valor (aggregator)
|
|
73
|
+
defaultZone: null // 'row' | 'col' | 'val' | 'unused'
|
|
74
|
+
};
|
|
75
|
+
var ColumnEngine = exports.ColumnEngine = /*#__PURE__*/function () {
|
|
76
|
+
function ColumnEngine() {
|
|
77
|
+
var columnDefs = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : [];
|
|
78
|
+
_classCallCheck(this, ColumnEngine);
|
|
79
|
+
this._columns = new Map();
|
|
80
|
+
this._order = []; // field names en orden
|
|
81
|
+
var _iterator = _createForOfIteratorHelper(columnDefs),
|
|
82
|
+
_step;
|
|
83
|
+
try {
|
|
84
|
+
for (_iterator.s(); !(_step = _iterator.n()).done;) {
|
|
85
|
+
var def = _step.value;
|
|
86
|
+
this.addColumn(def);
|
|
87
|
+
}
|
|
88
|
+
} catch (err) {
|
|
89
|
+
_iterator.e(err);
|
|
90
|
+
} finally {
|
|
91
|
+
_iterator.f();
|
|
92
|
+
}
|
|
93
|
+
}
|
|
94
|
+
|
|
95
|
+
/**
|
|
96
|
+
* Agregar o actualizar una definición de columna.
|
|
97
|
+
*/
|
|
98
|
+
return _createClass(ColumnEngine, [{
|
|
99
|
+
key: "addColumn",
|
|
100
|
+
value: function addColumn(def) {
|
|
101
|
+
if (!def.field) {
|
|
102
|
+
throw new Error('[ColumnEngine] ColumnDef must have a "field" property.');
|
|
103
|
+
}
|
|
104
|
+
var merged = _objectSpread(_objectSpread({}, COLUMN_DEF_DEFAULTS), def);
|
|
105
|
+
if (!merged.headerName) merged.headerName = merged.field;
|
|
106
|
+
this._columns.set(def.field, merged);
|
|
107
|
+
if (!this._order.includes(def.field)) {
|
|
108
|
+
this._order.push(def.field);
|
|
109
|
+
}
|
|
110
|
+
}
|
|
111
|
+
|
|
112
|
+
/**
|
|
113
|
+
* Setear todas las definiciones de columna (reemplaza existentes).
|
|
114
|
+
*/
|
|
115
|
+
}, {
|
|
116
|
+
key: "setColumnDefs",
|
|
117
|
+
value: function setColumnDefs(defs) {
|
|
118
|
+
this._columns.clear();
|
|
119
|
+
this._order = [];
|
|
120
|
+
var _iterator2 = _createForOfIteratorHelper(defs),
|
|
121
|
+
_step2;
|
|
122
|
+
try {
|
|
123
|
+
for (_iterator2.s(); !(_step2 = _iterator2.n()).done;) {
|
|
124
|
+
var def = _step2.value;
|
|
125
|
+
this.addColumn(def);
|
|
126
|
+
}
|
|
127
|
+
} catch (err) {
|
|
128
|
+
_iterator2.e(err);
|
|
129
|
+
} finally {
|
|
130
|
+
_iterator2.f();
|
|
131
|
+
}
|
|
132
|
+
}
|
|
133
|
+
|
|
134
|
+
/**
|
|
135
|
+
* Obtener definición de columna por field.
|
|
136
|
+
*/
|
|
137
|
+
}, {
|
|
138
|
+
key: "getColumn",
|
|
139
|
+
value: function getColumn(field) {
|
|
140
|
+
return this._columns.get(field) || null;
|
|
141
|
+
}
|
|
142
|
+
|
|
143
|
+
/**
|
|
144
|
+
* Obtener todas las definiciones.
|
|
145
|
+
*/
|
|
146
|
+
}, {
|
|
147
|
+
key: "getColumnDefs",
|
|
148
|
+
value: function getColumnDefs() {
|
|
149
|
+
var _this = this;
|
|
150
|
+
return this._order.map(function (field) {
|
|
151
|
+
return _this._columns.get(field);
|
|
152
|
+
});
|
|
153
|
+
}
|
|
154
|
+
|
|
155
|
+
/**
|
|
156
|
+
* Obtener solo definiciones visibles.
|
|
157
|
+
*/
|
|
158
|
+
}, {
|
|
159
|
+
key: "getVisibleColumns",
|
|
160
|
+
value: function getVisibleColumns() {
|
|
161
|
+
return this.getColumnDefs().filter(function (col) {
|
|
162
|
+
return !col.hide;
|
|
163
|
+
});
|
|
164
|
+
}
|
|
165
|
+
|
|
166
|
+
/**
|
|
167
|
+
* Obtener definición o un default genérico para campos sin ColumnDef.
|
|
168
|
+
*/
|
|
169
|
+
}, {
|
|
170
|
+
key: "getColumnOrDefault",
|
|
171
|
+
value: function getColumnOrDefault(field) {
|
|
172
|
+
return this._columns.get(field) || _objectSpread(_objectSpread({}, COLUMN_DEF_DEFAULTS), {}, {
|
|
173
|
+
field: field,
|
|
174
|
+
headerName: field
|
|
175
|
+
});
|
|
176
|
+
}
|
|
177
|
+
|
|
178
|
+
/**
|
|
179
|
+
* Mover columna de posición.
|
|
180
|
+
*/
|
|
181
|
+
}, {
|
|
182
|
+
key: "moveColumn",
|
|
183
|
+
value: function moveColumn(fromField, toIndex) {
|
|
184
|
+
var fromIndex = this._order.indexOf(fromField);
|
|
185
|
+
if (fromIndex === -1) return;
|
|
186
|
+
this._order.splice(fromIndex, 1);
|
|
187
|
+
this._order.splice(toIndex, 0, fromField);
|
|
188
|
+
}
|
|
189
|
+
|
|
190
|
+
/**
|
|
191
|
+
* Setear visibilidad de una columna.
|
|
192
|
+
*/
|
|
193
|
+
}, {
|
|
194
|
+
key: "setColumnVisible",
|
|
195
|
+
value: function setColumnVisible(field, visible) {
|
|
196
|
+
var col = this._columns.get(field);
|
|
197
|
+
if (col && !col.lockVisible) {
|
|
198
|
+
col.hide = !visible;
|
|
199
|
+
}
|
|
200
|
+
}
|
|
201
|
+
|
|
202
|
+
/**
|
|
203
|
+
* Setear ancho de una columna.
|
|
204
|
+
*/
|
|
205
|
+
}, {
|
|
206
|
+
key: "setColumnWidth",
|
|
207
|
+
value: function setColumnWidth(field, width) {
|
|
208
|
+
var col = this._columns.get(field);
|
|
209
|
+
if (col) {
|
|
210
|
+
col.width = Math.max(col.minWidth, col.maxWidth ? Math.min(width, col.maxWidth) : width);
|
|
211
|
+
}
|
|
212
|
+
}
|
|
213
|
+
|
|
214
|
+
/**
|
|
215
|
+
* Auto-size columnas (placeholder — necesita integración con DOM).
|
|
216
|
+
*/
|
|
217
|
+
}, {
|
|
218
|
+
key: "autoSizeColumns",
|
|
219
|
+
value: function autoSizeColumns() {
|
|
220
|
+
var fields = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : null;
|
|
221
|
+
var targets = fields || this._order;
|
|
222
|
+
var _iterator3 = _createForOfIteratorHelper(targets),
|
|
223
|
+
_step3;
|
|
224
|
+
try {
|
|
225
|
+
for (_iterator3.s(); !(_step3 = _iterator3.n()).done;) {
|
|
226
|
+
var field = _step3.value;
|
|
227
|
+
var col = this._columns.get(field);
|
|
228
|
+
if (col) {
|
|
229
|
+
col.width = null; // Reset to auto
|
|
230
|
+
}
|
|
231
|
+
}
|
|
232
|
+
} catch (err) {
|
|
233
|
+
_iterator3.e(err);
|
|
234
|
+
} finally {
|
|
235
|
+
_iterator3.f();
|
|
236
|
+
}
|
|
237
|
+
}
|
|
238
|
+
|
|
239
|
+
/**
|
|
240
|
+
* Setear pin de columna.
|
|
241
|
+
*/
|
|
242
|
+
}, {
|
|
243
|
+
key: "setColumnPinned",
|
|
244
|
+
value: function setColumnPinned(field, pinned) {
|
|
245
|
+
var col = this._columns.get(field);
|
|
246
|
+
if (col && !col.lockPosition) {
|
|
247
|
+
col.pinned = pinned; // 'left' | 'right' | null
|
|
248
|
+
}
|
|
249
|
+
}
|
|
250
|
+
|
|
251
|
+
/**
|
|
252
|
+
* Obtener columnas que pueden ser dimensiones (filas/cols).
|
|
253
|
+
*/
|
|
254
|
+
}, {
|
|
255
|
+
key: "getDimensionColumns",
|
|
256
|
+
value: function getDimensionColumns() {
|
|
257
|
+
return this.getColumnDefs().filter(function (col) {
|
|
258
|
+
return col.allowAsDimension;
|
|
259
|
+
});
|
|
260
|
+
}
|
|
261
|
+
|
|
262
|
+
/**
|
|
263
|
+
* Obtener columnas que pueden ser valores (aggregator).
|
|
264
|
+
*/
|
|
265
|
+
}, {
|
|
266
|
+
key: "getValueColumns",
|
|
267
|
+
value: function getValueColumns() {
|
|
268
|
+
return this.getColumnDefs().filter(function (col) {
|
|
269
|
+
return col.allowAsValue;
|
|
270
|
+
});
|
|
271
|
+
}
|
|
272
|
+
|
|
273
|
+
/**
|
|
274
|
+
* Verificar si existe una definición para un campo.
|
|
275
|
+
*/
|
|
276
|
+
}, {
|
|
277
|
+
key: "has",
|
|
278
|
+
value: function has(field) {
|
|
279
|
+
return this._columns.has(field);
|
|
280
|
+
}
|
|
281
|
+
|
|
282
|
+
/**
|
|
283
|
+
* Obtener el cellPipeline config específico para un campo.
|
|
284
|
+
* Permite que cada columna tenga su propio cellRenderer/valueFormatter.
|
|
285
|
+
*/
|
|
286
|
+
}, {
|
|
287
|
+
key: "getCellPipelineFor",
|
|
288
|
+
value: function getCellPipelineFor(field) {
|
|
289
|
+
var col = this.getColumnOrDefault(field);
|
|
290
|
+
var config = {};
|
|
291
|
+
if (col.valueFormatter) config.valueFormatter = col.valueFormatter;
|
|
292
|
+
if (col.cellRenderer) config.cellRenderer = col.cellRenderer;
|
|
293
|
+
if (col.cellStyle) config.cellStyle = col.cellStyle;
|
|
294
|
+
if (col.cellClass) config.cellClass = col.cellClass;
|
|
295
|
+
return Object.keys(config).length > 0 ? config : null;
|
|
296
|
+
}
|
|
297
|
+
}]);
|
|
298
|
+
}();
|
|
299
|
+
//# sourceMappingURL=ColumnEngine.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ColumnEngine.js","names":["COLUMN_DEF_DEFAULTS","exports","headerName","sortable","filterable","width","minWidth","maxWidth","flex","pinned","hide","lockPosition","lockVisible","cellRenderer","valueFormatter","cellStyle","cellClass","headerClass","tooltipField","suppressMenu","allowAsDimension","allowAsValue","defaultZone","ColumnEngine","columnDefs","arguments","length","undefined","_classCallCheck","_columns","Map","_order","_iterator","_createForOfIteratorHelper","_step","s","n","done","def","value","addColumn","err","e","f","_createClass","key","field","Error","merged","_objectSpread","set","includes","push","setColumnDefs","defs","clear","_iterator2","_step2","getColumn","get","getColumnDefs","_this","map","getVisibleColumns","filter","col","getColumnOrDefault","moveColumn","fromField","toIndex","fromIndex","indexOf","splice","setColumnVisible","visible","setColumnWidth","Math","max","min","autoSizeColumns","fields","targets","_iterator3","_step3","setColumnPinned","getDimensionColumns","getValueColumns","has","getCellPipelineFor","config","Object","keys"],"sources":["../../src/core/ColumnEngine.js"],"sourcesContent":["/**\n * ColumnEngine — Motor de columnas para pivot tables.\n *\n * En una pivot table, las \"columnas\" no son estáticas como en AG Grid.\n * Son generadas dinámicamente de las combinaciones de datos.\n * ColumnDef aquí define cómo se comporta cada ATRIBUTO del dataset\n * cuando aparece como columna, fila, o filtro.\n *\n * Uso:\n * const engine = new ColumnEngine([\n * { field: 'Country', headerName: 'País', sortable: true, filterable: true, width: 120 },\n * { field: 'Year', sortable: true, pinned: 'left' },\n * { field: 'Sales', headerName: 'Ventas', valueFormatter: v => `$${v}`, width: 100 },\n * ]);\n */\n\n// Defaults para ColumnDef\nconst COLUMN_DEF_DEFAULTS = {\n headerName: null, // null = usar field name\n sortable: true,\n filterable: true,\n width: null, // null = auto\n minWidth: 50,\n maxWidth: null,\n flex: null, // null = no flex\n pinned: null, // 'left' | 'right' | null\n hide: false,\n lockPosition: false, // true = no se puede reordenar\n lockVisible: false, // true = no se puede ocultar\n cellRenderer: null, // Custom render function for cells of this attribute\n valueFormatter: null, // Custom format function\n cellStyle: null, // Dynamic cell style\n cellClass: null, // Dynamic cell class\n headerClass: null, // CSS class for header\n tooltipField: null, // Field to show as tooltip\n suppressMenu: false, // true = no mostrar menú de filtro\n // Pivot-specific:\n allowAsDimension: true, // Puede ser fila o columna\n allowAsValue: true, // Puede ser valor (aggregator)\n defaultZone: null, // 'row' | 'col' | 'val' | 'unused'\n};\n\nexport class ColumnEngine {\n constructor(columnDefs = []) {\n this._columns = new Map();\n this._order = []; // field names en orden\n\n for (const def of columnDefs) {\n this.addColumn(def);\n }\n }\n\n /**\n * Agregar o actualizar una definición de columna.\n */\n addColumn(def) {\n if (!def.field) {\n throw new Error('[ColumnEngine] ColumnDef must have a \"field\" property.');\n }\n const merged = { ...COLUMN_DEF_DEFAULTS, ...def };\n if (!merged.headerName) merged.headerName = merged.field;\n this._columns.set(def.field, merged);\n if (!this._order.includes(def.field)) {\n this._order.push(def.field);\n }\n }\n\n /**\n * Setear todas las definiciones de columna (reemplaza existentes).\n */\n setColumnDefs(defs) {\n this._columns.clear();\n this._order = [];\n for (const def of defs) {\n this.addColumn(def);\n }\n }\n\n /**\n * Obtener definición de columna por field.\n */\n getColumn(field) {\n return this._columns.get(field) || null;\n }\n\n /**\n * Obtener todas las definiciones.\n */\n getColumnDefs() {\n return this._order.map(field => this._columns.get(field));\n }\n\n /**\n * Obtener solo definiciones visibles.\n */\n getVisibleColumns() {\n return this.getColumnDefs().filter(col => !col.hide);\n }\n\n /**\n * Obtener definición o un default genérico para campos sin ColumnDef.\n */\n getColumnOrDefault(field) {\n return this._columns.get(field) || { ...COLUMN_DEF_DEFAULTS, field, headerName: field };\n }\n\n /**\n * Mover columna de posición.\n */\n moveColumn(fromField, toIndex) {\n const fromIndex = this._order.indexOf(fromField);\n if (fromIndex === -1) return;\n this._order.splice(fromIndex, 1);\n this._order.splice(toIndex, 0, fromField);\n }\n\n /**\n * Setear visibilidad de una columna.\n */\n setColumnVisible(field, visible) {\n const col = this._columns.get(field);\n if (col && !col.lockVisible) {\n col.hide = !visible;\n }\n }\n\n /**\n * Setear ancho de una columna.\n */\n setColumnWidth(field, width) {\n const col = this._columns.get(field);\n if (col) {\n col.width = Math.max(col.minWidth, col.maxWidth ? Math.min(width, col.maxWidth) : width);\n }\n }\n\n /**\n * Auto-size columnas (placeholder — necesita integración con DOM).\n */\n autoSizeColumns(fields = null) {\n const targets = fields || this._order;\n for (const field of targets) {\n const col = this._columns.get(field);\n if (col) {\n col.width = null; // Reset to auto\n }\n }\n }\n\n /**\n * Setear pin de columna.\n */\n setColumnPinned(field, pinned) {\n const col = this._columns.get(field);\n if (col && !col.lockPosition) {\n col.pinned = pinned; // 'left' | 'right' | null\n }\n }\n\n /**\n * Obtener columnas que pueden ser dimensiones (filas/cols).\n */\n getDimensionColumns() {\n return this.getColumnDefs().filter(col => col.allowAsDimension);\n }\n\n /**\n * Obtener columnas que pueden ser valores (aggregator).\n */\n getValueColumns() {\n return this.getColumnDefs().filter(col => col.allowAsValue);\n }\n\n /**\n * Verificar si existe una definición para un campo.\n */\n has(field) {\n return this._columns.has(field);\n }\n\n /**\n * Obtener el cellPipeline config específico para un campo.\n * Permite que cada columna tenga su propio cellRenderer/valueFormatter.\n */\n getCellPipelineFor(field) {\n const col = this.getColumnOrDefault(field);\n const config = {};\n if (col.valueFormatter) config.valueFormatter = col.valueFormatter;\n if (col.cellRenderer) config.cellRenderer = col.cellRenderer;\n if (col.cellStyle) config.cellStyle = col.cellStyle;\n if (col.cellClass) config.cellClass = col.cellClass;\n return Object.keys(config).length > 0 ? config : null;\n }\n}\n\nexport { COLUMN_DEF_DEFAULTS };\n"],"mappings":";;;;;;;;;;;;;;;;;;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,IAAMA,mBAAmB,GAAAC,OAAA,CAAAD,mBAAA,GAAG;EACxBE,UAAU,EAAE,IAAI;EAAO;EACvBC,QAAQ,EAAE,IAAI;EACdC,UAAU,EAAE,IAAI;EAChBC,KAAK,EAAE,IAAI;EAAY;EACvBC,QAAQ,EAAE,EAAE;EACZC,QAAQ,EAAE,IAAI;EACdC,IAAI,EAAE,IAAI;EAAa;EACvBC,MAAM,EAAE,IAAI;EAAW;EACvBC,IAAI,EAAE,KAAK;EACXC,YAAY,EAAE,KAAK;EAAI;EACvBC,WAAW,EAAE,KAAK;EAAK;EACvBC,YAAY,EAAE,IAAI;EAAK;EACvBC,cAAc,EAAE,IAAI;EAAG;EACvBC,SAAS,EAAE,IAAI;EAAQ;EACvBC,SAAS,EAAE,IAAI;EAAQ;EACvBC,WAAW,EAAE,IAAI;EAAM;EACvBC,YAAY,EAAE,IAAI;EAAK;EACvBC,YAAY,EAAE,KAAK;EAAI;EACvB;EACAC,gBAAgB,EAAE,IAAI;EAAG;EACzBC,YAAY,EAAE,IAAI;EAAO;EACzBC,WAAW,EAAE,IAAI,CAAQ;AAC7B,CAAC;AAAC,IAEWC,YAAY,GAAAtB,OAAA,CAAAsB,YAAA;EACrB,SAAAA,aAAA,EAA6B;IAAA,IAAjBC,UAAU,GAAAC,SA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
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.EventBus = void 0;
|
|
7
|
+
function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
|
|
8
|
+
function _createForOfIteratorHelper(r, e) { var t = "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (!t) { if (Array.isArray(r) || (t = _unsupportedIterableToArray(r)) || e && r && "number" == typeof r.length) { t && (r = t); var _n = 0, F = function F() {}; return { s: F, n: function n() { return _n >= r.length ? { done: !0 } : { done: !1, value: r[_n++] }; }, e: function e(r) { throw r; }, f: F }; } throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } var o, a = !0, u = !1; return { s: function s() { t = t.call(r); }, n: function n() { var r = t.next(); return a = r.done, r; }, e: function e(r) { u = !0, o = r; }, f: function f() { try { a || null == t["return"] || t["return"](); } finally { if (u) throw o; } } }; }
|
|
9
|
+
function _unsupportedIterableToArray(r, a) { if (r) { if ("string" == typeof r) return _arrayLikeToArray(r, a); var t = {}.toString.call(r).slice(8, -1); return "Object" === t && r.constructor && (t = r.constructor.name), "Map" === t || "Set" === t ? Array.from(r) : "Arguments" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? _arrayLikeToArray(r, a) : void 0; } }
|
|
10
|
+
function _arrayLikeToArray(r, a) { (null == a || a > r.length) && (a = r.length); for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e]; return n; }
|
|
11
|
+
function _classCallCheck(a, n) { if (!(a instanceof n)) throw new TypeError("Cannot call a class as a function"); }
|
|
12
|
+
function _defineProperties(e, r) { for (var t = 0; t < r.length; t++) { var o = r[t]; o.enumerable = o.enumerable || !1, o.configurable = !0, "value" in o && (o.writable = !0), Object.defineProperty(e, _toPropertyKey(o.key), o); } }
|
|
13
|
+
function _createClass(e, r, t) { return r && _defineProperties(e.prototype, r), t && _defineProperties(e, t), Object.defineProperty(e, "prototype", { writable: !1 }), e; }
|
|
14
|
+
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; }
|
|
15
|
+
function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
|
|
16
|
+
/**
|
|
17
|
+
* EventBus — Sistema de eventos con nombre para el Headless Core.
|
|
18
|
+
* Permite suscribirse a eventos específicos (filterChanged, sortChanged, etc.)
|
|
19
|
+
* y también a un evento genérico 'stateChanged' para re-renders de React.
|
|
20
|
+
*/
|
|
21
|
+
var EventBus = exports.EventBus = /*#__PURE__*/function () {
|
|
22
|
+
function EventBus() {
|
|
23
|
+
_classCallCheck(this, EventBus);
|
|
24
|
+
this._listeners = {};
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
/**
|
|
28
|
+
* Suscribirse a un evento.
|
|
29
|
+
* @param {string} event - Nombre del evento (e.g. 'filterChanged', 'stateChanged')
|
|
30
|
+
* @param {Function} callback - Función a ejecutar
|
|
31
|
+
* @returns {Function} Función para desuscribirse
|
|
32
|
+
*/
|
|
33
|
+
return _createClass(EventBus, [{
|
|
34
|
+
key: "on",
|
|
35
|
+
value: function on(event, callback) {
|
|
36
|
+
var _this = this;
|
|
37
|
+
if (!this._listeners[event]) {
|
|
38
|
+
this._listeners[event] = new Set();
|
|
39
|
+
}
|
|
40
|
+
this._listeners[event].add(callback);
|
|
41
|
+
return function () {
|
|
42
|
+
return _this.off(event, callback);
|
|
43
|
+
};
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
/**
|
|
47
|
+
* Desuscribirse de un evento.
|
|
48
|
+
*/
|
|
49
|
+
}, {
|
|
50
|
+
key: "off",
|
|
51
|
+
value: function off(event, callback) {
|
|
52
|
+
if (this._listeners[event]) {
|
|
53
|
+
this._listeners[event]["delete"](callback);
|
|
54
|
+
}
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
/**
|
|
58
|
+
* Emitir un evento a todos los suscriptores.
|
|
59
|
+
* @param {string} event - Nombre del evento
|
|
60
|
+
* @param {*} payload - Datos del evento
|
|
61
|
+
*/
|
|
62
|
+
}, {
|
|
63
|
+
key: "emit",
|
|
64
|
+
value: function emit(event, payload) {
|
|
65
|
+
if (this._listeners[event]) {
|
|
66
|
+
var _iterator = _createForOfIteratorHelper(this._listeners[event]),
|
|
67
|
+
_step;
|
|
68
|
+
try {
|
|
69
|
+
for (_iterator.s(); !(_step = _iterator.n()).done;) {
|
|
70
|
+
var cb = _step.value;
|
|
71
|
+
try {
|
|
72
|
+
cb(payload);
|
|
73
|
+
} catch (e) {
|
|
74
|
+
console.error("[EventBus] Error in listener for \"".concat(event, "\":"), e);
|
|
75
|
+
}
|
|
76
|
+
}
|
|
77
|
+
} catch (err) {
|
|
78
|
+
_iterator.e(err);
|
|
79
|
+
} finally {
|
|
80
|
+
_iterator.f();
|
|
81
|
+
}
|
|
82
|
+
}
|
|
83
|
+
}
|
|
84
|
+
|
|
85
|
+
/**
|
|
86
|
+
* Suscribirse a un evento una sola vez.
|
|
87
|
+
*/
|
|
88
|
+
}, {
|
|
89
|
+
key: "once",
|
|
90
|
+
value: function once(event, callback) {
|
|
91
|
+
var _this2 = this;
|
|
92
|
+
var _wrappedCb = function wrappedCb(payload) {
|
|
93
|
+
_this2.off(event, _wrappedCb);
|
|
94
|
+
callback(payload);
|
|
95
|
+
};
|
|
96
|
+
return this.on(event, _wrappedCb);
|
|
97
|
+
}
|
|
98
|
+
|
|
99
|
+
/**
|
|
100
|
+
* Eliminar todos los listeners.
|
|
101
|
+
*/
|
|
102
|
+
}, {
|
|
103
|
+
key: "destroy",
|
|
104
|
+
value: function destroy() {
|
|
105
|
+
this._listeners = {};
|
|
106
|
+
}
|
|
107
|
+
}]);
|
|
108
|
+
}();
|
|
109
|
+
//# sourceMappingURL=EventBus.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"EventBus.js","names":["EventBus","exports","_classCallCheck","_listeners","_createClass","key","value","on","event","callback","_this","Set","add","off","emit","payload","_iterator","_createForOfIteratorHelper","_step","s","n","done","cb","e","console","error","concat","err","f","once","_this2","wrappedCb","destroy"],"sources":["../../src/core/EventBus.js"],"sourcesContent":["/**\n * EventBus — Sistema de eventos con nombre para el Headless Core.\n * Permite suscribirse a eventos específicos (filterChanged, sortChanged, etc.)\n * y también a un evento genérico 'stateChanged' para re-renders de React.\n */\nexport class EventBus {\n constructor() {\n this._listeners = {};\n }\n\n /**\n * Suscribirse a un evento.\n * @param {string} event - Nombre del evento (e.g. 'filterChanged', 'stateChanged')\n * @param {Function} callback - Función a ejecutar\n * @returns {Function} Función para desuscribirse\n */\n on(event, callback) {\n if (!this._listeners[event]) {\n this._listeners[event] = new Set();\n }\n this._listeners[event].add(callback);\n return () => this.off(event, callback);\n }\n\n /**\n * Desuscribirse de un evento.\n */\n off(event, callback) {\n if (this._listeners[event]) {\n this._listeners[event].delete(callback);\n }\n }\n\n /**\n * Emitir un evento a todos los suscriptores.\n * @param {string} event - Nombre del evento\n * @param {*} payload - Datos del evento\n */\n emit(event, payload) {\n if (this._listeners[event]) {\n for (const cb of this._listeners[event]) {\n try {\n cb(payload);\n } catch (e) {\n console.error(`[EventBus] Error in listener for \"${event}\":`, e);\n }\n }\n }\n }\n\n /**\n * Suscribirse a un evento una sola vez.\n */\n once(event, callback) {\n const wrappedCb = (payload) => {\n this.off(event, wrappedCb);\n callback(payload);\n };\n return this.on(event, wrappedCb);\n }\n\n /**\n * Eliminar todos los listeners.\n */\n destroy() {\n this._listeners = {};\n }\n}\n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