@vitrosoftware/common-ui-ts 1.0.9 → 1.1.11

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.
Files changed (31) hide show
  1. package/css/white/common.css +0 -1
  2. package/css/white/controls/action-handler/action-handler.css +9 -0
  3. package/css/white/controls/control-group/control-group.css +27 -0
  4. package/css/white/controls/tab-group/tab-group.css +110 -0
  5. package/css/white/controls/table-view/table-view-custom-date-edit.css +6 -0
  6. package/css/white/controls/table-view/table-view.css +4 -1
  7. package/css/white/controls/view/view.css +3 -0
  8. package/css/white/controls/view-part/view-part.css +3 -0
  9. package/css/white/third-party/treegrid.css +7 -1
  10. package/dist/controls/ActionHandler/ActionHandler.d.ts +4 -3
  11. package/dist/controls/ControlGroup/ControlGroup.d.ts +7 -0
  12. package/dist/controls/TabGroup/OverflowButton.d.ts +8 -0
  13. package/dist/controls/TabGroup/Tab.d.ts +10 -0
  14. package/dist/controls/TabGroup/TabGroup.d.ts +9 -0
  15. package/dist/controls/TabGroup/TabGroupComponent.d.ts +8 -0
  16. package/dist/controls/TabGroup/TabGroupConstants.d.ts +4 -0
  17. package/dist/controls/TabGroup/TabGroupHeader.d.ts +10 -0
  18. package/dist/controls/TabGroup/TabItem.d.ts +13 -0
  19. package/dist/controls/TableView/TableViewContext.d.ts +13 -1
  20. package/dist/controls/TableView/TreeGridTableViewContextImpl.d.ts +12 -0
  21. package/dist/controls/TreeView/JsTreeViewContextImpl.d.ts +1 -1
  22. package/dist/controls/TreeView/TreeViewContext.d.ts +1 -1
  23. package/dist/controls/View/View.d.ts +7 -0
  24. package/dist/controls/ViewPart/ViewPart.d.ts +8 -0
  25. package/dist/index.css +160 -2
  26. package/dist/index.d.ts +7 -0
  27. package/dist/index.js +909 -220
  28. package/dist/index.js.map +1 -1
  29. package/dist/index.modern.js +913 -227
  30. package/dist/index.modern.js.map +1 -1
  31. package/package.json +1 -1
package/dist/index.js CHANGED
@@ -215,6 +215,10 @@ var TopLevelMenu = function TopLevelMenu(props) {
215
215
 
216
216
  var commonjsGlobal = typeof globalThis !== 'undefined' ? globalThis : typeof window !== 'undefined' ? window : typeof global !== 'undefined' ? global : typeof self !== 'undefined' ? self : {};
217
217
 
218
+ function unwrapExports (x) {
219
+ return x && x.__esModule && Object.prototype.hasOwnProperty.call(x, 'default') ? x['default'] : x;
220
+ }
221
+
218
222
  function createCommonjsModule(fn, module) {
219
223
  return module = { exports: {} }, fn(module, module.exports), module.exports;
220
224
  }
@@ -19971,8 +19975,8 @@ var JsTreeViewContextImpl = /*#__PURE__*/function () {
19971
19975
  this.deselectAll();
19972
19976
  this.jsTree.jstree(METHOD.SELECT_NODE, node);
19973
19977
  };
19974
- _proto.openNode = function openNode(node) {
19975
- this.jsTree.jstree(METHOD.OPEN_NODE, node);
19978
+ _proto.openNode = function openNode(node, callback, durationMs) {
19979
+ this.jsTree.jstree(METHOD.OPEN_NODE, node, callback, durationMs);
19976
19980
  };
19977
19981
  _proto.editNode = function editNode() {
19978
19982
  var selected = this.getSelected();
@@ -20034,6 +20038,20 @@ function _createClass(Constructor, protoProps, staticProps) {
20034
20038
  });
20035
20039
  return Constructor;
20036
20040
  }
20041
+ function _extends() {
20042
+ _extends = Object.assign ? Object.assign.bind() : function (target) {
20043
+ for (var i = 1; i < arguments.length; i++) {
20044
+ var source = arguments[i];
20045
+ for (var key in source) {
20046
+ if (Object.prototype.hasOwnProperty.call(source, key)) {
20047
+ target[key] = source[key];
20048
+ }
20049
+ }
20050
+ }
20051
+ return target;
20052
+ };
20053
+ return _extends.apply(this, arguments);
20054
+ }
20037
20055
  function _objectWithoutPropertiesLoose(source, excluded) {
20038
20056
  if (source == null) return {};
20039
20057
  var target = {};
@@ -20219,6 +20237,36 @@ var TreeGridTableViewContextImpl = /*#__PURE__*/function () {
20219
20237
  _proto.isVisibleGantt = function isVisibleGantt() {
20220
20238
  return this.grid.Cols.gantt.Visible;
20221
20239
  };
20240
+ _proto.setAttribute = function setAttribute(row, col, attribute, value, refresh, undo) {
20241
+ this.grid.SetAttribute(row, col, attribute, value, refresh, undo);
20242
+ };
20243
+ _proto.getRows = function getRows() {
20244
+ return this.grid.Rows;
20245
+ };
20246
+ _proto.getMainTag = function getMainTag() {
20247
+ return this.grid.MainTag;
20248
+ };
20249
+ _proto.focusCell = function focusCell(row, col) {
20250
+ this.grid.Focus(row, col);
20251
+ };
20252
+ _proto.getType = function getType(row, col) {
20253
+ return this.grid.GetType(row, col);
20254
+ };
20255
+ _proto.setStringEdit = function setStringEdit(row, col, value, timeout) {
20256
+ this.grid.SetStringEdit(row, col, value, timeout);
20257
+ };
20258
+ _proto.getValue = function getValue(row, col) {
20259
+ return this.grid.GetValue(row, col);
20260
+ };
20261
+ _proto.getFocusedCols = function getFocusedCols() {
20262
+ return this.grid.GetFocusedCols();
20263
+ };
20264
+ _proto.getFocusedRows = function getFocusedRows() {
20265
+ return this.grid.GetFocusedRows();
20266
+ };
20267
+ _proto.getFilter = function getFilter(spec) {
20268
+ return this.grid.GetFilter(spec);
20269
+ };
20222
20270
  _createClass(TreeGridTableViewContextImpl, [{
20223
20271
  key: "columnList",
20224
20272
  get: function get() {
@@ -20934,6 +20982,21 @@ var classnames = createCommonjsModule(function (module) {
20934
20982
  }());
20935
20983
  });
20936
20984
 
20985
+ function _extends$1() {
20986
+ _extends$1 = Object.assign ? Object.assign.bind() : function (target) {
20987
+ for (var i = 1; i < arguments.length; i++) {
20988
+ var source = arguments[i];
20989
+ for (var key in source) {
20990
+ if (Object.prototype.hasOwnProperty.call(source, key)) {
20991
+ target[key] = source[key];
20992
+ }
20993
+ }
20994
+ }
20995
+ return target;
20996
+ };
20997
+ return _extends$1.apply(this, arguments);
20998
+ }
20999
+
20937
21000
  function _objectWithoutPropertiesLoose$1(source, excluded) {
20938
21001
  if (source == null) return {};
20939
21002
  var target = {};
@@ -20947,6 +21010,14 @@ function _objectWithoutPropertiesLoose$1(source, excluded) {
20947
21010
  return target;
20948
21011
  }
20949
21012
 
21013
+ function defaultKey(key) {
21014
+ return 'default' + key.charAt(0).toUpperCase() + key.substr(1);
21015
+ }
21016
+
21017
+ function _toPropertyKey$1(arg) { var key = _toPrimitive$1(arg, "string"); return typeof key === "symbol" ? key : String(key); }
21018
+
21019
+ function _toPrimitive$1(input, hint) { if (typeof input !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (typeof res !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); }
21020
+
20950
21021
  function useUncontrolledProp(propValue, defaultValue, handler) {
20951
21022
  var wasPropRef = React.useRef(propValue !== undefined);
20952
21023
 
@@ -20975,6 +21046,24 @@ function useUncontrolledProp(propValue, defaultValue, handler) {
20975
21046
  setState(value);
20976
21047
  }, [handler])];
20977
21048
  }
21049
+ function useUncontrolled(props, config) {
21050
+ return Object.keys(config).reduce(function (result, fieldName) {
21051
+ var _extends2;
21052
+
21053
+ var _ref = result,
21054
+ defaultValue = _ref[defaultKey(fieldName)],
21055
+ propsValue = _ref[fieldName],
21056
+ rest = _objectWithoutPropertiesLoose$1(_ref, [defaultKey(fieldName), fieldName].map(_toPropertyKey$1));
21057
+
21058
+ var handlerName = config[fieldName];
21059
+
21060
+ var _useUncontrolledProp = useUncontrolledProp(propsValue, defaultValue, props[handlerName]),
21061
+ value = _useUncontrolledProp[0],
21062
+ handler = _useUncontrolledProp[1];
21063
+
21064
+ return _extends$1({}, rest, (_extends2 = {}, _extends2[fieldName] = value, _extends2[handlerName] = handler, _extends2));
21065
+ }, props);
21066
+ }
20978
21067
 
20979
21068
  function _setPrototypeOf(o, p) {
20980
21069
  _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) {
@@ -54011,6 +54100,129 @@ var isDOM = typeof document !== 'undefined';
54011
54100
 
54012
54101
  var useIsomorphicEffect = isDOM || isReactNative ? React.useLayoutEffect : React.useEffect;
54013
54102
 
54103
+ const _excluded = ["as", "disabled"];
54104
+ function _objectWithoutPropertiesLoose$2(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }
54105
+ function isTrivialHref(href) {
54106
+ return !href || href.trim() === '#';
54107
+ }
54108
+ function useButtonProps({
54109
+ tagName,
54110
+ disabled,
54111
+ href,
54112
+ target,
54113
+ rel,
54114
+ role,
54115
+ onClick,
54116
+ tabIndex = 0,
54117
+ type
54118
+ }) {
54119
+ if (!tagName) {
54120
+ if (href != null || target != null || rel != null) {
54121
+ tagName = 'a';
54122
+ } else {
54123
+ tagName = 'button';
54124
+ }
54125
+ }
54126
+ const meta = {
54127
+ tagName
54128
+ };
54129
+ if (tagName === 'button') {
54130
+ return [{
54131
+ type: type || 'button',
54132
+ disabled
54133
+ }, meta];
54134
+ }
54135
+ const handleClick = event => {
54136
+ if (disabled || tagName === 'a' && isTrivialHref(href)) {
54137
+ event.preventDefault();
54138
+ }
54139
+ if (disabled) {
54140
+ event.stopPropagation();
54141
+ return;
54142
+ }
54143
+ onClick == null ? void 0 : onClick(event);
54144
+ };
54145
+ const handleKeyDown = event => {
54146
+ if (event.key === ' ') {
54147
+ event.preventDefault();
54148
+ handleClick(event);
54149
+ }
54150
+ };
54151
+ if (tagName === 'a') {
54152
+ // Ensure there's a href so Enter can trigger anchor button.
54153
+ href || (href = '#');
54154
+ if (disabled) {
54155
+ href = undefined;
54156
+ }
54157
+ }
54158
+ return [{
54159
+ role: role != null ? role : 'button',
54160
+ // explicitly undefined so that it overrides the props disabled in a spread
54161
+ // e.g. <Tag {...props} {...hookProps} />
54162
+ disabled: undefined,
54163
+ tabIndex: disabled ? undefined : tabIndex,
54164
+ href,
54165
+ target: tagName === 'a' ? target : undefined,
54166
+ 'aria-disabled': !disabled ? undefined : disabled,
54167
+ rel: tagName === 'a' ? rel : undefined,
54168
+ onClick: handleClick,
54169
+ onKeyDown: handleKeyDown
54170
+ }, meta];
54171
+ }
54172
+ const Button = /*#__PURE__*/React.forwardRef((_ref, ref) => {
54173
+ let {
54174
+ as: asProp,
54175
+ disabled
54176
+ } = _ref,
54177
+ props = _objectWithoutPropertiesLoose$2(_ref, _excluded);
54178
+ const [buttonProps, {
54179
+ tagName: Component
54180
+ }] = useButtonProps(Object.assign({
54181
+ tagName: asProp,
54182
+ disabled
54183
+ }, props));
54184
+ return /*#__PURE__*/jsxRuntime.jsx(Component, Object.assign({}, props, buttonProps, {
54185
+ ref: ref
54186
+ }));
54187
+ });
54188
+ Button.displayName = 'Button';
54189
+
54190
+ const _excluded$1 = ["onKeyDown"];
54191
+ function _objectWithoutPropertiesLoose$3(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }
54192
+ function isTrivialHref$1(href) {
54193
+ return !href || href.trim() === '#';
54194
+ }
54195
+ /**
54196
+ * An generic `<a>` component that covers a few A11y cases, ensuring that
54197
+ * cases where the `href` is missing or trivial like "#" are treated like buttons.
54198
+ */
54199
+ const Anchor = /*#__PURE__*/React.forwardRef((_ref, ref) => {
54200
+ let {
54201
+ onKeyDown
54202
+ } = _ref,
54203
+ props = _objectWithoutPropertiesLoose$3(_ref, _excluded$1);
54204
+ const [buttonProps] = useButtonProps(Object.assign({
54205
+ tagName: 'a'
54206
+ }, props));
54207
+ const handleKeyDown = useEventCallback(e => {
54208
+ buttonProps.onKeyDown(e);
54209
+ onKeyDown == null ? void 0 : onKeyDown(e);
54210
+ });
54211
+ if (isTrivialHref$1(props.href) || props.role === 'button') {
54212
+ return /*#__PURE__*/jsxRuntime.jsx("a", Object.assign({
54213
+ ref: ref
54214
+ }, props, buttonProps, {
54215
+ onKeyDown: handleKeyDown
54216
+ }));
54217
+ }
54218
+ return /*#__PURE__*/jsxRuntime.jsx("a", Object.assign({
54219
+ ref: ref
54220
+ }, props, {
54221
+ onKeyDown: onKeyDown
54222
+ }));
54223
+ });
54224
+ Anchor.displayName = 'Anchor';
54225
+
54014
54226
  const fadeStyles = {
54015
54227
  [ENTERING]: 'show',
54016
54228
  [ENTERED]: 'show'
@@ -54082,6 +54294,9 @@ function createWithBsPrefix(prefix, {
54082
54294
  return BsComponent;
54083
54295
  }
54084
54296
 
54297
+ const context = /*#__PURE__*/React.createContext(null);
54298
+ context.displayName = 'CardHeaderContext';
54299
+
54085
54300
  /**
54086
54301
  * Returns a ref that is immediately updated with the new value
54087
54302
  *
@@ -54183,6 +54398,46 @@ function useTimeout() {
54183
54398
  }, []);
54184
54399
  }
54185
54400
 
54401
+ var toArray = Function.prototype.bind.call(Function.prototype.call, [].slice);
54402
+ /**
54403
+ * Runs `querySelectorAll` on a given element.
54404
+ *
54405
+ * @param element the element
54406
+ * @param selector the selector
54407
+ */
54408
+
54409
+ function qsa(element, selector) {
54410
+ return toArray(element.querySelectorAll(selector));
54411
+ }
54412
+
54413
+ /**
54414
+ * Returns a function that triggers a component update. the hook equivalent to
54415
+ * `this.forceUpdate()` in a class component. In most cases using a state value directly
54416
+ * is preferable but may be required in some advanced usages of refs for interop or
54417
+ * when direct DOM manipulation is required.
54418
+ *
54419
+ * ```ts
54420
+ * const forceUpdate = useForceUpdate();
54421
+ *
54422
+ * const updateOnClick = useCallback(() => {
54423
+ * forceUpdate()
54424
+ * }, [forceUpdate])
54425
+ *
54426
+ * return <button type="button" onClick={updateOnClick}>Hi there</button>
54427
+ * ```
54428
+ */
54429
+
54430
+ function useForceUpdate() {
54431
+ // The toggling state value is designed to defeat React optimizations for skipping
54432
+ // updates when they are stricting equal to the last state value
54433
+ var _useReducer = React.useReducer(function (state) {
54434
+ return !state;
54435
+ }, false),
54436
+ dispatch = _useReducer[1];
54437
+
54438
+ return dispatch;
54439
+ }
54440
+
54186
54441
  var has$2 = Object.prototype.hasOwnProperty;
54187
54442
 
54188
54443
  function find(iter, tar, key) {
@@ -54643,17 +54898,7 @@ function effect(_ref2) {
54643
54898
  }
54644
54899
  }
54645
54900
 
54646
- if (process.env.NODE_ENV !== "production") {
54647
- if (!isHTMLElement(arrowElement)) {
54648
- 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(' '));
54649
- }
54650
- }
54651
-
54652
54901
  if (!contains(state.elements.popper, arrowElement)) {
54653
- if (process.env.NODE_ENV !== "production") {
54654
- console.error(['Popper: "arrow" modifier\'s `element` must be a child of the popper', 'element.'].join(' '));
54655
- }
54656
-
54657
54902
  return;
54658
54903
  }
54659
54904
 
@@ -54795,17 +55040,6 @@ function computeStyles(_ref5) {
54795
55040
  adaptive = _options$adaptive === void 0 ? true : _options$adaptive,
54796
55041
  _options$roundOffsets = options.roundOffsets,
54797
55042
  roundOffsets = _options$roundOffsets === void 0 ? true : _options$roundOffsets;
54798
-
54799
- if (process.env.NODE_ENV !== "production") {
54800
- var transitionProperty = getComputedStyle$1(state.elements.popper).transitionProperty || '';
54801
-
54802
- if (adaptive && ['transform', 'top', 'right', 'bottom', 'left'].some(function (property) {
54803
- return transitionProperty.indexOf(property) >= 0;
54804
- })) {
54805
- 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(' '));
54806
- }
54807
- }
54808
-
54809
55043
  var commonStyles = {
54810
55044
  placement: getBasePlacement(state.placement),
54811
55045
  variation: getVariation(state.placement),
@@ -55246,10 +55480,6 @@ function computeAutoPlacement(state, options) {
55246
55480
 
55247
55481
  if (allowedPlacements.length === 0) {
55248
55482
  allowedPlacements = placements$1;
55249
-
55250
- if (process.env.NODE_ENV !== "production") {
55251
- 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(' '));
55252
- }
55253
55483
  } // $FlowFixMe[incompatible-type]: Flow seems to have problems with two array unions...
55254
55484
 
55255
55485
 
@@ -55801,108 +56031,6 @@ function debounce(fn) {
55801
56031
  };
55802
56032
  }
55803
56033
 
55804
- function format(str) {
55805
- for (var _len = arguments.length, args = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {
55806
- args[_key - 1] = arguments[_key];
55807
- }
55808
-
55809
- return [].concat(args).reduce(function (p, c) {
55810
- return p.replace(/%s/, c);
55811
- }, str);
55812
- }
55813
-
55814
- var INVALID_MODIFIER_ERROR = 'Popper: modifier "%s" provided an invalid %s property, expected %s but got %s';
55815
- var MISSING_DEPENDENCY_ERROR = 'Popper: modifier "%s" requires "%s", but "%s" modifier is not available';
55816
- var VALID_PROPERTIES = ['name', 'enabled', 'phase', 'fn', 'effect', 'requires', 'options'];
55817
- function validateModifiers(modifiers) {
55818
- modifiers.forEach(function (modifier) {
55819
- [].concat(Object.keys(modifier), VALID_PROPERTIES) // IE11-compatible replacement for `new Set(iterable)`
55820
- .filter(function (value, index, self) {
55821
- return self.indexOf(value) === index;
55822
- }).forEach(function (key) {
55823
- switch (key) {
55824
- case 'name':
55825
- if (typeof modifier.name !== 'string') {
55826
- console.error(format(INVALID_MODIFIER_ERROR, String(modifier.name), '"name"', '"string"', "\"" + String(modifier.name) + "\""));
55827
- }
55828
-
55829
- break;
55830
-
55831
- case 'enabled':
55832
- if (typeof modifier.enabled !== 'boolean') {
55833
- console.error(format(INVALID_MODIFIER_ERROR, modifier.name, '"enabled"', '"boolean"', "\"" + String(modifier.enabled) + "\""));
55834
- }
55835
-
55836
- break;
55837
-
55838
- case 'phase':
55839
- if (modifierPhases.indexOf(modifier.phase) < 0) {
55840
- console.error(format(INVALID_MODIFIER_ERROR, modifier.name, '"phase"', "either " + modifierPhases.join(', '), "\"" + String(modifier.phase) + "\""));
55841
- }
55842
-
55843
- break;
55844
-
55845
- case 'fn':
55846
- if (typeof modifier.fn !== 'function') {
55847
- console.error(format(INVALID_MODIFIER_ERROR, modifier.name, '"fn"', '"function"', "\"" + String(modifier.fn) + "\""));
55848
- }
55849
-
55850
- break;
55851
-
55852
- case 'effect':
55853
- if (modifier.effect != null && typeof modifier.effect !== 'function') {
55854
- console.error(format(INVALID_MODIFIER_ERROR, modifier.name, '"effect"', '"function"', "\"" + String(modifier.fn) + "\""));
55855
- }
55856
-
55857
- break;
55858
-
55859
- case 'requires':
55860
- if (modifier.requires != null && !Array.isArray(modifier.requires)) {
55861
- console.error(format(INVALID_MODIFIER_ERROR, modifier.name, '"requires"', '"array"', "\"" + String(modifier.requires) + "\""));
55862
- }
55863
-
55864
- break;
55865
-
55866
- case 'requiresIfExists':
55867
- if (!Array.isArray(modifier.requiresIfExists)) {
55868
- console.error(format(INVALID_MODIFIER_ERROR, modifier.name, '"requiresIfExists"', '"array"', "\"" + String(modifier.requiresIfExists) + "\""));
55869
- }
55870
-
55871
- break;
55872
-
55873
- case 'options':
55874
- case 'data':
55875
- break;
55876
-
55877
- default:
55878
- console.error("PopperJS: an invalid property has been provided to the \"" + modifier.name + "\" modifier, valid properties are " + VALID_PROPERTIES.map(function (s) {
55879
- return "\"" + s + "\"";
55880
- }).join(', ') + "; but \"" + key + "\" was provided.");
55881
- }
55882
-
55883
- modifier.requires && modifier.requires.forEach(function (requirement) {
55884
- if (modifiers.find(function (mod) {
55885
- return mod.name === requirement;
55886
- }) == null) {
55887
- console.error(format(MISSING_DEPENDENCY_ERROR, String(modifier.name), requirement, requirement));
55888
- }
55889
- });
55890
- });
55891
- });
55892
- }
55893
-
55894
- function uniqueBy(arr, fn) {
55895
- var identifiers = new Set();
55896
- return arr.filter(function (item) {
55897
- var identifier = fn(item);
55898
-
55899
- if (!identifiers.has(identifier)) {
55900
- identifiers.add(identifier);
55901
- return true;
55902
- }
55903
- });
55904
- }
55905
-
55906
56034
  function mergeByName(modifiers) {
55907
56035
  var merged = modifiers.reduce(function (merged, current) {
55908
56036
  var existing = merged[current.name];
@@ -55918,8 +56046,6 @@ function mergeByName(modifiers) {
55918
56046
  });
55919
56047
  }
55920
56048
 
55921
- var INVALID_ELEMENT_ERROR = 'Popper: Invalid reference or popper argument provided. They must be either a DOM element or virtual element.';
55922
- 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.';
55923
56049
  var DEFAULT_OPTIONS = {
55924
56050
  placement: 'bottom',
55925
56051
  modifiers: [],
@@ -55981,42 +56107,7 @@ function popperGenerator(generatorOptions) {
55981
56107
 
55982
56108
  state.orderedModifiers = orderedModifiers.filter(function (m) {
55983
56109
  return m.enabled;
55984
- }); // Validate the provided modifiers so that the consumer will get warned
55985
- // if one of the modifiers is invalid for any reason
55986
-
55987
- if (process.env.NODE_ENV !== "production") {
55988
- var modifiers = uniqueBy([].concat(orderedModifiers, state.options.modifiers), function (_ref) {
55989
- var name = _ref.name;
55990
- return name;
55991
- });
55992
- validateModifiers(modifiers);
55993
-
55994
- if (getBasePlacement(state.options.placement) === auto) {
55995
- var flipModifier = state.orderedModifiers.find(function (_ref2) {
55996
- var name = _ref2.name;
55997
- return name === 'flip';
55998
- });
55999
-
56000
- if (!flipModifier) {
56001
- console.error(['Popper: "auto" placements require the "flip" modifier be', 'present and enabled to work.'].join(' '));
56002
- }
56003
- }
56004
-
56005
- var _getComputedStyle = getComputedStyle$1(popper),
56006
- marginTop = _getComputedStyle.marginTop,
56007
- marginRight = _getComputedStyle.marginRight,
56008
- marginBottom = _getComputedStyle.marginBottom,
56009
- marginLeft = _getComputedStyle.marginLeft; // We no longer take into account `margins` on the popper, and it can
56010
- // cause bugs with positioning, so we'll warn the consumer
56011
-
56012
-
56013
- if ([marginTop, marginRight, marginBottom, marginLeft].some(function (margin) {
56014
- return parseFloat(margin);
56015
- })) {
56016
- 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(' '));
56017
- }
56018
- }
56019
-
56110
+ });
56020
56111
  runModifierEffects();
56021
56112
  return instance.update();
56022
56113
  },
@@ -56036,10 +56127,6 @@ function popperGenerator(generatorOptions) {
56036
56127
  // anymore
56037
56128
 
56038
56129
  if (!areValidElements(reference, popper)) {
56039
- if (process.env.NODE_ENV !== "production") {
56040
- console.error(INVALID_ELEMENT_ERROR);
56041
- }
56042
-
56043
56130
  return;
56044
56131
  } // Store the reference and popper rects to be read by modifiers
56045
56132
 
@@ -56062,18 +56149,8 @@ function popperGenerator(generatorOptions) {
56062
56149
  state.orderedModifiers.forEach(function (modifier) {
56063
56150
  return state.modifiersData[modifier.name] = Object.assign({}, modifier.data);
56064
56151
  });
56065
- var __debug_loops__ = 0;
56066
56152
 
56067
56153
  for (var index = 0; index < state.orderedModifiers.length; index++) {
56068
- if (process.env.NODE_ENV !== "production") {
56069
- __debug_loops__ += 1;
56070
-
56071
- if (__debug_loops__ > 100) {
56072
- console.error(INFINITE_LOOP_ERROR);
56073
- break;
56074
- }
56075
- }
56076
-
56077
56154
  if (state.reset === true) {
56078
56155
  state.reset = false;
56079
56156
  index = -1;
@@ -56111,10 +56188,6 @@ function popperGenerator(generatorOptions) {
56111
56188
  };
56112
56189
 
56113
56190
  if (!areValidElements(reference, popper)) {
56114
- if (process.env.NODE_ENV !== "production") {
56115
- console.error(INVALID_ELEMENT_ERROR);
56116
- }
56117
-
56118
56191
  return instance;
56119
56192
  }
56120
56193
 
@@ -56129,11 +56202,11 @@ function popperGenerator(generatorOptions) {
56129
56202
  // one.
56130
56203
 
56131
56204
  function runModifierEffects() {
56132
- state.orderedModifiers.forEach(function (_ref3) {
56133
- var name = _ref3.name,
56134
- _ref3$options = _ref3.options,
56135
- options = _ref3$options === void 0 ? {} : _ref3$options,
56136
- effect = _ref3.effect;
56205
+ state.orderedModifiers.forEach(function (_ref) {
56206
+ var name = _ref.name,
56207
+ _ref$options = _ref.options,
56208
+ options = _ref$options === void 0 ? {} : _ref$options,
56209
+ effect = _ref.effect;
56137
56210
 
56138
56211
  if (typeof effect === 'function') {
56139
56212
  var cleanupFn = effect({
@@ -56167,8 +56240,8 @@ const createPopper = popperGenerator({
56167
56240
  defaultModifiers: [hide$1, popperOffsets$1, computeStyles$1, eventListeners, offset$1, flip$1, preventOverflow$1, arrow$1]
56168
56241
  });
56169
56242
 
56170
- const _excluded = ["enabled", "placement", "strategy", "modifiers"];
56171
- function _objectWithoutPropertiesLoose$2(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }
56243
+ const _excluded$2 = ["enabled", "placement", "strategy", "modifiers"];
56244
+ function _objectWithoutPropertiesLoose$4(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }
56172
56245
  const disabledApplyStylesModifier = {
56173
56246
  name: 'applyStyles',
56174
56247
  enabled: false,
@@ -56235,7 +56308,7 @@ function usePopper(referenceElement, popperElement, _ref = {}) {
56235
56308
  strategy = 'absolute',
56236
56309
  modifiers = EMPTY_MODIFIERS
56237
56310
  } = _ref,
56238
- config = _objectWithoutPropertiesLoose$2(_ref, _excluded);
56311
+ config = _objectWithoutPropertiesLoose$4(_ref, _excluded$2);
56239
56312
  const prevModifiers = React.useRef(modifiers);
56240
56313
  const popperInstanceRef = React.useRef();
56241
56314
  const update = React.useCallback(() => {
@@ -56445,12 +56518,16 @@ function useClickOutside(ref, onClickOutside = noop$1, {
56445
56518
  }
56446
56519
  });
56447
56520
  React.useEffect(() => {
56521
+ var _ownerWindow$event, _ownerWindow$parent;
56448
56522
  if (disabled || ref == null) return undefined;
56449
56523
  const doc = ownerDocument(getRefTarget(ref));
56524
+ const ownerWindow = doc.defaultView || window;
56450
56525
 
56451
56526
  // Store the current event to avoid triggering handlers immediately
56527
+ // For things rendered in an iframe, the event might originate on the parent window
56528
+ // so we should fall back to that global event if the local one doesn't exist
56452
56529
  // https://github.com/facebook/react/issues/20074
56453
- let currentEvent = (doc.defaultView || window).event;
56530
+ let currentEvent = (_ownerWindow$event = ownerWindow.event) != null ? _ownerWindow$event : (_ownerWindow$parent = ownerWindow.parent) == null ? void 0 : _ownerWindow$parent.event;
56454
56531
  let removeInitialTriggerListener = null;
56455
56532
  if (InitialTriggerEvents[clickTrigger]) {
56456
56533
  removeInitialTriggerListener = listen(doc, InitialTriggerEvents[clickTrigger], handleInitialMouse, true);
@@ -56545,6 +56622,24 @@ function mergeOptionsWithPopperConfig({
56545
56622
  });
56546
56623
  }
56547
56624
 
56625
+ const SelectableContext = /*#__PURE__*/React.createContext(null);
56626
+ const makeEventKey = (eventKey, href = null) => {
56627
+ if (eventKey != null) return String(eventKey);
56628
+ return href || null;
56629
+ };
56630
+
56631
+ const NavContext = /*#__PURE__*/React.createContext(null);
56632
+ NavContext.displayName = 'NavContext';
56633
+
56634
+ const ATTRIBUTE_PREFIX = `data-rr-ui-`;
56635
+ const PROPERTY_PREFIX = `rrUi`;
56636
+ function dataAttr(property) {
56637
+ return `${ATTRIBUTE_PREFIX}${property}`;
56638
+ }
56639
+ function dataProp(property) {
56640
+ return `${PROPERTY_PREFIX}${property}`;
56641
+ }
56642
+
56548
56643
  const Context = /*#__PURE__*/React.createContext(canUseDOM ? window : undefined);
56549
56644
 
56550
56645
  /**
@@ -56557,6 +56652,198 @@ function useWindow() {
56557
56652
  return React.useContext(Context);
56558
56653
  }
56559
56654
 
56655
+ // TODO: check
56656
+
56657
+ const context$1 = /*#__PURE__*/React.createContext(null);
56658
+ context$1.displayName = 'NavbarContext';
56659
+
56660
+ const TabContext = /*#__PURE__*/React.createContext(null);
56661
+
56662
+ const _excluded$3 = ["as", "active", "eventKey"];
56663
+ function _objectWithoutPropertiesLoose$5(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }
56664
+ function useNavItem({
56665
+ key,
56666
+ onClick,
56667
+ active,
56668
+ id,
56669
+ role,
56670
+ disabled
56671
+ }) {
56672
+ const parentOnSelect = React.useContext(SelectableContext);
56673
+ const navContext = React.useContext(NavContext);
56674
+ const tabContext = React.useContext(TabContext);
56675
+ let isActive = active;
56676
+ const props = {
56677
+ role
56678
+ };
56679
+ if (navContext) {
56680
+ if (!role && navContext.role === 'tablist') props.role = 'tab';
56681
+ const contextControllerId = navContext.getControllerId(key != null ? key : null);
56682
+ const contextControlledId = navContext.getControlledId(key != null ? key : null);
56683
+
56684
+ // @ts-ignore
56685
+ props[dataAttr('event-key')] = key;
56686
+ props.id = contextControllerId || id;
56687
+ isActive = active == null && key != null ? navContext.activeKey === key : active;
56688
+
56689
+ /**
56690
+ * Simplified scenario for `mountOnEnter`.
56691
+ *
56692
+ * While it would make sense to keep 'aria-controls' for tabs that have been mounted at least
56693
+ * once, it would also complicate the code quite a bit, for very little gain.
56694
+ * The following implementation is probably good enough.
56695
+ *
56696
+ * @see https://github.com/react-restart/ui/pull/40#issuecomment-1009971561
56697
+ */
56698
+ if (isActive || !(tabContext != null && tabContext.unmountOnExit) && !(tabContext != null && tabContext.mountOnEnter)) props['aria-controls'] = contextControlledId;
56699
+ }
56700
+ if (props.role === 'tab') {
56701
+ props['aria-selected'] = isActive;
56702
+ if (!isActive) {
56703
+ props.tabIndex = -1;
56704
+ }
56705
+ if (disabled) {
56706
+ props.tabIndex = -1;
56707
+ props['aria-disabled'] = true;
56708
+ }
56709
+ }
56710
+ props.onClick = useEventCallback(e => {
56711
+ if (disabled) return;
56712
+ onClick == null ? void 0 : onClick(e);
56713
+ if (key == null) {
56714
+ return;
56715
+ }
56716
+ if (parentOnSelect && !e.isPropagationStopped()) {
56717
+ parentOnSelect(key, e);
56718
+ }
56719
+ });
56720
+ return [props, {
56721
+ isActive
56722
+ }];
56723
+ }
56724
+ const NavItem = /*#__PURE__*/React.forwardRef((_ref, ref) => {
56725
+ let {
56726
+ as: Component = Button,
56727
+ active,
56728
+ eventKey
56729
+ } = _ref,
56730
+ options = _objectWithoutPropertiesLoose$5(_ref, _excluded$3);
56731
+ const [props, meta] = useNavItem(Object.assign({
56732
+ key: makeEventKey(eventKey, options.href),
56733
+ active
56734
+ }, options));
56735
+
56736
+ // @ts-ignore
56737
+ props[dataAttr('active')] = meta.isActive;
56738
+ return /*#__PURE__*/jsxRuntime.jsx(Component, Object.assign({}, options, props, {
56739
+ ref: ref
56740
+ }));
56741
+ });
56742
+ NavItem.displayName = 'NavItem';
56743
+
56744
+ const _excluded$4 = ["as", "onSelect", "activeKey", "role", "onKeyDown"];
56745
+ function _objectWithoutPropertiesLoose$6(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }
56746
+ // eslint-disable-next-line @typescript-eslint/no-empty-function
56747
+ const noop$2 = () => {};
56748
+ const EVENT_KEY_ATTR = dataAttr('event-key');
56749
+ const Nav = /*#__PURE__*/React.forwardRef((_ref, ref) => {
56750
+ let {
56751
+ // Need to define the default "as" during prop destructuring to be compatible with styled-components github.com/react-bootstrap/react-bootstrap/issues/3595
56752
+ as: Component = 'div',
56753
+ onSelect,
56754
+ activeKey,
56755
+ role,
56756
+ onKeyDown
56757
+ } = _ref,
56758
+ props = _objectWithoutPropertiesLoose$6(_ref, _excluded$4);
56759
+ // A ref and forceUpdate for refocus, b/c we only want to trigger when needed
56760
+ // and don't want to reset the set in the effect
56761
+ const forceUpdate = useForceUpdate();
56762
+ const needsRefocusRef = React.useRef(false);
56763
+ const parentOnSelect = React.useContext(SelectableContext);
56764
+ const tabContext = React.useContext(TabContext);
56765
+ let getControlledId, getControllerId;
56766
+ if (tabContext) {
56767
+ role = role || 'tablist';
56768
+ activeKey = tabContext.activeKey;
56769
+ // TODO: do we need to duplicate these?
56770
+ getControlledId = tabContext.getControlledId;
56771
+ getControllerId = tabContext.getControllerId;
56772
+ }
56773
+ const listNode = React.useRef(null);
56774
+ const getNextActiveTab = offset => {
56775
+ const currentListNode = listNode.current;
56776
+ if (!currentListNode) return null;
56777
+ const items = qsa(currentListNode, `[${EVENT_KEY_ATTR}]:not([aria-disabled=true])`);
56778
+ const activeChild = currentListNode.querySelector('[aria-selected=true]');
56779
+ if (!activeChild || activeChild !== document.activeElement) return null;
56780
+ const index = items.indexOf(activeChild);
56781
+ if (index === -1) return null;
56782
+ let nextIndex = index + offset;
56783
+ if (nextIndex >= items.length) nextIndex = 0;
56784
+ if (nextIndex < 0) nextIndex = items.length - 1;
56785
+ return items[nextIndex];
56786
+ };
56787
+ const handleSelect = (key, event) => {
56788
+ if (key == null) return;
56789
+ onSelect == null ? void 0 : onSelect(key, event);
56790
+ parentOnSelect == null ? void 0 : parentOnSelect(key, event);
56791
+ };
56792
+ const handleKeyDown = event => {
56793
+ onKeyDown == null ? void 0 : onKeyDown(event);
56794
+ if (!tabContext) {
56795
+ return;
56796
+ }
56797
+ let nextActiveChild;
56798
+ switch (event.key) {
56799
+ case 'ArrowLeft':
56800
+ case 'ArrowUp':
56801
+ nextActiveChild = getNextActiveTab(-1);
56802
+ break;
56803
+ case 'ArrowRight':
56804
+ case 'ArrowDown':
56805
+ nextActiveChild = getNextActiveTab(1);
56806
+ break;
56807
+ default:
56808
+ return;
56809
+ }
56810
+ if (!nextActiveChild) return;
56811
+ event.preventDefault();
56812
+ handleSelect(nextActiveChild.dataset[dataProp('EventKey')] || null, event);
56813
+ needsRefocusRef.current = true;
56814
+ forceUpdate();
56815
+ };
56816
+ React.useEffect(() => {
56817
+ if (listNode.current && needsRefocusRef.current) {
56818
+ const activeChild = listNode.current.querySelector(`[${EVENT_KEY_ATTR}][aria-selected=true]`);
56819
+ activeChild == null ? void 0 : activeChild.focus();
56820
+ }
56821
+ needsRefocusRef.current = false;
56822
+ });
56823
+ const mergedRef = useMergedRefs(ref, listNode);
56824
+ return /*#__PURE__*/jsxRuntime.jsx(SelectableContext.Provider, {
56825
+ value: handleSelect,
56826
+ children: /*#__PURE__*/jsxRuntime.jsx(NavContext.Provider, {
56827
+ value: {
56828
+ role,
56829
+ // used by NavLink to determine it's role
56830
+ activeKey: makeEventKey(activeKey),
56831
+ getControlledId: getControlledId || noop$2,
56832
+ getControllerId: getControllerId || noop$2
56833
+ },
56834
+ children: /*#__PURE__*/jsxRuntime.jsx(Component, Object.assign({}, props, {
56835
+ onKeyDown: handleKeyDown,
56836
+ ref: mergedRef,
56837
+ role: role
56838
+ }))
56839
+ })
56840
+ });
56841
+ });
56842
+ Nav.displayName = 'Nav';
56843
+ var BaseNav = Object.assign(Nav, {
56844
+ Item: NavItem
56845
+ });
56846
+
56560
56847
  const resolveContainerRef = (ref, document) => {
56561
56848
  if (!canUseDOM) return null;
56562
56849
  if (ref == null) return (document || ownerDocument()).body;
@@ -56716,7 +57003,179 @@ function hasClass(element, className) {
56716
57003
  return (" " + (element.className.baseVal || element.className) + " ").indexOf(" " + className + " ") !== -1;
56717
57004
  }
56718
57005
 
56719
- const noop$2 = () => {};
57006
+ var createChainableTypeChecker_1 = createCommonjsModule(function (module, exports) {
57007
+
57008
+ Object.defineProperty(exports, "__esModule", {
57009
+ value: true
57010
+ });
57011
+ exports.default = createChainableTypeChecker;
57012
+ /**
57013
+ * Copyright 2013-present, Facebook, Inc.
57014
+ * All rights reserved.
57015
+ *
57016
+ * This source code is licensed under the BSD-style license found in the
57017
+ * LICENSE file in the root directory of this source tree. An additional grant
57018
+ * of patent rights can be found in the PATENTS file in the same directory.
57019
+ */
57020
+
57021
+ // Mostly taken from ReactPropTypes.
57022
+
57023
+ function createChainableTypeChecker(validate) {
57024
+ function checkType(isRequired, props, propName, componentName, location, propFullName) {
57025
+ var componentNameSafe = componentName || '<<anonymous>>';
57026
+ var propFullNameSafe = propFullName || propName;
57027
+
57028
+ if (props[propName] == null) {
57029
+ if (isRequired) {
57030
+ return new Error('Required ' + location + ' `' + propFullNameSafe + '` was not specified ' + ('in `' + componentNameSafe + '`.'));
57031
+ }
57032
+
57033
+ return null;
57034
+ }
57035
+
57036
+ for (var _len = arguments.length, args = Array(_len > 6 ? _len - 6 : 0), _key = 6; _key < _len; _key++) {
57037
+ args[_key - 6] = arguments[_key];
57038
+ }
57039
+
57040
+ return validate.apply(undefined, [props, propName, componentNameSafe, location, propFullNameSafe].concat(args));
57041
+ }
57042
+
57043
+ var chainedCheckType = checkType.bind(null, false);
57044
+ chainedCheckType.isRequired = checkType.bind(null, true);
57045
+
57046
+ return chainedCheckType;
57047
+ }
57048
+ module.exports = exports['default'];
57049
+ });
57050
+
57051
+ unwrapExports(createChainableTypeChecker_1);
57052
+
57053
+ var all_1 = createCommonjsModule(function (module, exports) {
57054
+
57055
+ Object.defineProperty(exports, "__esModule", {
57056
+ value: true
57057
+ });
57058
+ exports.default = all;
57059
+
57060
+
57061
+
57062
+ var _createChainableTypeChecker2 = _interopRequireDefault(createChainableTypeChecker_1);
57063
+
57064
+ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
57065
+
57066
+ function all() {
57067
+ for (var _len = arguments.length, validators = Array(_len), _key = 0; _key < _len; _key++) {
57068
+ validators[_key] = arguments[_key];
57069
+ }
57070
+
57071
+ function allPropTypes() {
57072
+ for (var _len2 = arguments.length, args = Array(_len2), _key2 = 0; _key2 < _len2; _key2++) {
57073
+ args[_key2] = arguments[_key2];
57074
+ }
57075
+
57076
+ var error = null;
57077
+
57078
+ validators.forEach(function (validator) {
57079
+ if (error != null) {
57080
+ return;
57081
+ }
57082
+
57083
+ var result = validator.apply(undefined, args);
57084
+ if (result != null) {
57085
+ error = result;
57086
+ }
57087
+ });
57088
+
57089
+ return error;
57090
+ }
57091
+
57092
+ return (0, _createChainableTypeChecker2.default)(allPropTypes);
57093
+ }
57094
+ module.exports = exports['default'];
57095
+ });
57096
+
57097
+ unwrapExports(all_1);
57098
+
57099
+ var NavItem$1 = createWithBsPrefix('nav-item');
57100
+
57101
+ const NavLink = /*#__PURE__*/React.forwardRef(({
57102
+ bsPrefix,
57103
+ className,
57104
+ as: Component = Anchor,
57105
+ active,
57106
+ eventKey,
57107
+ disabled = false,
57108
+ ...props
57109
+ }, ref) => {
57110
+ bsPrefix = useBootstrapPrefix(bsPrefix, 'nav-link');
57111
+ const [navItemProps, meta] = useNavItem({
57112
+ key: makeEventKey(eventKey, props.href),
57113
+ active,
57114
+ disabled,
57115
+ ...props
57116
+ });
57117
+ return /*#__PURE__*/jsxRuntime.jsx(Component, {
57118
+ ...props,
57119
+ ...navItemProps,
57120
+ ref: ref,
57121
+ disabled: disabled,
57122
+ className: classnames(className, bsPrefix, disabled && 'disabled', meta.isActive && 'active')
57123
+ });
57124
+ });
57125
+ NavLink.displayName = 'NavLink';
57126
+
57127
+ const Nav$1 = /*#__PURE__*/React.forwardRef((uncontrolledProps, ref) => {
57128
+ const {
57129
+ as = 'div',
57130
+ bsPrefix: initialBsPrefix,
57131
+ variant,
57132
+ fill = false,
57133
+ justify = false,
57134
+ navbar,
57135
+ navbarScroll,
57136
+ className,
57137
+ activeKey,
57138
+ ...props
57139
+ } = useUncontrolled(uncontrolledProps, {
57140
+ activeKey: 'onSelect'
57141
+ });
57142
+ const bsPrefix = useBootstrapPrefix(initialBsPrefix, 'nav');
57143
+ let navbarBsPrefix;
57144
+ let cardHeaderBsPrefix;
57145
+ let isNavbar = false;
57146
+ const navbarContext = React.useContext(context$1);
57147
+ const cardHeaderContext = React.useContext(context);
57148
+ if (navbarContext) {
57149
+ navbarBsPrefix = navbarContext.bsPrefix;
57150
+ isNavbar = navbar == null ? true : navbar;
57151
+ } else if (cardHeaderContext) {
57152
+ ({
57153
+ cardHeaderBsPrefix
57154
+ } = cardHeaderContext);
57155
+ }
57156
+ return /*#__PURE__*/jsxRuntime.jsx(BaseNav, {
57157
+ as: as,
57158
+ ref: ref,
57159
+ activeKey: activeKey,
57160
+ className: classnames(className, {
57161
+ [bsPrefix]: !isNavbar,
57162
+ [`${navbarBsPrefix}-nav`]: isNavbar,
57163
+ [`${navbarBsPrefix}-nav-scroll`]: isNavbar && navbarScroll,
57164
+ [`${cardHeaderBsPrefix}-${variant}`]: !!cardHeaderBsPrefix,
57165
+ [`${bsPrefix}-${variant}`]: !!variant,
57166
+ [`${bsPrefix}-fill`]: fill,
57167
+ [`${bsPrefix}-justified`]: justify
57168
+ }),
57169
+ ...props
57170
+ });
57171
+ });
57172
+ Nav$1.displayName = 'Nav';
57173
+ var Nav$2 = Object.assign(Nav$1, {
57174
+ Item: NavItem$1,
57175
+ Link: NavLink
57176
+ });
57177
+
57178
+ const noop$3 = () => {};
56720
57179
  /**
56721
57180
  * The `useRootClose` hook registers your callback on the document
56722
57181
  * when rendered. Powers the `<Overlay/>` component. This is used achieve modal
@@ -56733,7 +57192,7 @@ function useRootClose(ref, onRootClose, {
56733
57192
  disabled,
56734
57193
  clickTrigger
56735
57194
  } = {}) {
56736
- const onClose = onRootClose || noop$2;
57195
+ const onClose = onRootClose || noop$3;
56737
57196
  useClickOutside(ref, onClose, {
56738
57197
  disabled,
56739
57198
  clickTrigger
@@ -57156,12 +57615,12 @@ function OverlayTrigger({
57156
57615
  });
57157
57616
  }
57158
57617
 
57159
- var styles$5 = {"vitro-action-handler":"_action-handler_vitro-action-handler_1_HNxCd","vitro-icon-before":"_action-handler_vitro-icon-before_3vTdV08","vitro-icon-progress":"_action-handler_vitro-icon-progress_28liEuB","vitro-icon-success":"_action-handler_vitro-icon-success_1jnQDIv","vitro-icon-error":"_action-handler_vitro-icon-error_3OPWhCB","vitro-button-close":"_action-handler_vitro-button-close_33qzSIU","vitro-flex":"_action-handler_vitro-flex_3Pyc7fz"};
57618
+ var styles$5 = {"vitro-action-handler":"_action-handler_vitro-action-handler_1_HNxCd","vitro-icon-before":"_action-handler_vitro-icon-before_3vTdV08","vitro-icon-progress":"_action-handler_vitro-icon-progress_28liEuB","vitro-icon-success":"_action-handler_vitro-icon-success_1jnQDIv","vitro-icon-error":"_action-handler_vitro-icon-error_3OPWhCB","vitro-button-close":"_action-handler_vitro-button-close_33qzSIU","vitro-flex":"_action-handler_vitro-flex_3Pyc7fz","vitro-interface-blur":"_action-handler_vitro-interface-blur_e0d8w42"};
57160
57619
 
57161
- var _excluded$1 = ["popper", "children", "show"];
57620
+ var _excluded$5 = ["popper", "children", "show"];
57162
57621
  var UpdatingPopover = React__default.forwardRef(function (_ref, ref) {
57163
57622
  var children = _ref.children,
57164
- props = _objectWithoutPropertiesLoose(_ref, _excluded$1);
57623
+ props = _objectWithoutPropertiesLoose(_ref, _excluded$5);
57165
57624
  return React__default.createElement("div", {
57166
57625
  className: styles$5["vitro-action-handler"]
57167
57626
  }, React__default.createElement(Popover$1, Object.assign({
@@ -57225,26 +57684,29 @@ var ActionHandler = function ActionHandler(props) {
57225
57684
  var _useState3 = React.useState(false),
57226
57685
  show = _useState3[0],
57227
57686
  setShow = _useState3[1];
57228
- var _useState4 = React.useState(actionMap.before),
57229
- currentAction = _useState4[0],
57230
- setCurrentAction = _useState4[1];
57231
- var _useState5 = React.useState(null),
57232
- icon = _useState5[0],
57233
- setIcon = _useState5[1];
57687
+ var _useState4 = React.useState(false),
57688
+ blockInterface = _useState4[0],
57689
+ setBlockInterface = _useState4[1];
57690
+ var _useState5 = React.useState(actionMap.before),
57691
+ currentAction = _useState5[0],
57692
+ setCurrentAction = _useState5[1];
57693
+ var _useState6 = React.useState(null),
57694
+ icon = _useState6[0],
57695
+ setIcon = _useState6[1];
57234
57696
  var localeService = inversifyReact.useInjection(SERVICE.LOCALE);
57235
57697
  React.useEffect(function () {
57236
- setIsCloseByOutsideClick(true);
57698
+ setIsCloseByOutsideClick(currentAction !== actionMap.progress);
57237
57699
  if (currentAction === actionMap.before) setIcon(styles$5['vitro-icon-before']);
57238
57700
  if (currentAction === actionMap.progress) {
57239
57701
  setIcon(styles$5['vitro-icon-progress']);
57240
57702
  }
57241
57703
  }, [currentAction]);
57242
57704
  React.useEffect(function () {
57243
- if (!props.showProgress && !props.showAfterAction && !props.isConfirm) {
57705
+ if (!props.isShowProgress && !props.isShowAfterAction && !props.isConfirm) {
57244
57706
  onStart();
57245
57707
  } else {
57246
- if (props.show) {
57247
- setShow(props.show);
57708
+ if (props.isShow) {
57709
+ setShow(props.isShow);
57248
57710
  if (props.isConfirm) {
57249
57711
  init();
57250
57712
  } else {
@@ -57284,7 +57746,7 @@ var ActionHandler = function ActionHandler(props) {
57284
57746
  if (props.onAfterAction) {
57285
57747
  props.onAfterAction(error, successResult, failResult);
57286
57748
  }
57287
- if (!props.showAfterAction) {
57749
+ if (!props.isShowAfterAction) {
57288
57750
  window.document.body.click();
57289
57751
  return;
57290
57752
  }
@@ -57292,6 +57754,9 @@ var ActionHandler = function ActionHandler(props) {
57292
57754
  if (props.onAfterActionClose) {
57293
57755
  props.onAfterActionClose(error, successResult, failResult);
57294
57756
  }
57757
+ if (props.isBlockInterface) {
57758
+ setBlockInterface(false);
57759
+ }
57295
57760
  window.document.body.click();
57296
57761
  }, props.durationMs || 2000);
57297
57762
  setIcon(success ? styles$5['vitro-icon-success'] : styles$5['vitro-icon-error']);
@@ -57343,7 +57808,10 @@ var ActionHandler = function ActionHandler(props) {
57343
57808
  }
57344
57809
  }
57345
57810
  setCurrentAction(actionMap.progress);
57346
- if (!props.showProgress && !props.showAfterAction && !props.isConfirm) {
57811
+ if (props.isBlockInterface) {
57812
+ setBlockInterface(true);
57813
+ }
57814
+ if (!props.isShowProgress && !props.isShowAfterAction && !props.isConfirm) {
57347
57815
  setIsCloseByOutsideClick(true);
57348
57816
  window.document.body.click();
57349
57817
  }
@@ -57388,7 +57856,7 @@ var ActionHandler = function ActionHandler(props) {
57388
57856
  }
57389
57857
  };
57390
57858
  var onEnter = function onEnter() {
57391
- if (!props.showProgress && !props.showAfterAction && !props.isConfirm) {
57859
+ if (!props.isShowProgress && !props.isShowAfterAction && !props.isConfirm) {
57392
57860
  window.document.body.click();
57393
57861
  }
57394
57862
  if (currentAction !== actionMap.progress) {
@@ -57403,6 +57871,11 @@ var ActionHandler = function ActionHandler(props) {
57403
57871
  window.document.body.click();
57404
57872
  }
57405
57873
  };
57874
+ var onHide = function onHide() {
57875
+ if (isCloseByOutsideClick) {
57876
+ setShow(false);
57877
+ }
57878
+ };
57406
57879
  var showButtonGroup = props.isConfirm && (currentAction === actionMap.before || currentAction === actionMap.progress && itemCount > 1);
57407
57880
  return React__default.createElement(React__default.Fragment, null, props.children && React__default.createElement(OverlayTrigger, {
57408
57881
  trigger: TRIGGER.CLICK,
@@ -57410,7 +57883,7 @@ var ActionHandler = function ActionHandler(props) {
57410
57883
  rootClose: isCloseByOutsideClick,
57411
57884
  placement: props.placement || PLACEMENT.TOP,
57412
57885
  overlay: React__default.createElement(UpdatingPopover, null, React__default.createElement("div", {
57413
- className: styles$5["vitro-flex"]
57886
+ className: styles$5['vitro-flex']
57414
57887
  }, icon && React__default.createElement("div", {
57415
57888
  className: icon
57416
57889
  }), text), showButtonGroup && React__default.createElement(commonUi.ButtonGroup, null, React__default.createElement(commonUi.Button, {
@@ -57420,18 +57893,16 @@ var ActionHandler = function ActionHandler(props) {
57420
57893
  }), React__default.createElement(commonUi.Button, {
57421
57894
  onClick: cancel,
57422
57895
  text: localeService.create(LOCALE.NO) || props.labelNo,
57423
- className: styles$5["vitro-button-close"]
57896
+ className: styles$5['vitro-button-close']
57424
57897
  })))
57425
57898
  }, React__default.createElement("div", null, props.children)), props.target && !props.children && React__default.createElement(Overlay$1, {
57426
57899
  show: show,
57427
57900
  target: props.target,
57428
57901
  rootClose: isCloseByOutsideClick,
57429
- onHide: function onHide() {
57430
- return setShow(false);
57431
- },
57902
+ onHide: onHide,
57432
57903
  placement: props.placement || PLACEMENT.TOP
57433
57904
  }, React__default.createElement(UpdatingPopover, null, React__default.createElement("div", {
57434
- className: styles$5["vitro-flex"]
57905
+ className: styles$5['vitro-flex']
57435
57906
  }, icon && React__default.createElement("div", {
57436
57907
  className: icon
57437
57908
  }), text), showButtonGroup && React__default.createElement(commonUi.ButtonGroup, null, React__default.createElement(commonUi.Button, {
@@ -57441,8 +57912,223 @@ var ActionHandler = function ActionHandler(props) {
57441
57912
  }), React__default.createElement(commonUi.Button, {
57442
57913
  onClick: cancel,
57443
57914
  text: localeService.create(LOCALE.NO) || props.labelNo,
57444
- className: styles$5["vitro-button-close"]
57445
- })))));
57915
+ className: styles$5['vitro-button-close']
57916
+ })))), blockInterface && React__default.createElement("div", {
57917
+ className: styles$5['vitro-interface-blur']
57918
+ }));
57919
+ };
57920
+
57921
+ var styles$6 = {"vitro-view-part":"_view-part_vitro-view-part_1jRQS_n"};
57922
+
57923
+ var ViewPart = function ViewPart(props) {
57924
+ var _useState = React.useState(null),
57925
+ component = _useState[0],
57926
+ setComponent = _useState[1];
57927
+ React.useEffect(function () {
57928
+ if (props.component) {
57929
+ var _component = React__default.createElement(props.component, props.props);
57930
+ setComponent(_component);
57931
+ } else {
57932
+ setComponent(null);
57933
+ }
57934
+ }, [props.component]);
57935
+ return React__default.createElement("div", {
57936
+ className: styles$6["vitro-view-part"]
57937
+ }, component);
57938
+ };
57939
+
57940
+ var styles$7 = {"vitro-view":"_view_vitro-view_1PIFv5i"};
57941
+
57942
+ var styles$8 = {"vitro-tab":"_tab-group_vitro-tab_1JjKD6A","vitro-item":"_tab-group_vitro-item_1rEUKKg","active":"_tab-group_active_1bm9FlF","vitro-dropdown-button":"_tab-group_vitro-dropdown-button_2khJUBS"};
57943
+
57944
+ var OverflowButton = function OverflowButton(props) {
57945
+ if (!props.list || !props.list.length) return null;
57946
+ return React__default.createElement(commonUi.DropdownButton, {
57947
+ className: styles$8['vitro-dropdown-button'],
57948
+ itemList: props.list.map(function (x, i) {
57949
+ return _extends({}, x, {
57950
+ value: props.offset + i,
57951
+ key: x.text,
57952
+ onClick: function onClick() {
57953
+ return props.onSelect(props.offset + i);
57954
+ }
57955
+ });
57956
+ })
57957
+ });
57958
+ };
57959
+
57960
+ var Tab = function Tab(props) {
57961
+ return React__default.createElement("div", {
57962
+ key: props.index,
57963
+ className: styles$8['vitro-item']
57964
+ }, React__default.createElement(Nav$2.Item, {
57965
+ className: props.active ? styles$8['active'] : undefined,
57966
+ onClick: function onClick() {
57967
+ return props.onClick(props.index);
57968
+ }
57969
+ }, React__default.createElement(Nav$2.Link, {
57970
+ eventKey: props.eventKey
57971
+ }, React__default.createElement("span", null, props.icon && React__default.createElement(commonUi.Image, {
57972
+ src: props.icon
57973
+ }), props.title))));
57974
+ };
57975
+
57976
+ var TabGroupHeader = function TabGroupHeader(props) {
57977
+ var overflowTabList = [];
57978
+ var tabMinWidth = 120;
57979
+ return React__default.createElement(Nav$2, null, props.width > 0 && props.itemList && props.itemList.map(function (item, index) {
57980
+ if ((index + 1) * tabMinWidth < props.width || !props.wrap) {
57981
+ return React__default.createElement(Tab, {
57982
+ key: item.text,
57983
+ index: index,
57984
+ active: index === props.currentTab,
57985
+ onClick: props.changeTab,
57986
+ eventKey: item.eventKey,
57987
+ icon: item.icon,
57988
+ title: item.text
57989
+ });
57990
+ }
57991
+ overflowTabList.push(item);
57992
+ return null;
57993
+ }), props.itemList && props.wrap && React__default.createElement(OverflowButton, {
57994
+ list: overflowTabList,
57995
+ offset: props.itemList.length - overflowTabList.length,
57996
+ onSelect: props.changeTab
57997
+ }));
57998
+ };
57999
+
58000
+ var w$3 = window;
58001
+ var TabGroupComponent = function TabGroupComponent(props) {
58002
+ var _useState = React.useState(0),
58003
+ width = _useState[0],
58004
+ setWidth = _useState[1];
58005
+ var _useState2 = React.useState(0),
58006
+ currentTab = _useState2[0],
58007
+ setCurrentTab = _useState2[1];
58008
+ var _useState3 = React.useState(null),
58009
+ component = _useState3[0],
58010
+ setComponent = _useState3[1];
58011
+ var changeTab = function changeTab(index) {
58012
+ setCurrentTab(index);
58013
+ if (props.onChange) {
58014
+ props.onChange(index);
58015
+ }
58016
+ };
58017
+ var ref = React.useRef(null);
58018
+ React.useEffect(function () {
58019
+ if (ref.current) {
58020
+ setWidth(ref.current.offsetWidth);
58021
+ if (props.wrap) {
58022
+ if (w$3.addResizeListener) {
58023
+ w$3.addResizeListener(ref.current, function () {
58024
+ return setWidth(ref.current.offsetWidth);
58025
+ });
58026
+ }
58027
+ }
58028
+ }
58029
+ }, [ref.current]);
58030
+ React.useEffect(function () {
58031
+ if (props.itemList) {
58032
+ if (props.itemList[currentTab] && props.itemList[currentTab].content) {
58033
+ var c = React__default.createElement(props.itemList[currentTab].content.component, props.itemList[currentTab].content.props);
58034
+ setComponent(c);
58035
+ } else if (props.itemList[0]) {
58036
+ setCurrentTab(0);
58037
+ }
58038
+ } else {
58039
+ setComponent(null);
58040
+ }
58041
+ }, [currentTab, props.itemList]);
58042
+ return React__default.createElement("div", {
58043
+ className: styles$8['vitro-tab'],
58044
+ ref: ref
58045
+ }, React__default.createElement(TabGroupHeader, {
58046
+ itemList: props.itemList,
58047
+ width: width,
58048
+ currentTab: currentTab,
58049
+ changeTab: changeTab,
58050
+ wrap: props.wrap
58051
+ }), React__default.createElement("div", {
58052
+ className: 'vitro-content'
58053
+ }, component));
58054
+ };
58055
+
58056
+ var tabScriptList = [{
58057
+ url: 'js/resizeEventListener.js',
58058
+ id: 'vitro-script-event-resizer'
58059
+ }, {
58060
+ url: 'js/perfect-scrollbar.min.js',
58061
+ id: 'vitro-script-perfect-scroll'
58062
+ }];
58063
+
58064
+ var TabGroup = function TabGroup(props) {
58065
+ var scriptList = tabScriptList;
58066
+ return props.wrap ? React__default.createElement(commonUi.ScriptLoader, {
58067
+ urlList: scriptList.map(function (x) {
58068
+ return x.url;
58069
+ }),
58070
+ idList: scriptList.map(function (x) {
58071
+ return x.id;
58072
+ }),
58073
+ placeholder: props.placeholder
58074
+ }, React__default.createElement(TabGroupComponent, Object.assign({}, props))) : React__default.createElement(TabGroupComponent, Object.assign({}, props));
58075
+ };
58076
+
58077
+ var styles$9 = {"vitro-control":"_control-group_vitro-control_O12WSU5","vitro-control-row":"_control-group_vitro-control-row_3H0qlpT","vitro-label":"_control-group_vitro-label_3M058up"};
58078
+
58079
+ var ControlGroup = function ControlGroup(props) {
58080
+ if (props.horizontal) {
58081
+ return React__default.createElement("div", {
58082
+ className: 'container ' + styles$9['vitro-control']
58083
+ }, React__default.createElement("div", {
58084
+ className: props.as
58085
+ }, props.children));
58086
+ }
58087
+ return React__default.createElement("div", {
58088
+ className: styles$9['vitro-control-row']
58089
+ }, props.children);
58090
+ };
58091
+
58092
+ var View = function View(props) {
58093
+ var _useState = React.useState([]),
58094
+ tabList = _useState[0],
58095
+ setTabList = _useState[1];
58096
+ var createTabList = function createTabList(tabList) {
58097
+ return tabList.map(function (tab) {
58098
+ return {
58099
+ text: tab.text,
58100
+ content: {
58101
+ component: GetGroupControl,
58102
+ props: {
58103
+ item: props.item,
58104
+ componentList: tab.componentList
58105
+ }
58106
+ }
58107
+ };
58108
+ });
58109
+ };
58110
+ React.useEffect(function () {
58111
+ if (props.tabList) {
58112
+ setTabList(createTabList(props.tabList));
58113
+ }
58114
+ }, [props.tabList]);
58115
+ return tabList && React__default.createElement("div", {
58116
+ className: styles$7["vitro-view"]
58117
+ }, React__default.createElement(TabGroup, {
58118
+ itemList: tabList,
58119
+ wrap: true
58120
+ }));
58121
+ };
58122
+ var GetGroupControl = function GetGroupControl(props) {
58123
+ return React__default.createElement(ControlGroup, {
58124
+ horizontal: true
58125
+ }, props.componentList.map(function (viewPart) {
58126
+ return React__default.createElement(ViewPart, {
58127
+ component: viewPart.component,
58128
+ settings: viewPart.settings,
58129
+ props: props
58130
+ });
58131
+ }));
57446
58132
  };
57447
58133
 
57448
58134
  exports.ACTION_HANDLER = ActionHandlerConstants;
@@ -57450,12 +58136,15 @@ exports.ActionHandler = ActionHandler;
57450
58136
  exports.Breadcrumbs = Breadcrumbs;
57451
58137
  exports.ComponentLoader = ComponentLoader;
57452
58138
  exports.ComponentLoaderContextImpl = ComponentLoaderContextImpl;
58139
+ exports.ControlGroup = ControlGroup;
57453
58140
  exports.MicroFrontend = MicroFrontend;
57454
58141
  exports.TABLE_VIEW = TableViewConstants;
57455
58142
  exports.TREE_VIEW = TreeViewConstants;
58143
+ exports.TabGroup = TabGroup;
57456
58144
  exports.TableView = TableView;
57457
58145
  exports.TelerikUploader = TelerikUploader;
57458
58146
  exports.TelerikUploaderContextImpl = TelerikUploaderContextImpl;
57459
58147
  exports.TopLevelMenu = TopLevelMenu;
57460
58148
  exports.TreeView = TreeView;
58149
+ exports.View = View;
57461
58150
  //# sourceMappingURL=index.js.map