From 12c0f40657d7f14ad75074446f736f96daeaca77 Mon Sep 17 00:00:00 2001 From: Alex Ivanov Date: Wed, 24 Apr 2019 12:24:05 +0300 Subject: [PATCH] =?UTF-8?q?=D0=9E=D1=82=D1=84=D0=BE=D1=80=D0=BC=D0=B0?= =?UTF-8?q?=D1=82=D0=B8=D1=80=D0=BE=D0=B2=D0=B0=D0=BD=20=D0=B2=D0=B5=D1=81?= =?UTF-8?q?=D1=8C=20=D0=BA=D0=BE=D0=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .storybook/config.js | 25 +- src/App.js | 93 ++-- src/components/AddRDF.stories.js | 165 +++--- src/components/App2.stories.js | 150 ++--- src/components/ContextInRepository.stories.js | 70 +-- src/components/Controls.stories.js | 230 ++++---- src/components/DeleteRepository.stories.js | 91 ++- src/components/ElementsTreeAndDetailsTable.js | 97 ++-- ...mentsTreeAndDetailsTableContextProvider.js | 168 +++--- src/components/Explore.stories.js | 183 +++--- src/components/ExportRepository.stories.js | 225 ++++---- src/components/Hello.stories.js | 181 +++--- src/components/Lab1_Sobolev.stories.js | 523 ++++++++---------- src/components/RemoveStatements.stories.js | 30 +- src/components/Summary.stories.js | 71 +-- src/components/SystemInformation.stories.js | 41 +- .../TableColumnsCustomization.stories.js | 523 ++++++++---------- src/components/newRepository.stories.js | 134 +++-- src/i18n.js | 10 +- src/i18n/NamespacesinRepository.stories.js | 87 +-- src/i18n/en/translation.js | 4 +- src/i18n/ru/translation.js | 2 +- src/index.js | 26 +- 23 files changed, 1524 insertions(+), 1605 deletions(-) diff --git a/.storybook/config.js b/.storybook/config.js index bc3c57f25..893226c27 100755 --- a/.storybook/config.js +++ b/.storybook/config.js @@ -1,6 +1,6 @@ import { configure, addDecorator, addParameters } from '@storybook/react'; import { withNotes } from '@storybook/addon-notes'; -import { withInfo } from "@storybook/addon-info"; +import { withInfo } from '@storybook/addon-info'; import { withOptions } from '@storybook/addon-options'; import requireContext from 'require-context.macro'; import { withI18next } from 'storybook-addon-i18next'; @@ -17,10 +17,10 @@ addDecorator( inline: true, source: true, propTables: false, - }) + }), ); -addParameters ({ +addParameters({ options: { /** * name to display in the top left corner @@ -98,19 +98,20 @@ addParameters ({ }, }); -addDecorator(withI18next({ - i18n, - languages: { - en: 'English', - ru: 'Русский', - } -})); - +addDecorator( + withI18next({ + i18n, + languages: { + en: 'English', + ru: 'Русский', + }, + }), +); const req = requireContext('../src', true, /\.stories\.js$/); function loadStories() { - req.keys().forEach(filename => req(filename)); + req.keys().forEach((filename) => req(filename)); } configure(loadStories, module); diff --git a/src/App.js b/src/App.js index e8b39aca1..88a824b26 100755 --- a/src/App.js +++ b/src/App.js @@ -1,60 +1,55 @@ -import React from 'react' +import React from 'react'; //import {Col, Row} from "antd"; -import { - Layout, Menu, Breadcrumb, Icon, -} from 'antd'; +import { Layout, Menu, Breadcrumb, Icon } from 'antd'; -import ClassTreeView from './ClassTreeView' -import PropertyEditor from './PropertyEditor' +import ClassTreeView from './ClassTreeView'; +import PropertyEditor from './PropertyEditor'; const { Header, Content, Sider } = Layout; const { SubMenu } = Menu; const App = () => { - return ( - -
- {/* + return ( + +
+ {/* // TODO : left side navigation menu */} -
- - nav 1 - nav 2 - nav 3 - -
- - - - - - - Home - List - App - - - - - - -
- ); +
+ + nav 1 + nav 2 + nav 3 + +
+ + + + + + + Home + List + App + + + + + + +
+ ); }; -export default App +export default App; diff --git a/src/components/AddRDF.stories.js b/src/components/AddRDF.stories.js index 2c6213b2e..de30c0610 100755 --- a/src/components/AddRDF.stories.js +++ b/src/components/AddRDF.stories.js @@ -1,107 +1,82 @@ import React from 'react'; import { storiesOf } from '@storybook/react'; -import { Form, Input, Button, Upload, Checkbox,Select, Radio, Layout, Icon } from 'antd'; - +import { Form, Input, Button, Upload, Checkbox, Select, Radio, Layout, Icon } from 'antd'; - const { TextArea } = Input; - - class AddRDFForm extends React.Component { - constructor() { - super(); - this.state = { - formLayout: 'horizontal', - }; } +const { TextArea } = Input; - handleFormLayoutChange = (e) => { - this.setState({ formLayout: e.target.value }); - } +class AddRDFForm extends React.Component { + constructor() { + super(); + this.state = { + formLayout: 'horizontal', + }; + } - render() { - const { formLayout } = this.state; - const formItemLayout = { - labelCol: { span: 4 }, - wrapperCol: { span: 14 }, - } ; + handleFormLayoutChange = (e) => { + this.setState({ formLayout: e.target.value }); + }; - return ( -
-
- - - - use base URI as context identifier - - + render() { + const { formLayout } = this.state; + const formItemLayout = { + labelCol: { span: 4 }, + wrapperCol: { span: 14 }, + }; - - - + return ( +
+ + + + + use base URI as context identifier + + - - - - Location of the RDF data you wish to upload - - + + + - - - - - Select the file containing the RDF data you wish to - upload - - - + + + + Location of the RDF data you wish to upload + + - - { - - - - } - Enter the RDF data you wish to upload - + + + + Select the file containing the RDF data you wish to upload + + - - - - - - - - Result per page: - - - - - - - - Actions Options: - - - Include inferred statements - - - Save privately(do not share) - - - - - Actions: - - -
- - - - -
- - - - - -

- - Copyright © 2015 Eclipse RDF4J Contributors - -

-
- - )); \ No newline at end of file +

+ + Copyright © 2015 Eclipse RDF4J Contributors + +

+
+)); diff --git a/src/components/Lab1_Sobolev.stories.js b/src/components/Lab1_Sobolev.stories.js index c03b5265b..32b7ee2b2 100755 --- a/src/components/Lab1_Sobolev.stories.js +++ b/src/components/Lab1_Sobolev.stories.js @@ -1,337 +1,306 @@ import React from 'react'; import { storiesOf } from '@storybook/react'; import { StyleSheet, css } from 'aphrodite'; -import { - Form, Icon, Input, Button, Checkbox, - Select, Menu, Layout, Row, Col, InputNumber -} from 'antd'; +import { Form, Icon, Input, Button, Checkbox, Select, Menu, Layout, Row, Col, InputNumber } from 'antd'; const { Content, Sider } = Layout; var requirements = { - 'URL':'border', - 'xsdtype':'border', - 'Альтернативные варианты написания':'interation', - 'Вид':'border', - 'Включает':'disconnect', - 'Включен в':'disconnect', - 'Данные процесса':'border', - 'Длина':'border', - 'Дочерний объект для':'disconnect', - 'Требование 10':'border', - 'Требование 11':'border', - 'Требование 12':'border', - 'Требование 13':'disconnect', - 'Требование 14':'border', - 'Требование 15':'border', - 'Требование 16':'disconnect', - 'Требование 17':'disconnect', - 'Требование 18':'border', - 'Требование 19':'disconnect', - 'Требование 20':'border', - 'Требование 21':'border', - 'Требование 22':'disconnect', - 'Требование 23':'border', - 'Требование 24':'interationr', - 'Требование 25':'interation', - 'Требование 26':'border', - 'Требование 27':'interation', - 'Требование 28':'border', + URL: 'border', + xsdtype: 'border', + 'Альтернативные варианты написания': 'interation', + Вид: 'border', + Включает: 'disconnect', + 'Включен в': 'disconnect', + 'Данные процесса': 'border', + Длина: 'border', + 'Дочерний объект для': 'disconnect', + 'Требование 10': 'border', + 'Требование 11': 'border', + 'Требование 12': 'border', + 'Требование 13': 'disconnect', + 'Требование 14': 'border', + 'Требование 15': 'border', + 'Требование 16': 'disconnect', + 'Требование 17': 'disconnect', + 'Требование 18': 'border', + 'Требование 19': 'disconnect', + 'Требование 20': 'border', + 'Требование 21': 'border', + 'Требование 22': 'disconnect', + 'Требование 23': 'border', + 'Требование 24': 'interationr', + 'Требование 25': 'interation', + 'Требование 26': 'border', + 'Требование 27': 'interation', + 'Требование 28': 'border', }; - const styles = StyleSheet.create({ - scroll_container:{height: 400, width: '100%', border:'2px solid gray', overflowY:'auto', display:'block', }, - widthn:{width:'92%', }, - column:{display:'inline-flex',flexDirection: 'column',width:'98%', align:'center'}, - blue:{color:'rgba(177,208,250)'}, - orange:{color:'orange'}, - gray:{color:'gray'}, - shadowtext: {textShadow: '10px 10px 20px black'}, - size16:{fontSize:'16pt'}, - formcolor:{background:'#FFFFEF'}, - formcolor_padding:{background:'#FFFFEF', padding:'0 3'}, - menuStyle:{color: 'black', fontWeight:'bold', background: 'linear-gradient(0deg, rgba(177,208,250,1) 0%, rgba(248,248,251,1) 100%)'}, - content1:{width:'18%'}, - content2:{width:'70%'}, - content3:{width:'25%', height:'100%'}, - sel:{backgroundColor:'linear-gradient(180deg, rgba(177,208,250,1) 0%, rgba(248,248,251,1) 100%)', fontSize:'16pt'}, - border1:{border:'3px solid rgba(177,208,250,1)'}, - border2:{border:'2px solid gray'}, - center:{textAlign:'center'}, + scroll_container: { height: 400, width: '100%', border: '2px solid gray', overflowY: 'auto', display: 'block' }, + widthn: { width: '92%' }, + column: { display: 'inline-flex', flexDirection: 'column', width: '98%', align: 'center' }, + blue: { color: 'rgba(177,208,250)' }, + orange: { color: 'orange' }, + gray: { color: 'gray' }, + shadowtext: { textShadow: '10px 10px 20px black' }, + size16: { fontSize: '16pt' }, + formcolor: { background: '#FFFFEF' }, + formcolor_padding: { background: '#FFFFEF', padding: '0 3' }, + menuStyle: { + color: 'black', + fontWeight: 'bold', + background: 'linear-gradient(0deg, rgba(177,208,250,1) 0%, rgba(248,248,251,1) 100%)', + }, + content1: { width: '18%' }, + content2: { width: '70%' }, + content3: { width: '25%', height: '100%' }, + sel: { + backgroundColor: 'linear-gradient(180deg, rgba(177,208,250,1) 0%, rgba(248,248,251,1) 100%)', + fontSize: '16pt', + }, + border1: { border: '3px solid rgba(177,208,250,1)' }, + border2: { border: '2px solid gray' }, + center: { textAlign: 'center' }, }); - -const mySelect=[], container=[]; +const mySelect = [], + container = []; for (var requirement in requirements) { - mySelect.push(); - if(requirements[requirement]=='disconnect') - container.push(
{requirement}
); - - else if (requirements[requirement]=='interation') - container.push(
{requirement}
); - - else container.push(
{requirement}
); + if (requirements[requirement] == 'disconnect') + container.push( +
+ {' '} + {requirement} +
, + ); + else if (requirements[requirement] == 'interation') + container.push( +
+ {' '} + {requirement} +
, + ); + else + container.push( +
+ {' '} + {requirement} +
, + ); } - - -class AdvancedSearchForm extends React.Component { - - render() { - +class AdvancedSearchForm extends React.Component { + render() { return ( - - - - - - - - - - - - - - - - - Изменить параметры отображения столбцов - - - - ✖ - - - - - - - - - - - - -
- -
Выберите тип требований или ссылок
- -
-
- - - -
- -
- - - - -
-
-
- - - - - - - - -
Выберите типы требований...
- -
{container}
- -
-
- - - - -
- -
- - - -
- -



- - - -
-
- - - - - - - - Отображаемые столбцы - - Ширина (пи... - - Форматирование - - - -
- - ИД - - - -   - - - - Имя - - - -   - - - - Тип требования - - - -   - - - - Кем изменено + + + + + + + + + Изменить параметры отображения столбцов + + ✖ + + + + + + + + + +
+
Выберите тип требований или ссылок
+
+
+ + +
+ +
+ + +
+
+
+ + + + +
Выберите типы требований...
+ +
{container}
+
+
- + + +
-   -
+
+ - - Входит в состав + +
- +
+
+
+
-   - + + + - - Изменено + + + + Отображаемые столбцы - + Ширина (пи... -   - - + Форматирование + - -   - +
+ + ИД - -   - + + + - -   - +   + - -   - + + Имя -
- - + + + +   + - + + + Тип требования + - -
+ + + -
- - - - - +   + -
-
- -
+ + Кем изменено - + + + +   + - - - - + + Входит в состав + + + - - - +   + - Показывать только атрибуты по умолчанию ( - ) - - + + Изменено - - - - - - - - - + + + -   +   + - - - - - - + +   + + +   + - + +   + + +   + +
+
+
+ + +
-
+
+ + + +
- + + + + + + + + + Показывать только атрибуты по умолчанию ( + ) + + + + + + + +   + + + + + + + + ); } } - const WrappedAdvancedSearchForm = Form.create({ name: 'normal_login' })(AdvancedSearchForm); -storiesOf('Table Columns Customization', module) - .add('with form', () => ( - Table Columns Customization - )) +storiesOf('Table Columns Customization', module).add('with form', () => ( + Table Columns Customization +)); diff --git a/src/components/RemoveStatements.stories.js b/src/components/RemoveStatements.stories.js index 49cefd3a4..c2d989cb8 100644 --- a/src/components/RemoveStatements.stories.js +++ b/src/components/RemoveStatements.stories.js @@ -1,8 +1,8 @@ -import { storiesOf } from "@storybook/react"; -import React from "react"; -import "antd/dist/antd.css"; -import { Form, Input, Button, Badge } from "antd"; -import FormItem from "antd/lib/form/FormItem"; +import { storiesOf } from '@storybook/react'; +import React from 'react'; +import 'antd/dist/antd.css'; +import { Form, Input, Button, Badge } from 'antd'; +import FormItem from 'antd/lib/form/FormItem'; const { TextArea } = Input; @@ -10,11 +10,11 @@ class FormRemoveStatements extends React.Component { constructor() { super(); this.state = { - formLayout: "horizontal" + formLayout: 'horizontal', }; } - handleFormLayoutChange = e => { + handleFormLayoutChange = (e) => { this.setState({ formLayout: e.target.value }); }; @@ -22,29 +22,29 @@ class FormRemoveStatements extends React.Component { const { formLayout } = this.state; const formItemLayout = { labelCol: { span: 4 }, - wrapperCol: { span: 14 } + wrapperCol: { span: 14 }, }; return (
- + - + - +