mirror of https://github.com/Squidex/squidex.git
Browse Source
* T * started with test update * Upgrade angular. * Fix eslint * Update node. * Update Dockerfile * Fix tour. * Small change.pull/1285/head
committed by
GitHub
202 changed files with 14544 additions and 37677 deletions
@ -1,163 +0,0 @@ |
|||||
/* eslint-disable */ |
|
||||
|
|
||||
module.exports = { |
|
||||
"env": { |
|
||||
"browser": true, |
|
||||
"node": true |
|
||||
}, |
|
||||
"extends": [ |
|
||||
"airbnb-typescript/base", |
|
||||
"plugin:@angular-eslint/recommended", |
|
||||
"plugin:@angular-eslint/template/process-inline-templates" |
|
||||
], |
|
||||
"parser": "@typescript-eslint/parser", |
|
||||
"parserOptions": { |
|
||||
"project": "tsconfig.json" |
|
||||
}, |
|
||||
"plugins": [ |
|
||||
"deprecation", |
|
||||
"eslint-plugin-import", |
|
||||
"@typescript-eslint" |
|
||||
], |
|
||||
"rules": { |
|
||||
"@angular-eslint/component-selector": [ |
|
||||
"error", |
|
||||
{ |
|
||||
"prefix": "sqx", |
|
||||
"style": "kebab-case", |
|
||||
"type": "element" |
|
||||
} |
|
||||
], |
|
||||
"@angular-eslint/directive-selector": [ |
|
||||
"error", |
|
||||
{ |
|
||||
"prefix": "sqx", |
|
||||
"style": "camelCase", |
|
||||
"type": "attribute" |
|
||||
} |
|
||||
], |
|
||||
"@angular-eslint/use-lifecycle-interface": [ |
|
||||
"off" |
|
||||
], |
|
||||
"@typescript-eslint/dot-notation": "off", |
|
||||
"@typescript-eslint/indent": "off", |
|
||||
"@typescript-eslint/lines-between-class-members": "off", |
|
||||
"@typescript-eslint/member-delimiter-style": [ |
|
||||
"error", |
|
||||
{ |
|
||||
"multiline": { |
|
||||
"delimiter": "semi", |
|
||||
"requireLast": true |
|
||||
}, |
|
||||
"singleline": { |
|
||||
"delimiter": "semi", |
|
||||
"requireLast": false |
|
||||
} |
|
||||
} |
|
||||
], |
|
||||
"@typescript-eslint/naming-convention": [ |
|
||||
"error", |
|
||||
{ |
|
||||
"format": [ |
|
||||
"camelCase", |
|
||||
"PascalCase", |
|
||||
"UPPER_CASE" |
|
||||
], |
|
||||
"leadingUnderscore": "allow", |
|
||||
"selector": "variable", |
|
||||
"trailingUnderscore": "allow" |
|
||||
}, |
|
||||
{ |
|
||||
"format": [ |
|
||||
"PascalCase" |
|
||||
], |
|
||||
"selector": "typeLike" |
|
||||
} |
|
||||
], |
|
||||
"@typescript-eslint/no-shadow": "off", |
|
||||
"@typescript-eslint/no-this-alias": "error", |
|
||||
"@typescript-eslint/no-unnecessary-boolean-literal-compare": "error", |
|
||||
"@typescript-eslint/no-unused-expressions": "off", |
|
||||
"@typescript-eslint/no-unused-vars": [ |
|
||||
"error", |
|
||||
{ |
|
||||
"argsIgnorePattern": "^_", |
|
||||
"varsIgnorePattern": "^_" |
|
||||
} |
|
||||
], |
|
||||
"@typescript-eslint/no-use-before-define": "off", |
|
||||
"@typescript-eslint/quotes": [ |
|
||||
"error", |
|
||||
"single" |
|
||||
], |
|
||||
"@typescript-eslint/return-await": "off", |
|
||||
"@typescript-eslint/semi": [ |
|
||||
"error", |
|
||||
"always" |
|
||||
], |
|
||||
"arrow-body-style": "off", |
|
||||
"arrow-parens": "off", |
|
||||
"class-methods-use-this": "off", |
|
||||
"default-case": "off", |
|
||||
"deprecation/deprecation": "warn", |
|
||||
"function-paren-newline": "off", |
|
||||
"implicit-arrow-linebreak": "off", |
|
||||
"import/extensions": "off", |
|
||||
"import/no-extraneous-dependencies": "off", |
|
||||
"import/no-useless-path-segments": "off", |
|
||||
"import/order": [ |
|
||||
"error", |
|
||||
{ |
|
||||
"alphabetize": { |
|
||||
"order": "asc" |
|
||||
}, |
|
||||
"pathGroups": [ |
|
||||
{ |
|
||||
"group": "external", |
|
||||
"pattern": "@app/**", |
|
||||
"position": "after" |
|
||||
} |
|
||||
], |
|
||||
"pathGroupsExcludedImportTypes": [ |
|
||||
"builtin" |
|
||||
] |
|
||||
} |
|
||||
], |
|
||||
"import/prefer-default-export": "off", |
|
||||
"linebreak-style": "off", |
|
||||
"max-classes-per-file": "off", |
|
||||
"max-len": "off", |
|
||||
"newline-per-chained-call": "off", |
|
||||
"no-else-return": "off", |
|
||||
"no-mixed-operators": "off", |
|
||||
"no-nested-ternary": "off", |
|
||||
"no-param-reassign": "off", |
|
||||
"no-plusplus": "off", |
|
||||
"no-prototype-builtins": "off", |
|
||||
"no-restricted-syntax": "off", |
|
||||
"no-trailing-spaces": "error", |
|
||||
"no-underscore-dangle": "off", |
|
||||
"object-curly-newline": [ |
|
||||
"error", |
|
||||
{ |
|
||||
"ExportDeclaration": "never", |
|
||||
"ImportDeclaration": "never", |
|
||||
"ObjectExpression": { |
|
||||
"consistent": true |
|
||||
}, |
|
||||
"ObjectPattern": { |
|
||||
"consistent": true |
|
||||
} |
|
||||
} |
|
||||
], |
|
||||
"operator-linebreak": "off", |
|
||||
"prefer-destructuring": "off", |
|
||||
"sort-imports": [ |
|
||||
"error", |
|
||||
{ |
|
||||
"ignoreCase": true, |
|
||||
"ignoreDeclarationSort": true |
|
||||
} |
|
||||
] |
|
||||
} |
|
||||
}; |
|
||||
File diff suppressed because it is too large
@ -0,0 +1,159 @@ |
|||||
|
const { |
||||
|
defineConfig, |
||||
|
} = require("eslint/config"); |
||||
|
|
||||
|
const globals = require("globals"); |
||||
|
const tsParser = require("@typescript-eslint/parser"); |
||||
|
const deprecation = require("eslint-plugin-deprecation"); |
||||
|
const importPlugin = require("eslint-plugin-import"); |
||||
|
const typescriptEslint = require("@typescript-eslint/eslint-plugin"); |
||||
|
|
||||
|
const js = require("@eslint/js"); |
||||
|
|
||||
|
const { |
||||
|
FlatCompat, |
||||
|
} = require("@eslint/eslintrc"); |
||||
|
|
||||
|
const compat = new FlatCompat({ |
||||
|
baseDirectory: __dirname, |
||||
|
recommendedConfig: js.configs.recommended, |
||||
|
allConfig: js.configs.all |
||||
|
}); |
||||
|
|
||||
|
module.exports = defineConfig([{ |
||||
|
languageOptions: { |
||||
|
globals: { |
||||
|
...globals.browser, |
||||
|
...globals.node, |
||||
|
}, |
||||
|
|
||||
|
parser: tsParser, |
||||
|
|
||||
|
parserOptions: { |
||||
|
"project": ["tsconfig.app.json", "tsconfig.spec.json"], |
||||
|
"createDefaultProgram": true, |
||||
|
}, |
||||
|
}, |
||||
|
|
||||
|
extends: compat.extends( |
||||
|
"eslint:recommended", |
||||
|
"plugin:@angular-eslint/recommended", |
||||
|
"plugin:@angular-eslint/template/process-inline-templates", |
||||
|
), |
||||
|
|
||||
|
plugins: { |
||||
|
deprecation, |
||||
|
import: importPlugin, |
||||
|
"@typescript-eslint": typescriptEslint, |
||||
|
}, |
||||
|
}, |
||||
|
{ |
||||
|
files: ['src/**/*.ts', '**/*.ts'], |
||||
|
rules: { |
||||
|
"@angular-eslint/component-selector": ["error", { |
||||
|
"prefix": "sqx", |
||||
|
"style": "kebab-case", |
||||
|
"type": "element", |
||||
|
}], |
||||
|
|
||||
|
"@angular-eslint/directive-selector": ["error", { |
||||
|
"prefix": "sqx", |
||||
|
"style": "camelCase", |
||||
|
"type": "attribute", |
||||
|
}], |
||||
|
|
||||
|
"@angular-eslint/prefer-inject": ["off"], |
||||
|
"@angular-eslint/use-lifecycle-interface": ["off"], |
||||
|
"@typescript-eslint/dot-notation": "off", |
||||
|
"@typescript-eslint/indent": "off", |
||||
|
"@typescript-eslint/lines-between-class-members": "off", |
||||
|
|
||||
|
"@typescript-eslint/naming-convention": ["error", { |
||||
|
"format": ["camelCase", "PascalCase", "UPPER_CASE"], |
||||
|
"leadingUnderscore": "allow", |
||||
|
"selector": "variable", |
||||
|
"trailingUnderscore": "allow", |
||||
|
}, { |
||||
|
"format": ["PascalCase"], |
||||
|
"selector": "typeLike", |
||||
|
}], |
||||
|
|
||||
|
"@typescript-eslint/no-shadow": "off", |
||||
|
"@typescript-eslint/no-this-alias": "error", |
||||
|
"@typescript-eslint/no-unnecessary-boolean-literal-compare": "error", |
||||
|
"@typescript-eslint/no-unused-expressions": "off", |
||||
|
"@typescript-eslint/no-implied-eval": "error", |
||||
|
|
||||
|
"@typescript-eslint/no-unused-vars": ["error", { |
||||
|
"argsIgnorePattern": "^_", |
||||
|
"varsIgnorePattern": "^_", |
||||
|
}], |
||||
|
|
||||
|
"@typescript-eslint/no-use-before-define": "off", |
||||
|
"@typescript-eslint/return-await": "off", |
||||
|
"arrow-body-style": "off", |
||||
|
"arrow-parens": "off", |
||||
|
"class-methods-use-this": "off", |
||||
|
"default-case": "off", |
||||
|
"function-paren-newline": "off", |
||||
|
"implicit-arrow-linebreak": "off", |
||||
|
"import/extensions": "off", |
||||
|
"import/no-extraneous-dependencies": "off", |
||||
|
"import/no-useless-path-segments": "off", |
||||
|
|
||||
|
"import/order": ["error", { |
||||
|
"alphabetize": { |
||||
|
"order": "asc", |
||||
|
}, |
||||
|
|
||||
|
"pathGroups": [{ |
||||
|
"group": "external", |
||||
|
"pattern": "@app/**", |
||||
|
"position": "after", |
||||
|
}], |
||||
|
|
||||
|
"pathGroupsExcludedImportTypes": ["builtin"], |
||||
|
}], |
||||
|
|
||||
|
"import/prefer-default-export": "off", |
||||
|
"linebreak-style": "off", |
||||
|
"max-classes-per-file": "off", |
||||
|
"max-len": "off", |
||||
|
"newline-per-chained-call": "off", |
||||
|
"no-else-return": "off", |
||||
|
"no-extra-boolean-cast": "off", |
||||
|
"no-mixed-operators": "off", |
||||
|
"no-nested-ternary": "off", |
||||
|
"no-param-reassign": "off", |
||||
|
"no-plusplus": "off", |
||||
|
"no-prototype-builtins": "off", |
||||
|
"no-restricted-syntax": "off", |
||||
|
"no-trailing-spaces": "error", |
||||
|
"no-underscore-dangle": "off", |
||||
|
"no-undef": "off", |
||||
|
"no-unused-vars": "off", |
||||
|
"no-useless-escape": "off", |
||||
|
"no-useless-return": "warn", |
||||
|
|
||||
|
"object-curly-newline": ["error", { |
||||
|
"ExportDeclaration": "never", |
||||
|
"ImportDeclaration": "never", |
||||
|
|
||||
|
"ObjectExpression": { |
||||
|
"consistent": true, |
||||
|
}, |
||||
|
|
||||
|
"ObjectPattern": { |
||||
|
"consistent": true, |
||||
|
}, |
||||
|
}], |
||||
|
|
||||
|
"operator-linebreak": "off", |
||||
|
"prefer-destructuring": "off", |
||||
|
|
||||
|
"sort-imports": ["error", { |
||||
|
"ignoreCase": true, |
||||
|
"ignoreDeclarationSort": true, |
||||
|
}], |
||||
|
}, |
||||
|
}]); |
||||
@ -1,56 +0,0 @@ |
|||||
// Karma configuration file, see link for more information
|
|
||||
// https://karma-runner.github.io/1.0/config/configuration-file.html
|
|
||||
|
|
||||
module.exports = function (config) { |
|
||||
config.set({ |
|
||||
basePath: '', |
|
||||
frameworks: ['jasmine', '@angular-devkit/build-angular'], |
|
||||
plugins: [ |
|
||||
require('@angular-devkit/build-angular/plugins/karma'), |
|
||||
require('karma-chrome-launcher'), |
|
||||
require('karma-coverage'), |
|
||||
require('karma-jasmine-html-reporter'), |
|
||||
require('karma-jasmine'), |
|
||||
], |
|
||||
client: { |
|
||||
jasmine: { |
|
||||
// you can add configuration options for Jasmine here
|
|
||||
// the possible options are listed at https://jasmine.github.io/api/edge/Configuration.html
|
|
||||
// for example, you can disable the random execution with `random: false`
|
|
||||
// or set a specific seed with `seed: 4321`
|
|
||||
}, |
|
||||
clearContext: false, // leave Jasmine Spec Runner output visible in browser
|
|
||||
}, |
|
||||
jasmineHtmlReporter: { |
|
||||
suppressAll: true, // removes the duplicated traces
|
|
||||
}, |
|
||||
coverageReporter: { |
|
||||
dir: require('path').join(__dirname, './coverage/squidex'), |
|
||||
subdir: '.', |
|
||||
reporters: [ |
|
||||
{ type: 'html' }, |
|
||||
{ type: 'text-summary' }, |
|
||||
], |
|
||||
}, |
|
||||
customLaunchers: { |
|
||||
ChromeHeadlessNoSandbox: { |
|
||||
base: 'ChromeHeadless', |
|
||||
// See /integration/README.md#browser-tests for more info on these args
|
|
||||
flags: [ |
|
||||
'--disable-dev-shm-usage', |
|
||||
'--disable-gpu', |
|
||||
'--headless', |
|
||||
'--no-sandbox', |
|
||||
], |
|
||||
}, |
|
||||
}, |
|
||||
autoWatch: true, |
|
||||
browsers: ['Chrome'], |
|
||||
colors: true, |
|
||||
logLevel: config.LOG_INFO, |
|
||||
port: 9876, |
|
||||
reporters: ['progress', 'kjhtml'], |
|
||||
restartOnFileChange: true, |
|
||||
singleRun: false, |
|
||||
}); |
|
||||
}; |
|
||||
File diff suppressed because it is too large
@ -1,96 +0,0 @@ |
|||||
/* |
|
||||
* Squidex Headless CMS |
|
||||
* |
|
||||
* @license |
|
||||
* Copyright (c) Squidex UG (haftungsbeschränkt). All rights reserved. |
|
||||
*/ |
|
||||
|
|
||||
import { animate, AnimationTriggerMetadata, keyframes, state, style, transition, trigger } from '@angular/animations'; |
|
||||
|
|
||||
export function buildSlideRightAnimation(name = 'slideRight', timing = '150ms'): AnimationTriggerMetadata { |
|
||||
return trigger( |
|
||||
name, [ |
|
||||
transition(':enter', [ |
|
||||
style({ transform: 'translateX(-100%)' }), |
|
||||
animate(timing, style({ transform: 'translateX(0%)' })), |
|
||||
]), |
|
||||
transition(':leave', [ |
|
||||
style({ transform: 'translateX(0%)' }), |
|
||||
animate(timing, style({ transform: 'translateX(-100%)' })), |
|
||||
]), |
|
||||
state('true', |
|
||||
style({ transform: 'translateX(0%)' }), |
|
||||
), |
|
||||
state('false', |
|
||||
style({ transform: 'translateX(-100%)' }), |
|
||||
), |
|
||||
transition('1 => 0', animate(timing)), |
|
||||
transition('0 => 1', animate(timing)), |
|
||||
], |
|
||||
); |
|
||||
} |
|
||||
|
|
||||
export function buildSlideAnimation(name = 'slide', timing = '400ms'): AnimationTriggerMetadata { |
|
||||
return trigger( |
|
||||
name, [ |
|
||||
transition(':enter', [ |
|
||||
style({ transform: 'translateX(100%)' }), |
|
||||
animate(timing, style({ transform: 'translateX(0%)' })), |
|
||||
]), |
|
||||
transition(':leave', [ |
|
||||
style({ transform: 'translateX(0%)' }), |
|
||||
animate(timing, style({ transform: 'translateX(-100%)' })), |
|
||||
]), |
|
||||
state('true', |
|
||||
style({ transform: 'translateX(0%)' }), |
|
||||
), |
|
||||
state('false', |
|
||||
style({ transform: 'translateX(-100%)' }), |
|
||||
), |
|
||||
transition('1 => 0', animate(timing)), |
|
||||
transition('0 => 1', animate(timing)), |
|
||||
], |
|
||||
); |
|
||||
} |
|
||||
|
|
||||
export function buildFadeAnimation(name = 'fade', timing = '150ms'): AnimationTriggerMetadata { |
|
||||
return trigger( |
|
||||
name, [ |
|
||||
transition(':enter', [ |
|
||||
style({ opacity: 0 }), |
|
||||
animate(timing, style({ opacity: 1 })), |
|
||||
]), |
|
||||
transition(':leave', [ |
|
||||
style({ opacity: 1 }), |
|
||||
animate(timing, style({ opacity: 0 })), |
|
||||
]), |
|
||||
state('true', |
|
||||
style({ opacity: 1 }), |
|
||||
), |
|
||||
state('false', |
|
||||
style({ opacity: 0 }), |
|
||||
), |
|
||||
transition('1 => 0', animate(timing)), |
|
||||
transition('0 => 1', animate(timing)), |
|
||||
], |
|
||||
); |
|
||||
} |
|
||||
|
|
||||
export function buildBounceAnimation(name = 'bounce', timing = '150ms'): AnimationTriggerMetadata { |
|
||||
return trigger( |
|
||||
name, [ |
|
||||
transition('* => true', [ |
|
||||
animate(timing, keyframes([ |
|
||||
style({ transform: 'translateX(0)' }), |
|
||||
style({ transform: 'translateX(-10px)' }), |
|
||||
style({ transform: 'translateX(0)' }), |
|
||||
])), |
|
||||
]), |
|
||||
], |
|
||||
); |
|
||||
} |
|
||||
|
|
||||
export const bounceAnimation = buildBounceAnimation(); |
|
||||
export const fadeAnimation = buildFadeAnimation(); |
|
||||
export const slideAnimation = buildSlideAnimation(); |
|
||||
export const slideRightAnimation = buildSlideRightAnimation(); |
|
||||
Some files were not shown because too many files changed in this diff
Loading…
Reference in new issue