mirror of https://github.com/Squidex/squidex.git
86 changed files with 826 additions and 1648 deletions
@ -1,166 +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/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/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 |
|||
} |
|||
] |
|||
} |
|||
}; |
|||
@ -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, |
|||
}], |
|||
}, |
|||
}]); |
|||
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(); |
|||
Loading…
Reference in new issue