all files / treemap/model/ theme.js

100% Statements 48/48
100% Branches 22/22
100% Functions 3/3
100% Lines 48/48
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390                 347× 347× 347×         347×       14×                                       14×   18×                                       18×   12×                                           12×   10×                                           10×   10×                                           10×   10×                                         10×   10×                                         10×   10×                                           10×   10×                                           10×   12×                                           12×   12×                                           12×   10×                                           10×   10×                                           10×   10×                                               10×   189×                                       189×   347×      
define(["require", "exports", "./constants"], function (require, exports, constants_1) {
    "use strict";
    Object.defineProperty(exports, "__esModule", { value: true });
    var Theme;
    (function (Theme) {
        Theme.mapsTitleFont = {
            size: '14px',
            fontWeight: 'Medium',
            color: '#424242',
            fontStyle: 'Medium',
            fontFamily: 'Roboto, Noto, Sans-serif'
        };
    })(Theme = exports.Theme || (exports.Theme = {}));
    function getThemeStyle(theme) {
        var style;
        var color;
        switch (theme.toLowerCase()) {
            case 'materialdark':
                color = '#303030';
                break;
            case 'fabricdark':
                color = '#201F1F';
                break;
            case 'bootstrapdark':
                color = '#1A1A1A';
                break;
        }
        switch (theme.toLowerCase()) {
            case 'bootstrapdark':
            case 'fabricdark':
            case 'materialdark':
                style = {
                    backgroundColor: color,
                    titleFontColor: '#FFFFFF',
                    titleFontWeight: 'Normal',
                    subTitleFontColor: '#FFFFFF',
                    tooltipFillColor: '#363F4C',
                    tooltipFontColor: '#ffffff',
                    tooltipFontSize: '13px',
                    legendTitleColor: '#DADADA',
                    legendTextColor: '#DADADA',
                    fontSize: '15px',
                    fontWeight: 'Normal',
                    subtitleFontSize: '14px',
                    legendFontSize: '13px',
                    fontFamily: 'Roboto, Noto, Sans-serif',
                    labelFontSize: '12px',
                    labelFontFamily: constants_1.defaultFont,
                    legendBorderColor: '#000000',
                    legendBorderWidth: 0
                };
                break;
            case 'highcontrast':
                style = {
                    backgroundColor: '#000000',
                    titleFontColor: '#FFFFFF',
                    titleFontWeight: 'Normal',
                    subTitleFontColor: '#FFFFFF',
                    tooltipFillColor: '#363F4C',
                    tooltipFontColor: '#ffffff',
                    tooltipFontSize: '13px',
                    legendTitleColor: '#FFFFFF',
                    legendTextColor: '#FFFFFF',
                    fontSize: '15px',
                    fontWeight: 'Normal',
                    subtitleFontSize: '14px',
                    legendFontSize: '13px',
                    fontFamily: 'Roboto, Noto, Sans-serif',
                    labelFontSize: '12px',
                    labelFontFamily: constants_1.defaultFont,
                    legendBorderColor: '#000000',
                    legendBorderWidth: 0
                };
                break;
            case 'bootstrap4':
                style = {
                    backgroundColor: '#FFFFFF',
                    titleFontColor: '#212529',
                    titleFontWeight: 'Normal',
                    subTitleFontColor: '#212529',
                    tooltipFillColor: '#000000',
                    tooltipFontColor: '#FFFFFF',
                    tooltipFontSize: '13px',
                    tooltipFillOpacity: 1,
                    tooltipTextOpacity: 0.9,
                    legendTitleColor: '#212529',
                    legendTextColor: '#212529',
                    fontFamily: 'HelveticaNeue-Medium',
                    fontSize: '16px',
                    fontWeight: 'Normal',
                    subtitleFontSize: '14px',
                    legendFontSize: '14px',
                    labelFontFamily: 'HelveticaNeue',
                    labelFontSize: '12px',
                    legendBorderColor: '#000000',
                    legendBorderWidth: 0
                };
                break;
            case 'tailwind':
                style = {
                    backgroundColor: 'transparent',
                    titleFontColor: '#374151',
                    titleFontWeight: 'Normal',
                    subTitleFontColor: '#374151',
                    tooltipFillColor: '#111827',
                    tooltipFontColor: '#F9FAFB',
                    tooltipFontSize: '13px',
                    tooltipFillOpacity: 1,
                    tooltipTextOpacity: 1,
                    legendTitleColor: '#374151',
                    legendTextColor: '#374151',
                    fontFamily: 'Inter',
                    fontSize: '14px',
                    fontWeight: 'Normal',
                    subtitleFontSize: '12px',
                    legendFontSize: '12px',
                    labelFontFamily: 'Inter',
                    labelFontSize: '12px',
                    legendBorderColor: '#000000',
                    legendBorderWidth: 0
                };
                break;
            case 'tailwinddark':
                style = {
                    backgroundColor: 'transparent',
                    titleFontColor: '#D1D5DB',
                    titleFontWeight: 'Normal',
                    subTitleFontColor: '#D1D5DB',
                    tooltipFillColor: '#F9FAFB',
                    tooltipFontColor: '#1F2937',
                    tooltipFontSize: '13px',
                    tooltipFillOpacity: 1,
                    tooltipTextOpacity: 1,
                    legendTitleColor: '#D1D5DB',
                    legendTextColor: '#D1D5DB',
                    fontFamily: 'Inter',
                    fontWeight: 'Normal',
                    fontSize: '14px',
                    subtitleFontSize: '12px',
                    legendFontSize: '12px',
                    labelFontFamily: 'Inter',
                    labelFontSize: '12px',
                    legendBorderColor: '#000000',
                    legendBorderWidth: 0
                };
                break;
            case 'bootstrap5':
                style = {
                    backgroundColor: 'transparent',
                    titleFontColor: '#212529',
                    titleFontWeight: '400',
                    subTitleFontColor: '#212529',
                    tooltipFillColor: '#000000',
                    tooltipFontColor: '#FFFFFF',
                    tooltipFontSize: '12px',
                    tooltipFillOpacity: 0.9,
                    legendTitleColor: '#212529',
                    legendTextColor: '#212529',
                    fontFamily: 'Segoe UI',
                    fontSize: '14px',
                    fontWeight: '400',
                    subtitleFontSize: '12px',
                    legendFontSize: '10px',
                    labelFontFamily: 'Segoe UI',
                    labelFontSize: '10px',
                    legendBorderColor: '#000000',
                    legendBorderWidth: 0
                };
                break;
            case 'bootstrap5dark':
                style = {
                    backgroundColor: 'transparent',
                    titleFontColor: '#DEE2E6',
                    titleFontWeight: '400',
                    subTitleFontColor: '#DEE2E6',
                    tooltipFillColor: '#FFFFFF',
                    tooltipFontColor: '#212529',
                    tooltipFontSize: '12px',
                    tooltipFillOpacity: 0.9,
                    legendTitleColor: '#DEE2E6',
                    legendTextColor: '#DEE2E6',
                    fontFamily: 'Segoe UI',
                    fontSize: '14px',
                    fontWeight: '400',
                    subtitleFontSize: '12px',
                    legendFontSize: '10px',
                    labelFontFamily: 'Segoe UI',
                    labelFontSize: '10px',
                    legendBorderColor: '#000000',
                    legendBorderWidth: 0
                };
                break;
            case 'fluent':
                style = {
                    backgroundColor: 'rgba(255,255,255, 0.0)',
                    titleFontColor: '#201F1E',
                    titleFontWeight: 'Normal',
                    subTitleFontColor: '#201F1E',
                    tooltipFillColor: '#FFFFFF',
                    tooltipFontColor: '#323130',
                    tooltipFontSize: '13px',
                    tooltipFillOpacity: 1,
                    tooltipTextOpacity: 1,
                    legendTitleColor: '#201F1E',
                    legendTextColor: '#201F1E',
                    fontFamily: 'Segoe UI',
                    fontSize: '14px',
                    fontWeight: 'Normal',
                    subtitleFontSize: '12px',
                    legendFontSize: '12px',
                    labelFontFamily: 'Segoe UI',
                    labelFontSize: '12px',
                    legendBorderColor: '#000000',
                    legendBorderWidth: 0
                };
                break;
            case 'fluentdark':
                style = {
                    backgroundColor: 'rgba(255,255,255, 0.0)',
                    titleFontColor: '#F3F2F1',
                    titleFontWeight: 'Normal',
                    subTitleFontColor: '#F3F2F1',
                    tooltipFillColor: '#252423',
                    tooltipFontColor: '#F3F2F1',
                    tooltipFontSize: '13px',
                    tooltipFillOpacity: 1,
                    tooltipTextOpacity: 1,
                    legendTitleColor: '#F3F2F1',
                    legendTextColor: '#F3F2F1',
                    fontFamily: 'Segoe UI',
                    fontSize: '14px',
                    fontWeight: 'Normal',
                    subtitleFontSize: '12px',
                    legendFontSize: '12px',
                    labelFontFamily: 'Segoe UI',
                    labelFontSize: '12px',
                    legendBorderColor: '#000000',
                    legendBorderWidth: 0
                };
                break;
            case 'material3':
                style = {
                    backgroundColor: 'transparent',
                    titleFontColor: '#1C1B1F',
                    titleFontWeight: '500',
                    subTitleFontColor: '#1C1B1F',
                    tooltipFillColor: '#313033',
                    tooltipFontColor: '#F4EFF4',
                    tooltipFontSize: '14px',
                    tooltipFillOpacity: 1,
                    tooltipTextOpacity: 1,
                    legendTitleColor: '#1C1B1F',
                    legendTextColor: '#49454E',
                    fontFamily: 'Roboto',
                    fontSize: '16px',
                    fontWeight: '400',
                    subtitleFontSize: '14px',
                    legendFontSize: '14px',
                    labelFontFamily: 'Roboto',
                    labelFontSize: '12px',
                    legendBorderColor: '#000000',
                    legendBorderWidth: 0
                };
                break;
            case 'material3dark':
                style = {
                    backgroundColor: 'transparent',
                    titleFontColor: '#E6E1E5',
                    titleFontWeight: '500',
                    subTitleFontColor: '#E6E1E5',
                    tooltipFillColor: '#E6E1E5',
                    tooltipFontColor: '#313033',
                    tooltipFontSize: '14px',
                    tooltipFillOpacity: 1,
                    tooltipTextOpacity: 1,
                    legendTitleColor: '#E6E1E5',
                    legendTextColor: '#CAC4D0',
                    fontFamily: 'Roboto',
                    fontSize: '16px',
                    fontWeight: '400',
                    subtitleFontSize: '14px',
                    legendFontSize: '14px',
                    labelFontFamily: 'Roboto',
                    labelFontSize: '12px',
                    legendBorderColor: '#000000',
                    legendBorderWidth: 0
                };
                break;
            case 'fluent2':
                style = {
                    backgroundColor: 'transparent',
                    titleFontColor: '#242424',
                    titleFontWeight: '600',
                    subTitleFontColor: '#242424',
                    tooltipFillColor: '#FFFFFF',
                    tooltipFontColor: '#242424',
                    tooltipFontSize: '12px',
                    tooltipFillOpacity: 1,
                    tooltipTextOpacity: 1,
                    legendTitleColor: '#242424',
                    legendTextColor: '#242424',
                    fontFamily: 'Segoe UI',
                    fontSize: '14px',
                    fontWeight: '400',
                    subtitleFontSize: '12px',
                    legendFontSize: '12px',
                    labelFontFamily: 'Segoe UI',
                    labelFontSize: '10px',
                    legendBorderColor: '#000000',
                    legendBorderWidth: 0
                };
                break;
            case 'fluent2dark':
                style = {
                    backgroundColor: 'transparent',
                    titleFontColor: '#FFFFFF',
                    titleFontWeight: '600',
                    subTitleFontColor: '#FFFFFF',
                    tooltipFillColor: '#292929',
                    tooltipFontColor: '#FFFFFF',
                    tooltipFontSize: '12px',
                    tooltipFillOpacity: 1,
                    tooltipTextOpacity: 1,
                    legendTitleColor: '#FFFFFF',
                    legendTextColor: '#FFFFFF',
                    fontFamily: 'Segoe UI',
                    fontSize: '14px',
                    fontWeight: '400',
                    subtitleFontSize: '12px',
                    legendFontSize: '12px',
                    labelFontFamily: 'Segoe UI',
                    labelFontSize: '10px',
                    legendBorderColor: '#000000',
                    legendBorderWidth: 0
                };
                break;
            case 'fluent2highcontrast':
                style = {
                    backgroundColor: 'transparent',
                    titleFontColor: '#FFFFFF',
                    titleFontWeight: '600',
                    subTitleFontColor: '#FFFFFF',
                    tooltipFillColor: '#000000',
                    tooltipFontColor: '#FFFFFF',
                    tooltipFontSize: '12px',
                    tooltipFillOpacity: 1,
                    tooltipTextOpacity: 1,
                    legendTitleColor: '#FFFFFF',
                    legendTextColor: '#FFFFFF',
                    fontFamily: 'Segoe UI',
                    fontSize: '14px',
                    fontWeight: '400',
                    subtitleFontSize: '12px',
                    legendFontSize: '12px',
                    labelFontFamily: 'Segoe UI',
                    labelFontSize: '10px',
                    legendBorderColor: '#FFF',
                    legendBorderWidth: 1,
                    tooltipBorderColor: '#FFF',
                    tooltipBorderWidth: 1
                };
                break;
            default:
                style = {
                    backgroundColor: '#FFFFFF',
                    titleFontColor: '#424242',
                    titleFontWeight: 'Normal',
                    subTitleFontColor: '#424242',
                    tooltipFillColor: '#363F4C',
                    tooltipFontColor: '#ffffff',
                    tooltipFontSize: '13px',
                    legendTitleColor: '#353535',
                    legendTextColor: '#353535',
                    fontSize: '15px',
                    fontWeight: 'Normal',
                    subtitleFontSize: '14px',
                    legendFontSize: '13px',
                    labelFontFamily: constants_1.defaultFont,
                    fontFamily: 'Roboto, Noto, Sans-serif',
                    labelFontSize: '12px',
                    legendBorderColor: '#000000',
                    legendBorderWidth: 0
                };
                break;
        }
        return style;
    }
    exports.getThemeStyle = getThemeStyle;
});