Skip to content

Commit 9d8498f

Browse files
author
jleveugle
committed
Initial commit
0 parents  commit 9d8498f

File tree

343 files changed

+28455
-0
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

343 files changed

+28455
-0
lines changed

.babelrc

+5
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
{
2+
"plugins": [
3+
"@babel/plugin-syntax-dynamic-import"
4+
]
5+
}

.commitlintrc.json

+5
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
{
2+
"extends": [
3+
"@commitlint/config-angular"
4+
]
5+
}

.editorconfig

+25
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
# EditorConfig helps developers define and maintain consistent
2+
# coding styles between different editors and IDEs
3+
# editorconfig.org
4+
5+
root = true
6+
7+
8+
[*]
9+
10+
# Change these settings to your own preference
11+
indent_style = space
12+
indent_size = 2
13+
14+
# We recommend you to keep these unchanged
15+
end_of_line = lf
16+
charset = utf-8
17+
trim_trailing_whitespace = true
18+
insert_final_newline = true
19+
20+
[*.html]
21+
indent_style = space
22+
indent_size = 4
23+
24+
[*.md]
25+
trim_trailing_whitespace = false

.eslintignore

+2
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
dist
2+
node_modules

.eslintrc.json

+13
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
{
2+
"root": true,
3+
"parser": "babel-eslint",
4+
"extends": "airbnb-base",
5+
"env": {
6+
"browser": true,
7+
"jquery": true
8+
},
9+
"rules": {
10+
"no-bitwise": ["error", { "allow": ["~"] }],
11+
"import/no-extraneous-dependencies": ["error", { "devDependencies": true }]
12+
}
13+
}

.gitattributes

+8
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
# Auto detect text files and perform LF normalization
2+
* text=auto
3+
4+
# JS files must always use LF for tools to work
5+
*.js eol=lf
6+
7+
*.png binary
8+
*.jpg binary

.github/CODEOWNERS

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
* @jleveugle @antleblanc @frenautvh @cbourgois

.github/CODE_OF_CONDUCT.md

+73
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,73 @@
1+
# Contributor Covenant Code of Conduct
2+
3+
## Our Pledge
4+
5+
In the interest of fostering an open and welcoming environment, we as
6+
contributors and maintainers pledge to making participation in our project and
7+
our community a harassment-free experience for everyone, regardless of age, body
8+
size, disability, ethnicity, sex characteristics, gender identity and expression,
9+
level of experience, education, socio-economic status, nationality, personal
10+
appearance, race, religion, or sexual identity and orientation.
11+
12+
## Our Standards
13+
14+
Examples of behavior that contributes to creating a positive environment
15+
include:
16+
17+
* Using welcoming and inclusive language
18+
* Being respectful of differing viewpoints and experiences
19+
* Gracefully accepting constructive criticism
20+
* Focusing on what is best for the community
21+
* Showing empathy towards other community members
22+
23+
Examples of unacceptable behavior by participants include:
24+
25+
* The use of sexualized language or imagery and unwelcome sexual attention or
26+
advances
27+
* Trolling, insulting/derogatory comments, and personal or political attacks
28+
* Public or private harassment
29+
* Publishing others' private information, such as a physical or electronic
30+
address, without explicit permission
31+
* Other conduct which could reasonably be considered inappropriate in a
32+
professional setting
33+
34+
## Our Responsibilities
35+
36+
Project maintainers are responsible for clarifying the standards of acceptable
37+
behavior and are expected to take appropriate and fair corrective action in
38+
response to any instances of unacceptable behavior.
39+
40+
Project maintainers have the right and responsibility to remove, edit, or
41+
reject comments, commits, code, wiki edits, issues, and other contributions
42+
that are not aligned to this Code of Conduct, or to ban temporarily or
43+
permanently any contributor for other behaviors that they deem inappropriate,
44+
threatening, offensive, or harmful.
45+
46+
## Scope
47+
48+
This Code of Conduct applies both within project spaces and in public spaces
49+
when an individual is representing the project or its community. Examples of
50+
representing a project or community include using an official project e-mail
51+
address, posting via an official social media account, or acting as an appointed
52+
representative at an online or offline event. Representation of a project may be
53+
further defined and clarified by project maintainers.
54+
55+
## Enforcement
56+
57+
Instances of abusive, harassing, or otherwise unacceptable behavior may be
58+
reported by contacting the project team at [email protected]. All
59+
complaints will be reviewed and investigated and will result in a response that
60+
is deemed necessary and appropriate to the circumstances. The project team is
61+
obligated to maintain confidentiality with regard to the reporter of an incident.
62+
Further details of specific enforcement policies may be posted separately.
63+
64+
Project maintainers who do not follow or enforce the Code of Conduct in good
65+
faith may face temporary or permanent repercussions as determined by other
66+
members of the project's leadership.
67+
68+
## Attribution
69+
70+
This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 1.4,
71+
available at https://www.contributor-covenant.org/version/1/4/code-of-conduct.html
72+
73+
[homepage]: https://www.contributor-covenant.org

.github/ISSUE_TEMPLATE/bug_report.md

+35
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
---
2+
name: Bug report
3+
about: Create a report to help us improve
4+
5+
---
6+
7+
**Describe the bug**
8+
A clear and concise description of what the bug is.
9+
10+
**To Reproduce**
11+
Steps to reproduce the behavior:
12+
1. Go to '...'
13+
2. Click on '....'
14+
3. Scroll down to '....'
15+
4. See error
16+
17+
**Expected behavior**
18+
A clear and concise description of what you expected to happen.
19+
20+
**Screenshots**
21+
If applicable, add screenshots to help explain your problem.
22+
23+
**Desktop (please complete the following information):**
24+
- OS: [e.g. iOS]
25+
- Browser [e.g. chrome, safari]
26+
- Version [e.g. 22]
27+
28+
**Smartphone (please complete the following information):**
29+
- Device: [e.g. iPhone6]
30+
- OS: [e.g. iOS8.1]
31+
- Browser [e.g. stock browser, safari]
32+
- Version [e.g. 22]
33+
34+
**Additional context**
35+
Add any other context about the problem here.
+17
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
---
2+
name: Feature request
3+
about: Suggest an idea for this project
4+
5+
---
6+
7+
**Is your feature request related to a problem? Please describe.**
8+
A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]
9+
10+
**Describe the solution you'd like**
11+
A clear and concise description of what you want to happen.
12+
13+
**Describe alternatives you've considered**
14+
A clear and concise description of any alternative solutions or features you've considered.
15+
16+
**Additional context**
17+
Add any other context or screenshots about the feature request here.

.gitignore

+2
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
node_modules
2+
dist

.htmlhintrc

+25
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
{
2+
"alt-require": true,
3+
"attr-lowercase": true,
4+
"attr-no-duplication": true,
5+
"attr-unsafe-chars": true,
6+
"attr-value-double-quotes": true,
7+
"attr-value-not-empty": false,
8+
"doctype-first": false,
9+
"doctype-html5": true,
10+
"head-script-disabled": true,
11+
"href-abs-or-rel": false,
12+
"id-class-ad-disabled": true,
13+
"id-class-value": false,
14+
"id-unique": true,
15+
"inline-script-disabled": true,
16+
"inline-style-disabled": false,
17+
"space-tab-mixed-disabled": "space",
18+
"spec-char-escape": true,
19+
"src-not-empty": true,
20+
"style-disabled": true,
21+
"tag-pair": true,
22+
"tag-self-close": false,
23+
"tagname-lowercase": true,
24+
"title-require": true
25+
}

.huskyrc.json

+6
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
{
2+
"hooks": {
3+
"pre-commit": "lint-staged",
4+
"commit-msg": "commitlint -E HUSKY_GIT_PARAMS"
5+
}
6+
}

.lintstagedrc.json

+13
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
{
2+
"*.html": [
3+
"htmlhint 'packages/**/*.html'"
4+
],
5+
"*.js": [
6+
"eslint --fix",
7+
"git add"
8+
],
9+
"*.less": [
10+
"stylelint 'packages/**/*.less' --fix",
11+
"git add"
12+
]
13+
}

.npmrc

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
package-lock=false

.remarkrc

+6
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
{
2+
"plugins": [
3+
"remark-preset-lint-recommended",
4+
["remark-lint-list-item-indent", false]
5+
]
6+
}

.stylelintrc.json

+3
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
{
2+
"extends": "stylelint-config-standard"
3+
}

CHANGELOG.md

Whitespace-only changes.

LICENSE

+29
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
BSD 3-Clause License
2+
3+
Copyright (c) 2013-2018, OVH SAS
4+
All rights reserved.
5+
6+
Redistribution and use in source and binary forms, with or without
7+
modification, are permitted provided that the following conditions are met:
8+
9+
* Redistributions of source code must retain the above copyright notice, this
10+
list of conditions and the following disclaimer.
11+
12+
* Redistributions in binary form must reproduce the above copyright notice,
13+
this list of conditions and the following disclaimer in the documentation
14+
and/or other materials provided with the distribution.
15+
16+
* Neither the name of the copyright holder nor the names of its
17+
contributors may be used to endorse or promote products derived from
18+
this software without specific prior written permission.
19+
20+
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
21+
AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
22+
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
23+
DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
24+
FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
25+
DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
26+
SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
27+
CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
28+
OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
29+
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

README.md

+27
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
# OVH Manager
2+
3+
# Installation
4+
5+
Clone this repository and let's go at the root of the folder :)
6+
7+
```bash
8+
cd manager
9+
```
10+
11+
Install it by using yarn >= 1.7 (we are using workspace feature: <https://yarnpkg.com/lang/en/docs/cli/workspace/>)
12+
13+
```bash
14+
yarn install
15+
```
16+
17+
# Start
18+
19+
```bash
20+
yarn start
21+
```
22+
23+
By default, the UI is available at: <http://localhost:9000>
24+
25+
A Bundler Analyzer is available at: <http://localhost:8888>
26+
27+
See you :)

lerna.json

+17
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
{
2+
"lerna": "3.4.3",
3+
"packages": [
4+
"packages/*"
5+
],
6+
"npmClient": "yarn",
7+
"useWorkspaces": true,
8+
"version": "independent",
9+
"command": {
10+
"bootstrap": {
11+
"npmClientArgs": ["--access public"]
12+
},
13+
"publish": {
14+
"conventionalCommits": true
15+
}
16+
}
17+
}

loaders/translations.js

+31
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
function formatTranslation(object) {
2+
const result = {};
3+
object.forEach((elem) => {
4+
if (elem.hasOwnProperty('id') && elem.hasOwnProperty('text') && !~elem.id.indexOf('>')) { // eslint-disable-line no-prototype-builtins
5+
result[elem.id] = elem.text;
6+
} else {
7+
throw new Error('Error: xml: format is incorrect');
8+
}
9+
});
10+
return result;
11+
}
12+
13+
module.exports = function exports(source) {
14+
const reg = /<translation\s+id="([\w-]+?)"\s*(qtlid="([0-9]+)")?\s*(?:translate="none")?\s*?>((?:.|\n|\r)*?)<\/translation>/gi;
15+
16+
17+
const obj = []; let
18+
match;
19+
20+
while ((match = reg.exec(source))) { // eslint-disable-line no-cond-assign
21+
const elem = {
22+
id: match[1],
23+
text: match[4].replace(/&#13;\n/g, ' ').replace(/&#160;/g, ' '),
24+
};
25+
26+
elem.text = elem.text.replace(/\{(\s?\d\s?)\}/g, '{{t$1}}');
27+
28+
obj.push(elem);
29+
}
30+
return `export default ${JSON.stringify(formatTranslation(obj))}`;
31+
};

0 commit comments

Comments
 (0)