infinity-forge 7.6.9 → 7.7.1
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/ui/components/form/input-file/hooks/use-file.js +6 -3
- package/dist/ui/components/form/input-file/hooks/use-file.js.map +1 -1
- package/dist/ui/components/form/interfaces.d.ts +3 -2
- package/dist/ui/icons/render/icon-right-chevron.js +1 -1
- package/dist/ui/icons/render/icon-right-chevron.js.map +1 -1
- package/package.json +1 -1
|
@@ -82,7 +82,7 @@ function useFile(props) {
|
|
|
82
82
|
}
|
|
83
83
|
function onChangeInputFile(event) {
|
|
84
84
|
return __awaiter(this, void 0, void 0, function () {
|
|
85
|
-
var files, fileSystemTypes, file, file, _a;
|
|
85
|
+
var files, fileSystemTypes, file, newValue, file, _a;
|
|
86
86
|
return __generator(this, function (_b) {
|
|
87
87
|
switch (_b.label) {
|
|
88
88
|
case 0:
|
|
@@ -100,14 +100,17 @@ function useFile(props) {
|
|
|
100
100
|
case 1:
|
|
101
101
|
setLoading(true);
|
|
102
102
|
if (!(props.isAccumalativeFile && field.value)) return [3 /*break*/, 3];
|
|
103
|
-
return [4 /*yield*/, (0, ui_1.uploadFile)({ files: files, upload: props.upload })];
|
|
103
|
+
return [4 /*yield*/, (0, ui_1.uploadFile)({ files: files, upload: props.upload, })];
|
|
104
104
|
case 2:
|
|
105
105
|
file = _b.sent();
|
|
106
|
-
|
|
106
|
+
newValue = __spreadArray(__spreadArray([], field.value, true), file, true);
|
|
107
|
+
handlers.setValue(newValue);
|
|
108
|
+
(props === null || props === void 0 ? void 0 : props.onChangeInput) && props.onChangeInput(newValue);
|
|
107
109
|
return [3 /*break*/, 5];
|
|
108
110
|
case 3: return [4 /*yield*/, (0, ui_1.uploadFile)({ files: files, upload: props.upload })];
|
|
109
111
|
case 4:
|
|
110
112
|
file = _b.sent();
|
|
113
|
+
(props === null || props === void 0 ? void 0 : props.onChangeInput) && props.onChangeInput(file);
|
|
111
114
|
handlers.setValue(file);
|
|
112
115
|
_b.label = 5;
|
|
113
116
|
case 5: return [3 /*break*/, 8];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"use-file.js","sourceRoot":"","sources":["../../../../../../src/ui/components/form/input-file/hooks/use-file.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAiBA,
|
|
1
|
+
{"version":3,"file":"use-file.js","sourceRoot":"","sources":["../../../../../../src/ui/components/form/input-file/hooks/use-file.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAiBA,0BAmEC;AApFD,+BAA2C;AAE3C,iCAAoE;AAEpE,2BAAkE;AAElE,yDAAqD;AAWrD,SAAgB,OAAO,CAAC,KAAiB;IACjC,IAAA,KAAsB,IAAA,gBAAQ,EAAC,EAAE,CAAC,EAAjC,MAAM,QAAA,EAAE,SAAS,QAAgB,CAAA;IAExC,IAAA,iBAAS,EAAC;QACR,IAAI,CAAC,MAAM,EAAE,CAAC;YACZ,SAAS,CAAC,IAAA,QAAG,EAAC,EAAE,CAAC,CAAC,CAAA;QACpB,CAAC;IACH,CAAC,EAAE,CAAC,MAAM,CAAC,CAAC,CAAA;IAEN,IAAA,KAAwB,IAAA,gBAAQ,EAAC,KAAK,CAAC,EAAtC,OAAO,QAAA,EAAE,UAAU,QAAmB,CAAA;IAEvC,IAAA,KAAuB,IAAA,iBAAQ,EAAmB,EAAE,IAAI,EAAE,CAAA,KAAK,aAAL,KAAK,uBAAL,KAAK,CAAE,IAAI,KAAI,EAAE,EAAE,CAAC,EAA7E,KAAK,QAAA,EAAE,CAAC,QAAA,EAAE,QAAQ,QAA2D,CAAA;IAEpF,SAAS,uBAAuB,CAAC,IAAU;QACzC,OAAO;YACL,EAAE,EAAE,IAAI,CAAC,GAAG,EAAE;YACd,GAAG,EAAE,GAAG,CAAC,eAAe,CAA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AC,EAAA;;wBAAxD,IAAI,GAAG,SAAiD;wBAE9D,CAAA,KAAK,aAAL,KAAK,uBAAL,KAAK,CAAE,aAAa,KAAI,KAAK,CAAC,aAAa,CAAC,IAAI,CAAC,CAAA;wBAEjD,QAAQ,CAAC,QAAQ,CAAC,IAAI,CAAC,CAAA;;;;;;;wBAK3B,UAAU,CAAC,KAAK,CAAC,CAAA;;;;;;KAEpB;IAED,IAAM,SAAS,GAAG,EAAE,MAAM,QAAA,EAAE,KAAK,OAAA,EAAE,QAAQ,UAAA,EAAE,OAAO,SAAA,EAAE,UAAU,YAAA,EAAE,iBAAiB,mBAAA,EAAE,CAAA;IAErF,IAAM,YAAY,GAAG,IAAA,mCAAe,EAAC,EAAE,SAAS,EAAE,KAAK,EAAE,SAAS,WAAA,EAAE,CAAC,CAAA;IAErE,6BAAY,SAAS,GAAK,YAAY,EAAE;AAC1C,CAAC"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { TranslateProps } from '../../../ui/contexts/index.js';
|
|
2
1
|
import { IconsNames } from '../../../ui/icons/index.js';
|
|
2
|
+
import { TranslateProps } from '../../../ui/contexts/index.js';
|
|
3
3
|
import { FieldHelperProps, FieldMetaProps, FormikContextType } from 'formik';
|
|
4
4
|
type InputFormikState = {
|
|
5
5
|
utils: FieldHelperProps<any>;
|
|
@@ -11,6 +11,7 @@ import { InputManagerProps } from './input-manager/index.js';
|
|
|
11
11
|
import { IInputDatePicker } from './input-date-picker/index.js';
|
|
12
12
|
import { InputCurrencyProps } from './input-currency/index.js';
|
|
13
13
|
import { InputCheckboxProps } from './checkbox/index.js';
|
|
14
|
+
import { FileSystemType } from '../../../ui/utils/index.js';
|
|
14
15
|
export type Option = {
|
|
15
16
|
label: string;
|
|
16
17
|
value?: string | number;
|
|
@@ -72,7 +73,7 @@ interface Props {
|
|
|
72
73
|
iconDirection?: 'left' | 'right';
|
|
73
74
|
isAccumalativeFile?: boolean;
|
|
74
75
|
only?: 'cpf' | 'cnpj';
|
|
75
|
-
onChangeInput?: (value: number | string | boolean | string[] | Date, callback?: () => void, formik?: InputFormikState, applyMask?: (value: string, mask: string) => string, formikContext?: FormikContextType<unknown>) => any;
|
|
76
|
+
onChangeInput?: (value: number | string | boolean | string[] | Date | FileSystemType[], callback?: () => void, formik?: InputFormikState, applyMask?: (value: string, mask: string) => string, formikContext?: FormikContextType<unknown>) => any;
|
|
76
77
|
controlledInitialValue?: {
|
|
77
78
|
value?: string;
|
|
78
79
|
};
|
|
@@ -4,6 +4,6 @@ exports.IconRightChevron = IconRightChevron;
|
|
|
4
4
|
var jsx_runtime_1 = require("react/jsx-runtime");
|
|
5
5
|
function IconRightChevron(_a) {
|
|
6
6
|
var _b = _a.color, color = _b === void 0 ? 'currentColor' : _b;
|
|
7
|
-
return ((0, jsx_runtime_1.
|
|
7
|
+
return ((0, jsx_runtime_1.jsx)("svg", { xmlns: 'http://www.w3.org/2000/svg', viewBox: '0 0 320 512', fill: color, children: (0, jsx_runtime_1.jsx)("path", { d: 'M310.6 233.4c12.5 12.5 12.5 32.8 0 45.3l-192 192c-12.5 12.5-32.8 12.5-45.3 0s-12.5-32.8 0-45.3L242.7 256 73.4 86.6c-12.5-12.5-12.5-32.8 0-45.3s32.8-12.5 45.3 0l192 192z' }) }));
|
|
8
8
|
}
|
|
9
9
|
//# sourceMappingURL=icon-right-chevron.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"icon-right-chevron.js","sourceRoot":"","sources":["../../../../src/ui/icons/render/icon-right-chevron.tsx"],"names":[],"mappings":";;AAEA,
|
|
1
|
+
{"version":3,"file":"icon-right-chevron.js","sourceRoot":"","sources":["../../../../src/ui/icons/render/icon-right-chevron.tsx"],"names":[],"mappings":";;AAEA,4CAMC;;AAND,SAAgB,gBAAgB,CAAC,EAAiC;QAA/B,aAAsB,EAAtB,KAAK,mBAAG,cAAc,KAAA;IACvD,OAAO,CACL,gCAAK,KAAK,EAAC,4BAA4B,EAAC,OAAO,EAAC,aAAa,EAAC,IAAI,EAAE,KAAK,YACvE,iCAAM,CAAC,EAAC,0KAA0K,GAAG,GACjL,CACP,CAAA;AACH,CAAC"}
|