sag_components 2.0.0-beta211 → 2.0.0-beta212
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.esm.js +109 -50
- package/dist/index.esm.js.map +1 -1
- package/dist/index.js +109 -50
- package/dist/index.js.map +1 -1
- package/dist/types/components/ItemManagerPanel/ItemManagerPanel.style.d.ts +1 -0
- package/dist/types/components/ItemManagerPanel/NewSubitemList/NewSubitemList.style.d.ts +1 -0
- package/package.json +1 -1
package/dist/index.esm.js
CHANGED
|
@@ -34625,7 +34625,7 @@ const ModalBody = styled.div`
|
|
|
34625
34625
|
width: 100%;
|
|
34626
34626
|
height: 100%;
|
|
34627
34627
|
`;
|
|
34628
|
-
const TooltipContent$
|
|
34628
|
+
const TooltipContent$3 = styled.span`
|
|
34629
34629
|
color: #212121;
|
|
34630
34630
|
font-family: Poppins;
|
|
34631
34631
|
font-size: 14px;
|
|
@@ -34698,7 +34698,7 @@ const ModalWithOverlay = props => {
|
|
|
34698
34698
|
}), showOkButton && (disableOkButton && tooltipContent !== '' ? /*#__PURE__*/React$1.createElement(Tooltip$2, {
|
|
34699
34699
|
direction: "top",
|
|
34700
34700
|
topFactor: -0.85,
|
|
34701
|
-
content: /*#__PURE__*/React$1.createElement(TooltipContent$
|
|
34701
|
+
content: /*#__PURE__*/React$1.createElement(TooltipContent$3, {
|
|
34702
34702
|
dangerouslySetInnerHTML: {
|
|
34703
34703
|
__html: tooltipContent
|
|
34704
34704
|
}
|
|
@@ -34886,17 +34886,18 @@ css`
|
|
|
34886
34886
|
* • onApply(start,end) — callback, both numbers (inclusive)
|
|
34887
34887
|
* • onCancel() — callback
|
|
34888
34888
|
*/
|
|
34889
|
-
const WeeksCalendar =
|
|
34890
|
-
|
|
34891
|
-
|
|
34892
|
-
|
|
34893
|
-
|
|
34894
|
-
|
|
34895
|
-
|
|
34896
|
-
|
|
34897
|
-
|
|
34898
|
-
|
|
34899
|
-
|
|
34889
|
+
const WeeksCalendar = _ref => {
|
|
34890
|
+
let {
|
|
34891
|
+
year,
|
|
34892
|
+
defaultStartWeek = null,
|
|
34893
|
+
defaultEndWeek = null,
|
|
34894
|
+
backgroundColor = "#066768",
|
|
34895
|
+
hoverBackgroundColor = "#E6F0F0",
|
|
34896
|
+
allowedWeekRange = null,
|
|
34897
|
+
// New prop for range restriction
|
|
34898
|
+
onApply,
|
|
34899
|
+
onCancel
|
|
34900
|
+
} = _ref;
|
|
34900
34901
|
// state -------------------------------------------------
|
|
34901
34902
|
const [startWeek, setStartWeek] = useState(defaultStartWeek);
|
|
34902
34903
|
const [endWeek, setEndWeek] = useState(defaultEndWeek);
|
|
@@ -35978,9 +35979,12 @@ const ToggleSwitchLabel = styled.label`
|
|
|
35978
35979
|
position: relative;
|
|
35979
35980
|
cursor: pointer;
|
|
35980
35981
|
user-select: none;
|
|
35981
|
-
opacity: ${
|
|
35982
|
-
|
|
35983
|
-
|
|
35982
|
+
opacity: ${_ref => {
|
|
35983
|
+
let {
|
|
35984
|
+
disabled
|
|
35985
|
+
} = _ref;
|
|
35986
|
+
return disabled ? 0.5 : 1;
|
|
35987
|
+
}};
|
|
35984
35988
|
`;
|
|
35985
35989
|
const ToggleInput = styled.input`
|
|
35986
35990
|
display: none;
|
|
@@ -35988,15 +35992,19 @@ const ToggleInput = styled.input`
|
|
|
35988
35992
|
const ToggleSlider = styled.span`
|
|
35989
35993
|
display: block;
|
|
35990
35994
|
position: relative;
|
|
35991
|
-
background: ${
|
|
35992
|
-
|
|
35993
|
-
|
|
35994
|
-
|
|
35995
|
+
background: ${_ref2 => {
|
|
35996
|
+
let {
|
|
35997
|
+
checked,
|
|
35998
|
+
disabled
|
|
35999
|
+
} = _ref2;
|
|
36000
|
+
return checked ? disabled ? "#7bb1b0" : "#006d6a" : "#cfd8dc";
|
|
36001
|
+
}};
|
|
35995
36002
|
border-radius: 999px;
|
|
35996
36003
|
transition: background 0.2s;
|
|
35997
|
-
${
|
|
35998
|
-
|
|
35999
|
-
|
|
36004
|
+
${_ref3 => {
|
|
36005
|
+
let {
|
|
36006
|
+
size
|
|
36007
|
+
} = _ref3;
|
|
36000
36008
|
switch (size) {
|
|
36001
36009
|
case "s":
|
|
36002
36010
|
return css`width: 40px; height: 20px;`;
|
|
@@ -36015,9 +36023,10 @@ const ToggleSlider = styled.span`
|
|
|
36015
36023
|
background: #fff;
|
|
36016
36024
|
border-radius: 50%;
|
|
36017
36025
|
transition: left 0.2s, width 0.2s, height 0.2s;
|
|
36018
|
-
${
|
|
36019
|
-
|
|
36020
|
-
|
|
36026
|
+
${_ref4 => {
|
|
36027
|
+
let {
|
|
36028
|
+
size
|
|
36029
|
+
} = _ref4;
|
|
36021
36030
|
switch (size) {
|
|
36022
36031
|
case "s":
|
|
36023
36032
|
return css`width: 14px; height: 14px;`;
|
|
@@ -36027,10 +36036,11 @@ const ToggleSlider = styled.span`
|
|
|
36027
36036
|
return css`width: 20px; height: 20px;`;
|
|
36028
36037
|
}
|
|
36029
36038
|
}}
|
|
36030
|
-
left: ${
|
|
36031
|
-
|
|
36032
|
-
|
|
36033
|
-
|
|
36039
|
+
left: ${_ref5 => {
|
|
36040
|
+
let {
|
|
36041
|
+
checked,
|
|
36042
|
+
size
|
|
36043
|
+
} = _ref5;
|
|
36034
36044
|
if (!checked) return "3px";
|
|
36035
36045
|
switch (size) {
|
|
36036
36046
|
case "s":
|
|
@@ -36044,9 +36054,9 @@ const ToggleSlider = styled.span`
|
|
|
36044
36054
|
}
|
|
36045
36055
|
`;
|
|
36046
36056
|
|
|
36047
|
-
/**
|
|
36048
|
-
* ToggleSwitch component for on/off states.
|
|
36049
|
-
* Supports small/large sizes and disabled state.
|
|
36057
|
+
/**
|
|
36058
|
+
* ToggleSwitch component for on/off states.
|
|
36059
|
+
* Supports small/large sizes and disabled state.
|
|
36050
36060
|
*/
|
|
36051
36061
|
function ToggleSwitch(_ref) {
|
|
36052
36062
|
let {
|
|
@@ -39556,7 +39566,7 @@ const CloseButton = styled.button`
|
|
|
39556
39566
|
transform: scale(0.95);
|
|
39557
39567
|
}
|
|
39558
39568
|
`;
|
|
39559
|
-
const TooltipContent = styled.span`
|
|
39569
|
+
const TooltipContent$2 = styled.span`
|
|
39560
39570
|
color: #212121;
|
|
39561
39571
|
font-family: Poppins;
|
|
39562
39572
|
font-size: 14px;
|
|
@@ -39645,7 +39655,7 @@ const MessageBox = _ref => {
|
|
|
39645
39655
|
direction: "top",
|
|
39646
39656
|
showTooltip: isDisabled,
|
|
39647
39657
|
topFactor: -0.85,
|
|
39648
|
-
content: /*#__PURE__*/React$1.createElement(TooltipContent, {
|
|
39658
|
+
content: /*#__PURE__*/React$1.createElement(TooltipContent$2, {
|
|
39649
39659
|
dangerouslySetInnerHTML: {
|
|
39650
39660
|
__html: tooltipContent
|
|
39651
39661
|
}
|
|
@@ -39733,7 +39743,7 @@ const TrashIcon = ({
|
|
|
39733
39743
|
const DisabledTrashIcon = ({
|
|
39734
39744
|
width = "22",
|
|
39735
39745
|
height = "22",
|
|
39736
|
-
color = "#
|
|
39746
|
+
color = "#B1B1B1"
|
|
39737
39747
|
}) => {
|
|
39738
39748
|
return /*#__PURE__*/React$1.createElement("svg", {
|
|
39739
39749
|
width: width,
|
|
@@ -39746,7 +39756,7 @@ const DisabledTrashIcon = ({
|
|
|
39746
39756
|
fill: color
|
|
39747
39757
|
}), /*#__PURE__*/React$1.createElement("path", {
|
|
39748
39758
|
d: "M0.853591 21.8534L0.146484 21.1463L21.1463 0.146484L21.8534 0.853591L0.853591 21.8534Z",
|
|
39749
|
-
fill: "#
|
|
39759
|
+
fill: "#B1B1B1"
|
|
39750
39760
|
}));
|
|
39751
39761
|
};
|
|
39752
39762
|
|
|
@@ -44470,12 +44480,12 @@ const VendorItem$1 = styled$1.div`
|
|
|
44470
44480
|
cursor: pointer;
|
|
44471
44481
|
|
|
44472
44482
|
&:hover {
|
|
44473
|
-
background: #
|
|
44483
|
+
background: #E6F0F0;
|
|
44474
44484
|
.trash-icon svg path {
|
|
44475
44485
|
fill: #B1B1B1;
|
|
44476
44486
|
}
|
|
44477
44487
|
.trash-icon-disabled svg path {
|
|
44478
|
-
fill: #
|
|
44488
|
+
fill: #B1B1B1;
|
|
44479
44489
|
}
|
|
44480
44490
|
}
|
|
44481
44491
|
`;
|
|
@@ -44538,6 +44548,14 @@ const CustomTooltip$1 = styled$1(Tooltip$2)`
|
|
|
44538
44548
|
}
|
|
44539
44549
|
}
|
|
44540
44550
|
`;
|
|
44551
|
+
const TooltipContent$1 = styled$1.span`
|
|
44552
|
+
color: #212121;
|
|
44553
|
+
font-family: Poppins;
|
|
44554
|
+
font-size: 14px;
|
|
44555
|
+
font-style: normal;
|
|
44556
|
+
font-weight: 400;
|
|
44557
|
+
line-height: normal;
|
|
44558
|
+
`;
|
|
44541
44559
|
const Container$1 = styled$1.div`
|
|
44542
44560
|
display: flex;
|
|
44543
44561
|
align-items: center;
|
|
@@ -44634,6 +44652,7 @@ const DisabledTrashIconWrapper = styled$1.div`
|
|
|
44634
44652
|
&[data-tooltip]:hover::after {
|
|
44635
44653
|
left: calc(var(--tooltip-left, 0px) + var(--tooltip-width, 0px) / 2 - 50px);
|
|
44636
44654
|
}
|
|
44655
|
+
|
|
44637
44656
|
`;
|
|
44638
44657
|
const TrashIconWrapper = styled$1.div`
|
|
44639
44658
|
${baseIconWrapperStyles}
|
|
@@ -44959,8 +44978,19 @@ const Item$1 = styled.div`
|
|
|
44959
44978
|
.trash-icon svg path {
|
|
44960
44979
|
fill: #b1b1b1;
|
|
44961
44980
|
}
|
|
44981
|
+
.trash-icon-disabled svg path {
|
|
44982
|
+
fill: #B1B1B1;
|
|
44983
|
+
}
|
|
44962
44984
|
}
|
|
44963
44985
|
`;
|
|
44986
|
+
const TooltipContent = styled.span`
|
|
44987
|
+
color: #212121;
|
|
44988
|
+
font-family: Poppins;
|
|
44989
|
+
font-size: 14px;
|
|
44990
|
+
font-style: normal;
|
|
44991
|
+
font-weight: 400;
|
|
44992
|
+
line-height: normal;
|
|
44993
|
+
`;
|
|
44964
44994
|
const Title$2 = styled.div`
|
|
44965
44995
|
font-size: 14px;
|
|
44966
44996
|
overflow: hidden;
|
|
@@ -45150,6 +45180,7 @@ const NewSubitemList = props => {
|
|
|
45150
45180
|
linkColor
|
|
45151
45181
|
} = props;
|
|
45152
45182
|
const [isHovered, setIsHovered] = useState(false);
|
|
45183
|
+
const [trashIsHovered, setTrashIsHovered] = useState(false);
|
|
45153
45184
|
const vendorItems = itemAndPackage.find(i => i.name === vendor.name).packages || [];
|
|
45154
45185
|
const onDeletePackage = item => {
|
|
45155
45186
|
const updatedPackages = vendorItems.filter(pkg => pkg.brands !== item.brands);
|
|
@@ -45184,6 +45215,8 @@ const NewSubitemList = props => {
|
|
|
45184
45215
|
};
|
|
45185
45216
|
const handleMouseEnter = () => setIsHovered(true);
|
|
45186
45217
|
const handleMouseLeave = () => setIsHovered(false);
|
|
45218
|
+
const handleMouseTrashEnter = () => setTrashIsHovered(true);
|
|
45219
|
+
const handleMouseTrashLeave = () => setTrashIsHovered(false);
|
|
45187
45220
|
return /*#__PURE__*/React$1.createElement(NewSubitemContainer$1, null, /*#__PURE__*/React$1.createElement(Header$1, null, /*#__PURE__*/React$1.createElement(BackButton$1, {
|
|
45188
45221
|
onClick: onBack
|
|
45189
45222
|
}, /*#__PURE__*/React$1.createElement(ArrowLeftIcon, null)), /*#__PURE__*/React$1.createElement(BackTitle$1, null, "All Vendors")), /*#__PURE__*/React$1.createElement(SelectionTitle$1, null, vendor.name), /*#__PURE__*/React$1.createElement(AddButtonContainer, null, /*#__PURE__*/React$1.createElement(LinkButton, {
|
|
@@ -45200,7 +45233,11 @@ const NewSubitemList = props => {
|
|
|
45200
45233
|
ref: el => setupTooltip(el, "Package was Sent")
|
|
45201
45234
|
}, /*#__PURE__*/React$1.createElement(CustomTooltip, {
|
|
45202
45235
|
hideTooltip: isHovered,
|
|
45203
|
-
content:
|
|
45236
|
+
content: /*#__PURE__*/React$1.createElement(TooltipContent, {
|
|
45237
|
+
dangerouslySetInnerHTML: {
|
|
45238
|
+
__html: "Package was Sent"
|
|
45239
|
+
}
|
|
45240
|
+
}),
|
|
45204
45241
|
topFactor: 0,
|
|
45205
45242
|
direction: "right"
|
|
45206
45243
|
}, item.status && Number(item.status) > 1 ? /*#__PURE__*/React$1.createElement(PackageSendIcon, {
|
|
@@ -45212,14 +45249,25 @@ const NewSubitemList = props => {
|
|
|
45212
45249
|
}
|
|
45213
45250
|
}, item.brands && /*#__PURE__*/React$1.createElement(Title$2, {
|
|
45214
45251
|
title: item.brands
|
|
45215
|
-
}, item.brands), item.component && /*#__PURE__*/React$1.createElement(ComponentContainer, null, item.component[0]), /*#__PURE__*/React$1.createElement(Chevron, null, /*#__PURE__*/React$1.createElement(ArrowRightFullIcon, null))), item.status && Number(item.status) > 1 ? /*#__PURE__*/React$1.createElement(
|
|
45252
|
+
}, item.brands), item.component && /*#__PURE__*/React$1.createElement(ComponentContainer, null, item.component[0]), /*#__PURE__*/React$1.createElement(Chevron, null, /*#__PURE__*/React$1.createElement(ArrowRightFullIcon, null))), item.status && Number(item.status) > 1 ? /*#__PURE__*/React$1.createElement(CustomTooltip, {
|
|
45253
|
+
hideTooltip: trashIsHovered,
|
|
45254
|
+
content: /*#__PURE__*/React$1.createElement(TooltipContent, {
|
|
45255
|
+
dangerouslySetInnerHTML: {
|
|
45256
|
+
__html: "Package cannot be deleted since it<br/> has been sent to the vendor as a form."
|
|
45257
|
+
}
|
|
45258
|
+
}),
|
|
45259
|
+
topFactor: 0,
|
|
45260
|
+
direction: "left"
|
|
45261
|
+
}, /*#__PURE__*/React$1.createElement(DisabledTrashIconWrapper, {
|
|
45216
45262
|
className: "trash-icon-disabled"
|
|
45217
45263
|
|
|
45218
45264
|
// ref={(el) => setupTooltip(el, trashTooltipText)}
|
|
45219
45265
|
}, /*#__PURE__*/React$1.createElement(DisabledTrashIcon, {
|
|
45266
|
+
onMouseEnter: handleMouseTrashEnter,
|
|
45267
|
+
onMouseLeave: handleMouseTrashLeave,
|
|
45220
45268
|
width: "22",
|
|
45221
45269
|
height: "22"
|
|
45222
|
-
})) : /*#__PURE__*/React$1.createElement(TrashIconWrapper, {
|
|
45270
|
+
}))) : /*#__PURE__*/React$1.createElement(TrashIconWrapper, {
|
|
45223
45271
|
className: "trash-icon",
|
|
45224
45272
|
onClick: e => {
|
|
45225
45273
|
e.stopPropagation();
|
|
@@ -54132,7 +54180,7 @@ const ItemManagerPanel = _ref => {
|
|
|
54132
54180
|
linkColor = "#212121",
|
|
54133
54181
|
backgroundColor = 'white',
|
|
54134
54182
|
buttonTooltipText = "Please fill out all forms before sending.",
|
|
54135
|
-
trashTooltipText = '
|
|
54183
|
+
trashTooltipText = 'Vendor cannot be deleted since its packages <br/> have already been sent as a form.',
|
|
54136
54184
|
maxVisibleVendors = 12,
|
|
54137
54185
|
componentText = "Scale"
|
|
54138
54186
|
} = _ref;
|
|
@@ -54338,7 +54386,11 @@ const ItemManagerPanel = _ref => {
|
|
|
54338
54386
|
ref: headerRef
|
|
54339
54387
|
}, /*#__PURE__*/React$1.createElement(Container$1, null, /*#__PURE__*/React$1.createElement(TitleContainer, null, /*#__PURE__*/React$1.createElement(SectionTitle$1, null, "Vendors"), /*#__PURE__*/React$1.createElement(SubtitleContainer, null, /*#__PURE__*/React$1.createElement(Subtitle$1, null, itemAndPackage.filter(item => item.packages !== null).length.toString(), " ", "Vendors", " "), /*#__PURE__*/React$1.createElement("span", null, "\xB7"), /*#__PURE__*/React$1.createElement(Subtitle$1, null, itemAndPackage.filter(item => item.packages !== null).reduce((acc, item) => acc + (item.packages ? item.packages.length : 0), 0), " ", "Packages"))), editMode && /*#__PURE__*/React$1.createElement(ButtonContainer, null, /*#__PURE__*/React$1.createElement(CustomTooltip$1, {
|
|
54340
54388
|
hideTooltip: !disabledSendForms,
|
|
54341
|
-
content:
|
|
54389
|
+
content: /*#__PURE__*/React$1.createElement(TooltipContent$1, {
|
|
54390
|
+
dangerouslySetInnerHTML: {
|
|
54391
|
+
__html: buttonTooltipText
|
|
54392
|
+
}
|
|
54393
|
+
}),
|
|
54342
54394
|
topFactor: 2,
|
|
54343
54395
|
direction: "bottom"
|
|
54344
54396
|
}, /*#__PURE__*/React$1.createElement(Button$1, {
|
|
@@ -54388,9 +54440,15 @@ const ItemManagerPanel = _ref => {
|
|
|
54388
54440
|
} else {
|
|
54389
54441
|
return `${sentPackagesLength}/${packagesLength} Packages Sent`;
|
|
54390
54442
|
}
|
|
54391
|
-
})())), /*#__PURE__*/React$1.createElement(VendorChevron$1, null, /*#__PURE__*/React$1.createElement(ArrowRightFullIcon, null))), sentPackagesLength > 0 ? /*#__PURE__*/React$1.createElement(DisabledTrashIconWrapper,
|
|
54443
|
+
})())), /*#__PURE__*/React$1.createElement(VendorChevron$1, null, /*#__PURE__*/React$1.createElement(ArrowRightFullIcon, null))), sentPackagesLength > 0 ? /*#__PURE__*/React$1.createElement(DisabledTrashIconWrapper, {
|
|
54444
|
+
className: "trash-icon-disabled"
|
|
54445
|
+
}, /*#__PURE__*/React$1.createElement(CustomTooltip$1, {
|
|
54392
54446
|
hideTooltip: trashIsHovered,
|
|
54393
|
-
content:
|
|
54447
|
+
content: /*#__PURE__*/React$1.createElement(TooltipContent$1, {
|
|
54448
|
+
dangerouslySetInnerHTML: {
|
|
54449
|
+
__html: trashTooltipText
|
|
54450
|
+
}
|
|
54451
|
+
}),
|
|
54394
54452
|
topFactor: 0,
|
|
54395
54453
|
direction: "left"
|
|
54396
54454
|
}, /*#__PURE__*/React$1.createElement(DisabledTrashIcon, {
|
|
@@ -54540,10 +54598,11 @@ const DropdownList = styled.ul`
|
|
|
54540
54598
|
`}
|
|
54541
54599
|
`;
|
|
54542
54600
|
const SectionDiv = styled.div`
|
|
54543
|
-
${
|
|
54544
|
-
|
|
54545
|
-
|
|
54546
|
-
|
|
54601
|
+
${_ref => {
|
|
54602
|
+
let {
|
|
54603
|
+
$showBorder,
|
|
54604
|
+
margin
|
|
54605
|
+
} = _ref;
|
|
54547
54606
|
switch ($showBorder) {
|
|
54548
54607
|
case 'Template Offer':
|
|
54549
54608
|
return css`border-top: 1px solid #e6e2e2ff;
|