Skip to content

Commit

Permalink
input bump progress 0.1.0;
Browse files Browse the repository at this point in the history
  • Loading branch information
elbakerino committed Nov 20, 2024
1 parent aa65965 commit ffa754b
Show file tree
Hide file tree
Showing 8 changed files with 38 additions and 3,322 deletions.
4 changes: 2 additions & 2 deletions apps/demo/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@
"@mui/lab": "^5.0.0-alpha.80",
"@mui/material": "^5.1",
"@mui/x-date-pickers": "^5.0.16",
"@ui-controls/progress": "~0.0.4",
"@ui-controls/progress": "~0.1.0-alpha.0",
"@ui-schema/dictionary": "~0.0.12",
"@ui-schema/ds-material": "~0.4.2",
"@ui-schema/kit-codemirror": "~0.2.0",
Expand All @@ -55,7 +55,7 @@
"react-dom": "^18.3.1",
"react-helmet": "^6.1.0",
"react-i18next": "^11.18.6",
"react-progress-state": "~0.3.2",
"react-progress-state": "~0.3.3",
"react-router": "^6.26.2",
"react-router-dom": "^6.26.2",
"react-use-immutable": "~0.2.1",
Expand Down
4 changes: 2 additions & 2 deletions apps/demo/src/components/ApiPing.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import Box from '@mui/material/Box'
import { config } from '../config'
import { useAppApi } from '../lib/useAppApi'
import { ButtonProgress } from '@ui-controls/progress/ButtonProgress'
import { ps, useProgress } from 'react-progress-state'
import { ps, useProgress } from 'react-progress-state/useProgressNext'
import { CustomCodeMirror } from './CustomCodeMirror'
import { json } from '@codemirror/lang-json'

Expand All @@ -30,7 +30,7 @@ export const ApiPing: React.ComponentType = () => {
const pid = startLoading()
fetch(config.API_HOST + '/ping')
.then(r => {
const isPid = setLoading(ps.done, undefined, pid)
const isPid = setLoading(ps.success, undefined, pid)
if(!isPid) return
setPing(r.data)
})
Expand Down
10 changes: 5 additions & 5 deletions apps/demo/src/pages/PageComplex.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import Helmet from 'react-helmet'
import { useTranslation } from 'react-i18next'
import Container from '@mui/material/Container'
import Grid2 from '@mui/material/Unstable_Grid2'
import { ps, useProgress } from 'react-progress-state'
import { ps, useProgress } from 'react-progress-state/useProgressNext'
import { useAppApi } from '../lib/useAppApi'
import { config } from '../config'
import LinearProgress from '@mui/material/LinearProgress'
Expand Down Expand Up @@ -36,7 +36,7 @@ export const PageComplex: React.ComponentType = () => {
const pid = startLoading()
fetch<{ files: { name: string }[] }>(config.API_HOST + '/contents')
.then((r) => {
const isPid = setLoading(ps.done, undefined, pid)
const isPid = setLoading(ps.success, undefined, pid)
if(!isPid) return
setContentList(r.data)
})
Expand All @@ -50,7 +50,7 @@ export const PageComplex: React.ComponentType = () => {
const pid = startLoadingDetails()
fetch<{}>(config.API_HOST + '/contents/' + contentId)
.then((r) => {
const isPid = setLoadingDetails(ps.done, undefined, pid)
const isPid = setLoadingDetails(ps.success, undefined, pid)
if(!isPid) return
setContentDetails(r.data)
})
Expand Down Expand Up @@ -106,8 +106,8 @@ export const PageComplex: React.ComponentType = () => {
</IconButtonProgress>
</Grid2>

{loading.progress === ps.start || loadingDetails.progress === ps.start ?
<LinearProgress/> : null}
{loading.progress === ps.loading || loadingDetails.progress === ps.loading ?
<LinearProgress sx={{width: '100%', mb: -0.5}}/> : null}

{loading.progress === ps.error ?
<Grid2 xs={12}>
Expand Down
10 changes: 0 additions & 10 deletions apps/demo/src/pages/PageInput.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ import useMediaQuery from '@mui/material/useMediaQuery'
import Button from '@mui/material/Button'
import IcVisibility from '@mui/icons-material/Visibility'
import IcVisibilityOff from '@mui/icons-material/VisibilityOff'
import IcConvert from '@mui/icons-material/SyncAlt'
import { useTheme } from '@mui/material/styles'
import React, { useState } from 'react'
import Helmet from 'react-helmet'
Expand Down Expand Up @@ -125,15 +124,6 @@ export const PageInput: React.ComponentType = () => {
setAutoProcess={setAutoProcess}
onReformat={stringify ? () => setValue(stringify?.() || '') : undefined}
/>
<Button
startIcon={<IcConvert/>}
disabled={!stringify}
onClick={() => setValue(stringify?.() || '')}
variant={'outlined'} size={'small'}
sx={{mt: 2, mb: 1, ml: 1}}
>
{'reformat'}
</Button>
</Grid2>
<Grid2
xs={12} md={6}
Expand Down
6 changes: 3 additions & 3 deletions apps/sandbox/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
"@codemirror/search": "^6.0.0",
"@codemirror/state": "^6.0.0",
"@codemirror/view": "^6.0.0",
"@content-ui/input": "^0.1.4",
"@content-ui/input": "^0.1.5",
"@content-ui/md": "^0.0.11",
"@content-ui/md-mui": "^0.1.4",
"@content-ui/react": "^0.1.3",
Expand All @@ -38,15 +38,15 @@
"@mui/icons-material": "^5.10",
"@mui/lab": "^5.0.0-alpha.80",
"@mui/material": "^5.1",
"@ui-controls/progress": "~0.0.4",
"@ui-controls/progress": "~0.1.0-alpha.0",
"@ui-schema/ds-material": "~0.4.2",
"@ui-schema/kit-codemirror": "~0.2.0",
"@ui-schema/material-code": "~0.4.6",
"@ui-schema/ui-schema": "~0.4.6",
"cross-env": "^7.0.3",
"react": "^18.3.1",
"react-dom": "^18.3.1",
"react-progress-state": "~0.3.2",
"react-progress-state": "~0.3.3",
"react-router": "^6.3.0",
"react-router-dom": "^6.3.0",
"vfile": "^6.0.2",
Expand Down
Loading

0 comments on commit ffa754b

Please sign in to comment.