Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
open-source
SemWeb
libview
Commits
dba67c4a8bcf
Commit
f5e5b1bd
authored
Jul 17, 2018
by
Laurent Wouters
Browse files
Factorizing common API
parent
bf8fc6026190
Changes
12
Hide whitespace changes
Inline
Side-by-side
src/background/
register
.d.ts
→
src/background/
fallback
.d.ts
View file @
dba67c4a
...
...
@@ -22,7 +22,7 @@
* Externalise some regitration to JS because the typescript version is faulty
*/
declare
module
"
register
"
{
declare
module
"
fallback
"
{
/**
* Registers some navigation events
* @param onBeforeNavigate Event after tab navigation occurred
...
...
src/background/
register
.js
→
src/background/
fallback
.js
View file @
dba67c4a
File moved
src/background/main.ts
View file @
dba67c4a
...
...
@@ -29,9 +29,9 @@ import {
DataSource
,
tryNegotiateData
,
MimeInfo
}
from
"
../common/
api
"
;
/// <reference path="./
register
.d.ts"/>
let
F
=
require
(
"
./
register
"
);
}
from
"
../common/
data
"
;
/// <reference path="./
fallback
.d.ts"/>
let
F
=
require
(
"
./
fallback
"
);
import
"
chrome
"
;
/**
...
...
src/co
ntent/framework/interface
.ts
→
src/co
mmon/application
.ts
View file @
dba67c4a
...
...
@@ -18,7 +18,7 @@
* with CubicWeb. If not, see <http://www.gnu.org/licenses/>.
******************************************************************************/
/// <reference path=".
./../common
/rdflib-interface.d.ts"/>
/// <reference path="./rdflib-interface.d.ts"/>
import
{
RdfStore
}
from
"
rdflib
"
;
/**
...
...
src/common/
api
.ts
→
src/common/
data
.ts
View file @
dba67c4a
File moved
src/common/rdf.ts
View file @
dba67c4a
...
...
@@ -18,7 +18,7 @@
* with CubicWeb. If not, see <http://www.gnu.org/licenses/>.
******************************************************************************/
import
{
RawContent
,
TabData
,
fetchSource
}
from
"
./
api
"
;
import
{
RawContent
,
TabData
,
fetchSource
}
from
"
./
data
"
;
/// <reference path="./rdflib-interface.d.ts"/>
import
{
RDF
,
RdfStore
,
Term
}
from
"
rdflib
"
;
...
...
src/co
ntent/framework
/registry.ts
→
src/co
mmon
/registry.ts
View file @
dba67c4a
...
...
@@ -18,10 +18,10 @@
* with CubicWeb. If not, see <http://www.gnu.org/licenses/>.
******************************************************************************/
/// <reference path=".
./../common
/rdflib-interface.d.ts"/>
/// <reference path="./rdflib-interface.d.ts"/>
import
{
RdfStore
}
from
"
rdflib
"
;
import
{
ReactNode
}
from
"
react
"
;
import
{
Application
}
from
"
./
interface
"
;
import
{
Application
}
from
"
./
application
"
;
/**
* The metadata of a view
...
...
src/content/app/ViewDbPedia.tsx
View file @
dba67c4a
...
...
@@ -23,7 +23,7 @@ import {
ViewDescriptor
,
ViewRenderer
,
REGISTRY
}
from
"
../
framework
/registry
"
;
}
from
"
../
../common
/registry
"
;
/// <reference path="../../common/rdflib-interface.d.ts"/>
import
{
RdfStore
}
from
"
rdflib
"
;
import
*
as
React
from
"
react
"
;
...
...
src/content/app/ViewDefaults.tsx
View file @
dba67c4a
...
...
@@ -23,7 +23,7 @@ import {
ViewDescriptor
,
ViewRenderer
,
REGISTRY
}
from
"
../
framework
/registry
"
;
}
from
"
../
../common
/registry
"
;
/// <reference path="../../common/rdflib-interface.d.ts"/>
import
{
RdfStore
,
Triple
,
Term
,
NamedNode
,
BlankNode
,
Literal
}
from
"
rdflib
"
;
import
*
as
React
from
"
react
"
;
...
...
src/content/app/Viewer.tsx
View file @
dba67c4a
...
...
@@ -22,8 +22,8 @@ import * as React from "react";
/// <reference path="../../common/rdflib-interface.d.ts"/>
import
{
RdfStore
}
from
"
rdflib
"
;
import
{
Application
}
from
"
../
framework/interface
"
;
import
{
REGISTRY
,
ViewRenderer
}
from
"
../
framework
/registry
"
;
import
{
Application
}
from
"
../
../common/application
"
;
import
{
REGISTRY
,
ViewRenderer
}
from
"
../
../common
/registry
"
;
import
{
register
as
registerViewDefaults
}
from
"
./ViewDefaults
"
;
import
{
register
as
registerViewDbPedia
}
from
"
./ViewDbPedia
"
;
registerViewDefaults
();
...
...
src/content/app/index.tsx
View file @
dba67c4a
...
...
@@ -19,7 +19,7 @@
******************************************************************************/
/// <reference path="../../common/rdflib-interface.d.ts"/>
import
{
Application
}
from
"
../
framework/interface
"
;
import
{
Application
}
from
"
../
../common/application
"
;
import
*
as
React
from
"
react
"
;
import
*
as
ReactDOM
from
"
react-dom
"
;
...
...
src/content/main.ts
View file @
dba67c4a
...
...
@@ -18,9 +18,9 @@
* with CubicWeb. If not, see <http://www.gnu.org/licenses/>.
******************************************************************************/
import
{
TabData
,
Link
,
NO_DATA
}
from
"
../common/
api
"
;
import
{
TabData
,
Link
,
NO_DATA
}
from
"
../common/
data
"
;
import
{
loadRdfStore
}
from
"
../common/rdf
"
;
import
*
as
App
from
"
./app
/index
"
;
import
*
as
App
from
"
./app
"
;
import
"
chrome
"
;
/**
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment