diff --git a/.gitignore b/.gitignore index 36b6663db329..086e04ad9eaf 100644 --- a/.gitignore +++ b/.gitignore @@ -22,3 +22,4 @@ /cypress/screenshots/ /cypress/video /locales +/.idea diff --git a/.npmignore b/.npmignore index 5be2d8c2ddea..310d24acbc9a 100644 --- a/.npmignore +++ b/.npmignore @@ -16,6 +16,7 @@ /.storybook/ /.tx/ /.vscode/ +/.idea/ /private.crt /private.key /pyproject.toml diff --git a/buildtools/webpack.commons.js b/buildtools/webpack.commons.js index 9e6c2814333b..d46f9ece14d6 100644 --- a/buildtools/webpack.commons.js +++ b/buildtools/webpack.commons.js @@ -21,8 +21,6 @@ const path = require('path'); const webpack = require('webpack'); -const SassPlugin = require('./webpack.plugin.js'); -const EventHooksPlugin = require('event-hooks-webpack-plugin'); const {PromiseTask} = require('event-hooks-webpack-plugin/lib/tasks'); const devMode = process.env.NODE_ENV !== 'production'; @@ -94,16 +92,12 @@ module.exports = function (config) { const cssRule = { test: /\.css$/, - use: ['./buildtools/webpack.scss-loader', 'extract-loader', 'css-loader'], + use: [{loader: 'style-loader'}, {loader: 'css-loader'}], }; const sassRule = { - test: /\.scss$/, - use: [ - { - loader: './buildtools/webpack.scss-loader', - }, - ], + test: /\.s[ac]ss$/i, + use: [{loader: 'style-loader'}, {loader: 'css-loader'}, {loader: 'sass-loader'}], }; const htmlRule = { @@ -116,32 +110,6 @@ module.exports = function (config) { }, }; - /** - * @param firsts - * @param lasts - */ - function get_comp(firsts, lasts) { - return (f1, f2) => { - for (const pattern of firsts) { - if (f1.indexOf(pattern) >= 0) { - return -1; - } - if (f2.indexOf(pattern) >= 0) { - return 1; - } - } - for (const pattern of lasts) { - if (f1.indexOf(pattern) >= 0) { - return 1; - } - if (f2.indexOf(pattern) >= 0) { - return -1; - } - } - return 0; - }; - } - // Collect every ts(x) files. const tsRule = { test: /\.tsx?$/, @@ -210,76 +178,12 @@ module.exports = function (config) { const plugins = [ providePlugin, - new SassPlugin({ - filename: devMode ? '[name].css' : '[name].[hash:6].css', - assetname: '[name].[hash:6].[ext]', - // tempfile: '/tmp/t.scss', - blacklistedChunks: ['commons'], - filesOrder: (chunk, chunksFiles) => { - let files = chunksFiles.commons - ? chunksFiles[chunk.name].concat(chunksFiles.commons) - : chunksFiles[chunk.name]; - files = files.filter((file) => { - if (file.endsWith('node_modules/@fortawesome/fontawesome-free/css/all.min.css')) { - return false; - } - if (file.endsWith('/src/css/reset.css')) { - return false; - } - return true; - }); - files.sort( - get_comp( - config.first_scss || - config.fist_scss || [ - // ngeo default apps - '/apps/desktop/sass/vars_desktop.scss', - '/apps/desktop_alt/sass/vars_desktop_alt.scss', - '/apps/iframe_api/sass/vars_iframe_api.scss', - '/apps/mobile/sass/vars_mobile.scss', - '/apps/mobile_alt/sass/vars_mobile_alt.scss', - '/apps/oeedit/sass/vars_oeedit.scss', - // GeoMapFish project sass vars files - '/apps/sass/vars_', - '/controllers/vars_', - // For the examples - 'examples/vars.scss', - // For the tests - 'sass/vars.scss', - ], - config.last_scss || [ - // project and ngeo default apps other sass files - '/apps/', - '/controllers/', - ], - ), - ); - console.log(); - console.log('SCSS files order:'); - for (const file of files) { - console.log(file); - } - console.log(); - return files; - }, - }), new webpack.IgnorePlugin(/^\.\/locale$/, /node_modules\/moment\/src\/lib\/locale$/), ]; if (config.nodll != true) { plugins.push(dllPlugin); } - plugins.push( - new EventHooksPlugin({ - afterCompile: new PromiseTask(async () => { - console.log('Babel compilations rules'); - for (const file in files) { - console.log(file + ': ' + JSON.stringify(files[file])); - } - }), - }), - ); - plugins.push( new webpack.IgnorePlugin({ resourceRegExp: /^cross-fetch$/, @@ -322,7 +226,7 @@ module.exports = function (config) { olcs: 'ol-cesium/src/olcs', 'jquery-ui/datepicker': 'jquery-ui/ui/widgets/datepicker', // For angular-ui-date 'mapillary-js/src/Mapillary': 'mapillary-js/dist/mapillary.js', - // required to bake it working with types + // required to make it working with types 'typeahead': 'corejs-typeahead', }, }, diff --git a/buildtools/webpack.plugin.js b/buildtools/webpack.plugin.js deleted file mode 100644 index cd0fe7427d6a..000000000000 --- a/buildtools/webpack.plugin.js +++ /dev/null @@ -1,554 +0,0 @@ -// The MIT License (MIT) -// -// Copyright (c) 2018-2024 Camptocamp SA -// -// Permission is hereby granted, free of charge, to any person obtaining a copy of -// this software and associated documentation files (the "Software"), to deal in -// the Software without restriction, including without limitation the rights to -// use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of -// the Software, and to permit persons to whom the Software is furnished to do so, -// subject to the following conditions: -// -// The above copyright notice and this permission notice shall be included in all -// copies or substantial portions of the Software. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS -// FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR -// COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER -// IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN -// CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - -'use strict'; - -const sassLoader = require('./webpack.scss-loader.js'); -const nodeSass = require('node-sass'); -const path = require('path'); -const fs = require('fs-extra'); -const co = require('co'); -const replaceAsync = require('fast-sass-loader/lib/replace'); -const utils = require('fast-sass-loader/lib/utils'); -const loaderUtils = require('loader-utils'); -const assert = require('assert'); - -const BOM_HEADER = '\uFEFF'; -const EXT_PRECEDENCE = ['.scss', '.sass', '.css']; -const MATCH_URL_ALL = /url\(\s*(['"]?)([^ '"()]+)(\1)\s*\)/g; -const MATCH_IMPORTS = /@import\s+(['"])([^,;'"]+)(\1)(\s*,\s*(['"])([^,;'"]+)(\1))*\s*;/g; -const MATCH_FILES = /(['"])([^,;'"]+)(\1)/g; - -/** - * @param original - * @param includePaths - * @param transformers - */ -function getImportsToResolve(original, includePaths, transformers) { - const extname = path.extname(original); - let basename = path.basename(original, extname); - const dirname = path.dirname(original); - - const imports = []; - let names = [basename]; - let exts = [extname]; - const extensionPrecedence = [].concat(EXT_PRECEDENCE, Object.keys(transformers)); - - if (!extname) { - exts = extensionPrecedence; - } - if (extname && !extensionPrecedence.includes(extname)) { - basename = path.basename(original); - names = [basename]; - exts = extensionPrecedence; - } - if (!basename.startsWith('_')) { - names.push(`_${basename}`); - } - - // eslint-disable-next-line @typescript-eslint/prefer-for-of - for (let i = 0; i < names.length; i++) { - // eslint-disable-next-line @typescript-eslint/prefer-for-of - for (let j = 0; j < exts.length; j++) { - // search relative to original file - imports.push(path.join(dirname, names[i] + exts[j])); - - // search in includePaths - for (const includePath of includePaths) { - imports.push(path.join(includePath, dirname, names[i] + exts[j])); - } - } - } - - return imports; -} - -let cache; - -/** - * @param opts - * @param entry - * @param resolve - * @param level - */ -function* mergeSources(opts, entry, resolve, level) { - level = level || 0; - - const includePaths = opts.includePaths; - const transformers = opts.transformers; - let content = false; - - if (typeof entry === 'object') { - content = entry.content; - entry = entry.file; - } else { - content = yield fs.readFile(entry, 'utf8'); - - // fix BOM issue (only on windows) - if (content.startsWith(BOM_HEADER)) { - content = content.substring(BOM_HEADER.length); - } - } - - const ext = path.extname(entry); - - if (transformers[ext]) { - content = transformers[ext](content); - } - - if (opts.data) { - content = `${opts.data}\n${content}`; - } - - const entryDir = path.dirname(entry); - - // replace url(...) - content = content.replace(MATCH_URL_ALL, (total, left, file, right) => { - if (loaderUtils.isUrlRequest(file)) { - // handle url(!) - const pos = file.lastIndexOf('!'); - if (pos >= 0) { - // eslint-disable-next-line @typescript-eslint/restrict-plus-operands - left += file.substring(0, pos + 1); - // eslint-disable-next-line @typescript-eslint/restrict-plus-operands - file = file.substring(pos + 1); - } - - // test again - if (loaderUtils.isUrlRequest(file)) { - if (file.startsWith('~') || file.startsWith('data:')) { - return total; - } - const absoluteFile = path.normalize(path.resolve(entryDir, file)); - // fix for windows path - let relativeFile = path.relative(process.cwd(), absoluteFile).replace(/\\/g, '/'); - - if (!relativeFile.startsWith('.')) { - relativeFile = `./${relativeFile}`; - } - - return `url(${left}${relativeFile}${right})`; - } else { - return total; - } - } else { - return total; - } - }); - - // find comments should after content.replace(...), otherwise the comments offset will be incorrect - const commentRanges = utils.findComments(content); - - // replace @import "..." - /** - * @param total - */ - function* importReplacer(total) { - // if current import is in comments, then skip it - // eslint-disable-next-line @typescript-eslint/no-this-alias - const range = this; - const found = commentRanges.find((commentRange) => { - if (range.start >= commentRange[0] && range.end <= commentRange[1]) { - return true; - } - }); - - if (found) { - return total; - } - - const contents = []; - let matched; - - // must reset lastIndex - MATCH_FILES.lastIndex = 0; - - while ((matched = MATCH_FILES.exec(total))) { - // eslint-disable-line - const originalImport = matched[2].trim(); - if (!originalImport) { - const err = new Error(`import file cannot be empty: "${total}" @${entry}`); - - err.file = entry; - - throw err; - } - - const imports = getImportsToResolve(originalImport, includePaths, transformers); - let resolvedImport; - - // eslint-disable-next-line @typescript-eslint/prefer-for-of - for (let i = 0; i < imports.length; i++) { - // if imports[i] is absolute path, then use it directly - if (path.isAbsolute(imports[i]) && fs.existsSync(imports[i])) { - resolvedImport = imports[i]; - } else { - try { - const reqFile = loaderUtils.urlToRequest(imports[i], opts.root); - - resolvedImport = yield resolve(entryDir, reqFile); - break; - } catch (err) { - // skip - } - } - } - - if (!resolvedImport) { - const err = new Error(`import file cannot be resolved: "${total}" @${entry}`); - - err.file = entry; - - throw err; - } - - resolvedImport = path.normalize(resolvedImport); - - if (cache.indexOf(resolvedImport) < 0) { - cache.push(resolvedImport); - - // eslint-disable-next-line @typescript-eslint/restrict-plus-operands - contents.push(yield mergeSources(opts, resolvedImport, resolve, level + 1)); - } - } - - return contents.join('\n'); - } - - return yield replaceAsync(content, MATCH_IMPORTS, co.wrap(importReplacer)); -} - -/** - * @param ctx - */ -function resolver(ctx) { - return function (dir, importFile) { - return new Promise((resolve, reject) => { - ctx.resolve(dir, importFile, (err, resolvedFile) => { - if (err) { - reject(err); - } else { - resolve(resolvedFile); - } - }); - }); - }; -} - -/** - * @param pluginOptions - * @param usedContext - * @param compilation - * @param assetName - * @param assetUrl - * @param queryString - * @param replacements - */ -function fillDependency( - pluginOptions, - usedContext, - compilation, - assetName, - assetUrl, - queryString, - replacements, -) { - return (resolve, reject) => { - if (assetUrl.startsWith('~')) { - usedContext.resolve(usedContext.resourcePath, assetName, (err, resolvedFile) => { - if (err) { - console.log(err); - reject(err); - } else { - fs.readFile(resolvedFile, (err, data) => { - if (err) { - console.log(err); - reject(err); - } else { - usedContext.resourcePath = assetName; - const name = loaderUtils.interpolateName(usedContext, pluginOptions.assetname, { - content: data, - }); - compilation.assets[name] = { - source: () => data, - size: () => data.length, - }; - // eslint-disable-next-line @typescript-eslint/restrict-plus-operands - replacements[assetUrl] = name + queryString; - resolve(); - } - }); - } - }); - } else { - fs.readFile(assetName, (err, data) => { - if (err) { - console.log(err); - reject(err); - } else { - usedContext.resourcePath = assetName; - const name = loaderUtils.interpolateName(usedContext, pluginOptions.assetname, { - content: data, - }); - compilation.assets[name] = { - source: () => data, - size: () => data.length, - }; - // eslint-disable-next-line @typescript-eslint/restrict-plus-operands - replacements[assetUrl] = name + queryString; - resolve(); - } - }); - } - }; -} - -/** - * @param text - * @param replacements - */ -function doReplacement(text, replacements) { - if (replacements) { - for (const replacement of replacements) { - text = text.replace(replacement[0], replacement[1]); - } - } - return text; -} - -/** - * @param pluginOptions - * @param usedContext - * @param compilation - * @param chunk - * @param resolve - * @param callback - */ -function manageContent(pluginOptions, usedContext, compilation, chunk, resolve, callback) { - return async (contents) => { - if (pluginOptions.tempfile) { - fs.writeFile(pluginOptions.tempfile, contents); - } - - try { - const replacements = {}; - const promises = []; - const options = Object.assign({}, pluginOptions.sassConfig, { - data: doReplacement(contents, pluginOptions.preReplacements), - functions: {}, - }); - // Double parse the Sass files to be able to return in a synchronous function things - // that we can only get asynchronously. - const preparseOptions = Object.assign({}, options); - preparseOptions.functions['url($url)'] = function (url) { - if (url.getValue().startsWith('data:')) { - return url; - } - try { - const assetUrl = url.getValue(); - if (assetUrl[0] == '~') { - let assetName = assetUrl.substr(1); - let queryString = ''; - const questionMarkIndex = assetName.indexOf('?'); - if (questionMarkIndex > 0) { - queryString = assetName.substr(questionMarkIndex); - assetName = assetName.substr(0, questionMarkIndex); - } else { - const sharpIndex = assetName.indexOf('#'); - if (sharpIndex > 0) { - queryString = assetName.substr(sharpIndex); - assetName = assetName.substr(0, sharpIndex); - } - } - promises.push( - new Promise( - fillDependency( - pluginOptions, - usedContext, - compilation, - assetName, - assetUrl, - queryString, - replacements, - ), - ), - ); - } else { - promises.push( - new Promise( - fillDependency(pluginOptions, usedContext, compilation, assetUrl, assetUrl, '', replacements), - ), - ); - } - } catch (e) { - console.error(e.stack || e); - callback(`SCSS plugin error, ${e}`); - } - return url; - }; - const originalResourcePath = usedContext.resourcePath; - nodeSass.renderSync(preparseOptions); - await Promise.all(promises); - const parseOptions = Object.assign({}, options); - parseOptions.functions['url($url)'] = function (url) { - const assetUrl = url.getValue(); - if (assetUrl.startsWith('data:')) { - return nodeSass.types.String(`url(${assetUrl})`); - } - return nodeSass.types.String(`url(${replacements[assetUrl]})`); - }; - const result = nodeSass.renderSync(parseOptions); - const content = doReplacement(result.css.toString(), pluginOptions.postReplacements); - const srcmap = result.map; - const asset = { - source: () => content, - size: () => content.length, - }; - usedContext.resourcePath = `/${chunk.name}`; - const assetName = loaderUtils.interpolateName(usedContext, pluginOptions.filename, { - content: content, - }); - compilation.assets[assetName] = asset; - chunk.files.push(assetName); - if (srcmap) { - compilation.assets[`${assetName}.map`] = { - source: () => srcmap, - size: () => srcmap.length, - }; - chunk.files.push(`${assetName}.map`); - } - usedContext.resourcePath = originalResourcePath; - resolve(); - } catch (e) { - console.error(e.stack || e); - callback(`SCSS plugin error, ${e}`); - } - }; -} - -/** - * @param files - */ -function processAsset(files) { - return (resolve, reject) => { - try { - const contents = []; - const browse = function (position) { - if (position < files.length) { - const file = files[position]; - const entry = sassLoader.entries[file]; - if (entry) { - const merged = mergeSources( - entry.options, - { - file: file, - content: entry.content, - }, - resolver(entry.ctx), - ); - const merged2 = []; - for (const content of merged) { - merged2.push(content); - } - assert.strictEqual(merged2.length, 1); - merged2[0].then( - (content) => { - contents.push(content); - position++; - browse(position); - }, - () => { - reject(`${position}, ${file}`); - }, - ); - } else { - reject(`Missing entry for ${file}`); - } - } else { - resolve(contents.join('\n')); - } - }; - browse(0); - } catch (e) { - console.error(e.stack || e); - reject(e); - } - }; -} - -class SassPlugin { - constructor(options) { - this.options = options; - } - - apply(compiler) { - // compiler.hooks.emit.taplAsync('SassPlugin', async (compilation, callback) => { - compiler.plugin('emit', async (compilation, callback) => { - const chunksFiles = {}; - for (const chunk of compilation.chunks) { - chunksFiles[chunk.name] = []; - const files = chunksFiles[chunk.name]; - const browse = (module) => { - if (module.children) { - for (const child of module.children) { - browse(child); - } - } else { - if (module.resource && (module.resource.endsWith('.scss') || module.resource.endsWith('.css'))) { - files.push(module.resource); - } - } - }; - for (const module of chunk.modulesIterable) { - browse(module); - } - } - for (const chunk of compilation.chunks) { - cache = []; - const pluginOptions = this.options; - const files = pluginOptions.filesOrder - ? pluginOptions.filesOrder(chunk, chunksFiles) - : chunksFiles[chunk.name]; - if ( - (!pluginOptions.blacklistedChunks || pluginOptions.blacklistedChunks.indexOf(chunk.name) < 0) && - files.length > 0 - ) { - // eslint-disable-next-line no-unused-vars - const promise = new Promise((resolve, reject) => { - const usedContext = files.length > 0 ? sassLoader.entries[files[0]].ctx : undefined; - const promise = new Promise(processAsset(files)); - - promise.then( - manageContent(pluginOptions, usedContext, compilation, chunk, resolve, callback), - (error) => { - callback(`SCSS dependencies error, ${error}`); - }, - ); - }); - await Promise.all([promise]); - } - } - callback(); - }); - } -} - -module.exports = SassPlugin; diff --git a/buildtools/webpack.scss-loader.js b/buildtools/webpack.scss-loader.js deleted file mode 100644 index a70b44eab69e..000000000000 --- a/buildtools/webpack.scss-loader.js +++ /dev/null @@ -1,82 +0,0 @@ -// The MIT License (MIT) -// -// Copyright (c) 2018-2024 Camptocamp SA -// -// Permission is hereby granted, free of charge, to any person obtaining a copy of -// this software and associated documentation files (the "Software"), to deal in -// the Software without restriction, including without limitation the rights to -// use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of -// the Software, and to permit persons to whom the Software is furnished to do so, -// subject to the following conditions: -// -// The above copyright notice and this permission notice shall be included in all -// copies or substantial portions of the Software. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS -// FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR -// COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER -// IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN -// CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - -'use strict'; - -const entries = {}; - -const loaderUtils = require('loader-utils'); -const path = require('path'); - -/** - * @param transformers - */ -function createTransformersMap(transformers) { - if (!transformers) { - return {}; - } - - // return map of extension strings to transformer functions - return transformers.reduce((extensionMap, transformer) => { - transformer.extensions.forEach((ext) => { - extensionMap[ext] = transformer.transform; - }); - return extensionMap; - }, {}); -} - -/** - * @param ctx - */ -function getLoaderConfig(ctx) { - const options = loaderUtils.getOptions(ctx) || {}; - const includePaths = options.includePaths || []; - const basedir = ctx.rootContext || options.context || ctx.options.context || process.cwd(); - const transformers = createTransformersMap(options.transformers); - - // convert relative to absolute - for (let i = 0; i < includePaths.length; i++) { - if (!path.isAbsolute(includePaths[i])) { - includePaths[i] = path.join(basedir, includePaths[i]); - } - } - - return { - basedir: basedir, - includePaths: includePaths, - transformers: transformers, - baseEntryDir: path.dirname(ctx.resourcePath), - root: options.root, - data: options.data, - }; -} - -module.exports = function (content) { - entries[this.resourcePath] = { - 'content': content, - 'options': getLoaderConfig(this), - 'ctx': this, - }; - this.dependency(this.resourcePath); - return ''; -}; - -module.exports.entries = entries; diff --git a/contribs/gmf/apps/desktop/Controller.js b/contribs/gmf/apps/desktop/Controller.js index 0ce075231bec..d8e86c0fa9df 100644 --- a/contribs/gmf/apps/desktop/Controller.js +++ b/contribs/gmf/apps/desktop/Controller.js @@ -27,7 +27,7 @@ */ import './sass/desktop.scss'; -import './sass/vars_desktop.scss'; + import angular from 'angular'; import {isEventUsingCtrlKey} from 'ngeo/utils'; import gmfControllersAbstractDesktopController, { diff --git a/contribs/gmf/apps/desktop/sass/desktop.scss b/contribs/gmf/apps/desktop/sass/desktop.scss index f0a9c7baad28..ff0293a7872b 100644 --- a/contribs/gmf/apps/desktop/sass/desktop.scss +++ b/contribs/gmf/apps/desktop/sass/desktop.scss @@ -21,6 +21,9 @@ * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ +@import './vars_desktop.scss'; +@import 'gmf/controllers/desktop.scss'; + header { .logo { background-image: url('../image/logo.png'); diff --git a/contribs/gmf/apps/desktop_alt/Controller.js b/contribs/gmf/apps/desktop_alt/Controller.js index 90317c715d4a..5283fbe92aa2 100644 --- a/contribs/gmf/apps/desktop_alt/Controller.js +++ b/contribs/gmf/apps/desktop_alt/Controller.js @@ -27,7 +27,7 @@ */ import './sass/desktop_alt.scss'; -import './sass/vars_desktop_alt.scss'; + import angular from 'angular'; import gmfControllersAbstractDesktopController, { AbstractDesktopController, diff --git a/contribs/gmf/apps/desktop_alt/sass/desktop_alt.scss b/contribs/gmf/apps/desktop_alt/sass/desktop_alt.scss index ebc681d277d4..6a2a6eff28b7 100644 --- a/contribs/gmf/apps/desktop_alt/sass/desktop_alt.scss +++ b/contribs/gmf/apps/desktop_alt/sass/desktop_alt.scss @@ -21,6 +21,10 @@ * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ +@import './vars_desktop_alt.scss'; +@import 'gmf/controllers/desktop.scss'; +@import '~mapillary-js/dist/mapillary.css'; + html { body { padding: 0; @@ -57,7 +61,7 @@ header { div .ngeo-displaywindow { $displaywindow-min-height: 15rem; - left: $app-margin + $left-panel-width + $displaywindow-min-height / 2; + left: calc($app-margin + $left-panel-width + $displaywindow-min-height / 2); right: initial; top: $topbar-height + $app-margin + 3 * $map-tools-size; } diff --git a/contribs/gmf/apps/iframe_api/Controller.js b/contribs/gmf/apps/iframe_api/Controller.js index bea6af10964e..bb97eb8cc263 100644 --- a/contribs/gmf/apps/iframe_api/Controller.js +++ b/contribs/gmf/apps/iframe_api/Controller.js @@ -26,8 +26,7 @@ * by the HTML page and the controller to provide the configuration. */ -import 'gmf/controllers/iframe_api.scss'; -import 'gmf/controllers/vars_desktop.scss'; +import './sass/iframe_api.scss'; import angular from 'angular'; import gmfControllersAbstractAPIController, { diff --git a/examples/common_dependencies.scss b/contribs/gmf/apps/iframe_api/sass/iframe_api.scss similarity index 92% rename from examples/common_dependencies.scss rename to contribs/gmf/apps/iframe_api/sass/iframe_api.scss index e6af595c3a38..08aa5a98ab89 100644 --- a/examples/common_dependencies.scss +++ b/contribs/gmf/apps/iframe_api/sass/iframe_api.scss @@ -21,4 +21,5 @@ * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ -$fa-font-path: '~@fortawesome/fontawesome-free/webfonts'; +@import 'gmf/controllers/vars_desktop.scss'; +@import 'gmf/controllers/iframe_api.scss'; diff --git a/contribs/gmf/apps/mobile/Controller.js b/contribs/gmf/apps/mobile/Controller.js index 1350eae19511..d62b766ed5f8 100644 --- a/contribs/gmf/apps/mobile/Controller.js +++ b/contribs/gmf/apps/mobile/Controller.js @@ -26,7 +26,6 @@ * by the HTML page and the controller to provide the configuration. */ -import './sass/vars_mobile.scss'; import './sass/mobile.scss'; import angular from 'angular'; diff --git a/contribs/gmf/apps/mobile/sass/mobile.scss b/contribs/gmf/apps/mobile/sass/mobile.scss index c32769ae97f4..9d6c9fe1df34 100644 --- a/contribs/gmf/apps/mobile/sass/mobile.scss +++ b/contribs/gmf/apps/mobile/sass/mobile.scss @@ -21,6 +21,9 @@ * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ +@import './vars_mobile.scss'; +@import 'gmf/controllers/mobile.scss'; + gmf-displayquerywindow { position: inherit; diff --git a/contribs/gmf/apps/mobile_alt/Controller.js b/contribs/gmf/apps/mobile_alt/Controller.js index d5884a4508ba..daef0ab36293 100644 --- a/contribs/gmf/apps/mobile_alt/Controller.js +++ b/contribs/gmf/apps/mobile_alt/Controller.js @@ -26,7 +26,6 @@ * by the HTML page and the controller to provide the configuration. */ -import './sass/vars_mobile_alt.scss'; import './sass/mobile_alt.scss'; import angular from 'angular'; diff --git a/contribs/gmf/apps/mobile_alt/sass/mobile_alt.scss b/contribs/gmf/apps/mobile_alt/sass/mobile_alt.scss index 7d06b6535260..142aba635997 100644 --- a/contribs/gmf/apps/mobile_alt/sass/mobile_alt.scss +++ b/contribs/gmf/apps/mobile_alt/sass/mobile_alt.scss @@ -21,6 +21,9 @@ * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ +@import './vars_mobile_alt.scss'; +@import 'gmf/controllers/mobile.scss'; + #themes .gmf-theme-selector { display: flex; flex-wrap: wrap; diff --git a/contribs/gmf/apps/oeedit/Controller.js b/contribs/gmf/apps/oeedit/Controller.js index 21a92d8d2275..4a512d4ace13 100644 --- a/contribs/gmf/apps/oeedit/Controller.js +++ b/contribs/gmf/apps/oeedit/Controller.js @@ -26,7 +26,6 @@ * by the HTML page and the controller to provide the configuration. */ -import './sass/vars_oeedit.scss'; import './sass/oeedit.scss'; import angular from 'angular'; import gmfControllersAbstractDesktopController, { diff --git a/contribs/gmf/apps/oeedit/sass/oeedit.scss b/contribs/gmf/apps/oeedit/sass/oeedit.scss index fcd217de4c31..0939cb721f34 100644 --- a/contribs/gmf/apps/oeedit/sass/oeedit.scss +++ b/contribs/gmf/apps/oeedit/sass/oeedit.scss @@ -21,6 +21,9 @@ * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ +@import './vars_oeedit.scss'; +@import 'gmf/controllers/desktop.scss'; + header { .logo { background-image: url('../image/logo.png'); diff --git a/contribs/gmf/examples/backgroundlayerselector.js b/contribs/gmf/examples/backgroundlayerselector.js index 6b6ccdfe3c90..120f6eab0be1 100644 --- a/contribs/gmf/examples/backgroundlayerselector.js +++ b/contribs/gmf/examples/backgroundlayerselector.js @@ -20,8 +20,10 @@ MainController.$inject = ['gmfThemes']; // IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN // CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -import angular from 'angular'; +import './common_styles.scss'; import './backgroundlayerselector.css'; + +import angular from 'angular'; import gmfBackgroundlayerselectorModule from 'gmf/backgroundlayerselector/module'; import gmfMapComponent from 'gmf/map/component'; import gmfThemeThemes from 'gmf/theme/Themes'; diff --git a/contribs/gmf/examples/common_dependencies.js b/contribs/gmf/examples/common_dependencies.js index a850306541b3..b1af9f253f31 100644 --- a/contribs/gmf/examples/common_dependencies.js +++ b/contribs/gmf/examples/common_dependencies.js @@ -19,15 +19,11 @@ // IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN // CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -import 'gmf/sass/vars.scss'; import 'jquery'; import 'angular'; import 'angular-gettext'; import 'bootstrap'; -import 'ol/ol.css'; -import 'bootstrap/dist/css/bootstrap.css'; - /* * Auto redirect to https to prevent CORS exceptions */ diff --git a/contribs/gmf/examples/common_styles.scss b/contribs/gmf/examples/common_styles.scss new file mode 100644 index 000000000000..2de1664f2761 --- /dev/null +++ b/contribs/gmf/examples/common_styles.scss @@ -0,0 +1,8 @@ +@import 'ol/ol.css'; +@import 'bootstrap/dist/css/bootstrap.css'; +@import 'ngeo/sass/vars.scss'; +@import 'ngeo/sass/vars_only.scss'; +@import './vars.scss'; +@import 'ngeo/sass/typeahead.scss'; +@import 'ngeo/sass/jquery-ui.scss'; +@import 'ngeo/sass/font.scss'; diff --git a/contribs/gmf/examples/contextualdata.js b/contribs/gmf/examples/contextualdata.js index 8d34b341a088..746fbd49f457 100644 --- a/contribs/gmf/examples/contextualdata.js +++ b/contribs/gmf/examples/contextualdata.js @@ -19,8 +19,11 @@ // IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN // CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -import angular from 'angular'; +import './common_styles.scss'; +import 'ngeo/contextualdata/contextualdata.scss'; import './contextualdata.css'; + +import angular from 'angular'; import gmfContextualdataModule from 'gmf/contextualdata/module'; import gmfMapComponent from 'gmf/map/component'; import ngeoMiscFilters from 'ngeo/misc/filters'; diff --git a/contribs/gmf/examples/datepicker.js b/contribs/gmf/examples/datepicker.js index ae7053fa9e6f..4ebd79c23ff8 100644 --- a/contribs/gmf/examples/datepicker.js +++ b/contribs/gmf/examples/datepicker.js @@ -20,8 +20,10 @@ MainController.$inject = ['ngeoWMSTime']; // IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN // CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -import angular from 'angular'; import './datepicker.css'; +import './common_styles.scss'; + +import angular from 'angular'; import ngeoMiscDatepickerComponent from 'ngeo/misc/datepickerComponent'; import ngeoMiscWMSTime from 'ngeo/misc/WMSTime'; import {TimePropertyWidgetEnum, TimePropertyResolutionEnum, TimePropertyModeEnum} from 'ngeo/datasource/OGC'; diff --git a/contribs/gmf/examples/displayquerygrid.js b/contribs/gmf/examples/displayquerygrid.js index 6c532112257a..70b08ea63150 100644 --- a/contribs/gmf/examples/displayquerygrid.js +++ b/contribs/gmf/examples/displayquerygrid.js @@ -21,9 +21,11 @@ QueryresultController.$inject = ['ngeoQueryResult']; // IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN // CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -import angular from 'angular'; +import './common_styles.scss'; import './displayquerygrid.css'; import './gmf-hidden.inc.css'; + +import angular from 'angular'; import gmfDatasourceManager from 'gmf/datasource/Manager'; import gmfLayertreeComponent from 'gmf/layertree/component'; import gmfMapComponent from 'gmf/map/component'; diff --git a/contribs/gmf/examples/displayquerywindow.js b/contribs/gmf/examples/displayquerywindow.js index 2f45c5618585..c1f4ce201a51 100644 --- a/contribs/gmf/examples/displayquerywindow.js +++ b/contribs/gmf/examples/displayquerywindow.js @@ -21,9 +21,11 @@ QueryresultController.$inject = ['ngeoQueryResult']; // IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN // CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -import angular from 'angular'; +import './common_styles.scss'; import './displayquerywindow.css'; import './gmf-hidden.inc.css'; + +import angular from 'angular'; import gmfDatasourceManager from 'gmf/datasource/Manager'; import gmfLayertreeComponent from 'gmf/layertree/component'; import gmfMapComponent from 'gmf/map/component'; diff --git a/contribs/gmf/examples/drawfeature.js b/contribs/gmf/examples/drawfeature.js index b29075d0297b..819019413830 100644 --- a/contribs/gmf/examples/drawfeature.js +++ b/contribs/gmf/examples/drawfeature.js @@ -20,8 +20,10 @@ MainController.$inject = ['$scope', 'ngeoFeatureHelper', 'ngeoFeatures', 'ngeoTo // IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN // CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -import angular from 'angular'; +import './common_styles.scss'; import './drawfeature.css'; + +import angular from 'angular'; import 'bootstrap/js/src/tooltip'; import gmfMapComponent from 'gmf/map/component'; import ngeoMapFeatureOverlayMgr from 'ngeo/map/FeatureOverlayMgr'; diff --git a/contribs/gmf/examples/elevation.js b/contribs/gmf/examples/elevation.js index 3f34bb9e2ef4..5c738a9c8b60 100644 --- a/contribs/gmf/examples/elevation.js +++ b/contribs/gmf/examples/elevation.js @@ -19,8 +19,10 @@ // IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN // CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -import angular from 'angular'; +import './common_styles.scss'; import './elevation.css'; + +import angular from 'angular'; import gmfMapComponent from 'gmf/map/component'; import gmfRasterModule from 'gmf/raster/module'; import EPSG2056 from 'ngeo/proj/EPSG_2056'; diff --git a/contribs/gmf/examples/featurestyle.js b/contribs/gmf/examples/featurestyle.js index 31e84163cf7c..809c7acc9c4a 100644 --- a/contribs/gmf/examples/featurestyle.js +++ b/contribs/gmf/examples/featurestyle.js @@ -20,8 +20,10 @@ MainController.$inject = ['$scope', 'ngeoFeatureHelper']; // IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN // CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -import angular from 'angular'; +import './common_styles.scss'; import './featurestyle.css'; + +import angular from 'angular'; import gmfDrawingFeatureStyleComponent from 'gmf/drawing/featureStyleComponent'; import gmfMapComponent from 'gmf/map/component'; import ngeoFormatFeatureProperties from 'ngeo/format/FeatureProperties'; diff --git a/contribs/gmf/examples/importdatasource.js b/contribs/gmf/examples/importdatasource.js index 32aa52d6a695..a0dcfd52c5e1 100644 --- a/contribs/gmf/examples/importdatasource.js +++ b/contribs/gmf/examples/importdatasource.js @@ -19,9 +19,13 @@ // IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN // CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. +import 'ngeo/layertree/common.scss'; +import 'ngeo/layertree/timeslider.scss'; +import './common_styles.scss'; +import './importdatasource.css'; + // Todo - use the 'Filter' theme instead if the 'Edit' theme import angular from 'angular'; -import './importdatasource.css'; import 'bootstrap/js/src/tooltip'; import gmfDatasourceManager from 'gmf/datasource/Manager'; import gmfImportImportdatasourceComponent from 'gmf/import/importdatasourceComponent'; diff --git a/contribs/gmf/examples/layertree.js b/contribs/gmf/examples/layertree.js index f205ad1dc6a5..d83d4ec6fff2 100644 --- a/contribs/gmf/examples/layertree.js +++ b/contribs/gmf/examples/layertree.js @@ -20,8 +20,12 @@ MainController.$inject = ['gmfTreeManager', 'gmfThemes', 'gmfThemeManager', 'nge // IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN // CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -import angular from 'angular'; +import 'ngeo/layertree/common.scss'; +import 'ngeo/layertree/timeslider.scss'; +import './common_styles.scss'; import './layertree.css'; + +import angular from 'angular'; import gmfDisclaimerModule from 'gmf/disclaimer/module'; import gmfLayertreeComponent from 'gmf/layertree/component'; import gmfLayertreeTreeManager from 'gmf/layertree/TreeManager'; diff --git a/contribs/gmf/examples/layertreeadd.js b/contribs/gmf/examples/layertreeadd.js index bb672ebdd7ec..7652a5168714 100644 --- a/contribs/gmf/examples/layertreeadd.js +++ b/contribs/gmf/examples/layertreeadd.js @@ -20,8 +20,12 @@ MainController.$inject = ['gmfTreeManager', 'gmfThemes', 'gmfThemeManager', 'nge // IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN // CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -import angular from 'angular'; +import 'ngeo/layertree/common.scss'; +import 'ngeo/layertree/timeslider.scss'; +import './common_styles.scss'; import './layertreeadd.css'; + +import angular from 'angular'; import gmfDisclaimerModule from 'gmf/disclaimer/module'; import gmfLayertreeComponent from 'gmf/layertree/component'; import gmfLayertreeTreeManager from 'gmf/layertree/TreeManager'; diff --git a/contribs/gmf/examples/mobilemeasure.js b/contribs/gmf/examples/mobilemeasure.js index 2401a9df9fc6..a3f2b7768ef9 100644 --- a/contribs/gmf/examples/mobilemeasure.js +++ b/contribs/gmf/examples/mobilemeasure.js @@ -20,8 +20,10 @@ MainController.$inject = ['gmfPermalink']; // IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN // CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -import angular from 'angular'; +import './common_styles.scss'; import './mobilemeasure.css'; + +import angular from 'angular'; import gmfMapComponent from 'gmf/map/component'; import gmfPermalinkPermalink from 'gmf/permalink/Permalink'; import gmfMobileMeasureAreaComponent from 'gmf/mobile/measure/areaComponent'; diff --git a/contribs/gmf/examples/mouseposition.js b/contribs/gmf/examples/mouseposition.js index 393f1f645d94..8bb302f7daad 100644 --- a/contribs/gmf/examples/mouseposition.js +++ b/contribs/gmf/examples/mouseposition.js @@ -19,7 +19,9 @@ // IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN // CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. +import './common_styles.scss'; import './mouseposition.css'; + import angular from 'angular'; import gmfMapModule from 'gmf/map/module'; import gmfMapComponent from 'gmf/map/component'; diff --git a/contribs/gmf/examples/objectediting.js b/contribs/gmf/examples/objectediting.js index 48cd79ebfa57..b64595100cdd 100644 --- a/contribs/gmf/examples/objectediting.js +++ b/contribs/gmf/examples/objectediting.js @@ -20,8 +20,10 @@ MainController.$inject = ['gmfObjectEditingManager', 'gmfThemes', 'gmfTreeManage // IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN // CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -import angular from 'angular'; +import './common_styles.scss'; import './objectediting.css'; + +import angular from 'angular'; import gmfLayertreeComponent from 'gmf/layertree/component'; import gmfLayertreeTreeManager from 'gmf/layertree/TreeManager'; import gmfMapComponent from 'gmf/map/component'; diff --git a/contribs/gmf/examples/objecteditinghub.js b/contribs/gmf/examples/objecteditinghub.js index 88164a0ac4ae..9b9a8830443b 100644 --- a/contribs/gmf/examples/objecteditinghub.js +++ b/contribs/gmf/examples/objecteditinghub.js @@ -20,8 +20,10 @@ MainController.$inject = ['$http', '$q', '$scope', 'gmfThemes', 'gmfXSDAttribute // IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN // CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -import angular from 'angular'; +import './common_styles.scss'; import './objecteditinghub.css'; + +import angular from 'angular'; import gmfEditingXSDAttributes from 'gmf/editing/XSDAttributes'; import gmfObjecteditingManager, {ObjecteditingParam} from 'gmf/objectediting/Manager'; import gmfThemeThemes from 'gmf/theme/Themes'; diff --git a/contribs/gmf/examples/options.js b/contribs/gmf/examples/options.js index ef380cda9eb7..1587ea3ab6d6 100644 --- a/contribs/gmf/examples/options.js +++ b/contribs/gmf/examples/options.js @@ -19,8 +19,6 @@ // IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN // CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -import './vars.scss'; - /** * Base url for the GeoMapFish demo server. * diff --git a/contribs/gmf/examples/permalink.js b/contribs/gmf/examples/permalink.js index 562649f366c7..cea291753879 100644 --- a/contribs/gmf/examples/permalink.js +++ b/contribs/gmf/examples/permalink.js @@ -19,7 +19,9 @@ // IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN // CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. +import './common_styles.scss'; import './permalink.css'; + import angular from 'angular'; import gmfMapModule from 'gmf/map/module'; import gmfMapComponent from 'gmf/map/component'; diff --git a/contribs/gmf/examples/print.js b/contribs/gmf/examples/print.js index 4de443ae0883..f7870b016a04 100644 --- a/contribs/gmf/examples/print.js +++ b/contribs/gmf/examples/print.js @@ -20,9 +20,11 @@ MainController.$inject = ['gmfThemes']; // IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN // CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -import angular from 'angular'; +import './common_styles.scss'; import './print.css'; import './gmf-hidden.inc.css'; + +import angular from 'angular'; import gmfLayertreeComponent from 'gmf/layertree/component'; import gmfMapComponent from 'gmf/map/component'; import gmfPrintComponent from 'gmf/print/component'; diff --git a/contribs/gmf/examples/profile.js b/contribs/gmf/examples/profile.js index f64e86510739..720c4ade6ea0 100644 --- a/contribs/gmf/examples/profile.js +++ b/contribs/gmf/examples/profile.js @@ -20,8 +20,11 @@ MainController.$inject = ['$scope']; // IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN // CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -import angular from 'angular'; +import './common_styles.scss'; import './profile.css'; +import 'ngeo/profile/profile.scss'; + +import angular from 'angular'; import gmfPermalinkPermalink from 'gmf/permalink/Permalink'; import gmfMapComponent from 'gmf/map/component'; import ngeoMapFeatureOverlayMgr from 'ngeo/map/FeatureOverlayMgr'; diff --git a/contribs/gmf/examples/search.js b/contribs/gmf/examples/search.js index bac3ce435878..3629fdde9fe7 100644 --- a/contribs/gmf/examples/search.js +++ b/contribs/gmf/examples/search.js @@ -20,8 +20,11 @@ MainController.$inject = ['gmfThemes']; // IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN // CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -import angular from 'angular'; +import './common_styles.scss'; import './search.css'; +import 'ngeo/search/search.scss'; + +import angular from 'angular'; import gmfMapComponent from 'gmf/map/component'; import ngeoMapFeatureOverlayMgr from 'ngeo/map/FeatureOverlayMgr'; import gmfSearchModule from 'gmf/search/module'; diff --git a/contribs/gmf/examples/share.js b/contribs/gmf/examples/share.js index 9f158790f398..ae95f9c6d9f0 100644 --- a/contribs/gmf/examples/share.js +++ b/contribs/gmf/examples/share.js @@ -19,8 +19,10 @@ // IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN // CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -import angular from 'angular'; +import './common_styles.scss'; import './share.css'; + +import angular from 'angular'; import gmfPermalinkShareComponent from 'gmf/permalink/shareComponent'; import ngeoMessageModalComponent from 'ngeo/message/modalComponent'; import options from './options'; diff --git a/contribs/gmf/examples/simple.js b/contribs/gmf/examples/simple.js index abd8600799be..13efe044bbb2 100644 --- a/contribs/gmf/examples/simple.js +++ b/contribs/gmf/examples/simple.js @@ -19,7 +19,9 @@ // IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN // CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. +import './common_styles.scss'; import './simple.css'; + import angular from 'angular'; import gmfMapComponent from 'gmf/map/component'; import ngeoMapModule from 'ngeo/map/module'; diff --git a/contribs/gmf/examples/themeselector.js b/contribs/gmf/examples/themeselector.js index 43da56513dff..7f08a834ea5f 100644 --- a/contribs/gmf/examples/themeselector.js +++ b/contribs/gmf/examples/themeselector.js @@ -20,8 +20,10 @@ MainController.$inject = ['$http', 'gmfThemes', 'gmfThemeManager']; // IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN // CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -import angular from 'angular'; +import './common_styles.scss'; import './themeselector.css'; + +import angular from 'angular'; import gmfThemeModule from 'gmf/theme/module'; import gmfLayertreeTreeManager from 'gmf/layertree/TreeManager'; import options from './options'; diff --git a/contribs/gmf/examples/timeslider.js b/contribs/gmf/examples/timeslider.js index ab1edf7633d5..391fdb6c7ae0 100644 --- a/contribs/gmf/examples/timeslider.js +++ b/contribs/gmf/examples/timeslider.js @@ -20,7 +20,10 @@ MainController.$inject = ['$scope', 'ngeoWMSTime']; // IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN // CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. +import 'ngeo/layertree/timeslider.scss'; +import './common_styles.scss'; import './timeslider.css'; + import angular from 'angular'; import gmfLayertreeTimeSliderComponent from 'gmf/layertree/timeSliderComponent'; import ngeoMiscWMSTime from 'ngeo/misc/WMSTime'; diff --git a/contribs/gmf/examples/wfspermalink.js b/contribs/gmf/examples/wfspermalink.js index 61a3b72a7854..cbcba3241859 100644 --- a/contribs/gmf/examples/wfspermalink.js +++ b/contribs/gmf/examples/wfspermalink.js @@ -19,8 +19,10 @@ // IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN // CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -import angular from 'angular'; +import './common_styles.scss'; import './wfspermalink.css'; + +import angular from 'angular'; import gmfMapModule from 'gmf/map/module'; import gmfMapComponent from 'gmf/map/component'; import gmfQueryWindowComponent from 'gmf/query/windowComponent'; diff --git a/contribs/gmf/examples/xsdattributes.js b/contribs/gmf/examples/xsdattributes.js index 80166c48cc2c..5b360b318a40 100644 --- a/contribs/gmf/examples/xsdattributes.js +++ b/contribs/gmf/examples/xsdattributes.js @@ -20,14 +20,15 @@ MainController.$inject = ['$timeout', 'gmfThemes', 'gmfXSDAttributes']; // IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN // CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -import angular from 'angular'; +import './common_styles.scss'; import './xsdattributes.css'; + +import angular from 'angular'; import gmfThemeThemes from 'gmf/theme/Themes'; import gmfEditingXSDAttributes from 'gmf/editing/XSDAttributes'; import ngeoEditingAttributesComponent from 'ngeo/editing/attributesComponent'; import {getGeometryAttribute} from 'ngeo/format/XSDAttribute'; import olFeature from 'ol/Feature'; -import 'jquery-datetimepicker/jquery.datetimepicker.css'; import options from './options'; /** @type {angular.IModule} **/ diff --git a/docs/guidelines.md b/docs/guidelines.md index 478ac6120547..e258246be8f6 100644 --- a/docs/guidelines.md +++ b/docs/guidelines.md @@ -391,20 +391,21 @@ We choose units that don't depend on parent tags and are relative. ### CSS variable -Note: Not supported by IE - Now it's possible to configure some variable in the CSS to make the variable, -they should be defined and used like that (with backward compatilility for IE): +they should be defined and used like that: - In the `src/sass/vars_only.scss` file: `$my-variable: ... !default;`. +- In a `scss` file importing `vars_only.scss`, if you want to redefine the default (import after definition): + `$my-variable: ... !default;`. + `@import ngeo/sass/vars_only.scss`. - In the `sass/vars.scss` file, in the `:root` section: `--my-variable: #{$my-variable};`. - In your scss file: `the-css-property: $my-css-variable;`, `the-css-property: var(--my-css-variable);`. -All collors calculated from `brand-primary` and `brand-secoundary` should be exposed as variable, and they should also be calculates in the `src/controllers/calculateCssVars.js` file. +All colors calculated from `brand-primary` and `brand-secoundary` should be exposed as variable, and they should also be calculates in the `src/controllers/calculateCssVars.js` file. ## Property renaming diff --git a/examples/animation.js b/examples/animation.js index 6295c57acc7f..366ddc42394e 100644 --- a/examples/animation.js +++ b/examples/animation.js @@ -20,7 +20,9 @@ MainController.$inject = ['$timeout']; // IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN // CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. +import './common_styles.scss'; import './animation.css'; + import angular from 'angular'; import olMap from 'ol/Map'; import olView from 'ol/View'; diff --git a/examples/asitvd.js b/examples/asitvd.js index e5a66be10742..917911d93c58 100644 --- a/examples/asitvd.js +++ b/examples/asitvd.js @@ -19,6 +19,8 @@ // IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN // CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. +import './common_styles.scss'; + import angular from 'angular'; import ngeoSourceAsitVD from 'ngeo/source/AsitVD'; import EPSG2056 from 'ngeo/proj/EPSG_2056'; diff --git a/examples/attributes.js b/examples/attributes.js index 62f227bd0418..ebef39c63ae7 100644 --- a/examples/attributes.js +++ b/examples/attributes.js @@ -20,6 +20,8 @@ MainController.$inject = ['$http', '$timeout', '$scope']; // IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN // CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. +import './common_styles.scss'; + import angular from 'angular'; import ngeoFormatXSDAttribute from 'ngeo/format/XSDAttribute'; import ngeoEditingAttributesComponent from 'ngeo/editing/attributesComponent'; diff --git a/examples/backgroundlayer.js b/examples/backgroundlayer.js index d8661e064176..b718bbb46f8a 100644 --- a/examples/backgroundlayer.js +++ b/examples/backgroundlayer.js @@ -21,7 +21,9 @@ BackgroundlayerController.$inject = ['$http', 'ngeoBackgroundLayerMgr']; // IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN // CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. +import './common_styles.scss'; import './backgroundlayer.css'; + import angular from 'angular'; import ngeoSourceAsitVD from 'ngeo/source/AsitVD'; import {MAPSERVER_PROXY} from './url'; diff --git a/examples/backgroundlayerdropdown.js b/examples/backgroundlayerdropdown.js index 92366f885adf..ae0ed068e1c4 100644 --- a/examples/backgroundlayerdropdown.js +++ b/examples/backgroundlayerdropdown.js @@ -21,7 +21,9 @@ BackgroundlayerController.$inject = ['$http', 'ngeoBackgroundLayerMgr']; // IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN // CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. +import './common_styles.scss'; import './backgroundlayerdropdown.css'; + import angular from 'angular'; import ngeoSourceAsitVD from 'ngeo/source/AsitVD'; import {MAPSERVER_PROXY} from './url'; diff --git a/examples/colorpicker.js b/examples/colorpicker.js index c5b4d4576623..ce33532dbc70 100644 --- a/examples/colorpicker.js +++ b/examples/colorpicker.js @@ -20,7 +20,9 @@ MainController.$inject = ['$scope']; // IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN // CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. +import './common_styles.scss'; import './colorpicker.css'; + import angular from 'angular'; import ngeoMiscColorpickerComponent from 'ngeo/misc/colorpickerComponent'; diff --git a/examples/common_dependencies.js b/examples/common_dependencies.js index 542190ee21c8..33007e9fd69f 100644 --- a/examples/common_dependencies.js +++ b/examples/common_dependencies.js @@ -19,16 +19,10 @@ // IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN // CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -import './common_dependencies.scss'; -import './base.css'; import 'jquery'; import 'angular'; import 'angular-gettext'; import 'bootstrap'; - -import 'ol/ol.css'; -import 'bootstrap/dist/css/bootstrap.css'; - /* * Auto redirect to https to prevent CORS exceptions */ diff --git a/examples/common_styles.scss b/examples/common_styles.scss new file mode 100644 index 000000000000..c9538178ad7e --- /dev/null +++ b/examples/common_styles.scss @@ -0,0 +1,7 @@ +@import 'ol/ol.css'; +@import 'ngeo/sass/font.scss'; +@import 'bootstrap/dist/css/bootstrap.css'; +@import 'ngeo/sass/typeahead.scss'; +@import 'ngeo/sass/jquery-ui.scss'; +@import './vars.scss'; +@import './base.css'; diff --git a/examples/control.js b/examples/control.js index d640f3d54902..11a275536481 100644 --- a/examples/control.js +++ b/examples/control.js @@ -19,6 +19,8 @@ // IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN // CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. +import './common_styles.scss'; + import angular from 'angular'; import gmfMapComponent from 'gmf/map/component'; import options from './options'; diff --git a/examples/createfeature.js b/examples/createfeature.js index a2eac254fdab..f59fb4c914e4 100644 --- a/examples/createfeature.js +++ b/examples/createfeature.js @@ -20,7 +20,9 @@ MainController.$inject = ['ngeoToolActivateMgr']; // IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN // CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. +import './common_styles.scss'; import './createfeature.css'; + import angular from 'angular'; import ngeoEditingCreatefeatureComponent from 'ngeo/editing/createfeatureComponent'; import ngeoGeometryType from 'ngeo/GeometryType'; diff --git a/examples/datepicker.js b/examples/datepicker.js index f80b6153d379..4f56bae40b34 100644 --- a/examples/datepicker.js +++ b/examples/datepicker.js @@ -21,6 +21,8 @@ MainController.$inject = ['ngeoTime']; // CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. import './datepicker.css'; +import './common_styles.scss'; + import angular from 'angular'; import ngeoMiscDatepickerComponent from 'ngeo/misc/datepickerComponent'; import ngeoMiscTime from 'ngeo/misc/Time'; diff --git a/examples/datetimepicker.js b/examples/datetimepicker.js index a3cc6ee575cf..299d08327a45 100644 --- a/examples/datetimepicker.js +++ b/examples/datetimepicker.js @@ -19,7 +19,10 @@ // IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN // CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. +import './common_styles.scss'; import './datetimepicker.scss'; +import 'jquery-datetimepicker/jquery.datetimepicker.css'; + import angular from 'angular'; import ngeoMiscDatetimepickerComponent from 'ngeo/misc/datetimepickerComponent'; diff --git a/examples/disclaimer.js b/examples/disclaimer.js index 50a4ef07c870..cd4861c39112 100644 --- a/examples/disclaimer.js +++ b/examples/disclaimer.js @@ -20,7 +20,9 @@ MainController.$inject = ['ngeoDisclaimer']; // IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN // CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. +import './common_styles.scss'; import './disclaimer.css'; + import 'bootstrap/js/src/tooltip'; import angular from 'angular'; import ngeoMessageDisclaimer from 'ngeo/message/Disclaimer'; diff --git a/examples/displaywindow.js b/examples/displaywindow.js index 3db9cadbdc82..05718b86958e 100644 --- a/examples/displaywindow.js +++ b/examples/displaywindow.js @@ -20,7 +20,9 @@ MainController.$inject = ['$scope']; // IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN // CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. +import './common_styles.scss'; import './displaywindow.css'; + import angular from 'angular'; import ngeoMessageDisplaywindowComponent from 'ngeo/message/displaywindowComponent'; diff --git a/examples/drawfeature.js b/examples/drawfeature.js index 45e78a5cb6fc..04545a7a7d71 100644 --- a/examples/drawfeature.js +++ b/examples/drawfeature.js @@ -20,7 +20,9 @@ MainController.$inject = ['$scope', 'ngeoFeatures', 'ngeoToolActivateMgr']; // IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN // CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. +import './common_styles.scss'; import './drawfeature.css'; + import angular from 'angular'; import ngeoDrawModule from 'ngeo/draw/module'; import gmfMapComponent from 'gmf/map/component'; diff --git a/examples/elevationProfile.js b/examples/elevationProfile.js index d94b26eb0751..ed2b9b467671 100644 --- a/examples/elevationProfile.js +++ b/examples/elevationProfile.js @@ -20,7 +20,9 @@ MainController.$inject = ['$http', '$scope']; // IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN // CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. +import './common_styles.scss'; import './elevationProfile.css'; + import angular from 'angular'; import EPSG2056 from 'ngeo/proj/EPSG_2056'; import {MAPSERVER_PROXY} from './url'; diff --git a/examples/error.js b/examples/error.js index c4c21ae41473..cfc16a072b3a 100644 --- a/examples/error.js +++ b/examples/error.js @@ -19,6 +19,8 @@ // IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN // CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. +import './common_styles.scss'; + import angular from 'angular'; import olMap from 'ol/Map'; import olView from 'ol/View'; diff --git a/examples/googlestreetview.js b/examples/googlestreetview.js index 959c7d364870..8ec95c32b1dc 100644 --- a/examples/googlestreetview.js +++ b/examples/googlestreetview.js @@ -20,7 +20,9 @@ MainController.$inject = ['ngeoToolActivateMgr']; // IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN // CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. +import './common_styles.scss'; import './googlestreetview.css'; + import angular from 'angular'; import olMap from 'ol/Map'; import olView from 'ol/View'; diff --git a/examples/grid.js b/examples/grid.js index d09306058a53..555aa2d62b67 100644 --- a/examples/grid.js +++ b/examples/grid.js @@ -19,7 +19,9 @@ // IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN // CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. +import './common_styles.scss'; import './grid.css'; + import angular from 'angular'; import ngeoGridConfig from 'ngeo/grid/Config'; import ngeoGridModule from 'ngeo/grid/module'; diff --git a/examples/importfeatures.js b/examples/importfeatures.js index 7ba36d5af9fe..bcb125b4733b 100644 --- a/examples/importfeatures.js +++ b/examples/importfeatures.js @@ -20,6 +20,8 @@ MainController.$inject = ['$scope']; // IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN // CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. +import './common_styles.scss'; + import angular from 'angular'; import gmfMapComponent from 'gmf/map/component'; import options from './options'; diff --git a/examples/interactionbtngroup.js b/examples/interactionbtngroup.js index e9a5cfbbbd54..1d2974bfd63e 100644 --- a/examples/interactionbtngroup.js +++ b/examples/interactionbtngroup.js @@ -19,7 +19,9 @@ // IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN // CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. +import './common_styles.scss'; import './interactionbtngroup.css'; + import angular from 'angular'; import gmfMapComponent from 'gmf/map/component'; import options from './options'; diff --git a/examples/layerorder.js b/examples/layerorder.js index dc8f1ed1d52f..769e11871994 100644 --- a/examples/layerorder.js +++ b/examples/layerorder.js @@ -20,7 +20,9 @@ MainController.$inject = ['$scope']; // IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN // CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. +import './common_styles.scss'; import './layerorder.css'; + import angular from 'angular'; import gmfMapComponent from 'gmf/map/component'; import options from './options'; diff --git a/examples/locationsearch.js b/examples/locationsearch.js index c5882f035fed..f8c4019f656e 100644 --- a/examples/locationsearch.js +++ b/examples/locationsearch.js @@ -20,7 +20,10 @@ SearchController.$inject = ['ngeoCreateLocationSearchBloodhound']; // IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN // CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. +import './common_styles.scss'; import './locationsearch.css'; +import 'ngeo/search/search.scss'; + import angular from 'angular'; import gmfMapComponent from 'gmf/map/component'; import options from './options'; diff --git a/examples/mapfishprint.js b/examples/mapfishprint.js index 219e02230b0f..621b79331204 100644 --- a/examples/mapfishprint.js +++ b/examples/mapfishprint.js @@ -20,6 +20,8 @@ MainController.$inject = ['$timeout', 'ngeoCreatePrint', 'ngeoPrintUtils']; // IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN // CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. +import './common_styles.scss'; + import angular from 'angular'; import {MAPSERVER_PROXY, PRINT_PROXY} from './url'; import EPSG2056 from 'ngeo/proj/EPSG_2056'; diff --git a/examples/mapillarystreetview.js b/examples/mapillarystreetview.js index 0445263bfb82..5b3513d7f337 100644 --- a/examples/mapillarystreetview.js +++ b/examples/mapillarystreetview.js @@ -20,7 +20,10 @@ MainController.$inject = ['ngeoToolActivateMgr']; // IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN // CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. +import './common_styles.scss'; import './mapillarystreetview.css'; +import 'mapillary-js/dist/mapillary.css'; + import angular from 'angular'; import olMap from 'ol/Map'; import olView from 'ol/View'; diff --git a/examples/mapswipe.js b/examples/mapswipe.js index 3d7373fb0bad..1c510f166b2d 100644 --- a/examples/mapswipe.js +++ b/examples/mapswipe.js @@ -19,7 +19,9 @@ // IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN // CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. +import './common_styles.scss'; import './mapswipe.css'; + import angular from 'angular'; import ngeoMapswipeModule from 'ngeo/map/swipe'; import gmfMapComponent from 'gmf/map/component'; diff --git a/examples/mask.js b/examples/mask.js index c4c21ae41473..cfc16a072b3a 100644 --- a/examples/mask.js +++ b/examples/mask.js @@ -19,6 +19,8 @@ // IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN // CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. +import './common_styles.scss'; + import angular from 'angular'; import olMap from 'ol/Map'; import olView from 'ol/View'; diff --git a/examples/measure-ref.png b/examples/measure-ref.png index a226030217b8..f71d2adce3d2 100644 Binary files a/examples/measure-ref.png and b/examples/measure-ref.png differ diff --git a/examples/measure.js b/examples/measure.js index 7877b373a77e..6476a40aa191 100644 --- a/examples/measure.js +++ b/examples/measure.js @@ -21,6 +21,8 @@ MeasuretoolsController.$inject = ['$scope', '$compile', '$sce', '$filter', 'gett // CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. import './measure.css'; +import './common_styles.scss'; + import angular from 'angular'; import ngeoInteractionMeasureArea from 'ngeo/interaction/MeasureArea'; import ngeoInteractionMeasureAzimut from 'ngeo/interaction/MeasureAzimut'; diff --git a/examples/mobilegeolocation.js b/examples/mobilegeolocation.js index e31495154ff8..420c5fa9ff5f 100644 --- a/examples/mobilegeolocation.js +++ b/examples/mobilegeolocation.js @@ -20,7 +20,9 @@ MainController.$inject = ['$scope']; // IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN // CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. +import './common_styles.scss'; import './mobilegeolocation.css'; + import angular from 'angular'; import olMap from 'ol/Map'; import olView from 'ol/View'; diff --git a/examples/modal.js b/examples/modal.js index f916b2680c4b..7df4380a66a8 100644 --- a/examples/modal.js +++ b/examples/modal.js @@ -19,6 +19,8 @@ // IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN // CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. +import './common_styles.scss'; + import angular from 'angular'; import ngeoMessageModalComponent from 'ngeo/message/modalComponent'; diff --git a/examples/modifycircle.js b/examples/modifycircle.js index 087c80e24c2d..45522732978f 100644 --- a/examples/modifycircle.js +++ b/examples/modifycircle.js @@ -19,6 +19,8 @@ // IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN // CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. +import './common_styles.scss'; + import angular from 'angular'; import ngeoFormatFeatureProperties from 'ngeo/format/FeatureProperties'; import ngeoInteractionModifyCircle from 'ngeo/interaction/ModifyCircle'; diff --git a/examples/modifyrectangle.js b/examples/modifyrectangle.js index 40062befdd27..f9e4029f296c 100644 --- a/examples/modifyrectangle.js +++ b/examples/modifyrectangle.js @@ -19,6 +19,8 @@ // IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN // CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. +import './common_styles.scss'; + import angular from 'angular'; import ngeoInteractionModifyRectangle from 'ngeo/interaction/ModifyRectangle'; import olMap from 'ol/Map'; diff --git a/examples/notification.js b/examples/notification.js index dccf2bda483a..0cfc3b0da6fd 100644 --- a/examples/notification.js +++ b/examples/notification.js @@ -19,7 +19,9 @@ // IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN // CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. +import './common_styles.scss'; import './notification.css'; + import 'bootstrap/js/src/tooltip'; import angular from 'angular'; import {MessageType} from 'ngeo/message/Message'; diff --git a/examples/options.js b/examples/options.js index ef380cda9eb7..1587ea3ab6d6 100644 --- a/examples/options.js +++ b/examples/options.js @@ -19,8 +19,6 @@ // IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN // CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -import './vars.scss'; - /** * Base url for the GeoMapFish demo server. * diff --git a/examples/permalink.js b/examples/permalink.js index 09afbb75f40e..bdfac861de88 100644 --- a/examples/permalink.js +++ b/examples/permalink.js @@ -21,6 +21,8 @@ MapComponentController.$inject = ['ngeoLocation', 'ngeoDebounce']; // IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN // CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. +import './common_styles.scss'; + import angular from 'angular'; import ngeoFormatFeatureHash from 'ngeo/format/FeatureHash'; import './permalink.css'; diff --git a/examples/popover.js b/examples/popover.js index 0612209d9b0a..2e1f78967542 100644 --- a/examples/popover.js +++ b/examples/popover.js @@ -19,7 +19,9 @@ // IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN // CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. +import './common_styles.scss'; import './popover.css'; + import angular from 'angular'; import ngeoMessagePopoverComponent from 'ngeo/message/popoverComponent'; diff --git a/examples/popupservice.js b/examples/popupservice.js index 6f56d0b57593..4ca379d57131 100644 --- a/examples/popupservice.js +++ b/examples/popupservice.js @@ -20,7 +20,9 @@ MainController.$inject = ['$sce', 'ngeoCreatePopup']; // IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN // CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. +import './common_styles.scss'; import './popupservice.css'; + import 'bootstrap/js/src/tooltip'; import angular from 'angular'; import ngeoMessagePopup from 'ngeo/message/Popup'; diff --git a/examples/query.js b/examples/query.js index 25acb12f8ed5..90ff5423df03 100644 --- a/examples/query.js +++ b/examples/query.js @@ -21,6 +21,8 @@ QueryresultController.$inject = ['ngeoQueryResult']; // IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN // CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. +import './common_styles.scss'; + import angular from 'angular'; import {MAPSERVER_PROXY, MAPSERVER_WFS_FEATURE_NS} from './url'; import './base.css'; diff --git a/examples/recenter.js b/examples/recenter.js index 12891705d26e..4be14c4315a1 100644 --- a/examples/recenter.js +++ b/examples/recenter.js @@ -19,6 +19,8 @@ // IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN // CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. +import './common_styles.scss'; + import angular from 'angular'; import olMap from 'ol/Map'; import olView from 'ol/View'; diff --git a/examples/rotate.js b/examples/rotate.js index 84a30d531431..46845adedff0 100644 --- a/examples/rotate.js +++ b/examples/rotate.js @@ -19,6 +19,8 @@ // IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN // CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. +import './common_styles.scss'; + import angular from 'angular'; import ngeoInteractionRotate from 'ngeo/interaction/Rotate'; import olCollection from 'ol/Collection'; diff --git a/examples/routing.js b/examples/routing.js index 71cf51536725..6058887f0944 100644 --- a/examples/routing.js +++ b/examples/routing.js @@ -22,10 +22,10 @@ /** * This example shows the ngeo routing directive. */ +import './common_styles.scss'; +import 'ngeo/routing/routing.scss'; import './routing.css'; -import 'ol/ol.css'; -import 'bootstrap/dist/css/bootstrap.css'; -import '@fortawesome/fontawesome-free/css/fontawesome.min.css'; + import angular from 'angular'; import gmfMapComponent from 'gmf/map/component'; import options from './options'; diff --git a/examples/scaleselector.js b/examples/scaleselector.js index 57e6644a333a..c8d7d107f095 100644 --- a/examples/scaleselector.js +++ b/examples/scaleselector.js @@ -20,7 +20,9 @@ MainController.$inject = ['$scope']; // IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN // CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. +import './common_styles.scss'; import './scaleselector.css'; + import angular from 'angular'; import ngeoScaleSelector from 'ngeo/map/scaleselector'; import olMap from 'ol/Map'; diff --git a/examples/search.js b/examples/search.js index 7313ba2e2608..f608a1caa105 100644 --- a/examples/search.js +++ b/examples/search.js @@ -20,9 +20,12 @@ SearchController.$inject = ['$element', '$rootScope', '$compile', 'ngeoSearchCre // IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN // CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. +import './common_styles.scss'; +import './search.css'; +import 'ngeo/search/search.scss'; + import angular from 'angular'; import {SEARCH} from './url'; -import './search.css'; import gmfMapComponent from 'gmf/map/component'; import options from './options'; import {proj as EPSG2056} from 'ngeo/proj/EPSG_2056'; diff --git a/examples/simple.js b/examples/simple.js index c4c21ae41473..cfc16a072b3a 100644 --- a/examples/simple.js +++ b/examples/simple.js @@ -19,6 +19,8 @@ // IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN // CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. +import './common_styles.scss'; + import angular from 'angular'; import olMap from 'ol/Map'; import olView from 'ol/View'; diff --git a/examples/toolActivate.js b/examples/toolActivate.js index ac61c8e0f4b2..e1afe3c875dd 100644 --- a/examples/toolActivate.js +++ b/examples/toolActivate.js @@ -20,6 +20,8 @@ MainController.$inject = ['ngeoToolActivateMgr']; // IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN // CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. +import './common_styles.scss'; + import angular from 'angular'; import gmfMapComponent from 'gmf/map/component'; import options from './options'; diff --git a/src/contextualdata/module.js b/src/contextualdata/module.js index 953de56c729b..04797178083f 100644 --- a/src/contextualdata/module.js +++ b/src/contextualdata/module.js @@ -22,8 +22,6 @@ import angular from 'angular'; import gmfContextualdataComponent from 'gmf/contextualdata/component'; -import './contextualdata.scss'; - /** * @type {angular.IModule} */ diff --git a/src/controllers/AbstractDesktopController.js b/src/controllers/AbstractDesktopController.js index 62047f4c851f..97bf3b58af52 100644 --- a/src/controllers/AbstractDesktopController.js +++ b/src/controllers/AbstractDesktopController.js @@ -52,8 +52,6 @@ import olStyleText from 'ol/style/Text'; import 'gmfapi/index'; import panels from 'gmfapi/store/panels'; import user from 'gmfapi/store/user'; -import 'gmf/controllers/vars_desktop.scss'; -import 'gmf/controllers/desktop.scss'; /** * Desktop application abstract controller. diff --git a/src/controllers/AbstractMobileController.js b/src/controllers/AbstractMobileController.js index 684fd7eeff00..47896d38ac01 100644 --- a/src/controllers/AbstractMobileController.js +++ b/src/controllers/AbstractMobileController.js @@ -28,8 +28,6 @@ import gmfMobileNavigationModule from 'gmf/mobile/navigation/module'; import gmfQueryWindowComponent from 'gmf/query/windowComponent'; import ngeoMiscToolActivate from 'ngeo/misc/ToolActivate'; import user from 'gmfapi/store/user'; -import 'gmf/controllers/vars_mobile.scss'; -import 'gmf/controllers/mobile.scss'; /** * Mobile application abstract controller. diff --git a/src/controllers/desktop.scss b/src/controllers/desktop.scss index 950b101dee6f..13720f9868ff 100644 --- a/src/controllers/desktop.scss +++ b/src/controllers/desktop.scss @@ -25,18 +25,26 @@ * Entry point for all styles required for the desktop application. */ -@import '~gmf/sass/gmf-font.scss'; -@import '~gmf/sass/base.scss'; -@import '~gmf/sass/map.scss'; -@import '~gmf/sass/input-range.scss'; -@import '~gmf/sass/popover.scss'; -@import '~gmf/sass/datepicker.scss'; -@import '~gmf/sass/filters.scss'; -@import '~gmf/sass/fullscreenpopup.scss'; -@import '~gmf/sass/loading-mask.scss'; -@import '~gmf/sass/swipe.scss'; - -@import '~gmf/layertree/desktop.scss'; +@import './vars_desktop.scss'; + +@import '~ol/ol.css'; +@import 'gmf/css/reset.css'; +@import 'gmf/sass/gmf-font.scss'; +@import '~bootstrap/scss/bootstrap.scss'; +@import 'gmf/sass/base.scss'; +@import 'gmf/sass/map.scss'; +@import 'gmf/sass/input-range.scss'; +@import 'gmf/sass/fullscreenpopup.scss'; +@import 'gmf/sass/loading-mask.scss'; +@import 'ngeo/sass/components.scss'; + +@import 'gmf/sass/popover.scss'; +@import 'gmf/sass/datepicker.scss'; +@import 'gmf/sass/filters.scss'; +@import 'gmf/sass/fullscreenpopup.scss'; +@import 'gmf/sass/loading-mask.scss'; +@import 'gmf/sass/swipe.scss'; +@import 'gmf/layertree/desktop.scss'; html, body { @@ -228,7 +236,7 @@ gmf-elevationwidget { left: 50%; $width: 2.5rem; width: $width; - margin-left: -($width / 2); + margin-left: calc(($width / 2) * -1); border-bottom: none; border: $border; border-color: $border-color; @@ -436,7 +444,7 @@ gmf-backgroundlayerselector { color: var(--color-light); padding-bottom: $app-margin; margin-bottom: $app-margin; - margin-top: $grid-gutter-width / 2; + margin-top: calc($grid-gutter-width / 2); border-bottom: 0.06rem solid; border-bottom-color: $color-light; border-bottom-color: var(--color-light); diff --git a/src/controllers/iframe_api.scss b/src/controllers/iframe_api.scss index 002a05f49e07..077eda55127b 100644 --- a/src/controllers/iframe_api.scss +++ b/src/controllers/iframe_api.scss @@ -21,7 +21,7 @@ * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ -@import '~gmf/controllers/desktop.scss'; +@import 'gmf/controllers/desktop.scss'; body { padding: 0; diff --git a/src/controllers/mobile-nav.scss b/src/controllers/mobile-nav.scss index a9263ebf79b1..2b6e52ca01f9 100644 --- a/src/controllers/mobile-nav.scss +++ b/src/controllers/mobile-nav.scss @@ -21,6 +21,8 @@ * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ +@import 'gmf/sass/vars.scss'; + /** * Styles for mobile navigation menus (side menus). */ diff --git a/src/controllers/mobile.scss b/src/controllers/mobile.scss index 83faa0b6ae29..6844368b8244 100644 --- a/src/controllers/mobile.scss +++ b/src/controllers/mobile.scss @@ -25,19 +25,23 @@ * Entry point for all styles required for the mobile application. */ -@import '~gmf/controllers/vars_mobile.scss'; - -@import '~gmf/sass/gmf-font.scss'; -@import '~gmf/sass/base.scss'; -@import '~gmf/sass/map.scss'; -@import '~gmf/sass/input-range.scss'; -@import '~gmf/sass/fullscreenpopup.scss'; -@import '~gmf/sass/iphone.scss'; -@import '~gmf/sass/loading-mask.scss'; -@import '~gmf/controllers/mobile-nav.scss'; -@import '~gmf/search/mobile.scss'; - -@import '~gmf/layertree/mobile.scss'; +@import './vars_mobile.scss'; + +@import '~ol/ol.css'; +@import 'gmf/css/reset.css'; +@import 'gmf/sass/gmf-font.scss'; +@import '~bootstrap/scss/bootstrap.scss'; +@import 'gmf/sass/base.scss'; +@import 'gmf/sass/map.scss'; +@import 'gmf/sass/input-range.scss'; +@import 'gmf/sass/fullscreenpopup.scss'; +@import 'gmf/sass/loading-mask.scss'; +@import 'ngeo/sass/components.scss'; + +@import 'gmf/sass/iphone.scss'; +@import 'gmf/controllers/mobile-nav.scss'; +@import 'gmf/search/mobile.scss'; +@import 'gmf/layertree/mobile.scss'; /** * Mobile specific css only ! diff --git a/src/controllers/vars_desktop.scss b/src/controllers/vars_desktop.scss index fa23e4299442..cc1708756ef1 100644 --- a/src/controllers/vars_desktop.scss +++ b/src/controllers/vars_desktop.scss @@ -27,10 +27,10 @@ $right-panel-width: 17.5rem !default; $panel-separator-width: 7px !default; $streetview-width: 25rem !default; $topbar-height: 2.8rem !default; -$search-width: 8 * $map-tools-size !default; +$search-width: calc(8 * $map-tools-size) !default; $theme-selector-columns: 2 !default; -$theme-selector-column-width: $left-panel-width / 4 * 3 !default; -$theme-selector-height: 1.5 * $left-panel-width !default; +$theme-selector-column-width: calc($left-panel-width / 4 * 3) !default; +$theme-selector-height: calc(1.5 * $left-panel-width) !default; $app-margin: 0.62rem !default; $half-app-margin: 0.32rem !default; @@ -43,7 +43,8 @@ $search-results-max-height: calc( $notification-width: 12.5rem !default; -@import '~gmf/sass/vars.scss'; +// Define wanted default variables before to import previous default variables. +@import 'gmf/sass/vars.scss'; :root { --theme-selector-columns: #{$theme-selector-columns}; diff --git a/src/controllers/vars_mobile.scss b/src/controllers/vars_mobile.scss index 507c6396b284..9e9f6707bf75 100644 --- a/src/controllers/vars_mobile.scss +++ b/src/controllers/vars_mobile.scss @@ -36,7 +36,8 @@ $nav-bg: white !default; $standard-variation: 15% !default; $back-color: darken($nav-bg, $standard-variation) !default; -@import '~gmf/sass/vars.scss'; +// Define wanted default variables before to import previous default variables. +@import 'gmf/sass/vars.scss'; :root { --back-color: #{$back-color}; diff --git a/src/dropfile/dropfile.scss b/src/dropfile/dropfile.scss index 8a4be8a31ad7..ed4c8e264f84 100644 --- a/src/dropfile/dropfile.scss +++ b/src/dropfile/dropfile.scss @@ -21,6 +21,8 @@ * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ +@import '~gmf/sass/vars_only.scss'; + $bgselector-image-size: 3rem; .gmf-file-alert-contained { position: relative; diff --git a/src/dropfile/module.js b/src/dropfile/module.js index b52cd1b1f32f..0c7a1552dddf 100644 --- a/src/dropfile/module.js +++ b/src/dropfile/module.js @@ -21,7 +21,6 @@ import angular from 'angular'; import gmfFileDropZone from 'gmf/dropfile/component'; -import './dropfile.scss'; /** * @type {angular.IModule} diff --git a/src/editing/attributesComponent.js b/src/editing/attributesComponent.js index fd85537a403c..0167bf83f2fc 100644 --- a/src/editing/attributesComponent.js +++ b/src/editing/attributesComponent.js @@ -26,7 +26,6 @@ import {listen} from 'ol/events'; import ngeoMiscEventHelper from 'ngeo/misc/EventHelper'; import ngeoMiscDatetimepickerComponent from 'ngeo/misc/datetimepickerComponent'; import {ObjectEvent} from 'ol/Object'; -import './editing.css'; import htmlTemplate from './attributescomponent.html'; /** diff --git a/src/editing/editFeatureComponent.js b/src/editing/editFeatureComponent.js index 4a2541fe822d..03651d2be4e2 100644 --- a/src/editing/editFeatureComponent.js +++ b/src/editing/editFeatureComponent.js @@ -41,7 +41,6 @@ import gmfEditingXSDAttributes from 'gmf/editing/XSDAttributes'; import {getLayer as syncLayertreeMapGetLayer} from 'gmf/layertree/SyncLayertreeMap'; import DateFormatter from 'ngeo/misc/php-date-formatter'; import 'jquery-datetimepicker/jquery.datetimepicker'; -import 'jquery-datetimepicker/jquery.datetimepicker.css'; import ngeoEditingAttributesComponent from 'ngeo/editing/attributesComponent'; import ngeoEditingCreatefeatureComponent from 'ngeo/editing/createfeatureComponent'; import {deleteCondition} from 'ngeo/utils'; diff --git a/src/filter/component.js b/src/filter/component.js index 26513634603b..bccf558d9f7b 100644 --- a/src/filter/component.js +++ b/src/filter/component.js @@ -28,7 +28,6 @@ import ngeoFormatAttributeType from 'ngeo/format/AttributeType'; import ngeoRuleGeometry from 'ngeo/rule/Geometry'; import {getUid as olUtilGetUid} from 'ol/util'; import {remove as removeFromArray} from 'ol/array'; -import 'ngeo/sass/font.scss'; import panels from 'gmfapi/store/panels'; import htmlTemplate from './component.html'; /** diff --git a/src/filter/ruleComponent.js b/src/filter/ruleComponent.js index 4e40885380d6..aca926bd6d14 100644 --- a/src/filter/ruleComponent.js +++ b/src/filter/ruleComponent.js @@ -43,8 +43,8 @@ import olStyleText from 'ol/style/Text'; import olStyleFill from 'ol/style/Fill'; import {CollectionEvent} from 'ol/Collection'; import Feature from 'ol/Feature'; -import 'ngeo/sass/font.scss'; import htmlTemplate from './rulecomponent.html'; + /** * @typedef {Object} MenuEventTarget * @property {string} action diff --git a/src/floor/floor.scss b/src/floor/floor.scss index 3679831315f4..7d26e4f229dc 100644 --- a/src/floor/floor.scss +++ b/src/floor/floor.scss @@ -21,6 +21,8 @@ * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ +@import '~gmf/sass/vars_only.scss'; + gmf-floorselector.gmf-floorselector { overflow: hidden; background-color: transparent; diff --git a/src/floor/module.js b/src/floor/module.js index 5b620074100f..3768b9c95516 100644 --- a/src/floor/module.js +++ b/src/floor/module.js @@ -22,8 +22,6 @@ import angular from 'angular'; import gmfFloorFloorSelectorComponent from 'gmf/floor/floorselectorComponent'; -import './floor.scss'; - /** * @type {!angular.IModule} */ diff --git a/src/grid/component.js b/src/grid/component.js index 1733d182f83c..922c4830105e 100644 --- a/src/grid/component.js +++ b/src/grid/component.js @@ -26,8 +26,8 @@ import ngeoMiscFilters from 'ngeo/misc/filters'; import {getRowUid} from 'ngeo/grid/Config'; import 'floatthead'; import 'angular-float-thead'; -import 'ngeo/sass/font.scss'; import htmlTemplate from './component.html'; + /** * @type {angular.IModule} * @hidden diff --git a/src/import/module.js b/src/import/module.js index 05eda31f46bb..19b763cbb958 100644 --- a/src/import/module.js +++ b/src/import/module.js @@ -24,8 +24,6 @@ import gmfImportImportdatasourceComponent from 'gmf/import/importdatasourceCompo import gmfImportWmsCapabilityLayertreeComponent from 'gmf/import/wmsCapabilityLayertreeComponent'; import gmfImportWmtsCapabilityLayertreeComponent from 'gmf/import/wmtsCapabilityLayertreeComponent'; -import './import.scss'; - /** * @type {angular.IModule} */ diff --git a/src/layertree/common.scss b/src/layertree/common.scss index bc6487dbdda0..19c913f65680 100644 --- a/src/layertree/common.scss +++ b/src/layertree/common.scss @@ -21,6 +21,9 @@ * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ +@import '~gmf/sass/vars_only.scss'; +@import '@fortawesome/fontawesome-free/scss/variables.scss'; + .gmf-layertree-root-tools { text-align: right; padding: $micro-app-margin; diff --git a/src/layertree/module.js b/src/layertree/module.js index 1dffd061f607..12035a0e0bb8 100644 --- a/src/layertree/module.js +++ b/src/layertree/module.js @@ -27,12 +27,11 @@ import gmfLayertreeSyncLayertreeMap from 'gmf/layertree/SyncLayertreeMap'; import gmfLayertreeTimeSliderComponent from 'gmf/layertree/timeSliderComponent'; import gmfLayertreeTreeManager from 'gmf/layertree/TreeManager'; -import './common.scss'; - /** * Also related to the map but not included in the module: * - ngeo.layertree.Controller (already required by ngeo.layertree.component) - * + * ./common.scss + * ./timeslider.scss * @type {angular.IModule} */ export default angular.module('ngeoLayertreeModule', [ diff --git a/src/layertree/timeSliderComponent.js b/src/layertree/timeSliderComponent.js index a84793568283..e2ccb638971e 100644 --- a/src/layertree/timeSliderComponent.js +++ b/src/layertree/timeSliderComponent.js @@ -24,9 +24,7 @@ import angular from 'angular'; import ngeoMiscWMSTime from 'ngeo/misc/WMSTime'; import ngeoMiscDebounce from 'ngeo/misc/debounce'; import 'jquery-ui/ui/widgets/slider'; -import 'ngeo/sass/jquery-ui.scss'; import 'angular-ui-slider'; -import './timeslider.scss'; import htmlTemplate from './timesliderComponent.html'; /** diff --git a/src/layertree/timeslider.scss b/src/layertree/timeslider.scss index e773ef82a646..a8c631000100 100644 --- a/src/layertree/timeslider.scss +++ b/src/layertree/timeslider.scss @@ -33,9 +33,9 @@ } .ui-slider-handle { - top: -(($gmf-input-range-thumb-height / 2) - $gmf-input-range-track-height / 2); + top: calc(($gmf-input-range-thumb-height * -1) / 2 - $gmf-input-range-track-height / 2); cursor: $gmf-input-range-cursor; - margin-left: -$gmf-input-range-thumb-width / 2; + margin-left: calc(($gmf-input-range-thumb-width * -1) / 2); box-shadow: $gmf-input-range-thumb-box-shadow; border: $gmf-input-range-thumb-border; height: $gmf-input-range-thumb-height; diff --git a/src/message/Disclaimer.js b/src/message/Disclaimer.js index 7a8cb2b1a6d0..ca76ef91deb2 100644 --- a/src/message/Disclaimer.js +++ b/src/message/Disclaimer.js @@ -23,7 +23,6 @@ import angular from 'angular'; import 'bootstrap/js/src/alert'; import ngeoMessagePopup, {MessagePopup} from 'ngeo/message/Popup'; import ngeoMessageMessage, {MessageType} from 'ngeo/message/Message_OLD'; // TODO: Use new ts file when convert done -import 'ngeo/sass/font.scss'; /** * A message to display by the disclaimer service. diff --git a/src/message/displaywindowComponent.js b/src/message/displaywindowComponent.js index 419f6acb63ce..5404206a6360 100644 --- a/src/message/displaywindowComponent.js +++ b/src/message/displaywindowComponent.js @@ -20,10 +20,8 @@ // CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. import angular from 'angular'; -import 'ngeo/sass/font.scss'; import 'jquery-ui/ui/widgets/resizable'; import 'jquery-ui/ui/widgets/draggable'; -import 'ngeo/sass/jquery-ui.scss'; import 'angular-sanitize'; import htmlTemplate from './displaywindowComponent.html'; diff --git a/src/message/modalComponent.js b/src/message/modalComponent.js index 4d384c61e04d..fc3c570e56d1 100644 --- a/src/message/modalComponent.js +++ b/src/message/modalComponent.js @@ -21,7 +21,6 @@ import angular from 'angular'; import 'jquery-ui/ui/widgets/draggable'; -import 'ngeo/sass/jquery-ui.scss'; import 'bootstrap/js/src/modal'; /** diff --git a/src/misc/datepickerComponent.js b/src/misc/datepickerComponent.js index 7c8c7f8ea60d..a51f3394de1e 100644 --- a/src/misc/datepickerComponent.js +++ b/src/misc/datepickerComponent.js @@ -24,7 +24,6 @@ datePickerComponent.$inject = ['ngeoDatePickerTemplateUrl', '$timeout']; import angular from 'angular'; import ngeoMiscTime from 'ngeo/misc/Time'; import 'angular-ui-date'; -import 'ngeo/sass/jquery-ui.scss'; import htmlTemplate from './datepickerComponent.html'; // FIXME: import the locales in the applications diff --git a/src/misc/datetimepickerComponent.js b/src/misc/datetimepickerComponent.js index aaf0448b4dcc..4b1603b9edee 100644 --- a/src/misc/datetimepickerComponent.js +++ b/src/misc/datetimepickerComponent.js @@ -23,7 +23,6 @@ Controller.$inject = ['$element', 'gettextCatalog']; import angular from 'angular'; import DateFormatter from 'ngeo/misc/php-date-formatter'; import 'jquery-datetimepicker/jquery.datetimepicker'; -import 'jquery-datetimepicker/jquery.datetimepicker.css'; /** * @type {angular.IModule} diff --git a/src/misc/sortableComponent.js b/src/misc/sortableComponent.js index 2442ebc12867..ce7d55694368 100644 --- a/src/misc/sortableComponent.js +++ b/src/misc/sortableComponent.js @@ -22,7 +22,6 @@ sortableComponent.$inject = ['$timeout']; import angular from 'angular'; import 'jquery-ui/ui/widgets/sortable'; -import 'ngeo/sass/jquery-ui.scss'; import 'jquery-ui-touch-punch'; /** diff --git a/src/permalink/module.js b/src/permalink/module.js index 3d399411445e..9b30e7fb0a99 100644 --- a/src/permalink/module.js +++ b/src/permalink/module.js @@ -24,8 +24,6 @@ import gmfPermalinkPermalink from 'gmf/permalink/Permalink'; import gmfPermalinkShareService from 'gmf/permalink/ShareService'; import gmfPermalinkShareComponent from 'gmf/permalink/shareComponent'; -import './share.scss'; - /** * @type {angular.IModule} */ diff --git a/src/permalink/share.scss b/src/permalink/share.scss index 1e83cc3457f7..8029715deb67 100644 --- a/src/permalink/share.scss +++ b/src/permalink/share.scss @@ -21,6 +21,8 @@ * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ +@import '~gmf/sass/vars.scss'; + gmf-share { .modal-body { textarea { diff --git a/src/print/module.js b/src/print/module.js index bacaf77324f2..04129c35e783 100644 --- a/src/print/module.js +++ b/src/print/module.js @@ -24,8 +24,6 @@ import ngeoPrintService from 'ngeo/print/Service'; import ngeoPrintUtils from 'ngeo/print/Utils'; import gmfPrintComponent from 'gmf/print/component'; -import './print.scss'; - /** * @type {angular.IModule} */ diff --git a/src/profile/module.js b/src/profile/module.js index 3cfa8a9a2664..c80871be908d 100644 --- a/src/profile/module.js +++ b/src/profile/module.js @@ -24,8 +24,6 @@ import ngeoProfileElevationComponent from 'ngeo/profile/elevationComponent'; import gmfProfileComponent from 'gmf/profile/component'; import gmfProfileDrawLineComponent from 'gmf/profile/drawLineComponent'; -import './profile.scss'; - /** * @type {angular.IModule} */ diff --git a/src/profile/profile.scss b/src/profile/profile.scss index cc5606cd609a..5118ce43ed6f 100644 --- a/src/profile/profile.scss +++ b/src/profile/profile.scss @@ -21,6 +21,8 @@ * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ +@import '~gmf/sass/vars_only.scss'; + $profile-height: 12.5rem; .panel.gmf-profile-container { position: relative; diff --git a/src/query/extraModule.js b/src/query/extraModule.js index 8b971479bfe1..e6517d87322e 100644 --- a/src/query/extraModule.js +++ b/src/query/extraModule.js @@ -23,9 +23,6 @@ import angular from 'angular'; import gmfQueryGridComponent from 'gmf/query/gridComponent'; import gmfQueryWindowComponent from 'gmf/query/windowComponent'; -import './grid.scss'; -import './window.scss'; - /** * @type {angular.IModule} */ diff --git a/src/query/window.scss b/src/query/window.scss index c288515780f1..2977b34259d1 100644 --- a/src/query/window.scss +++ b/src/query/window.scss @@ -23,10 +23,10 @@ @import '~gmf/sass/vars.scss'; -$displayquerywindow-tablet-width: 9 * $map-tools-size; +$displayquerywindow-tablet-width: calc(9 * $map-tools-size); $displayquerywindow-detailed-header-height: 3.12rem; $displayquerywindow-detailed-details-line-height: 1.25rem; -$displayquerywindow-detailed-details-height: 9 * $displayquerywindow-detailed-details-line-height; +$displayquerywindow-detailed-details-height: calc(9 * $displayquerywindow-detailed-details-line-height); div.gmf-displayquerywindow { pointer-events: none; @@ -53,7 +53,7 @@ div.ngeo-displaywindow { left: initial; bottom: $app-margin; width: $displayquerywindow-tablet-width; - margin-left: -$displayquerywindow-tablet-width / 2; + margin-left: calc(($displayquerywindow-tablet-width * -1) / 2); position: fixed; z-index: $above-all; .collapse-button { @@ -66,7 +66,7 @@ div.ngeo-displaywindow { border-radius: $border-radius-base $border-radius-base 0 0; line-height: 0.5; height: $map-tools-size; - width: $map-tools-size + $map-tools-size * 2/3; + width: calc($map-tools-size + $map-tools-size * 2 / 3); } .collapse-button-up::after { content: fa-content($fa-var-chevron-up); @@ -250,7 +250,7 @@ div.ngeo-displaywindow { .animation-container { height: $map-tools-size * 2; &.animation-container-detailed { - height: ( + height: calc( $displayquerywindow-detailed-header-height + $displayquerywindow-detailed-details-height / 2 + $app-margin * 3 ) + $map-tools-size; diff --git a/src/query/windowComponent.js b/src/query/windowComponent.js index c9af3ab76b68..b36a59bca892 100644 --- a/src/query/windowComponent.js +++ b/src/query/windowComponent.js @@ -37,7 +37,6 @@ import olCollection from 'ol/Collection'; import {isEmpty} from 'ol/obj'; import {buildStyle} from 'ngeo/options'; import 'jquery-ui/ui/widgets/resizable'; -import 'ngeo/sass/jquery-ui.scss'; import 'angular-animate'; import 'angular-touch'; import 'bootstrap/js/src/collapse'; diff --git a/src/routing/RoutingComponent.js b/src/routing/RoutingComponent.js index 8d95910ba0cf..6d6113925ab0 100644 --- a/src/routing/RoutingComponent.js +++ b/src/routing/RoutingComponent.js @@ -35,7 +35,6 @@ import olStyleStroke from 'ol/style/Stroke'; import {toLonLat} from 'ol/proj'; import olFeature from 'ol/Feature'; import olGeomLineString from 'ol/geom/LineString'; -import 'ngeo/sass/font.scss'; import htmlTemplate from './routing.html'; /** diff --git a/src/routing/RoutingFeatureComponent.js b/src/routing/RoutingFeatureComponent.js index 5d6f9b3a77c6..8d87cb1c14f5 100644 --- a/src/routing/RoutingFeatureComponent.js +++ b/src/routing/RoutingFeatureComponent.js @@ -34,7 +34,6 @@ import olStyleStroke from 'ol/style/Stroke'; import olGeomPoint from 'ol/geom/Point'; import olInteractionModify from 'ol/interaction/Modify'; import olInteractionDraw from 'ol/interaction/Draw'; -import 'ngeo/sass/font.scss'; import htmlTemplate from './routingfeature.html'; /** diff --git a/src/routing/module.js b/src/routing/module.js index 953c0ee33fde..c066dbf78957 100644 --- a/src/routing/module.js +++ b/src/routing/module.js @@ -22,8 +22,6 @@ import angular from 'angular'; import ngeoRoutingRoutingComponent from 'ngeo/routing/RoutingComponent'; -import './routing.scss'; - /** * @type {angular.IModule} */ diff --git a/src/sass/base.scss b/src/sass/base.scss index 3195ff71d60c..0e57c4d8ff14 100644 --- a/src/sass/base.scss +++ b/src/sass/base.scss @@ -1,7 +1,7 @@ /** * The MIT License (MIT) * - * Copyright (c) 2022 Camptocamp SA + * Copyright (c) 2022-2024 Camptocamp SA * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in @@ -24,9 +24,7 @@ /** * Styles shared between the different apps (mobile and desktop). */ -@import '~ol/ol.css'; -@import '~gmf/css/reset.css'; -@import '~bootstrap/scss/bootstrap.scss'; +@import 'gmf/sass/vars_only.scss'; html, body { diff --git a/src/sass/components.scss b/src/sass/components.scss new file mode 100644 index 000000000000..f8a43188c97f --- /dev/null +++ b/src/sass/components.scss @@ -0,0 +1,16 @@ +@import 'ngeo/routing/routing.scss'; +@import 'ngeo/floor/floor.scss'; +@import 'ngeo/layertree/common.scss'; +@import 'ngeo/layertree/timeslider.scss'; +@import 'ngeo/profile/profile.scss'; +@import 'ngeo/search/search.scss'; +@import 'ngeo/permalink/share.scss'; +@import 'ngeo/import/import.scss'; +@import 'ngeo/contextualdata/contextualdata.scss'; +@import 'ngeo/dropfile/dropfile.scss'; +@import 'ngeo/print/print.scss'; +@import 'ngeo/query/grid.scss'; +@import 'ngeo/query/window.scss'; +@import 'ngeo/editing/editing.css'; +@import 'ngeo/sass/jquery-ui.scss'; +@import '~jquery-datetimepicker/jquery.datetimepicker.css'; diff --git a/src/sass/font.scss b/src/sass/font.scss index 7bcd1f96877b..db5f72f93e90 100644 --- a/src/sass/font.scss +++ b/src/sass/font.scss @@ -21,29 +21,7 @@ * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ -/** - * The MIT License (MIT) - * - * Copyright (c) Camptocamp SA - * - * Permission is hereby granted, free of charge, to any person obtaining a copy of - * this software and associated documentation files (the "Software"), to deal in - * the Software without restriction, including without limitation the rights to - * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of - * the Software, and to permit persons to whom the Software is furnished to do so, - * subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in all - * copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS - * FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR - * COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER - * IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN - * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -*/ - +$fa-font-path: '~@fortawesome/fontawesome-free/webfonts'; @import '~@fortawesome/fontawesome-free/scss/fontawesome.scss'; @import '~@fortawesome/fontawesome-free/scss/regular.scss'; @import '~@fortawesome/fontawesome-free/scss/solid.scss'; diff --git a/src/sass/fullscreenpopup.scss b/src/sass/fullscreenpopup.scss index fde12ef8b85e..444fe47e5a16 100644 --- a/src/sass/fullscreenpopup.scss +++ b/src/sass/fullscreenpopup.scss @@ -21,7 +21,7 @@ * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ -@import '~gmf/sass/vars.scss'; +@import 'gmf/sass/vars.scss'; [ngeo-popup] { &.popover { diff --git a/src/sass/gmf-font.scss b/src/sass/gmf-font.scss index 6749dbdbab15..2652c37ed0b7 100644 --- a/src/sass/gmf-font.scss +++ b/src/sass/gmf-font.scss @@ -1,2 +1,2 @@ -@import '~gmf/sass/vars.scss'; -@import '~ngeo/sass/font.scss'; +@import 'gmf/sass/vars.scss'; +@import 'ngeo/sass/font.scss'; diff --git a/src/sass/map.scss b/src/sass/map.scss index 22ade8cd2860..9853abdb2b24 100644 --- a/src/sass/map.scss +++ b/src/sass/map.scss @@ -21,7 +21,7 @@ * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ -@import '~gmf/sass/vars.scss'; +@import 'gmf/sass/vars.scss'; /** * Styles for the map and OL3 controls. @@ -119,7 +119,7 @@ button[ngeo-geolocation] { &::before { // same as fa-fw - width: (18em / 14); + width: calc(18em / 14); content: ''; text-align: center; } @@ -146,7 +146,7 @@ button[ngeo-geolocation] { span.gmf-backgroundlayerselector-opacity-check { &::after { - width: (18em / 14); + width: calc(18em / 14); font-family: 'Font Awesome 5 Free'; font-weight: 900; content: fa-content($fa-var-check); diff --git a/src/sass/popover.scss b/src/sass/popover.scss index 725ed74a195b..02b862d9e67c 100644 --- a/src/sass/popover.scss +++ b/src/sass/popover.scss @@ -21,12 +21,12 @@ * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ -@import '~gmf/sass/vars.scss'; +@import 'gmf/sass/vars.scss'; $popover-nb-col: 12; -$popover-icon-max-width: ($popover-max-width / $popover-nb-col) * 3; -$popover-action-name-max-width: ($popover-max-width / $popover-nb-col) * 5; -$popover-action-max-width: ($popover-max-width / $popover-nb-col) * 4; +$popover-icon-max-width: calc(($popover-max-width / $popover-nb-col) * 3); +$popover-action-name-max-width: calc(($popover-max-width / $popover-nb-col) * 5); +$popover-action-max-width: calc(($popover-max-width / $popover-nb-col) * 4); .popover { border-radius: 0; diff --git a/src/sass/typeahead.scss b/src/sass/typeahead.scss index 90ed60185890..1bcbcce2c7ee 100644 --- a/src/sass/typeahead.scss +++ b/src/sass/typeahead.scss @@ -21,7 +21,7 @@ * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ -@import '~gmf/sass/vars.scss'; +@import 'gmf/sass/vars.scss'; .twitter-typeahead { width: 100%; diff --git a/src/sass/vars.scss b/src/sass/vars.scss index 1fdf22f08d92..17f5c02ba638 100644 --- a/src/sass/vars.scss +++ b/src/sass/vars.scss @@ -21,7 +21,7 @@ * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ -@import '~gmf/sass/vars_only.scss'; +@import 'gmf/sass/vars_only.scss'; @import '~bootstrap/scss/_functions.scss'; @import '~bootstrap/scss/_variables.scss'; diff --git a/src/sass/vars_only.scss b/src/sass/vars_only.scss index f676114b5749..c4825f4ac678 100644 --- a/src/sass/vars_only.scss +++ b/src/sass/vars_only.scss @@ -42,10 +42,10 @@ $map-tools-color: black !default; $onhover-color: darken($nav-bg, $standard-variation) !default; $onhover-color-darken: darken($onhover-color, $standard-variation) !default; $main-bg-color: #e2e3df !default; // gray light -$main-bg-color-lighten: lighten($main-bg-color, $standard-variation / 2) !default; +$main-bg-color-lighten: lighten($main-bg-color, calc($standard-variation / 2)) !default; $main-bg-color-09: rgba($main-bg-color, 0.9) !default; $main-bg-color-08: rgba($main-bg-color, 0.8) !default; -$search-width: 6 * $map-tools-size !default; +$search-width: calc(6 * $map-tools-size) !default; $border-radius-base: 0 !default; $nav-width: 20rem !default; $input-border-focus: darken($brand-primary, $standard-variation) !default; diff --git a/src/search/module.js b/src/search/module.js index 5da86422fac9..116abd445123 100644 --- a/src/search/module.js +++ b/src/search/module.js @@ -26,8 +26,6 @@ import ngeoSearchCreateLocationSearchBloodhound from 'ngeo/search/createLocation import gmfSearchComponent from 'gmf/search/component'; import gmfSearchFulltextSearch from 'gmf/search/FulltextSearch'; -import './search.scss'; - /** * @type {angular.IModule} */ diff --git a/src/search/search.scss b/src/search/search.scss index fbc344b4dd55..eadc99a1acf1 100644 --- a/src/search/search.scss +++ b/src/search/search.scss @@ -21,8 +21,8 @@ * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ -@import '~gmf/sass/vars.scss'; -@import '~gmf/sass/typeahead.scss'; +@import 'gmf/sass/vars.scss'; +@import 'gmf/sass/typeahead.scss'; gmf-search { top: $app-margin; @@ -56,7 +56,7 @@ gmf-search { animation: spin 2.5s infinite linear; background-size: 20px; background-repeat: no-repeat; - background-image: url('../icons/spinner.svg'); + background-image: url('ngeo/icons/spinner.svg'); } } } @@ -130,11 +130,11 @@ gmf-search { .twitter-typeahead { .tt-menu { max-height: 75vh; + border-top: none; .gmf-search-no-results { padding: $app-margin; cursor: default; } - border-top: none; .gmf-search-header { padding: $app-margin; display: block; diff --git a/src/spinner/module.js b/src/spinner/module.js index e6eea7bd859c..5ddce43d342b 100644 --- a/src/spinner/module.js +++ b/src/spinner/module.js @@ -22,8 +22,6 @@ import angular from 'angular'; import gmfSpinnerDirective from 'gmf/spinner/directive'; -import './loader.scss'; - const myModule = angular.module('gmfSpinnerModule', [gmfSpinnerDirective.name]); /** diff --git a/src/streetview/MapillaryService.js b/src/streetview/MapillaryService.js index b8c7f73876c2..8592932afbac 100644 --- a/src/streetview/MapillaryService.js +++ b/src/streetview/MapillaryService.js @@ -19,7 +19,6 @@ // IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN // CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. import {StreetviewService} from './Service'; -import 'mapillary-js/dist/mapillary.css'; import {buffer} from 'ol/extent'; const MLY_METADATA_ENDPOINT = 'https://graph.mapillary.com';