@smallwebco/tinypivot-react 1.0.25 → 1.0.26

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/index.cjs CHANGED
@@ -1209,7 +1209,6 @@ function PivotConfig({
1209
1209
  onRemoveCalculatedField,
1210
1210
  onUpdateCalculatedField
1211
1211
  }) {
1212
- const { showWatermark } = useLicense();
1213
1212
  const [fieldSearch, setFieldSearch] = (0, import_react7.useState)("");
1214
1213
  const [showCalcModal, setShowCalcModal] = (0, import_react7.useState)(false);
1215
1214
  const [editingCalcField, setEditingCalcField] = (0, import_react7.useState)(null);
@@ -1548,7 +1547,6 @@ function PivotConfig({
1548
1547
  /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("span", { children: "+ Calc" })
1549
1548
  ] })
1550
1549
  ] }),
1551
- showWatermark && /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("div", { className: "vpg-watermark", children: /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("a", { href: "https://tiny-pivot.com", target: "_blank", rel: "noopener noreferrer", children: "TinyPivot" }) }),
1552
1550
  /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
1553
1551
  CalculatedFieldModal,
1554
1552
  {
@@ -2212,6 +2210,7 @@ function DataGrid({
2212
2210
  valueFields: pivotValueFields,
2213
2211
  showRowTotals: pivotShowRowTotals,
2214
2212
  showColumnTotals: pivotShowColumnTotals,
2213
+ calculatedFields: pivotCalculatedFields,
2215
2214
  availableFields: pivotAvailableFields,
2216
2215
  isConfigured: pivotIsConfigured,
2217
2216
  pivotResult,
@@ -2227,7 +2226,9 @@ function DataGrid({
2227
2226
  setShowRowTotals: setPivotShowRowTotals,
2228
2227
  setShowColumnTotals: setPivotShowColumnTotals,
2229
2228
  setRowFields,
2230
- setColumnFields
2229
+ setColumnFields,
2230
+ addCalculatedField,
2231
+ removeCalculatedField
2231
2232
  } = usePivotTable(filteredDataForPivot);
2232
2233
  const activeFilterInfo = (0, import_react9.useMemo)(() => {
2233
2234
  if (activeFilters.length === 0) return null;
@@ -3008,6 +3009,7 @@ function DataGrid({
3008
3009
  valueFields: pivotValueFields,
3009
3010
  showRowTotals: pivotShowRowTotals,
3010
3011
  showColumnTotals: pivotShowColumnTotals,
3012
+ calculatedFields: pivotCalculatedFields,
3011
3013
  onShowRowTotalsChange: setPivotShowRowTotals,
3012
3014
  onShowColumnTotalsChange: setPivotShowColumnTotals,
3013
3015
  onClearConfig: clearPivotConfig,
@@ -3020,7 +3022,10 @@ function DataGrid({
3020
3022
  onAddColumnField: addColumnField,
3021
3023
  onRemoveColumnField: removeColumnField,
3022
3024
  onAddValueField: addValueField,
3023
- onRemoveValueField: removeValueField
3025
+ onRemoveValueField: removeValueField,
3026
+ onAddCalculatedField: addCalculatedField,
3027
+ onRemoveCalculatedField: removeCalculatedField,
3028
+ onUpdateCalculatedField: addCalculatedField
3024
3029
  }
3025
3030
  ) }),
3026
3031
  /* @__PURE__ */ (0, import_jsx_runtime5.jsx)("div", { className: `vpg-pivot-main ${!showPivotConfig ? "vpg-full-width" : ""}`, children: /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(