Commit 2835860e authored by Olivier Valette's avatar Olivier Valette
Browse files

Initial commit

parents
node_modules
.tmp
.idea
dist
\ No newline at end of file
[submodule "submodules/webapp-bundle"]
path = submodules/webapp-bundle
url = ../webapp-bundle
[submodule "submodules/ontology-js"]
path = submodules/ontology-js
url = ../ontology-js
CHANGELOG
===================
Ce fichier est basé sur [Keep a Changelog](http://keepachangelog.com/)
et le projet utilise [Semantic Versioning](http://semver.org/).
## [En cours]
----------------
## [1.2.3] - 2020.06.12
### Correction
- Bugfix : fix bool input translation
----------------
## [1.2.2] - 2020.01.30
### Correction
- Bugfix : remove thesaurus input functional limitation
----------------
## [1.2.1] - 2020.01.28
### Correction
- Period-filter now use xsd:dateTime instead of xsd:datetime
----------------
## [1.2.0] - 2019.01.14
### Modification
- Modification de l'IRI des ontologies DATAtourisme
----------------
## [1.1.0] - 2018.06.18
### Ajout
- Ajout du mécanisme de traduction
- Ajout de la traduction en anglais
----------------
## [1.0.2] - 2018.04.03
### Modification
- Modification de l'icone des Produits
----------------
## [1.0.1] - 2018.03.28
### Modification
- Ajout du code insee de la commune dans le filtre thesaurus
----------------
## [1.0.0] - 2018.03.01
### Ajouts
- Première release
- Filtres type, time
### Corrections
- ?sPointOfInterest1 -> ?res
- ontology.js dependance
\ No newline at end of file
This diff is collapsed.
<!--
~ This file is part of the DATAtourisme project.
~ 2022
~ @author Conjecto <contact@conjecto.com>
~ SPDX-License-Identifier: GPL-3.0-or-later
~ For the full copyright and license information, please view the LICENSE file that was distributed with this source code.
-->
<!doctype html>
<html lang="fr_FR" class="no-js fullscreen">
<head>
<meta charset="utf-8">
<title>Éditeur de requête</title>
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.7.0/css/font-awesome.css" />
<link rel="stylesheet" href="styles/styles.css">
<style>
body { background: #CCC; }
</style>
</head>
<body class="modal-open">
<div class="modal fade in" role="dialog" id="myModal" tabindex="-1" aria-labelledby="myModalLabel" style="display: block;">
<div class="modal-dialog modal-xl vqe-offcanvas-container" role="document">
<div class="modal-content">
<div class="modal-header">
<h4 class="modal-title" id="myModalLabel">Éditeur de requête</h4>
</div>
<div class="modal-body p-10" style=" background-color: #ecf0f5; height: 600px">
<visual-query-editor ng-model="query" ontology="ontology" mode="sparql"></visual-query-editor>
</div>
<div class="modal-footer">
<button type="button" class="btn btn-primary" onclick="alert(getScope().query)">Valider</button>
</div>
</div>
</div>
</div>
<div class="modal-backdrop fade in"></div>
<script type="text/javascript" src="scripts/app.js"></script>
<script>
var devApp = angular.module('devApp', ['visual-query-editor']).
run(function($rootScope, $http) {
$rootScope.query = {
//"types": ["https://www.datatourisme.gouv.fr/ontology/core#PlaceOfInterest"],
// "ast": {"or": [
// {"and": [
// {"thesaurus": {path: ["https://www.datatourisme.gouv.fr/ontology/core#hasTheme"], value: null}}
// ]}
// ]}
};
// $rootScope.query = {"types":["https://www.datatourisme.gouv.fr/ontology/core#PlaceOfInterest"],filters: [
// //{path: ["https://www.datatourisme.gouv.fr/ontology/core#hasBeenCreatedBy", "http://xmlns.com/foaf/0.1/nick"], value: "test"},
// //{path: ["https://www.datatourisme.gouv.fr/ontology/core#internetAccess"], value: true},
// {path: ["https://www.datatourisme.gouv.fr/ontology/core#isLocatedAt", "http://schema.org/geo"], value: [[48.1119800,-1.6742900],100]}
// ]};
// $rootScope.query = {filters: [
// {type:"period", path: ["https://www.datatourisme.gouv.fr/ontology/core#takesPlaceAt", "https://www.datatourisme.gouv.fr/ontology/core#endDate"], value: ["2016-09-01", "2016-10-13"]},
// {type:"text", path: ["https://www.datatourisme.gouv.fr/ontology/core#hasBeenCreatedBy", "http://xmlns.com/foaf/0.1/nick"], value: "test"},
// {type:"boolean", path: ["https://www.datatourisme.gouv.fr/ontology/core#internetAccess"], value: true},
//{type:"thesaurus", path: ["https://www.datatourisme.gouv.fr/ontology/core#hasTheme"], value: ["http://www.datatourisme.fr/resource/core#InTheCountryside"]}
// ]};
});
$.get('ontology.json', function(data) {
var ontology = Ontology.fromJson(data);
devApp.config(['ontologyProvider', function(ontologyProvider) {
ontologyProvider.setOntology(ontology);
}]);
angular.bootstrap(document, ['devApp']);
});
function getScope() {
return angular.element("body").scope();
}
</script>
</body>
</html>
<!--
~ This file is part of the DATAtourisme project.
~ 2022
~ @author Conjecto <contact@conjecto.com>
~ SPDX-License-Identifier: GPL-3.0-or-later
~ For the full copyright and license information, please view the LICENSE file that was distributed with this source code.
-->
<!doctype html>
<html lang="fr_FR" class="no-js fullscreen">
<head>
<meta charset="utf-8">
<title>Éditeur de requête</title>
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.7.0/css/font-awesome.css" />
<link rel="stylesheet" href="styles/styles.css">
</head>
<body>
<header class="public-header">
<nav class="navbar navbar-default">
<div class="container">
<div class="navbar-header">
<div class="navbar-brand">
<div class="navbar-gouv">
<img src="https://diffuseur.datatourisme.gouv.fr/assets/images/logos/marianne.png?5bce2c4bf0b977936dc93b8bc2f03733">
<img src="https://diffuseur.datatourisme.gouv.fr/assets/images/logos/minefi.png?9e79f71c8f8de889532ce7a60a241817">
</div>
<a href="/"><img class="navbar-logo" src="https://diffuseur.datatourisme.gouv.fr/assets/images/logos/datatourisme-250.png?cdc45830b17693b5836724335279b251"></a>
</div>
</div>
<div class="navbar-text navbar-right">
Espace <strong>diffuseur</strong>
</div>
</div>
</nav>
</header>
<!-- Full Width Column -->
<div class="content-wrapper notify-container">
<!-- Full Width Column -->
<div class="container">
<section class="content">
<visual-query-editor ng-model="query" ontology="ontology" mode="graphql"></visual-query-editor>
</section>
</div>
<!-- /.container -->
</div>
<!-- /.content-wrapper -->
<!-- /.content-wrapper -->
<footer class="main-footer">
<div class="container">
<div class="row">
<div class="col-xs-6 col-sm-3 col-lg-3">
<h5>DATAtourisme</h5>
<ul class="list-unstyled">
<li><a href="http://www.datatourisme.fr">Présentation du projet</a></li>
<li><a href="https://producteur.datatourisme.gouv.fr">Espace producteur</a></li>
<li><a href="https://diffuseur.datatourisme.gouv.fr">Espace diffuseur</a></li>
<li><a href="https://ontologie.datatourisme.gouv.fr">Ontologie</a></li>
<li><a href="#">Licences</a></li>
<li><a href="#">Mentions légales</a></li>
<li><a href="#">Conditions générales d'utilisation</a></li>
</ul>
</div>
<div class="col-xs-6 col-sm-5 col-lg-5">
<div class="row">
<div class="col-xs-12 col-sm-6 col-lg-5">
<h5>Réseau</h5>
<ul class="list-unstyled">
<li><a href="http://www.data.gouv.fr" target="_blank">Data.gouv.fr</a></li>
<li><a href="http://www.gouvernement.fr" target="_blank">Gouvernement.fr</a></li>
<li><a href="http://www.france.fr" target="_blank">France.fr</a></li>
<li><a href="http://www.legifrance.gouv.fr" target="_blank">Legifrance.gouv.fr</a></li>
<li><a href="http://www.service-public.fr" target="_blank">Service-public.fr</a></li>
</ul>
</div>
<div class="col-xs-12 col-sm-6 col-lg-7">
<h5>Partenaires</h5>
<ul class="list-unstyled">
<li><a href="https://www.ikoula.com" target="_blank">Ikoula</a></li>
<li><a href="http://www.offices-de-tourisme-de-france.org" target="_blank">Offices de Tourisme de France</a></li>
<li><a href="http://destination-regions.org" target="_blank">Destination Régions</a></li>
<li><a href="https://www.etalab.gouv.fr" target="_blank">Etalab</a></li>
</ul>
</div>
</div>
</div>
<div class="clearfix visible-xs-block"></div>
<div class="col-xs-12 col-logo col-sm-4 col-lg-offset-1 col-lg-3">
<div class="row">
<div class="col-xs-6">
<a href="https://www.entreprises.gouv.fr" target="_blank"><img class="logo-dge" src="https://diffuseur.datatourisme.gouv.fr/assets/images/logos/dge.png?73d335e0eb0ffd8f21977e5878a18f27"></a>
</div>
<div class="col-xs-6">
<a href="http://www.tourisme-territoires.net" target="_blank"><img class="logo-tt" src="https://diffuseur.datatourisme.gouv.fr/assets/images/logos/tt.png?9947cb0e3816477e6ab899c49eaf3dc9"></a>
</div>
</div>
</div>
</div>
</div>
</footer>
<script type="text/javascript" src="scripts/app.js"></script>
<script>
var devApp = angular.module('devApp', ['visual-query-editor']).
run(function($rootScope, $http, $timeout) {
/*$rootScope.query = {
"types": ["https://www.datatourisme.gouv.fr/ontology/core#PlaceOfInterest"],
"ast": {"or": [
{"and": [
{"geo": {path: ["https://www.datatourisme.gouv.fr/ontology/core#isLocatedAt", "http://schema.org/geo"], value: null}}
]}
]}
};*/
// $rootScope.query = {"types":["https://www.datatourisme.gouv.fr/ontology/core#PlaceOfInterest"],filters: [
// //{path: ["https://www.datatourisme.gouv.fr/ontology/core#hasBeenCreatedBy", "http://xmlns.com/foaf/0.1/nick"], value: "test"},
// //{path: ["https://www.datatourisme.gouv.fr/ontology/core#internetAccess"], value: true},
// {path: ["https://www.datatourisme.gouv.fr/ontology/core#isLocatedAt", "http://schema.org/geo"], value: [[48.1119800,-1.6742900],100]}
// ]};
// $rootScope.query = {filters: [
// {type:"period", path: ["https://www.datatourisme.gouv.fr/ontology/core#takesPlaceAt", "https://www.datatourisme.gouv.fr/ontology/core#endDate"], value: ["2016-09-01", "2016-10-13"]},
// {type:"text", path: ["https://www.datatourisme.gouv.fr/ontology/core#hasBeenCreatedBy", "http://xmlns.com/foaf/0.1/nick"], value: "test"},
// {type:"boolean", path: ["https://www.datatourisme.gouv.fr/ontology/core#internetAccess"], value: true},
//{type:"thesaurus", path: ["https://www.datatourisme.gouv.fr/ontology/core#hasTheme"], value: ["http://www.datatourisme.fr/resource/core#InTheCountryside"]}
// ]};
});
$.get('ontology.json', function(data) {
var ontology = Ontology.fromJson(data);
devApp.config(['ontologyProvider', function(ontologyProvider) {
ontologyProvider.setOntology(ontology);
}]);
angular.bootstrap(document, ['devApp']);
});
function getScope() {
return angular.element("body").scope();
}
</script>
</body>
</html>
<!--
~ This file is part of the DATAtourisme project.
~ 2022
~ @author Conjecto <contact@conjecto.com>
~ SPDX-License-Identifier: GPL-3.0-or-later
~ For the full copyright and license information, please view the LICENSE file that was distributed with this source code.
-->
<!doctype html>
<html lang="fr_FR" class="no-js fullscreen">
<head>
<meta charset="utf-8">
<title>Éditeur de requête</title>
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.7.0/css/font-awesome.css" />
<link rel="stylesheet" href="styles/styles.css">
</head>
<body>
<header class="public-header">
<nav class="navbar navbar-default">
<div class="container-fluid">
<div class="navbar-header">
<div class="navbar-brand">
<div class="navbar-gouv">
<img src="https://diffuseur.datatourisme.gouv.fr/assets/images/logos/marianne.png?5bce2c4bf0b977936dc93b8bc2f03733">
<img src="https://diffuseur.datatourisme.gouv.fr/assets/images/logos/minefi.png?9e79f71c8f8de889532ce7a60a241817">
</div>
<a href="/"><img class="navbar-logo" src="https://diffuseur.datatourisme.gouv.fr/assets/images/logos/datatourisme-250.png?cdc45830b17693b5836724335279b251"></a>
</div>
</div>
<div class="navbar-text navbar-right">
Espace <strong>diffuseur</strong>
</div>
</div>
</nav>
</header>
<!-- Full Width Column -->
<div class="content-wrapper notify-container">
<div class="table-wrapper">
<div class="table-row">
<section class="content p-10">
<visual-query-editor ng-model="query" ontology="ontology" query="graphql" mode="graphql"></visual-query-editor>
</section>
</div>
<div class="table-row graphql-row">
<div ui-codemirror ng-model="graphql" ui-codemirror-opts="{mode: 'graphql', theme:'dracula', lineWrapping : false, lineNumbers: false, readOnly: true}"></div>
</div>
</div>
<!-- /.container -->
</div>
<!-- /.content-wrapper -->
<!-- /.content-wrapper -->
<footer class="main-footer">
<div class="container">
<div class="row">
<div class="col-xs-6 col-sm-3 col-lg-3">
<h5>DATAtourisme</h5>
<ul class="list-unstyled">
<li><a href="http://www.datatourisme.fr">Présentation du projet</a></li>
<li><a href="https://producteur.datatourisme.gouv.fr">Espace producteur</a></li>
<li><a href="https://diffuseur.datatourisme.gouv.fr">Espace diffuseur</a></li>
<li><a href="https://ontologie.datatourisme.gouv.fr">Ontologie</a></li>
<li><a href="#">Licences</a></li>
<li><a href="#">Mentions légales</a></li>
<li><a href="#">Conditions générales d'utilisation</a></li>
</ul>
</div>
<div class="col-xs-6 col-sm-5 col-lg-5">
<div class="row">
<div class="col-xs-12 col-sm-6 col-lg-5">
<h5>Réseau</h5>
<ul class="list-unstyled">
<li><a href="http://www.data.gouv.fr" target="_blank">Data.gouv.fr</a></li>
<li><a href="http://www.gouvernement.fr" target="_blank">Gouvernement.fr</a></li>
<li><a href="http://www.france.fr" target="_blank">France.fr</a></li>
<li><a href="http://www.legifrance.gouv.fr" target="_blank">Legifrance.gouv.fr</a></li>
<li><a href="http://www.service-public.fr" target="_blank">Service-public.fr</a></li>
</ul>
</div>
<div class="col-xs-12 col-sm-6 col-lg-7">
<h5>Partenaires</h5>
<ul class="list-unstyled">
<li><a href="https://www.ikoula.com" target="_blank">Ikoula</a></li>
<li><a href="http://www.offices-de-tourisme-de-france.org" target="_blank">Offices de Tourisme de France</a></li>
<li><a href="http://destination-regions.org" target="_blank">Destination Régions</a></li>
<li><a href="https://www.etalab.gouv.fr" target="_blank">Etalab</a></li>
</ul>
</div>
</div>
</div>
<div class="clearfix visible-xs-block"></div>
<div class="col-xs-12 col-logo col-sm-4 col-lg-offset-1 col-lg-3">
<div class="row">
<div class="col-xs-6">
<a href="https://www.entreprises.gouv.fr" target="_blank"><img class="logo-dge" src="https://diffuseur.datatourisme.gouv.fr/assets/images/logos/dge.png?73d335e0eb0ffd8f21977e5878a18f27"></a>
</div>
<div class="col-xs-6">
<a href="http://www.tourisme-territoires.net" target="_blank"><img class="logo-tt" src="https://diffuseur.datatourisme.gouv.fr/assets/images/logos/tt.png?9947cb0e3816477e6ab899c49eaf3dc9"></a>
</div>
</div>
</div>
</div>
</div>
</footer>
<script type="text/javascript" src="scripts/app.js"></script>
<script>
var devApp = angular.module('devApp', ['visual-query-editor']).
run(function($rootScope, $http, $timeout) {
/*$rootScope.query = {
"types": ["https://www.datatourisme.gouv.fr/ontology/core#PlaceOfInterest"],
"ast": {"or": [
{"and": [
{"geo": {path: ["https://www.datatourisme.gouv.fr/ontology/core#isLocatedAt", "http://schema.org/geo"], value: null}}
]}
]}
};*/
// $rootScope.query = {"types":["https://www.datatourisme.gouv.fr/ontology/core#PlaceOfInterest"],filters: [
// //{path: ["https://www.datatourisme.gouv.fr/ontology/core#hasBeenCreatedBy", "http://xmlns.com/foaf/0.1/nick"], value: "test"},
// //{path: ["https://www.datatourisme.gouv.fr/ontology/core#internetAccess"], value: true},
// {path: ["https://www.datatourisme.gouv.fr/ontology/core#isLocatedAt", "http://schema.org/geo"], value: [[48.1119800,-1.6742900],100]}
// ]};
// $rootScope.query = {filters: [
// {type:"period", path: ["https://www.datatourisme.gouv.fr/ontology/core#takesPlaceAt", "https://www.datatourisme.gouv.fr/ontology/core#endDate"], value: ["2016-09-01", "2016-10-13"]},
// {type:"text", path: ["https://www.datatourisme.gouv.fr/ontology/core#hasBeenCreatedBy", "http://xmlns.com/foaf/0.1/nick"], value: "test"},
// {type:"boolean", path: ["https://www.datatourisme.gouv.fr/ontology/core#internetAccess"], value: true},
//{type:"thesaurus", path: ["https://www.datatourisme.gouv.fr/ontology/core#hasTheme"], value: ["http://www.datatourisme.fr/resource/core#InTheCountryside"]}
// ]};
});
$.get('ontology.json', function(data) {
var ontology = Ontology.fromJson(data);
devApp.config(['ontologyProvider', function(ontologyProvider) {
ontologyProvider.setOntology(ontology);
}]);
angular.bootstrap(document, ['devApp']);
});
function getScope() {
return angular.element("body").scope();
}
</script>
</body>
</html>
This diff is collapsed.
/*
* This file is part of the DATAtourisme project.
* 2022
* @author Conjecto <contact@conjecto.com>
* SPDX-License-Identifier: GPL-3.0-or-later
* For the full copyright and license information, please view the LICENSE file that was distributed with this source code.
*/
'use strict';
window.jQuery = window.$ = require('jquery');
window.Selectize = require('selectize');
window.moment = require('moment');
window.CodeMirror = require('codemirror');
require('codemirror/mode/sparql/sparql');
require('codemirror-graphql/mode');
var angular = require('angular');
require('angular-i18n/angular-locale_fr');
require('bootstrap');
require('leaflet');
require('ui-leaflet');
require('angular-simple-logger');
require('bootstrap-slider');
require('angular-bootstrap-slider');
require('nanoscroller');
require('./vendors/scrollable.js');
require('selectize');
require('angular-selectize2/dist/selectize');
require('angular-ui-codemirror');
require('bootstrap-daterangepicker');
require('angular-daterangepicker');
require('masonry-layout');
require('imagesloaded');
require('./vendors/*', {mode: 'expand'});
// module definition
var app = angular.module('visual-query-editor', [
'nemLogging',
'ui-leaflet',
'ui.bootstrap-slider',
'sun.scrollable',
'selectize',
'daterangepicker',
'ui.codemirror',
require('angular-ui-mask'),
require('angular-masonry'),
require('ng-dialog'),
require('angular-translate')
]);
app.config(config);
// components
require('./components/*/*.js', {mode: 'expand'});
require('./directives/*/*.js', {mode: 'expand'});
require('./filters/*/*.js', {mode: 'expand'});
require('./services/*/*.js', {mode: 'expand'});
// Replace/Create the global namespace
window.Ontology = require('ontology-js');
/**
* @ngInject
*/
function config($qProvider, $translateProvider) {
$qProvider.errorOnUnhandledRejections(false);
$translateProvider
.translations('fr', require("../translations/fr.yml"))
.translations('en', require("../translations/en.yml"))
.fallbackLanguage('fr')
.preferredLanguage('en');
}
\ No newline at end of file
<!--
~ This file is part of the DATAtourisme project.
~ 2022
~ @author Conjecto <contact@conjecto.com>
~ SPDX-License-Identifier: GPL-3.0-or-later
~ For the full copyright and license information, please view the LICENSE file that was distributed with this source code.
-->
<div class="filter-geo-dialog">
<div class="modal-body p-0">
<div class="params-container">
<div class="row">
<div class="col-sm-6">
<div class="form-group m-b-0">
<label class="control-label">{{ 'label.coordinates' | translate }}</label>
<input type="text" class="form-control coords" value="{{ $ctrl.center.lat }}, {{ $ctrl.center.lng }}" readonly placeholder="{{ 'label.geo_coordinates' | translate }}">
</div>
</div>
<div class="col-sm-6">
<div class="form-group m-b-0">
<label class="control-label">Rayon</label>
<span>{{ $ctrl.radius }}</span> km
<slider ng-model="$ctrl.radius" min="5" step="5" max="600" on-slide="$ctrl.onSlide($event,value)" on-stop-slide="$ctrl.onStopSlide($event,value)"></slider>
</div>
</div>
</div>
</div>
<leaflet ng-if="$ctrl.ready" id="filter-geo-map" center="$ctrl.center" width="100%"></leaflet>
</div>
<div class="modal-footer">
<!--<code class="">{{ xpath }}</code>-->
<button type="button" class="btn btn-default pull-left" ng-click="closeThisDialog()">{{ 'label.cancel' | translate }}</button>
<button type="button" class="btn btn-primary" ng-click="$ctrl.confirm()">{{ 'label.validate' | translate }}</button>
</div>
</div>
\ No newline at end of file
<!--
~ This file is part of the DATAtourisme project.
~ 2022
~ @author Conjecto <contact@conjecto.com>
~ SPDX-License-Identifier: GPL-3.0-or-later
~ For the full copyright and license information, please view the LICENSE file that was distributed with this source code.
-->
<div class="input-group input-group-sm">
<div class="form-control">{{ $ctrl.formatModel() }}</div>
<span class="input-group-btn">
<button class="btn btn-default" autoclick type="button" ng-click="$ctrl.edit()"><i class="fa fa-map-marker"></i></button>
</span>
</div>
\ No newline at end of file
/*
* This file is part of the DATAtourisme project.
* 2022
* @author Conjecto <contact@conjecto.com>
* SPDX-License-Identifier: GPL-3.0-or-later
* For the full copyright and license information, please view the LICENSE file that was distributed with this source code.
*/
'use strict';
require('angular')
.module('visual-query-editor')
.component('filterInputGeo', {
controller: controller,
template: require("./filter-input-geo.html"),
require: {
ngModelCtrl: 'ngModel'
}
});
/**