sag_components 2.0.0-beta144 → 2.0.0-beta146
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 +11 -6
- package/dist/index.esm.js +371 -495
- package/dist/index.esm.js.map +1 -1
- package/dist/index.js +371 -495
- package/dist/index.js.map +1 -1
- package/dist/types/components/ItemManagerPanel/ItemManagerPanel.d.ts +2 -1
- package/dist/types/components/ItemManagerPanel/SuccessScreen/SuccessScreen.d.ts +2 -1
- package/dist/types/components/MessageBox/MessageBox.d.ts +9 -5
- package/dist/types/components/MessageBox/MessageBox.stories.d.ts +67 -15
- package/dist/types/components/MessageBox/MessageBox.styles.d.ts +2 -4
- package/dist/types/components/Table/Table.stories.d.ts +78 -66
- package/dist/types/components/Table/TableBody.d.ts +9 -2
- package/dist/types/components/Table/TableBody.styles.d.ts +6 -0
- package/dist/types/components/Table/data.d.ts +3 -16
- package/package.json +3 -2
- package/dist/types/components/Table/CommentModal.d.ts +0 -2
- package/dist/types/components/Table/CommentModal.styles.d.ts +0 -11
package/dist/index.js
CHANGED
|
@@ -33,6 +33,7 @@ const ButtonContainer$3 = styled__default["default"].div`
|
|
|
33
33
|
align-content: center;
|
|
34
34
|
width: ${props => props.width};
|
|
35
35
|
height: ${props => props.height};
|
|
36
|
+
min-width: ${props => props.minWidth};
|
|
36
37
|
`;
|
|
37
38
|
const ButtonItem = styled__default["default"].div`
|
|
38
39
|
display: flex;
|
|
@@ -72,7 +73,7 @@ const Label$b = styled__default["default"].label`
|
|
|
72
73
|
pointer-events: none;
|
|
73
74
|
user-select: none;
|
|
74
75
|
`;
|
|
75
|
-
const IconWrapper$
|
|
76
|
+
const IconWrapper$5 = styled__default["default"].div`
|
|
76
77
|
display: flex;
|
|
77
78
|
align-items: center;
|
|
78
79
|
justify-content: center;
|
|
@@ -498,6 +499,7 @@ const Button$1 = props => {
|
|
|
498
499
|
size = "small",
|
|
499
500
|
height = "",
|
|
500
501
|
width = "",
|
|
502
|
+
minWidth = "unset",
|
|
501
503
|
disabled = false,
|
|
502
504
|
textColor = "",
|
|
503
505
|
backgroundColor = "",
|
|
@@ -546,7 +548,7 @@ const Button$1 = props => {
|
|
|
546
548
|
color: disabled ? disabledTextColor || "#B1B1B1" : hover ? hoverTextColor || (type === "secondary" ? "#229E38" : "#ffffff") : textColor || (type === "secondary" ? "#212121" : "#ffffff"),
|
|
547
549
|
fill: disabled ? disabledTextColor || "#B1B1B1" : hover ? hoverTextColor || (type === "secondary" ? "#229E38" : "#ffffff") : textColor || (type === "secondary" ? "#212121" : "#ffffff")
|
|
548
550
|
};
|
|
549
|
-
return /*#__PURE__*/React__default["default"].createElement(IconWrapper$
|
|
551
|
+
return /*#__PURE__*/React__default["default"].createElement(IconWrapper$5, null, /*#__PURE__*/React__default["default"].createElement(IconComponent, iconProps));
|
|
550
552
|
};
|
|
551
553
|
const commonProps = {
|
|
552
554
|
width: width || null,
|
|
@@ -567,7 +569,8 @@ const Button$1 = props => {
|
|
|
567
569
|
return /*#__PURE__*/React__default["default"].createElement(ButtonContainer$3, {
|
|
568
570
|
className: "ButtonContainer",
|
|
569
571
|
width: commonProps.width,
|
|
570
|
-
height: commonProps.height
|
|
572
|
+
height: commonProps.height,
|
|
573
|
+
minWidth: minWidth
|
|
571
574
|
}, isSubmitButton ? /*#__PURE__*/React__default["default"].createElement(InputCommit, _extends$1({
|
|
572
575
|
className: clicked ? "InputCommit-clicked" : "InputCommit",
|
|
573
576
|
value: text,
|
|
@@ -3024,7 +3027,7 @@ const Label$a = styled__default["default"].label`
|
|
|
3024
3027
|
user-select: none;
|
|
3025
3028
|
pointer-events: none;
|
|
3026
3029
|
`;
|
|
3027
|
-
const IconWrapper$
|
|
3030
|
+
const IconWrapper$4 = styled__default["default"].div`
|
|
3028
3031
|
display: flex;
|
|
3029
3032
|
align-items: center;
|
|
3030
3033
|
justify-content: center;
|
|
@@ -3148,7 +3151,7 @@ const LinkButton = _ref => {
|
|
|
3148
3151
|
const color = disabled ? '#B1B1B1' : newTextColor;
|
|
3149
3152
|
switch (icon.toLowerCase()) {
|
|
3150
3153
|
case 'filter':
|
|
3151
|
-
return /*#__PURE__*/React__default["default"].createElement(IconWrapper$
|
|
3154
|
+
return /*#__PURE__*/React__default["default"].createElement(IconWrapper$4, {
|
|
3152
3155
|
className: "FilterIcon"
|
|
3153
3156
|
}, /*#__PURE__*/React__default["default"].createElement(FilterIcon$1, {
|
|
3154
3157
|
height: iconHeight,
|
|
@@ -3156,7 +3159,7 @@ const LinkButton = _ref => {
|
|
|
3156
3159
|
color: color
|
|
3157
3160
|
}));
|
|
3158
3161
|
case 'plus':
|
|
3159
|
-
return /*#__PURE__*/React__default["default"].createElement(IconWrapper$
|
|
3162
|
+
return /*#__PURE__*/React__default["default"].createElement(IconWrapper$4, {
|
|
3160
3163
|
className: "PlusIcon"
|
|
3161
3164
|
}, /*#__PURE__*/React__default["default"].createElement(PlusIcon, {
|
|
3162
3165
|
height: "16",
|
|
@@ -3164,7 +3167,7 @@ const LinkButton = _ref => {
|
|
|
3164
3167
|
color: color
|
|
3165
3168
|
}));
|
|
3166
3169
|
case 'options':
|
|
3167
|
-
return /*#__PURE__*/React__default["default"].createElement(IconWrapper$
|
|
3170
|
+
return /*#__PURE__*/React__default["default"].createElement(IconWrapper$4, {
|
|
3168
3171
|
className: "OptionsIcon"
|
|
3169
3172
|
}, /*#__PURE__*/React__default["default"].createElement(OptionsIcon, {
|
|
3170
3173
|
height: iconHeight,
|
|
@@ -3172,7 +3175,7 @@ const LinkButton = _ref => {
|
|
|
3172
3175
|
color: color
|
|
3173
3176
|
}));
|
|
3174
3177
|
case 'download':
|
|
3175
|
-
return /*#__PURE__*/React__default["default"].createElement(IconWrapper$
|
|
3178
|
+
return /*#__PURE__*/React__default["default"].createElement(IconWrapper$4, {
|
|
3176
3179
|
className: "DownloadIcon"
|
|
3177
3180
|
}, /*#__PURE__*/React__default["default"].createElement(DownloadIcon, {
|
|
3178
3181
|
height: iconHeight,
|
|
@@ -3180,7 +3183,7 @@ const LinkButton = _ref => {
|
|
|
3180
3183
|
color: color
|
|
3181
3184
|
}));
|
|
3182
3185
|
case 'document':
|
|
3183
|
-
return /*#__PURE__*/React__default["default"].createElement(IconWrapper$
|
|
3186
|
+
return /*#__PURE__*/React__default["default"].createElement(IconWrapper$4, {
|
|
3184
3187
|
className: "DocumentIcon"
|
|
3185
3188
|
}, /*#__PURE__*/React__default["default"].createElement(DocumentIcon, {
|
|
3186
3189
|
height: iconHeight,
|
|
@@ -3188,7 +3191,7 @@ const LinkButton = _ref => {
|
|
|
3188
3191
|
color: color
|
|
3189
3192
|
}));
|
|
3190
3193
|
case 'fly':
|
|
3191
|
-
return /*#__PURE__*/React__default["default"].createElement(IconWrapper$
|
|
3194
|
+
return /*#__PURE__*/React__default["default"].createElement(IconWrapper$4, {
|
|
3192
3195
|
className: "FlyIcon"
|
|
3193
3196
|
}, /*#__PURE__*/React__default["default"].createElement(FlyIcon, {
|
|
3194
3197
|
height: iconHeight,
|
|
@@ -3196,7 +3199,7 @@ const LinkButton = _ref => {
|
|
|
3196
3199
|
color: color
|
|
3197
3200
|
}));
|
|
3198
3201
|
case 'bell':
|
|
3199
|
-
return /*#__PURE__*/React__default["default"].createElement(IconWrapper$
|
|
3202
|
+
return /*#__PURE__*/React__default["default"].createElement(IconWrapper$4, {
|
|
3200
3203
|
className: "BellIcon"
|
|
3201
3204
|
}, /*#__PURE__*/React__default["default"].createElement(BellIcon, {
|
|
3202
3205
|
height: iconHeight,
|
|
@@ -3204,7 +3207,7 @@ const LinkButton = _ref => {
|
|
|
3204
3207
|
color: color
|
|
3205
3208
|
}));
|
|
3206
3209
|
case 'maintenance':
|
|
3207
|
-
return /*#__PURE__*/React__default["default"].createElement(IconWrapper$
|
|
3210
|
+
return /*#__PURE__*/React__default["default"].createElement(IconWrapper$4, {
|
|
3208
3211
|
className: "MaintenanceIcon"
|
|
3209
3212
|
}, /*#__PURE__*/React__default["default"].createElement(MaintenanceIcon, {
|
|
3210
3213
|
height: iconHeight,
|
|
@@ -3212,7 +3215,7 @@ const LinkButton = _ref => {
|
|
|
3212
3215
|
color: color
|
|
3213
3216
|
}));
|
|
3214
3217
|
case 'exit':
|
|
3215
|
-
return /*#__PURE__*/React__default["default"].createElement(IconWrapper$
|
|
3218
|
+
return /*#__PURE__*/React__default["default"].createElement(IconWrapper$4, {
|
|
3216
3219
|
className: "ExitIcon"
|
|
3217
3220
|
}, /*#__PURE__*/React__default["default"].createElement(ExitIcon, {
|
|
3218
3221
|
height: iconHeight,
|
|
@@ -3220,7 +3223,7 @@ const LinkButton = _ref => {
|
|
|
3220
3223
|
color: color
|
|
3221
3224
|
}));
|
|
3222
3225
|
case 'eye':
|
|
3223
|
-
return /*#__PURE__*/React__default["default"].createElement(IconWrapper$
|
|
3226
|
+
return /*#__PURE__*/React__default["default"].createElement(IconWrapper$4, {
|
|
3224
3227
|
className: "EyeIcon"
|
|
3225
3228
|
}, /*#__PURE__*/React__default["default"].createElement(EyeIcon, {
|
|
3226
3229
|
height: iconHeight,
|
|
@@ -3228,7 +3231,7 @@ const LinkButton = _ref => {
|
|
|
3228
3231
|
color: color
|
|
3229
3232
|
}));
|
|
3230
3233
|
case 'arrowdown':
|
|
3231
|
-
return /*#__PURE__*/React__default["default"].createElement(IconWrapper$
|
|
3234
|
+
return /*#__PURE__*/React__default["default"].createElement(IconWrapper$4, {
|
|
3232
3235
|
className: "ArrowDownIcon"
|
|
3233
3236
|
}, /*#__PURE__*/React__default["default"].createElement(MenuItemOpenIcon, {
|
|
3234
3237
|
height: iconHeight,
|
|
@@ -3236,7 +3239,7 @@ const LinkButton = _ref => {
|
|
|
3236
3239
|
color: color
|
|
3237
3240
|
}));
|
|
3238
3241
|
case 'arrowright':
|
|
3239
|
-
return /*#__PURE__*/React__default["default"].createElement(IconWrapper$
|
|
3242
|
+
return /*#__PURE__*/React__default["default"].createElement(IconWrapper$4, {
|
|
3240
3243
|
className: "ArrowRightIcon"
|
|
3241
3244
|
}, /*#__PURE__*/React__default["default"].createElement(MenuItemRightIcon, {
|
|
3242
3245
|
height: iconHeight,
|
|
@@ -3244,7 +3247,7 @@ const LinkButton = _ref => {
|
|
|
3244
3247
|
color: color
|
|
3245
3248
|
}));
|
|
3246
3249
|
case 'select':
|
|
3247
|
-
return /*#__PURE__*/React__default["default"].createElement(IconWrapper$
|
|
3250
|
+
return /*#__PURE__*/React__default["default"].createElement(IconWrapper$4, {
|
|
3248
3251
|
className: "SelectRightIcon"
|
|
3249
3252
|
}, /*#__PURE__*/React__default["default"].createElement(ArrowSelectIcon, {
|
|
3250
3253
|
height: "16px",
|
|
@@ -3252,7 +3255,7 @@ const LinkButton = _ref => {
|
|
|
3252
3255
|
color: color
|
|
3253
3256
|
}));
|
|
3254
3257
|
case 'info':
|
|
3255
|
-
return /*#__PURE__*/React__default["default"].createElement(IconWrapper$
|
|
3258
|
+
return /*#__PURE__*/React__default["default"].createElement(IconWrapper$4, {
|
|
3256
3259
|
className: "InfoIcon"
|
|
3257
3260
|
}, /*#__PURE__*/React__default["default"].createElement(InfoIcon, {
|
|
3258
3261
|
height: iconHeight,
|
|
@@ -3542,7 +3545,7 @@ const TextFieldContainer = styled__default["default"].div`
|
|
|
3542
3545
|
position: relative;
|
|
3543
3546
|
width: ${props => props.width};
|
|
3544
3547
|
`;
|
|
3545
|
-
const IconWrapper$
|
|
3548
|
+
const IconWrapper$3 = styled__default["default"].div`
|
|
3546
3549
|
position: absolute;
|
|
3547
3550
|
top: 50%;
|
|
3548
3551
|
transform: translateY(-50%);
|
|
@@ -3586,7 +3589,7 @@ const SearchInput = props => {
|
|
|
3586
3589
|
return /*#__PURE__*/React__default["default"].createElement(TextFieldContainer, {
|
|
3587
3590
|
className: className,
|
|
3588
3591
|
width: width
|
|
3589
|
-
}, /*#__PURE__*/React__default["default"].createElement(IconWrapper$
|
|
3592
|
+
}, /*#__PURE__*/React__default["default"].createElement(IconWrapper$3, {
|
|
3590
3593
|
position: position
|
|
3591
3594
|
}, /*#__PURE__*/React__default["default"].createElement(SearchIcon, {
|
|
3592
3595
|
color: iconColor
|
|
@@ -10327,23 +10330,24 @@ const QuarterPopupPicker = ({
|
|
|
10327
10330
|
};
|
|
10328
10331
|
|
|
10329
10332
|
/* eslint-disable import/no-extraneous-dependencies */
|
|
10330
|
-
const QuarterPicker =
|
|
10331
|
-
|
|
10332
|
-
|
|
10333
|
-
|
|
10334
|
-
|
|
10335
|
-
|
|
10336
|
-
|
|
10337
|
-
|
|
10338
|
-
|
|
10339
|
-
|
|
10340
|
-
|
|
10341
|
-
|
|
10342
|
-
|
|
10343
|
-
|
|
10344
|
-
|
|
10345
|
-
|
|
10346
|
-
|
|
10333
|
+
const QuarterPicker = _ref => {
|
|
10334
|
+
let {
|
|
10335
|
+
availableQuarters,
|
|
10336
|
+
// ["Q1-2024"]
|
|
10337
|
+
label,
|
|
10338
|
+
onChange,
|
|
10339
|
+
borderRadius,
|
|
10340
|
+
required,
|
|
10341
|
+
width,
|
|
10342
|
+
height,
|
|
10343
|
+
placeholder,
|
|
10344
|
+
disabled,
|
|
10345
|
+
borderColor,
|
|
10346
|
+
borderColorFocus,
|
|
10347
|
+
textColor,
|
|
10348
|
+
selectedValue,
|
|
10349
|
+
startYear
|
|
10350
|
+
} = _ref;
|
|
10347
10351
|
const [isFocused, setIsFocused] = React$1.useState(false);
|
|
10348
10352
|
const [isOpen, setIsOpen] = React$1.useState(false);
|
|
10349
10353
|
const [value, setValue] = React$1.useState('');
|
|
@@ -10785,22 +10789,23 @@ const MonthPopupPicker = ({
|
|
|
10785
10789
|
};
|
|
10786
10790
|
|
|
10787
10791
|
/* eslint-disable import/no-extraneous-dependencies */
|
|
10788
|
-
const MonthPicker =
|
|
10789
|
-
|
|
10790
|
-
|
|
10791
|
-
|
|
10792
|
-
|
|
10793
|
-
|
|
10794
|
-
|
|
10795
|
-
|
|
10796
|
-
|
|
10797
|
-
|
|
10798
|
-
|
|
10799
|
-
|
|
10800
|
-
|
|
10801
|
-
|
|
10802
|
-
|
|
10803
|
-
|
|
10792
|
+
const MonthPicker = _ref => {
|
|
10793
|
+
let {
|
|
10794
|
+
availableMonths,
|
|
10795
|
+
label,
|
|
10796
|
+
onChange,
|
|
10797
|
+
borderRadius,
|
|
10798
|
+
required,
|
|
10799
|
+
width,
|
|
10800
|
+
height,
|
|
10801
|
+
placeholder,
|
|
10802
|
+
disabled,
|
|
10803
|
+
borderColor,
|
|
10804
|
+
borderColorFocus,
|
|
10805
|
+
textColor,
|
|
10806
|
+
selectedValue,
|
|
10807
|
+
startYear
|
|
10808
|
+
} = _ref;
|
|
10804
10809
|
const [isFocused, setIsFocused] = React$1.useState(false);
|
|
10805
10810
|
const [isOpen, setIsOpen] = React$1.useState(false);
|
|
10806
10811
|
const [value, setValue] = React$1.useState('');
|
|
@@ -13084,11 +13089,11 @@ const ModalHeader$2 = styled__default["default"].div`
|
|
|
13084
13089
|
justify-content: space-between;
|
|
13085
13090
|
margin-bottom: 32px;
|
|
13086
13091
|
`;
|
|
13087
|
-
const ModalBody$
|
|
13092
|
+
const ModalBody$1 = styled__default["default"].div`
|
|
13088
13093
|
${scrollableStyles$a}
|
|
13089
13094
|
max-height: 80vh;
|
|
13090
13095
|
`;
|
|
13091
|
-
const ModalTitle$
|
|
13096
|
+
const ModalTitle$2 = styled__default["default"].h5`
|
|
13092
13097
|
font-family: 'Poppins', sans-serif;
|
|
13093
13098
|
font-size: 32px;
|
|
13094
13099
|
font-weight: 500;
|
|
@@ -13120,12 +13125,12 @@ const DialogOverlay$1 = props => {
|
|
|
13120
13125
|
};
|
|
13121
13126
|
return /*#__PURE__*/React.createElement(ModalWrapper$1, {
|
|
13122
13127
|
className: className
|
|
13123
|
-
}, /*#__PURE__*/React.createElement(Modal$1, null, /*#__PURE__*/React.createElement(ModalHeader$2, null, /*#__PURE__*/React.createElement(ModalTitle$
|
|
13128
|
+
}, /*#__PURE__*/React.createElement(Modal$1, null, /*#__PURE__*/React.createElement(ModalHeader$2, null, /*#__PURE__*/React.createElement(ModalTitle$2, null, title), /*#__PURE__*/React.createElement(ModalClose, {
|
|
13124
13129
|
type: "button",
|
|
13125
13130
|
onClick: closeModal
|
|
13126
13131
|
}, /*#__PURE__*/React.createElement(CloseXIcon, {
|
|
13127
13132
|
fill: "white"
|
|
13128
|
-
}))), /*#__PURE__*/React.createElement(ModalBody$
|
|
13133
|
+
}))), /*#__PURE__*/React.createElement(ModalBody$1, {
|
|
13129
13134
|
id: "modalBody"
|
|
13130
13135
|
}, children)));
|
|
13131
13136
|
};
|
|
@@ -23911,21 +23916,22 @@ const DeleteIcon = styled__default["default"].div`
|
|
|
23911
23916
|
position: absolute;
|
|
23912
23917
|
`;
|
|
23913
23918
|
|
|
23914
|
-
const QuickFilterDropdownSingle =
|
|
23915
|
-
|
|
23916
|
-
|
|
23917
|
-
|
|
23918
|
-
|
|
23919
|
-
|
|
23920
|
-
|
|
23921
|
-
|
|
23922
|
-
|
|
23923
|
-
|
|
23924
|
-
|
|
23925
|
-
|
|
23926
|
-
|
|
23927
|
-
|
|
23928
|
-
|
|
23919
|
+
const QuickFilterDropdownSingle = _ref => {
|
|
23920
|
+
let {
|
|
23921
|
+
label,
|
|
23922
|
+
hoverColor,
|
|
23923
|
+
options,
|
|
23924
|
+
selectedValue,
|
|
23925
|
+
placeHolder,
|
|
23926
|
+
onChange,
|
|
23927
|
+
disabled,
|
|
23928
|
+
width,
|
|
23929
|
+
error,
|
|
23930
|
+
errorMessage,
|
|
23931
|
+
xIconShow,
|
|
23932
|
+
labelColor,
|
|
23933
|
+
showLabelOnTop
|
|
23934
|
+
} = _ref;
|
|
23929
23935
|
const [isFocused, setIsFocused] = React$1.useState(false);
|
|
23930
23936
|
const [showOptions, setShowOptions] = React$1.useState(false);
|
|
23931
23937
|
const [inputValue, setInputValue] = React$1.useState("");
|
|
@@ -24322,23 +24328,24 @@ const IconContainer$2 = styled__default["default"].div`
|
|
|
24322
24328
|
cursor: pointer;
|
|
24323
24329
|
`;
|
|
24324
24330
|
|
|
24325
|
-
const QuickFilterDropdownMultiSelection =
|
|
24326
|
-
|
|
24327
|
-
|
|
24328
|
-
|
|
24329
|
-
|
|
24330
|
-
|
|
24331
|
-
|
|
24332
|
-
|
|
24333
|
-
|
|
24334
|
-
|
|
24335
|
-
|
|
24336
|
-
|
|
24337
|
-
|
|
24338
|
-
|
|
24339
|
-
|
|
24340
|
-
|
|
24341
|
-
|
|
24331
|
+
const QuickFilterDropdownMultiSelection = _ref => {
|
|
24332
|
+
let {
|
|
24333
|
+
label,
|
|
24334
|
+
labelEmptyValue,
|
|
24335
|
+
options,
|
|
24336
|
+
selectedValue,
|
|
24337
|
+
placeHolder,
|
|
24338
|
+
onChange,
|
|
24339
|
+
required,
|
|
24340
|
+
disabled,
|
|
24341
|
+
width,
|
|
24342
|
+
error,
|
|
24343
|
+
errorMessage,
|
|
24344
|
+
labelColor,
|
|
24345
|
+
xIconShow,
|
|
24346
|
+
checkBoxColor,
|
|
24347
|
+
showLabelOnTop
|
|
24348
|
+
} = _ref;
|
|
24342
24349
|
const [isFocused, setIsFocused] = React$1.useState(false);
|
|
24343
24350
|
const [showOptions, setShowOptions] = React$1.useState(false);
|
|
24344
24351
|
const [inputValue, setInputValue] = React$1.useState('');
|
|
@@ -27215,7 +27222,7 @@ const scrollableStyles$6 = `
|
|
|
27215
27222
|
}
|
|
27216
27223
|
`;
|
|
27217
27224
|
const MainContainer$1 = styled__default["default"].div``;
|
|
27218
|
-
const ModalOverlay$
|
|
27225
|
+
const ModalOverlay$1 = styled__default["default"].div`
|
|
27219
27226
|
position: fixed;
|
|
27220
27227
|
z-index: 100;
|
|
27221
27228
|
top: 0;
|
|
@@ -27457,7 +27464,7 @@ const PopupCharts = props => {
|
|
|
27457
27464
|
}, displayChart(item)));
|
|
27458
27465
|
return /*#__PURE__*/React__default["default"].createElement(MainContainer$1, {
|
|
27459
27466
|
id: "MainContainer"
|
|
27460
|
-
}, IsPopupChartsOpen && /*#__PURE__*/React__default["default"].createElement(ModalOverlay$
|
|
27467
|
+
}, IsPopupChartsOpen && /*#__PURE__*/React__default["default"].createElement(ModalOverlay$1, {
|
|
27461
27468
|
id: "ModalOverlay",
|
|
27462
27469
|
className: "modal-overlay"
|
|
27463
27470
|
}, /*#__PURE__*/React__default["default"].createElement(ModalContent$2, {
|
|
@@ -33839,7 +33846,7 @@ const Header$3 = styled__default["default"].div`
|
|
|
33839
33846
|
align-items: flex-start;
|
|
33840
33847
|
}
|
|
33841
33848
|
`;
|
|
33842
|
-
const CloseButton$
|
|
33849
|
+
const CloseButton$1 = styled__default["default"].button`
|
|
33843
33850
|
position: absolute;
|
|
33844
33851
|
top: -10px;
|
|
33845
33852
|
right: 0px;
|
|
@@ -34040,7 +34047,7 @@ const InsightsCarousel = _ref => {
|
|
|
34040
34047
|
$titleColor: titleColor
|
|
34041
34048
|
}, /*#__PURE__*/React__default["default"].cloneElement(icon, {
|
|
34042
34049
|
fill: iconColor
|
|
34043
|
-
}), title), /*#__PURE__*/React__default["default"].createElement(CloseButton$
|
|
34050
|
+
}), title), /*#__PURE__*/React__default["default"].createElement(CloseButton$1, {
|
|
34044
34051
|
onClick: () => onClose?.({
|
|
34045
34052
|
label: "closeCarousel"
|
|
34046
34053
|
}),
|
|
@@ -34365,12 +34372,12 @@ const ModalButtons = styled__default["default"].div`
|
|
|
34365
34372
|
display: flex;
|
|
34366
34373
|
gap: 10px;
|
|
34367
34374
|
`;
|
|
34368
|
-
const ModalTitle$
|
|
34375
|
+
const ModalTitle$1 = styled__default["default"].h3`
|
|
34369
34376
|
margin: 0;
|
|
34370
34377
|
font-size: 24px;
|
|
34371
34378
|
font-weight: 500;
|
|
34372
34379
|
`;
|
|
34373
|
-
const ModalBody
|
|
34380
|
+
const ModalBody = styled__default["default"].div`
|
|
34374
34381
|
width: 100%;
|
|
34375
34382
|
height: 100%;
|
|
34376
34383
|
`;
|
|
@@ -34423,7 +34430,7 @@ const ModalWithOverlay = props => {
|
|
|
34423
34430
|
}
|
|
34424
34431
|
}, /*#__PURE__*/React__default["default"].createElement(ModalHeader$1, {
|
|
34425
34432
|
className: "modal-header"
|
|
34426
|
-
}, /*#__PURE__*/React__default["default"].createElement(ModalTitle$
|
|
34433
|
+
}, /*#__PURE__*/React__default["default"].createElement(ModalTitle$1, null, title), /*#__PURE__*/React__default["default"].createElement(ModalButtons, {
|
|
34427
34434
|
className: "modal-buttons"
|
|
34428
34435
|
}, showCancelButton && /*#__PURE__*/React__default["default"].createElement(Button$1, {
|
|
34429
34436
|
size: "medium",
|
|
@@ -34470,7 +34477,7 @@ const ModalWithOverlay = props => {
|
|
|
34470
34477
|
backgroundColor: okButtonColor,
|
|
34471
34478
|
hoverBorderColor: okButtonHoverBackgroundColor,
|
|
34472
34479
|
hoverBackgroundColor: okButtonHoverBackgroundColor
|
|
34473
|
-
})))), /*#__PURE__*/React__default["default"].createElement(ModalBody
|
|
34480
|
+
})))), /*#__PURE__*/React__default["default"].createElement(ModalBody, {
|
|
34474
34481
|
className: "modal-body"
|
|
34475
34482
|
}, children)));
|
|
34476
34483
|
};
|
|
@@ -35045,7 +35052,7 @@ function FaEyeSlash (props) {
|
|
|
35045
35052
|
return GenIcon({"tag":"svg","attr":{"viewBox":"0 0 640 512"},"child":[{"tag":"path","attr":{"d":"M320 400c-75.85 0-137.25-58.71-142.9-133.11L72.2 185.82c-13.79 17.3-26.48 35.59-36.72 55.59a32.35 32.35 0 0 0 0 29.19C89.71 376.41 197.07 448 320 448c26.91 0 52.87-4 77.89-10.46L346 397.39a144.13 144.13 0 0 1-26 2.61zm313.82 58.1l-110.55-85.44a331.25 331.25 0 0 0 81.25-102.07 32.35 32.35 0 0 0 0-29.19C550.29 135.59 442.93 64 320 64a308.15 308.15 0 0 0-147.32 37.7L45.46 3.37A16 16 0 0 0 23 6.18L3.37 31.45A16 16 0 0 0 6.18 53.9l588.36 454.73a16 16 0 0 0 22.46-2.81l19.64-25.27a16 16 0 0 0-2.82-22.45zm-183.72-142l-39.3-30.38A94.75 94.75 0 0 0 416 256a94.76 94.76 0 0 0-121.31-92.21A47.65 47.65 0 0 1 304 192a46.64 46.64 0 0 1-1.54 10l-73.61-56.89A142.31 142.31 0 0 1 320 112a143.92 143.92 0 0 1 144 144c0 21.63-5.29 41.79-13.9 60.11z"},"child":[]}]})(props);
|
|
35046
35053
|
}
|
|
35047
35054
|
|
|
35048
|
-
const IconWrapper$
|
|
35055
|
+
const IconWrapper$2 = styled__default["default"].div`
|
|
35049
35056
|
display: flex;
|
|
35050
35057
|
align-items: center;
|
|
35051
35058
|
justify-content: center;
|
|
@@ -35061,7 +35068,7 @@ const getIcon = (icon, iconHeight, iconWidth, color, disabled, pointer, callBack
|
|
|
35061
35068
|
const newColor = disabled ? '#D0D0D0' : color || '#212121';
|
|
35062
35069
|
switch (icon.toLowerCase()) {
|
|
35063
35070
|
case 'filter':
|
|
35064
|
-
return /*#__PURE__*/React__default["default"].createElement(IconWrapper$
|
|
35071
|
+
return /*#__PURE__*/React__default["default"].createElement(IconWrapper$2, {
|
|
35065
35072
|
className: "FilterIcon",
|
|
35066
35073
|
pointer: pointer,
|
|
35067
35074
|
disabled: disabled,
|
|
@@ -35073,7 +35080,7 @@ const getIcon = (icon, iconHeight, iconWidth, color, disabled, pointer, callBack
|
|
|
35073
35080
|
onClick: callBackOnClick
|
|
35074
35081
|
}));
|
|
35075
35082
|
case 'options':
|
|
35076
|
-
return /*#__PURE__*/React__default["default"].createElement(IconWrapper$
|
|
35083
|
+
return /*#__PURE__*/React__default["default"].createElement(IconWrapper$2, {
|
|
35077
35084
|
className: "OptionsIcon",
|
|
35078
35085
|
pointer: pointer,
|
|
35079
35086
|
disabled: disabled,
|
|
@@ -35085,7 +35092,7 @@ const getIcon = (icon, iconHeight, iconWidth, color, disabled, pointer, callBack
|
|
|
35085
35092
|
onClick: callBackOnClick
|
|
35086
35093
|
}));
|
|
35087
35094
|
case 'download':
|
|
35088
|
-
return /*#__PURE__*/React__default["default"].createElement(IconWrapper$
|
|
35095
|
+
return /*#__PURE__*/React__default["default"].createElement(IconWrapper$2, {
|
|
35089
35096
|
className: "DownloadIcon",
|
|
35090
35097
|
pointer: pointer,
|
|
35091
35098
|
disabled: disabled,
|
|
@@ -35097,7 +35104,7 @@ const getIcon = (icon, iconHeight, iconWidth, color, disabled, pointer, callBack
|
|
|
35097
35104
|
onClick: callBackOnClick
|
|
35098
35105
|
}));
|
|
35099
35106
|
case 'document':
|
|
35100
|
-
return /*#__PURE__*/React__default["default"].createElement(IconWrapper$
|
|
35107
|
+
return /*#__PURE__*/React__default["default"].createElement(IconWrapper$2, {
|
|
35101
35108
|
className: "DocumentIcon",
|
|
35102
35109
|
pointer: pointer,
|
|
35103
35110
|
disabled: disabled,
|
|
@@ -35109,7 +35116,7 @@ const getIcon = (icon, iconHeight, iconWidth, color, disabled, pointer, callBack
|
|
|
35109
35116
|
onClick: callBackOnClick
|
|
35110
35117
|
}));
|
|
35111
35118
|
case 'fly':
|
|
35112
|
-
return /*#__PURE__*/React__default["default"].createElement(IconWrapper$
|
|
35119
|
+
return /*#__PURE__*/React__default["default"].createElement(IconWrapper$2, {
|
|
35113
35120
|
className: "FlyIcon",
|
|
35114
35121
|
pointer: pointer,
|
|
35115
35122
|
disabled: disabled,
|
|
@@ -35121,7 +35128,7 @@ const getIcon = (icon, iconHeight, iconWidth, color, disabled, pointer, callBack
|
|
|
35121
35128
|
onClick: callBackOnClick
|
|
35122
35129
|
}));
|
|
35123
35130
|
case 'bell':
|
|
35124
|
-
return /*#__PURE__*/React__default["default"].createElement(IconWrapper$
|
|
35131
|
+
return /*#__PURE__*/React__default["default"].createElement(IconWrapper$2, {
|
|
35125
35132
|
className: "BellIcon",
|
|
35126
35133
|
pointer: pointer,
|
|
35127
35134
|
disabled: disabled,
|
|
@@ -35133,7 +35140,7 @@ const getIcon = (icon, iconHeight, iconWidth, color, disabled, pointer, callBack
|
|
|
35133
35140
|
onClick: callBackOnClick
|
|
35134
35141
|
}));
|
|
35135
35142
|
case 'maintenance':
|
|
35136
|
-
return /*#__PURE__*/React__default["default"].createElement(IconWrapper$
|
|
35143
|
+
return /*#__PURE__*/React__default["default"].createElement(IconWrapper$2, {
|
|
35137
35144
|
className: "MaintenanceIcon",
|
|
35138
35145
|
pointer: pointer,
|
|
35139
35146
|
disabled: disabled,
|
|
@@ -35145,7 +35152,7 @@ const getIcon = (icon, iconHeight, iconWidth, color, disabled, pointer, callBack
|
|
|
35145
35152
|
onClick: callBackOnClick
|
|
35146
35153
|
}));
|
|
35147
35154
|
case 'exit':
|
|
35148
|
-
return /*#__PURE__*/React__default["default"].createElement(IconWrapper$
|
|
35155
|
+
return /*#__PURE__*/React__default["default"].createElement(IconWrapper$2, {
|
|
35149
35156
|
className: "ExitIcon",
|
|
35150
35157
|
pointer: pointer,
|
|
35151
35158
|
disabled: disabled,
|
|
@@ -35157,7 +35164,7 @@ const getIcon = (icon, iconHeight, iconWidth, color, disabled, pointer, callBack
|
|
|
35157
35164
|
onClick: callBackOnClick
|
|
35158
35165
|
}));
|
|
35159
35166
|
case 'eye':
|
|
35160
|
-
return /*#__PURE__*/React__default["default"].createElement(IconWrapper$
|
|
35167
|
+
return /*#__PURE__*/React__default["default"].createElement(IconWrapper$2, {
|
|
35161
35168
|
className: "EyeIcon",
|
|
35162
35169
|
pointer: pointer,
|
|
35163
35170
|
disabled: disabled,
|
|
@@ -35169,7 +35176,7 @@ const getIcon = (icon, iconHeight, iconWidth, color, disabled, pointer, callBack
|
|
|
35169
35176
|
onClick: callBackOnClick
|
|
35170
35177
|
}));
|
|
35171
35178
|
case 'search':
|
|
35172
|
-
return /*#__PURE__*/React__default["default"].createElement(IconWrapper$
|
|
35179
|
+
return /*#__PURE__*/React__default["default"].createElement(IconWrapper$2, {
|
|
35173
35180
|
className: "SearchIcon",
|
|
35174
35181
|
pointer: pointer,
|
|
35175
35182
|
disabled: disabled,
|
|
@@ -35294,7 +35301,7 @@ const ErrorMessage = styled__default["default"].div`
|
|
|
35294
35301
|
margin-top: 5px;
|
|
35295
35302
|
max-width: ${props => props.width || '300px'};
|
|
35296
35303
|
`;
|
|
35297
|
-
const IconWrapper$
|
|
35304
|
+
const IconWrapper$1 = styled__default["default"].div`
|
|
35298
35305
|
display: flex;
|
|
35299
35306
|
align-items: center;
|
|
35300
35307
|
justify-content: center;
|
|
@@ -35389,7 +35396,7 @@ const Input$2 = _ref => {
|
|
|
35389
35396
|
const getPasswordIcon = () => {
|
|
35390
35397
|
if (!password) return '';
|
|
35391
35398
|
if (showPassword) {
|
|
35392
|
-
return /*#__PURE__*/React__default["default"].createElement(IconWrapper$
|
|
35399
|
+
return /*#__PURE__*/React__default["default"].createElement(IconWrapper$1, {
|
|
35393
35400
|
className: "passwordEyeSlash",
|
|
35394
35401
|
disabled: disabled,
|
|
35395
35402
|
onClick: toggleShowPassword
|
|
@@ -35570,9 +35577,9 @@ const ToggleSlider = styled__default["default"].span`
|
|
|
35570
35577
|
}
|
|
35571
35578
|
`;
|
|
35572
35579
|
|
|
35573
|
-
/**
|
|
35574
|
-
* ToggleSwitch component for on/off states.
|
|
35575
|
-
* Supports small/large sizes and disabled state.
|
|
35580
|
+
/**
|
|
35581
|
+
* ToggleSwitch component for on/off states.
|
|
35582
|
+
* Supports small/large sizes and disabled state.
|
|
35576
35583
|
*/
|
|
35577
35584
|
function ToggleSwitch(_ref) {
|
|
35578
35585
|
let {
|
|
@@ -35606,7 +35613,7 @@ ToggleSwitch.propTypes = {
|
|
|
35606
35613
|
const TableWrapper$1 = styled__default["default"].div`
|
|
35607
35614
|
width: ${props => props.width};
|
|
35608
35615
|
height: ${props => props.height};
|
|
35609
|
-
padding:
|
|
35616
|
+
padding: ${props => props.padding};
|
|
35610
35617
|
background-color: #fff;
|
|
35611
35618
|
box-sizing: border-box;
|
|
35612
35619
|
position: relative;
|
|
@@ -35641,6 +35648,7 @@ const ContainerTable = props => {
|
|
|
35641
35648
|
columnsWidths = [430, 105, 210, 175, 148, 185, 104, 104, 140, 50, 50],
|
|
35642
35649
|
standardCellSkeletonHeight = 22,
|
|
35643
35650
|
isLoading = true,
|
|
35651
|
+
padding = '20px',
|
|
35644
35652
|
children
|
|
35645
35653
|
} = props;
|
|
35646
35654
|
const TableWrapperRef = React$1.useRef(null);
|
|
@@ -35673,7 +35681,8 @@ const ContainerTable = props => {
|
|
|
35673
35681
|
return /*#__PURE__*/React__default["default"].createElement(TableWrapper$1, {
|
|
35674
35682
|
ref: TableWrapperRef,
|
|
35675
35683
|
width: width,
|
|
35676
|
-
height: height
|
|
35684
|
+
height: height,
|
|
35685
|
+
padding: padding
|
|
35677
35686
|
}, isLoading ? /*#__PURE__*/React__default["default"].createElement(Skeleton.SkeletonTheme, {
|
|
35678
35687
|
baseColor: "#EAEAEA",
|
|
35679
35688
|
highlightColor: "#F5F5F5"
|
|
@@ -36288,7 +36297,7 @@ const scrollableStyles$1 = `
|
|
|
36288
36297
|
const TableWrapper = styled__default["default"].div`
|
|
36289
36298
|
width: ${props => props.width};
|
|
36290
36299
|
height: ${props => props.height};
|
|
36291
|
-
background-color:
|
|
36300
|
+
background-color: ${props => props.backgroundColor};
|
|
36292
36301
|
box-sizing: border-box;
|
|
36293
36302
|
font-family: 'Poppins', sans-serif;
|
|
36294
36303
|
`;
|
|
@@ -38313,84 +38322,20 @@ const DisabledTrashIconWrapper = styled__default["default"].div`
|
|
|
38313
38322
|
color: #d9d9d9;
|
|
38314
38323
|
}
|
|
38315
38324
|
`;
|
|
38316
|
-
|
|
38317
|
-
|
|
38318
|
-
|
|
38319
|
-
|
|
38320
|
-
|
|
38321
|
-
|
|
38322
|
-
|
|
38323
|
-
bottom: 0;
|
|
38324
|
-
background-color: rgba(0, 0, 0, 0.5);
|
|
38325
|
-
display: flex;
|
|
38326
|
-
align-items: center;
|
|
38327
|
-
justify-content: center;
|
|
38328
|
-
z-index: 1000;
|
|
38329
|
-
`;
|
|
38330
|
-
const ModalContent = styled__default["default"].div`
|
|
38331
|
-
background: white;
|
|
38332
|
-
border-radius: 12px;
|
|
38333
|
-
width: 90%;
|
|
38334
|
-
max-width: 500px;
|
|
38335
|
-
max-height: 400px;
|
|
38336
|
-
display: flex;
|
|
38337
|
-
flex-direction: column;
|
|
38338
|
-
box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
|
|
38339
|
-
animation: slideUp 0.3s ease-out;
|
|
38340
|
-
|
|
38341
|
-
@keyframes slideUp {
|
|
38342
|
-
from {
|
|
38343
|
-
opacity: 0;
|
|
38344
|
-
transform: translateY(20px) scale(0.95);
|
|
38345
|
-
}
|
|
38346
|
-
to {
|
|
38347
|
-
opacity: 1;
|
|
38348
|
-
transform: translateY(0) scale(1);
|
|
38349
|
-
}
|
|
38350
|
-
}
|
|
38351
|
-
`;
|
|
38352
|
-
const ModalHeader = styled__default["default"].div`
|
|
38353
|
-
display: flex;
|
|
38354
|
-
justify-content: space-between;
|
|
38355
|
-
align-items: center;
|
|
38356
|
-
padding: 12px 24px;
|
|
38357
|
-
border-bottom: 1px solid #D9D9D9;
|
|
38358
|
-
flex-shrink: 0;
|
|
38359
|
-
`;
|
|
38360
|
-
const ModalTitle$1 = styled__default["default"].h5`
|
|
38361
|
-
font-family: "Poppins", sans-serif;
|
|
38362
|
-
font-size: 18px;
|
|
38363
|
-
font-weight: 600;
|
|
38364
|
-
color: #212121;
|
|
38365
|
-
margin: 0;
|
|
38366
|
-
`;
|
|
38367
|
-
const CloseButton$1 = styled__default["default"].button`
|
|
38368
|
-
background: none;
|
|
38369
|
-
border: none;
|
|
38370
|
-
padding: 8px;
|
|
38371
|
-
cursor: pointer;
|
|
38372
|
-
color: #6b7280;
|
|
38373
|
-
border-radius: 6px;
|
|
38374
|
-
transition: all 0.2s ease;
|
|
38375
|
-
display: flex;
|
|
38376
|
-
align-items: center;
|
|
38377
|
-
justify-content: center;
|
|
38378
|
-
|
|
38379
|
-
&:hover {
|
|
38380
|
-
background-color: #f3f4f6;
|
|
38381
|
-
color: #374151;
|
|
38382
|
-
}
|
|
38383
|
-
|
|
38384
|
-
&:active {
|
|
38385
|
-
transform: scale(0.95);
|
|
38386
|
-
}
|
|
38325
|
+
const StatusCell = styled__default["default"].div`
|
|
38326
|
+
font-size: 12px;
|
|
38327
|
+
font-weight: 500;
|
|
38328
|
+
display: flex;
|
|
38329
|
+
align-items: center;
|
|
38330
|
+
gap: 6px;
|
|
38331
|
+
color: ${props => props.color || "#000"};
|
|
38387
38332
|
`;
|
|
38388
|
-
const
|
|
38389
|
-
|
|
38390
|
-
|
|
38391
|
-
|
|
38392
|
-
|
|
38393
|
-
|
|
38333
|
+
const StatusCellCircle = styled__default["default"].div`
|
|
38334
|
+
width: 8px;
|
|
38335
|
+
height: 8px;
|
|
38336
|
+
border-radius: 50%;
|
|
38337
|
+
border: 1px solid white;
|
|
38338
|
+
background-color: ${props => props.backgroundColor};
|
|
38394
38339
|
`;
|
|
38395
38340
|
const TextareaWrapper = styled__default["default"].div`
|
|
38396
38341
|
position: relative;
|
|
@@ -38475,121 +38420,141 @@ const CharacterCount = styled__default["default"].div`
|
|
|
38475
38420
|
text-align: right;
|
|
38476
38421
|
transition: color 0.2s ease;
|
|
38477
38422
|
`;
|
|
38478
|
-
|
|
38479
|
-
|
|
38480
|
-
|
|
38423
|
+
|
|
38424
|
+
// MessageBox.styles.js
|
|
38425
|
+
const ModalOverlay = styled__default["default"].div`
|
|
38426
|
+
position: fixed;
|
|
38427
|
+
top: 0;
|
|
38428
|
+
left: 0;
|
|
38429
|
+
width: 100%;
|
|
38430
|
+
height: 100%;
|
|
38431
|
+
background-color: rgba(0, 0, 0, 0.5);
|
|
38432
|
+
display: flex;
|
|
38433
|
+
justify-content: center;
|
|
38434
|
+
align-items: center;
|
|
38435
|
+
z-index: 1000;
|
|
38436
|
+
font-family: 'Poppins', sans-serif;
|
|
38437
|
+
`;
|
|
38438
|
+
const ModalContainer = styled__default["default"].div`
|
|
38439
|
+
background-color: white;
|
|
38440
|
+
border-radius: 12px;
|
|
38441
|
+
width: ${props => props.$width || '400px'};
|
|
38442
|
+
height: ${props => props.$height || 'auto'};
|
|
38443
|
+
position: relative;
|
|
38444
|
+
font-family: 'Poppins', sans-serif;
|
|
38445
|
+
box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
|
|
38446
|
+
`;
|
|
38447
|
+
const CloseButton = styled__default["default"].button`
|
|
38448
|
+
background: none;
|
|
38449
|
+
border: none;
|
|
38450
|
+
padding: 8px;
|
|
38451
|
+
cursor: pointer;
|
|
38452
|
+
color: #6b7280;
|
|
38453
|
+
border-radius: 6px;
|
|
38454
|
+
transition: all 0.2s ease;
|
|
38481
38455
|
display: flex;
|
|
38482
|
-
gap: 16px;
|
|
38483
|
-
justify-content: flex-end;
|
|
38484
38456
|
align-items: center;
|
|
38485
|
-
|
|
38457
|
+
justify-content: center;
|
|
38486
38458
|
|
|
38487
|
-
|
|
38488
|
-
|
|
38489
|
-
|
|
38490
|
-
|
|
38491
|
-
onSave,
|
|
38492
|
-
maxLength = 150,
|
|
38493
|
-
color = "#066768",
|
|
38494
|
-
saveButtonHoverColor = "#388586",
|
|
38495
|
-
initialValue = ''
|
|
38496
|
-
} = props;
|
|
38497
|
-
const [commentText, setCommentText] = React$1.useState('');
|
|
38498
|
-
const [isFocused, setIsFocused] = React$1.useState(false);
|
|
38499
|
-
const [hasUserInteracted, setHasUserInteracted] = React$1.useState(false); // Track if user has started typing
|
|
38500
|
-
const [hasInitialValue, setHasInitialValue] = React$1.useState(false); // Track if there was initial text
|
|
38459
|
+
&:hover {
|
|
38460
|
+
background-color: #f3f4f6;
|
|
38461
|
+
color: #374151;
|
|
38462
|
+
}
|
|
38501
38463
|
|
|
38502
|
-
|
|
38503
|
-
|
|
38504
|
-
|
|
38505
|
-
|
|
38506
|
-
|
|
38507
|
-
|
|
38508
|
-
|
|
38509
|
-
|
|
38510
|
-
|
|
38464
|
+
&:active {
|
|
38465
|
+
transform: scale(0.95);
|
|
38466
|
+
}
|
|
38467
|
+
`;
|
|
38468
|
+
const ModalHeader = styled__default["default"].div`
|
|
38469
|
+
display: flex;
|
|
38470
|
+
justify-content: space-between;
|
|
38471
|
+
align-items: center;
|
|
38472
|
+
padding: 12px 24px;
|
|
38473
|
+
flex-shrink: 0;
|
|
38474
|
+
`;
|
|
38475
|
+
const ModalTitle = styled__default["default"].h5`
|
|
38476
|
+
font-family: "Poppins", sans-serif;
|
|
38477
|
+
font-size: 18px;
|
|
38478
|
+
font-weight: 600;
|
|
38479
|
+
color: #212121;
|
|
38480
|
+
margin: 0;
|
|
38481
|
+
`;
|
|
38482
|
+
const ModalContent = styled__default["default"].div`
|
|
38483
|
+
padding: 24px;
|
|
38484
|
+
border-top: ${props => props.showBorders ? '1px solid #D9D9D9' : 'none'};
|
|
38485
|
+
border-bottom: ${props => props.showBorders ? '1px solid #D9D9D9' : 'none'};
|
|
38486
|
+
`;
|
|
38487
|
+
const ButtonContainer$1 = styled__default["default"].div`
|
|
38488
|
+
display: flex;
|
|
38489
|
+
gap: 16px;
|
|
38490
|
+
justify-content: flex-end;
|
|
38491
|
+
padding: 16px 24px;
|
|
38492
|
+
`;
|
|
38493
|
+
|
|
38494
|
+
// MessageBox.jsx
|
|
38495
|
+
const MessageBox = _ref => {
|
|
38496
|
+
let {
|
|
38497
|
+
isOpen = true,
|
|
38498
|
+
isDisabled = false,
|
|
38499
|
+
onClose = () => {},
|
|
38500
|
+
onConfirm = () => {},
|
|
38501
|
+
title = "Title",
|
|
38502
|
+
primaryText = "Confirm",
|
|
38503
|
+
secondaryText = "Cancel",
|
|
38504
|
+
width = "400px",
|
|
38505
|
+
height = "auto",
|
|
38506
|
+
color = "#F00021",
|
|
38507
|
+
hoverColor = "#ff7875",
|
|
38508
|
+
secondaryColor = "#ffffff",
|
|
38509
|
+
seperateSectionBorder = false,
|
|
38510
|
+
children
|
|
38511
|
+
} = _ref;
|
|
38511
38512
|
if (!isOpen) return null;
|
|
38512
|
-
const handleTextChange = e => {
|
|
38513
|
-
const text = e.target.value;
|
|
38514
|
-
if (text.length <= maxLength) {
|
|
38515
|
-
setCommentText(text);
|
|
38516
|
-
if (!hasUserInteracted) {
|
|
38517
|
-
setHasUserInteracted(true); // Mark that user has started interacting
|
|
38518
|
-
}
|
|
38519
|
-
}
|
|
38520
|
-
};
|
|
38521
38513
|
const handleOverlayClick = e => {
|
|
38522
38514
|
if (e.target === e.currentTarget) {
|
|
38523
38515
|
onClose();
|
|
38524
38516
|
}
|
|
38525
38517
|
};
|
|
38526
|
-
|
|
38527
|
-
if (onSave) {
|
|
38528
|
-
onSave(commentText);
|
|
38529
|
-
}
|
|
38530
|
-
// Don't clear the text here - let the parent handle closing
|
|
38531
|
-
};
|
|
38532
|
-
const handleClose = () => {
|
|
38533
|
-
setCommentText('');
|
|
38534
|
-
setHasUserInteracted(false);
|
|
38535
|
-
setHasInitialValue(false);
|
|
38536
|
-
onClose();
|
|
38537
|
-
};
|
|
38538
|
-
const handleFocus = () => {
|
|
38539
|
-
setIsFocused(true);
|
|
38540
|
-
};
|
|
38541
|
-
const handleBlur = () => {
|
|
38542
|
-
setIsFocused(false);
|
|
38543
|
-
};
|
|
38544
|
-
|
|
38545
|
-
// Determine if save button should be enabled
|
|
38546
|
-
const isSaveEnabled = hasUserInteracted && (commentText.length > 0 || hasInitialValue);
|
|
38547
|
-
return /*#__PURE__*/React__default["default"].createElement(ModalOverlay$1, {
|
|
38518
|
+
return /*#__PURE__*/React__default["default"].createElement(ModalOverlay, {
|
|
38548
38519
|
onClick: handleOverlayClick
|
|
38549
|
-
}, /*#__PURE__*/React__default["default"].createElement(
|
|
38550
|
-
|
|
38551
|
-
|
|
38552
|
-
|
|
38553
|
-
|
|
38554
|
-
|
|
38555
|
-
|
|
38556
|
-
}, /*#__PURE__*/React__default["default"].createElement("
|
|
38557
|
-
|
|
38558
|
-
stroke: "currentColor",
|
|
38559
|
-
strokeWidth: "2",
|
|
38560
|
-
strokeLinecap: "round",
|
|
38561
|
-
strokeLinejoin: "round"
|
|
38562
|
-
})))), /*#__PURE__*/React__default["default"].createElement(ModalBody, null, /*#__PURE__*/React__default["default"].createElement(TextareaWrapper, null, (commentText.length > 0 || isFocused) && /*#__PURE__*/React__default["default"].createElement(TextareaLabel, {
|
|
38563
|
-
color: color
|
|
38564
|
-
}, "Comment"), /*#__PURE__*/React__default["default"].createElement(CommentTextarea, {
|
|
38565
|
-
value: commentText,
|
|
38566
|
-
onChange: handleTextChange,
|
|
38567
|
-
placeholder: "Type a Comment...",
|
|
38568
|
-
maxLength: maxLength,
|
|
38569
|
-
color: color,
|
|
38570
|
-
$hasValue: commentText.length > 0,
|
|
38571
|
-
onBlur: handleBlur,
|
|
38572
|
-
onFocus: handleFocus
|
|
38573
|
-
}), /*#__PURE__*/React__default["default"].createElement(CharacterCount, null, commentText.length, "/", maxLength))), /*#__PURE__*/React__default["default"].createElement(ModalBottom, null, /*#__PURE__*/React__default["default"].createElement(Button$1, {
|
|
38574
|
-
text: "Cancel",
|
|
38575
|
-
type: "secondary",
|
|
38520
|
+
}, /*#__PURE__*/React__default["default"].createElement(ModalContainer, {
|
|
38521
|
+
$width: width,
|
|
38522
|
+
$height: height
|
|
38523
|
+
}, /*#__PURE__*/React__default["default"].createElement(ModalHeader, null, /*#__PURE__*/React__default["default"].createElement(ModalTitle, null, title), /*#__PURE__*/React__default["default"].createElement(CloseButton, {
|
|
38524
|
+
onClick: onClose
|
|
38525
|
+
}, /*#__PURE__*/React__default["default"].createElement(CloseXIcon, null))), /*#__PURE__*/React__default["default"].createElement(ModalContent, {
|
|
38526
|
+
showBorders: seperateSectionBorder
|
|
38527
|
+
}, children), /*#__PURE__*/React__default["default"].createElement(ButtonContainer$1, null, /*#__PURE__*/React__default["default"].createElement(Button$1, {
|
|
38528
|
+
text: secondaryText,
|
|
38576
38529
|
size: "medium",
|
|
38577
|
-
borderColor: "#
|
|
38578
|
-
hoverTextColor:
|
|
38579
|
-
hoverBackgroundColor:
|
|
38580
|
-
hoverBorderColor:
|
|
38581
|
-
|
|
38530
|
+
borderColor: "#B1B1B1",
|
|
38531
|
+
hoverTextColor: color,
|
|
38532
|
+
hoverBackgroundColor: secondaryColor,
|
|
38533
|
+
hoverBorderColor: color,
|
|
38534
|
+
textColor: "#212121",
|
|
38535
|
+
backgroundColor: "white",
|
|
38536
|
+
disabledTextColor: "",
|
|
38537
|
+
disabledBackgroundColor: "",
|
|
38538
|
+
disabledBorderColor: "",
|
|
38539
|
+
width: "auto",
|
|
38540
|
+
minWidth: "60px",
|
|
38541
|
+
onClick: onClose
|
|
38582
38542
|
}), /*#__PURE__*/React__default["default"].createElement(Button$1, {
|
|
38583
|
-
text:
|
|
38543
|
+
text: primaryText,
|
|
38584
38544
|
size: "medium",
|
|
38585
|
-
disabled: !isSaveEnabled,
|
|
38586
|
-
hoverTextColor: "#ffffff",
|
|
38587
|
-
disabledTextColor: "#ffffff",
|
|
38588
|
-
borderColor: color,
|
|
38589
38545
|
backgroundColor: color,
|
|
38590
|
-
|
|
38591
|
-
|
|
38592
|
-
|
|
38546
|
+
textColor: "white",
|
|
38547
|
+
borderColor: color,
|
|
38548
|
+
hoverTextColor: "white",
|
|
38549
|
+
hoverBackgroundColor: hoverColor,
|
|
38550
|
+
hoverBorderColor: hoverColor,
|
|
38551
|
+
disabled: isDisabled,
|
|
38552
|
+
disabledTextColor: "white",
|
|
38553
|
+
disabledBackgroundColor: "#E9E9E9",
|
|
38554
|
+
disabledBorderColor: "#E9E9E9",
|
|
38555
|
+
width: "auto",
|
|
38556
|
+
minWidth: "60px",
|
|
38557
|
+
onClick: onConfirm
|
|
38593
38558
|
}))));
|
|
38594
38559
|
};
|
|
38595
38560
|
|
|
@@ -38681,20 +38646,48 @@ const TableBody = ({
|
|
|
38681
38646
|
onRowClick,
|
|
38682
38647
|
onSendClick,
|
|
38683
38648
|
buttonColor,
|
|
38684
|
-
|
|
38649
|
+
buttonHoverColor,
|
|
38685
38650
|
selectedColor,
|
|
38651
|
+
onDeleteClick,
|
|
38686
38652
|
resetFocusIndex,
|
|
38687
38653
|
changeFocusIndex,
|
|
38688
38654
|
onFocusChange,
|
|
38689
38655
|
indexToShimmer = 0,
|
|
38656
|
+
statuses = [{
|
|
38657
|
+
status: 'Pending',
|
|
38658
|
+
palette: ['#F5C9A7', '#8B4513']
|
|
38659
|
+
}, {
|
|
38660
|
+
status: 'Received',
|
|
38661
|
+
palette: ['#B9D5D5', '#2F4F4F']
|
|
38662
|
+
}, {
|
|
38663
|
+
status: 'Approved',
|
|
38664
|
+
palette: ['#BEDDC3', '#2D5016']
|
|
38665
|
+
}, {
|
|
38666
|
+
status: 'Cancelled',
|
|
38667
|
+
palette: ['#EBA6AF', '#8B1538']
|
|
38668
|
+
}],
|
|
38690
38669
|
onCommentSave = () => {},
|
|
38670
|
+
commentTextLimit = 150,
|
|
38691
38671
|
ref = null
|
|
38692
38672
|
}) => {
|
|
38693
38673
|
const [hoveredRowIndex, setHoveredRowIndex] = React$1.useState(null);
|
|
38694
38674
|
const [focusedRowIndex, setFocusedRowIndex] = React$1.useState(null);
|
|
38695
38675
|
const [isCommentModalOpen, setIsCommentModalOpen] = React$1.useState(false);
|
|
38696
|
-
const [currentCommentRow, setCurrentCommentRow] = React$1.useState(null);
|
|
38676
|
+
const [currentCommentRow, setCurrentCommentRow] = React$1.useState(null);
|
|
38697
38677
|
|
|
38678
|
+
// TextArea logic states
|
|
38679
|
+
const [commentText, setCommentText] = React$1.useState('');
|
|
38680
|
+
const [isFocused, setIsFocused] = React$1.useState(false);
|
|
38681
|
+
const [hasUserInteracted, setHasUserInteracted] = React$1.useState(false);
|
|
38682
|
+
const [hasInitialValue, setHasInitialValue] = React$1.useState(false);
|
|
38683
|
+
React$1.useEffect(() => {
|
|
38684
|
+
if (isCommentModalOpen && currentCommentRow !== null) {
|
|
38685
|
+
const initialText = data[currentCommentRow]?.Comments || '';
|
|
38686
|
+
setCommentText(initialText);
|
|
38687
|
+
setHasInitialValue(Boolean(initialText.trim()));
|
|
38688
|
+
setHasUserInteracted(false);
|
|
38689
|
+
}
|
|
38690
|
+
}, [isCommentModalOpen, currentCommentRow, data]);
|
|
38698
38691
|
React$1.useEffect(() => {
|
|
38699
38692
|
if (resetFocusIndex) {
|
|
38700
38693
|
setFocusedRowIndex(null);
|
|
@@ -38714,21 +38707,43 @@ const TableBody = ({
|
|
|
38714
38707
|
}
|
|
38715
38708
|
};
|
|
38716
38709
|
|
|
38710
|
+
// TextArea handlers
|
|
38711
|
+
const handleTextChange = e => {
|
|
38712
|
+
const text = e.target.value;
|
|
38713
|
+
if (text.length <= commentTextLimit) {
|
|
38714
|
+
setCommentText(text);
|
|
38715
|
+
if (!hasUserInteracted) {
|
|
38716
|
+
setHasUserInteracted(true);
|
|
38717
|
+
}
|
|
38718
|
+
}
|
|
38719
|
+
};
|
|
38720
|
+
const handleFocus = () => {
|
|
38721
|
+
setIsFocused(true);
|
|
38722
|
+
};
|
|
38723
|
+
const handleBlur = () => {
|
|
38724
|
+
setIsFocused(false);
|
|
38725
|
+
};
|
|
38726
|
+
|
|
38717
38727
|
// Handle comment save
|
|
38718
|
-
const handleCommentSave =
|
|
38728
|
+
const handleCommentSave = () => {
|
|
38719
38729
|
if (currentCommentRow !== null) {
|
|
38720
38730
|
onCommentSave(currentCommentRow, commentText);
|
|
38721
38731
|
}
|
|
38722
|
-
|
|
38723
|
-
setIsCommentModalOpen(false);
|
|
38732
|
+
handleCommentModalClose();
|
|
38724
38733
|
};
|
|
38725
38734
|
|
|
38726
38735
|
// Handle comment modal close
|
|
38727
38736
|
const handleCommentModalClose = () => {
|
|
38737
|
+
setCommentText('');
|
|
38738
|
+
setHasUserInteracted(false);
|
|
38739
|
+
setHasInitialValue(false);
|
|
38728
38740
|
setCurrentCommentRow(null);
|
|
38729
38741
|
setIsCommentModalOpen(false);
|
|
38730
38742
|
};
|
|
38731
38743
|
|
|
38744
|
+
// Determine if save button should be enabled
|
|
38745
|
+
const isSaveEnabled = hasUserInteracted && (commentText.length > 0 || hasInitialValue);
|
|
38746
|
+
|
|
38732
38747
|
// Function to calculate tooltip height based on text length
|
|
38733
38748
|
const calculateTooltipOffset = (text, isRegularCell = false) => {
|
|
38734
38749
|
if (!text) return {
|
|
@@ -38864,12 +38879,20 @@ const TableBody = ({
|
|
|
38864
38879
|
}), /*#__PURE__*/React__default["default"].createElement("span", null, "All Sent"));
|
|
38865
38880
|
}
|
|
38866
38881
|
return value;
|
|
38882
|
+
case 'status':
|
|
38883
|
+
const statusObj = statuses.find(status => status.status === value) || {};
|
|
38884
|
+
const [palette0, palette1] = statusObj.palette;
|
|
38885
|
+
return /*#__PURE__*/React__default["default"].createElement(StatusCell, {
|
|
38886
|
+
color: palette1
|
|
38887
|
+
}, /*#__PURE__*/React__default["default"].createElement(StatusCellCircle, {
|
|
38888
|
+
backgroundColor: palette0
|
|
38889
|
+
}), /*#__PURE__*/React__default["default"].createElement("span", null, value));
|
|
38867
38890
|
case 'comments':
|
|
38868
|
-
const
|
|
38869
|
-
const hasComments =
|
|
38891
|
+
const commentTextValue = value || '';
|
|
38892
|
+
const hasComments = commentTextValue.trim().length > 0;
|
|
38870
38893
|
|
|
38871
38894
|
// Truncate tooltip text if longer than 150 characters
|
|
38872
|
-
const commentTooltipText =
|
|
38895
|
+
const commentTooltipText = commentTextValue.length > 150 ? commentTextValue.substring(0, 147) + '...' : commentTextValue;
|
|
38873
38896
|
return /*#__PURE__*/React__default["default"].createElement(CommentIconWrapper, {
|
|
38874
38897
|
$buttonColor: buttonColor,
|
|
38875
38898
|
ref: el => {
|
|
@@ -38905,7 +38928,7 @@ const TableBody = ({
|
|
|
38905
38928
|
}
|
|
38906
38929
|
}, /*#__PURE__*/React__default["default"].createElement(CommentIcon, {
|
|
38907
38930
|
showCircle: hasComments,
|
|
38908
|
-
circleColor:
|
|
38931
|
+
circleColor: buttonColor
|
|
38909
38932
|
}));
|
|
38910
38933
|
case 'trash':
|
|
38911
38934
|
// Only show trash icon when row is hovered
|
|
@@ -38952,7 +38975,7 @@ const TableBody = ({
|
|
|
38952
38975
|
el.style.setProperty('--tooltip-left', `${rect.left}px`);
|
|
38953
38976
|
el.style.setProperty('--tooltip-width', `${rect.width}px`);
|
|
38954
38977
|
el.style.setProperty('--tooltip-offset', `${offset}px`);
|
|
38955
|
-
el.style.setProperty('--tooltip-height', `${
|
|
38978
|
+
el.style.setProperty('--tooltip-height', `${offset}px`);
|
|
38956
38979
|
el.setAttribute('data-tooltip', trashTooltipText);
|
|
38957
38980
|
}
|
|
38958
38981
|
}
|
|
@@ -39004,12 +39027,31 @@ const TableBody = ({
|
|
|
39004
39027
|
$minWidth: column.minWidth,
|
|
39005
39028
|
$maxWidth: column.maxWidth
|
|
39006
39029
|
}, formattedValue);
|
|
39007
|
-
})))), /*#__PURE__*/React__default["default"].createElement(
|
|
39030
|
+
})))), /*#__PURE__*/React__default["default"].createElement(MessageBox, {
|
|
39031
|
+
title: "Add Comment",
|
|
39008
39032
|
isOpen: isCommentModalOpen,
|
|
39009
39033
|
onClose: handleCommentModalClose,
|
|
39010
|
-
|
|
39011
|
-
|
|
39012
|
-
|
|
39034
|
+
onConfirm: handleCommentSave,
|
|
39035
|
+
isDisabled: !isSaveEnabled,
|
|
39036
|
+
seperateSectionBorder: true,
|
|
39037
|
+
color: buttonColor,
|
|
39038
|
+
hoverColor: buttonHoverColor,
|
|
39039
|
+
secondaryColor: "#E6F0F0",
|
|
39040
|
+
primaryText: "Save",
|
|
39041
|
+
secondaryText: "Cancel",
|
|
39042
|
+
width: "550px"
|
|
39043
|
+
}, /*#__PURE__*/React__default["default"].createElement(TextareaWrapper, null, (commentText.length > 0 || isFocused) && /*#__PURE__*/React__default["default"].createElement(TextareaLabel, {
|
|
39044
|
+
color: buttonColor
|
|
39045
|
+
}, "Comment"), /*#__PURE__*/React__default["default"].createElement(CommentTextarea, {
|
|
39046
|
+
value: commentText,
|
|
39047
|
+
onChange: handleTextChange,
|
|
39048
|
+
placeholder: "Type a Comment...",
|
|
39049
|
+
maxLength: commentTextLimit,
|
|
39050
|
+
color: buttonColor,
|
|
39051
|
+
$hasValue: commentText.length > 0,
|
|
39052
|
+
onBlur: handleBlur,
|
|
39053
|
+
onFocus: handleFocus
|
|
39054
|
+
}), /*#__PURE__*/React__default["default"].createElement(CharacterCount, null, commentText.length, "/", commentTextLimit))));
|
|
39013
39055
|
};
|
|
39014
39056
|
TableBody.propTypes = {
|
|
39015
39057
|
columns: PropTypes.array.isRequired,
|
|
@@ -39022,6 +39064,7 @@ TableBody.propTypes = {
|
|
|
39022
39064
|
onFocusChange: PropTypes.func,
|
|
39023
39065
|
indexToShimmer: PropTypes.number,
|
|
39024
39066
|
onCommentSave: PropTypes.func,
|
|
39067
|
+
commentTextLimit: PropTypes.number,
|
|
39025
39068
|
ref: PropTypes.object
|
|
39026
39069
|
};
|
|
39027
39070
|
TableBody.displayName = 'TableBody';
|
|
@@ -42198,6 +42241,7 @@ const Table = props => {
|
|
|
42198
42241
|
width = '100%',
|
|
42199
42242
|
height = 'auto',
|
|
42200
42243
|
tableTitle = 'All Events',
|
|
42244
|
+
tableBackground = '#FFFFFF',
|
|
42201
42245
|
data = [],
|
|
42202
42246
|
counter = 0,
|
|
42203
42247
|
hideRowsCounter = false,
|
|
@@ -42314,7 +42358,8 @@ const Table = props => {
|
|
|
42314
42358
|
|
|
42315
42359
|
return /*#__PURE__*/React__default["default"].createElement(TableWrapper, {
|
|
42316
42360
|
width: width,
|
|
42317
|
-
height: height
|
|
42361
|
+
height: height,
|
|
42362
|
+
backgroundColor: tableBackground
|
|
42318
42363
|
}, /*#__PURE__*/React__default["default"].createElement(NoInfoFound, null, /*#__PURE__*/React__default["default"].createElement(TableTop, null, /*#__PURE__*/React__default["default"].createElement("div", null, /*#__PURE__*/React__default["default"].createElement(Title$7, null, tableTitle), !hideRowsCounter && /*#__PURE__*/React__default["default"].createElement(SubTitle, null, data.length === 0 ? 'No Events' : `${counter} Events`)), showSideButton && /*#__PURE__*/React__default["default"].createElement(Button$1, {
|
|
42319
42364
|
height: "45px",
|
|
42320
42365
|
leftIcon: "Plus",
|
|
@@ -42348,6 +42393,7 @@ const Table = props => {
|
|
|
42348
42393
|
onDeleteClick: onDeleteClick,
|
|
42349
42394
|
onCommentSave: handleCommentSave,
|
|
42350
42395
|
buttonColor: buttonColor,
|
|
42396
|
+
buttonHoverColor: buttonHoverColor,
|
|
42351
42397
|
resetFocusIndex: resetFocusIndex,
|
|
42352
42398
|
changeFocusIndex: changeFocusIndex,
|
|
42353
42399
|
onFocusChange: handleTableFocusChange
|
|
@@ -42500,7 +42546,7 @@ const LineContainer = styled__default["default"].div`
|
|
|
42500
42546
|
align-items: center;
|
|
42501
42547
|
width: 100%;
|
|
42502
42548
|
`;
|
|
42503
|
-
const ButtonContainer
|
|
42549
|
+
const ButtonContainer = styled__default["default"].div`
|
|
42504
42550
|
.ButtonContainer {
|
|
42505
42551
|
label {
|
|
42506
42552
|
white-space: nowrap;
|
|
@@ -43416,6 +43462,7 @@ const Tooltip = styled__default["default"].div`
|
|
|
43416
43462
|
z-index: 10;
|
|
43417
43463
|
white-space: nowrap;
|
|
43418
43464
|
transition: opacity 0.2s;
|
|
43465
|
+
max-height: 600px;
|
|
43419
43466
|
|
|
43420
43467
|
&::after {
|
|
43421
43468
|
content: '';
|
|
@@ -43433,7 +43480,6 @@ const ExpandButtonWrapper = styled__default["default"].div`
|
|
|
43433
43480
|
display: flex;
|
|
43434
43481
|
justify-content: center;
|
|
43435
43482
|
align-items: center;
|
|
43436
|
-
|
|
43437
43483
|
&:hover ${Tooltip},
|
|
43438
43484
|
&:focus-within ${Tooltip} {
|
|
43439
43485
|
visibility: visible;
|
|
@@ -51794,14 +51840,20 @@ var successAnimation = {
|
|
|
51794
51840
|
};
|
|
51795
51841
|
|
|
51796
51842
|
const SAMPLE_VENDORS = ["Colgate-Palmolive", "Unilever", "P&G", "Kellog’s", "Coca-Cola Company", "Pepsico", "Colgate-Palmolive", "Unilever", "P&G", "Kellog’s", "Coca-Cola Company", "Pepsico", "Colgate-Palmolive", "Unilever", "P&G", "Kellog’s", "Coca-Cola Company", "Pepsico"];
|
|
51797
|
-
const COLLAPSED_COUNT = 7;
|
|
51798
51843
|
const SuccessScreen = ({
|
|
51799
51844
|
width = "100%",
|
|
51800
51845
|
height = "100%",
|
|
51801
51846
|
packagesCount = 7,
|
|
51802
51847
|
vendorsCount = 3,
|
|
51803
|
-
vendors = SAMPLE_VENDORS
|
|
51848
|
+
vendors = SAMPLE_VENDORS,
|
|
51849
|
+
maxVisibleVendors = 12
|
|
51804
51850
|
}) => {
|
|
51851
|
+
const [visibleCount, setVisibleCount] = React$1.useState(() => Math.min(vendors.length, maxVisibleVendors));
|
|
51852
|
+
React$1.useEffect(() => {
|
|
51853
|
+
const count = Math.min(maxVisibleVendors, vendors.length);
|
|
51854
|
+
setVisibleCount(count);
|
|
51855
|
+
}, [vendors, maxVisibleVendors]);
|
|
51856
|
+
const hiddenVendors = vendors.slice(visibleCount);
|
|
51805
51857
|
return /*#__PURE__*/React__default["default"].createElement(SuccessScreenContainer, {
|
|
51806
51858
|
width: width,
|
|
51807
51859
|
height: height
|
|
@@ -51812,9 +51864,9 @@ const SuccessScreen = ({
|
|
|
51812
51864
|
},
|
|
51813
51865
|
animationData: successAnimation,
|
|
51814
51866
|
loop: false
|
|
51815
|
-
})), /*#__PURE__*/React__default["default"].createElement(SuccessHeader, null, /*#__PURE__*/React__default["default"].createElement(SuccessTitle, null, "Packages", /*#__PURE__*/React__default["default"].createElement("br", null), " Successfully Sent"), /*#__PURE__*/React__default["default"].createElement(SuccessSubtitle, null, /*#__PURE__*/React__default["default"].createElement("b", null, packagesCount), " packages have been sent to", " ", /*#__PURE__*/React__default["default"].createElement("b", null, vendorsCount), " vendors")), /*#__PURE__*/React__default["default"].createElement(DividerLine, null), /*#__PURE__*/React__default["default"].createElement(VendorListWrapper, null, /*#__PURE__*/React__default["default"].createElement(VendorList, null, vendors.slice(0,
|
|
51867
|
+
})), /*#__PURE__*/React__default["default"].createElement(SuccessHeader, null, /*#__PURE__*/React__default["default"].createElement(SuccessTitle, null, "Packages", /*#__PURE__*/React__default["default"].createElement("br", null), " Successfully Sent"), /*#__PURE__*/React__default["default"].createElement(SuccessSubtitle, null, /*#__PURE__*/React__default["default"].createElement("b", null, packagesCount), " packages have been sent to", " ", /*#__PURE__*/React__default["default"].createElement("b", null, vendorsCount), " vendors")), /*#__PURE__*/React__default["default"].createElement(DividerLine, null), /*#__PURE__*/React__default["default"].createElement(VendorListWrapper, null, /*#__PURE__*/React__default["default"].createElement(VendorList, null, vendors.slice(0, visibleCount).map((vendor, idx) => /*#__PURE__*/React__default["default"].createElement(VendorListItem, {
|
|
51816
51868
|
key: idx
|
|
51817
|
-
}, vendor))), /*#__PURE__*/React__default["default"].createElement(ExpandButtonWrapper, null, /*#__PURE__*/React__default["default"].createElement(ExpandButton, {
|
|
51869
|
+
}, vendor))), hiddenVendors.length > 0 && /*#__PURE__*/React__default["default"].createElement(ExpandButtonWrapper, null, /*#__PURE__*/React__default["default"].createElement(ExpandButton, {
|
|
51818
51870
|
tabIndex: 0
|
|
51819
51871
|
}, "\u2022\u2022\u2022"), /*#__PURE__*/React__default["default"].createElement(Tooltip, null, vendors.map((vendor, idx) => /*#__PURE__*/React__default["default"].createElement(React__default["default"].Fragment, {
|
|
51820
51872
|
key: idx
|
|
@@ -51834,7 +51886,8 @@ const ItemManagerPanel = _ref => {
|
|
|
51834
51886
|
setItemAndPackage,
|
|
51835
51887
|
linkColor = "#212121",
|
|
51836
51888
|
backgroundColor = 'white',
|
|
51837
|
-
buttonTooltipText = "Please fill out all forms before sending."
|
|
51889
|
+
buttonTooltipText = "Please fill out all forms before sending.",
|
|
51890
|
+
maxVisibleVendors = 12
|
|
51838
51891
|
} = _ref;
|
|
51839
51892
|
const [screen, setScreen] = React$1.useState("initial");
|
|
51840
51893
|
const [selectedVendor, setSelectedVendor] = React$1.useState(null);
|
|
@@ -51989,7 +52042,8 @@ const ItemManagerPanel = _ref => {
|
|
|
51989
52042
|
height: height,
|
|
51990
52043
|
packagesCount: itemAndPackage.filter(item => item.packages !== null).reduce((acc, item) => acc + (item.packages ? item.packages.length : 0), 0),
|
|
51991
52044
|
vendorsCount: itemAndPackage.filter(item => item.packages !== null).length.toString(),
|
|
51992
|
-
vendors: itemAndPackage.filter(item => item.packages !== null).map(item => item.name)
|
|
52045
|
+
vendors: itemAndPackage.filter(item => item.packages !== null).map(item => item.name),
|
|
52046
|
+
maxVisibleVendors: maxVisibleVendors
|
|
51993
52047
|
});
|
|
51994
52048
|
}
|
|
51995
52049
|
if (screen === "subitemdetail") {
|
|
@@ -52026,7 +52080,7 @@ const ItemManagerPanel = _ref => {
|
|
|
52026
52080
|
backgroundColor: backgroundColor
|
|
52027
52081
|
}, /*#__PURE__*/React__default["default"].createElement(VendorHeader$2, {
|
|
52028
52082
|
ref: headerRef
|
|
52029
|
-
}, /*#__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
|
|
52083
|
+
}, /*#__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, null, /*#__PURE__*/React__default["default"].createElement(CustomTooltip, {
|
|
52030
52084
|
hideTooltip: !disabledSendForms,
|
|
52031
52085
|
content: buttonTooltipText,
|
|
52032
52086
|
topFactor: 2,
|
|
@@ -52823,184 +52877,6 @@ const OverlayDropdown = _ref => {
|
|
|
52823
52877
|
}));
|
|
52824
52878
|
};
|
|
52825
52879
|
|
|
52826
|
-
// MessageBox.styles.js
|
|
52827
|
-
const ModalOverlay = styled__default["default"].div`
|
|
52828
|
-
position: fixed;
|
|
52829
|
-
top: 0;
|
|
52830
|
-
left: 0;
|
|
52831
|
-
width: 100%;
|
|
52832
|
-
height: 100%;
|
|
52833
|
-
background-color: rgba(0, 0, 0, 0.5);
|
|
52834
|
-
display: flex;
|
|
52835
|
-
justify-content: center;
|
|
52836
|
-
align-items: center;
|
|
52837
|
-
z-index: 1000;
|
|
52838
|
-
font-family: 'Poppins', sans-serif;
|
|
52839
|
-
`;
|
|
52840
|
-
const ModalContainer = styled__default["default"].div`
|
|
52841
|
-
background-color: white;
|
|
52842
|
-
border-radius: 12px;
|
|
52843
|
-
padding: 16px 24px 24px 24px;
|
|
52844
|
-
width: ${props => props.$width || '400px'};
|
|
52845
|
-
height: ${props => props.$height || 'auto'};
|
|
52846
|
-
max-width: 90vw;
|
|
52847
|
-
position: relative;
|
|
52848
|
-
font-family: 'Poppins', sans-serif;
|
|
52849
|
-
box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
|
|
52850
|
-
`;
|
|
52851
|
-
const CloseButton = styled__default["default"].button`
|
|
52852
|
-
position: absolute;
|
|
52853
|
-
top: 16px;
|
|
52854
|
-
right: 16px;
|
|
52855
|
-
background: none;
|
|
52856
|
-
border: none;
|
|
52857
|
-
font-size: 20px;
|
|
52858
|
-
color: #666;
|
|
52859
|
-
cursor: pointer;
|
|
52860
|
-
width: 24px;
|
|
52861
|
-
height: 24px;
|
|
52862
|
-
display: flex;
|
|
52863
|
-
align-items: center;
|
|
52864
|
-
justify-content: center;
|
|
52865
|
-
font-family: 'Poppins', sans-serif;
|
|
52866
|
-
|
|
52867
|
-
&:hover {
|
|
52868
|
-
color: #333;
|
|
52869
|
-
}
|
|
52870
|
-
`;
|
|
52871
|
-
const ModalTitle = styled__default["default"].h2`
|
|
52872
|
-
font-family: 'Poppins', sans-serif;
|
|
52873
|
-
font-size: 18px;
|
|
52874
|
-
font-weight: 700;
|
|
52875
|
-
color: #212121;
|
|
52876
|
-
margin: 0 0 16px 0;
|
|
52877
|
-
padding-right: 32px;
|
|
52878
|
-
`;
|
|
52879
|
-
const MessageContainer = styled__default["default"].div`
|
|
52880
|
-
display: flex;
|
|
52881
|
-
align-items: flex-start;
|
|
52882
|
-
gap: 12px;
|
|
52883
|
-
//margin-bottom: 5px;
|
|
52884
|
-
`;
|
|
52885
|
-
const IconWrapper$1 = styled__default["default"].div`
|
|
52886
|
-
margin-top: 1px;
|
|
52887
|
-
`;
|
|
52888
|
-
const MessageTitle = styled__default["default"].h3`
|
|
52889
|
-
font-family: 'Poppins', sans-serif;
|
|
52890
|
-
font-size: 16px;
|
|
52891
|
-
font-weight: 700;
|
|
52892
|
-
color: #212121;
|
|
52893
|
-
margin: 0 0 8px 0;
|
|
52894
|
-
`;
|
|
52895
|
-
const MessageMessage = styled__default["default"].p`
|
|
52896
|
-
font-family: 'Poppins', sans-serif;
|
|
52897
|
-
font-size: 16px;
|
|
52898
|
-
font-weight: 400;
|
|
52899
|
-
color: #212121;
|
|
52900
|
-
margin: 0;
|
|
52901
|
-
line-height: 1.5;
|
|
52902
|
-
`;
|
|
52903
|
-
const ButtonContainer = styled__default["default"].div`
|
|
52904
|
-
display: flex;
|
|
52905
|
-
gap: 12px;
|
|
52906
|
-
justify-content: flex-end;
|
|
52907
|
-
margin-top: 24px;
|
|
52908
|
-
`;
|
|
52909
|
-
|
|
52910
|
-
// eslint-disable-next-line react/prop-types
|
|
52911
|
-
const ExclamationMarkIcon = _ref => {
|
|
52912
|
-
let {
|
|
52913
|
-
color = '#FF3949',
|
|
52914
|
-
width = '16',
|
|
52915
|
-
height = '16'
|
|
52916
|
-
} = _ref;
|
|
52917
|
-
return /*#__PURE__*/React__default["default"].createElement("svg", {
|
|
52918
|
-
width: width,
|
|
52919
|
-
height: height,
|
|
52920
|
-
viewBox: "0 0 16 16",
|
|
52921
|
-
fill: "none",
|
|
52922
|
-
xmlns: "http://www.w3.org/2000/svg"
|
|
52923
|
-
}, /*#__PURE__*/React__default["default"].createElement("path", {
|
|
52924
|
-
d: "M8.01562 1.5C5.67188 1.5 3.54688 2.75 2.35938 4.75C1.20312 6.78125 1.20312 9.25 2.35938 11.25C3.54688 13.2812 5.67188 14.5 8.01562 14.5C10.3281 14.5 12.4531 13.2812 13.6406 11.25C14.7969 9.25 14.7969 6.78125 13.6406 4.75C12.4531 2.75 10.3281 1.5 8.01562 1.5ZM8.01562 16C5.14062 16 2.51562 14.5 1.07812 12C-0.359375 9.53125 -0.359375 6.5 1.07812 4C2.51562 1.53125 5.14062 0 8.01562 0C10.8594 0 13.4844 1.53125 14.9219 4C16.3594 6.5 16.3594 9.53125 14.9219 12C13.4844 14.5 10.8594 16 8.01562 16ZM8.01562 4C8.42188 4 8.76562 4.34375 8.76562 4.75V8.25C8.76562 8.6875 8.42188 9 8.01562 9C7.57812 9 7.26562 8.6875 7.26562 8.25V4.75C7.26562 4.34375 7.57812 4 8.01562 4ZM9.01562 11C9.01562 11.5625 8.54688 12 8.01562 12C7.45312 12 7.01562 11.5625 7.01562 11C7.01562 10.4688 7.45312 10 8.01562 10C8.54688 10 9.01562 10.4688 9.01562 11Z",
|
|
52925
|
-
fill: color
|
|
52926
|
-
}));
|
|
52927
|
-
};
|
|
52928
|
-
|
|
52929
|
-
// MessageBox.jsx
|
|
52930
|
-
const MessageBox = _ref => {
|
|
52931
|
-
let {
|
|
52932
|
-
isOpen = true,
|
|
52933
|
-
onClose = () => {},
|
|
52934
|
-
onConfirm = () => {},
|
|
52935
|
-
title = "Title",
|
|
52936
|
-
messageTitle = "",
|
|
52937
|
-
messageText = "",
|
|
52938
|
-
cancelText = "Cancel",
|
|
52939
|
-
confirmText = "Confirm",
|
|
52940
|
-
width = "400px",
|
|
52941
|
-
height = "auto"
|
|
52942
|
-
} = _ref;
|
|
52943
|
-
if (!isOpen) return null;
|
|
52944
|
-
const handleOverlayClick = e => {
|
|
52945
|
-
if (e.target === e.currentTarget) {
|
|
52946
|
-
onClose();
|
|
52947
|
-
}
|
|
52948
|
-
};
|
|
52949
|
-
|
|
52950
|
-
// Function to calculate button width based on text length
|
|
52951
|
-
const calculateButtonWidth = text => {
|
|
52952
|
-
// Approximate character width for Poppins 14px font
|
|
52953
|
-
const avgCharWidth = 8; // pixels per character
|
|
52954
|
-
const padding = 24; // left + right padding
|
|
52955
|
-
const minWidth = 60; // minimum button width
|
|
52956
|
-
|
|
52957
|
-
const calculatedWidth = text.length * avgCharWidth + padding;
|
|
52958
|
-
return Math.max(calculatedWidth, minWidth);
|
|
52959
|
-
};
|
|
52960
|
-
return /*#__PURE__*/React__default["default"].createElement(ModalOverlay, {
|
|
52961
|
-
onClick: handleOverlayClick
|
|
52962
|
-
}, /*#__PURE__*/React__default["default"].createElement(ModalContainer, {
|
|
52963
|
-
$width: width,
|
|
52964
|
-
$height: height
|
|
52965
|
-
}, /*#__PURE__*/React__default["default"].createElement(CloseButton, {
|
|
52966
|
-
onClick: onClose
|
|
52967
|
-
}, /*#__PURE__*/React__default["default"].createElement(CloseXIcon, {
|
|
52968
|
-
width: "22",
|
|
52969
|
-
height: "22"
|
|
52970
|
-
})), /*#__PURE__*/React__default["default"].createElement(ModalTitle, null, title), /*#__PURE__*/React__default["default"].createElement(MessageContainer, null, /*#__PURE__*/React__default["default"].createElement(IconWrapper$1, null, /*#__PURE__*/React__default["default"].createElement(ExclamationMarkIcon, {
|
|
52971
|
-
color: "#F00021",
|
|
52972
|
-
width: "16",
|
|
52973
|
-
height: "16"
|
|
52974
|
-
})), /*#__PURE__*/React__default["default"].createElement(MessageTitle, null, messageTitle)), /*#__PURE__*/React__default["default"].createElement(MessageContainer, null, /*#__PURE__*/React__default["default"].createElement(MessageMessage, null, messageText)), /*#__PURE__*/React__default["default"].createElement(ButtonContainer, null, /*#__PURE__*/React__default["default"].createElement(Button$1, {
|
|
52975
|
-
text: cancelText,
|
|
52976
|
-
borderRadius: "12px",
|
|
52977
|
-
textColor: "#212121",
|
|
52978
|
-
borderColor: "#B1B1B1",
|
|
52979
|
-
backgroundColor: "#FFF",
|
|
52980
|
-
hoverTextColor: "#212121",
|
|
52981
|
-
hoverBackgroundColor: "#FFF",
|
|
52982
|
-
hoverBorderColor: "#F00021",
|
|
52983
|
-
disabledTextColor: "",
|
|
52984
|
-
disabledBackgroundColor: "",
|
|
52985
|
-
disabledBorderColor: "",
|
|
52986
|
-
width: calculateButtonWidth(cancelText),
|
|
52987
|
-
height: "45px",
|
|
52988
|
-
onClick: onClose
|
|
52989
|
-
}), /*#__PURE__*/React__default["default"].createElement(Button$1, {
|
|
52990
|
-
text: confirmText,
|
|
52991
|
-
borderRadius: "12px",
|
|
52992
|
-
backgroundColor: "#F00021",
|
|
52993
|
-
textColor: "#FFF",
|
|
52994
|
-
borderColor: "#F00021",
|
|
52995
|
-
hoverTextColor: "#FFF",
|
|
52996
|
-
hoverBackgroundColor: "#ff7875",
|
|
52997
|
-
hoverBorderColor: "#ff7875",
|
|
52998
|
-
width: calculateButtonWidth(confirmText),
|
|
52999
|
-
height: "45px",
|
|
53000
|
-
onClick: onConfirm
|
|
53001
|
-
}))));
|
|
53002
|
-
};
|
|
53003
|
-
|
|
53004
52880
|
// ToasterMessageBox.styles.js
|
|
53005
52881
|
|
|
53006
52882
|
// Helper function to convert hex to rgba
|