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 (
-
+ );
}
-
-storiesOf('Add RDF', module)
-.add('form', () => (
-
- ));
\ No newline at end of file
+}
+
+storiesOf('Add RDF', module).add('form', () => );
diff --git a/src/components/App2.stories.js b/src/components/App2.stories.js
index 59efb0ff9..ef16d3f6f 100644
--- a/src/components/App2.stories.js
+++ b/src/components/App2.stories.js
@@ -1,8 +1,6 @@
import { storiesOf } from '@storybook/react';
-import React from 'react'
-import {
- Layout, Menu, Breadcrumb, Button, Dropdown, Icon, Checkbox, Input, Table
-} from 'antd';
+import React from 'react';
+import { Layout, Menu, Breadcrumb, Button, Dropdown, Icon, Checkbox, Input, Table } from 'antd';
import 'antd/dist/antd.css';
const { Header, Content, Sider } = Layout;
@@ -10,85 +8,103 @@ const MenuItemGroup = Menu.ItemGroup;
const SubMenu = Menu.SubMenu;
const menu2 = (
-
- All
- 10
- 50
- 100
- 200
-
+
+
+
+ All
+
+
+
+ 10
+
+
+
+ 50
+
+
+
+ 100
+
+
+
+ 200
+
+
);
-const columns = [{
- title: 'Subject',
- dataIndex: 'name_1',
- render: text => {text} ,
-}, {
- title: 'Predicate',
- dataIndex: 'name_2',
- render: text => {text} ,
-}, {
- title: 'Object',
- dataIndex: 'name_3',
- render: text => {text} ,
-}, {
- title: 'Context',
- dataIndex: 'name_4',
- render: text => {text} ,
-}
+const columns = [
+ {
+ title: 'Subject',
+ dataIndex: 'name_1',
+ render: (text) => {text} ,
+ },
+ {
+ title: 'Predicate',
+ dataIndex: 'name_2',
+ render: (text) => {text} ,
+ },
+ {
+ title: 'Object',
+ dataIndex: 'name_3',
+ render: (text) => {text} ,
+ },
+ {
+ title: 'Context',
+ dataIndex: 'name_4',
+ render: (text) => {text} ,
+ },
];
const data = [];
for (let i = 0; i < 100; i++) {
data.push({
key: i,
- name_1: `reqs-collection:567Rno8wjrwxiXoozHsFva${i}`,
- name_2: `rdf:type${i}`,
- name_3: `folders:folder1${i}`,
- name_4: ``
+ name_1: `reqs-collection:567Rno8wjrwxiXoozHsFva${i}`,
+ name_2: `rdf:type${i}`,
+ name_3: `folders:folder1${i}`,
+ name_4: ``,
});
}
class Explore extends React.Component {
- render() {
- return (
-
-
-
-
- Explore
-
-
- Show data types & language tags
+ render() {
+ return (
+
+
+
+
+ Explore
+
-
+ Show data types & language tags
-
+
+
-
- 100
-
+
+
+
+ 100
+
+
+
-
- Previous 100
- Next 100
-
+
+ Previous 100
+ Next 100
+
-
-
-
-
-
-
- );
- }
+
+
+
+
+
+ );
+ }
}
-storiesOf('Issue #5', module)
- .add('Explore', () => (
-
- ))
-
-
+storiesOf('Issue #5', module).add('Explore', () => );
diff --git a/src/components/ContextInRepository.stories.js b/src/components/ContextInRepository.stories.js
index d5e68bcaf..46fb821a5 100644
--- a/src/components/ContextInRepository.stories.js
+++ b/src/components/ContextInRepository.stories.js
@@ -2,66 +2,72 @@ import React from 'react';
import { storiesOf } from '@storybook/react';
import { Table } from 'antd';
-
-const urlTemplate = "https://agentlab.ru/rdf4j-workbench/repositories/reqs/explore?resource=";
+const urlTemplate = 'https://agentlab.ru/rdf4j-workbench/repositories/reqs/explore?resource=';
function constUrlHref(url, template = urlTemplate) {
return `${urlTemplate}${url}`;
}
-const dataSource = [{
+const dataSource = [
+ {
key: '1',
context: 'oslc:',
- url: 'oslc%3A'
- }, {
+ url: 'oslc%3A',
+ },
+ {
key: '2',
context: 'al_rm:',
- url: 'al_rm%3A'
- }, {
+ url: 'al_rm%3A',
+ },
+ {
key: '3',
context: 'oslc_rm:',
- url: 'oslc_rm%3A'
- }, {
+ url: 'oslc_rm%3A',
+ },
+ {
key: '4',
context: '',
- url: '%3Chttps%3A%2F%2Fagentlab.ru%2Fexpert%2Frm%2Fexpert%2Fmain-reqs%23%3E'
- }, {
+ url: '%3Chttps%3A%2F%2Fagentlab.ru%2Fexpert%2Frm%2Fexpert%2Fmain-reqs%23%3E',
+ },
+ {
key: '5',
context: 'expert_reqs:',
- url: 'expert_reqs%3A'
- }, {
+ url: 'expert_reqs%3A',
+ },
+ {
key: '6',
context: '',
- url: '%3Chttp%3A%2F%2Fagentlab.ru%2Fexpert%2Frm%2Fexpert%2Freqs%23%3E'
- }, {
+ url: '%3Chttp%3A%2F%2Fagentlab.ru%2Fexpert%2Frm%2Fexpert%2Freqs%23%3E',
+ },
+ {
key: '7',
context: '',
- url: '%3Chttps%3A%2F%2Fagentlab.ru%2Fexpert%2Frm%2Fexpert%2Freqs-collection%23%3E'
- }, {
+ url: '%3Chttps%3A%2F%2Fagentlab.ru%2Fexpert%2Frm%2Fexpert%2Freqs-collection%23%3E',
+ },
+ {
key: '8',
context: '',
- url: '%3Chttps%3A%2F%2Fagentlab.ru%2Fexpert%2Frm%2Fexpert%2Freqs-module%23%3E'
- }, {
+ url: '%3Chttps%3A%2F%2Fagentlab.ru%2Fexpert%2Frm%2Fexpert%2Freqs-module%23%3E',
+ },
+ {
key: '9',
context: '',
- url: '%3Chttps%3A%2F%2Fagentlab.ru%2Fexpert%2Frm%2Fexpert%2Freqs-module-docx%23%3E'
- }, {
+ url: '%3Chttps%3A%2F%2Fagentlab.ru%2Fexpert%2Frm%2Fexpert%2Freqs-module-docx%23%3E',
+ },
+ {
key: '10',
context: '',
- url: '%3Chttps%3A%2F%2Fagentlab.ru%2Fexpert%2Frm%2Fexpert%2Freqs-module-docx-big%23%3E'
- }];
-
+ url: '%3Chttps%3A%2F%2Fagentlab.ru%2Fexpert%2Frm%2Fexpert%2Freqs-module-docx-big%23%3E',
+ },
+];
-const columns = [{
+const columns = [
+ {
title: 'Context',
dataIndex: 'context',
key: 'context',
render: (text, record) => {record.context} ,
- }];
-
-
-storiesOf('Contexts in Repository', module)
- .add('Context', () => (
-
- ));
+ },
+];
+storiesOf('Contexts in Repository', module).add('Context', () => );
diff --git a/src/components/Controls.stories.js b/src/components/Controls.stories.js
index 8b1c0efc0..b6f8d3eb5 100755
--- a/src/components/Controls.stories.js
+++ b/src/components/Controls.stories.js
@@ -2,91 +2,102 @@ import React, { useEffect, useState } from 'react';
import { storiesOf } from '@storybook/react';
import { useTranslation } from 'react-i18next';
-import ElementsTreeAndDetailsTable from "./ElementsTreeAndDetailsTable";
-import {ElementsTreeAndDetailsTableContext} from "./ElementsTreeAndDetailsTableContext";
-import {ElementsTreeAndDetailsTableContextProvider} from "./ElementsTreeAndDetailsTableContextProvider";
+import ElementsTreeAndDetailsTable from './ElementsTreeAndDetailsTable';
+import { ElementsTreeAndDetailsTableContext } from './ElementsTreeAndDetailsTableContext';
+import { ElementsTreeAndDetailsTableContextProvider } from './ElementsTreeAndDetailsTableContextProvider';
-const elementsTreeData = [{
- title: '0-0',
- key: '0-0',
- children: [{
- title: '0-0-0',
- key: '0-0-0',
+const elementsTreeData = [
+ {
+ title: '0-0',
+ key: '0-0',
children: [
- { title: '0-0-0-0', key: '0-0-0-0' },
- { title: '0-0-0-1', key: '0-0-0-1' },
- { title: '0-0-0-2', key: '0-0-0-2' },
+ {
+ title: '0-0-0',
+ key: '0-0-0',
+ children: [
+ { title: '0-0-0-0', key: '0-0-0-0' },
+ { title: '0-0-0-1', key: '0-0-0-1' },
+ { title: '0-0-0-2', key: '0-0-0-2' },
+ ],
+ },
+ {
+ title: '0-0-1',
+ key: '0-0-1',
+ children: [
+ { title: '0-0-1-0', key: '0-0-1-0' },
+ { title: '0-0-1-1', key: '0-0-1-1' },
+ { title: '0-0-1-2', key: '0-0-1-2' },
+ ],
+ },
+ {
+ title: '0-0-2',
+ key: '0-0-2',
+ },
],
- }, {
- title: '0-0-1',
- key: '0-0-1',
+ },
+ {
+ title: '0-1',
+ key: '0-1',
children: [
- { title: '0-0-1-0', key: '0-0-1-0' },
- { title: '0-0-1-1', key: '0-0-1-1' },
- { title: '0-0-1-2', key: '0-0-1-2' },
+ { title: '0-1-0-0', key: '0-1-0-0' },
+ { title: '0-1-0-1', key: '0-1-0-1' },
+ { title: '0-1-0-2', key: '0-1-0-2' },
],
- }, {
- title: '0-0-2',
- key: '0-0-2',
- }],
-}, {
- title: '0-1',
- key: '0-1',
- children: [
- { title: '0-1-0-0', key: '0-1-0-0' },
- { title: '0-1-0-1', key: '0-1-0-1' },
- { title: '0-1-0-2', key: '0-1-0-2' },
- ],
-}, {
- title: '0-2',
- key: '0-2',
-}];
+ },
+ {
+ title: '0-2',
+ key: '0-2',
+ },
+];
-const detailsColumns = [{
- title: 'Имя',
- dataIndex: 'name',
- key: 'name',
- render: text => {text} ,
-}, {
- title: 'Тип данных',
- dataIndex: 'dataType',
- key: 'dataType',
-}, {
- title: 'Описание',
- dataIndex: 'description',
- key: 'description',
-}];
+const detailsColumns = [
+ {
+ title: 'Имя',
+ dataIndex: 'name',
+ key: 'name',
+ render: (text) => {text} ,
+ },
+ {
+ title: 'Тип данных',
+ dataIndex: 'dataType',
+ key: 'dataType',
+ },
+ {
+ title: 'Описание',
+ dataIndex: 'description',
+ key: 'description',
+ },
+];
-const detailsData = [{
- key: '1',
- name: 'Приоритет',
- dataType: 'число',
- description: 'Приоритет требования',
-}, {
- key: '2',
- name: 'Риск',
- dataType: 'число',
- description: 'Риск требования',
-}];
+const detailsData = [
+ {
+ key: '1',
+ name: 'Приоритет',
+ dataType: 'число',
+ description: 'Приоритет требования',
+ },
+ {
+ key: '2',
+ name: 'Риск',
+ dataType: 'число',
+ description: 'Риск требования',
+ },
+];
const expandedKeys = [];
-
// в отдельной функции маппинг изменения одного компонента на изменение состояния другого
-const detailsQuery =
-`SELECT ?pred ?obj
+const detailsQuery = `SELECT ?pred ?obj
WHERE {
<###> ?pred ?obj
}`;
-
-
storiesOf('Редактор атрибутов классов', module)
-// .add('Без данных', () => ) // эта штука без контекста не работает и не факт, что должна
- .add('С корректными данными иерархии классов', () =>
+ // .add('Без данных', () => ) // эта штука без контекста не работает и не факт, что должна
+ .add('С корректными данными иерархии классов', () => (
PREFIX rdfs:
PREFIX oslc:
@@ -101,26 +112,31 @@ storiesOf('Редактор атрибутов классов', module)
}
}`}
detailsQuery={detailsQuery}
- detailsColumns={[{
- title: 'Параметр',
- dataIndex: 'pred',
- key: 'pred',
- }, {
- title: 'Значение',
- dataIndex: 'obj',
- key: 'obj',
- }]}
- rootElement={[{
- title: 'Class',
- key: 'rdfs:Class',
- children: [{}]
- }]} >
-
+ detailsColumns={[
+ {
+ title: 'Параметр',
+ dataIndex: 'pred',
+ key: 'pred',
+ },
+ {
+ title: 'Значение',
+ dataIndex: 'obj',
+ key: 'obj',
+ },
+ ]}
+ rootElement={[
+ {
+ title: 'Class',
+ key: 'rdfs:Class',
+ children: [{}],
+ },
+ ]}>
+
- )
- .add('С корректными данными иерархии свойств', () =>
+ ))
+ .add('С корректными данными иерархии свойств', () => (
PREFIX rdfs:
PREFIX oslc:
@@ -134,23 +150,29 @@ storiesOf('Редактор атрибутов классов', module)
}
}`}
detailsQuery={detailsQuery}
- detailsColumns={[{
- title: 'Параметр',
- dataIndex: 'pred',
- key: 'pred',
- }, {
- title: 'Значение',
- dataIndex: 'obj',
- key: 'obj',
- }]}
- rootElement={[{
- title: 'Property',
- key: 'rdfs:Property',
- children: [{}]
- }]} >
-
+ detailsColumns={[
+ {
+ title: 'Параметр',
+ dataIndex: 'pred',
+ key: 'pred',
+ },
+ {
+ title: 'Значение',
+ dataIndex: 'obj',
+ key: 'obj',
+ },
+ ]}
+ rootElement={[
+ {
+ title: 'Property',
+ key: 'rdfs:Property',
+ children: [{}],
+ },
+ ]}>
+
- );
+ ));
diff --git a/src/components/DeleteRepository.stories.js b/src/components/DeleteRepository.stories.js
index 3c0e0e4c9..659ed7aac 100644
--- a/src/components/DeleteRepository.stories.js
+++ b/src/components/DeleteRepository.stories.js
@@ -1,103 +1,100 @@
-import React from "react";
-import { storiesOf } from "@storybook/react";
-import { Form, Select, Button } from "antd";
+import React from 'react';
+import { storiesOf } from '@storybook/react';
+import { Form, Select, Button } from 'antd';
const Option = Select.Option;
const FormItem = Form.Item;
const options = [
{
- value: "adms-catalog",
- text: "adms-catalog - ADMS Catalog"
+ value: 'adms-catalog',
+ text: 'adms-catalog - ADMS Catalog',
},
{
- value: "reqs",
- text: "reqs - Requirements"
+ value: 'reqs',
+ text: 'reqs - Requirements',
},
{
- value: "jhgf",
- text: "jhgf - jh"
+ value: 'jhgf',
+ text: 'jhgf - jh',
},
{
- value: "configurations",
- text: "configurations - Portal Configurations"
+ value: 'configurations',
+ text: 'configurations - Portal Configurations',
},
{
- value: "adms-catalog",
- text: "adms-catalog - ADMS Catalog"
+ value: 'adms-catalog',
+ text: 'adms-catalog - ADMS Catalog',
},
{
- value: "eurovoc_ru",
- text: "eurovoc_ru - EuroVoc (russian edition) in SKOS Core Concepts"
+ value: 'eurovoc_ru',
+ text: 'eurovoc_ru - EuroVoc (russian edition) in SKOS Core Concepts',
},
{
- value: "onem2m",
- text: "onem2m - OneM2M IoT Repository"
+ value: 'onem2m',
+ text: 'onem2m - OneM2M IoT Repository',
},
{
- value: "onem2m2",
- text: "onem2m2 - OneM2M IoT Repository"
+ value: 'onem2m2',
+ text: 'onem2m2 - OneM2M IoT Repository',
},
{
- value: "datasets",
- text: "datasets - Datasets configuration fot portal"
+ value: 'datasets',
+ text: 'datasets - Datasets configuration fot portal',
},
{
- value: "23",
- text: "23 - Native store with RDF Schema and direct type inferencing"
+ value: '23',
+ text: '23 - Native store with RDF Schema and direct type inferencing',
},
{
- value: "mappings",
- text: "mappings - Portal CVS Mappings"
+ value: 'mappings',
+ text: 'mappings - Portal CVS Mappings',
},
{
- value: "adms3",
- text: "adms3 - Native store with RDF Schema and direct type inferencing"
+ value: 'adms3',
+ text: 'adms3 - Native store with RDF Schema and direct type inferencing',
},
{
- value: "adms4",
- text: "adms4 - ADMS 4 Native Java"
+ value: 'adms4',
+ text: 'adms4 - ADMS 4 Native Java',
},
{
- value: "users",
- text: "users - Portal Users"
+ value: 'users',
+ text: 'users - Portal Users',
},
{
- value: "eurovoc_core",
- text: "eurovoc_core - EuroVoc in SKOS Core Concepts"
+ value: 'eurovoc_core',
+ text: 'eurovoc_core - EuroVoc in SKOS Core Concepts',
},
{
- value: "rere",
- text: "rere - test_feature"
+ value: 'rere',
+ text: 'rere - test_feature',
},
{
- value: "lov",
- text: "lov - Linked Open Vocabularies"
+ value: 'lov',
+ text: 'lov - Linked Open Vocabularies',
},
{
- value: "adms2",
- text: "adms2 - ADMS 2.01 Catalog"
- }
+ value: 'adms2',
+ text: 'adms2 - ADMS 2.01 Catalog',
+ },
];
-storiesOf("Delete Repository", module).add("Select", () => (
+storiesOf('Delete Repository', module).add('Select', () => (