diff --git a/resources/Accounts.csv b/resources/Accounts.csv index e37cffa..0984618 100644 --- a/resources/Accounts.csv +++ b/resources/Accounts.csv @@ -10,29 +10,29 @@ Manufacturing overhead;;#b7dbff;;;
;; Indirect labor;;;;;;; Depreciation, manufacturing equip;;;;;;; Other mfr overhead;;;;;;; -Net mfr overhead;;;;;;; -Net costs of goods sold;;;;;;; -Gross profit;;;;;
;; +Net mfr overhead;;#CCC0FF;;;;; +Net costs of goods sold;;#CCC0FF;;;;; +Gross profit;;#C4C4C4;;;
;; Operating expenses;;;;;;; Selling expenses;;;;;;; Sales salaries;;;;;;; Warranty expenses;;;;;;; Depreciation, store equipment;;;;;;; Other selling expenses3;;;;;;; -Total selling expenses;;;;;;; +Total selling expenses;;#CCC0FF;;;;; General & administrative expenses;;#b7dbff;;;
;; Administration salaries;;;;;;; Rent expenses;;;;;;; Depreciation, computers;;;;;;; Other general & admin expenses;;;;;;; total general & admin expenses;;;;;;; -total operating expenses;;;;;;; -Operating income before taxes;;;;;;; +total operating expenses;;#CCC0FF;;;;; +Operating income before taxes;;#C4C4C4;;;;; Financial revenue & expenses;;#b7dbff;;;
;; Revenue from investments;;;;;;; Less interest expenses;;;;;;; Net financial gain (expense);;;;;;; -Income before tax & extraordinary items;;;;;;; +Income before tax & extraordinary items;;#C4C4C4;;;;; Less income tax on operations;;;;;;; Income before extraordinary items;;;;;;; Extraordinary items;;#b7dbff;;;
;; @@ -41,4 +41,4 @@ Less initial cost;;;;;;; Net gain on sale of land;;;;;;; Less income tax on gain;;;;;;; Extraordinary items after tax;;;;;;; -Net Income (Profit);;;;;
;; \ No newline at end of file +Net Income (Profit);;#C4C4C4;;;
;; diff --git a/resources/Accounts2.csv b/resources/Accounts2.csv index 46f645c..7ce2147 100644 --- a/resources/Accounts2.csv +++ b/resources/Accounts2.csv @@ -18,4 +18,4 @@ Income before tax & extraordinary items;;rgb(0, 102, 204);;;;;;;;
;; Net gain on sale of land;;rgb(0, 102, 204);;;
;; Extraordinary items after tax;;rgb(0, 102, 204);;;
;; -Net Income (Profit);;;;;
;; \ No newline at end of file +Net Income (Profit);;#191970;;;
;; diff --git a/resources/QlikLook.csv b/resources/QlikLook.csv index a383ee0..6636611 100644 --- a/resources/QlikLook.csv +++ b/resources/QlikLook.csv @@ -18,4 +18,4 @@ Income before tax & extraordinary items;;RGB(193,216,47);;;;; Extraordinary items;;;;;
;; Net gain on sale of land;;RGB(193,216,47);;;
;; Extraordinary items after tax;;RGB(193,216,47);;;
;; -Net Income (Profit);;;;;
;; \ No newline at end of file +Net Income (Profit);;#191970;;;
;; diff --git a/src/definition/formatted.js b/src/definition/formatted.js index 204d970..db7bff7 100644 --- a/src/definition/formatted.js +++ b/src/definition/formatted.js @@ -29,57 +29,27 @@ const formatted = { return data.customfilebool; } }, - colors: { - ref: 'ColorSchema', - type: 'string', - component: 'dropdown', - label: 'BackGround Style', - options: [ - { - value: 'Clean', - label: 'Clean' - }, - { - value: 'Soft', - label: 'Soft' - }, - { - value: 'Dark', - label: 'Dark' - }, - { - value: 'Night', - label: 'Night' - }, - { - value: 'Blue', - label: 'Blue' - }, - { - value: 'Orange', - label: 'Orange' - }, - { - value: 'Red', - label: 'Red' - }, - { - value: 'Green', - label: 'Green' - }, - { - value: 'Violete', - label: 'Violete' - }, - { - value: 'Custom', - label: 'Custom' - } - ], - defaultValue: 'Clean', - show (data) { - return !data.customfilebool; - } + rowEvenBGColor: { + component: 'color-picker', + defaultValue: { + color: '#fff', + index: 6 + }, + dualOutput: true, + label: 'Even row background color', + ref: 'rowEvenBGColor', + type: 'object' + }, + rowOddBGColor: { + component: 'color-picker', + defaultValue: { + color: '#fff', + index: 6 + }, + dualOutput: true, + label: 'Odd row background color', + ref: 'rowOddBGColor', + type: 'object' }, BodyTextColor: { ref: 'BodyTextColorSchema', diff --git a/src/initialize-transformed.js b/src/initialize-transformed.js index 9bdad39..1e1f063 100644 --- a/src/initialize-transformed.js +++ b/src/initialize-transformed.js @@ -1,32 +1,6 @@ import jQuery from 'jquery'; import { distinctArray } from './utilities'; -// TODO: rename colors -function initializeColors ({ layout }) { - return { - vColLibBlue: layout.collibblue || '#b7dbff', - vColLibBlueP: layout.collibbluep || '4477aa', - vColLibClean: layout.collibclean, - vColLibCleanP: layout.collibcleanp, - vColLibCustom: layout.collibcustom, - vColLibCustomP: layout.collibcustomp, - vColLibDark: layout.collibdark || '#C4C4C4', - vColLibDarkP: layout.collibdarkp || '#A0A0A0', - vColLibGreen: layout.collibgreen || '#689A68', - vColLibGreenP: layout.collibgreenp || '#406740', - vColLibNight: layout.collibnight || '#191970', - vColLibNightP: layout.collibnightp || '#151567', - vColLibOrange: layout.colliborange || '#ffa500', - vColLibOrangeP: layout.colliborangep || '#ff8c00', - vColLibRed: layout.collibred || '#ff0000', - vColLibRedP: layout.collibredp || '#8b0000', - vColLibSoft: layout.collibsoft, - vColLibSoftP: layout.collibsoftp, - vColLibViolete: layout.collibviolete || '#CCC0FF', - vColLibVioleteP: layout.collibvioletep || '#AEA0EC' - }; -} - function getAlignment (option) { const alignmentOptions = { 1: 'left', @@ -194,7 +168,6 @@ function generateDataSet (component, dimensionsInformation, measurementsInformat } async function initializeTransformed ({ $element, layout, component }) { - const colors = initializeColors({ layout }); const dimensionsInformation = component.backendApi.getDimensionInfos(); const measurementsInformation = component.backendApi.getMeasureInfos(); const dimensionCount = layout.qHyperCube.qDimensionInfo.length; @@ -264,7 +237,6 @@ async function initializeTransformed ({ $element, layout, component }) { dimensionSelectionCounts: dimensionsInformation.map(dimensionInfo => dimensionInfo.qStateCounts.qSelected) }, styling: { - colors, customCSV: { basic: customSchemaBasic, count: customHeadersCount, @@ -278,8 +250,8 @@ async function initializeTransformed ({ $element, layout, component }) { textColor: layout.HeaderTextColorSchema.color }, options: { - backgroundColor: colors[`vColLib${layout.ColorSchema}`], - backgroundColorOdd: colors[`vColLib${layout.ColorSchemaP}`], + backgroundColor: layout.rowEvenBGColor, + backgroundColorOdd: layout.rowOddBGColor, color: layout.BodyTextColorSchema, fontFamily: layout.FontFamily, fontSizeAdjustment: getFontSizeAdjustment(layout.lettersize), diff --git a/src/style-builder.js b/src/style-builder.js index 72ecefb..225f282 100644 --- a/src/style-builder.js +++ b/src/style-builder.js @@ -1,6 +1,5 @@ function StyleBuilder (styling) { const { - colors, customCSV, options } = styling; @@ -30,16 +29,7 @@ function StyleBuilder (styling) { '': () => { style.fontWeight = 'bold'; }, '': () => { style.fontStyle = 'italic'; }, '': () => { style.fontStyle = 'oblique'; }, - // background and comment color - '': () => applyColor(colors.vColLibDark), - '': () => applyColor(colors.vColLibNight), - '': () => applyColor(colors.vColLibSoft), - '': () => applyColor(colors.vColLibRed), - '': () => applyColor(colors.vColLibOrange), - '': () => applyColor(colors.vColLibViolete), - '': () => applyColor(colors.vColLibBlue), - '': () => applyColor(colors.vColLibGreen), - // font color TODO: this is a color just like the others, but it applies to text instead.. any way to make it less weird? + // font color '': () => { style.color = 'white'; }, // font size '': () => { style.fontSize = `${15 + options.fontSizeAdjustment}px`; },