@ssa-ui-kit/core 2.1.1 → 2.2.0
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/components/DatePicker/hooks/useDatePicker.d.ts +3 -0
- package/dist/components/DatePicker/styles.d.ts +9 -0
- package/dist/components/DatePicker/types.d.ts +10 -1
- package/dist/components/DateRangePicker/DateRangePicker.d.ts +2 -0
- package/dist/components/DateRangePicker/constants.d.ts +7 -0
- package/dist/components/DateRangePicker/index.d.ts +1 -0
- package/dist/components/DateRangePicker/types.d.ts +41 -0
- package/dist/components/Drawer/DrawerCloseButton.d.ts +5 -0
- package/dist/components/Drawer/DrawerContent.d.ts +3 -0
- package/dist/components/Drawer/DrawerHeader.d.ts +4 -0
- package/dist/components/Drawer/DrawerOverlay.d.ts +4 -0
- package/dist/components/Drawer/DrawerPortal.d.ts +2 -0
- package/dist/components/Drawer/DrawerProvider.d.ts +8 -0
- package/dist/components/Drawer/DrawerRoot.d.ts +6 -0
- package/dist/components/Drawer/DrawerTitle.d.ts +4 -0
- package/dist/components/Drawer/index.d.ts +2 -0
- package/dist/components/Drawer/index.parts.d.ts +7 -0
- package/dist/components/Drawer/useDrawer.d.ts +48 -0
- package/dist/components/Field/index.d.ts +1 -1
- package/dist/components/FiltersMultiSelect/FiltersMultiSelect.d.ts +1 -1
- package/dist/components/FormHelperText/types.d.ts +1 -1
- package/dist/components/Input/InputBase.d.ts +2 -0
- package/dist/components/Input/types.d.ts +2 -0
- package/dist/components/Typeahead/Typeahead.context.d.ts +1 -1
- package/dist/components/Typeahead/useTypeahead.d.ts +1 -1
- package/dist/components/index.d.ts +2 -0
- package/dist/index.js +1080 -302
- package/dist/index.js.map +1 -1
- package/dist/types/emotion.d.ts +1 -0
- package/package.json +3 -3
package/dist/index.js
CHANGED
|
@@ -85,12 +85,15 @@ __webpack_require__.d(__webpack_exports__, {
|
|
|
85
85
|
CollapsibleNavBarProvider: () => (/* reexport */ CollapsibleNavBarProvider),
|
|
86
86
|
ColorPicker: () => (/* reexport */ ColorPicker_ColorPicker),
|
|
87
87
|
DatePicker: () => (/* reexport */ DatePicker),
|
|
88
|
+
DateRangePicker: () => (/* reexport */ DateRangePicker),
|
|
89
|
+
Drawer: () => (/* reexport */ index_parts_namespaceObject),
|
|
88
90
|
Dropdown: () => (/* reexport */ Dropdown_Dropdown),
|
|
89
91
|
DropdownArrow: () => (/* reexport */ DropdownArrow_DropdownArrow),
|
|
90
92
|
DropdownBase: () => (/* reexport */ components_DropdownBase_DropdownBase),
|
|
91
93
|
DropdownOption: () => (/* reexport */ DropdownOption_DropdownOption),
|
|
92
94
|
DropdownOptions: () => (/* reexport */ DropdownOptions_DropdownOptions),
|
|
93
95
|
DropdownToggle: () => (/* reexport */ DropdownToggle_DropdownToggle),
|
|
96
|
+
Field: () => (/* reexport */ Field_index_parts_namespaceObject),
|
|
94
97
|
Filters: () => (/* reexport */ Filters),
|
|
95
98
|
FiltersMultiSelect: () => (/* reexport */ FiltersMultiSelect),
|
|
96
99
|
FiltersMultiSelectEmpty: () => (/* reexport */ FiltersMultiSelectEmpty),
|
|
@@ -202,6 +205,7 @@ __webpack_require__.d(__webpack_exports__, {
|
|
|
202
205
|
TypeaheadOption: () => (/* reexport */ TypeaheadOption_TypeaheadOption),
|
|
203
206
|
TypeaheadOptions: () => (/* reexport */ TypeaheadOptions),
|
|
204
207
|
Typography: () => (/* reexport */ Typography_Typography),
|
|
208
|
+
UseDrawerOptions: () => (/* reexport */ useDrawer_namespaceObject.UseDrawerOptions),
|
|
205
209
|
UserProfile: () => (/* reexport */ UserProfile),
|
|
206
210
|
WidgetCard: () => (/* reexport */ WidgetCard),
|
|
207
211
|
WidgetCardBase: () => (/* reexport */ WidgetCardBase),
|
|
@@ -229,6 +233,7 @@ __webpack_require__.d(__webpack_exports__, {
|
|
|
229
233
|
styles: () => (/* reexport */ Tooltip_styles_namespaceObject),
|
|
230
234
|
useAccordionGroupContext: () => (/* reexport */ useAccordionGroupContext),
|
|
231
235
|
useCollapsibleNavBarContext: () => (/* reexport */ useCollapsibleNavBarContext),
|
|
236
|
+
useDrawer: () => (/* reexport */ useDrawer),
|
|
232
237
|
useFieldContext: () => (/* reexport */ useFieldContext),
|
|
233
238
|
useFilterMultiSelect: () => (/* reexport */ useFilterMultiSelect),
|
|
234
239
|
useFullscreenMode: () => (/* reexport */ useFullscreenMode),
|
|
@@ -880,6 +885,38 @@ __webpack_require__.d(Tooltip_styles_namespaceObject, {
|
|
|
880
885
|
small: () => (Tooltip_styles_small)
|
|
881
886
|
});
|
|
882
887
|
|
|
888
|
+
// NAMESPACE OBJECT: ./src/components/Drawer/useDrawer.tsx
|
|
889
|
+
var useDrawer_namespaceObject = {};
|
|
890
|
+
__webpack_require__.r(useDrawer_namespaceObject);
|
|
891
|
+
__webpack_require__.d(useDrawer_namespaceObject, {
|
|
892
|
+
b: () => (useDrawer)
|
|
893
|
+
});
|
|
894
|
+
|
|
895
|
+
// NAMESPACE OBJECT: ./src/components/Drawer/index.parts.ts
|
|
896
|
+
var index_parts_namespaceObject = {};
|
|
897
|
+
__webpack_require__.r(index_parts_namespaceObject);
|
|
898
|
+
__webpack_require__.d(index_parts_namespaceObject, {
|
|
899
|
+
CloseButton: () => (DrawerCloseButton),
|
|
900
|
+
Content: () => (DrawerContent),
|
|
901
|
+
Header: () => (DrawerHeader),
|
|
902
|
+
Overlay: () => (DrawerOverlay),
|
|
903
|
+
Portal: () => (DrawerPortal),
|
|
904
|
+
Root: () => (Drawer),
|
|
905
|
+
Title: () => (DrawerTitle)
|
|
906
|
+
});
|
|
907
|
+
|
|
908
|
+
// NAMESPACE OBJECT: ./src/components/Field/index.parts.ts
|
|
909
|
+
var Field_index_parts_namespaceObject = {};
|
|
910
|
+
__webpack_require__.r(Field_index_parts_namespaceObject);
|
|
911
|
+
__webpack_require__.d(Field_index_parts_namespaceObject, {
|
|
912
|
+
Control: () => (FieldControl),
|
|
913
|
+
Description: () => (FieldDescription),
|
|
914
|
+
Error: () => (FieldError),
|
|
915
|
+
Label: () => (FieldLabel),
|
|
916
|
+
Root: () => (FieldRoot),
|
|
917
|
+
Success: () => (FieldSuccess)
|
|
918
|
+
});
|
|
919
|
+
|
|
883
920
|
// NAMESPACE OBJECT: ./src/components/Charts/PieChart/colorPalettes.ts
|
|
884
921
|
var colorPalettes_namespaceObject = {};
|
|
885
922
|
__webpack_require__.r(colorPalettes_namespaceObject);
|
|
@@ -1116,6 +1153,8 @@ const main = {
|
|
|
1116
1153
|
//#487de1
|
|
1117
1154
|
blueRoyal6: 'rgba(72, 125, 225, 0.06)',
|
|
1118
1155
|
//#487DE1
|
|
1156
|
+
blueRoyal16: 'rgba(72, 125, 225, 0.16)',
|
|
1157
|
+
//#487DE1
|
|
1119
1158
|
blueRoyal12: 'rgba(72, 125, 225, 0.12)',
|
|
1120
1159
|
//#487DE1
|
|
1121
1160
|
dangerShades300: 'rgb(253, 128, 122)',
|
|
@@ -4496,8 +4535,9 @@ const InputBase = /*#__PURE__*/base_default()("input", true ? {
|
|
|
4496
4535
|
} : 0)("flex:1;background:", ({
|
|
4497
4536
|
theme
|
|
4498
4537
|
}) => theme.colors.white, ";border-radius:12px;background-origin:border-box;background-clip:padding-box,border-box;border:", ({
|
|
4538
|
+
showBorders,
|
|
4499
4539
|
theme
|
|
4500
|
-
}) => `1px solid ${theme.colors.grey}
|
|
4540
|
+
}) => showBorders ? `1px solid ${theme.colors.grey}` : 'none', ";color:", ({
|
|
4501
4541
|
theme
|
|
4502
4542
|
}) => theme.colors.greyDarker, ";width:100%;height:44px;padding:14px;font-weight:400;font-size:0.875rem;line-height:1rem;&::placeholder{color:", ({
|
|
4503
4543
|
theme
|
|
@@ -4508,8 +4548,9 @@ const InputBase = /*#__PURE__*/base_default()("input", true ? {
|
|
|
4508
4548
|
}) => theme.colors.greyLighter, ";&::placeholder{color:", ({
|
|
4509
4549
|
theme
|
|
4510
4550
|
}) => theme.colors.grey, ";}&:disabled,&:disabled:hover{border:", ({
|
|
4551
|
+
showBorders,
|
|
4511
4552
|
theme
|
|
4512
|
-
}) => `1px solid ${theme.colors.grey}
|
|
4553
|
+
}) => showBorders ? `1px solid ${theme.colors.grey}` : 'none', ";background-image:none;}}" + ( true ? "" : 0));
|
|
4513
4554
|
;// ./src/components/Input/InputGroup.tsx
|
|
4514
4555
|
|
|
4515
4556
|
const InputGroup = /*#__PURE__*/base_default()("div", true ? {
|
|
@@ -4529,7 +4570,7 @@ const basic = theme => /*#__PURE__*/(0,react_namespaceObject.css)({
|
|
|
4529
4570
|
borderColor: theme.colors.greyDarker80
|
|
4530
4571
|
},
|
|
4531
4572
|
'&:focus': {
|
|
4532
|
-
borderColor:
|
|
4573
|
+
borderColor: theme.colors.blueRoyal
|
|
4533
4574
|
}
|
|
4534
4575
|
}
|
|
4535
4576
|
}, true ? "" : 0, true ? "" : 0);
|
|
@@ -4658,6 +4699,8 @@ const InputInner = ({
|
|
|
4658
4699
|
maxLength,
|
|
4659
4700
|
helperText,
|
|
4660
4701
|
showHelperText = false,
|
|
4702
|
+
showStatusIcon = true,
|
|
4703
|
+
showBorders = true,
|
|
4661
4704
|
register,
|
|
4662
4705
|
onKeyUp
|
|
4663
4706
|
}, inputRef) => {
|
|
@@ -4667,7 +4710,7 @@ const InputInner = ({
|
|
|
4667
4710
|
}
|
|
4668
4711
|
}, []);
|
|
4669
4712
|
const [countChar, setCountChar] = external_react_default().useState(0);
|
|
4670
|
-
const
|
|
4713
|
+
const showStatusIconByProps = !disabled && !endElement && showStatusIcon;
|
|
4671
4714
|
const registerResult = register?.(name, validationSchema);
|
|
4672
4715
|
const handleCount = e => {
|
|
4673
4716
|
setCountChar(e.currentTarget.value.length);
|
|
@@ -4688,6 +4731,7 @@ const InputInner = ({
|
|
|
4688
4731
|
}) : null, (0,jsx_runtime_namespaceObject.jsx)(InputBase, {
|
|
4689
4732
|
type: type,
|
|
4690
4733
|
id: `formElement-${name}`,
|
|
4734
|
+
showBorders: showBorders,
|
|
4691
4735
|
placeholder: placeholder,
|
|
4692
4736
|
disabled: disabled,
|
|
4693
4737
|
css: /*#__PURE__*/(0,react_namespaceObject.css)({
|
|
@@ -4700,9 +4744,9 @@ const InputInner = ({
|
|
|
4700
4744
|
...registerResult,
|
|
4701
4745
|
onBlur: handleBlur,
|
|
4702
4746
|
ref: (0,external_floating_ui_react_namespaceObject.useMergeRefs)([registerResult?.ref, inputRef])
|
|
4703
|
-
}), status === 'error' &&
|
|
4747
|
+
}), status === 'error' && showStatusIconByProps ? (0,jsx_runtime_namespaceObject.jsx)(InputStatusError, {
|
|
4704
4748
|
errorTooltip: errorTooltip
|
|
4705
|
-
}) : null, status === 'success' &&
|
|
4749
|
+
}) : null, status === 'success' && showStatusIconByProps ? (0,jsx_runtime_namespaceObject.jsx)(InputStatusSuccess, {
|
|
4706
4750
|
successTooltip: successTooltip
|
|
4707
4751
|
}) : null, endElement ? (0,jsx_runtime_namespaceObject.jsx)("div", {
|
|
4708
4752
|
css: styles_endElement,
|
|
@@ -8873,7 +8917,9 @@ const external_luxon_namespaceObject = require("luxon");
|
|
|
8873
8917
|
|
|
8874
8918
|
const DaysViewCell = /*#__PURE__*/base_default()(Wrapper_Wrapper, true ? {
|
|
8875
8919
|
target: "e19kqgld2"
|
|
8876
|
-
} : 0)("width:40px;height:40px;justify-content:center;font-size:14px;font-weight:500;border-radius:
|
|
8920
|
+
} : 0)("position:relative;width:40px;height:40px;justify-content:center;font-size:14px;font-weight:500;border-radius:", ({
|
|
8921
|
+
isHighlighted
|
|
8922
|
+
}) => isHighlighted ? 0 : '6px', ";border:", ({
|
|
8877
8923
|
theme,
|
|
8878
8924
|
isCalendarDateNow
|
|
8879
8925
|
}) => isCalendarDateNow ? `1px solid ${theme.colors.greyFocused}` : 'none', ";color:", ({
|
|
@@ -8882,46 +8928,96 @@ const DaysViewCell = /*#__PURE__*/base_default()(Wrapper_Wrapper, true ? {
|
|
|
8882
8928
|
}) => isCalendarDateSelected ? theme.colors.white : theme.colors.greyDarker, ";background:", ({
|
|
8883
8929
|
theme,
|
|
8884
8930
|
isCalendarDateSelected
|
|
8885
|
-
}) => isCalendarDateSelected
|
|
8931
|
+
}) => isCalendarDateSelected && `linear-gradient(247deg, ${theme.colors.blueLighter} 14.71%, ${theme.colors.blue} 85.29%)`, ";cursor:pointer;user-select:none;&[aria-disabled='true']{color:", ({
|
|
8886
8932
|
theme
|
|
8887
|
-
}) => theme.colors.grey, ";cursor:default;pointer-events:none;}&[aria-disabled='false']
|
|
8933
|
+
}) => theme.colors.grey, ";cursor:default;pointer-events:none;}&[aria-disabled='false']{background:", ({
|
|
8934
|
+
theme,
|
|
8935
|
+
isCalendarDateSelected,
|
|
8936
|
+
isHighlighted
|
|
8937
|
+
}) => isHighlighted && !isCalendarDateSelected && theme.colors.blueRoyal16, ";&:hover{background:", ({
|
|
8888
8938
|
theme
|
|
8889
8939
|
}) => theme.colors.greyLighter, ";color:", ({
|
|
8890
8940
|
theme
|
|
8891
|
-
}) => theme.colors.greyDarker, ";}
|
|
8941
|
+
}) => theme.colors.greyDarker, ";}&::before{content:'';display:", ({
|
|
8942
|
+
isCalendarFirstDateSelected,
|
|
8943
|
+
isCalendarSecondDateSelected
|
|
8944
|
+
}) => isCalendarFirstDateSelected || isCalendarSecondDateSelected ? 'block' : 'none', ";position:absolute;width:10px;height:40px;left:", ({
|
|
8945
|
+
isCalendarFirstDateSelected
|
|
8946
|
+
}) => isCalendarFirstDateSelected ? '0' : 'auto', ";right:", ({
|
|
8947
|
+
isCalendarSecondDateSelected
|
|
8948
|
+
}) => isCalendarSecondDateSelected ? '0' : 'auto', ";z-index:-1;background:", ({
|
|
8949
|
+
theme
|
|
8950
|
+
}) => theme.colors.blueRoyal16, ";}}&:hover{border:", ({
|
|
8892
8951
|
theme,
|
|
8893
8952
|
isCalendarDateNow
|
|
8894
8953
|
}) => isCalendarDateNow && `1px solid ${theme.colors.greyFocused}`, ";}" + ( true ? "" : 0));
|
|
8895
8954
|
const YearsViewCell = /*#__PURE__*/base_default()("div", true ? {
|
|
8896
8955
|
target: "e19kqgld1"
|
|
8897
|
-
} : 0)("display:flex;justify-content:center;align-items:center;width:70px;height:40px;border-radius:
|
|
8956
|
+
} : 0)("display:flex;justify-content:center;position:relative;align-items:center;width:70px;height:40px;border-radius:", ({
|
|
8957
|
+
isCalendarFirstDateSelected,
|
|
8958
|
+
isCalendarSecondDateSelected
|
|
8959
|
+
}) => isCalendarFirstDateSelected || isCalendarSecondDateSelected ? '6px' : 0, ";font-size:14px;font-weight:500px;user-select:none;cursor:pointer;color:", ({
|
|
8898
8960
|
theme,
|
|
8899
|
-
isCalendarYear
|
|
8900
|
-
|
|
8961
|
+
isCalendarYear,
|
|
8962
|
+
isCalendarSecondDateSelected
|
|
8963
|
+
}) => (isCalendarYear || isCalendarSecondDateSelected) && theme.colors.white, ";background:", ({
|
|
8901
8964
|
theme,
|
|
8965
|
+
isCalendarYear,
|
|
8966
|
+
isCalendarSecondDateSelected
|
|
8967
|
+
}) => isCalendarYear || isCalendarSecondDateSelected ? `linear-gradient(247.37deg, ${theme.colors.blueLighter} 14.71%, ${theme.colors.blue} 85.29%)` : 'none', ";background:", ({
|
|
8968
|
+
theme,
|
|
8969
|
+
isHighlighted,
|
|
8902
8970
|
isCalendarYear
|
|
8903
|
-
}) =>
|
|
8971
|
+
}) => isHighlighted && !isCalendarYear && theme.colors.blueRoyal16, ";&:hover{background:", ({
|
|
8904
8972
|
theme
|
|
8905
8973
|
}) => theme.colors.greyLighter, ";color:", ({
|
|
8906
8974
|
theme
|
|
8907
|
-
}) => theme.colors.greyDarker, ";}"
|
|
8975
|
+
}) => theme.colors.greyDarker, ";}&::before{content:'';display:", ({
|
|
8976
|
+
isCalendarFirstDateSelected,
|
|
8977
|
+
isCalendarSecondDateSelected
|
|
8978
|
+
}) => isCalendarFirstDateSelected || isCalendarSecondDateSelected ? 'block' : 'none', ";position:absolute;width:10px;height:40px;left:", ({
|
|
8979
|
+
isCalendarSecondDateSelected
|
|
8980
|
+
}) => isCalendarSecondDateSelected ? '0' : 'auto', ";right:", ({
|
|
8981
|
+
isCalendarFirstDateSelected
|
|
8982
|
+
}) => isCalendarFirstDateSelected ? '0' : 'auto', ";z-index:-1;background:", ({
|
|
8983
|
+
theme
|
|
8984
|
+
}) => theme.colors.blueRoyal16, ";}" + ( true ? "" : 0));
|
|
8908
8985
|
const MonthsViewCell = /*#__PURE__*/base_default()("div", true ? {
|
|
8909
8986
|
target: "e19kqgld0"
|
|
8910
|
-
} : 0)("display:flex;justify-content:center;align-items:center;width:99px;height:40px;border-radius:
|
|
8987
|
+
} : 0)("display:flex;justify-content:center;position:relative;align-items:center;width:99px;height:40px;border-radius:", ({
|
|
8988
|
+
isCalendarFirstDateSelected,
|
|
8989
|
+
isCalendarSecondDateSelected
|
|
8990
|
+
}) => isCalendarFirstDateSelected || isCalendarSecondDateSelected ? '6px' : 0, ";font-size:14px;font-weight:500;cursor:pointer;color:", ({
|
|
8911
8991
|
theme,
|
|
8912
|
-
isCalendarMonth
|
|
8913
|
-
|
|
8992
|
+
isCalendarMonth,
|
|
8993
|
+
isCalendarSecondDateSelected
|
|
8994
|
+
}) => (isCalendarMonth || isCalendarSecondDateSelected) && theme.colors.white, ";user-select:none;background:", ({
|
|
8914
8995
|
theme,
|
|
8915
|
-
isCalendarMonth
|
|
8916
|
-
|
|
8996
|
+
isCalendarMonth,
|
|
8997
|
+
isCalendarSecondDateSelected
|
|
8998
|
+
}) => isCalendarMonth || isCalendarSecondDateSelected ? `linear-gradient(247.37deg, ${theme.colors.blueLighter} 14.71%, ${theme.colors.blue} 85.29%)` : 'none', ";&[aria-disabled='true']{cursor:default;pointer-events:none;color:", ({
|
|
8917
8999
|
theme
|
|
8918
9000
|
}) => theme.colors.greyDarker, ";background:", ({
|
|
8919
9001
|
theme
|
|
8920
|
-
}) => theme.colors.grey, ";}&[aria-disabled='false']
|
|
9002
|
+
}) => theme.colors.grey, ";}&[aria-disabled='false']{background:", ({
|
|
9003
|
+
theme,
|
|
9004
|
+
isHighlighted,
|
|
9005
|
+
isCalendarMonth,
|
|
9006
|
+
isCalendarSecondDateSelected
|
|
9007
|
+
}) => isHighlighted && !isCalendarMonth && !isCalendarSecondDateSelected && theme.colors.blueRoyal16, ";&:hover{background:", ({
|
|
8921
9008
|
theme
|
|
8922
9009
|
}) => theme.colors.greyLighter, ";color:", ({
|
|
8923
9010
|
theme
|
|
8924
|
-
}) => theme.colors.greyDarker, ";}"
|
|
9011
|
+
}) => theme.colors.greyDarker, ";}&::before{content:'';display:", ({
|
|
9012
|
+
isCalendarFirstDateSelected,
|
|
9013
|
+
isCalendarSecondDateSelected
|
|
9014
|
+
}) => isCalendarFirstDateSelected || isCalendarSecondDateSelected ? 'block' : 'none', ";position:absolute;width:10px;height:40px;left:", ({
|
|
9015
|
+
isCalendarSecondDateSelected
|
|
9016
|
+
}) => isCalendarSecondDateSelected ? '0' : 'auto', ";right:", ({
|
|
9017
|
+
isCalendarFirstDateSelected
|
|
9018
|
+
}) => isCalendarFirstDateSelected ? '0' : 'auto', ";z-index:-1;background:", ({
|
|
9019
|
+
theme
|
|
9020
|
+
}) => theme.colors.blueRoyal16, ";}}" + ( true ? "" : 0));
|
|
8925
9021
|
;// ./src/components/DatePicker/utils/dates.ts
|
|
8926
9022
|
|
|
8927
9023
|
const getDaysForCalendarMonth = date => {
|
|
@@ -9080,6 +9176,12 @@ const useDatePicker = ({
|
|
|
9080
9176
|
});
|
|
9081
9177
|
const [isLoading, setLoading] = (0,external_react_namespaceObject.useState)(true);
|
|
9082
9178
|
const [dateTime, setDateTime] = (0,external_react_namespaceObject.useState)();
|
|
9179
|
+
const [lastChangedDate, setLastChangedDate] = (0,external_react_namespaceObject.useState)(undefined);
|
|
9180
|
+
const [dateTimeForChangeEvent, setDateTimeForChangeEvent] = (0,external_react_namespaceObject.useState)(undefined);
|
|
9181
|
+
const [currentError, setCurrentError] = (0,external_react_namespaceObject.useState)({
|
|
9182
|
+
date: null,
|
|
9183
|
+
error: null
|
|
9184
|
+
});
|
|
9083
9185
|
const [isOpen, setIsOpen] = (0,external_react_namespaceObject.useState)(false);
|
|
9084
9186
|
const splittedFormat = format.split('/');
|
|
9085
9187
|
const [formatIndexes, setFormatIndexes] = (0,external_react_namespaceObject.useState)({
|
|
@@ -9108,6 +9210,31 @@ const useDatePicker = ({
|
|
|
9108
9210
|
month: dateMinParts[formatIndexes['month']],
|
|
9109
9211
|
day: dateMinParts[formatIndexes['day']]
|
|
9110
9212
|
});
|
|
9213
|
+
const safeOnChange = newDateTime => {
|
|
9214
|
+
const _newDateTime = newDateTime ? newDateTime.startOf('day') : undefined;
|
|
9215
|
+
const _dateTimeForChangeEvent = dateTimeForChangeEvent ? dateTimeForChangeEvent.startOf('day') : undefined;
|
|
9216
|
+
if (_newDateTime?.toMillis() !== _dateTimeForChangeEvent?.toMillis()) {
|
|
9217
|
+
setDateTimeForChangeEvent(newDateTime);
|
|
9218
|
+
if (_newDateTime) {
|
|
9219
|
+
setLastChangedDate(_newDateTime.toJSDate());
|
|
9220
|
+
onChange?.(_newDateTime.toJSDate());
|
|
9221
|
+
} else {
|
|
9222
|
+
setLastChangedDate(undefined);
|
|
9223
|
+
onChange?.();
|
|
9224
|
+
}
|
|
9225
|
+
}
|
|
9226
|
+
};
|
|
9227
|
+
|
|
9228
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
9229
|
+
const safeOnError = (date, error) => {
|
|
9230
|
+
if (currentError.date !== date && currentError.error !== error) {
|
|
9231
|
+
setCurrentError({
|
|
9232
|
+
date,
|
|
9233
|
+
error
|
|
9234
|
+
});
|
|
9235
|
+
onError?.(date, error);
|
|
9236
|
+
}
|
|
9237
|
+
};
|
|
9111
9238
|
const processValue = newValue => {
|
|
9112
9239
|
const newDateTime = typeof newValue === 'string' && newValue.length === 10 ? external_luxon_namespaceObject.DateTime.fromFormat(newValue, luxonFormat) : undefined;
|
|
9113
9240
|
if (!newDateTime?.isValid) {
|
|
@@ -9118,8 +9245,8 @@ const useDatePicker = ({
|
|
|
9118
9245
|
shouldFocus: true
|
|
9119
9246
|
});
|
|
9120
9247
|
setDateTime(undefined);
|
|
9121
|
-
|
|
9122
|
-
|
|
9248
|
+
safeOnChange();
|
|
9249
|
+
safeOnError?.(newValue, errorMessage);
|
|
9123
9250
|
} else if (newDateTime !== undefined) {
|
|
9124
9251
|
if (newDateTime < dateMinDT || newDateTime > dateMaxDT) {
|
|
9125
9252
|
const errorMessage = OUT_OF_RANGE;
|
|
@@ -9129,23 +9256,25 @@ const useDatePicker = ({
|
|
|
9129
9256
|
shouldFocus: true
|
|
9130
9257
|
});
|
|
9131
9258
|
setDateTime(undefined);
|
|
9132
|
-
|
|
9133
|
-
|
|
9259
|
+
safeOnError?.(newValue, errorMessage);
|
|
9260
|
+
safeOnChange();
|
|
9134
9261
|
} else {
|
|
9135
9262
|
setDateTime(newDateTime);
|
|
9136
9263
|
clearErrors();
|
|
9137
|
-
|
|
9138
|
-
|
|
9264
|
+
safeOnError?.(null);
|
|
9265
|
+
safeOnChange?.(newDateTime);
|
|
9139
9266
|
}
|
|
9140
9267
|
}
|
|
9141
9268
|
};
|
|
9142
9269
|
const handleBlur = event => {
|
|
9143
9270
|
event.preventDefault();
|
|
9144
9271
|
const blurredValue = event.currentTarget.value;
|
|
9145
|
-
|
|
9272
|
+
if (blurredValue.length > 0) {
|
|
9273
|
+
processValue(blurredValue);
|
|
9274
|
+
}
|
|
9146
9275
|
};
|
|
9147
9276
|
(0,external_react_namespaceObject.useEffect)(() => {
|
|
9148
|
-
if (typeof inputValue === 'string' && inputValue.length < 10) {
|
|
9277
|
+
if (typeof inputValue === 'string' && inputValue.length && inputValue.length < 10) {
|
|
9149
9278
|
setIsOpen(false);
|
|
9150
9279
|
setTimeout(() => {
|
|
9151
9280
|
maskInputRef.current.focus();
|
|
@@ -9239,6 +9368,9 @@ const useDatePicker = ({
|
|
|
9239
9368
|
calendarViewDateTime,
|
|
9240
9369
|
maskInputRef,
|
|
9241
9370
|
calendarType,
|
|
9371
|
+
lastChangedDate,
|
|
9372
|
+
luxonFormat,
|
|
9373
|
+
safeOnChange,
|
|
9242
9374
|
setCalendarType,
|
|
9243
9375
|
setCalendarViewDateTime,
|
|
9244
9376
|
setDateTime,
|
|
@@ -9261,6 +9393,7 @@ const DatePickerContext = /*#__PURE__*/(0,external_react_namespaceObject.createC
|
|
|
9261
9393
|
inputRef: {
|
|
9262
9394
|
current: null
|
|
9263
9395
|
},
|
|
9396
|
+
inputProps: {},
|
|
9264
9397
|
isOpen: false,
|
|
9265
9398
|
calendarType: 'days',
|
|
9266
9399
|
inputValue: undefined,
|
|
@@ -9301,6 +9434,11 @@ const DatePickerProvider = ({
|
|
|
9301
9434
|
restHook.handleBlur(e);
|
|
9302
9435
|
rest.onBlur?.(e);
|
|
9303
9436
|
};
|
|
9437
|
+
(0,external_react_namespaceObject.useEffect)(() => {
|
|
9438
|
+
if (typeof rest.isOpenToggle === 'boolean') {
|
|
9439
|
+
restHook.setIsOpen(current => !current);
|
|
9440
|
+
}
|
|
9441
|
+
}, [rest.isOpenToggle]);
|
|
9304
9442
|
return (0,jsx_runtime_namespaceObject.jsx)(DatePickerContext.Provider, {
|
|
9305
9443
|
value: {
|
|
9306
9444
|
...rest,
|
|
@@ -9344,16 +9482,23 @@ const DaysView = () => {
|
|
|
9344
9482
|
calendarViewDateTime,
|
|
9345
9483
|
dateMinDT,
|
|
9346
9484
|
dateMaxDT,
|
|
9485
|
+
lastChangedDate,
|
|
9486
|
+
highlightDates,
|
|
9347
9487
|
setCalendarViewDateTime,
|
|
9348
9488
|
setDateTime,
|
|
9349
9489
|
setIsOpen,
|
|
9350
|
-
|
|
9490
|
+
safeOnChange
|
|
9351
9491
|
} = useDatePickerContext();
|
|
9352
9492
|
const selectedDateTime = dateTime?.toFormat('D');
|
|
9353
9493
|
const currentDate = calendarViewDateTime?.toJSDate();
|
|
9354
9494
|
const currentMonth = currentDate?.getMonth();
|
|
9355
9495
|
const dates = getDaysForCalendarMonth(currentDate);
|
|
9356
9496
|
const nowDate = external_luxon_namespaceObject.DateTime.fromJSDate(new Date()).toFormat('D');
|
|
9497
|
+
const isHighlightEnabled = !!highlightDates?.enabled;
|
|
9498
|
+
const {
|
|
9499
|
+
otherDate
|
|
9500
|
+
} = highlightDates || {};
|
|
9501
|
+
const otherDateDT = otherDate && external_luxon_namespaceObject.DateTime.fromJSDate(otherDate);
|
|
9357
9502
|
const handleDaySelect = event => {
|
|
9358
9503
|
const {
|
|
9359
9504
|
target
|
|
@@ -9366,7 +9511,7 @@ const DaysView = () => {
|
|
|
9366
9511
|
});
|
|
9367
9512
|
setCalendarViewDateTime(newDate);
|
|
9368
9513
|
setDateTime(newDate);
|
|
9369
|
-
|
|
9514
|
+
safeOnChange?.(newDate);
|
|
9370
9515
|
setIsOpen(false);
|
|
9371
9516
|
}
|
|
9372
9517
|
};
|
|
@@ -9387,8 +9532,14 @@ const DaysView = () => {
|
|
|
9387
9532
|
const calendarMonth = currentDate.getMonth();
|
|
9388
9533
|
const ariaLabel = currentDT.toLocaleString(external_luxon_namespaceObject.DateTime.DATE_HUGE);
|
|
9389
9534
|
const isCalendarDateNow = nowDate === calendarDate;
|
|
9390
|
-
const isCalendarDateSelected = selectedDateTime === calendarDate;
|
|
9391
9535
|
const isCalendarMonth = currentMonth === calendarMonth;
|
|
9536
|
+
const isCalendarFirstDateSelected = calendarDate === selectedDateTime;
|
|
9537
|
+
const isCalendarSecondDateSelected = calendarDate === otherDateDT?.toFormat('D');
|
|
9538
|
+
const isCalendarDateSelected = isCalendarFirstDateSelected || isCalendarSecondDateSelected;
|
|
9539
|
+
let isHighlightDate = false;
|
|
9540
|
+
if (isHighlightEnabled && lastChangedDate && otherDateDT && dateTime) {
|
|
9541
|
+
isHighlightDate = highlightDates.mode === 'dateTo' ? otherDateDT < currentDT && currentDT < dateTime : dateTime < currentDT && currentDT < otherDateDT;
|
|
9542
|
+
}
|
|
9392
9543
|
let isAriaDisabled = false;
|
|
9393
9544
|
if (dateMinDT && dateMaxDT) {
|
|
9394
9545
|
isAriaDisabled = currentDT < dateMinDT || currentDT > dateMaxDT || !isCalendarMonth;
|
|
@@ -9405,6 +9556,9 @@ const DaysView = () => {
|
|
|
9405
9556
|
"aria-label": ariaLabel,
|
|
9406
9557
|
isCalendarDateNow: isCalendarDateNow,
|
|
9407
9558
|
isCalendarDateSelected: isCalendarDateSelected,
|
|
9559
|
+
isCalendarFirstDateSelected: isCalendarFirstDateSelected,
|
|
9560
|
+
isCalendarSecondDateSelected: isCalendarSecondDateSelected,
|
|
9561
|
+
isHighlighted: isHighlightDate,
|
|
9408
9562
|
children: calendarDay
|
|
9409
9563
|
}, `day-${currentDate.getFullYear()}-${currentDate.getMonth()}-${currentDate.getDate()}-${index}`);
|
|
9410
9564
|
})
|
|
@@ -9425,14 +9579,22 @@ var MonthsView_ref = true ? {
|
|
|
9425
9579
|
} : 0;
|
|
9426
9580
|
const MonthsView = () => {
|
|
9427
9581
|
const {
|
|
9582
|
+
dateTime,
|
|
9428
9583
|
calendarViewDateTime,
|
|
9429
9584
|
dateMinDT,
|
|
9430
9585
|
dateMaxDT,
|
|
9586
|
+
lastChangedDate,
|
|
9587
|
+
highlightDates,
|
|
9431
9588
|
setCalendarType,
|
|
9432
9589
|
setDateTime,
|
|
9433
9590
|
setCalendarViewDateTime,
|
|
9434
9591
|
onMonthChange
|
|
9435
9592
|
} = useDatePickerContext();
|
|
9593
|
+
const isHighlightEnabled = !!highlightDates?.enabled;
|
|
9594
|
+
const {
|
|
9595
|
+
otherDate
|
|
9596
|
+
} = highlightDates || {};
|
|
9597
|
+
const otherDateDT = otherDate && external_luxon_namespaceObject.DateTime.fromJSDate(otherDate);
|
|
9436
9598
|
const handleMonthSelect = event => {
|
|
9437
9599
|
const {
|
|
9438
9600
|
target
|
|
@@ -9467,10 +9629,19 @@ const MonthsView = () => {
|
|
|
9467
9629
|
const isMinMonthReached = dateMinDT ? currentMonthDT.month < dateMinDT.month && currentMonthDT.year === dateMinDT.year : false;
|
|
9468
9630
|
const isMaxMonthReached = dateMaxDT ? currentMonthDT.month > dateMaxDT.month && currentMonthDT.year === dateMaxDT.year : false;
|
|
9469
9631
|
const isAriaDisabled = isMinMonthReached || isMaxMonthReached;
|
|
9632
|
+
const isCalendarFirstDateSelected = currentMonthDT.toFormat('yyyy-MM') === dateTime?.toFormat('yyyy-MM');
|
|
9633
|
+
const isCalendarSecondDateSelected = currentMonthDT.toFormat('yyyy-MM') === otherDateDT?.toFormat('yyyy-MM');
|
|
9634
|
+
let isHighlightDate = false;
|
|
9635
|
+
if (isHighlightEnabled && lastChangedDate && otherDateDT && dateTime) {
|
|
9636
|
+
isHighlightDate = highlightDates.mode === 'dateTo' ? otherDateDT < currentMonthDT && currentMonthDT < dateTime : dateTime < currentMonthDT && currentMonthDT < otherDateDT;
|
|
9637
|
+
}
|
|
9470
9638
|
return (0,jsx_runtime_namespaceObject.jsx)(MonthsViewCell, {
|
|
9471
9639
|
isCalendarMonth: isCalendarMonth,
|
|
9472
9640
|
"aria-disabled": isAriaDisabled,
|
|
9473
9641
|
"aria-label": `${month}, ${calendarViewDateTime?.year}`,
|
|
9642
|
+
isCalendarFirstDateSelected: isCalendarFirstDateSelected,
|
|
9643
|
+
isCalendarSecondDateSelected: isCalendarSecondDateSelected,
|
|
9644
|
+
isHighlighted: isHighlightDate,
|
|
9474
9645
|
children: month
|
|
9475
9646
|
}, month);
|
|
9476
9647
|
})
|
|
@@ -9484,16 +9655,20 @@ function YearsView_EMOTION_STRINGIFIED_CSS_ERROR_() { return "You have tried to
|
|
|
9484
9655
|
|
|
9485
9656
|
|
|
9486
9657
|
|
|
9658
|
+
|
|
9487
9659
|
var YearsView_ref = true ? {
|
|
9488
9660
|
name: "1n393qe",
|
|
9489
9661
|
styles: "flex-wrap:wrap;overflow-y:auto;height:280px;align-content:flex-start"
|
|
9490
9662
|
} : 0;
|
|
9491
9663
|
const YearsView = () => {
|
|
9492
9664
|
const {
|
|
9665
|
+
dateTime,
|
|
9493
9666
|
calendarViewDateTime,
|
|
9494
9667
|
dateMinParts,
|
|
9495
9668
|
dateMaxParts,
|
|
9496
9669
|
formatIndexes,
|
|
9670
|
+
lastChangedDate,
|
|
9671
|
+
highlightDates,
|
|
9497
9672
|
setCalendarType,
|
|
9498
9673
|
setCalendarViewDateTime,
|
|
9499
9674
|
setDateTime,
|
|
@@ -9504,6 +9679,11 @@ const YearsView = () => {
|
|
|
9504
9679
|
yearsFrom: dateMinParts[formatIndexes['year']],
|
|
9505
9680
|
yearsCount: dateMaxParts[formatIndexes['year']] - dateMinParts[formatIndexes['year']] + 1
|
|
9506
9681
|
});
|
|
9682
|
+
const isHighlightEnabled = !!highlightDates?.enabled;
|
|
9683
|
+
const {
|
|
9684
|
+
otherDate
|
|
9685
|
+
} = highlightDates || {};
|
|
9686
|
+
const otherDateDT = otherDate && external_luxon_namespaceObject.DateTime.fromJSDate(otherDate);
|
|
9507
9687
|
(0,external_react_namespaceObject.useEffect)(() => {
|
|
9508
9688
|
if (calendarViewDateTime && wrapper.current) {
|
|
9509
9689
|
wrapper.current.querySelector('[aria-current=date]')?.scrollIntoView({
|
|
@@ -9537,8 +9717,17 @@ const YearsView = () => {
|
|
|
9537
9717
|
if (isCalendarYear) {
|
|
9538
9718
|
additionalProps['aria-current'] = 'date';
|
|
9539
9719
|
}
|
|
9720
|
+
const isCalendarFirstDateSelected = year.toString() === dateTime?.toFormat('yyyy');
|
|
9721
|
+
const isCalendarSecondDateSelected = year.toString() === otherDateDT?.toFormat('yyyy');
|
|
9722
|
+
let isHighlightDate = false;
|
|
9723
|
+
if (isHighlightEnabled && lastChangedDate && otherDateDT && dateTime) {
|
|
9724
|
+
isHighlightDate = highlightDates.mode === 'dateTo' ? otherDateDT.year < year && year < dateTime.year : dateTime.year < year && year < otherDateDT.year;
|
|
9725
|
+
}
|
|
9540
9726
|
return (0,jsx_runtime_namespaceObject.jsx)(YearsViewCell, {
|
|
9541
9727
|
isCalendarYear: isCalendarYear,
|
|
9728
|
+
isCalendarFirstDateSelected: isCalendarFirstDateSelected,
|
|
9729
|
+
isCalendarSecondDateSelected: isCalendarSecondDateSelected,
|
|
9730
|
+
isHighlighted: isHighlightDate,
|
|
9542
9731
|
...additionalProps,
|
|
9543
9732
|
children: year
|
|
9544
9733
|
}, `year-${year}`);
|
|
@@ -9738,11 +9927,17 @@ const DatePickerTrigger = () => {
|
|
|
9738
9927
|
label,
|
|
9739
9928
|
openCalendarMode,
|
|
9740
9929
|
inputRef,
|
|
9930
|
+
inputProps,
|
|
9741
9931
|
disabled,
|
|
9742
9932
|
helperText,
|
|
9933
|
+
showCalendarIcon,
|
|
9743
9934
|
onBlur: handleBlur,
|
|
9744
9935
|
setIsOpen
|
|
9745
9936
|
} = useDatePickerContext();
|
|
9937
|
+
const {
|
|
9938
|
+
inputProps: inputElementProps,
|
|
9939
|
+
...restInputProps
|
|
9940
|
+
} = inputProps || {};
|
|
9746
9941
|
const formContext = (0,external_react_hook_form_namespaceObject.useFormContext)(); // Using FormProvider from react-hook-form
|
|
9747
9942
|
const useFormResult = (0,external_react_hook_form_namespaceObject.useForm)();
|
|
9748
9943
|
const theme = (0,react_namespaceObject.useTheme)();
|
|
@@ -9763,25 +9958,29 @@ const DatePickerTrigger = () => {
|
|
|
9763
9958
|
if (openCalendarMode === 'both' || openCalendarMode === 'input' && tagName === 'input' || openCalendarMode === 'icon' && tagName === 'button') {
|
|
9764
9959
|
toggleOpen();
|
|
9765
9960
|
}
|
|
9961
|
+
if (e.currentTarget instanceof HTMLInputElement) {
|
|
9962
|
+
inputProps?.inputProps?.onClick?.(e);
|
|
9963
|
+
}
|
|
9766
9964
|
};
|
|
9767
9965
|
return (0,jsx_runtime_namespaceObject.jsxs)((external_react_default()).Fragment, {
|
|
9768
9966
|
children: [label && (0,jsx_runtime_namespaceObject.jsx)(Label_Label, {
|
|
9769
|
-
htmlFor:
|
|
9967
|
+
htmlFor: name,
|
|
9770
9968
|
children: label
|
|
9771
9969
|
}), (0,jsx_runtime_namespaceObject.jsx)(PopoverTrigger, {
|
|
9772
9970
|
asChild: true,
|
|
9773
9971
|
children: (0,jsx_runtime_namespaceObject.jsx)(Input_Input, {
|
|
9774
9972
|
name: name,
|
|
9775
9973
|
placeholder: format,
|
|
9776
|
-
showHelperText: true,
|
|
9777
9974
|
ref: inputRef,
|
|
9778
9975
|
disabled: disabled,
|
|
9779
9976
|
register: register,
|
|
9780
9977
|
inputProps: {
|
|
9781
9978
|
onBlur: handleBlur,
|
|
9782
9979
|
onClick: handleToggleOpen,
|
|
9783
|
-
id:
|
|
9784
|
-
'data-testid': 'datepicker-input'
|
|
9980
|
+
id: inputProps?.inputProps?.id || name,
|
|
9981
|
+
'data-testid': 'datepicker-input',
|
|
9982
|
+
autoComplete: 'off',
|
|
9983
|
+
...inputElementProps
|
|
9785
9984
|
},
|
|
9786
9985
|
errors: fieldError,
|
|
9787
9986
|
status: fieldStatus,
|
|
@@ -9790,7 +9989,7 @@ const DatePickerTrigger = () => {
|
|
|
9790
9989
|
name: "lhoo11",
|
|
9791
9990
|
styles: "&>span::first-letter{text-transform:uppercase;}"
|
|
9792
9991
|
} : 0),
|
|
9793
|
-
endElement: (0,jsx_runtime_namespaceObject.jsx)(Button_Button, {
|
|
9992
|
+
endElement: showCalendarIcon ? (0,jsx_runtime_namespaceObject.jsx)(Button_Button, {
|
|
9794
9993
|
endIcon: (0,jsx_runtime_namespaceObject.jsx)(Icon_Icon, {
|
|
9795
9994
|
name: "calendar",
|
|
9796
9995
|
size: 16,
|
|
@@ -9808,7 +10007,8 @@ const DatePickerTrigger = () => {
|
|
|
9808
10007
|
display: 'none'
|
|
9809
10008
|
}
|
|
9810
10009
|
}, true ? "" : 0, true ? "" : 0)
|
|
9811
|
-
})
|
|
10010
|
+
}) : undefined,
|
|
10011
|
+
...restInputProps
|
|
9812
10012
|
})
|
|
9813
10013
|
})]
|
|
9814
10014
|
});
|
|
@@ -9842,11 +10042,15 @@ const DatePickerContent = () => {
|
|
|
9842
10042
|
const DatePickerInner = ({
|
|
9843
10043
|
format = DEFAULT_MASK_FORMAT,
|
|
9844
10044
|
openCalendarMode = 'icon',
|
|
10045
|
+
showCalendarIcon = true,
|
|
10046
|
+
isOpenToggle,
|
|
9845
10047
|
...rest
|
|
9846
10048
|
}, inputRef) => (0,jsx_runtime_namespaceObject.jsx)(DatePickerProvider, {
|
|
9847
10049
|
format: format,
|
|
9848
10050
|
openCalendarMode: openCalendarMode,
|
|
9849
10051
|
inputRef: inputRef,
|
|
10052
|
+
showCalendarIcon: showCalendarIcon,
|
|
10053
|
+
isOpenToggle: isOpenToggle,
|
|
9850
10054
|
...rest,
|
|
9851
10055
|
children: (0,jsx_runtime_namespaceObject.jsx)(DatePickerContent, {})
|
|
9852
10056
|
});
|
|
@@ -9856,122 +10060,866 @@ const DatePicker = /*#__PURE__*/(0,external_react_namespaceObject.forwardRef)(Da
|
|
|
9856
10060
|
;// ./src/components/Field/FieldProvider.ts
|
|
9857
10061
|
|
|
9858
10062
|
const [FieldProvider, useFieldContext] = (0,hooks_namespaceObject.createSafeContext)('useFieldContext must be used within a FieldProvider');
|
|
9859
|
-
;// ./src/components/Field/
|
|
9860
|
-
|
|
9861
|
-
|
|
9862
|
-
|
|
9863
|
-
;// ./src/components/TableFilters/styles.ts
|
|
9864
|
-
function TableFilters_styles_EMOTION_STRINGIFIED_CSS_ERROR_() { return "You have tried to stringify object returned from `css` function. It isn't supposed to be used directly (e.g. as value of the `className` prop), but rather handed to emotion so it can handle it (e.g. as value of `css` prop)."; }
|
|
10063
|
+
;// ./src/components/Field/FieldRoot.tsx
|
|
9865
10064
|
|
|
9866
|
-
const tableFilterPopoverContentStyles = theme => /*#__PURE__*/(0,react_namespaceObject.css)("border:1px solid ", theme.colors.greyDropdownMain, ";border-radius:20px;padding:20px 20px 14px 18px;width:340px;background:", theme.colors.white, ";z-index:1;" + ( true ? "" : 0), true ? "" : 0);
|
|
9867
|
-
const tableFilterDividerStyles = theme => /*#__PURE__*/(0,react_namespaceObject.css)("border:1px solid ", theme.colors.greyDropdownMain, ";width:calc(100% + 38px);margin:22px auto 14px -19px;" + ( true ? "" : 0), true ? "" : 0);
|
|
9868
|
-
const baseButtonStyle = true ? {
|
|
9869
|
-
name: "jk3zq0",
|
|
9870
|
-
styles: "padding:0 14px;height:38px;border-radius:5px;font-size:14px;font-weight:600;&:hover{box-shadow:none;}"
|
|
9871
|
-
} : 0;
|
|
9872
|
-
;// ./src/components/TableFilters/TableFilterTrigger.tsx
|
|
9873
10065
|
|
|
10066
|
+
const FieldRoot = ({
|
|
10067
|
+
children,
|
|
10068
|
+
...props
|
|
10069
|
+
}) => {
|
|
10070
|
+
const {
|
|
10071
|
+
disabled = false,
|
|
10072
|
+
status = 'basic',
|
|
10073
|
+
forwardFocus = true,
|
|
10074
|
+
...divProps
|
|
10075
|
+
} = props;
|
|
10076
|
+
return (0,jsx_runtime_namespaceObject.jsx)("div", {
|
|
10077
|
+
...divProps,
|
|
10078
|
+
children: (0,jsx_runtime_namespaceObject.jsx)(FieldProvider, {
|
|
10079
|
+
value: {
|
|
10080
|
+
disabled,
|
|
10081
|
+
status,
|
|
10082
|
+
forwardFocus
|
|
10083
|
+
},
|
|
10084
|
+
children: children
|
|
10085
|
+
})
|
|
10086
|
+
});
|
|
10087
|
+
};
|
|
10088
|
+
;// ./src/components/Field/FieldLabel.tsx
|
|
9874
10089
|
|
|
9875
10090
|
|
|
9876
10091
|
|
|
9877
|
-
const
|
|
9878
|
-
const TableFilterTrigger = ({
|
|
10092
|
+
const FieldLabel = ({
|
|
9879
10093
|
children,
|
|
9880
|
-
|
|
9881
|
-
...rest
|
|
10094
|
+
...props
|
|
9882
10095
|
}) => {
|
|
9883
|
-
const
|
|
9884
|
-
return (0,jsx_runtime_namespaceObject.jsx)(
|
|
9885
|
-
|
|
9886
|
-
|
|
9887
|
-
endIcon: (0,jsx_runtime_namespaceObject.jsx)(Icon_Icon, {
|
|
9888
|
-
name: "filter",
|
|
9889
|
-
color: theme.colors.greyFilterIcon,
|
|
9890
|
-
size: 20
|
|
9891
|
-
}),
|
|
9892
|
-
...rest,
|
|
10096
|
+
const ctx = useFieldContext();
|
|
10097
|
+
return (0,jsx_runtime_namespaceObject.jsx)(Label_Label, {
|
|
10098
|
+
isDisabled: ctx.disabled,
|
|
10099
|
+
...props,
|
|
9893
10100
|
children: children
|
|
9894
10101
|
});
|
|
9895
10102
|
};
|
|
9896
|
-
;// ./src/components/
|
|
9897
|
-
function TableFilterTriggerWithNotification_EMOTION_STRINGIFIED_CSS_ERROR_() { return "You have tried to stringify object returned from `css` function. It isn't supposed to be used directly (e.g. as value of the `className` prop), but rather handed to emotion so it can handle it (e.g. as value of `css` prop)."; }
|
|
10103
|
+
;// ./src/components/Field/FieldControl.tsx
|
|
9898
10104
|
|
|
9899
10105
|
|
|
9900
10106
|
|
|
9901
10107
|
|
|
9902
|
-
|
|
9903
|
-
|
|
9904
|
-
|
|
9905
|
-
|
|
9906
|
-
|
|
9907
|
-
children,
|
|
9908
|
-
count,
|
|
9909
|
-
visible = true
|
|
10108
|
+
const FieldControlBase = /*#__PURE__*/base_default()("div", true ? {
|
|
10109
|
+
target: "e1lr2tz0"
|
|
10110
|
+
} : 0)("display:flex;align-items:center;min-height:44px;height:auto;border-radius:8px;overflow:hidden;border:1px solid ", ({
|
|
10111
|
+
status,
|
|
10112
|
+
theme
|
|
9910
10113
|
}) => {
|
|
9911
|
-
|
|
9912
|
-
|
|
9913
|
-
|
|
10114
|
+
if (status === 'error') return theme.colors.red;
|
|
10115
|
+
if (status === 'success') return theme.colors.greenLighter;
|
|
10116
|
+
return theme.colors.grey;
|
|
10117
|
+
}, ";background:", ({
|
|
10118
|
+
disabled,
|
|
10119
|
+
theme
|
|
10120
|
+
}) => disabled ? theme.colors.greyLighter : theme.colors.white, ";&>*{background:transparent;}&:active,&:hover{background:", ({
|
|
10121
|
+
disabled,
|
|
10122
|
+
theme
|
|
10123
|
+
}) => disabled ? theme.colors.greyLighter : theme.colors.white, ";box-shadow:none;}&:hover{cursor:", ({
|
|
10124
|
+
disabled
|
|
10125
|
+
}) => disabled ? 'default' : 'pointer', ";}&:focus-within,&:active{border-color:", ({
|
|
10126
|
+
status,
|
|
10127
|
+
disabled,
|
|
10128
|
+
theme
|
|
10129
|
+
}) => {
|
|
10130
|
+
if (disabled) return theme.colors.grey;
|
|
10131
|
+
if (status === 'error') return theme.colors.red;
|
|
10132
|
+
if (status === 'success') return theme.colors.greenLighter;
|
|
10133
|
+
return theme.colors.blueRoyal;
|
|
10134
|
+
}, ";}" + ( true ? "" : 0));
|
|
10135
|
+
const isForwardRefComponent = component => {
|
|
10136
|
+
if (typeof component.type === 'object' && component.type.$$typeof?.toString() === 'Symbol(react.forward_ref)') {
|
|
10137
|
+
return true;
|
|
10138
|
+
}
|
|
10139
|
+
return false;
|
|
10140
|
+
};
|
|
10141
|
+
const FieldControl = /*#__PURE__*/external_react_default().forwardRef(function FieldControl({
|
|
10142
|
+
children,
|
|
10143
|
+
controlRef,
|
|
10144
|
+
...props
|
|
10145
|
+
}, ref) {
|
|
10146
|
+
const ctx = useFieldContext();
|
|
10147
|
+
const baseProps = {
|
|
10148
|
+
...props,
|
|
10149
|
+
...ctx
|
|
9914
10150
|
};
|
|
9915
|
-
|
|
9916
|
-
|
|
9917
|
-
|
|
10151
|
+
const internalRef = (0,external_react_namespaceObject.useRef)(null);
|
|
10152
|
+
let _children = typeof children === 'function' ? children(ctx) : children;
|
|
10153
|
+
if (ctx.forwardFocus && /*#__PURE__*/(0,external_react_namespaceObject.isValidElement)(_children) && isForwardRefComponent(_children)) {
|
|
10154
|
+
const setRef = defaultRef => element => {
|
|
10155
|
+
internalRef.current = element;
|
|
10156
|
+
if (defaultRef) {
|
|
10157
|
+
if (typeof defaultRef === 'function') {
|
|
10158
|
+
defaultRef(element);
|
|
10159
|
+
} else {
|
|
10160
|
+
defaultRef.current = element;
|
|
10161
|
+
}
|
|
10162
|
+
}
|
|
10163
|
+
};
|
|
10164
|
+
_children = /*#__PURE__*/(0,external_react_namespaceObject.cloneElement)(_children, {
|
|
10165
|
+
ref: setRef(children.ref)
|
|
10166
|
+
});
|
|
9918
10167
|
}
|
|
9919
|
-
return (0,jsx_runtime_namespaceObject.
|
|
9920
|
-
|
|
9921
|
-
|
|
9922
|
-
|
|
9923
|
-
|
|
9924
|
-
|
|
9925
|
-
|
|
9926
|
-
|
|
9927
|
-
|
|
10168
|
+
return (0,jsx_runtime_namespaceObject.jsx)(FieldControlBase, {
|
|
10169
|
+
...baseProps,
|
|
10170
|
+
ref: ref,
|
|
10171
|
+
onClick: event => {
|
|
10172
|
+
baseProps.onClick?.(event);
|
|
10173
|
+
if (controlRef) {
|
|
10174
|
+
controlRef.current?.focus?.();
|
|
10175
|
+
} else if (internalRef.current) {
|
|
10176
|
+
internalRef.current?.focus?.();
|
|
10177
|
+
}
|
|
10178
|
+
},
|
|
10179
|
+
children: _children
|
|
9928
10180
|
});
|
|
9929
|
-
};
|
|
9930
|
-
;// ./src/components/TableFilters/TableFiltersAccordion.tsx
|
|
9931
|
-
|
|
9932
|
-
|
|
9933
|
-
|
|
9934
|
-
const TableFiltersAccordion = props => (0,jsx_runtime_namespaceObject.jsx)(Accordion, {
|
|
9935
|
-
...props,
|
|
9936
|
-
css: /*#__PURE__*/(0,react_namespaceObject.css)({
|
|
9937
|
-
display: props.isHidden ? 'none' : 'flex',
|
|
9938
|
-
padding: '10px 0',
|
|
9939
|
-
'&:last-child': {
|
|
9940
|
-
paddingBottom: 0
|
|
9941
|
-
}
|
|
9942
|
-
}, true ? "" : 0, true ? "" : 0)
|
|
9943
10181
|
});
|
|
9944
|
-
;// ./src/components/
|
|
9945
|
-
|
|
10182
|
+
;// ./src/components/Field/FieldDescription.tsx
|
|
9946
10183
|
|
|
9947
10184
|
|
|
9948
|
-
const TableFiltersAccordionContent = ({
|
|
9949
|
-
isOpened,
|
|
9950
|
-
children,
|
|
9951
|
-
...rest
|
|
9952
|
-
}) => (0,jsx_runtime_namespaceObject.jsx)(AccordionContent, {
|
|
9953
|
-
...rest,
|
|
9954
|
-
isOpened: isOpened,
|
|
9955
|
-
css: /*#__PURE__*/(0,react_namespaceObject.css)({
|
|
9956
|
-
padding: isOpened ? '18px 3px 5px 3px' : 0
|
|
9957
|
-
}, true ? "" : 0, true ? "" : 0),
|
|
9958
|
-
children: children
|
|
9959
|
-
});
|
|
9960
|
-
;// ./src/components/TableFilters/TableFilterCheckbox.tsx
|
|
9961
10185
|
|
|
10186
|
+
const FieldDescription = ({
|
|
10187
|
+
children
|
|
10188
|
+
}) => {
|
|
10189
|
+
const ctx = useFieldContext();
|
|
10190
|
+
if (ctx.status !== 'basic') {
|
|
10191
|
+
return null;
|
|
10192
|
+
}
|
|
10193
|
+
return (0,jsx_runtime_namespaceObject.jsx)(FormHelperText_FormHelperText, {
|
|
10194
|
+
status: "basic",
|
|
10195
|
+
children: children
|
|
10196
|
+
});
|
|
10197
|
+
};
|
|
10198
|
+
;// ./src/components/Field/FieldError.tsx
|
|
9962
10199
|
|
|
9963
10200
|
|
|
9964
10201
|
|
|
9965
|
-
const
|
|
9966
|
-
|
|
9967
|
-
|
|
9968
|
-
const
|
|
9969
|
-
|
|
9970
|
-
|
|
9971
|
-
|
|
10202
|
+
const FieldError = ({
|
|
10203
|
+
children
|
|
10204
|
+
}) => {
|
|
10205
|
+
const ctx = useFieldContext();
|
|
10206
|
+
if (ctx.status !== 'error') {
|
|
10207
|
+
return null;
|
|
10208
|
+
}
|
|
10209
|
+
return (0,jsx_runtime_namespaceObject.jsx)(FormHelperText_FormHelperText, {
|
|
10210
|
+
status: "error",
|
|
10211
|
+
children: children
|
|
9972
10212
|
});
|
|
9973
10213
|
};
|
|
9974
|
-
;// ./src/components/
|
|
10214
|
+
;// ./src/components/Field/FieldSuccess.tsx
|
|
10215
|
+
|
|
10216
|
+
|
|
10217
|
+
|
|
10218
|
+
const FieldSuccess = ({
|
|
10219
|
+
children
|
|
10220
|
+
}) => {
|
|
10221
|
+
const ctx = useFieldContext();
|
|
10222
|
+
if (ctx.status !== 'success') {
|
|
10223
|
+
return null;
|
|
10224
|
+
}
|
|
10225
|
+
return (0,jsx_runtime_namespaceObject.jsx)(FormHelperText_FormHelperText, {
|
|
10226
|
+
status: "success",
|
|
10227
|
+
children: children
|
|
10228
|
+
});
|
|
10229
|
+
};
|
|
10230
|
+
;// ./src/components/DateRangePicker/constants.ts
|
|
10231
|
+
const constants_DEFAULT_MASK_FORMAT = 'mm/dd/yyyy';
|
|
10232
|
+
const constants_DEFAULT_MASK = '__/__/____';
|
|
10233
|
+
const constants_MONTHS = (/* unused pure expression or super */ null && (['Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', 'Jul', 'Aug', 'Sep', 'Oct', 'Nov', 'Dec']));
|
|
10234
|
+
const constants_DATE_MIN = '01/01/1900';
|
|
10235
|
+
const constants_DATE_MAX = '01/01/2150';
|
|
10236
|
+
const constants_OUT_OF_RANGE = 'The date is out of the defined range';
|
|
10237
|
+
const constants_INVALID_DATE = 'Invalid date';
|
|
10238
|
+
;// ./src/components/DateRangePicker/DateRangePicker.tsx
|
|
10239
|
+
|
|
10240
|
+
function DateRangePicker_EMOTION_STRINGIFIED_CSS_ERROR_() { return "You have tried to stringify object returned from `css` function. It isn't supposed to be used directly (e.g. as value of the `className` prop), but rather handed to emotion so it can handle it (e.g. as value of `css` prop)."; }
|
|
10241
|
+
|
|
10242
|
+
|
|
10243
|
+
|
|
10244
|
+
|
|
10245
|
+
|
|
10246
|
+
|
|
10247
|
+
|
|
10248
|
+
// keep the same place for datepicker (from / to)
|
|
10249
|
+
// don't close the datepicker while switching between from / to
|
|
10250
|
+
// add errors (date to less than date from...)
|
|
10251
|
+
// add a logic to reset date to when date to less than date from
|
|
10252
|
+
// create subcomponents
|
|
10253
|
+
// hover daterange effect for the datepicker (from design)
|
|
10254
|
+
|
|
10255
|
+
var DateRangePicker_ref = true ? {
|
|
10256
|
+
name: "mwgsbg",
|
|
10257
|
+
styles: "& input{border:none !important;}"
|
|
10258
|
+
} : 0;
|
|
10259
|
+
var DateRangePicker_ref2 = true ? {
|
|
10260
|
+
name: "jpxugn",
|
|
10261
|
+
styles: "margin:0 14px"
|
|
10262
|
+
} : 0;
|
|
10263
|
+
var DateRangePicker_ref3 = true ? {
|
|
10264
|
+
name: "ud49p1",
|
|
10265
|
+
styles: "color:inherit;&::first-letter{text-transform:uppercase;}"
|
|
10266
|
+
} : 0;
|
|
10267
|
+
const DateRangePicker = ({
|
|
10268
|
+
format = constants_DEFAULT_MASK_FORMAT,
|
|
10269
|
+
openCalendarMode = 'both',
|
|
10270
|
+
name,
|
|
10271
|
+
label,
|
|
10272
|
+
value,
|
|
10273
|
+
defaultValue,
|
|
10274
|
+
...rest
|
|
10275
|
+
}) => {
|
|
10276
|
+
const theme = (0,react_namespaceObject.useTheme)();
|
|
10277
|
+
// const [_value, _setValue] = useState(value || []);
|
|
10278
|
+
const formContext = (0,external_react_hook_form_namespaceObject.useFormContext)();
|
|
10279
|
+
const [currentStatus, setCurrentStatus] = (0,external_react_namespaceObject.useState)(rest.status);
|
|
10280
|
+
const errorsFrom = formContext.formState.errors[`${name}From`]?.message;
|
|
10281
|
+
const errorsTo = formContext.formState.errors[`${name}To`]?.message;
|
|
10282
|
+
const errorMessage = [errorsFrom, errorsTo].filter(Boolean);
|
|
10283
|
+
const {
|
|
10284
|
+
disabled
|
|
10285
|
+
} = rest;
|
|
10286
|
+
const [fromOpenToggle, setFromOpenToggle] = (0,external_react_namespaceObject.useState)();
|
|
10287
|
+
const [toOpenToggle, setToOpenToggle] = (0,external_react_namespaceObject.useState)();
|
|
10288
|
+
const [changedDate, setChangedDate] = (0,external_react_namespaceObject.useState)([null, null]);
|
|
10289
|
+
const [lastFocusedElement, setLastFocusedElement] = (0,external_react_namespaceObject.useState)('from');
|
|
10290
|
+
const [valueFrom, valueTo] = value || [];
|
|
10291
|
+
const [defaultValueFrom, defaultValueTo] = defaultValue || [];
|
|
10292
|
+
const datepickerFromRef = (0,external_react_namespaceObject.useRef)(null);
|
|
10293
|
+
const datepickerToRef = (0,external_react_namespaceObject.useRef)(null);
|
|
10294
|
+
|
|
10295
|
+
// const datepickerFromAdditionalProps = {};
|
|
10296
|
+
// const datepickerToAdditionalProps = {};
|
|
10297
|
+
|
|
10298
|
+
// useEffect(() => {
|
|
10299
|
+
// _setValue(value || []);
|
|
10300
|
+
// }, [value]);
|
|
10301
|
+
|
|
10302
|
+
(0,external_react_namespaceObject.useEffect)(() => {
|
|
10303
|
+
setCurrentStatus(rest.status);
|
|
10304
|
+
}, [rest.status]);
|
|
10305
|
+
(0,external_react_namespaceObject.useEffect)(() => {
|
|
10306
|
+
if (errorMessage.length) {
|
|
10307
|
+
setCurrentStatus('error');
|
|
10308
|
+
} else {
|
|
10309
|
+
setCurrentStatus(rest.status || 'basic');
|
|
10310
|
+
}
|
|
10311
|
+
}, [errorMessage]);
|
|
10312
|
+
const toggleOpen = () => {
|
|
10313
|
+
if (lastFocusedElement === 'from') {
|
|
10314
|
+
setFromOpenToggle(current => !current);
|
|
10315
|
+
setTimeout(() => datepickerFromRef.current?.focus(), 5);
|
|
10316
|
+
} else {
|
|
10317
|
+
setToOpenToggle(current => !current);
|
|
10318
|
+
setTimeout(() => datepickerToRef.current?.focus(), 5);
|
|
10319
|
+
}
|
|
10320
|
+
};
|
|
10321
|
+
const handleToggleOpen = e => {
|
|
10322
|
+
const tagName = e.currentTarget.tagName.toLowerCase();
|
|
10323
|
+
if (openCalendarMode === 'both' || openCalendarMode === 'input' && tagName === 'input' || openCalendarMode === 'icon' && tagName === 'button') {
|
|
10324
|
+
toggleOpen();
|
|
10325
|
+
}
|
|
10326
|
+
if (tagName === 'input' && rest.inputProps?.inputProps?.onClick) {
|
|
10327
|
+
rest.inputProps.inputProps.onClick(e);
|
|
10328
|
+
}
|
|
10329
|
+
};
|
|
10330
|
+
const handleFocus = e => {
|
|
10331
|
+
const {
|
|
10332
|
+
name
|
|
10333
|
+
} = e.currentTarget;
|
|
10334
|
+
setLastFocusedElement(name.endsWith('From') ? 'from' : 'to');
|
|
10335
|
+
rest.inputProps?.inputProps?.onFocus?.(e);
|
|
10336
|
+
};
|
|
10337
|
+
const onChangeFrom = date => {
|
|
10338
|
+
const newDate = date || null;
|
|
10339
|
+
if (newDate !== changedDate?.[0]) {
|
|
10340
|
+
const changedData = [newDate, changedDate ? changedDate[1] : null];
|
|
10341
|
+
setChangedDate(changedData);
|
|
10342
|
+
if (!changedDate?.[1]) {
|
|
10343
|
+
setLastFocusedElement('to');
|
|
10344
|
+
setToOpenToggle(true);
|
|
10345
|
+
}
|
|
10346
|
+
rest.onChange?.(changedData);
|
|
10347
|
+
}
|
|
10348
|
+
};
|
|
10349
|
+
const onChangeTo = date => {
|
|
10350
|
+
const newDate = date || null;
|
|
10351
|
+
if (changedDate[0] && newDate) {
|
|
10352
|
+
const selectedDateFromDT = external_luxon_namespaceObject.DateTime.fromJSDate(changedDate[0]);
|
|
10353
|
+
const selectedDateToDT = external_luxon_namespaceObject.DateTime.fromJSDate(newDate);
|
|
10354
|
+
if (selectedDateFromDT > selectedDateToDT) {
|
|
10355
|
+
const changedData = [newDate, null];
|
|
10356
|
+
setChangedDate(changedData);
|
|
10357
|
+
|
|
10358
|
+
// const dateStr = DateTime.fromJSDate(newDate).toFormat(
|
|
10359
|
+
// format.replace('mm', 'MM'),
|
|
10360
|
+
// );
|
|
10361
|
+
// _setValue([dateStr, _value[1] === undefined ? '' : undefined]);
|
|
10362
|
+
// _setValue([dateStr, undefined]);
|
|
10363
|
+
datepickerToRef.current?.focus();
|
|
10364
|
+
rest.onChange?.(changedData);
|
|
10365
|
+
return;
|
|
10366
|
+
}
|
|
10367
|
+
}
|
|
10368
|
+
if (newDate !== changedDate?.[1]) {
|
|
10369
|
+
const changedData = [changedDate ? changedDate[0] : null, newDate];
|
|
10370
|
+
setChangedDate(changedData);
|
|
10371
|
+
datepickerToRef.current?.focus();
|
|
10372
|
+
rest.onChange?.(changedData);
|
|
10373
|
+
}
|
|
10374
|
+
};
|
|
10375
|
+
|
|
10376
|
+
// TODO: change status dynamically
|
|
10377
|
+
return (0,jsx_runtime_namespaceObject.jsxs)(FieldRoot, {
|
|
10378
|
+
status: currentStatus,
|
|
10379
|
+
disabled: rest.disabled,
|
|
10380
|
+
children: [(0,jsx_runtime_namespaceObject.jsx)(FieldLabel, {
|
|
10381
|
+
htmlFor: lastFocusedElement === 'from' ? `${name}From` : `${name}To`,
|
|
10382
|
+
children: label
|
|
10383
|
+
}), (0,jsx_runtime_namespaceObject.jsx)(FieldControl, {
|
|
10384
|
+
children: (0,jsx_runtime_namespaceObject.jsxs)(Wrapper_Wrapper, {
|
|
10385
|
+
css: DateRangePicker_ref,
|
|
10386
|
+
children: [(0,jsx_runtime_namespaceObject.jsx)(DatePicker, {
|
|
10387
|
+
format: format,
|
|
10388
|
+
openCalendarMode: openCalendarMode,
|
|
10389
|
+
isOpenToggle: fromOpenToggle,
|
|
10390
|
+
name: `${name}From`,
|
|
10391
|
+
value: valueFrom,
|
|
10392
|
+
defaultValue: defaultValueFrom,
|
|
10393
|
+
label: '',
|
|
10394
|
+
showCalendarIcon: false,
|
|
10395
|
+
...rest,
|
|
10396
|
+
ref: datepickerFromRef,
|
|
10397
|
+
onChange: onChangeFrom,
|
|
10398
|
+
highlightDates: {
|
|
10399
|
+
enabled: true,
|
|
10400
|
+
mode: 'dateFrom',
|
|
10401
|
+
otherDate: changedDate[1]
|
|
10402
|
+
},
|
|
10403
|
+
inputProps: {
|
|
10404
|
+
showStatusIcon: false,
|
|
10405
|
+
...rest.inputProps,
|
|
10406
|
+
inputProps: {
|
|
10407
|
+
...rest.inputProps?.inputProps,
|
|
10408
|
+
onFocus: handleFocus,
|
|
10409
|
+
onClick: handleToggleOpen
|
|
10410
|
+
}
|
|
10411
|
+
}
|
|
10412
|
+
}), (0,jsx_runtime_namespaceObject.jsx)(Icon_Icon, {
|
|
10413
|
+
name: "carrot-right",
|
|
10414
|
+
size: 18,
|
|
10415
|
+
color: theme.colors.greyDarker80,
|
|
10416
|
+
css: DateRangePicker_ref2
|
|
10417
|
+
}), (0,jsx_runtime_namespaceObject.jsx)(DatePicker, {
|
|
10418
|
+
format: format,
|
|
10419
|
+
openCalendarMode: openCalendarMode,
|
|
10420
|
+
isOpenToggle: toOpenToggle,
|
|
10421
|
+
name: `${name}To`,
|
|
10422
|
+
value: valueTo,
|
|
10423
|
+
defaultValue: defaultValueTo,
|
|
10424
|
+
label: '',
|
|
10425
|
+
showCalendarIcon: false,
|
|
10426
|
+
...rest,
|
|
10427
|
+
ref: datepickerToRef,
|
|
10428
|
+
onChange: onChangeTo,
|
|
10429
|
+
highlightDates: {
|
|
10430
|
+
enabled: true,
|
|
10431
|
+
mode: 'dateTo',
|
|
10432
|
+
otherDate: changedDate[0]
|
|
10433
|
+
},
|
|
10434
|
+
inputProps: {
|
|
10435
|
+
showStatusIcon: false,
|
|
10436
|
+
...rest.inputProps,
|
|
10437
|
+
inputProps: {
|
|
10438
|
+
...rest.inputProps?.inputProps,
|
|
10439
|
+
onFocus: handleFocus,
|
|
10440
|
+
onClick: handleToggleOpen
|
|
10441
|
+
}
|
|
10442
|
+
}
|
|
10443
|
+
}), (0,jsx_runtime_namespaceObject.jsx)(Button_Button, {
|
|
10444
|
+
endIcon: (0,jsx_runtime_namespaceObject.jsx)(Icon_Icon, {
|
|
10445
|
+
name: "calendar",
|
|
10446
|
+
size: 16,
|
|
10447
|
+
color: disabled ? theme.colors.grey : theme.colors.greyDarker
|
|
10448
|
+
}),
|
|
10449
|
+
"data-testid": 'daterangepicker-button',
|
|
10450
|
+
onClick: handleToggleOpen,
|
|
10451
|
+
variant: "tertiary",
|
|
10452
|
+
"aria-label": "Calendar",
|
|
10453
|
+
isDisabled: disabled,
|
|
10454
|
+
css: /*#__PURE__*/(0,react_namespaceObject.css)({
|
|
10455
|
+
padding: 0,
|
|
10456
|
+
margin: '0 8px 0 14px',
|
|
10457
|
+
cursor: openCalendarMode === 'input' || disabled ? 'default' : 'pointer',
|
|
10458
|
+
'&:focus::before': {
|
|
10459
|
+
display: 'none'
|
|
10460
|
+
}
|
|
10461
|
+
}, true ? "" : 0, true ? "" : 0)
|
|
10462
|
+
})]
|
|
10463
|
+
})
|
|
10464
|
+
}), (0,jsx_runtime_namespaceObject.jsx)(FieldDescription, {
|
|
10465
|
+
children: rest.helperText
|
|
10466
|
+
}), (0,jsx_runtime_namespaceObject.jsx)(FieldError, {
|
|
10467
|
+
children: errorMessage ? errorMessage.map((error, index) => (0,jsx_runtime_namespaceObject.jsx)("span", {
|
|
10468
|
+
css: DateRangePicker_ref3,
|
|
10469
|
+
children: error
|
|
10470
|
+
}, `error-${index}`)) : rest.helperText
|
|
10471
|
+
}), (0,jsx_runtime_namespaceObject.jsx)(FieldSuccess, {
|
|
10472
|
+
children: rest.helperText
|
|
10473
|
+
})]
|
|
10474
|
+
});
|
|
10475
|
+
};
|
|
10476
|
+
;// ./src/components/DateRangePicker/index.ts
|
|
10477
|
+
|
|
10478
|
+
;// ./src/components/Drawer/DrawerProvider.tsx
|
|
10479
|
+
|
|
10480
|
+
const [DrawerProvider, useDrawerContext] = (0,hooks_namespaceObject.createSafeContext)('useDrawer must be used within a DrawerProvider');
|
|
10481
|
+
;// ./src/components/Drawer/useDrawer.tsx
|
|
10482
|
+
|
|
10483
|
+
|
|
10484
|
+
|
|
10485
|
+
const useDrawer = ({
|
|
10486
|
+
opened,
|
|
10487
|
+
duration = 200,
|
|
10488
|
+
defaultOpened,
|
|
10489
|
+
dismissable = false,
|
|
10490
|
+
position = 'left',
|
|
10491
|
+
title,
|
|
10492
|
+
withCloseButton = false,
|
|
10493
|
+
onOpenChange
|
|
10494
|
+
} = {}) => {
|
|
10495
|
+
const [_opened, setOpened] = (0,hooks_namespaceObject.useUncontrolled)({
|
|
10496
|
+
value: opened,
|
|
10497
|
+
defaultValue: defaultOpened,
|
|
10498
|
+
finalValue: false,
|
|
10499
|
+
onChange: onOpenChange
|
|
10500
|
+
});
|
|
10501
|
+
const [portalNode, setPortalNode] = (0,external_react_namespaceObject.useState)(null);
|
|
10502
|
+
const toggle = open => {
|
|
10503
|
+
const _open = open ?? !_opened;
|
|
10504
|
+
setOpened(_open);
|
|
10505
|
+
};
|
|
10506
|
+
const {
|
|
10507
|
+
context,
|
|
10508
|
+
refs
|
|
10509
|
+
} = (0,external_floating_ui_react_namespaceObject.useFloating)({
|
|
10510
|
+
open: _opened,
|
|
10511
|
+
onOpenChange: setOpened
|
|
10512
|
+
});
|
|
10513
|
+
const transition = (0,external_floating_ui_react_namespaceObject.useTransitionStatus)(context, {
|
|
10514
|
+
duration
|
|
10515
|
+
});
|
|
10516
|
+
const dismiss = (0,external_floating_ui_react_namespaceObject.useDismiss)(context, {
|
|
10517
|
+
enabled: dismissable
|
|
10518
|
+
});
|
|
10519
|
+
const click = (0,external_floating_ui_react_namespaceObject.useClick)(context);
|
|
10520
|
+
const interactions = (0,external_floating_ui_react_namespaceObject.useInteractions)([dismiss, click]);
|
|
10521
|
+
return {
|
|
10522
|
+
opened: _opened,
|
|
10523
|
+
dismissable,
|
|
10524
|
+
position,
|
|
10525
|
+
duration,
|
|
10526
|
+
floatingContext: context,
|
|
10527
|
+
interactions,
|
|
10528
|
+
transition,
|
|
10529
|
+
title,
|
|
10530
|
+
withCloseButton,
|
|
10531
|
+
portalNode,
|
|
10532
|
+
setFloating: refs.setFloating,
|
|
10533
|
+
setPortalNode,
|
|
10534
|
+
toggle
|
|
10535
|
+
};
|
|
10536
|
+
};
|
|
10537
|
+
;// ./src/components/Drawer/DrawerRoot.tsx
|
|
10538
|
+
|
|
10539
|
+
|
|
10540
|
+
|
|
10541
|
+
const Drawer = ({
|
|
10542
|
+
children,
|
|
10543
|
+
store: controlledStore
|
|
10544
|
+
}) => {
|
|
10545
|
+
const uncontrolledStore = useDrawer({});
|
|
10546
|
+
const store = controlledStore || uncontrolledStore;
|
|
10547
|
+
if (!store.transition.isMounted) {
|
|
10548
|
+
return null;
|
|
10549
|
+
}
|
|
10550
|
+
return (0,jsx_runtime_namespaceObject.jsx)(DrawerProvider, {
|
|
10551
|
+
value: {
|
|
10552
|
+
store
|
|
10553
|
+
},
|
|
10554
|
+
children: children
|
|
10555
|
+
});
|
|
10556
|
+
};
|
|
10557
|
+
;// ./src/components/Drawer/DrawerOverlay.tsx
|
|
10558
|
+
|
|
10559
|
+
|
|
10560
|
+
|
|
10561
|
+
|
|
10562
|
+
const StyledFloatingOverlay = /*#__PURE__*/base_default()(external_floating_ui_react_namespaceObject.FloatingOverlay, true ? {
|
|
10563
|
+
shouldForwardProp: propName => !propName.startsWith('$'),
|
|
10564
|
+
target: "ebw2uwr0"
|
|
10565
|
+
} : 0)("transition-property:opacity;transition-duration:", ({
|
|
10566
|
+
$duration
|
|
10567
|
+
}) => $duration, "ms;transition-timing-function:ease;opacity:", ({
|
|
10568
|
+
$transitionStatus
|
|
10569
|
+
}) => $transitionStatus === 'close' ? 0 : 1, ";", ({
|
|
10570
|
+
$inPortal
|
|
10571
|
+
}) => !$inPortal && `
|
|
10572
|
+
overflow: hidden !important;
|
|
10573
|
+
position: absolute !important;
|
|
10574
|
+
`, " pointer-events:", ({
|
|
10575
|
+
$dismissable
|
|
10576
|
+
}) => $dismissable ? 'auto' : 'none', ";" + ( true ? "" : 0));
|
|
10577
|
+
const DrawerOverlay = ({
|
|
10578
|
+
children,
|
|
10579
|
+
...props
|
|
10580
|
+
}) => {
|
|
10581
|
+
const ctx = useDrawerContext();
|
|
10582
|
+
const {
|
|
10583
|
+
duration,
|
|
10584
|
+
dismissable,
|
|
10585
|
+
transition,
|
|
10586
|
+
portalNode
|
|
10587
|
+
} = ctx.store;
|
|
10588
|
+
const inPortal = portalNode !== null;
|
|
10589
|
+
return (0,jsx_runtime_namespaceObject.jsx)(StyledFloatingOverlay, {
|
|
10590
|
+
$inPortal: inPortal,
|
|
10591
|
+
$duration: duration,
|
|
10592
|
+
$dismissable: dismissable,
|
|
10593
|
+
$transitionStatus: transition.status,
|
|
10594
|
+
...props,
|
|
10595
|
+
children: children
|
|
10596
|
+
});
|
|
10597
|
+
};
|
|
10598
|
+
;// ./src/components/Drawer/DrawerPortal.tsx
|
|
10599
|
+
|
|
10600
|
+
|
|
10601
|
+
|
|
10602
|
+
|
|
10603
|
+
const DrawerPortal = ({
|
|
10604
|
+
children,
|
|
10605
|
+
...props
|
|
10606
|
+
}) => {
|
|
10607
|
+
const ctx = useDrawerContext();
|
|
10608
|
+
const portalNode = (0,external_floating_ui_react_namespaceObject.useFloatingPortalNode)();
|
|
10609
|
+
(0,external_react_namespaceObject.useEffect)(() => {
|
|
10610
|
+
ctx.store.setPortalNode(portalNode);
|
|
10611
|
+
return () => ctx.store.setPortalNode(null);
|
|
10612
|
+
}, [portalNode]);
|
|
10613
|
+
return (0,jsx_runtime_namespaceObject.jsx)(external_floating_ui_react_namespaceObject.FloatingPortal, {
|
|
10614
|
+
root: portalNode,
|
|
10615
|
+
...props,
|
|
10616
|
+
children: children
|
|
10617
|
+
});
|
|
10618
|
+
};
|
|
10619
|
+
;// ./src/components/Drawer/DrawerHeader.tsx
|
|
10620
|
+
|
|
10621
|
+
function DrawerHeader_EMOTION_STRINGIFIED_CSS_ERROR_() { return "You have tried to stringify object returned from `css` function. It isn't supposed to be used directly (e.g. as value of the `className` prop), but rather handed to emotion so it can handle it (e.g. as value of `css` prop)."; }
|
|
10622
|
+
|
|
10623
|
+
|
|
10624
|
+
const StyledDrawerHeader = /*#__PURE__*/base_default()("header", true ? {
|
|
10625
|
+
target: "e1boxa1c0"
|
|
10626
|
+
} : 0)( true ? {
|
|
10627
|
+
name: "loooz6",
|
|
10628
|
+
styles: "position:sticky;top:0;display:flex;align-items:center;justify-content:space-between"
|
|
10629
|
+
} : 0);
|
|
10630
|
+
const DrawerHeader = /*#__PURE__*/(0,external_react_namespaceObject.forwardRef)(function DrawerHeader({
|
|
10631
|
+
children,
|
|
10632
|
+
...props
|
|
10633
|
+
}, ref) {
|
|
10634
|
+
return (0,jsx_runtime_namespaceObject.jsx)(StyledDrawerHeader, {
|
|
10635
|
+
ref: ref,
|
|
10636
|
+
...props,
|
|
10637
|
+
children: children
|
|
10638
|
+
});
|
|
10639
|
+
});
|
|
10640
|
+
;// ./src/components/Drawer/DrawerTitle.tsx
|
|
10641
|
+
|
|
10642
|
+
function DrawerTitle_EMOTION_STRINGIFIED_CSS_ERROR_() { return "You have tried to stringify object returned from `css` function. It isn't supposed to be used directly (e.g. as value of the `className` prop), but rather handed to emotion so it can handle it (e.g. as value of `css` prop)."; }
|
|
10643
|
+
|
|
10644
|
+
|
|
10645
|
+
const StyledDrawerTitle = /*#__PURE__*/base_default()("h2", true ? {
|
|
10646
|
+
target: "e1cuo4pw0"
|
|
10647
|
+
} : 0)( true ? {
|
|
10648
|
+
name: "10bzkug",
|
|
10649
|
+
styles: "font-weight:600;font-size:20px;text-align:center"
|
|
10650
|
+
} : 0);
|
|
10651
|
+
const DrawerTitle = /*#__PURE__*/(0,external_react_namespaceObject.forwardRef)(function DrawerTitle({
|
|
10652
|
+
children,
|
|
10653
|
+
...props
|
|
10654
|
+
}, ref) {
|
|
10655
|
+
return (0,jsx_runtime_namespaceObject.jsx)(StyledDrawerTitle, {
|
|
10656
|
+
ref: ref,
|
|
10657
|
+
...props,
|
|
10658
|
+
children: children
|
|
10659
|
+
});
|
|
10660
|
+
});
|
|
10661
|
+
;// ./src/components/Drawer/DrawerCloseButton.tsx
|
|
10662
|
+
|
|
10663
|
+
|
|
10664
|
+
|
|
10665
|
+
|
|
10666
|
+
|
|
10667
|
+
|
|
10668
|
+
|
|
10669
|
+
const StyledDrawerCloseButton = /*#__PURE__*/base_default()(Button_Button, true ? {
|
|
10670
|
+
target: "evbyx180"
|
|
10671
|
+
} : 0)("margin-inline-start:auto;padding:0;display:inline-flex;align-items:center;justify-content:center;height:32px;width:32px;background:", ({
|
|
10672
|
+
theme
|
|
10673
|
+
}) => theme.colors.greyFocused, ";" + ( true ? "" : 0));
|
|
10674
|
+
const notReachable = _ => _;
|
|
10675
|
+
const getIconName = position => {
|
|
10676
|
+
switch (position) {
|
|
10677
|
+
case 'top':
|
|
10678
|
+
return 'carrot-up';
|
|
10679
|
+
case 'bottom':
|
|
10680
|
+
return 'carrot-down';
|
|
10681
|
+
case 'left':
|
|
10682
|
+
return 'carrot-left';
|
|
10683
|
+
case 'right':
|
|
10684
|
+
return 'carrot-right';
|
|
10685
|
+
default:
|
|
10686
|
+
return notReachable(position);
|
|
10687
|
+
}
|
|
10688
|
+
};
|
|
10689
|
+
const DrawerCloseButton = /*#__PURE__*/(0,external_react_namespaceObject.forwardRef)(function DrawerCloseButton({
|
|
10690
|
+
children,
|
|
10691
|
+
...props
|
|
10692
|
+
}, ref) {
|
|
10693
|
+
const theme = (0,react_namespaceObject.useTheme)();
|
|
10694
|
+
const ctx = useDrawerContext();
|
|
10695
|
+
const iconName = getIconName(ctx.store.position);
|
|
10696
|
+
return (0,jsx_runtime_namespaceObject.jsx)(StyledDrawerCloseButton, {
|
|
10697
|
+
"data-testid": "drawer-close-button",
|
|
10698
|
+
startIcon: (0,jsx_runtime_namespaceObject.jsx)(Icon_Icon, {
|
|
10699
|
+
name: iconName,
|
|
10700
|
+
size: 18,
|
|
10701
|
+
color: theme.colors.greyDarker
|
|
10702
|
+
}),
|
|
10703
|
+
ref: ref,
|
|
10704
|
+
onClick: () => ctx.store.toggle(false),
|
|
10705
|
+
...props,
|
|
10706
|
+
children: children
|
|
10707
|
+
});
|
|
10708
|
+
});
|
|
10709
|
+
;// ./src/components/Drawer/DrawerContent.tsx
|
|
10710
|
+
|
|
10711
|
+
|
|
10712
|
+
|
|
10713
|
+
|
|
10714
|
+
|
|
10715
|
+
|
|
10716
|
+
|
|
10717
|
+
|
|
10718
|
+
const ContentWrapper = /*#__PURE__*/base_default()("div", true ? {
|
|
10719
|
+
target: "eoa7lk01"
|
|
10720
|
+
} : 0)("display:flex;justify-content:", ({
|
|
10721
|
+
position
|
|
10722
|
+
}) => position === 'left' ? 'flex-start' : 'flex-end', ";align-items:", ({
|
|
10723
|
+
position
|
|
10724
|
+
}) => position === 'top' ? 'flex-start' : 'flex-end', ";height:100%;" + ( true ? "" : 0));
|
|
10725
|
+
const getBorderStyle = (position, color) => {
|
|
10726
|
+
const borders = {
|
|
10727
|
+
left: `border-right: 1px solid ${color};`,
|
|
10728
|
+
right: `border-left: 1px solid ${color};`,
|
|
10729
|
+
top: `border-bottom: 1px solid ${color};`,
|
|
10730
|
+
bottom: `border-top: 1px solid ${color};`
|
|
10731
|
+
};
|
|
10732
|
+
return borders[position];
|
|
10733
|
+
};
|
|
10734
|
+
const getTransform = (position, open) => {
|
|
10735
|
+
const closedTransforms = {
|
|
10736
|
+
left: 'translateX(-100%)',
|
|
10737
|
+
right: 'translateX(100%)',
|
|
10738
|
+
top: 'translateY(-100%)',
|
|
10739
|
+
bottom: 'translateY(100%)'
|
|
10740
|
+
};
|
|
10741
|
+
return open ? 'translate(0)' : closedTransforms[position];
|
|
10742
|
+
};
|
|
10743
|
+
const StyledDrawerContent = /*#__PURE__*/base_default()("div", true ? {
|
|
10744
|
+
target: "eoa7lk00"
|
|
10745
|
+
} : 0)("flex:1;background-color:#f4f5f9;height:100%;pointer-events:auto;transition:transform ", ({
|
|
10746
|
+
duration
|
|
10747
|
+
}) => duration, "ms ease-in-out;", ({
|
|
10748
|
+
position,
|
|
10749
|
+
theme
|
|
10750
|
+
}) => getBorderStyle(position, theme.colors.greyFocused), " transform:", ({
|
|
10751
|
+
position
|
|
10752
|
+
}) => getTransform(position, false), ";&[data-transition='open']{transform:", ({
|
|
10753
|
+
position
|
|
10754
|
+
}) => getTransform(position, true), ";}" + ( true ? "" : 0));
|
|
10755
|
+
const DrawerContent = /*#__PURE__*/(0,external_react_namespaceObject.forwardRef)(function DrawerContent({
|
|
10756
|
+
children,
|
|
10757
|
+
...props
|
|
10758
|
+
}, ref) {
|
|
10759
|
+
const ctx = useDrawerContext();
|
|
10760
|
+
const {
|
|
10761
|
+
title,
|
|
10762
|
+
withCloseButton,
|
|
10763
|
+
position,
|
|
10764
|
+
duration,
|
|
10765
|
+
transition,
|
|
10766
|
+
interactions,
|
|
10767
|
+
setFloating
|
|
10768
|
+
} = ctx.store;
|
|
10769
|
+
const mergedRef = (0,external_floating_ui_react_namespaceObject.useMergeRefs)([setFloating, ref]);
|
|
10770
|
+
const hasHeader = !!title || withCloseButton;
|
|
10771
|
+
return (0,jsx_runtime_namespaceObject.jsx)(ContentWrapper, {
|
|
10772
|
+
position: position,
|
|
10773
|
+
children: (0,jsx_runtime_namespaceObject.jsxs)(StyledDrawerContent, {
|
|
10774
|
+
ref: mergedRef,
|
|
10775
|
+
"data-transition": transition.status,
|
|
10776
|
+
"data-position": position,
|
|
10777
|
+
position: position,
|
|
10778
|
+
duration: duration,
|
|
10779
|
+
...interactions.getFloatingProps(props),
|
|
10780
|
+
children: [hasHeader && (0,jsx_runtime_namespaceObject.jsxs)(DrawerHeader, {
|
|
10781
|
+
children: [title && (0,jsx_runtime_namespaceObject.jsx)(DrawerTitle, {
|
|
10782
|
+
children: title
|
|
10783
|
+
}), withCloseButton && (0,jsx_runtime_namespaceObject.jsx)(DrawerCloseButton, {})]
|
|
10784
|
+
}), children]
|
|
10785
|
+
})
|
|
10786
|
+
});
|
|
10787
|
+
});
|
|
10788
|
+
;// ./src/components/Drawer/index.parts.ts
|
|
10789
|
+
|
|
10790
|
+
|
|
10791
|
+
|
|
10792
|
+
|
|
10793
|
+
|
|
10794
|
+
|
|
10795
|
+
|
|
10796
|
+
;// ./src/components/Drawer/index.ts
|
|
10797
|
+
|
|
10798
|
+
|
|
10799
|
+
|
|
10800
|
+
;// ./src/components/Field/index.parts.ts
|
|
10801
|
+
|
|
10802
|
+
|
|
10803
|
+
|
|
10804
|
+
|
|
10805
|
+
|
|
10806
|
+
|
|
10807
|
+
;// ./src/components/Field/index.ts
|
|
10808
|
+
|
|
10809
|
+
|
|
10810
|
+
|
|
10811
|
+
;// ./src/components/TableFilters/styles.ts
|
|
10812
|
+
function TableFilters_styles_EMOTION_STRINGIFIED_CSS_ERROR_() { return "You have tried to stringify object returned from `css` function. It isn't supposed to be used directly (e.g. as value of the `className` prop), but rather handed to emotion so it can handle it (e.g. as value of `css` prop)."; }
|
|
10813
|
+
|
|
10814
|
+
const tableFilterPopoverContentStyles = theme => /*#__PURE__*/(0,react_namespaceObject.css)("border:1px solid ", theme.colors.greyDropdownMain, ";border-radius:20px;padding:20px 20px 14px 18px;width:340px;background:", theme.colors.white, ";z-index:1;" + ( true ? "" : 0), true ? "" : 0);
|
|
10815
|
+
const tableFilterDividerStyles = theme => /*#__PURE__*/(0,react_namespaceObject.css)("border:1px solid ", theme.colors.greyDropdownMain, ";width:calc(100% + 38px);margin:22px auto 14px -19px;" + ( true ? "" : 0), true ? "" : 0);
|
|
10816
|
+
const baseButtonStyle = true ? {
|
|
10817
|
+
name: "jk3zq0",
|
|
10818
|
+
styles: "padding:0 14px;height:38px;border-radius:5px;font-size:14px;font-weight:600;&:hover{box-shadow:none;}"
|
|
10819
|
+
} : 0;
|
|
10820
|
+
;// ./src/components/TableFilters/TableFilterTrigger.tsx
|
|
10821
|
+
|
|
10822
|
+
|
|
10823
|
+
|
|
10824
|
+
|
|
10825
|
+
const filterButtonStyles = count => theme => /*#__PURE__*/(0,react_namespaceObject.css)("height:40px;color:", theme.colors.greyDisabled, ";background:", theme.colors.white, ";border:1px solid ", theme.colors.greyDropdownMain, ";border-radius:6.5px;padding:0 11px 0 13px;font-size:14px;letter-spacing:normal;gap:5px;user-select:none;&::before{display:block;content:'\"Filter\"';content:", count ? '"More"' : '"Filter"', ";}@media screen and (min-width: 900px){&::before{content:'More';}}&:hover{border-color:", theme.colors.greyDropdownFocused, ";}&:active{border-color:", theme.colors.blueNotification, ";}&:disabled{background:", theme.colors.grey, ";}" + ( true ? "" : 0), true ? "" : 0);
|
|
10826
|
+
const TableFilterTrigger = ({
|
|
10827
|
+
children,
|
|
10828
|
+
count,
|
|
10829
|
+
...rest
|
|
10830
|
+
}) => {
|
|
10831
|
+
const theme = (0,react_namespaceObject.useTheme)();
|
|
10832
|
+
return (0,jsx_runtime_namespaceObject.jsx)(PopoverTrigger, {
|
|
10833
|
+
variant: "custom",
|
|
10834
|
+
css: filterButtonStyles(count),
|
|
10835
|
+
endIcon: (0,jsx_runtime_namespaceObject.jsx)(Icon_Icon, {
|
|
10836
|
+
name: "filter",
|
|
10837
|
+
color: theme.colors.greyFilterIcon,
|
|
10838
|
+
size: 20
|
|
10839
|
+
}),
|
|
10840
|
+
...rest,
|
|
10841
|
+
children: children
|
|
10842
|
+
});
|
|
10843
|
+
};
|
|
10844
|
+
;// ./src/components/TableFilters/TableFilterTriggerWithNotification.tsx
|
|
10845
|
+
function TableFilterTriggerWithNotification_EMOTION_STRINGIFIED_CSS_ERROR_() { return "You have tried to stringify object returned from `css` function. It isn't supposed to be used directly (e.g. as value of the `className` prop), but rather handed to emotion so it can handle it (e.g. as value of `css` prop)."; }
|
|
10846
|
+
|
|
10847
|
+
|
|
10848
|
+
|
|
10849
|
+
|
|
10850
|
+
var TableFilterTriggerWithNotification_ref = true ? {
|
|
10851
|
+
name: "3e57yb",
|
|
10852
|
+
styles: "width:16px;height:16px;min-width:16px;display:flex;justify-content:center;align-items:center"
|
|
10853
|
+
} : 0;
|
|
10854
|
+
const TableFilterTriggerWithNotification = ({
|
|
10855
|
+
children,
|
|
10856
|
+
count,
|
|
10857
|
+
visible = true
|
|
10858
|
+
}) => {
|
|
10859
|
+
const theme = (0,react_namespaceObject.useTheme)();
|
|
10860
|
+
const css = {
|
|
10861
|
+
display: visible ? 'flex' : 'none'
|
|
10862
|
+
};
|
|
10863
|
+
if (count) {
|
|
10864
|
+
css.background = theme.colors.blueDropdownWithSelectedItems;
|
|
10865
|
+
css.borderColor = theme.colors.blueDropdownWithSelectedItemsBorder;
|
|
10866
|
+
}
|
|
10867
|
+
return (0,jsx_runtime_namespaceObject.jsxs)(TableFilterTrigger, {
|
|
10868
|
+
css: css,
|
|
10869
|
+
count: count,
|
|
10870
|
+
children: [children, count ? (0,jsx_runtime_namespaceObject.jsx)(MultipleDropdownNotification_MultipleDropdownNotification, {
|
|
10871
|
+
as: 'div',
|
|
10872
|
+
css: TableFilterTriggerWithNotification_ref,
|
|
10873
|
+
"data-testid": 'trigger-notification',
|
|
10874
|
+
children: count
|
|
10875
|
+
}) : '']
|
|
10876
|
+
});
|
|
10877
|
+
};
|
|
10878
|
+
;// ./src/components/TableFilters/TableFiltersAccordion.tsx
|
|
10879
|
+
|
|
10880
|
+
|
|
10881
|
+
|
|
10882
|
+
const TableFiltersAccordion = props => (0,jsx_runtime_namespaceObject.jsx)(Accordion, {
|
|
10883
|
+
...props,
|
|
10884
|
+
css: /*#__PURE__*/(0,react_namespaceObject.css)({
|
|
10885
|
+
display: props.isHidden ? 'none' : 'flex',
|
|
10886
|
+
padding: '10px 0',
|
|
10887
|
+
'&:last-child': {
|
|
10888
|
+
paddingBottom: 0
|
|
10889
|
+
}
|
|
10890
|
+
}, true ? "" : 0, true ? "" : 0)
|
|
10891
|
+
});
|
|
10892
|
+
;// ./src/components/TableFilters/TableFiltersAccordionContent.tsx
|
|
10893
|
+
|
|
10894
|
+
|
|
10895
|
+
|
|
10896
|
+
const TableFiltersAccordionContent = ({
|
|
10897
|
+
isOpened,
|
|
10898
|
+
children,
|
|
10899
|
+
...rest
|
|
10900
|
+
}) => (0,jsx_runtime_namespaceObject.jsx)(AccordionContent, {
|
|
10901
|
+
...rest,
|
|
10902
|
+
isOpened: isOpened,
|
|
10903
|
+
css: /*#__PURE__*/(0,react_namespaceObject.css)({
|
|
10904
|
+
padding: isOpened ? '18px 3px 5px 3px' : 0
|
|
10905
|
+
}, true ? "" : 0, true ? "" : 0),
|
|
10906
|
+
children: children
|
|
10907
|
+
});
|
|
10908
|
+
;// ./src/components/TableFilters/TableFilterCheckbox.tsx
|
|
10909
|
+
|
|
10910
|
+
|
|
10911
|
+
|
|
10912
|
+
|
|
10913
|
+
const getStyles = theme => /*#__PURE__*/(0,react_namespaceObject.css)("margin:0 0 14px;& span{margin-left:16px;color:", theme.colors.greyDisabled, ";user-select:none;}& input+div{border-radius:2px;&::before{border-radius:2px;}}", checkboxStyles.blueInput(theme), ";" + ( true ? "" : 0), true ? "" : 0);
|
|
10914
|
+
const TableFilterCheckbox = props => {
|
|
10915
|
+
const theme = (0,react_namespaceObject.useTheme)();
|
|
10916
|
+
const styles = getStyles(theme);
|
|
10917
|
+
return (0,jsx_runtime_namespaceObject.jsx)(Checkbox_Checkbox, {
|
|
10918
|
+
...props,
|
|
10919
|
+
css: styles
|
|
10920
|
+
});
|
|
10921
|
+
};
|
|
10922
|
+
;// ./src/components/Popover/PopoverClose.tsx
|
|
9975
10923
|
|
|
9976
10924
|
|
|
9977
10925
|
|
|
@@ -10762,173 +11710,6 @@ const Filters = ({
|
|
|
10762
11710
|
};
|
|
10763
11711
|
;// ./src/components/Filters/index.ts
|
|
10764
11712
|
|
|
10765
|
-
;// ./src/components/Field/FieldRoot.tsx
|
|
10766
|
-
|
|
10767
|
-
|
|
10768
|
-
const FieldRoot = ({
|
|
10769
|
-
children,
|
|
10770
|
-
...props
|
|
10771
|
-
}) => {
|
|
10772
|
-
const {
|
|
10773
|
-
disabled = false,
|
|
10774
|
-
status = 'basic',
|
|
10775
|
-
forwardFocus = true,
|
|
10776
|
-
...divProps
|
|
10777
|
-
} = props;
|
|
10778
|
-
return (0,jsx_runtime_namespaceObject.jsx)("div", {
|
|
10779
|
-
...divProps,
|
|
10780
|
-
children: (0,jsx_runtime_namespaceObject.jsx)(FieldProvider, {
|
|
10781
|
-
value: {
|
|
10782
|
-
disabled,
|
|
10783
|
-
status,
|
|
10784
|
-
forwardFocus
|
|
10785
|
-
},
|
|
10786
|
-
children: children
|
|
10787
|
-
})
|
|
10788
|
-
});
|
|
10789
|
-
};
|
|
10790
|
-
;// ./src/components/Field/FieldLabel.tsx
|
|
10791
|
-
|
|
10792
|
-
|
|
10793
|
-
|
|
10794
|
-
const FieldLabel = ({
|
|
10795
|
-
children,
|
|
10796
|
-
...props
|
|
10797
|
-
}) => {
|
|
10798
|
-
const ctx = useFieldContext();
|
|
10799
|
-
return (0,jsx_runtime_namespaceObject.jsx)(Label_Label, {
|
|
10800
|
-
isDisabled: ctx.disabled,
|
|
10801
|
-
...props,
|
|
10802
|
-
children: children
|
|
10803
|
-
});
|
|
10804
|
-
};
|
|
10805
|
-
;// ./src/components/Field/FieldControl.tsx
|
|
10806
|
-
|
|
10807
|
-
|
|
10808
|
-
|
|
10809
|
-
|
|
10810
|
-
const FieldControlBase = /*#__PURE__*/base_default()("div", true ? {
|
|
10811
|
-
target: "e1lr2tz0"
|
|
10812
|
-
} : 0)("display:flex;align-items:center;min-height:44px;height:auto;border-radius:8px;overflow:hidden;border:1px solid ", ({
|
|
10813
|
-
status,
|
|
10814
|
-
theme
|
|
10815
|
-
}) => {
|
|
10816
|
-
if (status === 'error') return theme.colors.red;
|
|
10817
|
-
if (status === 'success') return theme.colors.greenLighter;
|
|
10818
|
-
return theme.colors.grey;
|
|
10819
|
-
}, ";background:", ({
|
|
10820
|
-
disabled,
|
|
10821
|
-
theme
|
|
10822
|
-
}) => disabled ? theme.colors.greyLighter : theme.colors.white, ";&>*{background:transparent;}&:active,&:hover{background:", ({
|
|
10823
|
-
disabled,
|
|
10824
|
-
theme
|
|
10825
|
-
}) => disabled ? theme.colors.greyLighter : theme.colors.white, ";box-shadow:none;}&:hover{cursor:", ({
|
|
10826
|
-
disabled
|
|
10827
|
-
}) => disabled ? 'default' : 'pointer', ";}&:focus-within,&:active{border-color:", ({
|
|
10828
|
-
status,
|
|
10829
|
-
disabled,
|
|
10830
|
-
theme
|
|
10831
|
-
}) => {
|
|
10832
|
-
if (disabled) return theme.colors.grey;
|
|
10833
|
-
if (status === 'error') return theme.colors.red;
|
|
10834
|
-
if (status === 'success') return theme.colors.greenLighter;
|
|
10835
|
-
return theme.colors.blueRoyal;
|
|
10836
|
-
}, ";}" + ( true ? "" : 0));
|
|
10837
|
-
const isForwardRefComponent = component => {
|
|
10838
|
-
if (typeof component.type === 'object' && component.type.$$typeof?.toString() === 'Symbol(react.forward_ref)') {
|
|
10839
|
-
return true;
|
|
10840
|
-
}
|
|
10841
|
-
return false;
|
|
10842
|
-
};
|
|
10843
|
-
const FieldControl = /*#__PURE__*/external_react_default().forwardRef(function FieldControl({
|
|
10844
|
-
children,
|
|
10845
|
-
controlRef,
|
|
10846
|
-
...props
|
|
10847
|
-
}, ref) {
|
|
10848
|
-
const ctx = useFieldContext();
|
|
10849
|
-
const baseProps = {
|
|
10850
|
-
...props,
|
|
10851
|
-
...ctx
|
|
10852
|
-
};
|
|
10853
|
-
const internalRef = (0,external_react_namespaceObject.useRef)(null);
|
|
10854
|
-
let _children = typeof children === 'function' ? children(ctx) : children;
|
|
10855
|
-
if (ctx.forwardFocus && /*#__PURE__*/(0,external_react_namespaceObject.isValidElement)(_children) && isForwardRefComponent(_children)) {
|
|
10856
|
-
const setRef = defaultRef => element => {
|
|
10857
|
-
internalRef.current = element;
|
|
10858
|
-
if (defaultRef) {
|
|
10859
|
-
if (typeof defaultRef === 'function') {
|
|
10860
|
-
defaultRef(element);
|
|
10861
|
-
} else {
|
|
10862
|
-
defaultRef.current = element;
|
|
10863
|
-
}
|
|
10864
|
-
}
|
|
10865
|
-
};
|
|
10866
|
-
_children = /*#__PURE__*/(0,external_react_namespaceObject.cloneElement)(_children, {
|
|
10867
|
-
ref: setRef(children.ref)
|
|
10868
|
-
});
|
|
10869
|
-
}
|
|
10870
|
-
return (0,jsx_runtime_namespaceObject.jsx)(FieldControlBase, {
|
|
10871
|
-
...baseProps,
|
|
10872
|
-
ref: ref,
|
|
10873
|
-
onClick: event => {
|
|
10874
|
-
baseProps.onClick?.(event);
|
|
10875
|
-
if (controlRef) {
|
|
10876
|
-
controlRef.current?.focus?.();
|
|
10877
|
-
} else if (internalRef.current) {
|
|
10878
|
-
internalRef.current?.focus?.();
|
|
10879
|
-
}
|
|
10880
|
-
},
|
|
10881
|
-
children: _children
|
|
10882
|
-
});
|
|
10883
|
-
});
|
|
10884
|
-
;// ./src/components/Field/FieldDescription.tsx
|
|
10885
|
-
|
|
10886
|
-
|
|
10887
|
-
|
|
10888
|
-
const FieldDescription = ({
|
|
10889
|
-
children
|
|
10890
|
-
}) => {
|
|
10891
|
-
const ctx = useFieldContext();
|
|
10892
|
-
if (ctx.status !== 'basic') {
|
|
10893
|
-
return null;
|
|
10894
|
-
}
|
|
10895
|
-
return (0,jsx_runtime_namespaceObject.jsx)(FormHelperText_FormHelperText, {
|
|
10896
|
-
status: "basic",
|
|
10897
|
-
children: children
|
|
10898
|
-
});
|
|
10899
|
-
};
|
|
10900
|
-
;// ./src/components/Field/FieldError.tsx
|
|
10901
|
-
|
|
10902
|
-
|
|
10903
|
-
|
|
10904
|
-
const FieldError = ({
|
|
10905
|
-
children
|
|
10906
|
-
}) => {
|
|
10907
|
-
const ctx = useFieldContext();
|
|
10908
|
-
if (ctx.status !== 'error') {
|
|
10909
|
-
return null;
|
|
10910
|
-
}
|
|
10911
|
-
return (0,jsx_runtime_namespaceObject.jsx)(FormHelperText_FormHelperText, {
|
|
10912
|
-
status: "error",
|
|
10913
|
-
children: children
|
|
10914
|
-
});
|
|
10915
|
-
};
|
|
10916
|
-
;// ./src/components/Field/FieldSuccess.tsx
|
|
10917
|
-
|
|
10918
|
-
|
|
10919
|
-
|
|
10920
|
-
const FieldSuccess = ({
|
|
10921
|
-
children
|
|
10922
|
-
}) => {
|
|
10923
|
-
const ctx = useFieldContext();
|
|
10924
|
-
if (ctx.status !== 'success') {
|
|
10925
|
-
return null;
|
|
10926
|
-
}
|
|
10927
|
-
return (0,jsx_runtime_namespaceObject.jsx)(FormHelperText_FormHelperText, {
|
|
10928
|
-
status: "success",
|
|
10929
|
-
children: children
|
|
10930
|
-
});
|
|
10931
|
-
};
|
|
10932
11713
|
;// ./src/components/FiltersMultiSelect/useFiltersMultiSelect.tsx
|
|
10933
11714
|
|
|
10934
11715
|
function useFilterMultiSelect({
|
|
@@ -11090,11 +11871,6 @@ function FiltersMultiSelect_EMOTION_STRINGIFIED_CSS_ERROR_() { return "You have
|
|
|
11090
11871
|
|
|
11091
11872
|
|
|
11092
11873
|
|
|
11093
|
-
|
|
11094
|
-
|
|
11095
|
-
|
|
11096
|
-
|
|
11097
|
-
|
|
11098
11874
|
var FiltersMultiSelect_ref = true ? {
|
|
11099
11875
|
name: "w1nxbg",
|
|
11100
11876
|
styles: "padding:6px 14px"
|
|
@@ -14509,7 +15285,7 @@ const styles_ResetBtnStyles = true ? {
|
|
|
14509
15285
|
name: "2hrei",
|
|
14510
15286
|
styles: "padding:0;height:auto;background:none;&:focus,&:hover{border:none;background:none;box-shadow:none;&::before{border:none;}}"
|
|
14511
15287
|
} : 0;
|
|
14512
|
-
const
|
|
15288
|
+
const styles_ContentWrapper = theme => /*#__PURE__*/(0,react_namespaceObject.css)("width:224px;background:", theme.colors.greyPopoverLight, ";border-radius:20px;box-shadow:0px 4px 15px 0px ", theme.colors.black25, ";" + ( true ? "" : 0), true ? "" : 0);
|
|
14513
15289
|
const UserInfo = true ? {
|
|
14514
15290
|
name: "fwy071",
|
|
14515
15291
|
styles: "gap:2px;width:100%;padding:10px"
|
|
@@ -14547,7 +15323,7 @@ const UserProfile = ({
|
|
|
14547
15323
|
css: styles_ResetBtnStyles,
|
|
14548
15324
|
children: trigger
|
|
14549
15325
|
}), (0,jsx_runtime_namespaceObject.jsxs)(PopoverContent, {
|
|
14550
|
-
css:
|
|
15326
|
+
css: styles_ContentWrapper,
|
|
14551
15327
|
className: className,
|
|
14552
15328
|
children: [(0,jsx_runtime_namespaceObject.jsxs)("div", {
|
|
14553
15329
|
css: UserInfo,
|
|
@@ -14780,6 +15556,8 @@ const WithVisibleUpToLG = (Component, styles) => {
|
|
|
14780
15556
|
|
|
14781
15557
|
|
|
14782
15558
|
|
|
15559
|
+
|
|
15560
|
+
|
|
14783
15561
|
|
|
14784
15562
|
|
|
14785
15563
|
|