@7shifts/sous-chef 3.10.3 → 3.11.1
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/empty_states/EmptyStateContainer/EmptyStateContainerCTA/EmptyStateContainerCTA.d.ts +2 -1
- package/dist/forms/TimeField/TimeField.d.ts +7 -1
- package/dist/forms/TimeField/TimeFieldDropdown/TimeFieldDropdown.d.ts +12 -0
- package/dist/forms/TimeField/TimeFieldDropdown/index.d.ts +1 -0
- package/dist/forms/TimeField/TimeFieldDropdownTrigger/TimeFieldDropdownTrigger.d.ts +9 -0
- package/dist/forms/TimeField/TimeFieldDropdownTrigger/index.d.ts +1 -0
- package/dist/forms/TimeField/TimeFieldInput/TimeFieldInput.d.ts +7 -0
- package/dist/forms/TimeField/TimeFieldInput/index.d.ts +1 -0
- package/dist/forms/TimeField/domain.d.ts +1 -0
- package/dist/forms/hooks/useRangeFieldControllers.d.ts +7 -8
- package/dist/index.css +223 -208
- package/dist/index.js +1443 -1163
- package/dist/index.js.map +1 -1
- package/dist/index.modern.js +1443 -1163
- package/dist/index.modern.js.map +1 -1
- package/dist/lists/DataTableRow/DataTableRow.d.ts +1 -1
- package/dist/overlay/Dropdown/Dropdown.d.ts +5 -3
- package/dist/overlay/Dropdown/DropdownContext.d.ts +1 -1
- package/dist/overlay/DropdownList/DropdownList.d.ts +1 -0
- package/dist/overlay/DropdownList/domain.d.ts +1 -0
- package/dist/overlay/DropdownPane/DropdownPane.d.ts +1 -0
- package/dist/overlay/Modal/ModalContext.d.ts +7 -0
- package/dist/overlay/Modal/ModalHeader/ModalHeader.d.ts +1 -1
- package/dist/overlay/hooks/useListKeyboardNavigation/useListKeyboardNavigation.d.ts +1 -0
- package/dist/utils/date.d.ts +5 -0
- package/package.json +1 -1
package/dist/index.modern.js
CHANGED
|
@@ -10,13 +10,13 @@ import dateFnsFormat from 'date-fns/format';
|
|
|
10
10
|
import dateFnsParse from 'date-fns/parse';
|
|
11
11
|
import startOfDay from 'date-fns/startOfDay';
|
|
12
12
|
import { debounce } from 'lodash-es';
|
|
13
|
+
import parseTime from 'time-autocomplete/src/core/AMPMParser';
|
|
13
14
|
import Select, { components } from 'react-select';
|
|
14
15
|
import { Link as Link$1 } from 'react-router-dom';
|
|
15
16
|
import AsyncSelect from 'react-select/async';
|
|
16
17
|
import DayPickerInput from 'react-day-picker/DayPickerInput';
|
|
17
18
|
import { isDate, startOfDay as startOfDay$1 } from 'date-fns';
|
|
18
19
|
import eachDayOfInterval from 'date-fns/eachDayOfInterval';
|
|
19
|
-
import parseTime from 'time-autocomplete/src/core/AMPMParser';
|
|
20
20
|
|
|
21
21
|
function _extends() {
|
|
22
22
|
_extends = Object.assign || function (target) {
|
|
@@ -4442,6 +4442,7 @@ var PaneOverlay = function PaneOverlay(_ref) {
|
|
|
4442
4442
|
var _classNames;
|
|
4443
4443
|
|
|
4444
4444
|
var width = _ref.width,
|
|
4445
|
+
maxHeight = _ref.maxHeight,
|
|
4445
4446
|
alignment = _ref.alignment,
|
|
4446
4447
|
onMouseEnter = _ref.onMouseEnter,
|
|
4447
4448
|
onMouseLeave = _ref.onMouseLeave,
|
|
@@ -4462,7 +4463,7 @@ var PaneOverlay = function PaneOverlay(_ref) {
|
|
|
4462
4463
|
}, []);
|
|
4463
4464
|
useOnClickOutside([paneRef, triggerRef], clickOutsideCallback);
|
|
4464
4465
|
useLayoutEffect(function () {
|
|
4465
|
-
if (!(triggerRef !== null && triggerRef !== void 0 && triggerRef.current) || !(paneRef !== null && paneRef !== void 0 && paneRef.current)) {
|
|
4466
|
+
if (!triggerRef || !('current' in triggerRef) || !(triggerRef !== null && triggerRef !== void 0 && triggerRef.current) || !(paneRef !== null && paneRef !== void 0 && paneRef.current)) {
|
|
4466
4467
|
return;
|
|
4467
4468
|
}
|
|
4468
4469
|
|
|
@@ -4473,10 +4474,14 @@ var PaneOverlay = function PaneOverlay(_ref) {
|
|
|
4473
4474
|
}, [triggerRef]);
|
|
4474
4475
|
var handleEscapeKey = useCallback(onToggleDropdown, []);
|
|
4475
4476
|
useKeyPress(['Escape'], handleEscapeKey);
|
|
4477
|
+
var overflow = maxHeight ? 'scroll' : undefined;
|
|
4476
4478
|
return React__default.createElement("div", {
|
|
4477
4479
|
className: classnames(styles$b['dropdown-pane'], (_classNames = {}, _classNames[styles$b['dropdown-pane--with-padding']] = true, _classNames)),
|
|
4478
4480
|
style: _extends({}, position, {
|
|
4479
|
-
width: width
|
|
4481
|
+
width: width,
|
|
4482
|
+
maxHeight: maxHeight,
|
|
4483
|
+
overflow: overflow,
|
|
4484
|
+
zIndex: Z_INDEX_LAYERS.MENU
|
|
4480
4485
|
}),
|
|
4481
4486
|
ref: paneRef,
|
|
4482
4487
|
onMouseEnter: onMouseEnter,
|
|
@@ -4512,1151 +4517,1369 @@ var DROPDOWN_TRIGGER = {
|
|
|
4512
4517
|
CLICK: 'click'
|
|
4513
4518
|
};
|
|
4514
4519
|
|
|
4515
|
-
var
|
|
4516
|
-
var trigger = _ref.trigger,
|
|
4517
|
-
_ref$triggersOn = _ref.triggersOn,
|
|
4518
|
-
triggersOn = _ref$triggersOn === void 0 ? DROPDOWN_TRIGGER.CLICK : _ref$triggersOn,
|
|
4519
|
-
_ref$alignment = _ref.alignment,
|
|
4520
|
-
alignment = _ref$alignment === void 0 ? DROPDOWN_ALIGNEMNT.RIGHT : _ref$alignment,
|
|
4521
|
-
width = _ref.width,
|
|
4522
|
-
testId = _ref.testId,
|
|
4523
|
-
children = _ref.children;
|
|
4524
|
-
|
|
4525
|
-
var _useState = useState(false),
|
|
4526
|
-
isOpen = _useState[0],
|
|
4527
|
-
setIsOpen = _useState[1];
|
|
4528
|
-
|
|
4529
|
-
var triggerRef = useRef(null);
|
|
4530
|
-
var paneRef = useRef(null);
|
|
4531
|
-
var isFocusingOverlay = useRef(false);
|
|
4532
|
-
|
|
4533
|
-
var handleToggleDropdown = function handleToggleDropdown() {
|
|
4534
|
-
return setIsOpen(!isOpen);
|
|
4535
|
-
};
|
|
4536
|
-
|
|
4537
|
-
var handleMouseClick = function handleMouseClick(e) {
|
|
4538
|
-
handleToggleDropdown();
|
|
4539
|
-
e.stopPropagation();
|
|
4540
|
-
|
|
4541
|
-
if ('onClick' in trigger.props) {
|
|
4542
|
-
trigger.props.onClick(e);
|
|
4543
|
-
}
|
|
4544
|
-
};
|
|
4520
|
+
var styles$d = {"overlay":"_2puqJ","overlay--after-open":"_1167h","overlay--before-close":"_t_t7L","content":"_wQQ_2","content--after-open":"_3jwux","content--before-close":"_2c2QP"};
|
|
4545
4521
|
|
|
4546
|
-
|
|
4547
|
-
if (triggersOn !== 'hover') {
|
|
4548
|
-
return;
|
|
4549
|
-
}
|
|
4522
|
+
var styles$e = {"header":"_36nxW","header__close-button":"_2zYre","sub-header":"_2XwRD"};
|
|
4550
4523
|
|
|
4551
|
-
|
|
4524
|
+
var ModalHeader = function ModalHeader(_ref) {
|
|
4525
|
+
var header = _ref.header,
|
|
4526
|
+
subHeader = _ref.subHeader,
|
|
4527
|
+
onClose = _ref.onClose,
|
|
4528
|
+
loading = _ref.loading;
|
|
4552
4529
|
|
|
4553
|
-
|
|
4554
|
-
|
|
4555
|
-
|
|
4556
|
-
|
|
4530
|
+
if (!header && !subHeader) {
|
|
4531
|
+
return onClose ? React__default.createElement("div", {
|
|
4532
|
+
className: styles$e['header__close-button']
|
|
4533
|
+
}, React__default.createElement(Button$1, {
|
|
4534
|
+
theme: "link-icon",
|
|
4535
|
+
onClick: onClose,
|
|
4536
|
+
disabled: loading
|
|
4537
|
+
}, React__default.createElement(IconTimes, null))) : null;
|
|
4538
|
+
}
|
|
4557
4539
|
|
|
4558
|
-
|
|
4559
|
-
|
|
4560
|
-
|
|
4561
|
-
|
|
4540
|
+
return React__default.createElement(Stack, {
|
|
4541
|
+
space: 12,
|
|
4542
|
+
marginBottom: 24
|
|
4543
|
+
}, React__default.createElement(Inline, {
|
|
4544
|
+
flex: [1],
|
|
4545
|
+
alignItems: "center"
|
|
4546
|
+
}, React__default.createElement("span", {
|
|
4547
|
+
className: styles$e['header']
|
|
4548
|
+
}, header), onClose && React__default.createElement(Button$1, {
|
|
4549
|
+
theme: "link-icon",
|
|
4550
|
+
onClick: onClose,
|
|
4551
|
+
disabled: loading
|
|
4552
|
+
}, React__default.createElement(IconTimes, null))), subHeader && React__default.createElement("div", {
|
|
4553
|
+
className: styles$e['sub-header']
|
|
4554
|
+
}, subHeader));
|
|
4555
|
+
};
|
|
4562
4556
|
|
|
4563
|
-
|
|
4557
|
+
var ModalContext = createContext({
|
|
4558
|
+
isModalMounted: false
|
|
4559
|
+
});
|
|
4560
|
+
var useModalContext = function useModalContext() {
|
|
4561
|
+
var context = useContext(ModalContext);
|
|
4562
|
+
return context || {};
|
|
4563
|
+
};
|
|
4564
4564
|
|
|
4565
|
-
|
|
4566
|
-
|
|
4565
|
+
var Modal = function Modal(_ref) {
|
|
4566
|
+
var children = _ref.children,
|
|
4567
|
+
header = _ref.header,
|
|
4568
|
+
subHeader = _ref.subHeader,
|
|
4569
|
+
onClose = _ref.onClose,
|
|
4570
|
+
loading = _ref.loading,
|
|
4571
|
+
_ref$zIndex = _ref.zIndex,
|
|
4572
|
+
zIndex = _ref$zIndex === void 0 ? Z_INDEX_LAYERS.MODAL : _ref$zIndex,
|
|
4573
|
+
rootElementId = _ref.rootElementId,
|
|
4574
|
+
_ref$width = _ref.width,
|
|
4575
|
+
width = _ref$width === void 0 ? 500 : _ref$width,
|
|
4576
|
+
height = _ref.height,
|
|
4577
|
+
maxWidth = _ref.maxWidth,
|
|
4578
|
+
_ref$shouldReturnFocu = _ref.shouldReturnFocusAfterClose,
|
|
4579
|
+
shouldReturnFocusAfterClose = _ref$shouldReturnFocu === void 0 ? true : _ref$shouldReturnFocu,
|
|
4580
|
+
testId = _ref.testId;
|
|
4581
|
+
var style = {
|
|
4582
|
+
content: {
|
|
4583
|
+
width: width,
|
|
4584
|
+
height: height,
|
|
4585
|
+
maxWidth: maxWidth
|
|
4586
|
+
},
|
|
4587
|
+
overlay: {
|
|
4588
|
+
zIndex: zIndex
|
|
4567
4589
|
}
|
|
4568
4590
|
};
|
|
4569
|
-
|
|
4570
|
-
|
|
4571
|
-
|
|
4572
|
-
|
|
4591
|
+
return React__default.createElement(ReactModal, {
|
|
4592
|
+
isOpen: true,
|
|
4593
|
+
testId: testId,
|
|
4594
|
+
shouldCloseOnEsc: true,
|
|
4595
|
+
shouldCloseOnOverlayClick: false,
|
|
4596
|
+
shouldReturnFocusAfterClose: shouldReturnFocusAfterClose,
|
|
4597
|
+
onRequestClose: onClose && !loading ? onClose : undefined,
|
|
4598
|
+
style: style,
|
|
4599
|
+
closeTimeoutMS: 200,
|
|
4600
|
+
contentLabel: "Modal",
|
|
4601
|
+
appElement: rootElementId && document.getElementById(rootElementId) || undefined,
|
|
4602
|
+
overlayClassName: {
|
|
4603
|
+
base: styles$d['overlay'],
|
|
4604
|
+
afterOpen: styles$d['overlay--after-open'],
|
|
4605
|
+
beforeClose: styles$d['overlay--before-close']
|
|
4606
|
+
},
|
|
4607
|
+
className: {
|
|
4608
|
+
base: styles$d['content'],
|
|
4609
|
+
afterOpen: styles$d['content--after-open'],
|
|
4610
|
+
beforeClose: styles$d['content--before-close']
|
|
4573
4611
|
}
|
|
4574
|
-
|
|
4575
|
-
|
|
4576
|
-
|
|
4577
|
-
|
|
4578
|
-
|
|
4579
|
-
|
|
4580
|
-
|
|
4581
|
-
|
|
4582
|
-
}
|
|
4612
|
+
}, React__default.createElement(ModalHeader, {
|
|
4613
|
+
header: header,
|
|
4614
|
+
subHeader: subHeader,
|
|
4615
|
+
onClose: onClose,
|
|
4616
|
+
loading: loading
|
|
4617
|
+
}), React__default.createElement(ModalContext.Provider, {
|
|
4618
|
+
value: {
|
|
4619
|
+
isModalMounted: true
|
|
4583
4620
|
}
|
|
4584
|
-
};
|
|
4621
|
+
}, children));
|
|
4622
|
+
};
|
|
4585
4623
|
|
|
4586
|
-
|
|
4587
|
-
|
|
4588
|
-
|
|
4624
|
+
Modal.setAppElement = function (rootElement) {
|
|
4625
|
+
ReactModal.setAppElement(rootElement);
|
|
4626
|
+
};
|
|
4589
4627
|
|
|
4590
|
-
|
|
4591
|
-
|
|
4628
|
+
var THRESHOLD = 20;
|
|
4629
|
+
var useScrollShadow = function useScrollShadow() {
|
|
4630
|
+
var ref = useRef(null);
|
|
4592
4631
|
|
|
4593
|
-
|
|
4594
|
-
|
|
4595
|
-
|
|
4596
|
-
};
|
|
4632
|
+
var _useState = useState(false),
|
|
4633
|
+
showScrollShadow = _useState[0],
|
|
4634
|
+
setShowScrollShadow = _useState[1];
|
|
4597
4635
|
|
|
4598
|
-
|
|
4599
|
-
if (!
|
|
4636
|
+
useEffect(function () {
|
|
4637
|
+
if (!ref.current) {
|
|
4600
4638
|
return;
|
|
4601
4639
|
}
|
|
4602
4640
|
|
|
4603
|
-
var
|
|
4641
|
+
var modalBody = ref.current;
|
|
4604
4642
|
|
|
4605
|
-
if (
|
|
4606
|
-
|
|
4607
|
-
return focusableElements[0].focus();
|
|
4608
|
-
}, 0);
|
|
4609
|
-
} else if (!isFocusingOverlay.current) {
|
|
4610
|
-
setIsOpen(false);
|
|
4643
|
+
if (modalBody.offsetHeight > THRESHOLD) {
|
|
4644
|
+
setShowScrollShadow(true);
|
|
4611
4645
|
}
|
|
4646
|
+
}, []);
|
|
4647
|
+
return {
|
|
4648
|
+
ref: ref,
|
|
4649
|
+
showScrollShadow: showScrollShadow
|
|
4612
4650
|
};
|
|
4613
|
-
|
|
4614
|
-
var triggerProps = {
|
|
4615
|
-
onClick: handleMouseClick,
|
|
4616
|
-
onMouseEnter: handleMouseEnter,
|
|
4617
|
-
onMouseLeave: handleMouseLeave,
|
|
4618
|
-
onBlur: handleOnBlur,
|
|
4619
|
-
onFocus: handleFocus,
|
|
4620
|
-
ref: triggerRef
|
|
4621
|
-
};
|
|
4622
|
-
return React__default.createElement(DropdownContext.Provider, {
|
|
4623
|
-
value: {
|
|
4624
|
-
isOpen: isOpen,
|
|
4625
|
-
onToggleDropdown: handleToggleDropdown,
|
|
4626
|
-
triggerRef: triggerRef,
|
|
4627
|
-
paneRef: paneRef
|
|
4628
|
-
}
|
|
4629
|
-
}, trigger.type === Button$1 ? React__default.cloneElement(trigger, _extends({}, trigger.props, triggerProps)) : React__default.createElement("button", Object.assign({}, triggerProps, {
|
|
4630
|
-
className: styles$c['dropdown__trigger'],
|
|
4631
|
-
onFocus: handleFocus
|
|
4632
|
-
}), trigger), React__default.createElement(DropdownPane, {
|
|
4633
|
-
width: width,
|
|
4634
|
-
onMouseEnter: handlePaneMouseEnter,
|
|
4635
|
-
onMouseLeave: handlePaneMouseLeave,
|
|
4636
|
-
alignment: alignment,
|
|
4637
|
-
testId: testId
|
|
4638
|
-
}, children));
|
|
4639
4651
|
};
|
|
4640
4652
|
|
|
4641
|
-
var styles$
|
|
4642
|
-
|
|
4643
|
-
var findNextActiveIndex = function findNextActiveIndex(items, startAt) {
|
|
4644
|
-
var startIndex = 0;
|
|
4653
|
+
var styles$f = {"modal-body":"_2J-ku","modal-body--with-scroll-shadow":"_2ErCP"};
|
|
4645
4654
|
|
|
4646
|
-
|
|
4647
|
-
|
|
4648
|
-
}
|
|
4655
|
+
var ModalBody = function ModalBody(_ref) {
|
|
4656
|
+
var _classNames;
|
|
4649
4657
|
|
|
4650
|
-
var
|
|
4651
|
-
|
|
4652
|
-
});
|
|
4658
|
+
var children = _ref.children,
|
|
4659
|
+
testId = _ref.testId;
|
|
4653
4660
|
|
|
4654
|
-
|
|
4655
|
-
|
|
4656
|
-
|
|
4657
|
-
return false;
|
|
4658
|
-
}
|
|
4661
|
+
var _useScrollShadow = useScrollShadow(),
|
|
4662
|
+
ref = _useScrollShadow.ref,
|
|
4663
|
+
showScrollShadow = _useScrollShadow.showScrollShadow;
|
|
4659
4664
|
|
|
4660
|
-
|
|
4661
|
-
})
|
|
4665
|
+
return React__default.createElement("div", {
|
|
4666
|
+
className: classnames(styles$f['modal-body'], (_classNames = {}, _classNames[styles$f['modal-body--with-scroll-shadow']] = showScrollShadow, _classNames)),
|
|
4667
|
+
ref: ref,
|
|
4668
|
+
"data-testid": testId
|
|
4669
|
+
}, children);
|
|
4670
|
+
};
|
|
4662
4671
|
|
|
4663
|
-
|
|
4664
|
-
}
|
|
4672
|
+
var styles$g = {"modal-footer":"_LKOr5","tertiary-container":"_Qktd-"};
|
|
4665
4673
|
|
|
4666
|
-
|
|
4667
|
-
|
|
4668
|
-
|
|
4669
|
-
return nextEnabledIndex >= 0 ? nextEnabledIndex : null;
|
|
4670
|
-
};
|
|
4671
|
-
var findPreviousEnabledIndex = function findPreviousEnabledIndex(items, startAt) {
|
|
4672
|
-
for (var i = startAt - 1; i >= 0; i--) {
|
|
4673
|
-
if (!items[i].disabled) {
|
|
4674
|
-
return i;
|
|
4675
|
-
}
|
|
4674
|
+
var updateButtonProps = function updateButtonProps(button, newProps) {
|
|
4675
|
+
if (!button) {
|
|
4676
|
+
return null;
|
|
4676
4677
|
}
|
|
4677
4678
|
|
|
4678
|
-
|
|
4679
|
-
|
|
4680
|
-
return _i;
|
|
4681
|
-
}
|
|
4679
|
+
if (button.type !== Button$1) {
|
|
4680
|
+
return button;
|
|
4682
4681
|
}
|
|
4683
4682
|
|
|
4684
|
-
return
|
|
4683
|
+
return React__default.cloneElement(button, _extends({}, newProps));
|
|
4685
4684
|
};
|
|
4686
4685
|
|
|
4687
|
-
var
|
|
4688
|
-
var
|
|
4689
|
-
|
|
4690
|
-
|
|
4691
|
-
|
|
4692
|
-
var focusOnNextItem = function focusOnNextItem() {
|
|
4693
|
-
setFocusedItem(findNextActiveIndex(listItems, focusedItem));
|
|
4694
|
-
};
|
|
4686
|
+
var ModalFooter = function ModalFooter(_ref) {
|
|
4687
|
+
var children = _ref.children,
|
|
4688
|
+
actions = _ref.actions,
|
|
4689
|
+
testId = _ref.testId;
|
|
4695
4690
|
|
|
4696
|
-
|
|
4697
|
-
|
|
4698
|
-
};
|
|
4691
|
+
if (actions) {
|
|
4692
|
+
var _actions$primary, _actions$secondary, _actions$tertiary, _classnames;
|
|
4699
4693
|
|
|
4700
|
-
|
|
4701
|
-
|
|
4702
|
-
|
|
4703
|
-
}
|
|
4704
|
-
|
|
4705
|
-
|
|
4706
|
-
|
|
4694
|
+
var primaryButton = updateButtonProps(actions.primary, {
|
|
4695
|
+
theme: (actions === null || actions === void 0 ? void 0 : (_actions$primary = actions.primary) === null || _actions$primary === void 0 ? void 0 : _actions$primary.props.theme) || 'primary',
|
|
4696
|
+
size: BUTTON_SIZES.MIN_WIDTH_100
|
|
4697
|
+
});
|
|
4698
|
+
var secondaryButton = updateButtonProps(actions.secondary, {
|
|
4699
|
+
theme: (actions === null || actions === void 0 ? void 0 : (_actions$secondary = actions.secondary) === null || _actions$secondary === void 0 ? void 0 : _actions$secondary.props.theme) || 'default',
|
|
4700
|
+
size: BUTTON_SIZES.MIN_WIDTH_100
|
|
4701
|
+
});
|
|
4702
|
+
var tertiaryButton = updateButtonProps(actions.tertiary, {
|
|
4703
|
+
theme: (actions === null || actions === void 0 ? void 0 : (_actions$tertiary = actions.tertiary) === null || _actions$tertiary === void 0 ? void 0 : _actions$tertiary.props.theme) || 'link-primary',
|
|
4704
|
+
size: BUTTON_SIZES.MIN_WIDTH_100
|
|
4705
|
+
});
|
|
4706
|
+
return React__default.createElement(FooterContainer, {
|
|
4707
|
+
testId: testId
|
|
4708
|
+
}, React__default.createElement(Inline, {
|
|
4709
|
+
justifyContent: "space-between"
|
|
4710
|
+
}, React__default.createElement("div", {
|
|
4711
|
+
className: classnames((_classnames = {}, _classnames[styles$g['tertiary-container']] = tertiaryButton && tertiaryButton.props.theme.startsWith('link'), _classnames))
|
|
4712
|
+
}, tertiaryButton || React__default.createElement("div", null)), React__default.createElement(Inline, {
|
|
4713
|
+
space: 12
|
|
4714
|
+
}, secondaryButton, primaryButton)));
|
|
4715
|
+
}
|
|
4707
4716
|
|
|
4708
|
-
|
|
4709
|
-
|
|
4710
|
-
focusOnNextItem();
|
|
4711
|
-
}
|
|
4717
|
+
return React__default.createElement(FooterContainer, null, children);
|
|
4718
|
+
};
|
|
4712
4719
|
|
|
4713
|
-
|
|
4714
|
-
|
|
4715
|
-
|
|
4720
|
+
var FooterContainer = function FooterContainer(_ref2) {
|
|
4721
|
+
var children = _ref2.children,
|
|
4722
|
+
testId = _ref2.testId;
|
|
4723
|
+
var childrenItens = React__default.Children.toArray(children);
|
|
4724
|
+
var hasCustomAlignment = childrenItens.length === 1 && childrenItens[0].type === Inline;
|
|
4725
|
+
return React__default.createElement("div", {
|
|
4726
|
+
className: styles$g['modal-footer'],
|
|
4727
|
+
"data-testid": testId
|
|
4728
|
+
}, React__default.createElement(Inline, {
|
|
4729
|
+
justifyContent: "end",
|
|
4730
|
+
space: 12,
|
|
4731
|
+
flex: hasCustomAlignment ? [1] : undefined
|
|
4732
|
+
}, children));
|
|
4733
|
+
};
|
|
4716
4734
|
|
|
4717
|
-
|
|
4718
|
-
var _actions$onPressEnter;
|
|
4735
|
+
var styles$h = {"container":"_v1b-5","wrapper":"_3mrLu","interactionDisabled":"_1J9dh","DayPicker-Day":"_8FcQE","navBar":"_1SPuq","todayButton":"_24FJ6","navButtonInteractionDisabled":"_Oxdm9","navButtonPrev":"_20uqc","navButtonNext":"_3C53z","months":"_M_eHz","month":"_3RPpJ","caption":"_1FXNw","weekdays":"_3KcRU","weekdaysRow":"_1fO_e","weekday":"_c1Y-X","body":"_34mA1","week":"_1PmqZ","day":"_1AWH2","disabled":"_3vJkw","selected":"_1DR0N","outside":"_276GV","footer":"_2M5xr","today":"_3N6fj","overlayWrapper":"_3Zqgu","overlay":"_20Ncd","weekNumber":"_2hb-S"};
|
|
4719
4736
|
|
|
4720
|
-
|
|
4721
|
-
onClick(event);
|
|
4722
|
-
actions && ((_actions$onPressEnter = actions.onPressEnter) === null || _actions$onPressEnter === void 0 ? void 0 : _actions$onPressEnter.call(actions));
|
|
4723
|
-
}
|
|
4737
|
+
var styles$i = {"container":"_okDvi","wrapper":"_17XdD","interactionDisabled":"_1O7OT","DayPicker-Day":"_3noGA","navBar":"_1Hl3Q","todayButton":"_m0Vs9","navButtonInteractionDisabled":"_1ULWH","navButtonPrev":"_3gjq8","navButtonNext":"_1m-Kd","months":"_Fq6Xh","month":"_3i0Oo","caption":"_36X9Y","weekdays":"_1aWPn","weekdaysRow":"_3HXCK","weekday":"_t-ctd","body":"_XAbiR","week":"_3Nwep","day":"_3nNcG","disabled":"_1M4ZF","selected":"_2PEs8","outside":"_1PIJa","footer":"_2T_z1","today":"_1hVM6","overlayWrapper":"_1L-hI","overlay":"_dDPZb","weekNumber":"_1alhT"};
|
|
4724
4738
|
|
|
4725
|
-
|
|
4726
|
-
|
|
4727
|
-
|
|
4728
|
-
|
|
4729
|
-
focusedItem: focusedItem,
|
|
4730
|
-
setFocusOnItem: setFocusOnItem
|
|
4731
|
-
};
|
|
4732
|
-
};
|
|
4739
|
+
function parseDate(str, format, locale) {
|
|
4740
|
+
var parsed = dateFnsParse(str, format, new Date(), {
|
|
4741
|
+
locale: locale
|
|
4742
|
+
});
|
|
4733
4743
|
|
|
4734
|
-
|
|
4744
|
+
if (str.length === format.length && DateUtils.isDate(parsed)) {
|
|
4745
|
+
return parsed;
|
|
4746
|
+
}
|
|
4735
4747
|
|
|
4736
|
-
|
|
4737
|
-
|
|
4738
|
-
|
|
4739
|
-
|
|
4740
|
-
|
|
4748
|
+
return undefined;
|
|
4749
|
+
}
|
|
4750
|
+
function formatDate(date, format, locale) {
|
|
4751
|
+
return dateFnsFormat(date, format, {
|
|
4752
|
+
locale: locale
|
|
4741
4753
|
});
|
|
4742
|
-
}
|
|
4743
|
-
|
|
4744
|
-
|
|
4754
|
+
}
|
|
4755
|
+
function setToMidnight(date) {
|
|
4756
|
+
return date && startOfDay(date);
|
|
4757
|
+
}
|
|
4758
|
+
function getStartOfWeek(date, weekIndex) {
|
|
4759
|
+
var d = new Date(date);
|
|
4760
|
+
var firstDay = d.getDate() - d.getDay() + weekIndex;
|
|
4761
|
+
var firstDayAdjusted = firstDay > d.getDate() ? firstDay - 7 : firstDay;
|
|
4762
|
+
return new Date(d.setDate(firstDayAdjusted));
|
|
4763
|
+
}
|
|
4764
|
+
function getEndOfWeek(date, weekIndex) {
|
|
4765
|
+
var startOfWeek = getStartOfWeek(date, weekIndex);
|
|
4766
|
+
var endDay = startOfWeek.getDate() + 6;
|
|
4767
|
+
return new Date(startOfWeek.setDate(endDay));
|
|
4768
|
+
}
|
|
4769
|
+
function createWeekRange(date, weekStart) {
|
|
4770
|
+
return {
|
|
4771
|
+
start: getStartOfWeek(date, weekStart),
|
|
4772
|
+
end: getEndOfWeek(date, weekStart)
|
|
4773
|
+
};
|
|
4774
|
+
}
|
|
4775
|
+
var DAYS = [getLocalizedString('time.sunday'), getLocalizedString('time.monday'), getLocalizedString('time.tuesday'), getLocalizedString('time.wednesday'), getLocalizedString('time.thursday'), getLocalizedString('time.friday'), getLocalizedString('time.saturday')];
|
|
4776
|
+
var MONTH_NAMES = [getLocalizedString('time.january'), getLocalizedString('time.february'), getLocalizedString('time.march'), getLocalizedString('time.april'), getLocalizedString('time.may'), getLocalizedString('time.june'), getLocalizedString('time.july'), getLocalizedString('time.august'), getLocalizedString('time.september'), getLocalizedString('time.october'), getLocalizedString('time.november'), getLocalizedString('time.december')];
|
|
4745
4777
|
|
|
4746
|
-
var
|
|
4747
|
-
|
|
4748
|
-
|
|
4749
|
-
H1: 'h1',
|
|
4750
|
-
H2: 'h2',
|
|
4751
|
-
H3: 'h3',
|
|
4752
|
-
H4: 'h4',
|
|
4753
|
-
H5: 'h5',
|
|
4754
|
-
INSIGHT: 'insight'
|
|
4755
|
-
};
|
|
4756
|
-
var FONT_EMPHASIS = {
|
|
4757
|
-
BOLD: 'bold',
|
|
4758
|
-
ITALIC: 'italic',
|
|
4759
|
-
UNDERLINE: 'underline',
|
|
4760
|
-
MONOSPACE: 'monospace'
|
|
4778
|
+
var CALENDAR_MODE = {
|
|
4779
|
+
DAY: 'day',
|
|
4780
|
+
WEEK: 'week'
|
|
4761
4781
|
};
|
|
4762
|
-
var
|
|
4763
|
-
|
|
4764
|
-
|
|
4765
|
-
CENTER: 'center',
|
|
4766
|
-
JUSTIFY: 'justify'
|
|
4782
|
+
var CALENDAR_PLACEMENT = {
|
|
4783
|
+
BOTTOM: 'bottom',
|
|
4784
|
+
TOP: 'top'
|
|
4767
4785
|
};
|
|
4768
4786
|
|
|
4769
|
-
var
|
|
4787
|
+
var calculateCalendarPosition = function calculateCalendarPosition(placement, anchorPosition, calendarDimensions) {
|
|
4788
|
+
if (!calendarDimensions) {
|
|
4789
|
+
return {
|
|
4790
|
+
left: 0,
|
|
4791
|
+
top: 0
|
|
4792
|
+
};
|
|
4793
|
+
}
|
|
4770
4794
|
|
|
4771
|
-
var
|
|
4795
|
+
var horizontalPosition = getHorizontalPosition(anchorPosition, calendarDimensions);
|
|
4796
|
+
var verticalPosition = getVerticalPosition(anchorPosition, placement, calendarDimensions);
|
|
4797
|
+
return _extends({}, horizontalPosition, verticalPosition);
|
|
4798
|
+
};
|
|
4772
4799
|
|
|
4773
|
-
var
|
|
4774
|
-
var
|
|
4800
|
+
var getHorizontalPosition = function getHorizontalPosition(anchorPosition, calendarDimensions) {
|
|
4801
|
+
var innerWidth = window.innerWidth;
|
|
4802
|
+
var calendarRight = anchorPosition.left + calendarDimensions.width;
|
|
4775
4803
|
|
|
4776
|
-
|
|
4777
|
-
|
|
4778
|
-
|
|
4779
|
-
|
|
4780
|
-
|
|
4781
|
-
color = _ref.color,
|
|
4782
|
-
testId = _ref.testId,
|
|
4783
|
-
positionProps = _objectWithoutPropertiesLoose(_ref, _excluded$2g);
|
|
4804
|
+
if (innerWidth > calendarRight + BUFFER) {
|
|
4805
|
+
return {
|
|
4806
|
+
left: anchorPosition.left
|
|
4807
|
+
};
|
|
4808
|
+
}
|
|
4784
4809
|
|
|
4785
|
-
|
|
4786
|
-
|
|
4787
|
-
style: _extends({
|
|
4788
|
-
color: color
|
|
4789
|
-
}, positionStyles),
|
|
4790
|
-
className: classnames(styles$g['text'], (_classnames = {}, _classnames[styles$g['text--bold']] = emphasis === null || emphasis === void 0 ? void 0 : emphasis.includes(FONT_EMPHASIS.BOLD), _classnames[styles$g['text--italic']] = emphasis === null || emphasis === void 0 ? void 0 : emphasis.includes(FONT_EMPHASIS.ITALIC), _classnames[styles$g['text--underline']] = emphasis === null || emphasis === void 0 ? void 0 : emphasis.includes(FONT_EMPHASIS.UNDERLINE), _classnames[styles$g['text--monospace']] = emphasis === null || emphasis === void 0 ? void 0 : emphasis.includes(FONT_EMPHASIS.MONOSPACE), _classnames[styles$g['text--align-left']] = alignment === ALIGNMENTS.LEFT, _classnames[styles$g['text--align-right']] = alignment === ALIGNMENTS.RIGHT, _classnames[styles$g['text--align-center']] = alignment === ALIGNMENTS.CENTER, _classnames[styles$g['text--align-justify']] = alignment === ALIGNMENTS.JUSTIFY, _classnames[styles$g['text__body']] = as === TEXT_TYPES.BODY, _classnames[styles$g['text__insight']] = as === TEXT_TYPES.INSIGHT, _classnames[styles$g['text__caption']] = as === TEXT_TYPES.CAPTION, _classnames)),
|
|
4791
|
-
'data-testid': testId
|
|
4810
|
+
return {
|
|
4811
|
+
left: anchorPosition.right - calendarDimensions.width
|
|
4792
4812
|
};
|
|
4793
|
-
var pTypes = [TEXT_TYPES.BODY, TEXT_TYPES.CAPTION, TEXT_TYPES.INSIGHT];
|
|
4794
|
-
var element = pTypes.includes(as) ? 'p' : as;
|
|
4795
|
-
return React__default.createElement(element, elementProps, children);
|
|
4796
4813
|
};
|
|
4797
4814
|
|
|
4798
|
-
var
|
|
4799
|
-
var
|
|
4800
|
-
|
|
4801
|
-
className: classnames(styles$g['text--bold'], styles$g['text'])
|
|
4802
|
-
}, children);
|
|
4803
|
-
};
|
|
4804
|
-
|
|
4805
|
-
var Underline = function Underline(_ref) {
|
|
4806
|
-
var children = _ref.children;
|
|
4807
|
-
return React__default.createElement("span", {
|
|
4808
|
-
className: classnames(styles$g['text--underline'], styles$g['text'])
|
|
4809
|
-
}, children);
|
|
4810
|
-
};
|
|
4815
|
+
var getVerticalPosition = function getVerticalPosition(anchorPosition, placement, calendarDimensions) {
|
|
4816
|
+
var calendarTopAboveTrigger = anchorPosition.top - calendarDimensions.height - PADDING;
|
|
4817
|
+
var calendarTopBelowTrigger = anchorPosition.bottom + PADDING;
|
|
4811
4818
|
|
|
4812
|
-
|
|
4813
|
-
|
|
4814
|
-
|
|
4815
|
-
|
|
4816
|
-
|
|
4817
|
-
}
|
|
4819
|
+
if (placement === CALENDAR_PLACEMENT.TOP) {
|
|
4820
|
+
if (calendarTopAboveTrigger < 0) {
|
|
4821
|
+
return {
|
|
4822
|
+
top: anchorPosition.bottom + PADDING
|
|
4823
|
+
};
|
|
4824
|
+
}
|
|
4818
4825
|
|
|
4819
|
-
|
|
4820
|
-
|
|
4821
|
-
|
|
4822
|
-
|
|
4823
|
-
|
|
4824
|
-
|
|
4825
|
-
|
|
4826
|
-
|
|
4827
|
-
|
|
4828
|
-
var GREY300 = '#949494';
|
|
4829
|
-
var GREY400 = '#767676';
|
|
4830
|
-
var GREY500 = '#464646';
|
|
4826
|
+
return {
|
|
4827
|
+
top: calendarTopAboveTrigger + window.scrollY
|
|
4828
|
+
};
|
|
4829
|
+
} else {
|
|
4830
|
+
if (calendarTopBelowTrigger + calendarDimensions.height > window.innerHeight) {
|
|
4831
|
+
return {
|
|
4832
|
+
top: calendarTopAboveTrigger + window.scrollY
|
|
4833
|
+
};
|
|
4834
|
+
}
|
|
4831
4835
|
|
|
4832
|
-
|
|
4833
|
-
|
|
4836
|
+
return {
|
|
4837
|
+
top: calendarTopBelowTrigger + window.scrollY
|
|
4838
|
+
};
|
|
4839
|
+
}
|
|
4840
|
+
};
|
|
4834
4841
|
|
|
4835
|
-
|
|
4836
|
-
|
|
4837
|
-
|
|
4838
|
-
|
|
4842
|
+
var Calendar = function Calendar(_ref) {
|
|
4843
|
+
var _ref$mode = _ref.mode,
|
|
4844
|
+
mode = _ref$mode === void 0 ? CALENDAR_MODE.DAY : _ref$mode,
|
|
4845
|
+
_ref$position = _ref.position,
|
|
4846
|
+
position = _ref$position === void 0 ? CALENDAR_PLACEMENT.BOTTOM : _ref$position,
|
|
4847
|
+
_ref$weekStart = _ref.weekStart,
|
|
4848
|
+
weekStart = _ref$weekStart === void 0 ? 0 : _ref$weekStart,
|
|
4839
4849
|
selected = _ref.selected,
|
|
4840
|
-
|
|
4841
|
-
|
|
4842
|
-
|
|
4850
|
+
onSelect = _ref.onSelect,
|
|
4851
|
+
onClickOutside = _ref.onClickOutside,
|
|
4852
|
+
disabledDays = _ref.disabledDays,
|
|
4853
|
+
anchorRef = _ref.anchorRef,
|
|
4854
|
+
testId = _ref.testId;
|
|
4843
4855
|
|
|
4844
|
-
var
|
|
4845
|
-
|
|
4856
|
+
var _useState = useState(null),
|
|
4857
|
+
calendarRef = _useState[0],
|
|
4858
|
+
setCalendarRef = _useState[1];
|
|
4846
4859
|
|
|
4847
|
-
var
|
|
4848
|
-
|
|
4860
|
+
var style = mode === CALENDAR_MODE.DAY ? styles$h : styles$i;
|
|
4861
|
+
var anchorNode = anchorRef.current;
|
|
4862
|
+
useOnClickOutside({
|
|
4863
|
+
current: calendarRef
|
|
4864
|
+
}, function (event) {
|
|
4865
|
+
var _anchorRef$current;
|
|
4849
4866
|
|
|
4850
|
-
if (
|
|
4851
|
-
|
|
4867
|
+
if (!((_anchorRef$current = anchorRef.current) !== null && _anchorRef$current !== void 0 && _anchorRef$current.contains(event === null || event === void 0 ? void 0 : event.srcElement))) {
|
|
4868
|
+
onClickOutside();
|
|
4852
4869
|
}
|
|
4853
|
-
|
|
4854
|
-
|
|
4855
|
-
|
|
4870
|
+
});
|
|
4871
|
+
var weekRange = selected ? createWeekRange(selected, weekStart) : undefined;
|
|
4872
|
+
var selectedRange = weekRange && {
|
|
4873
|
+
from: weekRange.start,
|
|
4874
|
+
to: weekRange.end
|
|
4856
4875
|
};
|
|
4857
4876
|
|
|
4858
|
-
var
|
|
4859
|
-
|
|
4860
|
-
return EGGPLANT500;
|
|
4861
|
-
}
|
|
4877
|
+
var handleSelect = function handleSelect(day) {
|
|
4878
|
+
var selectedDate = setToMidnight(day);
|
|
4862
4879
|
|
|
4863
|
-
if (
|
|
4864
|
-
|
|
4880
|
+
if (mode === CALENDAR_MODE.DAY) {
|
|
4881
|
+
onSelect(selectedDate);
|
|
4882
|
+
} else {
|
|
4883
|
+
var _weekRange = createWeekRange(selectedDate, weekStart);
|
|
4884
|
+
|
|
4885
|
+
onSelect(_weekRange.start);
|
|
4865
4886
|
}
|
|
4866
4887
|
|
|
4867
|
-
|
|
4888
|
+
setTimeout(function () {
|
|
4889
|
+
onClickOutside();
|
|
4890
|
+
}, 100);
|
|
4868
4891
|
};
|
|
4869
4892
|
|
|
4870
|
-
|
|
4871
|
-
|
|
4872
|
-
|
|
4873
|
-
|
|
4874
|
-
|
|
4893
|
+
if (!anchorNode) {
|
|
4894
|
+
return null;
|
|
4895
|
+
}
|
|
4896
|
+
|
|
4897
|
+
var anchorPosition = anchorNode.getBoundingClientRect();
|
|
4898
|
+
var calendarPosition = calculateCalendarPosition(position, anchorPosition, calendarRef === null || calendarRef === void 0 ? void 0 : calendarRef.getBoundingClientRect());
|
|
4899
|
+
return React__default.createElement(Portal, null, React__default.createElement("div", {
|
|
4900
|
+
className: style.overlayWrapper
|
|
4901
|
+
}, React__default.createElement("div", {
|
|
4902
|
+
className: style.overlay,
|
|
4903
|
+
ref: function ref(_ref2) {
|
|
4904
|
+
return setCalendarRef(_ref2);
|
|
4905
|
+
},
|
|
4906
|
+
style: _extends({}, calendarPosition, {
|
|
4907
|
+
zIndex: Z_INDEX_LAYERS.MODAL
|
|
4908
|
+
}),
|
|
4875
4909
|
"data-testid": testId
|
|
4876
|
-
},
|
|
4877
|
-
|
|
4878
|
-
|
|
4879
|
-
|
|
4880
|
-
|
|
4881
|
-
|
|
4882
|
-
|
|
4883
|
-
|
|
4884
|
-
|
|
4910
|
+
}, React__default.createElement(DayPicker, {
|
|
4911
|
+
format: "MM/dd/yyyy",
|
|
4912
|
+
classNames: style,
|
|
4913
|
+
onDayClick: function onDayClick(day, activeModifiers) {
|
|
4914
|
+
var isDateDisabled = Object.keys(activeModifiers).find(function (modifier) {
|
|
4915
|
+
return modifier.includes('disabled');
|
|
4916
|
+
});
|
|
4917
|
+
|
|
4918
|
+
if (!Boolean(isDateDisabled)) {
|
|
4919
|
+
handleSelect(day);
|
|
4920
|
+
}
|
|
4921
|
+
},
|
|
4922
|
+
selectedDays: mode === CALENDAR_MODE.DAY ? selected : selectedRange,
|
|
4923
|
+
disabledDays: disabledDays,
|
|
4924
|
+
months: MONTH_NAMES,
|
|
4925
|
+
weekdaysLong: DAYS,
|
|
4926
|
+
initialMonth: selected,
|
|
4927
|
+
weekdaysShort: DAYS.map(function (day) {
|
|
4928
|
+
return day.substring(0, 2);
|
|
4929
|
+
}),
|
|
4930
|
+
showOutsideDays: mode === CALENDAR_MODE.WEEK,
|
|
4931
|
+
firstDayOfWeek: weekStart
|
|
4932
|
+
}))));
|
|
4885
4933
|
};
|
|
4886
4934
|
|
|
4887
|
-
var
|
|
4888
|
-
var itemType = getItemType(child);
|
|
4935
|
+
var styles$j = {"dropdown-list":"_1v1df","dropdown-list__item--hover":"_eAjpa"};
|
|
4889
4936
|
|
|
4890
|
-
|
|
4891
|
-
|
|
4937
|
+
var findNextActiveIndex = function findNextActiveIndex(items, startAt) {
|
|
4938
|
+
var startIndex = 0;
|
|
4939
|
+
|
|
4940
|
+
if (startAt !== null && startAt + 1 <= items.length) {
|
|
4941
|
+
startIndex = startAt + 1;
|
|
4892
4942
|
}
|
|
4893
4943
|
|
|
4894
|
-
|
|
4895
|
-
|
|
4944
|
+
var hasEnabledItems = items.slice(startIndex).some(function (item) {
|
|
4945
|
+
return !item.disabled;
|
|
4946
|
+
});
|
|
4896
4947
|
|
|
4897
|
-
|
|
4898
|
-
|
|
4899
|
-
|
|
4900
|
-
|
|
4948
|
+
if (hasEnabledItems) {
|
|
4949
|
+
var _nextEnabledIndex = items.findIndex(function (item, index) {
|
|
4950
|
+
if (index < startIndex) {
|
|
4951
|
+
return false;
|
|
4952
|
+
}
|
|
4901
4953
|
|
|
4902
|
-
|
|
4903
|
-
|
|
4954
|
+
return !item.disabled;
|
|
4955
|
+
});
|
|
4904
4956
|
|
|
4905
|
-
|
|
4906
|
-
throw new Error('DropdownList - dropdown items should be using DropdownListDivider or DropdownListItem components');
|
|
4957
|
+
return _nextEnabledIndex;
|
|
4907
4958
|
}
|
|
4959
|
+
|
|
4960
|
+
var nextEnabledIndex = items.findIndex(function (item) {
|
|
4961
|
+
return !item.disabled;
|
|
4962
|
+
});
|
|
4963
|
+
return nextEnabledIndex >= 0 ? nextEnabledIndex : null;
|
|
4908
4964
|
};
|
|
4965
|
+
var findPreviousEnabledIndex = function findPreviousEnabledIndex(items, startAt) {
|
|
4966
|
+
for (var i = startAt - 1; i >= 0; i--) {
|
|
4967
|
+
if (!items[i].disabled) {
|
|
4968
|
+
return i;
|
|
4969
|
+
}
|
|
4970
|
+
}
|
|
4909
4971
|
|
|
4910
|
-
var
|
|
4911
|
-
|
|
4912
|
-
|
|
4972
|
+
for (var _i = items.length - 1; _i > startAt - 1; _i--) {
|
|
4973
|
+
if (!items[_i].disabled) {
|
|
4974
|
+
return _i;
|
|
4975
|
+
}
|
|
4976
|
+
}
|
|
4913
4977
|
|
|
4914
|
-
|
|
4915
|
-
|
|
4978
|
+
return null;
|
|
4979
|
+
};
|
|
4916
4980
|
|
|
4917
|
-
|
|
4918
|
-
|
|
4919
|
-
|
|
4981
|
+
var useListKeyboardNavigation = function useListKeyboardNavigation(listItems, actions) {
|
|
4982
|
+
var _useState = useState(null),
|
|
4983
|
+
focusedItem = _useState[0],
|
|
4984
|
+
setFocusedItem = _useState[1];
|
|
4985
|
+
|
|
4986
|
+
var focusOnNextItem = function focusOnNextItem(callback) {
|
|
4987
|
+
var nextFocusItem = findNextActiveIndex(listItems, focusedItem);
|
|
4988
|
+
setFocusedItem(nextFocusItem);
|
|
4989
|
+
callback(nextFocusItem);
|
|
4990
|
+
};
|
|
4991
|
+
|
|
4992
|
+
var focusOnPrevItem = function focusOnPrevItem(callback) {
|
|
4993
|
+
var prevFocusItem = findPreviousEnabledIndex(listItems, focusedItem || 0);
|
|
4994
|
+
setFocusedItem(prevFocusItem);
|
|
4995
|
+
callback(prevFocusItem);
|
|
4996
|
+
};
|
|
4997
|
+
|
|
4998
|
+
var setFocusOnItem = function setFocusOnItem(index) {
|
|
4999
|
+
if (index < 0) {
|
|
5000
|
+
setFocusedItem(null);
|
|
5001
|
+
return;
|
|
4920
5002
|
}
|
|
4921
5003
|
|
|
4922
|
-
|
|
4923
|
-
|
|
4924
|
-
|
|
4925
|
-
};
|
|
4926
|
-
});
|
|
5004
|
+
if (listItems[index].disabled) {
|
|
5005
|
+
return;
|
|
5006
|
+
}
|
|
4927
5007
|
|
|
4928
|
-
|
|
4929
|
-
|
|
4930
|
-
}),
|
|
4931
|
-
focusedItem = _useListKeyboardNavig.focusedItem,
|
|
4932
|
-
setFocusOnItem = _useListKeyboardNavig.setFocusOnItem;
|
|
5008
|
+
setFocusedItem(index);
|
|
5009
|
+
};
|
|
4933
5010
|
|
|
4934
|
-
|
|
4935
|
-
|
|
4936
|
-
|
|
4937
|
-
|
|
4938
|
-
var _classNames;
|
|
5011
|
+
var handleKeyPress = useCallback(function (event) {
|
|
5012
|
+
if (event.key === 'ArrowDown') {
|
|
5013
|
+
focusOnNextItem(function (focusItem) {
|
|
5014
|
+
var _actions$onNavigate;
|
|
4939
5015
|
|
|
4940
|
-
|
|
4941
|
-
|
|
4942
|
-
|
|
4943
|
-
onMouseEnter: function onMouseEnter() {
|
|
4944
|
-
return setFocusOnItem(index);
|
|
4945
|
-
}
|
|
4946
|
-
}, child);
|
|
4947
|
-
}));
|
|
4948
|
-
};
|
|
5016
|
+
return actions === null || actions === void 0 ? void 0 : (_actions$onNavigate = actions.onNavigate) === null || _actions$onNavigate === void 0 ? void 0 : _actions$onNavigate.call(actions, focusItem);
|
|
5017
|
+
});
|
|
5018
|
+
}
|
|
4949
5019
|
|
|
4950
|
-
|
|
4951
|
-
|
|
4952
|
-
|
|
4953
|
-
|
|
4954
|
-
|
|
4955
|
-
|
|
4956
|
-
|
|
4957
|
-
|
|
4958
|
-
|
|
4959
|
-
|
|
4960
|
-
|
|
4961
|
-
|
|
4962
|
-
|
|
5020
|
+
if (event.key === 'ArrowUp') {
|
|
5021
|
+
focusOnPrevItem(function (focusItem) {
|
|
5022
|
+
var _actions$onNavigate2;
|
|
5023
|
+
|
|
5024
|
+
return actions === null || actions === void 0 ? void 0 : (_actions$onNavigate2 = actions.onNavigate) === null || _actions$onNavigate2 === void 0 ? void 0 : _actions$onNavigate2.call(actions, focusItem);
|
|
5025
|
+
});
|
|
5026
|
+
}
|
|
5027
|
+
|
|
5028
|
+
if (event.key === 'Enter' && focusedItem !== null) {
|
|
5029
|
+
var _actions$onPressEnter;
|
|
5030
|
+
|
|
5031
|
+
var onClick = listItems[focusedItem].onClick;
|
|
5032
|
+
onClick(event);
|
|
5033
|
+
actions && ((_actions$onPressEnter = actions.onPressEnter) === null || _actions$onPressEnter === void 0 ? void 0 : _actions$onPressEnter.call(actions));
|
|
5034
|
+
}
|
|
5035
|
+
|
|
5036
|
+
event.preventDefault();
|
|
5037
|
+
}, [focusedItem]);
|
|
5038
|
+
useKeyPress(['ArrowDown', 'ArrowUp', 'Enter'], handleKeyPress);
|
|
5039
|
+
return {
|
|
5040
|
+
focusedItem: focusedItem,
|
|
5041
|
+
setFocusOnItem: setFocusOnItem
|
|
5042
|
+
};
|
|
4963
5043
|
};
|
|
4964
5044
|
|
|
4965
|
-
var styles$
|
|
5045
|
+
var styles$k = {"dropdown-list-divider":"_3x1F6"};
|
|
4966
5046
|
|
|
4967
|
-
var
|
|
5047
|
+
var DropdownListDivider = function DropdownListDivider(_ref) {
|
|
5048
|
+
var testId = _ref.testId;
|
|
5049
|
+
return React__default.createElement("div", {
|
|
5050
|
+
className: styles$k['dropdown-list-divider'],
|
|
5051
|
+
"data-testid": testId
|
|
5052
|
+
});
|
|
5053
|
+
};
|
|
4968
5054
|
|
|
4969
|
-
var styles$
|
|
5055
|
+
var styles$l = {"dropdown-list-item":"_B3_I5","dropdown-list-item--selected":"_1mr1h","dropdown-list-item__content":"_2b7Fg","dropdown-list-item--disabled":"_2l0Cb"};
|
|
4970
5056
|
|
|
4971
|
-
var
|
|
4972
|
-
|
|
4973
|
-
|
|
4974
|
-
|
|
4975
|
-
|
|
4976
|
-
|
|
4977
|
-
|
|
4978
|
-
|
|
4979
|
-
|
|
4980
|
-
|
|
4981
|
-
|
|
4982
|
-
|
|
4983
|
-
|
|
4984
|
-
|
|
4985
|
-
|
|
4986
|
-
|
|
4987
|
-
|
|
4988
|
-
|
|
4989
|
-
|
|
5057
|
+
var TEXT_TYPES = {
|
|
5058
|
+
CAPTION: 'caption',
|
|
5059
|
+
BODY: 'body',
|
|
5060
|
+
H1: 'h1',
|
|
5061
|
+
H2: 'h2',
|
|
5062
|
+
H3: 'h3',
|
|
5063
|
+
H4: 'h4',
|
|
5064
|
+
H5: 'h5',
|
|
5065
|
+
INSIGHT: 'insight'
|
|
5066
|
+
};
|
|
5067
|
+
var FONT_EMPHASIS = {
|
|
5068
|
+
BOLD: 'bold',
|
|
5069
|
+
ITALIC: 'italic',
|
|
5070
|
+
UNDERLINE: 'underline',
|
|
5071
|
+
MONOSPACE: 'monospace'
|
|
5072
|
+
};
|
|
5073
|
+
var ALIGNMENTS = {
|
|
5074
|
+
LEFT: 'left',
|
|
5075
|
+
RIGHT: 'right',
|
|
5076
|
+
CENTER: 'center',
|
|
5077
|
+
JUSTIFY: 'justify'
|
|
4990
5078
|
};
|
|
4991
5079
|
|
|
4992
|
-
var
|
|
4993
|
-
|
|
4994
|
-
|
|
4995
|
-
|
|
4996
|
-
|
|
4997
|
-
|
|
4998
|
-
|
|
4999
|
-
|
|
5000
|
-
|
|
5001
|
-
_ref$
|
|
5002
|
-
|
|
5003
|
-
|
|
5004
|
-
|
|
5005
|
-
|
|
5006
|
-
|
|
5007
|
-
|
|
5008
|
-
var
|
|
5009
|
-
|
|
5010
|
-
|
|
5011
|
-
|
|
5012
|
-
|
|
5013
|
-
},
|
|
5014
|
-
|
|
5015
|
-
zIndex: zIndex
|
|
5016
|
-
}
|
|
5080
|
+
var styles$m = {"text":"_3CIA3","text__body":"_1nnj8","text__caption":"_37K6o","text__insight":"_avqxy","text--bold":"_2TG6E","text--italic":"_2hlsn","text--underline":"_1Pjo6","text--monospace":"_eDdDI","text--align-left":"_2gNwS","text--align-right":"_ufv1W","text--align-center":"_2WMN6","text--align-justify":"_2iH-J"};
|
|
5081
|
+
|
|
5082
|
+
var _excluded$2g = ["children", "as", "emphasis", "alignment", "color", "testId"];
|
|
5083
|
+
|
|
5084
|
+
var Text = function Text(_ref) {
|
|
5085
|
+
var _classnames;
|
|
5086
|
+
|
|
5087
|
+
var children = _ref.children,
|
|
5088
|
+
_ref$as = _ref.as,
|
|
5089
|
+
as = _ref$as === void 0 ? TEXT_TYPES.BODY : _ref$as,
|
|
5090
|
+
emphasis = _ref.emphasis,
|
|
5091
|
+
alignment = _ref.alignment,
|
|
5092
|
+
color = _ref.color,
|
|
5093
|
+
testId = _ref.testId,
|
|
5094
|
+
positionProps = _objectWithoutPropertiesLoose(_ref, _excluded$2g);
|
|
5095
|
+
|
|
5096
|
+
var positionStyles = usePositionStyles(positionProps);
|
|
5097
|
+
var elementProps = {
|
|
5098
|
+
style: _extends({
|
|
5099
|
+
color: color
|
|
5100
|
+
}, positionStyles),
|
|
5101
|
+
className: classnames(styles$m['text'], (_classnames = {}, _classnames[styles$m['text--bold']] = emphasis === null || emphasis === void 0 ? void 0 : emphasis.includes(FONT_EMPHASIS.BOLD), _classnames[styles$m['text--italic']] = emphasis === null || emphasis === void 0 ? void 0 : emphasis.includes(FONT_EMPHASIS.ITALIC), _classnames[styles$m['text--underline']] = emphasis === null || emphasis === void 0 ? void 0 : emphasis.includes(FONT_EMPHASIS.UNDERLINE), _classnames[styles$m['text--monospace']] = emphasis === null || emphasis === void 0 ? void 0 : emphasis.includes(FONT_EMPHASIS.MONOSPACE), _classnames[styles$m['text--align-left']] = alignment === ALIGNMENTS.LEFT, _classnames[styles$m['text--align-right']] = alignment === ALIGNMENTS.RIGHT, _classnames[styles$m['text--align-center']] = alignment === ALIGNMENTS.CENTER, _classnames[styles$m['text--align-justify']] = alignment === ALIGNMENTS.JUSTIFY, _classnames[styles$m['text__body']] = as === TEXT_TYPES.BODY, _classnames[styles$m['text__insight']] = as === TEXT_TYPES.INSIGHT, _classnames[styles$m['text__caption']] = as === TEXT_TYPES.CAPTION, _classnames)),
|
|
5102
|
+
'data-testid': testId
|
|
5017
5103
|
};
|
|
5018
|
-
|
|
5019
|
-
|
|
5020
|
-
|
|
5021
|
-
shouldCloseOnEsc: true,
|
|
5022
|
-
shouldCloseOnOverlayClick: false,
|
|
5023
|
-
shouldReturnFocusAfterClose: shouldReturnFocusAfterClose,
|
|
5024
|
-
onRequestClose: onClose && !loading ? onClose : undefined,
|
|
5025
|
-
style: style,
|
|
5026
|
-
closeTimeoutMS: 200,
|
|
5027
|
-
contentLabel: "Modal",
|
|
5028
|
-
appElement: rootElementId && document.getElementById(rootElementId) || undefined,
|
|
5029
|
-
overlayClassName: {
|
|
5030
|
-
base: styles$i['overlay'],
|
|
5031
|
-
afterOpen: styles$i['overlay--after-open'],
|
|
5032
|
-
beforeClose: styles$i['overlay--before-close']
|
|
5033
|
-
},
|
|
5034
|
-
className: {
|
|
5035
|
-
base: styles$i['content'],
|
|
5036
|
-
afterOpen: styles$i['content--after-open'],
|
|
5037
|
-
beforeClose: styles$i['content--before-close']
|
|
5038
|
-
}
|
|
5039
|
-
}, React__default.createElement(ModalHeader, {
|
|
5040
|
-
header: header,
|
|
5041
|
-
subHeader: subHeader,
|
|
5042
|
-
onClose: onClose,
|
|
5043
|
-
loading: loading
|
|
5044
|
-
}), children);
|
|
5104
|
+
var pTypes = [TEXT_TYPES.BODY, TEXT_TYPES.CAPTION, TEXT_TYPES.INSIGHT];
|
|
5105
|
+
var element = pTypes.includes(as) ? 'p' : as;
|
|
5106
|
+
return React__default.createElement(element, elementProps, children);
|
|
5045
5107
|
};
|
|
5046
5108
|
|
|
5047
|
-
|
|
5048
|
-
|
|
5109
|
+
var Bold = function Bold(_ref) {
|
|
5110
|
+
var children = _ref.children;
|
|
5111
|
+
return React__default.createElement("span", {
|
|
5112
|
+
className: classnames(styles$m['text--bold'], styles$m['text'])
|
|
5113
|
+
}, children);
|
|
5049
5114
|
};
|
|
5050
5115
|
|
|
5051
|
-
var
|
|
5052
|
-
var
|
|
5053
|
-
|
|
5116
|
+
var Underline = function Underline(_ref) {
|
|
5117
|
+
var children = _ref.children;
|
|
5118
|
+
return React__default.createElement("span", {
|
|
5119
|
+
className: classnames(styles$m['text--underline'], styles$m['text'])
|
|
5120
|
+
}, children);
|
|
5121
|
+
};
|
|
5054
5122
|
|
|
5055
|
-
|
|
5056
|
-
|
|
5057
|
-
|
|
5123
|
+
var Italic = function Italic(_ref) {
|
|
5124
|
+
var children = _ref.children;
|
|
5125
|
+
return React__default.createElement("span", {
|
|
5126
|
+
className: classnames(styles$m['text--italic'], styles$m['text'])
|
|
5127
|
+
}, children);
|
|
5128
|
+
};
|
|
5058
5129
|
|
|
5059
|
-
|
|
5060
|
-
|
|
5061
|
-
|
|
5062
|
-
|
|
5130
|
+
var WHITE = '#ffffff';
|
|
5131
|
+
var EGGPLANT200 = '#d3dbf4';
|
|
5132
|
+
var EGGPLANT300 = '#a7b7ea';
|
|
5133
|
+
var EGGPLANT400 = '#6d87dd';
|
|
5134
|
+
var EGGPLANT500 = '#6179c6';
|
|
5135
|
+
var EGGPLANT600 = '#415184';
|
|
5136
|
+
var RADISH400 = '#e76767';
|
|
5137
|
+
var GREY100 = '#F3F3F3';
|
|
5138
|
+
var GREY200 = '#D5D5D5';
|
|
5139
|
+
var GREY300 = '#949494';
|
|
5140
|
+
var GREY400 = '#767676';
|
|
5141
|
+
var GREY500 = '#464646';
|
|
5063
5142
|
|
|
5064
|
-
|
|
5143
|
+
var DropdownListItem = function DropdownListItem(_ref) {
|
|
5144
|
+
var _classNames;
|
|
5065
5145
|
|
|
5066
|
-
|
|
5067
|
-
|
|
5146
|
+
var onClick = _ref.onClick,
|
|
5147
|
+
prefix = _ref.prefix,
|
|
5148
|
+
suffix = _ref.suffix,
|
|
5149
|
+
caption = _ref.caption,
|
|
5150
|
+
selected = _ref.selected,
|
|
5151
|
+
disabled = _ref.disabled,
|
|
5152
|
+
testId = _ref.testId,
|
|
5153
|
+
children = _ref.children;
|
|
5154
|
+
|
|
5155
|
+
var _useDropdownContext = useDropdownContext(),
|
|
5156
|
+
onToggleDropdown = _useDropdownContext.onToggleDropdown;
|
|
5157
|
+
|
|
5158
|
+
var handleClick = function handleClick(e) {
|
|
5159
|
+
e.stopPropagation();
|
|
5160
|
+
|
|
5161
|
+
if (disabled) {
|
|
5162
|
+
return;
|
|
5068
5163
|
}
|
|
5069
|
-
}, []);
|
|
5070
|
-
return {
|
|
5071
|
-
ref: ref,
|
|
5072
|
-
showScrollShadow: showScrollShadow
|
|
5073
|
-
};
|
|
5074
|
-
};
|
|
5075
5164
|
|
|
5076
|
-
|
|
5165
|
+
onToggleDropdown();
|
|
5166
|
+
onClick(e);
|
|
5167
|
+
};
|
|
5077
5168
|
|
|
5078
|
-
var
|
|
5079
|
-
|
|
5169
|
+
var getCaptionColor = function getCaptionColor() {
|
|
5170
|
+
if (selected) {
|
|
5171
|
+
return EGGPLANT500;
|
|
5172
|
+
}
|
|
5080
5173
|
|
|
5081
|
-
|
|
5082
|
-
|
|
5174
|
+
if (disabled) {
|
|
5175
|
+
return GREY400;
|
|
5176
|
+
}
|
|
5083
5177
|
|
|
5084
|
-
|
|
5085
|
-
|
|
5086
|
-
showScrollShadow = _useScrollShadow.showScrollShadow;
|
|
5178
|
+
return undefined;
|
|
5179
|
+
};
|
|
5087
5180
|
|
|
5088
|
-
return React__default.createElement("
|
|
5089
|
-
className: classnames(styles$
|
|
5090
|
-
|
|
5181
|
+
return React__default.createElement("li", {
|
|
5182
|
+
className: classnames(styles$l['dropdown-list-item'], (_classNames = {}, _classNames[styles$l['dropdown-list-item--selected']] = selected, _classNames[styles$l['dropdown-list-item--disabled']] = disabled, _classNames)),
|
|
5183
|
+
onClick: handleClick,
|
|
5184
|
+
onKeyPress: handleClick,
|
|
5185
|
+
role: "menuitem",
|
|
5091
5186
|
"data-testid": testId
|
|
5092
|
-
},
|
|
5187
|
+
}, prefix, React__default.createElement("div", {
|
|
5188
|
+
className: styles$l['dropdown-list-item__content']
|
|
5189
|
+
}, React__default.createElement(Stack, {
|
|
5190
|
+
space: 4,
|
|
5191
|
+
flex: [1]
|
|
5192
|
+
}, children, caption && React__default.createElement(Text, {
|
|
5193
|
+
as: "caption",
|
|
5194
|
+
color: getCaptionColor()
|
|
5195
|
+
}, caption))), suffix);
|
|
5093
5196
|
};
|
|
5094
5197
|
|
|
5095
|
-
var
|
|
5096
|
-
|
|
5097
|
-
var updateButtonProps = function updateButtonProps(button, newProps) {
|
|
5098
|
-
if (!button) {
|
|
5099
|
-
return null;
|
|
5100
|
-
}
|
|
5198
|
+
var canInteractWithItem = function canInteractWithItem(child) {
|
|
5199
|
+
var itemType = getItemType(child);
|
|
5101
5200
|
|
|
5102
|
-
if (
|
|
5103
|
-
return
|
|
5201
|
+
if (itemType === 'DropdownListDivider') {
|
|
5202
|
+
return false;
|
|
5104
5203
|
}
|
|
5105
5204
|
|
|
5106
|
-
return
|
|
5205
|
+
return !child.props.disabled || false;
|
|
5107
5206
|
};
|
|
5108
5207
|
|
|
5109
|
-
var
|
|
5110
|
-
|
|
5111
|
-
|
|
5112
|
-
|
|
5208
|
+
var getItemType = function getItemType(child) {
|
|
5209
|
+
switch (child.type) {
|
|
5210
|
+
case DropdownListDivider:
|
|
5211
|
+
return 'DropdownListDivider';
|
|
5113
5212
|
|
|
5114
|
-
|
|
5115
|
-
|
|
5213
|
+
case DropdownListItem:
|
|
5214
|
+
return 'DropdownListItem';
|
|
5116
5215
|
|
|
5117
|
-
|
|
5118
|
-
|
|
5119
|
-
size: BUTTON_SIZES.MIN_WIDTH_100
|
|
5120
|
-
});
|
|
5121
|
-
var secondaryButton = updateButtonProps(actions.secondary, {
|
|
5122
|
-
theme: (actions === null || actions === void 0 ? void 0 : (_actions$secondary = actions.secondary) === null || _actions$secondary === void 0 ? void 0 : _actions$secondary.props.theme) || 'default',
|
|
5123
|
-
size: BUTTON_SIZES.MIN_WIDTH_100
|
|
5124
|
-
});
|
|
5125
|
-
var tertiaryButton = updateButtonProps(actions.tertiary, {
|
|
5126
|
-
theme: (actions === null || actions === void 0 ? void 0 : (_actions$tertiary = actions.tertiary) === null || _actions$tertiary === void 0 ? void 0 : _actions$tertiary.props.theme) || 'link-primary',
|
|
5127
|
-
size: BUTTON_SIZES.MIN_WIDTH_100
|
|
5128
|
-
});
|
|
5129
|
-
return React__default.createElement(FooterContainer, {
|
|
5130
|
-
testId: testId
|
|
5131
|
-
}, React__default.createElement(Inline, {
|
|
5132
|
-
justifyContent: "space-between"
|
|
5133
|
-
}, React__default.createElement("div", {
|
|
5134
|
-
className: classnames((_classnames = {}, _classnames[styles$l['tertiary-container']] = tertiaryButton && tertiaryButton.props.theme.startsWith('link'), _classnames))
|
|
5135
|
-
}, tertiaryButton || React__default.createElement("div", null)), React__default.createElement(Inline, {
|
|
5136
|
-
space: 12
|
|
5137
|
-
}, secondaryButton, primaryButton)));
|
|
5216
|
+
default:
|
|
5217
|
+
throw new Error('DropdownList - dropdown items should be using DropdownListDivider or DropdownListItem components');
|
|
5138
5218
|
}
|
|
5139
|
-
|
|
5140
|
-
return React__default.createElement(FooterContainer, null, children);
|
|
5141
5219
|
};
|
|
5142
5220
|
|
|
5143
|
-
var
|
|
5144
|
-
var
|
|
5145
|
-
|
|
5146
|
-
|
|
5147
|
-
|
|
5148
|
-
|
|
5149
|
-
|
|
5150
|
-
|
|
5151
|
-
}, React__default.createElement(Inline, {
|
|
5152
|
-
justifyContent: "end",
|
|
5153
|
-
space: 12,
|
|
5154
|
-
flex: hasCustomAlignment ? [1] : undefined
|
|
5155
|
-
}, children));
|
|
5221
|
+
var calculateScrollYPosition = function calculateScrollYPosition(newFocusItem, lastFocusItem, paneScrollTop, maxPaneHeight, elementYPosition) {
|
|
5222
|
+
var directionCoeff = !lastFocusItem || newFocusItem > lastFocusItem ? -1 * maxPaneHeight : 0;
|
|
5223
|
+
|
|
5224
|
+
if (elementYPosition > paneScrollTop + maxPaneHeight || elementYPosition < paneScrollTop) {
|
|
5225
|
+
return elementYPosition + directionCoeff;
|
|
5226
|
+
}
|
|
5227
|
+
|
|
5228
|
+
return null;
|
|
5156
5229
|
};
|
|
5157
5230
|
|
|
5158
|
-
var
|
|
5231
|
+
var DropdownList = function DropdownList(_ref) {
|
|
5232
|
+
var testId = _ref.testId,
|
|
5233
|
+
children = _ref.children,
|
|
5234
|
+
highlightItemIndex = _ref.highlightItemIndex;
|
|
5159
5235
|
|
|
5160
|
-
var
|
|
5236
|
+
var _useDropdownContext = useDropdownContext(),
|
|
5237
|
+
onToggleDropdown = _useDropdownContext.onToggleDropdown;
|
|
5161
5238
|
|
|
5162
|
-
|
|
5163
|
-
|
|
5164
|
-
|
|
5239
|
+
var items = React__default.Children.toArray(children).map(function (child) {
|
|
5240
|
+
if (!React__default.isValidElement(child)) {
|
|
5241
|
+
throw new Error('DropdownList - dropdown items should be using DropdownListDivider or DropdownListItem components');
|
|
5242
|
+
}
|
|
5243
|
+
|
|
5244
|
+
return {
|
|
5245
|
+
disabled: !canInteractWithItem(child),
|
|
5246
|
+
onClick: child.props.onClick
|
|
5247
|
+
};
|
|
5165
5248
|
});
|
|
5249
|
+
var listRef = useRef(null);
|
|
5166
5250
|
|
|
5167
|
-
|
|
5168
|
-
|
|
5169
|
-
|
|
5251
|
+
var scrollToItem = function scrollToItem(newFocusItem) {
|
|
5252
|
+
if (listRef.current && newFocusItem !== null && listRef.current.parentNode) {
|
|
5253
|
+
var element = listRef.current.querySelector(":nth-child(" + (newFocusItem + 1) + ")");
|
|
5254
|
+
var parentList = listRef.current.parentNode;
|
|
5255
|
+
var scrollYPosition = calculateScrollYPosition(newFocusItem, focusedItem || 0, parentList.scrollTop, 354, element.offsetTop);
|
|
5170
5256
|
|
|
5171
|
-
|
|
5172
|
-
|
|
5173
|
-
|
|
5174
|
-
|
|
5175
|
-
locale: locale
|
|
5176
|
-
});
|
|
5177
|
-
}
|
|
5178
|
-
function setToMidnight(date) {
|
|
5179
|
-
return date && startOfDay(date);
|
|
5180
|
-
}
|
|
5181
|
-
function getStartOfWeek(date, weekIndex) {
|
|
5182
|
-
var d = new Date(date);
|
|
5183
|
-
var firstDay = d.getDate() - d.getDay() + weekIndex;
|
|
5184
|
-
var firstDayAdjusted = firstDay > d.getDate() ? firstDay - 7 : firstDay;
|
|
5185
|
-
return new Date(d.setDate(firstDayAdjusted));
|
|
5186
|
-
}
|
|
5187
|
-
function getEndOfWeek(date, weekIndex) {
|
|
5188
|
-
var startOfWeek = getStartOfWeek(date, weekIndex);
|
|
5189
|
-
var endDay = startOfWeek.getDate() + 6;
|
|
5190
|
-
return new Date(startOfWeek.setDate(endDay));
|
|
5191
|
-
}
|
|
5192
|
-
function createWeekRange(date, weekStart) {
|
|
5193
|
-
return {
|
|
5194
|
-
start: getStartOfWeek(date, weekStart),
|
|
5195
|
-
end: getEndOfWeek(date, weekStart)
|
|
5257
|
+
if (scrollYPosition !== null) {
|
|
5258
|
+
parentList.scrollTo(0, scrollYPosition);
|
|
5259
|
+
}
|
|
5260
|
+
}
|
|
5196
5261
|
};
|
|
5197
|
-
}
|
|
5198
|
-
var DAYS = [getLocalizedString('time.sunday'), getLocalizedString('time.monday'), getLocalizedString('time.tuesday'), getLocalizedString('time.wednesday'), getLocalizedString('time.thursday'), getLocalizedString('time.friday'), getLocalizedString('time.saturday')];
|
|
5199
|
-
var MONTH_NAMES = [getLocalizedString('time.january'), getLocalizedString('time.february'), getLocalizedString('time.march'), getLocalizedString('time.april'), getLocalizedString('time.may'), getLocalizedString('time.june'), getLocalizedString('time.july'), getLocalizedString('time.august'), getLocalizedString('time.september'), getLocalizedString('time.october'), getLocalizedString('time.november'), getLocalizedString('time.december')];
|
|
5200
5262
|
|
|
5201
|
-
var
|
|
5202
|
-
|
|
5203
|
-
|
|
5204
|
-
}
|
|
5205
|
-
|
|
5206
|
-
|
|
5207
|
-
|
|
5263
|
+
var _useListKeyboardNavig = useListKeyboardNavigation(items, {
|
|
5264
|
+
onPressEnter: onToggleDropdown,
|
|
5265
|
+
onNavigate: scrollToItem
|
|
5266
|
+
}),
|
|
5267
|
+
focusedItem = _useListKeyboardNavig.focusedItem,
|
|
5268
|
+
setFocusOnItem = _useListKeyboardNavig.setFocusOnItem;
|
|
5269
|
+
|
|
5270
|
+
useEffect(function () {
|
|
5271
|
+
if (highlightItemIndex !== undefined) {
|
|
5272
|
+
setFocusOnItem(highlightItemIndex);
|
|
5273
|
+
|
|
5274
|
+
if (highlightItemIndex >= 0) {
|
|
5275
|
+
scrollToItem(highlightItemIndex);
|
|
5276
|
+
}
|
|
5277
|
+
}
|
|
5278
|
+
}, [highlightItemIndex]);
|
|
5279
|
+
return React__default.createElement("ul", {
|
|
5280
|
+
className: styles$j['dropdown-list'],
|
|
5281
|
+
"data-testid": testId,
|
|
5282
|
+
ref: listRef
|
|
5283
|
+
}, React__default.Children.map(children, function (child, index) {
|
|
5284
|
+
var _classNames;
|
|
5285
|
+
|
|
5286
|
+
return React__default.createElement("div", {
|
|
5287
|
+
key: index,
|
|
5288
|
+
className: classnames(styles$j['dropdown-list__item'], (_classNames = {}, _classNames[styles$j['dropdown-list__item--hover']] = focusedItem === index, _classNames)),
|
|
5289
|
+
onMouseEnter: function onMouseEnter() {
|
|
5290
|
+
return setFocusOnItem(index);
|
|
5291
|
+
}
|
|
5292
|
+
}, child);
|
|
5293
|
+
}));
|
|
5208
5294
|
};
|
|
5209
5295
|
|
|
5210
|
-
var
|
|
5211
|
-
if (!calendarDimensions) {
|
|
5212
|
-
return {
|
|
5213
|
-
left: 0,
|
|
5214
|
-
top: 0
|
|
5215
|
-
};
|
|
5216
|
-
}
|
|
5296
|
+
var styles$n = {"label":"_h724f","label--truncate":"_1VUoF"};
|
|
5217
5297
|
|
|
5218
|
-
|
|
5219
|
-
|
|
5220
|
-
return _extends({}, horizontalPosition, verticalPosition);
|
|
5298
|
+
var isEllipsisActive = function isEllipsisActive(e) {
|
|
5299
|
+
return e.offsetWidth < e.scrollWidth;
|
|
5221
5300
|
};
|
|
5222
5301
|
|
|
5223
|
-
var
|
|
5224
|
-
var
|
|
5225
|
-
|
|
5302
|
+
var useLabelTooltip = function useLabelTooltip(labelId, tooltipContent, truncate) {
|
|
5303
|
+
var _useState = useState(false),
|
|
5304
|
+
showTooltip = _useState[0],
|
|
5305
|
+
setShowTooltip = _useState[1];
|
|
5226
5306
|
|
|
5227
|
-
|
|
5228
|
-
|
|
5229
|
-
|
|
5230
|
-
|
|
5231
|
-
|
|
5307
|
+
var shouldTruncate = typeof tooltipContent === 'string' && truncate;
|
|
5308
|
+
var labelElement = document.getElementById(labelId);
|
|
5309
|
+
var isHidden = labelElement && labelElement.offsetParent === null;
|
|
5310
|
+
var handleApplyTooltip = useCallback(function () {
|
|
5311
|
+
if (!shouldTruncate) {
|
|
5312
|
+
return;
|
|
5313
|
+
}
|
|
5314
|
+
|
|
5315
|
+
var labelElement = document.getElementById(labelId);
|
|
5316
|
+
|
|
5317
|
+
if (!labelElement) {
|
|
5318
|
+
return;
|
|
5319
|
+
}
|
|
5320
|
+
|
|
5321
|
+
var shouldShowTooltip = isEllipsisActive(labelElement);
|
|
5232
5322
|
|
|
5323
|
+
if (showTooltip !== shouldShowTooltip) {
|
|
5324
|
+
setShowTooltip(shouldShowTooltip);
|
|
5325
|
+
}
|
|
5326
|
+
}, [shouldTruncate, isHidden]);
|
|
5327
|
+
useEffect(function () {
|
|
5328
|
+
var onWindowResize = debounce(handleApplyTooltip, 300);
|
|
5329
|
+
window.addEventListener('resize', onWindowResize);
|
|
5330
|
+
return function () {
|
|
5331
|
+
return window.removeEventListener('resize', onWindowResize);
|
|
5332
|
+
};
|
|
5333
|
+
}, [handleApplyTooltip]);
|
|
5334
|
+
useLayoutEffect(handleApplyTooltip, [handleApplyTooltip]);
|
|
5233
5335
|
return {
|
|
5234
|
-
|
|
5336
|
+
showTooltip: showTooltip,
|
|
5337
|
+
shouldTruncate: shouldTruncate
|
|
5235
5338
|
};
|
|
5236
5339
|
};
|
|
5237
5340
|
|
|
5238
|
-
var
|
|
5239
|
-
var
|
|
5240
|
-
var calendarTopBelowTrigger = anchorPosition.bottom + PADDING;
|
|
5341
|
+
var Label = function Label(_ref) {
|
|
5342
|
+
var _classNames;
|
|
5241
5343
|
|
|
5242
|
-
|
|
5243
|
-
|
|
5244
|
-
|
|
5245
|
-
|
|
5246
|
-
|
|
5247
|
-
}
|
|
5344
|
+
var htmlFor = _ref.htmlFor,
|
|
5345
|
+
children = _ref.children,
|
|
5346
|
+
_ref$truncate = _ref.truncate,
|
|
5347
|
+
truncate = _ref$truncate === void 0 ? true : _ref$truncate;
|
|
5348
|
+
var labelId = "label-" + htmlFor;
|
|
5248
5349
|
|
|
5249
|
-
|
|
5250
|
-
|
|
5251
|
-
|
|
5252
|
-
} else {
|
|
5253
|
-
if (calendarTopBelowTrigger + calendarDimensions.height > window.innerHeight) {
|
|
5254
|
-
return {
|
|
5255
|
-
top: calendarTopAboveTrigger + window.scrollY
|
|
5256
|
-
};
|
|
5257
|
-
}
|
|
5350
|
+
var _useLabelTooltip = useLabelTooltip(labelId, children, truncate),
|
|
5351
|
+
showTooltip = _useLabelTooltip.showTooltip,
|
|
5352
|
+
shouldTruncate = _useLabelTooltip.shouldTruncate;
|
|
5258
5353
|
|
|
5259
|
-
|
|
5260
|
-
|
|
5261
|
-
|
|
5354
|
+
var LabelElement = React__default.createElement("label", {
|
|
5355
|
+
htmlFor: htmlFor,
|
|
5356
|
+
id: labelId,
|
|
5357
|
+
className: classnames(styles$n['label'], (_classNames = {}, _classNames[styles$n['label--truncate']] = shouldTruncate, _classNames))
|
|
5358
|
+
}, children);
|
|
5359
|
+
|
|
5360
|
+
if (showTooltip) {
|
|
5361
|
+
return React__default.createElement(Tooltip$1, {
|
|
5362
|
+
overlay: children,
|
|
5363
|
+
placement: "top"
|
|
5364
|
+
}, LabelElement);
|
|
5262
5365
|
}
|
|
5366
|
+
|
|
5367
|
+
return LabelElement;
|
|
5263
5368
|
};
|
|
5264
5369
|
|
|
5265
|
-
var
|
|
5266
|
-
var _ref$mode = _ref.mode,
|
|
5267
|
-
mode = _ref$mode === void 0 ? CALENDAR_MODE.DAY : _ref$mode,
|
|
5268
|
-
_ref$position = _ref.position,
|
|
5269
|
-
position = _ref$position === void 0 ? CALENDAR_PLACEMENT.BOTTOM : _ref$position,
|
|
5270
|
-
_ref$weekStart = _ref.weekStart,
|
|
5271
|
-
weekStart = _ref$weekStart === void 0 ? 0 : _ref$weekStart,
|
|
5272
|
-
selected = _ref.selected,
|
|
5273
|
-
onSelect = _ref.onSelect,
|
|
5274
|
-
onClickOutside = _ref.onClickOutside,
|
|
5275
|
-
disabledDays = _ref.disabledDays,
|
|
5276
|
-
anchorRef = _ref.anchorRef,
|
|
5277
|
-
testId = _ref.testId;
|
|
5370
|
+
var styles$o = {"caption":"_1DWBq"};
|
|
5278
5371
|
|
|
5279
|
-
|
|
5280
|
-
|
|
5281
|
-
|
|
5372
|
+
var Caption = function Caption(_ref) {
|
|
5373
|
+
var fieldId = _ref.fieldId,
|
|
5374
|
+
children = _ref.children;
|
|
5375
|
+
return React__default.createElement("div", {
|
|
5376
|
+
id: fieldId && fieldId + "-describer",
|
|
5377
|
+
className: styles$o['caption']
|
|
5378
|
+
}, children);
|
|
5379
|
+
};
|
|
5282
5380
|
|
|
5283
|
-
|
|
5284
|
-
var anchorNode = anchorRef.current;
|
|
5285
|
-
useOnClickOutside({
|
|
5286
|
-
current: calendarRef
|
|
5287
|
-
}, function (event) {
|
|
5288
|
-
var _anchorRef$current;
|
|
5381
|
+
var styles$p = {"error-message":"_nZ2MD"};
|
|
5289
5382
|
|
|
5290
|
-
|
|
5291
|
-
|
|
5292
|
-
|
|
5293
|
-
|
|
5294
|
-
|
|
5295
|
-
|
|
5296
|
-
|
|
5297
|
-
|
|
5298
|
-
}
|
|
5383
|
+
var ErrorMessage = function ErrorMessage(_ref) {
|
|
5384
|
+
var fieldId = _ref.fieldId,
|
|
5385
|
+
children = _ref.children,
|
|
5386
|
+
testId = _ref.testId;
|
|
5387
|
+
return React__default.createElement("div", {
|
|
5388
|
+
id: fieldId && fieldId + "-error-message",
|
|
5389
|
+
className: styles$p['error-message'],
|
|
5390
|
+
"data-testid": testId
|
|
5391
|
+
}, React__default.createElement(Inline, {
|
|
5392
|
+
space: 8,
|
|
5393
|
+
alignItems: "center"
|
|
5394
|
+
}, React__default.createElement(IconTimesOctagon, {
|
|
5395
|
+
color: RADISH400,
|
|
5396
|
+
size: "medium"
|
|
5397
|
+
}), children));
|
|
5398
|
+
};
|
|
5299
5399
|
|
|
5300
|
-
|
|
5301
|
-
|
|
5400
|
+
var Field = function Field(_ref) {
|
|
5401
|
+
var id = _ref.id,
|
|
5402
|
+
label = _ref.label,
|
|
5403
|
+
caption = _ref.caption,
|
|
5404
|
+
error = _ref.error,
|
|
5405
|
+
children = _ref.children;
|
|
5406
|
+
var shouldRenderLabel = label || typeof label === 'string';
|
|
5407
|
+
return React__default.createElement(Stack, {
|
|
5408
|
+
space: 8,
|
|
5409
|
+
flexItems: true
|
|
5410
|
+
}, shouldRenderLabel && React__default.createElement(Label, {
|
|
5411
|
+
htmlFor: id
|
|
5412
|
+
}, label), children, caption && React__default.createElement(Caption, {
|
|
5413
|
+
fieldId: id
|
|
5414
|
+
}, caption), error && React__default.createElement(ErrorMessage, {
|
|
5415
|
+
fieldId: id
|
|
5416
|
+
}, error));
|
|
5417
|
+
};
|
|
5302
5418
|
|
|
5303
|
-
|
|
5304
|
-
|
|
5305
|
-
|
|
5306
|
-
|
|
5419
|
+
var Context$1 = createContext({});
|
|
5420
|
+
var useFormContext = function useFormContext() {
|
|
5421
|
+
var context = useContext(Context$1);
|
|
5422
|
+
return context || {};
|
|
5423
|
+
};
|
|
5307
5424
|
|
|
5308
|
-
|
|
5309
|
-
|
|
5425
|
+
var useFieldId = function useFieldId(_ref) {
|
|
5426
|
+
var name = _ref.name,
|
|
5427
|
+
inputId = _ref.id;
|
|
5428
|
+
var id = useMemo(function () {
|
|
5429
|
+
return inputId ? inputId : name + "-" + Math.random();
|
|
5430
|
+
}, [inputId, name]);
|
|
5431
|
+
return id;
|
|
5432
|
+
};
|
|
5310
5433
|
|
|
5311
|
-
|
|
5312
|
-
|
|
5313
|
-
|
|
5314
|
-
}
|
|
5434
|
+
var getFormikState = function getFormikState(name, formik) {
|
|
5435
|
+
if (formik === undefined) {
|
|
5436
|
+
return null;
|
|
5437
|
+
}
|
|
5315
5438
|
|
|
5316
|
-
|
|
5439
|
+
var formikPath = getFormikArrayPath(name);
|
|
5440
|
+
|
|
5441
|
+
if (formikPath.length === 0) {
|
|
5317
5442
|
return null;
|
|
5318
5443
|
}
|
|
5319
5444
|
|
|
5320
|
-
var
|
|
5321
|
-
|
|
5322
|
-
|
|
5323
|
-
|
|
5324
|
-
|
|
5325
|
-
|
|
5326
|
-
|
|
5327
|
-
|
|
5445
|
+
var formikLatestLevel = formikPath.reduce(function (acc, path) {
|
|
5446
|
+
var _acc$touched, _acc$error, _acc$value;
|
|
5447
|
+
|
|
5448
|
+
return {
|
|
5449
|
+
touched: (_acc$touched = acc.touched) === null || _acc$touched === void 0 ? void 0 : _acc$touched[path],
|
|
5450
|
+
error: (_acc$error = acc.error) === null || _acc$error === void 0 ? void 0 : _acc$error[path],
|
|
5451
|
+
value: (_acc$value = acc.value) === null || _acc$value === void 0 ? void 0 : _acc$value[path]
|
|
5452
|
+
};
|
|
5453
|
+
}, {
|
|
5454
|
+
touched: formik.touched,
|
|
5455
|
+
error: formik.errors,
|
|
5456
|
+
value: formik.values
|
|
5457
|
+
});
|
|
5458
|
+
return {
|
|
5459
|
+
error: formikLatestLevel.touched ? formikLatestLevel.error : undefined,
|
|
5460
|
+
value: formikLatestLevel.value
|
|
5461
|
+
};
|
|
5462
|
+
};
|
|
5463
|
+
var getFormikArrayPath = function getFormikArrayPath(name) {
|
|
5464
|
+
return name.split(/[^a-zA-Z0-9]/).filter(Boolean);
|
|
5465
|
+
};
|
|
5466
|
+
|
|
5467
|
+
var useFieldControllers = function useFieldControllers(_ref) {
|
|
5468
|
+
var name = _ref.name,
|
|
5469
|
+
inputId = _ref.id,
|
|
5470
|
+
value = _ref.value,
|
|
5471
|
+
_onChange = _ref.onChange,
|
|
5472
|
+
_onBlur = _ref.onBlur,
|
|
5473
|
+
_onFocus = _ref.onFocus,
|
|
5474
|
+
_onKeyDown = _ref.onKeyDown,
|
|
5475
|
+
error = _ref.error,
|
|
5476
|
+
_ref$type = _ref.type,
|
|
5477
|
+
type = _ref$type === void 0 ? 'text' : _ref$type;
|
|
5478
|
+
|
|
5479
|
+
var _useFormContext = useFormContext(),
|
|
5480
|
+
formik = _useFormContext.formik;
|
|
5481
|
+
|
|
5482
|
+
var id = useFieldId({
|
|
5483
|
+
name: name,
|
|
5484
|
+
id: inputId
|
|
5485
|
+
});
|
|
5486
|
+
var controllers = {
|
|
5487
|
+
id: id,
|
|
5488
|
+
error: error,
|
|
5489
|
+
value: value,
|
|
5490
|
+
onChange: function onChange(e) {
|
|
5491
|
+
return _onChange && _onChange(e.target.value);
|
|
5328
5492
|
},
|
|
5329
|
-
|
|
5330
|
-
|
|
5331
|
-
}
|
|
5332
|
-
|
|
5333
|
-
|
|
5334
|
-
|
|
5335
|
-
|
|
5336
|
-
|
|
5337
|
-
|
|
5338
|
-
|
|
5339
|
-
|
|
5493
|
+
onBlur: function onBlur(e) {
|
|
5494
|
+
return _onBlur && _onBlur(e.target.value);
|
|
5495
|
+
},
|
|
5496
|
+
onFocus: function onFocus(e) {
|
|
5497
|
+
return _onFocus && _onFocus(e.target.value);
|
|
5498
|
+
},
|
|
5499
|
+
onKeyDown: function onKeyDown(e) {
|
|
5500
|
+
return _onKeyDown && _onKeyDown(e.key);
|
|
5501
|
+
}
|
|
5502
|
+
};
|
|
5503
|
+
var formikState = getFormikState(name, formik);
|
|
5340
5504
|
|
|
5341
|
-
|
|
5342
|
-
|
|
5505
|
+
if (formik && formikState) {
|
|
5506
|
+
var currencyBlur = function currencyBlur() {
|
|
5507
|
+
if (type === 'currency') {
|
|
5508
|
+
formik.setFieldValue(name, Number(value).toFixed(2));
|
|
5343
5509
|
}
|
|
5344
|
-
}
|
|
5345
|
-
|
|
5346
|
-
|
|
5347
|
-
|
|
5348
|
-
|
|
5349
|
-
|
|
5350
|
-
|
|
5351
|
-
|
|
5352
|
-
|
|
5353
|
-
|
|
5354
|
-
|
|
5355
|
-
|
|
5510
|
+
};
|
|
5511
|
+
|
|
5512
|
+
controllers = _extends({}, controllers, {
|
|
5513
|
+
error: error !== undefined ? controllers.error : formikState.error,
|
|
5514
|
+
value: value !== undefined ? controllers.value : formikState.value,
|
|
5515
|
+
onChange: _onChange ? controllers.onChange : function (e) {
|
|
5516
|
+
return formik.setFieldValue(name, e.target.value);
|
|
5517
|
+
},
|
|
5518
|
+
onBlur: _onBlur ? function (e) {
|
|
5519
|
+
_onBlur && _onBlur(e.target.value);
|
|
5520
|
+
formik.setFieldTouched(name);
|
|
5521
|
+
currencyBlur();
|
|
5522
|
+
} : function () {
|
|
5523
|
+
formik.setFieldTouched(name);
|
|
5524
|
+
currencyBlur();
|
|
5525
|
+
}
|
|
5526
|
+
});
|
|
5527
|
+
}
|
|
5528
|
+
|
|
5529
|
+
return controllers;
|
|
5356
5530
|
};
|
|
5357
5531
|
|
|
5358
|
-
var
|
|
5359
|
-
var _columns$columnIndex, _classnames, _classnames2, _classnames3;
|
|
5532
|
+
var textFieldStyles = {"text-field":"_20YOA","text-field--invalid":"_3kUSh","text-field--prefixed":"_3IU3Q","text-field--suffixed":"_QXJOD"};
|
|
5360
5533
|
|
|
5361
|
-
|
|
5362
|
-
|
|
5363
|
-
error = _ref.error,
|
|
5364
|
-
_ref$delayOnCloseErro = _ref.delayOnCloseError,
|
|
5365
|
-
delayOnCloseError = _ref$delayOnCloseErro === void 0 ? false : _ref$delayOnCloseErro,
|
|
5366
|
-
_ref$noPadding = _ref.noPadding,
|
|
5367
|
-
noPadding = _ref$noPadding === void 0 ? false : _ref$noPadding,
|
|
5368
|
-
colSpan = _ref.colSpan;
|
|
5534
|
+
var useTextField = function useTextField(_ref) {
|
|
5535
|
+
var _classnames;
|
|
5369
5536
|
|
|
5370
|
-
var
|
|
5371
|
-
|
|
5372
|
-
|
|
5537
|
+
var autoComplete = _ref.autoComplete,
|
|
5538
|
+
autoFocus = _ref.autoFocus,
|
|
5539
|
+
defaultValue = _ref.defaultValue,
|
|
5540
|
+
disabled = _ref.disabled,
|
|
5541
|
+
error = _ref.error,
|
|
5542
|
+
id = _ref.id,
|
|
5543
|
+
maxLength = _ref.maxLength,
|
|
5544
|
+
name = _ref.name,
|
|
5545
|
+
caption = _ref.caption,
|
|
5546
|
+
label = _ref.label,
|
|
5547
|
+
onBlur = _ref.onBlur,
|
|
5548
|
+
onChange = _ref.onChange,
|
|
5549
|
+
onFocus = _ref.onFocus,
|
|
5550
|
+
onKeyDown = _ref.onKeyDown,
|
|
5551
|
+
placeholder = _ref.placeholder,
|
|
5552
|
+
value = _ref.value,
|
|
5553
|
+
ref = _ref.ref,
|
|
5554
|
+
testId = _ref.testId;
|
|
5555
|
+
var controllers = useFieldControllers({
|
|
5556
|
+
error: error,
|
|
5557
|
+
id: id,
|
|
5558
|
+
name: name,
|
|
5559
|
+
onChange: onChange,
|
|
5560
|
+
onBlur: onBlur,
|
|
5561
|
+
onFocus: onFocus,
|
|
5562
|
+
onKeyDown: onKeyDown,
|
|
5563
|
+
value: value
|
|
5564
|
+
});
|
|
5565
|
+
var hasError = !!controllers.error;
|
|
5566
|
+
var inputProps = {
|
|
5567
|
+
'aria-describedby': hasError ? controllers.id + "-error-message" : controllers.id + "-describer",
|
|
5568
|
+
'aria-invalid': hasError,
|
|
5569
|
+
autoComplete: autoComplete,
|
|
5570
|
+
autoFocus: autoFocus,
|
|
5571
|
+
className: classnames(textFieldStyles['text-field'], (_classnames = {}, _classnames[textFieldStyles['text-field--invalid']] = hasError, _classnames)),
|
|
5572
|
+
'data-testid': testId,
|
|
5573
|
+
disabled: disabled,
|
|
5574
|
+
defaultValue: defaultValue,
|
|
5575
|
+
id: controllers.id,
|
|
5576
|
+
maxLength: maxLength,
|
|
5577
|
+
name: name,
|
|
5578
|
+
onBlur: controllers.onBlur,
|
|
5579
|
+
onChange: controllers.onChange,
|
|
5580
|
+
onFocus: controllers.onFocus,
|
|
5581
|
+
onKeyDown: controllers.onKeyDown,
|
|
5582
|
+
placeholder: placeholder,
|
|
5583
|
+
ref: ref,
|
|
5584
|
+
size: 1,
|
|
5585
|
+
type: 'text',
|
|
5586
|
+
value: controllers.value
|
|
5587
|
+
};
|
|
5588
|
+
var fieldProps = {
|
|
5589
|
+
caption: caption,
|
|
5590
|
+
error: controllers.error,
|
|
5591
|
+
label: label,
|
|
5592
|
+
id: inputProps.id,
|
|
5593
|
+
name: name
|
|
5594
|
+
};
|
|
5595
|
+
return {
|
|
5596
|
+
inputProps: inputProps,
|
|
5597
|
+
fieldProps: fieldProps
|
|
5598
|
+
};
|
|
5599
|
+
};
|
|
5373
5600
|
|
|
5374
|
-
|
|
5375
|
-
var
|
|
5376
|
-
|
|
5377
|
-
|
|
5378
|
-
|
|
5379
|
-
|
|
5380
|
-
|
|
5381
|
-
|
|
5382
|
-
|
|
5601
|
+
var TimeFieldInput = function TimeFieldInput(_ref) {
|
|
5602
|
+
var inputProps = _ref.inputProps,
|
|
5603
|
+
allOtherProps = _ref.allOtherProps;
|
|
5604
|
+
return React__default.createElement("input", Object.assign({}, inputProps, {
|
|
5605
|
+
onBlur: function onBlur(e) {
|
|
5606
|
+
e.target.value = parseTime(e.target.value, 'g:i A');
|
|
5607
|
+
inputProps.onChange(e);
|
|
5608
|
+
inputProps.onBlur(e);
|
|
5609
|
+
},
|
|
5610
|
+
onClick: allOtherProps.onClick,
|
|
5611
|
+
onMouseEnter: allOtherProps.onMouseEnter,
|
|
5612
|
+
onMouseLeave: allOtherProps.onMouseLeave,
|
|
5613
|
+
onInput: function onInput(e) {
|
|
5614
|
+
var target = e.target;
|
|
5615
|
+
allOtherProps.onInputChange(target.value);
|
|
5616
|
+
}
|
|
5383
5617
|
}));
|
|
5384
|
-
var TableCell = React__default.createElement("td", {
|
|
5385
|
-
className: classnames((_classnames2 = {}, _classnames2[styles$h['data-table-cell--invalid']] = hasError, _classnames2[styles$h['data-table-cell--no-padding']] = noPadding, _classnames2[styles$h['data-table-cell--vertical-border']] = hasVerticalBorders, _classnames2), styles$h['data-table-cell']),
|
|
5386
|
-
colSpan: colSpan,
|
|
5387
|
-
ref: ref
|
|
5388
|
-
}, React__default.createElement("div", {
|
|
5389
|
-
className: classnames(styles$h['data-table-cell__content'], (_classnames3 = {}, _classnames3[styles$h['data-table-cell__content--with-error']] = hasError, _classnames3[styles$h['data-table-cell__content--right-align']] = isRightAligned, _classnames3))
|
|
5390
|
-
}, isRightAligned && icon, children, !isRightAligned && icon));
|
|
5391
|
-
return React__default.createElement(Tooltip$1, {
|
|
5392
|
-
overlay: errorMessage,
|
|
5393
|
-
delayOnClose: delayOnCloseError,
|
|
5394
|
-
placement: "top",
|
|
5395
|
-
theme: "white"
|
|
5396
|
-
}, TableCell);
|
|
5397
5618
|
};
|
|
5398
5619
|
|
|
5399
|
-
var
|
|
5620
|
+
var _excluded$2h = ["placeholder", "autoComplete"];
|
|
5400
5621
|
|
|
5401
|
-
var
|
|
5402
|
-
var
|
|
5403
|
-
|
|
5404
|
-
|
|
5405
|
-
|
|
5406
|
-
|
|
5407
|
-
|
|
5408
|
-
|
|
5409
|
-
|
|
5410
|
-
|
|
5411
|
-
|
|
5412
|
-
},
|
|
5413
|
-
|
|
5414
|
-
|
|
5415
|
-
}, sideActions.length > 0 && sideActions.map(function (action) {
|
|
5416
|
-
return React__default.createElement(Button$1, Object.assign({
|
|
5417
|
-
key: action.action,
|
|
5418
|
-
onClick: action.onAction,
|
|
5419
|
-
theme: typeof action.label === 'string' ? 'default' : 'link-icon'
|
|
5420
|
-
}, action.showInKebab === false ? action.buttonProps : {}), action.label);
|
|
5421
|
-
}), kebabMenuItems.length > 0 && React__default.createElement(KebabMenu, {
|
|
5422
|
-
actions: kebabMenuItems
|
|
5423
|
-
})));
|
|
5424
|
-
};
|
|
5622
|
+
var TimeFieldDropdownElement = function TimeFieldDropdownElement(_ref, ref) {
|
|
5623
|
+
var _ref$placeholder = _ref.placeholder,
|
|
5624
|
+
placeholder = _ref$placeholder === void 0 ? '9:00 AM' : _ref$placeholder,
|
|
5625
|
+
_ref$autoComplete = _ref.autoComplete,
|
|
5626
|
+
autoComplete = _ref$autoComplete === void 0 ? 'off' : _ref$autoComplete,
|
|
5627
|
+
allOtherProps = _objectWithoutPropertiesLoose(_ref, _excluded$2h);
|
|
5628
|
+
|
|
5629
|
+
var _useTextField = useTextField(_extends({}, allOtherProps, {
|
|
5630
|
+
placeholder: placeholder,
|
|
5631
|
+
autoComplete: autoComplete,
|
|
5632
|
+
ref: ref
|
|
5633
|
+
})),
|
|
5634
|
+
inputProps = _useTextField.inputProps,
|
|
5635
|
+
fieldProps = _useTextField.fieldProps;
|
|
5425
5636
|
|
|
5426
|
-
|
|
5427
|
-
|
|
5428
|
-
|
|
5429
|
-
|
|
5637
|
+
return React__default.createElement(Field, Object.assign({}, fieldProps), React__default.createElement(TimeFieldInput, {
|
|
5638
|
+
inputProps: inputProps,
|
|
5639
|
+
allOtherProps: allOtherProps
|
|
5640
|
+
}));
|
|
5430
5641
|
};
|
|
5431
5642
|
|
|
5432
|
-
var
|
|
5433
|
-
var name = _ref.name,
|
|
5434
|
-
inputId = _ref.id;
|
|
5435
|
-
var id = useMemo(function () {
|
|
5436
|
-
return inputId ? inputId : name + "-" + Math.random();
|
|
5437
|
-
}, [inputId, name]);
|
|
5438
|
-
return id;
|
|
5439
|
-
};
|
|
5643
|
+
var TimeFieldDropdownTrigger = forwardRef(TimeFieldDropdownElement);
|
|
5440
5644
|
|
|
5441
|
-
var
|
|
5442
|
-
|
|
5443
|
-
|
|
5444
|
-
|
|
5645
|
+
var Dropdown = function Dropdown(_ref) {
|
|
5646
|
+
var trigger = _ref.trigger,
|
|
5647
|
+
_ref$triggersOn = _ref.triggersOn,
|
|
5648
|
+
triggersOn = _ref$triggersOn === void 0 ? DROPDOWN_TRIGGER.CLICK : _ref$triggersOn,
|
|
5649
|
+
_ref$alignment = _ref.alignment,
|
|
5650
|
+
alignment = _ref$alignment === void 0 ? DROPDOWN_ALIGNEMNT.RIGHT : _ref$alignment,
|
|
5651
|
+
width = _ref.width,
|
|
5652
|
+
maxHeight = _ref.maxHeight,
|
|
5653
|
+
testId = _ref.testId,
|
|
5654
|
+
children = _ref.children,
|
|
5655
|
+
triggerWidth = _ref.triggerWidth;
|
|
5445
5656
|
|
|
5446
|
-
var
|
|
5657
|
+
var _useState = useState(false),
|
|
5658
|
+
isOpen = _useState[0],
|
|
5659
|
+
setIsOpen = _useState[1];
|
|
5447
5660
|
|
|
5448
|
-
|
|
5449
|
-
|
|
5450
|
-
|
|
5661
|
+
var triggerRef = useRef(null);
|
|
5662
|
+
var paneRef = useRef(null);
|
|
5663
|
+
var isFocusingOverlay = useRef(false);
|
|
5451
5664
|
|
|
5452
|
-
var
|
|
5453
|
-
|
|
5665
|
+
var handleToggleDropdown = function handleToggleDropdown() {
|
|
5666
|
+
return setIsOpen(!isOpen);
|
|
5667
|
+
};
|
|
5454
5668
|
|
|
5455
|
-
|
|
5456
|
-
|
|
5457
|
-
|
|
5458
|
-
|
|
5459
|
-
|
|
5460
|
-
|
|
5461
|
-
|
|
5462
|
-
|
|
5463
|
-
|
|
5464
|
-
|
|
5465
|
-
|
|
5466
|
-
|
|
5467
|
-
value: formikLatestLevel.value
|
|
5669
|
+
var handleMouseClick = function handleMouseClick(e) {
|
|
5670
|
+
if (trigger.type === TimeFieldDropdownTrigger) {
|
|
5671
|
+
setIsOpen(true);
|
|
5672
|
+
} else {
|
|
5673
|
+
handleToggleDropdown();
|
|
5674
|
+
}
|
|
5675
|
+
|
|
5676
|
+
e.stopPropagation();
|
|
5677
|
+
|
|
5678
|
+
if ('onClick' in trigger.props) {
|
|
5679
|
+
trigger.props.onClick(e);
|
|
5680
|
+
}
|
|
5468
5681
|
};
|
|
5469
|
-
};
|
|
5470
|
-
var getFormikArrayPath = function getFormikArrayPath(name) {
|
|
5471
|
-
return name.split(/[^a-zA-Z0-9]/).filter(Boolean);
|
|
5472
|
-
};
|
|
5473
5682
|
|
|
5474
|
-
var
|
|
5475
|
-
|
|
5476
|
-
|
|
5477
|
-
|
|
5478
|
-
_onChange = _ref.onChange,
|
|
5479
|
-
_onBlur = _ref.onBlur,
|
|
5480
|
-
_onFocus = _ref.onFocus,
|
|
5481
|
-
_onKeyDown = _ref.onKeyDown,
|
|
5482
|
-
error = _ref.error,
|
|
5483
|
-
_ref$type = _ref.type,
|
|
5484
|
-
type = _ref$type === void 0 ? 'text' : _ref$type;
|
|
5683
|
+
var handleMouseEnter = function handleMouseEnter(e) {
|
|
5684
|
+
if (triggersOn !== 'hover') {
|
|
5685
|
+
return;
|
|
5686
|
+
}
|
|
5485
5687
|
|
|
5486
|
-
|
|
5487
|
-
formik = _useFormContext.formik;
|
|
5688
|
+
setIsOpen(true);
|
|
5488
5689
|
|
|
5489
|
-
|
|
5490
|
-
|
|
5491
|
-
id: inputId
|
|
5492
|
-
});
|
|
5493
|
-
var controllers = {
|
|
5494
|
-
id: id,
|
|
5495
|
-
error: error,
|
|
5496
|
-
value: value,
|
|
5497
|
-
onChange: function onChange(e) {
|
|
5498
|
-
return _onChange && _onChange(e.target.value);
|
|
5499
|
-
},
|
|
5500
|
-
onBlur: function onBlur(e) {
|
|
5501
|
-
return _onBlur && _onBlur(e.target.value);
|
|
5502
|
-
},
|
|
5503
|
-
onFocus: function onFocus(e) {
|
|
5504
|
-
return _onFocus && _onFocus(e.target.value);
|
|
5505
|
-
},
|
|
5506
|
-
onKeyDown: function onKeyDown(e) {
|
|
5507
|
-
return _onKeyDown && _onKeyDown(e.key);
|
|
5690
|
+
if ('onMouseEnter' in trigger.props) {
|
|
5691
|
+
trigger.props.onMouseEnter(e);
|
|
5508
5692
|
}
|
|
5509
5693
|
};
|
|
5510
|
-
var formikState = getFormikState(name, formik);
|
|
5511
5694
|
|
|
5512
|
-
|
|
5513
|
-
|
|
5514
|
-
if (type ===
|
|
5515
|
-
|
|
5695
|
+
var handleFocus = function handleFocus(e) {
|
|
5696
|
+
if (triggersOn !== 'hover') {
|
|
5697
|
+
if (trigger.type === TimeFieldDropdownTrigger && !isOpen) {
|
|
5698
|
+
setIsOpen(true);
|
|
5516
5699
|
}
|
|
5517
|
-
};
|
|
5518
5700
|
|
|
5519
|
-
|
|
5520
|
-
|
|
5521
|
-
value: value !== undefined ? controllers.value : formikState.value,
|
|
5522
|
-
onChange: _onChange ? controllers.onChange : function (e) {
|
|
5523
|
-
return formik.setFieldValue(name, e.target.value);
|
|
5524
|
-
},
|
|
5525
|
-
onBlur: _onBlur ? function (e) {
|
|
5526
|
-
_onBlur && _onBlur(e.target.value);
|
|
5527
|
-
formik.setFieldTouched(name);
|
|
5528
|
-
currencyBlur();
|
|
5529
|
-
} : function () {
|
|
5530
|
-
formik.setFieldTouched(name);
|
|
5531
|
-
currencyBlur();
|
|
5701
|
+
if ('onFocus' in trigger.props) {
|
|
5702
|
+
trigger.props.onFocus(e);
|
|
5532
5703
|
}
|
|
5533
|
-
});
|
|
5534
|
-
}
|
|
5535
5704
|
|
|
5536
|
-
|
|
5537
|
-
}
|
|
5538
|
-
|
|
5539
|
-
var styles$o = {"label":"_h724f","label--truncate":"_1VUoF"};
|
|
5705
|
+
return;
|
|
5706
|
+
}
|
|
5540
5707
|
|
|
5541
|
-
|
|
5542
|
-
return e.offsetWidth < e.scrollWidth;
|
|
5543
|
-
};
|
|
5708
|
+
setIsOpen(true);
|
|
5544
5709
|
|
|
5545
|
-
|
|
5546
|
-
|
|
5547
|
-
|
|
5548
|
-
|
|
5710
|
+
if ('onFocus' in trigger.props) {
|
|
5711
|
+
trigger.props.onFocus(e);
|
|
5712
|
+
}
|
|
5713
|
+
};
|
|
5549
5714
|
|
|
5550
|
-
var
|
|
5551
|
-
|
|
5552
|
-
var isHidden = labelElement && labelElement.offsetParent === null;
|
|
5553
|
-
var handleApplyTooltip = useCallback(function () {
|
|
5554
|
-
if (!shouldTruncate) {
|
|
5715
|
+
var handleMouseLeave = function handleMouseLeave(e) {
|
|
5716
|
+
if (triggersOn !== 'hover' || !paneRef.current) {
|
|
5555
5717
|
return;
|
|
5556
5718
|
}
|
|
5557
5719
|
|
|
5558
|
-
var
|
|
5720
|
+
var panePosition = paneRef.current.getBoundingClientRect();
|
|
5559
5721
|
|
|
5560
|
-
if (!
|
|
5561
|
-
|
|
5722
|
+
if (!isGoingTowardsPane(panePosition, e.clientY)) {
|
|
5723
|
+
setIsOpen(false);
|
|
5724
|
+
|
|
5725
|
+
if ('onMouseLeave' in trigger.props) {
|
|
5726
|
+
trigger.props.onMouseLeave && trigger.props.onMouseLeave(e);
|
|
5727
|
+
}
|
|
5562
5728
|
}
|
|
5729
|
+
};
|
|
5563
5730
|
|
|
5564
|
-
|
|
5731
|
+
var handlePaneMouseEnter = function handlePaneMouseEnter() {
|
|
5732
|
+
isFocusingOverlay.current = true;
|
|
5733
|
+
};
|
|
5565
5734
|
|
|
5566
|
-
|
|
5567
|
-
|
|
5735
|
+
var handlePaneMouseLeave = function handlePaneMouseLeave() {
|
|
5736
|
+
isFocusingOverlay.current = false;
|
|
5737
|
+
|
|
5738
|
+
if (triggersOn === 'hover') {
|
|
5739
|
+
setIsOpen(false);
|
|
5568
5740
|
}
|
|
5569
|
-
}, [shouldTruncate, isHidden]);
|
|
5570
|
-
useEffect(function () {
|
|
5571
|
-
var onWindowResize = debounce(handleApplyTooltip, 300);
|
|
5572
|
-
window.addEventListener('resize', onWindowResize);
|
|
5573
|
-
return function () {
|
|
5574
|
-
return window.removeEventListener('resize', onWindowResize);
|
|
5575
|
-
};
|
|
5576
|
-
}, [handleApplyTooltip]);
|
|
5577
|
-
useLayoutEffect(handleApplyTooltip, [handleApplyTooltip]);
|
|
5578
|
-
return {
|
|
5579
|
-
showTooltip: showTooltip,
|
|
5580
|
-
shouldTruncate: shouldTruncate
|
|
5581
5741
|
};
|
|
5582
|
-
};
|
|
5583
5742
|
|
|
5584
|
-
var
|
|
5585
|
-
|
|
5743
|
+
var handleOnBlur = function handleOnBlur() {
|
|
5744
|
+
if (!paneRef || !(paneRef !== null && paneRef !== void 0 && paneRef.current)) {
|
|
5745
|
+
return;
|
|
5746
|
+
}
|
|
5586
5747
|
|
|
5587
|
-
|
|
5588
|
-
children = _ref.children,
|
|
5589
|
-
_ref$truncate = _ref.truncate,
|
|
5590
|
-
truncate = _ref$truncate === void 0 ? true : _ref$truncate;
|
|
5591
|
-
var labelId = "label-" + htmlFor;
|
|
5748
|
+
var focusableElements = getKeyboardFocusableElements(paneRef.current);
|
|
5592
5749
|
|
|
5593
|
-
|
|
5594
|
-
|
|
5595
|
-
|
|
5750
|
+
if (focusableElements.length > 0) {
|
|
5751
|
+
window.setTimeout(function () {
|
|
5752
|
+
return focusableElements[0].focus();
|
|
5753
|
+
}, 0);
|
|
5754
|
+
} else if (!isFocusingOverlay.current) {
|
|
5755
|
+
setIsOpen(false);
|
|
5756
|
+
}
|
|
5757
|
+
};
|
|
5596
5758
|
|
|
5597
|
-
var
|
|
5598
|
-
|
|
5599
|
-
|
|
5600
|
-
|
|
5601
|
-
}, children);
|
|
5759
|
+
var getRef = function getRef() {
|
|
5760
|
+
if ((trigger.type === Button$1 || trigger.type === TimeFieldDropdownTrigger) && trigger.ref) {
|
|
5761
|
+
return trigger.ref;
|
|
5762
|
+
}
|
|
5602
5763
|
|
|
5603
|
-
|
|
5604
|
-
|
|
5605
|
-
overlay: children,
|
|
5606
|
-
placement: "top"
|
|
5607
|
-
}, LabelElement);
|
|
5608
|
-
}
|
|
5764
|
+
return triggerRef;
|
|
5765
|
+
};
|
|
5609
5766
|
|
|
5610
|
-
|
|
5767
|
+
var updatedRef = getRef();
|
|
5768
|
+
var triggerProps = {
|
|
5769
|
+
onClick: handleMouseClick,
|
|
5770
|
+
onMouseEnter: handleMouseEnter,
|
|
5771
|
+
onMouseLeave: handleMouseLeave,
|
|
5772
|
+
onBlur: handleOnBlur,
|
|
5773
|
+
ref: updatedRef,
|
|
5774
|
+
style: {
|
|
5775
|
+
width: triggerWidth === 'full' ? '100%' : 'fit-content'
|
|
5776
|
+
},
|
|
5777
|
+
onFocus: handleFocus
|
|
5778
|
+
};
|
|
5779
|
+
return React__default.createElement(DropdownContext.Provider, {
|
|
5780
|
+
value: {
|
|
5781
|
+
isOpen: isOpen,
|
|
5782
|
+
onToggleDropdown: handleToggleDropdown,
|
|
5783
|
+
triggerRef: updatedRef,
|
|
5784
|
+
paneRef: paneRef
|
|
5785
|
+
}
|
|
5786
|
+
}, trigger.type === Button$1 || trigger.type === TimeFieldDropdownTrigger ? React__default.cloneElement(trigger, _extends({}, trigger.props, triggerProps)) : React__default.createElement("button", Object.assign({}, triggerProps, {
|
|
5787
|
+
className: styles$c['dropdown__trigger'],
|
|
5788
|
+
ref: updatedRef,
|
|
5789
|
+
onFocus: handleFocus
|
|
5790
|
+
}), trigger), React__default.createElement(DropdownPane, {
|
|
5791
|
+
width: width,
|
|
5792
|
+
maxHeight: maxHeight,
|
|
5793
|
+
onMouseEnter: handlePaneMouseEnter,
|
|
5794
|
+
onMouseLeave: handlePaneMouseLeave,
|
|
5795
|
+
alignment: alignment,
|
|
5796
|
+
testId: testId
|
|
5797
|
+
}, children));
|
|
5798
|
+
};
|
|
5799
|
+
|
|
5800
|
+
var KebabMenu = function KebabMenu(_ref) {
|
|
5801
|
+
var actions = _ref.actions;
|
|
5802
|
+
return React__default.createElement(Dropdown, {
|
|
5803
|
+
trigger: React__default.createElement(Button$1, {
|
|
5804
|
+
theme: "link-icon"
|
|
5805
|
+
}, React__default.createElement(IconEllipsisV, null)),
|
|
5806
|
+
alignment: "right"
|
|
5807
|
+
}, React__default.createElement(DropdownList, null, actions.map(function (action) {
|
|
5808
|
+
return React__default.createElement(DropdownListItem, {
|
|
5809
|
+
onClick: action.onAction,
|
|
5810
|
+
key: action.action
|
|
5811
|
+
}, action.label);
|
|
5812
|
+
})));
|
|
5611
5813
|
};
|
|
5612
5814
|
|
|
5613
|
-
var styles$
|
|
5815
|
+
var styles$q = {"data-table-cell":"_2Ybjx","data-table-cell--no-padding":"_5KXHH","data-table-cell--vertical-border":"_2-I0j","data-table-cell--invalid":"_D73Vx","data-table-cell__content":"_3A9-M","data-table-cell__content--right-align":"_17Km7","data-table-cell__content--with-error":"_2c6KQ","data-table-cell__error-icon":"_2hIl3","data-table-cell__error-icon--right-align":"_8Uhyd","data-table-cell__error-icon--left-align":"_3X51R"};
|
|
5614
5816
|
|
|
5615
|
-
var
|
|
5616
|
-
var
|
|
5617
|
-
children = _ref.children;
|
|
5618
|
-
return React__default.createElement("div", {
|
|
5619
|
-
id: fieldId && fieldId + "-describer",
|
|
5620
|
-
className: styles$p['caption']
|
|
5621
|
-
}, children);
|
|
5622
|
-
};
|
|
5817
|
+
var DataTableCellElement = function DataTableCellElement(_ref, ref) {
|
|
5818
|
+
var _columns$columnIndex, _classnames, _classnames2, _classnames3;
|
|
5623
5819
|
|
|
5624
|
-
var
|
|
5820
|
+
var children = _ref.children,
|
|
5821
|
+
columnIndex = _ref.columnIndex,
|
|
5822
|
+
error = _ref.error,
|
|
5823
|
+
_ref$delayOnCloseErro = _ref.delayOnCloseError,
|
|
5824
|
+
delayOnCloseError = _ref$delayOnCloseErro === void 0 ? false : _ref$delayOnCloseErro,
|
|
5825
|
+
_ref$noPadding = _ref.noPadding,
|
|
5826
|
+
noPadding = _ref$noPadding === void 0 ? false : _ref$noPadding,
|
|
5827
|
+
colSpan = _ref.colSpan;
|
|
5625
5828
|
|
|
5626
|
-
var
|
|
5627
|
-
|
|
5628
|
-
|
|
5629
|
-
|
|
5630
|
-
|
|
5631
|
-
|
|
5632
|
-
|
|
5633
|
-
|
|
5634
|
-
|
|
5635
|
-
|
|
5636
|
-
alignItems: "center"
|
|
5829
|
+
var _useDataTableContext = useDataTableContext(),
|
|
5830
|
+
columns = _useDataTableContext.columns,
|
|
5831
|
+
hasVerticalBorders = _useDataTableContext.hasVerticalBorders;
|
|
5832
|
+
|
|
5833
|
+
var column = (_columns$columnIndex = columns === null || columns === void 0 ? void 0 : columns[columnIndex]) != null ? _columns$columnIndex : null;
|
|
5834
|
+
var isRightAligned = column ? column.isRightAligned : false;
|
|
5835
|
+
var hasError = !!error;
|
|
5836
|
+
var errorMessage = error;
|
|
5837
|
+
var icon = hasError && React__default.createElement("div", {
|
|
5838
|
+
className: classnames(styles$q['data-table-cell__error-icon'], (_classnames = {}, _classnames[styles$q['data-table-cell__error-icon--right-align']] = isRightAligned, _classnames[styles$q['data-table-cell__error-icon--left-align']] = !isRightAligned, _classnames))
|
|
5637
5839
|
}, React__default.createElement(IconTimesOctagon, {
|
|
5638
|
-
|
|
5639
|
-
|
|
5640
|
-
})
|
|
5840
|
+
size: "medium",
|
|
5841
|
+
color: RADISH400
|
|
5842
|
+
}));
|
|
5843
|
+
var TableCell = React__default.createElement("td", {
|
|
5844
|
+
className: classnames((_classnames2 = {}, _classnames2[styles$q['data-table-cell--invalid']] = hasError, _classnames2[styles$q['data-table-cell--no-padding']] = noPadding, _classnames2[styles$q['data-table-cell--vertical-border']] = hasVerticalBorders, _classnames2), styles$q['data-table-cell']),
|
|
5845
|
+
colSpan: colSpan,
|
|
5846
|
+
ref: ref
|
|
5847
|
+
}, React__default.createElement("div", {
|
|
5848
|
+
className: classnames(styles$q['data-table-cell__content'], (_classnames3 = {}, _classnames3[styles$q['data-table-cell__content--with-error']] = hasError, _classnames3[styles$q['data-table-cell__content--right-align']] = isRightAligned, _classnames3))
|
|
5849
|
+
}, isRightAligned && icon, children, !isRightAligned && icon));
|
|
5850
|
+
return React__default.createElement(Tooltip$1, {
|
|
5851
|
+
overlay: errorMessage,
|
|
5852
|
+
delayOnClose: delayOnCloseError,
|
|
5853
|
+
placement: "top",
|
|
5854
|
+
theme: "white"
|
|
5855
|
+
}, TableCell);
|
|
5641
5856
|
};
|
|
5642
5857
|
|
|
5643
|
-
var
|
|
5644
|
-
|
|
5645
|
-
|
|
5646
|
-
|
|
5647
|
-
|
|
5648
|
-
|
|
5649
|
-
|
|
5650
|
-
|
|
5651
|
-
|
|
5652
|
-
|
|
5653
|
-
}
|
|
5654
|
-
|
|
5655
|
-
|
|
5656
|
-
|
|
5657
|
-
|
|
5658
|
-
|
|
5659
|
-
},
|
|
5858
|
+
var DataTableCell = forwardRef(DataTableCellElement);
|
|
5859
|
+
|
|
5860
|
+
var DataTableRowActions = function DataTableRowActions(_ref) {
|
|
5861
|
+
var actions = _ref.actions,
|
|
5862
|
+
columnIndex = _ref.columnIndex;
|
|
5863
|
+
var kebabMenuItems = actions.filter(function (action) {
|
|
5864
|
+
return action.showInKebab === undefined || action.showInKebab;
|
|
5865
|
+
});
|
|
5866
|
+
var sideActions = actions.filter(function (action) {
|
|
5867
|
+
return action.showInKebab === false;
|
|
5868
|
+
});
|
|
5869
|
+
return React__default.createElement(DataTableCell, {
|
|
5870
|
+
columnIndex: columnIndex
|
|
5871
|
+
}, React__default.createElement("div", {
|
|
5872
|
+
className: styles$a['actions'],
|
|
5873
|
+
"data-testid": "data-table-dropdown-menu"
|
|
5874
|
+
}, sideActions.length > 0 && sideActions.map(function (action) {
|
|
5875
|
+
return React__default.createElement(Button$1, Object.assign({
|
|
5876
|
+
key: action.action,
|
|
5877
|
+
onClick: action.onAction,
|
|
5878
|
+
theme: typeof action.label === 'string' ? 'default' : 'link-icon'
|
|
5879
|
+
}, action.showInKebab === false ? action.buttonProps : {}), action.label);
|
|
5880
|
+
}), kebabMenuItems.length > 0 && React__default.createElement(KebabMenu, {
|
|
5881
|
+
actions: kebabMenuItems
|
|
5882
|
+
})));
|
|
5660
5883
|
};
|
|
5661
5884
|
|
|
5662
5885
|
var styles$r = {"affix-container":"_ybKOk","affix-container--prefixed":"_2COk3","affix-container--suffixed":"_1xXXN","prefix":"_eX5OL","suffix":"__YH01"};
|
|
@@ -5796,7 +6019,7 @@ var DataTableEditableCellElement = function DataTableEditableCellElement(_ref, r
|
|
|
5796
6019
|
|
|
5797
6020
|
var DataTableEditableCell = forwardRef(DataTableEditableCellElement);
|
|
5798
6021
|
|
|
5799
|
-
var _excluded$
|
|
6022
|
+
var _excluded$2i = ["children", "onClick", "isSelected", "actions", "hasDefaultPadding", "hasDefaultCell", "testId"];
|
|
5800
6023
|
|
|
5801
6024
|
var DataTableRowComponent = function DataTableRowComponent(_ref, ref) {
|
|
5802
6025
|
var _classnames;
|
|
@@ -5810,7 +6033,7 @@ var DataTableRowComponent = function DataTableRowComponent(_ref, ref) {
|
|
|
5810
6033
|
_ref$hasDefaultCell = _ref.hasDefaultCell,
|
|
5811
6034
|
hasDefaultCell = _ref$hasDefaultCell === void 0 ? true : _ref$hasDefaultCell,
|
|
5812
6035
|
testId = _ref.testId,
|
|
5813
|
-
nativeDivProps = _objectWithoutPropertiesLoose(_ref, _excluded$
|
|
6036
|
+
nativeDivProps = _objectWithoutPropertiesLoose(_ref, _excluded$2i);
|
|
5814
6037
|
|
|
5815
6038
|
var _useDataTableContext = useDataTableContext(),
|
|
5816
6039
|
showActionMenu = _useDataTableContext.showActionMenu;
|
|
@@ -6218,13 +6441,13 @@ var isReactSelectElement = function isReactSelectElement(element) {
|
|
|
6218
6441
|
|
|
6219
6442
|
var styles$w = {"custom-control":"_1cDCR"};
|
|
6220
6443
|
|
|
6221
|
-
var _excluded$
|
|
6444
|
+
var _excluded$2j = ["children"];
|
|
6222
6445
|
|
|
6223
6446
|
function CustomControl(_ref) {
|
|
6224
6447
|
var _props$getValue;
|
|
6225
6448
|
|
|
6226
6449
|
var children = _ref.children,
|
|
6227
|
-
props = _objectWithoutPropertiesLoose(_ref, _excluded$
|
|
6450
|
+
props = _objectWithoutPropertiesLoose(_ref, _excluded$2j);
|
|
6228
6451
|
|
|
6229
6452
|
var SelectedOptionPrefix = props.selectProps.componentsProps.SelectedOptionPrefix;
|
|
6230
6453
|
var selectedOption = (_props$getValue = props.getValue()) === null || _props$getValue === void 0 ? void 0 : _props$getValue[0];
|
|
@@ -6242,11 +6465,11 @@ function CustomControl(_ref) {
|
|
|
6242
6465
|
}, props)), children)) : children);
|
|
6243
6466
|
}
|
|
6244
6467
|
|
|
6245
|
-
var _excluded$
|
|
6468
|
+
var _excluded$2k = ["children"];
|
|
6246
6469
|
|
|
6247
6470
|
function CustomOption(_ref) {
|
|
6248
6471
|
var children = _ref.children,
|
|
6249
|
-
props = _objectWithoutPropertiesLoose(_ref, _excluded$
|
|
6472
|
+
props = _objectWithoutPropertiesLoose(_ref, _excluded$2k);
|
|
6250
6473
|
|
|
6251
6474
|
var UserCustomOption = props.selectProps.componentsProps.UserCustomOption;
|
|
6252
6475
|
return React__default.createElement(components.Option, Object.assign({}, props), React__default.createElement(UserCustomOption, Object.assign({}, props), children));
|
|
@@ -6399,13 +6622,11 @@ var CustomContainer = function CustomContainer(props) {
|
|
|
6399
6622
|
|
|
6400
6623
|
var styles$x = {"custom-menu-text-field":"_2-zhH","custom-menu-hr":"_3sdnK","custom-menu-div":"_2F1jP"};
|
|
6401
6624
|
|
|
6402
|
-
var
|
|
6403
|
-
|
|
6404
|
-
var _excluded$2k = ["children"];
|
|
6625
|
+
var _excluded$2l = ["children"];
|
|
6405
6626
|
|
|
6406
6627
|
function CustomMenu(_ref) {
|
|
6407
6628
|
var children = _ref.children,
|
|
6408
|
-
props = _objectWithoutPropertiesLoose(_ref, _excluded$
|
|
6629
|
+
props = _objectWithoutPropertiesLoose(_ref, _excluded$2l);
|
|
6409
6630
|
|
|
6410
6631
|
var _props$selectProps$co = props.selectProps.componentsProps,
|
|
6411
6632
|
creatableButton = _props$selectProps$co.creatableButton,
|
|
@@ -6416,6 +6637,10 @@ function CustomMenu(_ref) {
|
|
|
6416
6637
|
showFooter = _useState[0],
|
|
6417
6638
|
setShowFooter = _useState[1];
|
|
6418
6639
|
|
|
6640
|
+
var _useState2 = useState(''),
|
|
6641
|
+
inputDefaultValue = _useState2[0],
|
|
6642
|
+
setInputDefaultValue = _useState2[1];
|
|
6643
|
+
|
|
6419
6644
|
var textFieldRef = useRef(null);
|
|
6420
6645
|
var containerRef = useRef(null);
|
|
6421
6646
|
|
|
@@ -6426,7 +6651,11 @@ function CustomMenu(_ref) {
|
|
|
6426
6651
|
return React__default.createElement(Button$1, {
|
|
6427
6652
|
theme: "link-primary",
|
|
6428
6653
|
onClick: function onClick() {
|
|
6429
|
-
|
|
6654
|
+
if (props.selectProps.inputValue) {
|
|
6655
|
+
setInputDefaultValue(props.selectProps.inputValue);
|
|
6656
|
+
}
|
|
6657
|
+
|
|
6658
|
+
setShowFooter(true);
|
|
6430
6659
|
},
|
|
6431
6660
|
size: "full-width"
|
|
6432
6661
|
}, React__default.createElement(Inline, {
|
|
@@ -6448,6 +6677,8 @@ function CustomMenu(_ref) {
|
|
|
6448
6677
|
if (textFieldRef.current && textFieldRef.current.value.trim() !== '') {
|
|
6449
6678
|
onCreate(textFieldRef.current.value);
|
|
6450
6679
|
textFieldRef.current.value = '';
|
|
6680
|
+
setShowFooter(false);
|
|
6681
|
+
setInputDefaultValue('');
|
|
6451
6682
|
}
|
|
6452
6683
|
};
|
|
6453
6684
|
|
|
@@ -6467,7 +6698,7 @@ function CustomMenu(_ref) {
|
|
|
6467
6698
|
flex: [1],
|
|
6468
6699
|
flexItems: true
|
|
6469
6700
|
}, React__default.createElement("input", {
|
|
6470
|
-
className: classnames(
|
|
6701
|
+
className: classnames(textFieldStyles['text-field'], styles$x['custom-menu-text-field']),
|
|
6471
6702
|
autoCorrect: "off",
|
|
6472
6703
|
autoComplete: "off",
|
|
6473
6704
|
spellCheck: "false",
|
|
@@ -6497,7 +6728,8 @@ function CustomMenu(_ref) {
|
|
|
6497
6728
|
},
|
|
6498
6729
|
ref: textFieldRef,
|
|
6499
6730
|
"data-testid": "select-create-option-input",
|
|
6500
|
-
autoFocus: true
|
|
6731
|
+
autoFocus: true,
|
|
6732
|
+
defaultValue: inputDefaultValue
|
|
6501
6733
|
}), React__default.createElement(Button$1, {
|
|
6502
6734
|
onClick: onCreateButton,
|
|
6503
6735
|
onKeyDown: function onKeyDown(e) {
|
|
@@ -6649,9 +6881,9 @@ var ToolbarSelect = function ToolbarSelect(_ref) {
|
|
|
6649
6881
|
});
|
|
6650
6882
|
};
|
|
6651
6883
|
|
|
6652
|
-
var styles$
|
|
6884
|
+
var styles$y = {"date-filter":"_2X-yg","date-filter--wide":"_3O5Kh"};
|
|
6653
6885
|
|
|
6654
|
-
var styles$
|
|
6886
|
+
var styles$z = {"date-filter-display":"_23gnr","date-filter-display--non-interactive":"_Zv1Se","date-filter-display--wide":"_18V8V","date-filter-display__display-icon":"_2v9v_"};
|
|
6655
6887
|
|
|
6656
6888
|
var DATE_FILTER_MODE = {
|
|
6657
6889
|
DAY: 'day',
|
|
@@ -6693,12 +6925,10 @@ var DateFilterText = function DateFilterText(_ref) {
|
|
|
6693
6925
|
var weekRange = createWeekRange(selectedDate, weekStart);
|
|
6694
6926
|
return React__default.createElement(Inline, {
|
|
6695
6927
|
space: 12
|
|
6696
|
-
}, React__default.createElement("span", null, getDateString(weekRange.start, mode)), React__default.createElement(
|
|
6697
|
-
className: "date-filter__to_date_icon"
|
|
6698
|
-
}, React__default.createElement(IconArrowRight, {
|
|
6928
|
+
}, React__default.createElement("span", null, getDateString(weekRange.start, mode)), React__default.createElement(IconArrowRight, {
|
|
6699
6929
|
size: "small",
|
|
6700
6930
|
color: GREY400
|
|
6701
|
-
})
|
|
6931
|
+
}), React__default.createElement("span", null, getDateString(weekRange.end, mode)));
|
|
6702
6932
|
|
|
6703
6933
|
default:
|
|
6704
6934
|
return React__default.createElement("span", null, getDateString(selectedDate, mode));
|
|
@@ -6713,14 +6943,14 @@ var DateFilterDisplay = function DateFilterDisplay(_ref) {
|
|
|
6713
6943
|
weekStart = _ref.weekStart,
|
|
6714
6944
|
onClick = _ref.onClick;
|
|
6715
6945
|
return React__default.createElement("button", {
|
|
6716
|
-
className: classnames(styles$
|
|
6946
|
+
className: classnames(styles$z['date-filter-display'], (_classnames = {}, _classnames[styles$z['date-filter-display--wide']] = mode === DATE_FILTER_MODE.WEEK, _classnames[styles$z['date-filter-display--non-interactive']] = mode === DATE_FILTER_MODE.MONTH, _classnames)),
|
|
6717
6947
|
onClick: onClick,
|
|
6718
6948
|
tabIndex: mode === DATE_FILTER_MODE.MONTH ? -1 : undefined
|
|
6719
6949
|
}, React__default.createElement(Inline, {
|
|
6720
6950
|
space: 12,
|
|
6721
6951
|
alignItems: "center"
|
|
6722
6952
|
}, React__default.createElement("div", {
|
|
6723
|
-
className: classnames(styles$
|
|
6953
|
+
className: classnames(styles$z['date-filter-display__display-icon'])
|
|
6724
6954
|
}, React__default.createElement(IconCalendarAlt, {
|
|
6725
6955
|
size: "flexible",
|
|
6726
6956
|
color: GREY400
|
|
@@ -6731,7 +6961,7 @@ var DateFilterDisplay = function DateFilterDisplay(_ref) {
|
|
|
6731
6961
|
})));
|
|
6732
6962
|
};
|
|
6733
6963
|
|
|
6734
|
-
var styles$
|
|
6964
|
+
var styles$A = {"date-stepper":"_s8MoI","date-stepper--backward":"_34Yoi","date-stepper--forward":"_BeWpb"};
|
|
6735
6965
|
|
|
6736
6966
|
var handleDateStepper = function handleDateStepper(date, mode, stepDirection, onChange) {
|
|
6737
6967
|
var step = stepDirection === STEP_DIRECTION.FORWARD ? 1 : -1;
|
|
@@ -6766,7 +6996,7 @@ var DateFilterStepper = function DateFilterStepper(_ref) {
|
|
|
6766
6996
|
onChange = _ref.onChange,
|
|
6767
6997
|
date = _ref.date;
|
|
6768
6998
|
return React__default.createElement("button", {
|
|
6769
|
-
className: classnames(styles$
|
|
6999
|
+
className: classnames(styles$A['date-stepper'], (_classnames = {}, _classnames[styles$A['date-stepper--backward']] = stepDirection === STEP_DIRECTION.BACKWARD, _classnames[styles$A['date-stepper--forward']] = stepDirection === STEP_DIRECTION.FORWARD, _classnames)),
|
|
6770
7000
|
onClick: function onClick() {
|
|
6771
7001
|
return handleDateStepper(date, mode, stepDirection, onChange);
|
|
6772
7002
|
}
|
|
@@ -6802,7 +7032,7 @@ var DateFilter = function DateFilter(_ref) {
|
|
|
6802
7032
|
return React__default.createElement("div", {
|
|
6803
7033
|
"data-testid": testId,
|
|
6804
7034
|
ref: calendarAnchorRef,
|
|
6805
|
-
className: classnames(styles$
|
|
7035
|
+
className: classnames(styles$y['date-filter'], (_classnames = {}, _classnames[styles$y['date-filter--wide']] = mode === DATE_FILTER_MODE.WEEK, _classnames))
|
|
6806
7036
|
}, React__default.createElement(Inline, {
|
|
6807
7037
|
space: 0
|
|
6808
7038
|
}, React__default.createElement(DateFilterStepper, {
|
|
@@ -6843,7 +7073,7 @@ var DateFilter = function DateFilter(_ref) {
|
|
|
6843
7073
|
}));
|
|
6844
7074
|
};
|
|
6845
7075
|
|
|
6846
|
-
var styles$
|
|
7076
|
+
var styles$B = {"segmented-control":"_J5ph7","segmented-control__button":"_2xgv4","segmented-control__button--selected":"_1vG3O","segmented-control__divider":"_1uKNF"};
|
|
6847
7077
|
|
|
6848
7078
|
var SegmentedControl = function SegmentedControl(_ref) {
|
|
6849
7079
|
var options = _ref.options,
|
|
@@ -6860,7 +7090,7 @@ var SegmentedControl = function SegmentedControl(_ref) {
|
|
|
6860
7090
|
};
|
|
6861
7091
|
|
|
6862
7092
|
return React__default.createElement("div", {
|
|
6863
|
-
className: styles$
|
|
7093
|
+
className: styles$B['segmented-control'],
|
|
6864
7094
|
"data-testid": testId
|
|
6865
7095
|
}, options.map(function (option, i) {
|
|
6866
7096
|
var _classnames;
|
|
@@ -6871,18 +7101,18 @@ var SegmentedControl = function SegmentedControl(_ref) {
|
|
|
6871
7101
|
onClick: function onClick() {
|
|
6872
7102
|
return onChange(option);
|
|
6873
7103
|
},
|
|
6874
|
-
className: classnames(styles$
|
|
7104
|
+
className: classnames(styles$B['segmented-control__button'], (_classnames = {}, _classnames[styles$B['segmented-control__button--selected']] = isSelected(option), _classnames))
|
|
6875
7105
|
}, option), !isLastElement(i) && React__default.createElement("div", {
|
|
6876
|
-
className: classnames(styles$
|
|
7106
|
+
className: classnames(styles$B['segmented-control__divider'])
|
|
6877
7107
|
}));
|
|
6878
7108
|
}));
|
|
6879
7109
|
};
|
|
6880
7110
|
|
|
6881
|
-
var styles$
|
|
7111
|
+
var styles$C = {"form--standard-size":"_3CaV0"};
|
|
6882
7112
|
|
|
6883
|
-
var styles$
|
|
7113
|
+
var styles$D = {"card":"_29ZIp","card__body":"_3Q8NT","card__body--interactive":"_2Fah6","card--focus":"_SGno0","card__body--focus":"_1zqRN","card__body--with-kebab":"_3Hwms","card__kebab":"_TmEUS"};
|
|
6884
7114
|
|
|
6885
|
-
var _excluded$
|
|
7115
|
+
var _excluded$2m = ["children", "onClick", "isSelected", "actions", "testId"];
|
|
6886
7116
|
|
|
6887
7117
|
var Card = function Card(_ref) {
|
|
6888
7118
|
var _classnames, _classnames2;
|
|
@@ -6893,22 +7123,22 @@ var Card = function Card(_ref) {
|
|
|
6893
7123
|
isSelected = _ref$isSelected === void 0 ? false : _ref$isSelected,
|
|
6894
7124
|
actions = _ref.actions,
|
|
6895
7125
|
testId = _ref.testId,
|
|
6896
|
-
positionProps = _objectWithoutPropertiesLoose(_ref, _excluded$
|
|
7126
|
+
positionProps = _objectWithoutPropertiesLoose(_ref, _excluded$2m);
|
|
6897
7127
|
|
|
6898
7128
|
var positionStyles = usePositionStyles(positionProps);
|
|
6899
7129
|
return React__default.createElement("div", {
|
|
6900
|
-
className: classnames(styles$
|
|
7130
|
+
className: classnames(styles$D['card']),
|
|
6901
7131
|
style: positionStyles
|
|
6902
7132
|
}, onClick ? React__default.createElement("button", {
|
|
6903
|
-
className: classnames(styles$
|
|
7133
|
+
className: classnames(styles$D['card__body'], styles$D['card__body--interactive'], (_classnames = {}, _classnames[styles$D['card__body--focus']] = isSelected, _classnames[styles$D['card__body--with-kebab']] = actions, _classnames)),
|
|
6904
7134
|
"data-testid": testId,
|
|
6905
7135
|
tabIndex: 0,
|
|
6906
7136
|
onClick: onClick
|
|
6907
7137
|
}, children) : React__default.createElement("div", {
|
|
6908
|
-
className: classnames(styles$
|
|
7138
|
+
className: classnames(styles$D['card__body'], (_classnames2 = {}, _classnames2[styles$D['card__body--focus']] = isSelected, _classnames2[styles$D['card__body--with-kebab']] = actions, _classnames2)),
|
|
6909
7139
|
"data-testid": testId
|
|
6910
7140
|
}, children), actions && React__default.createElement("div", {
|
|
6911
|
-
className: classnames(styles$
|
|
7141
|
+
className: classnames(styles$D['card__kebab'])
|
|
6912
7142
|
}, React__default.createElement(KebabMenu, {
|
|
6913
7143
|
actions: actions
|
|
6914
7144
|
})));
|
|
@@ -6922,7 +7152,7 @@ var Breadcrumbs = function Breadcrumbs(_ref) {
|
|
|
6922
7152
|
}, children);
|
|
6923
7153
|
};
|
|
6924
7154
|
|
|
6925
|
-
var styles$
|
|
7155
|
+
var styles$E = {"breadcrumb-item":"_XFvYB"};
|
|
6926
7156
|
|
|
6927
7157
|
var BreadcrumbItem = function BreadcrumbItem(_ref) {
|
|
6928
7158
|
var href = _ref.href,
|
|
@@ -6935,24 +7165,24 @@ var BreadcrumbItem = function BreadcrumbItem(_ref) {
|
|
|
6935
7165
|
}), children);
|
|
6936
7166
|
return reloadDocument ? React__default.createElement("a", {
|
|
6937
7167
|
href: href,
|
|
6938
|
-
className: styles$
|
|
7168
|
+
className: styles$E['breadcrumb-item'],
|
|
6939
7169
|
"data-testid": testId
|
|
6940
7170
|
}, content) : React__default.createElement(Link$1, {
|
|
6941
7171
|
to: href,
|
|
6942
|
-
className: styles$
|
|
7172
|
+
className: styles$E['breadcrumb-item'],
|
|
6943
7173
|
relative: "path",
|
|
6944
7174
|
reloadDocument: reloadDocument,
|
|
6945
7175
|
"data-testid": testId
|
|
6946
7176
|
}, content);
|
|
6947
7177
|
};
|
|
6948
7178
|
|
|
6949
|
-
var styles$
|
|
7179
|
+
var styles$F = {"page-breadcrumbs":"_HAJCd"};
|
|
6950
7180
|
|
|
6951
7181
|
var PageBreadcrumbs = function PageBreadcrumbs(_ref) {
|
|
6952
7182
|
var breadcrumbs = _ref.breadcrumbs;
|
|
6953
7183
|
var items = getBreadbrumbItems(breadcrumbs);
|
|
6954
7184
|
return React__default.createElement("div", {
|
|
6955
|
-
className: styles$
|
|
7185
|
+
className: styles$F['page-breadcrumbs']
|
|
6956
7186
|
}, React__default.createElement(Breadcrumbs, null, items));
|
|
6957
7187
|
};
|
|
6958
7188
|
|
|
@@ -6977,7 +7207,7 @@ var getBreadbrumbItems = function getBreadbrumbItems(breadcrumbs) {
|
|
|
6977
7207
|
}, breadcrumbs.label);
|
|
6978
7208
|
};
|
|
6979
7209
|
|
|
6980
|
-
var styles$
|
|
7210
|
+
var styles$G = {"page":"_FbhTM","page--fullwidth":"_3QyAE","page--restricted":"_17aOG"};
|
|
6981
7211
|
|
|
6982
7212
|
var PAGE_SIZES = {
|
|
6983
7213
|
FULL_WIDTH: 'fullwidth',
|
|
@@ -7000,7 +7230,7 @@ var Page = function Page(_ref) {
|
|
|
7000
7230
|
var hasHeader = title || actions;
|
|
7001
7231
|
var hasPageBlocks = hasHeader || banner || filterBar;
|
|
7002
7232
|
return React__default.createElement("div", {
|
|
7003
|
-
className: classnames(styles$
|
|
7233
|
+
className: classnames(styles$G['page'], (_classNames = {}, _classNames[styles$G['page--restricted']] = size === PAGE_SIZES.RESTRICTED, _classNames[styles$G['page--fullwidth']] = size === PAGE_SIZES.FULL_WIDTH, _classNames)),
|
|
7004
7234
|
"data-testid": testId
|
|
7005
7235
|
}, React__default.createElement(Stack, {
|
|
7006
7236
|
space: 20
|
|
@@ -7020,7 +7250,7 @@ var Page = function Page(_ref) {
|
|
|
7020
7250
|
}, title), actions), subtitle && React__default.createElement(Text, null, subtitle)), banner, filterBar)), children));
|
|
7021
7251
|
};
|
|
7022
7252
|
|
|
7023
|
-
var styles$
|
|
7253
|
+
var styles$H = {"form-section":"_7-5gD","form-section__title":"_a83vM","form-section__subtitle":"_1lKv8","form-section--no-margin":"_lZyFQ"};
|
|
7024
7254
|
|
|
7025
7255
|
var FormSection = function FormSection(_ref) {
|
|
7026
7256
|
var _classnames;
|
|
@@ -7032,14 +7262,14 @@ var FormSection = function FormSection(_ref) {
|
|
|
7032
7262
|
noMargin = _ref$noMargin === void 0 ? false : _ref$noMargin,
|
|
7033
7263
|
testId = _ref.testId;
|
|
7034
7264
|
return React__default.createElement("div", {
|
|
7035
|
-
className: classnames(styles$
|
|
7265
|
+
className: classnames(styles$H['form-section'], (_classnames = {}, _classnames[styles$H['form-section--no-margin']] = noMargin, _classnames)),
|
|
7036
7266
|
"data-testid": testId
|
|
7037
7267
|
}, React__default.createElement(Stack, null, React__default.createElement(Stack, {
|
|
7038
7268
|
space: 8
|
|
7039
7269
|
}, title && React__default.createElement("h2", {
|
|
7040
|
-
className: classnames(styles$
|
|
7270
|
+
className: classnames(styles$H['form-section__title'])
|
|
7041
7271
|
}, title), subtitle && React__default.createElement("h3", {
|
|
7042
|
-
className: classnames(styles$
|
|
7272
|
+
className: classnames(styles$H['form-section__subtitle'])
|
|
7043
7273
|
}, subtitle)), children));
|
|
7044
7274
|
};
|
|
7045
7275
|
|
|
@@ -7057,7 +7287,7 @@ var updateButtonProps$1 = function updateButtonProps(child, newProps) {
|
|
|
7057
7287
|
}, newProps, child.props));
|
|
7058
7288
|
};
|
|
7059
7289
|
|
|
7060
|
-
var styles$
|
|
7290
|
+
var styles$I = {"form-footer":"_3vVBF"};
|
|
7061
7291
|
|
|
7062
7292
|
var FormFooterActions = function FormFooterActions(_ref) {
|
|
7063
7293
|
var _actions$primary, _actions$secondary, _actions$tertiary;
|
|
@@ -7092,7 +7322,7 @@ var FormFooter = function FormFooter(_ref) {
|
|
|
7092
7322
|
});
|
|
7093
7323
|
var isInlineChildren = React__default.Children.count(children) === 1 && React__default.isValidElement(children) && children.type === Inline;
|
|
7094
7324
|
return React__default.createElement("div", {
|
|
7095
|
-
className: classnames(styles$
|
|
7325
|
+
className: classnames(styles$I['form-footer']),
|
|
7096
7326
|
"data-testid": testId
|
|
7097
7327
|
}, actions && React__default.createElement(FormFooterActions, {
|
|
7098
7328
|
actions: actions
|
|
@@ -7134,12 +7364,12 @@ var Form = function Form(_ref) {
|
|
|
7134
7364
|
}
|
|
7135
7365
|
}, React__default.createElement("form", {
|
|
7136
7366
|
onSubmit: onSubmit ? handleSubmit : formik === null || formik === void 0 ? void 0 : formik.handleSubmit,
|
|
7137
|
-
className: classnames((_classnames = {}, _classnames[styles$
|
|
7367
|
+
className: classnames((_classnames = {}, _classnames[styles$C['form--standard-size']] = !wide, _classnames)),
|
|
7138
7368
|
"data-testid": testId
|
|
7139
7369
|
}, stackContent ? React__default.createElement(Stack, null, formattedChildren) : formattedChildren));
|
|
7140
7370
|
};
|
|
7141
7371
|
|
|
7142
|
-
var styles$
|
|
7372
|
+
var styles$J = {"form-row":"_2i-Ll"};
|
|
7143
7373
|
|
|
7144
7374
|
var SIZE_25_PERCENT = '25%';
|
|
7145
7375
|
var SIZE_33_PERCENT = '33.333%';
|
|
@@ -7170,7 +7400,7 @@ var FormRow = function FormRow(_ref) {
|
|
|
7170
7400
|
space: 20,
|
|
7171
7401
|
testId: testId,
|
|
7172
7402
|
alignItems: "stretch",
|
|
7173
|
-
extraClass: styles$
|
|
7403
|
+
extraClass: styles$J['form-row']
|
|
7174
7404
|
}, children, additionalColumns.map(function (_, index) {
|
|
7175
7405
|
return React__default.createElement("span", {
|
|
7176
7406
|
key: index,
|
|
@@ -7179,7 +7409,7 @@ var FormRow = function FormRow(_ref) {
|
|
|
7179
7409
|
}));
|
|
7180
7410
|
};
|
|
7181
7411
|
|
|
7182
|
-
var styles$
|
|
7412
|
+
var styles$K = {"text-field":"_BkzdC","text-field--focus":"_Rop31","text-field--disabled":"_2x3Cm","text-field--invalid":"_3zOwV","text-field__toolbar":"_rQqnL"};
|
|
7183
7413
|
|
|
7184
7414
|
var useGrowTextAreaRef = function useGrowTextAreaRef(minHeight, maxHeight, autoGrow, forwardedRef) {
|
|
7185
7415
|
var textareaRef = useRef(null);
|
|
@@ -7255,7 +7485,7 @@ var TextAreaField = function TextAreaField(_ref) {
|
|
|
7255
7485
|
updateHeight = _useGrowTextAreaRef.updateHeight;
|
|
7256
7486
|
|
|
7257
7487
|
return React__default.createElement(Field, Object.assign({}, fieldProps), React__default.createElement("div", {
|
|
7258
|
-
className: classnames(styles$
|
|
7488
|
+
className: classnames(styles$K['text-field'], (_classnames = {}, _classnames[styles$K['text-field--invalid']] = hasError, _classnames[styles$K['text-field--disabled']] = disabled, _classnames[styles$K['text-field--focus']] = hasFocus, _classnames)),
|
|
7259
7489
|
ref: containerRef,
|
|
7260
7490
|
onClick: function onClick(event) {
|
|
7261
7491
|
if (event.target === (containerRef === null || containerRef === void 0 ? void 0 : containerRef.current)) {
|
|
@@ -7287,7 +7517,7 @@ var TextAreaField = function TextAreaField(_ref) {
|
|
|
7287
7517
|
},
|
|
7288
7518
|
ref: textAreaRef
|
|
7289
7519
|
}), toolbar && React__default.createElement("div", {
|
|
7290
|
-
className: styles$
|
|
7520
|
+
className: styles$K['text-field__toolbar'],
|
|
7291
7521
|
id: controllers.id + "-toolbar",
|
|
7292
7522
|
ref: toolbarRef,
|
|
7293
7523
|
onClick: function onClick(event) {
|
|
@@ -7300,79 +7530,12 @@ var TextAreaField = function TextAreaField(_ref) {
|
|
|
7300
7530
|
}, toolbar)));
|
|
7301
7531
|
};
|
|
7302
7532
|
|
|
7303
|
-
var
|
|
7304
|
-
var _classnames;
|
|
7305
|
-
|
|
7306
|
-
var autoComplete = _ref.autoComplete,
|
|
7307
|
-
autoFocus = _ref.autoFocus,
|
|
7308
|
-
defaultValue = _ref.defaultValue,
|
|
7309
|
-
disabled = _ref.disabled,
|
|
7310
|
-
error = _ref.error,
|
|
7311
|
-
id = _ref.id,
|
|
7312
|
-
maxLength = _ref.maxLength,
|
|
7313
|
-
name = _ref.name,
|
|
7314
|
-
caption = _ref.caption,
|
|
7315
|
-
label = _ref.label,
|
|
7316
|
-
onBlur = _ref.onBlur,
|
|
7317
|
-
onChange = _ref.onChange,
|
|
7318
|
-
onFocus = _ref.onFocus,
|
|
7319
|
-
onKeyDown = _ref.onKeyDown,
|
|
7320
|
-
placeholder = _ref.placeholder,
|
|
7321
|
-
value = _ref.value,
|
|
7322
|
-
ref = _ref.ref,
|
|
7323
|
-
testId = _ref.testId;
|
|
7324
|
-
var controllers = useFieldControllers({
|
|
7325
|
-
error: error,
|
|
7326
|
-
id: id,
|
|
7327
|
-
name: name,
|
|
7328
|
-
onChange: onChange,
|
|
7329
|
-
onBlur: onBlur,
|
|
7330
|
-
onFocus: onFocus,
|
|
7331
|
-
onKeyDown: onKeyDown,
|
|
7332
|
-
value: value
|
|
7333
|
-
});
|
|
7334
|
-
var hasError = !!controllers.error;
|
|
7335
|
-
var inputProps = {
|
|
7336
|
-
'aria-describedby': hasError ? controllers.id + "-error-message" : controllers.id + "-describer",
|
|
7337
|
-
'aria-invalid': hasError,
|
|
7338
|
-
autoComplete: autoComplete,
|
|
7339
|
-
autoFocus: autoFocus,
|
|
7340
|
-
className: classnames(styles$y['text-field'], (_classnames = {}, _classnames[styles$y['text-field--invalid']] = hasError, _classnames)),
|
|
7341
|
-
'data-testid': testId,
|
|
7342
|
-
disabled: disabled,
|
|
7343
|
-
defaultValue: defaultValue,
|
|
7344
|
-
id: controllers.id,
|
|
7345
|
-
maxLength: maxLength,
|
|
7346
|
-
name: name,
|
|
7347
|
-
onBlur: controllers.onBlur,
|
|
7348
|
-
onChange: controllers.onChange,
|
|
7349
|
-
onFocus: controllers.onFocus,
|
|
7350
|
-
onKeyDown: controllers.onKeyDown,
|
|
7351
|
-
placeholder: placeholder,
|
|
7352
|
-
ref: ref,
|
|
7353
|
-
size: 1,
|
|
7354
|
-
type: 'text',
|
|
7355
|
-
value: controllers.value
|
|
7356
|
-
};
|
|
7357
|
-
var fieldProps = {
|
|
7358
|
-
caption: caption,
|
|
7359
|
-
error: controllers.error,
|
|
7360
|
-
label: label,
|
|
7361
|
-
id: inputProps.id,
|
|
7362
|
-
name: name
|
|
7363
|
-
};
|
|
7364
|
-
return {
|
|
7365
|
-
inputProps: inputProps,
|
|
7366
|
-
fieldProps: fieldProps
|
|
7367
|
-
};
|
|
7368
|
-
};
|
|
7369
|
-
|
|
7370
|
-
var _excluded$2m = ["prefix", "suffix"];
|
|
7533
|
+
var _excluded$2n = ["prefix", "suffix"];
|
|
7371
7534
|
|
|
7372
7535
|
var TextFieldElement = function TextFieldElement(_ref, ref) {
|
|
7373
7536
|
var prefix = _ref.prefix,
|
|
7374
7537
|
suffix = _ref.suffix,
|
|
7375
|
-
props = _objectWithoutPropertiesLoose(_ref, _excluded$
|
|
7538
|
+
props = _objectWithoutPropertiesLoose(_ref, _excluded$2n);
|
|
7376
7539
|
|
|
7377
7540
|
var _useTextField = useTextField(_extends({}, props, {
|
|
7378
7541
|
ref: ref
|
|
@@ -7434,7 +7597,7 @@ var useCheckBoxFieldControllers = function useCheckBoxFieldControllers(_ref) {
|
|
|
7434
7597
|
return controllers;
|
|
7435
7598
|
};
|
|
7436
7599
|
|
|
7437
|
-
var styles$
|
|
7600
|
+
var styles$L = {"check-box-field":"_2sg0c","check-box-field__caption":"_2LdrP","check-box-field__custom-input":"_2mA8e"};
|
|
7438
7601
|
|
|
7439
7602
|
var CheckboxField = function CheckboxField(_ref) {
|
|
7440
7603
|
var name = _ref.name,
|
|
@@ -7464,7 +7627,7 @@ var CheckboxField = function CheckboxField(_ref) {
|
|
|
7464
7627
|
flexItems: true,
|
|
7465
7628
|
flex: ['0 0 auto']
|
|
7466
7629
|
}, React__default.createElement("div", {
|
|
7467
|
-
className: styles$
|
|
7630
|
+
className: styles$L['check-box-field']
|
|
7468
7631
|
}, React__default.createElement("input", {
|
|
7469
7632
|
name: name,
|
|
7470
7633
|
id: controllers.id,
|
|
@@ -7477,12 +7640,12 @@ var CheckboxField = function CheckboxField(_ref) {
|
|
|
7477
7640
|
onChange: controllers.onChange,
|
|
7478
7641
|
onBlur: controllers.onBlur
|
|
7479
7642
|
}), React__default.createElement("span", {
|
|
7480
|
-
className: styles$
|
|
7643
|
+
className: styles$L['check-box-field__custom-input']
|
|
7481
7644
|
})), label && React__default.createElement(Label, {
|
|
7482
7645
|
htmlFor: controllers.id,
|
|
7483
7646
|
truncate: false
|
|
7484
7647
|
}, label)), caption && React__default.createElement("div", {
|
|
7485
|
-
className: styles$
|
|
7648
|
+
className: styles$L['check-box-field__caption']
|
|
7486
7649
|
}, React__default.createElement(Caption, {
|
|
7487
7650
|
fieldId: controllers.id
|
|
7488
7651
|
}, caption)), controllers.error && React__default.createElement(ErrorMessage, {
|
|
@@ -7490,7 +7653,7 @@ var CheckboxField = function CheckboxField(_ref) {
|
|
|
7490
7653
|
}, controllers.error));
|
|
7491
7654
|
};
|
|
7492
7655
|
|
|
7493
|
-
var styles$
|
|
7656
|
+
var styles$M = {"pill-select-field":"_g6T-p","pill-select-field__custom-input":"_1i2AX"};
|
|
7494
7657
|
|
|
7495
7658
|
var useMultiSelectFieldControllers = function useMultiSelectFieldControllers(_ref) {
|
|
7496
7659
|
var name = _ref.name,
|
|
@@ -7582,7 +7745,7 @@ var PillSelectField = function PillSelectField(_ref) {
|
|
|
7582
7745
|
var itemId = controllers.id + "-" + itemIdentifier;
|
|
7583
7746
|
return React__default.createElement("div", {
|
|
7584
7747
|
key: itemIdentifier,
|
|
7585
|
-
className: styles$
|
|
7748
|
+
className: styles$M['pill-select-field']
|
|
7586
7749
|
}, React__default.createElement("input", {
|
|
7587
7750
|
name: name + "-" + itemIdentifier,
|
|
7588
7751
|
id: itemId,
|
|
@@ -7604,7 +7767,7 @@ var PillSelectField = function PillSelectField(_ref) {
|
|
|
7604
7767
|
controllers.onChange(newValue);
|
|
7605
7768
|
}
|
|
7606
7769
|
}), React__default.createElement("span", {
|
|
7607
|
-
className: styles$
|
|
7770
|
+
className: styles$M['pill-select-field__custom-input']
|
|
7608
7771
|
}, option.label));
|
|
7609
7772
|
})));
|
|
7610
7773
|
};
|
|
@@ -7652,9 +7815,9 @@ var useRadioGroupFieldContext = function useRadioGroupFieldContext() {
|
|
|
7652
7815
|
return context;
|
|
7653
7816
|
};
|
|
7654
7817
|
|
|
7655
|
-
var styles$
|
|
7818
|
+
var styles$N = {"label":"_1WGz2","label--truncate":"_mQ9Rd","radio-group-field__label":"_RXyG_"};
|
|
7656
7819
|
|
|
7657
|
-
var styles$
|
|
7820
|
+
var styles$O = {"label":"_1Tw96","label--truncate":"_1o8rK","radio-group-box-option":"_2OGKE","radio-group-box-option__box":"_23M9k","radio-group-box-option__label":"_1r-Wg"};
|
|
7658
7821
|
|
|
7659
7822
|
var RadioGroupBoxOption = function RadioGroupBoxOption(_ref) {
|
|
7660
7823
|
var value = _ref.value,
|
|
@@ -7669,7 +7832,7 @@ var RadioGroupBoxOption = function RadioGroupBoxOption(_ref) {
|
|
|
7669
7832
|
id: inputId
|
|
7670
7833
|
});
|
|
7671
7834
|
return React__default.createElement("label", {
|
|
7672
|
-
className: styles$
|
|
7835
|
+
className: styles$O['radio-group-box-option']
|
|
7673
7836
|
}, React__default.createElement("input", {
|
|
7674
7837
|
type: "radio",
|
|
7675
7838
|
"data-testid": testId,
|
|
@@ -7680,7 +7843,7 @@ var RadioGroupBoxOption = function RadioGroupBoxOption(_ref) {
|
|
|
7680
7843
|
checked: radioGroupContext.value !== undefined ? radioGroupContext.value === value : undefined,
|
|
7681
7844
|
disabled: radioGroupContext.disabled
|
|
7682
7845
|
}), React__default.createElement("div", {
|
|
7683
|
-
className: styles$
|
|
7846
|
+
className: styles$O['radio-group-box-option__box']
|
|
7684
7847
|
}, React__default.createElement(Stack, {
|
|
7685
7848
|
space: 16,
|
|
7686
7849
|
alignItems: "center",
|
|
@@ -7689,13 +7852,13 @@ var RadioGroupBoxOption = function RadioGroupBoxOption(_ref) {
|
|
|
7689
7852
|
space: 8,
|
|
7690
7853
|
alignItems: "center"
|
|
7691
7854
|
}, label && React__default.createElement("div", {
|
|
7692
|
-
className: styles$
|
|
7855
|
+
className: styles$O['radio-group-box-option__label']
|
|
7693
7856
|
}, label), caption && React__default.createElement(Caption, {
|
|
7694
7857
|
fieldId: id
|
|
7695
7858
|
}, caption)))));
|
|
7696
7859
|
};
|
|
7697
7860
|
|
|
7698
|
-
var styles$
|
|
7861
|
+
var styles$P = {"radio-group-option":"_1Clmp","radio-group-option__caption":"_3UmWA","radio-group-option__custom-input":"_1tMq-"};
|
|
7699
7862
|
|
|
7700
7863
|
var RadioGroupOption = function RadioGroupOption(_ref) {
|
|
7701
7864
|
var value = _ref.value,
|
|
@@ -7714,7 +7877,7 @@ var RadioGroupOption = function RadioGroupOption(_ref) {
|
|
|
7714
7877
|
space: 8,
|
|
7715
7878
|
alignItems: "center"
|
|
7716
7879
|
}, React__default.createElement("div", {
|
|
7717
|
-
className: styles$
|
|
7880
|
+
className: styles$P['radio-group-option']
|
|
7718
7881
|
}, React__default.createElement("input", {
|
|
7719
7882
|
type: "radio",
|
|
7720
7883
|
"data-testid": testId,
|
|
@@ -7725,11 +7888,11 @@ var RadioGroupOption = function RadioGroupOption(_ref) {
|
|
|
7725
7888
|
checked: radioGroupContext.value !== undefined ? radioGroupContext.value === value : undefined,
|
|
7726
7889
|
disabled: radioGroupContext.disabled
|
|
7727
7890
|
}), React__default.createElement("span", {
|
|
7728
|
-
className: styles$
|
|
7891
|
+
className: styles$P['radio-group-option__custom-input']
|
|
7729
7892
|
})), label && React__default.createElement(Label, {
|
|
7730
7893
|
htmlFor: id
|
|
7731
7894
|
}, label)), caption && React__default.createElement("div", {
|
|
7732
|
-
className: styles$
|
|
7895
|
+
className: styles$P['radio-group-option__caption']
|
|
7733
7896
|
}, React__default.createElement(Caption, {
|
|
7734
7897
|
fieldId: id
|
|
7735
7898
|
}, caption)));
|
|
@@ -7864,7 +8027,7 @@ var RadioGroupField = function RadioGroupField(_ref) {
|
|
|
7864
8027
|
}, React__default.createElement(Stack, {
|
|
7865
8028
|
space: 12
|
|
7866
8029
|
}, label && React__default.createElement("div", {
|
|
7867
|
-
className: styles$
|
|
8030
|
+
className: styles$N['radio-group-field__label']
|
|
7868
8031
|
}, label), React__default.createElement(Stack, {
|
|
7869
8032
|
space: 8
|
|
7870
8033
|
}, optionsType === OPTION_TYPES.RADIO ? React__default.createElement(RadioOptions, {
|
|
@@ -7877,9 +8040,9 @@ var RadioGroupField = function RadioGroupField(_ref) {
|
|
|
7877
8040
|
}, children), controllers.error && React__default.createElement(ErrorMessage, null, controllers.error))));
|
|
7878
8041
|
};
|
|
7879
8042
|
|
|
7880
|
-
var styles$
|
|
8043
|
+
var styles$Q = {"text-field":"_18Rzv","text-field--invalid":"_3eD7t","text-field--prefixed":"_2evrG","text-field--suffixed":"_-MgeO","password-container":"_-Rf3c","password-toggle":"_yinPY"};
|
|
7881
8044
|
|
|
7882
|
-
var styles$
|
|
8045
|
+
var styles$R = {"password-criteria":"_U0krC","password-criteria--invalid":"_2XIl4"};
|
|
7883
8046
|
|
|
7884
8047
|
var PasswordCriteria = function PasswordCriteria(_ref) {
|
|
7885
8048
|
var _classnames;
|
|
@@ -7887,7 +8050,7 @@ var PasswordCriteria = function PasswordCriteria(_ref) {
|
|
|
7887
8050
|
var met = _ref.met,
|
|
7888
8051
|
children = _ref.children;
|
|
7889
8052
|
return React__default.createElement("span", {
|
|
7890
|
-
className: classnames(styles$
|
|
8053
|
+
className: classnames(styles$R['password-criteria'], (_classnames = {}, _classnames[styles$R['password-criteria--invalid']] = !met, _classnames))
|
|
7891
8054
|
}, React__default.createElement(Inline, {
|
|
7892
8055
|
space: met ? 4 : 8
|
|
7893
8056
|
}, met ? React__default.createElement(IconCheck, {
|
|
@@ -7972,11 +8135,11 @@ var PasswordField = function PasswordField(_ref) {
|
|
|
7972
8135
|
error: controllers.error
|
|
7973
8136
|
};
|
|
7974
8137
|
return React__default.createElement(Field, Object.assign({}, fieldProps), React__default.createElement("div", {
|
|
7975
|
-
className: styles$
|
|
8138
|
+
className: styles$Q['password-container']
|
|
7976
8139
|
}, React__default.createElement("input", {
|
|
7977
8140
|
name: name,
|
|
7978
8141
|
id: controllers.id,
|
|
7979
|
-
className: classnames(styles$
|
|
8142
|
+
className: classnames(styles$Q['text-field'], (_classnames = {}, _classnames[styles$Q['text-field--invalid']] = hasError, _classnames)),
|
|
7980
8143
|
type: type,
|
|
7981
8144
|
"data-testid": testId,
|
|
7982
8145
|
"aria-describedby": hasError ? controllers.id + "-error-message" : controllers.id + "-describer",
|
|
@@ -7988,7 +8151,7 @@ var PasswordField = function PasswordField(_ref) {
|
|
|
7988
8151
|
onChange: controllers.onChange,
|
|
7989
8152
|
onBlur: controllers.onBlur
|
|
7990
8153
|
}), React__default.createElement("div", {
|
|
7991
|
-
className: styles$
|
|
8154
|
+
className: styles$Q['password-toggle'],
|
|
7992
8155
|
onClick: toggleType,
|
|
7993
8156
|
onKeyPress: toggleType,
|
|
7994
8157
|
"data-testid": testId && testId + "-toggle",
|
|
@@ -8079,15 +8242,15 @@ var MultiSelectField = function MultiSelectField(_ref) {
|
|
|
8079
8242
|
}));
|
|
8080
8243
|
};
|
|
8081
8244
|
|
|
8082
|
-
var styles$
|
|
8245
|
+
var styles$S = {"custom-list":"_uC4zU"};
|
|
8083
8246
|
|
|
8084
|
-
var _excluded$
|
|
8247
|
+
var _excluded$2o = ["children", "hasMoreOptions", "hasMoreOptionsFirstLoad"];
|
|
8085
8248
|
|
|
8086
8249
|
var CustomList = function CustomList(_ref) {
|
|
8087
8250
|
var children = _ref.children,
|
|
8088
8251
|
hasMoreOptions = _ref.hasMoreOptions,
|
|
8089
8252
|
hasMoreOptionsFirstLoad = _ref.hasMoreOptionsFirstLoad,
|
|
8090
|
-
props = _objectWithoutPropertiesLoose(_ref, _excluded$
|
|
8253
|
+
props = _objectWithoutPropertiesLoose(_ref, _excluded$2o);
|
|
8091
8254
|
|
|
8092
8255
|
var showFooter = hasMoreOptions;
|
|
8093
8256
|
|
|
@@ -8098,15 +8261,15 @@ var CustomList = function CustomList(_ref) {
|
|
|
8098
8261
|
return React__default.createElement(components.MenuList, Object.assign({}, props), React__default.createElement(Fragment, null, children, showFooter && React__default.createElement(Inline, {
|
|
8099
8262
|
justifyContent: "center"
|
|
8100
8263
|
}, React__default.createElement("div", {
|
|
8101
|
-
className: styles$
|
|
8264
|
+
className: styles$S['custom-list']
|
|
8102
8265
|
}, getLocalizedString('main.START_TYPING_TO_SEE_MORE_OPTIONS')))));
|
|
8103
8266
|
};
|
|
8104
8267
|
|
|
8105
|
-
var _excluded$
|
|
8268
|
+
var _excluded$2p = ["loadOptions"];
|
|
8106
8269
|
|
|
8107
8270
|
var AsyncSelectField = function AsyncSelectField(_ref) {
|
|
8108
8271
|
var loadOptions = _ref.loadOptions,
|
|
8109
|
-
props = _objectWithoutPropertiesLoose(_ref, _excluded$
|
|
8272
|
+
props = _objectWithoutPropertiesLoose(_ref, _excluded$2p);
|
|
8110
8273
|
|
|
8111
8274
|
var _useState = useState(false),
|
|
8112
8275
|
hasMoreOptions = _useState[0],
|
|
@@ -8327,7 +8490,7 @@ var DateField = function DateField(_ref) {
|
|
|
8327
8490
|
error: controllers.error
|
|
8328
8491
|
};
|
|
8329
8492
|
var dayPickerProps = {
|
|
8330
|
-
classNames: styles$
|
|
8493
|
+
classNames: styles$h,
|
|
8331
8494
|
disabledDays: function disabledDays(day) {
|
|
8332
8495
|
return _disabledDays && _disabledDays(setToMidnight(day));
|
|
8333
8496
|
},
|
|
@@ -8345,7 +8508,7 @@ var DateField = function DateField(_ref) {
|
|
|
8345
8508
|
})
|
|
8346
8509
|
}, React__default.createElement(DayPickerInput, {
|
|
8347
8510
|
format: format,
|
|
8348
|
-
classNames: styles$
|
|
8511
|
+
classNames: styles$h,
|
|
8349
8512
|
formatDate: formatDate,
|
|
8350
8513
|
parseDate: parseDate,
|
|
8351
8514
|
placeholder: placeholder || format.toUpperCase(),
|
|
@@ -8454,7 +8617,7 @@ var getFormikError = function getFormikError(error) {
|
|
|
8454
8617
|
return undefined;
|
|
8455
8618
|
};
|
|
8456
8619
|
|
|
8457
|
-
var styles$
|
|
8620
|
+
var styles$T = {"container":"_1Ini2","wrapper":"_21VnL","interactionDisabled":"_wJ6Cb","DayPicker-Day":"_1c48y","navBar":"_3KwsN","todayButton":"_10CBO","navButtonInteractionDisabled":"_dHL-D","navButtonPrev":"_6kNi3","navButtonNext":"_13W_e","months":"_1FeSY","month":"_wU6A4","caption":"_AMbAo","weekdays":"_1LEst","weekdaysRow":"_2XECo","weekday":"_1C5ry","body":"_11F-Y","week":"_3MAFk","day":"_mG73F","disabled":"_2pgnH","selected":"_MtLaz","outside":"_CRqyX","footer":"_2KG9-","today":"_2JA2y","overlayWrapper":"_1JWbc","overlay":"_2tL6g","weekNumber":"_3u72O","text-field":"_25rf7","date-range-field":"_3qVhi","text-field--invalid":"_2M9Ud","text-field--prefixed":"_3TUb2","text-field--suffixed":"_foqL0","date-range-field--invalid":"_3df9R","date-range-field--disabled":"_2Nkht"};
|
|
8458
8621
|
|
|
8459
8622
|
var FromDate = function FromDate(_ref) {
|
|
8460
8623
|
var name = _ref.name,
|
|
@@ -8493,7 +8656,7 @@ var FromDate = function FromDate(_ref) {
|
|
|
8493
8656
|
}
|
|
8494
8657
|
|
|
8495
8658
|
var dayPickerProps = {
|
|
8496
|
-
classNames: styles$
|
|
8659
|
+
classNames: styles$T,
|
|
8497
8660
|
months: MONTH_NAMES,
|
|
8498
8661
|
weekdaysLong: DAYS,
|
|
8499
8662
|
weekdaysShort: DAYS.map(function (day) {
|
|
@@ -8520,7 +8683,7 @@ var FromDate = function FromDate(_ref) {
|
|
|
8520
8683
|
};
|
|
8521
8684
|
return React__default.createElement(DayPickerInput, {
|
|
8522
8685
|
format: format,
|
|
8523
|
-
classNames: styles$
|
|
8686
|
+
classNames: styles$T,
|
|
8524
8687
|
selectedDay: start,
|
|
8525
8688
|
value: start,
|
|
8526
8689
|
formatDate: formatDate,
|
|
@@ -8594,7 +8757,7 @@ var ToDate = function ToDate(_ref, ref) {
|
|
|
8594
8757
|
}
|
|
8595
8758
|
|
|
8596
8759
|
var dayPickerProps = {
|
|
8597
|
-
classNames: styles$
|
|
8760
|
+
classNames: styles$T,
|
|
8598
8761
|
months: MONTH_NAMES,
|
|
8599
8762
|
weekdaysLong: DAYS,
|
|
8600
8763
|
weekdaysShort: DAYS.map(function (day) {
|
|
@@ -8613,7 +8776,7 @@ var ToDate = function ToDate(_ref, ref) {
|
|
|
8613
8776
|
};
|
|
8614
8777
|
return React__default.createElement(DayPickerInput, {
|
|
8615
8778
|
format: format,
|
|
8616
|
-
classNames: styles$
|
|
8779
|
+
classNames: styles$T,
|
|
8617
8780
|
selectedDay: end,
|
|
8618
8781
|
value: end,
|
|
8619
8782
|
formatDate: formatDate,
|
|
@@ -8698,7 +8861,7 @@ var DateRangeField = function DateRangeField(_ref) {
|
|
|
8698
8861
|
start = _controllers$value.start,
|
|
8699
8862
|
end = _controllers$value.end;
|
|
8700
8863
|
return React__default.createElement(Field, Object.assign({}, fieldProps), React__default.createElement("div", {
|
|
8701
|
-
className: classnames(styles$
|
|
8864
|
+
className: classnames(styles$T['date-range-field'], (_classnames = {}, _classnames[styles$T['date-range-field--invalid']] = hasError, _classnames[styles$T['date-range-field--disabled']] = disabled, _classnames)),
|
|
8702
8865
|
"data-testid": testId
|
|
8703
8866
|
}, React__default.createElement(IconCalendarAlt, {
|
|
8704
8867
|
size: "medium",
|
|
@@ -8825,7 +8988,7 @@ var WeekField = function WeekField(_ref) {
|
|
|
8825
8988
|
};
|
|
8826
8989
|
|
|
8827
8990
|
var dayPickerProps = {
|
|
8828
|
-
classNames: styles$
|
|
8991
|
+
classNames: styles$i,
|
|
8829
8992
|
disabledDays: function disabledDays(day) {
|
|
8830
8993
|
return _disabledDays && _disabledDays(setToMidnight(day));
|
|
8831
8994
|
},
|
|
@@ -8855,7 +9018,7 @@ var WeekField = function WeekField(_ref) {
|
|
|
8855
9018
|
})
|
|
8856
9019
|
}, React__default.createElement(DayPickerInput, {
|
|
8857
9020
|
format: format,
|
|
8858
|
-
classNames: styles$
|
|
9021
|
+
classNames: styles$i,
|
|
8859
9022
|
formatDate: formatDate,
|
|
8860
9023
|
parseDate: parseDate,
|
|
8861
9024
|
placeholder: placeholder || format.toUpperCase(),
|
|
@@ -8894,42 +9057,149 @@ var WeekField = function WeekField(_ref) {
|
|
|
8894
9057
|
})));
|
|
8895
9058
|
};
|
|
8896
9059
|
|
|
8897
|
-
var
|
|
9060
|
+
var getTimeOptions = function getTimeOptions(interval, startTime) {
|
|
9061
|
+
if (startTime === void 0) {
|
|
9062
|
+
startTime = new Date('Janurary 1 2023 00:00:00');
|
|
9063
|
+
}
|
|
8898
9064
|
|
|
8899
|
-
var
|
|
8900
|
-
var
|
|
8901
|
-
|
|
8902
|
-
|
|
8903
|
-
autoComplete = _ref$autoComplete === void 0 ? 'off' : _ref$autoComplete,
|
|
8904
|
-
allOtherProps = _objectWithoutPropertiesLoose(_ref, _excluded$2p);
|
|
9065
|
+
var optionsCount = 60 * 24 / interval;
|
|
9066
|
+
var timeOptions = [];
|
|
9067
|
+
var intervalCoeffecient = 1000 * 60 * interval;
|
|
9068
|
+
var rounded = new Date(Math.ceil(startTime.getTime() / intervalCoeffecient) * intervalCoeffecient);
|
|
8905
9069
|
|
|
8906
|
-
var
|
|
8907
|
-
|
|
8908
|
-
|
|
8909
|
-
|
|
8910
|
-
|
|
8911
|
-
|
|
8912
|
-
|
|
9070
|
+
var formatHours = function formatHours(hours) {
|
|
9071
|
+
if (hours === 0) {
|
|
9072
|
+
return 12;
|
|
9073
|
+
} else if (hours > 12) {
|
|
9074
|
+
return hours - 12;
|
|
9075
|
+
} else {
|
|
9076
|
+
return hours;
|
|
9077
|
+
}
|
|
9078
|
+
};
|
|
8913
9079
|
|
|
8914
|
-
|
|
8915
|
-
|
|
8916
|
-
|
|
8917
|
-
|
|
8918
|
-
|
|
9080
|
+
for (var i = 0; i < optionsCount; i++) {
|
|
9081
|
+
var newDate = new Date(rounded.getTime());
|
|
9082
|
+
newDate.setMinutes(rounded.getMinutes() + interval * i);
|
|
9083
|
+
var minutes = newDate.getMinutes();
|
|
9084
|
+
timeOptions.push(formatHours(newDate.getHours()) + ":" + (minutes === 0 ? '00' : minutes) + " " + (newDate.getHours() < 12 ? 'AM' : 'PM'));
|
|
9085
|
+
}
|
|
9086
|
+
|
|
9087
|
+
return timeOptions;
|
|
9088
|
+
};
|
|
9089
|
+
|
|
9090
|
+
var TimeFieldDropdown = function TimeFieldDropdown(_ref) {
|
|
9091
|
+
var trigger = _ref.trigger,
|
|
9092
|
+
interval = _ref.interval,
|
|
9093
|
+
startTime = _ref.startTime,
|
|
9094
|
+
onOptionClick = _ref.onOptionClick,
|
|
9095
|
+
inputValue = _ref.inputValue,
|
|
9096
|
+
width = _ref.width;
|
|
9097
|
+
var startTimeParsed;
|
|
9098
|
+
|
|
9099
|
+
if (startTime) {
|
|
9100
|
+
startTimeParsed = startTime === 'now' ? new Date() : new Date('Janurary 1 2023 ' + parseTime(startTime, 'g:i A'));
|
|
9101
|
+
}
|
|
9102
|
+
|
|
9103
|
+
var timeOptions = useMemo(function () {
|
|
9104
|
+
return getTimeOptions(interval, startTimeParsed);
|
|
9105
|
+
}, [interval, startTime]);
|
|
9106
|
+
|
|
9107
|
+
var _useState = useState(undefined),
|
|
9108
|
+
index = _useState[0],
|
|
9109
|
+
setIndex = _useState[1];
|
|
9110
|
+
|
|
9111
|
+
useEffect(function () {
|
|
9112
|
+
if (inputValue) {
|
|
9113
|
+
setIndex(timeOptions.findIndex(function (option) {
|
|
9114
|
+
return option.toLowerCase().startsWith(inputValue.toLowerCase());
|
|
9115
|
+
}));
|
|
8919
9116
|
}
|
|
9117
|
+
}, [inputValue]);
|
|
9118
|
+
return React__default.createElement(Dropdown, {
|
|
9119
|
+
triggerWidth: "full",
|
|
9120
|
+
trigger: trigger,
|
|
9121
|
+
alignment: "left",
|
|
9122
|
+
width: width,
|
|
9123
|
+
maxHeight: 397
|
|
9124
|
+
}, React__default.createElement(DropdownList, {
|
|
9125
|
+
highlightItemIndex: index
|
|
9126
|
+
}, timeOptions.map(function (option) {
|
|
9127
|
+
return React__default.createElement(DropdownListItem, {
|
|
9128
|
+
key: option,
|
|
9129
|
+
onClick: function onClick() {
|
|
9130
|
+
onOptionClick(option);
|
|
9131
|
+
}
|
|
9132
|
+
}, option);
|
|
8920
9133
|
})));
|
|
8921
9134
|
};
|
|
8922
9135
|
|
|
9136
|
+
var _excluded$2q = ["interval", "startTime"];
|
|
9137
|
+
|
|
9138
|
+
var TimeFieldElement = function TimeFieldElement(_ref, forwardedRef) {
|
|
9139
|
+
var _ref$interval = _ref.interval,
|
|
9140
|
+
interval = _ref$interval === void 0 ? 15 : _ref$interval,
|
|
9141
|
+
startTime = _ref.startTime,
|
|
9142
|
+
allOtherProps = _objectWithoutPropertiesLoose(_ref, _excluded$2q);
|
|
9143
|
+
|
|
9144
|
+
var internalRef = useRef(null);
|
|
9145
|
+
var ref = forwardedRef || internalRef;
|
|
9146
|
+
|
|
9147
|
+
var _useState = useState(allOtherProps.defaultValue),
|
|
9148
|
+
inputValue = _useState[0],
|
|
9149
|
+
setInputValue = _useState[1];
|
|
9150
|
+
|
|
9151
|
+
var onOptionClick = function onOptionClick(option) {
|
|
9152
|
+
setInputValue(option);
|
|
9153
|
+
allOtherProps.onChange && allOtherProps.onChange(option);
|
|
9154
|
+
ref.current.value = option;
|
|
9155
|
+
ref.current.focus();
|
|
9156
|
+
ref.current.select();
|
|
9157
|
+
};
|
|
9158
|
+
|
|
9159
|
+
var _useState2 = useState(),
|
|
9160
|
+
width = _useState2[0],
|
|
9161
|
+
setWidth = _useState2[1];
|
|
9162
|
+
|
|
9163
|
+
useEffect(function () {
|
|
9164
|
+
updateDropdownWidth();
|
|
9165
|
+
window.addEventListener('resize', updateDropdownWidth);
|
|
9166
|
+
return function () {
|
|
9167
|
+
window.removeEventListener('resize', updateDropdownWidth);
|
|
9168
|
+
};
|
|
9169
|
+
}, []);
|
|
9170
|
+
|
|
9171
|
+
var updateDropdownWidth = function updateDropdownWidth() {
|
|
9172
|
+
setWidth(ref.current.offsetWidth);
|
|
9173
|
+
};
|
|
9174
|
+
|
|
9175
|
+
return React__default.createElement(TimeFieldDropdown, {
|
|
9176
|
+
interval: interval,
|
|
9177
|
+
trigger: React__default.createElement(TimeFieldDropdownTrigger, Object.assign({}, allOtherProps, {
|
|
9178
|
+
onClick: function onClick() {
|
|
9179
|
+
return ref.current.select();
|
|
9180
|
+
},
|
|
9181
|
+
ref: ref,
|
|
9182
|
+
onInputChange: function onInputChange(e) {
|
|
9183
|
+
return setInputValue(e);
|
|
9184
|
+
}
|
|
9185
|
+
})),
|
|
9186
|
+
startTime: startTime,
|
|
9187
|
+
onOptionClick: onOptionClick,
|
|
9188
|
+
inputValue: inputValue,
|
|
9189
|
+
width: width
|
|
9190
|
+
});
|
|
9191
|
+
};
|
|
9192
|
+
|
|
8923
9193
|
var TimeField = forwardRef(TimeFieldElement);
|
|
8924
9194
|
|
|
8925
|
-
var _excluded$
|
|
9195
|
+
var _excluded$2r = ["currencySymbol", "step"];
|
|
8926
9196
|
|
|
8927
9197
|
var CurrencyFieldElement = function CurrencyFieldElement(_ref, ref) {
|
|
8928
9198
|
var _ref$currencySymbol = _ref.currencySymbol,
|
|
8929
9199
|
currencySymbol = _ref$currencySymbol === void 0 ? '$' : _ref$currencySymbol,
|
|
8930
9200
|
_ref$step = _ref.step,
|
|
8931
9201
|
step = _ref$step === void 0 ? 0.01 : _ref$step,
|
|
8932
|
-
allOtherProps = _objectWithoutPropertiesLoose(_ref, _excluded$
|
|
9202
|
+
allOtherProps = _objectWithoutPropertiesLoose(_ref, _excluded$2r);
|
|
8933
9203
|
|
|
8934
9204
|
var _useTextField = useTextField(_extends({}, allOtherProps, {
|
|
8935
9205
|
ref: ref
|
|
@@ -8968,7 +9238,7 @@ var CurrencyFieldElement = function CurrencyFieldElement(_ref, ref) {
|
|
|
8968
9238
|
|
|
8969
9239
|
var CurrencyField = forwardRef(CurrencyFieldElement);
|
|
8970
9240
|
|
|
8971
|
-
var _excluded$
|
|
9241
|
+
var _excluded$2s = ["max", "min", "precision", "stepSize"];
|
|
8972
9242
|
|
|
8973
9243
|
var PercentageElement = function PercentageElement(_ref, ref) {
|
|
8974
9244
|
var _ref$max = _ref.max,
|
|
@@ -8979,7 +9249,7 @@ var PercentageElement = function PercentageElement(_ref, ref) {
|
|
|
8979
9249
|
precision = _ref$precision === void 0 ? 0 : _ref$precision,
|
|
8980
9250
|
_ref$stepSize = _ref.stepSize,
|
|
8981
9251
|
stepSize = _ref$stepSize === void 0 ? 1 : _ref$stepSize,
|
|
8982
|
-
allOtherProps = _objectWithoutPropertiesLoose(_ref, _excluded$
|
|
9252
|
+
allOtherProps = _objectWithoutPropertiesLoose(_ref, _excluded$2s);
|
|
8983
9253
|
|
|
8984
9254
|
var _useTextField = useTextField(_extends({}, allOtherProps, {
|
|
8985
9255
|
ref: ref
|
|
@@ -9084,7 +9354,7 @@ var BUTTON_THEME = {
|
|
|
9084
9354
|
UPSELL: 'upsell'
|
|
9085
9355
|
};
|
|
9086
9356
|
|
|
9087
|
-
var styles$
|
|
9357
|
+
var styles$U = {"banner":"_vgLin","banner__title":"_63TwY","banner__body":"_3n6S7","banner__body--multilineCTA":"_2pMYs","banner--info":"_ON6Eg","banner__icon":"_1-D-E","banner--success":"_1FFZh","banner--danger":"_2R34O","banner--warning":"_3Cfhe","banner--upsell":"_1SIOw","banner__close":"_3SNQ1","banner--single-line":"_3nLTI"};
|
|
9088
9358
|
|
|
9089
9359
|
var ButtonCTA = function ButtonCTA(_ref) {
|
|
9090
9360
|
var button = _ref.button,
|
|
@@ -9107,7 +9377,7 @@ var ButtonCTA = function ButtonCTA(_ref) {
|
|
|
9107
9377
|
}, button.props));
|
|
9108
9378
|
};
|
|
9109
9379
|
|
|
9110
|
-
var styles$
|
|
9380
|
+
var styles$V = {"banner__caption":"_1jqm8"};
|
|
9111
9381
|
|
|
9112
9382
|
var InlineBannerCTA = function InlineBannerCTA(_ref) {
|
|
9113
9383
|
var primaryButton = _ref.primaryButton,
|
|
@@ -9138,7 +9408,7 @@ var InlineBannerCTA = function InlineBannerCTA(_ref) {
|
|
|
9138
9408
|
bannerTheme: bannerTheme,
|
|
9139
9409
|
primaryCTA: true
|
|
9140
9410
|
})), caption && multiLine && React__default.createElement("div", {
|
|
9141
|
-
className: styles$
|
|
9411
|
+
className: styles$V['banner__caption']
|
|
9142
9412
|
}, caption));
|
|
9143
9413
|
};
|
|
9144
9414
|
|
|
@@ -9163,7 +9433,7 @@ var InlineBannerIcon = function InlineBannerIcon(_ref) {
|
|
|
9163
9433
|
}
|
|
9164
9434
|
};
|
|
9165
9435
|
|
|
9166
|
-
var _excluded$
|
|
9436
|
+
var _excluded$2t = ["children", "theme", "title", "onClose", "caption", "primaryButton", "secondaryButton", "testId"];
|
|
9167
9437
|
|
|
9168
9438
|
var InlineBanner = function InlineBanner(_ref) {
|
|
9169
9439
|
var _classnames, _classnames2;
|
|
@@ -9177,7 +9447,7 @@ var InlineBanner = function InlineBanner(_ref) {
|
|
|
9177
9447
|
primaryButton = _ref.primaryButton,
|
|
9178
9448
|
secondaryButton = _ref.secondaryButton,
|
|
9179
9449
|
testId = _ref.testId,
|
|
9180
|
-
positionProps = _objectWithoutPropertiesLoose(_ref, _excluded$
|
|
9450
|
+
positionProps = _objectWithoutPropertiesLoose(_ref, _excluded$2t);
|
|
9181
9451
|
|
|
9182
9452
|
var positionStyles = usePositionStyles(positionProps);
|
|
9183
9453
|
var multiLine = !!title;
|
|
@@ -9185,14 +9455,14 @@ var InlineBanner = function InlineBanner(_ref) {
|
|
|
9185
9455
|
var Layout = multiLine ? Stack : Inline;
|
|
9186
9456
|
return React__default.createElement("div", {
|
|
9187
9457
|
"data-testid": testId,
|
|
9188
|
-
className: classnames(styles$
|
|
9458
|
+
className: classnames(styles$U['banner'], (_classnames = {}, _classnames[styles$U['banner--info']] = theme === BANNER_THEME.INFO, _classnames[styles$U['banner--warning']] = theme === BANNER_THEME.WARNING, _classnames[styles$U['banner--success']] = theme === BANNER_THEME.SUCCESS, _classnames[styles$U['banner--danger']] = theme === BANNER_THEME.DANGER, _classnames[styles$U['banner--upsell']] = theme === BANNER_THEME.UPSELL, _classnames[styles$U['banner--single-line']] = !multiLine, _classnames)),
|
|
9189
9459
|
style: positionStyles
|
|
9190
9460
|
}, React__default.createElement(Inline, {
|
|
9191
9461
|
alignItems: multiLine ? undefined : 'center',
|
|
9192
9462
|
flex: ['0 1 auto', 1],
|
|
9193
9463
|
space: 12
|
|
9194
9464
|
}, React__default.createElement("div", {
|
|
9195
|
-
className: styles$
|
|
9465
|
+
className: styles$U['banner__icon']
|
|
9196
9466
|
}, React__default.createElement(InlineBannerIcon, {
|
|
9197
9467
|
theme: theme
|
|
9198
9468
|
})), React__default.createElement(Layout, {
|
|
@@ -9202,9 +9472,9 @@ var InlineBanner = function InlineBanner(_ref) {
|
|
|
9202
9472
|
flex: ['min-content'],
|
|
9203
9473
|
flexWrap: multiLine ? undefined : 'wrap'
|
|
9204
9474
|
}, title && React__default.createElement("div", {
|
|
9205
|
-
className: styles$
|
|
9475
|
+
className: styles$U['banner__title']
|
|
9206
9476
|
}, title), React__default.createElement("div", {
|
|
9207
|
-
className: classnames(styles$
|
|
9477
|
+
className: classnames(styles$U['banner__body'], (_classnames2 = {}, _classnames2[styles$U['banner__body--multilineCTA']] = primaryButton && multiLine, _classnames2))
|
|
9208
9478
|
}, children), primaryButton && React__default.createElement(InlineBannerCTA, {
|
|
9209
9479
|
primaryButton: primaryButton,
|
|
9210
9480
|
secondaryButton: secondaryButton,
|
|
@@ -9212,7 +9482,7 @@ var InlineBanner = function InlineBanner(_ref) {
|
|
|
9212
9482
|
multiLine: multiLine,
|
|
9213
9483
|
bannerTheme: theme
|
|
9214
9484
|
})), dismissable && React__default.createElement("div", {
|
|
9215
|
-
className: styles$
|
|
9485
|
+
className: styles$U['banner__close']
|
|
9216
9486
|
}, React__default.createElement(Button$1, {
|
|
9217
9487
|
theme: "link-icon",
|
|
9218
9488
|
type: "button",
|
|
@@ -9226,7 +9496,7 @@ var PERSISTENT_BANNER_THEME = {
|
|
|
9226
9496
|
DANGER: 'danger'
|
|
9227
9497
|
};
|
|
9228
9498
|
|
|
9229
|
-
var styles$
|
|
9499
|
+
var styles$W = {"persistent-banner":"_1KO1J","persistent-banner--info":"_2mTN3","persistent-banner--danger":"_1YuCF","persistent-banner--upsell":"_tlNFk"};
|
|
9230
9500
|
|
|
9231
9501
|
var PersistentBanner = function PersistentBanner(_ref) {
|
|
9232
9502
|
var _classNames;
|
|
@@ -9255,7 +9525,7 @@ var PersistentBanner = function PersistentBanner(_ref) {
|
|
|
9255
9525
|
};
|
|
9256
9526
|
|
|
9257
9527
|
return React__default.createElement("div", {
|
|
9258
|
-
className: classnames(styles$
|
|
9528
|
+
className: classnames(styles$W['persistent-banner'], (_classNames = {}, _classNames[styles$W['persistent-banner--info']] = theme === PERSISTENT_BANNER_THEME.INFO, _classNames[styles$W['persistent-banner--danger']] = theme === PERSISTENT_BANNER_THEME.DANGER, _classNames[styles$W['persistent-banner--upsell']] = theme === PERSISTENT_BANNER_THEME.UPSELL, _classNames)),
|
|
9259
9529
|
"data-testid": testId
|
|
9260
9530
|
}, onDismiss ? React__default.createElement(Inline, {
|
|
9261
9531
|
flex: [1],
|
|
@@ -9327,7 +9597,7 @@ var useProgress = function useProgress(progress, maxValue, getMetric) {
|
|
|
9327
9597
|
};
|
|
9328
9598
|
};
|
|
9329
9599
|
|
|
9330
|
-
var styles$
|
|
9600
|
+
var styles$X = {"circular-progress":"_1XR7V","circular-progress__label":"_1BygP","circular-progress__track":"_1Ak-z","circular-progress__indicator":"_22YIp"};
|
|
9331
9601
|
|
|
9332
9602
|
var CircularProgress = function CircularProgress(_ref) {
|
|
9333
9603
|
var progress = _ref.progress,
|
|
@@ -9342,7 +9612,7 @@ var CircularProgress = function CircularProgress(_ref) {
|
|
|
9342
9612
|
|
|
9343
9613
|
var determinant = metric.percentage * 2.79;
|
|
9344
9614
|
return React__default.createElement("div", Object.assign({}, elementProps, {
|
|
9345
|
-
className: styles$
|
|
9615
|
+
className: styles$X['circular-progress'],
|
|
9346
9616
|
"data-testid": testId
|
|
9347
9617
|
}), React__default.createElement("svg", {
|
|
9348
9618
|
viewBox: "0 0 100 100"
|
|
@@ -9351,21 +9621,21 @@ var CircularProgress = function CircularProgress(_ref) {
|
|
|
9351
9621
|
cy: 50,
|
|
9352
9622
|
r: 45,
|
|
9353
9623
|
strokeWidth: "10px",
|
|
9354
|
-
className: styles$
|
|
9624
|
+
className: styles$X['circular-progress__track']
|
|
9355
9625
|
}), React__default.createElement("circle", {
|
|
9356
9626
|
cx: 50,
|
|
9357
9627
|
cy: 50,
|
|
9358
9628
|
r: 45,
|
|
9359
9629
|
strokeWidth: "10px",
|
|
9360
|
-
className: styles$
|
|
9630
|
+
className: styles$X['circular-progress__indicator'],
|
|
9361
9631
|
strokeDashoffset: "66",
|
|
9362
9632
|
strokeDasharray: determinant + " " + (279 - determinant)
|
|
9363
9633
|
})), React__default.createElement("div", {
|
|
9364
|
-
className: styles$
|
|
9634
|
+
className: styles$X['circular-progress__label']
|
|
9365
9635
|
}, children || metric.progress + "/" + metric.maxValue));
|
|
9366
9636
|
};
|
|
9367
9637
|
|
|
9368
|
-
var styles$
|
|
9638
|
+
var styles$Y = {"progress-bar":"_3nyZN","progress-bar__indicator":"_11TEp","progress-bar__steps":"_3XFTU"};
|
|
9369
9639
|
|
|
9370
9640
|
var ProgressBar = function ProgressBar(_ref) {
|
|
9371
9641
|
var progress = _ref.progress,
|
|
@@ -9380,15 +9650,15 @@ var ProgressBar = function ProgressBar(_ref) {
|
|
|
9380
9650
|
metric = _useProgress.metric;
|
|
9381
9651
|
|
|
9382
9652
|
return React__default.createElement(Stack, null, React__default.createElement("div", Object.assign({}, elementProps, {
|
|
9383
|
-
className: styles$
|
|
9653
|
+
className: styles$Y['progress-bar'],
|
|
9384
9654
|
"data-testid": testId
|
|
9385
9655
|
}), React__default.createElement("div", {
|
|
9386
|
-
className: styles$
|
|
9656
|
+
className: styles$Y['progress-bar__indicator'],
|
|
9387
9657
|
style: {
|
|
9388
9658
|
width: metric.percentage + "%"
|
|
9389
9659
|
}
|
|
9390
9660
|
})), steps && steps.length > 0 && React__default.createElement("div", {
|
|
9391
|
-
className: styles$
|
|
9661
|
+
className: styles$Y['progress-bar__steps']
|
|
9392
9662
|
}, steps.map(function (step) {
|
|
9393
9663
|
return React__default.createElement("div", {
|
|
9394
9664
|
key: step
|
|
@@ -9396,9 +9666,9 @@ var ProgressBar = function ProgressBar(_ref) {
|
|
|
9396
9666
|
})));
|
|
9397
9667
|
};
|
|
9398
9668
|
|
|
9399
|
-
var styles$
|
|
9669
|
+
var styles$Z = {"badge":"_2f81N","badge--warning":"_2g1GI","badge--danger":"_2zLnM","badge--success":"_27QOo","badge--info":"_2gmsM"};
|
|
9400
9670
|
|
|
9401
|
-
var _excluded$
|
|
9671
|
+
var _excluded$2u = ["children", "theme", "title", "testId"];
|
|
9402
9672
|
|
|
9403
9673
|
var Badge = function Badge(_ref, forwardedRef) {
|
|
9404
9674
|
var _classnames;
|
|
@@ -9407,7 +9677,7 @@ var Badge = function Badge(_ref, forwardedRef) {
|
|
|
9407
9677
|
theme = _ref.theme,
|
|
9408
9678
|
title = _ref.title,
|
|
9409
9679
|
testId = _ref.testId,
|
|
9410
|
-
otherProps = _objectWithoutPropertiesLoose(_ref, _excluded$
|
|
9680
|
+
otherProps = _objectWithoutPropertiesLoose(_ref, _excluded$2u);
|
|
9411
9681
|
|
|
9412
9682
|
var internalRef = useRef(null);
|
|
9413
9683
|
var ref = forwardedRef || internalRef;
|
|
@@ -9420,7 +9690,7 @@ var Badge = function Badge(_ref, forwardedRef) {
|
|
|
9420
9690
|
overlay: title,
|
|
9421
9691
|
ref: ref
|
|
9422
9692
|
}, React__default.createElement("div", Object.assign({
|
|
9423
|
-
className: classnames(styles$
|
|
9693
|
+
className: classnames(styles$Z['badge'], (_classnames = {}, _classnames[styles$Z['badge--success']] = theme === 'success', _classnames[styles$Z['badge--danger']] = theme === 'danger', _classnames[styles$Z['badge--info']] = theme === 'info', _classnames[styles$Z['badge--warning']] = theme === 'warning', _classnames)),
|
|
9424
9694
|
ref: ref,
|
|
9425
9695
|
"data-testid": testId
|
|
9426
9696
|
}, otherProps), children));
|
|
@@ -9428,9 +9698,9 @@ var Badge = function Badge(_ref, forwardedRef) {
|
|
|
9428
9698
|
|
|
9429
9699
|
var Badge$1 = forwardRef(Badge);
|
|
9430
9700
|
|
|
9431
|
-
var styles
|
|
9701
|
+
var styles$_ = {"avatar":"_2wJGB","avatar--small":"_3QTSo","avatar__badge":"_2Rl8S","avatar--medium":"_1zwj0","avatar--large":"_3-U6x","avatar--extra-large":"_3qn2q"};
|
|
9432
9702
|
|
|
9433
|
-
var styles
|
|
9703
|
+
var styles$$ = {"avatar-image":"_GKL9P"};
|
|
9434
9704
|
|
|
9435
9705
|
var AvatarImage = function AvatarImage(_ref) {
|
|
9436
9706
|
var url = _ref.url,
|
|
@@ -9455,7 +9725,7 @@ var AvatarImage = function AvatarImage(_ref) {
|
|
|
9455
9725
|
}
|
|
9456
9726
|
|
|
9457
9727
|
return React__default.createElement("div", {
|
|
9458
|
-
className: styles
|
|
9728
|
+
className: styles$$['avatar-image']
|
|
9459
9729
|
}, React__default.createElement(IconUserSolid, {
|
|
9460
9730
|
size: "flexible",
|
|
9461
9731
|
color: color
|
|
@@ -9524,7 +9794,7 @@ var Avatar = function Avatar(_ref) {
|
|
|
9524
9794
|
|
|
9525
9795
|
var backgroundColor = url ? GREY200 : color;
|
|
9526
9796
|
return React__default.createElement("div", {
|
|
9527
|
-
className: classnames(styles
|
|
9797
|
+
className: classnames(styles$_['avatar'], (_classnames = {}, _classnames[styles$_['avatar--small']] = size === 'small', _classnames[styles$_['avatar--medium']] = size === 'medium', _classnames[styles$_['avatar--large']] = size === 'large', _classnames[styles$_['avatar--extra-large']] = size === 'extra-large', _classnames)),
|
|
9528
9798
|
style: {
|
|
9529
9799
|
backgroundColor: children || url && !showIconInsteadOfImage ? backgroundColor : defaultProfilePictureColors.backgroundColor
|
|
9530
9800
|
},
|
|
@@ -9537,7 +9807,7 @@ var Avatar = function Avatar(_ref) {
|
|
|
9537
9807
|
return setShowIconInsteadOfImage(true);
|
|
9538
9808
|
}
|
|
9539
9809
|
}), badge && size !== 'small' && React__default.createElement("div", {
|
|
9540
|
-
className: styles
|
|
9810
|
+
className: styles$_['avatar__badge']
|
|
9541
9811
|
}, badge));
|
|
9542
9812
|
};
|
|
9543
9813
|
|
|
@@ -9550,7 +9820,7 @@ var CHIP_THEME = {
|
|
|
9550
9820
|
DANGER: 'danger'
|
|
9551
9821
|
};
|
|
9552
9822
|
|
|
9553
|
-
var styles$
|
|
9823
|
+
var styles$10 = {"chip":"_1fIeV","chip--marketing":"_V4byU","chip--success":"_37gN9","chip--upsell":"_Tw7tp","chip--warning":"_t94VZ","chip--info":"_3SmeO","chip--danger":"_2eoX0"};
|
|
9554
9824
|
|
|
9555
9825
|
var Chip = function Chip(_ref) {
|
|
9556
9826
|
var _classnames;
|
|
@@ -9561,11 +9831,11 @@ var Chip = function Chip(_ref) {
|
|
|
9561
9831
|
testId = _ref.testId;
|
|
9562
9832
|
return React__default.createElement("div", {
|
|
9563
9833
|
"data-testid": testId,
|
|
9564
|
-
className: classnames(styles$
|
|
9834
|
+
className: classnames(styles$10['chip'], (_classnames = {}, _classnames[styles$10['chip--marketing']] = theme === CHIP_THEME.MARKETING, _classnames[styles$10['chip--success']] = theme === CHIP_THEME.SUCCESS, _classnames[styles$10['chip--upsell']] = theme === CHIP_THEME.UPSELL, _classnames[styles$10['chip--warning']] = theme === CHIP_THEME.WARNING, _classnames[styles$10['chip--info']] = theme === CHIP_THEME.INFO, _classnames[styles$10['chip--danger']] = theme === CHIP_THEME.DANGER, _classnames))
|
|
9565
9835
|
}, children);
|
|
9566
9836
|
};
|
|
9567
9837
|
|
|
9568
|
-
var styles$
|
|
9838
|
+
var styles$11 = {"pill":"_23q4Y","pill--default":"_niDEM","pill--success":"_IwDRB","pill--danger":"_MPji-","pill--warning":"_3S2m8","pill--info":"_2G3ML"};
|
|
9569
9839
|
|
|
9570
9840
|
var PILL_THEME = {
|
|
9571
9841
|
INFO: 'info',
|
|
@@ -9584,7 +9854,7 @@ var Pill = function Pill(_ref) {
|
|
|
9584
9854
|
testId = _ref.testId;
|
|
9585
9855
|
return React__default.createElement("div", {
|
|
9586
9856
|
"data-testid": testId,
|
|
9587
|
-
className: classnames(styles$
|
|
9857
|
+
className: classnames(styles$11['pill'], (_classnames = {}, _classnames[styles$11['pill--default']] = theme === PILL_THEME.DEFAULT, _classnames[styles$11['pill--warning']] = theme === PILL_THEME.WARNING, _classnames[styles$11['pill--success']] = theme === PILL_THEME.SUCCESS, _classnames[styles$11['pill--danger']] = theme === PILL_THEME.DANGER, _classnames[styles$11['pill--info']] = theme === PILL_THEME.INFO, _classnames))
|
|
9588
9858
|
}, children);
|
|
9589
9859
|
};
|
|
9590
9860
|
|
|
@@ -9594,14 +9864,16 @@ var EMPTY_STATE_SIZE = {
|
|
|
9594
9864
|
LARGE: 'large'
|
|
9595
9865
|
};
|
|
9596
9866
|
|
|
9597
|
-
var styles$
|
|
9867
|
+
var styles$12 = {"empty-state-container-stack":"_2B8Vd","empty-state-container-stack__content":"_NBTDp","empty-state-container-stack__content--full-page":"_1UWbP","empty-state-container-stack__content--inline-horizontal":"_2BVOy","empty-state-container-stack__body":"_1LuiZ"};
|
|
9598
9868
|
|
|
9599
|
-
var styles$
|
|
9869
|
+
var styles$13 = {"empty-state-container-cta":"_1Cx9N","empty-state-container-cta--inside-modal":"_WbcaM"};
|
|
9600
9870
|
|
|
9601
9871
|
var EmptyStateContainerCTA = function EmptyStateContainerCTA(_ref) {
|
|
9602
|
-
var _actions$primary, _actions$secondary;
|
|
9872
|
+
var _actions$primary, _actions$secondary, _classNames;
|
|
9603
9873
|
|
|
9604
9874
|
var isPaywall = _ref.isPaywall,
|
|
9875
|
+
_ref$isInsideModal = _ref.isInsideModal,
|
|
9876
|
+
isInsideModal = _ref$isInsideModal === void 0 ? false : _ref$isInsideModal,
|
|
9605
9877
|
actions = _ref.actions;
|
|
9606
9878
|
var primaryButton = updateButtonProps(actions.primary, {
|
|
9607
9879
|
theme: actions !== null && actions !== void 0 && (_actions$primary = actions.primary) !== null && _actions$primary !== void 0 && _actions$primary.props.theme || isPaywall ? 'upsell' : 'primary',
|
|
@@ -9612,7 +9884,7 @@ var EmptyStateContainerCTA = function EmptyStateContainerCTA(_ref) {
|
|
|
9612
9884
|
size: BUTTON_SIZES.MIN_WIDTH_100
|
|
9613
9885
|
});
|
|
9614
9886
|
return React__default.createElement("div", {
|
|
9615
|
-
className: styles$
|
|
9887
|
+
className: classnames(styles$13['empty-state-container-cta'], (_classNames = {}, _classNames[styles$13['empty-state-container-cta--inside-modal']] = isInsideModal, _classNames))
|
|
9616
9888
|
}, primaryButton, secondaryButton);
|
|
9617
9889
|
};
|
|
9618
9890
|
|
|
@@ -9627,7 +9899,7 @@ var EmptyStateContainerStack = function EmptyStateContainerStack(_ref) {
|
|
|
9627
9899
|
isPaywall = _ref$isPaywall === void 0 ? false : _ref$isPaywall,
|
|
9628
9900
|
testId = _ref.testId;
|
|
9629
9901
|
return React__default.createElement("div", {
|
|
9630
|
-
className: styles$
|
|
9902
|
+
className: styles$12['empty-state-container-stack'],
|
|
9631
9903
|
"data-testid": testId
|
|
9632
9904
|
}, React__default.createElement("img", {
|
|
9633
9905
|
src: mediaUrl,
|
|
@@ -9643,7 +9915,7 @@ var EmptyStateContainerStack = function EmptyStateContainerStack(_ref) {
|
|
|
9643
9915
|
emphasis: "bold",
|
|
9644
9916
|
as: "body"
|
|
9645
9917
|
}, title), React__default.createElement("div", {
|
|
9646
|
-
className: styles$
|
|
9918
|
+
className: styles$12['empty-state-container-stack__body']
|
|
9647
9919
|
}, children)), React__default.createElement(Stack, {
|
|
9648
9920
|
space: 8,
|
|
9649
9921
|
alignItems: "center"
|
|
@@ -9655,10 +9927,10 @@ var EmptyStateContainerStack = function EmptyStateContainerStack(_ref) {
|
|
|
9655
9927
|
}, caption)));
|
|
9656
9928
|
};
|
|
9657
9929
|
|
|
9658
|
-
var styles$
|
|
9930
|
+
var styles$14 = {"empty-state-container-inline":"_eMr1V","empty-state-container-inline--inside-modal":"_2sweG","empty-state-container-inline__content":"_2jreb","empty-state-container-inline__content--full-page":"_3RLfH","empty-state-container-inline__content--inline-horizontal":"_3BMpx","empty-state-container-inline__body":"_2J5vn","empty-state-container-inline__image":"_G2VtA"};
|
|
9659
9931
|
|
|
9660
9932
|
var EmptyStateContainerInline = function EmptyStateContainerInline(_ref) {
|
|
9661
|
-
var _classnames;
|
|
9933
|
+
var _classNames, _classnames;
|
|
9662
9934
|
|
|
9663
9935
|
var header = _ref.header,
|
|
9664
9936
|
title = _ref.title,
|
|
@@ -9671,11 +9943,15 @@ var EmptyStateContainerInline = function EmptyStateContainerInline(_ref) {
|
|
|
9671
9943
|
_ref$isPaywall = _ref.isPaywall,
|
|
9672
9944
|
isPaywall = _ref$isPaywall === void 0 ? false : _ref$isPaywall,
|
|
9673
9945
|
testId = _ref.testId;
|
|
9946
|
+
|
|
9947
|
+
var _useModalContext = useModalContext(),
|
|
9948
|
+
isInsideModal = _useModalContext.isModalMounted;
|
|
9949
|
+
|
|
9674
9950
|
return React__default.createElement("div", {
|
|
9675
|
-
className: styles$
|
|
9951
|
+
className: classnames(styles$14['empty-state-container-inline'], (_classNames = {}, _classNames[styles$14['empty-state-container-inline--inside-modal']] = isInsideModal, _classNames)),
|
|
9676
9952
|
"data-testid": testId
|
|
9677
9953
|
}, React__default.createElement("div", {
|
|
9678
|
-
className: classnames(styles$
|
|
9954
|
+
className: classnames(styles$14['empty-state-container-inline__content'], (_classnames = {}, _classnames[styles$14['empty-state-container__content--full-page']] = size === EMPTY_STATE_SIZE.LARGE, _classnames[styles$14['empty-state-container__content--inline-horizontal']] = size === EMPTY_STATE_SIZE.MEDIUM, _classnames))
|
|
9679
9955
|
}, React__default.createElement(Stack, {
|
|
9680
9956
|
space: 8
|
|
9681
9957
|
}, header && React__default.createElement(Text, {
|
|
@@ -9684,19 +9960,23 @@ var EmptyStateContainerInline = function EmptyStateContainerInline(_ref) {
|
|
|
9684
9960
|
}, header), React__default.createElement(Text, {
|
|
9685
9961
|
as: "h1"
|
|
9686
9962
|
}, title)), React__default.createElement("div", {
|
|
9687
|
-
className: styles$
|
|
9963
|
+
className: styles$14['empty-state-container-inline__body']
|
|
9688
9964
|
}, children), React__default.createElement(Stack, {
|
|
9689
|
-
space: 8
|
|
9965
|
+
space: 8,
|
|
9966
|
+
marginTop: 12
|
|
9690
9967
|
}, actions && React__default.createElement(EmptyStateContainerCTA, {
|
|
9691
9968
|
actions: actions,
|
|
9692
|
-
isPaywall: isPaywall
|
|
9969
|
+
isPaywall: isPaywall,
|
|
9970
|
+
isInsideModal: isInsideModal
|
|
9693
9971
|
}), caption && React__default.createElement(Text, {
|
|
9694
9972
|
as: "caption"
|
|
9695
|
-
}, caption))), React__default.createElement("
|
|
9973
|
+
}, caption))), React__default.createElement("div", {
|
|
9974
|
+
className: styles$14['empty-state-container-inline__image']
|
|
9975
|
+
}, React__default.createElement("img", {
|
|
9696
9976
|
src: mediaUrl,
|
|
9697
9977
|
alt: String(title),
|
|
9698
9978
|
width: size === EMPTY_STATE_SIZE.LARGE ? '500px' : '333px'
|
|
9699
|
-
}));
|
|
9979
|
+
})));
|
|
9700
9980
|
};
|
|
9701
9981
|
|
|
9702
9982
|
var EmptyStateContainer = function EmptyStateContainer(_ref) {
|