sag_components 2.0.0-beta231 → 2.0.0-beta233
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 -1
- package/dist/index.esm.js +185 -132
- package/dist/index.esm.js.map +1 -1
- package/dist/index.js +185 -132
- package/dist/index.js.map +1 -1
- package/dist/types/components/OverlayDropdown/OverlayDropdown.d.ts +2 -1
- package/dist/types/components/OverlayDropdown/OverlayDropdown.stories.d.ts +1 -0
- package/dist/types/icons/PenIcon.d.ts +6 -0
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -1573,7 +1573,7 @@ declare function ModalDrawer({ open, height, onClose, children, widthPercent }:
|
|
|
1573
1573
|
widthPercent?: number;
|
|
1574
1574
|
}): react_jsx_runtime.JSX.Element;
|
|
1575
1575
|
|
|
1576
|
-
declare function OverlayDropdown({ data, value, onSelectClick, disabled, isDarkerBackground, required, selectedColor, hoverColor, dropdownMaxHeight, width, height, label, labelEmptyValue, showLabelOnTop, placeHolder, labelColor, placeHolderColor, margin, ...props }: {
|
|
1576
|
+
declare function OverlayDropdown({ data, value, onSelectClick, disabled, isDarkerBackground, required, selectedColor, hoverColor, dropdownMaxHeight, width, height, label, labelEmptyValue, showLabelOnTop, placeHolder, labelColor, placeHolderColor, margin, editableDigitalCoupon, ...props }: {
|
|
1577
1577
|
[x: string]: any;
|
|
1578
1578
|
data?: any[];
|
|
1579
1579
|
value: any;
|
|
@@ -1593,6 +1593,7 @@ declare function OverlayDropdown({ data, value, onSelectClick, disabled, isDarke
|
|
|
1593
1593
|
labelColor: any;
|
|
1594
1594
|
placeHolderColor: any;
|
|
1595
1595
|
margin?: string;
|
|
1596
|
+
editableDigitalCoupon?: boolean;
|
|
1596
1597
|
}): react_jsx_runtime.JSX.Element;
|
|
1597
1598
|
|
|
1598
1599
|
declare function MessageBox({ isOpen, isDisabled, onClose, onConfirm, title, primaryText, secondaryText, width, height, color, hoverColor, opacity, secondaryColor, seperateSectionBorder, children, tooltipContent, }: {
|
package/dist/index.esm.js
CHANGED
|
@@ -10581,24 +10581,23 @@ const QuarterPopupPicker = ({
|
|
|
10581
10581
|
};
|
|
10582
10582
|
|
|
10583
10583
|
/* eslint-disable import/no-extraneous-dependencies */
|
|
10584
|
-
const QuarterPicker =
|
|
10585
|
-
|
|
10586
|
-
|
|
10587
|
-
|
|
10588
|
-
|
|
10589
|
-
|
|
10590
|
-
|
|
10591
|
-
|
|
10592
|
-
|
|
10593
|
-
|
|
10594
|
-
|
|
10595
|
-
|
|
10596
|
-
|
|
10597
|
-
|
|
10598
|
-
|
|
10599
|
-
|
|
10600
|
-
|
|
10601
|
-
} = _ref;
|
|
10584
|
+
const QuarterPicker = ({
|
|
10585
|
+
availableQuarters,
|
|
10586
|
+
// ["Q1-2024"]
|
|
10587
|
+
label,
|
|
10588
|
+
onChange,
|
|
10589
|
+
borderRadius,
|
|
10590
|
+
required,
|
|
10591
|
+
width,
|
|
10592
|
+
height,
|
|
10593
|
+
placeholder,
|
|
10594
|
+
disabled,
|
|
10595
|
+
borderColor,
|
|
10596
|
+
borderColorFocus,
|
|
10597
|
+
textColor,
|
|
10598
|
+
selectedValue,
|
|
10599
|
+
startYear
|
|
10600
|
+
}) => {
|
|
10602
10601
|
const [isFocused, setIsFocused] = useState(false);
|
|
10603
10602
|
const [isOpen, setIsOpen] = useState(false);
|
|
10604
10603
|
const [value, setValue] = useState('');
|
|
@@ -11040,23 +11039,22 @@ const MonthPopupPicker = ({
|
|
|
11040
11039
|
};
|
|
11041
11040
|
|
|
11042
11041
|
/* eslint-disable import/no-extraneous-dependencies */
|
|
11043
|
-
const MonthPicker =
|
|
11044
|
-
|
|
11045
|
-
|
|
11046
|
-
|
|
11047
|
-
|
|
11048
|
-
|
|
11049
|
-
|
|
11050
|
-
|
|
11051
|
-
|
|
11052
|
-
|
|
11053
|
-
|
|
11054
|
-
|
|
11055
|
-
|
|
11056
|
-
|
|
11057
|
-
|
|
11058
|
-
|
|
11059
|
-
} = _ref;
|
|
11042
|
+
const MonthPicker = ({
|
|
11043
|
+
availableMonths,
|
|
11044
|
+
label,
|
|
11045
|
+
onChange,
|
|
11046
|
+
borderRadius,
|
|
11047
|
+
required,
|
|
11048
|
+
width,
|
|
11049
|
+
height,
|
|
11050
|
+
placeholder,
|
|
11051
|
+
disabled,
|
|
11052
|
+
borderColor,
|
|
11053
|
+
borderColorFocus,
|
|
11054
|
+
textColor,
|
|
11055
|
+
selectedValue,
|
|
11056
|
+
startYear
|
|
11057
|
+
}) => {
|
|
11060
11058
|
const [isFocused, setIsFocused] = useState(false);
|
|
11061
11059
|
const [isOpen, setIsOpen] = useState(false);
|
|
11062
11060
|
const [value, setValue] = useState('');
|
|
@@ -24167,22 +24165,21 @@ const DeleteIcon = styled.div`
|
|
|
24167
24165
|
position: absolute;
|
|
24168
24166
|
`;
|
|
24169
24167
|
|
|
24170
|
-
const QuickFilterDropdownSingle =
|
|
24171
|
-
|
|
24172
|
-
|
|
24173
|
-
|
|
24174
|
-
|
|
24175
|
-
|
|
24176
|
-
|
|
24177
|
-
|
|
24178
|
-
|
|
24179
|
-
|
|
24180
|
-
|
|
24181
|
-
|
|
24182
|
-
|
|
24183
|
-
|
|
24184
|
-
|
|
24185
|
-
} = _ref;
|
|
24168
|
+
const QuickFilterDropdownSingle = ({
|
|
24169
|
+
label,
|
|
24170
|
+
hoverColor,
|
|
24171
|
+
options,
|
|
24172
|
+
selectedValue,
|
|
24173
|
+
placeHolder,
|
|
24174
|
+
onChange,
|
|
24175
|
+
disabled,
|
|
24176
|
+
width,
|
|
24177
|
+
error,
|
|
24178
|
+
errorMessage,
|
|
24179
|
+
xIconShow,
|
|
24180
|
+
labelColor,
|
|
24181
|
+
showLabelOnTop
|
|
24182
|
+
}) => {
|
|
24186
24183
|
const [isFocused, setIsFocused] = useState(false);
|
|
24187
24184
|
const [showOptions, setShowOptions] = useState(false);
|
|
24188
24185
|
const [inputValue, setInputValue] = useState("");
|
|
@@ -24639,26 +24636,25 @@ const IconContainer$2 = styled.div`
|
|
|
24639
24636
|
cursor: pointer;
|
|
24640
24637
|
`;
|
|
24641
24638
|
|
|
24642
|
-
const QuickFilterDropdownMultiSelection =
|
|
24643
|
-
|
|
24644
|
-
|
|
24645
|
-
|
|
24646
|
-
|
|
24647
|
-
|
|
24648
|
-
|
|
24649
|
-
|
|
24650
|
-
|
|
24651
|
-
|
|
24652
|
-
|
|
24653
|
-
|
|
24654
|
-
|
|
24655
|
-
|
|
24656
|
-
|
|
24657
|
-
|
|
24658
|
-
|
|
24659
|
-
|
|
24660
|
-
|
|
24661
|
-
} = _ref;
|
|
24639
|
+
const QuickFilterDropdownMultiSelection = ({
|
|
24640
|
+
label,
|
|
24641
|
+
labelEmptyValue,
|
|
24642
|
+
options,
|
|
24643
|
+
selectedValue,
|
|
24644
|
+
placeHolder,
|
|
24645
|
+
onChange,
|
|
24646
|
+
required,
|
|
24647
|
+
disabled,
|
|
24648
|
+
width,
|
|
24649
|
+
height,
|
|
24650
|
+
error,
|
|
24651
|
+
errorMessage,
|
|
24652
|
+
labelColor,
|
|
24653
|
+
xIconShow,
|
|
24654
|
+
checkBoxColor,
|
|
24655
|
+
showLabelOnTop,
|
|
24656
|
+
dropdownHeight
|
|
24657
|
+
}) => {
|
|
24662
24658
|
const [isFocused, setIsFocused] = useState(false);
|
|
24663
24659
|
const [showOptions, setShowOptions] = useState(false);
|
|
24664
24660
|
const [inputValue, setInputValue] = useState('');
|
|
@@ -36155,9 +36151,9 @@ const ToggleSlider = styled.span`
|
|
|
36155
36151
|
}
|
|
36156
36152
|
`;
|
|
36157
36153
|
|
|
36158
|
-
/**
|
|
36159
|
-
* ToggleSwitch component for on/off states.
|
|
36160
|
-
* Supports small/large sizes and disabled state.
|
|
36154
|
+
/**
|
|
36155
|
+
* ToggleSwitch component for on/off states.
|
|
36156
|
+
* Supports small/large sizes and disabled state.
|
|
36161
36157
|
*/
|
|
36162
36158
|
function ToggleSwitch(_ref) {
|
|
36163
36159
|
let {
|
|
@@ -38242,48 +38238,28 @@ const SortPop = props => {
|
|
|
38242
38238
|
color = '#066768',
|
|
38243
38239
|
onCheck = () => {},
|
|
38244
38240
|
onReset = () => {},
|
|
38245
|
-
selectedValue: externalSelectedValue = null
|
|
38241
|
+
selectedValue: externalSelectedValue = null
|
|
38246
38242
|
} = props;
|
|
38247
|
-
|
|
38248
|
-
// Use external state if provided, otherwise use internal state
|
|
38249
38243
|
const [internalValue, setInternalValue] = useState(null);
|
|
38250
38244
|
const value = externalSelectedValue !== null ? externalSelectedValue : internalValue;
|
|
38251
38245
|
const setValue = externalSelectedValue !== null ? () => {} : setInternalValue;
|
|
38252
|
-
|
|
38253
|
-
// Initialize internal state from external state if provided
|
|
38254
38246
|
useEffect(() => {
|
|
38255
38247
|
if (externalSelectedValue !== null) {
|
|
38256
38248
|
setInternalValue(externalSelectedValue);
|
|
38257
38249
|
}
|
|
38258
38250
|
}, [externalSelectedValue]);
|
|
38259
38251
|
const handleReset = () => {
|
|
38260
|
-
// console.log('SortPop Reset:', {
|
|
38261
|
-
// menuName,
|
|
38262
|
-
// previousValue: value,
|
|
38263
|
-
// newValue: null,
|
|
38264
|
-
// timestamp: new Date().toISOString()
|
|
38265
|
-
// });
|
|
38266
|
-
|
|
38267
|
-
// Reset state (either internal or external)
|
|
38268
38252
|
if (externalSelectedValue === null) {
|
|
38269
38253
|
setValue(null);
|
|
38270
38254
|
}
|
|
38271
|
-
|
|
38272
|
-
// Call the onReset callback
|
|
38273
38255
|
onReset();
|
|
38274
|
-
|
|
38275
|
-
// Notify parent about the reset
|
|
38276
38256
|
onCheck(null);
|
|
38277
38257
|
};
|
|
38278
38258
|
const handleChange = newValue => {
|
|
38279
38259
|
const selectedItem = list.find(item => item.value === newValue.value);
|
|
38280
|
-
|
|
38281
|
-
// Update state (either internal or external)
|
|
38282
38260
|
if (externalSelectedValue === null) {
|
|
38283
38261
|
setValue(selectedItem);
|
|
38284
38262
|
}
|
|
38285
|
-
|
|
38286
|
-
// Notify parent about the change
|
|
38287
38263
|
onCheck(selectedItem);
|
|
38288
38264
|
};
|
|
38289
38265
|
useEffect(() => {
|
|
@@ -38294,17 +38270,18 @@ const SortPop = props => {
|
|
|
38294
38270
|
height: height
|
|
38295
38271
|
}, /*#__PURE__*/React$1.createElement(Title$3, null, menuName), /*#__PURE__*/React$1.createElement(DropdownList$1, {
|
|
38296
38272
|
role: "listbox"
|
|
38297
|
-
}, list.map(item =>
|
|
38298
|
-
|
|
38299
|
-
|
|
38300
|
-
|
|
38301
|
-
|
|
38302
|
-
|
|
38303
|
-
|
|
38304
|
-
|
|
38305
|
-
|
|
38273
|
+
}, list.map(item => {
|
|
38274
|
+
const isSelected = value && item.value === value.value;
|
|
38275
|
+
return /*#__PURE__*/React$1.createElement(DropdownItem$1, {
|
|
38276
|
+
key: item.value,
|
|
38277
|
+
selected: isSelected,
|
|
38278
|
+
onClick: () => handleChange(item)
|
|
38279
|
+
}, /*#__PURE__*/React$1.createElement(TruncatedText$1, null, item.label), isSelected && /*#__PURE__*/React$1.createElement(Checkmark, {
|
|
38280
|
+
color: color
|
|
38281
|
+
}, "\u2713"));
|
|
38282
|
+
})), /*#__PURE__*/React$1.createElement(ButtonWrapper$1, null, /*#__PURE__*/React$1.createElement(ResetButton, {
|
|
38306
38283
|
onClick: handleReset,
|
|
38307
|
-
disabled: value === null
|
|
38284
|
+
disabled: value === null
|
|
38308
38285
|
}, "Reset")));
|
|
38309
38286
|
};
|
|
38310
38287
|
|
|
@@ -55009,6 +54986,79 @@ const Label$1 = styled.label`
|
|
|
55009
54986
|
}
|
|
55010
54987
|
`;
|
|
55011
54988
|
|
|
54989
|
+
const PenIcon = _ref => {
|
|
54990
|
+
let {
|
|
54991
|
+
width = "24",
|
|
54992
|
+
height = "24",
|
|
54993
|
+
color = "#212121"
|
|
54994
|
+
} = _ref;
|
|
54995
|
+
return /*#__PURE__*/React$1.createElement("svg", {
|
|
54996
|
+
width: width,
|
|
54997
|
+
height: height,
|
|
54998
|
+
viewBox: "0 0 25 25",
|
|
54999
|
+
fill: "none",
|
|
55000
|
+
xmlns: "http://www.w3.org/2000/svg"
|
|
55001
|
+
}, /*#__PURE__*/React$1.createElement("g", {
|
|
55002
|
+
filter: "url(#filter0_d_2525_123082)"
|
|
55003
|
+
}, /*#__PURE__*/React$1.createElement("mask", {
|
|
55004
|
+
id: "path-1-outside-1_2525_123082",
|
|
55005
|
+
maskUnits: "userSpaceOnUse",
|
|
55006
|
+
x: "3.73438",
|
|
55007
|
+
y: "3.375",
|
|
55008
|
+
width: "17",
|
|
55009
|
+
height: "19",
|
|
55010
|
+
fill: color
|
|
55011
|
+
}, /*#__PURE__*/React$1.createElement("rect", {
|
|
55012
|
+
fill: "white",
|
|
55013
|
+
x: "3.73438",
|
|
55014
|
+
y: "3.375",
|
|
55015
|
+
width: "17",
|
|
55016
|
+
height: "19"
|
|
55017
|
+
}), /*#__PURE__*/React$1.createElement("path", {
|
|
55018
|
+
d: "M15.1572 5.32807C16.031 4.33374 17.3136 4.07387 18.0234 4.7558L19.3105 5.99116C19.6459 6.4461 19.802 7.00854 19.749 7.57123C19.696 8.13395 19.4378 8.65758 19.0234 9.04194L9.57031 19.9384C9.34115 20.2236 9.05407 20.4571 8.72754 20.622C8.40112 20.7869 8.04311 20.8802 7.67773 20.8955L4.73438 21.1464L4.95605 18.0234C4.95807 17.9606 4.96275 17.8968 4.96973 17.833L4.9873 17.5898L5.00488 17.6103C5.11537 17.0963 5.35621 16.6187 5.7041 16.2246L15.1572 5.32807ZM6.9043 17.2705C6.73634 17.4579 6.61798 17.6844 6.56152 17.9296L6.55273 17.9746L6.5459 18.0126C6.54191 18.0332 6.53798 18.0541 6.54199 18.0751L6.53809 18.1386L6.44727 19.4121L7.61328 19.3095L7.69434 19.3115C7.96355 19.2647 8.20438 19.1159 8.36719 18.8964L15.6064 10.5517L13.9961 9.09369L6.9043 17.2705ZM16.9922 5.96088C16.7403 6.02342 16.5162 6.16848 16.3564 6.37299L15.0342 7.89741L16.6436 9.35541L17.8203 7.99994C17.9368 7.88082 18.0279 7.73901 18.0889 7.58393C18.1498 7.42886 18.179 7.26318 18.1748 7.09662L16.9922 5.96088Z"
|
|
55019
|
+
})), /*#__PURE__*/React$1.createElement("path", {
|
|
55020
|
+
d: "M15.1572 5.32807C16.031 4.33374 17.3136 4.07387 18.0234 4.7558L19.3105 5.99116C19.6459 6.4461 19.802 7.00854 19.749 7.57123C19.696 8.13395 19.4378 8.65758 19.0234 9.04194L9.57031 19.9384C9.34115 20.2236 9.05407 20.4571 8.72754 20.622C8.40112 20.7869 8.04311 20.8802 7.67773 20.8955L4.73438 21.1464L4.95605 18.0234C4.95807 17.9606 4.96275 17.8968 4.96973 17.833L4.9873 17.5898L5.00488 17.6103C5.11537 17.0963 5.35621 16.6187 5.7041 16.2246L15.1572 5.32807ZM6.9043 17.2705C6.73634 17.4579 6.61798 17.6844 6.56152 17.9296L6.55273 17.9746L6.5459 18.0126C6.54191 18.0332 6.53798 18.0541 6.54199 18.0751L6.53809 18.1386L6.44727 19.4121L7.61328 19.3095L7.69434 19.3115C7.96355 19.2647 8.20438 19.1159 8.36719 18.8964L15.6064 10.5517L13.9961 9.09369L6.9043 17.2705ZM16.9922 5.96088C16.7403 6.02342 16.5162 6.16848 16.3564 6.37299L15.0342 7.89741L16.6436 9.35541L17.8203 7.99994C17.9368 7.88082 18.0279 7.73901 18.0889 7.58393C18.1498 7.42886 18.179 7.26318 18.1748 7.09662L16.9922 5.96088Z",
|
|
55021
|
+
fill: color
|
|
55022
|
+
}), /*#__PURE__*/React$1.createElement("path", {
|
|
55023
|
+
d: "M15.1572 5.32807L14.7816 4.998L14.7795 5.00042L15.1572 5.32807ZM18.0234 4.7558L17.677 5.11638L17.6772 5.11654L18.0234 4.7558ZM19.3105 5.99116L19.713 5.69448L19.6876 5.66005L19.6568 5.63042L19.3105 5.99116ZM19.749 7.57123L20.2468 7.61814L20.2468 7.61806L19.749 7.57123ZM19.0234 9.04194L18.6834 8.67535L18.6635 8.69379L18.6458 8.71428L19.0234 9.04194ZM9.57031 19.9384L9.19263 19.6108L9.18647 19.6179L9.18058 19.6252L9.57031 19.9384ZM8.72754 20.622L8.95297 21.0683L8.95297 21.0683L8.72754 20.622ZM7.67773 20.8955L7.65684 20.3959L7.64603 20.3963L7.63525 20.3973L7.67773 20.8955ZM4.73438 21.1464L4.23563 21.111L4.19423 21.6943L4.77686 21.6446L4.73438 21.1464ZM4.95605 18.0234L5.4548 18.0588L5.45549 18.0491L5.4558 18.0394L4.95605 18.0234ZM4.96973 17.833L5.46677 17.8873L5.46776 17.8782L5.46843 17.869L4.96973 17.833ZM4.9873 17.5898L5.36693 17.2644L4.57621 16.3419L4.48861 17.5537L4.9873 17.5898ZM5.00488 17.6103L4.62525 17.9357L5.28172 18.7016L5.49372 17.7154L5.00488 17.6103ZM5.7041 16.2246L6.07897 16.5554L6.08178 16.5522L5.7041 16.2246ZM6.9043 17.2705L7.27672 17.6042L7.28202 17.5981L6.9043 17.2705ZM6.56152 17.9296L6.07427 17.8175L6.07241 17.8255L6.07083 17.8336L6.56152 17.9296ZM6.55273 17.9746L6.06198 17.8785L6.0606 17.8862L6.55273 17.9746ZM6.5459 18.0126L7.03676 18.1081L7.03803 18.101L6.5459 18.0126ZM6.54199 18.0751L7.04105 18.1059L7.04491 18.0431L7.03313 17.9814L6.54199 18.0751ZM6.53809 18.1386L7.03684 18.1742L7.03714 18.1693L6.53809 18.1386ZM6.44727 19.4121L5.94853 19.3765L5.90681 19.9615L6.49107 19.9101L6.44727 19.4121ZM7.61328 19.3095L7.62533 18.8097L7.59735 18.809L7.56948 18.8114L7.61328 19.3095ZM7.69434 19.3115L7.68229 19.8113L7.73148 19.8125L7.77995 19.8041L7.69434 19.3115ZM8.36719 18.8964L7.9895 18.5688L7.977 18.5832L7.96563 18.5985L8.36719 18.8964ZM15.6064 10.5517L15.9841 10.8794L16.3049 10.5096L15.942 10.1811L15.6064 10.5517ZM13.9961 9.09369L14.3317 8.72304L13.953 8.38022L13.6184 8.76609L13.9961 9.09369ZM16.9922 5.96088L17.3385 5.60025L17.1395 5.40912L16.8717 5.47562L16.9922 5.96088ZM16.3564 6.37299L16.7342 6.70061L16.7426 6.69089L16.7505 6.68075L16.3564 6.37299ZM15.0342 7.89741L14.6565 7.56978L14.3358 7.93943L14.6985 8.26796L15.0342 7.89741ZM16.6436 9.35541L16.3079 9.72596L16.6863 10.0688L17.0211 9.6832L16.6436 9.35541ZM17.8203 7.99994L17.4628 7.65034L17.4525 7.66095L17.4427 7.67216L17.8203 7.99994ZM18.0889 7.58393L18.5542 7.7668L18.5542 7.76677L18.0889 7.58393ZM18.1748 7.09662L18.6746 7.08391L18.6694 6.87839L18.5211 6.736L18.1748 7.09662ZM15.1572 5.32807L15.5328 5.65813C15.9066 5.23273 16.3521 4.98342 16.7501 4.90358C17.1457 4.82425 17.4653 4.91295 17.677 5.11638L18.0234 4.7558L18.3698 4.39523C17.8717 3.91673 17.1952 3.7944 16.5535 3.9231C15.9144 4.05129 15.2816 4.42908 14.7816 4.99801L15.1572 5.32807ZM18.0234 4.7558L17.6772 5.11654L18.9643 6.35189L19.3105 5.99116L19.6568 5.63042L18.3697 4.39507L18.0234 4.7558ZM19.3105 5.99116L18.9081 6.28783C19.1705 6.64386 19.2927 7.08401 19.2512 7.5244L19.749 7.57123L20.2468 7.61806C20.3113 6.93306 20.1213 6.24834 19.713 5.69448L19.3105 5.99116ZM19.749 7.57123L19.2512 7.52433C19.2097 7.96486 19.0076 8.37465 18.6834 8.67535L19.0234 9.04194L19.3635 9.40852C19.868 8.94051 20.1823 8.30303 20.2468 7.61814L19.749 7.57123ZM19.0234 9.04194L18.6458 8.71428L9.19263 19.6108L9.57031 19.9384L9.94799 20.2661L19.4011 9.36959L19.0234 9.04194ZM9.57031 19.9384L9.18058 19.6252C8.99561 19.8553 8.76436 20.0432 8.5021 20.1757L8.72754 20.622L8.95297 21.0683C9.34377 20.8709 9.68668 20.5918 9.96005 20.2516L9.57031 19.9384ZM8.72754 20.622L8.50211 20.1757C8.23926 20.3085 7.95099 20.3836 7.65684 20.3959L7.67773 20.8955L7.69863 21.395C8.13524 21.3768 8.56298 21.2653 8.95297 21.0683L8.72754 20.622ZM7.67773 20.8955L7.63525 20.3973L4.69189 20.6482L4.73438 21.1464L4.77686 21.6446L7.72021 21.3936L7.67773 20.8955ZM4.73438 21.1464L5.23312 21.1818L5.4548 18.0588L4.95605 18.0234L4.45731 17.988L4.23563 21.111L4.73438 21.1464ZM4.95605 18.0234L5.4558 18.0394C5.45737 17.9905 5.46106 17.9395 5.46677 17.8873L4.96973 17.833L4.47269 17.7786C4.46444 17.8541 4.45877 17.9307 4.45631 18.0073L4.95605 18.0234ZM4.96973 17.833L5.46843 17.869L5.486 17.6258L4.9873 17.5898L4.48861 17.5537L4.47103 17.7969L4.96973 17.833ZM4.9873 17.5898L4.60768 17.9152L4.62525 17.9357L5.00488 17.6103L5.38451 17.2849L5.36693 17.2644L4.9873 17.5898ZM5.00488 17.6103L5.49372 17.7154C5.58622 17.2851 5.78788 16.8852 6.07896 16.5554L5.7041 16.2246L5.32924 15.8937C4.92453 16.3522 4.64451 16.9076 4.51605 17.5052L5.00488 17.6103ZM5.7041 16.2246L6.08178 16.5522L15.5349 5.65572L15.1572 5.32807L14.7795 5.00042L5.32642 15.8969L5.7041 16.2246ZM6.9043 17.2705L6.53192 16.9368C6.3083 17.1863 6.14993 17.4888 6.07427 17.8175L6.56152 17.9296L7.04878 18.0418C7.08604 17.88 7.16438 17.7294 7.27667 17.6041L6.9043 17.2705ZM6.56152 17.9296L6.07083 17.8336L6.06204 17.8785L6.55273 17.9746L7.04343 18.0706L7.05222 18.0256L6.56152 17.9296ZM6.55273 17.9746L6.0606 17.8862L6.05376 17.9243L6.5459 18.0126L7.03803 18.101L7.04487 18.0629L6.55273 17.9746ZM6.5459 18.0126L6.05508 17.9172C6.0537 17.9243 6.02602 18.0387 6.05085 18.1688L6.54199 18.0751L7.03313 17.9814C7.04251 18.0306 7.04069 18.0698 7.03875 18.0905C7.03709 18.1081 7.03421 18.1209 7.03671 18.108L6.5459 18.0126ZM6.54199 18.0751L6.04294 18.0444L6.03903 18.1079L6.53809 18.1386L7.03714 18.1693L7.04105 18.1059L6.54199 18.0751ZM6.53809 18.1386L6.03935 18.103L5.94853 19.3765L6.44727 19.4121L6.946 19.4476L7.03682 18.1742L6.53809 18.1386ZM6.44727 19.4121L6.49107 19.9101L7.65708 19.8076L7.61328 19.3095L7.56948 18.8114L6.40346 18.914L6.44727 19.4121ZM7.61328 19.3095L7.60124 19.8094L7.68229 19.8113L7.69434 19.3115L7.70638 18.8116L7.62533 18.8097L7.61328 19.3095ZM7.69434 19.3115L7.77995 19.8041C8.17599 19.7353 8.52976 19.5165 8.76874 19.1943L8.36719 18.8964L7.96563 18.5985C7.879 18.7153 7.7511 18.7941 7.60872 18.8189L7.69434 19.3115ZM8.36719 18.8964L8.74487 19.2241L15.9841 10.8794L15.6064 10.5517L15.2288 10.2241L7.9895 18.5688L8.36719 18.8964ZM15.6064 10.5517L15.942 10.1811L14.3317 8.72304L13.9961 9.09369L13.6605 9.46435L15.2709 10.9224L15.6064 10.5517ZM13.9961 9.09369L13.6184 8.76609L6.52657 16.9428L6.9043 17.2705L7.28202 17.5981L14.3738 9.4213L13.9961 9.09369ZM16.9922 5.96088L16.8717 5.47562C16.5118 5.56498 16.1912 5.77228 15.9624 6.06523L16.3564 6.37299L16.7505 6.68075C16.8412 6.56468 16.9689 6.48186 17.1127 6.44615L16.9922 5.96088ZM16.3564 6.37299L15.9787 6.04537L14.6565 7.56978L15.0342 7.89741L15.4119 8.22503L16.7342 6.70061L16.3564 6.37299ZM15.0342 7.89741L14.6985 8.26796L16.3079 9.72596L16.6436 9.35541L16.9793 8.98486L15.3699 7.52686L15.0342 7.89741ZM16.6436 9.35541L17.0211 9.6832L18.1979 8.32773L17.8203 7.99994L17.4427 7.67216L16.266 9.02763L16.6436 9.35541ZM17.8203 7.99994L18.1778 8.34954C18.3418 8.18181 18.4692 7.98306 18.5542 7.7668L18.0889 7.58393L17.6235 7.40106C17.5866 7.49497 17.5318 7.57983 17.4628 7.65034L17.8203 7.99994ZM18.0889 7.58393L18.5542 7.76677C18.6396 7.54957 18.6806 7.31739 18.6746 7.08391L18.1748 7.09662L17.675 7.10934C17.6775 7.20896 17.66 7.30816 17.6235 7.40109L18.0889 7.58393ZM18.1748 7.09662L18.5211 6.736L17.3385 5.60025L16.9922 5.96088L16.6459 6.32151L17.8285 7.45725L18.1748 7.09662Z",
|
|
55024
|
+
fill: "white",
|
|
55025
|
+
mask: "url(#path-1-outside-1_2525_123082)"
|
|
55026
|
+
})), /*#__PURE__*/React$1.createElement("defs", null, /*#__PURE__*/React$1.createElement("filter", {
|
|
55027
|
+
id: "filter0_d_2525_123082",
|
|
55028
|
+
x: "-15.8047",
|
|
55029
|
+
y: "-16.125",
|
|
55030
|
+
width: "56.0625",
|
|
55031
|
+
height: "57.8203",
|
|
55032
|
+
filterUnits: "userSpaceOnUse",
|
|
55033
|
+
"color-interpolation-filters": "sRGB"
|
|
55034
|
+
}, /*#__PURE__*/React$1.createElement("feFlood", {
|
|
55035
|
+
"flood-opacity": "0",
|
|
55036
|
+
result: "BackgroundImageFix"
|
|
55037
|
+
}), /*#__PURE__*/React$1.createElement("feColorMatrix", {
|
|
55038
|
+
in: "SourceAlpha",
|
|
55039
|
+
type: "matrix",
|
|
55040
|
+
values: "0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0",
|
|
55041
|
+
result: "hardAlpha"
|
|
55042
|
+
}), /*#__PURE__*/React$1.createElement("feOffset", null), /*#__PURE__*/React$1.createElement("feGaussianBlur", {
|
|
55043
|
+
stdDeviation: "10"
|
|
55044
|
+
}), /*#__PURE__*/React$1.createElement("feComposite", {
|
|
55045
|
+
in2: "hardAlpha",
|
|
55046
|
+
operator: "out"
|
|
55047
|
+
}), /*#__PURE__*/React$1.createElement("feColorMatrix", {
|
|
55048
|
+
type: "matrix",
|
|
55049
|
+
values: "0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.1 0"
|
|
55050
|
+
}), /*#__PURE__*/React$1.createElement("feBlend", {
|
|
55051
|
+
mode: "normal",
|
|
55052
|
+
in2: "BackgroundImageFix",
|
|
55053
|
+
result: "effect1_dropShadow_2525_123082"
|
|
55054
|
+
}), /*#__PURE__*/React$1.createElement("feBlend", {
|
|
55055
|
+
mode: "normal",
|
|
55056
|
+
in: "SourceGraphic",
|
|
55057
|
+
in2: "effect1_dropShadow_2525_123082",
|
|
55058
|
+
result: "shape"
|
|
55059
|
+
}))));
|
|
55060
|
+
};
|
|
55061
|
+
|
|
55012
55062
|
const DialogOverlay = styled.div`
|
|
55013
55063
|
position: fixed;
|
|
55014
55064
|
font-family: "Poppins", sans-serif;
|
|
@@ -55228,25 +55278,26 @@ const OverlayDropdown = _ref => {
|
|
|
55228
55278
|
disabled = false,
|
|
55229
55279
|
isDarkerBackground = false,
|
|
55230
55280
|
required = false,
|
|
55231
|
-
selectedColor =
|
|
55232
|
-
hoverColor =
|
|
55233
|
-
dropdownMaxHeight =
|
|
55234
|
-
width =
|
|
55235
|
-
height =
|
|
55281
|
+
selectedColor = "#066768",
|
|
55282
|
+
hoverColor = "#E6F0F0",
|
|
55283
|
+
dropdownMaxHeight = "600px",
|
|
55284
|
+
width = "100%",
|
|
55285
|
+
height = "auto",
|
|
55236
55286
|
label,
|
|
55237
55287
|
labelEmptyValue,
|
|
55238
55288
|
showLabelOnTop,
|
|
55239
55289
|
placeHolder,
|
|
55240
55290
|
labelColor,
|
|
55241
55291
|
placeHolderColor,
|
|
55242
|
-
margin =
|
|
55292
|
+
margin = "8px",
|
|
55293
|
+
editableDigitalCoupon = false,
|
|
55243
55294
|
...props
|
|
55244
55295
|
} = _ref;
|
|
55245
55296
|
const [open, setOpen] = useState(false);
|
|
55246
55297
|
const [hoveredText, setHoveredText] = useState(null);
|
|
55247
55298
|
const [templateDialog, setTemplateDialog] = useState(null);
|
|
55248
|
-
const [dropdownPosition, setDropdownPosition] = useState(
|
|
55249
|
-
const [lastDefinedGroup, setLastDefinedGroup] = useState(data.find(group => group.overlayCode ===
|
|
55299
|
+
const [dropdownPosition, setDropdownPosition] = useState("below");
|
|
55300
|
+
const [lastDefinedGroup, setLastDefinedGroup] = useState(data.find(group => group.overlayCode === "last_defined"));
|
|
55250
55301
|
const buttonRef = useRef(null);
|
|
55251
55302
|
const dropdownRef = useRef(null);
|
|
55252
55303
|
const containerRef = useRef(null);
|
|
@@ -55259,12 +55310,12 @@ const OverlayDropdown = _ref => {
|
|
|
55259
55310
|
}
|
|
55260
55311
|
};
|
|
55261
55312
|
if (open) {
|
|
55262
|
-
document.addEventListener(
|
|
55263
|
-
document.addEventListener(
|
|
55313
|
+
document.addEventListener("mousedown", handleClickOutside);
|
|
55314
|
+
document.addEventListener("touchstart", handleClickOutside);
|
|
55264
55315
|
}
|
|
55265
55316
|
return () => {
|
|
55266
|
-
document.removeEventListener(
|
|
55267
|
-
document.removeEventListener(
|
|
55317
|
+
document.removeEventListener("mousedown", handleClickOutside);
|
|
55318
|
+
document.removeEventListener("touchstart", handleClickOutside);
|
|
55268
55319
|
};
|
|
55269
55320
|
}, [open]);
|
|
55270
55321
|
|
|
@@ -55282,9 +55333,9 @@ const OverlayDropdown = _ref => {
|
|
|
55282
55333
|
|
|
55283
55334
|
// If there's not enough space below, but more space above, position above
|
|
55284
55335
|
if (spaceBelow < dropdownHeight && spaceAbove > spaceBelow) {
|
|
55285
|
-
setDropdownPosition(
|
|
55336
|
+
setDropdownPosition("above");
|
|
55286
55337
|
} else {
|
|
55287
|
-
setDropdownPosition(
|
|
55338
|
+
setDropdownPosition("below");
|
|
55288
55339
|
}
|
|
55289
55340
|
}
|
|
55290
55341
|
}, [open, dropdownMaxHeight, margin]);
|
|
@@ -55314,8 +55365,8 @@ const OverlayDropdown = _ref => {
|
|
|
55314
55365
|
|
|
55315
55366
|
// Tooltip logic for long string
|
|
55316
55367
|
const getDisplayText = text => {
|
|
55317
|
-
if (!text) return
|
|
55318
|
-
if (text.length > 66) return text.slice(0, 66) +
|
|
55368
|
+
if (!text) return "";
|
|
55369
|
+
if (text.length > 66) return text.slice(0, 66) + "...";
|
|
55319
55370
|
return text;
|
|
55320
55371
|
};
|
|
55321
55372
|
const getTemplateParams = label => {
|
|
@@ -55330,12 +55381,12 @@ const OverlayDropdown = _ref => {
|
|
|
55330
55381
|
return [{
|
|
55331
55382
|
label: beforeX.trim(),
|
|
55332
55383
|
// "Buy "
|
|
55333
|
-
type:
|
|
55334
|
-
suffix:
|
|
55384
|
+
type: "number",
|
|
55385
|
+
suffix: ""
|
|
55335
55386
|
}, {
|
|
55336
55387
|
label: betweenXY.trim(),
|
|
55337
55388
|
// " & Get "
|
|
55338
|
-
type:
|
|
55389
|
+
type: "number",
|
|
55339
55390
|
suffix: afterY.trim() // " % Off"
|
|
55340
55391
|
}];
|
|
55341
55392
|
}
|
|
@@ -55348,16 +55399,16 @@ const OverlayDropdown = _ref => {
|
|
|
55348
55399
|
return [{
|
|
55349
55400
|
label: beforeVar.trim(),
|
|
55350
55401
|
// "Buy "
|
|
55351
|
-
type:
|
|
55402
|
+
type: "number",
|
|
55352
55403
|
suffix: afterVar.trim() // " of item(s), Get Free Item"
|
|
55353
55404
|
}];
|
|
55354
55405
|
}
|
|
55355
55406
|
|
|
55356
55407
|
// Fallback: if no pattern matches, treat as single input
|
|
55357
55408
|
return [{
|
|
55358
|
-
label:
|
|
55359
|
-
type:
|
|
55360
|
-
suffix:
|
|
55409
|
+
label: "Value",
|
|
55410
|
+
type: "number",
|
|
55411
|
+
suffix: ""
|
|
55361
55412
|
}];
|
|
55362
55413
|
};
|
|
55363
55414
|
const generateFinalSentence = (template, values) => {
|
|
@@ -55408,8 +55459,8 @@ const OverlayDropdown = _ref => {
|
|
|
55408
55459
|
} else {
|
|
55409
55460
|
// Create new group
|
|
55410
55461
|
setLastDefinedGroup({
|
|
55411
|
-
overlayCode:
|
|
55412
|
-
overlayName:
|
|
55462
|
+
overlayCode: "last_defined",
|
|
55463
|
+
overlayName: "Last defined by you",
|
|
55413
55464
|
templateType: 1,
|
|
55414
55465
|
items: [newItem]
|
|
55415
55466
|
});
|
|
@@ -55470,7 +55521,7 @@ const OverlayDropdown = _ref => {
|
|
|
55470
55521
|
onMouseEnter: () => setHoveredText(selected?.label),
|
|
55471
55522
|
onMouseLeave: () => setHoveredText(null),
|
|
55472
55523
|
color: !selected && open ? placeHolderColor : "inherit"
|
|
55473
|
-
}, selected ? getDisplayText(selected.label) : open ? placeHolder :
|
|
55524
|
+
}, selected ? getDisplayText(selected.label) : open ? placeHolder : ""), open ? /*#__PURE__*/React$1.createElement(MenuItemUpIcon, {
|
|
55474
55525
|
width: "12px",
|
|
55475
55526
|
height: "12px",
|
|
55476
55527
|
color: "#B1B1B1"
|
|
@@ -55488,7 +55539,7 @@ const OverlayDropdown = _ref => {
|
|
|
55488
55539
|
$showBorder: group.overlayName,
|
|
55489
55540
|
margin: margin,
|
|
55490
55541
|
key: group.overlayCode
|
|
55491
|
-
}, [
|
|
55542
|
+
}, ["Template Offer", "Last defined by you"].includes(group.overlayName) && /*#__PURE__*/React$1.createElement(SectionTitle, null, group.overlayName), group.items.map(item => /*#__PURE__*/React$1.createElement(DropdownItem, {
|
|
55492
55543
|
key: item.value,
|
|
55493
55544
|
selected: item.value === value,
|
|
55494
55545
|
selectedColor: selectedColor,
|
|
@@ -55522,6 +55573,8 @@ const OverlayDropdown = _ref => {
|
|
|
55522
55573
|
onMouseLeave: () => setHoveredText(null)
|
|
55523
55574
|
}, getDisplayText(item.label)), group.templateType === 2 ? /*#__PURE__*/React$1.createElement(ChervronRightIcon, {
|
|
55524
55575
|
fill: item.value === value ? "#fff" : "#212121"
|
|
55576
|
+
}) : group.templateType === 3 && editableDigitalCoupon ? /*#__PURE__*/React$1.createElement(PenIcon, {
|
|
55577
|
+
fill: item.value === value ? "#fff" : "#212121"
|
|
55525
55578
|
}) : item.value === value && /*#__PURE__*/React$1.createElement(OkIcon, {
|
|
55526
55579
|
width: "22px",
|
|
55527
55580
|
height: "22px",
|