sag_components 2.0.0-beta112 → 2.0.0-beta113
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.d.ts +2 -2
- package/dist/index.esm.js +91 -105
- package/dist/index.esm.js.map +1 -1
- package/dist/index.js +91 -105
- package/dist/index.js.map +1 -1
- package/dist/types/components/ItemManagerPanel/ConfirmationDialog/ConfirmationDialog.style.d.ts +2 -3
- package/dist/types/components/ItemManagerPanel/ItemManagerPanel.d.ts +2 -2
- package/dist/types/components/ItemManagerPanel/ItemManagerPanel.stories.d.ts +22 -10
- package/dist/types/components/ItemManagerPanel/ItemManagerPanel.style.d.ts +1 -0
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -2226,7 +2226,11 @@ const Tooltip$2 = props => {
|
|
|
2226
2226
|
}, children, active && !hideTooltip && /*#__PURE__*/React__default["default"].createElement(TooltipTip$1, {
|
|
2227
2227
|
className: `controls ${direction || 'top'}`,
|
|
2228
2228
|
topFactor: topFactor
|
|
2229
|
-
}, content
|
|
2229
|
+
}, typeof content === 'string' ? /*#__PURE__*/React__default["default"].createElement("span", {
|
|
2230
|
+
dangerouslySetInnerHTML: {
|
|
2231
|
+
__html: content
|
|
2232
|
+
}
|
|
2233
|
+
}) : content)));
|
|
2230
2234
|
};
|
|
2231
2235
|
|
|
2232
2236
|
/* Benchmark */
|
|
@@ -3068,7 +3072,7 @@ const LinkButton = _ref => {
|
|
|
3068
3072
|
height = '',
|
|
3069
3073
|
width = '',
|
|
3070
3074
|
disabled = false,
|
|
3071
|
-
textColor = '',
|
|
3075
|
+
textColor = '#229E38',
|
|
3072
3076
|
onClick,
|
|
3073
3077
|
leftIcon = 'none',
|
|
3074
3078
|
rightIcon = 'none'
|
|
@@ -3098,7 +3102,7 @@ const LinkButton = _ref => {
|
|
|
3098
3102
|
const getIcon = icon => {
|
|
3099
3103
|
const iconHeight = size === 'small' ? '12px' : '13px';
|
|
3100
3104
|
const iconWidth = size === 'small' ? '12px' : '13px';
|
|
3101
|
-
const newTextColor =
|
|
3105
|
+
const newTextColor = type === 'secondary' ? '#212121' : textColor;
|
|
3102
3106
|
const color = disabled ? '#B1B1B1' : newTextColor;
|
|
3103
3107
|
switch (icon.toLowerCase()) {
|
|
3104
3108
|
case 'filter':
|
|
@@ -26105,7 +26109,7 @@ const TotalDoughnutChart = props => {
|
|
|
26105
26109
|
key: `cell-${row.name}`,
|
|
26106
26110
|
fill: row.color
|
|
26107
26111
|
}))), /*#__PURE__*/React__default["default"].createElement(recharts.Tooltip, {
|
|
26108
|
-
content: /*#__PURE__*/React__default["default"].createElement(CustomTooltip, {
|
|
26112
|
+
content: /*#__PURE__*/React__default["default"].createElement(CustomTooltip$1, {
|
|
26109
26113
|
value: value,
|
|
26110
26114
|
isPercent: isPercent
|
|
26111
26115
|
})
|
|
@@ -26174,7 +26178,7 @@ TotalDoughnutChart.defaultProps = {
|
|
|
26174
26178
|
noDataText: 'No Data',
|
|
26175
26179
|
textAfterValue: ''
|
|
26176
26180
|
};
|
|
26177
|
-
function CustomTooltip(_ref) {
|
|
26181
|
+
function CustomTooltip$1(_ref) {
|
|
26178
26182
|
let {
|
|
26179
26183
|
active,
|
|
26180
26184
|
payload,
|
|
@@ -26187,7 +26191,7 @@ function CustomTooltip(_ref) {
|
|
|
26187
26191
|
return /*#__PURE__*/React__default["default"].createElement(TooltipDiv$6, null, /*#__PURE__*/React__default["default"].createElement(TooltipLabel$6, null, `${payload[0].name} ${percent}%`));
|
|
26188
26192
|
}
|
|
26189
26193
|
}
|
|
26190
|
-
CustomTooltip.propTypes = {
|
|
26194
|
+
CustomTooltip$1.propTypes = {
|
|
26191
26195
|
// eslint-disable-next-line react/forbid-prop-types
|
|
26192
26196
|
active: PropTypes.any,
|
|
26193
26197
|
// eslint-disable-next-line react/forbid-prop-types
|
|
@@ -26197,7 +26201,7 @@ CustomTooltip.propTypes = {
|
|
|
26197
26201
|
// eslint-disable-next-line react/forbid-prop-types
|
|
26198
26202
|
isPercent: PropTypes.any
|
|
26199
26203
|
};
|
|
26200
|
-
CustomTooltip.defaultProps = {
|
|
26204
|
+
CustomTooltip$1.defaultProps = {
|
|
26201
26205
|
active: '',
|
|
26202
26206
|
payload: '',
|
|
26203
26207
|
value: '',
|
|
@@ -41405,7 +41409,7 @@ const Card = styled__default["default"].div`
|
|
|
41405
41409
|
border-radius: 8px;
|
|
41406
41410
|
/* box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05); */
|
|
41407
41411
|
text-align: center;
|
|
41408
|
-
overflow: hidden;
|
|
41412
|
+
/* overflow: hidden; */ // If hidden the tooltip will not be visible
|
|
41409
41413
|
width: ${props => props.width || "auto"};
|
|
41410
41414
|
height: ${props => props.height || "auto"};
|
|
41411
41415
|
margin: 0 auto;
|
|
@@ -41424,8 +41428,9 @@ const SectionTitle$1 = styled__default["default"].div`
|
|
|
41424
41428
|
`;
|
|
41425
41429
|
const SubtitleContainer = styled__default["default"].div`
|
|
41426
41430
|
display: flex;
|
|
41427
|
-
align-items:
|
|
41428
|
-
gap:
|
|
41431
|
+
align-items: center;
|
|
41432
|
+
gap: 6px;
|
|
41433
|
+
color: #8B8989;
|
|
41429
41434
|
`;
|
|
41430
41435
|
const Subtitle$1 = styled__default["default"].span`
|
|
41431
41436
|
color: ${props => props.color};
|
|
@@ -41524,10 +41529,6 @@ const LineContainer = styled__default["default"].div`
|
|
|
41524
41529
|
width: 100%;
|
|
41525
41530
|
`;
|
|
41526
41531
|
const ButtonContainer$1 = styled__default["default"].div`
|
|
41527
|
-
display: flex;
|
|
41528
|
-
justify-content: flex-end;
|
|
41529
|
-
flex-direction: column;
|
|
41530
|
-
gap: 5px;
|
|
41531
41532
|
margin-top: 16px;
|
|
41532
41533
|
.ButtonContainer {
|
|
41533
41534
|
label {
|
|
@@ -41535,6 +41536,16 @@ const ButtonContainer$1 = styled__default["default"].div`
|
|
|
41535
41536
|
}
|
|
41536
41537
|
}
|
|
41537
41538
|
`;
|
|
41539
|
+
const CustomTooltip = styled__default["default"](Tooltip$2)`
|
|
41540
|
+
.controls {
|
|
41541
|
+
padding: 12px 16px;
|
|
41542
|
+
font-size: 14px;
|
|
41543
|
+
left: 0;
|
|
41544
|
+
&::before {
|
|
41545
|
+
left: 90%;
|
|
41546
|
+
}
|
|
41547
|
+
}
|
|
41548
|
+
`;
|
|
41538
41549
|
const Container$1 = styled__default["default"].div`
|
|
41539
41550
|
display: flex;
|
|
41540
41551
|
align-items: center;
|
|
@@ -42086,7 +42097,7 @@ styled__default["default"].div`
|
|
|
42086
42097
|
margin-top: 24px;
|
|
42087
42098
|
margin-left: 8px;
|
|
42088
42099
|
`;
|
|
42089
|
-
const Divider
|
|
42100
|
+
const Divider = styled__default["default"].div`
|
|
42090
42101
|
height: 1px;
|
|
42091
42102
|
background-color: #e2e2e2;
|
|
42092
42103
|
margin: 16px 0;
|
|
@@ -42159,7 +42170,7 @@ const NewSubitem = ({
|
|
|
42159
42170
|
type: "primary",
|
|
42160
42171
|
backgroundColor: linkColor,
|
|
42161
42172
|
hoverTextColor: "#212121"
|
|
42162
|
-
})), /*#__PURE__*/React__default["default"].createElement(Divider
|
|
42173
|
+
})), /*#__PURE__*/React__default["default"].createElement(Divider, null), /*#__PURE__*/React__default["default"].createElement("form", null, /*#__PURE__*/React__default["default"].createElement(NegotiatedContainer, null, /*#__PURE__*/React__default["default"].createElement(AddNegotiatedBrand, null, "Add Negotiated Brand/s ", /*#__PURE__*/React__default["default"].createElement("span", {
|
|
42163
42174
|
style: {
|
|
42164
42175
|
color: "red"
|
|
42165
42176
|
}
|
|
@@ -42193,47 +42204,34 @@ const NewSubitem = ({
|
|
|
42193
42204
|
};
|
|
42194
42205
|
|
|
42195
42206
|
const Overlay$1 = styled__default["default"].div`
|
|
42196
|
-
|
|
42197
|
-
flex-direction: column;
|
|
42207
|
+
font-family: Poppins;
|
|
42198
42208
|
background: #f7f8fa;
|
|
42199
42209
|
width: ${props => props.width || "100%"};
|
|
42200
42210
|
height: ${props => props.height || "100%"};
|
|
42201
42211
|
overflow: hidden;
|
|
42212
|
+
text-align: left;
|
|
42202
42213
|
`;
|
|
42203
|
-
const
|
|
42204
|
-
|
|
42205
|
-
|
|
42206
|
-
|
|
42207
|
-
padding: 32px 24px;
|
|
42214
|
+
const HeaderContainer = styled__default["default"].div`
|
|
42215
|
+
color: #212121;
|
|
42216
|
+
padding: 40px 16px;
|
|
42217
|
+
border-bottom: 1px solid #e2e2e2;
|
|
42208
42218
|
`;
|
|
42209
|
-
const Title$1 = styled__default["default"].
|
|
42210
|
-
color: var(--Text-Primary, #212121);
|
|
42211
|
-
font-feature-settings: "liga" off;
|
|
42212
|
-
/* Headings/H3 Medium */
|
|
42213
|
-
font-family: Poppins;
|
|
42219
|
+
const Title$1 = styled__default["default"].h5`
|
|
42214
42220
|
font-size: 32px;
|
|
42215
|
-
font-style: normal;
|
|
42216
42221
|
font-weight: 700;
|
|
42217
|
-
|
|
42222
|
+
margin: 0 0 20px;
|
|
42218
42223
|
`;
|
|
42219
42224
|
const Subtitle = styled__default["default"].p`
|
|
42220
|
-
color: var(--Text-Primary, #212121);
|
|
42221
|
-
font-feature-settings: "liga" off;
|
|
42222
|
-
/* Headings/H6 Regular */
|
|
42223
|
-
font-family: Poppins;
|
|
42224
42225
|
font-size: 18px;
|
|
42225
|
-
font-style: normal;
|
|
42226
42226
|
font-weight: 400;
|
|
42227
|
-
|
|
42227
|
+
margin: 0 0 20px;
|
|
42228
42228
|
`;
|
|
42229
|
-
const
|
|
42230
|
-
|
|
42229
|
+
const Dialog = styled__default["default"].div`
|
|
42230
|
+
background: #fff;
|
|
42231
42231
|
`;
|
|
42232
|
-
const
|
|
42233
|
-
|
|
42234
|
-
|
|
42235
|
-
margin: 16px 0;
|
|
42236
|
-
width: 100%;
|
|
42232
|
+
const VendorSection = styled__default["default"].div`
|
|
42233
|
+
padding: 16px;
|
|
42234
|
+
border-bottom: 1px solid #e2e2e2;
|
|
42237
42235
|
`;
|
|
42238
42236
|
const Item = styled__default["default"].li`
|
|
42239
42237
|
color: black; /* text color */
|
|
@@ -42254,12 +42252,8 @@ const VendorName = styled__default["default"].span`
|
|
|
42254
42252
|
margin-right: 10px;
|
|
42255
42253
|
overflow: hidden;
|
|
42256
42254
|
color: #000;
|
|
42257
|
-
|
|
42258
|
-
font-family: Poppins;
|
|
42259
42255
|
font-size: 16px;
|
|
42260
|
-
font-style: normal;
|
|
42261
42256
|
font-weight: 500;
|
|
42262
|
-
line-height: normal;
|
|
42263
42257
|
`;
|
|
42264
42258
|
const NewBadge = styled__default["default"].span`
|
|
42265
42259
|
background: #ffe2b6;
|
|
@@ -42267,40 +42261,23 @@ const NewBadge = styled__default["default"].span`
|
|
|
42267
42261
|
border-radius: 16px;
|
|
42268
42262
|
padding: 2px 10px;
|
|
42269
42263
|
margin-left: 4px;
|
|
42270
|
-
color: #000;
|
|
42271
|
-
font-feature-settings: "liga" off;
|
|
42272
|
-
font-family: Poppins;
|
|
42273
42264
|
font-size: 14px;
|
|
42274
|
-
font-style: normal;
|
|
42275
42265
|
font-weight: 500;
|
|
42276
|
-
line-height: normal;
|
|
42277
42266
|
`;
|
|
42278
42267
|
const PackageList = styled__default["default"].ul`
|
|
42279
42268
|
margin: 0 0 0 16px;
|
|
42280
42269
|
padding: 0;
|
|
42281
42270
|
gap: 30px;
|
|
42282
42271
|
list-style: disc;
|
|
42283
|
-
color: #888;
|
|
42284
|
-
color: var(--General-Black, #212121);
|
|
42285
|
-
font-feature-settings: "liga" off;
|
|
42286
|
-
font-family: Poppins;
|
|
42287
42272
|
font-size: 14px;
|
|
42288
|
-
font-style: normal;
|
|
42289
42273
|
font-weight: 400;
|
|
42290
|
-
line-height: normal;
|
|
42291
42274
|
`;
|
|
42292
42275
|
const ButtonRow = styled__default["default"].div`
|
|
42293
42276
|
display: flex;
|
|
42294
|
-
justify-content: flex-start;
|
|
42295
42277
|
gap: 12px;
|
|
42296
|
-
|
|
42278
|
+
justify-content: flex-start;
|
|
42297
42279
|
align-items: center;
|
|
42298
42280
|
`;
|
|
42299
|
-
const HeaderContainer = styled__default["default"].div`
|
|
42300
|
-
display: flex;
|
|
42301
|
-
flex-direction: column;
|
|
42302
|
-
padding: 16px;
|
|
42303
|
-
`;
|
|
42304
42281
|
|
|
42305
42282
|
const ConfirmationDialog = ({
|
|
42306
42283
|
width,
|
|
@@ -42311,39 +42288,43 @@ const ConfirmationDialog = ({
|
|
|
42311
42288
|
linkColor
|
|
42312
42289
|
}) => {
|
|
42313
42290
|
const totalNew = vendors.reduce((sum, v) => sum + (v.newPackages?.length || 0), 0);
|
|
42291
|
+
const confirmationText = `You are about to send the following
|
|
42292
|
+
${totalNew} new ${totalNew === 1 ? 'package' : 'packages'} to
|
|
42293
|
+
${vendors.length} ${vendors.length === 1 ? 'vendor' : 'vendors'}:`;
|
|
42314
42294
|
return /*#__PURE__*/React__default["default"].createElement(Overlay$1, {
|
|
42315
42295
|
width: width,
|
|
42316
42296
|
height: height
|
|
42317
|
-
}, /*#__PURE__*/React__default["default"].createElement(HeaderContainer, null, /*#__PURE__*/React__default["default"].createElement(Title$1, null, "Confirmation"), /*#__PURE__*/React__default["default"].createElement(Subtitle, null,
|
|
42297
|
+
}, /*#__PURE__*/React__default["default"].createElement(HeaderContainer, null, /*#__PURE__*/React__default["default"].createElement(Title$1, null, "Confirmation"), /*#__PURE__*/React__default["default"].createElement(Subtitle, null, confirmationText), /*#__PURE__*/React__default["default"].createElement(ButtonRow, null, /*#__PURE__*/React__default["default"].createElement(Button$1, {
|
|
42318
42298
|
leftIcon: "none",
|
|
42319
42299
|
onClick: onCancel,
|
|
42320
42300
|
rightIcon: "none",
|
|
42321
|
-
size: "
|
|
42301
|
+
size: "",
|
|
42322
42302
|
text: "Cancel",
|
|
42323
42303
|
type: "secondary"
|
|
42324
42304
|
}), /*#__PURE__*/React__default["default"].createElement(Button$1, {
|
|
42325
42305
|
leftIcon: "none",
|
|
42326
42306
|
onClick: onConfirm,
|
|
42327
42307
|
rightIcon: "none",
|
|
42328
|
-
size: "
|
|
42308
|
+
size: "",
|
|
42329
42309
|
text: "Confirm & Send",
|
|
42330
42310
|
type: "primary",
|
|
42311
|
+
borderColor: linkColor,
|
|
42331
42312
|
backgroundColor: linkColor,
|
|
42332
42313
|
hoverTextColor: "#212121"
|
|
42333
42314
|
}))), /*#__PURE__*/React__default["default"].createElement(Dialog, null, vendors.map((vendor, idx) => /*#__PURE__*/React__default["default"].createElement(VendorSection, {
|
|
42334
42315
|
key: vendor.name
|
|
42335
42316
|
}, /*#__PURE__*/React__default["default"].createElement(VendorHeader, null, /*#__PURE__*/React__default["default"].createElement(VendorName, null, vendor.name), /*#__PURE__*/React__default["default"].createElement(NewBadge, null, vendor.newPackages.length, " New")), /*#__PURE__*/React__default["default"].createElement(PackageList, null, vendor.newPackages.map((pkg, i) => /*#__PURE__*/React__default["default"].createElement(Item, {
|
|
42336
42317
|
key: i
|
|
42337
|
-
}, pkg)))
|
|
42318
|
+
}, pkg)))))));
|
|
42338
42319
|
};
|
|
42339
42320
|
|
|
42340
42321
|
const SuccessScreenContainer = styled__default["default"].div`
|
|
42341
|
-
|
|
42342
|
-
flex-direction: column;
|
|
42322
|
+
font-family: Poppins;
|
|
42343
42323
|
background:rgb(255, 255, 255);
|
|
42344
42324
|
width: ${props => props.width || "100%"};
|
|
42345
42325
|
height: ${props => props.height || "100%"};
|
|
42346
42326
|
overflow: hidden;
|
|
42327
|
+
text-align: left;
|
|
42347
42328
|
`;
|
|
42348
42329
|
const SuccessHeader = styled__default["default"].div`
|
|
42349
42330
|
display: flex;
|
|
@@ -42351,29 +42332,19 @@ const SuccessHeader = styled__default["default"].div`
|
|
|
42351
42332
|
align-items: center;
|
|
42352
42333
|
justify-content: center;
|
|
42353
42334
|
`;
|
|
42354
|
-
const SuccessTitle = styled__default["default"].
|
|
42355
|
-
color:
|
|
42356
|
-
text-align: center;
|
|
42357
|
-
font-
|
|
42358
|
-
|
|
42359
|
-
|
|
42360
|
-
font-family: Poppins;
|
|
42361
|
-
font-size: 32px;
|
|
42362
|
-
font-style: normal;
|
|
42363
|
-
font-weight: 700;
|
|
42364
|
-
line-height: normal;
|
|
42335
|
+
const SuccessTitle = styled__default["default"].h5`
|
|
42336
|
+
color: #212121;
|
|
42337
|
+
text-align: center;
|
|
42338
|
+
font-size: 32px;
|
|
42339
|
+
font-weight: 700;
|
|
42340
|
+
margin: 0 0 20px;
|
|
42365
42341
|
`;
|
|
42366
42342
|
const SuccessSubtitle = styled__default["default"].p`
|
|
42367
42343
|
margin-bottom: 24px;
|
|
42368
42344
|
text-align: center;
|
|
42369
|
-
color:
|
|
42370
|
-
font-feature-settings: 'liga' off;
|
|
42371
|
-
/* Content/P1 Regular */
|
|
42372
|
-
font-family: Poppins;
|
|
42345
|
+
color: #212121;
|
|
42373
42346
|
font-size: 16px;
|
|
42374
|
-
font-style: normal;
|
|
42375
42347
|
font-weight: 400;
|
|
42376
|
-
line-height: normal;
|
|
42377
42348
|
`;
|
|
42378
42349
|
styled__default["default"].div`
|
|
42379
42350
|
display: flex;
|
|
@@ -50847,8 +50818,6 @@ const SuccessScreen = ({
|
|
|
50847
50818
|
}, vendor, /*#__PURE__*/React__default["default"].createElement("br", null)))))));
|
|
50848
50819
|
};
|
|
50849
50820
|
|
|
50850
|
-
// Removed TypeScript interface and type annotations
|
|
50851
|
-
|
|
50852
50821
|
const ItemManagerPanel = _ref => {
|
|
50853
50822
|
let {
|
|
50854
50823
|
width = "100%",
|
|
@@ -50861,7 +50830,7 @@ const ItemManagerPanel = _ref => {
|
|
|
50861
50830
|
setItemAndPackage,
|
|
50862
50831
|
linkColor = "#212121",
|
|
50863
50832
|
backgroundColor = 'white',
|
|
50864
|
-
|
|
50833
|
+
buttonTooltipText = "Please fill out all forms before sending."
|
|
50865
50834
|
} = _ref;
|
|
50866
50835
|
const [screen, setScreen] = React$1.useState("initial");
|
|
50867
50836
|
const [selectedVendor, setSelectedVendor] = React$1.useState(null);
|
|
@@ -50894,9 +50863,6 @@ const ItemManagerPanel = _ref => {
|
|
|
50894
50863
|
});
|
|
50895
50864
|
setScreen("subitem");
|
|
50896
50865
|
};
|
|
50897
|
-
const handleBackToDefault = () => {
|
|
50898
|
-
setScreen("");
|
|
50899
|
-
};
|
|
50900
50866
|
const onDeleteVendor = vendor => {
|
|
50901
50867
|
const updatedItemAndPackage = itemAndPackage.filter(item => item.name !== vendor.name);
|
|
50902
50868
|
setItemAndPackage([...updatedItemAndPackage, {
|
|
@@ -50904,6 +50870,21 @@ const ItemManagerPanel = _ref => {
|
|
|
50904
50870
|
packages: null
|
|
50905
50871
|
}]);
|
|
50906
50872
|
};
|
|
50873
|
+
const hasUnisentPackages = React$1.useMemo(() => {
|
|
50874
|
+
return itemAndPackage.some(vendor => {
|
|
50875
|
+
if (vendor.packages === null || !Array.isArray(vendor.packages)) {
|
|
50876
|
+
return false;
|
|
50877
|
+
}
|
|
50878
|
+
return vendor.packages.some(pkg => !pkg.hasOwnProperty('status') || pkg.status == null || pkg.status === undefined || pkg.status === '');
|
|
50879
|
+
});
|
|
50880
|
+
}, [itemAndPackage]);
|
|
50881
|
+
const actuallyAllFormsSent = AllFormsSent && !hasUnisentPackages;
|
|
50882
|
+
React$1.useEffect(() => {
|
|
50883
|
+
if (screen === "success" && onSendForms) {
|
|
50884
|
+
onSendForms();
|
|
50885
|
+
}
|
|
50886
|
+
}, [screen]); // Only run when screen changes
|
|
50887
|
+
|
|
50907
50888
|
if (screen === "subitem") {
|
|
50908
50889
|
return /*#__PURE__*/React__default["default"].createElement(Card, {
|
|
50909
50890
|
width: width,
|
|
@@ -50924,8 +50905,9 @@ const ItemManagerPanel = _ref => {
|
|
|
50924
50905
|
return /*#__PURE__*/React__default["default"].createElement(ConfirmationDialog, {
|
|
50925
50906
|
width: width,
|
|
50926
50907
|
height: height,
|
|
50927
|
-
onCancel: () => setScreen(
|
|
50908
|
+
onCancel: () => setScreen("initial"),
|
|
50928
50909
|
onConfirm: () => setScreen("success"),
|
|
50910
|
+
linkColor: linkColor,
|
|
50929
50911
|
vendors: itemAndPackage.filter(item => item.packages !== null).map(item => {
|
|
50930
50912
|
return {
|
|
50931
50913
|
name: item.name,
|
|
@@ -50935,9 +50917,6 @@ const ItemManagerPanel = _ref => {
|
|
|
50935
50917
|
});
|
|
50936
50918
|
}
|
|
50937
50919
|
if (screen === "success") {
|
|
50938
|
-
if (onSendForms) {
|
|
50939
|
-
onSendForms();
|
|
50940
|
-
}
|
|
50941
50920
|
return /*#__PURE__*/React__default["default"].createElement(SuccessScreen, {
|
|
50942
50921
|
width: width,
|
|
50943
50922
|
height: height,
|
|
@@ -50966,7 +50945,7 @@ const ItemManagerPanel = _ref => {
|
|
|
50966
50945
|
height: height,
|
|
50967
50946
|
backgroundColor: backgroundColor
|
|
50968
50947
|
}, /*#__PURE__*/React__default["default"].createElement(NewItemList, {
|
|
50969
|
-
onBack:
|
|
50948
|
+
onBack: () => setScreen("initial"),
|
|
50970
50949
|
itemAndPackage: itemAndPackage,
|
|
50971
50950
|
onVendorClick: handleVendorClick
|
|
50972
50951
|
}));
|
|
@@ -50976,7 +50955,12 @@ const ItemManagerPanel = _ref => {
|
|
|
50976
50955
|
width: width,
|
|
50977
50956
|
height: height,
|
|
50978
50957
|
backgroundColor: backgroundColor
|
|
50979
|
-
}, /*#__PURE__*/React__default["default"].createElement(Container$1, null, /*#__PURE__*/React__default["default"].createElement(TitleContainer, null, /*#__PURE__*/React__default["default"].createElement(SectionTitle$1, null, "Vendors"), /*#__PURE__*/React__default["default"].createElement(SubtitleContainer, null, /*#__PURE__*/React__default["default"].createElement(Subtitle$1, null, itemAndPackage.filter(item => item.packages !== null).length.toString(), " ", "Vendors", " "), /*#__PURE__*/React__default["default"].createElement("span", null, "\xB7"), /*#__PURE__*/React__default["default"].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__default["default"].createElement(ButtonContainer$1, null, /*#__PURE__*/React__default["default"].createElement(
|
|
50958
|
+
}, /*#__PURE__*/React__default["default"].createElement(Container$1, null, /*#__PURE__*/React__default["default"].createElement(TitleContainer, null, /*#__PURE__*/React__default["default"].createElement(SectionTitle$1, null, "Vendors"), /*#__PURE__*/React__default["default"].createElement(SubtitleContainer, null, /*#__PURE__*/React__default["default"].createElement(Subtitle$1, null, itemAndPackage.filter(item => item.packages !== null).length.toString(), " ", "Vendors", " "), /*#__PURE__*/React__default["default"].createElement("span", null, "\xB7"), /*#__PURE__*/React__default["default"].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__default["default"].createElement(ButtonContainer$1, null, /*#__PURE__*/React__default["default"].createElement(CustomTooltip, {
|
|
50959
|
+
hideTooltip: !disabledSendForms,
|
|
50960
|
+
content: buttonTooltipText,
|
|
50961
|
+
topFactor: 2,
|
|
50962
|
+
direction: "bottom"
|
|
50963
|
+
}, /*#__PURE__*/React__default["default"].createElement(Button$1, {
|
|
50980
50964
|
leftIcon: "Fly",
|
|
50981
50965
|
onClick: () => setScreen("confirmation"),
|
|
50982
50966
|
rightIcon: "none",
|
|
@@ -50984,10 +50968,12 @@ const ItemManagerPanel = _ref => {
|
|
|
50984
50968
|
size: "small",
|
|
50985
50969
|
text: "Send Forms",
|
|
50986
50970
|
type: "secondary",
|
|
50987
|
-
borderRadius: "8px"
|
|
50988
|
-
|
|
50989
|
-
|
|
50990
|
-
}
|
|
50971
|
+
borderRadius: "8px",
|
|
50972
|
+
borderColor: linkColor,
|
|
50973
|
+
textColor: linkColor
|
|
50974
|
+
})), /*#__PURE__*/React__default["default"].createElement(Subtitle$1, {
|
|
50975
|
+
color: actuallyAllFormsSent ? "#90CE9C" : "#8b8989"
|
|
50976
|
+
}, actuallyAllFormsSent ? '✔ All Forms Sent' : itemAndPackage.filter(item => item.packages !== null).length > 0 ? `${itemAndPackage.filter(item => item.packages !== null).length.toString()} New Forms` : ''))), /*#__PURE__*/React__default["default"].createElement(AddButtonContainer$1, null, /*#__PURE__*/React__default["default"].createElement(LinkButton, {
|
|
50991
50977
|
leftIcon: "Plus",
|
|
50992
50978
|
onClick: () => setScreen("list"),
|
|
50993
50979
|
rightIcon: "none",
|
|
@@ -51119,7 +51105,7 @@ const DropdownButton = styled__default["default"].button`
|
|
|
51119
51105
|
justify-content: space-between;
|
|
51120
51106
|
${props => props.disabled && styled.css`
|
|
51121
51107
|
color:#8B8989;
|
|
51122
|
-
background-color: #D0D0D0;
|
|
51108
|
+
/* background-color: #D0D0D0; */
|
|
51123
51109
|
cursor: not-allowed;
|
|
51124
51110
|
`}
|
|
51125
51111
|
`;
|