Web: Files: deleted useless folders after merge.
This commit is contained in:
parent
251f149eb6
commit
ee8b6eafc1
@ -1,92 +0,0 @@
|
||||
import React from "react";
|
||||
import PropTypes from "prop-types";
|
||||
|
||||
import IconButton from "@appserver/components/icon-button";
|
||||
import TextInput from "@appserver/components/text-input";
|
||||
import StyledFileInput from "@appserver/components/file-input/styled-file-input";
|
||||
|
||||
const FileInput = (
|
||||
{
|
||||
size,
|
||||
placeholder,
|
||||
isDisabled,
|
||||
scale,
|
||||
isError,
|
||||
hasWarning,
|
||||
id,
|
||||
onClickInput,
|
||||
name,
|
||||
className,
|
||||
fileName,
|
||||
},
|
||||
...rest
|
||||
) => {
|
||||
return (
|
||||
<StyledFileInput
|
||||
size={size}
|
||||
scale={scale ? 1 : 0}
|
||||
hasError={isError}
|
||||
hasWarning={hasWarning}
|
||||
isDisabled={isDisabled}
|
||||
className={className}
|
||||
{...rest}
|
||||
>
|
||||
<TextInput
|
||||
id={id}
|
||||
className="file-text-input"
|
||||
placeholder={placeholder}
|
||||
value={fileName}
|
||||
size={size}
|
||||
isDisabled={isDisabled}
|
||||
hasError={isError}
|
||||
hasWarning={hasWarning}
|
||||
scale={scale}
|
||||
onClick={onClickInput}
|
||||
isReadOnly
|
||||
name={name}
|
||||
/>
|
||||
|
||||
<div className="icon" onClick={!isDisabled ? onClickInput : null}>
|
||||
<IconButton
|
||||
className="icon-button"
|
||||
iconName={"/static/images/catalog.folder.react.svg"}
|
||||
color={"#A3A9AE"}
|
||||
isDisabled={isDisabled}
|
||||
/>
|
||||
</div>
|
||||
</StyledFileInput>
|
||||
);
|
||||
};
|
||||
FileInput.propTypes = {
|
||||
/** Accepts css style */
|
||||
style: PropTypes.oneOfType([PropTypes.object, PropTypes.array]),
|
||||
/** Placeholder text for the input */
|
||||
placeholder: PropTypes.string,
|
||||
/** Supported size of the input fields */
|
||||
size: PropTypes.oneOf(["base", "middle", "big", "huge", "large"]),
|
||||
/** Indicates the input field has scale */
|
||||
scale: PropTypes.bool,
|
||||
/** Accepts class */
|
||||
className: PropTypes.string,
|
||||
/** Indicates the input field has an error */
|
||||
hasError: PropTypes.bool,
|
||||
/** Indicates the input field has a warning */
|
||||
hasWarning: PropTypes.bool,
|
||||
/** Used as HTML `id` property */
|
||||
id: PropTypes.string,
|
||||
/** Indicates that the field cannot be used (e.g not authorised, or changes not saved) */
|
||||
isDisabled: PropTypes.bool,
|
||||
/** Used as HTML `name` property */
|
||||
name: PropTypes.string,
|
||||
};
|
||||
|
||||
FileInput.defaultProps = {
|
||||
size: "base",
|
||||
scale: false,
|
||||
hasWarning: false,
|
||||
hasError: false,
|
||||
isDisabled: false,
|
||||
baseFolder: "",
|
||||
};
|
||||
|
||||
export default FileInput;
|
@ -1,35 +0,0 @@
|
||||
import i18n from "i18next";
|
||||
import Backend from "i18next-http-backend";
|
||||
import { LANGUAGE } from "@appserver/common/constants";
|
||||
import config from "../../../../package.json";
|
||||
import { loadLanguagePath } from "@appserver/common/utils";
|
||||
|
||||
const newInstance = i18n.createInstance();
|
||||
|
||||
newInstance.use(Backend).init({
|
||||
lng: localStorage.getItem(LANGUAGE) || "en",
|
||||
fallbackLng: "en",
|
||||
load: "all",
|
||||
//debug: true,
|
||||
|
||||
interpolation: {
|
||||
escapeValue: false, // not needed for react as it escapes by default
|
||||
format: function (value, format) {
|
||||
if (format === "lowercase") return value.toLowerCase();
|
||||
return value;
|
||||
},
|
||||
},
|
||||
|
||||
backend: {
|
||||
loadPath: loadLanguagePath(config.homepage, "SelectFile"),
|
||||
},
|
||||
|
||||
ns: ["SelectFile", "Common"],
|
||||
defaultNS: "SelectFile",
|
||||
|
||||
react: {
|
||||
useSuspense: false,
|
||||
},
|
||||
});
|
||||
|
||||
export default newInstance;
|
Loading…
Reference in New Issue
Block a user