@vitrosoftware/common-ui-ts 1.0.9 → 1.0.10

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.
@@ -20216,6 +20216,36 @@ var TreeGridTableViewContextImpl = /*#__PURE__*/function () {
20216
20216
  _proto.isVisibleGantt = function isVisibleGantt() {
20217
20217
  return this.grid.Cols.gantt.Visible;
20218
20218
  };
20219
+ _proto.setAttribute = function setAttribute(row, col, attribute, value, refresh, undo) {
20220
+ this.grid.SetAttribute(row, col, attribute, value, refresh, undo);
20221
+ };
20222
+ _proto.getRows = function getRows() {
20223
+ return this.grid.Rows;
20224
+ };
20225
+ _proto.getMainTag = function getMainTag() {
20226
+ return this.grid.MainTag;
20227
+ };
20228
+ _proto.focusCell = function focusCell(row, col) {
20229
+ this.grid.Focus(row, col);
20230
+ };
20231
+ _proto.getType = function getType(row, col) {
20232
+ return this.grid.GetType(row, col);
20233
+ };
20234
+ _proto.setStringEdit = function setStringEdit(row, col, value, timeout) {
20235
+ this.grid.SetStringEdit(row, col, value, timeout);
20236
+ };
20237
+ _proto.getValue = function getValue(row, col) {
20238
+ return this.grid.GetValue(row, col);
20239
+ };
20240
+ _proto.getFocusedCols = function getFocusedCols() {
20241
+ return this.grid.GetFocusedCols();
20242
+ };
20243
+ _proto.getFocusedRows = function getFocusedRows() {
20244
+ return this.grid.GetFocusedRows();
20245
+ };
20246
+ _proto.getFilter = function getFilter(spec) {
20247
+ return this.grid.GetFilter(spec);
20248
+ };
20219
20249
  _createClass(TreeGridTableViewContextImpl, [{
20220
20250
  key: "columnList",
20221
20251
  get: function get() {
@@ -54640,17 +54670,7 @@ function effect(_ref2) {
54640
54670
  }
54641
54671
  }
54642
54672
 
54643
- if (process.env.NODE_ENV !== "production") {
54644
- if (!isHTMLElement(arrowElement)) {
54645
- console.error(['Popper: "arrow" element must be an HTMLElement (not an SVGElement).', 'To use an SVG arrow, wrap it in an HTMLElement that will be used as', 'the arrow.'].join(' '));
54646
- }
54647
- }
54648
-
54649
54673
  if (!contains(state.elements.popper, arrowElement)) {
54650
- if (process.env.NODE_ENV !== "production") {
54651
- console.error(['Popper: "arrow" modifier\'s `element` must be a child of the popper', 'element.'].join(' '));
54652
- }
54653
-
54654
54674
  return;
54655
54675
  }
54656
54676
 
@@ -54792,17 +54812,6 @@ function computeStyles(_ref5) {
54792
54812
  adaptive = _options$adaptive === void 0 ? true : _options$adaptive,
54793
54813
  _options$roundOffsets = options.roundOffsets,
54794
54814
  roundOffsets = _options$roundOffsets === void 0 ? true : _options$roundOffsets;
54795
-
54796
- if (process.env.NODE_ENV !== "production") {
54797
- var transitionProperty = getComputedStyle$1(state.elements.popper).transitionProperty || '';
54798
-
54799
- if (adaptive && ['transform', 'top', 'right', 'bottom', 'left'].some(function (property) {
54800
- return transitionProperty.indexOf(property) >= 0;
54801
- })) {
54802
- console.warn(['Popper: Detected CSS transitions on at least one of the following', 'CSS properties: "transform", "top", "right", "bottom", "left".', '\n\n', 'Disable the "computeStyles" modifier\'s `adaptive` option to allow', 'for smooth transitions, or remove these properties from the CSS', 'transition declaration on the popper element if only transitioning', 'opacity or background-color for example.', '\n\n', 'We recommend using the popper element as a wrapper around an inner', 'element that can have any CSS property transitioned for animations.'].join(' '));
54803
- }
54804
- }
54805
-
54806
54815
  var commonStyles = {
54807
54816
  placement: getBasePlacement(state.placement),
54808
54817
  variation: getVariation(state.placement),
@@ -55243,10 +55252,6 @@ function computeAutoPlacement(state, options) {
55243
55252
 
55244
55253
  if (allowedPlacements.length === 0) {
55245
55254
  allowedPlacements = placements$1;
55246
-
55247
- if (process.env.NODE_ENV !== "production") {
55248
- console.error(['Popper: The `allowedAutoPlacements` option did not allow any', 'placements. Ensure the `placement` option matches the variation', 'of the allowed placements.', 'For example, "auto" cannot be used to allow "bottom-start".', 'Use "auto-start" instead.'].join(' '));
55249
- }
55250
55255
  } // $FlowFixMe[incompatible-type]: Flow seems to have problems with two array unions...
55251
55256
 
55252
55257
 
@@ -55798,108 +55803,6 @@ function debounce(fn) {
55798
55803
  };
55799
55804
  }
55800
55805
 
55801
- function format(str) {
55802
- for (var _len = arguments.length, args = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {
55803
- args[_key - 1] = arguments[_key];
55804
- }
55805
-
55806
- return [].concat(args).reduce(function (p, c) {
55807
- return p.replace(/%s/, c);
55808
- }, str);
55809
- }
55810
-
55811
- var INVALID_MODIFIER_ERROR = 'Popper: modifier "%s" provided an invalid %s property, expected %s but got %s';
55812
- var MISSING_DEPENDENCY_ERROR = 'Popper: modifier "%s" requires "%s", but "%s" modifier is not available';
55813
- var VALID_PROPERTIES = ['name', 'enabled', 'phase', 'fn', 'effect', 'requires', 'options'];
55814
- function validateModifiers(modifiers) {
55815
- modifiers.forEach(function (modifier) {
55816
- [].concat(Object.keys(modifier), VALID_PROPERTIES) // IE11-compatible replacement for `new Set(iterable)`
55817
- .filter(function (value, index, self) {
55818
- return self.indexOf(value) === index;
55819
- }).forEach(function (key) {
55820
- switch (key) {
55821
- case 'name':
55822
- if (typeof modifier.name !== 'string') {
55823
- console.error(format(INVALID_MODIFIER_ERROR, String(modifier.name), '"name"', '"string"', "\"" + String(modifier.name) + "\""));
55824
- }
55825
-
55826
- break;
55827
-
55828
- case 'enabled':
55829
- if (typeof modifier.enabled !== 'boolean') {
55830
- console.error(format(INVALID_MODIFIER_ERROR, modifier.name, '"enabled"', '"boolean"', "\"" + String(modifier.enabled) + "\""));
55831
- }
55832
-
55833
- break;
55834
-
55835
- case 'phase':
55836
- if (modifierPhases.indexOf(modifier.phase) < 0) {
55837
- console.error(format(INVALID_MODIFIER_ERROR, modifier.name, '"phase"', "either " + modifierPhases.join(', '), "\"" + String(modifier.phase) + "\""));
55838
- }
55839
-
55840
- break;
55841
-
55842
- case 'fn':
55843
- if (typeof modifier.fn !== 'function') {
55844
- console.error(format(INVALID_MODIFIER_ERROR, modifier.name, '"fn"', '"function"', "\"" + String(modifier.fn) + "\""));
55845
- }
55846
-
55847
- break;
55848
-
55849
- case 'effect':
55850
- if (modifier.effect != null && typeof modifier.effect !== 'function') {
55851
- console.error(format(INVALID_MODIFIER_ERROR, modifier.name, '"effect"', '"function"', "\"" + String(modifier.fn) + "\""));
55852
- }
55853
-
55854
- break;
55855
-
55856
- case 'requires':
55857
- if (modifier.requires != null && !Array.isArray(modifier.requires)) {
55858
- console.error(format(INVALID_MODIFIER_ERROR, modifier.name, '"requires"', '"array"', "\"" + String(modifier.requires) + "\""));
55859
- }
55860
-
55861
- break;
55862
-
55863
- case 'requiresIfExists':
55864
- if (!Array.isArray(modifier.requiresIfExists)) {
55865
- console.error(format(INVALID_MODIFIER_ERROR, modifier.name, '"requiresIfExists"', '"array"', "\"" + String(modifier.requiresIfExists) + "\""));
55866
- }
55867
-
55868
- break;
55869
-
55870
- case 'options':
55871
- case 'data':
55872
- break;
55873
-
55874
- default:
55875
- console.error("PopperJS: an invalid property has been provided to the \"" + modifier.name + "\" modifier, valid properties are " + VALID_PROPERTIES.map(function (s) {
55876
- return "\"" + s + "\"";
55877
- }).join(', ') + "; but \"" + key + "\" was provided.");
55878
- }
55879
-
55880
- modifier.requires && modifier.requires.forEach(function (requirement) {
55881
- if (modifiers.find(function (mod) {
55882
- return mod.name === requirement;
55883
- }) == null) {
55884
- console.error(format(MISSING_DEPENDENCY_ERROR, String(modifier.name), requirement, requirement));
55885
- }
55886
- });
55887
- });
55888
- });
55889
- }
55890
-
55891
- function uniqueBy(arr, fn) {
55892
- var identifiers = new Set();
55893
- return arr.filter(function (item) {
55894
- var identifier = fn(item);
55895
-
55896
- if (!identifiers.has(identifier)) {
55897
- identifiers.add(identifier);
55898
- return true;
55899
- }
55900
- });
55901
- }
55902
-
55903
55806
  function mergeByName(modifiers) {
55904
55807
  var merged = modifiers.reduce(function (merged, current) {
55905
55808
  var existing = merged[current.name];
@@ -55915,8 +55818,6 @@ function mergeByName(modifiers) {
55915
55818
  });
55916
55819
  }
55917
55820
 
55918
- var INVALID_ELEMENT_ERROR = 'Popper: Invalid reference or popper argument provided. They must be either a DOM element or virtual element.';
55919
- var INFINITE_LOOP_ERROR = 'Popper: An infinite loop in the modifiers cycle has been detected! The cycle has been interrupted to prevent a browser crash.';
55920
55821
  var DEFAULT_OPTIONS = {
55921
55822
  placement: 'bottom',
55922
55823
  modifiers: [],
@@ -55978,42 +55879,7 @@ function popperGenerator(generatorOptions) {
55978
55879
 
55979
55880
  state.orderedModifiers = orderedModifiers.filter(function (m) {
55980
55881
  return m.enabled;
55981
- }); // Validate the provided modifiers so that the consumer will get warned
55982
- // if one of the modifiers is invalid for any reason
55983
-
55984
- if (process.env.NODE_ENV !== "production") {
55985
- var modifiers = uniqueBy([].concat(orderedModifiers, state.options.modifiers), function (_ref) {
55986
- var name = _ref.name;
55987
- return name;
55988
- });
55989
- validateModifiers(modifiers);
55990
-
55991
- if (getBasePlacement(state.options.placement) === auto) {
55992
- var flipModifier = state.orderedModifiers.find(function (_ref2) {
55993
- var name = _ref2.name;
55994
- return name === 'flip';
55995
- });
55996
-
55997
- if (!flipModifier) {
55998
- console.error(['Popper: "auto" placements require the "flip" modifier be', 'present and enabled to work.'].join(' '));
55999
- }
56000
- }
56001
-
56002
- var _getComputedStyle = getComputedStyle$1(popper),
56003
- marginTop = _getComputedStyle.marginTop,
56004
- marginRight = _getComputedStyle.marginRight,
56005
- marginBottom = _getComputedStyle.marginBottom,
56006
- marginLeft = _getComputedStyle.marginLeft; // We no longer take into account `margins` on the popper, and it can
56007
- // cause bugs with positioning, so we'll warn the consumer
56008
-
56009
-
56010
- if ([marginTop, marginRight, marginBottom, marginLeft].some(function (margin) {
56011
- return parseFloat(margin);
56012
- })) {
56013
- console.warn(['Popper: CSS "margin" styles cannot be used to apply padding', 'between the popper and its reference element or boundary.', 'To replicate margin, use the `offset` modifier, as well as', 'the `padding` option in the `preventOverflow` and `flip`', 'modifiers.'].join(' '));
56014
- }
56015
- }
56016
-
55882
+ });
56017
55883
  runModifierEffects();
56018
55884
  return instance.update();
56019
55885
  },
@@ -56033,10 +55899,6 @@ function popperGenerator(generatorOptions) {
56033
55899
  // anymore
56034
55900
 
56035
55901
  if (!areValidElements(reference, popper)) {
56036
- if (process.env.NODE_ENV !== "production") {
56037
- console.error(INVALID_ELEMENT_ERROR);
56038
- }
56039
-
56040
55902
  return;
56041
55903
  } // Store the reference and popper rects to be read by modifiers
56042
55904
 
@@ -56059,18 +55921,8 @@ function popperGenerator(generatorOptions) {
56059
55921
  state.orderedModifiers.forEach(function (modifier) {
56060
55922
  return state.modifiersData[modifier.name] = Object.assign({}, modifier.data);
56061
55923
  });
56062
- var __debug_loops__ = 0;
56063
55924
 
56064
55925
  for (var index = 0; index < state.orderedModifiers.length; index++) {
56065
- if (process.env.NODE_ENV !== "production") {
56066
- __debug_loops__ += 1;
56067
-
56068
- if (__debug_loops__ > 100) {
56069
- console.error(INFINITE_LOOP_ERROR);
56070
- break;
56071
- }
56072
- }
56073
-
56074
55926
  if (state.reset === true) {
56075
55927
  state.reset = false;
56076
55928
  index = -1;
@@ -56108,10 +55960,6 @@ function popperGenerator(generatorOptions) {
56108
55960
  };
56109
55961
 
56110
55962
  if (!areValidElements(reference, popper)) {
56111
- if (process.env.NODE_ENV !== "production") {
56112
- console.error(INVALID_ELEMENT_ERROR);
56113
- }
56114
-
56115
55963
  return instance;
56116
55964
  }
56117
55965
 
@@ -56126,11 +55974,11 @@ function popperGenerator(generatorOptions) {
56126
55974
  // one.
56127
55975
 
56128
55976
  function runModifierEffects() {
56129
- state.orderedModifiers.forEach(function (_ref3) {
56130
- var name = _ref3.name,
56131
- _ref3$options = _ref3.options,
56132
- options = _ref3$options === void 0 ? {} : _ref3$options,
56133
- effect = _ref3.effect;
55977
+ state.orderedModifiers.forEach(function (_ref) {
55978
+ var name = _ref.name,
55979
+ _ref$options = _ref.options,
55980
+ options = _ref$options === void 0 ? {} : _ref$options,
55981
+ effect = _ref.effect;
56134
55982
 
56135
55983
  if (typeof effect === 'function') {
56136
55984
  var cleanupFn = effect({
@@ -56442,12 +56290,16 @@ function useClickOutside(ref, onClickOutside = noop$1, {
56442
56290
  }
56443
56291
  });
56444
56292
  useEffect(() => {
56293
+ var _ownerWindow$event, _ownerWindow$parent;
56445
56294
  if (disabled || ref == null) return undefined;
56446
56295
  const doc = ownerDocument(getRefTarget(ref));
56296
+ const ownerWindow = doc.defaultView || window;
56447
56297
 
56448
56298
  // Store the current event to avoid triggering handlers immediately
56299
+ // For things rendered in an iframe, the event might originate on the parent window
56300
+ // so we should fall back to that global event if the local one doesn't exist
56449
56301
  // https://github.com/facebook/react/issues/20074
56450
- let currentEvent = (doc.defaultView || window).event;
56302
+ let currentEvent = (_ownerWindow$event = ownerWindow.event) != null ? _ownerWindow$event : (_ownerWindow$parent = ownerWindow.parent) == null ? void 0 : _ownerWindow$parent.event;
56451
56303
  let removeInitialTriggerListener = null;
56452
56304
  if (InitialTriggerEvents[clickTrigger]) {
56453
56305
  removeInitialTriggerListener = listen(doc, InitialTriggerEvents[clickTrigger], handleInitialMouse, true);