@vitrosoftware/common-ui-ts 1.1.53 → 1.1.54

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.
@@ -12,6 +12,7 @@ export interface TableViewProps {
12
12
  controller?: string | undefined;
13
13
  listCode?: string | undefined;
14
14
  eventHandlerList?: TableViewEventHandler[];
15
+ onCustomAjax?: (grid: any, source: any, data: string, func: (code: any, result: any) => any) => any;
15
16
  onInit?: ((grid: TableViewContext, next?: () => any) => any) | undefined;
16
17
  onSelect?: ((grid: TableViewContext, row: TableViewRow, deselect: boolean, columnList: string[], test: boolean) => any) | undefined;
17
18
  layout?: any;
@@ -34,7 +34,9 @@ export declare enum EVENT {
34
34
  ON_SUGGEST = "OnSuggest",
35
35
  ON_VALUE_CHANGED = "OnValueChanged",
36
36
  ON_DRAG_OVER = "OnDragOver",
37
- ON_DROP = "OnDrop"
37
+ ON_DROP = "OnDrop",
38
+ ON_INIT = "OnInit",
39
+ ON_CUSTOM_AJAX = "OnCustomAjax"
38
40
  }
39
41
  export declare enum URL {
40
42
  LAYOUT = "Layout",
package/dist/index.js CHANGED
@@ -20790,6 +20790,8 @@ var EVENT$1;
20790
20790
  EVENT["ON_VALUE_CHANGED"] = "OnValueChanged";
20791
20791
  EVENT["ON_DRAG_OVER"] = "OnDragOver";
20792
20792
  EVENT["ON_DROP"] = "OnDrop";
20793
+ EVENT["ON_INIT"] = "OnInit";
20794
+ EVENT["ON_CUSTOM_AJAX"] = "OnCustomAjax";
20793
20795
  })(EVENT$1 || (EVENT$1 = {}));
20794
20796
  var URL;
20795
20797
  (function (URL) {
@@ -21016,6 +21018,9 @@ var TreeGrid = function TreeGrid(props) {
21016
21018
  };
21017
21019
  grid.setEventHandler(onDateSendEventHandler);
21018
21020
  };
21021
+ var onGridInit = function onGridInit(g, reload) {
21022
+ g.scope = props.scope;
21023
+ };
21019
21024
  var createGridUrl = function createGridUrl(dataKey) {
21020
21025
  if (props.layout || props.data) {
21021
21026
  return null;
@@ -21032,6 +21037,15 @@ var TreeGrid = function TreeGrid(props) {
21032
21037
  w$2.TGSetEvent(EVENT$1.ON_LOADED, props.id, function (grid, next) {
21033
21038
  return onGridLoaded(grid, next);
21034
21039
  });
21040
+ w$2.TGSetEvent(EVENT$1.ON_INIT, props.id, function (grid, reload) {
21041
+ return onGridInit(grid);
21042
+ });
21043
+ if (props.onCustomAjax) {
21044
+ var onCustomAjax = props.onCustomAjax;
21045
+ w$2.TGSetEvent(EVENT$1.ON_CUSTOM_AJAX, props.id, function (grid, source, data, func) {
21046
+ return onCustomAjax(grid, source, data, func);
21047
+ });
21048
+ }
21035
21049
  if (props.layout || props.data) {
21036
21050
  w$2.TreeGrid({
21037
21051
  id: props.id,
@@ -21046,8 +21060,7 @@ var TreeGrid = function TreeGrid(props) {
21046
21060
  },
21047
21061
  Debug: props.debug || '',
21048
21062
  Cache: props.cache || CACHE.DEFAULT,
21049
- CacheVersion: props.cacheVersion,
21050
- scope: props.scope
21063
+ CacheVersion: props.cacheVersion
21051
21064
  }, "vitro-table-view" + props.id);
21052
21065
  } else {
21053
21066
  w$2.TreeGrid({
@@ -21066,8 +21079,7 @@ var TreeGrid = function TreeGrid(props) {
21066
21079
  },
21067
21080
  Debug: props.debug || '',
21068
21081
  Cache: props.cache || CACHE.DEFAULT,
21069
- CacheVersion: props.cacheVersion,
21070
- scope: props.scope
21082
+ CacheVersion: props.cacheVersion
21071
21083
  }, "vitro-table-view" + props.id);
21072
21084
  }
21073
21085
  return function () {