@topconsultnpm/sdkui-react 6.21.0-dev2.15 → 6.21.0-dev2.16
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/lib/components/NewComponents/ContextMenu/styles.d.ts +19 -43
- package/lib/components/NewComponents/FloatingMenuBar/styles.d.ts +27 -79
- package/lib/components/base/Styled.d.ts +40 -76
- package/lib/components/base/TMFileManagerUtils.d.ts +2 -6
- package/lib/components/base/TMTreeView.d.ts +3 -5
- package/lib/components/editors/TMEditorStyled.d.ts +10 -42
- package/lib/components/editors/TMFormulaEditor.d.ts +2 -0
- package/lib/components/editors/TMFormulaEditor.js +69 -15
- package/lib/components/features/documents/TMDcmtPreview.d.ts +3 -5
- package/lib/components/features/search/TMSearchQueryPanel.d.ts +3 -3
- package/lib/components/features/workflow/diagram/WorkitemRecipientsEditor.d.ts +1 -1
- package/lib/components/forms/Login/ChangePasswordInputs.d.ts +1 -1
- package/lib/components/layout/panelManager/TMPanelManagerToolbar.d.ts +2 -5
- package/lib/components/pages/TMPage.js +3 -1
- package/lib/components/query/TMQueryEditor.d.ts +6 -10
- package/lib/components/sidebar/TMCommandsPanel.d.ts +2 -4
- package/lib/helper/SDKUI_Localizator.d.ts +47 -0
- package/lib/helper/SDKUI_Localizator.js +472 -0
- package/lib/helper/TMPdfViewer.js +25 -24
- package/lib/helper/TMUtils.d.ts +3 -3
- package/lib/hooks/useDocumentOperations.js +1 -1
- package/package.json +1 -1
|
@@ -27,11 +27,13 @@ export declare class FormulaDescriptor {
|
|
|
27
27
|
mid?: number;
|
|
28
28
|
metadataDataTypeDest?: MetadataDataTypes;
|
|
29
29
|
tid?: number;
|
|
30
|
+
description?: string;
|
|
30
31
|
}
|
|
31
32
|
export declare const renderFormulaIcon: (iconType: FormulaIconTypes, tid?: number, md?: MetadataDescriptor) => import("react/jsx-runtime").JSX.Element;
|
|
32
33
|
declare const TMFormulaEditor: React.FunctionComponent<ITMApplyFormProps<FormulaDescriptor>>;
|
|
33
34
|
export default TMFormulaEditor;
|
|
34
35
|
export declare class FormulaHelper {
|
|
36
|
+
static translateDescInFormula: (text: string, returnType?: string) => string;
|
|
35
37
|
static isFormula(value: string | undefined): boolean;
|
|
36
38
|
static removeFormulaTag(value: string | undefined): string | undefined;
|
|
37
39
|
static addFormulaTag(value: string | undefined): string | undefined;
|
|
@@ -58,11 +58,15 @@ export const renderFormulaIcon = (iconType, tid, md) => {
|
|
|
58
58
|
default: return _jsx(_Fragment, {});
|
|
59
59
|
}
|
|
60
60
|
};
|
|
61
|
+
const FormulaTreeViewItem = ({ item }) => {
|
|
62
|
+
return (_jsxs(StyledDivHorizontal, { style: { display: 'flex', gap: '5px', alignItems: 'center' }, children: [renderFormulaIcon(item.icon, item.tid, item.md), _jsx("span", { style: { whiteSpace: 'nowrap', textOverflow: 'ellipsis', overflow: 'hidden' }, children: item.text })] }));
|
|
63
|
+
};
|
|
61
64
|
const TMFormulaEditor = (props) => {
|
|
62
65
|
const deviceType = useDeviceType();
|
|
63
66
|
const [validationItems, setValidationItems] = useState([]);
|
|
64
67
|
const { formData, setFormData, formDataOrig, exception, applyData } = useApplyForm(props.formMode, props.inputData, () => new FormulaDescriptor(), props.onApplied);
|
|
65
68
|
const [isVertical, setIsVertical] = useState(deviceType === DeviceType.MOBILE);
|
|
69
|
+
const [selectedItem, setSelectedItem] = useState(null);
|
|
66
70
|
// const [code, setCode] = useState(`function add(a, b) {\n return a + b;\n}` );
|
|
67
71
|
const textAreaRef = useRef(null);
|
|
68
72
|
const { ref, width } = useResizeObserver();
|
|
@@ -130,31 +134,20 @@ const TMFormulaEditor = (props) => {
|
|
|
130
134
|
}
|
|
131
135
|
};
|
|
132
136
|
const renderTreeViewItem = useCallback((item) => {
|
|
133
|
-
return (
|
|
137
|
+
return _jsx(FormulaTreeViewItem, { item: item });
|
|
134
138
|
}, []);
|
|
135
|
-
const translateDescInFormula = (text) => {
|
|
136
|
-
switch (text) {
|
|
137
|
-
case `TM_GetViewLink (${SDKUI_Localizator.FormulaEditor_Function_TM_GetViewLink_WithoutLogin})`:
|
|
138
|
-
return `[dbo].[TM_GetViewLink](NULL, NULL, NULL, 0, {@TID}, {@DID}, 1, NULL, 0)`;
|
|
139
|
-
case `TM_GetViewLink (${SDKUI_Localizator.FormulaEditor_Function_TM_GetViewLink_WithLogin})`:
|
|
140
|
-
return `[dbo].[TM_GetViewLink](NULL, 'ASKLOGIN', NULL, 0, {@TID}, {@DID}, 1, NULL, 0)`;
|
|
141
|
-
case `TM_GetViewLink (${SDKUI_Localizator.FormulaEditor_Function_TM_GetViewLink_WithDate})`:
|
|
142
|
-
return `[dbo].[TM_GetViewLink](NULL, NULL, NULL, 0, {@TID}, {@DID}, 1, CONVERT(VARCHAR, {@CreationTime}+30, 126), 0)`;
|
|
143
|
-
break;
|
|
144
|
-
}
|
|
145
|
-
return text;
|
|
146
|
-
};
|
|
147
139
|
const handleTreeViewItemClick = (e) => {
|
|
148
140
|
if (!e)
|
|
149
141
|
return;
|
|
150
142
|
if (e.itemData?.hasItems)
|
|
151
143
|
return;
|
|
152
|
-
|
|
144
|
+
setSelectedItem(e.itemData);
|
|
145
|
+
insertText(FormulaHelper.translateDescInFormula(e.itemData?.text));
|
|
153
146
|
};
|
|
154
147
|
return (_jsx(TMApplyForm, { isModal: props.isModal, formMode: props.formMode, isModified: formData.expression !== formDataOrig.expression, exception: exception, validationItems: validationItems, title: SDKUI_Localizator.Formula, hasNavigation: false, showBack: props.showBack, height: '600px', width: '800px', onApply: () => applyData(), onClose: props.onClose, onUndo: () => {
|
|
155
148
|
setFormData(formDataOrig);
|
|
156
149
|
setValidationItems([]);
|
|
157
|
-
}, customToolbarElements: _jsx(TMButton, { caption: SDKUI_Localizator.EvaluateResult, onClick: () => { formulaValidator_BackEnd(); }, btnStyle: 'toolbar', icon: _jsx(IconNotification, {}) }), children: _jsx("div", { ref: ref, style: { width: '100%', height: '100%' }, children: _jsxs(TMSplitterLayout, { direction: isVertical ? 'vertical' : 'horizontal', showSeparator: true, separatorSize: 5, start: isVertical ? ['50%', '50%'] : ['35%', '65%'], min: ['0px', '0px'], children: [
|
|
150
|
+
}, customToolbarElements: _jsx(TMButton, { caption: SDKUI_Localizator.EvaluateResult, onClick: () => { formulaValidator_BackEnd(); }, btnStyle: 'toolbar', icon: _jsx(IconNotification, {}) }), children: _jsx("div", { ref: ref, style: { width: '100%', height: '100%' }, children: _jsxs(TMSplitterLayout, { direction: isVertical ? 'vertical' : 'horizontal', showSeparator: true, separatorSize: 5, start: isVertical ? ['50%', '50%'] : ['35%', '65%'], min: ['0px', '0px'], children: [_jsxs(TMCard, { scrollX: true, children: [selectedItem?.description && (_jsx(TMLayoutItem, { height: "max-content", children: _jsxs("div", { style: { padding: '6px 10px', background: TMColors.default_background, borderTop: `1px solid ${TMColors.border_normal}`, fontSize: FontSize.defaultFontSize }, children: [_jsx("span", { style: { fontWeight: 'bold', color: TMColors.info, marginRight: '8px' }, children: FormulaHelper.translateDescInFormula(selectedItem.text) }), _jsx("span", { style: { color: TMColors.info }, children: selectedItem.description })] }) })), _jsx(TreeView, { id: "treeview", items: props.inputData?.items, width: '100%', height: '100%', scrollDirection: 'vertical', itemRender: renderTreeViewItem, onItemClick: handleTreeViewItemClick })] }), _jsxs(TMLayoutContainer, { direction: 'vertical', children: [_jsx(TMLayoutItem, { children: _jsx(TMCard, { scrollX: true, children: _jsx("textarea", { ref: textAreaRef, spellCheck: false, value: formData?.expression ?? '', onChange: (e) => {
|
|
158
151
|
setFormData({ ...formData, expression: e.target.value });
|
|
159
152
|
if (e.target.value != formDataOrig?.expression)
|
|
160
153
|
insertValidationItem();
|
|
@@ -351,6 +344,7 @@ export class FormulaHelper {
|
|
|
351
344
|
tid: -1,
|
|
352
345
|
expanded: false,
|
|
353
346
|
hasItems: false,
|
|
347
|
+
description: SDKUI_Localizator.FormulaEditor_DescInstruction_SS_CASE
|
|
354
348
|
}, {
|
|
355
349
|
id: '1_4_2',
|
|
356
350
|
text: 'IS NULL',
|
|
@@ -358,6 +352,7 @@ export class FormulaHelper {
|
|
|
358
352
|
tid: -1,
|
|
359
353
|
expanded: false,
|
|
360
354
|
hasItems: false,
|
|
355
|
+
description: SDKUI_Localizator.FormulaEditor_DescInstruction_SS_ISNULL
|
|
361
356
|
}];
|
|
362
357
|
break;
|
|
363
358
|
case DBBrands.Oracle:
|
|
@@ -369,6 +364,7 @@ export class FormulaHelper {
|
|
|
369
364
|
tid: -1,
|
|
370
365
|
expanded: false,
|
|
371
366
|
hasItems: false,
|
|
367
|
+
description: SDKUI_Localizator.FormulaEditor_DescInstruction_ORA_CASE
|
|
372
368
|
}, {
|
|
373
369
|
id: '1_4_2',
|
|
374
370
|
text: 'IS NULL',
|
|
@@ -376,6 +372,7 @@ export class FormulaHelper {
|
|
|
376
372
|
tid: -1,
|
|
377
373
|
expanded: false,
|
|
378
374
|
hasItems: false,
|
|
375
|
+
description: SDKUI_Localizator.FormulaEditor_DescInstruction_ORA_IS_NULL
|
|
379
376
|
}, {
|
|
380
377
|
id: '1_4_3',
|
|
381
378
|
text: 'GREATEST',
|
|
@@ -383,6 +380,7 @@ export class FormulaHelper {
|
|
|
383
380
|
tid: -1,
|
|
384
381
|
expanded: false,
|
|
385
382
|
hasItems: false,
|
|
383
|
+
description: SDKUI_Localizator.FormulaEditor_DescInstruction_ORA_GREATEST
|
|
386
384
|
}, {
|
|
387
385
|
id: '1_4_4',
|
|
388
386
|
text: 'LEAST',
|
|
@@ -390,6 +388,7 @@ export class FormulaHelper {
|
|
|
390
388
|
tid: -1,
|
|
391
389
|
expanded: false,
|
|
392
390
|
hasItems: false,
|
|
391
|
+
description: SDKUI_Localizator.FormulaEditor_DescInstruction_ORA_LEAST
|
|
393
392
|
}];
|
|
394
393
|
break;
|
|
395
394
|
}
|
|
@@ -437,24 +436,28 @@ export class FormulaHelper {
|
|
|
437
436
|
icon: FormulaIconTypes.Function,
|
|
438
437
|
expanded: false,
|
|
439
438
|
hasItems: false,
|
|
439
|
+
description: SDKUI_Localizator.FormulaEditor_DescInstruction_SS_CONVERT,
|
|
440
440
|
}, {
|
|
441
441
|
id: '3_1_2',
|
|
442
442
|
text: 'CONVERT(nvarchar)',
|
|
443
443
|
icon: FormulaIconTypes.Function,
|
|
444
444
|
expanded: false,
|
|
445
445
|
hasItems: false,
|
|
446
|
+
description: SDKUI_Localizator.FormulaEditor_DescInstruction_SS_CONVERTnvarchar,
|
|
446
447
|
}, {
|
|
447
448
|
id: '3_1_3',
|
|
448
449
|
text: 'CONVERT(int)',
|
|
449
450
|
icon: FormulaIconTypes.Function,
|
|
450
451
|
expanded: false,
|
|
451
452
|
hasItems: false,
|
|
453
|
+
description: SDKUI_Localizator.FormulaEditor_DescInstruction_SS_CONVERTint,
|
|
452
454
|
}, {
|
|
453
455
|
id: '3_1_4',
|
|
454
456
|
text: 'ISNULL',
|
|
455
457
|
icon: FormulaIconTypes.Function,
|
|
456
458
|
expanded: false,
|
|
457
459
|
hasItems: false,
|
|
460
|
+
description: SDKUI_Localizator.FormulaEditor_DescInstruction_SS_ISNULL
|
|
458
461
|
}];
|
|
459
462
|
break;
|
|
460
463
|
case DBBrands.Oracle:
|
|
@@ -465,24 +468,28 @@ export class FormulaHelper {
|
|
|
465
468
|
icon: FormulaIconTypes.Function,
|
|
466
469
|
expanded: false,
|
|
467
470
|
hasItems: false,
|
|
471
|
+
description: SDKUI_Localizator.FormulaEditor_DescInstruction_ORA_CAST
|
|
468
472
|
}, {
|
|
469
473
|
id: '3_1_2',
|
|
470
474
|
text: 'CAST(NVARCHAR2)',
|
|
471
475
|
icon: FormulaIconTypes.Function,
|
|
472
476
|
expanded: false,
|
|
473
477
|
hasItems: false,
|
|
478
|
+
description: SDKUI_Localizator.FormulaEditor_DescInstruction_ORA_CASTnvarchar2
|
|
474
479
|
}, {
|
|
475
480
|
id: '3_1_3',
|
|
476
481
|
text: 'CAST(NUMERIC)',
|
|
477
482
|
icon: FormulaIconTypes.Function,
|
|
478
483
|
expanded: false,
|
|
479
484
|
hasItems: false,
|
|
485
|
+
description: SDKUI_Localizator.FormulaEditor_DescInstruction_ORA_CASTnumeric
|
|
480
486
|
}, {
|
|
481
487
|
id: '3_1_4',
|
|
482
488
|
text: 'NVL',
|
|
483
489
|
icon: FormulaIconTypes.Function,
|
|
484
490
|
expanded: false,
|
|
485
491
|
hasItems: false,
|
|
492
|
+
description: SDKUI_Localizator.FormulaEditor_DescInstruction_ORA_NVL
|
|
486
493
|
}];
|
|
487
494
|
break;
|
|
488
495
|
}
|
|
@@ -499,72 +506,84 @@ export class FormulaHelper {
|
|
|
499
506
|
icon: FormulaIconTypes.Function,
|
|
500
507
|
expanded: false,
|
|
501
508
|
hasItems: false,
|
|
509
|
+
description: SDKUI_Localizator.FormulaEditor_DescFunction_SS_LEN
|
|
502
510
|
}, {
|
|
503
511
|
id: '3_2_2',
|
|
504
512
|
text: 'LEFT',
|
|
505
513
|
icon: FormulaIconTypes.Function,
|
|
506
514
|
expanded: false,
|
|
507
515
|
hasItems: false,
|
|
516
|
+
description: SDKUI_Localizator.FormulaEditor_DescFunction_SS_LEFT
|
|
508
517
|
}, {
|
|
509
518
|
id: '3_2_3',
|
|
510
519
|
text: 'LOWER',
|
|
511
520
|
icon: FormulaIconTypes.Function,
|
|
512
521
|
expanded: false,
|
|
513
522
|
hasItems: false,
|
|
523
|
+
description: SDKUI_Localizator.FormulaEditor_DescFunction_SS_LOWER
|
|
514
524
|
}, {
|
|
515
525
|
id: '3_2_4',
|
|
516
526
|
text: 'LTRIM',
|
|
517
527
|
icon: FormulaIconTypes.Function,
|
|
518
528
|
expanded: false,
|
|
519
529
|
hasItems: false,
|
|
530
|
+
description: SDKUI_Localizator.FormulaEditor_DescFunction_SS_LTRIM
|
|
520
531
|
}, {
|
|
521
532
|
id: '3_2_5',
|
|
522
533
|
text: 'REPLACE',
|
|
523
534
|
icon: FormulaIconTypes.Function,
|
|
524
535
|
expanded: false,
|
|
525
536
|
hasItems: false,
|
|
537
|
+
description: SDKUI_Localizator.FormulaEditor_DescFunction_SS_REPLACE
|
|
526
538
|
}, {
|
|
527
539
|
id: '3_2_6',
|
|
528
540
|
text: 'REPLICATE',
|
|
529
541
|
icon: FormulaIconTypes.Function,
|
|
530
542
|
expanded: false,
|
|
531
543
|
hasItems: false,
|
|
544
|
+
description: SDKUI_Localizator.FormulaEditor_DescFunction_SS_REPLICATE
|
|
532
545
|
}, {
|
|
533
546
|
id: '3_2_7',
|
|
534
547
|
text: 'RIGHT',
|
|
535
548
|
icon: FormulaIconTypes.Function,
|
|
536
549
|
expanded: false,
|
|
537
550
|
hasItems: false,
|
|
551
|
+
description: SDKUI_Localizator.FormulaEditor_DescFunction_SS_RIGHT
|
|
538
552
|
}, {
|
|
539
553
|
id: '3_2_8',
|
|
540
554
|
text: 'RTRIM',
|
|
541
555
|
icon: FormulaIconTypes.Function,
|
|
542
556
|
expanded: false,
|
|
543
557
|
hasItems: false,
|
|
558
|
+
description: SDKUI_Localizator.FormulaEditor_DescFunction_SS_RTRIM
|
|
544
559
|
}, {
|
|
545
560
|
id: '3_2_9',
|
|
546
561
|
text: 'SPACE',
|
|
547
562
|
icon: FormulaIconTypes.Function,
|
|
548
563
|
expanded: false,
|
|
549
564
|
hasItems: false,
|
|
565
|
+
description: SDKUI_Localizator.FormulaEditor_DescFunction_SS_SPACE
|
|
550
566
|
}, {
|
|
551
567
|
id: '3_2_10',
|
|
552
568
|
text: 'STUFF',
|
|
553
569
|
icon: FormulaIconTypes.Function,
|
|
554
570
|
expanded: false,
|
|
555
571
|
hasItems: false,
|
|
572
|
+
description: SDKUI_Localizator.FormulaEditor_DescFunction_SS_STUFF
|
|
556
573
|
}, {
|
|
557
574
|
id: '3_2_11',
|
|
558
575
|
text: 'SUBSTRING',
|
|
559
576
|
icon: FormulaIconTypes.Function,
|
|
560
577
|
expanded: false,
|
|
561
578
|
hasItems: false,
|
|
579
|
+
description: SDKUI_Localizator.FormulaEditor_DescFunction_SS_SUBSTRING
|
|
562
580
|
}, {
|
|
563
581
|
id: '3_2_12',
|
|
564
582
|
text: 'UPPER',
|
|
565
583
|
icon: FormulaIconTypes.Function,
|
|
566
584
|
expanded: false,
|
|
567
585
|
hasItems: false,
|
|
586
|
+
description: SDKUI_Localizator.FormulaEditor_DescFunction_SS_UPPER
|
|
568
587
|
}];
|
|
569
588
|
break;
|
|
570
589
|
case DBBrands.Oracle:
|
|
@@ -575,36 +594,42 @@ export class FormulaHelper {
|
|
|
575
594
|
icon: FormulaIconTypes.Function,
|
|
576
595
|
expanded: false,
|
|
577
596
|
hasItems: false,
|
|
597
|
+
description: SDKUI_Localizator.FormulaEditor_DescFunction_ORA_LENGTH
|
|
578
598
|
}, {
|
|
579
599
|
id: '3_2_2',
|
|
580
600
|
text: 'LOWER',
|
|
581
601
|
icon: FormulaIconTypes.Function,
|
|
582
602
|
expanded: false,
|
|
583
603
|
hasItems: false,
|
|
604
|
+
description: SDKUI_Localizator.FormulaEditor_DescFunction_ORA_LOWER
|
|
584
605
|
}, {
|
|
585
606
|
id: '3_2_3',
|
|
586
607
|
text: 'TRIM',
|
|
587
608
|
icon: FormulaIconTypes.Function,
|
|
588
609
|
expanded: false,
|
|
589
610
|
hasItems: false,
|
|
611
|
+
description: SDKUI_Localizator.FormulaEditor_DescFunction_ORA_TRIM
|
|
590
612
|
}, {
|
|
591
613
|
id: '3_2_4',
|
|
592
614
|
text: 'REPLACE',
|
|
593
615
|
icon: FormulaIconTypes.Function,
|
|
594
616
|
expanded: false,
|
|
595
617
|
hasItems: false,
|
|
618
|
+
description: SDKUI_Localizator.FormulaEditor_DescFunction_ORA_REPLACE
|
|
596
619
|
}, {
|
|
597
620
|
id: '3_2_5',
|
|
598
621
|
text: 'SUBSTR',
|
|
599
622
|
icon: FormulaIconTypes.Function,
|
|
600
623
|
expanded: false,
|
|
601
624
|
hasItems: false,
|
|
625
|
+
description: SDKUI_Localizator.FormulaEditor_DescFunction_ORA_SUBSTR
|
|
602
626
|
}, {
|
|
603
627
|
id: '3_2_6',
|
|
604
628
|
text: 'UPPER',
|
|
605
629
|
icon: FormulaIconTypes.Function,
|
|
606
630
|
expanded: false,
|
|
607
631
|
hasItems: false,
|
|
632
|
+
description: SDKUI_Localizator.FormulaEditor_DescFunction_ORA_UPPER
|
|
608
633
|
}];
|
|
609
634
|
break;
|
|
610
635
|
}
|
|
@@ -621,18 +646,21 @@ export class FormulaHelper {
|
|
|
621
646
|
icon: FormulaIconTypes.Function,
|
|
622
647
|
expanded: false,
|
|
623
648
|
hasItems: false,
|
|
649
|
+
description: SDKUI_Localizator.FormulaEditor_DescFunction_SS_DATEDIFFyear
|
|
624
650
|
}, {
|
|
625
651
|
id: '3_3_2',
|
|
626
652
|
text: 'DATEDIFF ( day )',
|
|
627
653
|
icon: FormulaIconTypes.Function,
|
|
628
654
|
expanded: false,
|
|
629
655
|
hasItems: false,
|
|
656
|
+
description: SDKUI_Localizator.FormulaEditor_DescFunction_SS_DATEDIFFday
|
|
630
657
|
}, {
|
|
631
658
|
id: '3_3_3',
|
|
632
659
|
text: 'DATEADD',
|
|
633
660
|
icon: FormulaIconTypes.Function,
|
|
634
661
|
expanded: false,
|
|
635
662
|
hasItems: false,
|
|
663
|
+
description: SDKUI_Localizator.FormulaEditor_DescFunction_SS_DATEADD
|
|
636
664
|
}];
|
|
637
665
|
if (formulaTarget == FormulaTargets.DefaultValue || formulaTarget == FormulaTargets.BatchUpdate) {
|
|
638
666
|
items.push({
|
|
@@ -641,24 +669,28 @@ export class FormulaHelper {
|
|
|
641
669
|
icon: FormulaIconTypes.Function,
|
|
642
670
|
expanded: false,
|
|
643
671
|
hasItems: false,
|
|
672
|
+
description: SDKUI_Localizator.FormulaEditor_DescFunction_SS_GETDATE
|
|
644
673
|
}, {
|
|
645
674
|
id: '3_3_5',
|
|
646
675
|
text: 'DAY(GETDATE())',
|
|
647
676
|
icon: FormulaIconTypes.Function,
|
|
648
677
|
expanded: false,
|
|
649
678
|
hasItems: false,
|
|
679
|
+
description: SDKUI_Localizator.FormulaEditor_DescFunction_SS_DAYGETDATE
|
|
650
680
|
}, {
|
|
651
681
|
id: '3_3_6',
|
|
652
682
|
text: 'MONTH(GETDATE())',
|
|
653
683
|
icon: FormulaIconTypes.Function,
|
|
654
684
|
expanded: false,
|
|
655
685
|
hasItems: false,
|
|
686
|
+
description: SDKUI_Localizator.FormulaEditor_DescFunction_SS_MONTHGETDATE
|
|
656
687
|
}, {
|
|
657
688
|
id: '3_3_7',
|
|
658
689
|
text: 'YEAR(GETDATE())',
|
|
659
690
|
icon: FormulaIconTypes.Function,
|
|
660
691
|
expanded: false,
|
|
661
692
|
hasItems: false,
|
|
693
|
+
description: SDKUI_Localizator.FormulaEditor_DescFunction_SS_YEARGETDATE
|
|
662
694
|
});
|
|
663
695
|
}
|
|
664
696
|
break;
|
|
@@ -670,18 +702,21 @@ export class FormulaHelper {
|
|
|
670
702
|
icon: FormulaIconTypes.Function,
|
|
671
703
|
expanded: false,
|
|
672
704
|
hasItems: false,
|
|
705
|
+
description: SDKUI_Localizator.FormulaEditor_DescFunction_ORA_TO_DATE
|
|
673
706
|
}, {
|
|
674
707
|
id: '3_3_2',
|
|
675
708
|
text: 'LAST_DAY',
|
|
676
709
|
icon: FormulaIconTypes.Function,
|
|
677
710
|
expanded: false,
|
|
678
711
|
hasItems: false,
|
|
712
|
+
description: SDKUI_Localizator.FormulaEditor_DescFunction_ORA_LAST_DAY
|
|
679
713
|
}, {
|
|
680
714
|
id: '3_3_3',
|
|
681
715
|
text: 'ADD_MONTHS',
|
|
682
716
|
icon: FormulaIconTypes.Function,
|
|
683
717
|
expanded: false,
|
|
684
718
|
hasItems: false,
|
|
719
|
+
description: SDKUI_Localizator.FormulaEditor_DescFunction_ORA_ADD_MONTHS
|
|
685
720
|
}];
|
|
686
721
|
if (formulaTarget == FormulaTargets.DefaultValue || formulaTarget == FormulaTargets.BatchUpdate) {
|
|
687
722
|
items.push({
|
|
@@ -690,24 +725,28 @@ export class FormulaHelper {
|
|
|
690
725
|
icon: FormulaIconTypes.Function,
|
|
691
726
|
expanded: false,
|
|
692
727
|
hasItems: false,
|
|
728
|
+
description: SDKUI_Localizator.FormulaEditor_DescFunction_ORA_SYSDATE
|
|
693
729
|
}, {
|
|
694
730
|
id: '3_3_5',
|
|
695
731
|
text: 'TO_CHAR(SYSDATE, "DD")',
|
|
696
732
|
icon: FormulaIconTypes.Function,
|
|
697
733
|
expanded: false,
|
|
698
734
|
hasItems: false,
|
|
735
|
+
description: SDKUI_Localizator.FormulaEditor_DescFunction_ORA_TOCHARDATETIME
|
|
699
736
|
}, {
|
|
700
737
|
id: '3_3_6',
|
|
701
738
|
text: 'TO_CHAR(SYSDATE, "MM")',
|
|
702
739
|
icon: FormulaIconTypes.Function,
|
|
703
740
|
expanded: false,
|
|
704
741
|
hasItems: false,
|
|
742
|
+
description: SDKUI_Localizator.FormulaEditor_DescFunction_ORA_TOCHARDATETIME
|
|
705
743
|
}, {
|
|
706
744
|
id: '3_3_7',
|
|
707
745
|
text: 'TO_CHAR(SYSDATE, "YYYY")',
|
|
708
746
|
icon: FormulaIconTypes.Function,
|
|
709
747
|
expanded: false,
|
|
710
748
|
hasItems: false,
|
|
749
|
+
description: SDKUI_Localizator.FormulaEditor_DescFunction_ORA_TOCHARDATETIME
|
|
711
750
|
});
|
|
712
751
|
}
|
|
713
752
|
break;
|
|
@@ -721,19 +760,34 @@ export class FormulaHelper {
|
|
|
721
760
|
icon: FormulaIconTypes.Function,
|
|
722
761
|
expanded: false,
|
|
723
762
|
hasItems: false,
|
|
763
|
+
description: SDKUI_Localizator.FormulaEditor_DescFunction_TM_GetViewLink_WithoutLogin
|
|
724
764
|
}, {
|
|
725
765
|
id: '3_4_2',
|
|
726
766
|
text: `TM_GetViewLink (${SDKUI_Localizator.FormulaEditor_Function_TM_GetViewLink_WithLogin})`,
|
|
727
767
|
icon: FormulaIconTypes.Function,
|
|
728
768
|
expanded: false,
|
|
729
769
|
hasItems: false,
|
|
770
|
+
description: SDKUI_Localizator.FormulaEditor_DescFunction_TM_GetViewLink_WithLogin
|
|
730
771
|
}, {
|
|
731
772
|
id: '3_4_3',
|
|
732
773
|
text: `TM_GetViewLink (${SDKUI_Localizator.FormulaEditor_Function_TM_GetViewLink_WithDate})`,
|
|
733
774
|
icon: FormulaIconTypes.Function,
|
|
734
775
|
expanded: false,
|
|
735
776
|
hasItems: false,
|
|
777
|
+
description: SDKUI_Localizator.FormulaEditor_DescFunction_TM_GetViewLink_WithDate
|
|
736
778
|
}];
|
|
737
779
|
return items;
|
|
738
780
|
}
|
|
739
781
|
}
|
|
782
|
+
FormulaHelper.translateDescInFormula = (text, returnType) => {
|
|
783
|
+
switch (text) {
|
|
784
|
+
case `TM_GetViewLink (${SDKUI_Localizator.FormulaEditor_Function_TM_GetViewLink_WithoutLogin})`:
|
|
785
|
+
return `[dbo].[TM_GetViewLink](NULL, NULL, NULL, 0, {@TID}, {@DID}, 1, NULL, 0)`;
|
|
786
|
+
case `TM_GetViewLink (${SDKUI_Localizator.FormulaEditor_Function_TM_GetViewLink_WithLogin})`:
|
|
787
|
+
return `[dbo].[TM_GetViewLink](NULL, 'ASKLOGIN', NULL, 0, {@TID}, {@DID}, 1, NULL, 0)`;
|
|
788
|
+
case `TM_GetViewLink (${SDKUI_Localizator.FormulaEditor_Function_TM_GetViewLink_WithDate})`:
|
|
789
|
+
return `[dbo].[TM_GetViewLink](NULL, NULL, NULL, 0, {@TID}, {@DID}, 1, CONVERT(VARCHAR, {@CreationTime}+30, 126), 0)`;
|
|
790
|
+
break;
|
|
791
|
+
}
|
|
792
|
+
return returnType ?? text;
|
|
793
|
+
};
|
|
@@ -25,9 +25,7 @@ export declare const TMNothingToShow: ({ text, secondText, fileExt, icon }: {
|
|
|
25
25
|
fileExt?: string;
|
|
26
26
|
icon?: any;
|
|
27
27
|
}) => import("react/jsx-runtime").JSX.Element;
|
|
28
|
-
export declare const StyledHeaderIcon: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components").
|
|
28
|
+
export declare const StyledHeaderIcon: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components/dist/types").Substitute<React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, {
|
|
29
29
|
$color: string;
|
|
30
|
-
}
|
|
31
|
-
|
|
32
|
-
}, never>>> & string;
|
|
33
|
-
export declare const StyledPanelStatusContainer: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components").FastOmit<React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, never> & Partial<Pick<React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, never>>> & string;
|
|
30
|
+
}>> & string;
|
|
31
|
+
export declare const StyledPanelStatusContainer: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components").FastOmit<React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, never>> & string;
|
|
@@ -25,6 +25,6 @@ interface ITMSearchQueryPanelProps {
|
|
|
25
25
|
declare const TMSearchQueryPanel: React.FunctionComponent<ITMSearchQueryPanelProps>;
|
|
26
26
|
export default TMSearchQueryPanel;
|
|
27
27
|
export declare const refreshLastSearch: (qd: QueryDescriptor | undefined) => Promise<SearchResultDescriptor[] | undefined>;
|
|
28
|
-
export declare const StyledToppyTextContainer: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components").FastOmit<React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, never
|
|
29
|
-
export declare const StyledToppyText: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components").FastOmit<React.DetailedHTMLProps<React.HTMLAttributes<HTMLParagraphElement>, HTMLParagraphElement>, never
|
|
30
|
-
export declare const StyledToppyImage: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components").FastOmit<React.DetailedHTMLProps<React.ImgHTMLAttributes<HTMLImageElement>, HTMLImageElement>, never
|
|
28
|
+
export declare const StyledToppyTextContainer: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components").FastOmit<React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, never>> & string;
|
|
29
|
+
export declare const StyledToppyText: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components").FastOmit<React.DetailedHTMLProps<React.HTMLAttributes<HTMLParagraphElement>, HTMLParagraphElement>, never>> & string;
|
|
30
|
+
export declare const StyledToppyImage: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components").FastOmit<React.DetailedHTMLProps<React.ImgHTMLAttributes<HTMLImageElement>, HTMLImageElement>, never>> & string;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { QueryDescriptor } from '@topconsultnpm/sdk-ts';
|
|
3
3
|
import { WorkItemActor } from './RecipientList';
|
|
4
|
-
export declare const RecipientsContainer: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components").FastOmit<React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, never
|
|
4
|
+
export declare const RecipientsContainer: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components").FastOmit<React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, never>> & string;
|
|
5
5
|
export declare const tosToActors: (tosString: string) => {
|
|
6
6
|
andRecipients: WorkItemActor[];
|
|
7
7
|
orRecipients: WorkItemActor[];
|
|
@@ -11,4 +11,4 @@ interface ChangePasswordInputsProps {
|
|
|
11
11
|
}
|
|
12
12
|
declare const ChangePasswordInputs: React.FC<ChangePasswordInputsProps>;
|
|
13
13
|
export default ChangePasswordInputs;
|
|
14
|
-
export declare const Divider: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components").FastOmit<React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, never
|
|
14
|
+
export declare const Divider: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components").FastOmit<React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, never>> & string;
|
|
@@ -1,12 +1,9 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { TMPanelDefinition } from './types';
|
|
3
|
-
export declare const StyledToolbarButton: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components").
|
|
3
|
+
export declare const StyledToolbarButton: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components/dist/types").Substitute<React.DetailedHTMLProps<React.ButtonHTMLAttributes<HTMLButtonElement>, HTMLButtonElement>, {
|
|
4
4
|
$isActive?: boolean;
|
|
5
5
|
$isDisabled?: boolean;
|
|
6
|
-
}
|
|
7
|
-
$isActive?: boolean;
|
|
8
|
-
$isDisabled?: boolean;
|
|
9
|
-
}, never>>> & string;
|
|
6
|
+
}>> & string;
|
|
10
7
|
interface TMPanelManagerToolbarProps {
|
|
11
8
|
panels: Array<TMPanelDefinition>;
|
|
12
9
|
}
|
|
@@ -188,8 +188,10 @@ const TMPage = ({ id, objClass = ObjectClasses.None, listDisabled = false, lastR
|
|
|
188
188
|
onStatusChanged: (isModified) => { setSelectionListDisabled((formMode == FormModes.Create || formMode == FormModes.Duplicate) ? true : isModified); },
|
|
189
189
|
onSaved: async (newItem) => {
|
|
190
190
|
try {
|
|
191
|
+
console.log('Saved item', newItem);
|
|
191
192
|
const currentItems = items.map((job) => job);
|
|
192
193
|
const index = currentItems.findIndex((o) => o.id == newItem.id);
|
|
194
|
+
console.log('index', index);
|
|
193
195
|
if (index >= 0)
|
|
194
196
|
currentItems[index] = newItem;
|
|
195
197
|
else
|
|
@@ -221,6 +223,6 @@ const TMPage = ({ id, objClass = ObjectClasses.None, listDisabled = false, lastR
|
|
|
221
223
|
_jsx(TMLayoutItem, { children: selectedItems.length == 1 || formMode == FormModes.Create || formMode == FormModes.Duplicate ?
|
|
222
224
|
_jsx(TMToolbarCard, { onBack: deviceType === DeviceType.MOBILE ? () => setShowList(true) : undefined, title: calcSaveFormTitle(objName, formMode, selectedItems.length == 0 ? -1 : selectedItems[0].id, detailTitlePathKeys), children: getDetailFormWithProps() })
|
|
223
225
|
:
|
|
224
|
-
_jsx(MultipleSelectionManager, {}) })] }) }));
|
|
226
|
+
selectedItems.length > 0 ? _jsx(MultipleSelectionManager, {}) : _jsx(_Fragment, {}) })] }) }));
|
|
225
227
|
};
|
|
226
228
|
export default TMPage;
|
|
@@ -2,18 +2,14 @@ import React from 'react';
|
|
|
2
2
|
import { QueryDescriptor, ValidationItem } from '@topconsultnpm/sdk-ts';
|
|
3
3
|
import { ITMApplyFormProps, FormModes } from '../../ts';
|
|
4
4
|
import type { TMContextMenuItemProps } from '../NewComponents/ContextMenu/types';
|
|
5
|
-
export declare const StyledRowItem: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components").FastOmit<React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, never
|
|
6
|
-
export declare const StyledItemWrapper: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components").
|
|
5
|
+
export declare const StyledRowItem: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components").FastOmit<React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, never>> & string;
|
|
6
|
+
export declare const StyledItemWrapper: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components/dist/types").Substitute<React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, {
|
|
7
7
|
$borderRadius?: string;
|
|
8
|
-
}
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
export declare const StyledAccordionItemContainer: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components").FastOmit<React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, never> & Partial<Pick<React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, never>>> & string;
|
|
12
|
-
export declare const StyledAccordionItemContent: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components").FastOmit<import("styled-components").FastOmit<React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "$disabled"> & {
|
|
13
|
-
$disabled?: boolean;
|
|
14
|
-
}, never> & Partial<Pick<import("styled-components").FastOmit<React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "$disabled"> & {
|
|
8
|
+
}>> & string;
|
|
9
|
+
export declare const StyledAccordionItemContainer: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components").FastOmit<React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, never>> & string;
|
|
10
|
+
export declare const StyledAccordionItemContent: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components/dist/types").Substitute<React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, {
|
|
15
11
|
$disabled?: boolean;
|
|
16
|
-
}
|
|
12
|
+
}>> & string;
|
|
17
13
|
export declare const colorValue = "rgba(224,224,224,.5)";
|
|
18
14
|
export declare const colorBrackets = "rgba(209,52,56,.3)";
|
|
19
15
|
export declare const colorOperator = "rgba(16,124,16,.3)";
|
|
@@ -1,9 +1,7 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
export declare const StyledCommandsPanel: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components").
|
|
2
|
+
export declare const StyledCommandsPanel: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components/dist/types").Substitute<React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, {
|
|
3
3
|
$isMobile?: boolean;
|
|
4
|
-
}
|
|
5
|
-
$isMobile?: boolean;
|
|
6
|
-
}, never>>> & string;
|
|
4
|
+
}>> & string;
|
|
7
5
|
export interface TMCommandItemProps {
|
|
8
6
|
icon: React.ReactNode;
|
|
9
7
|
selected?: boolean;
|