@infinite-table/infinite-react 3.0.14 → 3.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/index.d.ts CHANGED
@@ -3010,17 +3010,18 @@ declare function interceptMap<K, V>(map: Map<K, V>, fns: InterceptedMapFns<K, V>
3010
3010
  declare type DebugLogger = {
3011
3011
  (...args: any[]): void;
3012
3012
  extend: (channelName: string) => DebugLogger;
3013
+ color: (colorName: string, ...message: string[]) => [string, string];
3013
3014
  enabled: boolean;
3014
3015
  channel: string;
3015
3016
  destroy: () => void;
3016
- log: (...args: any[]) => void;
3017
+ logFn: undefined | ((...args: any[]) => void);
3017
3018
  };
3018
3019
  declare const debug: {
3019
3020
  (channelName: string): DebugLogger;
3020
3021
  colors: string[];
3021
3022
  enable: string;
3022
3023
  diffenable: string | boolean;
3023
- log: DebugLogger['log'];
3024
+ logFn: DebugLogger['logFn'];
3024
3025
  };
3025
3026
 
3026
3027
  declare function useEffectWithChanges<T>(fn: (changes: Record<keyof T, any>, prevValues: Record<string, any>) => void | (() => void), deps: Record<keyof T, any>): void;
@@ -3033,4 +3034,4 @@ declare const components: {
3033
3034
  NumberFilterEditor: typeof NumberFilterEditor;
3034
3035
  };
3035
3036
 
3036
- export { AdvancedAlignable, CellSelectionState, ColumnTypeWithInherit, DataSource, DataSourceAction, DataSourceActionType, DataSourceAggregationReducer, DataSourceApi, DataSourceCRUDParam, DataSourceComponentActions, DataSourceContextValue, DataSourceData, DataSourceDataParams, DataSourceDataParamsChanges, DataSourceDerivedState, DataSourceFilterFunctionParam, DataSourceFilterOperator, DataSourceFilterOperatorFunction, DataSourceFilterOperatorFunctionParam, DataSourceFilterType, DataSourceFilterValueItem, DataSourceFilterValueItemValueGetter, DataSourceGroupBy, DataSourceGroupRowsList, DataSourceInsertParam, DataSourceLivePaginationCursorFn, DataSourceLivePaginationCursorParams, DataSourceLivePaginationCursorValue, DataSourceMappedState, DataSourceMappings, DataSourcePivotBy, DataSourcePropAggregationReducers, DataSourcePropCellSelection, DataSourcePropCellSelection_MultiCell, DataSourcePropCellSelection_SingleCell, DataSourcePropFilterFunction, DataSourcePropFilterTypes, DataSourcePropFilterValue, DataSourcePropGroupBy, DataSourcePropGroupRowsStateObject, DataSourcePropIsRowSelected, DataSourcePropLivePaginationCursor, DataSourcePropMultiRowSelectionChangeParamType, DataSourcePropOnCellSelectionChange, DataSourcePropOnCellSelectionChange_MultiCell, DataSourcePropOnCellSelectionChange_SingleCell, DataSourcePropOnRowSelectionChange, DataSourcePropOnRowSelectionChange_MultiRow, DataSourcePropOnRowSelectionChange_SingleRow, DataSourcePropPivotBy, DataSourcePropRowInfoReducers, DataSourcePropRowSelection, DataSourcePropRowSelection_MultiRow, DataSourcePropRowSelection_SingleRow, DataSourcePropSelectionMode, DataSourcePropSortFn, DataSourcePropSortInfo, DataSourcePropSortTypes, DataSourceProps, DataSourceRawReducer, DataSourceRemoteData, DataSourceRowInfoReducer, DataSourceSetupState, DataSourceSingleSortInfo, DataSourceSortInfo, DataSourceState, DeepMap, ElementContainerGetter, GroupRowsState, InfiniteColumnEditorContextType, InfiniteTable, InfiniteTableAction, InfiniteTableActionType, InfiniteTableApi, InfiniteTableClassName, InfiniteTableColumn, InfiniteTableColumnAggregator, InfiniteTableColumnApi, InfiniteTableColumnCellContextType, InfiniteTableColumnComparer, InfiniteTableColumnGroup, InfiniteTableColumnRenderFunctionForGroupRows, InfiniteTableColumnRenderFunctionForNormalRows, InfiniteTableColumnRenderValueParam, InfiniteTableColumnRowspanParam, InfiniteTableColumnSizingOptions, InfiniteTableColumnValueFormatterParams, InfiniteTableColumnValueGetterParams, InfiniteTableColumnsMap, InfiniteTableComponent, InfiniteTableComputedColumn, InfiniteTableComputedValues, InfiniteTableContextValue, InfiniteTableGroupColumnBase, InfiniteTableGroupColumnFunction, InfiniteTableGroupColumnGetterOptions, InfiniteTablePivotColumn, InfiniteTablePropAutoSizeColumnsKey, InfiniteTablePropColumnGroups, InfiniteTablePropColumnOrder, InfiniteTablePropColumnPinning, InfiniteTablePropColumnSizing, InfiniteTablePropColumnTypes, InfiniteTablePropColumnVisibility, InfiniteTablePropColumns, InfiniteTablePropComponents, InfiniteTablePropGetCellContextMenuItems, InfiniteTablePropGetColumnMenuItems, InfiniteTablePropGroupColumn, InfiniteTablePropGroupRenderStrategy, InfiniteTablePropHeaderOptions, InfiniteTablePropKeyboardNavigation, InfiniteTablePropMultiSortBehavior, InfiniteTablePropRowClassName, InfiniteTablePropRowStyle, InfiniteTableProps, InfiniteTableRowClassNameFn, InfiniteTableRowInfo, InfiniteTableRowStyleFn, InfiniteTableState, LazyGroupDataDeepMap, LazyGroupDataItem, LazyRowInfoGroup, Menu, MenuChildrenFnParam, MenuColumn, MenuColumnRenderParam, MenuDecoration, MenuIconProps, MenuItemDefinition, MenuItemObject, MenuProps, MenuRenderable, MenuRuntimeItem, MenuRuntimeItemSelectable, MenuSeparator, OverlayShowParams, RowSelectionState, Scrollbars, ShowOverlayFn, components, debounce, debug, defaultFilterTypes, defaultFilterTypes as filterTypes, flatten, getComponentStateRoot, group, interceptMap, multisort, useComponentState, useDataSource, useEffectWithChanges, useInfiniteColumnCell, useInfiniteColumnEditor, useInfiniteColumnFilterEditor, useInfiniteHeaderCell, useOverlay, useOverlayPortal, useRowInfoReducers };
3037
+ export { AdvancedAlignable, CellSelectionState, ColumnTypeWithInherit, DataSource, DataSourceAction, DataSourceActionType, DataSourceAggregationReducer, DataSourceApi, DataSourceCRUDParam, DataSourceComponentActions, DataSourceContextValue, DataSourceData, DataSourceDataParams, DataSourceDataParamsChanges, DataSourceDerivedState, DataSourceFilterFunctionParam, DataSourceFilterOperator, DataSourceFilterOperatorFunction, DataSourceFilterOperatorFunctionParam, DataSourceFilterType, DataSourceFilterValueItem, DataSourceFilterValueItemValueGetter, DataSourceGroupBy, DataSourceGroupRowsList, DataSourceInsertParam, DataSourceLivePaginationCursorFn, DataSourceLivePaginationCursorParams, DataSourceLivePaginationCursorValue, DataSourceMappedState, DataSourceMappings, DataSourcePivotBy, DataSourcePropAggregationReducers, DataSourcePropCellSelection, DataSourcePropCellSelection_MultiCell, DataSourcePropCellSelection_SingleCell, DataSourcePropFilterFunction, DataSourcePropFilterTypes, DataSourcePropFilterValue, DataSourcePropGroupBy, DataSourcePropGroupRowsStateObject, DataSourcePropIsRowSelected, DataSourcePropLivePaginationCursor, DataSourcePropMultiRowSelectionChangeParamType, DataSourcePropOnCellSelectionChange, DataSourcePropOnCellSelectionChange_MultiCell, DataSourcePropOnCellSelectionChange_SingleCell, DataSourcePropOnRowSelectionChange, DataSourcePropOnRowSelectionChange_MultiRow, DataSourcePropOnRowSelectionChange_SingleRow, DataSourcePropPivotBy, DataSourcePropRowInfoReducers, DataSourcePropRowSelection, DataSourcePropRowSelection_MultiRow, DataSourcePropRowSelection_SingleRow, DataSourcePropSelectionMode, DataSourcePropSortFn, DataSourcePropSortInfo, DataSourcePropSortTypes, DataSourceProps, DataSourceRawReducer, DataSourceRemoteData, DataSourceRowInfoReducer, DataSourceSetupState, DataSourceSingleSortInfo, DataSourceSortInfo, DataSourceState, DebugLogger, DeepMap, ElementContainerGetter, GroupRowsState, InfiniteColumnEditorContextType, InfiniteTable, InfiniteTableAction, InfiniteTableActionType, InfiniteTableApi, InfiniteTableClassName, InfiniteTableColumn, InfiniteTableColumnAggregator, InfiniteTableColumnApi, InfiniteTableColumnCellContextType, InfiniteTableColumnComparer, InfiniteTableColumnGroup, InfiniteTableColumnRenderFunctionForGroupRows, InfiniteTableColumnRenderFunctionForNormalRows, InfiniteTableColumnRenderValueParam, InfiniteTableColumnRowspanParam, InfiniteTableColumnSizingOptions, InfiniteTableColumnValueFormatterParams, InfiniteTableColumnValueGetterParams, InfiniteTableColumnsMap, InfiniteTableComponent, InfiniteTableComputedColumn, InfiniteTableComputedValues, InfiniteTableContextValue, InfiniteTableGroupColumnBase, InfiniteTableGroupColumnFunction, InfiniteTableGroupColumnGetterOptions, InfiniteTablePivotColumn, InfiniteTablePropAutoSizeColumnsKey, InfiniteTablePropColumnGroups, InfiniteTablePropColumnOrder, InfiniteTablePropColumnPinning, InfiniteTablePropColumnSizing, InfiniteTablePropColumnTypes, InfiniteTablePropColumnVisibility, InfiniteTablePropColumns, InfiniteTablePropComponents, InfiniteTablePropGetCellContextMenuItems, InfiniteTablePropGetColumnMenuItems, InfiniteTablePropGroupColumn, InfiniteTablePropGroupRenderStrategy, InfiniteTablePropHeaderOptions, InfiniteTablePropKeyboardNavigation, InfiniteTablePropMultiSortBehavior, InfiniteTablePropRowClassName, InfiniteTablePropRowStyle, InfiniteTableProps, InfiniteTableRowClassNameFn, InfiniteTableRowInfo, InfiniteTableRowStyleFn, InfiniteTableState, LazyGroupDataDeepMap, LazyGroupDataItem, LazyRowInfoGroup, Menu, MenuChildrenFnParam, MenuColumn, MenuColumnRenderParam, MenuDecoration, MenuIconProps, MenuItemDefinition, MenuItemObject, MenuProps, MenuRenderable, MenuRuntimeItem, MenuRuntimeItemSelectable, MenuSeparator, OverlayShowParams, RowSelectionState, Scrollbars, ShowOverlayFn, components, debounce, debug, defaultFilterTypes, defaultFilterTypes as filterTypes, flatten, getComponentStateRoot, group, interceptMap, multisort, useComponentState, useDataSource, useEffectWithChanges, useInfiniteColumnCell, useInfiniteColumnEditor, useInfiniteColumnFilterEditor, useInfiniteHeaderCell, useOverlay, useOverlayPortal, useRowInfoReducers };
package/index.dev.js CHANGED
@@ -709,6 +709,7 @@ var COLORS = [
709
709
  "#FFCC00",
710
710
  "#FFCC33"
711
711
  ];
712
+ var COLOR_SYMBOL = Symbol("color");
712
713
  var USED_COLORS_MAP = /* @__PURE__ */ new WeakMap();
713
714
  USED_COLORS_MAP.set(
714
715
  COLORS,
@@ -818,13 +819,15 @@ function debugPackage(channelName) {
818
819
  updateStorageKeyValue(getStorageKeyValue());
819
820
  });
820
821
  function debugFactory(channelName2, parentChannel) {
822
+ var _a;
821
823
  const channel = parentChannel ? `${parentChannel}${CHANNEL_SEPARATOR}${channelName2}` : channelName2;
822
824
  const channelParts = channel.split(CHANNEL_SEPARATOR);
823
825
  if (loggers.has(channelParts)) {
824
826
  return loggers.get(channelParts);
825
827
  }
826
828
  const parentLogger = loggers.get(channelParts.slice(0, -1));
827
- let logFn = parentLogger ? parentLogger.log : debug.log;
829
+ const defaultLogFn = (_a = parentLogger ? parentLogger.logFn : debug.logFn) != null ? _a : defaultLogger;
830
+ let logFn = defaultLogFn;
828
831
  let enabled;
829
832
  let lastMessageTimestamp = 0;
830
833
  const isEnabled = () => enabled != null ? enabled : isLoggingEnabled(channel, storageKeyValue);
@@ -838,13 +841,52 @@ function debugPackage(channelName) {
838
841
  logFn(`%c[${channel}]`, `color: ${color}`, `+${diff}ms:`);
839
842
  }
840
843
  lastMessageTimestamp = now;
841
- logFn(`%c[${channel}]`, `color: ${color}`, ...args);
844
+ const argsToLog = [];
845
+ let textWithColors = void 0;
846
+ args.forEach((arg) => {
847
+ if (arg[COLOR_SYMBOL]) {
848
+ if (textWithColors === void 0) {
849
+ textWithColors = true;
850
+ }
851
+ argsToLog.push(...arg);
852
+ } else {
853
+ if (typeof arg !== "string" && typeof arg !== "number") {
854
+ textWithColors = false;
855
+ return;
856
+ }
857
+ argsToLog.push(`${arg}%s`);
858
+ }
859
+ });
860
+ if (textWithColors) {
861
+ const theArgs = [
862
+ `%c[${channel}]%c %s`,
863
+ `color: ${color}`,
864
+ "",
865
+ ...argsToLog,
866
+ ""
867
+ ];
868
+ logFn(...theArgs);
869
+ } else {
870
+ logFn(`%c[${channel}]`, `color: ${color}`, ...args);
871
+ }
842
872
  }
843
873
  },
844
874
  {
845
875
  channel: {
846
876
  value: channel
847
877
  },
878
+ color: {
879
+ value: (colorName, ...args) => {
880
+ const result = [
881
+ `%c${args.join(" ")}%c%s`,
882
+ `color: ${colorName}`,
883
+ ""
884
+ ];
885
+ result.toString = () => args.join(" ");
886
+ result[COLOR_SYMBOL] = true;
887
+ return result;
888
+ }
889
+ },
848
890
  extend: {
849
891
  value: (nextChannel) => {
850
892
  return debugFactory(nextChannel, channel);
@@ -853,10 +895,11 @@ function debugPackage(channelName) {
853
895
  enabled: {
854
896
  get: () => isEnabled()
855
897
  },
856
- log: {
898
+ logFn: {
899
+ configurable: false,
857
900
  get: () => logFn,
858
901
  set: (fn) => {
859
- logFn = fn;
902
+ logFn = fn != null ? fn : defaultLogFn;
860
903
  }
861
904
  },
862
905
  destroy: {
@@ -882,18 +925,18 @@ Object.defineProperty(debugPackage, "enable", {
882
925
  });
883
926
  var debug = debugPackage;
884
927
  debug.colors = COLORS;
885
- debug.log = defaultLogger;
928
+ debug.logFn = defaultLogger;
886
929
 
887
930
  // src/utils/debug.ts
888
931
  var debugTable = debug(`InfiniteTable`);
889
932
  var dbg = (channelName) => {
890
933
  const result = debugTable.extend(channelName);
891
- result.log = console.log.bind(console);
934
+ result.logFn = console.log.bind(console);
892
935
  return result;
893
936
  };
894
937
  var err = (channelName) => {
895
938
  const result = debugTable.extend(`${channelName}:error`);
896
- result.log = console.error.bind(console);
939
+ result.logFn = console.error.bind(console);
897
940
  return result;
898
941
  };
899
942
  var emptyLogFn = () => emptyLogFn;
@@ -17217,7 +17260,7 @@ var useLicense = (licenseKey = "") => {
17217
17260
  const valid = (0, import_react50.useMemo)(() => {
17218
17261
  let valid2 = isValidLicense(licenseKey, {
17219
17262
  publishedAt: 1624970570587,
17220
- version: "3.0.14"
17263
+ version: "3.0.16"
17221
17264
  });
17222
17265
  if (!licenseKey && !valid2 && isInsidePlayground) {
17223
17266
  return true;
package/index.dev.mjs CHANGED
@@ -667,6 +667,7 @@ var COLORS = [
667
667
  "#FFCC00",
668
668
  "#FFCC33"
669
669
  ];
670
+ var COLOR_SYMBOL = Symbol("color");
670
671
  var USED_COLORS_MAP = /* @__PURE__ */ new WeakMap();
671
672
  USED_COLORS_MAP.set(
672
673
  COLORS,
@@ -776,13 +777,15 @@ function debugPackage(channelName) {
776
777
  updateStorageKeyValue(getStorageKeyValue());
777
778
  });
778
779
  function debugFactory(channelName2, parentChannel) {
780
+ var _a;
779
781
  const channel = parentChannel ? `${parentChannel}${CHANNEL_SEPARATOR}${channelName2}` : channelName2;
780
782
  const channelParts = channel.split(CHANNEL_SEPARATOR);
781
783
  if (loggers.has(channelParts)) {
782
784
  return loggers.get(channelParts);
783
785
  }
784
786
  const parentLogger = loggers.get(channelParts.slice(0, -1));
785
- let logFn = parentLogger ? parentLogger.log : debug.log;
787
+ const defaultLogFn = (_a = parentLogger ? parentLogger.logFn : debug.logFn) != null ? _a : defaultLogger;
788
+ let logFn = defaultLogFn;
786
789
  let enabled;
787
790
  let lastMessageTimestamp = 0;
788
791
  const isEnabled = () => enabled != null ? enabled : isLoggingEnabled(channel, storageKeyValue);
@@ -796,13 +799,52 @@ function debugPackage(channelName) {
796
799
  logFn(`%c[${channel}]`, `color: ${color}`, `+${diff}ms:`);
797
800
  }
798
801
  lastMessageTimestamp = now;
799
- logFn(`%c[${channel}]`, `color: ${color}`, ...args);
802
+ const argsToLog = [];
803
+ let textWithColors = void 0;
804
+ args.forEach((arg) => {
805
+ if (arg[COLOR_SYMBOL]) {
806
+ if (textWithColors === void 0) {
807
+ textWithColors = true;
808
+ }
809
+ argsToLog.push(...arg);
810
+ } else {
811
+ if (typeof arg !== "string" && typeof arg !== "number") {
812
+ textWithColors = false;
813
+ return;
814
+ }
815
+ argsToLog.push(`${arg}%s`);
816
+ }
817
+ });
818
+ if (textWithColors) {
819
+ const theArgs = [
820
+ `%c[${channel}]%c %s`,
821
+ `color: ${color}`,
822
+ "",
823
+ ...argsToLog,
824
+ ""
825
+ ];
826
+ logFn(...theArgs);
827
+ } else {
828
+ logFn(`%c[${channel}]`, `color: ${color}`, ...args);
829
+ }
800
830
  }
801
831
  },
802
832
  {
803
833
  channel: {
804
834
  value: channel
805
835
  },
836
+ color: {
837
+ value: (colorName, ...args) => {
838
+ const result = [
839
+ `%c${args.join(" ")}%c%s`,
840
+ `color: ${colorName}`,
841
+ ""
842
+ ];
843
+ result.toString = () => args.join(" ");
844
+ result[COLOR_SYMBOL] = true;
845
+ return result;
846
+ }
847
+ },
806
848
  extend: {
807
849
  value: (nextChannel) => {
808
850
  return debugFactory(nextChannel, channel);
@@ -811,10 +853,11 @@ function debugPackage(channelName) {
811
853
  enabled: {
812
854
  get: () => isEnabled()
813
855
  },
814
- log: {
856
+ logFn: {
857
+ configurable: false,
815
858
  get: () => logFn,
816
859
  set: (fn) => {
817
- logFn = fn;
860
+ logFn = fn != null ? fn : defaultLogFn;
818
861
  }
819
862
  },
820
863
  destroy: {
@@ -840,18 +883,18 @@ Object.defineProperty(debugPackage, "enable", {
840
883
  });
841
884
  var debug = debugPackage;
842
885
  debug.colors = COLORS;
843
- debug.log = defaultLogger;
886
+ debug.logFn = defaultLogger;
844
887
 
845
888
  // src/utils/debug.ts
846
889
  var debugTable = debug(`InfiniteTable`);
847
890
  var dbg = (channelName) => {
848
891
  const result = debugTable.extend(channelName);
849
- result.log = console.log.bind(console);
892
+ result.logFn = console.log.bind(console);
850
893
  return result;
851
894
  };
852
895
  var err = (channelName) => {
853
896
  const result = debugTable.extend(`${channelName}:error`);
854
- result.log = console.error.bind(console);
897
+ result.logFn = console.error.bind(console);
855
898
  return result;
856
899
  };
857
900
  var emptyLogFn = () => emptyLogFn;
@@ -17198,7 +17241,7 @@ var useLicense = (licenseKey = "") => {
17198
17241
  const valid = useMemo11(() => {
17199
17242
  let valid2 = isValidLicense(licenseKey, {
17200
17243
  publishedAt: 1624970570587,
17201
- version: "3.0.14"
17244
+ version: "3.0.16"
17202
17245
  });
17203
17246
  if (!licenseKey && !valid2 && isInsidePlayground) {
17204
17247
  return true;