@ainias42/react-bootstrap-mobile 0.2.2 → 0.2.3
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/bin/updateCopies.js +1 -1
- package/dist/bootstrapReactMobile.js +26 -23
- package/dist/bootstrapReactMobile.js.map +1 -1
- package/dist/src/Components/FormElements/Input/FileInput/FileInput.d.ts +1 -0
- package/dist/src/Components/FormElements/Input/FileInput/MultipleFileInput.d.ts +2 -1
- package/package.json +1 -1
- package/src/Components/FormElements/Input/FileInput/FileInput.tsx +9 -10
- package/src/Components/FormElements/Input/FileInput/MultipleFileInput.tsx +24 -19
- package/src/Components/FormElements/Input/Input.tsx +5 -2
package/bin/updateCopies.js
CHANGED
|
@@ -19,7 +19,7 @@ let pathsToProjects = [
|
|
|
19
19
|
"/Users/sguenter/Projekte/Privat/react-windows",
|
|
20
20
|
"/Users/sguenter/Projekte/Privat/cordova-sites",
|
|
21
21
|
"/Users/sguenter/Projekte/Privat/libraries",
|
|
22
|
-
"/Users/sguenter/Projekte/Privat/
|
|
22
|
+
"/Users/sguenter/Projekte/Privat/wordRotator"
|
|
23
23
|
|
|
24
24
|
];
|
|
25
25
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/*!
|
|
2
2
|
*
|
|
3
|
-
* @ainias42/react-bootstrap-mobile v0.2.
|
|
3
|
+
* @ainias42/react-bootstrap-mobile v0.2.2
|
|
4
4
|
* git+https://github.com/Ainias/Bootstrap-React-Mobile.git
|
|
5
5
|
* Copyright (c) Silas Günther and project contributors.
|
|
6
6
|
* This source code is licensed under the MIT license found in the
|
|
@@ -23278,6 +23278,21 @@ function useOnChangeDone(onChangeDone, ref) {
|
|
|
23278
23278
|
}, [onChangeDone, usedRef]);
|
|
23279
23279
|
return usedRef;
|
|
23280
23280
|
}
|
|
23281
|
+
;// CONCATENATED MODULE: ./src/Components/Hooks/useDebounced.ts
|
|
23282
|
+
|
|
23283
|
+
function useDebounced(callback, dependencies, delay = 100) {
|
|
23284
|
+
const [shared] = (0,external_react_.useState)({
|
|
23285
|
+
timeout: undefined
|
|
23286
|
+
});
|
|
23287
|
+
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
23288
|
+
const realCB = (0,external_react_.useCallback)(callback, dependencies);
|
|
23289
|
+
return (0,external_react_.useCallback)((...newArgs) => {
|
|
23290
|
+
if (shared.timeout === undefined) {
|
|
23291
|
+
realCB(...newArgs);
|
|
23292
|
+
shared.timeout = setTimeout(() => shared.timeout = undefined, delay);
|
|
23293
|
+
}
|
|
23294
|
+
}, [delay, realCB, shared]);
|
|
23295
|
+
}
|
|
23281
23296
|
;// CONCATENATED MODULE: ./src/Components/FormElements/Input/Input.tsx
|
|
23282
23297
|
function Input_extends() { return Input_extends = Object.assign ? Object.assign.bind() : function (n) { for (var e = 1; e < arguments.length; e++) { var t = arguments[e]; for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]); } return n; }, Input_extends.apply(null, arguments); }
|
|
23283
23298
|
var Input_rest = undefined && undefined.__rest || function (s, e) {
|
|
@@ -23299,6 +23314,7 @@ var Input_rest = undefined && undefined.__rest || function (s, e) {
|
|
|
23299
23314
|
|
|
23300
23315
|
|
|
23301
23316
|
|
|
23317
|
+
|
|
23302
23318
|
const Input = withForwardRef(function Input(_a, ref) {
|
|
23303
23319
|
// Variables
|
|
23304
23320
|
var {
|
|
@@ -23364,7 +23380,8 @@ const Input = withForwardRef(function Input(_a, ref) {
|
|
|
23364
23380
|
onChangeWithData(e);
|
|
23365
23381
|
}, [onChangeWithData, onChangeText, otherProps.type]);
|
|
23366
23382
|
const [onBlur, otherPropsWithoutBlur] = useListenerWithExtractedProps('onBlur', otherPropsWithoutOnchange);
|
|
23367
|
-
const [
|
|
23383
|
+
const [onChangeDoneWithoutDeboune, otherPropsWithoutData] = useListenerWithExtractedProps('onChangeDone', otherPropsWithoutBlur);
|
|
23384
|
+
const onChangeDone = useDebounced(onChangeDoneWithoutDeboune, [onChangeDoneWithoutDeboune]);
|
|
23368
23385
|
const realOnKeyDown = (0,external_react_.useCallback)(e => {
|
|
23369
23386
|
onKeyDown === null || onKeyDown === void 0 ? void 0 : onKeyDown(e);
|
|
23370
23387
|
if (onEnter && e.key === 'Enter' && !e.defaultPrevented) {
|
|
@@ -23394,7 +23411,7 @@ const Input = withForwardRef(function Input(_a, ref) {
|
|
|
23394
23411
|
onChange(e);
|
|
23395
23412
|
}
|
|
23396
23413
|
}
|
|
23397
|
-
}, [onKeyDown,
|
|
23414
|
+
}, [onKeyDown, onEnter, otherProps.type, otherProps.step, otherProps.max, otherProps.min, onChange]);
|
|
23398
23415
|
// Effects
|
|
23399
23416
|
useOnChangeDone(onChangeDone, innerRef);
|
|
23400
23417
|
(0,external_react_.useEffect)(() => {
|
|
@@ -23633,9 +23650,10 @@ const MultipleFileInput = withMemo(function MultipleImageInput(_a) {
|
|
|
23633
23650
|
allowOverride = maxFiles === 1,
|
|
23634
23651
|
onError,
|
|
23635
23652
|
showDeleteButton = true,
|
|
23636
|
-
error
|
|
23653
|
+
error,
|
|
23654
|
+
"data-test-id": testId
|
|
23637
23655
|
} = _a,
|
|
23638
|
-
otherProps = MultipleFileInput_rest(_a, ["className", "style", "value", "label", "mimeTypes", "maxFiles", "maxSizePerFile", "allowOverride", "onError", "showDeleteButton", "error"]);
|
|
23656
|
+
otherProps = MultipleFileInput_rest(_a, ["className", "style", "value", "label", "mimeTypes", "maxFiles", "maxSizePerFile", "allowOverride", "onError", "showDeleteButton", "error", "data-test-id"]);
|
|
23639
23657
|
// Refs
|
|
23640
23658
|
const inputRef = (0,external_react_.useRef)(null);
|
|
23641
23659
|
const indexRef = (0,external_react_.useRef)(undefined);
|
|
@@ -23653,7 +23671,7 @@ const MultipleFileInput = withMemo(function MultipleImageInput(_a) {
|
|
|
23653
23671
|
return fileType === type;
|
|
23654
23672
|
});
|
|
23655
23673
|
}, [mimeTypes]);
|
|
23656
|
-
const [onChangeFiles,
|
|
23674
|
+
const [onChangeFiles, props] = useListenerWithExtractedProps('onChangeFiles', otherProps);
|
|
23657
23675
|
const getBase64 = (0,external_react_.useCallback)(inputFiles => {
|
|
23658
23676
|
const promises = inputFiles.map(file => new Promise((resolve, reject) => {
|
|
23659
23677
|
const reader = new FileReader();
|
|
@@ -23758,7 +23776,8 @@ const MultipleFileInput = withMemo(function MultipleImageInput(_a) {
|
|
|
23758
23776
|
};
|
|
23759
23777
|
return /*#__PURE__*/external_react_.createElement("span", {
|
|
23760
23778
|
className: classnames_default()((fileInput_default()).fileInput, className),
|
|
23761
|
-
style: style
|
|
23779
|
+
style: style,
|
|
23780
|
+
"data-test-id": testId
|
|
23762
23781
|
}, /*#__PURE__*/external_react_.createElement(Flex_tmp, {
|
|
23763
23782
|
horizontal: true
|
|
23764
23783
|
}, !!label && /*#__PURE__*/external_react_.createElement(Grow, null, /*#__PURE__*/external_react_.createElement(tmp, null, label)), maxFiles > 1 && /*#__PURE__*/external_react_.createElement(InlineMemo, null, /*#__PURE__*/external_react_.createElement(tmp, null, value.length, "/", maxFiles))), /*#__PURE__*/external_react_.createElement(Flex_tmp, {
|
|
@@ -24047,7 +24066,6 @@ var FileInput_rest = undefined && undefined.__rest || function (s, e) {
|
|
|
24047
24066
|
|
|
24048
24067
|
|
|
24049
24068
|
|
|
24050
|
-
// TODO use MultipleFileInput internal
|
|
24051
24069
|
const FileInput = withMemo(function FileInput(_a) {
|
|
24052
24070
|
// Variables
|
|
24053
24071
|
var {
|
|
@@ -24536,21 +24554,6 @@ function useBreakpointSelect(breakpointValues) {
|
|
|
24536
24554
|
return breakpointValues[5];
|
|
24537
24555
|
}
|
|
24538
24556
|
}
|
|
24539
|
-
;// CONCATENATED MODULE: ./src/Components/Hooks/useDebounced.ts
|
|
24540
|
-
|
|
24541
|
-
function useDebounced(callback, dependencies, delay = 100) {
|
|
24542
|
-
const [shared] = (0,external_react_.useState)({
|
|
24543
|
-
timeout: undefined
|
|
24544
|
-
});
|
|
24545
|
-
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
24546
|
-
const realCB = (0,external_react_.useCallback)(callback, dependencies);
|
|
24547
|
-
return (0,external_react_.useCallback)((...newArgs) => {
|
|
24548
|
-
if (shared.timeout === undefined) {
|
|
24549
|
-
realCB(...newArgs);
|
|
24550
|
-
shared.timeout = setTimeout(() => shared.timeout = undefined, delay);
|
|
24551
|
-
}
|
|
24552
|
-
}, [delay, realCB, shared]);
|
|
24553
|
-
}
|
|
24554
24557
|
;// CONCATENATED MODULE: ./src/Components/Hooks/useDelayed.ts
|
|
24555
24558
|
|
|
24556
24559
|
function useDelayed(callback, dependencies, delay = 100, maxDelay = undefined) {
|