@elliemae/ds-uploader 3.21.2 → 3.22.0-next.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/cjs/DSUploader.js +137 -103
- package/dist/cjs/DSUploader.js.map +3 -3
- package/dist/cjs/constants.js +57 -0
- package/dist/cjs/constants.js.map +7 -0
- package/dist/cjs/index.js +2 -0
- package/dist/cjs/index.js.map +2 -2
- package/dist/cjs/{propTypes.js → react-desc-prop-types.js} +30 -6
- package/dist/cjs/react-desc-prop-types.js.map +7 -0
- package/dist/cjs/styled.js +171 -0
- package/dist/cjs/styled.js.map +7 -0
- package/dist/esm/DSUploader.js +153 -102
- package/dist/esm/DSUploader.js.map +2 -2
- package/dist/esm/constants.js +27 -0
- package/dist/esm/constants.js.map +7 -0
- package/dist/esm/index.js +1 -0
- package/dist/esm/index.js.map +2 -2
- package/dist/esm/{propTypes.js → react-desc-prop-types.js} +28 -4
- package/dist/esm/react-desc-prop-types.js.map +7 -0
- package/dist/esm/styled.js +141 -0
- package/dist/esm/styled.js.map +7 -0
- package/dist/types/DSUploader.d.ts +4 -35
- package/dist/types/constants.d.ts +18 -0
- package/dist/types/index.d.ts +1 -0
- package/dist/types/react-desc-prop-types.d.ts +30 -0
- package/package.json +28 -15
- package/dist/cjs/propTypes.js.map +0 -7
- package/dist/esm/propTypes.js.map +0 -7
- package/dist/types/propTypes.d.ts +0 -26
package/dist/cjs/DSUploader.js
CHANGED
|
@@ -35,124 +35,158 @@ __export(DSUploader_exports, {
|
|
|
35
35
|
module.exports = __toCommonJS(DSUploader_exports);
|
|
36
36
|
var React = __toESM(require("react"));
|
|
37
37
|
var import_jsx_runtime = require("react/jsx-runtime");
|
|
38
|
-
var
|
|
38
|
+
var import_react = require("react");
|
|
39
39
|
var import_ds_utilities = require("@elliemae/ds-utilities");
|
|
40
40
|
var import_ds_props_helpers = require("@elliemae/ds-props-helpers");
|
|
41
|
-
var
|
|
42
|
-
var import_ds_button = __toESM(require("@elliemae/ds-button"));
|
|
41
|
+
var import_ds_button = require("@elliemae/ds-button");
|
|
43
42
|
var import_react_dropzone = require("react-dropzone");
|
|
44
43
|
var import_ds_tooltip = __toESM(require("@elliemae/ds-tooltip"));
|
|
45
|
-
var
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
const
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
const
|
|
58
|
-
const
|
|
59
|
-
|
|
60
|
-
const
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
const { getRootProps, getInputProps, isDragActive } = (0, import_react_dropzone.useDropzone)(
|
|
44
|
+
var import_react_desc_prop_types = require("./react-desc-prop-types.js");
|
|
45
|
+
var import_styled = require("./styled.js");
|
|
46
|
+
var import_constants = require("./constants.js");
|
|
47
|
+
const ActionButton = ({ labelText, ...otherProps }) => /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
48
|
+
import_ds_button.DSButtonV2,
|
|
49
|
+
{
|
|
50
|
+
...otherProps,
|
|
51
|
+
buttonType: import_ds_button.BUTTON_TYPES.TEXT,
|
|
52
|
+
style: { padding: 0, height: "initial", borderWidth: "0px" },
|
|
53
|
+
children: labelText
|
|
54
|
+
}
|
|
55
|
+
);
|
|
56
|
+
const DSUploader = (props) => {
|
|
57
|
+
const propsWithDefault = (0, import_ds_props_helpers.useMemoMergePropsWithDefault)(props, import_react_desc_prop_types.defaultProps);
|
|
58
|
+
(0, import_ds_props_helpers.useValidateTypescriptPropTypes)(propsWithDefault, import_react_desc_prop_types.propTypes, import_constants.DSUploaderName);
|
|
59
|
+
const {
|
|
60
|
+
containerProps,
|
|
61
|
+
label,
|
|
62
|
+
icon: UploadFileIcon,
|
|
63
|
+
defaultActionLabel,
|
|
64
|
+
dragActiveInstructionalText,
|
|
65
|
+
dragActiveIcon: DragActiveIcon,
|
|
66
|
+
altActionLabel,
|
|
67
|
+
acceptedTypesText,
|
|
68
|
+
disabledDefault,
|
|
69
|
+
disabledAlt,
|
|
70
|
+
onDefaultHandlerClick,
|
|
71
|
+
onAltHandlerClick,
|
|
72
|
+
actions,
|
|
73
|
+
showAltAction,
|
|
74
|
+
defaultActionTooltipText,
|
|
75
|
+
altActionTooltipText,
|
|
76
|
+
...rest
|
|
77
|
+
} = propsWithDefault;
|
|
78
|
+
const globalAttributes = (0, import_ds_props_helpers.useGetGlobalAttributes)(rest);
|
|
79
|
+
const xstyledProps = (0, import_ds_props_helpers.useGetXstyledProps)(rest);
|
|
80
|
+
const getOwnerProps = (0, import_react.useCallback)(() => propsWithDefault, [propsWithDefault]);
|
|
81
|
+
const getOwnerPropsArguments = (0, import_react.useCallback)(() => ({}), []);
|
|
82
|
+
const { getRootProps, getInputProps, isDragActive } = (0, import_react_dropzone.useDropzone)(rest);
|
|
84
83
|
const { onClick: onOpenFile, ...rootProps } = getRootProps();
|
|
85
84
|
const disabledAll = disabledDefault && disabledAlt;
|
|
86
|
-
const delfaultActionButton =
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
85
|
+
const delfaultActionButton = (0, import_react.useMemo)(
|
|
86
|
+
() => /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
87
|
+
ActionButton,
|
|
88
|
+
{
|
|
89
|
+
disabled: disabledDefault,
|
|
90
|
+
labelText: actions.defaultAction ? actions.defaultAction : defaultActionLabel,
|
|
91
|
+
onClick: (...args) => {
|
|
92
|
+
if (!disabledDefault)
|
|
93
|
+
(0, import_ds_utilities.runAll)(onDefaultHandlerClick, onOpenFile)(...args);
|
|
94
|
+
}
|
|
94
95
|
}
|
|
95
|
-
|
|
96
|
+
),
|
|
97
|
+
[actions.defaultAction, defaultActionLabel, disabledDefault, onDefaultHandlerClick, onOpenFile]
|
|
96
98
|
);
|
|
97
|
-
const altActionButton =
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
99
|
+
const altActionButton = (0, import_react.useMemo)(
|
|
100
|
+
() => /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
101
|
+
ActionButton,
|
|
102
|
+
{
|
|
103
|
+
disabled: disabledAlt,
|
|
104
|
+
labelText: actions.altAction ? actions.altAction : altActionLabel,
|
|
105
|
+
onClick: (...args) => {
|
|
106
|
+
if (!disabledAlt)
|
|
107
|
+
onAltHandlerClick(...args);
|
|
108
|
+
}
|
|
105
109
|
}
|
|
106
|
-
|
|
110
|
+
),
|
|
111
|
+
[actions.altAction, altActionLabel, disabledAlt, onAltHandlerClick]
|
|
107
112
|
);
|
|
108
|
-
const defaultAction =
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
113
|
+
const defaultAction = (0, import_react.useMemo)(
|
|
114
|
+
() => !defaultActionTooltipText ? delfaultActionButton : /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
115
|
+
import_ds_tooltip.default,
|
|
116
|
+
{
|
|
117
|
+
containerProps: { id: "default-action-tooltip" },
|
|
118
|
+
interactionType: "hover",
|
|
119
|
+
title: defaultActionTooltipText,
|
|
120
|
+
triggerComponent: delfaultActionButton
|
|
121
|
+
}
|
|
122
|
+
),
|
|
123
|
+
[defaultActionTooltipText, delfaultActionButton]
|
|
116
124
|
);
|
|
117
|
-
const altAction =
|
|
118
|
-
|
|
125
|
+
const altAction = (0, import_react.useMemo)(
|
|
126
|
+
() => !altActionTooltipText ? altActionButton : /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
127
|
+
import_ds_tooltip.default,
|
|
128
|
+
{
|
|
129
|
+
containerProps: { id: "alt-action-tooltip" },
|
|
130
|
+
interactionType: "hover",
|
|
131
|
+
title: altActionTooltipText,
|
|
132
|
+
triggerComponent: altActionButton
|
|
133
|
+
}
|
|
134
|
+
),
|
|
135
|
+
[altActionTooltipText, altActionButton]
|
|
136
|
+
);
|
|
137
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(
|
|
138
|
+
import_styled.StyledUploaderWrapper,
|
|
119
139
|
{
|
|
120
|
-
containerProps
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
140
|
+
...containerProps,
|
|
141
|
+
...globalAttributes,
|
|
142
|
+
...xstyledProps,
|
|
143
|
+
getOwnerProps,
|
|
144
|
+
getOwnerPropsArguments,
|
|
145
|
+
children: [
|
|
146
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsxs)(
|
|
147
|
+
import_styled.StyledUploader,
|
|
148
|
+
{
|
|
149
|
+
...rootProps,
|
|
150
|
+
isDragActive,
|
|
151
|
+
disabledAll,
|
|
152
|
+
getOwnerProps,
|
|
153
|
+
getOwnerPropsArguments,
|
|
154
|
+
children: [
|
|
155
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_styled.StyledUploaderIconArea, { getOwnerProps, getOwnerPropsArguments, children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(UploadFileIcon, { size: "l" }) }),
|
|
156
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_styled.StyledDividerVertical, { getOwnerProps, getOwnerPropsArguments }),
|
|
157
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_styled.StyledUploaderInfo, { getOwnerProps, getOwnerPropsArguments, children: [
|
|
158
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_styled.StyledInfoText, { getOwnerProps, getOwnerPropsArguments, children: label }),
|
|
159
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_styled.StyledUploaderActions, { getOwnerProps, getOwnerPropsArguments, children: [
|
|
160
|
+
actions.defaultAction && defaultAction,
|
|
161
|
+
(actions.altAction || showAltAction) && /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_jsx_runtime.Fragment, { children: [
|
|
162
|
+
actions.defaultAction && /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
163
|
+
import_styled.StyledDividerVerticalActions,
|
|
164
|
+
{
|
|
165
|
+
getOwnerProps,
|
|
166
|
+
getOwnerPropsArguments
|
|
167
|
+
}
|
|
168
|
+
),
|
|
169
|
+
altAction
|
|
170
|
+
] })
|
|
171
|
+
] })
|
|
172
|
+
] }),
|
|
173
|
+
!disabledAll && /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_styled.StyledUploaderDragActive, { getOwnerProps, getOwnerPropsArguments, children: [
|
|
174
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(DragActiveIcon, { color: ["neutral", "000"], mr: "xxs" }),
|
|
175
|
+
dragActiveInstructionalText
|
|
176
|
+
] }),
|
|
177
|
+
!disabledAll && /* @__PURE__ */ (0, import_jsx_runtime.jsx)("input", { ...getInputProps(), "aria-label": "file" })
|
|
178
|
+
]
|
|
179
|
+
}
|
|
180
|
+
),
|
|
181
|
+
typeof acceptedTypesText === "string" && /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_styled.StyledAcceptedTypes, { getOwnerProps, getOwnerPropsArguments, children: acceptedTypesText.toUpperCase() })
|
|
182
|
+
]
|
|
124
183
|
}
|
|
125
184
|
);
|
|
126
|
-
return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(UploaderWrapper, { ...containerProps, classProps: { disabled: disabledAll }, children: [
|
|
127
|
-
/* @__PURE__ */ (0, import_jsx_runtime.jsxs)(Uploader, { ...rootProps, classProps: { isDragActive }, children: [
|
|
128
|
-
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(UploaderIconArea, { children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(UploadFileIcon, { size: "l" }) }),
|
|
129
|
-
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(DividerVertical, {}),
|
|
130
|
-
/* @__PURE__ */ (0, import_jsx_runtime.jsxs)(UploaderInfo, { children: [
|
|
131
|
-
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(InfoText, { children: label }),
|
|
132
|
-
/* @__PURE__ */ (0, import_jsx_runtime.jsxs)(UploaderActions, { children: [
|
|
133
|
-
actions.defaultAction && defaultAction,
|
|
134
|
-
(actions.altAction || showAltAction) && /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_jsx_runtime.Fragment, { children: [
|
|
135
|
-
actions.defaultAction && /* @__PURE__ */ (0, import_jsx_runtime.jsx)(DividerVertical, {}),
|
|
136
|
-
altAction
|
|
137
|
-
] })
|
|
138
|
-
] })
|
|
139
|
-
] }),
|
|
140
|
-
!disabledAll && /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(UploaderDragActive, { children: [
|
|
141
|
-
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(DragActiveIcon, {}),
|
|
142
|
-
dragActiveInstructionalText
|
|
143
|
-
] }),
|
|
144
|
-
!disabledAll && /* @__PURE__ */ (0, import_jsx_runtime.jsx)("input", { ...getInputProps() })
|
|
145
|
-
] }),
|
|
146
|
-
typeof acceptedTypesText === "string" && /* @__PURE__ */ (0, import_jsx_runtime.jsx)(AcceptedTypes, { children: acceptedTypesText.toUpperCase() })
|
|
147
|
-
] });
|
|
148
|
-
};
|
|
149
|
-
DSUploader.actions = {
|
|
150
|
-
defaultAction: "LOCAL DRIVE",
|
|
151
|
-
altAction: "DOCUMENTS"
|
|
152
185
|
};
|
|
153
|
-
DSUploader.
|
|
154
|
-
DSUploader.
|
|
186
|
+
DSUploader.actions = import_constants.defaultActions;
|
|
187
|
+
DSUploader.propTypes = import_react_desc_prop_types.propTypes;
|
|
188
|
+
DSUploader.displayName = import_constants.DSUploaderName;
|
|
155
189
|
const UploaderWithSchema = (0, import_ds_props_helpers.describe)(DSUploader);
|
|
156
|
-
UploaderWithSchema.propTypes =
|
|
190
|
+
UploaderWithSchema.propTypes = import_react_desc_prop_types.propTypes;
|
|
157
191
|
var DSUploader_default = DSUploader;
|
|
158
192
|
//# sourceMappingURL=DSUploader.js.map
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../src/DSUploader.tsx", "../../../../scripts/build/transpile/react-shim.js"],
|
|
4
|
-
"sourcesContent": ["/* eslint-disable max-lines */\n/* eslint-disable complexity */\nimport React
|
|
5
|
-
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;
|
|
6
|
-
"names": ["
|
|
4
|
+
"sourcesContent": ["/* eslint-disable max-lines */\n/* eslint-disable complexity */\nimport React, { type ComponentType, useCallback, useMemo } from 'react';\nimport { runAll } from '@elliemae/ds-utilities';\nimport {\n describe,\n useMemoMergePropsWithDefault,\n useValidateTypescriptPropTypes,\n useGetGlobalAttributes,\n useGetXstyledProps,\n} from '@elliemae/ds-props-helpers';\nimport { DSButtonV2, BUTTON_TYPES } from '@elliemae/ds-button';\nimport { useDropzone } from 'react-dropzone';\nimport DSTooltip from '@elliemae/ds-tooltip';\nimport { defaultProps, type DSUploaderT, type ActionButtonPropsT, propTypes } from './react-desc-prop-types.js';\nimport {\n StyledAcceptedTypes,\n StyledDividerVertical,\n StyledInfoText,\n StyledUploader,\n StyledUploaderDragActive,\n StyledUploaderIconArea,\n StyledUploaderInfo,\n StyledUploaderWrapper,\n StyledUploaderActions,\n StyledDividerVerticalActions,\n} from './styled.js';\nimport { DSUploaderName, defaultActions } from './constants.js';\nconst ActionButton = ({ labelText, ...otherProps }: ActionButtonPropsT): React.ReactElement => (\n <DSButtonV2\n {...otherProps}\n buttonType={BUTTON_TYPES.TEXT}\n style={{ padding: 0, height: 'initial', borderWidth: '0px' }}\n >\n {labelText}\n </DSButtonV2>\n);\n\nconst DSUploader: ComponentType<DSUploaderT.DefaultProps> = (props) => {\n const propsWithDefault = useMemoMergePropsWithDefault<DSUploaderT.DefaultProps>(props, defaultProps);\n useValidateTypescriptPropTypes(propsWithDefault, propTypes, DSUploaderName);\n\n const {\n containerProps,\n label,\n icon: UploadFileIcon,\n defaultActionLabel,\n dragActiveInstructionalText,\n dragActiveIcon: DragActiveIcon,\n altActionLabel,\n acceptedTypesText,\n disabledDefault,\n disabledAlt,\n onDefaultHandlerClick,\n onAltHandlerClick,\n actions,\n showAltAction,\n defaultActionTooltipText,\n altActionTooltipText,\n ...rest\n } = propsWithDefault;\n\n const globalAttributes = useGetGlobalAttributes(rest);\n const xstyledProps = useGetXstyledProps(rest);\n\n const getOwnerProps = useCallback(() => propsWithDefault, [propsWithDefault]);\n const getOwnerPropsArguments = useCallback(() => ({}), []);\n\n const { getRootProps, getInputProps, isDragActive } = useDropzone(rest);\n const { onClick: onOpenFile, ...rootProps } = getRootProps();\n const disabledAll = disabledDefault && disabledAlt;\n\n const delfaultActionButton = useMemo(\n () => (\n <ActionButton\n disabled={disabledDefault}\n labelText={actions.defaultAction ? (actions.defaultAction as string) : defaultActionLabel}\n onClick={(...args) => {\n if (!disabledDefault) runAll(onDefaultHandlerClick, onOpenFile)(...args);\n }}\n />\n ),\n [actions.defaultAction, defaultActionLabel, disabledDefault, onDefaultHandlerClick, onOpenFile],\n );\n\n const altActionButton = useMemo(\n () => (\n <ActionButton\n disabled={disabledAlt}\n labelText={actions.altAction ? (actions.altAction as string) : altActionLabel}\n onClick={(...args) => {\n if (!disabledAlt) onAltHandlerClick(...args);\n }}\n />\n ),\n [actions.altAction, altActionLabel, disabledAlt, onAltHandlerClick],\n );\n\n const defaultAction = useMemo(\n () =>\n !defaultActionTooltipText ? (\n delfaultActionButton\n ) : (\n <DSTooltip\n containerProps={{ id: 'default-action-tooltip' }}\n interactionType=\"hover\"\n title={defaultActionTooltipText}\n triggerComponent={delfaultActionButton}\n />\n ),\n [defaultActionTooltipText, delfaultActionButton],\n );\n\n const altAction = useMemo(\n () =>\n !altActionTooltipText ? (\n altActionButton\n ) : (\n <DSTooltip\n containerProps={{ id: 'alt-action-tooltip' }}\n interactionType=\"hover\"\n title={altActionTooltipText}\n triggerComponent={altActionButton}\n />\n ),\n [altActionTooltipText, altActionButton],\n );\n\n return (\n <StyledUploaderWrapper\n {...containerProps}\n {...globalAttributes}\n {...xstyledProps}\n getOwnerProps={getOwnerProps}\n getOwnerPropsArguments={getOwnerPropsArguments}\n >\n <StyledUploader\n {...rootProps}\n isDragActive={isDragActive}\n disabledAll={disabledAll}\n getOwnerProps={getOwnerProps}\n getOwnerPropsArguments={getOwnerPropsArguments}\n >\n <StyledUploaderIconArea getOwnerProps={getOwnerProps} getOwnerPropsArguments={getOwnerPropsArguments}>\n <UploadFileIcon size=\"l\" />\n </StyledUploaderIconArea>\n <StyledDividerVertical getOwnerProps={getOwnerProps} getOwnerPropsArguments={getOwnerPropsArguments} />\n <StyledUploaderInfo getOwnerProps={getOwnerProps} getOwnerPropsArguments={getOwnerPropsArguments}>\n <StyledInfoText getOwnerProps={getOwnerProps} getOwnerPropsArguments={getOwnerPropsArguments}>\n {label}\n </StyledInfoText>\n <StyledUploaderActions getOwnerProps={getOwnerProps} getOwnerPropsArguments={getOwnerPropsArguments}>\n {actions.defaultAction && defaultAction}\n {(actions.altAction || showAltAction) && (\n <>\n {actions.defaultAction && (\n <StyledDividerVerticalActions\n getOwnerProps={getOwnerProps}\n getOwnerPropsArguments={getOwnerPropsArguments}\n />\n )}\n {altAction}\n </>\n )}\n </StyledUploaderActions>\n </StyledUploaderInfo>\n {!disabledAll && (\n <StyledUploaderDragActive getOwnerProps={getOwnerProps} getOwnerPropsArguments={getOwnerPropsArguments}>\n <DragActiveIcon color={['neutral', '000']} mr=\"xxs\" />\n {dragActiveInstructionalText}\n </StyledUploaderDragActive>\n )}\n {!disabledAll && <input {...getInputProps()} aria-label=\"file\" />}\n </StyledUploader>\n {typeof acceptedTypesText === 'string' && (\n <StyledAcceptedTypes getOwnerProps={getOwnerProps} getOwnerPropsArguments={getOwnerPropsArguments}>\n {acceptedTypesText.toUpperCase()}\n </StyledAcceptedTypes>\n )}\n </StyledUploaderWrapper>\n );\n};\n\nDSUploader.actions = defaultActions;\nDSUploader.propTypes = propTypes;\nDSUploader.displayName = DSUploaderName;\nconst UploaderWithSchema = describe(DSUploader);\nUploaderWithSchema.propTypes = propTypes;\n\nexport { UploaderWithSchema, DSUploader };\nexport default DSUploader;\n", "import * as React from 'react';\nexport { React };\n"],
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;AD6BrB;AA3BF,mBAAgE;AAChE,0BAAuB;AACvB,8BAMO;AACP,uBAAyC;AACzC,4BAA4B;AAC5B,wBAAsB;AACtB,mCAAmF;AACnF,oBAWO;AACP,uBAA+C;AAC/C,MAAM,eAAe,CAAC,EAAE,WAAW,GAAG,WAAW,MAC/C;AAAA,EAAC;AAAA;AAAA,IACE,GAAG;AAAA,IACJ,YAAY,8BAAa;AAAA,IACzB,OAAO,EAAE,SAAS,GAAG,QAAQ,WAAW,aAAa,MAAM;AAAA,IAE1D;AAAA;AACH;AAGF,MAAM,aAAsD,CAAC,UAAU;AACrE,QAAM,uBAAmB,sDAAuD,OAAO,yCAAY;AACnG,8DAA+B,kBAAkB,wCAAW,+BAAc;AAE1E,QAAM;AAAA,IACJ;AAAA,IACA;AAAA,IACA,MAAM;AAAA,IACN;AAAA,IACA;AAAA,IACA,gBAAgB;AAAA,IAChB;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA,GAAG;AAAA,EACL,IAAI;A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YAAY;AACvB,WAAW,cAAc;AACzB,MAAM,yBAAqB,kCAAS,UAAU;AAC9C,mBAAmB,YAAY;AAG/B,IAAO,qBAAQ;",
|
|
6
|
+
"names": ["DSTooltip"]
|
|
7
7
|
}
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __create = Object.create;
|
|
3
|
+
var __defProp = Object.defineProperty;
|
|
4
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
5
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
6
|
+
var __getProtoOf = Object.getPrototypeOf;
|
|
7
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
8
|
+
var __export = (target, all) => {
|
|
9
|
+
for (var name in all)
|
|
10
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
11
|
+
};
|
|
12
|
+
var __copyProps = (to, from, except, desc) => {
|
|
13
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
14
|
+
for (let key of __getOwnPropNames(from))
|
|
15
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
16
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
17
|
+
}
|
|
18
|
+
return to;
|
|
19
|
+
};
|
|
20
|
+
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
|
21
|
+
// If the importer is in node compatibility mode or this is not an ESM
|
|
22
|
+
// file that has been converted to a CommonJS file using a Babel-
|
|
23
|
+
// compatible transform (i.e. "__esModule" has not been set), then set
|
|
24
|
+
// "default" to the CommonJS "module.exports" for node compatibility.
|
|
25
|
+
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
|
|
26
|
+
mod
|
|
27
|
+
));
|
|
28
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
29
|
+
var constants_exports = {};
|
|
30
|
+
__export(constants_exports, {
|
|
31
|
+
DSUploaderDataTestIds: () => DSUploaderDataTestIds,
|
|
32
|
+
DSUploaderName: () => DSUploaderName,
|
|
33
|
+
DSUploaderSlots: () => DSUploaderSlots,
|
|
34
|
+
defaultActions: () => defaultActions
|
|
35
|
+
});
|
|
36
|
+
module.exports = __toCommonJS(constants_exports);
|
|
37
|
+
var React = __toESM(require("react"));
|
|
38
|
+
var import_ds_system = require("@elliemae/ds-system");
|
|
39
|
+
const DSUploaderName = "DSUploader";
|
|
40
|
+
const DSUploaderSlots = {
|
|
41
|
+
ROOT: "root",
|
|
42
|
+
UPLOADER: "uploader",
|
|
43
|
+
ICON_AREA: "icon-area",
|
|
44
|
+
DIVIDER_VERTICAL: "divider-vertical",
|
|
45
|
+
ACTIONS_DIVIDER_VERTICAL: "actions-divider-vertical",
|
|
46
|
+
UPLOADER_INFO: "uploader-info",
|
|
47
|
+
INFO_TEXT: "info-text",
|
|
48
|
+
UPLOADER_DRAG_ACTIVE: "uploader-drag-active",
|
|
49
|
+
ACCEPTED_TYPES: "accepted-types",
|
|
50
|
+
UPLOADER_ACTIONS: "uploader-actions"
|
|
51
|
+
};
|
|
52
|
+
const defaultActions = {
|
|
53
|
+
defaultAction: "LOCAL DRIVE",
|
|
54
|
+
altAction: "DOCUMENTS"
|
|
55
|
+
};
|
|
56
|
+
const DSUploaderDataTestIds = (0, import_ds_system.slotObjectToDataTestIds)(DSUploaderName, DSUploaderSlots);
|
|
57
|
+
//# sourceMappingURL=constants.js.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../src/constants.tsx", "../../../../scripts/build/transpile/react-shim.js"],
|
|
4
|
+
"sourcesContent": ["import { slotObjectToDataTestIds } from '@elliemae/ds-system';\n\nexport const DSUploaderName = 'DSUploader';\n\nexport const DSUploaderSlots = {\n ROOT: 'root',\n UPLOADER: 'uploader',\n ICON_AREA: 'icon-area',\n DIVIDER_VERTICAL: 'divider-vertical',\n ACTIONS_DIVIDER_VERTICAL: 'actions-divider-vertical',\n UPLOADER_INFO: 'uploader-info',\n INFO_TEXT: 'info-text',\n UPLOADER_DRAG_ACTIVE: 'uploader-drag-active',\n ACCEPTED_TYPES: 'accepted-types',\n UPLOADER_ACTIONS: 'uploader-actions',\n};\n\nexport const defaultActions = {\n defaultAction: 'LOCAL DRIVE',\n altAction: 'DOCUMENTS',\n} as const;\n\nexport const DSUploaderDataTestIds = slotObjectToDataTestIds(DSUploaderName, DSUploaderSlots);\n", "import * as React from 'react';\nexport { React };\n"],
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADAvB,uBAAwC;AAEjC,MAAM,iBAAiB;AAEvB,MAAM,kBAAkB;AAAA,EAC7B,MAAM;AAAA,EACN,UAAU;AAAA,EACV,WAAW;AAAA,EACX,kBAAkB;AAAA,EAClB,0BAA0B;AAAA,EAC1B,eAAe;AAAA,EACf,WAAW;AAAA,EACX,sBAAsB;AAAA,EACtB,gBAAgB;AAAA,EAChB,kBAAkB;AACpB;AAEO,MAAM,iBAAiB;AAAA,EAC5B,eAAe;AAAA,EACf,WAAW;AACb;AAEO,MAAM,4BAAwB,0CAAwB,gBAAgB,eAAe;",
|
|
6
|
+
"names": []
|
|
7
|
+
}
|
package/dist/cjs/index.js
CHANGED
|
@@ -17,6 +17,7 @@ var __copyProps = (to, from, except, desc) => {
|
|
|
17
17
|
}
|
|
18
18
|
return to;
|
|
19
19
|
};
|
|
20
|
+
var __reExport = (target, mod, secondTarget) => (__copyProps(target, mod, "default"), secondTarget && __copyProps(secondTarget, mod, "default"));
|
|
20
21
|
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
|
21
22
|
// If the importer is in node compatibility mode or this is not an ESM
|
|
22
23
|
// file that has been converted to a CommonJS file using a Babel-
|
|
@@ -35,4 +36,5 @@ __export(src_exports, {
|
|
|
35
36
|
module.exports = __toCommonJS(src_exports);
|
|
36
37
|
var React = __toESM(require("react"));
|
|
37
38
|
var import_DSUploader = __toESM(require("./DSUploader.js"));
|
|
39
|
+
__reExport(src_exports, require("./constants.js"), module.exports);
|
|
38
40
|
//# sourceMappingURL=index.js.map
|
package/dist/cjs/index.js.map
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../src/index.tsx", "../../../../scripts/build/transpile/react-shim.js"],
|
|
4
|
-
"sourcesContent": ["export { default, DSUploader, UploaderWithSchema } from './DSUploader.js';\n", "import * as React from 'react';\nexport { React };\n"],
|
|
5
|
-
"mappings": "
|
|
4
|
+
"sourcesContent": ["export { default, DSUploader, UploaderWithSchema } from './DSUploader.js';\nexport * from './constants.js';\n", "import * as React from 'react';\nexport { React };\n"],
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADAvB,wBAAwD;AACxD,wBAAc,2BADd;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
|
@@ -26,15 +26,19 @@ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__ge
|
|
|
26
26
|
mod
|
|
27
27
|
));
|
|
28
28
|
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
29
|
-
var
|
|
30
|
-
__export(
|
|
29
|
+
var react_desc_prop_types_exports = {};
|
|
30
|
+
__export(react_desc_prop_types_exports, {
|
|
31
|
+
defaultProps: () => defaultProps,
|
|
31
32
|
propTypes: () => propTypes
|
|
32
33
|
});
|
|
33
|
-
module.exports = __toCommonJS(
|
|
34
|
+
module.exports = __toCommonJS(react_desc_prop_types_exports);
|
|
34
35
|
var React = __toESM(require("react"));
|
|
35
36
|
var import_ds_props_helpers = require("@elliemae/ds-props-helpers");
|
|
36
37
|
var import_ds_icons = require("@elliemae/ds-icons");
|
|
38
|
+
var import_constants = require("./constants.js");
|
|
37
39
|
const propTypes = {
|
|
40
|
+
...import_ds_props_helpers.globalAttributesPropTypes,
|
|
41
|
+
...import_ds_props_helpers.xstyledPropTypes,
|
|
38
42
|
containerProps: import_ds_props_helpers.PropTypes.object.description("Set of Properties attached to the main container."),
|
|
39
43
|
maxFiles: import_ds_props_helpers.PropTypes.number.description("Number of files accepted."),
|
|
40
44
|
minSize: import_ds_props_helpers.PropTypes.number.description("Minimun file size accepted in bytes."),
|
|
@@ -46,7 +50,7 @@ const propTypes = {
|
|
|
46
50
|
multiple: import_ds_props_helpers.PropTypes.bool.description("Set to false to restrict multiple files selection/upload."),
|
|
47
51
|
accept: import_ds_props_helpers.PropTypes.string.description("String containing the accepted MIME type for the DSUploader"),
|
|
48
52
|
label: import_ds_props_helpers.PropTypes.string.description("Uploader label.").defaultValue("Browse"),
|
|
49
|
-
icon: import_ds_props_helpers.PropTypes.
|
|
53
|
+
icon: import_ds_props_helpers.PropTypes.func.description("Uploader left icon.").defaultValue(import_ds_icons.UploadFile),
|
|
50
54
|
actions: import_ds_props_helpers.PropTypes.shape({
|
|
51
55
|
defaultAction: import_ds_props_helpers.PropTypes.string,
|
|
52
56
|
altAction: import_ds_props_helpers.PropTypes.string
|
|
@@ -55,7 +59,7 @@ const propTypes = {
|
|
|
55
59
|
showAltAction: import_ds_props_helpers.PropTypes.bool.description("whether to show alternate action button or not.").defaultValue(true),
|
|
56
60
|
altActionLabel: import_ds_props_helpers.PropTypes.string.description("Second action button label.").defaultValue("LOCAL DRIVE"),
|
|
57
61
|
dragActiveInstructionalText: import_ds_props_helpers.PropTypes.string.description("informative text when user drags a file over the uploader zone.").defaultValue("DROP FILES HERE"),
|
|
58
|
-
dragActiveIcon: import_ds_props_helpers.PropTypes.
|
|
62
|
+
dragActiveIcon: import_ds_props_helpers.PropTypes.func.description("Icon when user drags a file over the uploader zone."),
|
|
59
63
|
acceptedTypesText: import_ds_props_helpers.PropTypes.string.description("Information text to show what types are supported.").defaultValue("JPG, JPEG, PNG, PDF"),
|
|
60
64
|
disabledDefault: import_ds_props_helpers.PropTypes.bool.description("Whether the default uploader is disabled or not.").defaultValue(false),
|
|
61
65
|
disabledAlt: import_ds_props_helpers.PropTypes.bool.description("Whether the alternative uploader is disabled or not.").defaultValue(false),
|
|
@@ -64,4 +68,24 @@ const propTypes = {
|
|
|
64
68
|
defaultActionTooltipText: import_ds_props_helpers.PropTypes.string.description("shows tooltip in default action button."),
|
|
65
69
|
altActionTooltipText: import_ds_props_helpers.PropTypes.string.description("Shows tooltip in alternate action button.")
|
|
66
70
|
};
|
|
67
|
-
|
|
71
|
+
const defaultProps = {
|
|
72
|
+
containerProps: {},
|
|
73
|
+
label: "Browse",
|
|
74
|
+
icon: import_ds_icons.UploadFile,
|
|
75
|
+
defaultActionLabel: "LOCAL DRIVE",
|
|
76
|
+
dragActiveInstructionalText: "DROP FILES HERE",
|
|
77
|
+
dragActiveIcon: import_ds_icons.UploadFile,
|
|
78
|
+
altActionLabel: "DOCUMENTS",
|
|
79
|
+
acceptedTypesText: "JPG, JPEG, PNG, PDF",
|
|
80
|
+
disabledDefault: false,
|
|
81
|
+
disabledAlt: false,
|
|
82
|
+
onDefaultHandlerClick: () => {
|
|
83
|
+
},
|
|
84
|
+
onAltHandlerClick: () => {
|
|
85
|
+
},
|
|
86
|
+
actions: import_constants.defaultActions,
|
|
87
|
+
showAltAction: false,
|
|
88
|
+
defaultActionTooltipText: "",
|
|
89
|
+
altActionTooltipText: ""
|
|
90
|
+
};
|
|
91
|
+
//# sourceMappingURL=react-desc-prop-types.js.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../src/react-desc-prop-types.tsx", "../../../../scripts/build/transpile/react-shim.js"],
|
|
4
|
+
"sourcesContent": ["import { type WeakValidationMap } from 'react';\nimport { PropTypes, globalAttributesPropTypes, xstyledPropTypes } from '@elliemae/ds-props-helpers';\nimport { UploadFile } from '@elliemae/ds-icons';\nimport { defaultActions } from './constants.js';\n/** Inherits the props of react-dropzone https://react-dropzone.netlify.com/ */\n\nexport namespace DSUploaderT {\n export interface DefaultProps {\n containerProps: Record<string, unknown>;\n label: string;\n icon: React.FC;\n defaultActionLabel?: string;\n dragActiveInstructionalText?: string;\n dragActiveIcon: React.FC;\n altActionLabel: string;\n acceptedTypesText: string;\n disabledDefault: boolean;\n disabledAlt: boolean;\n onDefaultHandlerClick: () => void | null;\n onAltHandlerClick: () => void | null;\n actions: Record<string, unknown>;\n showAltAction: boolean;\n defaultActionTooltipText: string;\n altActionTooltipText: string;\n }\n\n export type ActionsT = Record<string, unknown>;\n}\n\nexport interface ActionButtonPropsT {\n labelText: string;\n variant: undefined | 'variant-disabled';\n onClick: () => void | null;\n}\n\nexport const propTypes = {\n ...globalAttributesPropTypes,\n ...xstyledPropTypes,\n containerProps: PropTypes.object.description('Set of Properties attached to the main container.'),\n maxFiles: PropTypes.number.description('Number of files accepted.'),\n minSize: PropTypes.number.description('Minimun file size accepted in bytes.'),\n maxSize: PropTypes.number.description('Maximum file size accepted in bytes.'),\n onDropRejected: PropTypes.func.description(\n 'Cb called when files are rejected using maxFiles, minSize or maxSize properties.',\n ),\n disabled: PropTypes.bool.description('Disables the DSUploader.'),\n multiple: PropTypes.bool.description('Set to false to restrict multiple files selection/upload.'),\n accept: PropTypes.string.description('String containing the accepted MIME type for the DSUploader'),\n\n label: PropTypes.string.description('Uploader label.').defaultValue('Browse'),\n icon: PropTypes.func.description('Uploader left icon.').defaultValue(UploadFile),\n actions: PropTypes.shape({\n defaultAction: PropTypes.string,\n altAction: PropTypes.string,\n })\n .description('Uploader actions.')\n .defaultValue({ defaultAction: 'LOCAL DRIVE' }),\n defaultActionLabel: PropTypes.string.description('First action button label.'),\n showAltAction: PropTypes.bool.description('whether to show alternate action button or not.').defaultValue(true),\n altActionLabel: PropTypes.string.description('Second action button label.').defaultValue('LOCAL DRIVE'),\n dragActiveInstructionalText: PropTypes.string\n .description('informative text when user drags a file over the uploader zone.')\n .defaultValue('DROP FILES HERE'),\n dragActiveIcon: PropTypes.func.description('Icon when user drags a file over the uploader zone.'),\n acceptedTypesText: PropTypes.string\n .description('Information text to show what types are supported.')\n .defaultValue('JPG, JPEG, PNG, PDF'),\n disabledDefault: PropTypes.bool.description('Whether the default uploader is disabled or not.').defaultValue(false),\n disabledAlt: PropTypes.bool.description('Whether the alternative uploader is disabled or not.').defaultValue(false),\n onDefaultHandlerClick: PropTypes.func.description('First action button click handler.'),\n onAltHandlerClick: PropTypes.func.description('Second action button click handler.'),\n defaultActionTooltipText: PropTypes.string.description('shows tooltip in default action button.'),\n altActionTooltipText: PropTypes.string.description('Shows tooltip in alternate action button.'),\n} as unknown as WeakValidationMap<DSUploaderT.DefaultProps>;\n\nexport const defaultProps: DSUploaderT.DefaultProps = {\n containerProps: {},\n label: 'Browse',\n icon: UploadFile,\n defaultActionLabel: 'LOCAL DRIVE',\n dragActiveInstructionalText: 'DROP FILES HERE',\n dragActiveIcon: UploadFile,\n altActionLabel: 'DOCUMENTS',\n acceptedTypesText: 'JPG, JPEG, PNG, PDF',\n disabledDefault: false,\n disabledAlt: false,\n onDefaultHandlerClick: () => {},\n onAltHandlerClick: () => {},\n actions: defaultActions,\n showAltAction: false,\n defaultActionTooltipText: '',\n altActionTooltipText: '',\n};\n", "import * as React from 'react';\nexport { React };\n"],
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADCvB,8BAAuE;AACvE,sBAA2B;AAC3B,uBAA+B;AAgCxB,MAAM,YAAY;AAAA,EACvB,GAAG;AAAA,EACH,GAAG;AAAA,EACH,gBAAgB,kCAAU,OAAO,YAAY,mDAAmD;AAAA,EAChG,UAAU,kCAAU,OAAO,YAAY,2BAA2B;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