Skip to content

Commit

Permalink
chore(datagrid): update stencil 4
Browse files Browse the repository at this point in the history
  • Loading branch information
aesteves60 committed Oct 26, 2023
1 parent 43efb9c commit cda2dee
Show file tree
Hide file tree
Showing 10 changed files with 64 additions and 115 deletions.
26 changes: 12 additions & 14 deletions packages/components/datagrid/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,27 +12,24 @@
"collection": "dist/collection/collection-manifest.json",
"collection:main": "dist/collection/index.js",
"scripts": {
"build:prod": "npm run build:stencil --if-present && npm run build:react --if-present && npm run build:vue --if-present",
"build": "echo \"use build:prod\"",
"build:stencil": "stencil build --docs --prod --config stencil.config.ts",
"build:ci": "build-stencil",
"build:prod": "build-stencil prod",
"build:react": "npm --prefix react run build",
"build:stencil": "stencil build --docs --prod --config stencil.config.ts",
"build:vue": "npm --prefix vue run build",
"watch": "stencil build --docs --watch --dev --config stencil.config.ts",
"start": "stencil build --docs --dev --watch --serve",
"ignore:rm": "git clean -Xdf",
"generate": "stencil generate",
"doc:api": "typedoc",
"doc": "typedoc --json ./docs-api/typedoc.json --pretty && node ../../../scripts/generate-typedoc-md.js",
"doc:api": "typedoc",
"generate:licence": "npx generate-license-file --input package.json --output THIRD-PARTY-LICENCES --overwrite",
"test": "yarn run test:spec && yarn run test:e2e",
"test:spec": "stencil test --spec --config stencil.config.ts --coverage",
"test:spec:ci": "stencil test --config stencil.config.ts --spec --ci --coverage",
"lint:scss": "stylelint 'src/components/**/*.scss'",
"start": "stencil build --docs --dev --watch --serve",
"test:e2e": "stencil test --e2e --config stencil.config.ts",
"test:e2e:ci": "stencil test --config stencil.config.ts --e2e --ci",
"test:e2e:screenshot": "stencil test --e2e --screenshot --config stencil.config.ts --passWithNoTests",
"test:e2e:screenshot:update": "stencil test --e2e --screenshot --config stencil.config.ts --update-screenshot --passWithNoTests",
"test:e2e:ci": "stencil test --config stencil.config.ts --e2e --ci",
"test:e2e:ci:screenshot": "stencil test --config stencil.config.ts --e2e --ci --screenshot --passWithNoTests",
"test:e2e:ci:screenshot:update": "stencil test --config stencil.config.ts --e2e --ci --screenshot --update-screenshot --passWithNoTests"
"test:spec": "stencil test --spec --config stencil.config.ts --coverage",
"test:spec:ci": "stencil test --config stencil.config.ts --spec --ci --coverage",
"FIXME_test:e2e:ci:screenshot": "stencil test --config stencil.config.ts --e2e --ci --screenshot --passWithNoTests",
"FIXME_test:e2e:ci:screenshot:update": "stencil test --config stencil.config.ts --e2e --ci --screenshot --update-screenshot --passWithNoTests"
},
"dependencies": {
"@ovhcloud/ods-common-core": "16.2.1",
Expand All @@ -43,6 +40,7 @@
"tabulator-tables": "5.5.2"
},
"devDependencies": {
"@ovhcloud/ods-common-scripts": "16.2.1",
"@ovhcloud/ods-common-testing": "16.2.1",
"@ovhcloud/ods-stencil-dev": "16.2.1",
"@types/tabulator-tables": "5.5.2"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,17 +5,17 @@
@mixin ods-input-checkbox {
input[type="checkbox"] {
appearance: none;
border-radius: var(--ods-size-border-radius-01);
border: solid 2px var(--ods-color-primary-500);
margin: 0;
border: solid 2px var(--ods-color-primary-500);
border-radius: var(--ods-size-border-radius-01);
width: 20px;
height: 20px;

&::before {
content: "";
display: block;
width: 15px;
height: 15px;
content: "";
mask-position: center;
mask-repeat: no-repeat;
}
Expand All @@ -35,78 +35,95 @@
$ods-border-datagrid: solid 1px var(--ods-color-blue-200);

.tabulator {
box-sizing: border-box;
border: none;
background-color: #FFF;
box-sizing: border-box;

.tabulator-tableholder {

.tabulator-row {
background-color: #FFF;

&:hover {
background-color: #FFF;
}

&:last-child {
border-bottom: $ods-border-datagrid;
}
}

.tabulator-cell {
border-right: none;
border-top: $ods-border-datagrid;
box-sizing: border-box;
border-top: $ods-border-datagrid;
border-right: none;

&:first-child {
border-left: $ods-border-datagrid;
}

&:last-of-type {
border-right: $ods-border-datagrid;
}

&.ods-selectable__input-checkbox {
padding-left: 9px;
@include ods-input-checkbox;

padding-left: 9px;
}
}

.tabulator-placeholder {

.tabulator-placeholder-contents {
border: $ods-border-datagrid;
line-height: var(--ods-typography-body-500-line-height);
letter-spacing: var(--ods-typography-body-500-letter-spacing);
color: var(--ods-color-text-500);
font-family: var(--ods-typography-body-500-font-family);
font-size: var(--ods-typography-body-500-font-size);
font-weight: var(--ods-typography-body-500-font-weight);
font-family: var(--ods-typography-body-500-font-family);
font-style: var(--ods-typography-body-500-font-style);
letter-spacing: var(--ods-typography-body-500-letter-spacing);
line-height: var(--ods-typography-body-500-line-height);
}
}
}

.tabulator-header {
background-color: #FFF;
border-bottom: none;
background-color: #FFF;
height: unset !important;

.tabulator-headers {
height: unset !important;

.tabulator-col {
background-color: #FFF;
border: none;
background-color: #FFF;
height: unset !important;

&.tabulator-sortable {
&:hover {
background-color: #FFF;
}

& .tabulator-col-title {
padding-right: 10px;
}
&:hover {
background-color: #FFF;
}

.tabulator-col-content {
.tabulator-col-title-holder {
display: flex;
justify-content: center;

.tabulator-col-title {
width: unset;
}

.tabulator-col-sorter {
position: inherit;
}
}
}

&.ods-selectable__input-checkbox {
@include ods-input-checkbox;

Expand All @@ -117,42 +134,25 @@ $ods-border-datagrid: solid 1px var(--ods-color-blue-200);

&[aria-sort="descending"] {
.tabulator-col-content {

.tabulator-col-title-holder {

.tabulator-col-sorter {
top: 2px;
}
}
}
}

&[aria-sort="ascending"], &[aria-sort="none"] {
.tabulator-col-content {

.tabulator-col-title-holder {

.tabulator-col-sorter {
top: -7px;
}
}
}
}

.tabulator-col-content {

.tabulator-col-title-holder {
display: flex;
justify-content: center;

.tabulator-col-title {
width: unset;
}

.tabulator-col-sorter {
position: inherit;
}
}
}

}
}
}
Expand Down
21 changes: 0 additions & 21 deletions packages/components/datagrid/src/global.dev.ts

This file was deleted.

5 changes: 0 additions & 5 deletions packages/components/datagrid/src/global.prod.ts

This file was deleted.

1 change: 0 additions & 1 deletion packages/components/datagrid/src/global.test.ts

This file was deleted.

9 changes: 0 additions & 9 deletions packages/components/datagrid/src/global.ts

This file was deleted.

10 changes: 10 additions & 0 deletions packages/components/datagrid/src/globals.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
/**
* Declare here all all the external ODS component that you need to run the current component
* when running dev server (yarn start) or e2e tests
*
* ex:
* import '@ovhcloud/ods-component-text';
*/

import '@ovhcloud/ods-component-icon';
import '@ovhcloud/ods-component-text';
30 changes: 6 additions & 24 deletions packages/components/datagrid/stencil.config.ts
Original file line number Diff line number Diff line change
@@ -1,28 +1,10 @@
import { Config } from '@stencil/core';
import { getStencilConfig } from '@ovhcloud/ods-common-stencil';
import * as jestConfig from './jest.config';
import jestConfig from './jest.config';

const args = process.argv.slice(2);

export const config: Config = getStencilConfig({
export const config = getStencilConfig({
args: process.argv.slice(2),
componentCorePackage: '@ovhcloud/ods-component-datagrid',
excludeComponents: ['osds-icon', 'osds-text'],
jestConfig,
namespace: 'osds-datagrid',
args,
jestConfig: jestConfig.default,
reactOutput: {
componentCorePackage: '@ovhcloud/ods-component-datagrid',
excludeComponents: ['osds-icon', 'osds-text']
},
vueOutput: {
componentCorePackage: '@ovhcloud/ods-component-datagrid',
excludeComponents: ['osds-icon', 'osds-text']
},
dev: {
globalScript: 'src/global.dev.ts',
},
prod: {
globalScript: 'src/global.prod.ts'
},
test: {
globalScript: 'src/global.test.ts'
}
});
6 changes: 0 additions & 6 deletions packages/components/datagrid/tsconfig.dev.json

This file was deleted.

1 change: 1 addition & 0 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -4736,6 +4736,7 @@ __metadata:
resolution: "@ovhcloud/ods-component-datagrid@workspace:packages/components/datagrid"
dependencies:
"@ovhcloud/ods-common-core": 16.2.1
"@ovhcloud/ods-common-scripts": 16.2.1
"@ovhcloud/ods-common-stencil": 16.2.1
"@ovhcloud/ods-common-testing": 16.2.1
"@ovhcloud/ods-common-theming": 16.2.1
Expand Down

0 comments on commit cda2dee

Please sign in to comment.