Browse Source

Merge pull request #376 from Squidex/feature/ng8

Feature/ng8
pull/372/head
Sebastian Stehle 7 years ago
committed by GitHub
parent
commit
8656731d3d
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
  1. 36
      src/Squidex/.vscode/settings.json
  2. 25
      src/Squidex/app-config/helpers.js
  3. 3
      src/Squidex/app-config/karma-test-shim.js
  4. 6
      src/Squidex/app-config/karma.conf.js
  5. 6
      src/Squidex/app-config/karma.coverage.conf.js
  6. 270
      src/Squidex/app-config/webpack.config.js
  7. 35
      src/Squidex/app-config/webpack.run.base.js
  8. 68
      src/Squidex/app-config/webpack.run.dev.js
  9. 137
      src/Squidex/app-config/webpack.run.prod.js
  10. 37
      src/Squidex/app-config/webpack.test.coverage.js
  11. 16
      src/Squidex/app-config/webpack.test.js
  12. 18
      src/Squidex/app/app.routes.ts
  13. 2
      src/Squidex/app/features/api/pages/graphql/graphql-page.component.ts
  14. 2
      src/Squidex/app/features/apps/pages/apps-page.component.scss
  15. 2
      src/Squidex/app/features/content/pages/content/content-page.component.ts
  16. 2
      src/Squidex/app/features/content/pages/contents/contents-page.component.ts
  17. 4
      src/Squidex/app/features/rules/pages/rules/rule-element.component.scss
  18. 2
      src/Squidex/app/features/schemas/pages/schema/field-wizard.component.ts
  19. 2
      src/Squidex/app/features/settings/pages/roles/role.component.ts
  20. 4
      src/Squidex/app/framework/angular/forms/autocomplete.component.ts
  21. 2
      src/Squidex/app/framework/angular/forms/code-editor.component.ts
  22. 2
      src/Squidex/app/framework/angular/forms/date-time-editor.component.ts
  23. 2
      src/Squidex/app/framework/angular/forms/iframe-editor.component.ts
  24. 2
      src/Squidex/app/framework/angular/forms/json-editor.component.ts
  25. 4
      src/Squidex/app/framework/angular/forms/tag-editor.component.ts
  26. 4
      src/Squidex/app/framework/angular/modals/modal-dialog.component.ts
  27. 2
      src/Squidex/app/framework/angular/modals/root-view.component.ts
  28. 2
      src/Squidex/app/framework/angular/panel.component.ts
  29. 4
      src/Squidex/app/shared/components/geolocation-editor.component.ts
  30. 6
      src/Squidex/app/shared/components/markdown-editor.component.ts
  31. 2
      src/Squidex/app/shared/components/rich-editor.component.ts
  32. 2
      src/Squidex/app/shell/pages/internal/internal-area.component.scss
  33. 103
      src/Squidex/app/shims.ts
  34. 2
      src/Squidex/app/theme/_bootstrap.scss
  35. 2767
      src/Squidex/package-lock.json
  36. 81
      src/Squidex/package.json
  37. 1
      src/Squidex/tsconfig.json

36
src/Squidex/.vscode/settings.json

@ -1,36 +0,0 @@
{
// When opening a file, `editor.tabSize` and `editor.insertSpaces` will be detected based on the file contents.
"editor.detectIndentation": false,
// Typescript version from local package to be consistent
"typescript.tsdk": "node_modules/typescript/lib",
// Configure glob patterns for excluding files and folders.
"files.exclude": {
"**/node_modules": true,
"**/Assets": true,
"**/artifacts": true,
"**/build": true,
"**/logs": true,
"**/out": true,
"**/obj": true,
"**/bin": true,
"**/*.lock.json": true,
"**/*.bat": true,
"**/*.sln": true,
"**/*.sln.DotSettings": true,
"**/*.user": true,
"**/*.xproj": true,
"**/*.gitattributes": true,
"appsetttings.Development.json": true,
"appsetttings.Production.json": true,
".awcache": true,
".vs:": true,
".vscode:": true
},
"coverage-gutters.coverageFileNames": [
"_test-output/coverage/lcov.info"
],
"coverage-gutters.showLineCoverage": true
}

25
src/Squidex/app-config/helpers.js

@ -1,25 +0,0 @@
var path = require('path');
var appRoot = path.resolve(__dirname, '..');
exports.root = function () {
var newArgs = Array.prototype.slice.call(arguments, 0);
return path.join.apply(path, [appRoot].concat(newArgs));
};
exports.removeLoaders = function (config, extensions) {
var rules = config.module.rules;
for (var i = 0; i < rules.length; i += 1) {
var rule = rules[i];
for (var j = 0; j < extensions.length; j += 1) {
if (rule.test.source.indexOf(extensions[j]) >= 0) {
rules.splice(i, 1);
i--;
break;
}
}
}
}

3
src/Squidex/app-config/karma-test-shim.js

@ -1,7 +1,6 @@
Error.stackTraceLimit = Infinity;
require('core-js/es6');
require('core-js/es7/reflect');
require('core-js/proposals/reflect-metadata');
require('zone.js/dist/zone');
require('zone.js/dist/long-stack-trace-zone');

6
src/Squidex/app-config/karma.conf.js

@ -1,4 +1,4 @@
var webpackConfig = require('./webpack.test');
const webpackConfig = require('./webpack.config');
module.exports = function (config) {
var _config = {
@ -10,7 +10,7 @@ module.exports = function (config) {
frameworks: ['jasmine'],
/**
* Load additional test shim to setup angular2 for testing.
* Load additional test shim to setup angular for testing.
*/
files: [
{ pattern: './app-config/karma-test-shim.js', watched: false }
@ -23,7 +23,7 @@ module.exports = function (config) {
/**
* Load the files with webpack and use test configuration for it.
*/
webpack: webpackConfig,
webpack: webpackConfig({ target: 'tests', jit: true }),
webpackMiddleware: {
stats: 'errors-only'

6
src/Squidex/app-config/karma.coverage.conf.js

@ -1,4 +1,4 @@
var webpackConfig = require('./webpack.test.coverage');
const webpackConfig = require('./webpack.config');
module.exports = function (config) {
var _config = {
@ -10,7 +10,7 @@ module.exports = function (config) {
frameworks: ['jasmine'],
/**
* Load additional test shim to setup angular2 for testing.
* Load additional test shim to setup angular for testing.
*/
files: [
{ pattern: './app-config/karma-test-shim.js', watched: false }
@ -23,7 +23,7 @@ module.exports = function (config) {
/**
* Load the files with webpack and use test configuration for it.
*/
webpack: webpackConfig,
webpack: webpackConfig({ target: 'tests', coverage: true, jit: true }),
webpackMiddleware: {
stats: 'errors-only'

270
src/Squidex/app-config/webpack.config.js

@ -1,6 +1,13 @@
const webpack = require('webpack'),
path = require('path'),
helpers = require('./helpers');
path = require('path');
const appRoot = path.resolve(__dirname, '..');
function root() {
var newArgs = Array.prototype.slice.call(arguments, 0);
return path.join.apply(path, [appRoot].concat(newArgs));
};
const plugins = {
// https://github.com/webpack-contrib/mini-css-extract-plugin
@ -8,12 +15,36 @@ const plugins = {
// https://github.com/dividab/tsconfig-paths-webpack-plugin
TsconfigPathsPlugin: require('tsconfig-paths-webpack-plugin'),
// https://github.com/aackerman/circular-dependency-plugin
CircularDependencyPlugin: require('circular-dependency-plugin')
CircularDependencyPlugin: require('circular-dependency-plugin'),
// https://github.com/jantimon/html-webpack-plugin
HtmlWebpackPlugin: require('html-webpack-plugin'),
// https://github.com/mishoo/UglifyJS2/tree/harmony
UglifyJsPlugin: require('uglifyjs-webpack-plugin'),
// https://www.npmjs.com/package/@ngtools/webpack
NgToolsWebpack: require('@ngtools/webpack'),
// https://github.com/NMFR/optimize-css-assets-webpack-plugin
OptimizeCSSAssetsPlugin: require("optimize-css-assets-webpack-plugin"),
// https://github.com/jrparish/tslint-webpack-plugin
TsLintPlugin: require('tslint-webpack-plugin')
};
module.exports = function(env) {
const isDevServer = path.basename(require.main.filename) === 'webpack-dev-server.js';
const isProduction = env && env.production;
const isTesting = env && env.target === 'tests';
const isCoverage = env && env.coverage;
const isJit = env && env.jit;
const config = {
mode: isProduction ? 'production' : 'development',
/**
* Source map for Karma from the help of karma-sourcemap-loader & karma-webpack.
*
* See: https://webpack.js.org/configuration/devtool/
*/
devtool: isProduction ? undefined : (isTesting ? 'inline-source-map' : 'source-map'),
module.exports = {
/**
* Options affecting the resolving of modules.
*
@ -27,9 +58,9 @@ module.exports = {
*/
extensions: ['.js', '.mjs', '.ts', '.css', '.scss'],
modules: [
helpers.root('app'),
helpers.root('app', 'theme'),
helpers.root('node_modules')
root('app'),
root('app', 'theme'),
root('node_modules')
],
plugins: [
@ -56,22 +87,6 @@ module.exports = {
test: /[\/\\]@angular[\/\\]core[\/\\].+\.js$/,
parser: { system: true },
include: [/node_modules/]
}, {
test: /\.ts$/,
use: [{
loader: 'awesome-typescript-loader'
}, {
loader: 'angular-router-loader'
}, {
loader: 'angular2-template-loader'
}],
exclude: [/node_modules/]
}, {
test: /\.ts$/,
use: [{
loader: 'awesome-typescript-loader'
}],
include: [/node_modules/]
}, {
test: /\.js\.flow$/,
use: [{
@ -115,13 +130,16 @@ module.exports = {
use: [{
loader: 'raw-loader'
}, {
loader: 'sass-loader', options: { includePaths: [helpers.root('app', 'theme')] }
loader: 'sass-loader', options: { includePaths: [root('app', 'theme')] }
}],
exclude: helpers.root('app', 'theme')
exclude: root('app', 'theme')
}]
},
plugins: [
new webpack.ContextReplacementPlugin(/\@angular(\\|\/)core(\\|\/)fesm5/, root('./app'), {}),
new webpack.ContextReplacementPlugin(/moment[\/\\]locale$/, /en/),
/**
* Puts each bundle into a file and appends the hash of the file to the path.
*
@ -137,18 +155,216 @@ module.exports = {
*
* See: https://github.com/webpack/html-loader#Advanced_Options
*/
root: helpers.root('app', 'images')
root: root('app', 'images')
},
context: '/'
}
}),
/**
* Detect circular dependencies in app.
*
* See: https://github.com/aackerman/circular-dependency-plugin
*/
new plugins.CircularDependencyPlugin({
exclude: /([\\\/]node_modules[\\\/])|(ngfactory\.js$)/,
// Add errors to webpack instead of warnings
failOnError: true
}),
],
devServer: {
headers: {
'Access-Control-Allow-Origin': '*'
},
historyApiFallback: true
}
};
if (!isTesting) {
/**
* The entry point for the bundle. Our Angular app.
*
* See: https://webpack.js.org/configuration/entry-context/
*/
config.entry = {
'shims': './app/shims.ts',
'app': './app/app.ts'
};
if (isProduction) {
config.output = {
/**
* The output directory as absolute path (required).
*
* See: https://webpack.js.org/configuration/output/#output-path
*/
path: root('wwwroot/build/'),
publicPath: './build/',
/**
* Specifies the name of each output file on disk.
*
* See: https://webpack.js.org/configuration/output/#output-filename
*/
filename: '[name].js',
/**
* The filename of non-entry chunks as relative path inside the output.path directory.
*
* See: https://webpack.js.org/configuration/output/#output-chunkfilename
*/
chunkFilename: '[id].[hash].chunk.js'
};
} else {
config.output = {
filename: '[name].js',
/**
* Set the public path, because we are running the website from another port (5000).
*/
publicPath: 'http://localhost:3000/'
};
}
config.plugins.push(
new plugins.HtmlWebpackPlugin({
hash: true,
chunks: ['shims', 'app'],
chunksSortMode: 'manual',
template: 'wwwroot/index.html'
})
);
config.plugins.push(
new plugins.HtmlWebpackPlugin({
template: 'wwwroot/_theme.html', hash: true, chunksSortMode: 'none', filename: 'theme.html'
})
);
new webpack.ContextReplacementPlugin(/moment[\/\\]locale$/, /en/)
config.plugins.push(
new plugins.TsLintPlugin({
files: ['./app/**/*.ts'],
/**
* Path to a configuration file.
*/
config: root('tslint.json'),
/**
* Wait for linting and fail the build when linting error occur.
*/
waitForLinting: isProduction
})
);
}
if (isProduction) {
config.optimization = {
minimizer: [
new plugins.UglifyJsPlugin({
uglifyOptions: {
compress: false,
ecma: 6,
mangle: true,
output: {
comments: false
}
},
extractComments: true
}),
new plugins.OptimizeCSSAssetsPlugin({})
]
};
config.performance = {
hints: false
};
}
if (!isCoverage) {
config.module.rules.push({
test: /\.ts$/,
use: [{
loader: 'awesome-typescript-loader'
}],
exclude: [/node_modules/]
})
} else {
config.module.rules.push({
test: /\.ts$/,
use: [{
loader: 'ts-loader'
}],
include: [/\.(e2e|spec)\.ts$/],
});
// Use instrument loader for all normal builds.
config.module.rules.push({
test: /\.ts$/,
use: [{
loader: 'istanbul-instrumenter-loader'
}, {
loader: 'ts-loader'
}],
exclude: [/\.(e2e|spec)\.ts$/]
});
}
if (isProduction) {
config.module.rules.push({
test: /\.scss$/,
/*
* Extract the content from a bundle to a file.
*
* See: https://github.com/webpack-contrib/extract-text-webpack-plugin
*/
use: [
plugins.MiniCssExtractPlugin.loader,
{
loader: 'css-loader'
}, {
loader: 'sass-loader'
}],
/*
* Do not include component styles.
*/
include: root('app', 'theme'),
});
} else {
config.module.rules.push({
test: /\.scss$/,
use: [{
loader: 'style-loader'
}, {
loader: 'css-loader'
}, {
loader: 'sass-loader?sourceMap'
}],
/*
* Do not include component styles.
*/
include: root('app', 'theme')
});
}
if (!isJit) {
config.module.rules.push({
test: /(?:\.ngfactory\.js|\.ngstyle\.js|\.ts)$/,
use: [{
loader: '@ngtools/webpack'
}]
});
config.plugins.push(
new plugins.NgToolsWebpack.AngularCompilerPlugin({
entryModule: 'app/app.module#AppModule',
sourceMap: !isProduction,
skipSourceGeneration: false,
tsConfigPath: './tsconfig.json'
})
);
}
return config;
};

35
src/Squidex/app-config/webpack.run.base.js

@ -1,35 +0,0 @@
const webpack = require('webpack'),
webpackMerge = require('webpack-merge'),
path = require('path'),
helpers = require('./helpers'),
commonConfig = require('./webpack.config.js');
const plugins = {
// https://github.com/jantimon/html-webpack-plugin
HtmlWebpackPlugin: require('html-webpack-plugin')
};
module.exports = webpackMerge(commonConfig, {
/**
* The entry point for the bundle. Our Angular app.
*
* See: https://webpack.js.org/configuration/entry-context/
*/
entry: {
'shims': './app/shims.ts',
'app': './app/app.ts'
},
plugins: [
new plugins.HtmlWebpackPlugin({
hash: true,
chunks: ['shims', 'app'],
chunksSortMode: 'manual',
template: 'wwwroot/index.html'
}),
new plugins.HtmlWebpackPlugin({
template: 'wwwroot/_theme.html', hash: true, chunksSortMode: 'none', filename: 'theme.html'
})
]
});

68
src/Squidex/app-config/webpack.run.dev.js

@ -1,68 +0,0 @@
const webpack = require('webpack'),
webpackMerge = require('webpack-merge'),
path = require('path'),
helpers = require('./helpers'),
runConfig = require('./webpack.run.base.js');
const plugins = {
// https://github.com/jrparish/tslint-webpack-plugin
TsLintPlugin: require('tslint-webpack-plugin')
};
module.exports = webpackMerge(runConfig, {
mode: 'development',
devtool: 'source-map',
output: {
filename: '[name].js',
/**
* Set the public path, because we are running the website from another port (5000).
*/
publicPath: 'http://localhost:3000/'
},
/*
* Options affecting the normal modules.
*
* See: https://webpack.js.org/configuration/module/
*/
module: {
/**
* An array of Rules which are matched to requests when modules are created.
*
* See: https://webpack.js.org/configuration/module/#module-rules
*/
rules: [{
test: /\.scss$/,
use: [{
loader: 'style-loader'
}, {
loader: 'css-loader'
}, {
loader: 'sass-loader?sourceMap', options: { includePaths: [helpers.root('app', 'theme')] }
}],
include: helpers.root('app', 'theme')
}]
},
plugins: [
new webpack.ContextReplacementPlugin(/\@angular(\\|\/)core(\\|\/)fesm5/, helpers.root('./src'), {}),
new plugins.TsLintPlugin({
files: ['./app/**/*.ts'],
/**
* Path to a configuration file.
*/
config: helpers.root('tslint.json')
})
],
devServer: {
headers: {
'Access-Control-Allow-Origin': '*'
},
historyApiFallback: true
}
});

137
src/Squidex/app-config/webpack.run.prod.js

@ -1,137 +0,0 @@
const webpack = require('webpack'),
webpackMerge = require('webpack-merge'),
path = require('path'),
helpers = require('./helpers'),
runConfig = require('./webpack.run.base.js');
const plugins = {
// https://github.com/mishoo/UglifyJS2/tree/harmony
UglifyJsPlugin: require('uglifyjs-webpack-plugin'),
// https://www.npmjs.com/package/@ngtools/webpack
NgToolsWebpack: require('@ngtools/webpack'),
// https://github.com/webpack-contrib/mini-css-extract-plugin
MiniCssExtractPlugin: require('mini-css-extract-plugin'),
// https://github.com/NMFR/optimize-css-assets-webpack-plugin
OptimizeCSSAssetsPlugin: require("optimize-css-assets-webpack-plugin"),
// https://github.com/jrparish/tslint-webpack-plugin
TsLintPlugin: require('tslint-webpack-plugin')
};
helpers.removeLoaders(runConfig, ['scss', 'ts']);
module.exports = webpackMerge(runConfig, {
mode: 'production',
output: {
/**
* The output directory as absolute path (required).
*
* See: https://webpack.js.org/configuration/output/#output-path
*/
path: helpers.root('wwwroot/build/'),
publicPath: './build/',
/**
* Specifies the name of each output file on disk.
*
* See: https://webpack.js.org/configuration/output/#output-filename
*/
filename: '[name].js',
/**
* The filename of non-entry chunks as relative path inside the output.path directory.
*
* See: https://webpack.js.org/configuration/output/#output-chunkfilename
*/
chunkFilename: '[id].[hash].chunk.js'
},
/*
* Options affecting the normal modules.
*
* See: https://webpack.js.org/configuration/module/
*/
module: {
/**
* An array of Rules which are matched to requests when modules are created.
*
* See: https://webpack.js.org/configuration/module/#module-rules
*/
rules: [{
test: /\.scss$/,
/*
* Extract the content from a bundle to a file.
*
* See: https://github.com/webpack-contrib/extract-text-webpack-plugin
*/
use: [
plugins.MiniCssExtractPlugin.loader,
{
loader: 'css-loader'
}, {
loader: 'sass-loader'
}],
/*
* Do not include component styles.
*/
include: helpers.root('app', 'theme'),
}, {
test: /\.scss$/,
use: [{
loader: 'raw-loader'
}, {
loader: 'sass-loader', options: { includePaths: [helpers.root('app', 'theme')] }
}],
exclude: helpers.root('app', 'theme'),
}, {
test: /(?:\.ngfactory\.js|\.ngstyle\.js|\.ts)$/,
use: [{
loader: '@ngtools/webpack'
}]
}]
},
plugins: [
new plugins.NgToolsWebpack.AngularCompilerPlugin({
entryModule: 'app/app.module#AppModule',
sourceMap: false,
skipSourceGeneration: false,
tsConfigPath: './tsconfig.json'
}),
new plugins.TsLintPlugin({
files: ['./app/**/*.ts'],
/**
* Path to a configuration file.
*/
config: helpers.root('tslint.json'),
/**
* Wait for linting and fail the build when linting error occur.
*/
waitForLinting: true
})
],
optimization: {
minimizer: [
new plugins.UglifyJsPlugin({
uglifyOptions: {
compress: false,
ecma: 6,
mangle: true,
output: {
comments: false
}
},
extractComments: true
}),
new plugins.OptimizeCSSAssetsPlugin({})
]
},
performance: {
hints: false
}
});

37
src/Squidex/app-config/webpack.test.coverage.js

@ -1,37 +0,0 @@
const webpack = require('webpack'),
webpackMerge = require('webpack-merge'),
path = require('path'),
helpers = require('./helpers'),
testConfig = require('./webpack.test.js');
helpers.removeLoaders(testConfig, ['ts']);
module.exports = webpackMerge(testConfig, {
module: {
/**
* An array of Rules which are matched to requests when modules are created.
*
* See: https://webpack.js.org/configuration/module/#module-rules
*/
rules: [{
test: /\.ts$/,
use: [{
loader: 'ts-loader'
}],
include: [/\.(e2e|spec)\.ts$/],
}, {
test: /\.ts$/,
use: [{
loader: 'istanbul-instrumenter-loader'
}, {
loader: 'ts-loader'
}, {
loader: 'angular-router-loader'
}, {
loader: 'angular2-template-loader'
}],
exclude: [/\.(e2e|spec)\.ts$/]
}]
}
});

16
src/Squidex/app-config/webpack.test.js

@ -1,16 +0,0 @@
const webpack = require('webpack'),
webpackMerge = require('webpack-merge'),
path = require('path'),
helpers = require('./helpers'),
commonConfig = require('./webpack.config.js');
module.exports = webpackMerge(commonConfig, {
mode: 'development',
/**
* Source map for Karma from the help of karma-sourcemap-loader & karma-webpack.
*
* See: https://webpack.js.org/configuration/devtool/
*/
devtool: 'inline-source-map'
});

18
src/Squidex/app/app.routes.ts

@ -38,12 +38,12 @@ export const routes: Routes = [
children: [
{
path: '',
loadChildren: './features/apps/module#SqxFeatureAppsModule',
loadChildren: () => import('./features/apps/module').then(m => m.SqxFeatureAppsModule),
canActivate: [UnsetAppGuard]
},
{
path: 'administration',
loadChildren: './features/administration/module#SqxFeatureAdministrationModule',
loadChildren: () => import('./features/administration/module').then(m => m.SqxFeatureAdministrationModule),
canActivate: [UnsetAppGuard]
},
{
@ -53,31 +53,31 @@ export const routes: Routes = [
children: [
{
path: '',
loadChildren: './features/dashboard/module#SqxFeatureDashboardModule'
loadChildren: () => import('./features/dashboard/module').then(m => m.SqxFeatureDashboardModule)
},
{
path: 'content',
loadChildren: './features/content/module#SqxFeatureContentModule'
loadChildren: () => import('./features/content/module').then(m => m.SqxFeatureContentModule)
},
{
path: 'schemas',
loadChildren: './features/schemas/module#SqxFeatureSchemasModule'
loadChildren: () => import('./features/schemas/module').then(m => m.SqxFeatureSchemasModule)
},
{
path: 'assets',
loadChildren: './features/assets/module#SqxFeatureAssetsModule'
loadChildren: () => import('./features/assets/module').then(m => m.SqxFeatureAssetsModule)
},
{
path: 'rules',
loadChildren: './features/rules/module#SqxFeatureRulesModule'
loadChildren: () => import('./features/rules/module').then(m => m.SqxFeatureRulesModule)
},
{
path: 'settings',
loadChildren: './features/settings/module#SqxFeatureSettingsModule'
loadChildren: () => import('./features/settings/module').then(m => m.SqxFeatureSettingsModule)
},
{
path: 'api',
loadChildren: './features/api/module#SqxFeatureApiModule'
loadChildren: () => import('./features/api/module').then(m => m.SqxFeatureApiModule)
}
]
}

2
src/Squidex/app/features/api/pages/graphql/graphql-page.component.ts

@ -22,7 +22,7 @@ import { AppsState, GraphQlService } from '@app/shared';
templateUrl: './graphql-page.component.html'
})
export class GraphQLPageComponent implements AfterViewInit {
@ViewChild('graphiQLContainer')
@ViewChild('graphiQLContainer', { static: false })
public graphiQLContainer: ElementRef;
constructor(

2
src/Squidex/app/features/apps/pages/apps-page.component.scss

@ -66,7 +66,7 @@
}
&:hover {
@include box-shadow(0, 3px, 16px, .2px);
@include box-shadow(0, 3px, 16px, .2);
}
&:focus {

2
src/Squidex/app/features/content/pages/content/content-page.component.ts

@ -59,7 +59,7 @@ export class ContentPageComponent extends ResourceOwner implements CanComponentD
public language: AppLanguageDto;
public languages: ImmutableArray<AppLanguageDto>;
@ViewChild('dueTimeSelector')
@ViewChild('dueTimeSelector', { static: false })
public dueTimeSelector: DueTimeSelectorComponent;
constructor(apiUrl: ApiUrlConfig, authService: AuthService,

2
src/Squidex/app/features/content/pages/contents/contents-page.component.ts

@ -52,7 +52,7 @@ export class ContentsPageComponent extends ResourceOwner implements OnInit {
public isAllSelected = false;
@ViewChild('dueTimeSelector')
@ViewChild('dueTimeSelector', { static: false })
public dueTimeSelector: DueTimeSelectorComponent;
constructor(

4
src/Squidex/app/features/rules/pages/rules/rule-element.component.scss

@ -82,7 +82,9 @@
display: inline-block;
}
/deep/ svg {
::ng-deep {
svg {
fill: $color-dark-foreground;
display: block;
}
}

2
src/Squidex/app/features/schemas/pages/schema/field-wizard.component.ts

@ -29,7 +29,7 @@ const DEFAULT_FIELD = { name: '', partitioning: 'invariant', properties: createP
templateUrl: './field-wizard.component.html'
})
export class FieldWizardComponent implements OnInit {
@ViewChild('nameInput')
@ViewChild('nameInput', { static: false })
public nameInput: ElementRef<HTMLElement>;
@Input()

2
src/Squidex/app/features/settings/pages/roles/role.component.ts

@ -33,7 +33,7 @@ export class RoleComponent implements OnChanges {
@Input()
public allPermissions: AutocompleteSource;
@ViewChild('addInput')
@ViewChild('addInput', { static: false })
public addPermissionInput: AutocompleteComponent;
public isEditing = false;

4
src/Squidex/app/framework/angular/forms/autocomplete.component.ts

@ -52,10 +52,10 @@ export class AutocompleteComponent extends StatefulControlComponent<State, any[]
@Input()
public placeholder = '';
@ContentChild(TemplateRef)
@ContentChild(TemplateRef, { static: false })
public itemTemplate: TemplateRef<any>;
@ViewChild('input')
@ViewChild('input', { static: false })
public inputControl: ElementRef<HTMLInputElement>;
public queryInput = new FormControl();

2
src/Squidex/app/framework/angular/forms/code-editor.component.ts

@ -35,7 +35,7 @@ export class CodeEditorComponent extends ExternalControlComponent<string> implem
private value: string;
private isDisabled = false;
@ViewChild('editor')
@ViewChild('editor', { static: false })
public editor: ElementRef;
@Input()

2
src/Squidex/app/framework/angular/forms/date-time-editor.component.ts

@ -41,7 +41,7 @@ export class DateTimeEditorComponent extends StatefulControlComponent<{}, string
@Input()
public hideClear: boolean;
@ViewChild('dateInput')
@ViewChild('dateInput', { static: false })
public dateInput: ElementRef;
public timeControl = new FormControl();

2
src/Squidex/app/framework/angular/forms/iframe-editor.component.ts

@ -26,7 +26,7 @@ export class IFrameEditorComponent extends ExternalControlComponent<any> impleme
private isDisabled = false;
private isInitialized = false;
@ViewChild('iframe')
@ViewChild('iframe', { static: false })
public iframe: ElementRef<HTMLIFrameElement>;
@Input()

2
src/Squidex/app/framework/angular/forms/json-editor.component.ts

@ -32,7 +32,7 @@ export class JsonEditorComponent extends ExternalControlComponent<string> implem
private valueString: string;
private isDisabled = false;
@ViewChild('editor')
@ViewChild('editor', { static: false })
public editor: ElementRef<HTMLDivElement>;
constructor(changeDetector: ChangeDetectorRef,

4
src/Squidex/app/framework/angular/forms/tag-editor.component.ts

@ -93,10 +93,10 @@ interface State {
changeDetection: ChangeDetectionStrategy.OnPush
})
export class TagEditorComponent extends StatefulControlComponent<State, any[]> implements AfterViewInit, OnInit {
@ViewChild('form')
@ViewChild('form', { static: false })
public formElement: ElementRef<HTMLElement>;
@ViewChild('input')
@ViewChild('input', { static: false })
public inputElement: ElementRef<HTMLInputElement>;
@Input()

4
src/Squidex/app/framework/angular/modals/modal-dialog.component.ts

@ -51,10 +51,10 @@ export class ModalDialogComponent extends StatefulComponent<State> implements Af
@Output()
public close = new EventEmitter();
@ViewChild('tabsElement')
@ViewChild('tabsElement', { static: false })
public tabsElement: ElementRef<ParentNode>;
@ViewChild('footerElement')
@ViewChild('footerElement', { static: false })
public footerElement: ElementRef<ParentNode>;
constructor(changeDetector: ChangeDetectorRef) {

2
src/Squidex/app/framework/angular/modals/root-view.component.ts

@ -14,6 +14,6 @@ import { ChangeDetectionStrategy, Component, ViewChild, ViewContainerRef } from
changeDetection: ChangeDetectionStrategy.OnPush
})
export class RootViewComponent {
@ViewChild('element', { read: ViewContainerRef })
@ViewChild('element', { read: ViewContainerRef, static: false })
public viewContainer: ViewContainerRef;
}

2
src/Squidex/app/framework/angular/panel.component.ts

@ -64,7 +64,7 @@ export class PanelComponent implements AfterViewInit, OnDestroy, OnInit {
@Input()
public sidebarClass = '';
@ViewChild('panel')
@ViewChild('panel', { static: false })
public panel: ElementRef<HTMLElement>;
constructor(

4
src/Squidex/app/shared/components/geolocation-editor.component.ts

@ -64,10 +64,10 @@ export class GeolocationEditorComponent extends StatefulControlComponent<State,
]
});
@ViewChild('editor')
@ViewChild('editor', { static: false })
public editor: ElementRef<HTMLElement>;
@ViewChild('searchBox')
@ViewChild('searchBox', { static: false })
public searchBoxInput: ElementRef<HTMLInputElement>;
constructor(changeDetector: ChangeDetectorRef,

6
src/Squidex/app/shared/components/markdown-editor.component.ts

@ -40,13 +40,13 @@ export class MarkdownEditorComponent extends StatefulControlComponent<State, str
private value: string;
private isDisabled = false;
@ViewChild('editor')
@ViewChild('editor', { static: false })
public editor: ElementRef;
@ViewChild('container')
@ViewChild('container', { static: false })
public container: ElementRef;
@ViewChild('inner')
@ViewChild('inner', { static: false })
public inner: ElementRef;
public assetsDialog = new DialogModel();

2
src/Squidex/app/shared/components/rich-editor.component.ts

@ -46,7 +46,7 @@ export class RichEditorComponent extends StatefulControlComponent<any, string> i
private value: string;
private isDisabled = false;
@ViewChild('editor')
@ViewChild('editor', { static: false })
public editor: ElementRef;
@Output()

2
src/Squidex/app/shell/pages/internal/internal-area.component.scss

@ -2,7 +2,7 @@
@import '_mixins';
.navbar {
@include box-shadow(0, 3px, 5px, .13px);
@include box-shadow(0, 3px, 5px, .13);
display: block;
}

103
src/Squidex/app/shims.ts

@ -5,20 +5,91 @@
* Copyright (c) Squidex UG (haftungsbeschränkt). All rights reserved.
*/
import 'core-js/es6/array';
import 'core-js/es6/date';
import 'core-js/es6/function';
import 'core-js/es6/map';
import 'core-js/es6/math';
import 'core-js/es6/number';
import 'core-js/es6/object';
import 'core-js/es6/parse-float';
import 'core-js/es6/parse-int';
import 'core-js/es6/reflect';
import 'core-js/es6/regexp';
import 'core-js/es6/set';
import 'core-js/es6/string';
import 'core-js/es6/symbol';
import 'core-js/es7/reflect';
// ES2015 symbol capabilities
import 'core-js/modules/es.symbol';
// ES2015 function capabilities
import 'core-js/modules/es.function.bind';
import 'core-js/modules/es.function.has-instance';
import 'core-js/modules/es.function.name';
// ES2015 object capabilities
import 'core-js/modules/es.object.assign';
import 'core-js/modules/es.object.create';
import 'core-js/modules/es.object.define-properties';
import 'core-js/modules/es.object.define-property';
import 'core-js/modules/es.object.freeze';
import 'core-js/modules/es.object.get-own-property-descriptor';
import 'core-js/modules/es.object.get-own-property-names';
import 'core-js/modules/es.object.get-prototype-of';
import 'core-js/modules/es.object.is';
import 'core-js/modules/es.object.is-extensible';
import 'core-js/modules/es.object.is-frozen';
import 'core-js/modules/es.object.is-sealed';
import 'core-js/modules/es.object.keys';
import 'core-js/modules/es.object.prevent-extensions';
import 'core-js/modules/es.object.seal';
import 'core-js/modules/es.object.set-prototype-of';
import 'core-js/modules/es.object.to-string';
// ES2015 array capabilities
import 'core-js/modules/es.array.copy-within';
import 'core-js/modules/es.array.every';
import 'core-js/modules/es.array.fill';
import 'core-js/modules/es.array.filter';
import 'core-js/modules/es.array.find';
import 'core-js/modules/es.array.find-index';
import 'core-js/modules/es.array.for-each';
import 'core-js/modules/es.array.from';
import 'core-js/modules/es.array.index-of';
import 'core-js/modules/es.array.is-array';
import 'core-js/modules/es.array.iterator';
import 'core-js/modules/es.array.join';
import 'core-js/modules/es.array.last-index-of';
import 'core-js/modules/es.array.map';
import 'core-js/modules/es.array.of';
import 'core-js/modules/es.array.reduce';
import 'core-js/modules/es.array.reduce-right';
import 'core-js/modules/es.array.slice';
import 'core-js/modules/es.array.some';
import 'core-js/modules/es.array.sort';
// ES2015 string capabilities
import 'core-js/modules/es.string.anchor';
import 'core-js/modules/es.string.big';
import 'core-js/modules/es.string.blink';
import 'core-js/modules/es.string.bold';
import 'core-js/modules/es.string.code-point-at';
import 'core-js/modules/es.string.ends-with';
import 'core-js/modules/es.string.fixed';
import 'core-js/modules/es.string.fontcolor';
import 'core-js/modules/es.string.fontsize';
import 'core-js/modules/es.string.from-code-point';
import 'core-js/modules/es.string.includes';
import 'core-js/modules/es.string.italics';
import 'core-js/modules/es.string.iterator';
import 'core-js/modules/es.string.link';
import 'core-js/modules/es.string.raw';
import 'core-js/modules/es.string.repeat';
import 'core-js/modules/es.string.small';
import 'core-js/modules/es.string.starts-with';
import 'core-js/modules/es.string.strike';
import 'core-js/modules/es.string.sub';
import 'core-js/modules/es.string.sup';
import 'core-js/modules/es.string.trim';
import 'core-js/modules/es.parse-float';
import 'core-js/modules/es.parse-int';
import 'core-js/es/date';
import 'core-js/es/math';
import 'core-js/es/number';
import 'core-js/es/regexp';
import 'core-js/modules/es.map';
import 'core-js/modules/es.promise';
import 'core-js/modules/es.set';
import 'core-js/modules/es.weak-map';
import 'core-js/modules/web.dom-collections.iterator';
import 'zone.js/dist/zone';

2
src/Squidex/app/theme/_bootstrap.scss

@ -162,7 +162,7 @@ a {
.dropdown-menu {
// White dropdown menu without border and shadow.
& {
@include box-shadow(0, 3px, 16px, .2px);
@include box-shadow(0, 3px, 16px, .2);
border: 0;
background: $panel-light-background;
}

2767
src/Squidex/package-lock.json

File diff suppressed because it is too large

81
src/Squidex/package.json

@ -6,69 +6,67 @@
"repository": "https://github.com/SebastianStehle/Squidex",
"scripts": {
"copy": "cpx node_modules/oidc-client/dist/oidc-client.min.js wwwroot/scripts/",
"start": "npm run copy && webpack-dev-server --config app-config/webpack.run.dev.js --inline --port 3000 --hot",
"start": "npm run copy && webpack-dev-server --config app-config/webpack.config.js --inline --port 3000 --hot",
"test": "karma start",
"test:coverage": "karma start karma.coverage.conf.js",
"test:clean": "rimraf _test-output",
"tslint": "tslint -c tslint.json -p tsconfig.json app/**/*.ts",
"build": "npm run copy && webpack --config app-config/webpack.run.prod.js",
"build": "npm run copy && node --max_old_space_size=4096 node_modules/webpack/bin/webpack.js --config app-config/webpack.config.js --env.production",
"build:clean": "rimraf wwwroot/build"
},
"dependencies": {
"@angular/animations": "7.2.14",
"@angular/common": "7.2.14",
"@angular/core": "7.2.14",
"@angular/forms": "7.2.14",
"@angular/http": "7.2.14",
"@angular/platform-browser-dynamic": "7.2.14",
"@angular/platform-browser": "7.2.14",
"@angular/platform-server": "7.2.14",
"@angular/router": "7.2.14",
"@angular/animations": "8.0.2",
"@angular/common": "8.0.2",
"@angular/core": "8.0.2",
"@angular/forms": "8.0.2",
"@angular/http": "7.2.15",
"@angular/platform-browser": "8.0.2",
"@angular/platform-browser-dynamic": "8.0.2",
"@angular/platform-server": "8.0.2",
"@angular/router": "8.0.2",
"angular2-chartjs": "0.5.1",
"babel-polyfill": "6.26.0",
"bootstrap": "4.3.1",
"core-js": "2.6.3",
"graphiql": "0.13.0",
"graphql": "14.2.1",
"core-js": "3.1.4",
"graphiql": "0.13.2",
"graphql": "14.3.1",
"marked": "0.6.2",
"moment": "2.24.0",
"mousetrap": "1.6.3",
"ng2-dnd": "5.0.2",
"ngx-color-picker": "7.5.0",
"oidc-client": "1.7.1",
"ngx-color-picker": "8.0.1",
"oidc-client": "1.8.2",
"pikaday": "1.8.0",
"progressbar.js": "1.0.1",
"react-dom": "16.8.6",
"react": "16.8.6",
"rxjs": "6.5.1",
"react-dom": "16.8.6",
"rxjs": "6.5.2",
"slugify": "1.3.4",
"sortablejs": "1.9.0",
"tslib": "1.9.3",
"tslib": "1.10.0",
"zone.js": "0.9.1"
},
"devDependencies": {
"@angular/compiler": "7.2.14",
"@angular/compiler-cli": "7.2.14",
"@ngtools/webpack": "7.3.8",
"@types/core-js": "2.5.0",
"@types/jasmine": "3.3.12",
"@angular/compiler": "8.0.2",
"@angular/compiler-cli": "8.0.2",
"@ngtools/webpack": "8.0.3",
"@types/core-js": "2.5.2",
"@types/jasmine": "3.3.13",
"@types/marked": "0.6.5",
"@types/mousetrap": "1.6",
"@types/node": "12.0.0",
"@types/react": "16.8.16",
"@types/node": "12.0.10",
"@types/react": "16.8.22",
"@types/react-dom": "16.8.4",
"@types/sortablejs": "1.7.2",
"angular-router-loader": "0.8.5",
"angular2-template-loader": "0.6.2",
"awesome-typescript-loader": "5.2.1",
"babel-core": "6.26.3",
"browserslist": "^4.6.3",
"caniuse-lite": "^1.0.30000975",
"caniuse-lite": "^1.0.30000976",
"circular-dependency-plugin": "5.0.2",
"codelyzer": "5.0.1",
"codelyzer": "5.1.0",
"cpx": "1.5.0",
"css-loader": "2.1.1",
"file-loader": "3.0.1",
"css-loader": "3.0.0",
"file-loader": "4.0.0",
"html-loader": "0.5.5",
"html-webpack-plugin": "3.2.0",
"ignore-loader": "0.1.2",
@ -83,8 +81,8 @@
"karma-jasmine-html-reporter": "1.4.2",
"karma-mocha-reporter": "2.2.5",
"karma-sourcemap-loader": "0.3.7",
"karma-webpack": "3.0.5",
"mini-css-extract-plugin": "0.6.0",
"karma-webpack": "4.0.2",
"mini-css-extract-plugin": "0.7.0",
"node-sass": "4.12.0",
"optimize-css-assets-webpack-plugin": "5.0.1",
"raw-loader": "1.0.0",
@ -93,17 +91,16 @@
"sass-lint": "1.13.1",
"sass-loader": "7.1.0",
"style-loader": "0.23.1",
"ts-loader": "5.4.5",
"ts-loader": "6.0.4",
"tsconfig-paths-webpack-plugin": "3.2.0",
"tslint": "5.16.0",
"tslint": "5.18.0",
"tslint-webpack-plugin": "2.0.4",
"typemoq": "2.1.0",
"typescript": "3.2.4",
"uglifyjs-webpack-plugin": "2.1.2",
"typescript": "3.4.3",
"uglifyjs-webpack-plugin": "2.1.3",
"underscore": "1.9.1",
"webpack": "4.30.0",
"webpack-cli": "3.3.1",
"webpack-dev-server": "3.3.1",
"webpack-merge": "4.2.1"
"webpack": "4.35.0",
"webpack-cli": "3.3.4",
"webpack-dev-server": "3.7.2"
}
}

1
src/Squidex/tsconfig.json

@ -3,6 +3,7 @@
"baseUrl": ".",
"emitDecoratorMetadata": true,
"experimentalDecorators": true,
"incremental": true,
"importHelpers": true,
"lib": ["es6", "esnext", "dom"],
"moduleResolution": "node",

Loading…
Cancel
Save