@geneui/components 3.0.0-next-06dadf3-29102024 → 3.0.0-next-48d0ef7-31102024
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/Avatar.js +63 -0
- package/Divider.js +23 -0
- package/{GeneUIProvider/index.js → GeneUIProvider.js} +51 -64
- package/HelperText.js +69 -0
- package/Info.js +64 -0
- package/Label.js +38 -0
- package/Loader.js +21 -0
- package/Pill.js +64 -0
- package/TextLink.js +20 -0
- package/{index-c7646e48.js → Tooltip.js} +101 -79
- package/{lib → components}/atoms/Avatar/Avatar.d.ts +7 -6
- package/components/atoms/Avatar/index.d.ts +1 -0
- package/{lib → components}/atoms/Divider/Divider.d.ts +5 -5
- package/components/atoms/Divider/index.d.ts +1 -0
- package/{lib → components}/atoms/HelperText/HelperText.d.ts +6 -5
- package/components/atoms/HelperText/index.d.ts +1 -0
- package/{lib → components}/atoms/Info/Info.d.ts +5 -5
- package/components/atoms/Info/index.d.ts +1 -0
- package/{lib → components}/atoms/Label/Label.d.ts +3 -3
- package/components/atoms/Label/index.d.ts +1 -0
- package/{lib → components}/atoms/Loader/Loader.d.ts +5 -5
- package/components/atoms/Loader/index.d.ts +1 -0
- package/{lib → components}/atoms/Pill/Pill.d.ts +7 -6
- package/components/atoms/Pill/index.d.ts +1 -0
- package/{lib → components}/atoms/TextLink/TextLink.d.ts +5 -5
- package/components/atoms/TextLink/index.d.ts +1 -0
- package/{lib → components}/molecules/Tooltip/Tooltip.d.ts +26 -21
- package/components/molecules/Tooltip/index.d.ts +1 -0
- package/components/providers/GeneUIProvider/GeneUIProvider.d.ts +30 -0
- package/components/providers/GeneUIProvider/index.d.ts +1 -0
- package/hooks/index.d.ts +2 -20
- package/hooks/useDebounceCallback/index.d.ts +1 -0
- package/hooks/useDebounceCallback/useDebounceCallback.d.ts +2 -0
- package/hooks/useEllipsisDetection/index.d.ts +1 -1
- package/hooks/useEllipsisDetection/useEllipsisDetection.d.ts +2 -2
- package/{index-031ff73c.js → index-ce02421b.js} +4 -4
- package/index.d.ts +11 -121
- package/index.js +12 -159
- package/package.json +24 -43
- package/tokens-0abb4e1b.js +6 -0
- package/types/index.d.ts +0 -3
- package/useEllipsisDetection-46d712b6.js +34 -0
- package/ActionableList/index.js +0 -1694
- package/AdvancedSearch/index.js +0 -892
- package/Alert/index.js +0 -98
- package/Avatar/index.js +0 -58
- package/Badge/index.js +0 -29
- package/Breadcrumb/index.js +0 -130
- package/BusyLoader/index.js +0 -31
- package/Button/index.js +0 -30
- package/Card/index.js +0 -502
- package/CardList/index.js +0 -662
- package/CellMeasurerCache-26f3693c.js +0 -229
- package/Charts/index.js +0 -17662
- package/Checkbox/index.js +0 -229
- package/CheckboxGroup/index.js +0 -203
- package/CheckboxGroupWithSearch/index.js +0 -280
- package/Collapse/index.js +0 -195
- package/ColorPicker/index.js +0 -210
- package/ComboBox/index.js +0 -524
- package/Copy/index.js +0 -56
- package/Counter/index.js +0 -312
- package/DateFilter/index.js +0 -183
- package/DatePicker/index.js +0 -1229
- package/DatePickerInput/index.js +0 -883
- package/Divider/index.js +0 -23
- package/Drawer/index.js +0 -261
- package/Dropdown/index.js +0 -43
- package/Editor/index.js +0 -22975
- package/Empty/index.js +0 -76
- package/ExtendedInput/index.js +0 -590
- package/Form/index.js +0 -85
- package/FormContainer/index.js +0 -189
- package/FormableCheckbox/index.js +0 -24
- package/FormableDatePicker/index.js +0 -43
- package/FormableDropdown/index.js +0 -50
- package/FormableEditor/index.js +0 -26
- package/FormableHOC-85f89a81.js +0 -83
- package/FormableMultiSelectDropdown/index.js +0 -50
- package/FormableNumberInput/index.js +0 -34
- package/FormableRadio/index.js +0 -22
- package/FormableSwitcher/index.js +0 -22
- package/FormableTextInput/index.js +0 -34
- package/FormableUploader/index.js +0 -44
- package/Grid/index.js +0 -167
- package/HelperText/index.js +0 -86
- package/Holder/index.js +0 -261
- package/Icon/index.js +0 -62
- package/Image/index.js +0 -45
- package/ImagePreview/index.js +0 -217
- package/Info/index.js +0 -41
- package/InfoOutline-dd2e89d9.js +0 -29
- package/InteractiveWidget/index.js +0 -78
- package/KeyValue/index.js +0 -22
- package/Label/index.js +0 -48
- package/LinkButton/index.js +0 -34
- package/Loader/index.js +0 -23
- package/Menu/index.js +0 -281
- package/MobileNavigation/index.js +0 -94
- package/MobilePopup/index.js +0 -182
- package/Modal/index.js +0 -251
- package/ModuleTitle/index.js +0 -141
- package/NavigationMenu/index.js +0 -222
- package/Notification/index.js +0 -120
- package/Option/index.js +0 -184
- package/Overlay/index.js +0 -187
- package/Overspread/index.js +0 -291
- package/Pagination/index.js +0 -261
- package/Paper/index.js +0 -96
- package/Pill/index.js +0 -67
- package/Popover/index.js +0 -725
- package/PopoverV2/index.js +0 -19
- package/Portal/index.js +0 -58
- package/Products/index.js +0 -115
- package/Profile/index.js +0 -589
- package/Progress/index.js +0 -200
- package/QRCode/index.js +0 -814
- package/Radio/index.js +0 -151
- package/RadioGroup/index.js +0 -104
- package/Range/index.js +0 -191
- package/Rating/index.js +0 -174
- package/RichEditor/index.js +0 -13
- package/RichEditor-6ca8346f.js +0 -228
- package/Scrollbar/index.js +0 -1585
- package/Search/index.js +0 -75
- package/SearchWithDropdown/index.js +0 -140
- package/Section/index.js +0 -61
- package/SkeletonLoader/index.js +0 -81
- package/Slider/index.js +0 -261
- package/Status/index.js +0 -97
- package/Steps/index.js +0 -314
- package/SuggestionList/index.js +0 -385
- package/Switcher/index.js +0 -193
- package/Table/index.js +0 -57
- package/TableCompositions/index.js +0 -16995
- package/Tabs/index.js +0 -235
- package/Tag/index.js +0 -102
- package/TextLink/index.js +0 -20
- package/Textarea/index.js +0 -242
- package/Time/index.js +0 -62
- package/TimePicker/index.js +0 -575
- package/Timeline/index.js +0 -113
- package/Title/index.js +0 -65
- package/Toaster/index.js +0 -116
- package/Tooltip/index.js +0 -6
- package/TransferList/index.js +0 -493
- package/Uploader/index.js +0 -992
- package/ValidatableCheckbox/index.js +0 -123
- package/ValidatableDatePicker/index.js +0 -316
- package/ValidatableDropdown/index.js +0 -141
- package/ValidatableElements/index.js +0 -67
- package/ValidatableMultiSelectDropdown/index.js +0 -152
- package/ValidatableNumberInput/index.js +0 -204
- package/ValidatableRadio/index.js +0 -116
- package/ValidatableSwitcher/index.js +0 -93
- package/ValidatableTextInput/index.js +0 -167
- package/ValidatableTimeInput/index.js +0 -174
- package/ValidatableUploader/index.js +0 -98
- package/Widget/index.js +0 -225
- package/_commonjsHelpers-24198af3.js +0 -35
- package/_rollupPluginBabelHelpers-a83240e1.js +0 -11
- package/callAfterDelay-7272faca.js +0 -12
- package/checkTimeValidation-e56771be.js +0 -16
- package/checkboxRadioSwitcher-5b69d7bd.js +0 -4
- package/clsx.m-2bb6df4b.js +0 -3
- package/config-1053d64d.js +0 -20
- package/configs-00612ce0.js +0 -103
- package/configs.js +0 -111
- package/dateValidation-67caec66.js +0 -225
- package/debounce-4419bc2f.js +0 -17
- package/guid-8ddf77b3.js +0 -16
- package/hooks/useBodyScroll.js +0 -16
- package/hooks/useClick.js +0 -18
- package/hooks/useClickOutside.js +0 -25
- package/hooks/useDebounce.js +0 -28
- package/hooks/useDeviceType.js +0 -17
- package/hooks/useDidMount.js +0 -15
- package/hooks/useForceUpdate.js +0 -8
- package/hooks/useHover.js +0 -20
- package/hooks/useImgDownload.js +0 -18
- package/hooks/useKeyDown.js +0 -21
- package/hooks/useMount.js +0 -13
- package/hooks/useMutationObserver.js +0 -21
- package/hooks/usePrevious.js +0 -10
- package/hooks/useThrottle.js +0 -16
- package/hooks/useToggle.js +0 -11
- package/hooks/useUpdatableRef.js +0 -14
- package/hooks/useUpdate.js +0 -10
- package/hooks/useWidth.js +0 -16
- package/hooks/useWindowSize.js +0 -40
- package/index-122432cd.js +0 -270
- package/index-262edd7a.js +0 -77
- package/index-3188e46e.js +0 -1940
- package/index-45eafea6.js +0 -90
- package/index-5f37f281.js +0 -168
- package/index-ce12e4a9.js +0 -10032
- package/index-d0ecb950.js +0 -6483
- package/index-fcbae78d.js +0 -4
- package/index.mobile.d.ts +0 -14
- package/lib/atoms/Avatar/index.d.ts +0 -1
- package/lib/atoms/Badge/Badge.d.ts +0 -36
- package/lib/atoms/Badge/index.d.ts +0 -1
- package/lib/atoms/BusyLoader/BusyLoader.d.ts +0 -32
- package/lib/atoms/BusyLoader/BusyLoaderHolderHOC.d.ts +0 -8
- package/lib/atoms/BusyLoader/index.d.ts +0 -1
- package/lib/atoms/Button/Button.d.ts +0 -70
- package/lib/atoms/Button/index.d.ts +0 -1
- package/lib/atoms/Divider/index.d.ts +0 -1
- package/lib/atoms/Empty/Empty.d.ts +0 -39
- package/lib/atoms/Empty/index.d.ts +0 -1
- package/lib/atoms/Empty/utils.d.ts +0 -9
- package/lib/atoms/HelperText/index.d.ts +0 -1
- package/lib/atoms/Image/Image.d.ts +0 -51
- package/lib/atoms/Image/index.d.ts +0 -1
- package/lib/atoms/ImagePreview/ImagePreview.d.ts +0 -56
- package/lib/atoms/ImagePreview/ImagePreviewHOC.d.ts +0 -4
- package/lib/atoms/ImagePreview/Magnifier.d.ts +0 -40
- package/lib/atoms/ImagePreview/index.d.ts +0 -1
- package/lib/atoms/Info/index.d.ts +0 -1
- package/lib/atoms/KeyValue/KeyValue.d.ts +0 -29
- package/lib/atoms/KeyValue/index.d.ts +0 -1
- package/lib/atoms/Label/index.d.ts +0 -1
- package/lib/atoms/LinkButton/LinkButton.d.ts +0 -46
- package/lib/atoms/LinkButton/index.d.ts +0 -1
- package/lib/atoms/Loader/index.d.ts +0 -1
- package/lib/atoms/Pill/index.d.ts +0 -1
- package/lib/atoms/Rating/DefaultSvg.d.ts +0 -3
- package/lib/atoms/Rating/Rating.d.ts +0 -49
- package/lib/atoms/Rating/index.d.ts +0 -1
- package/lib/atoms/TextLink/index.d.ts +0 -1
- package/lib/molecules/Copy/Copy.d.ts +0 -38
- package/lib/molecules/Copy/index.d.ts +0 -1
- package/lib/molecules/InteractiveWidget/InteractiveWidget.d.ts +0 -70
- package/lib/molecules/InteractiveWidget/InteractiveWidgetIcon.d.ts +0 -8
- package/lib/molecules/InteractiveWidget/index.d.ts +0 -1
- package/lib/molecules/Tooltip/index.d.ts +0 -1
- package/lib/providers/GeneUIProvider/GeneUIProvider.d.ts +0 -30
- package/lib/providers/GeneUIProvider/index.d.ts +0 -1
- package/localization-4ba17032.js +0 -46
- package/objectWithoutPropertiesLoose-e1596bdb.js +0 -62
- package/rangeAndSlider-740a236c.js +0 -8676
- package/react-beautiful-dnd.esm-8c7b5a83.js +0 -10116
- package/react-lifecycles-compat.es-6e1f3768.js +0 -158
- package/redux-e591c1b8.js +0 -536
- package/tokens-8ab1179c.js +0 -6
- package/tslib.es6-f211516f.js +0 -35
- package/useEllipsisDetection-c1c9ad94.js +0 -38
package/index-45eafea6.js
DELETED
|
@@ -1,90 +0,0 @@
|
|
|
1
|
-
/*
|
|
2
|
-
object-assign
|
|
3
|
-
(c) Sindre Sorhus
|
|
4
|
-
@license MIT
|
|
5
|
-
*/
|
|
6
|
-
/* eslint-disable no-unused-vars */
|
|
7
|
-
var getOwnPropertySymbols = Object.getOwnPropertySymbols;
|
|
8
|
-
var hasOwnProperty = Object.prototype.hasOwnProperty;
|
|
9
|
-
var propIsEnumerable = Object.prototype.propertyIsEnumerable;
|
|
10
|
-
|
|
11
|
-
function toObject(val) {
|
|
12
|
-
if (val === null || val === undefined) {
|
|
13
|
-
throw new TypeError('Object.assign cannot be called with null or undefined');
|
|
14
|
-
}
|
|
15
|
-
|
|
16
|
-
return Object(val);
|
|
17
|
-
}
|
|
18
|
-
|
|
19
|
-
function shouldUseNative() {
|
|
20
|
-
try {
|
|
21
|
-
if (!Object.assign) {
|
|
22
|
-
return false;
|
|
23
|
-
}
|
|
24
|
-
|
|
25
|
-
// Detect buggy property enumeration order in older V8 versions.
|
|
26
|
-
|
|
27
|
-
// https://bugs.chromium.org/p/v8/issues/detail?id=4118
|
|
28
|
-
var test1 = new String('abc'); // eslint-disable-line no-new-wrappers
|
|
29
|
-
test1[5] = 'de';
|
|
30
|
-
if (Object.getOwnPropertyNames(test1)[0] === '5') {
|
|
31
|
-
return false;
|
|
32
|
-
}
|
|
33
|
-
|
|
34
|
-
// https://bugs.chromium.org/p/v8/issues/detail?id=3056
|
|
35
|
-
var test2 = {};
|
|
36
|
-
for (var i = 0; i < 10; i++) {
|
|
37
|
-
test2['_' + String.fromCharCode(i)] = i;
|
|
38
|
-
}
|
|
39
|
-
var order2 = Object.getOwnPropertyNames(test2).map(function (n) {
|
|
40
|
-
return test2[n];
|
|
41
|
-
});
|
|
42
|
-
if (order2.join('') !== '0123456789') {
|
|
43
|
-
return false;
|
|
44
|
-
}
|
|
45
|
-
|
|
46
|
-
// https://bugs.chromium.org/p/v8/issues/detail?id=3056
|
|
47
|
-
var test3 = {};
|
|
48
|
-
'abcdefghijklmnopqrst'.split('').forEach(function (letter) {
|
|
49
|
-
test3[letter] = letter;
|
|
50
|
-
});
|
|
51
|
-
if (Object.keys(Object.assign({}, test3)).join('') !==
|
|
52
|
-
'abcdefghijklmnopqrst') {
|
|
53
|
-
return false;
|
|
54
|
-
}
|
|
55
|
-
|
|
56
|
-
return true;
|
|
57
|
-
} catch (err) {
|
|
58
|
-
// We don't expect any of the above to throw, but better to be safe.
|
|
59
|
-
return false;
|
|
60
|
-
}
|
|
61
|
-
}
|
|
62
|
-
|
|
63
|
-
var objectAssign = shouldUseNative() ? Object.assign : function (target, source) {
|
|
64
|
-
var from;
|
|
65
|
-
var to = toObject(target);
|
|
66
|
-
var symbols;
|
|
67
|
-
|
|
68
|
-
for (var s = 1; s < arguments.length; s++) {
|
|
69
|
-
from = Object(arguments[s]);
|
|
70
|
-
|
|
71
|
-
for (var key in from) {
|
|
72
|
-
if (hasOwnProperty.call(from, key)) {
|
|
73
|
-
to[key] = from[key];
|
|
74
|
-
}
|
|
75
|
-
}
|
|
76
|
-
|
|
77
|
-
if (getOwnPropertySymbols) {
|
|
78
|
-
symbols = getOwnPropertySymbols(from);
|
|
79
|
-
for (var i = 0; i < symbols.length; i++) {
|
|
80
|
-
if (propIsEnumerable.call(from, symbols[i])) {
|
|
81
|
-
to[symbols[i]] = from[symbols[i]];
|
|
82
|
-
}
|
|
83
|
-
}
|
|
84
|
-
}
|
|
85
|
-
}
|
|
86
|
-
|
|
87
|
-
return to;
|
|
88
|
-
};
|
|
89
|
-
|
|
90
|
-
export { objectAssign as o };
|
package/index-5f37f281.js
DELETED
|
@@ -1,168 +0,0 @@
|
|
|
1
|
-
import PropTypes from 'prop-types';
|
|
2
|
-
import { a as dayjs } from './dateValidation-67caec66.js';
|
|
3
|
-
import 'react-dom';
|
|
4
|
-
|
|
5
|
-
class Logger {
|
|
6
|
-
success(message) {
|
|
7
|
-
console.log("%c".concat(message), 'color: green');
|
|
8
|
-
}
|
|
9
|
-
warning(message) {
|
|
10
|
-
console.warn(message);
|
|
11
|
-
}
|
|
12
|
-
error(message) {
|
|
13
|
-
console.error(message);
|
|
14
|
-
}
|
|
15
|
-
deprecate(message) {
|
|
16
|
-
console.warn("DEPRECATION WARNING(gene-ui): ".concat(message));
|
|
17
|
-
}
|
|
18
|
-
}
|
|
19
|
-
var Logger$1 = new Logger();
|
|
20
|
-
|
|
21
|
-
/*
|
|
22
|
-
* Use this function for informing about
|
|
23
|
-
* props that are in conflict with each other.
|
|
24
|
-
*/
|
|
25
|
-
const conflictPropsLog = function (componentName, props) {
|
|
26
|
-
let isWarning = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : false;
|
|
27
|
-
const message = props.map(prop => "'".concat(prop, "'")).join(' and ');
|
|
28
|
-
const logFunction = isWarning ? Logger$1.warning : Logger$1.error;
|
|
29
|
-
logFunction("You can't specify ".concat(message, " props together for ").concat(componentName, " component."));
|
|
30
|
-
};
|
|
31
|
-
|
|
32
|
-
/*
|
|
33
|
-
* Function will check does provided keyboard key codes
|
|
34
|
-
* match with the one that bubbled event.
|
|
35
|
-
*/
|
|
36
|
-
const keyboardHandler = (e, keys) => keys.some(key => key === e.which || key === e.keycode);
|
|
37
|
-
|
|
38
|
-
/*
|
|
39
|
-
* PropTypes.instanceOf works only for class components
|
|
40
|
-
*/
|
|
41
|
-
const childrenOf = types => {
|
|
42
|
-
const type = PropTypes.shape({
|
|
43
|
-
type: PropTypes.oneOf(types)
|
|
44
|
-
});
|
|
45
|
-
return PropTypes.oneOfType([type, PropTypes.arrayOf(type)]);
|
|
46
|
-
};
|
|
47
|
-
|
|
48
|
-
/*
|
|
49
|
-
* One of specified props is required. Use for conditinal required props.
|
|
50
|
-
*/
|
|
51
|
-
|
|
52
|
-
const oneIsRequired = properties => {
|
|
53
|
-
const keys = Object.keys(properties);
|
|
54
|
-
return keys.reduce((acc, item) => {
|
|
55
|
-
acc[item] = (props, propName, componentName) => {
|
|
56
|
-
if (keys.every(key => !props.hasOwnProperty(key))) {
|
|
57
|
-
return new Error("".concat(keys.join(' or '), " must be specified for ").concat(componentName));
|
|
58
|
-
}
|
|
59
|
-
PropTypes.checkPropTypes({
|
|
60
|
-
[propName]: properties[propName]
|
|
61
|
-
}, props, propName, componentName);
|
|
62
|
-
};
|
|
63
|
-
return acc;
|
|
64
|
-
}, {});
|
|
65
|
-
};
|
|
66
|
-
const chunk = function (array) {
|
|
67
|
-
let size = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 0;
|
|
68
|
-
const length = array && array.length;
|
|
69
|
-
if (!array || !length) return [];
|
|
70
|
-
if (size < 1) return array;
|
|
71
|
-
let i = 0;
|
|
72
|
-
let j = 0;
|
|
73
|
-
const result = [];
|
|
74
|
-
while (i < length) {
|
|
75
|
-
result[j++] = array.slice(i, i += size);
|
|
76
|
-
}
|
|
77
|
-
return result;
|
|
78
|
-
};
|
|
79
|
-
|
|
80
|
-
/*
|
|
81
|
-
* Display file size bytes
|
|
82
|
-
*/
|
|
83
|
-
const fileSizeDisplay = bytes => {
|
|
84
|
-
if (!bytes || bytes < 1) return '0 Byte';
|
|
85
|
-
const sizes = ['Byte', 'KB', 'MB', 'GB', 'TR'];
|
|
86
|
-
const powerOfTwo = Math.floor(Math.log2(bytes) / 10);
|
|
87
|
-
const i = powerOfTwo > 4 ? 4 : powerOfTwo;
|
|
88
|
-
return "".concat(Math.floor(bytes / 2 ** (i * 10)), " ").concat(sizes[i]);
|
|
89
|
-
};
|
|
90
|
-
const getImageDimensions = image => new Promise((resolve, reject) => {
|
|
91
|
-
if (window.Image && window.URL) {
|
|
92
|
-
const img = new Image();
|
|
93
|
-
img.src = window.URL.createObjectURL(image);
|
|
94
|
-
img.onload = function () {
|
|
95
|
-
resolve({
|
|
96
|
-
width: img.naturalWidth,
|
|
97
|
-
height: img.naturalHeight
|
|
98
|
-
});
|
|
99
|
-
window.URL.revokeObjectURL(img.src);
|
|
100
|
-
};
|
|
101
|
-
img.onerror = error => {
|
|
102
|
-
reject(error);
|
|
103
|
-
};
|
|
104
|
-
} else {
|
|
105
|
-
reject();
|
|
106
|
-
}
|
|
107
|
-
});
|
|
108
|
-
const interceptValue = (event, value) => ({
|
|
109
|
-
...event,
|
|
110
|
-
target: {
|
|
111
|
-
...event.target,
|
|
112
|
-
value
|
|
113
|
-
}
|
|
114
|
-
});
|
|
115
|
-
const stopEvent = function (event) {
|
|
116
|
-
let isPreventNeeded = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;
|
|
117
|
-
event.stopPropagation();
|
|
118
|
-
isPreventNeeded && event.preventDefault();
|
|
119
|
-
};
|
|
120
|
-
|
|
121
|
-
/*
|
|
122
|
-
* This part for date filter organism,
|
|
123
|
-
* functions are checking is your past date in right range or no.
|
|
124
|
-
*/
|
|
125
|
-
|
|
126
|
-
const getLMTD = (today, dayFromLastMonth) => {
|
|
127
|
-
const dayOfMonth = today.date();
|
|
128
|
-
const selectedDayOfMonth = dayFromLastMonth.startOf('month').date(dayOfMonth);
|
|
129
|
-
return today.isSame(selectedDayOfMonth, 'month') ? dayFromLastMonth.endOf('month') : selectedDayOfMonth;
|
|
130
|
-
};
|
|
131
|
-
const isDateInRightRange = (rangeStart, rangeEnd, startDate, endDate) => rangeStart.isSame(startDate, 'day') && rangeEnd.isSame(endDate, 'day');
|
|
132
|
-
const isToday = (startDate, endDate) => {
|
|
133
|
-
const today = dayjs();
|
|
134
|
-
return isDateInRightRange(today, today, startDate, endDate);
|
|
135
|
-
};
|
|
136
|
-
const isYesterday = (startDate, endDate) => {
|
|
137
|
-
const yesterday = dayjs().subtract(1, 'day');
|
|
138
|
-
return isDateInRightRange(yesterday, yesterday, startDate, endDate);
|
|
139
|
-
};
|
|
140
|
-
const isThisWeek = (startDate, endDate) => {
|
|
141
|
-
const startOfCurrentWeek = dayjs().startOf('week');
|
|
142
|
-
const endOfCurrentWeek = dayjs().endOf('week');
|
|
143
|
-
return isDateInRightRange(startOfCurrentWeek, endOfCurrentWeek, startDate, endDate);
|
|
144
|
-
};
|
|
145
|
-
const isLastWeek = (startDate, endDate) => {
|
|
146
|
-
const startOfLastWeek = dayjs().subtract(7, 'day').startOf('week');
|
|
147
|
-
const endOfLastWeek = dayjs().subtract(7, 'day').endOf('week');
|
|
148
|
-
return isDateInRightRange(startOfLastWeek, endOfLastWeek, startDate, endDate);
|
|
149
|
-
};
|
|
150
|
-
const isThisMonth = (startDate, endDate) => {
|
|
151
|
-
const startOfCurrentMonth = dayjs().startOf('month');
|
|
152
|
-
const endOfCurrentMonth = dayjs().endOf('month');
|
|
153
|
-
return isDateInRightRange(startOfCurrentMonth, endOfCurrentMonth, startDate, endDate);
|
|
154
|
-
};
|
|
155
|
-
const isLastMonth = (startDate, endDate) => {
|
|
156
|
-
const startOfLastMonth = dayjs().subtract(1, 'month').startOf('month');
|
|
157
|
-
const endOfLastMonth = dayjs().subtract(1, 'month').endOf('month');
|
|
158
|
-
return isDateInRightRange(startOfLastMonth, endOfLastMonth, startDate, endDate);
|
|
159
|
-
};
|
|
160
|
-
const isLastMonthToDate = (startDate, endDate) => {
|
|
161
|
-
const today = dayjs();
|
|
162
|
-
const startOfLastMonth = today.subtract(1, 'month').startOf('month');
|
|
163
|
-
const sameDayFromLastMonth = getLMTD(today, startOfLastMonth);
|
|
164
|
-
return isDateInRightRange(startOfLastMonth, sameDayFromLastMonth, startDate, endDate);
|
|
165
|
-
};
|
|
166
|
-
const noop = () => {};
|
|
167
|
-
|
|
168
|
-
export { Logger$1 as L, conflictPropsLog as a, isToday as b, childrenOf as c, isYesterday as d, isThisWeek as e, fileSizeDisplay as f, isLastWeek as g, isThisMonth as h, interceptValue as i, isLastMonth as j, keyboardHandler as k, isLastMonthToDate as l, getLMTD as m, noop as n, oneIsRequired as o, getImageDimensions as p, chunk as q, stopEvent as s };
|