1
0
mirror of https://github.com/zerobig/vscode-1c-metadata-viewer.git synced 2025-07-17 01:32:19 +02:00
This commit is contained in:
Ilya Bushin
2024-03-18 14:30:15 +03:00
parent 21a74af693
commit 3611c3d2f9
7 changed files with 36 additions and 4 deletions

View File

@ -0,0 +1,4 @@
<svg xmlns="http://www.w3.org/2000/svg" height="48" width="48" viewBox="0 -960 960 960">
<style type="text/css">.icon-canvas-transparent{opacity:0;fill:#F6F6F6;} .icon-vs-out{opacity:0;fill:#F6F6F6;} .icon-vs-bg{fill:#656565;} .icon-vs-fg{fill:#F0EFF1;}</style>
<path class="icon-vs-fg" d="M120-80v-60h100v-30h-60v-60h60v-30H120v-60h160v90l-30 30 30 30v90H120Zm0-280v-150h100v-30H120v-60h160v150H180v30h100v60H120Zm60-280v-180h-60v-60h120v240h-60Zm189 431v-60h471v60H369Zm0-243v-60h471v60H369Zm0-243v-60h471v60H369Z"/>
</svg>

After

Width:  |  Height:  |  Size: 530 B

View File

@ -0,0 +1,4 @@
<svg xmlns="http://www.w3.org/2000/svg" width="48" height="48" viewBox="0 -960 960 960">
<style type="text/css">.icon-canvas-transparent{opacity:0;fill:#F6F6F6;} .icon-vs-out{opacity:0;fill:#F6F6F6;} .icon-vs-bg{fill:#656565;} .icon-vs-fg{fill:#F0EFF1;}</style>
<path class="icon-vs-fg" d="M120-280v-60h560v60H120Zm80-170v-60h560v60H200Zm80-170v-60h560v60H280Z"/>
</svg>

After

Width:  |  Height:  |  Size: 375 B

View File

@ -0,0 +1,4 @@
<svg xmlns="http://www.w3.org/2000/svg" height="48" width="48" viewBox="0 -960 960 960">
<style>.icon-canvas-transparent{opacity:0;fill:#2d2d30}.icon-vs-out{fill:#2d2d30}.icon-vs-bg{fill:#c5c5c5}.icon-vs-fg{fill:#2b282e}</style>
<path class="icon-vs-fg" d="M120-80v-60h100v-30h-60v-60h60v-30H120v-60h160v90l-30 30 30 30v90H120Zm0-280v-150h100v-30H120v-60h160v150H180v30h100v60H120Zm60-280v-180h-60v-60h120v240h-60Zm189 431v-60h471v60H369Zm0-243v-60h471v60H369Zm0-243v-60h471v60H369Z"/>
</svg>

After

Width:  |  Height:  |  Size: 497 B

View File

@ -0,0 +1,4 @@
<svg xmlns="http://www.w3.org/2000/svg" width="48" height="48" viewBox="0 -960 960 960">
<style>.icon-canvas-transparent{opacity:0;fill:#2d2d30}.icon-vs-out{fill:#2d2d30}.icon-vs-bg{fill:#c5c5c5}.icon-vs-fg{fill:#2b282e}</style>
<path class="icon-vs-fg" d="M120-280v-60h560v60H120Zm80-170v-60h560v60H200Zm80-170v-60h560v60H280Z"/>
</svg>

After

Width:  |  Height:  |  Size: 342 B

View File

@ -205,8 +205,10 @@ export class Edt {
children: this.fillObjectItemsByMetadata(treeItemIdSlash, 'Documents', elementObject),
configType: 'edt'
});
case 'DocumentNumerator':
return GetTreeItem(treeItemId, elementName ?? objName, { icon: 'documentNumerator', configType: 'edt' });
case 'Sequence':
return GetTreeItem(treeItemId, elementName ?? objName, { configType: 'edt' });
return GetTreeItem(treeItemId, elementName ?? objName, { icon: 'sequence', configType: 'edt' });
case 'DocumentJournal':
return GetTreeItem(treeItemId, elementName ?? objName, {
icon: 'documentJournal', context: 'manager', path: treeItemPath,

View File

@ -8,7 +8,7 @@ type IconType = 'common' | 'subsystem' | 'commonModule' | 'sessionParameter' | '
'template' | 'dimension' | 'resource' | 'column' | 'task' | 'businessProcess' | 'externalDataSource' |
'accountingRegister' | 'calculationRegister' | 'filterCriteria' | 'eventSubscription' | 'scheduledJob' |
'accountingFlag' | 'extDimensionAccountingFlag' | 'http' | 'ws' | 'wsLink' | 'operation' | 'parameter' |
'urlTemplate' | 'picture' | 'style';
'urlTemplate' | 'picture' | 'style' | 'sequence' | 'documentNumerator';
interface TreeItemParams {
icon?: IconType,

View File

@ -36,6 +36,8 @@ interface MetadataObjects {
constant: TreeItem[],
catalog: TreeItem[],
document: TreeItem[],
documentNumerator: TreeItem[],
sequence: TreeItem[],
documentJournal: TreeItem[],
enum: TreeItem[],
report: TreeItem[],
@ -530,6 +532,14 @@ function CreateTreeElements(element: TreeItem, metadataFile: MetadataFile) {
icon: 'document', context: 'object_and_manager', path: treeItemPath,
children: FillObjectItemsByMetadata(treeItemIdSlash, current, attributeReduceResult) }));
break;
case current.$_name.startsWith('DocumentNumerator.'):
previous.documentNumerator.push(GetTreeItem( treeItemId, current.$_name, { icon: 'documentNumerator' }));
break;
case current.$_name.startsWith('Sequence.'):
previous.sequence.push(GetTreeItem( treeItemId, current.$_name, { icon: 'sequence' }));
break;
case current.$_name.startsWith('DocumentJournal.'):
previous.documentJournal.push(GetTreeItem(
@ -650,6 +660,8 @@ function CreateTreeElements(element: TreeItem, metadataFile: MetadataFile) {
constant: [],
catalog: [],
document: [],
documentNumerator: [],
sequence: [],
documentJournal: [],
enum: [],
report: [],
@ -686,6 +698,8 @@ function CreateTreeElements(element: TreeItem, metadataFile: MetadataFile) {
const documents = SearchTree(element, element.id + '/documents');
documents!.children = [ ...documents!.children ?? [], ...reduceResult.document];
SearchTree(element, element.id + '/documentNumerators')!.children = reduceResult.documentNumerator;
SearchTree(element, element.id + '/sequences')!.children = reduceResult.sequence;
SearchTree(element, element.id + '/documentJournals')!.children = reduceResult.documentJournal;
SearchTree(element, element.id + '/enums')!.children = reduceResult.enum;
SearchTree(element, element.id + '/reports')!.children = reduceResult.report;
@ -960,8 +974,8 @@ function CreateMetadata(idPrefix: string) {
GetTreeItem(idPrefix + '/constants', 'Константы', { icon: 'constant', children: [] }),
GetTreeItem(idPrefix + '/catalogs', 'Справочники', { icon: 'catalog', children: [] }),
GetTreeItem(idPrefix + '/documents', 'Документы', { icon: 'document', children: [
GetTreeItem(idPrefix + '/documentNumerators', 'Нумераторы', { children: [] }),
GetTreeItem(idPrefix + '/sequences', 'Последовательности', { children: [] }),
GetTreeItem(idPrefix + '/documentNumerators', 'Нумераторы', { icon: 'documentNumerator', children: [] }),
GetTreeItem(idPrefix + '/sequences', 'Последовательности', { icon: 'sequence', children: [] }),
]}),
GetTreeItem(idPrefix + '/documentJournals', 'Журналы документов', { icon: 'documentJournal', children: [] }),
GetTreeItem(idPrefix + '/enums', 'Перечисления', { icon: 'enum', children: [] }),