Compare commits

...

7 Commits

Author SHA1 Message Date
Christopher Lebond
614d768eea Merge pull request #10 from qlik-oss/QPE-477
[QPE-477] Definition object is Qlik standard
2019-02-22 10:41:36 +01:00
giovanni hanselius
0b3b7b3f57 Merge pull request #19 from qlik-oss/QPE-554
[QPE-554] text alignemt
2019-02-21 17:37:00 +01:00
ahmed-Bazzara
24edf1c6f4 values of text alignement property set to have lowercase 2019-02-21 12:02:42 +01:00
ahmed-Bazzara
bcb9d30237 sending the alignment value straight from props instead of numbers 2019-02-19 14:55:50 +01:00
ahmed-Bazzara
ec140efc56 Text alignment property added 2019-02-18 16:42:39 +01:00
ahmed-Bazzara
c47b401a1d typo in definiton object 2019-02-12 12:05:01 +01:00
ahmed-Bazzara
3c330465dd Definition object is Qlik standard 2019-02-12 12:03:05 +01:00
6 changed files with 52 additions and 13 deletions

View File

@@ -90,12 +90,17 @@ class DataCell extends React.PureComponent {
if (styleBuilder.hasComments()) {
formattedMeasurementValue = '.';
}
let textAlignment = 'Right';
const textAlignmentProp = styling.options.textAlignment;
if (textAlignmentProp) {
textAlignment = textAlignmentProp;
}
let cellStyle = {
fontFamily: styling.options.fontFamily,
...styleBuilder.getStyle(),
paddingLeft: '4px',
textAlign: 'right'
textAlign: textAlignment
};
const { semaphoreColors } = styling;
@@ -109,7 +114,7 @@ class DataCell extends React.PureComponent {
fontFamily: styling.options.fontFamily,
fontSize: styleBuilder.getStyle().fontSize,
paddingLeft: '4px',
textAlign: 'right'
textAlign: textAlignment
};
}

View File

@@ -187,6 +187,26 @@ const formatted = {
],
defaultValue: 1
},
textAlignment: {
ref: 'cellTextAlignment',
label: 'Cell Text alignment',
component: 'buttongroup',
options: [
{
value: 'left',
label: 'Left'
},
{
value: 'center',
label: 'Center'
},
{
value: 'right',
label: 'Right'
}
],
defaultValue: 'right'
},
ColumnWidthSlider: {
type: 'number',
component: 'slider',

View File

@@ -27,7 +27,7 @@ const header = {
ref: 'HeaderColorSchema',
type: 'string',
component: 'dropdown',
label: 'BackGround Header Color',
label: 'Background Header Color',
options: [
{
value: 'Clean',

View File

@@ -9,15 +9,16 @@ import pijamaColorLibrary from './pijama-color-library';
const definition = {
component: 'accordion',
items: {
dimensions: {
max: 2,
min: 1,
uses: 'dimensions'
},
measures: {
max: 9,
min: 1,
uses: 'measures'
data: {
items: {
dimensions: {
disabledRef: ''
},
measures: {
disabledRef: ''
}
},
uses: 'data'
},
settings: {
items: {

View File

@@ -12,6 +12,18 @@ export default {
'$timeout',
function () { }
],
data: {
dimensions: {
max: 2,
min: 1,
uses: 'dimensions'
},
measures: {
max: 9,
min: 1,
uses: 'measures'
}
},
definition,
initialProperties: {
qHyperCubeDef: {

View File

@@ -282,7 +282,8 @@ async function initializeTransformed ({ $element, layout, component }) {
backgroundColorOdd: colors[`vColLib${layout.ColorSchemaP}`],
color: layout.BodyTextColorSchema,
fontFamily: layout.FontFamily,
fontSizeAdjustment: getFontSizeAdjustment(layout.lettersize)
fontSizeAdjustment: getFontSizeAdjustment(layout.lettersize),
textAlignment: layout.cellTextAlignment
},
semaphoreColors: {
fieldsToApplyTo: {