@vitrosoftware/common-ui-ts 1.0.10 → 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.
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 = {};
@@ -20964,6 +20982,21 @@ var classnames = createCommonjsModule(function (module) {
20964
20982
  }());
20965
20983
  });
20966
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
+
20967
21000
  function _objectWithoutPropertiesLoose$1(source, excluded) {
20968
21001
  if (source == null) return {};
20969
21002
  var target = {};
@@ -20977,6 +21010,14 @@ function _objectWithoutPropertiesLoose$1(source, excluded) {
20977
21010
  return target;
20978
21011
  }
20979
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
+
20980
21021
  function useUncontrolledProp(propValue, defaultValue, handler) {
20981
21022
  var wasPropRef = React.useRef(propValue !== undefined);
20982
21023
 
@@ -21005,6 +21046,24 @@ function useUncontrolledProp(propValue, defaultValue, handler) {
21005
21046
  setState(value);
21006
21047
  }, [handler])];
21007
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
+ }
21008
21067
 
21009
21068
  function _setPrototypeOf(o, p) {
21010
21069
  _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) {
@@ -54041,6 +54100,129 @@ var isDOM = typeof document !== 'undefined';
54041
54100
 
54042
54101
  var useIsomorphicEffect = isDOM || isReactNative ? React.useLayoutEffect : React.useEffect;
54043
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
+
54044
54226
  const fadeStyles = {
54045
54227
  [ENTERING]: 'show',
54046
54228
  [ENTERED]: 'show'
@@ -54112,6 +54294,9 @@ function createWithBsPrefix(prefix, {
54112
54294
  return BsComponent;
54113
54295
  }
54114
54296
 
54297
+ const context = /*#__PURE__*/React.createContext(null);
54298
+ context.displayName = 'CardHeaderContext';
54299
+
54115
54300
  /**
54116
54301
  * Returns a ref that is immediately updated with the new value
54117
54302
  *
@@ -54213,6 +54398,46 @@ function useTimeout() {
54213
54398
  }, []);
54214
54399
  }
54215
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
+
54216
54441
  var has$2 = Object.prototype.hasOwnProperty;
54217
54442
 
54218
54443
  function find(iter, tar, key) {
@@ -56015,8 +56240,8 @@ const createPopper = popperGenerator({
56015
56240
  defaultModifiers: [hide$1, popperOffsets$1, computeStyles$1, eventListeners, offset$1, flip$1, preventOverflow$1, arrow$1]
56016
56241
  });
56017
56242
 
56018
- const _excluded = ["enabled", "placement", "strategy", "modifiers"];
56019
- 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; }
56020
56245
  const disabledApplyStylesModifier = {
56021
56246
  name: 'applyStyles',
56022
56247
  enabled: false,
@@ -56083,7 +56308,7 @@ function usePopper(referenceElement, popperElement, _ref = {}) {
56083
56308
  strategy = 'absolute',
56084
56309
  modifiers = EMPTY_MODIFIERS
56085
56310
  } = _ref,
56086
- config = _objectWithoutPropertiesLoose$2(_ref, _excluded);
56311
+ config = _objectWithoutPropertiesLoose$4(_ref, _excluded$2);
56087
56312
  const prevModifiers = React.useRef(modifiers);
56088
56313
  const popperInstanceRef = React.useRef();
56089
56314
  const update = React.useCallback(() => {
@@ -56397,6 +56622,24 @@ function mergeOptionsWithPopperConfig({
56397
56622
  });
56398
56623
  }
56399
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
+
56400
56643
  const Context = /*#__PURE__*/React.createContext(canUseDOM ? window : undefined);
56401
56644
 
56402
56645
  /**
@@ -56409,6 +56652,198 @@ function useWindow() {
56409
56652
  return React.useContext(Context);
56410
56653
  }
56411
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
+
56412
56847
  const resolveContainerRef = (ref, document) => {
56413
56848
  if (!canUseDOM) return null;
56414
56849
  if (ref == null) return (document || ownerDocument()).body;
@@ -56568,7 +57003,179 @@ function hasClass(element, className) {
56568
57003
  return (" " + (element.className.baseVal || element.className) + " ").indexOf(" " + className + " ") !== -1;
56569
57004
  }
56570
57005
 
56571
- 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 = () => {};
56572
57179
  /**
56573
57180
  * The `useRootClose` hook registers your callback on the document
56574
57181
  * when rendered. Powers the `<Overlay/>` component. This is used achieve modal
@@ -56585,7 +57192,7 @@ function useRootClose(ref, onRootClose, {
56585
57192
  disabled,
56586
57193
  clickTrigger
56587
57194
  } = {}) {
56588
- const onClose = onRootClose || noop$2;
57195
+ const onClose = onRootClose || noop$3;
56589
57196
  useClickOutside(ref, onClose, {
56590
57197
  disabled,
56591
57198
  clickTrigger
@@ -57008,12 +57615,12 @@ function OverlayTrigger({
57008
57615
  });
57009
57616
  }
57010
57617
 
57011
- 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"};
57012
57619
 
57013
- var _excluded$1 = ["popper", "children", "show"];
57620
+ var _excluded$5 = ["popper", "children", "show"];
57014
57621
  var UpdatingPopover = React__default.forwardRef(function (_ref, ref) {
57015
57622
  var children = _ref.children,
57016
- props = _objectWithoutPropertiesLoose(_ref, _excluded$1);
57623
+ props = _objectWithoutPropertiesLoose(_ref, _excluded$5);
57017
57624
  return React__default.createElement("div", {
57018
57625
  className: styles$5["vitro-action-handler"]
57019
57626
  }, React__default.createElement(Popover$1, Object.assign({
@@ -57077,26 +57684,29 @@ var ActionHandler = function ActionHandler(props) {
57077
57684
  var _useState3 = React.useState(false),
57078
57685
  show = _useState3[0],
57079
57686
  setShow = _useState3[1];
57080
- var _useState4 = React.useState(actionMap.before),
57081
- currentAction = _useState4[0],
57082
- setCurrentAction = _useState4[1];
57083
- var _useState5 = React.useState(null),
57084
- icon = _useState5[0],
57085
- 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];
57086
57696
  var localeService = inversifyReact.useInjection(SERVICE.LOCALE);
57087
57697
  React.useEffect(function () {
57088
- setIsCloseByOutsideClick(true);
57698
+ setIsCloseByOutsideClick(currentAction !== actionMap.progress);
57089
57699
  if (currentAction === actionMap.before) setIcon(styles$5['vitro-icon-before']);
57090
57700
  if (currentAction === actionMap.progress) {
57091
57701
  setIcon(styles$5['vitro-icon-progress']);
57092
57702
  }
57093
57703
  }, [currentAction]);
57094
57704
  React.useEffect(function () {
57095
- if (!props.showProgress && !props.showAfterAction && !props.isConfirm) {
57705
+ if (!props.isShowProgress && !props.isShowAfterAction && !props.isConfirm) {
57096
57706
  onStart();
57097
57707
  } else {
57098
- if (props.show) {
57099
- setShow(props.show);
57708
+ if (props.isShow) {
57709
+ setShow(props.isShow);
57100
57710
  if (props.isConfirm) {
57101
57711
  init();
57102
57712
  } else {
@@ -57136,7 +57746,7 @@ var ActionHandler = function ActionHandler(props) {
57136
57746
  if (props.onAfterAction) {
57137
57747
  props.onAfterAction(error, successResult, failResult);
57138
57748
  }
57139
- if (!props.showAfterAction) {
57749
+ if (!props.isShowAfterAction) {
57140
57750
  window.document.body.click();
57141
57751
  return;
57142
57752
  }
@@ -57144,6 +57754,9 @@ var ActionHandler = function ActionHandler(props) {
57144
57754
  if (props.onAfterActionClose) {
57145
57755
  props.onAfterActionClose(error, successResult, failResult);
57146
57756
  }
57757
+ if (props.isBlockInterface) {
57758
+ setBlockInterface(false);
57759
+ }
57147
57760
  window.document.body.click();
57148
57761
  }, props.durationMs || 2000);
57149
57762
  setIcon(success ? styles$5['vitro-icon-success'] : styles$5['vitro-icon-error']);
@@ -57195,7 +57808,10 @@ var ActionHandler = function ActionHandler(props) {
57195
57808
  }
57196
57809
  }
57197
57810
  setCurrentAction(actionMap.progress);
57198
- if (!props.showProgress && !props.showAfterAction && !props.isConfirm) {
57811
+ if (props.isBlockInterface) {
57812
+ setBlockInterface(true);
57813
+ }
57814
+ if (!props.isShowProgress && !props.isShowAfterAction && !props.isConfirm) {
57199
57815
  setIsCloseByOutsideClick(true);
57200
57816
  window.document.body.click();
57201
57817
  }
@@ -57240,7 +57856,7 @@ var ActionHandler = function ActionHandler(props) {
57240
57856
  }
57241
57857
  };
57242
57858
  var onEnter = function onEnter() {
57243
- if (!props.showProgress && !props.showAfterAction && !props.isConfirm) {
57859
+ if (!props.isShowProgress && !props.isShowAfterAction && !props.isConfirm) {
57244
57860
  window.document.body.click();
57245
57861
  }
57246
57862
  if (currentAction !== actionMap.progress) {
@@ -57255,6 +57871,11 @@ var ActionHandler = function ActionHandler(props) {
57255
57871
  window.document.body.click();
57256
57872
  }
57257
57873
  };
57874
+ var onHide = function onHide() {
57875
+ if (isCloseByOutsideClick) {
57876
+ setShow(false);
57877
+ }
57878
+ };
57258
57879
  var showButtonGroup = props.isConfirm && (currentAction === actionMap.before || currentAction === actionMap.progress && itemCount > 1);
57259
57880
  return React__default.createElement(React__default.Fragment, null, props.children && React__default.createElement(OverlayTrigger, {
57260
57881
  trigger: TRIGGER.CLICK,
@@ -57262,7 +57883,7 @@ var ActionHandler = function ActionHandler(props) {
57262
57883
  rootClose: isCloseByOutsideClick,
57263
57884
  placement: props.placement || PLACEMENT.TOP,
57264
57885
  overlay: React__default.createElement(UpdatingPopover, null, React__default.createElement("div", {
57265
- className: styles$5["vitro-flex"]
57886
+ className: styles$5['vitro-flex']
57266
57887
  }, icon && React__default.createElement("div", {
57267
57888
  className: icon
57268
57889
  }), text), showButtonGroup && React__default.createElement(commonUi.ButtonGroup, null, React__default.createElement(commonUi.Button, {
@@ -57272,18 +57893,16 @@ var ActionHandler = function ActionHandler(props) {
57272
57893
  }), React__default.createElement(commonUi.Button, {
57273
57894
  onClick: cancel,
57274
57895
  text: localeService.create(LOCALE.NO) || props.labelNo,
57275
- className: styles$5["vitro-button-close"]
57896
+ className: styles$5['vitro-button-close']
57276
57897
  })))
57277
57898
  }, React__default.createElement("div", null, props.children)), props.target && !props.children && React__default.createElement(Overlay$1, {
57278
57899
  show: show,
57279
57900
  target: props.target,
57280
57901
  rootClose: isCloseByOutsideClick,
57281
- onHide: function onHide() {
57282
- return setShow(false);
57283
- },
57902
+ onHide: onHide,
57284
57903
  placement: props.placement || PLACEMENT.TOP
57285
57904
  }, React__default.createElement(UpdatingPopover, null, React__default.createElement("div", {
57286
- className: styles$5["vitro-flex"]
57905
+ className: styles$5['vitro-flex']
57287
57906
  }, icon && React__default.createElement("div", {
57288
57907
  className: icon
57289
57908
  }), text), showButtonGroup && React__default.createElement(commonUi.ButtonGroup, null, React__default.createElement(commonUi.Button, {
@@ -57293,8 +57912,223 @@ var ActionHandler = function ActionHandler(props) {
57293
57912
  }), React__default.createElement(commonUi.Button, {
57294
57913
  onClick: cancel,
57295
57914
  text: localeService.create(LOCALE.NO) || props.labelNo,
57296
- className: styles$5["vitro-button-close"]
57297
- })))));
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
+ }));
57298
58132
  };
57299
58133
 
57300
58134
  exports.ACTION_HANDLER = ActionHandlerConstants;
@@ -57302,12 +58136,15 @@ exports.ActionHandler = ActionHandler;
57302
58136
  exports.Breadcrumbs = Breadcrumbs;
57303
58137
  exports.ComponentLoader = ComponentLoader;
57304
58138
  exports.ComponentLoaderContextImpl = ComponentLoaderContextImpl;
58139
+ exports.ControlGroup = ControlGroup;
57305
58140
  exports.MicroFrontend = MicroFrontend;
57306
58141
  exports.TABLE_VIEW = TableViewConstants;
57307
58142
  exports.TREE_VIEW = TreeViewConstants;
58143
+ exports.TabGroup = TabGroup;
57308
58144
  exports.TableView = TableView;
57309
58145
  exports.TelerikUploader = TelerikUploader;
57310
58146
  exports.TelerikUploaderContextImpl = TelerikUploaderContextImpl;
57311
58147
  exports.TopLevelMenu = TopLevelMenu;
57312
58148
  exports.TreeView = TreeView;
58149
+ exports.View = View;
57313
58150
  //# sourceMappingURL=index.js.map