@jobber/components 6.101.4 → 6.101.5-JOB-140604-4487daa.55
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/Autocomplete/Autocomplete.types.d.ts +11 -51
- package/dist/Autocomplete/components/MenuList.d.ts +3 -2
- package/dist/Autocomplete/components/PersistentRegion.d.ts +3 -2
- package/dist/Autocomplete/hooks/useAutocompleteListNav.d.ts +3 -2
- package/dist/Autocomplete/index.cjs +95 -51
- package/dist/Autocomplete/index.mjs +97 -53
- package/dist/Autocomplete/tests/Autocomplete.setup.d.ts +14 -1
- package/dist/Autocomplete/useAutocomplete.d.ts +4 -3
- package/dist/Autocomplete/utils/interactionUtils.d.ts +14 -0
- package/dist/Card-cjs.js +1 -1
- package/dist/Card-es.js +1 -1
- package/dist/Checkbox/Checkbox.rebuilt.d.ts +2 -2
- package/dist/Checkbox/Checkbox.types.d.ts +24 -18
- package/dist/Checkbox/index.cjs +9 -2
- package/dist/Checkbox/index.mjs +9 -2
- package/dist/Chip/Chip.d.ts +1 -2
- package/dist/Chip/hooks/useChildComponent.d.ts +4 -3
- package/dist/Chip/index.cjs +1 -1
- package/dist/Chip-cjs.js +5 -4
- package/dist/Chip-es.js +5 -4
- package/dist/ChipDismissible-cjs.js +4 -4
- package/dist/ChipDismissible-es.js +5 -5
- package/dist/Chips/InternalChipDismissible/hooks/index.cjs +2 -2
- package/dist/Chips/InternalChipDismissible/hooks/index.mjs +2 -2
- package/dist/Chips/InternalChipDismissible/hooks/useInView.d.ts +1 -1
- package/dist/Chips/InternalChipDismissible/hooks/useInternalChipDismissibleInput.d.ts +1 -1
- package/dist/Chips/InternalChipDismissible/hooks/useScrollToActive.d.ts +1 -1
- package/dist/Chips/InternalChipDismissible/index.cjs +2 -2
- package/dist/Chips/InternalChipDismissible/index.mjs +2 -2
- package/dist/Chips/index.cjs +2 -2
- package/dist/Chips/index.mjs +2 -2
- package/dist/Combobox/Combobox.d.ts +2 -1
- package/dist/Combobox/Combobox.types.d.ts +2 -2
- package/dist/Combobox/ComboboxProvider.d.ts +3 -3
- package/dist/Combobox/components/ComboboxActivator/ComboboxActivator.d.ts +1 -1
- package/dist/Combobox/components/ComboboxContent/ComboboxContent.d.ts +2 -1
- package/dist/Combobox/components/ComboboxContent/ComboboxContentHeader/ComboboxContentHeader.d.ts +2 -1
- package/dist/Combobox/components/ComboboxContent/ComboboxContentList/ComboboxContentList.d.ts +2 -1
- package/dist/Combobox/components/ComboboxContent/ComboboxContentSearch/ComboboxContentSearch.d.ts +2 -1
- package/dist/Combobox/hooks/useCombobox.d.ts +1 -1
- package/dist/Combobox/hooks/useComboboxAccessibility.d.ts +2 -2
- package/dist/Combobox/hooks/useComboboxContent.d.ts +2 -1
- package/dist/Combobox/hooks/useMakeComboboxHandlers.d.ts +1 -1
- package/dist/ComboboxActivator-cjs.js +2 -2
- package/dist/ComboboxActivator-es.js +3 -3
- package/dist/ComboboxTrigger-cjs.js +1 -1
- package/dist/ComboboxTrigger-es.js +2 -2
- package/dist/DataList/DataList.types.d.ts +2 -2
- package/dist/DataList/DataList.utils.d.ts +2 -2
- package/dist/DataList/components/DataListHeader/index.cjs +1 -0
- package/dist/DataList/components/DataListHeader/index.mjs +1 -0
- package/dist/DataList/components/DataListHeaderTile/components/DataListSortingOptions.d.ts +2 -2
- package/dist/DataList/components/DataListItem/DataListItemInternal.d.ts +2 -2
- package/dist/DataList/components/DataListItem/index.cjs +1 -0
- package/dist/DataList/components/DataListItem/index.mjs +1 -0
- package/dist/DataList/components/DataListItems/index.cjs +1 -0
- package/dist/DataList/components/DataListItems/index.mjs +1 -0
- package/dist/DataList/components/DataListLayout/index.cjs +1 -0
- package/dist/DataList/components/DataListLayout/index.mjs +1 -0
- package/dist/DataList/components/DataListSearch/index.cjs +2 -12
- package/dist/DataList/components/DataListSearch/index.mjs +2 -12
- package/dist/DataList/hooks/useGetItemActions.d.ts +1 -1
- package/dist/DataList/index.cjs +1 -8
- package/dist/DataList/index.mjs +1 -8
- package/dist/DataListActions-cjs.js +4 -2
- package/dist/DataListActions-es.js +4 -2
- package/dist/DataListItem-cjs.js +8 -7
- package/dist/DataListItem-es.js +9 -8
- package/dist/DataListSort-cjs.js +1 -1
- package/dist/DataListSort-es.js +2 -2
- package/dist/DataTable/SortIcon.d.ts +2 -1
- package/dist/DataTable/components/DataTableSortableHeader.d.ts +1 -1
- package/dist/DataTable/index.cjs +3 -2
- package/dist/DataTable/index.mjs +3 -2
- package/dist/DatePicker/DatePicker.d.ts +5 -1
- package/dist/DatePicker/index.cjs +2 -2
- package/dist/DatePicker/index.mjs +2 -2
- package/dist/DatePicker/useFocusOnSelectedDate.d.ts +1 -2
- package/dist/DatePicker-cjs.js +4 -2
- package/dist/DatePicker-es.js +5 -3
- package/dist/FormField/FormFieldAffix.d.ts +2 -2
- package/dist/FormField/FormFieldTypes.d.ts +3 -5
- package/dist/FormField/FormFieldWrapper.d.ts +5 -1
- package/dist/FormField/hooks/useFormFieldFocus.d.ts +1 -1
- package/dist/FormField/hooks/useFormFieldWrapperStyles.d.ts +9 -4
- package/dist/FormField-cjs.js +35 -31
- package/dist/FormField-es.js +35 -31
- package/dist/InputDate/InputDate.types.d.ts +12 -7
- package/dist/InputDate/index.cjs +35 -12
- package/dist/InputDate/index.mjs +35 -12
- package/dist/InputDate/useInputDateActivatorActions.d.ts +4 -8
- package/dist/InputEmail/InputEmail.types.d.ts +10 -20
- package/dist/InputEmail/hooks/useInputEmailActions.d.ts +10 -4
- package/dist/InputEmail/index.cjs +43 -60
- package/dist/InputEmail/index.mjs +44 -61
- package/dist/InputFile-cjs.js +5 -2
- package/dist/InputFile-es.js +5 -2
- package/dist/InputGroup-cjs.js +5 -2
- package/dist/InputGroup-es.js +5 -2
- package/dist/InputNumber/InputNumber.rebuilt.types.d.ts +7 -15
- package/dist/InputNumber/index.cjs +7 -5
- package/dist/InputNumber/index.mjs +7 -5
- package/dist/InputPhoneNumber/InputPhoneNumber.types.d.ts +12 -28
- package/dist/InputPhoneNumber/hooks/useInputPhoneActions.d.ts +9 -4
- package/dist/InputPhoneNumber/index.cjs +37 -36
- package/dist/InputPhoneNumber/index.mjs +38 -37
- package/dist/InputText/InputText.d.ts +2 -2
- package/dist/InputText/InputText.types.d.ts +30 -25
- package/dist/InputText/index.cjs +54 -62
- package/dist/InputText/index.mjs +55 -63
- package/dist/InputText/useInputTextActions.d.ts +11 -5
- package/dist/InputText/useTextAreaResize.d.ts +2 -2
- package/dist/InputTime/InputTime.rebuilt.d.ts +1 -1
- package/dist/InputTime/InputTime.types.d.ts +13 -4
- package/dist/InputTime/hooks/useInputTimeActions.d.ts +21 -0
- package/dist/InputTime/index.cjs +90 -30
- package/dist/InputTime/index.mjs +93 -33
- package/dist/InternalChipDismissible-cjs.js +3 -3
- package/dist/InternalChipDismissible-es.js +4 -4
- package/dist/List/index.cjs +2 -2
- package/dist/List/index.mjs +2 -2
- package/dist/Menu/Menu.d.ts +2 -4
- package/dist/Menu/Menu.types.d.ts +21 -5
- package/dist/Menu-cjs.js +9 -9
- package/dist/Menu-es.js +9 -9
- package/dist/Modal/Modal.types.d.ts +3 -3
- package/dist/Modal/ModalContext.rebuilt.d.ts +2 -2
- package/dist/MultiSelect/DropDownMenu.d.ts +1 -1
- package/dist/MultiSelect/index.cjs +1 -0
- package/dist/MultiSelect/index.mjs +1 -0
- package/dist/MultiSelect-cjs.js +13 -7
- package/dist/MultiSelect-es.js +13 -7
- package/dist/RadioGroup/RadioGroup.d.ts +2 -1
- package/dist/RadioGroup/RadioOption.d.ts +1 -1
- package/dist/RecurringSelect/index.cjs +3 -2
- package/dist/RecurringSelect/index.mjs +3 -2
- package/dist/Select/Select.types.d.ts +7 -3
- package/dist/Select/hooks/useSelectActions.d.ts +5 -5
- package/dist/Select/index.cjs +27 -42
- package/dist/Select/index.mjs +29 -44
- package/dist/StatusLabel/StatusLabel.d.ts +2 -1
- package/dist/Tabs/hooks/useTabsOverflow.d.ts +2 -2
- package/dist/Tabs-cjs.js +4 -2
- package/dist/Tabs-es.js +5 -3
- package/dist/Tooltip/useTooltipPositioning.d.ts +1 -1
- package/dist/_baseEach-cjs.js +12 -12
- package/dist/_baseEach-es.js +1 -1
- package/dist/_baseFlatten-cjs.js +2 -2
- package/dist/_baseFlatten-es.js +1 -1
- package/dist/{_baseGet-cjs.js → _getAllKeys-cjs.js} +181 -181
- package/dist/{_baseGet-es.js → _getAllKeys-es.js} +182 -182
- package/dist/debounce-es.js +1 -1
- package/dist/filterDataAttributes-cjs.js +26 -0
- package/dist/filterDataAttributes-es.js +24 -0
- package/dist/floating-ui.react-cjs.js +115 -0
- package/dist/floating-ui.react-es.js +115 -1
- package/dist/helpers-cjs.js +1 -1
- package/dist/helpers-es.js +1 -1
- package/dist/index.cjs +4 -3
- package/dist/index.mjs +3 -2
- package/dist/omit-cjs.js +14 -14
- package/dist/omit-es.js +1 -1
- package/dist/sharedHelpers/filterDataAttributes.d.ts +17 -0
- package/dist/sharedHelpers/types.d.ts +231 -0
- package/dist/showToast-cjs.js +2 -2
- package/dist/showToast-es.js +2 -2
- package/dist/styles.css +32 -23
- package/dist/useChildComponent-cjs.js +1 -1
- package/dist/useChildComponent-es.js +1 -1
- package/dist/useScrollToActive-cjs.js +3 -3
- package/dist/useScrollToActive-es.js +2 -2
- package/dist/utils/mergeRefs.d.ts +2 -2
- package/package.json +2 -2
- package/dist/InputEmail/hooks/useInputEmailFormField.d.ts +0 -32
- package/dist/InputPhoneNumber/hooks/useInputPhoneFormField.d.ts +0 -71
- package/dist/InputText/useInputTextFormField.d.ts +0 -352
- package/dist/Select/hooks/useSelectFormField.d.ts +0 -34
|
@@ -38,6 +38,7 @@ import '../../../DataListItemActionsOverflow-es.js';
|
|
|
38
38
|
import '../../../DataListActionsMenu-es.js';
|
|
39
39
|
import '../../../Checkbox/index.mjs';
|
|
40
40
|
import 'react-hook-form';
|
|
41
|
+
import '../../../filterDataAttributes-es.js';
|
|
41
42
|
import '../../../useBatchSelect-es.js';
|
|
42
43
|
import '../../../DataList.module-es.js';
|
|
43
44
|
import '../../../DataListItemClickable-es.js';
|
|
@@ -18,20 +18,10 @@ require('../../../useFormFieldFocus-cjs.js');
|
|
|
18
18
|
require('../../../InputValidation-cjs.js');
|
|
19
19
|
require('../../../Spinner-cjs.js');
|
|
20
20
|
require('react-hook-form');
|
|
21
|
-
require('../../../
|
|
22
|
-
require('../../../_commonjsHelpers-cjs.js');
|
|
23
|
-
require('../../../_baseGet-cjs.js');
|
|
24
|
-
require('../../../isTypedArray-cjs.js');
|
|
25
|
-
require('../../../isObjectLike-cjs.js');
|
|
26
|
-
require('../../../identity-cjs.js');
|
|
27
|
-
require('../../../_getTag-cjs.js');
|
|
28
|
-
require('../../../isSymbol-cjs.js');
|
|
29
|
-
require('../../../keysIn-cjs.js');
|
|
30
|
-
require('../../../_baseAssignValue-cjs.js');
|
|
31
|
-
require('../../../_baseFlatten-cjs.js');
|
|
32
|
-
require('../../../_setToString-cjs.js');
|
|
21
|
+
require('../../../filterDataAttributes-cjs.js');
|
|
33
22
|
require('../../../DataListContext-cjs.js');
|
|
34
23
|
require('../../../noop-cjs.js');
|
|
24
|
+
require('../../../_commonjsHelpers-cjs.js');
|
|
35
25
|
require('../../../DataList.const-cjs.js');
|
|
36
26
|
require('../../../AnimatedSwitcher-cjs.js');
|
|
37
27
|
|
|
@@ -16,19 +16,9 @@ import '../../../useFormFieldFocus-es.js';
|
|
|
16
16
|
import '../../../InputValidation-es.js';
|
|
17
17
|
import '../../../Spinner-es.js';
|
|
18
18
|
import 'react-hook-form';
|
|
19
|
-
import '../../../
|
|
20
|
-
import '../../../_commonjsHelpers-es.js';
|
|
21
|
-
import '../../../_baseGet-es.js';
|
|
22
|
-
import '../../../isTypedArray-es.js';
|
|
23
|
-
import '../../../isObjectLike-es.js';
|
|
24
|
-
import '../../../identity-es.js';
|
|
25
|
-
import '../../../_getTag-es.js';
|
|
26
|
-
import '../../../isSymbol-es.js';
|
|
27
|
-
import '../../../keysIn-es.js';
|
|
28
|
-
import '../../../_baseAssignValue-es.js';
|
|
29
|
-
import '../../../_baseFlatten-es.js';
|
|
30
|
-
import '../../../_setToString-es.js';
|
|
19
|
+
import '../../../filterDataAttributes-es.js';
|
|
31
20
|
import '../../../DataListContext-es.js';
|
|
32
21
|
import '../../../noop-es.js';
|
|
22
|
+
import '../../../_commonjsHelpers-es.js';
|
|
33
23
|
import '../../../DataList.const-es.js';
|
|
34
24
|
import '../../../AnimatedSwitcher-es.js';
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import type { ReactElement } from "react";
|
|
2
2
|
import type { DataListActionProps, DataListObject } from "../DataList.types";
|
|
3
3
|
export declare function useGetItemActions<T extends DataListObject>(item: T): {
|
|
4
|
-
actions: ReactElement<DataListActionProps<T>>[];
|
|
4
|
+
actions: ReactElement<DataListActionProps<T>, string | import("react").JSXElementConstructor<any>>[];
|
|
5
5
|
hasActions: boolean;
|
|
6
6
|
disableContextMenu: boolean;
|
|
7
7
|
};
|
package/dist/DataList/index.cjs
CHANGED
|
@@ -48,6 +48,7 @@ require('../DataListItemActionsOverflow-cjs.js');
|
|
|
48
48
|
require('../DataListActionsMenu-cjs.js');
|
|
49
49
|
require('../Checkbox/index.cjs');
|
|
50
50
|
require('react-hook-form');
|
|
51
|
+
require('../filterDataAttributes-cjs.js');
|
|
51
52
|
require('../useBatchSelect-cjs.js');
|
|
52
53
|
require('../DataListItemClickable-cjs.js');
|
|
53
54
|
require('../DataListHeader-cjs.js');
|
|
@@ -81,14 +82,6 @@ require('../InputText/index.cjs');
|
|
|
81
82
|
require('../FormField-cjs.js');
|
|
82
83
|
require('../useFormFieldFocus-cjs.js');
|
|
83
84
|
require('../InputValidation-cjs.js');
|
|
84
|
-
require('../omit-cjs.js');
|
|
85
|
-
require('../_baseGet-cjs.js');
|
|
86
|
-
require('../identity-cjs.js');
|
|
87
|
-
require('../isSymbol-cjs.js');
|
|
88
|
-
require('../keysIn-cjs.js');
|
|
89
|
-
require('../_baseAssignValue-cjs.js');
|
|
90
|
-
require('../_baseFlatten-cjs.js');
|
|
91
|
-
require('../_setToString-cjs.js');
|
|
92
85
|
require('../DataListEmptyState-cjs.js');
|
|
93
86
|
require('../DataListLoadMore-cjs.js');
|
|
94
87
|
require('../DataListAction-cjs.js');
|
package/dist/DataList/index.mjs
CHANGED
|
@@ -46,6 +46,7 @@ import '../DataListItemActionsOverflow-es.js';
|
|
|
46
46
|
import '../DataListActionsMenu-es.js';
|
|
47
47
|
import '../Checkbox/index.mjs';
|
|
48
48
|
import 'react-hook-form';
|
|
49
|
+
import '../filterDataAttributes-es.js';
|
|
49
50
|
import '../useBatchSelect-es.js';
|
|
50
51
|
import '../DataListItemClickable-es.js';
|
|
51
52
|
import '../DataListHeader-es.js';
|
|
@@ -79,14 +80,6 @@ import '../InputText/index.mjs';
|
|
|
79
80
|
import '../FormField-es.js';
|
|
80
81
|
import '../useFormFieldFocus-es.js';
|
|
81
82
|
import '../InputValidation-es.js';
|
|
82
|
-
import '../omit-es.js';
|
|
83
|
-
import '../_baseGet-es.js';
|
|
84
|
-
import '../identity-es.js';
|
|
85
|
-
import '../isSymbol-es.js';
|
|
86
|
-
import '../keysIn-es.js';
|
|
87
|
-
import '../_baseAssignValue-es.js';
|
|
88
|
-
import '../_baseFlatten-es.js';
|
|
89
|
-
import '../_setToString-es.js';
|
|
90
83
|
import '../DataListEmptyState-es.js';
|
|
91
84
|
import '../DataListLoadMore-es.js';
|
|
92
85
|
import '../DataListAction-es.js';
|
|
@@ -27,13 +27,15 @@ function DataListActions({ children, itemsToExpose = 2, }) {
|
|
|
27
27
|
if (activeItem) {
|
|
28
28
|
return props.label(activeItem);
|
|
29
29
|
}
|
|
30
|
+
return "";
|
|
30
31
|
}
|
|
31
32
|
const actionLabel = getActionLabel();
|
|
32
33
|
// If the action is always visible, we don't want a tooltip.
|
|
33
34
|
if (props.alwaysVisible) {
|
|
34
|
-
return (React.createElement(Button.Button, { ariaLabel: actionLabel, key:
|
|
35
|
+
return (React.createElement(Button.Button, { ariaLabel: actionLabel, key: actionLabel, icon: props.icon, label: actionLabel, onClick: () => {
|
|
35
36
|
var _a;
|
|
36
|
-
|
|
37
|
+
if (activeItem)
|
|
38
|
+
(_a = props.onClick) === null || _a === void 0 ? void 0 : _a.call(props, activeItem);
|
|
37
39
|
}, type: "secondary", variation: "subtle" }));
|
|
38
40
|
}
|
|
39
41
|
return (React.createElement(Tooltip.Tooltip, { key: actionLabel, message: actionLabel },
|
|
@@ -25,13 +25,15 @@ function DataListActions({ children, itemsToExpose = 2, }) {
|
|
|
25
25
|
if (activeItem) {
|
|
26
26
|
return props.label(activeItem);
|
|
27
27
|
}
|
|
28
|
+
return "";
|
|
28
29
|
}
|
|
29
30
|
const actionLabel = getActionLabel();
|
|
30
31
|
// If the action is always visible, we don't want a tooltip.
|
|
31
32
|
if (props.alwaysVisible) {
|
|
32
|
-
return (React__default.createElement(Button, { ariaLabel: actionLabel, key:
|
|
33
|
+
return (React__default.createElement(Button, { ariaLabel: actionLabel, key: actionLabel, icon: props.icon, label: actionLabel, onClick: () => {
|
|
33
34
|
var _a;
|
|
34
|
-
|
|
35
|
+
if (activeItem)
|
|
36
|
+
(_a = props.onClick) === null || _a === void 0 ? void 0 : _a.call(props, activeItem);
|
|
35
37
|
}, type: "secondary", variation: "subtle" }));
|
|
36
38
|
}
|
|
37
39
|
return (React__default.createElement(Tooltip, { key: actionLabel, message: actionLabel },
|
package/dist/DataListItem-cjs.js
CHANGED
|
@@ -61,19 +61,20 @@ function DataListItemInternal({ children, item, }) {
|
|
|
61
61
|
function useGetItemActions(item) {
|
|
62
62
|
var _a;
|
|
63
63
|
const { itemActionComponent } = DataListContext.useDataListContext();
|
|
64
|
-
const itemActions = (itemActionComponent === null || itemActionComponent === void 0 ? void 0 : itemActionComponent.props.children) || [];
|
|
65
|
-
const actionsArray = React.Children.toArray(itemActions);
|
|
66
64
|
const disableContextMenu = (_a = itemActionComponent === null || itemActionComponent === void 0 ? void 0 : itemActionComponent.props.disableContextMenu) !== null && _a !== void 0 ? _a : false;
|
|
67
65
|
const actions = React.useMemo(() => {
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
66
|
+
var _a;
|
|
67
|
+
const children = (_a = itemActionComponent === null || itemActionComponent === void 0 ? void 0 : itemActionComponent.props.children) !== null && _a !== void 0 ? _a : [];
|
|
68
|
+
const nodes = React.Children.toArray(children);
|
|
69
|
+
return nodes.filter((node) => {
|
|
70
|
+
if (React.isValidElement(node)) {
|
|
71
|
+
return node.props.visible ? node.props.visible(item) : true;
|
|
71
72
|
}
|
|
72
|
-
return
|
|
73
|
+
return false;
|
|
73
74
|
});
|
|
74
75
|
}, [itemActionComponent === null || itemActionComponent === void 0 ? void 0 : itemActionComponent.props.children, item]);
|
|
75
76
|
return {
|
|
76
|
-
actions
|
|
77
|
+
actions,
|
|
77
78
|
hasActions: Boolean(actions.length),
|
|
78
79
|
disableContextMenu,
|
|
79
80
|
};
|
package/dist/DataListItem-es.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import React__default, {
|
|
1
|
+
import React__default, { useMemo, Children, isValidElement, useState } from 'react';
|
|
2
2
|
import { AnimatePresence } from 'framer-motion';
|
|
3
3
|
import classnames from 'classnames';
|
|
4
4
|
import { u as useDataListLayoutContext } from './DataListLayoutContext-es.js';
|
|
@@ -59,19 +59,20 @@ function DataListItemInternal({ children, item, }) {
|
|
|
59
59
|
function useGetItemActions(item) {
|
|
60
60
|
var _a;
|
|
61
61
|
const { itemActionComponent } = useDataListContext();
|
|
62
|
-
const itemActions = (itemActionComponent === null || itemActionComponent === void 0 ? void 0 : itemActionComponent.props.children) || [];
|
|
63
|
-
const actionsArray = Children.toArray(itemActions);
|
|
64
62
|
const disableContextMenu = (_a = itemActionComponent === null || itemActionComponent === void 0 ? void 0 : itemActionComponent.props.disableContextMenu) !== null && _a !== void 0 ? _a : false;
|
|
65
63
|
const actions = useMemo(() => {
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
64
|
+
var _a;
|
|
65
|
+
const children = (_a = itemActionComponent === null || itemActionComponent === void 0 ? void 0 : itemActionComponent.props.children) !== null && _a !== void 0 ? _a : [];
|
|
66
|
+
const nodes = Children.toArray(children);
|
|
67
|
+
return nodes.filter((node) => {
|
|
68
|
+
if (isValidElement(node)) {
|
|
69
|
+
return node.props.visible ? node.props.visible(item) : true;
|
|
69
70
|
}
|
|
70
|
-
return
|
|
71
|
+
return false;
|
|
71
72
|
});
|
|
72
73
|
}, [itemActionComponent === null || itemActionComponent === void 0 ? void 0 : itemActionComponent.props.children, item]);
|
|
73
74
|
return {
|
|
74
|
-
actions
|
|
75
|
+
actions,
|
|
75
76
|
hasActions: Boolean(actions.length),
|
|
76
77
|
disableContextMenu,
|
|
77
78
|
};
|
package/dist/DataListSort-cjs.js
CHANGED
|
@@ -21,7 +21,7 @@ function DataListSort() {
|
|
|
21
21
|
},
|
|
22
22
|
] },
|
|
23
23
|
React.createElement(Combobox.Combobox.Activator, null,
|
|
24
|
-
React.createElement(Chip.
|
|
24
|
+
React.createElement(Chip.Chip, { heading: "Sort", label: getButtonLabel(), variation: state ? "base" : "subtle" }, !state && (React.createElement(Chip.Chip.Suffix, null,
|
|
25
25
|
React.createElement(Icon.Icon, { name: "arrowDown", size: "small" }))))),
|
|
26
26
|
sortByOptions.map(({ label, value }) => (React.createElement(Combobox.Combobox.Option, { key: value, id: value, label: label })))));
|
|
27
27
|
function getSortByOptions() {
|
package/dist/DataListSort-es.js
CHANGED
|
@@ -2,7 +2,7 @@ import React__default from 'react';
|
|
|
2
2
|
import { u as useDataListContext } from './DataListContext-es.js';
|
|
3
3
|
import { C as Combobox } from './Combobox-es.js';
|
|
4
4
|
import './ComboboxProvider-es.js';
|
|
5
|
-
import { C as
|
|
5
|
+
import { C as Chip } from './Chip-es.js';
|
|
6
6
|
import './tslib.es6-es.js';
|
|
7
7
|
import { I as Icon } from './Icon-es.js';
|
|
8
8
|
|
|
@@ -19,7 +19,7 @@ function DataListSort() {
|
|
|
19
19
|
},
|
|
20
20
|
] },
|
|
21
21
|
React__default.createElement(Combobox.Activator, null,
|
|
22
|
-
React__default.createElement(
|
|
22
|
+
React__default.createElement(Chip, { heading: "Sort", label: getButtonLabel(), variation: state ? "base" : "subtle" }, !state && (React__default.createElement(Chip.Suffix, null,
|
|
23
23
|
React__default.createElement(Icon, { name: "arrowDown", size: "small" }))))),
|
|
24
24
|
sortByOptions.map(({ label, value }) => (React__default.createElement(Combobox.Option, { key: value, id: value, label: label })))));
|
|
25
25
|
function getSortByOptions() {
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import React from "react";
|
|
1
2
|
export declare enum SortDirection {
|
|
2
3
|
ascending = 0,
|
|
3
4
|
descending = 1,
|
|
@@ -6,5 +7,5 @@ export declare enum SortDirection {
|
|
|
6
7
|
interface SortIconProps {
|
|
7
8
|
readonly direction: SortDirection;
|
|
8
9
|
}
|
|
9
|
-
export declare function SortIcon({ direction }: SortIconProps): JSX.Element;
|
|
10
|
+
export declare function SortIcon({ direction }: SortIconProps): React.JSX.Element;
|
|
10
11
|
export {};
|
|
@@ -15,4 +15,4 @@ export interface DataTableSortableHeaderProps {
|
|
|
15
15
|
*/
|
|
16
16
|
readonly onSort?: () => void;
|
|
17
17
|
}
|
|
18
|
-
export declare function DataTableSortableHeader(props: DataTableSortableHeaderProps & React.HTMLAttributes<HTMLTableCellElement>): JSX.Element;
|
|
18
|
+
export declare function DataTableSortableHeader(props: DataTableSortableHeaderProps & React.HTMLAttributes<HTMLTableCellElement>): React.JSX.Element;
|
package/dist/DataTable/index.cjs
CHANGED
|
@@ -13,12 +13,12 @@ require('../Content-cjs.js');
|
|
|
13
13
|
require('../Select/index.cjs');
|
|
14
14
|
require('../omit-cjs.js');
|
|
15
15
|
require('../_commonjsHelpers-cjs.js');
|
|
16
|
-
require('../
|
|
16
|
+
require('../_getAllKeys-cjs.js');
|
|
17
17
|
require('../isTypedArray-cjs.js');
|
|
18
18
|
require('../isObjectLike-cjs.js');
|
|
19
|
+
require('../isSymbol-cjs.js');
|
|
19
20
|
require('../identity-cjs.js');
|
|
20
21
|
require('../_getTag-cjs.js');
|
|
21
|
-
require('../isSymbol-cjs.js');
|
|
22
22
|
require('../keysIn-cjs.js');
|
|
23
23
|
require('../_baseAssignValue-cjs.js');
|
|
24
24
|
require('../_baseFlatten-cjs.js');
|
|
@@ -35,6 +35,7 @@ require('../useFormFieldFocus-cjs.js');
|
|
|
35
35
|
require('../InputValidation-cjs.js');
|
|
36
36
|
require('../Spinner-cjs.js');
|
|
37
37
|
require('react-hook-form');
|
|
38
|
+
require('../filterDataAttributes-cjs.js');
|
|
38
39
|
|
|
39
40
|
|
|
40
41
|
|
package/dist/DataTable/index.mjs
CHANGED
|
@@ -11,12 +11,12 @@ import '../Content-es.js';
|
|
|
11
11
|
import '../Select/index.mjs';
|
|
12
12
|
import '../omit-es.js';
|
|
13
13
|
import '../_commonjsHelpers-es.js';
|
|
14
|
-
import '../
|
|
14
|
+
import '../_getAllKeys-es.js';
|
|
15
15
|
import '../isTypedArray-es.js';
|
|
16
16
|
import '../isObjectLike-es.js';
|
|
17
|
+
import '../isSymbol-es.js';
|
|
17
18
|
import '../identity-es.js';
|
|
18
19
|
import '../_getTag-es.js';
|
|
19
|
-
import '../isSymbol-es.js';
|
|
20
20
|
import '../keysIn-es.js';
|
|
21
21
|
import '../_baseAssignValue-es.js';
|
|
22
22
|
import '../_baseFlatten-es.js';
|
|
@@ -33,3 +33,4 @@ import '../useFormFieldFocus-es.js';
|
|
|
33
33
|
import '../InputValidation-es.js';
|
|
34
34
|
import '../Spinner-es.js';
|
|
35
35
|
import 'react-hook-form';
|
|
36
|
+
import '../filterDataAttributes-es.js';
|
|
@@ -40,6 +40,10 @@ interface BaseDatePickerProps {
|
|
|
40
40
|
* Change handler when the selected month changes
|
|
41
41
|
*/
|
|
42
42
|
onMonthChange?(val: Date): void;
|
|
43
|
+
/**
|
|
44
|
+
* Callback when the calendar open state changes
|
|
45
|
+
*/
|
|
46
|
+
onOpenChange?(open: boolean): void;
|
|
43
47
|
}
|
|
44
48
|
interface DatePickerModalProps extends BaseDatePickerProps {
|
|
45
49
|
/**
|
|
@@ -66,5 +70,5 @@ interface DatePickerInlineProps extends BaseDatePickerProps {
|
|
|
66
70
|
readonly inline?: boolean;
|
|
67
71
|
}
|
|
68
72
|
type DatePickerProps = XOR<DatePickerModalProps, DatePickerInlineProps>;
|
|
69
|
-
export declare function DatePicker({ onChange, onMonthChange, activator, inline, selected, readonly, disabled, fullWidth, smartAutofocus, maxDate, minDate, highlightDates, firstDayOfWeek, }: DatePickerProps): React.JSX.Element;
|
|
73
|
+
export declare function DatePicker({ onChange, onMonthChange, onOpenChange, activator, inline, selected, readonly, disabled, fullWidth, smartAutofocus, maxDate, minDate, highlightDates, firstDayOfWeek, }: DatePickerProps): React.JSX.Element;
|
|
70
74
|
export {};
|
|
@@ -16,12 +16,12 @@ require('../Icon-cjs.js');
|
|
|
16
16
|
require('@jobber/design');
|
|
17
17
|
require('../omit-cjs.js');
|
|
18
18
|
require('../_commonjsHelpers-cjs.js');
|
|
19
|
-
require('../
|
|
19
|
+
require('../_getAllKeys-cjs.js');
|
|
20
20
|
require('../isTypedArray-cjs.js');
|
|
21
21
|
require('../isObjectLike-cjs.js');
|
|
22
|
+
require('../isSymbol-cjs.js');
|
|
22
23
|
require('../identity-cjs.js');
|
|
23
24
|
require('../_getTag-cjs.js');
|
|
24
|
-
require('../isSymbol-cjs.js');
|
|
25
25
|
require('../keysIn-cjs.js');
|
|
26
26
|
require('../_baseAssignValue-cjs.js');
|
|
27
27
|
require('../_baseFlatten-cjs.js');
|
|
@@ -14,12 +14,12 @@ import '../Icon-es.js';
|
|
|
14
14
|
import '@jobber/design';
|
|
15
15
|
import '../omit-es.js';
|
|
16
16
|
import '../_commonjsHelpers-es.js';
|
|
17
|
-
import '../
|
|
17
|
+
import '../_getAllKeys-es.js';
|
|
18
18
|
import '../isTypedArray-es.js';
|
|
19
19
|
import '../isObjectLike-es.js';
|
|
20
|
+
import '../isSymbol-es.js';
|
|
20
21
|
import '../identity-es.js';
|
|
21
22
|
import '../_getTag-es.js';
|
|
22
|
-
import '../isSymbol-es.js';
|
|
23
23
|
import '../keysIn-es.js';
|
|
24
24
|
import '../_baseAssignValue-es.js';
|
|
25
25
|
import '../_baseFlatten-es.js';
|
package/dist/DatePicker-cjs.js
CHANGED
|
@@ -12692,7 +12692,7 @@ function InternalActivator(props, ref) {
|
|
|
12692
12692
|
}
|
|
12693
12693
|
|
|
12694
12694
|
function useFocusOnSelectedDate() {
|
|
12695
|
-
const ref = React.useRef();
|
|
12695
|
+
const ref = React.useRef(null);
|
|
12696
12696
|
function focusOnSelectedDate() {
|
|
12697
12697
|
var _a;
|
|
12698
12698
|
const selectedDateClass = ".react-datepicker__day--selected";
|
|
@@ -12705,7 +12705,7 @@ function useFocusOnSelectedDate() {
|
|
|
12705
12705
|
}
|
|
12706
12706
|
|
|
12707
12707
|
/*eslint max-statements: ["error", 14]*/
|
|
12708
|
-
function DatePicker({ onChange, onMonthChange, activator, inline, selected, readonly = false, disabled = false, fullWidth = false, smartAutofocus = true, maxDate, minDate, highlightDates, firstDayOfWeek, }) {
|
|
12708
|
+
function DatePicker({ onChange, onMonthChange, onOpenChange, activator, inline, selected, readonly = false, disabled = false, fullWidth = false, smartAutofocus = true, maxDate, minDate, highlightDates, firstDayOfWeek, }) {
|
|
12709
12709
|
const { ref, focusOnSelectedDate } = useFocusOnSelectedDate();
|
|
12710
12710
|
const [open, setOpen] = React.useState(false);
|
|
12711
12711
|
const { dateFormat, firstDayOfWeek: contextFirstDayOfWeek } = AtlantisContext.useAtlantisContext();
|
|
@@ -12752,9 +12752,11 @@ function DatePicker({ onChange, onMonthChange, activator, inline, selected, read
|
|
|
12752
12752
|
}
|
|
12753
12753
|
function handleCalendarOpen() {
|
|
12754
12754
|
setOpen(true);
|
|
12755
|
+
onOpenChange === null || onOpenChange === void 0 ? void 0 : onOpenChange(true);
|
|
12755
12756
|
}
|
|
12756
12757
|
function handleCalendarClose() {
|
|
12757
12758
|
setOpen(false);
|
|
12759
|
+
onOpenChange === null || onOpenChange === void 0 ? void 0 : onOpenChange(false);
|
|
12758
12760
|
}
|
|
12759
12761
|
}
|
|
12760
12762
|
function useEscapeKeyToCloseDatePicker(open, ref) {
|
package/dist/DatePicker-es.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import React__default, { cloneElement, Component, createRef, useRef, useCallback, useEffect, createElement, forwardRef, isValidElement, useState } from 'react';
|
|
2
2
|
import classnames from 'classnames';
|
|
3
3
|
import { c as clsx } from './clsx-es.js';
|
|
4
|
-
import { u as useFloating, b as autoUpdate, f as flip, o as offset, a as arrow,
|
|
4
|
+
import { u as useFloating, b as autoUpdate, f as flip, o as offset, a as arrow, v as FloatingArrow } from './floating-ui.react-es.js';
|
|
5
5
|
import ReactDOM__default from 'react-dom';
|
|
6
6
|
import { useRefocusOnActivator } from '@jobber/hooks';
|
|
7
7
|
import { T as Typography } from './Typography-es.js';
|
|
@@ -12690,7 +12690,7 @@ function InternalActivator(props, ref) {
|
|
|
12690
12690
|
}
|
|
12691
12691
|
|
|
12692
12692
|
function useFocusOnSelectedDate() {
|
|
12693
|
-
const ref = useRef();
|
|
12693
|
+
const ref = useRef(null);
|
|
12694
12694
|
function focusOnSelectedDate() {
|
|
12695
12695
|
var _a;
|
|
12696
12696
|
const selectedDateClass = ".react-datepicker__day--selected";
|
|
@@ -12703,7 +12703,7 @@ function useFocusOnSelectedDate() {
|
|
|
12703
12703
|
}
|
|
12704
12704
|
|
|
12705
12705
|
/*eslint max-statements: ["error", 14]*/
|
|
12706
|
-
function DatePicker({ onChange, onMonthChange, activator, inline, selected, readonly = false, disabled = false, fullWidth = false, smartAutofocus = true, maxDate, minDate, highlightDates, firstDayOfWeek, }) {
|
|
12706
|
+
function DatePicker({ onChange, onMonthChange, onOpenChange, activator, inline, selected, readonly = false, disabled = false, fullWidth = false, smartAutofocus = true, maxDate, minDate, highlightDates, firstDayOfWeek, }) {
|
|
12707
12707
|
const { ref, focusOnSelectedDate } = useFocusOnSelectedDate();
|
|
12708
12708
|
const [open, setOpen] = useState(false);
|
|
12709
12709
|
const { dateFormat, firstDayOfWeek: contextFirstDayOfWeek } = useAtlantisContext();
|
|
@@ -12750,9 +12750,11 @@ function DatePicker({ onChange, onMonthChange, activator, inline, selected, read
|
|
|
12750
12750
|
}
|
|
12751
12751
|
function handleCalendarOpen() {
|
|
12752
12752
|
setOpen(true);
|
|
12753
|
+
onOpenChange === null || onOpenChange === void 0 ? void 0 : onOpenChange(true);
|
|
12753
12754
|
}
|
|
12754
12755
|
function handleCalendarClose() {
|
|
12755
12756
|
setOpen(false);
|
|
12757
|
+
onOpenChange === null || onOpenChange === void 0 ? void 0 : onOpenChange(false);
|
|
12756
12758
|
}
|
|
12757
12759
|
}
|
|
12758
12760
|
function useEscapeKeyToCloseDatePicker(open, ref) {
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import type { RefObject } from "react";
|
|
2
1
|
import React from "react";
|
|
2
|
+
import type { RefObject } from "react";
|
|
3
3
|
import type { XOR } from "ts-xor";
|
|
4
4
|
import type { Affix, FormFieldProps, Suffix } from "./FormFieldTypes";
|
|
5
5
|
interface AffixLabelProps extends Affix {
|
|
6
|
-
readonly labelRef: RefObject<HTMLDivElement>;
|
|
6
|
+
readonly labelRef: RefObject<HTMLDivElement | null>;
|
|
7
7
|
readonly variation?: "prefix" | "suffix";
|
|
8
8
|
}
|
|
9
9
|
/**
|
|
@@ -109,7 +109,7 @@ export interface CommonFormFieldProps {
|
|
|
109
109
|
version?: 1;
|
|
110
110
|
}
|
|
111
111
|
export interface FormFieldProps extends CommonFormFieldProps {
|
|
112
|
-
actionsRef?: RefObject<FieldActionsRef>;
|
|
112
|
+
actionsRef?: RefObject<FieldActionsRef | null>;
|
|
113
113
|
/**
|
|
114
114
|
* Determines if the input should be auto-focused, using the HTML attribute
|
|
115
115
|
*/
|
|
@@ -126,8 +126,8 @@ export interface FormFieldProps extends CommonFormFieldProps {
|
|
|
126
126
|
* `<select>`.
|
|
127
127
|
*/
|
|
128
128
|
readonly children?: ReactNode;
|
|
129
|
-
inputRef?: RefObject<HTMLInputElement | HTMLTextAreaElement | HTMLSelectElement>;
|
|
130
|
-
wrapperRef?: RefObject<HTMLDivElement>;
|
|
129
|
+
inputRef?: RefObject<HTMLInputElement | HTMLTextAreaElement | HTMLSelectElement | null>;
|
|
130
|
+
wrapperRef?: RefObject<HTMLDivElement | null>;
|
|
131
131
|
/**
|
|
132
132
|
* Initial value of the input. Only use this when you need to pre-populate
|
|
133
133
|
* the field with a data that is not controlled by the components state. If a
|
|
@@ -158,8 +158,6 @@ export interface FormFieldProps extends CommonFormFieldProps {
|
|
|
158
158
|
*/
|
|
159
159
|
readonly suffix?: XOR<Affix, Suffix>;
|
|
160
160
|
/**
|
|
161
|
-
* Simplified onChange handler that only provides the new value.
|
|
162
|
-
* @param newValue
|
|
163
161
|
* Specifies the minimum numerical or date value that a user can type
|
|
164
162
|
*/
|
|
165
163
|
readonly min?: number;
|
|
@@ -2,7 +2,7 @@ import type { PropsWithChildren, ReactNode } from "react";
|
|
|
2
2
|
import React from "react";
|
|
3
3
|
import type { Clearable } from "@jobber/hooks";
|
|
4
4
|
import type { FormFieldProps } from "./FormFieldTypes";
|
|
5
|
-
export interface FormFieldWrapperProps extends FormFieldProps {
|
|
5
|
+
export interface FormFieldWrapperProps extends Omit<FormFieldProps, "maxLength"> {
|
|
6
6
|
readonly error: string;
|
|
7
7
|
readonly identifier: string;
|
|
8
8
|
readonly descriptionIdentifier: string;
|
|
@@ -10,6 +10,10 @@ export interface FormFieldWrapperProps extends FormFieldProps {
|
|
|
10
10
|
readonly onClear?: () => void;
|
|
11
11
|
readonly showMiniLabel?: boolean;
|
|
12
12
|
readonly readonly?: boolean;
|
|
13
|
+
/**
|
|
14
|
+
* @deprecated Avoid using FormFieldWrapper's maxLength implementation. It is flawed and only exists for backwards compatibility on v1 components.
|
|
15
|
+
*/
|
|
16
|
+
readonly maxLength?: number;
|
|
13
17
|
}
|
|
14
18
|
export declare function FormFieldWrapper({ align, description, descriptionIdentifier, placeholder, value, children, invalid, error, size, prefix, suffix, max, maxLength, type, disabled, inline, identifier, clearable, onClear, readonly, toolbar, toolbarVisibility, showMiniLabel, wrapperRef, }: PropsWithChildren<FormFieldWrapperProps>): React.JSX.Element;
|
|
15
19
|
/**
|
|
@@ -2,7 +2,7 @@ interface UseFormFieldFocus {
|
|
|
2
2
|
focused: boolean;
|
|
3
3
|
}
|
|
4
4
|
interface UseFormFieldFocusProps {
|
|
5
|
-
wrapperRef?: React.RefObject<HTMLDivElement>;
|
|
5
|
+
wrapperRef?: React.RefObject<HTMLDivElement | null>;
|
|
6
6
|
}
|
|
7
7
|
export declare const formFieldFocusAttribute: {
|
|
8
8
|
"data-atl-maintain-portal-focus": string;
|
|
@@ -1,9 +1,14 @@
|
|
|
1
1
|
import type { RefObject } from "react";
|
|
2
2
|
import type { FormFieldProps } from "../FormFieldTypes";
|
|
3
|
-
export interface useFormFieldWrapperStylesProps extends Pick<FormFieldProps, "size" | "align" | "placeholder" | "value" | "invalid" | "
|
|
3
|
+
export interface useFormFieldWrapperStylesProps extends Pick<FormFieldProps, "size" | "align" | "placeholder" | "value" | "invalid" | "maxLength" | "type" | "disabled" | "inline"> {
|
|
4
4
|
readonly error?: string;
|
|
5
|
-
|
|
6
|
-
|
|
5
|
+
/**
|
|
6
|
+
* Maximum numerical or date value
|
|
7
|
+
* In v2 components, this is typically undefined.
|
|
8
|
+
*/
|
|
9
|
+
readonly max?: number | string;
|
|
10
|
+
suffixRef?: RefObject<HTMLDivElement | null>;
|
|
11
|
+
prefixRef?: RefObject<HTMLDivElement | null>;
|
|
7
12
|
showMiniLabel?: boolean;
|
|
8
13
|
}
|
|
9
14
|
export interface LabelPadding {
|
|
@@ -18,7 +23,7 @@ export declare function useFormFieldWrapperStyles({ size, align, placeholder, va
|
|
|
18
23
|
wrapperClasses: string;
|
|
19
24
|
containerClasses: string;
|
|
20
25
|
wrapperInlineStyle: {
|
|
21
|
-
[x: string]: number | undefined;
|
|
26
|
+
[x: string]: string | number | undefined;
|
|
22
27
|
};
|
|
23
28
|
labelStyle: LabelPadding;
|
|
24
29
|
setLabelStyle: import("react").Dispatch<import("react").SetStateAction<LabelPadding>>;
|