Skip to content
This repository was archived by the owner on Aug 7, 2020. It is now read-only.
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
25 changes: 25 additions & 0 deletions .htmlhintrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
{
"alt-require": true,
"attr-lowercase": true,
"attr-no-duplication": true,
"attr-unsafe-chars": true,
"attr-value-double-quotes": true,
"attr-value-not-empty": false,
"doctype-first": false,
"doctype-html5": true,
"head-script-disabled": true,
"href-abs-or-rel": false,
"id-class-ad-disabled": true,
"id-class-value": false,
"id-unique": true,
"inline-script-disabled": true,
"inline-style-disabled": false,
"space-tab-mixed-disabled": "space",
"spec-char-escape": true,
"src-not-empty": true,
"style-disabled": true,
"tag-pair": true,
"tag-self-close": false,
"tagname-lowercase": true,
"title-require": true
}
Empty file removed assets/svg/.gitkeep
Empty file.
6 changes: 0 additions & 6 deletions assets/svg/checkbox-facade.svg

This file was deleted.

3 changes: 0 additions & 3 deletions assets/svg/close-icon.svg

This file was deleted.

4 changes: 0 additions & 4 deletions assets/svg/error-icon_circle.svg

This file was deleted.

4 changes: 0 additions & 4 deletions assets/svg/info-icon_circle.svg

This file was deleted.

4 changes: 0 additions & 4 deletions assets/svg/success-icon_circle.svg

This file was deleted.

5 changes: 0 additions & 5 deletions assets/svg/warning-icon_circle.svg

This file was deleted.

8 changes: 4 additions & 4 deletions build/karma.conf.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,20 +11,20 @@ module.exports = function (config) {
// 1. install corresponding karma launcher
// http://karma-runner.github.io/0.13/config/browsers.html
// 2. add it to the `browsers` array below.
basePath: "../",
browsers: ["PhantomJS"],
frameworks: ["jasmine"],
client: {
chai: {
includeStack: true
}
},
reporters: ["nyan"],
files: [
require.resolve("angular"), // eslint-disable-line no-undef
require.resolve("angular-mocks"), // eslint-disable-line no-undef
require.resolve("angular-aria"), // eslint-disable-line no-undef
require.resolve("angular-sanitize"), // eslint-disable-line no-undef
"../packages/oui-angular/src/index.spec.js"
"packages/**/tests/index.js"
],
preprocessors: {
// eslint-disable-next-line no-undef
Expand All @@ -33,7 +33,7 @@ module.exports = function (config) {
[require.resolve("angular-mocks")]: ["webpack", "sourcemap"],
[require.resolve("angular-aria")]: ["webpack", "sourcemap"],
[require.resolve("angular-sanitize")]: ["webpack", "sourcemap"],
"../packages/oui-angular/src/index.spec.js": ["webpack", "sourcemap"]
"packages/**/tests/index.js": ["webpack", "sourcemap"]
},
webpack: webpackConfig,
webpackMiddleware: {
Expand All @@ -43,7 +43,7 @@ module.exports = function (config) {
}
},
coverageReporter: {
dir: "../coverage/",
dir: "coverage/",
reporters: [
{ type: "text" },
{ type: "lcov", subdir: "report-lcov" },
Expand Down
14 changes: 0 additions & 14 deletions index.html

This file was deleted.

9 changes: 2 additions & 7 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,10 +24,8 @@
"build:watch": "webpack --progress --colors --config build/webpack.dist.config.js --watch",
"eslint": "eslint ./packages",
"eslint:fix": "eslint --fix ./packages",
"test": "npm run unit:ci",
"unit": "cross-env NODE_ENV=test babel-node node_modules/karma/bin/karma start build/karma.conf.js --reporters nyan,coverage --single-run",
"unit:ci": "cross-env NODE_ENV=test babel-node node_modules/karma/bin/karma start build/karma.conf.js --reporters spec,coverage --single-run",
"unit:watch": "cross-env NODE_ENV=test BABEL_ENV=test node -r babel-register node_modules/karma/bin/karma start build/karma.conf.js --watch"
"test": "cross-env NODE_ENV=test babel-node ./node_modules/karma/bin/karma start build/karma.conf.js --reporters spec,coverage --single-run",
"test:watch": "cross-env NODE_ENV=test BABEL_ENV=test node -r babel-register ./node_modules/karma/bin/karma start build/karma.conf.js --watch"
},
"config": {
"commitizen": {
Expand Down Expand Up @@ -74,11 +72,8 @@
"istanbul-instrumenter-loader": "^3.0.1",
"jasmine-core": "^3.2.1",
"karma": "^3.0.0",
"karma-chrome-launcher": "^2.2.0",
"karma-coverage": "^1.1.2",
"karma-jasmine": "^1.1.2",
"karma-junit-reporter": "^1.2.0",
"karma-nyan-reporter": "^0.2.5",
"karma-phantomjs-launcher": "^1.0.4",
"karma-sourcemap-loader": "^0.3.7",
"karma-spec-reporter": "^0.0.32",
Expand Down
15 changes: 9 additions & 6 deletions packages/common/component-utils.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,10 @@
*/
export function addBooleanParameter (controller, parameterName) {
const ctrl = controller;
if (angular.isDefined(ctrl.$attrs[parameterName]) &&
ctrl.$attrs[parameterName] === "") {
ctrl[parameterName] = true;
if (ctrl.$attrs) {
if (angular.isDefined(ctrl.$attrs[parameterName]) && ctrl.$attrs[parameterName] === "") {
ctrl[parameterName] = true;
}
}
}

Expand All @@ -27,9 +28,11 @@ export function addBooleanParameter (controller, parameterName) {
*/
export function addDefaultParameter (controller, parameterName, defaultValue) {
const ctrl = controller;
if (!angular.isDefined(ctrl.$attrs[parameterName]) ||
(angular.isDefined(ctrl.$attrs[parameterName]) && ctrl.$attrs[parameterName].trim() === "")) {
ctrl[parameterName] = defaultValue;
if (ctrl.$attrs) {
if (!angular.isDefined(ctrl.$attrs[parameterName]) ||
(angular.isDefined(ctrl.$attrs[parameterName]) && ctrl.$attrs[parameterName].trim() === "")) {
ctrl[parameterName] = defaultValue;
}
}
}

Expand Down
7 changes: 7 additions & 0 deletions packages/oui-action-menu/tests/index.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
import "@ovh-ui/common/test-utils";

loadTests(require.context("../src/", true, /.*((\.spec)|(index))$/));

function loadTests (context) {
context.keys().forEach(context);
}
3 changes: 1 addition & 2 deletions packages/oui-angular/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,7 @@
"@ovh-ui/oui-chips": "^1.0.0",
"@ovh-ui/oui-clipboard": "^1.0.0",
"@ovh-ui/oui-collapsible": "^1.0.0",
"@ovh-ui/oui-criteria-adder": "^1.0.0",
"@ovh-ui/oui-criteria-container": "^1.0.0",
"@ovh-ui/oui-criteria": "^1.0.0",
"@ovh-ui/oui-datagrid": "^1.0.0",
"@ovh-ui/oui-dropdown": "^1.0.0",
"@ovh-ui/oui-field": "^1.0.0",
Expand Down
10 changes: 8 additions & 2 deletions packages/oui-angular/src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ import Checkbox from "@ovh-ui/oui-checkbox";
import Chips from "@ovh-ui/oui-chips";
import Clipboard from "@ovh-ui/oui-clipboard";
import Collapsible from "@ovh-ui/oui-collapsible";
import Criteria from "@ovh-ui/oui-criteria";
import CriteriaAdder from "@ovh-ui/oui-criteria-adder";
import CriteriaContainer from "@ovh-ui/oui-criteria-container";
import Datagrid from "@ovh-ui/oui-datagrid";
Expand All @@ -24,6 +25,7 @@ import Navbar from "@ovh-ui/oui-navbar";
import Numeric from "@ovh-ui/oui-numeric";
import PageHeader from "@ovh-ui/oui-page-header";
import Pagination from "@ovh-ui/oui-pagination";
import Password from "@ovh-ui/oui-password";
import Popover from "@ovh-ui/oui-popover";
import Progress from "@ovh-ui/oui-progress";
import Radio from "@ovh-ui/oui-radio";
Expand All @@ -38,6 +40,7 @@ import Switch from "@ovh-ui/oui-switch";
import Tabs from "@ovh-ui/oui-tabs";
import Textarea from "@ovh-ui/oui-textarea";
import Tile from "@ovh-ui/oui-tile";
import Timepicker from "@ovh-ui/oui-timepicker";
import Tooltip from "@ovh-ui/oui-tooltip";

export default angular
Expand All @@ -51,8 +54,9 @@ export default angular
Chips,
Clipboard,
Collapsible,
CriteriaAdder,
CriteriaContainer,
Criteria,
CriteriaAdder, // Deprecated: Suppport only for old use
CriteriaContainer, // Deprecated: Suppport only for old use
Datagrid,
Dropdown,
DualList,
Expand All @@ -68,6 +72,7 @@ export default angular
Numeric,
PageHeader,
Pagination,
Password,
Popover,
Progress,
Radio,
Expand All @@ -82,6 +87,7 @@ export default angular
Tabs,
Textarea,
Tile,
Timepicker,
Tooltip
])
.name;
47 changes: 0 additions & 47 deletions packages/oui-angular/src/index.spec.js

This file was deleted.

7 changes: 7 additions & 0 deletions packages/oui-autocomplete/tests/index.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
import "@ovh-ui/common/test-utils";

loadTests(require.context("../src/", true, /.*((\.spec)|(index))$/));

function loadTests (context) {
context.keys().forEach(context);
}
7 changes: 7 additions & 0 deletions packages/oui-back-button/tests/index.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
import "@ovh-ui/common/test-utils";

loadTests(require.context("../src/", true, /.*((\.spec)|(index))$/));

function loadTests (context) {
context.keys().forEach(context);
}
7 changes: 7 additions & 0 deletions packages/oui-button/tests/index.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
import "@ovh-ui/common/test-utils";

loadTests(require.context("../src/", true, /.*((\.spec)|(index))$/));

function loadTests (context) {
context.keys().forEach(context);
}
Loading