overview-components 1.1.63 → 1.1.65
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/assets/generated/locales/de.d.ts +135 -34
- package/dist/assets/generated/locales/de.d.ts.map +1 -1
- package/dist/assets/generated/locales/de.js +199 -94
- package/dist/assets/generated/locales/de.js.map +1 -1
- package/dist/assets/generated/locales/en.d.ts +129 -28
- package/dist/assets/generated/locales/en.d.ts.map +1 -1
- package/dist/assets/generated/locales/en.js +199 -94
- package/dist/assets/generated/locales/en.js.map +1 -1
- package/dist/assets/generated/locales/fr.d.ts +135 -34
- package/dist/assets/generated/locales/fr.d.ts.map +1 -1
- package/dist/assets/generated/locales/fr.js +199 -94
- package/dist/assets/generated/locales/fr.js.map +1 -1
- package/dist/assets/generated/locales/hr.d.ts +135 -34
- package/dist/assets/generated/locales/hr.d.ts.map +1 -1
- package/dist/assets/generated/locales/hr.js +195 -94
- package/dist/assets/generated/locales/hr.js.map +1 -1
- package/dist/assets/generated/locales/it.d.ts +135 -34
- package/dist/assets/generated/locales/it.d.ts.map +1 -1
- package/dist/assets/generated/locales/it.js +199 -94
- package/dist/assets/generated/locales/it.js.map +1 -1
- package/dist/assets/generated/locales/pl.d.ts +135 -34
- package/dist/assets/generated/locales/pl.d.ts.map +1 -1
- package/dist/assets/generated/locales/pl.js +195 -94
- package/dist/assets/generated/locales/pl.js.map +1 -1
- package/dist/assets/generated/locales/ro.d.ts +135 -34
- package/dist/assets/generated/locales/ro.d.ts.map +1 -1
- package/dist/assets/generated/locales/ro.js +195 -94
- package/dist/assets/generated/locales/ro.js.map +1 -1
- package/dist/assets/generated/locales/sk.d.ts +135 -34
- package/dist/assets/generated/locales/sk.d.ts.map +1 -1
- package/dist/assets/generated/locales/sk.js +195 -94
- package/dist/assets/generated/locales/sk.js.map +1 -1
- package/dist/assets/generated/locales/sr.d.ts +135 -34
- package/dist/assets/generated/locales/sr.d.ts.map +1 -1
- package/dist/assets/generated/locales/sr.js +195 -94
- package/dist/assets/generated/locales/sr.js.map +1 -1
- package/dist/components/components-settings/data-grid-settings.d.ts.map +1 -1
- package/dist/components/components-settings/data-grid-settings.js +4 -10
- package/dist/components/components-settings/data-grid-settings.js.map +1 -1
- package/dist/components/components-settings/section-tab-settings.js +3 -3
- package/dist/components/components-settings/section-tab-settings.js.map +1 -1
- package/dist/components/lit-ai-filter-assistant.d.ts.map +1 -1
- package/dist/components/lit-ai-filter-assistant.js +3 -3
- package/dist/components/lit-ai-filter-assistant.js.map +1 -1
- package/dist/components/lit-attachments-tab.js +4 -4
- package/dist/components/lit-attachments-tab.js.map +1 -1
- package/dist/components/lit-case-variables-tab.d.ts +1 -2
- package/dist/components/lit-case-variables-tab.d.ts.map +1 -1
- package/dist/components/lit-case-variables-tab.js +218 -281
- package/dist/components/lit-case-variables-tab.js.map +1 -1
- package/dist/components/lit-chart.d.ts.map +1 -1
- package/dist/components/lit-chart.js +2 -1
- package/dist/components/lit-chart.js.map +1 -1
- package/dist/components/lit-data-grid-tanstack.d.ts +2 -0
- package/dist/components/lit-data-grid-tanstack.d.ts.map +1 -1
- package/dist/components/lit-data-grid-tanstack.js +5 -1
- package/dist/components/lit-data-grid-tanstack.js.map +1 -1
- package/dist/components/lit-tabs-overview.d.ts.map +1 -1
- package/dist/components/lit-tabs-overview.js +1 -1
- package/dist/components/lit-tabs-overview.js.map +1 -1
- package/dist/shared/lit-data-grid-operators-popover.js +1 -2
- package/dist/shared/lit-data-grid-operators-popover.js.map +1 -1
- package/dist/shared/lit-date-picker.js +1 -1
- package/dist/shared/lit-date-picker.js.map +1 -1
- package/dist/utils/localization.js.map +1 -1
- package/package.json +1 -1
|
@@ -46,7 +46,7 @@ let LitCaseVariablesTab = class LitCaseVariablesTab extends LitElement {
|
|
|
46
46
|
constructor() {
|
|
47
47
|
super(...arguments);
|
|
48
48
|
this.rows = [];
|
|
49
|
-
this.
|
|
49
|
+
this.variables = [];
|
|
50
50
|
this.hideTabWhen = false;
|
|
51
51
|
this.userLang = 'cs';
|
|
52
52
|
this.dateFormat = null;
|
|
@@ -368,33 +368,24 @@ let LitCaseVariablesTab = class LitCaseVariablesTab extends LitElement {
|
|
|
368
368
|
};
|
|
369
369
|
}
|
|
370
370
|
getOperatorOptionsForCell(cell) {
|
|
371
|
+
// Map Cell type to FieldType for operators
|
|
371
372
|
let variableType = 'string'; // default type
|
|
372
|
-
|
|
373
|
-
|
|
374
|
-
|
|
375
|
-
|
|
376
|
-
|
|
377
|
-
|
|
378
|
-
|
|
379
|
-
|
|
380
|
-
|
|
381
|
-
|
|
382
|
-
|
|
383
|
-
|
|
384
|
-
|
|
385
|
-
|
|
386
|
-
|
|
387
|
-
|
|
388
|
-
break;
|
|
389
|
-
case IvarType.TEXT:
|
|
390
|
-
case IvarType.LIST_TEXT:
|
|
391
|
-
case IvarType.DYNAMIC_LIST:
|
|
392
|
-
case IvarType.DYNAMIC_TABLE:
|
|
393
|
-
case IvarType.DYNAMIC_ROWS:
|
|
394
|
-
default:
|
|
395
|
-
variableType = 'string';
|
|
396
|
-
break;
|
|
397
|
-
}
|
|
373
|
+
if (cell.type) {
|
|
374
|
+
switch (cell.type) {
|
|
375
|
+
case 'number':
|
|
376
|
+
case 'currency':
|
|
377
|
+
case 'progress':
|
|
378
|
+
variableType = 'number';
|
|
379
|
+
break;
|
|
380
|
+
case 'date':
|
|
381
|
+
variableType = 'date';
|
|
382
|
+
break;
|
|
383
|
+
case 'string':
|
|
384
|
+
case 'button':
|
|
385
|
+
case 'link':
|
|
386
|
+
default:
|
|
387
|
+
variableType = 'string';
|
|
388
|
+
break;
|
|
398
389
|
}
|
|
399
390
|
}
|
|
400
391
|
return getOperatorsByColumnType(variableType).map((op) => ({
|
|
@@ -404,32 +395,23 @@ let LitCaseVariablesTab = class LitCaseVariablesTab extends LitElement {
|
|
|
404
395
|
}
|
|
405
396
|
getDefaultOperatorForCell(cell) {
|
|
406
397
|
let variableType = 'string'; // default type
|
|
407
|
-
//
|
|
408
|
-
|
|
409
|
-
|
|
410
|
-
|
|
411
|
-
|
|
412
|
-
|
|
413
|
-
|
|
414
|
-
|
|
415
|
-
|
|
416
|
-
|
|
417
|
-
|
|
418
|
-
|
|
419
|
-
|
|
420
|
-
|
|
421
|
-
|
|
422
|
-
|
|
423
|
-
|
|
424
|
-
case IvarType.TEXT:
|
|
425
|
-
case IvarType.LIST_TEXT:
|
|
426
|
-
case IvarType.DYNAMIC_LIST:
|
|
427
|
-
case IvarType.DYNAMIC_TABLE:
|
|
428
|
-
case IvarType.DYNAMIC_ROWS:
|
|
429
|
-
default:
|
|
430
|
-
variableType = 'string';
|
|
431
|
-
break;
|
|
432
|
-
}
|
|
398
|
+
// Map Cell type to FieldType for operators
|
|
399
|
+
if (cell.type) {
|
|
400
|
+
switch (cell.type) {
|
|
401
|
+
case 'number':
|
|
402
|
+
case 'currency':
|
|
403
|
+
case 'progress':
|
|
404
|
+
variableType = 'number';
|
|
405
|
+
break;
|
|
406
|
+
case 'date':
|
|
407
|
+
variableType = 'date';
|
|
408
|
+
break;
|
|
409
|
+
case 'string':
|
|
410
|
+
case 'button':
|
|
411
|
+
case 'link':
|
|
412
|
+
default:
|
|
413
|
+
variableType = 'string';
|
|
414
|
+
break;
|
|
433
415
|
}
|
|
434
416
|
}
|
|
435
417
|
return getDefaultOperator(variableType);
|
|
@@ -460,7 +442,7 @@ let LitCaseVariablesTab = class LitCaseVariablesTab extends LitElement {
|
|
|
460
442
|
// Add new operator binding with updated options
|
|
461
443
|
const operatorInput = folder.addBinding(config, 'conditionOperator', {
|
|
462
444
|
view: 'list',
|
|
463
|
-
label: '
|
|
445
|
+
label: msg('Operátor'),
|
|
464
446
|
options: newOperatorOptions,
|
|
465
447
|
index: insertIndex >= 0 ? insertIndex : undefined, // Insert at same position if possible
|
|
466
448
|
});
|
|
@@ -496,7 +478,7 @@ let LitCaseVariablesTab = class LitCaseVariablesTab extends LitElement {
|
|
|
496
478
|
// Add new operator binding with updated options
|
|
497
479
|
const hideOperatorInput = folder.addBinding(config, 'hideConditionOperator', {
|
|
498
480
|
view: 'list',
|
|
499
|
-
label: '
|
|
481
|
+
label: msg('Operátor'),
|
|
500
482
|
options: newOperatorOptions,
|
|
501
483
|
index: insertIndex >= 0 ? insertIndex : undefined, // Insert at same position if possible
|
|
502
484
|
});
|
|
@@ -593,32 +575,6 @@ let LitCaseVariablesTab = class LitCaseVariablesTab extends LitElement {
|
|
|
593
575
|
});
|
|
594
576
|
this.handleSettingsChanged(this.rows);
|
|
595
577
|
}
|
|
596
|
-
getAvailableVariables(excludeField) {
|
|
597
|
-
const variables = [];
|
|
598
|
-
// Add variables from current rows (excluding the current cell)
|
|
599
|
-
this.rows.forEach((cell) => {
|
|
600
|
-
if (cell.field !== excludeField) {
|
|
601
|
-
variables.push({
|
|
602
|
-
text: cell.headerName || cell.field,
|
|
603
|
-
value: cell.field,
|
|
604
|
-
});
|
|
605
|
-
}
|
|
606
|
-
});
|
|
607
|
-
// Add variables from data object (that are not in current rows)
|
|
608
|
-
const existingFields = this.rows.map((cell) => cell.field);
|
|
609
|
-
Object.keys(this.data || {}).forEach((key) => {
|
|
610
|
-
if (key !== excludeField && !existingFields.includes(key)) {
|
|
611
|
-
const item = this.data[key];
|
|
612
|
-
const lang = this.userLang || 'cs';
|
|
613
|
-
const name = item?.[`tvar_name_${lang}`] || item?.tvar_name_cs || key;
|
|
614
|
-
variables.push({
|
|
615
|
-
text: name,
|
|
616
|
-
value: key,
|
|
617
|
-
});
|
|
618
|
-
}
|
|
619
|
-
});
|
|
620
|
-
return variables.sort((a, b) => a.text.localeCompare(b.text));
|
|
621
|
-
}
|
|
622
578
|
getAllAvailableVariables() {
|
|
623
579
|
const variables = [];
|
|
624
580
|
// Add variables from current rows (including all cells)
|
|
@@ -628,16 +584,15 @@ let LitCaseVariablesTab = class LitCaseVariablesTab extends LitElement {
|
|
|
628
584
|
value: cell.field,
|
|
629
585
|
});
|
|
630
586
|
});
|
|
631
|
-
// Add variables from
|
|
587
|
+
// Add variables from variables array (that are not in current rows)
|
|
632
588
|
const existingFields = this.rows.map((cell) => cell.field);
|
|
633
|
-
|
|
634
|
-
if (!existingFields.includes(
|
|
635
|
-
const item = this.data[key];
|
|
589
|
+
this.variables.forEach((variable) => {
|
|
590
|
+
if (!existingFields.includes(variable.field)) {
|
|
636
591
|
const lang = this.userLang || 'cs';
|
|
637
|
-
const name =
|
|
592
|
+
const name = variable[`tvar_name_${lang}`] || variable.tvar_name_cs || variable.field;
|
|
638
593
|
variables.push({
|
|
639
594
|
text: name,
|
|
640
|
-
value:
|
|
595
|
+
value: variable.field,
|
|
641
596
|
});
|
|
642
597
|
}
|
|
643
598
|
});
|
|
@@ -876,12 +831,12 @@ let LitCaseVariablesTab = class LitCaseVariablesTab extends LitElement {
|
|
|
876
831
|
// Desktop size input
|
|
877
832
|
const desktopSizeInput = pane.addBinding(config, 'size', {
|
|
878
833
|
view: 'list',
|
|
879
|
-
label: '
|
|
834
|
+
label: msg('Velikost desktop'),
|
|
880
835
|
options: [
|
|
881
|
-
{ text: '1
|
|
882
|
-
{ text: '2
|
|
883
|
-
{ text: '3
|
|
884
|
-
{ text: '4
|
|
836
|
+
{ text: msg('1 sloupec'), value: 1 },
|
|
837
|
+
{ text: msg('2 sloupce'), value: 2 },
|
|
838
|
+
{ text: msg('3 sloupce'), value: 3 },
|
|
839
|
+
{ text: msg('4 sloupce'), value: 4 },
|
|
885
840
|
],
|
|
886
841
|
});
|
|
887
842
|
desktopSizeInput.on('change', (ev) => {
|
|
@@ -890,12 +845,12 @@ let LitCaseVariablesTab = class LitCaseVariablesTab extends LitElement {
|
|
|
890
845
|
// Mobile size input
|
|
891
846
|
const mobileSizeInput = pane.addBinding(config, 'mobileSize', {
|
|
892
847
|
view: 'list',
|
|
893
|
-
label: '
|
|
848
|
+
label: msg('Velikost mobil'),
|
|
894
849
|
options: [
|
|
895
|
-
{ text: '1
|
|
896
|
-
{ text: '2
|
|
897
|
-
{ text: '3
|
|
898
|
-
{ text: '4
|
|
850
|
+
{ text: msg('1 sloupec'), value: 1 },
|
|
851
|
+
{ text: msg('2 sloupce'), value: 2 },
|
|
852
|
+
{ text: msg('3 sloupce'), value: 3 },
|
|
853
|
+
{ text: msg('4 sloupce'), value: 4 },
|
|
899
854
|
],
|
|
900
855
|
});
|
|
901
856
|
mobileSizeInput.on('change', (ev) => {
|
|
@@ -905,15 +860,15 @@ let LitCaseVariablesTab = class LitCaseVariablesTab extends LitElement {
|
|
|
905
860
|
// Add cell type control - at the top
|
|
906
861
|
const cellTypeInput = pane.addBinding(config, 'cellType', {
|
|
907
862
|
view: 'list',
|
|
908
|
-
label: '
|
|
863
|
+
label: msg('Typ buňky'),
|
|
909
864
|
options: [
|
|
910
|
-
{ text: '
|
|
911
|
-
{ text: '
|
|
912
|
-
{ text: '
|
|
913
|
-
{ text: '
|
|
914
|
-
{ text: '
|
|
915
|
-
{ text: 'Progress', value: 'progress' },
|
|
916
|
-
{ text: '
|
|
865
|
+
{ text: msg('Text'), value: 'string' },
|
|
866
|
+
{ text: msg('Tlačítko'), value: 'button' },
|
|
867
|
+
{ text: msg('Odkaz'), value: 'link' },
|
|
868
|
+
{ text: msg('Datum'), value: 'date' },
|
|
869
|
+
{ text: msg('Měna'), value: 'currency' },
|
|
870
|
+
{ text: msg('Progress'), value: 'progress' },
|
|
871
|
+
{ text: msg('Číslo'), value: 'number' },
|
|
917
872
|
],
|
|
918
873
|
});
|
|
919
874
|
cellTypeInput.on('change', (ev) => {
|
|
@@ -923,14 +878,14 @@ let LitCaseVariablesTab = class LitCaseVariablesTab extends LitElement {
|
|
|
923
878
|
const isCustomCell = cell.field.startsWith('custom_cell_');
|
|
924
879
|
if (isCustomCell) {
|
|
925
880
|
const headerNameInput = pane.addBinding(config, 'headerName', {
|
|
926
|
-
label: '
|
|
881
|
+
label: msg('Záhlaví buňky'),
|
|
927
882
|
});
|
|
928
883
|
headerNameInput.on('change', (ev) => {
|
|
929
884
|
this.setCellHeaderName(cell, ev.value);
|
|
930
885
|
});
|
|
931
886
|
// Add cell value control for custom cells
|
|
932
887
|
const cellValueInput = pane.addBinding(config, 'cellValue', {
|
|
933
|
-
label: '
|
|
888
|
+
label: msg('Hodnota buňky'),
|
|
934
889
|
multiline: cell.type === 'string',
|
|
935
890
|
});
|
|
936
891
|
cellValueInput.on('change', (ev) => {
|
|
@@ -939,22 +894,22 @@ let LitCaseVariablesTab = class LitCaseVariablesTab extends LitElement {
|
|
|
939
894
|
}
|
|
940
895
|
// Add cell variant control - common for all types
|
|
941
896
|
const cellVariantOptions = [
|
|
942
|
-
{ text: '
|
|
943
|
-
{ text: '
|
|
944
|
-
{ text: '
|
|
945
|
-
{ text: '
|
|
946
|
-
{ text: '
|
|
947
|
-
{ text: '
|
|
948
|
-
{ text: '
|
|
897
|
+
{ text: msg('Výchozí'), value: 'default' },
|
|
898
|
+
{ text: msg('Primární'), value: 'primary' },
|
|
899
|
+
{ text: msg('Úspěch'), value: 'success' },
|
|
900
|
+
{ text: msg('Varování'), value: 'warning' },
|
|
901
|
+
{ text: msg('Chyba'), value: 'error' },
|
|
902
|
+
{ text: msg('Informace'), value: 'info' },
|
|
903
|
+
{ text: msg('Vlastní'), value: 'custom' },
|
|
949
904
|
];
|
|
950
905
|
const cellVariantInput = pane.addBinding(config, 'cellVariant', {
|
|
951
906
|
view: 'list',
|
|
952
|
-
label: '
|
|
907
|
+
label: msg('Styl buňky'),
|
|
953
908
|
options: cellVariantOptions,
|
|
954
909
|
});
|
|
955
910
|
// Add CSS input for custom styles (always present but controlled by visibility)
|
|
956
911
|
const cssInput = pane.addBinding(config, 'customCSS', {
|
|
957
|
-
label: '
|
|
912
|
+
label: msg('CSS buňky'),
|
|
958
913
|
multiline: true,
|
|
959
914
|
rows: 4,
|
|
960
915
|
});
|
|
@@ -998,12 +953,12 @@ let LitCaseVariablesTab = class LitCaseVariablesTab extends LitElement {
|
|
|
998
953
|
this.addCellTypeSpecificControls(pane, config, cell);
|
|
999
954
|
// Add conditional formatting section
|
|
1000
955
|
const conditionFolder = pane.addFolder({
|
|
1001
|
-
title: '
|
|
956
|
+
title: msg('Podmíněné formátování buněk'),
|
|
1002
957
|
expanded: false,
|
|
1003
958
|
});
|
|
1004
959
|
// Enable/disable conditional formatting
|
|
1005
960
|
const conditionEnabledInput = conditionFolder.addBinding(config, 'conditionEnabled', {
|
|
1006
|
-
label: '
|
|
961
|
+
label: msg('Povolit podmínky'),
|
|
1007
962
|
});
|
|
1008
963
|
conditionEnabledInput.on('change', (ev) => {
|
|
1009
964
|
this.setConditionalFormatting(cell, 'enabled', ev.value);
|
|
@@ -1018,7 +973,7 @@ let LitCaseVariablesTab = class LitCaseVariablesTab extends LitElement {
|
|
|
1018
973
|
}
|
|
1019
974
|
const conditionVariableInput = conditionFolder.addBinding(config, 'conditionVariable', {
|
|
1020
975
|
view: 'list',
|
|
1021
|
-
label: '
|
|
976
|
+
label: msg('Proměnná'),
|
|
1022
977
|
options: variableOptions,
|
|
1023
978
|
});
|
|
1024
979
|
conditionVariableInput.on('change', (ev) => {
|
|
@@ -1031,7 +986,7 @@ let LitCaseVariablesTab = class LitCaseVariablesTab extends LitElement {
|
|
|
1031
986
|
const operatorOptions = this.getOperatorOptionsForCell(cell);
|
|
1032
987
|
const operatorInput = conditionFolder.addBinding(config, 'conditionOperator', {
|
|
1033
988
|
view: 'list',
|
|
1034
|
-
label: '
|
|
989
|
+
label: msg('Operátor'),
|
|
1035
990
|
options: operatorOptions,
|
|
1036
991
|
});
|
|
1037
992
|
operatorInput.on('change', (ev) => {
|
|
@@ -1042,23 +997,23 @@ let LitCaseVariablesTab = class LitCaseVariablesTab extends LitElement {
|
|
|
1042
997
|
this.operatorInputs.set(operatorKey, operatorInput);
|
|
1043
998
|
// Condition value - text input for comparison value
|
|
1044
999
|
const conditionValueInput = conditionFolder.addBinding(config, 'conditionValue', {
|
|
1045
|
-
label: '
|
|
1000
|
+
label: msg('Hodnota'),
|
|
1046
1001
|
});
|
|
1047
1002
|
conditionValueInput.on('change', (ev) => {
|
|
1048
1003
|
this.setConditionalFormatting(cell, 'value', ev.value);
|
|
1049
1004
|
});
|
|
1050
1005
|
// Conditional Cell Variant
|
|
1051
1006
|
const conditionCellVariantOptions = [
|
|
1052
|
-
{ text: '
|
|
1053
|
-
{ text: '
|
|
1054
|
-
{ text: '
|
|
1055
|
-
{ text: '
|
|
1056
|
-
{ text: '
|
|
1057
|
-
{ text: '
|
|
1007
|
+
{ text: msg('Výchozí'), value: 'default' },
|
|
1008
|
+
{ text: msg('Primární'), value: 'primary' },
|
|
1009
|
+
{ text: msg('Úspěch'), value: 'success' },
|
|
1010
|
+
{ text: msg('Varování'), value: 'warning' },
|
|
1011
|
+
{ text: msg('Chyba'), value: 'error' },
|
|
1012
|
+
{ text: msg('Informace'), value: 'info' },
|
|
1058
1013
|
];
|
|
1059
1014
|
const conditionCellVariantInput = conditionFolder.addBinding(config, 'conditionCellVariant', {
|
|
1060
1015
|
view: 'list',
|
|
1061
|
-
label: '
|
|
1016
|
+
label: msg('Styl buňky'),
|
|
1062
1017
|
options: conditionCellVariantOptions,
|
|
1063
1018
|
});
|
|
1064
1019
|
conditionCellVariantInput.on('change', (ev) => {
|
|
@@ -1066,16 +1021,16 @@ let LitCaseVariablesTab = class LitCaseVariablesTab extends LitElement {
|
|
|
1066
1021
|
});
|
|
1067
1022
|
// Conditional Value Variant
|
|
1068
1023
|
const conditionValueVariantOptions = [
|
|
1069
|
-
{ text: '
|
|
1070
|
-
{ text: '
|
|
1071
|
-
{ text: '
|
|
1072
|
-
{ text: '
|
|
1073
|
-
{ text: '
|
|
1074
|
-
{ text: '
|
|
1024
|
+
{ text: msg('Výchozí'), value: 'default' },
|
|
1025
|
+
{ text: msg('Primární'), value: 'primary' },
|
|
1026
|
+
{ text: msg('Úspěch'), value: 'success' },
|
|
1027
|
+
{ text: msg('Varování'), value: 'warning' },
|
|
1028
|
+
{ text: msg('Chyba'), value: 'error' },
|
|
1029
|
+
{ text: msg('Informace'), value: 'info' },
|
|
1075
1030
|
];
|
|
1076
1031
|
const conditionValueVariantInput = conditionFolder.addBinding(config, 'conditionValueVariant', {
|
|
1077
1032
|
view: 'list',
|
|
1078
|
-
label: '
|
|
1033
|
+
label: msg('Barva hodnoty'),
|
|
1079
1034
|
options: conditionValueVariantOptions,
|
|
1080
1035
|
});
|
|
1081
1036
|
conditionValueVariantInput.on('change', (ev) => {
|
|
@@ -1084,15 +1039,15 @@ let LitCaseVariablesTab = class LitCaseVariablesTab extends LitElement {
|
|
|
1084
1039
|
// Conditional Progress Color (only for progress type)
|
|
1085
1040
|
if (cell.type === 'progress') {
|
|
1086
1041
|
const conditionProgressColorOptions = [
|
|
1087
|
-
{ text: '
|
|
1088
|
-
{ text: '
|
|
1089
|
-
{ text: '
|
|
1090
|
-
{ text: '
|
|
1091
|
-
{ text: '
|
|
1042
|
+
{ text: msg('Primární'), value: 'primary' },
|
|
1043
|
+
{ text: msg('Úspěch'), value: 'success' },
|
|
1044
|
+
{ text: msg('Varování'), value: 'warning' },
|
|
1045
|
+
{ text: msg('Chyba'), value: 'error' },
|
|
1046
|
+
{ text: msg('Informace'), value: 'info' },
|
|
1092
1047
|
];
|
|
1093
1048
|
const conditionProgressColorInput = conditionFolder.addBinding(config, 'conditionProgressColor', {
|
|
1094
1049
|
view: 'list',
|
|
1095
|
-
label: '
|
|
1050
|
+
label: msg('Barva Progressu'),
|
|
1096
1051
|
options: conditionProgressColorOptions,
|
|
1097
1052
|
});
|
|
1098
1053
|
conditionProgressColorInput.on('change', (ev) => {
|
|
@@ -1101,12 +1056,12 @@ let LitCaseVariablesTab = class LitCaseVariablesTab extends LitElement {
|
|
|
1101
1056
|
}
|
|
1102
1057
|
// Add conditional hide section
|
|
1103
1058
|
const hideFolder = pane.addFolder({
|
|
1104
|
-
title: '
|
|
1059
|
+
title: msg('Podmíněné skrytí buněk'),
|
|
1105
1060
|
expanded: false,
|
|
1106
1061
|
});
|
|
1107
1062
|
// Enable/disable conditional hide
|
|
1108
1063
|
const hideConditionEnabledInput = hideFolder.addBinding(config, 'hideConditionEnabled', {
|
|
1109
|
-
label: '
|
|
1064
|
+
label: msg('Povolit podmínky skrytí'),
|
|
1110
1065
|
});
|
|
1111
1066
|
hideConditionEnabledInput.on('change', (ev) => {
|
|
1112
1067
|
this.setHideCondition(cell, 'enabled', ev.value);
|
|
@@ -1121,7 +1076,7 @@ let LitCaseVariablesTab = class LitCaseVariablesTab extends LitElement {
|
|
|
1121
1076
|
}
|
|
1122
1077
|
const hideConditionVariableInput = hideFolder.addBinding(config, 'hideConditionVariable', {
|
|
1123
1078
|
view: 'list',
|
|
1124
|
-
label: '
|
|
1079
|
+
label: msg('Proměnná'),
|
|
1125
1080
|
options: hideVariableOptions,
|
|
1126
1081
|
});
|
|
1127
1082
|
hideConditionVariableInput.on('change', (ev) => {
|
|
@@ -1134,7 +1089,7 @@ let LitCaseVariablesTab = class LitCaseVariablesTab extends LitElement {
|
|
|
1134
1089
|
const hideOperatorOptions = this.getOperatorOptionsForCell(cell);
|
|
1135
1090
|
const hideOperatorInput = hideFolder.addBinding(config, 'hideConditionOperator', {
|
|
1136
1091
|
view: 'list',
|
|
1137
|
-
label: '
|
|
1092
|
+
label: msg('Operátor'),
|
|
1138
1093
|
options: hideOperatorOptions,
|
|
1139
1094
|
});
|
|
1140
1095
|
hideOperatorInput.on('change', (ev) => {
|
|
@@ -1145,13 +1100,13 @@ let LitCaseVariablesTab = class LitCaseVariablesTab extends LitElement {
|
|
|
1145
1100
|
this.hideOperatorInputs.set(hideOperatorKey, hideOperatorInput);
|
|
1146
1101
|
// Hide condition value - text input for comparison value
|
|
1147
1102
|
const hideConditionValueInput = hideFolder.addBinding(config, 'hideConditionValue', {
|
|
1148
|
-
label: '
|
|
1103
|
+
label: msg('Hodnota'),
|
|
1149
1104
|
});
|
|
1150
1105
|
hideConditionValueInput.on('change', (ev) => {
|
|
1151
1106
|
this.setHideCondition(cell, 'value', ev.value);
|
|
1152
1107
|
});
|
|
1153
1108
|
// Add delete button
|
|
1154
|
-
const deleteBtn = pane.addButton({ title: '
|
|
1109
|
+
const deleteBtn = pane.addButton({ title: msg('Smazat buňku') });
|
|
1155
1110
|
deleteBtn.on('click', () => {
|
|
1156
1111
|
this.removeCellFromRows(cell.field);
|
|
1157
1112
|
this.closeSettingsPopper();
|
|
@@ -1196,33 +1151,33 @@ let LitCaseVariablesTab = class LitCaseVariablesTab extends LitElement {
|
|
|
1196
1151
|
}
|
|
1197
1152
|
getCellTypeTabTitle(cellType) {
|
|
1198
1153
|
const typeTitles = {
|
|
1199
|
-
string: '
|
|
1200
|
-
link: '
|
|
1201
|
-
number: '
|
|
1202
|
-
button: '
|
|
1203
|
-
currency: '
|
|
1204
|
-
date: '
|
|
1205
|
-
progress: '
|
|
1154
|
+
string: msg('Nastavení textu'),
|
|
1155
|
+
link: msg('Nastavení odkazu'),
|
|
1156
|
+
number: msg('Nastavení čísla'),
|
|
1157
|
+
button: msg('Nastavení tlačítka'),
|
|
1158
|
+
currency: msg('Nastavení měny'),
|
|
1159
|
+
date: msg('Nastavení data'),
|
|
1160
|
+
progress: msg('Nastavení postupu'),
|
|
1206
1161
|
};
|
|
1207
|
-
return typeTitles[cellType] || '
|
|
1162
|
+
return typeTitles[cellType] || msg('Nastavení buňky');
|
|
1208
1163
|
}
|
|
1209
1164
|
addStringControls(pane, config, cell) {
|
|
1210
1165
|
// Value Bold
|
|
1211
1166
|
const fontInput = pane.addBinding(config, 'fontWeight', {
|
|
1212
|
-
label: '
|
|
1167
|
+
label: msg('Tučná hodnota'),
|
|
1213
1168
|
});
|
|
1214
1169
|
fontInput.on('change', () => {
|
|
1215
1170
|
this.setFontWeight(cell);
|
|
1216
1171
|
});
|
|
1217
1172
|
// Value Variant
|
|
1218
1173
|
const valueVariantOptions = [
|
|
1219
|
-
{ text: '
|
|
1220
|
-
{ text: '
|
|
1221
|
-
{ text: '
|
|
1222
|
-
{ text: '
|
|
1223
|
-
{ text: '
|
|
1224
|
-
{ text: '
|
|
1225
|
-
{ text: '
|
|
1174
|
+
{ text: msg('Výchozí'), value: 'default' },
|
|
1175
|
+
{ text: msg('Primární'), value: 'primary' },
|
|
1176
|
+
{ text: msg('Úspěch'), value: 'success' },
|
|
1177
|
+
{ text: msg('Varování'), value: 'warning' },
|
|
1178
|
+
{ text: msg('Chyba'), value: 'error' },
|
|
1179
|
+
{ text: msg('Informace'), value: 'info' },
|
|
1180
|
+
{ text: msg('Vlastní'), value: 'custom' },
|
|
1226
1181
|
];
|
|
1227
1182
|
const valueVariantInput = pane.addBinding(config, 'valueVariant', {
|
|
1228
1183
|
view: 'list',
|
|
@@ -1242,10 +1197,10 @@ let LitCaseVariablesTab = class LitCaseVariablesTab extends LitElement {
|
|
|
1242
1197
|
// Link Type selector
|
|
1243
1198
|
const linkTypeInput = pane.addBinding(config, 'linkType', {
|
|
1244
1199
|
view: 'list',
|
|
1245
|
-
label: '
|
|
1200
|
+
label: msg('Typ odkazu'),
|
|
1246
1201
|
options: [
|
|
1247
|
-
{ text: '
|
|
1248
|
-
{ text: '
|
|
1202
|
+
{ text: msg('Vlastní URL'), value: 'custom' },
|
|
1203
|
+
{ text: msg('Proměnná případu'), value: 'case' },
|
|
1249
1204
|
],
|
|
1250
1205
|
});
|
|
1251
1206
|
linkTypeInput.on('change', (ev) => {
|
|
@@ -1253,7 +1208,7 @@ let LitCaseVariablesTab = class LitCaseVariablesTab extends LitElement {
|
|
|
1253
1208
|
});
|
|
1254
1209
|
// Custom URL input (shown when linkType is 'custom')
|
|
1255
1210
|
const hrefInput = pane.addBinding(config, 'href', {
|
|
1256
|
-
label: '
|
|
1211
|
+
label: msg('Vlastní URL'),
|
|
1257
1212
|
});
|
|
1258
1213
|
hrefInput.on('change', (ev) => {
|
|
1259
1214
|
this.setHref(cell, ev.value);
|
|
@@ -1264,7 +1219,7 @@ let LitCaseVariablesTab = class LitCaseVariablesTab extends LitElement {
|
|
|
1264
1219
|
if (variableOptions.length > 0) {
|
|
1265
1220
|
linkVariableInput = pane.addBinding(config, 'linkVariable', {
|
|
1266
1221
|
view: 'list',
|
|
1267
|
-
label: '
|
|
1222
|
+
label: msg('Proměnná'),
|
|
1268
1223
|
options: variableOptions,
|
|
1269
1224
|
});
|
|
1270
1225
|
linkVariableInput.on('change', (ev) => {
|
|
@@ -1291,20 +1246,20 @@ let LitCaseVariablesTab = class LitCaseVariablesTab extends LitElement {
|
|
|
1291
1246
|
addNumberControls(pane, config, cell) {
|
|
1292
1247
|
// Value Bold
|
|
1293
1248
|
const fontInput = pane.addBinding(config, 'fontWeight', {
|
|
1294
|
-
label: '
|
|
1249
|
+
label: msg('Hodnota tučně'),
|
|
1295
1250
|
});
|
|
1296
1251
|
fontInput.on('change', () => {
|
|
1297
1252
|
this.setFontWeight(cell);
|
|
1298
1253
|
});
|
|
1299
1254
|
// Value Variant
|
|
1300
1255
|
const valueVariantOptions = [
|
|
1301
|
-
{ text: '
|
|
1302
|
-
{ text: '
|
|
1303
|
-
{ text: '
|
|
1304
|
-
{ text: '
|
|
1305
|
-
{ text: '
|
|
1306
|
-
{ text: '
|
|
1307
|
-
{ text: '
|
|
1256
|
+
{ text: msg('Výchozí'), value: 'default' },
|
|
1257
|
+
{ text: msg('Primární'), value: 'primary' },
|
|
1258
|
+
{ text: msg('Úspěch'), value: 'success' },
|
|
1259
|
+
{ text: msg('Varování'), value: 'warning' },
|
|
1260
|
+
{ text: msg('Chyba'), value: 'error' },
|
|
1261
|
+
{ text: msg('Informace'), value: 'info' },
|
|
1262
|
+
{ text: msg('Vlastní'), value: 'custom' },
|
|
1308
1263
|
];
|
|
1309
1264
|
const valueVariantInput = pane.addBinding(config, 'valueVariant', {
|
|
1310
1265
|
view: 'list',
|
|
@@ -1324,12 +1279,12 @@ let LitCaseVariablesTab = class LitCaseVariablesTab extends LitElement {
|
|
|
1324
1279
|
// Button Variant
|
|
1325
1280
|
const variantInput = pane.addBinding(config, 'buttonVariant', {
|
|
1326
1281
|
view: 'list',
|
|
1327
|
-
label: '
|
|
1282
|
+
label: msg('Varianta tlačítka'),
|
|
1328
1283
|
options: [
|
|
1329
|
-
{ text: '
|
|
1330
|
-
{ text: '
|
|
1331
|
-
{ text: '
|
|
1332
|
-
{ text: '
|
|
1284
|
+
{ text: msg('Vyplněné'), value: 'contained' },
|
|
1285
|
+
{ text: msg('Ohraničené'), value: 'outlined' },
|
|
1286
|
+
{ text: msg('Textové'), value: 'text' },
|
|
1287
|
+
{ text: msg('Čárkované'), value: 'dashed' },
|
|
1333
1288
|
],
|
|
1334
1289
|
});
|
|
1335
1290
|
variantInput.on('change', (ev) => {
|
|
@@ -1338,13 +1293,13 @@ let LitCaseVariablesTab = class LitCaseVariablesTab extends LitElement {
|
|
|
1338
1293
|
// Button Color
|
|
1339
1294
|
const colorInput = pane.addBinding(config, 'buttonColor', {
|
|
1340
1295
|
view: 'list',
|
|
1341
|
-
label: '
|
|
1296
|
+
label: msg('Barva tlačítka'),
|
|
1342
1297
|
options: [
|
|
1343
|
-
{ text: '
|
|
1344
|
-
{ text: '
|
|
1345
|
-
{ text: '
|
|
1346
|
-
{ text: '
|
|
1347
|
-
{ text: 'AI', value: 'ai' },
|
|
1298
|
+
{ text: msg('Primární'), value: 'primary' },
|
|
1299
|
+
{ text: msg('Druhé'), value: 'secondary' },
|
|
1300
|
+
{ text: msg('Chyba'), value: 'error' },
|
|
1301
|
+
{ text: msg('Varování'), value: 'warning' },
|
|
1302
|
+
{ text: msg('AI'), value: 'ai' },
|
|
1348
1303
|
],
|
|
1349
1304
|
});
|
|
1350
1305
|
colorInput.on('change', (ev) => {
|
|
@@ -1352,7 +1307,7 @@ let LitCaseVariablesTab = class LitCaseVariablesTab extends LitElement {
|
|
|
1352
1307
|
});
|
|
1353
1308
|
// Button Full Width
|
|
1354
1309
|
const fullWidthInput = pane.addBinding(config, 'buttonFullWidth', {
|
|
1355
|
-
label: '
|
|
1310
|
+
label: msg('Tlačítko na celou šířku'),
|
|
1356
1311
|
});
|
|
1357
1312
|
fullWidthInput.on('change', (ev) => {
|
|
1358
1313
|
this.setButtonFullWidth(cell, ev.value);
|
|
@@ -1361,10 +1316,10 @@ let LitCaseVariablesTab = class LitCaseVariablesTab extends LitElement {
|
|
|
1361
1316
|
// Link Type selector
|
|
1362
1317
|
const linkTypeInput = pane.addBinding(config, 'linkType', {
|
|
1363
1318
|
view: 'list',
|
|
1364
|
-
label: '
|
|
1319
|
+
label: msg('Typ odkazu'),
|
|
1365
1320
|
options: [
|
|
1366
|
-
{ text: '
|
|
1367
|
-
{ text: '
|
|
1321
|
+
{ text: msg('Vlastní URL'), value: 'custom' },
|
|
1322
|
+
{ text: msg('Proměnná případu'), value: 'case' },
|
|
1368
1323
|
],
|
|
1369
1324
|
});
|
|
1370
1325
|
linkTypeInput.on('change', (ev) => {
|
|
@@ -1372,7 +1327,7 @@ let LitCaseVariablesTab = class LitCaseVariablesTab extends LitElement {
|
|
|
1372
1327
|
});
|
|
1373
1328
|
// Custom URL input (shown when linkType is 'custom')
|
|
1374
1329
|
const hrefInput = pane.addBinding(config, 'href', {
|
|
1375
|
-
label: '
|
|
1330
|
+
label: msg('Vlastní URL'),
|
|
1376
1331
|
});
|
|
1377
1332
|
hrefInput.on('change', (ev) => {
|
|
1378
1333
|
this.setHref(cell, ev.value);
|
|
@@ -1383,7 +1338,7 @@ let LitCaseVariablesTab = class LitCaseVariablesTab extends LitElement {
|
|
|
1383
1338
|
if (variableOptions.length > 0) {
|
|
1384
1339
|
linkVariableInput = pane.addBinding(config, 'linkVariable', {
|
|
1385
1340
|
view: 'list',
|
|
1386
|
-
label: '
|
|
1341
|
+
label: msg('Proměnná'),
|
|
1387
1342
|
options: variableOptions,
|
|
1388
1343
|
});
|
|
1389
1344
|
linkVariableInput.on('change', (ev) => {
|
|
@@ -1410,20 +1365,20 @@ let LitCaseVariablesTab = class LitCaseVariablesTab extends LitElement {
|
|
|
1410
1365
|
addCurrencyControls(pane, config, cell) {
|
|
1411
1366
|
// Value Bold
|
|
1412
1367
|
const fontInput = pane.addBinding(config, 'fontWeight', {
|
|
1413
|
-
label: '
|
|
1368
|
+
label: msg('Tučná hodnota'),
|
|
1414
1369
|
});
|
|
1415
1370
|
fontInput.on('change', () => {
|
|
1416
1371
|
this.setFontWeight(cell);
|
|
1417
1372
|
});
|
|
1418
1373
|
// Value Variant
|
|
1419
1374
|
const valueVariantOptions = [
|
|
1420
|
-
{ text: '
|
|
1421
|
-
{ text: '
|
|
1422
|
-
{ text: '
|
|
1423
|
-
{ text: '
|
|
1424
|
-
{ text: '
|
|
1425
|
-
{ text: '
|
|
1426
|
-
{ text: '
|
|
1375
|
+
{ text: msg('Výchozí'), value: 'default' },
|
|
1376
|
+
{ text: msg('Primární'), value: 'primary' },
|
|
1377
|
+
{ text: msg('Úspěch'), value: 'success' },
|
|
1378
|
+
{ text: msg('Varování'), value: 'warning' },
|
|
1379
|
+
{ text: msg('Chyba'), value: 'error' },
|
|
1380
|
+
{ text: msg('Informace'), value: 'info' },
|
|
1381
|
+
{ text: msg('Vlastní'), value: 'custom' },
|
|
1427
1382
|
];
|
|
1428
1383
|
const valueVariantInput = pane.addBinding(config, 'valueVariant', {
|
|
1429
1384
|
view: 'list',
|
|
@@ -1440,7 +1395,7 @@ let LitCaseVariablesTab = class LitCaseVariablesTab extends LitElement {
|
|
|
1440
1395
|
});
|
|
1441
1396
|
// Number of Decimals
|
|
1442
1397
|
const decimalInput = pane.addBinding(config, 'numberOfDecimal', {
|
|
1443
|
-
label: '
|
|
1398
|
+
label: msg('Počet desetinných míst'),
|
|
1444
1399
|
min: 0,
|
|
1445
1400
|
max: 10,
|
|
1446
1401
|
step: 1,
|
|
@@ -1451,7 +1406,7 @@ let LitCaseVariablesTab = class LitCaseVariablesTab extends LitElement {
|
|
|
1451
1406
|
// Currency Type
|
|
1452
1407
|
const currencyInput = pane.addBinding(config, 'currencyType', {
|
|
1453
1408
|
view: 'list',
|
|
1454
|
-
label: '
|
|
1409
|
+
label: msg('Typ měny'),
|
|
1455
1410
|
options: [
|
|
1456
1411
|
{ text: 'CZK', value: 'CZK' },
|
|
1457
1412
|
{ text: 'EUR', value: 'EUR' },
|
|
@@ -1477,20 +1432,20 @@ let LitCaseVariablesTab = class LitCaseVariablesTab extends LitElement {
|
|
|
1477
1432
|
addDateControls(pane, config, cell) {
|
|
1478
1433
|
// Value Bold
|
|
1479
1434
|
const fontInput = pane.addBinding(config, 'fontWeight', {
|
|
1480
|
-
label: '
|
|
1435
|
+
label: msg('Tučná hodnota'),
|
|
1481
1436
|
});
|
|
1482
1437
|
fontInput.on('change', () => {
|
|
1483
1438
|
this.setFontWeight(cell);
|
|
1484
1439
|
});
|
|
1485
1440
|
// Value Variant
|
|
1486
1441
|
const valueVariantOptions = [
|
|
1487
|
-
{ text: '
|
|
1488
|
-
{ text: '
|
|
1489
|
-
{ text: '
|
|
1490
|
-
{ text: '
|
|
1491
|
-
{ text: '
|
|
1492
|
-
{ text: '
|
|
1493
|
-
{ text: '
|
|
1442
|
+
{ text: msg('Výchozí'), value: 'default' },
|
|
1443
|
+
{ text: msg('Primární'), value: 'primary' },
|
|
1444
|
+
{ text: msg('Úspěch'), value: 'success' },
|
|
1445
|
+
{ text: msg('Varování'), value: 'warning' },
|
|
1446
|
+
{ text: msg('Chyba'), value: 'error' },
|
|
1447
|
+
{ text: msg('Informace'), value: 'info' },
|
|
1448
|
+
{ text: msg('Vlastní'), value: 'custom' },
|
|
1494
1449
|
];
|
|
1495
1450
|
const valueVariantInput = pane.addBinding(config, 'valueVariant', {
|
|
1496
1451
|
view: 'list',
|
|
@@ -1510,13 +1465,13 @@ let LitCaseVariablesTab = class LitCaseVariablesTab extends LitElement {
|
|
|
1510
1465
|
// Progress Color
|
|
1511
1466
|
const progressColorInput = pane.addBinding(config, 'progressColor', {
|
|
1512
1467
|
view: 'list',
|
|
1513
|
-
label: '
|
|
1468
|
+
label: msg('Barva postupu'),
|
|
1514
1469
|
options: [
|
|
1515
|
-
{ text: '
|
|
1516
|
-
{ text: '
|
|
1517
|
-
{ text: '
|
|
1518
|
-
{ text: '
|
|
1519
|
-
{ text: '
|
|
1470
|
+
{ text: msg('Primární'), value: 'primary' },
|
|
1471
|
+
{ text: msg('Úspěch'), value: 'success' },
|
|
1472
|
+
{ text: msg('Varování'), value: 'warning' },
|
|
1473
|
+
{ text: msg('Chyba'), value: 'error' },
|
|
1474
|
+
{ text: msg('Informace'), value: 'info' },
|
|
1520
1475
|
],
|
|
1521
1476
|
});
|
|
1522
1477
|
progressColorInput.on('change', (ev) => {
|
|
@@ -1524,13 +1479,13 @@ let LitCaseVariablesTab = class LitCaseVariablesTab extends LitElement {
|
|
|
1524
1479
|
});
|
|
1525
1480
|
// Value Variant (for progress text color if needed)
|
|
1526
1481
|
const valueVariantOptions = [
|
|
1527
|
-
{ text: '
|
|
1528
|
-
{ text: '
|
|
1529
|
-
{ text: '
|
|
1530
|
-
{ text: '
|
|
1531
|
-
{ text: '
|
|
1532
|
-
{ text: '
|
|
1533
|
-
{ text: '
|
|
1482
|
+
{ text: msg('Výchozí'), value: 'default' },
|
|
1483
|
+
{ text: msg('Primární'), value: 'primary' },
|
|
1484
|
+
{ text: msg('Úspěch'), value: 'success' },
|
|
1485
|
+
{ text: msg('Varování'), value: 'warning' },
|
|
1486
|
+
{ text: msg('Chyba'), value: 'error' },
|
|
1487
|
+
{ text: msg('Informace'), value: 'info' },
|
|
1488
|
+
{ text: msg('Vlastní'), value: 'custom' },
|
|
1534
1489
|
];
|
|
1535
1490
|
const valueVariantInput = pane.addBinding(config, 'valueVariant', {
|
|
1536
1491
|
view: 'list',
|
|
@@ -1552,10 +1507,10 @@ let LitCaseVariablesTab = class LitCaseVariablesTab extends LitElement {
|
|
|
1552
1507
|
if (rowCell) {
|
|
1553
1508
|
return rowCell.value;
|
|
1554
1509
|
}
|
|
1555
|
-
// Then check in
|
|
1556
|
-
const
|
|
1557
|
-
if (
|
|
1558
|
-
return
|
|
1510
|
+
// Then check in variables array
|
|
1511
|
+
const variableItem = this.variables.find((variable) => variable.field === fieldName);
|
|
1512
|
+
if (variableItem) {
|
|
1513
|
+
return variableItem.value || variableItem.ivar_value;
|
|
1559
1514
|
}
|
|
1560
1515
|
return '';
|
|
1561
1516
|
}
|
|
@@ -1580,44 +1535,22 @@ let LitCaseVariablesTab = class LitCaseVariablesTab extends LitElement {
|
|
|
1580
1535
|
// Determine field type for proper comparison
|
|
1581
1536
|
let fieldType = 'string';
|
|
1582
1537
|
if (fieldCell) {
|
|
1583
|
-
//
|
|
1584
|
-
|
|
1585
|
-
|
|
1586
|
-
|
|
1587
|
-
|
|
1588
|
-
|
|
1589
|
-
|
|
1590
|
-
|
|
1591
|
-
|
|
1592
|
-
|
|
1593
|
-
|
|
1594
|
-
|
|
1595
|
-
|
|
1596
|
-
|
|
1597
|
-
|
|
1598
|
-
|
|
1599
|
-
case IvarType.DYNAMIC_TABLE:
|
|
1600
|
-
case IvarType.DYNAMIC_ROWS:
|
|
1601
|
-
default:
|
|
1602
|
-
fieldType = 'string';
|
|
1603
|
-
break;
|
|
1604
|
-
}
|
|
1605
|
-
}
|
|
1606
|
-
else {
|
|
1607
|
-
// Map unsupported types to valid FieldType
|
|
1608
|
-
switch (fieldCell.type) {
|
|
1609
|
-
case 'number':
|
|
1610
|
-
case 'progress':
|
|
1611
|
-
case 'currency':
|
|
1612
|
-
fieldType = 'number';
|
|
1613
|
-
break;
|
|
1614
|
-
case 'date':
|
|
1615
|
-
fieldType = 'date';
|
|
1616
|
-
break;
|
|
1617
|
-
default:
|
|
1618
|
-
fieldType = 'string';
|
|
1619
|
-
break;
|
|
1620
|
-
}
|
|
1538
|
+
// Use cell.type directly for field type determination
|
|
1539
|
+
switch (fieldCell.type) {
|
|
1540
|
+
case 'number':
|
|
1541
|
+
case 'progress':
|
|
1542
|
+
case 'currency':
|
|
1543
|
+
fieldType = 'number';
|
|
1544
|
+
break;
|
|
1545
|
+
case 'date':
|
|
1546
|
+
fieldType = 'date';
|
|
1547
|
+
break;
|
|
1548
|
+
case 'string':
|
|
1549
|
+
case 'button':
|
|
1550
|
+
case 'link':
|
|
1551
|
+
default:
|
|
1552
|
+
fieldType = 'string';
|
|
1553
|
+
break;
|
|
1621
1554
|
}
|
|
1622
1555
|
}
|
|
1623
1556
|
const variableStr = String(variableValue || '').toLowerCase();
|
|
@@ -2078,21 +2011,22 @@ let LitCaseVariablesTab = class LitCaseVariablesTab extends LitElement {
|
|
|
2078
2011
|
this.removeCellFromRows(key);
|
|
2079
2012
|
}
|
|
2080
2013
|
else {
|
|
2081
|
-
const raw = this.
|
|
2014
|
+
const raw = this.variables.find((variable) => variable.field === key);
|
|
2082
2015
|
if (!raw)
|
|
2083
2016
|
return;
|
|
2084
2017
|
const lang = this.userLang || 'cs';
|
|
2085
|
-
const
|
|
2086
|
-
const
|
|
2018
|
+
const rawAny = raw;
|
|
2019
|
+
const headerName = rawAny[`tvar_name_${lang}`] || rawAny.tvar_name_cs || rawAny.tvar_name;
|
|
2020
|
+
const tooltip = rawAny[`tvar_tooltip_${lang}`] || rawAny.tvar_tooltip_cs || rawAny.tvar_tooltip;
|
|
2087
2021
|
let type;
|
|
2088
|
-
if (
|
|
2022
|
+
if (rawAny.tvar_type === 'D') {
|
|
2089
2023
|
type = 'date';
|
|
2090
2024
|
}
|
|
2091
|
-
else if (
|
|
2092
|
-
(
|
|
2025
|
+
else if (rawAny.tvar_multi !== 'X' &&
|
|
2026
|
+
(rawAny.tvar_type === 'N' || rawAny.tvar_type === 'LN')) {
|
|
2093
2027
|
type = 'number';
|
|
2094
2028
|
}
|
|
2095
|
-
else if (
|
|
2029
|
+
else if (rawAny.tvar_type === 'progress') {
|
|
2096
2030
|
type = 'progress';
|
|
2097
2031
|
}
|
|
2098
2032
|
else {
|
|
@@ -2102,7 +2036,7 @@ let LitCaseVariablesTab = class LitCaseVariablesTab extends LitElement {
|
|
|
2102
2036
|
field: key,
|
|
2103
2037
|
type,
|
|
2104
2038
|
headerName,
|
|
2105
|
-
value:
|
|
2039
|
+
value: rawAny.ivar_value,
|
|
2106
2040
|
size: { xs: 4, sm: 2, md: 1, lg: 1, xl: 1 },
|
|
2107
2041
|
tooltip,
|
|
2108
2042
|
};
|
|
@@ -2141,8 +2075,10 @@ let LitCaseVariablesTab = class LitCaseVariablesTab extends LitElement {
|
|
|
2141
2075
|
if (this.hideTabWhen)
|
|
2142
2076
|
return null;
|
|
2143
2077
|
const lang = this.userLang || 'cs';
|
|
2144
|
-
const filteredKeys =
|
|
2145
|
-
|
|
2078
|
+
const filteredKeys = this.variables
|
|
2079
|
+
.map((variable) => variable.field)
|
|
2080
|
+
.filter((key) => {
|
|
2081
|
+
const item = this.variables.find((variable) => variable.field === key);
|
|
2146
2082
|
const name = item?.[`tvar_name_${lang}`] || key;
|
|
2147
2083
|
return (key.toLowerCase().includes(this.filterText) ||
|
|
2148
2084
|
name.toLowerCase().includes(this.filterText));
|
|
@@ -2244,9 +2180,10 @@ let LitCaseVariablesTab = class LitCaseVariablesTab extends LitElement {
|
|
|
2244
2180
|
></lit-input>
|
|
2245
2181
|
</div>
|
|
2246
2182
|
<lit-menu tabindex="0">
|
|
2247
|
-
${
|
|
2183
|
+
${this.variables
|
|
2184
|
+
.map((variable) => variable.field)
|
|
2248
2185
|
.filter((key) => {
|
|
2249
|
-
const item = this.
|
|
2186
|
+
const item = this.variables.find((variable) => variable.field === key);
|
|
2250
2187
|
const lang = this.userLang || 'cs';
|
|
2251
2188
|
const name = item?.[`tvar_name_${lang}`] || key;
|
|
2252
2189
|
return (key.toLowerCase().includes(this.filterText) ||
|
|
@@ -2278,7 +2215,7 @@ let LitCaseVariablesTab = class LitCaseVariablesTab extends LitElement {
|
|
|
2278
2215
|
class="cursor"
|
|
2279
2216
|
.checked=${this.existingFields.includes(key)}
|
|
2280
2217
|
></lit-checkbox>
|
|
2281
|
-
${this.
|
|
2218
|
+
${this.variables.find((variable) => variable.field === key)?.[`tvar_name_${this.userLang}`] || key}
|
|
2282
2219
|
(${key})
|
|
2283
2220
|
</span>
|
|
2284
2221
|
</lit-menu-item>
|
|
@@ -2527,8 +2464,8 @@ __decorate([
|
|
|
2527
2464
|
property({ type: Array })
|
|
2528
2465
|
], LitCaseVariablesTab.prototype, "rows", void 0);
|
|
2529
2466
|
__decorate([
|
|
2530
|
-
property({ type:
|
|
2531
|
-
], LitCaseVariablesTab.prototype, "
|
|
2467
|
+
property({ type: Array })
|
|
2468
|
+
], LitCaseVariablesTab.prototype, "variables", void 0);
|
|
2532
2469
|
__decorate([
|
|
2533
2470
|
property({ type: Boolean })
|
|
2534
2471
|
], LitCaseVariablesTab.prototype, "hideTabWhen", void 0);
|