Skip to content

Commit

Permalink
4.0.0-beta.1
Browse files Browse the repository at this point in the history
  • Loading branch information
ahmetemrekilinc committed Nov 3, 2023
1 parent 1e5b52a commit e8b9934
Show file tree
Hide file tree
Showing 8 changed files with 2,108 additions and 3,202 deletions.
18 changes: 0 additions & 18 deletions .eslintrc.cjs

This file was deleted.

2 changes: 1 addition & 1 deletion .github/workflows/node.js.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ jobs:
node-version: ${{ matrix.node-version }}
- name: Update yarn @v2
run: corepack enable
- run: corepack prepare [email protected].0 --activate
- run: corepack prepare [email protected].1 --activate
- run: yarn -v
- name: Install dependencies
run: rm -rf node_modules && yarn install --immutable
Expand Down
646 changes: 323 additions & 323 deletions .yarn/releases/yarn-4.0.0.cjs → .yarn/releases/yarn-4.0.1.cjs

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion .yarnrc.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,4 @@ enableGlobalCache: false

nodeLinker: node-modules

yarnPath: .yarn/releases/yarn-4.0.0.cjs
yarnPath: .yarn/releases/yarn-4.0.1.cjs
72 changes: 28 additions & 44 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,67 +1,51 @@
{
"name": "comfort-react-demo",
"version": "3.2.2",
"version": "4.0.0-beta.1",
"type": "module",
"license": "MIT",
"scripts": {
"dev": "vite --port 3245",
"build": "vite build",
"lint": "eslint . --ext ts,tsx --report-unused-disable-directives --max-warnings 0",
"preview": "vite preview"
},
"dependencies": {
"@emotion/cache": "11.10.3",
"@emotion/react": "11.10.4",
"@emotion/styled": "11.10.4",
"@mui/icons-material": "5.10.9",
"@mui/lab": "5.0.0-alpha.103",
"@mui/material": "5.10.9",
"@mui/x-date-pickers": "5.0.4",
"comfort-react": "3.2.2",
"date-fns": "2.29.3",
"@emotion/react": "11.11.1",
"@emotion/styled": "11.11.0",
"@mui/icons-material": "5.14.16",
"@mui/lab": "5.0.0-alpha.151",
"@mui/material": "5.14.16",
"@mui/utils": "5.14.16",
"@mui/x-date-pickers": "6.17.0",
"comfort-react": "4.0.0-beta.1",
"date-fns": "2.30.0",
"jsx-to-string": "1.4.0",
"miragejs": "0.1.45",
"miragejs": "0.1.48",
"react": "18.2.0",
"react-bootstrap": "2.0.0-rc.0",
"react-dom": "18.2.0",
"react-draggable": "4.4.5",
"react-draggable": "4.4.6",
"react-dropzone": "14.2.3",
"react-helmet-async": "1.3.0",
"react-imask": "6.4.3",
"react-imask": "7.1.3",
"react-minimal-side-navigation": "1.9.2",
"react-phone-input-2": "2.15.1",
"react-router-dom": "6.4.2",
"stylis": "4.1.2",
"stylis-plugin-rtl": "2.1.1",
"web-vitals": "3.0.1"
"react-router-dom": "6.18.0",
"web-vitals": "3.5.0"
},
"devDependencies": {
"@babel/core": "7.19.3",
"@babel/eslint-parser": "7.19.1",
"@babel/core": "7.23.2",
"@babel/eslint-parser": "7.22.15",
"@babel/plugin-proposal-class-properties": "7.18.6",
"@babel/plugin-proposal-function-bind": "7.18.9",
"@babel/preset-env": "7.19.4",
"@babel/preset-react": "7.18.6",
"@types/react": "^18.2.15",
"@types/react-dom": "^18.2.7",
"@typescript-eslint/eslint-plugin": "^6.0.0",
"@typescript-eslint/parser": "^6.0.0",
"@vitejs/plugin-react": "^4.0.4",
"eslint": "8.23.1",
"eslint-config-airbnb": "18.2.1",
"eslint-config-prettier": "8.5.0",
"eslint-config-react-app": "6.0.0",
"eslint-plugin-flowtype": "5.10.0",
"eslint-plugin-import": "2.25.4",
"eslint-plugin-jsx-a11y": "6.5.1",
"eslint-plugin-prettier": "4.2.1",
"eslint-plugin-react": "7.31.8",
"@babel/plugin-proposal-function-bind": "7.22.5",
"@babel/preset-env": "7.23.2",
"@babel/preset-react": "7.22.15",
"@vitejs/plugin-react": "4.1.0",
"eslint": "8.52.0",
"eslint-config-prettier": "9.0.0",
"eslint-plugin-prettier": "5.0.1",
"eslint-plugin-react": "7.33.2",
"eslint-plugin-react-hooks": "4.6.0",
"eslint-plugin-react-refresh": "^0.4.3",
"lint-staged": "11.2.0",
"prettier": "2.7.1",
"typescript": "^5.0.2",
"vite": "^4.4.5"
"prettier": "3.0.3",
"vite": "4.5.0"
},
"babel": {
"presets": [
Expand All @@ -80,5 +64,5 @@
"last 1 safari version"
]
},
"packageManager": "[email protected].0"
"packageManager": "[email protected].1"
}
69 changes: 7 additions & 62 deletions src/components/components/ComponentDatePicker.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import { Autocomplete, Checkbox, DatePicker, TextField, useSnackbar, useValidata
import { Grid } from '@mui/material';
import FormGroup from '@mui/material/FormGroup';
import ExampleUsageWrapper from '../ExampleUsageWrapper';
import { useEffect, useState } from 'react';
import { useState } from 'react';
import jsxToString from 'jsx-to-string';
import CurrentRulesInfo from '../CurrentRulesInfo';
import CurrentComponentApiInfo from '../CurrentComponentApiInfo';
Expand Down Expand Up @@ -40,19 +40,11 @@ const ComponentDatePicker = () => {
const [selectedRenderErrorMessage, setSelectedRenderErrorMessage] = useState(false);
const [enableUseValidatableForm, setEnableUseValidatableForm] = useState(false);
const [selectedFocusedLabel, setSelectedFocusedLabel] = useState(false);
const [disableMaskedInput, setDisableMaskedInput] = useState(false);
const [inputFormat, setInputFormat] = useState();
const [selectedRenderInputPropsManipulator, setSelectedRenderInputPropsManipulator] = useState(false);
const [format, setFormat] = useState();
const { setPathValue, setPathIsBlurred, getValue, getError } = useValidatableForm({
rules,
});

useEffect(() => {
if (inputFormat !== 'dd/MMM/yyyy') {
setSelectedRenderInputPropsManipulator(false);
}
}, [inputFormat]);

const handleChange = (newValue) => {
setValue(newValue);
};
Expand All @@ -61,21 +53,11 @@ const ComponentDatePicker = () => {
enqueueSnackbar('DatePicker is blurred', { variant: 'info' });
};

const renderInputPropsManipulator = (props) => {
let value = props.inputProps.value;
if (value) {
value = value.length === 2 && value[value.length - 1] !== '/' ? value + '/' : value;
value = value.length === 6 && value[value.length - 1] !== '/' ? value + '/' : value;
}
const newProps = { ...props, inputProps: { ...props.inputProps, value: value } };
return newProps;
};

const datePickerElementJsx = (
<DatePicker
label="DatePicker"
path="val"
inputFormat={inputFormat}
format={format}
placeholder={selectedPlaceholder ? PLACEHOLDER_TEXT : null}
value={!enableUseValidatableForm ? value : getValue('val')}
onChange={!enableUseValidatableForm ? handleChange : null}
Expand All @@ -91,8 +73,6 @@ const ComponentDatePicker = () => {
}}
renderErrorMessage={selectedRenderErrorMessage ? customErrorMessageRenderer : undefined}
focusedLabel={selectedFocusedLabel ? 'Focused DatePicker' : null}
disableMaskedInput={disableMaskedInput}
renderInputPropsManipulator={selectedRenderInputPropsManipulator ? renderInputPropsManipulator : undefined}
/>
);

Expand Down Expand Up @@ -218,37 +198,14 @@ const ComponentDatePicker = () => {
</Grid>
<Grid item xs={12} sm={6}>
<Autocomplete
value={inputFormat}
value={format}
options={INPUT_FORMAT_OPTIONS}
onChange={(val) => {
setInputFormat(val);
setFormat(val);
}}
label={'inputFormat'}
label={'format'}
/>
</Grid>
<Grid item xs={12} sm={6}>
<FormGroup>
<Checkbox
label={'disableMaskedInput'}
value={disableMaskedInput}
onChange={(newValue) => {
setDisableMaskedInput(newValue);
}}
/>
</FormGroup>
</Grid>
<Grid item xs={12} sm={6}>
<FormGroup>
<Checkbox
label={'renderInputPropsManipulator'}
value={selectedRenderInputPropsManipulator}
onChange={(newValue) => {
setSelectedRenderInputPropsManipulator(newValue);
}}
disabled={inputFormat !== 'dd/MMM/yyyy'}
/>
</FormGroup>
</Grid>
</Grid>
<CurrentRulesInfo currentRules={currentJsx} dontStringify={true} header="Current Jsx" />
<CurrentComponentApiInfo
Expand Down Expand Up @@ -360,7 +317,7 @@ const DateApiInfo = [
description: '',
},
{
name: 'inputFormat',
name: 'format',
type: 'String',
defaultValue: '',
description: (
Expand Down Expand Up @@ -389,22 +346,10 @@ const DateApiInfo = [
defaultValue: '',
description: '',
},
{
name: 'RenderInputComponent',
type: 'Object',
defaultValue: '',
description: '',
},
{
name: 'renderErrorMessage',
type: 'Func',
defaultValue: '',
description: '',
},
{
name: 'renderInputPropsManipulator',
type: 'Func',
defaultValue: '',
description: '',
},
];
2 changes: 1 addition & 1 deletion src/components/components/ComponentTextField.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -396,7 +396,7 @@ const TextFieldApiInfo = [
description: '',
},
{
name: 'limitClassNamew',
name: 'limitClassName',
type: 'String',
defaultValue: '',
description: '',
Expand Down
Loading

0 comments on commit e8b9934

Please sign in to comment.