From a7f691731003efa12b32e6b9b03d10ea8d072aaa Mon Sep 17 00:00:00 2001 From: Ihar Date: Thu, 24 Oct 2024 23:14:26 +0500 Subject: [PATCH 01/48] feat: moving from MatTabsModule to TabViewModule[3141] --- .../compare-module.component.ts | 78 +-- .../src/app/modules/common/material.module.ts | 27 +- .../container-block.component.html | 54 ++- .../container-block.component.ts | 3 + .../policy-search.component.html | 57 ++- .../user-management-detail.component.html | 451 +++++++++++++----- 6 files changed, 482 insertions(+), 188 deletions(-) diff --git a/frontend/src/app/modules/analytics/compare-module/compare-module.component.ts b/frontend/src/app/modules/analytics/compare-module/compare-module.component.ts index 0b7613f36e..88d149224d 100644 --- a/frontend/src/app/modules/analytics/compare-module/compare-module.component.ts +++ b/frontend/src/app/modules/analytics/compare-module/compare-module.component.ts @@ -32,45 +32,45 @@ export class CompareModuleComponent implements OnInit { columns: any[] = []; icons: any = { - "interfaceContainerBlock": "tab", - "interfaceStepBlock": "vertical_split", - "policyRolesBlock": "manage_accounts", - "groupManagerBlock": "groups", - "informationBlock": "info", - "interfaceActionBlock": "flash_on", - "buttonBlock": "radio_button_checked", - "switchBlock": "rule", - "interfaceDocumentsSourceBlock": "table_view", - "requestVcDocumentBlock": "dynamic_form", - "multiSignBlock": "done_all", - "sendToGuardianBlock": "send", - "externalDataBlock": "cloud", - "aggregateDocumentBlock": "calendar_month", - "reassigningBlock": "content_copy", - "revokeBlock": "restart_alt", - "revocationBlock": "restart_alt", - "setRelationshipsBlock": "settings", - "splitBlock": "content_cut", - "filtersAddon": "filter_alt", - "documentsSourceAddon": "source", - "paginationAddon": "pages", - "timerBlock": "schedule", - "documentValidatorBlock": "task_alt", - "createTokenBlock": "token", - "mintDocumentBlock": "paid", - "retirementDocumentBlock": "delete", - "tokenActionBlock": "generating_tokens", - "tokenConfirmationBlock": "key", - "impactAddon": "receipt", - "calculateContainerBlock": "bar_chart", - "customLogicBlock": "bar_chart", - "calculateMathAddon": "calculate", - "calculateMathVariables": "123", - "reportBlock": "addchart", - "reportItemBlock": "list_alt", - "messagesReportBlock": "addchart", - "externalTopicBlock": "cloud", - "notificationBlock": "notifications", + 'interfaceContainerBlock': 'tab', + 'interfaceStepBlock': 'vertical_split', + 'policyRolesBlock': 'manage_accounts', + 'groupManagerBlock': 'groups', + 'informationBlock': 'info', + 'interfaceActionBlock': 'flash_on', + 'buttonBlock': 'radio_button_checked', + 'switchBlock': 'rule', + 'interfaceDocumentsSourceBlock': 'table_view', + 'requestVcDocumentBlock': 'dynamic_form', + 'multiSignBlock': 'done_all', + 'sendToGuardianBlock': 'send', + 'externalDataBlock': 'cloud', + 'aggregateDocumentBlock': 'calendar_month', + 'reassigningBlock': 'content_copy', + 'revokeBlock': 'restart_alt', + 'revocationBlock': 'restart_alt', + 'setRelationshipsBlock': 'settings', + 'splitBlock': 'content_cut', + 'filtersAddon': 'filter_alt', + 'documentsSourceAddon': 'source', + 'paginationAddon': 'pages', + 'timerBlock': 'schedule', + 'documentValidatorBlock': 'task_alt', + 'createTokenBlock': 'token', + 'mintDocumentBlock': 'paid', + 'retirementDocumentBlock': 'delete', + 'tokenActionBlock': 'generating_tokens', + 'tokenConfirmationBlock': 'key', + 'impactAddon': 'receipt', + 'calculateContainerBlock': 'bar_chart', + 'customLogicBlock': 'bar_chart', + 'calculateMathAddon': 'calculate', + 'calculateMathVariables': '123', + 'reportBlock': 'addchart', + 'reportItemBlock': 'list_alt', + 'messagesReportBlock': 'addchart', + 'externalTopicBlock': 'cloud', + 'notificationBlock': 'notifications', } type1 = true; diff --git a/frontend/src/app/modules/common/material.module.ts b/frontend/src/app/modules/common/material.module.ts index ab7cfc6e49..fae3e92aab 100644 --- a/frontend/src/app/modules/common/material.module.ts +++ b/frontend/src/app/modules/common/material.module.ts @@ -1,8 +1,8 @@ import { NgModule } from '@angular/core'; import { CommonModule } from '@angular/common'; -import { MatLegacyTabsModule as MatTabsModule } from '@angular/material/legacy-tabs'; +// import { MatLegacyTabsModule as MatTabsModule } from '@angular/material/legacy-tabs'; import { MatStepperModule } from '@angular/material/stepper'; -import { MatExpansionModule } from '@angular/material/expansion'; +// import { MatExpansionModule } from '@angular/material/expansion'; import { MatIconModule } from '@angular/material/icon'; import { ReactiveFormsModule } from '@angular/forms'; import { MatLegacyInputModule as MatInputModule } from '@angular/material/legacy-input'; @@ -18,7 +18,7 @@ import { MatLegacyProgressBarModule as MatProgressBarModule } from '@angular/mat import { MatLegacySelectModule as MatSelectModule } from '@angular/material/legacy-select'; import { MatLegacyCheckboxModule as MatCheckboxModule } from '@angular/material/legacy-checkbox'; import { MatTreeModule } from '@angular/material/tree'; -import { MatDatepickerModule } from "@angular/material/datepicker"; +import { MatDatepickerModule } from '@angular/material/datepicker'; import { MatLegacyRadioModule as MatRadioModule } from '@angular/material/legacy-radio'; import { MatNativeDateModule } from '@angular/material/core'; import { MatLegacyTooltipModule as MatTooltipModule } from '@angular/material/legacy-tooltip'; @@ -33,14 +33,22 @@ import { DragDropModule } from '@angular/cdk/drag-drop'; import { CdkTableModule } from '@angular/cdk/table'; import { MatLegacySliderModule as MatSliderModule } from '@angular/material/legacy-slider'; import { MatBadgeModule } from '@angular/material/badge'; +import { TabViewModule } from 'primeng/tabview'; +import { AccordionModule } from 'primeng/accordion'; + @NgModule({ declarations: [], imports: [ CommonModule, - MatTabsModule, + // MatTabsModule, + TabViewModule, + MatStepperModule, - MatExpansionModule, + + // MatExpansionModule, + AccordionModule, + MatIconModule, ReactiveFormsModule, MatInputModule, @@ -69,9 +77,14 @@ import { MatBadgeModule } from '@angular/material/badge'; MatBadgeModule ], exports: [ - MatTabsModule, + // MatTabsModule, + TabViewModule, + MatStepperModule, - MatExpansionModule, + + // MatExpansionModule, + AccordionModule, + MatIconModule, ReactiveFormsModule, MatInputModule, diff --git a/frontend/src/app/modules/policy-engine/policy-viewer/blocks/container-block/container-block.component.html b/frontend/src/app/modules/policy-engine/policy-viewer/blocks/container-block/container-block.component.html index 0198d76050..012bc36782 100644 --- a/frontend/src/app/modules/policy-engine/policy-viewer/blocks/container-block/container-block.component.html +++ b/frontend/src/app/modules/policy-engine/policy-viewer/blocks/container-block/container-block.component.html @@ -1,18 +1,38 @@ -
- -
- -
-
+ + + + + + - -
- - - -
-
- -
-
-
+ + + + + + + + + + + + +
+ +
+ +
+
+ + +
+ + + + +
+
+ +
+
+
diff --git a/frontend/src/app/modules/policy-engine/policy-viewer/blocks/container-block/container-block.component.ts b/frontend/src/app/modules/policy-engine/policy-viewer/blocks/container-block/container-block.component.ts index 32320eef3f..b7a9c719d6 100644 --- a/frontend/src/app/modules/policy-engine/policy-viewer/blocks/container-block/container-block.component.ts +++ b/frontend/src/app/modules/policy-engine/policy-viewer/blocks/container-block/container-block.component.ts @@ -143,6 +143,9 @@ export class ContainerBlockComponent implements OnInit, OnDestroy { } onBlockChange(event: any) { + if(typeof event === 'object') { + event = event.index + } this.selectedIndex = event; this.activeBlock = this.blocks[this.selectedIndex]; this.activeBlockId = this.activeBlock ? this.activeBlock.id : null; diff --git a/frontend/src/app/views/policy-search/policy-search.component.html b/frontend/src/app/views/policy-search/policy-search.component.html index 58aabf315b..2030946615 100644 --- a/frontend/src/app/views/policy-search/policy-search.component.html +++ b/frontend/src/app/views/policy-search/policy-search.component.html @@ -1,21 +1,60 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
diff --git a/frontend/src/app/views/user-management-detail/user-management-detail.component.html b/frontend/src/app/views/user-management-detail/user-management-detail.component.html index 06274129fd..781c004d72 100644 --- a/frontend/src/app/views/user-management-detail/user-management-detail.component.html +++ b/frontend/src/app/views/user-management-detail/user-management-detail.component.html @@ -1,55 +1,269 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
-
+ pButton + type="button"> +
{{username}}
- - + +
Selected Roles
-
+
{{group.roleName}}
- + +
+
- + @@ -58,10 +272,11 @@
+
Preview
- +
@@ -70,50 +285,57 @@
ACTIONS
- -
{{action}}
+ +
+ {{action}} +
- -
{{action}}
+ +
+ {{action}} +
+
{{entity.name}}
- -
- + +
+ +
- -
- + + +
+ +
- -
- + + +
+ +
@@ -124,40 +346,38 @@
- - + + +
- +
- Status - - {{ statusFilterValue }} - + Status + {{ statusFilterValue }}
- +
@@ -165,49 +385,48 @@
+ - - - - - + + + + + - - - - - - - - + + + + + + +
NAMEDescriptionStatusVersion - Assigned to This User - + NAMEDescriptionStatusVersion + +
{{ row.name }}{{ row.description }} -
- {{ getLabelStatus(row.status, !!row.discontinuedDate) }} -
-
{{ row.version }} - -
{{ row.name }}{{ row.description }} +
+ {{ getLabelStatus(row.status, !!row.discontinuedDate) }} +
+
{{ row.version }} + + +
-
- - - + +
- From c7d1f0d7826dd8f9c4d0be16b88d7d3f4a4badb4 Mon Sep 17 00:00:00 2001 From: Ihar Date: Tue, 29 Oct 2024 16:37:22 +0500 Subject: [PATCH 02/48] feat: use AccordionModule instead MatExpansionModule[3141] --- .../compare-document.component.html | 407 +++++--- .../compare-module.component.css | 85 +- .../compare-module.component.html | 525 +++++++--- .../compare-policy.component.html | 563 +++++++--- .../compare-policy.component.scss | 51 +- .../compare-record.component.html | 396 ++++++-- .../compare-schema.component.css | 79 +- .../compare-schema.component.html | 312 ++++-- .../compare-tool/compare-tool.component.html | 959 +++++++++++------- .../multi-compare-policy.component.html | 844 ++++++++++----- .../src/app/modules/common/material.module.ts | 5 +- .../cron-config-dialog.component.html | 37 +- 12 files changed, 2938 insertions(+), 1325 deletions(-) diff --git a/frontend/src/app/modules/analytics/compare-document/compare-document.component.html b/frontend/src/app/modules/analytics/compare-document/compare-document.component.html index 672fe23d86..340abbf13a 100644 --- a/frontend/src/app/modules/analytics/compare-document/compare-document.component.html +++ b/frontend/src/app/modules/analytics/compare-document/compare-document.component.html @@ -2,199 +2,276 @@
- {{item.name}} + {{ item.name }} - {{item.rate}} + {{ item.rate }}
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
- - - - -
Description
-
-
+ +
+ [attr.open]="true">
-
+
- - - - -
{{ comparationLabels.documentsLabel }}
-
+ +
-
-
+
+
-
- {{ comparationLabels.equalFullLabel }} -
+
{{ comparationLabels.equalFullLabel }}
-
+
-
- {{ comparationLabels.equalNotFullLabel }} -
+
{{ comparationLabels.equalNotFullLabel }}
-
+
-
- {{ comparationLabels.sameTypeLabel }} -
+
{{ comparationLabels.sameTypeLabel }}
-
+
-
- {{ comparationLabels.differentLabel }} -
+
{{ comparationLabels.differentLabel }}
-
- -
- -
{{row.number}}
-
- remove - add +
+
+
{{ row.number }}
+
+ +
-
+
-
- {{treeItemContext.data.docIndex}} -
+
{{ treeItemContext.data.docIndex }}
- {{treeItemContext.data.docIcon}} +
-
{{treeItemContext.data.docName}}
-
-
- -
-
- unfold_more - unfold_less +
{{ treeItemContext.data.docName }}
- - - -
- -
-
-
-
-
-
- -
-
- - - - {{ column.label }} - - - - {{ row.data[column.name] }} - - - - - -
-
- - + +
+ +
ID
-
{{data.id}}
+
{{ data.id }}
Type
-
{{data.type}}
+
{{ data.type }}
Owner
-
{{data.owner}}
+
{{ data.owner }}
Policy
-
{{data.policy}}
+
{{ data.policy }}
@@ -202,39 +279,39 @@
-
Options Rate:
-
{{data.optionsRate}}
+
Options Rate:
+
{{ data.optionsRate }}
-
Document Rate:
-
{{data.documentRate}}
+
Document Rate:
+
{{ data.documentRate }}
-
ID:
-
{{data.id}}
+
ID:
+
{{ data.id }}
-
Message:
-
{{data.messageId}}
+
Message:
+
{{ data.messageId }}
-
Type:
-
{{data.type}}
+
Type:
+
{{ data.type }}
-
Schema:
-
{{data.schema}}
+
Schema:
+
{{ data.schema }}
-
Owner:
-
{{data.owner}}
+
Owner:
+
{{ data.owner }}
@@ -249,22 +326,22 @@
+ [attr.index]="data.index" + [attr.system]="field.system">
- {{field.label}}: + [style.padding-left.px]="field.offset" + [title]="field.name"> + {{ field.label }}:
search
- {{field.value}} + {{ field.value }}
@@ -274,21 +351,21 @@
-
Attributes:
+
Attributes:
+ [attr.index]="data.index">
- {{attribute.label}}: + [style.padding-left.px]="attribute.offset" + [title]="attribute.name"> + {{ attribute.label }}:
- {{attribute.value}} + {{ attribute.value }}
diff --git a/frontend/src/app/modules/analytics/compare-module/compare-module.component.css b/frontend/src/app/modules/analytics/compare-module/compare-module.component.css index bbbb9ecabf..4848d2bd00 100644 --- a/frontend/src/app/modules/analytics/compare-module/compare-module.component.css +++ b/frontend/src/app/modules/analytics/compare-module/compare-module.component.css @@ -148,24 +148,24 @@ color: rgb(0 0 0 / 10%) !important; } -.compare-btn { - width: 25px; - height: 25px; - border-radius: 6px; - background: rgb(252 252 252); - border: 1px solid rgb(220 220 220); - position: absolute; - top: 14px; - left: 3px; - cursor: pointer; -} - -.compare-btn mat-icon { - font-size: 22px; - position: absolute; - left: 2px; - top: 1px; -} +/*.compare-btn {*/ +/* width: 25px;*/ +/* height: 25px;*/ +/* border-radius: 6px;*/ +/* background: rgb(252 252 252);*/ +/* border: 1px solid rgb(220 220 220);*/ +/* position: absolute;*/ +/* top: 14px;*/ +/* left: 3px;*/ +/* cursor: pointer;*/ +/*}*/ + +/*.compare-btn mat-icon {*/ +/* font-size: 22px;*/ +/* position: absolute;*/ +/* left: 2px;*/ +/* top: 1px;*/ +/*}*/ .left-compare-result { grid-column-start: 1; @@ -246,9 +246,11 @@ .report-item[type="FULL"] .block-tree { background: #a2ffa5; } + .report-item[type="FULL"]:not([rate="100%"]) .block-tree { background: #fff6ab; } + .report-item[type="PARTLY"] .block-tree { background: #fff6ab; } @@ -475,9 +477,11 @@ margin-bottom: 5px; color: #686868; } + .total-info span { color: #e70000; } + .total-info[total="100"] span { color: #008d0c; } @@ -485,13 +489,16 @@ *[type-1="false"] .report-item[type="FULL"][rate="100%"] .hidden-item { opacity: 0.15; } + *[type-2="false"] .report-item[type="PARTLY"][rate="100%"] .hidden-item { opacity: 0.15; } + *[type-3="false"] .report-item[type="FULL"]:not([rate="100%"]) .hidden-item, *[type-3="false"] .report-item[type="PARTLY"]:not([rate="100%"]) .hidden-item { opacity: 0.15; } + *[type-4="false"] .report-item[type="LEFT"] .hidden-item, *[type-4="false"] .report-item[type="RIGHT"] .hidden-item { opacity: 0.15; @@ -500,6 +507,7 @@ .report-item:hover .hidden-item { opacity: 1 !important; } + .report-item:hover { background-color: rgb(229 229 229 / 50%); box-shadow: 0px 11px 0px 0px rgb(229 229 229 / 50%); @@ -508,12 +516,15 @@ *[type-1="false"] .legend-l1.legend-icon { background: linear-gradient(135deg, #f1f1f1 48%, #ababab 50%, #f1f1f1 52%); } + *[type-2="false"] .legend-l2.legend-icon { background: linear-gradient(135deg, #f1f1f1 48%, #ababab 50%, #f1f1f1 52%); } + *[type-3="false"] .legend-l3.legend-icon { background: linear-gradient(135deg, #f1f1f1 48%, #ababab 50%, #f1f1f1 52%); } + *[type-4="false"] .legend-l4.legend-icon { background: linear-gradient(135deg, #f1f1f1 48%, #ababab 50%, #f1f1f1 52%); } @@ -552,6 +563,7 @@ cursor: pointer; display: none; } + .report-collapse mat-icon { position: absolute; pointer-events: none; @@ -573,6 +585,7 @@ .report-collapse[collapse="1"] .open-icon { display: block; } + .report-collapse[collapse="2"] .collapse-icon { display: block; } @@ -580,6 +593,7 @@ .merge-table-content::ng-deep mat-row[type="FULL"]:not([rate="100%"]) { background: #fffada; } + .merge-table-content::ng-deep mat-row[type="FULL"] { background: #d0ffd6; } @@ -601,14 +615,16 @@ .cdk-column-lvl { max-width: 60px; } + .cdk-column-left_index { max-width: 60px; } -.cdk-column-right_index { + +.cdk-column-right_index { max-width: 60px; } -.cdk-column-permission_rate{ +.cdk-column-permission_rate { max-width: 105px; } @@ -630,3 +646,32 @@ .scroll div { height: 1px; } + +.middle-tree { + display: flex; + align-items: center; + justify-content: center; + width: 35px; + height: 100%; + position: relative; + background-color: white; +} + +.compare-btn { + background-color: white; + border: 1px solid #ccc; + border-radius: 50%; + width: 24px; + height: 24px; + cursor: pointer; + display: flex; + align-items: center; + justify-content: center; + padding: 0; + font-size: 14px; +} + +.icon { + font-size: 16px; + line-height: 16px; +} diff --git a/frontend/src/app/modules/analytics/compare-module/compare-module.component.html b/frontend/src/app/modules/analytics/compare-module/compare-module.component.html index 62385c2282..0e6b98b5a7 100644 --- a/frontend/src/app/modules/analytics/compare-module/compare-module.component.html +++ b/frontend/src/app/modules/analytics/compare-module/compare-module.component.html @@ -1,40 +1,274 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
-
- Modules are {{total}}% the same. + Modules are {{ total }}% the same.
- - - - -
Description
-
-
+ +
- - + +
-
- - - - -
Input Events
-
-
+ + +
-
-
+
+
-
-
+
+
@@ -42,25 +276,20 @@
- - - - - -
Output Events
-
-
+ + +
-
-
+
+
-
-
+
+
@@ -68,25 +297,20 @@
- - - - - -
Variables
-
-
+ + +
-
-
+
+
-
-
+
+
@@ -94,118 +318,124 @@
- - - - -
Policy Blocks
-
+ +
-
-
+
+
-
- Blocks are equal, including their child blocks. -
+
Blocks are equal, including their child blocks.
-
+
-
- blocks are equal, but their child blocks are different. -
+
Blocks are equal, but their child blocks are different.
-
+
-
- blocks are of the same type and are partially equal. -
+
Blocks are partially equal.
-
+
-
- Blocks are absent in the other Policy. -
+
Blocks are absent in the other Policy.
+ + + + + + + + + + +
+ [attr.type-2]="type2" [attr.type-3]="type3" [attr.type-4]="type4">
-
{{i+1}}
+ [attr.type]="item.type" [attr.rate]="item.total_rate" [attr.hidden]="item._hidden"> +
{{ i + 1 }}
remove add
+ class="left-tree hidden-item">
- {{item.left_index}} + {{ item.left_index }}
- {{icons[item.left_type]}} + {{ icons[item.left_type] }}
-
{{item.left_tag || item.left_type}}
+
{{ item.left_tag || item.left_type }}
+ [style.padding-left.px]="_pOffset*item.lvl" + class="right-tree fantom-tree hidden-item">
- {{item.left_index}} + {{ item.left_index }}
- {{icons[item.left_type]}} + {{ icons[item.left_type] }}
-
{{item.left_tag || item.left_type}}
+
{{ item.left_tag || item.left_type }}
+ class="right-tree hidden-item">
- {{item.right_index}} + {{ item.right_index }}
- {{icons[item.right_type]}} + {{ icons[item.right_type] }}
-
{{item.right_tag || item.right_type}}
+
{{ item.right_tag || item.right_type }}
+ [style.padding-left.px]="_pOffset*item.lvl" + class="left-tree fantom-tree hidden-item">
- {{item.right_index}} + {{ item.right_index }}
- {{icons[item.right_type]}} + {{ icons[item.right_type] }}
-
{{item.right_tag || item.right_type}}
+
{{ item.right_tag || item.right_type }}
+ + + + + + +
- unfold_more - unfold_less + +
+ [style.padding-left.px]="_pOffset*item.lvl"> @@ -213,7 +443,7 @@
+ [style.padding-left.px]="_pOffset*item.lvl"> @@ -222,24 +452,9 @@
- -
-
- - - {{ column.label }} - {{ row[column.name] }} - - - - -
-
-
- - + +
@@ -247,59 +462,59 @@
ID
-
{{module.id}}
+
{{ module.id }}
Name
-
{{module.name}}
+
{{ module.name }}
Description
-
{{module.description}}
+
{{ module.description }}
-
Permission Rate:
-
{{blocks.permission_rate}}
+
Permission Rate:
+
{{ blocks.permission_rate }}
-
Properties Rate:
-
{{blocks.prop_rate}}
+
Properties Rate:
+
{{ blocks.prop_rate }}
-
Events Rate:
-
{{blocks.event_rate}}
+
Events Rate:
+
{{ blocks.event_rate }}
-
Artifacts Rate:
-
{{blocks.artifacts_rate}}
+
Artifacts Rate:
+
{{ blocks.artifacts_rate }}
-
Total Rate:
-
{{blocks.total_rate}}
+
Total Rate:
+
{{ blocks.total_rate }}
-
Block Type:
-
{{blocks.block_type}}
+
Block Type:
+
{{ blocks.block_type }}
-
Permissions:
+
Permissions:
-
{{i}}:
+ [attr.index]="index"> +
{{ i }}:
- {{perm.items[index]}} + {{ perm.items[index] }}
@@ -309,14 +524,14 @@
-
Properties:
+
Properties:
-
{{prop.name}}:
+ [attr.offset]="prop.lvl" [attr.index]="index"> +
{{ prop.name }}:
- {{prop.items[index].value}} + {{ prop.items[index].value }}
@@ -326,7 +541,7 @@
-
Events:
+
Events:
@@ -336,37 +551,37 @@
source:
- {{event.items[index].source}} + {{ event.items[index].source }}
output:
- {{event.items[index].output}} + {{ event.items[index].output }}
target:
- {{event.items[index].target}} + {{ event.items[index].target }}
input:
- {{event.items[index].input}} + {{ event.items[index].input }}
actor:
- {{event.items[index].actor}} + {{ event.items[index].actor }}
disabled:
- {{event.items[index].disabled}} + {{ event.items[index].disabled }}
@@ -376,7 +591,7 @@
-
Artifacts:
+
Artifacts:
@@ -386,25 +601,25 @@
name:
- {{artifact.items[index].name}} + {{ artifact.items[index].name }}
extension:
- {{artifact.items[index].extension}} + {{ artifact.items[index].extension }}
type:
- {{artifact.items[index].type}} + {{ artifact.items[index].type }}
hash:
- {{artifact.items[index].weight}} + {{ artifact.items[index].weight }}
@@ -418,14 +633,14 @@
-
{{prop.name}}:
+ [attr.offset]="prop.lvl" [attr.index]="index"> +
{{ prop.name }}:
- {{prop.items[index].value}} + {{ prop.items[index].value }}
- \ No newline at end of file + diff --git a/frontend/src/app/modules/analytics/compare-policy/compare-policy.component.html b/frontend/src/app/modules/analytics/compare-policy/compare-policy.component.html index 77e858253e..dadbb4c556 100644 --- a/frontend/src/app/modules/analytics/compare-policy/compare-policy.component.html +++ b/frontend/src/app/modules/analytics/compare-policy/compare-policy.component.html @@ -2,36 +2,294 @@
- Policies are {{total}}% the same. + Policies are {{ total }}% the same.
- - - - -
Description
-
-
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
- +
- +
-
- - - - -
Policy Roles
-
-
+ + +
-
+
- - - - - -
Policy Groups
-
-
+ + +
+ [attr.rate]="item.total_rate">
- - - - - -
Policy Topics
-
-
+ + +
-
- - - -
-
-
- - - -
-
-
-
- - - - -
Policy Tokens
-
-
-
-
+ [attr.rate]="item.total_rate">
- - - - - -
Policy Blocks
-
+ +
+ [attr.type-4]="type4">
@@ -163,81 +380,105 @@
+ [attr.type-2]="type2" [attr.type-3]="type3" [attr.type-4]="type4">
-
{{i+1}}
+ [attr.type]="item.type" [attr.rate]="item.total_rate" [attr.hidden]="item._hidden"> +
{{ i + 1 }}
+ + + + +
- remove - add + + +
+ class="left-tree hidden-item">
- {{item.left_index}} + {{ item.left_index }}
+ + +
- {{icons[item.left_type]}} + {{ icons[item.left_type] }}
-
{{item.left_tag || item.left_type}}
+
{{ item.left_tag || item.left_type }}
+ [style.padding-left.px]="_pOffset*item.lvl" + class="right-tree fantom-tree hidden-item">
- {{item.left_index}} + {{ item.left_index }}
+ + +
- {{icons[item.left_type]}} + {{ icons[item.left_type] }}
-
{{item.left_tag || item.left_type}}
+
{{ item.left_tag || item.left_type }}
+ class="right-tree hidden-item">
- {{item.right_index}} + {{ item.right_index }}
+ + +
- {{icons[item.right_type]}} + {{ icons[item.right_type] }}
-
{{item.right_tag || item.right_type}}
+
{{ item.right_tag || item.right_type }}
+ [style.padding-left.px]="_pOffset*item.lvl" + class="left-tree fantom-tree hidden-item">
- {{item.right_index}} + {{ item.right_index }}
+ + +
- {{icons[item.right_type]}} + {{ icons[item.right_type] }}
-
{{item.right_tag || item.right_type}}
+
{{ item.right_tag || item.right_type }}
+ + + + + + +
- unfold_more - unfold_less + +
+ [style.padding-left.px]="_pOffset*item.lvl"> @@ -245,7 +486,7 @@
+ [style.padding-left.px]="_pOffset*item.lvl"> @@ -255,23 +496,26 @@
-
+
- - - {{ column.label }} - {{ row[column.name] }} - - - - + + + + + + + + + + + +
{{ column.label }}
{{ row[column.name] }}
-
- - + + +
@@ -281,67 +525,67 @@
Message ID
File
ID
-
{{getPolicyId(policy)}}
+
{{ getPolicyId(policy) }}
Name
-
{{policy.name}}
+
{{ policy.name }}
Description
-
{{policy.description}}
+
{{ policy.description }}
Topic
-
{{policy.instanceTopicId}}
+
{{ policy.instanceTopicId }}
Version
-
{{policy.version}}
+
{{ policy.version }}
-
Permission Rate:
-
{{blocks.permission_rate}}
+
Permission Rate:
+
{{ blocks.permission_rate }}
-
Properties Rate:
-
{{blocks.prop_rate}}
+
Properties Rate:
+
{{ blocks.prop_rate }}
-
Events Rate:
-
{{blocks.event_rate}}
+
Events Rate:
+
{{ blocks.event_rate }}
-
Artifacts Rate:
-
{{blocks.artifacts_rate}}
+
Artifacts Rate:
+
{{ blocks.artifacts_rate }}
-
Total Rate:
-
{{blocks.total_rate}}
+
Total Rate:
+
{{ blocks.total_rate }}
-
Block Type:
-
{{blocks.block_type}}
+
Block Type:
+
{{ blocks.block_type }}
-
Permissions:
+
Permissions:
-
{{i}}:
+ [attr.index]="index"> +
{{ i }}:
- {{perm.items[index]}} + {{ perm.items[index] }}
@@ -351,17 +595,22 @@
-
Properties:
+
Properties:
-
{{prop.name}}:
+ [attr.offset]="prop.lvl" [attr.index]="index"> +
{{ prop.name }}:
+ + + +
- search + 🔍
+ - {{prop.items[index].value}} + {{ prop.items[index].value }}
@@ -371,7 +620,7 @@
-
Events:
+
Events:
@@ -381,37 +630,37 @@
source:
- {{event.items[index].source}} + {{ event.items[index].source }}
output:
- {{event.items[index].output}} + {{ event.items[index].output }}
target:
- {{event.items[index].target}} + {{ event.items[index].target }}
input:
- {{event.items[index].input}} + {{ event.items[index].input }}
actor:
- {{event.items[index].actor}} + {{ event.items[index].actor }}
disabled:
- {{event.items[index].disabled}} + {{ event.items[index].disabled }}
@@ -421,7 +670,7 @@
-
Artifacts:
+
Artifacts:
@@ -431,25 +680,25 @@
name:
- {{artifact.items[index].name}} + {{ artifact.items[index].name }}
extension:
- {{artifact.items[index].extension}} + {{ artifact.items[index].extension }}
type:
- {{artifact.items[index].type}} + {{ artifact.items[index].type }}
hash:
- {{artifact.items[index].weight}} + {{ artifact.items[index].weight }}
@@ -464,18 +713,22 @@
-
{{prop.name}}:
+ [attr.offset]="prop.lvl" [attr.index]="index"> +
{{ prop.name }}:
+ + + +
- search + 🔍
- {{prop.items[index].value}} + {{ prop.items[index].value }}
- \ No newline at end of file + diff --git a/frontend/src/app/modules/analytics/compare-policy/compare-policy.component.scss b/frontend/src/app/modules/analytics/compare-policy/compare-policy.component.scss index 93f580fef7..7ef7ad068d 100644 --- a/frontend/src/app/modules/analytics/compare-policy/compare-policy.component.scss +++ b/frontend/src/app/modules/analytics/compare-policy/compare-policy.component.scss @@ -562,7 +562,8 @@ position: absolute; left: 21px; top: 19px; - padding-right: 4px; + padding-left: 2px; + padding-top: 1px; box-sizing: border-box; color: #898989; overflow: hidden; @@ -656,4 +657,50 @@ .scroll div { height: 1px; -} \ No newline at end of file +} + +.middle-tree { + display: flex; + align-items: center; + justify-content: center; + width: 35px; + height: 100%; + position: relative; + background-color: white; +} + +.compare-btn { + background-color: white; + border: 1px solid #ccc; + border-radius: 50%; + width: 24px; + height: 24px; + cursor: pointer; + display: flex; + align-items: center; + justify-content: center; + padding: 0; + font-size: 14px; +} + +.icon { + font-size: 16px; + line-height: 16px; +} + +.custom-icon { + font-family: 'Material Icons', sans-serif; + font-size: 16px; + display: inline-block; + width: 16px; + height: 16px; + text-align: center; + line-height: 16px; + vertical-align: middle; + user-select: none; +} + +.report-collapse .icon { + font-size: 19px; + line-height: 12px; +} diff --git a/frontend/src/app/modules/analytics/compare-record/compare-record.component.html b/frontend/src/app/modules/analytics/compare-record/compare-record.component.html index faf5f84c2b..931a4086ac 100644 --- a/frontend/src/app/modules/analytics/compare-record/compare-record.component.html +++ b/frontend/src/app/modules/analytics/compare-record/compare-record.component.html @@ -1,36 +1,196 @@
- Documents are {{totalRate}}% the same. + Documents are {{ totalRate }}% the same.
- +
- {{item.name}} + {{ item.name }} - {{item.rate}} + {{ item.rate }}
- - - - -
Description
-
-
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
-
+
-
- -
Policy Documents
-
+ +
-
+
@@ -80,31 +236,35 @@
-
+
+ [attr.hidden]="row.hidden" + [style.grid-template-columns]="_gridStyle"> + +
{{ row.number }}
+ + + + -
{{row.number}}
- remove - add + + +
- -
- {{treeItemContext.data.docIndex}} + {{ treeItemContext.data.docIndex }}
+ + + +
- {{treeItemContext.data.docIcon}} + {{ treeItemContext.data.docIcon }}
-
{{treeItemContext.data.docName}}
+
{{ treeItemContext.data.docName }}
+ [style.grid-column-start]="2 * treeItemContext.index"> + + + + +
- unfold_more - unfold_less + +
-
- +
-
+
@@ -156,29 +326,34 @@
- - - - {{ column.label }} - - - - {{ row.data[column.name] }} - - - - - - +
+ + + + + + + + + + + +
{{ column.label }}
+ + {{ row.data[column.name] }} + +
+
+
-
- - + + +
@@ -186,11 +361,11 @@
Documents
-
{{data.documents}}
+
{{ data.documents }}
Tokens
-
{{data.tokens}}
+
{{ data.tokens }}
-
Document Rate:
-
{{data.documentRate}}
+
Document Rate:
+
{{ data.documentRate }}
@@ -227,13 +402,13 @@
-->
-
Type:
-
{{data.type}}
+
Type:
+
{{ data.type }}
-
Schema:
-
{{data.schema}}
+
Schema:
+
{{ data.schema }}
+ + + +
- unfold_more - unfold_less + +
-
-
- {{field.label}}: +
+
+ {{ field.label }}:
search
- {{field.value}} + {{ field.value }}
@@ -280,12 +460,12 @@
- \ No newline at end of file + diff --git a/frontend/src/app/modules/analytics/compare-schema/compare-schema.component.css b/frontend/src/app/modules/analytics/compare-schema/compare-schema.component.css index 0ff88c3515..a86878d6e7 100644 --- a/frontend/src/app/modules/analytics/compare-schema/compare-schema.component.css +++ b/frontend/src/app/modules/analytics/compare-schema/compare-schema.component.css @@ -150,24 +150,24 @@ position: relative; } -.compare-btn { - width: 25px; - height: 25px; - border-radius: 6px; - background: rgb(252 252 252); - border: 1px solid rgb(220 220 220); - position: absolute; - top: 14px; - left: 3px; - cursor: pointer; -} - -.compare-btn mat-icon { - font-size: 22px; - position: absolute; - left: 2px; - top: 1px; -} +/*.compare-btn {*/ +/* width: 25px;*/ +/* height: 25px;*/ +/* border-radius: 6px;*/ +/* background: rgb(252 252 252);*/ +/* border: 1px solid rgb(220 220 220);*/ +/* position: absolute;*/ +/* top: 14px;*/ +/* left: 3px;*/ +/* cursor: pointer;*/ +/*}*/ + +/*.compare-btn mat-icon {*/ +/* font-size: 22px;*/ +/* position: absolute;*/ +/* left: 2px;*/ +/* top: 1px;*/ +/*}*/ .left-compare-result { grid-column-start: 1; @@ -215,6 +215,7 @@ .report-item[type="FULL"] .field-tree { background: linear-gradient(45deg, #a2ffa5 48%, #fff6ab 52%); } + .report-item[type="FULL"][rate="100%"] .field-tree { background: #a2ffa5; } @@ -222,6 +223,7 @@ .report-item[type="PARTLY"] .field-tree { background: #fff6ab; } + .report-item[type="PARTLY"][rate="100%"] .field-tree { background: linear-gradient(45deg, #a2ffa5 48%, #fff6ab 52%); } @@ -484,9 +486,11 @@ margin-bottom: 5px; color: #686868; } + .total-info span { color: #e70000; } + .total-info[total="100"] span { color: #008d0c; } @@ -511,13 +515,16 @@ *[type-1="false"] .report-item[type="FULL"][rate="100%"] .hidden-item { opacity: 0.15; } + *[type-2="false"] .report-item[type="PARTLY"][rate="100%"] .hidden-item { opacity: 0.15; } + *[type-3="false"] .report-item[type="FULL"]:not([rate="100%"]) .hidden-item, *[type-3="false"] .report-item[type="PARTLY"]:not([rate="100%"]) .hidden-item { opacity: 0.15; } + *[type-4="false"] .report-item[type="LEFT"] .hidden-item, *[type-4="false"] .report-item[type="RIGHT"] .hidden-item { opacity: 0.15; @@ -526,6 +533,7 @@ .report-item:hover .hidden-item { opacity: 1 !important; } + .report-item:hover { background-color: rgb(229 229 229 / 50%); box-shadow: 0px 11px 0px 0px rgb(229 229 229 / 50%); @@ -534,12 +542,15 @@ *[type-1="false"] .legend-l1.legend-icon { background: linear-gradient(135deg, #f1f1f1 48%, #ababab 50%, #f1f1f1 52%); } + *[type-2="false"] .legend-l2.legend-icon { background: linear-gradient(135deg, #f1f1f1 48%, #ababab 50%, #f1f1f1 52%); } + *[type-3="false"] .legend-l3.legend-icon { background: linear-gradient(135deg, #f1f1f1 48%, #ababab 50%, #f1f1f1 52%); } + *[type-4="false"] .legend-l4.legend-icon { background: linear-gradient(135deg, #f1f1f1 48%, #ababab 50%, #f1f1f1 52%); } @@ -595,6 +606,36 @@ .report-collapse[collapse="1"] .open-icon { display: block; } + .report-collapse[collapse="2"] .collapse-icon { display: block; -} \ No newline at end of file +} + +.middle-tree { + display: flex; + align-items: center; + justify-content: center; + width: 35px; + height: 100%; + position: relative; + background-color: white; +} + +.compare-btn { + background-color: white; + border: 1px solid #ccc; + border-radius: 50%; + width: 24px; + height: 24px; + cursor: pointer; + display: flex; + align-items: center; + justify-content: center; + padding: 0; + font-size: 14px; +} + +.icon { + font-size: 16px; + line-height: 16px; +} diff --git a/frontend/src/app/modules/analytics/compare-schema/compare-schema.component.html b/frontend/src/app/modules/analytics/compare-schema/compare-schema.component.html index ae1d43b20f..13e262306f 100644 --- a/frontend/src/app/modules/analytics/compare-schema/compare-schema.component.html +++ b/frontend/src/app/modules/analytics/compare-schema/compare-schema.component.html @@ -1,115 +1,261 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
- Schemas are {{total}}% the same. + Schemas are {{ total }}% the same.
- - - - -
Description
-
-
+ +
- - + +
-
- - -
Schema Fields
-
+ +
-
+
-
-
- Fields are completely equal. -
+
+
Fields are completely equal.
-
-
- Sub-Schemas are partially equal. -
+
+
Sub-Schemas are partially equal.
-
-
- Fields are partially equal. -
+
+
Fields are partially equal.
-
-
- Match not found. -
+
+
Match not found.
+ [attr.type-2]="type2" [attr.type-3]="type3" [attr.type-4]="type4">
-
{{i+1}}
+ [attr.type]="item.type" [attr.rate]="item.total_rate" [attr.hidden]="item._hidden"> +
{{ i + 1 }}
+
- remove - add +
+ + +
+ class="left-tree">
- {{item.left_index}} + {{ item.left_index }}
-
{{item.left_name}}
+
{{ item.left_name }}
+ [style.padding-left.px]="30*item.lvl" class="left-tree fantom-tree">
- {{item.right_index}} + {{ item.right_index }}
-
{{item.right_name}}
+
{{ item.right_name }}
+ + + + + + +
- unfold_more - unfold_less + +
+ class="right-tree">
- {{item.right_index}} + {{ item.right_index }}
-
{{item.right_name}}
+
{{ item.right_name }}
+ [style.padding-left.px]="30*item.lvl" class="right-tree fantom-tree">
- {{item.left_index}} + {{ item.left_index }}
-
{{item.left_name}}
+
{{ item.left_name }}
+ [style.padding-left.px]="30*item.lvl"> @@ -117,32 +263,36 @@
+ [style.padding-left.px]="30*item.lvl">
-
-
+
- - - {{ column.label }} - {{ row[column.name] }} - - - - + + + + {{ column.label }} + + + + + + {{ row[column.name] }} + + +
+
- - + +
@@ -150,52 +300,52 @@
ID
-
{{schema.id}}
+
{{ schema.id }}
Name
-
{{schema.name}}
+
{{ schema.name }}
Description
-
{{schema.description}}
+
{{ schema.description }}
Version
-
{{schema.version}}
+
{{ schema.version }}
Topic
-
{{schema.topicId}}
+
{{ schema.topicId }}
Type
-
{{schema.iri}}
+
{{ schema.iri }}
Policy
-
{{schema.policy}}
+
{{ schema.policy }}
-
Total Rate:
-
{{report.total_rate}}
+
Total Rate:
+
{{ report.total_rate }}
-
Properties:
+
Properties:
-
{{prop.name}}:
+ [attr.offset]="prop.lvl" [attr.index]="index"> +
{{ prop.name }}:
- {{prop.items[index].value}} + {{ prop.items[index].value }}
@@ -203,4 +353,4 @@
- \ No newline at end of file + diff --git a/frontend/src/app/modules/analytics/compare-tool/compare-tool.component.html b/frontend/src/app/modules/analytics/compare-tool/compare-tool.component.html index e828c2c9ec..59059b0cca 100644 --- a/frontend/src/app/modules/analytics/compare-tool/compare-tool.component.html +++ b/frontend/src/app/modules/analytics/compare-tool/compare-tool.component.html @@ -2,304 +2,581 @@
- {{item.name}} + {{ item.name }} - {{item.rate}} + {{ item.rate }}
- - - - -
Description
-
-
-
- -
-
-
--> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + +
+ +
+
+
+ +
+
+
+
+ + +
+
+ +
- -
-
-
- - - - - -
Input Events
-
-
-
-
- -
- -
-
-
-
-
+ +
+
+
+
- - - - - -
Output Events
-
-
-
-
- -
+
+
+ +
- -
-
-
-
-
+ +
+
+
+
- - - - - -
Variables
-
-
-
-
- -
+
+
+ +
- -
-
-
-
-
+ +
+
+
+
- - - - -
Tool Blocks
-
- -
-
-
-
-
- Blocks are equal, including their child blocks. -
+
+ + + +
+
+
+
+
+ Blocks are equal, including their child blocks.
-
-
-
- blocks are equal, but their child blocks are different. -
+
+
+
+
+ blocks are equal, but their child blocks are different.
-
-
-
- blocks are of the same type and are partially equal. -
+
+
+
+
+ blocks are of the same type and are partially equal.
-
-
-
- Blocks are absent in the other Tool. -
+
+
+
+
+ Blocks are absent in the other Tool.
+
-
- -
- -
{{row.number}}
-
- remove - add -
+
+ +
+ +
{{ row.number }}
+ + + + - -
+ + + +
+ + +
-
-
- {{treeItemContext.data.blockIndex}} -
-
- {{treeItemContext.data.blockIcon}} -
-
{{treeItemContext.data.blockName}}
+
+
+ {{ treeItemContext.data.blockIndex }}
-
+ + + -
-
- unfold_more - unfold_less +
+ {{ treeItemContext.data.blockIcon }}
+
{{ treeItemContext.data.blockName }}
- +
+ +
+ + + + - - -
+ + +
+
+ + + + +
- -
-
-
+ +
+
-
+
+
-
-
- - - - {{ column.label }} - - - - {{ row.data[column.name] }} - - - - - - -
-
+
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + +
{{ column.label }}
+ + {{ row.data[column.name] }} + +
+
- - -
+ +
+ + +
ID
-
{{data.id}}
+
{{ data.id }}
Name
-
{{data.name}}
+
{{ data.name }}
Description
-
{{data.description}}
+
{{ data.description }}
Hash
-
{{data.hash}}
+
{{ data.hash }}
Message
-
{{data.messageId}}
+
{{ data.messageId }}
@@ -307,225 +584,229 @@
-
Permission Rate:
-
{{data.permissionRate}}
+
Permission Rate:
+
{{ data.permissionRate }}
-
Properties Rate:
-
{{data.propRate}}
+
Properties Rate:
+
{{ data.propRate }}
-
Events Rate:
-
{{data.eventRate}}
+
Events Rate:
+
{{ data.eventRate }}
-
Artifacts Rate:
-
{{data.artifactsRate}}
+
Artifacts Rate:
+
{{ data.artifactsRate }}
-
Total Rate:
-
{{data.totalRate}}
+
Total Rate:
+
{{ data.totalRate }}
-
Block Type:
-
{{data.blockType}}
+
Block Type:
+
{{ data.blockType }}
-
Permissions:
+
Permissions:
-
+
- {{perm.name}}: + {{ perm.name }}:
- {{perm.value}} + {{ perm.value }}
- +
- +
-
Properties:
+
Properties:
-
+
- {{prop.name}}: + {{ prop.name }}:
+ + + +
- search + 🔍
- {{prop.value}} + {{ prop.value }}
- +
- +
-
Events:
+
Events:
- -
+ +
Event:
- -
+ +
source:
- {{event.source}} + {{ event.source }}
- -
+ +
output:
- {{event.output}} + {{ event.output }}
- -
+ +
target:
- {{event.target}} + {{ event.target }}
- -
+ +
input:
- {{event.input}} + {{ event.input }}
- -
+ +
actor:
- {{event.actor}} + {{ event.actor }}
- -
+ +
disabled:
- {{event.disabled}} + {{ event.disabled }}
- +
- +
- +
-
Artifacts:
+
Artifacts:
-
+
Artifact:
-
+
name:
- {{artifact.fileName}} + {{ artifact.fileName }}
-
+
extension:
- {{artifact.fileExtension}} + {{ artifact.fileExtension }}
-
+
type:
- {{artifact.fileType}} + {{ artifact.fileType }}
-
+
hash:
- {{artifact.fileHash}} + {{ artifact.fileHash }}
- +
@@ -534,22 +815,22 @@
-
+
- {{prop.name}}: + {{ prop.name }}:
- {{prop.value}} + {{ prop.value }}
- \ No newline at end of file + diff --git a/frontend/src/app/modules/analytics/multi-compare-policy/multi-compare-policy.component.html b/frontend/src/app/modules/analytics/multi-compare-policy/multi-compare-policy.component.html index c967ffcbb7..f44f131f33 100644 --- a/frontend/src/app/modules/analytics/multi-compare-policy/multi-compare-policy.component.html +++ b/frontend/src/app/modules/analytics/multi-compare-policy/multi-compare-policy.component.html @@ -2,10 +2,10 @@
- {{item.name}} + {{ item.name }} - {{item.rate}} + {{ item.rate }}
@@ -16,51 +16,342 @@ Policies are {{total}}% the same.
--> - - - - -
Description
-
-
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
-
+ *ngIf="context.right" + [style.grid-column-start]="2 * context.index" + [attr.open]="true">
+ *ngIf="context.right" + [style.grid-column-start]="2 * context.index + 1" + [attr.open]="true">
-
-
- - - - -
Policy Roles
-
-
+ + +
-
+
-
+ *ngIf="context.right" + [style.grid-column-start]="2 * context.index" + [attr.open]="true">
- - - - - -
Policy Groups
-
-
-
-
+ + +
+
-
+
+ *ngIf="context.right" + [style.grid-column-start]="2 * context.index" + [attr.open]="true">
-
- - - - - -
Policy Topics
-
-
+ + +
-
+
-
+ 'left-compare-result': context.left, + 'right-compare-result': context.right, + 'fantom-block': context.fantom, + 'compare-result': true + }">
+ *ngIf="context.right" + [style.grid-column-start]="2 * context.index" + [attr.open]="true">
- - - - - -
Policy Tokens
-
-
+ + +
-
+
-
- +
+ +
+
+ *ngIf="context.right" + [style.grid-column-start]="2 * context.index" + [attr.open]="true">
+
- + *ngIf="context.right" + [style.grid-column-start]="2 * context.index + 1" + [attr.open]="true"> + +
- - + - - -
Policy Blocks
-
+
-
-
+
+ +
Blocks are equal, including their child blocks.
-
+ +
- blocks are equal, but their child blocks are different. + Blocks are equal, but their child blocks are different.
-
+ +
- blocks are of the same type and are partially equal. + Blocks are of the same type and are partially equal.
-
+ +
Blocks are absent in the other Policy. @@ -219,25 +505,31 @@
-
+
+ +
-
+
{{ row.number }}
+ + + + -
{{row.number}}
- remove - add + - + +
-
- {{context.blockIndex}} + {{ context.blockIndex }}
+ + + +
- {{context.blockIcon}} + {{ context.blockIcon }}
-
{{context.blockName}}
+
{{ context.blockName }}
-
+
+ + + + +
- unfold_more - unfold_less + +
@@ -283,40 +584,43 @@ }">
-
+
-
+
- - - - {{ column.label }} - - - - {{ row.data[column.name] }} - - + + + + {{ column.label }} + + + + + + {{ row.data[column.name] }} + + + - - - +
- - + + + +
@@ -326,72 +630,72 @@
Message ID
File
ID
-
{{getPolicyId(policy)}}
+
{{ getPolicyId(policy) }}
Name
-
{{policy.name}}
+
{{ policy.name }}
Description
-
{{policy.description}}
+
{{ policy.description }}
Topic
-
{{policy.instanceTopicId}}
+
{{ policy.instanceTopicId }}
Version
-
{{policy.version}}
+
{{ policy.version }}
-
Permission Rate:
-
{{data.permissionRate}}
+
Permission Rate:
+
{{ data.permissionRate }}
-
Properties Rate:
-
{{data.propRate}}
+
Properties Rate:
+
{{ data.propRate }}
-
Events Rate:
-
{{data.eventRate}}
+
Events Rate:
+
{{ data.eventRate }}
-
Artifacts Rate:
-
{{data.artifactsRate}}
+
Artifacts Rate:
+
{{ data.artifactsRate }}
-
Total Rate:
-
{{data.totalRate}}
+
Total Rate:
+
{{ data.totalRate }}
-
Block Type:
-
{{data.blockType}}
+
Block Type:
+
{{ data.blockType }}
-
Permissions:
+
Permissions:
-
+
- {{perm.name}}: + {{ perm.name }}:
- {{perm.value}} + {{ perm.value }}
@@ -401,23 +705,27 @@
-
Properties:
+
Properties:
-
+
- {{prop.name}}: + {{ prop.name }}:
+ + + +
- search + 🔍
- {{prop.value}} + {{ prop.value }}
@@ -427,86 +735,86 @@
-
Events:
+
Events:
-
+
Event:
-
+
source:
- {{event.source}} + {{ event.source }}
-
+
output:
- {{event.output}} + {{ event.output }}
-
+
target:
- {{event.target}} + {{ event.target }}
-
+
input:
- {{event.input}} + {{ event.input }}
-
+
actor:
- {{event.actor}} + {{ event.actor }}
-
+
disabled:
- {{event.disabled}} + {{ event.disabled }}
@@ -518,50 +826,50 @@
-
Artifacts:
+
Artifacts:
-
+
Artifact:
-
+
name:
- {{artifact.fileName}} + {{ artifact.fileName }}
-
+
extension:
- {{artifact.fileExtension}} + {{ artifact.fileExtension }}
-
+
type:
- {{artifact.fileType}} + {{ artifact.fileType }}
-
+
hash:
- {{artifact.fileHash}} + {{ artifact.fileHash }}
@@ -574,24 +882,28 @@
-
+
- {{prop.name}}: + {{ prop.name }}:
+ + + +
- search + 🔍
- {{prop.value}} + {{ prop.value }}
- \ No newline at end of file + diff --git a/frontend/src/app/modules/common/material.module.ts b/frontend/src/app/modules/common/material.module.ts index fae3e92aab..58a9fdf0bc 100644 --- a/frontend/src/app/modules/common/material.module.ts +++ b/frontend/src/app/modules/common/material.module.ts @@ -2,7 +2,7 @@ import { NgModule } from '@angular/core'; import { CommonModule } from '@angular/common'; // import { MatLegacyTabsModule as MatTabsModule } from '@angular/material/legacy-tabs'; import { MatStepperModule } from '@angular/material/stepper'; -// import { MatExpansionModule } from '@angular/material/expansion'; +import { MatExpansionModule } from '@angular/material/expansion'; import { MatIconModule } from '@angular/material/icon'; import { ReactiveFormsModule } from '@angular/forms'; import { MatLegacyInputModule as MatInputModule } from '@angular/material/legacy-input'; @@ -35,6 +35,7 @@ import { MatLegacySliderModule as MatSliderModule } from '@angular/material/lega import { MatBadgeModule } from '@angular/material/badge'; import { TabViewModule } from 'primeng/tabview'; import { AccordionModule } from 'primeng/accordion'; +import {TableModule} from 'primeng/table'; @NgModule({ @@ -48,6 +49,7 @@ import { AccordionModule } from 'primeng/accordion'; // MatExpansionModule, AccordionModule, + TableModule, MatIconModule, ReactiveFormsModule, @@ -84,6 +86,7 @@ import { AccordionModule } from 'primeng/accordion'; // MatExpansionModule, AccordionModule, + TableModule, MatIconModule, ReactiveFormsModule, diff --git a/frontend/src/app/modules/policy-engine/dialogs/cron-config-dialog/cron-config-dialog.component.html b/frontend/src/app/modules/policy-engine/dialogs/cron-config-dialog/cron-config-dialog.component.html index 83a7811078..4ea302d3b2 100644 --- a/frontend/src/app/modules/policy-engine/dialogs/cron-config-dialog/cron-config-dialog.component.html +++ b/frontend/src/app/modules/policy-engine/dialogs/cron-config-dialog/cron-config-dialog.component.html @@ -38,19 +38,28 @@

Custom Period

- - - - - Cron Mask (advanced) - - - - * Mask: minute hour day(month) month day(week) - - - - + + + + + + + + + + + + + + + + +
+ + +
+
+
-
\ No newline at end of file +
From b16e8b91d1808f42d1f8c507b540fe4436147781 Mon Sep 17 00:00:00 2001 From: Ihar Date: Tue, 29 Oct 2024 17:46:33 +0500 Subject: [PATCH 03/48] feat: use icons from primeNg[3141] --- .../compare-document.component.html | 9 +- .../src/app/modules/common/material.module.ts | 9 +- .../modules-list/modules-list.component.html | 2 + .../calculate-config.component.html | 24 ++-- .../calculate-math-config.component.html | 27 ++-- .../aggregate-config.component.html | 31 +++-- .../document-validator-config.component.html | 30 +++-- .../document-viewer-config.component.html | 86 ++++++++----- .../filters-addon-config.component.html | 20 +-- .../request-addon-config.component.html | 24 ++-- .../request-config.component.html | 52 ++++---- .../send-config/send-config.component.html | 38 ++++-- .../source-addon-config.component.html | 36 ++++-- .../action-config.component.html | 44 ++++--- .../button-config.component.html | 51 +++++--- .../http-request-config.component.html | 22 +++- .../switch-config.component.html | 31 +++-- .../report-item-config.component.html | 115 ++++++++++++------ 18 files changed, 421 insertions(+), 230 deletions(-) diff --git a/frontend/src/app/modules/analytics/compare-document/compare-document.component.html b/frontend/src/app/modules/analytics/compare-document/compare-document.component.html index 340abbf13a..708aab7db4 100644 --- a/frontend/src/app/modules/analytics/compare-document/compare-document.component.html +++ b/frontend/src/app/modules/analytics/compare-document/compare-document.component.html @@ -319,9 +319,14 @@
Documents: + + + + +
- unfold_more - unfold_less + +
diff --git a/frontend/src/app/modules/common/material.module.ts b/frontend/src/app/modules/common/material.module.ts index 58a9fdf0bc..5be989b531 100644 --- a/frontend/src/app/modules/common/material.module.ts +++ b/frontend/src/app/modules/common/material.module.ts @@ -36,6 +36,7 @@ import { MatBadgeModule } from '@angular/material/badge'; import { TabViewModule } from 'primeng/tabview'; import { AccordionModule } from 'primeng/accordion'; import {TableModule} from 'primeng/table'; +import {ButtonModule} from 'primeng/button'; @NgModule({ @@ -51,7 +52,9 @@ import {TableModule} from 'primeng/table'; AccordionModule, TableModule, - MatIconModule, + // MatIconModule, + ButtonModule, + ReactiveFormsModule, MatInputModule, MatButtonModule, @@ -88,7 +91,9 @@ import {TableModule} from 'primeng/table'; AccordionModule, TableModule, - MatIconModule, + // MatIconModule, + ButtonModule, + ReactiveFormsModule, MatInputModule, MatButtonModule, diff --git a/frontend/src/app/modules/policy-engine/modules-list/modules-list.component.html b/frontend/src/app/modules/policy-engine/modules-list/modules-list.component.html index a0d9b13c1e..89004fb16f 100644 --- a/frontend/src/app/modules/policy-engine/modules-list/modules-list.component.html +++ b/frontend/src/app/modules/policy-engine/modules-list/modules-list.component.html @@ -28,6 +28,8 @@

Modules

(click)="newModules()" class="toolbar-btn"> add + + Create a Module - arrow_drop_down + + + Input Schema + > @@ -35,7 +37,7 @@ - {{field.title}} + {{ field.title }} @@ -46,16 +48,18 @@ - arrow_drop_down + + + Output Schema + > @@ -69,7 +73,7 @@ - {{field.title}} + {{ field.title }} diff --git a/frontend/src/app/modules/policy-engine/policy-configuration/blocks/calculate/calculate-math-config/calculate-math-config.component.html b/frontend/src/app/modules/policy-engine/policy-configuration/blocks/calculate/calculate-math-config/calculate-math-config.component.html index e8afa10fe6..120ef830bb 100644 --- a/frontend/src/app/modules/policy-engine/policy-configuration/blocks/calculate/calculate-math-config/calculate-math-config.component.html +++ b/frontend/src/app/modules/policy-engine/policy-configuration/blocks/calculate/calculate-math-config/calculate-math-config.component.html @@ -2,27 +2,36 @@ - arrow_drop_down + + + Equations
- add + + + Add Equation
- - arrow_drop_down + + + + - Equation {{i}} + Equation {{ i }} - {{equation.variable}} - = {{equation.formula}} + {{ equation.variable }} + = {{ equation.formula }} - delete + + + @@ -42,4 +51,4 @@ - \ No newline at end of file + diff --git a/frontend/src/app/modules/policy-engine/policy-configuration/blocks/documents/aggregate-config/aggregate-config.component.html b/frontend/src/app/modules/policy-engine/policy-configuration/blocks/documents/aggregate-config/aggregate-config.component.html index adc1718b71..2068898347 100644 --- a/frontend/src/app/modules/policy-engine/policy-configuration/blocks/documents/aggregate-config/aggregate-config.component.html +++ b/frontend/src/app/modules/policy-engine/policy-configuration/blocks/documents/aggregate-config/aggregate-config.component.html @@ -1,8 +1,11 @@ - @@ -23,7 +26,7 @@ @@ -32,12 +35,16 @@ @@ -46,13 +53,17 @@ - + @@ -82,4 +93,4 @@ -
- arrow_drop_down + + + + Options Empty Data + (blur)="onSave()">
- arrow_drop_down + + + Expressions
- add + + + Add Expression
- arrow_drop_down + + + Expression {{i}}Expression {{ i }} - {{expression.name}} = {{expression.value}} + {{ expression.name }} = {{ expression.value }} - delete + + +
\ No newline at end of file + diff --git a/frontend/src/app/modules/policy-engine/policy-configuration/blocks/documents/document-validator-config/document-validator-config.component.html b/frontend/src/app/modules/policy-engine/policy-configuration/blocks/documents/document-validator-config/document-validator-config.component.html index a6ff9df39e..501fb8bddd 100644 --- a/frontend/src/app/modules/policy-engine/policy-configuration/blocks/documents/document-validator-config/document-validator-config.component.html +++ b/frontend/src/app/modules/policy-engine/policy-configuration/blocks/documents/document-validator-config/document-validator-config.component.html @@ -21,7 +21,7 @@ [(value)]="properties.schema" [disabled]="readonly" (change)="onSave()" - > + > @@ -29,7 +29,7 @@ Check Owned by User + (blur)="onSave()"> @@ -37,7 +37,7 @@ Check Owned by Group + [readonly]="readonly" (blur)="onSave()"> @@ -45,7 +45,7 @@ Check Assigned to User + (blur)="onSave()"> @@ -53,18 +53,22 @@ Check Assigned to Group + [readonly]="readonly" (blur)="onSave()"> - arrow_drop_down + + + Conditions
- add + + + Add Condition
@@ -73,16 +77,20 @@ - arrow_drop_down + + + - Condition {{i}} + Condition {{ i }} - {{condition.field}} {{condition.type}} {{condition.value}} + {{ condition.field }} {{ condition.type }} {{ condition.value }} - delete + + + diff --git a/frontend/src/app/modules/policy-engine/policy-configuration/blocks/documents/document-viewer-config/document-viewer-config.component.html b/frontend/src/app/modules/policy-engine/policy-configuration/blocks/documents/document-viewer-config/document-viewer-config.component.html index 9f07a5ffe1..51433e7a59 100644 --- a/frontend/src/app/modules/policy-engine/policy-configuration/blocks/documents/document-viewer-config/document-viewer-config.component.html +++ b/frontend/src/app/modules/policy-engine/policy-configuration/blocks/documents/document-viewer-config/document-viewer-config.component.html @@ -2,7 +2,9 @@ @@ -19,18 +21,22 @@ @@ -39,13 +45,17 @@ - + @@ -109,20 +119,24 @@ @@ -154,7 +170,7 @@ @@ -162,7 +178,7 @@ @@ -170,20 +186,22 @@ @@ -192,14 +210,16 @@ @@ -207,14 +227,16 @@ diff --git a/frontend/src/app/modules/policy-engine/policy-configuration/blocks/documents/filters-addon-config/filters-addon-config.component.html b/frontend/src/app/modules/policy-engine/policy-configuration/blocks/documents/filters-addon-config/filters-addon-config.component.html index dab94aaf8b..7cb85da31f 100644 --- a/frontend/src/app/modules/policy-engine/policy-configuration/blocks/documents/filters-addon-config/filters-addon-config.component.html +++ b/frontend/src/app/modules/policy-engine/policy-configuration/blocks/documents/filters-addon-config/filters-addon-config.component.html @@ -14,7 +14,7 @@ @@ -22,7 +22,7 @@ @@ -30,7 +30,9 @@ @@ -49,14 +51,16 @@ @@ -73,7 +77,7 @@ -
- arrow_drop_down + + + UI Enable common sorting + (blur)="onSave()">
- arrow_drop_down + + + Fields
- add + + + Add Field
- arrow_drop_down + + + {{getFieldName(field, i)}}{{ getFieldName(field, i) }} - {{field.name}} + {{ field.name }} - delete + + +
- add_link Bind Group + + + Bind Group + [blocks]="allBlocks">
- - flash_on - + + + + + Action @@ -137,14 +151,16 @@
- - add_link - + + + + + Bind Block + [blocks]="allBlocks">
Dialog Type + (blur)="onSave()">
Dialog Content + (blur)="onSave()">
Dialog Class + (blur)="onSave()">
- - add_link - + + + + + Bind Block + [blocks]="allBlocks">
- - add_link - + + + + + Bind Block + [blocks]="allBlocks">
- - add_link - + + + + + Bind Blocks + [blocks]="allBlocks">
Can Be Empty + (blur)="onSave()">
Field + (change)="onSave()">
- arrow_drop_down + + + Dropdown Options @@ -41,7 +43,7 @@ Option Name + (change)="onSave()">
Option Value + (change)="onSave()">
- arrow_drop_down + + + UI Button Content + (blur)="onSave()">
\ No newline at end of file + diff --git a/frontend/src/app/modules/policy-engine/policy-configuration/blocks/documents/request-addon-config/request-addon-config.component.html b/frontend/src/app/modules/policy-engine/policy-configuration/blocks/documents/request-addon-config/request-addon-config.component.html index be0a569d6a..3259c350a6 100644 --- a/frontend/src/app/modules/policy-engine/policy-configuration/blocks/documents/request-addon-config/request-addon-config.component.html +++ b/frontend/src/app/modules/policy-engine/policy-configuration/blocks/documents/request-addon-config/request-addon-config.component.html @@ -29,7 +29,7 @@ * Schema + (change)="onSave()"> @@ -51,7 +51,7 @@ Preset + (blur)="onSave()"> @@ -59,7 +59,9 @@ - arrow_drop_down + + + Preset @@ -70,18 +72,20 @@ * Preset Schema + (change)="onSelectInput()"> - arrow_drop_down + + + - Field {{i}} + Field {{ i }} - {{field.name}} = {{field.value}} + {{ field.name }} = {{ field.value }} @@ -90,7 +94,7 @@ Title - {{field.title}} + {{ field.title }} @@ -101,7 +105,7 @@ - {{f.title}} + {{ f.title }} @@ -114,7 +118,7 @@ + (blur)="onSave()"> diff --git a/frontend/src/app/modules/policy-engine/policy-configuration/blocks/documents/request-config/request-config.component.html b/frontend/src/app/modules/policy-engine/policy-configuration/blocks/documents/request-config/request-config.component.html index f16e257278..df1303a477 100644 --- a/frontend/src/app/modules/policy-engine/policy-configuration/blocks/documents/request-config/request-config.component.html +++ b/frontend/src/app/modules/policy-engine/policy-configuration/blocks/documents/request-config/request-config.component.html @@ -5,11 +5,11 @@ Schema + > @@ -31,13 +31,15 @@ Preset + (blur)="onSave()"> - arrow_drop_down + + + UI @@ -60,7 +62,7 @@ Title + (blur)="onSave()"> @@ -69,7 +71,7 @@ Description + (blur)="onSave()">
@@ -80,7 +82,7 @@ Title + (blur)="onSave()"> @@ -88,7 +90,7 @@ Button Content + (blur)="onSave()"> @@ -96,7 +98,7 @@ Button Class + (blur)="onSave()"> @@ -104,7 +106,7 @@ Dialog Title + (blur)="onSave()"> @@ -112,7 +114,7 @@ Dialog Description + (blur)="onSave()"> @@ -120,14 +122,16 @@ Dialog Class + (blur)="onSave()">
- arrow_drop_down + + + Preset @@ -138,22 +142,24 @@ Preset Schema + > - arrow_drop_down + + + - Field {{i}} + Field {{ i }} - {{field.name}} = {{field.value}} + {{ field.name }} = {{ field.value }} @@ -162,7 +168,7 @@ Title - {{field.title}} + {{ field.title }} @@ -173,7 +179,7 @@ - {{f.title}} + {{ f.title }} @@ -186,7 +192,7 @@ + (blur)="onSave()"> diff --git a/frontend/src/app/modules/policy-engine/policy-configuration/blocks/documents/send-config/send-config.component.html b/frontend/src/app/modules/policy-engine/policy-configuration/blocks/documents/send-config/send-config.component.html index 2b6630567d..257c6825a6 100644 --- a/frontend/src/app/modules/policy-engine/policy-configuration/blocks/documents/send-config/send-config.component.html +++ b/frontend/src/app/modules/policy-engine/policy-configuration/blocks/documents/send-config/send-config.component.html @@ -22,7 +22,7 @@ + (selectionChange)="onDataSource($event)"> Auto Database Hedera Topic @@ -37,13 +37,15 @@ - {{topic.name}} + matTooltipPosition="above" matTooltipClass="guardian-tooltip small-guardian-tooltip"> + {{ topic.name }} Policy Instance - add + + + Create new topic @@ -91,13 +93,18 @@ - - arrow_drop_down + + + + Options
- add + + + Add Option
@@ -105,15 +112,20 @@ - - arrow_drop_down + + + + - Option {{i}} + Option {{ i }} - {{option.name}} - : {{option.value}} + {{ option.name }} + : {{ option.value }} - delete + + + diff --git a/frontend/src/app/modules/policy-engine/policy-configuration/blocks/documents/source-addon-config/source-addon-config.component.html b/frontend/src/app/modules/policy-engine/policy-configuration/blocks/documents/source-addon-config/source-addon-config.component.html index 8560b9937d..cabb644048 100644 --- a/frontend/src/app/modules/policy-engine/policy-configuration/blocks/documents/source-addon-config/source-addon-config.component.html +++ b/frontend/src/app/modules/policy-engine/policy-configuration/blocks/documents/source-addon-config/source-addon-config.component.html @@ -21,7 +21,7 @@ [(value)]="properties.schema" [disabled]="readonly" (change)="onSave()" - > + > @@ -30,7 +30,7 @@ Owned by User + (blur)="onSave()"> @@ -38,7 +38,7 @@ Owned by Group + [readonly]="readonly" (blur)="onSave()"> @@ -46,7 +46,7 @@ Assigned to User + (blur)="onSave()"> @@ -54,7 +54,7 @@ Assigned to Group + [readonly]="readonly" (blur)="onSave()"> @@ -77,30 +77,40 @@ - - arrow_drop_down + + + + Filters
- add + + + Add Field
- - arrow_drop_down + + + + - Field {{i}} + Field {{ i }} - {{field.field}} {{field.type}} {{field.value}} + {{ field.field }} {{ field.type }} {{ field.value }} - delete + + + diff --git a/frontend/src/app/modules/policy-engine/policy-configuration/blocks/main/action-config/action-config.component.html b/frontend/src/app/modules/policy-engine/policy-configuration/blocks/main/action-config/action-config.component.html index 4e277719cd..60a2bc27c7 100644 --- a/frontend/src/app/modules/policy-engine/policy-configuration/blocks/main/action-config/action-config.component.html +++ b/frontend/src/app/modules/policy-engine/policy-configuration/blocks/main/action-config/action-config.component.html @@ -14,7 +14,9 @@ - arrow_drop_down + + + UI @@ -38,23 +40,30 @@ - arrow_drop_down + + + Options
- add + + + Add Options
- - arrow_drop_down + + + + - Options {{i}} - {{option.name}} + Options {{ i }} + {{ option.name }} Button Content + (blur)="onSave()"> - arrow_drop_down + + + Dropdown Options @@ -150,12 +161,15 @@ Button Content + (blur)="onSave()"> - - arrow_drop_down + + + + File Options @@ -166,11 +180,11 @@ Schema + > diff --git a/frontend/src/app/modules/policy-engine/policy-configuration/blocks/main/button-config/button-config.component.html b/frontend/src/app/modules/policy-engine/policy-configuration/blocks/main/button-config/button-config.component.html index 6d772a200c..ed1df1f90d 100644 --- a/frontend/src/app/modules/policy-engine/policy-configuration/blocks/main/button-config/button-config.component.html +++ b/frontend/src/app/modules/policy-engine/policy-configuration/blocks/main/button-config/button-config.component.html @@ -5,18 +5,22 @@ Enable Individual Filters + [readonly]="readonly" (blur)="onSave()"> - arrow_drop_down + + + Buttons
- add + + + Add Button
@@ -25,13 +29,17 @@ - arrow_drop_down + + + - Button {{i}} + Button {{ i }} - {{button.name}} + {{ button.name }} - delete + + + @@ -73,7 +81,8 @@ Dialog Result Field Path - + @@ -89,7 +98,7 @@ Field + (change)="onSave()"> @@ -110,12 +119,16 @@ - arrow_drop_down + + + - Filters Option {{i}} + Filters Option {{ i }}
- add + + + Add Filter
@@ -126,15 +139,19 @@ [attr.collapse]="propHidden.buttonsGroup || propHidden.buttons[i].collapse || propHidden.buttons[i].filtersGroup"> - arrow_drop_down + + + - Filter {{j}} + Filter {{ j }} - {{filter.field}} {{filter.type}} {{filter.value}} + {{ filter.field }} {{ filter.type }} {{ filter.value }} - delete + + + @@ -169,4 +186,4 @@
- \ No newline at end of file + diff --git a/frontend/src/app/modules/policy-engine/policy-configuration/blocks/main/http-request-config/http-request-config.component.html b/frontend/src/app/modules/policy-engine/policy-configuration/blocks/main/http-request-config/http-request-config.component.html index 6afd6c8ff3..2862880c72 100644 --- a/frontend/src/app/modules/policy-engine/policy-configuration/blocks/main/http-request-config/http-request-config.component.html +++ b/frontend/src/app/modules/policy-engine/policy-configuration/blocks/main/http-request-config/http-request-config.component.html @@ -2,7 +2,9 @@ @@ -38,12 +40,16 @@ @@ -52,12 +58,16 @@ @@ -78,4 +88,4 @@ -
- arrow_drop_down + + + Options
- arrow_drop_down + + + Headers
- add + + + Add header
- arrow_drop_down + + + Header {{i}} - delete + + +
\ No newline at end of file + diff --git a/frontend/src/app/modules/policy-engine/policy-configuration/blocks/main/switch-config/switch-config.component.html b/frontend/src/app/modules/policy-engine/policy-configuration/blocks/main/switch-config/switch-config.component.html index 37429139e0..bd562d60f9 100644 --- a/frontend/src/app/modules/policy-engine/policy-configuration/blocks/main/switch-config/switch-config.component.html +++ b/frontend/src/app/modules/policy-engine/policy-configuration/blocks/main/switch-config/switch-config.component.html @@ -1,8 +1,11 @@ - @@ -20,12 +23,16 @@ @@ -34,15 +41,19 @@ - + @@ -87,4 +98,4 @@ -
- arrow_drop_down + + + + Options
- arrow_drop_down + + + Conditions
- add + + + Add Condition
- arrow_drop_down + + + Condition {{i}}Condition {{ i }} - If ({{condition.value}}) - If Not({{condition.value}}) + If ({{ condition.value }}) + If Not({{ condition.value }}) Unconditional - delete + + +
\ No newline at end of file + diff --git a/frontend/src/app/modules/policy-engine/policy-configuration/blocks/report/report-item-config/report-item-config.component.html b/frontend/src/app/modules/policy-engine/policy-configuration/blocks/report/report-item-config/report-item-config.component.html index c9f9bf1605..a06cf48bdb 100644 --- a/frontend/src/app/modules/policy-engine/policy-configuration/blocks/report/report-item-config/report-item-config.component.html +++ b/frontend/src/app/modules/policy-engine/policy-configuration/blocks/report/report-item-config/report-item-config.component.html @@ -1,8 +1,13 @@ - @@ -27,7 +32,7 @@ @@ -35,7 +40,7 @@ @@ -57,7 +62,7 @@
+ (change)="onFileSelected($event, properties)" #fileUpload>
@@ -65,14 +70,16 @@
@@ -83,12 +90,16 @@
@@ -97,18 +108,22 @@ - + @@ -130,7 +145,7 @@ @@ -138,7 +153,7 @@ @@ -148,7 +163,9 @@ @@ -195,26 +212,36 @@ - - - + @@ -224,7 +251,7 @@ @@ -232,37 +259,47 @@ - - - + @@ -294,7 +331,7 @@ @@ -302,8 +339,8 @@ -
- arrow_drop_down + + + + + + Properties Visible + (blur)="onSave()">
Multiple + (change)="onMultipleChange()">
- arrow_drop_down + + + Dynamic Filters
- add + + + Add Dynamic Filter
- arrow_drop_down + + + Dynamic Filter {{i}}Dynamic Filter {{ i }} - {{properties.dynamicFilters[i].nextItemField}} {{properties.dynamicFilters[i].type}} - {{properties.dynamicFilters[i].field}} + {{ properties.dynamicFilters[i].nextItemField }} {{ properties.dynamicFilters[i].type }} + {{ properties.dynamicFilters[i].field }} - delete + + +
Field Path + (change)="onSave()">
Next Item Field Path + (change)="onSave()">
- arrow_drop_down + + + Common Variables
- arrow_drop_down + + + + Variables
- add + + + Add Variable
- arrow_drop_down + + + + Variable {{i}}Variable {{ i }} - delete + + +
Name + (blur)="onSave()">
Value + (change)="onSave()">
- arrow_drop_down + + + + Filters
- add + + + Add Filter
- arrow_drop_down + + + + Filter {{i}}Filter {{ i }} - {{properties.filters[i].field}} {{properties.filters[i].type}} {{properties.filters[i].value}} + class="not-editable-text"> + {{ properties.filters[i].field }} {{ properties.filters[i].type }} {{ properties.filters[i].value }} - delete + + +
Field + (change)="onSave()">
Value + (blur)="onSave()">
\ No newline at end of file + From 0625115bf124a51da851316b0deff9d9e40d212b Mon Sep 17 00:00:00 2001 From: Ihar Date: Wed, 6 Nov 2024 11:30:36 +0500 Subject: [PATCH 04/48] fix: policy edit styles[3141] --- frontend/src/app/app.component.scss | 2 +- .../compare-document.component.scss | 6 +- .../compare-module.component.css | 6 +- .../compare-policy.component.scss | 9 +- .../compare-record.component.scss | 10 +- .../compare-schema.component.css | 3 +- .../compare-tool/compare-tool.component.scss | 8 +- .../analytics/compare/compare.component.scss | 8 +- .../multi-compare-policy.component.scss | 11 +- .../search-policies.component.scss | 8 +- .../artifact-properties.component.css | 3 +- .../compare-viewer.component.scss | 4 +- .../select-menu/select-menu.component.css | 10 +- .../select-menu/select-menu.component.html | 2 +- .../common/step-tree/step-tree.component.scss | 8 +- .../contract-config.component.css | 17 ++- .../contract-config.component.html | 2 +- .../user-contract-config.component.css | 6 +- .../retire-pools-dialog.component.scss | 8 +- .../retire-requests-dialog.component.scss | 8 +- .../set-pool-dialog.component.scss | 8 +- .../user-retire-pools-dialog.component.scss | 8 +- ...user-retire-requests-dialog.component.scss | 8 +- .../invite-dialog.component.scss | 6 +- .../multi-policy-dialog.component.scss | 3 +- .../help-icon/help-icon.component.scss | 5 +- .../search-blocks.component.html | 2 +- .../search-blocks.component.scss | 16 +- .../modules-list/modules-list.component.css | 16 ++ .../modules-list/modules-list.component.html | 5 +- .../policies/policies.component.scss | 24 +-- .../calculate-config.component.html | 4 +- .../calculate-math-config.component.html | 4 +- .../aggregate-config.component.html | 6 +- .../document-validator-config.component.html | 4 +- .../document-viewer-config.component.html | 6 +- .../filters-addon-config.component.html | 4 +- .../request-addon-config.component.html | 4 +- .../request-config.component.html | 2 +- .../send-config/send-config.component.html | 4 +- .../send-config/send-config.component.scss | 5 +- .../source-addon-config.component.html | 4 +- .../timer-config/timer-config.component.html | 2 +- .../action-config.component.html | 10 +- .../button-config.component.html | 8 +- .../container-config.component.html | 2 +- .../http-request-config.component.html | 6 +- .../information-config.component.html | 2 +- .../roles-config/roles-config.component.html | 2 +- .../switch-config.component.html | 6 +- .../blocks/module/module.component.html | 4 +- .../report-item-config.component.html | 4 +- .../create-token-config.component.html | 4 +- .../mint-config/mint-config.component.html | 2 +- .../blocks/tool/tool.component.html | 6 +- .../common-properties.component.html | 10 +- .../common-properties.component.scss | 11 +- .../common-property.component.html | 6 +- .../common-property.component.scss | 5 +- .../json-properties.component.scss | 6 +- .../module-properties.component.html | 8 +- .../policy-configuration.component.html | 86 ++++++----- .../policy-configuration.component.scss | 122 +++++++++++----- .../policy-properties.component.html | 16 +- .../policy-settings.component.html | 4 +- .../policy-settings.component.scss | 10 +- .../policy-tree/policy-tree.component.html | 44 +++--- .../policy-tree/policy-tree.component.scss | 47 ++++-- .../documents-source-block.component.html | 6 +- .../documents-source-block.component.scss | 6 +- .../external-topic-block.component.scss | 5 +- .../group-manager-block.component.scss | 8 +- .../messages-report-block.component.scss | 17 ++- .../report-block/report-block.component.scss | 26 ++-- .../upload-document-block.component.scss | 5 +- .../policy-viewer.component.html | 7 +- .../policy-viewer.component.scss | 27 ++-- .../progress-tracker.component.scss | 6 +- .../policy-engine/services/block-icons.ts | 137 ++++++++++++------ .../tools-list/tools-list.component.scss | 29 ++-- .../copy-schema-dialog/copy-schema-dialog.css | 3 +- .../schema-configuration.component.scss | 6 +- .../schema-dialog.component.scss | 3 +- .../schema-field-configuration.component.scss | 3 +- .../schema-form-dialog.component.scss | 5 +- .../tags-create-dialog.component.scss | 3 +- .../tags-explorer-dialog.component.scss | 3 +- .../src/app/views/header/header.component.css | 9 +- .../app/views/header/header.component.html | 8 +- .../policy-guided-search.component.scss | 2 +- .../views/register/register.component.scss | 14 +- .../app/views/roles/roles-view.component.scss | 4 +- .../app/views/schemas/schemas.component.scss | 9 +- .../trust-chain/trust-chain.component.css | 17 ++- .../user-management.component.scss | 2 +- .../user-profile/user-profile.component.scss | 4 +- frontend/src/assets/images/icons/compare.svg | 7 +- .../src/assets/images/icons/policy-module.svg | 5 + frontend/src/styles.scss | 5 +- 99 files changed, 680 insertions(+), 431 deletions(-) create mode 100644 frontend/src/assets/images/icons/policy-module.svg diff --git a/frontend/src/app/app.component.scss b/frontend/src/app/app.component.scss index 1e3cfd0e8a..58214d5261 100644 --- a/frontend/src/app/app.component.scss +++ b/frontend/src/app/app.component.scss @@ -194,7 +194,7 @@ body { background: #f7f7f7; } - mat-icon { + i, svg { height: 28px; width: 28px; margin: 4px; diff --git a/frontend/src/app/modules/analytics/compare-document/compare-document.component.scss b/frontend/src/app/modules/analytics/compare-document/compare-document.component.scss index e58e992156..da3f809983 100644 --- a/frontend/src/app/modules/analytics/compare-document/compare-document.component.scss +++ b/frontend/src/app/modules/analytics/compare-document/compare-document.component.scss @@ -81,7 +81,7 @@ left: 3px; cursor: pointer; - mat-icon { + i, svg { font-size: 22px; position: absolute; left: 2px; @@ -179,7 +179,7 @@ line-height: 16px; overflow: hidden; - mat-icon { + i, svg { font-size: 16px; height: 16px; width: 16px; @@ -517,7 +517,7 @@ cursor: pointer; display: none; - mat-icon { + i, svg { position: absolute; pointer-events: none; left: -1px; diff --git a/frontend/src/app/modules/analytics/compare-module/compare-module.component.css b/frontend/src/app/modules/analytics/compare-module/compare-module.component.css index 4848d2bd00..b1f879802d 100644 --- a/frontend/src/app/modules/analytics/compare-module/compare-module.component.css +++ b/frontend/src/app/modules/analytics/compare-module/compare-module.component.css @@ -377,7 +377,8 @@ overflow: hidden; } -.block-icon mat-icon { +.block-icon i, +.block-icon svg { font-size: 16px; height: 16px; width: 16px; @@ -564,7 +565,8 @@ display: none; } -.report-collapse mat-icon { +.report-collapse i, +.report-collapse svg { position: absolute; pointer-events: none; left: -1px; diff --git a/frontend/src/app/modules/analytics/compare-policy/compare-policy.component.scss b/frontend/src/app/modules/analytics/compare-policy/compare-policy.component.scss index 7ef7ad068d..578530c252 100644 --- a/frontend/src/app/modules/analytics/compare-policy/compare-policy.component.scss +++ b/frontend/src/app/modules/analytics/compare-policy/compare-policy.component.scss @@ -165,7 +165,8 @@ cursor: pointer; } -.compare-btn mat-icon { +.compare-btn i, +.compare-btn svg { font-size: 22px; position: absolute; left: 2px; @@ -388,7 +389,8 @@ overflow: hidden; } -.block-icon mat-icon { +.block-icon i, +.block-icon svg { font-size: 16px; height: 16px; width: 16px; @@ -576,7 +578,8 @@ display: none; } -.report-collapse mat-icon { +.report-collapse i, +.report-collapse svg { position: absolute; pointer-events: none; left: -1px; diff --git a/frontend/src/app/modules/analytics/compare-record/compare-record.component.scss b/frontend/src/app/modules/analytics/compare-record/compare-record.component.scss index 53214049e2..58aa06cd74 100644 --- a/frontend/src/app/modules/analytics/compare-record/compare-record.component.scss +++ b/frontend/src/app/modules/analytics/compare-record/compare-record.component.scss @@ -19,7 +19,7 @@ span { color: #e70000; } - + &[total="100"] span { color: #008d0c; } @@ -97,7 +97,7 @@ left: 3px; cursor: pointer; - mat-icon { + i, svg { font-size: 22px; position: absolute; left: 2px; @@ -195,7 +195,7 @@ line-height: 16px; overflow: hidden; - mat-icon { + i, svg { font-size: 16px; height: 16px; width: 16px; @@ -541,7 +541,7 @@ cursor: pointer; display: none; - mat-icon { + i, svg { position: absolute; pointer-events: none; left: -1px; @@ -895,4 +895,4 @@ div { height: 1px; } -} \ No newline at end of file +} diff --git a/frontend/src/app/modules/analytics/compare-schema/compare-schema.component.css b/frontend/src/app/modules/analytics/compare-schema/compare-schema.component.css index a86878d6e7..87fbc07ce7 100644 --- a/frontend/src/app/modules/analytics/compare-schema/compare-schema.component.css +++ b/frontend/src/app/modules/analytics/compare-schema/compare-schema.component.css @@ -589,7 +589,8 @@ display: none; } -.report-collapse mat-icon { +.report-collapse i, +.report-collapse svg { position: absolute; pointer-events: none; left: -1px; diff --git a/frontend/src/app/modules/analytics/compare-tool/compare-tool.component.scss b/frontend/src/app/modules/analytics/compare-tool/compare-tool.component.scss index 07d840bf67..da3f809983 100644 --- a/frontend/src/app/modules/analytics/compare-tool/compare-tool.component.scss +++ b/frontend/src/app/modules/analytics/compare-tool/compare-tool.component.scss @@ -81,7 +81,7 @@ left: 3px; cursor: pointer; - mat-icon { + i, svg { font-size: 22px; position: absolute; left: 2px; @@ -179,7 +179,7 @@ line-height: 16px; overflow: hidden; - mat-icon { + i, svg { font-size: 16px; height: 16px; width: 16px; @@ -517,7 +517,7 @@ cursor: pointer; display: none; - mat-icon { + i, svg { position: absolute; pointer-events: none; left: -1px; @@ -871,4 +871,4 @@ div { height: 1px; } -} \ No newline at end of file +} diff --git a/frontend/src/app/modules/analytics/compare/compare.component.scss b/frontend/src/app/modules/analytics/compare/compare.component.scss index 4d0bc250ed..a060d699e6 100644 --- a/frontend/src/app/modules/analytics/compare/compare.component.scss +++ b/frontend/src/app/modules/analytics/compare/compare.component.scss @@ -131,7 +131,8 @@ } -.export-btn mat-icon { +.export-btn i, +.export-btn svg { position: absolute; left: 10px; top: 8px; @@ -156,7 +157,8 @@ pointer-events: none; } -.merge-back>div mat-icon { +.merge-back>div i, +.merge-back>div svg{ color: #707070; position: absolute; top: 3px; @@ -240,4 +242,4 @@ .content-result { min-width: 0px; } -} \ No newline at end of file +} diff --git a/frontend/src/app/modules/analytics/multi-compare-policy/multi-compare-policy.component.scss b/frontend/src/app/modules/analytics/multi-compare-policy/multi-compare-policy.component.scss index 59de304d3c..9b45dcbae6 100644 --- a/frontend/src/app/modules/analytics/multi-compare-policy/multi-compare-policy.component.scss +++ b/frontend/src/app/modules/analytics/multi-compare-policy/multi-compare-policy.component.scss @@ -191,7 +191,8 @@ cursor: pointer; } -.compare-btn mat-icon { +.compare-btn i, +.compare-btn svg { font-size: 22px; position: absolute; left: 2px; @@ -394,7 +395,8 @@ overflow: hidden; } -.block-icon mat-icon { +.block-icon i, +.block-icon svg { font-size: 16px; height: 16px; width: 16px; @@ -551,7 +553,8 @@ display: none; } -.report-collapse mat-icon { +.report-collapse i, +.report-collapse svg { position: absolute; pointer-events: none; left: -1px; @@ -763,7 +766,7 @@ &[value="50%"] { background: #ffb5b7; } - + &[value="51%"], &[value="52%"], &[value="53%"], &[value="54%"], &[value="55%"], &[value="56%"], &[value="57%"], &[value="58%"], &[value="59%"], &[value="60%"], &[value="61%"], &[value="62%"], &[value="63%"], &[value="64%"], &[value="65%"], &[value="66%"], &[value="67%"], &[value="68%"], &[value="69%"], &[value="70%"], &[value="71%"], &[value="72%"], &[value="73%"], &[value="74%"], &[value="75%"], &[value="76%"], &[value="77%"], &[value="78%"], &[value="79%"], diff --git a/frontend/src/app/modules/analytics/search-policies/search-policies.component.scss b/frontend/src/app/modules/analytics/search-policies/search-policies.component.scss index 1f02b85fe4..6931f29259 100644 --- a/frontend/src/app/modules/analytics/search-policies/search-policies.component.scss +++ b/frontend/src/app/modules/analytics/search-policies/search-policies.component.scss @@ -56,13 +56,15 @@ padding-right: 30px; } - .toolbar-btn mat-icon { + .toolbar-btn i, + .toolbar-btn svg { position: absolute; left: 14px; top: 10px; } - .toolbar-btn.add mat-icon { + .toolbar-btn.add i, + .toolbar-btn.add svg { font-size: 30px; left: 10px; top: 7px; @@ -268,4 +270,4 @@ pointer-events: none !important; } } -} \ No newline at end of file +} diff --git a/frontend/src/app/modules/artifact-engine/artifact-properties/artifact-properties.component.css b/frontend/src/app/modules/artifact-engine/artifact-properties/artifact-properties.component.css index a9e04df782..3ed8992161 100644 --- a/frontend/src/app/modules/artifact-engine/artifact-properties/artifact-properties.component.css +++ b/frontend/src/app/modules/artifact-engine/artifact-properties/artifact-properties.component.css @@ -55,7 +55,8 @@ cursor: pointer; } -.remove-prop mat-icon { +.remove-prop i, +.remove-prop svg { font-size: 30px; } diff --git a/frontend/src/app/modules/common/compare-viewer/compare-viewer.component.scss b/frontend/src/app/modules/common/compare-viewer/compare-viewer.component.scss index 95f1834e1f..390d25d84f 100644 --- a/frontend/src/app/modules/common/compare-viewer/compare-viewer.component.scss +++ b/frontend/src/app/modules/common/compare-viewer/compare-viewer.component.scss @@ -49,7 +49,7 @@ position: relative; cursor: pointer; - mat-icon { + i, svg { position: absolute; font-size: 20px; color: #f44336; @@ -208,4 +208,4 @@ fill: white; width: 16px; height: 16px; -} \ No newline at end of file +} diff --git a/frontend/src/app/modules/common/select-menu/select-menu.component.css b/frontend/src/app/modules/common/select-menu/select-menu.component.css index 2345141ca0..09ad0c040a 100644 --- a/frontend/src/app/modules/common/select-menu/select-menu.component.css +++ b/frontend/src/app/modules/common/select-menu/select-menu.component.css @@ -28,12 +28,14 @@ position: relative; } -.select-menu mat-icon { +.select-menu i, +.select-menu svg { position: absolute; right: 4px; - top: 5px; + height: 22px; + padding: 6px; + font-size: 12px; border-left: 1px solid #fff; - padding-left: 2px; pointer-events: none; } @@ -65,4 +67,4 @@ .select-menu-item:last-child { border-bottom: none; -} \ No newline at end of file +} diff --git a/frontend/src/app/modules/common/select-menu/select-menu.component.html b/frontend/src/app/modules/common/select-menu/select-menu.component.html index 4136356e6f..44562dbfc7 100644 --- a/frontend/src/app/modules/common/select-menu/select-menu.component.html +++ b/frontend/src/app/modules/common/select-menu/select-menu.component.html @@ -3,7 +3,7 @@ - +
diff --git a/frontend/src/app/modules/common/step-tree/step-tree.component.scss b/frontend/src/app/modules/common/step-tree/step-tree.component.scss index 949af83817..343c7044ec 100644 --- a/frontend/src/app/modules/common/step-tree/step-tree.component.scss +++ b/frontend/src/app/modules/common/step-tree/step-tree.component.scss @@ -17,7 +17,7 @@ background: rgba(6, 129, 238, 0.08); - i { + i, svg { padding: 4px; margin-right: 8px; width: 24px; @@ -59,7 +59,7 @@ padding-left: 24px; padding-right: 24px; - i { + i, svg { padding: 4px; margin-right: 8px; width: 24px; @@ -86,7 +86,7 @@ .current-node { background: rgba(6, 129, 238, 0.08); - i { + i, svg { padding: 4px; margin-right: 8px; width: 24px; @@ -117,4 +117,4 @@ .current-node .node-id { color: #3f51b5; -} \ No newline at end of file +} diff --git a/frontend/src/app/modules/contract-engine/configs/contract-config/contract-config.component.css b/frontend/src/app/modules/contract-engine/configs/contract-config/contract-config.component.css index 4afa481ded..b9d9061818 100644 --- a/frontend/src/app/modules/contract-engine/configs/contract-config/contract-config.component.css +++ b/frontend/src/app/modules/contract-engine/configs/contract-config/contract-config.component.css @@ -168,16 +168,19 @@ padding-right: 30px; } -.toolbar-btn mat-icon { +.toolbar-btn i, +.toolbar-btn svg { position: absolute; left: 14px; - top: 10px; + top: 12px; + font-size: 20px; } -.toolbar-btn.add mat-icon { - font-size: 30px; - left: 10px; - top: 7px; +.toolbar-btn.add i, +.toolbar-btn.add svg { + font-size: 20px; + left: 14px; + top: 12px; } .permissions { @@ -209,4 +212,4 @@ display: flex; justify-content: center; align-items: center; -} \ No newline at end of file +} diff --git a/frontend/src/app/modules/contract-engine/configs/contract-config/contract-config.component.html b/frontend/src/app/modules/contract-engine/configs/contract-config/contract-config.component.html index c44019bd2c..50c04a7d62 100644 --- a/frontend/src/app/modules/contract-engine/configs/contract-config/contract-config.component.html +++ b/frontend/src/app/modules/contract-engine/configs/contract-config/contract-config.component.html @@ -28,7 +28,7 @@ mat-raised-button> - + Import Contract
diff --git a/frontend/src/app/modules/contract-engine/configs/user-contract-config/user-contract-config.component.css b/frontend/src/app/modules/contract-engine/configs/user-contract-config/user-contract-config.component.css index 59641eca67..1dad76af87 100644 --- a/frontend/src/app/modules/contract-engine/configs/user-contract-config/user-contract-config.component.css +++ b/frontend/src/app/modules/contract-engine/configs/user-contract-config/user-contract-config.component.css @@ -70,13 +70,15 @@ padding-right: 30px; } -.toolbar-btn mat-icon { +.toolbar-btn i, +.toolbar-btn svg { position: absolute; left: 14px; top: 10px; } -.toolbar-btn.add mat-icon { +.toolbar-btn.add i, +.toolbar-btn.add svg { font-size: 30px; left: 10px; top: 7px; diff --git a/frontend/src/app/modules/contract-engine/dialogs/retire-pools-dialog/retire-pools-dialog.component.scss b/frontend/src/app/modules/contract-engine/dialogs/retire-pools-dialog/retire-pools-dialog.component.scss index c5d895ac1c..1a21991f80 100644 --- a/frontend/src/app/modules/contract-engine/dialogs/retire-pools-dialog/retire-pools-dialog.component.scss +++ b/frontend/src/app/modules/contract-engine/dialogs/retire-pools-dialog/retire-pools-dialog.component.scss @@ -58,7 +58,7 @@ color: rgb(71, 71, 71); - mat-icon { + i, svg { color: #3f51b5; } @@ -69,7 +69,7 @@ gap: 10px; font-weight: bold; - mat-icon { + i, svg { font-size: 30px; width: 30px; height: 30px; @@ -77,7 +77,7 @@ } &__count { - mat-icon { + i, svg { transform: translateX(-2px); } } @@ -87,7 +87,7 @@ :host ::ng-deep .pool-actions { display: flex; align-items: center; - mat-icon { + i, svg { font-size: 25px; width: 25px; height: 25px; diff --git a/frontend/src/app/modules/contract-engine/dialogs/retire-requests-dialog/retire-requests-dialog.component.scss b/frontend/src/app/modules/contract-engine/dialogs/retire-requests-dialog/retire-requests-dialog.component.scss index 1f3f27987f..5c2a56ad95 100644 --- a/frontend/src/app/modules/contract-engine/dialogs/retire-requests-dialog/retire-requests-dialog.component.scss +++ b/frontend/src/app/modules/contract-engine/dialogs/retire-requests-dialog/retire-requests-dialog.component.scss @@ -66,7 +66,7 @@ color: rgb(71, 71, 71); - mat-icon { + i, svg { color: #3f51b5; } @@ -78,7 +78,7 @@ gap: 10px; font-weight: bold; - mat-icon { + i, svg { font-size: 30px; width: 30px; height: 30px; @@ -86,7 +86,7 @@ } &__count { - mat-icon { + i, svg { transform: translateX(-2px); } } @@ -105,7 +105,7 @@ :host ::ng-deep .request-actions { display: flex; align-items: center; - mat-icon { + i, svg { font-size: 25px; width: 25px; height: 25px; diff --git a/frontend/src/app/modules/contract-engine/dialogs/set-pool-dialog/set-pool-dialog.component.scss b/frontend/src/app/modules/contract-engine/dialogs/set-pool-dialog/set-pool-dialog.component.scss index 9575946038..e18af6e59f 100644 --- a/frontend/src/app/modules/contract-engine/dialogs/set-pool-dialog/set-pool-dialog.component.scss +++ b/frontend/src/app/modules/contract-engine/dialogs/set-pool-dialog/set-pool-dialog.component.scss @@ -15,7 +15,7 @@ color: rgb(71, 71, 71); - mat-icon { + i, svg { color: #3f51b5; } @@ -27,7 +27,7 @@ font-weight: bold; height: 50px; - mat-icon { + i, svg { font-size: 30px; width: 30px; height: 30px; @@ -35,7 +35,7 @@ } &__count { - mat-icon { + i, svg { transform: translateX(-2px); } } @@ -56,7 +56,7 @@ color: var(--primary-color); cursor: pointer; - mat-icon { + i, svg { font-size: 50px; height: 50px; width: 50px; diff --git a/frontend/src/app/modules/contract-engine/dialogs/user-retire-pools-dialog/user-retire-pools-dialog.component.scss b/frontend/src/app/modules/contract-engine/dialogs/user-retire-pools-dialog/user-retire-pools-dialog.component.scss index c7caf19576..fd55d8515c 100644 --- a/frontend/src/app/modules/contract-engine/dialogs/user-retire-pools-dialog/user-retire-pools-dialog.component.scss +++ b/frontend/src/app/modules/contract-engine/dialogs/user-retire-pools-dialog/user-retire-pools-dialog.component.scss @@ -58,7 +58,7 @@ color: rgb(71, 71, 71); - mat-icon { + i, svg { color: #3f51b5; } @@ -69,7 +69,7 @@ gap: 10px; font-weight: bold; - mat-icon { + i, svg { font-size: 30px; width: 30px; height: 30px; @@ -77,7 +77,7 @@ } &__count { - mat-icon { + i, svg { transform: translateX(-2px); } } @@ -87,7 +87,7 @@ :host ::ng-deep .pool-actions { display: flex; align-items: center; - mat-icon { + i, svg { font-size: 25px; width: 25px; height: 25px; diff --git a/frontend/src/app/modules/contract-engine/dialogs/user-retire-requests-dialog/user-retire-requests-dialog.component.scss b/frontend/src/app/modules/contract-engine/dialogs/user-retire-requests-dialog/user-retire-requests-dialog.component.scss index a373203288..235c4addbb 100644 --- a/frontend/src/app/modules/contract-engine/dialogs/user-retire-requests-dialog/user-retire-requests-dialog.component.scss +++ b/frontend/src/app/modules/contract-engine/dialogs/user-retire-requests-dialog/user-retire-requests-dialog.component.scss @@ -64,7 +64,7 @@ color: rgb(71, 71, 71); - mat-icon { + i, svg { color: #3f51b5; } @@ -76,7 +76,7 @@ gap: 10px; font-weight: bold; - mat-icon { + i, svg { font-size: 30px; width: 30px; height: 30px; @@ -84,7 +84,7 @@ } &__count { - mat-icon { + i, svg { transform: translateX(-2px); } } @@ -103,7 +103,7 @@ :host ::ng-deep .request-actions { display: flex; align-items: center; - mat-icon { + i, svg { font-size: 25px; width: 25px; height: 25px; diff --git a/frontend/src/app/modules/policy-engine/dialogs/invite-dialog/invite-dialog.component.scss b/frontend/src/app/modules/policy-engine/dialogs/invite-dialog/invite-dialog.component.scss index 3cff9007f6..558a5d71a6 100644 --- a/frontend/src/app/modules/policy-engine/dialogs/invite-dialog/invite-dialog.component.scss +++ b/frontend/src/app/modules/policy-engine/dialogs/invite-dialog/invite-dialog.component.scss @@ -85,7 +85,8 @@ align-content: center; } -.g-dialog-title-btn mat-icon { +.g-dialog-title-btn i, +.g-dialog-title-btn svg { position: absolute; font-size: 32px; top: 7px; @@ -110,7 +111,8 @@ background: rgb(0 0 0 / 5%); } -.link-btn mat-icon { +.link-btn i, +.link-btn svg { position: absolute; left: 10px; top: 7px; diff --git a/frontend/src/app/modules/policy-engine/dialogs/multi-policy-dialog/multi-policy-dialog.component.scss b/frontend/src/app/modules/policy-engine/dialogs/multi-policy-dialog/multi-policy-dialog.component.scss index 0754ac6b1a..fe10a7929d 100644 --- a/frontend/src/app/modules/policy-engine/dialogs/multi-policy-dialog/multi-policy-dialog.component.scss +++ b/frontend/src/app/modules/policy-engine/dialogs/multi-policy-dialog/multi-policy-dialog.component.scss @@ -33,7 +33,8 @@ align-content: center; } -.g-dialog-title-btn mat-icon { +.g-dialog-title-btn i, +.g-dialog-title-btn svg,{ position: absolute; font-size: 32px; top: 7px; diff --git a/frontend/src/app/modules/policy-engine/helpers/help-icon/help-icon.component.scss b/frontend/src/app/modules/policy-engine/helpers/help-icon/help-icon.component.scss index 22928fa750..9d1ddee7e3 100644 --- a/frontend/src/app/modules/policy-engine/helpers/help-icon/help-icon.component.scss +++ b/frontend/src/app/modules/policy-engine/helpers/help-icon/help-icon.component.scss @@ -8,6 +8,7 @@ cursor: help; } -.help mat-icon { +.help i, +.help svg,{ font-size: 18px; -} \ No newline at end of file +} diff --git a/frontend/src/app/modules/policy-engine/helpers/search-blocks/search-blocks.component.html b/frontend/src/app/modules/policy-engine/helpers/search-blocks/search-blocks.component.html index de0b5c079e..e0896af1ab 100644 --- a/frontend/src/app/modules/policy-engine/helpers/search-blocks/search-blocks.component.html +++ b/frontend/src/app/modules/policy-engine/helpers/search-blocks/search-blocks.component.html @@ -31,7 +31,7 @@
- +
{{ group.name }}
diff --git a/frontend/src/app/modules/policy-engine/helpers/search-blocks/search-blocks.component.scss b/frontend/src/app/modules/policy-engine/helpers/search-blocks/search-blocks.component.scss index ed9c735a3c..ba97bfc159 100644 --- a/frontend/src/app/modules/policy-engine/helpers/search-blocks/search-blocks.component.scss +++ b/frontend/src/app/modules/policy-engine/helpers/search-blocks/search-blocks.component.scss @@ -52,7 +52,7 @@ padding-left: 44px; padding-right: 16px; - mat-icon { + i, svg { position: absolute; left: 11px; top: 9px; @@ -81,7 +81,8 @@ height: 76px; width: 76px; - & mat-icon { + & i, + & svg { color: var(--pc-active-icon-color); font-size: 40px; width: 40px; @@ -169,7 +170,7 @@ padding-left: 44px; padding-right: 16px; - mat-icon { + i, svg { position: absolute; left: 11px; top: 9px; @@ -235,7 +236,7 @@ width: 18px; height: 18px; - mat-icon { + i, svg { font-size: 18px; } } @@ -259,7 +260,8 @@ margin: 18px 30px 0px 18px; &[collapsed="true"] { - .details-expand mat-icon { + .details-expand i, + .details-expand svg { transform: rotate(-90deg); } @@ -283,7 +285,7 @@ width: 30px; height: 30px; - mat-icon { + i, svg { margin: 3px; pointer-events: none; } @@ -372,4 +374,4 @@ *[rate-color="green"] { color: #008d0c !important; } -} \ No newline at end of file +} diff --git a/frontend/src/app/modules/policy-engine/modules-list/modules-list.component.css b/frontend/src/app/modules/policy-engine/modules-list/modules-list.component.css index 359f561af5..f2e416dfda 100644 --- a/frontend/src/app/modules/policy-engine/modules-list/modules-list.component.css +++ b/frontend/src/app/modules/policy-engine/modules-list/modules-list.component.css @@ -388,3 +388,19 @@ button[disabled] { background-color: #ffffff !important; border: 1px solid #cdddfd; } + +.module-actions-buttons-container .pi { + margin-right: 8px; +} + +.module-actions-buttons-container .pi-file-import { + font-size: 18px; +} + +.module-actions-buttons-container .icon-style-compare { + margin-right: 6px; +} + +.module-actions-buttons-container svg.icon-style-compare { + fill: var(--color-primary); +} diff --git a/frontend/src/app/modules/policy-engine/modules-list/modules-list.component.html b/frontend/src/app/modules/policy-engine/modules-list/modules-list.component.html index 0bf3ce033b..1cd22c1409 100644 --- a/frontend/src/app/modules/policy-engine/modules-list/modules-list.component.html +++ b/frontend/src/app/modules/policy-engine/modules-list/modules-list.component.html @@ -38,7 +38,7 @@

Modules

class="toolbar-btn"> - + Import Modules [outlined]=true> - + Compare
diff --git a/frontend/src/app/modules/policy-engine/policies/policies.component.scss b/frontend/src/app/modules/policy-engine/policies/policies.component.scss index 8041787c00..a8fdfe0541 100644 --- a/frontend/src/app/modules/policy-engine/policies/policies.component.scss +++ b/frontend/src/app/modules/policy-engine/policies/policies.component.scss @@ -98,7 +98,8 @@ text-decoration: underline; } -.btn-settings mat-icon { +.btn-settings i, +.btn-settings svg { position: absolute; left: 0; top: -1px; @@ -243,8 +244,10 @@ box-shadow: 0px 0px 0px 5px #e1e7fa; } -.btn-icon-delete mat-icon, -.btn-icon-delete-des mat-icon { +.btn-icon-delete i, +.btn-icon-delete-des i, +.btn-icon-delete svg, +.btn-icon-delete-des svg{ font-size: 30px; position: absolute; left: 0; @@ -256,14 +259,16 @@ cursor: not-allowed; } -.btn-icon-edit mat-icon { +.btn-icon-edit i, +.btn-icon-edit svg { font-size: 30px; position: absolute; left: 0; top: 0px; } -.btn-icon-import mat-icon { +.btn-icon-import i, +.btn-icon-import svg { font-size: 32px; position: absolute; left: 0; @@ -312,7 +317,7 @@ position: relative; width: 220px; - mat-icon { + i, svg { color: #f44336; font-size: 26px; top: -2px; @@ -328,7 +333,7 @@ position: relative; width: 220px; - mat-icon { + i, svg { color: #b5b5b5; font-size: 26px; top: -2px; @@ -376,7 +381,8 @@ background: #3f51b5; } -.btn-icon-go mat-icon { +.btn-icon-go i, +.btn-icon-go svg { position: absolute; left: 50px; top: 6px; @@ -981,4 +987,4 @@ .p-dropdown-trigger-icon { color: var(--pc-wizard-color); } -} \ No newline at end of file +} diff --git a/frontend/src/app/modules/policy-engine/policy-configuration/blocks/calculate/calculate-config/calculate-config.component.html b/frontend/src/app/modules/policy-engine/policy-configuration/blocks/calculate/calculate-config/calculate-config.component.html index a2c516eb92..6fe2d0216a 100644 --- a/frontend/src/app/modules/policy-engine/policy-configuration/blocks/calculate/calculate-config/calculate-config.component.html +++ b/frontend/src/app/modules/policy-engine/policy-configuration/blocks/calculate/calculate-config/calculate-config.component.html @@ -14,7 +14,7 @@ [attr.collapse]="propHidden.inputSchemaGroup"> - + Input Schema @@ -50,7 +50,7 @@ [attr.collapse]="propHidden.outputSchemaGroup"> - + Output Schema diff --git a/frontend/src/app/modules/policy-engine/policy-configuration/blocks/calculate/calculate-math-config/calculate-math-config.component.html b/frontend/src/app/modules/policy-engine/policy-configuration/blocks/calculate/calculate-math-config/calculate-math-config.component.html index 120ef830bb..775ebe5c0b 100644 --- a/frontend/src/app/modules/policy-engine/policy-configuration/blocks/calculate/calculate-math-config/calculate-math-config.component.html +++ b/frontend/src/app/modules/policy-engine/policy-configuration/blocks/calculate/calculate-math-config/calculate-math-config.component.html @@ -4,7 +4,7 @@ [attr.collapse]="propHidden.equationsGroup"> - + Equations @@ -22,7 +22,7 @@ [attr.collapse]="propHidden.equations[i]"> - + Equation {{ i }} diff --git a/frontend/src/app/modules/policy-engine/policy-configuration/blocks/documents/aggregate-config/aggregate-config.component.html b/frontend/src/app/modules/policy-engine/policy-configuration/blocks/documents/aggregate-config/aggregate-config.component.html index 2068898347..40d16cece3 100644 --- a/frontend/src/app/modules/policy-engine/policy-configuration/blocks/documents/aggregate-config/aggregate-config.component.html +++ b/frontend/src/app/modules/policy-engine/policy-configuration/blocks/documents/aggregate-config/aggregate-config.component.html @@ -5,7 +5,7 @@ [attr.collapse]="propHidden.options"> - + Options @@ -37,7 +37,7 @@ [attr.collapse]="propHidden.options || propHidden.expressionsGroup"> - + Expressions @@ -55,7 +55,7 @@ [attr.collapse]="propHidden.expressions[i]"> - + Expression {{ i }} diff --git a/frontend/src/app/modules/policy-engine/policy-configuration/blocks/documents/document-validator-config/document-validator-config.component.html b/frontend/src/app/modules/policy-engine/policy-configuration/blocks/documents/document-validator-config/document-validator-config.component.html index 501fb8bddd..afbee7897e 100644 --- a/frontend/src/app/modules/policy-engine/policy-configuration/blocks/documents/document-validator-config/document-validator-config.component.html +++ b/frontend/src/app/modules/policy-engine/policy-configuration/blocks/documents/document-validator-config/document-validator-config.component.html @@ -61,7 +61,7 @@ [attr.collapse]="propHidden.conditionsGroup"> - + Conditions @@ -79,7 +79,7 @@ [attr.collapse]="propHidden.conditions[i]"> - + Condition {{ i }} diff --git a/frontend/src/app/modules/policy-engine/policy-configuration/blocks/documents/document-viewer-config/document-viewer-config.component.html b/frontend/src/app/modules/policy-engine/policy-configuration/blocks/documents/document-viewer-config/document-viewer-config.component.html index 51433e7a59..45622c034f 100644 --- a/frontend/src/app/modules/policy-engine/policy-configuration/blocks/documents/document-viewer-config/document-viewer-config.component.html +++ b/frontend/src/app/modules/policy-engine/policy-configuration/blocks/documents/document-viewer-config/document-viewer-config.component.html @@ -4,7 +4,7 @@ - + UI @@ -29,7 +29,7 @@ [attr.collapse]="propHidden.fieldsGroup"> - + Fields @@ -47,7 +47,7 @@ [attr.collapse]="propHidden.fields[i]"> - + {{ getFieldName(field, i) }} diff --git a/frontend/src/app/modules/policy-engine/policy-configuration/blocks/documents/filters-addon-config/filters-addon-config.component.html b/frontend/src/app/modules/policy-engine/policy-configuration/blocks/documents/filters-addon-config/filters-addon-config.component.html index 7cb85da31f..023254584c 100644 --- a/frontend/src/app/modules/policy-engine/policy-configuration/blocks/documents/filters-addon-config/filters-addon-config.component.html +++ b/frontend/src/app/modules/policy-engine/policy-configuration/blocks/documents/filters-addon-config/filters-addon-config.component.html @@ -32,7 +32,7 @@ [attr.collapse]="propHidden.dropdownGroup"> - + Dropdown Options @@ -60,7 +60,7 @@ - + UI diff --git a/frontend/src/app/modules/policy-engine/policy-configuration/blocks/documents/request-addon-config/request-addon-config.component.html b/frontend/src/app/modules/policy-engine/policy-configuration/blocks/documents/request-addon-config/request-addon-config.component.html index 3259c350a6..7b815b5587 100644 --- a/frontend/src/app/modules/policy-engine/policy-configuration/blocks/documents/request-addon-config/request-addon-config.component.html +++ b/frontend/src/app/modules/policy-engine/policy-configuration/blocks/documents/request-addon-config/request-addon-config.component.html @@ -61,7 +61,7 @@ [attr.collapse]="propHidden.preset"> - + Preset @@ -81,7 +81,7 @@ [attr.collapse]="propHidden.presetFields[i]"> - + Field {{ i }} diff --git a/frontend/src/app/modules/policy-engine/policy-configuration/blocks/documents/request-config/request-config.component.html b/frontend/src/app/modules/policy-engine/policy-configuration/blocks/documents/request-config/request-config.component.html index df1303a477..42f3f85773 100644 --- a/frontend/src/app/modules/policy-engine/policy-configuration/blocks/documents/request-config/request-config.component.html +++ b/frontend/src/app/modules/policy-engine/policy-configuration/blocks/documents/request-config/request-config.component.html @@ -39,7 +39,7 @@ - + UI diff --git a/frontend/src/app/modules/policy-engine/policy-configuration/blocks/documents/send-config/send-config.component.html b/frontend/src/app/modules/policy-engine/policy-configuration/blocks/documents/send-config/send-config.component.html index 257c6825a6..ba89e86c24 100644 --- a/frontend/src/app/modules/policy-engine/policy-configuration/blocks/documents/send-config/send-config.component.html +++ b/frontend/src/app/modules/policy-engine/policy-configuration/blocks/documents/send-config/send-config.component.html @@ -97,7 +97,7 @@ [attr.collapse]="propHidden.optionGroup"> - + Options @@ -116,7 +116,7 @@ [attr.collapse]="propHidden.options[i]"> - + Option {{ i }} diff --git a/frontend/src/app/modules/policy-engine/policy-configuration/blocks/documents/send-config/send-config.component.scss b/frontend/src/app/modules/policy-engine/policy-configuration/blocks/documents/send-config/send-config.component.scss index c30e694c65..cee910fdd9 100644 --- a/frontend/src/app/modules/policy-engine/policy-configuration/blocks/documents/send-config/send-config.component.scss +++ b/frontend/src/app/modules/policy-engine/policy-configuration/blocks/documents/send-config/send-config.component.scss @@ -2,7 +2,8 @@ color: #6166ff; } -.mat-option-link mat-icon { +.mat-option-link i, +.mat-option-link svg, { margin-right: 2px; top: -2px; left: -4px; @@ -15,4 +16,4 @@ max-width: 8px !important; display: inline !important; color: #f00 !important; -} \ No newline at end of file +} diff --git a/frontend/src/app/modules/policy-engine/policy-configuration/blocks/documents/source-addon-config/source-addon-config.component.html b/frontend/src/app/modules/policy-engine/policy-configuration/blocks/documents/source-addon-config/source-addon-config.component.html index cabb644048..ace3a481a5 100644 --- a/frontend/src/app/modules/policy-engine/policy-configuration/blocks/documents/source-addon-config/source-addon-config.component.html +++ b/frontend/src/app/modules/policy-engine/policy-configuration/blocks/documents/source-addon-config/source-addon-config.component.html @@ -81,7 +81,7 @@ [attr.collapse]="propHidden.filtersGroup"> - + Filters @@ -99,7 +99,7 @@ [attr.collapse]="propHidden.filters[i]"> - + Field {{ i }} diff --git a/frontend/src/app/modules/policy-engine/policy-configuration/blocks/documents/timer-config/timer-config.component.html b/frontend/src/app/modules/policy-engine/policy-configuration/blocks/documents/timer-config/timer-config.component.html index 46ae8e7b32..462ee0c7b0 100644 --- a/frontend/src/app/modules/policy-engine/policy-configuration/blocks/documents/timer-config/timer-config.component.html +++ b/frontend/src/app/modules/policy-engine/policy-configuration/blocks/documents/timer-config/timer-config.component.html @@ -4,7 +4,7 @@ - + Options diff --git a/frontend/src/app/modules/policy-engine/policy-configuration/blocks/main/action-config/action-config.component.html b/frontend/src/app/modules/policy-engine/policy-configuration/blocks/main/action-config/action-config.component.html index 60a2bc27c7..a6ea930d16 100644 --- a/frontend/src/app/modules/policy-engine/policy-configuration/blocks/main/action-config/action-config.component.html +++ b/frontend/src/app/modules/policy-engine/policy-configuration/blocks/main/action-config/action-config.component.html @@ -16,7 +16,7 @@ - + UI @@ -42,7 +42,7 @@ [attr.collapse]="propHidden.optionsGroup"> - + Options @@ -60,7 +60,7 @@ [attr.collapse]="propHidden.options[i]"> - + Options {{ i }} {{ option.name }} @@ -126,7 +126,7 @@ [attr.collapse]="propHidden.dropdownGroup"> - + Dropdown Options @@ -169,7 +169,7 @@ [attr.collapse]="propHidden.fileGroup"> - + File Options diff --git a/frontend/src/app/modules/policy-engine/policy-configuration/blocks/main/button-config/button-config.component.html b/frontend/src/app/modules/policy-engine/policy-configuration/blocks/main/button-config/button-config.component.html index ed1df1f90d..ebe97df900 100644 --- a/frontend/src/app/modules/policy-engine/policy-configuration/blocks/main/button-config/button-config.component.html +++ b/frontend/src/app/modules/policy-engine/policy-configuration/blocks/main/button-config/button-config.component.html @@ -13,7 +13,7 @@ - + Buttons @@ -31,7 +31,7 @@ [attr.collapse]="propHidden.buttons[i].collapse"> - + Button {{ i }} @@ -121,7 +121,7 @@ [attr.collapse]="propHidden.buttons[i].filtersGroup"> - + Filters Option {{ i }} @@ -141,7 +141,7 @@ [attr.collapse]="propHidden.buttons[i][j]"> - + Filter {{ j }} diff --git a/frontend/src/app/modules/policy-engine/policy-configuration/blocks/main/container-config/container-config.component.html b/frontend/src/app/modules/policy-engine/policy-configuration/blocks/main/container-config/container-config.component.html index ea610d4720..7f698332c4 100644 --- a/frontend/src/app/modules/policy-engine/policy-configuration/blocks/main/container-config/container-config.component.html +++ b/frontend/src/app/modules/policy-engine/policy-configuration/blocks/main/container-config/container-config.component.html @@ -12,7 +12,7 @@ - + UI diff --git a/frontend/src/app/modules/policy-engine/policy-configuration/blocks/main/http-request-config/http-request-config.component.html b/frontend/src/app/modules/policy-engine/policy-configuration/blocks/main/http-request-config/http-request-config.component.html index 2862880c72..f0521efbec 100644 --- a/frontend/src/app/modules/policy-engine/policy-configuration/blocks/main/http-request-config/http-request-config.component.html +++ b/frontend/src/app/modules/policy-engine/policy-configuration/blocks/main/http-request-config/http-request-config.component.html @@ -4,7 +4,7 @@ - + Options @@ -42,7 +42,7 @@ [attr.collapse]="propHidden.options || propHidden.conditionsGroup"> - + Headers @@ -60,7 +60,7 @@ [attr.collapse]="propHidden.conditions[i]"> - + Header {{i}} diff --git a/frontend/src/app/modules/policy-engine/policy-configuration/blocks/main/information-config/information-config.component.html b/frontend/src/app/modules/policy-engine/policy-configuration/blocks/main/information-config/information-config.component.html index 21b99cd7ac..3d190b56ce 100644 --- a/frontend/src/app/modules/policy-engine/policy-configuration/blocks/main/information-config/information-config.component.html +++ b/frontend/src/app/modules/policy-engine/policy-configuration/blocks/main/information-config/information-config.component.html @@ -3,7 +3,7 @@ - + UI diff --git a/frontend/src/app/modules/policy-engine/policy-configuration/blocks/main/roles-config/roles-config.component.html b/frontend/src/app/modules/policy-engine/policy-configuration/blocks/main/roles-config/roles-config.component.html index 72f348dcf8..7764a6afc8 100644 --- a/frontend/src/app/modules/policy-engine/policy-configuration/blocks/main/roles-config/roles-config.component.html +++ b/frontend/src/app/modules/policy-engine/policy-configuration/blocks/main/roles-config/roles-config.component.html @@ -21,7 +21,7 @@ - + UI diff --git a/frontend/src/app/modules/policy-engine/policy-configuration/blocks/main/switch-config/switch-config.component.html b/frontend/src/app/modules/policy-engine/policy-configuration/blocks/main/switch-config/switch-config.component.html index bd562d60f9..dba4aa73a6 100644 --- a/frontend/src/app/modules/policy-engine/policy-configuration/blocks/main/switch-config/switch-config.component.html +++ b/frontend/src/app/modules/policy-engine/policy-configuration/blocks/main/switch-config/switch-config.component.html @@ -5,7 +5,7 @@ [attr.collapse]="propHidden.options"> - + Options @@ -25,7 +25,7 @@ [attr.collapse]="propHidden.options || propHidden.conditionsGroup"> - + Conditions @@ -43,7 +43,7 @@ [attr.collapse]="propHidden.conditions[i]"> - + Condition {{ i }} diff --git a/frontend/src/app/modules/policy-engine/policy-configuration/blocks/module/module.component.html b/frontend/src/app/modules/policy-engine/policy-configuration/blocks/module/module.component.html index 9e701504a7..020783e6c1 100644 --- a/frontend/src/app/modules/policy-engine/policy-configuration/blocks/module/module.component.html +++ b/frontend/src/app/modules/policy-engine/policy-configuration/blocks/module/module.component.html @@ -2,7 +2,7 @@ - + Variables @@ -12,7 +12,7 @@ - + {{ item.name }} diff --git a/frontend/src/app/modules/policy-engine/policy-configuration/blocks/report/report-item-config/report-item-config.component.html b/frontend/src/app/modules/policy-engine/policy-configuration/blocks/report/report-item-config/report-item-config.component.html index a06cf48bdb..b7492a33f7 100644 --- a/frontend/src/app/modules/policy-engine/policy-configuration/blocks/report/report-item-config/report-item-config.component.html +++ b/frontend/src/app/modules/policy-engine/policy-configuration/blocks/report/report-item-config/report-item-config.component.html @@ -7,7 +7,7 @@ - + Properties @@ -110,7 +110,7 @@ [attr.collapse]="propHidden.dynamicFilters[i]"> - + Dynamic Filter {{ i }} diff --git a/frontend/src/app/modules/policy-engine/policy-configuration/blocks/tokens/create-token-config/create-token-config.component.html b/frontend/src/app/modules/policy-engine/policy-configuration/blocks/tokens/create-token-config/create-token-config.component.html index fde171e591..96bf5746a8 100644 --- a/frontend/src/app/modules/policy-engine/policy-configuration/blocks/tokens/create-token-config/create-token-config.component.html +++ b/frontend/src/app/modules/policy-engine/policy-configuration/blocks/tokens/create-token-config/create-token-config.component.html @@ -4,7 +4,7 @@ - + Properties @@ -34,7 +34,7 @@ - + UI diff --git a/frontend/src/app/modules/policy-engine/policy-configuration/blocks/tokens/mint-config/mint-config.component.html b/frontend/src/app/modules/policy-engine/policy-configuration/blocks/tokens/mint-config/mint-config.component.html index 28004fcb8a..f3565b6162 100644 --- a/frontend/src/app/modules/policy-engine/policy-configuration/blocks/tokens/mint-config/mint-config.component.html +++ b/frontend/src/app/modules/policy-engine/policy-configuration/blocks/tokens/mint-config/mint-config.component.html @@ -3,7 +3,7 @@ - + Properties diff --git a/frontend/src/app/modules/policy-engine/policy-configuration/blocks/tool/tool.component.html b/frontend/src/app/modules/policy-engine/policy-configuration/blocks/tool/tool.component.html index f99a225def..2ebd66fd78 100644 --- a/frontend/src/app/modules/policy-engine/policy-configuration/blocks/tool/tool.component.html +++ b/frontend/src/app/modules/policy-engine/policy-configuration/blocks/tool/tool.component.html @@ -3,7 +3,7 @@ - + Tool @@ -47,7 +47,7 @@ - + Variables @@ -57,7 +57,7 @@ - + {{ item.name }} diff --git a/frontend/src/app/modules/policy-engine/policy-configuration/common-properties/common-properties.component.html b/frontend/src/app/modules/policy-engine/policy-configuration/common-properties/common-properties.component.html index ebd38394b6..5028d694d2 100644 --- a/frontend/src/app/modules/policy-engine/policy-configuration/common-properties/common-properties.component.html +++ b/frontend/src/app/modules/policy-engine/policy-configuration/common-properties/common-properties.component.html @@ -9,7 +9,7 @@ - + About @@ -78,7 +78,7 @@ - + Meta Data @@ -176,7 +176,7 @@ - + Properties @@ -207,7 +207,7 @@ - +
@@ -289,7 +289,7 @@ - +
diff --git a/frontend/src/app/modules/policy-engine/policy-configuration/common-properties/common-properties.component.scss b/frontend/src/app/modules/policy-engine/policy-configuration/common-properties/common-properties.component.scss index 8b2d06c1fa..db68d60d55 100644 --- a/frontend/src/app/modules/policy-engine/policy-configuration/common-properties/common-properties.component.scss +++ b/frontend/src/app/modules/policy-engine/policy-configuration/common-properties/common-properties.component.scss @@ -20,7 +20,8 @@ color: #6166ff; } -.mat-option-link mat-icon { +.mat-option-link i, +.mat-option-link svg,{ margin-right: 2px; top: -2px; left: -4px; @@ -44,7 +45,8 @@ top: 4px; } -.prop-input-event mat-icon { +.prop-input-event i, +.prop-input-event svg { position: relative !important; font-size: 20px !important; height: 20px; @@ -65,7 +67,8 @@ top: 4px; } -.prop-output-icon mat-icon { +.prop-output-icon i, +.prop-output-icon svg { position: relative !important; font-size: 20px !important; height: 20px; @@ -86,4 +89,4 @@ .current-elm { color: #5161e1 !important; font-weight: 500; -} \ No newline at end of file +} diff --git a/frontend/src/app/modules/policy-engine/policy-configuration/common-property/common-property.component.html b/frontend/src/app/modules/policy-engine/policy-configuration/common-property/common-property.component.html index 719e1d1970..b272c9e4a3 100644 --- a/frontend/src/app/modules/policy-engine/policy-configuration/common-property/common-property.component.html +++ b/frontend/src/app/modules/policy-engine/policy-configuration/common-property/common-property.component.html @@ -2,7 +2,7 @@ - + * {{ property.label }} @@ -23,7 +23,7 @@ - + * {{ property.label }} @@ -41,7 +41,7 @@ - + {{ property.items.label }} {{ i }} diff --git a/frontend/src/app/modules/policy-engine/policy-configuration/common-property/common-property.component.scss b/frontend/src/app/modules/policy-engine/policy-configuration/common-property/common-property.component.scss index 2c45ca0aa1..ea4c128bb1 100644 --- a/frontend/src/app/modules/policy-engine/policy-configuration/common-property/common-property.component.scss +++ b/frontend/src/app/modules/policy-engine/policy-configuration/common-property/common-property.component.scss @@ -12,7 +12,8 @@ width: 40px; } -.select-block-icon mat-icon { +.select-block-icon i, +.select-block-icon svg { position: absolute; left: 1px; top: 9px; @@ -36,4 +37,4 @@ .prop-checkbox { position: relative; top: 3px; -} \ No newline at end of file +} diff --git a/frontend/src/app/modules/policy-engine/policy-configuration/json-properties/json-properties.component.scss b/frontend/src/app/modules/policy-engine/policy-configuration/json-properties/json-properties.component.scss index 998cd403ca..c473377f8d 100644 --- a/frontend/src/app/modules/policy-engine/policy-configuration/json-properties/json-properties.component.scss +++ b/frontend/src/app/modules/policy-engine/policy-configuration/json-properties/json-properties.component.scss @@ -54,6 +54,10 @@ width: 70px; border: 1px solid #e7e7e7; border-radius: 4px; + + .pi { + margin: 4px; + } } .toolbar-btn:hover { @@ -116,4 +120,4 @@ justify-items: center; justify-content: center; align-content: center; -} \ No newline at end of file +} diff --git a/frontend/src/app/modules/policy-engine/policy-configuration/module-properties/module-properties.component.html b/frontend/src/app/modules/policy-engine/policy-configuration/module-properties/module-properties.component.html index 7a4f086776..d03fd518cd 100644 --- a/frontend/src/app/modules/policy-engine/policy-configuration/module-properties/module-properties.component.html +++ b/frontend/src/app/modules/policy-engine/policy-configuration/module-properties/module-properties.component.html @@ -13,7 +13,7 @@ - + Module @@ -49,7 +49,7 @@ - + Variable @@ -139,7 +139,7 @@ - + Input Events @@ -194,7 +194,7 @@ - + Output Events diff --git a/frontend/src/app/modules/policy-engine/policy-configuration/policy-configuration/policy-configuration.component.html b/frontend/src/app/modules/policy-engine/policy-configuration/policy-configuration/policy-configuration.component.html index 678ae018d8..e1137a434f 100644 --- a/frontend/src/app/modules/policy-engine/policy-configuration/policy-configuration/policy-configuration.component.html +++ b/frontend/src/app/modules/policy-engine/policy-configuration/policy-configuration/policy-configuration.component.html @@ -286,7 +286,7 @@ openType !== 'Sub' && !currentBlock?.isModule && !currentBlock?.isRoot"> -
+
@@ -295,7 +295,7 @@
@@ -452,14 +452,16 @@ (click)="select('components')"> - + + Blocks
- + Modules
handyman--> + svgClass="icon-style-handyman" class="icon-style-handyman"> Tools
@@ -486,7 +488,7 @@ - +
- + - + - + Favorites ({{ componentsList.favorites.length }})
@@ -516,14 +518,14 @@ (click)="onAdd(item)" >
- + {{ item.name }}
- + {{ item.name }} @@ -544,10 +546,10 @@
- + - + UI Components ({{ componentsList.uiComponents.length }})
@@ -587,10 +589,10 @@
- + - + Server Components ({{ componentsList.serverBlocks.length }})
@@ -624,10 +626,10 @@ [attr.collapsed]="options.addonsGroup">
- + - + Addons ({{ componentsList.addons.length }})
@@ -670,10 +672,10 @@
- + - + unGrouped
@@ -727,9 +729,9 @@ >
- + - + Favorites @@ -741,7 +743,7 @@ [attr.block-type]="item.header" (click)="onAddModule(item)">
-
{{ item.name }} @@ -750,7 +752,7 @@
-
{{ item.name }} @@ -774,9 +776,9 @@ [attr.readonly]="disableModuleMenu">
- + - + Default Modules ({{ modulesList.defaultModules.length }})
@@ -787,7 +789,7 @@
-
{{ item.name }} @@ -796,7 +798,7 @@
-
{{ item.name }} @@ -817,10 +819,10 @@ [attr.readonly]="disableModuleMenu">
- + - + Custom models ({{ modulesList.customModules.length }})
@@ -832,8 +834,8 @@
- +
{{ item.name }}
@@ -842,8 +844,8 @@
- +
{{ item.name }} @@ -873,9 +875,9 @@ [attr.readonly]="disableToolMenu">
- + - + Tools ({{ modulesList.customTools.length }})
@@ -938,13 +940,14 @@ style="width: 100px;margin-right: 6px" > - + Policy
- Module
@@ -963,7 +966,7 @@ (click)="onOpenModule(item)" > - {{ item.localTag }}
@@ -1086,7 +1089,10 @@ [attr.collapse-bottom]="options.rightBottomMenu" > - + +
- + Tree
diff --git a/frontend/src/app/modules/policy-engine/policy-configuration/policy-configuration/policy-configuration.component.scss b/frontend/src/app/modules/policy-engine/policy-configuration/policy-configuration/policy-configuration.component.scss index e60a49cdaa..bd8b3d848d 100644 --- a/frontend/src/app/modules/policy-engine/policy-configuration/policy-configuration/policy-configuration.component.scss +++ b/frontend/src/app/modules/policy-engine/policy-configuration/policy-configuration/policy-configuration.component.scss @@ -57,6 +57,7 @@ .action-color { color: var(--pc-active-icon-color); + fill: var(--pc-active-icon-color); } .no-action-color { @@ -290,6 +291,14 @@ } } + .top-toolbar-btn.long_title_svg { + padding-top: 6px; + } + + .top-toolbar-btn.long_title_i { + padding-top: 10px; + } + .top-toolbar-group, .top-toolbar-btn { display: flex; @@ -423,6 +432,7 @@ .pi { position: absolute; top: 22px; + left: 2px; font-size: 14px; } } @@ -538,10 +548,10 @@ .components-search-icon { position: absolute; - top: 9px; - right: 5px; + top: 12px; + right: 16px; color: var(--pc-border-color); - font-size: 18px; + font-size: 14px; } } @@ -570,9 +580,9 @@ .components-group-name-icon { color: var(--pc-favorite-color); position: absolute; - left: 22px; - top: 7px; - font-size: 22px; + left: 26px; + top: 12px; + font-size: 14px; } &:hover { @@ -581,17 +591,19 @@ } .components-group-collapse { + width: 16px; position: absolute; - left: 0px; - top: 6px; + left: 4px; + top: 12px; display: block; pointer-events: all; } .components-group-open { + width: 16px; position: absolute; - left: 0px; - top: 6px; + left: 4px; + top: 12px; display: none; pointer-events: all; } @@ -599,7 +611,7 @@ .components-group-item { position: relative; width: 100%; - max-width: 220px; + max-width: 100%; height: 32px; overflow: hidden; @@ -632,14 +644,15 @@ } .component-btn { - height: 32px; + top: 5px; + height: 22px; position: relative; - padding: 7px 32px 7px 46px; + padding: 2px 32px 7px 46px; box-sizing: border-box; color: var(--pc-active-icon-color); cursor: pointer; user-select: none; - max-width: 220px; + max-width: 100%; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; @@ -659,7 +672,7 @@ right: 6px; color: var(--pc-background-color); cursor: pointer; - font-size: 22px; + font-size: 16px; &[favorite="true"] { color: var(--pc-favorite-color) !important; @@ -692,7 +705,7 @@ top: 0px; right: 0px; - mat-icon { + i, svg { top: 3px; right: 6px; cursor: pointer; @@ -706,6 +719,12 @@ opacity: 0.6; } } + + svg.icon-style-policy-module, + svg.icon-style-handyman { + width: 18px; + padding-bottom: 5px; + } } } @@ -784,6 +803,8 @@ overflow: hidden; white-space: nowrap; text-overflow: ellipsis; + display: grid; + grid-template-columns: 30px 130px; &:hover { background: var(--pc-tabs-hover-color); @@ -794,19 +815,22 @@ cursor: default !important; } - mat-icon { + svg { position: absolute; left: 5px; top: 6px; font-size: 18px; height: 20px; - width: 20px; + width: 28px; } span { - padding-left: 30px; + padding-top: 1px; + padding-left: 10px; position: relative; - top: 1px; + display: grid; + align-items: center; + font-size: 15px; } &.tab-header-icon { @@ -829,6 +853,16 @@ display: none; } } + + .icon-style-article { + svg { + fill: var(--pc-active-icon-color); + } + } + + .icon-style-handyman { + fill: var(--pc-event-color); + } } } @@ -853,7 +887,7 @@ background: var(--pc-tabs-hover-color); } - mat-icon { + i, svg { position: absolute; left: 4px; top: 5px; @@ -914,7 +948,9 @@ flex: none; &.tab-header-icon { - padding: 6px 16px 6px 32px; + //padding: 6px 16px 6px 32px; + display: grid; + grid-template-columns: 30px auto !important; } } } @@ -943,13 +979,19 @@ overflow: hidden; cursor: pointer; box-sizing: border-box; - padding: 3px; border-left: 1px solid var(--pc-border-color); color: #555; + display: grid; + justify-content: center; + align-content: center; &:hover { background: var(--pc-tabs-hover-color); } + + i, svg { + font-size: 22px; + } } .theme-legends-container { @@ -1029,9 +1071,9 @@ cursor: pointer; user-select: none; - mat-icon { + i, svg { position: absolute; - left: -1px; + //left: -1px; top: 1px; height: 20px; width: 20px; @@ -1039,10 +1081,16 @@ color: var(--pc-header-color); } - &[collapse="true"] mat-icon { - transform: rotate(-90deg); + &[collapse="false"] i, + &[collapse="false"] svg { top: 5px; } + + &[collapse="true"] i, + &[collapse="true"] svg { + transform: rotate(-90deg); + //top: 5px; + } } .cellCollapse { @@ -1301,7 +1349,7 @@ width: 100%; min-width: 175px; - mat-icon { + i, svg { position: absolute; left: 1px; top: -1px; @@ -1309,6 +1357,11 @@ pointer-events: none; } + i { + font-size: 14px; + margin: 4px; + } + span { pointer-events: none; } @@ -1330,7 +1383,7 @@ color: var(--pc-del-color); cursor: pointer; - mat-icon { + i, svg { font-size: 20px; } @@ -1345,7 +1398,7 @@ color: #e30101; cursor: pointer; - mat-icon { + i, svg { font-size: 20px; } @@ -1437,7 +1490,8 @@ overflow: hidden !important; } - .prop-icon mat-icon { + .prop-icon i, + .prop-icon svg { position: relative !important; font-size: 20px !important; } @@ -1481,8 +1535,10 @@ position: relative; } - .prop-icon-output-event mat-icon, - .prop-icon-input-event mat-icon { + .prop-icon-output-event i, + .prop-icon-input-event i, + .prop-icon-output-event svg, + .prop-icon-input-event svg{ position: relative !important; font-size: 18px !important; top: 0px; diff --git a/frontend/src/app/modules/policy-engine/policy-configuration/policy-properties/policy-properties.component.html b/frontend/src/app/modules/policy-engine/policy-configuration/policy-properties/policy-properties.component.html index cc86991481..ee39481c28 100644 --- a/frontend/src/app/modules/policy-engine/policy-configuration/policy-properties/policy-properties.component.html +++ b/frontend/src/app/modules/policy-engine/policy-configuration/policy-properties/policy-properties.component.html @@ -8,7 +8,7 @@ [attr.collapse]="propHidden.metaData"> - + Policy @@ -92,7 +92,7 @@ [attr.collapse]="propHidden.categorization"> - + Categorization @@ -184,7 +184,7 @@ [attr.collapse]="propHidden.rolesGroup"> - + Roles @@ -225,7 +225,7 @@ + class="pi pi-caret-down"> {{ role }} @@ -249,7 +249,7 @@ + class="pi pi-caret-down"> {{ step.name || ('Step #' + (s + 1)) }} @@ -324,7 +324,7 @@ [attr.collapse]="propHidden.groupsGroup[i]"> - + Group @@ -413,7 +413,7 @@ [attr.collapse]="propHidden.topicsGroup[i]"> - + Topic @@ -498,7 +498,7 @@ [attr.collapse]="propHidden.tokensGroup[i]"> - + Token diff --git a/frontend/src/app/modules/policy-engine/policy-configuration/policy-settings/policy-settings.component.html b/frontend/src/app/modules/policy-engine/policy-configuration/policy-settings/policy-settings.component.html index b07bb4bafc..37af80deb8 100644 --- a/frontend/src/app/modules/policy-engine/policy-configuration/policy-settings/policy-settings.component.html +++ b/frontend/src/app/modules/policy-engine/policy-configuration/policy-settings/policy-settings.component.html @@ -97,13 +97,13 @@
- +
#{{ i + 1 }}
- +
diff --git a/frontend/src/app/modules/policy-engine/policy-configuration/policy-settings/policy-settings.component.scss b/frontend/src/app/modules/policy-engine/policy-configuration/policy-settings/policy-settings.component.scss index f7ad5fa619..9a4e35f5ba 100644 --- a/frontend/src/app/modules/policy-engine/policy-configuration/policy-settings/policy-settings.component.scss +++ b/frontend/src/app/modules/policy-engine/policy-configuration/policy-settings/policy-settings.component.scss @@ -59,7 +59,8 @@ height: 76px; width: 76px; - & mat-icon { + & i, + & svg { color: var(--pc-active-icon-color); font-size: 40px; width: 40px; @@ -142,7 +143,7 @@ padding-left: 44px; padding-right: 16px; - mat-icon { + i, svg { position: absolute; left: 11px; top: 9px; @@ -170,7 +171,7 @@ color: var(--pc-active-icon-color); border-radius: 6px; - mat-icon { + i, svg { position: absolute; left: 12px; top: 4px; @@ -238,7 +239,8 @@ cursor: pointer; color: var(--pc-header-color); - & mat-icon { + & i, + & svg { position: absolute; left: 10px; top: 6px; diff --git a/frontend/src/app/modules/policy-engine/policy-configuration/policy-tree/policy-tree.component.html b/frontend/src/app/modules/policy-engine/policy-configuration/policy-tree/policy-tree.component.html index 80e58e7a6b..d4c43cdc65 100644 --- a/frontend/src/app/modules/policy-engine/policy-configuration/policy-tree/policy-tree.component.html +++ b/frontend/src/app/modules/policy-engine/policy-configuration/policy-tree/policy-tree.component.html @@ -15,12 +15,12 @@ >
- + - + - +
@@ -41,9 +41,9 @@ [attr.deprecated]="item.deprecated" >
- + - +
@@ -51,8 +51,8 @@
- +
@@ -109,22 +109,22 @@
@@ -155,7 +156,7 @@ Group: {{ userGroup }} / Role: {{ userRole }}
- +
diff --git a/frontend/src/app/modules/policy-engine/policy-viewer/policy-viewer/policy-viewer.component.scss b/frontend/src/app/modules/policy-engine/policy-viewer/policy-viewer/policy-viewer.component.scss index b354c3837b..ae1f05b767 100644 --- a/frontend/src/app/modules/policy-engine/policy-viewer/policy-viewer/policy-viewer.component.scss +++ b/frontend/src/app/modules/policy-engine/policy-viewer/policy-viewer/policy-viewer.component.scss @@ -56,7 +56,8 @@ a.go-back-link { text-overflow: ellipsis; } -a.go-back-link mat-icon { +a.go-back-link i, +a.go-back-link svg { color: #707070; position: absolute; top: 12px; @@ -241,8 +242,10 @@ a.go-back-link mat-icon { color: #fff; } -.content[status="DEMO"] .go-back-link mat-icon, -.content[status="DRY-RUN"] .go-back-link mat-icon { +.content[status="DEMO"] .go-back-link i, +.content[status="DRY-RUN"] .go-back-link i, +.content[status="DEMO"] .go-back-link svg, +.content[status="DRY-RUN"] .go-back-link svg { color: #fff; } @@ -302,6 +305,10 @@ a.go-back-link mat-icon { background: rgb(252 252 252); border: 1px solid rgb(220 220 220); box-sizing: border-box; + + .icon-style-restart_alt { + fill: #3f51b5; + } } .dry-run-group-btn span, @@ -356,11 +363,12 @@ a.go-back-link mat-icon { border-left: 1px solid rgb(220 220 220); } -.dry-run-group-btn .expand-group mat-icon { +.dry-run-group-btn .expand-group i, +.dry-run-group-btn .expand-group svg { position: absolute; - top: 2px; - font-size: 27px; - left: -5px; + top: 9px; + font-size: 14px; + left: 2px; } .record-btn { @@ -479,7 +487,8 @@ a.go-back-link mat-icon { text-decoration: underline; } -.btn-settings mat-icon { +.btn-settings i, +.btn-settings svg { position: absolute; left: 0px; top: 2px; @@ -768,4 +777,4 @@ a.go-back-link mat-icon { .policy-additional-info-container { display: none !important; } -} \ No newline at end of file +} diff --git a/frontend/src/app/modules/policy-engine/policy-viewer/progress-tracker/progress-tracker.component.scss b/frontend/src/app/modules/policy-engine/policy-viewer/progress-tracker/progress-tracker.component.scss index 4d60f30406..e87d74de92 100644 --- a/frontend/src/app/modules/policy-engine/policy-viewer/progress-tracker/progress-tracker.component.scss +++ b/frontend/src/app/modules/policy-engine/policy-viewer/progress-tracker/progress-tracker.component.scss @@ -81,7 +81,7 @@ height: 56px; padding: 8px 24px; - i { + i, svg { padding: 4px; margin-right: 8px; width: 24px; @@ -111,7 +111,7 @@ background: rgba(6, 129, 238, 0.08) !important; } - i { + i, svg { border-radius: 24px; border: 1px solid var(--color-grey-4, #AAB7C4); background: var(--color-grey-2, #EFF3F7); @@ -143,7 +143,7 @@ .step-item.active { background: rgba(6, 129, 238, 0.08); - i { + i, svg { padding: 4px; margin-right: 8px; width: 24px; diff --git a/frontend/src/app/modules/policy-engine/services/block-icons.ts b/frontend/src/app/modules/policy-engine/services/block-icons.ts index 33216cfe52..4f83926106 100644 --- a/frontend/src/app/modules/policy-engine/services/block-icons.ts +++ b/frontend/src/app/modules/policy-engine/services/block-icons.ts @@ -1,55 +1,106 @@ import { BlockType } from '@guardian/interfaces' const BlockIcons: { [type: string]: string } = {}; -BlockIcons[BlockType.Container] = 'tab'; -BlockIcons[BlockType.Step] = 'vertical_split'; -BlockIcons[BlockType.PolicyRoles] = 'manage_accounts'; -BlockIcons[BlockType.GroupManagerBlock] = 'groups'; -BlockIcons[BlockType.Information] = 'info'; -BlockIcons[BlockType.Action] = 'flash_on'; -BlockIcons[BlockType.ButtonBlock] = 'radio_button_checked'; -BlockIcons[BlockType.ButtonBlockAddon] = 'radio_button_checked'; +// BlockIcons[BlockType.Container] = 'tab'; +// BlockIcons[BlockType.Step] = 'vertical_split'; +// BlockIcons[BlockType.PolicyRoles] = 'manage_accounts'; +// BlockIcons[BlockType.GroupManagerBlock] = 'groups'; +// BlockIcons[BlockType.Information] = 'info'; +// BlockIcons[BlockType.Action] = 'flash_on'; +// BlockIcons[BlockType.ButtonBlock] = 'radio_button_checked'; +// BlockIcons[BlockType.ButtonBlockAddon] = 'radio_button_checked'; +// BlockIcons[BlockType.DropdownBlockAddon] = 'list'; +// BlockIcons[BlockType.Switch] = 'rule'; +// BlockIcons[BlockType.HttpRequest] = 'http'; +// BlockIcons[BlockType.DocumentsViewer] = 'table_view'; +// BlockIcons[BlockType.Request] = 'dynamic_form'; +// BlockIcons[BlockType.RequestBlockAddon] = 'dynamic_form'; +// BlockIcons[BlockType.Upload] = 'dynamic_form'; +// BlockIcons[BlockType.MultiSignBlock] = 'done_all'; +// BlockIcons[BlockType.SendToGuardian] = 'send'; +// BlockIcons[BlockType.ExternalData] = 'cloud'; +// BlockIcons[BlockType.ExternalTopic] = 'cloud'; +// BlockIcons[BlockType.AggregateDocument] = 'calendar_month'; +// BlockIcons[BlockType.ReassigningBlock] = 'content_copy'; +// BlockIcons[BlockType.RevokeBlock] = 'restart_alt'; +// BlockIcons[BlockType.RevocationBlock] = 'restart_alt'; +// BlockIcons[BlockType.SetRelationshipsBlock] = 'settings'; +// BlockIcons[BlockType.SplitBlock] = 'content_cut'; +// BlockIcons[BlockType.FiltersAddon] = 'filter_alt'; +// BlockIcons[BlockType.DocumentsSourceAddon] = 'source'; +// BlockIcons[BlockType.PaginationAddon] = 'pages'; +// BlockIcons[BlockType.HistoryAddon] = 'history'; +// BlockIcons[BlockType.SelectiveAttributes] = 'rule_folder'; +// BlockIcons[BlockType.TimerBlock] = 'schedule'; +// BlockIcons[BlockType.DocumentValidatorBlock] = 'task_alt'; +// BlockIcons[BlockType.CreateToken] = 'token'; +// BlockIcons[BlockType.Mint] = 'paid'; +// BlockIcons[BlockType.Wipe] = 'delete'; +// BlockIcons[BlockType.TokenActionBlock] = 'generating_tokens'; +// BlockIcons[BlockType.TokenConfirmationBlock] = 'key'; +// BlockIcons[BlockType.ImpactAddon] = 'receipt'; +// BlockIcons[BlockType.Calculate] = 'bar_chart'; +// BlockIcons[BlockType.CustomLogicBlock] = 'bar_chart'; +// BlockIcons[BlockType.CalculateMathAddon] = 'calculate'; +// BlockIcons[BlockType.CalculateMathVariables] = '123'; +// BlockIcons[BlockType.MessagesReportBlock] = 'addchart'; +// BlockIcons[BlockType.Report] = 'addchart'; +// BlockIcons[BlockType.ReportItem] = 'list_alt'; +// BlockIcons[BlockType.TagsManager] = 'sell'; +// BlockIcons[BlockType.NotificationBlock] = 'notifications'; +// BlockIcons[BlockType.ExtractDataBlock] = 'find_in_page'; +// BlockIcons[BlockType.Tool] = 'handyman'; +// BlockIcons[BlockType.Module] = 'folder'; + +BlockIcons[BlockType.Container] = 'folder-open'; +BlockIcons[BlockType.Step] = 'sort-alt'; +BlockIcons[BlockType.PolicyRoles] = 'users'; +BlockIcons[BlockType.GroupManagerBlock] = 'users'; +BlockIcons[BlockType.Information] = 'info-circle'; +BlockIcons[BlockType.Action] = 'bolt'; +BlockIcons[BlockType.ButtonBlock] = 'circle-on'; +BlockIcons[BlockType.ButtonBlockAddon] = 'circle-on'; BlockIcons[BlockType.DropdownBlockAddon] = 'list'; -BlockIcons[BlockType.Switch] = 'rule'; -BlockIcons[BlockType.HttpRequest] = 'http'; -BlockIcons[BlockType.DocumentsViewer] = 'table_view'; -BlockIcons[BlockType.Request] = 'dynamic_form'; -BlockIcons[BlockType.RequestBlockAddon] = 'dynamic_form'; -BlockIcons[BlockType.Upload] = 'dynamic_form'; -BlockIcons[BlockType.MultiSignBlock] = 'done_all'; +BlockIcons[BlockType.Switch] = 'sliders-h'; +BlockIcons[BlockType.HttpRequest] = 'globe'; +BlockIcons[BlockType.DocumentsViewer] = 'table'; +BlockIcons[BlockType.Request] = 'file'; +BlockIcons[BlockType.RequestBlockAddon] = 'file'; +BlockIcons[BlockType.Upload] = 'upload'; +BlockIcons[BlockType.MultiSignBlock] = 'check-square'; BlockIcons[BlockType.SendToGuardian] = 'send'; BlockIcons[BlockType.ExternalData] = 'cloud'; BlockIcons[BlockType.ExternalTopic] = 'cloud'; -BlockIcons[BlockType.AggregateDocument] = 'calendar_month'; -BlockIcons[BlockType.ReassigningBlock] = 'content_copy'; -BlockIcons[BlockType.RevokeBlock] = 'restart_alt'; -BlockIcons[BlockType.RevocationBlock] = 'restart_alt'; -BlockIcons[BlockType.SetRelationshipsBlock] = 'settings'; -BlockIcons[BlockType.SplitBlock] = 'content_cut'; -BlockIcons[BlockType.FiltersAddon] = 'filter_alt'; -BlockIcons[BlockType.DocumentsSourceAddon] = 'source'; -BlockIcons[BlockType.PaginationAddon] = 'pages'; +BlockIcons[BlockType.AggregateDocument] = 'calendar'; +BlockIcons[BlockType.ReassigningBlock] = 'copy'; +BlockIcons[BlockType.RevokeBlock] = 'refresh'; +BlockIcons[BlockType.RevocationBlock] = 'refresh'; +BlockIcons[BlockType.SetRelationshipsBlock] = 'cog'; +BlockIcons[BlockType.SplitBlock] = 'clone'; +BlockIcons[BlockType.FiltersAddon] = 'filter'; +BlockIcons[BlockType.DocumentsSourceAddon] = 'database'; +BlockIcons[BlockType.PaginationAddon] = 'clone'; BlockIcons[BlockType.HistoryAddon] = 'history'; -BlockIcons[BlockType.SelectiveAttributes] = 'rule_folder'; -BlockIcons[BlockType.TimerBlock] = 'schedule'; -BlockIcons[BlockType.DocumentValidatorBlock] = 'task_alt'; -BlockIcons[BlockType.CreateToken] = 'token'; -BlockIcons[BlockType.Mint] = 'paid'; -BlockIcons[BlockType.Wipe] = 'delete'; -BlockIcons[BlockType.TokenActionBlock] = 'generating_tokens'; +BlockIcons[BlockType.SelectiveAttributes] = 'folder'; +BlockIcons[BlockType.TimerBlock] = 'clock'; +BlockIcons[BlockType.DocumentValidatorBlock] = 'check-circle'; +BlockIcons[BlockType.CreateToken] = 'dollar'; +BlockIcons[BlockType.Mint] = 'money-bill'; +BlockIcons[BlockType.Wipe] = 'trash'; +BlockIcons[BlockType.TokenActionBlock] = 'key'; BlockIcons[BlockType.TokenConfirmationBlock] = 'key'; -BlockIcons[BlockType.ImpactAddon] = 'receipt'; -BlockIcons[BlockType.Calculate] = 'bar_chart'; -BlockIcons[BlockType.CustomLogicBlock] = 'bar_chart'; -BlockIcons[BlockType.CalculateMathAddon] = 'calculate'; -BlockIcons[BlockType.CalculateMathVariables] = '123'; -BlockIcons[BlockType.MessagesReportBlock] = 'addchart'; -BlockIcons[BlockType.Report] = 'addchart'; -BlockIcons[BlockType.ReportItem] = 'list_alt'; -BlockIcons[BlockType.TagsManager] = 'sell'; -BlockIcons[BlockType.NotificationBlock] = 'notifications'; -BlockIcons[BlockType.ExtractDataBlock] = 'find_in_page'; -BlockIcons[BlockType.Tool] = 'handyman'; +BlockIcons[BlockType.ImpactAddon] = 'file'; +BlockIcons[BlockType.Calculate] = 'chart-bar'; +BlockIcons[BlockType.CustomLogicBlock] = 'chart-bar'; +BlockIcons[BlockType.CalculateMathAddon] = 'calculator'; +BlockIcons[BlockType.CalculateMathVariables] = 'calculator'; +BlockIcons[BlockType.MessagesReportBlock] = 'chart-line'; +BlockIcons[BlockType.Report] = 'chart-line'; +BlockIcons[BlockType.ReportItem] = 'list'; +BlockIcons[BlockType.TagsManager] = 'tags'; +BlockIcons[BlockType.NotificationBlock] = 'bell'; +BlockIcons[BlockType.ExtractDataBlock] = 'search'; +BlockIcons[BlockType.Tool] = 'wrench'; BlockIcons[BlockType.Module] = 'folder'; export default BlockIcons; diff --git a/frontend/src/app/modules/policy-engine/tools-list/tools-list.component.scss b/frontend/src/app/modules/policy-engine/tools-list/tools-list.component.scss index 08ec1291e9..93922f84b7 100644 --- a/frontend/src/app/modules/policy-engine/tools-list/tools-list.component.scss +++ b/frontend/src/app/modules/policy-engine/tools-list/tools-list.component.scss @@ -88,7 +88,8 @@ text-decoration: underline; } -.btn-settings mat-icon { +.btn-settings i, +.btn-settings svg { position: absolute; left: 0; top: -1px; @@ -220,8 +221,10 @@ color: #f44336; } -.btn-icon-delete mat-icon, -.btn-icon-delete-des mat-icon { +.btn-icon-delete i, +.btn-icon-delete-des i, +.btn-icon-delete svg, +.btn-icon-delete-des svg { font-size: 30px; position: absolute; left: 0; @@ -235,14 +238,16 @@ pointer-events: none; } -.btn-icon-edit mat-icon { +.btn-icon-edit i, +.btn-icon-edit svg { font-size: 30px; position: absolute; left: 0; top: 0px; } -.btn-icon-import mat-icon { +.btn-icon-import i, +.btn-icon-import svg { font-size: 32px; position: absolute; left: 0; @@ -272,7 +277,8 @@ background: #3f51b5; } -.btn-icon-go mat-icon { +.btn-icon-go i, +.btn-icon-go svg { position: absolute; left: 50px; top: 6px; @@ -308,13 +314,15 @@ padding-right: 30px; } -.toolbar-btn mat-icon { +.toolbar-btn i, +.toolbar-btn svg { position: absolute; left: 14px; top: 10px; } -.toolbar-btn.add mat-icon { +.toolbar-btn.add i, +.toolbar-btn.add svg { font-size: 30px; left: 10px; top: 7px; @@ -375,7 +383,8 @@ background: #f0f0f0; } -.btn-menu mat-icon { +.btn-menu i, +.btn-menu svg { position: absolute; left: 3px; top: 5px; @@ -855,4 +864,4 @@ .margin-0 { margin: 0; -} \ No newline at end of file +} diff --git a/frontend/src/app/modules/schema-engine/copy-schema-dialog/copy-schema-dialog.css b/frontend/src/app/modules/schema-engine/copy-schema-dialog/copy-schema-dialog.css index 3bd89b30f4..77a7a77a4d 100644 --- a/frontend/src/app/modules/schema-engine/copy-schema-dialog/copy-schema-dialog.css +++ b/frontend/src/app/modules/schema-engine/copy-schema-dialog/copy-schema-dialog.css @@ -44,7 +44,8 @@ textarea { background-color: unset; } -:host .restore-data button mat-icon { +:host .restore-data button i, +:host .restore-data button svg { margin-left: 5px; } diff --git a/frontend/src/app/modules/schema-engine/schema-configuration/schema-configuration.component.scss b/frontend/src/app/modules/schema-engine/schema-configuration/schema-configuration.component.scss index d0f3fdfe78..e26dd03cb6 100644 --- a/frontend/src/app/modules/schema-engine/schema-configuration/schema-configuration.component.scss +++ b/frontend/src/app/modules/schema-engine/schema-configuration/schema-configuration.component.scss @@ -99,7 +99,8 @@ form { font-size: 25px; } -.custom-fields-remove mat-icon { +.custom-fields-remove i, +.custom-fields-remove svg { font-size: 30px; } @@ -299,7 +300,8 @@ form { color: #efc900; } -.custom-field-required-warn mat-icon { +.custom-field-required-warn i, +.custom-field-required-warn svg { margin-right: 5px; } diff --git a/frontend/src/app/modules/schema-engine/schema-dialog/schema-dialog.component.scss b/frontend/src/app/modules/schema-engine/schema-dialog/schema-dialog.component.scss index 38567aa673..b2f1b48a2c 100644 --- a/frontend/src/app/modules/schema-engine/schema-dialog/schema-dialog.component.scss +++ b/frontend/src/app/modules/schema-engine/schema-dialog/schema-dialog.component.scss @@ -39,7 +39,8 @@ textarea { background-color: unset; } -:host .restore-data button mat-icon { +:host .restore-data button i, +:host .restore-data button svg { margin-left: 5px; } diff --git a/frontend/src/app/modules/schema-engine/schema-field-configuration/schema-field-configuration.component.scss b/frontend/src/app/modules/schema-engine/schema-field-configuration/schema-field-configuration.component.scss index e1a9b79188..afcc795f45 100644 --- a/frontend/src/app/modules/schema-engine/schema-field-configuration/schema-field-configuration.component.scss +++ b/frontend/src/app/modules/schema-engine/schema-field-configuration/schema-field-configuration.component.scss @@ -150,7 +150,8 @@ font-size: 25px; } -.custom-fields-remove mat-icon { +.custom-fields-remove i, +.custom-fields-remove svg { font-size: 30px; } diff --git a/frontend/src/app/modules/schema-engine/schema-form-dialog/schema-form-dialog.component.scss b/frontend/src/app/modules/schema-engine/schema-form-dialog/schema-form-dialog.component.scss index d7c448377a..b36fe52eb6 100644 --- a/frontend/src/app/modules/schema-engine/schema-form-dialog/schema-form-dialog.component.scss +++ b/frontend/src/app/modules/schema-engine/schema-form-dialog/schema-form-dialog.component.scss @@ -46,7 +46,8 @@ textarea { background-color: unset; } -:host .restore-data button mat-icon { +:host .restore-data button i, +:host .restore-data button svg { margin-left: 5px; } @@ -55,4 +56,4 @@ textarea { padding: 0px 0px 0px 0px; overflow-y: hidden; margin: 25px 8px 25px 2px; -} \ No newline at end of file +} diff --git a/frontend/src/app/modules/tag-engine/tags-create-dialog/tags-create-dialog.component.scss b/frontend/src/app/modules/tag-engine/tags-create-dialog/tags-create-dialog.component.scss index cb3b8afc00..dacd3e0c41 100644 --- a/frontend/src/app/modules/tag-engine/tags-create-dialog/tags-create-dialog.component.scss +++ b/frontend/src/app/modules/tag-engine/tags-create-dialog/tags-create-dialog.component.scss @@ -131,7 +131,8 @@ form { background: #f1f1f1; } -.delete-artifact mat-icon { +.delete-artifact i, +.delete-artifact svg{ position: absolute; color: #f44336; top: 12px; diff --git a/frontend/src/app/modules/tag-engine/tags-explorer-dialog/tags-explorer-dialog.component.scss b/frontend/src/app/modules/tag-engine/tags-explorer-dialog/tags-explorer-dialog.component.scss index e3c0c3c87a..9dda6278a5 100644 --- a/frontend/src/app/modules/tag-engine/tags-explorer-dialog/tags-explorer-dialog.component.scss +++ b/frontend/src/app/modules/tag-engine/tags-explorer-dialog/tags-explorer-dialog.component.scss @@ -39,7 +39,8 @@ border-radius: 4px; } -.synchronization-time .synchronization-time-update mat-icon { +.synchronization-time .synchronization-time-update i, +.synchronization-time .synchronization-time-update svg { position: absolute; pointer-events: none; font-size: 22px; diff --git a/frontend/src/app/views/header/header.component.css b/frontend/src/app/views/header/header.component.css index e19bc99468..566092f198 100644 --- a/frontend/src/app/views/header/header.component.css +++ b/frontend/src/app/views/header/header.component.css @@ -94,11 +94,13 @@ color: #fff; } -.admin-panel+.user-info-icon mat-icon { +.admin-panel+.user-info-icon i, +.admin-panel+.user-info-icon svg { color: #fff; } -.user-content-info mat-icon { +.user-content-info i, +.user-content-info svg { color: rgba(255, 255, 255, 0.54); width: 48px; height: 48px; @@ -298,7 +300,8 @@ a[hidden="true"] { padding: 0px 30px 0px 20px; } -.nav-menu-item mat-icon { +.nav-menu-item i, +.nav-menu-item svg { position: absolute; right: 0px; top: 0; diff --git a/frontend/src/app/views/header/header.component.html b/frontend/src/app/views/header/header.component.html index d4e2514f75..457379c75e 100644 --- a/frontend/src/app/views/header/header.component.html +++ b/frontend/src/app/views/header/header.component.html @@ -16,21 +16,21 @@ Policies - +
@@ -127,7 +127,7 @@ class="nav-list-item"> Tokens - +
diff --git a/frontend/src/app/views/policy-search/policy-guided-search/policy-guided-search.component.scss b/frontend/src/app/views/policy-search/policy-guided-search/policy-guided-search.component.scss index 785deb135f..15cd27e8c5 100644 --- a/frontend/src/app/views/policy-search/policy-guided-search/policy-guided-search.component.scss +++ b/frontend/src/app/views/policy-search/policy-guided-search/policy-guided-search.component.scss @@ -120,7 +120,7 @@ padding: 12px 76px 12px 16px; } - i { + i, svg { padding-right: 16px; color: #B0B5BA; } diff --git a/frontend/src/app/views/register/register.component.scss b/frontend/src/app/views/register/register.component.scss index e8e690152e..9e3fb0950c 100644 --- a/frontend/src/app/views/register/register.component.scss +++ b/frontend/src/app/views/register/register.component.scss @@ -33,7 +33,7 @@ form, top: 55%; transform: translate(-50%, -65%); /*box-shadow: 0px 2px 4px -1px rgb(0 0 0 / 20%), 0px 4px 5px 0px rgb(0 0 0 / 14%), 0px 1px 10px 0px rgb(0 0 0 / 12%);*/ - + background: #fff; border-radius: 30px; width: 839px; @@ -59,7 +59,7 @@ form, align-items: flex-end; width: 100%; - mat-icon { + i, svg { font-size: 30px; margin-right: 4px; } @@ -177,13 +177,13 @@ mat-form-field { @media (max-width: 810px) { /* Role Select Menu */ - + .role-select-step { width: 90%; height: 70vh; padding: 40px; } - + .role-select-step button:not(.close-button) { width: 81vw !important; padding: 0 !important; @@ -191,7 +191,7 @@ mat-form-field { border-radius: 5px; background: none !important; } - + .role-select-step ::ng-deep.mat-button-wrapper { display: grid; grid-template-columns: 1fr 2fr; @@ -215,7 +215,7 @@ mat-form-field { overflow-wrap: break-word; max-width: 100px; } - + .role-select-step ::ng-deep.mat-button-wrapper .role-description { grid-column: 2; font-size: 13px; @@ -225,7 +225,7 @@ mat-form-field { color: #999; text-align: start; } - + /* Credential Creation */ .credential-creation { diff --git a/frontend/src/app/views/roles/roles-view.component.scss b/frontend/src/app/views/roles/roles-view.component.scss index 134802a909..981a6c91bd 100644 --- a/frontend/src/app/views/roles/roles-view.component.scss +++ b/frontend/src/app/views/roles/roles-view.component.scss @@ -175,7 +175,7 @@ padding: 10px 76px 10px 16px; } - i { + i, svg { padding-right: 16px; color: #B0B5BA; } @@ -568,4 +568,4 @@ .p-field-input:focus { border: 1px solid var(--color-primary); } -} \ No newline at end of file +} diff --git a/frontend/src/app/views/schemas/schemas.component.scss b/frontend/src/app/views/schemas/schemas.component.scss index c8cd81a9fa..ae8352be2e 100644 --- a/frontend/src/app/views/schemas/schemas.component.scss +++ b/frontend/src/app/views/schemas/schemas.component.scss @@ -238,7 +238,8 @@ a { text-decoration: underline; } -.btn-settings mat-icon { +.btn-settings i, +.btn-settings svg { position: absolute; left: 0px; top: 2px; @@ -477,11 +478,13 @@ a { border-color: var(--color-primary); } -.schema-menu-btn mat-icon { +.schema-menu-btn i, +.schema-menu-btn svg { color: var(--color-primary); } -.schema-menu-btn-del mat-icon { +.schema-menu-btn-del i, +.schema-menu-btn-del svg { color: var(--color-accent-red-1); } diff --git a/frontend/src/app/views/trust-chain/trust-chain.component.css b/frontend/src/app/views/trust-chain/trust-chain.component.css index 1f78440fc0..e4c49eac49 100644 --- a/frontend/src/app/views/trust-chain/trust-chain.component.css +++ b/frontend/src/app/views/trust-chain/trust-chain.component.css @@ -90,7 +90,8 @@ a[disabled="true"]{ display: flex; } -.container > mat-icon { +.container > i, +.container > svg { font-size: 50px; flex: 0 0 80px; align-self: center; @@ -110,7 +111,8 @@ a[disabled="true"]{ box-shadow: inset 0px 0px 5px 0px rgb(0 0 0 / 10%); } -.scroll-right mat-icon { +.scroll-right i, +.scroll-right svg { font-size: 50px; margin-top: 80px; } @@ -206,7 +208,8 @@ a[disabled="true"]{ gap: 15px; } -.chain-title mat-icon { +.chain-title i, +.chain-title svg{ font-size: 30px; color: #000; position: relative; @@ -261,7 +264,8 @@ a.go-back-link { padding-right: 28px; } -a.go-back-link mat-icon { +a.go-back-link i, +a.go-back-link svg { color: #707070; position: relative; top: -3px; @@ -273,7 +277,8 @@ a.go-back-link mat-icon { padding: 45px; } -.header mat-icon { +.header i, +.header svg { color: #00D048; font-size: 30px; vertical-align: bottom; @@ -352,4 +357,4 @@ a.open-vp { display: flex; gap: 10px; overflow-y: auto; -} \ No newline at end of file +} diff --git a/frontend/src/app/views/user-management/user-management.component.scss b/frontend/src/app/views/user-management/user-management.component.scss index 9f0e5eb8bd..4c20f8a79c 100644 --- a/frontend/src/app/views/user-management/user-management.component.scss +++ b/frontend/src/app/views/user-management/user-management.component.scss @@ -113,7 +113,7 @@ padding: 10px 76px 10px 16px; } - i { + i, svg { padding-right: 16px; color: #B0B5BA; } diff --git a/frontend/src/app/views/user-profile/user-profile.component.scss b/frontend/src/app/views/user-profile/user-profile.component.scss index ba64564d88..05dfb8e69b 100644 --- a/frontend/src/app/views/user-profile/user-profile.component.scss +++ b/frontend/src/app/views/user-profile/user-profile.component.scss @@ -704,7 +704,7 @@ a[disabled="true"] { height: 56px; padding: 8px 24px; - i { + i, svg { padding: 4px; margin-right: 8px; width: 24px; @@ -731,7 +731,7 @@ a[disabled="true"] { .step-item.active { background: rgba(6, 129, 238, 0.08); - i { + i, svg { padding: 4px; margin-right: 8px; width: 24px; diff --git a/frontend/src/assets/images/icons/compare.svg b/frontend/src/assets/images/icons/compare.svg index 70e1b0907f..7dd1906b43 100644 --- a/frontend/src/assets/images/icons/compare.svg +++ b/frontend/src/assets/images/icons/compare.svg @@ -1,6 +1 @@ - - - \ No newline at end of file + \ No newline at end of file diff --git a/frontend/src/assets/images/icons/policy-module.svg b/frontend/src/assets/images/icons/policy-module.svg new file mode 100644 index 0000000000..c72b4076a4 --- /dev/null +++ b/frontend/src/assets/images/icons/policy-module.svg @@ -0,0 +1,5 @@ + + + + + diff --git a/frontend/src/styles.scss b/frontend/src/styles.scss index d57210d5a6..6d2f92ffda 100644 --- a/frontend/src/styles.scss +++ b/frontend/src/styles.scss @@ -54,7 +54,8 @@ body>.leader-line-areaAnchor { cursor: pointer; } - .example-icon mat-icon { + .example-icon i, + .example-icon svg { color: rgba(255, 255, 255, 0.54); } } @@ -639,4 +640,4 @@ svg-icon.svg-icon-32 { .p-dialog .p-dialog-content:last-of-type { border-bottom-right-radius: 10px; border-bottom-left-radius: 10px; -} \ No newline at end of file +} From 8a3c6624614a544571d94bdf4adc9af031e603ce Mon Sep 17 00:00:00 2001 From: Ihar Date: Wed, 6 Nov 2024 18:11:29 +0500 Subject: [PATCH 05/48] fix: icons in compare components[3141] --- .../compare-module.component.css | 61 +++++++------------ .../compare-module.component.html | 12 ++-- .../compare-policy.component.html | 23 ++++--- .../compare-policy.component.scss | 51 +++------------- .../compare-record.component.html | 16 ++--- .../compare-record.component.scss | 22 ++++--- .../compare-schema.component.css | 56 +++++++---------- .../compare-schema.component.html | 20 ++++-- .../compare-tool/compare-tool.component.html | 15 +++-- .../compare-tool/compare-tool.component.scss | 15 +++-- .../multi-compare-policy.component.html | 10 +-- 11 files changed, 125 insertions(+), 176 deletions(-) diff --git a/frontend/src/app/modules/analytics/compare-module/compare-module.component.css b/frontend/src/app/modules/analytics/compare-module/compare-module.component.css index b1f879802d..c871cea704 100644 --- a/frontend/src/app/modules/analytics/compare-module/compare-module.component.css +++ b/frontend/src/app/modules/analytics/compare-module/compare-module.component.css @@ -148,24 +148,25 @@ color: rgb(0 0 0 / 10%) !important; } -/*.compare-btn {*/ -/* width: 25px;*/ -/* height: 25px;*/ -/* border-radius: 6px;*/ -/* background: rgb(252 252 252);*/ -/* border: 1px solid rgb(220 220 220);*/ -/* position: absolute;*/ -/* top: 14px;*/ -/* left: 3px;*/ -/* cursor: pointer;*/ -/*}*/ - -/*.compare-btn mat-icon {*/ -/* font-size: 22px;*/ -/* position: absolute;*/ -/* left: 2px;*/ -/* top: 1px;*/ -/*}*/ +.compare-btn { + width: 25px; + height: 25px; + border-radius: 6px; + background: rgb(252 252 252); + border: 1px solid rgb(220 220 220); + position: absolute; + top: 18px; + left: 4px; + cursor: pointer; +} + +.compare-btn i, +.compare-btn svg { + font-size: 16px; + position: absolute; + left: 4px; + top: 4px; +} .left-compare-result { grid-column-start: 1; @@ -569,9 +570,8 @@ .report-collapse svg { position: absolute; pointer-events: none; - left: -1px; - top: -1px; - font-size: 16px; + top: 2px; + font-size: 10px; display: none; } @@ -658,22 +658,3 @@ position: relative; background-color: white; } - -.compare-btn { - background-color: white; - border: 1px solid #ccc; - border-radius: 50%; - width: 24px; - height: 24px; - cursor: pointer; - display: flex; - align-items: center; - justify-content: center; - padding: 0; - font-size: 14px; -} - -.icon { - font-size: 16px; - line-height: 16px; -} diff --git a/frontend/src/app/modules/analytics/compare-module/compare-module.component.html b/frontend/src/app/modules/analytics/compare-module/compare-module.component.html index ce4b6d9dbb..d8729e4919 100644 --- a/frontend/src/app/modules/analytics/compare-module/compare-module.component.html +++ b/frontend/src/app/modules/analytics/compare-module/compare-module.component.html @@ -362,10 +362,13 @@
- + - + + + +
- - - + +
diff --git a/frontend/src/app/modules/analytics/compare-policy/compare-policy.component.html b/frontend/src/app/modules/analytics/compare-policy/compare-policy.component.html index dadbb4c556..edc4085754 100644 --- a/frontend/src/app/modules/analytics/compare-policy/compare-policy.component.html +++ b/frontend/src/app/modules/analytics/compare-policy/compare-policy.component.html @@ -391,8 +391,11 @@
- - + + + + + +
{{icons[item.left_type]}}-->
- {{ icons[item.left_type] }} +
{{ item.left_tag || item.left_type }}
@@ -421,7 +424,7 @@
- {{ icons[item.left_type] }} +
{{ item.left_tag || item.left_type }}
@@ -439,7 +442,7 @@
- {{ icons[item.right_type] }} +
{{ item.right_tag || item.right_type }}
@@ -455,7 +458,7 @@
- {{ icons[item.right_type] }} +
{{ item.right_tag || item.right_type }}
@@ -471,8 +474,8 @@
- - + +
@@ -606,7 +609,7 @@
- 🔍 +
@@ -721,7 +724,7 @@
- 🔍 +
{{ prop.items[index].value }} diff --git a/frontend/src/app/modules/analytics/compare-policy/compare-policy.component.scss b/frontend/src/app/modules/analytics/compare-policy/compare-policy.component.scss index 578530c252..ca08093eec 100644 --- a/frontend/src/app/modules/analytics/compare-policy/compare-policy.component.scss +++ b/frontend/src/app/modules/analytics/compare-policy/compare-policy.component.scss @@ -160,17 +160,17 @@ background: rgb(252 252 252); border: 1px solid rgb(220 220 220); position: absolute; - top: 14px; - left: 3px; + top: 18px; + left: 4px; cursor: pointer; } .compare-btn i, .compare-btn svg { - font-size: 22px; + font-size: 16px; position: absolute; - left: 2px; - top: 1px; + left: 4px; + top: 4px; } .left-compare-result { @@ -582,9 +582,8 @@ .report-collapse svg { position: absolute; pointer-events: none; - left: -1px; - top: -1px; - font-size: 16px; + top: 2px; + font-size: 10px; display: none; } @@ -671,39 +670,3 @@ position: relative; background-color: white; } - -.compare-btn { - background-color: white; - border: 1px solid #ccc; - border-radius: 50%; - width: 24px; - height: 24px; - cursor: pointer; - display: flex; - align-items: center; - justify-content: center; - padding: 0; - font-size: 14px; -} - -.icon { - font-size: 16px; - line-height: 16px; -} - -.custom-icon { - font-family: 'Material Icons', sans-serif; - font-size: 16px; - display: inline-block; - width: 16px; - height: 16px; - text-align: center; - line-height: 16px; - vertical-align: middle; - user-select: none; -} - -.report-collapse .icon { - font-size: 19px; - line-height: 12px; -} diff --git a/frontend/src/app/modules/analytics/compare-record/compare-record.component.html b/frontend/src/app/modules/analytics/compare-record/compare-record.component.html index c0de989171..d6b1c25ed4 100644 --- a/frontend/src/app/modules/analytics/compare-record/compare-record.component.html +++ b/frontend/src/app/modules/analytics/compare-record/compare-record.component.html @@ -254,11 +254,6 @@ - - - - -
@@ -285,7 +280,8 @@
- {{ treeItemContext.data.docIcon }} + +
{{ treeItemContext.data.docName }}
@@ -301,8 +297,8 @@
- - + +
@@ -439,8 +435,8 @@
- - + +
diff --git a/frontend/src/app/modules/analytics/compare-record/compare-record.component.scss b/frontend/src/app/modules/analytics/compare-record/compare-record.component.scss index 58aa06cd74..fc4672c60a 100644 --- a/frontend/src/app/modules/analytics/compare-record/compare-record.component.scss +++ b/frontend/src/app/modules/analytics/compare-record/compare-record.component.scss @@ -93,15 +93,15 @@ background: rgb(252 252 252); border: 1px solid rgb(220 220 220); position: absolute; - top: 14px; - left: 3px; + top: 18px; + left: 4px; cursor: pointer; i, svg { - font-size: 22px; + font-size: 16px; position: absolute; - left: 2px; - top: 1px; + left: 4px; + top: 4px; } } @@ -280,6 +280,13 @@ &:hover { background: #f1f1f1; } + + i, svg { + font-size: 16px; + position: absolute; + left: 4px; + top: 4px; + } } } @@ -544,9 +551,8 @@ i, svg { position: absolute; pointer-events: none; - left: -1px; - top: -1px; - font-size: 16px; + top: 2px; + font-size: 10px; display: none; } diff --git a/frontend/src/app/modules/analytics/compare-schema/compare-schema.component.css b/frontend/src/app/modules/analytics/compare-schema/compare-schema.component.css index 87fbc07ce7..5a0fd32429 100644 --- a/frontend/src/app/modules/analytics/compare-schema/compare-schema.component.css +++ b/frontend/src/app/modules/analytics/compare-schema/compare-schema.component.css @@ -150,24 +150,25 @@ position: relative; } -/*.compare-btn {*/ -/* width: 25px;*/ -/* height: 25px;*/ -/* border-radius: 6px;*/ -/* background: rgb(252 252 252);*/ -/* border: 1px solid rgb(220 220 220);*/ -/* position: absolute;*/ -/* top: 14px;*/ -/* left: 3px;*/ -/* cursor: pointer;*/ -/*}*/ - -/*.compare-btn mat-icon {*/ -/* font-size: 22px;*/ -/* position: absolute;*/ -/* left: 2px;*/ -/* top: 1px;*/ -/*}*/ +.compare-btn { + width: 25px; + height: 25px; + border-radius: 6px; + background: rgb(252 252 252); + border: 1px solid rgb(220 220 220); + position: absolute; + top: 14px; + left: 3px; + cursor: pointer; +} + +.compare-btn i, +.compare-btn svg { + font-size: 16px; + position: absolute; + left: 4px; + top: 4px; +} .left-compare-result { grid-column-start: 1; @@ -593,9 +594,8 @@ .report-collapse svg { position: absolute; pointer-events: none; - left: -1px; - top: -1px; - font-size: 16px; + top: 2px; + font-size: 10px; display: none; } @@ -622,20 +622,6 @@ background-color: white; } -.compare-btn { - background-color: white; - border: 1px solid #ccc; - border-radius: 50%; - width: 24px; - height: 24px; - cursor: pointer; - display: flex; - align-items: center; - justify-content: center; - padding: 0; - font-size: 14px; -} - .icon { font-size: 16px; line-height: 16px; diff --git a/frontend/src/app/modules/analytics/compare-schema/compare-schema.component.html b/frontend/src/app/modules/analytics/compare-schema/compare-schema.component.html index 13e262306f..6a0f4a687e 100644 --- a/frontend/src/app/modules/analytics/compare-schema/compare-schema.component.html +++ b/frontend/src/app/modules/analytics/compare-schema/compare-schema.component.html @@ -196,10 +196,18 @@
{{ i + 1 }}
-
- - -
+ + + + + + + + + + + +
- - + +
diff --git a/frontend/src/app/modules/analytics/compare-tool/compare-tool.component.html b/frontend/src/app/modules/analytics/compare-tool/compare-tool.component.html index 59059b0cca..b87ceebe38 100644 --- a/frontend/src/app/modules/analytics/compare-tool/compare-tool.component.html +++ b/frontend/src/app/modules/analytics/compare-tool/compare-tool.component.html @@ -437,8 +437,11 @@
- - + + + + + +
@@ -464,7 +467,7 @@
- {{ treeItemContext.data.blockIcon }} +
{{ treeItemContext.data.blockName }}
@@ -478,8 +481,8 @@
- - + +
@@ -653,7 +656,7 @@
- 🔍 +
{{ prop.value }} diff --git a/frontend/src/app/modules/analytics/compare-tool/compare-tool.component.scss b/frontend/src/app/modules/analytics/compare-tool/compare-tool.component.scss index da3f809983..6e0f649d10 100644 --- a/frontend/src/app/modules/analytics/compare-tool/compare-tool.component.scss +++ b/frontend/src/app/modules/analytics/compare-tool/compare-tool.component.scss @@ -77,15 +77,15 @@ background: rgb(252 252 252); border: 1px solid rgb(220 220 220); position: absolute; - top: 14px; - left: 3px; + top: 18px; + left: 4px; cursor: pointer; i, svg { - font-size: 22px; + font-size: 16px; position: absolute; - left: 2px; - top: 1px; + left: 4px; + top: 4px; } } @@ -520,9 +520,8 @@ i, svg { position: absolute; pointer-events: none; - left: -1px; - top: -1px; - font-size: 16px; + top: 2px; + font-size: 10px; display: none; } diff --git a/frontend/src/app/modules/analytics/multi-compare-policy/multi-compare-policy.component.html b/frontend/src/app/modules/analytics/multi-compare-policy/multi-compare-policy.component.html index f44f131f33..4bc426594b 100644 --- a/frontend/src/app/modules/analytics/multi-compare-policy/multi-compare-policy.component.html +++ b/frontend/src/app/modules/analytics/multi-compare-policy/multi-compare-policy.component.html @@ -523,8 +523,10 @@
- - - + + + + +
@@ -722,7 +724,7 @@
- 🔍 +
{{ prop.value }} @@ -897,7 +899,7 @@
- 🔍 +
{{ prop.value }} From cd51fb7ebf08892f0af5687185cd64dc53f12f38 Mon Sep 17 00:00:00 2001 From: Ihar Date: Thu, 7 Nov 2024 21:29:10 +0500 Subject: [PATCH 06/48] feat: move to primeNg for table module[3141] --- .../search-policies.component.html | 266 +++++++---- .../search-policies.component.scss | 24 + .../hedera-explorer.component.scss | 2 +- .../src/app/modules/common/material.module.ts | 157 ++++++- .../contract-config.component.css | 25 + .../contract-config.component.html | 186 +++++--- .../user-contract-config.component.css | 24 + .../user-contract-config.component.html | 122 +++-- .../contract-engine/contract-engine.module.ts | 4 +- .../documents-source-block.component.html | 443 +++++++++++------- .../group-manager-block.component.html | 273 +++++++---- .../group-manager-block.component.scss | 24 + .../policy-viewer.component.html | 179 ++++--- .../src/app/views/audit/audit.component.css | 26 +- .../src/app/views/audit/audit.component.html | 128 +++-- frontend/src/styles.scss | 37 ++ 16 files changed, 1353 insertions(+), 567 deletions(-) diff --git a/frontend/src/app/modules/analytics/search-policies/search-policies.component.html b/frontend/src/app/modules/analytics/search-policies/search-policies.component.html index 8bf2a9d7fd..0054332adc 100644 --- a/frontend/src/app/modules/analytics/search-policies/search-policies.component.html +++ b/frontend/src/app/modules/analytics/search-policies/search-policies.component.html @@ -50,109 +50,173 @@
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - - - - - - - - - -
- - - - Hedera Topic Id - {{ element.topicId }} - - Tokens - - Tokens - - Schemas - - Schemas - - Policy Name - {{ element.name }} - Version - {{ element.version }} - Tags - - Description - {{ element.description }} -
+ + Hedera Topic IdTokensSchemasPolicy NameVersionTagsDescriptionStatusRate
+ + + + {{ element.topicId }} + + + Tokens + + Schemas + + {{ element.name }} + {{ element.version }} + + + {{ element.description }} + +
Draft
+
In Dry Run
+
Demo
+
Published
+
Not published
+
+
{{ element._rate }}
+
Status -
- Draft -
-
- In Dry Run -
-
- Demo -
-
- Published -
-
- Not published -
-
Rate -
- {{ element._rate }} -
-
diff --git a/frontend/src/app/modules/analytics/search-policies/search-policies.component.scss b/frontend/src/app/modules/analytics/search-policies/search-policies.component.scss index 6931f29259..6b85ae2655 100644 --- a/frontend/src/app/modules/analytics/search-policies/search-policies.component.scss +++ b/frontend/src/app/modules/analytics/search-policies/search-policies.component.scss @@ -271,3 +271,27 @@ } } } + +::ng-deep .p-datatable-wrapper { + max-height: calc(100vh - 172px) !important; +} + +.header { + height: 56px; + font-size: 12px; +} + +.header th { + background: var(--color-grey-white); +} + +.header::after { + content: ""; + position: absolute; + bottom: -1px; + left: 0; + width: 100%; + height: 1px; + background-color: #ddd; + box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2); +} diff --git a/frontend/src/app/modules/common/hedera-explorer/hedera-explorer.component.scss b/frontend/src/app/modules/common/hedera-explorer/hedera-explorer.component.scss index f315fc6bf1..6c755ed533 100644 --- a/frontend/src/app/modules/common/hedera-explorer/hedera-explorer.component.scss +++ b/frontend/src/app/modules/common/hedera-explorer/hedera-explorer.component.scss @@ -7,4 +7,4 @@ text-decoration: none; border-bottom: 1px solid var(--color-primary); text-transform: capitalize; -} \ No newline at end of file +} diff --git a/frontend/src/app/modules/common/material.module.ts b/frontend/src/app/modules/common/material.module.ts index 59031ab107..c3f87ec621 100644 --- a/frontend/src/app/modules/common/material.module.ts +++ b/frontend/src/app/modules/common/material.module.ts @@ -1,3 +1,147 @@ +// import { NgModule } from '@angular/core'; +// import { CommonModule } from '@angular/common'; +// // import { MatLegacyTabsModule as MatTabsModule } from '@angular/material/legacy-tabs'; +// import { MatStepperModule } from '@angular/material/stepper'; +// // import { MatExpansionModule } from '@angular/material/expansion'; +// // import { MatIconModule } from '@angular/material/icon'; +// import { ReactiveFormsModule } from '@angular/forms'; +// // import { MatLegacyInputModule as MatInputModule } from '@angular/material/legacy-input'; +// // import { MatLegacyButtonModule as MatButtonModule } from '@angular/material/legacy-button'; +// import { MatLegacyTableModule as MatTableModule } from '@angular/material/legacy-table'; +// import { MatLegacyDialogModule as MatDialogModule } from '@angular/material/legacy-dialog'; +// import { MatLegacyProgressSpinnerModule as MatProgressSpinnerModule } from '@angular/material/legacy-progress-spinner'; +// import { MatToolbarModule } from '@angular/material/toolbar'; +// import { MatLegacyMenuModule as MatMenuModule } from '@angular/material/legacy-menu'; +// import { MatDividerModule } from '@angular/material/divider'; +// import { MatLegacyListModule as MatListModule } from '@angular/material/legacy-list'; +// import { MatLegacyProgressBarModule as MatProgressBarModule } from '@angular/material/legacy-progress-bar'; +// import { MatLegacySelectModule as MatSelectModule } from '@angular/material/legacy-select'; +// import { MatLegacyCheckboxModule as MatCheckboxModule } from '@angular/material/legacy-checkbox'; +// import { MatTreeModule } from '@angular/material/tree'; +// import { MatDatepickerModule } from '@angular/material/datepicker'; +// import { MatLegacyRadioModule as MatRadioModule } from '@angular/material/legacy-radio'; +// import { MatNativeDateModule } from '@angular/material/core'; +// import { MatLegacyTooltipModule as MatTooltipModule } from '@angular/material/legacy-tooltip'; +// import { MatLegacySlideToggleModule as MatSlideToggleModule } from '@angular/material/legacy-slide-toggle'; +// import { ClipboardModule } from '@angular/cdk/clipboard'; +// import { MatLegacyPaginatorModule as MatPaginatorModule } from '@angular/material/legacy-paginator'; +// import { MatSortModule } from '@angular/material/sort'; +// import { MatLegacyChipsModule as MatChipsModule } from '@angular/material/legacy-chips'; +// import { MatLegacyAutocompleteModule as MatAutocompleteModule } from '@angular/material/legacy-autocomplete'; +// import { MatButtonToggleModule } from '@angular/material/button-toggle'; +// import { DragDropModule } from '@angular/cdk/drag-drop'; +// import { CdkTableModule } from '@angular/cdk/table'; +// import { MatLegacySliderModule as MatSliderModule } from '@angular/material/legacy-slider'; +// import { MatBadgeModule } from '@angular/material/badge'; +// // import { TabViewModule } from 'primeng/tabview'; +// import { AccordionModule } from 'primeng/accordion'; +// import {TableModule} from 'primeng/table'; +// import {ButtonModule} from 'primeng/button'; +// import {MatButtonModule} from '@angular/material/button'; +// // import {InputTextModule} from 'primeng/inputtext'; +// +// @NgModule({ +// declarations: [], +// imports: [ +// //angular modules +// CommonModule, +// ReactiveFormsModule, +// // MatTabsModule, +// // TabViewModule, +// +// MatStepperModule, +// +// // ButtonModule, +// +// // MatExpansionModule, +// AccordionModule, +// // TableModule, +// +// // MatIconModule, +// +// // MatInputModule, +// // InputTextModule, +// +// MatButtonModule, +// +// MatTableModule, +// TableModule, +// +// MatDialogModule, +// MatDatepickerModule, +// MatRadioModule, +// MatNativeDateModule, +// MatProgressSpinnerModule, +// MatToolbarModule, +// MatMenuModule, +// MatDividerModule, +// MatListModule, +// MatProgressBarModule, +// MatSelectModule, +// MatCheckboxModule, +// MatTreeModule, +// MatTooltipModule, +// MatSlideToggleModule, +// MatPaginatorModule, +// MatButtonToggleModule, +// DragDropModule, +// MatSliderModule, +// CdkTableModule, +// MatBadgeModule +// ], +// exports: [ +// //angular modules +// ReactiveFormsModule, +// // MatTabsModule, +// // TabViewModule, +// +// MatStepperModule, +// +// // ButtonModule, +// +// // MatExpansionModule, +// AccordionModule, +// // TableModule, +// +// // MatIconModule, +// +// // MatInputModule, +// // InputTextModule, +// +// MatButtonModule, +// +// MatTableModule, +// TableModule, +// +// MatDialogModule, +// MatDatepickerModule, +// MatRadioModule, +// MatNativeDateModule, +// MatProgressSpinnerModule, +// MatToolbarModule, +// MatMenuModule, +// MatDividerModule, +// MatListModule, +// MatProgressBarModule, +// MatSelectModule, +// MatCheckboxModule, +// MatTreeModule, +// MatTooltipModule, +// MatSlideToggleModule, +// ClipboardModule, +// MatPaginatorModule, +// MatSortModule, +// MatChipsModule, +// MatAutocompleteModule, +// MatButtonToggleModule, +// DragDropModule, +// MatSliderModule, +// CdkTableModule, +// MatBadgeModule +// ] +// }) +// export class MaterialModule { } + import { NgModule } from '@angular/core'; import { CommonModule } from '@angular/common'; // import { MatLegacyTabsModule as MatTabsModule } from '@angular/material/legacy-tabs'; @@ -38,7 +182,6 @@ import { AccordionModule } from 'primeng/accordion'; import {TableModule} from 'primeng/table'; import {ButtonModule} from 'primeng/button'; - @NgModule({ declarations: [], imports: [ @@ -52,11 +195,11 @@ import {ButtonModule} from 'primeng/button'; AccordionModule, TableModule, - MatIconModule, - ButtonModule, + // MatIconModule, + // ButtonModule, ReactiveFormsModule, - MatInputModule, + // MatInputModule, MatButtonModule, MatTableModule, MatDialogModule, @@ -91,13 +234,15 @@ import {ButtonModule} from 'primeng/button'; AccordionModule, TableModule, - MatIconModule, - ButtonModule, + // MatIconModule, + // ButtonModule, ReactiveFormsModule, MatInputModule, MatButtonModule, + MatTableModule, + MatDialogModule, MatDatepickerModule, MatRadioModule, diff --git a/frontend/src/app/modules/contract-engine/configs/contract-config/contract-config.component.css b/frontend/src/app/modules/contract-engine/configs/contract-config/contract-config.component.css index b9d9061818..e27d17536d 100644 --- a/frontend/src/app/modules/contract-engine/configs/contract-config/contract-config.component.css +++ b/frontend/src/app/modules/contract-engine/configs/contract-config/contract-config.component.css @@ -213,3 +213,28 @@ justify-content: center; align-items: center; } + +::ng-deep .p-datatable-wrapper { + max-height: calc(100vh - 172px) !important; +} + +.header { + height: 56px; + font-size: 12px; +} + +.header th { + background: var(--color-grey-white); +} + +.header::after { + content: ""; + position: absolute; + bottom: -1px; + left: 0; + width: 100%; + height: 1px; + background-color: #ddd; + box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2); +} + diff --git a/frontend/src/app/modules/contract-engine/configs/contract-config/contract-config.component.html b/frontend/src/app/modules/contract-engine/configs/contract-config/contract-config.component.html index 50c04a7d62..6bf692ba60 100644 --- a/frontend/src/app/modules/contract-engine/configs/contract-config/contract-config.component.html +++ b/frontend/src/app/modules/contract-engine/configs/contract-config/contract-config.component.html @@ -34,69 +34,129 @@
- - - - - - - - - - - - - - - - - - - - - - - -
Hedera Contract Id - {{ element.contractId }} - - Description - {{ element.description }} - Tags - - Permissons -
-
- O - A - M - W -
- -
-
Operations -
- - Operations - -
-
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Hedera Contract Id + Description + Tags + Permissions + Operations + + + + + + + + {{ element.contractId }} + + + + + {{ element.description }} + + + + + + + +
+
+ O + A + M + W +
+ +
+ + + +
+ + Operations + +
+ + +
+
+
- - - - - - - - - - - - - - - -
Contract Id - {{ element.document.credentialSubject[0].contractId }} - - Date - {{ getDate(element.document.issuanceDate) }} - Operations -
- View Details - + + + + + + + + + + + + + + + + + + + + + + - -
-
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Contract Id + Date + Operations + + + + + + + + {{ element.document.credentialSubject[0].contractId }} + + + + + {{ getDate(element.document.issuanceDate) }} + + + +
+ View Details + +
+ + +
+
diff --git a/frontend/src/app/modules/contract-engine/contract-engine.module.ts b/frontend/src/app/modules/contract-engine/contract-engine.module.ts index 14bd07da0b..d8e1ded821 100644 --- a/frontend/src/app/modules/contract-engine/contract-engine.module.ts +++ b/frontend/src/app/modules/contract-engine/contract-engine.module.ts @@ -7,6 +7,7 @@ import { MaterialModule } from '../common/material.module'; import { TagEngineModule } from '../tag-engine/tag-engine.module'; import { AppRoutingModule } from 'src/app/app-routing.module'; import {AngularSvgIconModule} from 'angular-svg-icon'; +import {TooltipModule} from 'primeng/tooltip'; // Components import { RefreshBtnComponent } from './components/refresh-btn/refresh-btn.component'; // Configs @@ -44,7 +45,8 @@ import { UserContractConfigComponent } from './configs/user-contract-config/user MaterialModule, TagEngineModule, AppRoutingModule, - AngularSvgIconModule.forRoot() + AngularSvgIconModule.forRoot(), + TooltipModule, ], exports: [], }) diff --git a/frontend/src/app/modules/policy-engine/policy-viewer/blocks/documents-source-block/documents-source-block.component.html b/frontend/src/app/modules/policy-engine/policy-viewer/blocks/documents-source-block/documents-source-block.component.html index f8359d8ab2..b91943fefa 100644 --- a/frontend/src/app/modules/policy-engine/policy-viewer/blocks/documents-source-block/documents-source-block.component.html +++ b/frontend/src/app/modules/policy-engine/policy-viewer/blocks/documents-source-block/documents-source-block.component.html @@ -6,181 +6,292 @@
- - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - + - - + + + + + + + + + + + + + + + + + + - - - - + + + - - - - - -
- History - -
- - - - -
-
- {{ field.title }} - - - {{ field.title }} - + + + + + + + + + + + + + + + + + + + + +
+ History + -
-
- - {{ getText(element, option) }} - - - {{ getIssuer(element, option) }} - - + + + +
+ {{ field.title }} + + + + {{ field.title }} + + Status Details
+
+ +
+
+
+ + + {{ getText(element, option) }} + + + {{ getIssuer(element, option) }} + + + {{ getText(element, option) }} + + + + {{ serial.serial }} + + + +
{{ getText(element, option) }} - - - - - - - {{ serial.serial }} - - - - - - -
- {{ getText(element, option) }} -
-
-
- -
-
- - + +
+ +
+
+ +
+
-
-
-
-
+
-
-

- {{ historyElem.labelValue }} -

+
+

{{ historyElem.labelValue }}

{{ parseArrayValue(historyElem.comment) }}

-
-
+ + + + +
diff --git a/frontend/src/app/modules/policy-engine/policy-viewer/blocks/group-manager-block/group-manager-block.component.scss b/frontend/src/app/modules/policy-engine/policy-viewer/blocks/group-manager-block/group-manager-block.component.scss index 00ade08cbe..39c5f52540 100644 --- a/frontend/src/app/modules/policy-engine/policy-viewer/blocks/group-manager-block/group-manager-block.component.scss +++ b/frontend/src/app/modules/policy-engine/policy-viewer/blocks/group-manager-block/group-manager-block.component.scss @@ -188,3 +188,27 @@ cursor: pointer; color: var(--button-primary-color); } + +::ng-deep .p-datatable-wrapper { + max-height: calc(100vh - 172px) !important; +} + +.header { + height: 56px; + font-size: 12px; +} + +.header th { + background: var(--color-grey-white); +} + +.header::after { + content: ""; + position: absolute; + bottom: -1px; + left: 0; + width: 100%; + height: 1px; + background-color: #ddd; + box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2); +} diff --git a/frontend/src/app/modules/policy-engine/policy-viewer/policy-viewer/policy-viewer.component.html b/frontend/src/app/modules/policy-engine/policy-viewer/policy-viewer/policy-viewer.component.html index 26ee74a412..e371cfa63e 100644 --- a/frontend/src/app/modules/policy-engine/policy-viewer/policy-viewer/policy-viewer.component.html +++ b/frontend/src/app/modules/policy-engine/policy-viewer/policy-viewer/policy-viewer.component.html @@ -202,72 +202,121 @@ class="second-policy-container" >
- - - - - - - - - - - - - - - - - - - - - - - - - - - -
Create Date - {{ element.createDate }} - Type - {{ element.__type }} - Owner - {{ element.owner }} - Size - {{ element.document?.size }} Byte - Url - {{ element.documentURL }} - -
- + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ Create Date + Type + Owner + Size + Url + +
+
+ + +
+ {{ element.createDate }} + {{ element.__type }} + {{ element.owner }} + {{ element.document?.size }} Byte + {{ element.documentURL }} + +
- - -
-
+ + + +
+ + + + +
All - {{user.username}} + {{ user.username }} @@ -18,8 +18,8 @@ All policies - {{policy.name}} - ({{policy.id}}) + {{ policy.name }} + ({{ policy.id }}) @@ -27,53 +27,89 @@
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Policy Id - {{element.policyId}} - Hash - {{element.hash}} - Id - {{element.document.id}} - Owner - {{element.owner}} - Type {{element.type}} Create Date {{element.createDate}} Document - View Document -
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + Policy Id + Hash + Id + Owner + Type + Create Date + Document + + + + + + {{ element.policyId }} + + + {{ element.hash }} + + + {{ element.document.id }} + + {{ element.owner }} + {{ element.type }} + {{ element.createDate }} + + View Document + + + + +
+
+ [pageSizeOptions]="[10, 25, 50, 100]" (page)="onPage($event)" aria-label="Select page">
diff --git a/frontend/src/styles.scss b/frontend/src/styles.scss index 6d2f92ffda..4002e9c116 100644 --- a/frontend/src/styles.scss +++ b/frontend/src/styles.scss @@ -116,6 +116,43 @@ body>.leader-line-areaAnchor { } } +p-table { + tbody { + tr.header { + box-shadow: 0 3px 6px rgb(0 0 0 / 16%); + position: relative; + } + + tr.body { + height: var(--table-row-height); + + &:hover { + background-color: rgba(112, 112, 112, 0.04); + } + + td { + font-size: 20px; + line-height: 23px; + padding: 0 10px; + + a, + .btn-field, + .btn-link { + width: auto; + font-size: 20px; + color: #0B73F8; + text-decoration: none; + display: inline-block; + border-bottom: 3px solid #0C77FF !important; + padding-bottom: 3px; + font-weight: normal; + text-transform: capitalize; + } + } + } + } +} + .guardian-tooltip { font-size: 16px; overflow-wrap: break-word !important; From d8baf9de1678156af61918a30554b2838a52cfc8 Mon Sep 17 00:00:00 2001 From: Ihar Date: Tue, 12 Nov 2024 19:19:32 +0500 Subject: [PATCH 07/48] feat: move from mat button module to button module from prime ng[3141] --- frontend/src/app/app.module.ts | 4 +- .../branding-dialog.component.css | 40 +-- .../branding-dialog.component.html | 13 +- .../branding-dialog.component.ts | 36 +-- .../search-policies.component.scss | 4 - .../src/app/modules/common/material.module.ts | 246 ++++---------- .../contract-config.component.css | 83 ++++- .../contract-config.component.html | 304 ++++++++++-------- .../user-contract-config.component.css | 4 - .../group-manager-block.component.scss | 4 - .../src/app/views/audit/audit.component.css | 4 - 11 files changed, 337 insertions(+), 405 deletions(-) diff --git a/frontend/src/app/app.module.ts b/frontend/src/app/app.module.ts index a73c816aaa..5a56be02d2 100644 --- a/frontend/src/app/app.module.ts +++ b/frontend/src/app/app.module.ts @@ -54,7 +54,7 @@ import { SettingsViewComponent } from './views/admin/settings-view/settings-view import { DetailsLogDialog } from './views/admin/details-log-dialog/details-log-dialog.component'; import { ServiceStatusComponent } from './views/admin/service-status/service-status.component'; import { SchemaConfigComponent } from './views/schemas/schemas.component'; -import { BrandingDialogComponent } from './components/branding-dialog/branding-dialog.component'; +// import { BrandingDialogComponent } from './components/branding-dialog/branding-dialog.component'; import { NotificationsComponent } from './views/notifications/notifications.component'; import { RolesViewComponent } from './views/roles/roles-view.component'; import { UsersManagementComponent } from './views/user-management/user-management.component'; @@ -152,7 +152,7 @@ import { WorkerTasksComponent } from './views/worker-tasks/worker-tasks.componen InfoComponent, SchemaConfigComponent, BrandingComponent, - BrandingDialogComponent, + // BrandingDialogComponent, SuggestionsConfigurationComponent, StandardRegistryCardComponent, NotificationComponent, diff --git a/frontend/src/app/components/branding-dialog/branding-dialog.component.css b/frontend/src/app/components/branding-dialog/branding-dialog.component.css index 9dd365eb2f..2b6adf9da9 100644 --- a/frontend/src/app/components/branding-dialog/branding-dialog.component.css +++ b/frontend/src/app/components/branding-dialog/branding-dialog.component.css @@ -1,22 +1,22 @@ -.page-btns { - width: 100%; - display: grid; - grid-template-columns: 1fr 1fr; - column-gap:15px; - justify-items: center; - background-color: white; - padding: 20px 0; -} +/*.page-btns {*/ +/* width: 100%;*/ +/* display: grid;*/ +/* grid-template-columns: 1fr 1fr;*/ +/* column-gap:15px;*/ +/* justify-items: center;*/ +/* background-color: white;*/ +/* padding: 20px 0;*/ +/*}*/ -#cancel-btn { - width: 100%; - border: 1px solid var(--primary-color); - background: none !important; - color: var(--primary-color); - grid-column: 2; -} +/*#cancel-btn {*/ +/* width: 100%;*/ +/* border: 1px solid var(--primary-color);*/ +/* background: none !important;*/ +/* color: var(--primary-color);*/ +/* grid-column: 2;*/ +/*}*/ -#reset-btn { - width: 100%; - grid-column: 1; -} \ No newline at end of file +/*#reset-btn {*/ +/* width: 100%;*/ +/* grid-column: 1;*/ +/*}*/ diff --git a/frontend/src/app/components/branding-dialog/branding-dialog.component.html b/frontend/src/app/components/branding-dialog/branding-dialog.component.html index c9dee5bba9..00c4a226de 100644 --- a/frontend/src/app/components/branding-dialog/branding-dialog.component.html +++ b/frontend/src/app/components/branding-dialog/branding-dialog.component.html @@ -1,7 +1,6 @@ -

Reset Confirmation

-{{ data.message }} - - - - - \ No newline at end of file + + + + + + diff --git a/frontend/src/app/components/branding-dialog/branding-dialog.component.ts b/frontend/src/app/components/branding-dialog/branding-dialog.component.ts index 334c72b757..0ebf8c03aa 100644 --- a/frontend/src/app/components/branding-dialog/branding-dialog.component.ts +++ b/frontend/src/app/components/branding-dialog/branding-dialog.component.ts @@ -1,18 +1,18 @@ -import { Component, Inject } from '@angular/core'; -import { MAT_LEGACY_DIALOG_DATA as MAT_DIALOG_DATA, MatLegacyDialogRef as MatDialogRef } from '@angular/material/legacy-dialog'; - -@Component({ - selector: 'app-branding-dialog', - templateUrl: './branding-dialog.component.html', - styleUrls: ['./branding-dialog.component.css'] -}) -export class BrandingDialogComponent { - constructor( - public dialogRef: MatDialogRef, - @Inject(MAT_DIALOG_DATA) public data: any - ) {} - - onProceed(): void { - this.dialogRef.close('proceed'); - } -} +// import { Component, Inject } from '@angular/core'; +// import { MAT_LEGACY_DIALOG_DATA as MAT_DIALOG_DATA, MatLegacyDialogRef as MatDialogRef } from '@angular/material/legacy-dialog'; +// +// @Component({ +// selector: 'app-branding-dialog', +// templateUrl: './branding-dialog.component.html', +// styleUrls: ['./branding-dialog.component.css'] +// }) +// export class BrandingDialogComponent { +// constructor( +// public dialogRef: MatDialogRef, +// @Inject(MAT_DIALOG_DATA) public data: any +// ) {} +// +// onProceed(): void { +// this.dialogRef.close('proceed'); +// } +// } diff --git a/frontend/src/app/modules/analytics/search-policies/search-policies.component.scss b/frontend/src/app/modules/analytics/search-policies/search-policies.component.scss index 6b85ae2655..395ca70ec0 100644 --- a/frontend/src/app/modules/analytics/search-policies/search-policies.component.scss +++ b/frontend/src/app/modules/analytics/search-policies/search-policies.component.scss @@ -272,10 +272,6 @@ } } -::ng-deep .p-datatable-wrapper { - max-height: calc(100vh - 172px) !important; -} - .header { height: 56px; font-size: 12px; diff --git a/frontend/src/app/modules/common/material.module.ts b/frontend/src/app/modules/common/material.module.ts index c3f87ec621..589335e898 100644 --- a/frontend/src/app/modules/common/material.module.ts +++ b/frontend/src/app/modules/common/material.module.ts @@ -1,186 +1,43 @@ -// import { NgModule } from '@angular/core'; -// import { CommonModule } from '@angular/common'; -// // import { MatLegacyTabsModule as MatTabsModule } from '@angular/material/legacy-tabs'; -// import { MatStepperModule } from '@angular/material/stepper'; -// // import { MatExpansionModule } from '@angular/material/expansion'; -// // import { MatIconModule } from '@angular/material/icon'; -// import { ReactiveFormsModule } from '@angular/forms'; -// // import { MatLegacyInputModule as MatInputModule } from '@angular/material/legacy-input'; -// // import { MatLegacyButtonModule as MatButtonModule } from '@angular/material/legacy-button'; -// import { MatLegacyTableModule as MatTableModule } from '@angular/material/legacy-table'; -// import { MatLegacyDialogModule as MatDialogModule } from '@angular/material/legacy-dialog'; -// import { MatLegacyProgressSpinnerModule as MatProgressSpinnerModule } from '@angular/material/legacy-progress-spinner'; -// import { MatToolbarModule } from '@angular/material/toolbar'; -// import { MatLegacyMenuModule as MatMenuModule } from '@angular/material/legacy-menu'; -// import { MatDividerModule } from '@angular/material/divider'; -// import { MatLegacyListModule as MatListModule } from '@angular/material/legacy-list'; -// import { MatLegacyProgressBarModule as MatProgressBarModule } from '@angular/material/legacy-progress-bar'; -// import { MatLegacySelectModule as MatSelectModule } from '@angular/material/legacy-select'; -// import { MatLegacyCheckboxModule as MatCheckboxModule } from '@angular/material/legacy-checkbox'; -// import { MatTreeModule } from '@angular/material/tree'; -// import { MatDatepickerModule } from '@angular/material/datepicker'; -// import { MatLegacyRadioModule as MatRadioModule } from '@angular/material/legacy-radio'; -// import { MatNativeDateModule } from '@angular/material/core'; -// import { MatLegacyTooltipModule as MatTooltipModule } from '@angular/material/legacy-tooltip'; -// import { MatLegacySlideToggleModule as MatSlideToggleModule } from '@angular/material/legacy-slide-toggle'; -// import { ClipboardModule } from '@angular/cdk/clipboard'; -// import { MatLegacyPaginatorModule as MatPaginatorModule } from '@angular/material/legacy-paginator'; -// import { MatSortModule } from '@angular/material/sort'; -// import { MatLegacyChipsModule as MatChipsModule } from '@angular/material/legacy-chips'; -// import { MatLegacyAutocompleteModule as MatAutocompleteModule } from '@angular/material/legacy-autocomplete'; -// import { MatButtonToggleModule } from '@angular/material/button-toggle'; -// import { DragDropModule } from '@angular/cdk/drag-drop'; -// import { CdkTableModule } from '@angular/cdk/table'; -// import { MatLegacySliderModule as MatSliderModule } from '@angular/material/legacy-slider'; -// import { MatBadgeModule } from '@angular/material/badge'; -// // import { TabViewModule } from 'primeng/tabview'; -// import { AccordionModule } from 'primeng/accordion'; -// import {TableModule} from 'primeng/table'; -// import {ButtonModule} from 'primeng/button'; -// import {MatButtonModule} from '@angular/material/button'; -// // import {InputTextModule} from 'primeng/inputtext'; -// -// @NgModule({ -// declarations: [], -// imports: [ -// //angular modules -// CommonModule, -// ReactiveFormsModule, -// // MatTabsModule, -// // TabViewModule, -// -// MatStepperModule, -// -// // ButtonModule, -// -// // MatExpansionModule, -// AccordionModule, -// // TableModule, -// -// // MatIconModule, -// -// // MatInputModule, -// // InputTextModule, -// -// MatButtonModule, -// -// MatTableModule, -// TableModule, -// -// MatDialogModule, -// MatDatepickerModule, -// MatRadioModule, -// MatNativeDateModule, -// MatProgressSpinnerModule, -// MatToolbarModule, -// MatMenuModule, -// MatDividerModule, -// MatListModule, -// MatProgressBarModule, -// MatSelectModule, -// MatCheckboxModule, -// MatTreeModule, -// MatTooltipModule, -// MatSlideToggleModule, -// MatPaginatorModule, -// MatButtonToggleModule, -// DragDropModule, -// MatSliderModule, -// CdkTableModule, -// MatBadgeModule -// ], -// exports: [ -// //angular modules -// ReactiveFormsModule, -// // MatTabsModule, -// // TabViewModule, -// -// MatStepperModule, -// -// // ButtonModule, -// -// // MatExpansionModule, -// AccordionModule, -// // TableModule, -// -// // MatIconModule, -// -// // MatInputModule, -// // InputTextModule, -// -// MatButtonModule, -// -// MatTableModule, -// TableModule, -// -// MatDialogModule, -// MatDatepickerModule, -// MatRadioModule, -// MatNativeDateModule, -// MatProgressSpinnerModule, -// MatToolbarModule, -// MatMenuModule, -// MatDividerModule, -// MatListModule, -// MatProgressBarModule, -// MatSelectModule, -// MatCheckboxModule, -// MatTreeModule, -// MatTooltipModule, -// MatSlideToggleModule, -// ClipboardModule, -// MatPaginatorModule, -// MatSortModule, -// MatChipsModule, -// MatAutocompleteModule, -// MatButtonToggleModule, -// DragDropModule, -// MatSliderModule, -// CdkTableModule, -// MatBadgeModule -// ] -// }) -// export class MaterialModule { } - -import { NgModule } from '@angular/core'; -import { CommonModule } from '@angular/common'; +import {NgModule} from '@angular/core'; +import {CommonModule} from '@angular/common'; // import { MatLegacyTabsModule as MatTabsModule } from '@angular/material/legacy-tabs'; -import { MatStepperModule } from '@angular/material/stepper'; -import { MatExpansionModule } from '@angular/material/expansion'; -import { MatIconModule } from '@angular/material/icon'; -import { ReactiveFormsModule } from '@angular/forms'; -import { MatLegacyInputModule as MatInputModule } from '@angular/material/legacy-input'; -import { MatLegacyButtonModule as MatButtonModule } from '@angular/material/legacy-button'; -import { MatLegacyTableModule as MatTableModule } from '@angular/material/legacy-table'; -import { MatLegacyDialogModule as MatDialogModule } from '@angular/material/legacy-dialog'; -import { MatLegacyProgressSpinnerModule as MatProgressSpinnerModule } from '@angular/material/legacy-progress-spinner'; -import { MatToolbarModule } from '@angular/material/toolbar'; -import { MatLegacyMenuModule as MatMenuModule } from '@angular/material/legacy-menu'; -import { MatDividerModule } from '@angular/material/divider'; -import { MatLegacyListModule as MatListModule } from '@angular/material/legacy-list'; -import { MatLegacyProgressBarModule as MatProgressBarModule } from '@angular/material/legacy-progress-bar'; -import { MatLegacySelectModule as MatSelectModule } from '@angular/material/legacy-select'; -import { MatLegacyCheckboxModule as MatCheckboxModule } from '@angular/material/legacy-checkbox'; -import { MatTreeModule } from '@angular/material/tree'; -import { MatDatepickerModule } from '@angular/material/datepicker'; -import { MatLegacyRadioModule as MatRadioModule } from '@angular/material/legacy-radio'; -import { MatNativeDateModule } from '@angular/material/core'; -import { MatLegacyTooltipModule as MatTooltipModule } from '@angular/material/legacy-tooltip'; -import { MatLegacySlideToggleModule as MatSlideToggleModule } from '@angular/material/legacy-slide-toggle'; -import { ClipboardModule } from '@angular/cdk/clipboard'; -import { MatLegacyPaginatorModule as MatPaginatorModule } from '@angular/material/legacy-paginator'; -import { MatSortModule } from '@angular/material/sort'; -import { MatLegacyChipsModule as MatChipsModule } from '@angular/material/legacy-chips'; -import { MatLegacyAutocompleteModule as MatAutocompleteModule } from '@angular/material/legacy-autocomplete'; -import { MatButtonToggleModule } from '@angular/material/button-toggle'; -import { DragDropModule } from '@angular/cdk/drag-drop'; -import { CdkTableModule } from '@angular/cdk/table'; -import { MatLegacySliderModule as MatSliderModule } from '@angular/material/legacy-slider'; -import { MatBadgeModule } from '@angular/material/badge'; -import { TabViewModule } from 'primeng/tabview'; -import { AccordionModule } from 'primeng/accordion'; +import {MatStepperModule} from '@angular/material/stepper'; +import {MatExpansionModule} from '@angular/material/expansion'; +import {MatIconModule} from '@angular/material/icon'; +import {ReactiveFormsModule} from '@angular/forms'; +import {MatLegacyInputModule as MatInputModule} from '@angular/material/legacy-input'; +import {MatLegacyButtonModule as MatButtonModule} from '@angular/material/legacy-button'; +import {MatLegacyTableModule as MatTableModule} from '@angular/material/legacy-table'; +import {MatLegacyDialogModule as MatDialogModule} from '@angular/material/legacy-dialog'; +import {MatLegacyProgressSpinnerModule as MatProgressSpinnerModule} from '@angular/material/legacy-progress-spinner'; +import {MatToolbarModule} from '@angular/material/toolbar'; +import {MatLegacyMenuModule as MatMenuModule} from '@angular/material/legacy-menu'; +import {MatDividerModule} from '@angular/material/divider'; +import {MatLegacyListModule as MatListModule} from '@angular/material/legacy-list'; +import {MatLegacyProgressBarModule as MatProgressBarModule} from '@angular/material/legacy-progress-bar'; +import {MatLegacySelectModule as MatSelectModule} from '@angular/material/legacy-select'; +import {MatLegacyCheckboxModule as MatCheckboxModule} from '@angular/material/legacy-checkbox'; +import {MatTreeModule} from '@angular/material/tree'; +import {MatDatepickerModule} from '@angular/material/datepicker'; +import {MatLegacyRadioModule as MatRadioModule} from '@angular/material/legacy-radio'; +import {MatNativeDateModule} from '@angular/material/core'; +import {MatLegacyTooltipModule as MatTooltipModule} from '@angular/material/legacy-tooltip'; +import {MatLegacySlideToggleModule as MatSlideToggleModule} from '@angular/material/legacy-slide-toggle'; +import {ClipboardModule} from '@angular/cdk/clipboard'; +import {MatLegacyPaginatorModule as MatPaginatorModule} from '@angular/material/legacy-paginator'; +import {MatSortModule} from '@angular/material/sort'; +import {MatLegacyChipsModule as MatChipsModule} from '@angular/material/legacy-chips'; +import {MatLegacyAutocompleteModule as MatAutocompleteModule} from '@angular/material/legacy-autocomplete'; +import {MatButtonToggleModule} from '@angular/material/button-toggle'; +import {DragDropModule} from '@angular/cdk/drag-drop'; +import {CdkTableModule} from '@angular/cdk/table'; +import {MatLegacySliderModule as MatSliderModule} from '@angular/material/legacy-slider'; +import {MatBadgeModule} from '@angular/material/badge'; +import {TabViewModule} from 'primeng/tabview'; +import {AccordionModule} from 'primeng/accordion'; import {TableModule} from 'primeng/table'; import {ButtonModule} from 'primeng/button'; +import {SelectButtonModule} from 'primeng/selectbutton'; @NgModule({ declarations: [], @@ -193,16 +50,21 @@ import {ButtonModule} from 'primeng/button'; // MatExpansionModule, AccordionModule, + // MatTableModule, TableModule, // MatIconModule, - // ButtonModule, ReactiveFormsModule, + // MatInputModule, - MatButtonModule, - MatTableModule, + // MatButtonModule, + ButtonModule, + // MatButtonToggleModule, + SelectButtonModule, + MatDialogModule, + MatDatepickerModule, MatRadioModule, MatNativeDateModule, @@ -218,7 +80,7 @@ import {ButtonModule} from 'primeng/button'; MatTooltipModule, MatSlideToggleModule, MatPaginatorModule, - MatButtonToggleModule, + DragDropModule, MatSliderModule, CdkTableModule, @@ -231,19 +93,22 @@ import {ButtonModule} from 'primeng/button'; MatStepperModule, // MatExpansionModule, + // MatTableModule, AccordionModule, TableModule, // MatIconModule, - // ButtonModule, ReactiveFormsModule, - MatInputModule, - MatButtonModule, - MatTableModule, + // MatInputModule, + // MatButtonModule, + ButtonModule, + // MatButtonToggleModule, + SelectButtonModule, MatDialogModule, + MatDatepickerModule, MatRadioModule, MatNativeDateModule, @@ -263,11 +128,12 @@ import {ButtonModule} from 'primeng/button'; MatSortModule, MatChipsModule, MatAutocompleteModule, - MatButtonToggleModule, + DragDropModule, MatSliderModule, CdkTableModule, MatBadgeModule ] }) -export class MaterialModule { } +export class MaterialModule { +} diff --git a/frontend/src/app/modules/contract-engine/configs/contract-config/contract-config.component.css b/frontend/src/app/modules/contract-engine/configs/contract-config/contract-config.component.css index e27d17536d..3d7740c6f1 100644 --- a/frontend/src/app/modules/contract-engine/configs/contract-config/contract-config.component.css +++ b/frontend/src/app/modules/contract-engine/configs/contract-config/contract-config.component.css @@ -99,6 +99,37 @@ z-index: 0; } +.select-btn__container { + display: grid; + align-items: center; +} + +::ng-deep p-selectbutton .p-button { + height: 50px; + width: max-content; + font-size: 14px; + padding: 9px; + color: rgba(0, 0, 0, 0.87); +} + +::ng-deep p-selectbutton .p-button[aria-pressed="true"] { + background-color: #e0e0e0; + border: 1px solid #ced4da; +} + +::ng-deep p-selectbutton .p-button[aria-pressed="true"]:focus { + border: 1px solid #ced4da; +} + +::ng-deep .p-selectbutton .p-button:focus { + outline: none; + box-shadow: none; +} + +::ng-deep .p-selectbutton .p-button.p-highlight { + pointer-events: none; +} + .action-btn { background: #4caf50; color: #fff; @@ -140,8 +171,8 @@ .actions { display: grid; - grid-template-columns: auto 1fr; - padding: 14px 14px 14px 14px; + grid-template-columns: auto 0; + padding: 14px 20px 14px 14px; border-bottom: 1px solid #eee; margin: 0; height: 92px; @@ -153,7 +184,18 @@ margin: 8px 10px 0 10px; } -.toolbar-btn { +.toolbar-btn__container { + display: grid; + grid-template-columns: 1fr 1fr; + width: 30%; + /*margin-left: 65%;*/ + column-gap: 20px; + align-content: center; + justify-content: end; +} + +.toolbar-btn, +::ng-deep button.p-toolbar-btn { margin: 15px; min-width: 120px; cursor: pointer; @@ -168,16 +210,37 @@ padding-right: 30px; } -.toolbar-btn i, -.toolbar-btn svg { - position: absolute; +::ng-deep button.p-toolbar-btn { + height: 48px; + width: 178px; + padding: 0; + padding-left: 22px!important; + margin: 0; + background: var(--color-primary); +} + +/*.toolbar-btn i,*/ +/*.toolbar-btn svg {*/ +/* position: absolute;*/ +/* left: 14px;*/ +/* top: 12px;*/ +/* font-size: 20px;*/ +/*}*/ + +/*.toolbar-btn.add i,*/ +/*.toolbar-btn.add svg {*/ +/* font-size: 20px;*/ +/* left: 14px;*/ +/* top: 12px;*/ +/*}*/ + +::ng-deep button span.pi { left: 14px; top: 12px; font-size: 20px; } -.toolbar-btn.add i, -.toolbar-btn.add svg { +::ng-deep button span.pi-plus { font-size: 20px; left: 14px; top: 12px; @@ -214,10 +277,6 @@ align-items: center; } -::ng-deep .p-datatable-wrapper { - max-height: calc(100vh - 172px) !important; -} - .header { height: 56px; font-size: 12px; diff --git a/frontend/src/app/modules/contract-engine/configs/contract-config/contract-config.component.html b/frontend/src/app/modules/contract-engine/configs/contract-config/contract-config.component.html index 6bf692ba60..60d7a611f3 100644 --- a/frontend/src/app/modules/contract-engine/configs/contract-config/contract-config.component.html +++ b/frontend/src/app/modules/contract-engine/configs/contract-config/contract-config.component.html @@ -11,151 +11,175 @@
-
- - Token wiping contracts - Token retirement contracts - + + + + + + + +
+
-
- - + + + + + + + + + + + + + + + + +
+ + +
+
+
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Hedera Contract Id - Description - Tags - Permissions - Operations - - - - - - - - {{ element.contractId }} - - - - - {{ element.description }} - - - - - - - -
-
- O - A - M - W -
- -
- - - -
- - Operations - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Hedera Contract Id + Description + Tags + Permissions + Operations + + + + + + + + {{ element.contractId }} + + + + + {{ element.description }} + + + + + + + +
+
+ O + A + M + W
- - - - + +
+ + + +
+ + Operations + +
+ + +
+
diff --git a/frontend/src/app/modules/contract-engine/configs/user-contract-config/user-contract-config.component.css b/frontend/src/app/modules/contract-engine/configs/user-contract-config/user-contract-config.component.css index f802a60de6..7cc707a77c 100644 --- a/frontend/src/app/modules/contract-engine/configs/user-contract-config/user-contract-config.component.css +++ b/frontend/src/app/modules/contract-engine/configs/user-contract-config/user-contract-config.component.css @@ -105,10 +105,6 @@ background: #4caf50; } -::ng-deep .p-datatable-wrapper { - max-height: calc(100vh - 172px) !important; -} - .header { height: 56px; font-size: 12px; diff --git a/frontend/src/app/modules/policy-engine/policy-viewer/blocks/group-manager-block/group-manager-block.component.scss b/frontend/src/app/modules/policy-engine/policy-viewer/blocks/group-manager-block/group-manager-block.component.scss index 39c5f52540..e516148a90 100644 --- a/frontend/src/app/modules/policy-engine/policy-viewer/blocks/group-manager-block/group-manager-block.component.scss +++ b/frontend/src/app/modules/policy-engine/policy-viewer/blocks/group-manager-block/group-manager-block.component.scss @@ -189,10 +189,6 @@ color: var(--button-primary-color); } -::ng-deep .p-datatable-wrapper { - max-height: calc(100vh - 172px) !important; -} - .header { height: 56px; font-size: 12px; diff --git a/frontend/src/app/views/audit/audit.component.css b/frontend/src/app/views/audit/audit.component.css index 69b07bebd8..68088da8d1 100644 --- a/frontend/src/app/views/audit/audit.component.css +++ b/frontend/src/app/views/audit/audit.component.css @@ -91,10 +91,6 @@ a[disabled="true"] { margin-right: 15px; } -::ng-deep .p-datatable-wrapper { - max-height: calc(100vh - 172px) !important; -} - .header { height: 56px; font-size: 12px; From e82c5b4fcad56e6a38c43811f9fefebd66d4d79c Mon Sep 17 00:00:00 2001 From: Ihar Date: Thu, 14 Nov 2024 16:38:44 +0500 Subject: [PATCH 08/48] feat: move dialog module to prime ng[3141] --- .../meeco-vc-submit-dialog.component.ts | 21 +-- .../qr-code-dialog.component.ts | 13 +- .../artifact-config.component.ts | 12 +- .../artifact-import-dialog.component.ts | 14 +- .../modules/common/alert/alert.component.html | 33 +++-- .../modules/common/alert/alert.component.scss | 27 ++++ .../modules/common/alert/alert.component.ts | 17 ++- .../confirm-dialog.component.ts | 14 +- .../confirmation-dialog.component.ts | 34 +++-- .../data-input-dialog.component.css | 102 ++++++++++++++ .../data-input-dialog.component.html | 70 +++++++--- .../data-input-dialog.component.ts | 14 +- .../icon-preview-dialog.component.ts | 44 +++--- .../src/app/modules/common/material.module.ts | 18 +-- .../selector-dialog.component.css | 58 +++++++- .../selector-dialog.component.html | 53 ++++--- .../selector-dialog.component.ts | 39 ++++-- .../contract-config.component.ts | 76 ++++++---- .../user-contract-config.component.ts | 24 ++-- .../retire-pools-dialog.component.ts | 25 ++-- .../retire-requests-dialog.component.ts | 17 ++- .../set-pool-dialog.component.ts | 8 +- .../user-retire-pools-dialog.component.ts | 6 +- .../user-retire-requests-dialog.component.ts | 16 ++- .../wipe-requests-dialog.component.ts | 21 ++- .../code-editor-dialog.component.ts | 15 +- .../cron-config-dialog.component.ts | 12 +- .../invite-dialog/invite-dialog.component.ts | 11 +- .../multi-policy-dialog.component.ts | 11 +- .../new-theme-dialog.component.ts | 11 +- .../save-before-dialog.component.ts | 8 +- .../save-policy-dialog.component.html | 130 ++++++++++++------ .../save-policy-dialog.component.scss | 74 +++++++++- .../save-policy-dialog.component.ts | 18 ++- .../viewer-dialog/viewer-dialog.component.ts | 23 ++-- .../modules-list/modules-list.component.ts | 2 +- .../policies/policies.component.ts | 30 ++-- .../custom-logic-config.component.ts | 21 +-- .../aggregate-config.component.ts | 6 +- .../timer-config/timer-config.component.ts | 16 ++- .../http-request-config.component.ts | 23 ++-- .../report-item-config.component.ts | 6 +- .../policy-configuration.component.ts | 34 +++-- .../policy-settings.component.ts | 28 ++-- .../button-block/button-block.component.ts | 4 +- .../document-dialog-block.component.ts | 22 ++- .../documents-source-block.component.ts | 8 +- .../group-manager-block.component.ts | 21 ++- .../messages-report-block.component.ts | 4 +- .../report-block/report-block.component.ts | 4 +- .../request-document-block-addon.component.ts | 4 +- .../upload-document-block.component.ts | 35 +++-- .../dialog-block/dialog-block.component.ts | 20 ++- .../record-controller.component.ts | 23 ++-- .../record-result-dialog.component.ts | 25 ++-- .../policy-engine/services/wizard.service.ts | 40 +++--- .../tools-list/tools-list.component.ts | 12 +- .../copy-schema-dialog/copy-schema-dialog.ts | 13 +- .../schema-field-configuration.component.ts | 15 +- .../schema-form-dialog.component.ts | 12 +- .../schema-tree/schema-tree.component.ts | 23 ++-- .../schema-view-dialog.component.ts | 25 ++-- .../set-version-dialog.component.ts | 9 +- .../tags-explorer/tags-explorer.component.ts | 2 +- frontend/src/app/utils/mobile-utils.ts | 9 +- .../src/app/views/audit/audit.component.ts | 4 +- .../app/views/branding/branding.component.ts | 3 +- .../src/app/views/header/header.component.ts | 4 +- .../src/app/views/login/login.component.ts | 45 ++++-- .../views/new-header/new-header.component.ts | 4 +- .../notifications/notifications.component.ts | 4 +- .../policy-guided-search.component.ts | 4 +- .../policy-search/policy-search.component.ts | 4 +- .../app/views/roles/roles-view.component.ts | 35 +++-- .../app/views/schemas/schemas.component.ts | 47 ++++--- .../trust-chain/trust-chain.component.ts | 4 +- .../user-profile/user-profile.component.ts | 4 +- .../worker-tasks/worker-tasks.component.ts | 4 +- 78 files changed, 1231 insertions(+), 520 deletions(-) diff --git a/frontend/src/app/components/meeco-vc-submit-dialog/meeco-vc-submit-dialog.component.ts b/frontend/src/app/components/meeco-vc-submit-dialog/meeco-vc-submit-dialog.component.ts index 61da250fb7..1d2f487469 100644 --- a/frontend/src/app/components/meeco-vc-submit-dialog/meeco-vc-submit-dialog.component.ts +++ b/frontend/src/app/components/meeco-vc-submit-dialog/meeco-vc-submit-dialog.component.ts @@ -1,7 +1,8 @@ import { Component, Inject } from '@angular/core'; -import { MAT_LEGACY_DIALOG_DATA as MAT_DIALOG_DATA, MatLegacyDialogRef as MatDialogRef } from '@angular/material/legacy-dialog'; +// import { MAT_LEGACY_DIALOG_DATA as MAT_DIALOG_DATA, MatLegacyDialogRef as MatDialogRef } from '@angular/material/legacy-dialog'; import { UserRole } from '@guardian/interfaces'; import { WebSocketService } from 'src/app/services/web-socket.service'; +import {DynamicDialogConfig, DynamicDialogRef} from 'primeng/dynamicdialog'; interface VCSubmitDialogData { document: any; @@ -42,14 +43,18 @@ export class MeecoVCSubmitDialogComponent { selectedRole: UserRole; constructor( - @Inject(MAT_DIALOG_DATA) private data: VCSubmitDialogData, - private dialogRef: MatDialogRef, - private wsService: WebSocketService + // @Inject(MAT_DIALOG_DATA) private data: VCSubmitDialogData, + // private dialogRef: MatDialogRef, + private dialogRef: DynamicDialogRef, + private config: DynamicDialogConfig, + private wsService: WebSocketService ) { - this.vcSubject = Object.entries(this.data.document); - this.presentationRequestId = this.data.presentationRequestId; - this.submissionId = this.data.submissionId; - this.userRole = this.data.userRole; + const data = this.config.data as VCSubmitDialogData; + + this.vcSubject = Object.entries(data.document); + this.presentationRequestId = data.presentationRequestId; + this.submissionId = data.submissionId; + this.userRole = data.userRole; } private closeDialog(): void { diff --git a/frontend/src/app/components/qr-code-dialog/qr-code-dialog.component.ts b/frontend/src/app/components/qr-code-dialog/qr-code-dialog.component.ts index c97c70aacc..5c6d218a17 100644 --- a/frontend/src/app/components/qr-code-dialog/qr-code-dialog.component.ts +++ b/frontend/src/app/components/qr-code-dialog/qr-code-dialog.component.ts @@ -1,9 +1,10 @@ import { Component, Inject, OnDestroy } from '@angular/core'; -import { MAT_LEGACY_DIALOG_DATA as MAT_DIALOG_DATA, MatLegacyDialogRef as MatDialogRef } from '@angular/material/legacy-dialog'; +// import { MAT_LEGACY_DIALOG_DATA as MAT_DIALOG_DATA, MatLegacyDialogRef as MatDialogRef } from '@angular/material/legacy-dialog'; import { ToastrService } from 'ngx-toastr'; import { Subject } from 'rxjs'; import { takeUntil } from 'rxjs/operators'; import { WebSocketService } from 'src/app/services/web-socket.service'; +import {DynamicDialogConfig, DynamicDialogRef} from 'primeng/dynamicdialog'; @Component({ selector: 'app-qr-code-dialog', @@ -17,12 +18,16 @@ export class QrCodeDialogComponent implements OnDestroy { isMobile: boolean = window.innerWidth <= 810; constructor( - @Inject(MAT_DIALOG_DATA) private data: any, - private dialogRef: MatDialogRef, + // @Inject(MAT_DIALOG_DATA) private data: any, + // private dialogRef: MatDialogRef, + private dialogRef: DynamicDialogRef, + private config: DynamicDialogConfig, private toastr: ToastrService, private wsService: WebSocketService ) { - this.qrCodeData = this.data.qrCodeData; + const data = this.config.data + + this.qrCodeData = data.qrCodeData; this.handleNoQRCodeData(); this.handleMeecoVerificationFail(); } diff --git a/frontend/src/app/modules/artifact-engine/artifact-config/artifact-config.component.ts b/frontend/src/app/modules/artifact-engine/artifact-config/artifact-config.component.ts index 2eb8c5e058..8ee702612c 100644 --- a/frontend/src/app/modules/artifact-engine/artifact-config/artifact-config.component.ts +++ b/frontend/src/app/modules/artifact-engine/artifact-config/artifact-config.component.ts @@ -1,5 +1,5 @@ import { Component, OnInit } from '@angular/core'; -import { MatLegacyDialog as MatDialog } from '@angular/material/legacy-dialog'; +// import { MatLegacyDialog as MatDialog } from '@angular/material/legacy-dialog'; import { ActivatedRoute, Router } from '@angular/router'; import { IUser, PolicyType, UserPermissions } from '@guardian/interfaces'; import { HttpResponse } from '@angular/common/http'; @@ -8,6 +8,7 @@ import { PolicyEngineService } from 'src/app/services/policy-engine.service'; import { ProfileService } from 'src/app/services/profile.service'; import { ArtifactService } from 'src/app/services/artifact.service'; import { ArtifactImportDialog } from '../artifact-import-dialog/artifact-import-dialog.component'; +import {DialogService} from 'primeng/dynamicdialog'; /** * Page for creating, editing, importing and exporting schemas. @@ -46,7 +47,8 @@ export class ArtifactConfigComponent implements OnInit { private policyEngineService: PolicyEngineService, private route: ActivatedRoute, private router: Router, - public dialog: MatDialog, + // public dialog: MatDialog, + private dialog: DialogService, private artifact: ArtifactService) { this.policies = []; this.filterOptions = []; @@ -157,10 +159,12 @@ export class ArtifactConfigComponent implements OnInit { policyId: this.currentPolicy?.id, policies: this.policies }, - disableClose: true, + // disableClose: true, + modal: true, + closable: false, }); - dialogRef.afterClosed().subscribe((result) => { + dialogRef.onClose.subscribe((result) => { if (!result) { return; } diff --git a/frontend/src/app/modules/artifact-engine/artifact-import-dialog/artifact-import-dialog.component.ts b/frontend/src/app/modules/artifact-engine/artifact-import-dialog/artifact-import-dialog.component.ts index 111298fd16..7da27135bd 100644 --- a/frontend/src/app/modules/artifact-engine/artifact-import-dialog/artifact-import-dialog.component.ts +++ b/frontend/src/app/modules/artifact-engine/artifact-import-dialog/artifact-import-dialog.component.ts @@ -1,7 +1,8 @@ import { Component, Inject } from '@angular/core'; import { UntypedFormBuilder, Validators } from '@angular/forms'; -import { MAT_LEGACY_DIALOG_DATA as MAT_DIALOG_DATA, MatLegacyDialogRef as MatDialogRef } from '@angular/material/legacy-dialog'; +// import { MAT_LEGACY_DIALOG_DATA as MAT_DIALOG_DATA, MatLegacyDialogRef as MatDialogRef } from '@angular/material/legacy-dialog'; import { PolicyType } from '@guardian/interfaces'; +import {DynamicDialogConfig, DynamicDialogRef} from 'primeng/dynamicdialog'; /** * Import Artifacts Dialog. @@ -16,9 +17,14 @@ export class ArtifactImportDialog { public policies: any = []; constructor( - public dialogRef: MatDialogRef, - private fb: UntypedFormBuilder, - @Inject(MAT_DIALOG_DATA) public data: any) { + // public dialogRef: MatDialogRef, + // @Inject(MAT_DIALOG_DATA) public data: any + private dialogRef: DynamicDialogRef, + private config: DynamicDialogConfig, + private fb: UntypedFormBuilder + ) { + const data = this.config.data + if (data) { this.policies = data.policies?.filter((policy: any) => policy.status === PolicyType.DRAFT) || []; const current = this.policies.find((policy: any) => policy.id === data.policyId); diff --git a/frontend/src/app/modules/common/alert/alert.component.html b/frontend/src/app/modules/common/alert/alert.component.html index 8aa33d3c42..9cdac241b0 100644 --- a/frontend/src/app/modules/common/alert/alert.component.html +++ b/frontend/src/app/modules/common/alert/alert.component.html @@ -1,14 +1,27 @@ -
-
- + + + - + + + + + + + + + + + + + -
-
{{ text }}
-
- - - +
+ +
+ diff --git a/frontend/src/app/modules/common/alert/alert.component.scss b/frontend/src/app/modules/common/alert/alert.component.scss index b76999135c..51eec15a87 100644 --- a/frontend/src/app/modules/common/alert/alert.component.scss +++ b/frontend/src/app/modules/common/alert/alert.component.scss @@ -18,3 +18,30 @@ color: var(--primary-color); } } + +:host ::ng-deep .p-dialog { + width: 720px; + border-radius: 16px !important; + display: grid; + transform: none; + max-height: none; + padding: 32px; + background: var(--color-grey-white, #FFF); +} + +:host ::ng-deep .p-dialog .p-dialog-header { + padding: 0; + font: 400 24px / 32px Roboto, "Helvetica Neue", sans-serif; +} + +:host ::ng-deep .p-dialog .p-button-ok { + background-color: var(--primary-color); + color: var(--color-grey-white, #FFF); + border-radius: 20px; + padding: 8px 24px; + font-weight: bold; +} + +:host ::ng-deep .p-dialog .p-button-ok:hover { + background-color: var(--blue-700); +} diff --git a/frontend/src/app/modules/common/alert/alert.component.ts b/frontend/src/app/modules/common/alert/alert.component.ts index 125d26239f..8f3dcca644 100644 --- a/frontend/src/app/modules/common/alert/alert.component.ts +++ b/frontend/src/app/modules/common/alert/alert.component.ts @@ -1,5 +1,7 @@ import { Component, Inject, OnInit } from '@angular/core'; -import { MAT_LEGACY_DIALOG_DATA as MAT_DIALOG_DATA, MatLegacyDialogRef as MatDialogRef } from '@angular/material/legacy-dialog'; +// import { MAT_LEGACY_DIALOG_DATA as MAT_DIALOG_DATA, MatLegacyDialogRef as MatDialogRef } from '@angular/material/legacy-dialog'; + +import { DynamicDialogRef, DynamicDialogConfig } from 'primeng/dynamicdialog'; export enum AlertType { ERROR = 'Error', @@ -16,11 +18,16 @@ export class AlertComponent implements OnInit { type?: AlertType; text?: string; icon?: string; + isVisible: boolean = true; constructor( - public dialogRef: MatDialogRef, - @Inject(MAT_DIALOG_DATA) public data: any + // public dialogRef: MatDialogRef, + // @Inject(MAT_DIALOG_DATA) public data: any + public dialogRef: DynamicDialogRef, + public config: DynamicDialogConfig ) { + const data = config.data; + this.type = data?.type; this.text = data?.text; this.icon = this.getIconByType(this.type); @@ -53,4 +60,8 @@ export class AlertComponent implements OnInit { return; } } + + closeDialog(): void { + this.dialogRef.close(); + } } diff --git a/frontend/src/app/modules/common/confirm-dialog/confirm-dialog.component.ts b/frontend/src/app/modules/common/confirm-dialog/confirm-dialog.component.ts index 576ee9ad1a..d0d23b8f24 100644 --- a/frontend/src/app/modules/common/confirm-dialog/confirm-dialog.component.ts +++ b/frontend/src/app/modules/common/confirm-dialog/confirm-dialog.component.ts @@ -1,5 +1,7 @@ -import { Component, Inject } from '@angular/core'; -import { MatLegacyDialogRef as MatDialogRef, MAT_LEGACY_DIALOG_DATA as MAT_DIALOG_DATA } from '@angular/material/legacy-dialog'; +import {Component, Inject} from '@angular/core'; +import {DynamicDialogConfig, DynamicDialogRef} from 'primeng/dynamicdialog'; + +// import { MatLegacyDialogRef as MatDialogRef, MAT_LEGACY_DIALOG_DATA as MAT_DIALOG_DATA } from '@angular/material/legacy-dialog'; /** * Dialog allowing you to select a file and load schemes. @@ -16,9 +18,13 @@ export class ConfirmDialog { public cancelButton: string = 'Cancel'; constructor( - public dialogRef: MatDialogRef, - @Inject(MAT_DIALOG_DATA) public data: any + // public dialogRef: MatDialogRef, + // @Inject(MAT_DIALOG_DATA) public data: any + private dialogRef: DynamicDialogRef, + private config: DynamicDialogConfig, ) { + const data = this.config.data + this.title = data.title; this.submitButton = data.submitButton || 'Ok'; this.cancelButton = data.cancelButton || 'Cancel'; diff --git a/frontend/src/app/modules/common/confirmation-dialog/confirmation-dialog.component.ts b/frontend/src/app/modules/common/confirmation-dialog/confirmation-dialog.component.ts index 63cf1a24ca..45ba3e3e30 100644 --- a/frontend/src/app/modules/common/confirmation-dialog/confirmation-dialog.component.ts +++ b/frontend/src/app/modules/common/confirmation-dialog/confirmation-dialog.component.ts @@ -1,27 +1,31 @@ -import { Component, Inject, OnInit } from '@angular/core'; -import { MAT_LEGACY_DIALOG_DATA as MAT_DIALOG_DATA, MatLegacyDialogRef as MatDialogRef } from '@angular/material/legacy-dialog'; -import { DynamicDialogConfig, DynamicDialogRef } from 'primeng/dynamicdialog'; +import {Component, Inject, OnInit} from '@angular/core'; +// import { MAT_LEGACY_DIALOG_DATA as MAT_DIALOG_DATA, MatLegacyDialogRef as MatDialogRef } from '@angular/material/legacy-dialog'; +import {DynamicDialogConfig, DynamicDialogRef} from 'primeng/dynamicdialog'; @Component({ - selector: 'app-confirmation-dialog', - templateUrl: './confirmation-dialog.component.html', - styleUrls: ['./confirmation-dialog.component.css'] + selector: 'app-confirmation-dialog', + templateUrl: './confirmation-dialog.component.html', + styleUrls: ['./confirmation-dialog.component.css'] }) export class ConfirmationDialogComponent implements OnInit { - public dialogTitle!: string; - public dialogText!: string; + public dialogTitle!: string; + public dialogText!: string; constructor( - public dialogRef: MatDialogRef, - @Inject(MAT_DIALOG_DATA) public data: any + // public dialogRef: MatDialogRef, + // @Inject(MAT_DIALOG_DATA) public data: any, + private dialogRef: DynamicDialogRef, + private config: DynamicDialogConfig, ) { - this.dialogTitle = data.dialogTitle; - this.dialogText = data.dialogText; - } + const data = this.config.data - ngOnInit(): void { - } + this.dialogTitle = data.dialogTitle; + this.dialogText = data.dialogText; + } + + ngOnInit(): void { + } onNoClick(): void { this.dialogRef.close(false); diff --git a/frontend/src/app/modules/common/data-input-dialog/data-input-dialog.component.css b/frontend/src/app/modules/common/data-input-dialog/data-input-dialog.component.css index 5dfa3160a2..6f610e74a7 100644 --- a/frontend/src/app/modules/common/data-input-dialog/data-input-dialog.component.css +++ b/frontend/src/app/modules/common/data-input-dialog/data-input-dialog.component.css @@ -24,3 +24,105 @@ form { background: #fff; z-index: 1; } + +.modal-header { + color: #000; + font-family: Poppins, sans-serif; + font-size: 24px; + font-style: normal; + font-weight: 600; + line-height: 32px; +} + +:host ::ng-deep .p-dialog { + width: 720px; + border-radius: 16px !important; + display: grid; + transform: none; + max-height: none; + padding: 32px; + background: var(--color-grey-white, #FFF); +} + +:host ::ng-deep .p-dialog .p-dialog-header { + padding: 0; + font: 400 24px / 32px Roboto, "Helvetica Neue", sans-serif; +} + +:host ::ng-deep .p-dialog .p-dialog-content { + padding: 18px 0 0 0; +} + +.form-field { + margin-bottom: 1em; +} + +.custom-form-field { + position: relative; + padding: 0.5em; + border: 1px solid var(--color-grey-2); + border-radius: 4px; + transition: border-color 0.3s; +} + +.custom-form-field:focus-within { + border: 2px solid var(--primary-color); +} + +.custom-label { + position: absolute; + top: -0.6em; + left: 0.75em; + background-color: var(--color-grey-white, #FFF); + padding: 0 0.3em; + font-size: 0.85em; + color: var(--color-grey-5); +} + +.custom-input { + width: 100%; + padding: 0.5em; + border: none; + outline: none; + box-shadow: none; +} + +.dialog-actions { + display: flex; + justify-content: flex-start; + gap: 10px; + margin-top: 20px; +} + +:host ::ng-deep .p-dialog .p-button { + background-color: var(--color-grey-white, #FFF); + color: var(--primary-color); + border-radius: 20px; + padding: 8px 24px; + font-weight: bold; +} + +:host ::ng-deep .p-dialog .p-button-ok { + background-color: var(--primary-color); + color: var(--color-grey-white, #FFF); +} + +:host ::ng-deep .p-dialog .p-button:hover { + background-color: var(--blue-100); +} + +:host ::ng-deep .p-dialog .p-button-ok:hover { + background-color: var(--blue-700); +} + +.custom-form-field.invalid { + border: 1px solid var(--color-accent-red-1); +} + +.custom-form-field.invalid input { + color: var(--color-accent-red-1); +} + +.custom-label.invalid { + color: var(--color-accent-red-1); +} diff --git a/frontend/src/app/modules/common/data-input-dialog/data-input-dialog.component.html b/frontend/src/app/modules/common/data-input-dialog/data-input-dialog.component.html index 4a0054d099..f8f67c474f 100644 --- a/frontend/src/app/modules/common/data-input-dialog/data-input-dialog.component.html +++ b/frontend/src/app/modules/common/data-input-dialog/data-input-dialog.component.html @@ -1,20 +1,56 @@ -
-

- {{title}} -

-
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + {{ title }} + +
- - - * - {{field.label}} - - - -
- - +
+
+ + + + + + +
+
+ + +
+ +
@@ -22,4 +58,4 @@

-

\ No newline at end of file +
diff --git a/frontend/src/app/modules/common/data-input-dialog/data-input-dialog.component.ts b/frontend/src/app/modules/common/data-input-dialog/data-input-dialog.component.ts index 9028d92b6c..a0ca7814d8 100644 --- a/frontend/src/app/modules/common/data-input-dialog/data-input-dialog.component.ts +++ b/frontend/src/app/modules/common/data-input-dialog/data-input-dialog.component.ts @@ -1,7 +1,9 @@ import { Component, Inject } from '@angular/core'; -import { MatLegacyDialogRef as MatDialogRef, MAT_LEGACY_DIALOG_DATA as MAT_DIALOG_DATA } from '@angular/material/legacy-dialog'; +// import { MatLegacyDialogRef as MatDialogRef, MAT_LEGACY_DIALOG_DATA as MAT_DIALOG_DATA } from '@angular/material/legacy-dialog'; import { UntypedFormControl, UntypedFormGroup } from '@angular/forms'; +import { DynamicDialogRef, DynamicDialogConfig } from 'primeng/dynamicdialog'; + /** * Dialog for creating policy. */ @@ -17,10 +19,16 @@ export class DataInputDialogComponent { title: string = ''; fieldsConfig: any = []; + isVisible: boolean = true; + constructor( - public dialogRef: MatDialogRef, - @Inject(MAT_DIALOG_DATA) public data: any + // public dialogRef: MatDialogRef, + // @Inject(MAT_DIALOG_DATA) public data: any + public dialogRef: DynamicDialogRef, + public config: DynamicDialogConfig ) { + const data = config.data; + if (!data) { return; } diff --git a/frontend/src/app/modules/common/icon-preview-dialog/icon-preview-dialog.component.ts b/frontend/src/app/modules/common/icon-preview-dialog/icon-preview-dialog.component.ts index 3427817862..563821822f 100644 --- a/frontend/src/app/modules/common/icon-preview-dialog/icon-preview-dialog.component.ts +++ b/frontend/src/app/modules/common/icon-preview-dialog/icon-preview-dialog.component.ts @@ -1,7 +1,8 @@ -import { Component, Inject } from '@angular/core'; -import { MatLegacyDialogRef as MatDialogRef, MAT_LEGACY_DIALOG_DATA as MAT_DIALOG_DATA } from '@angular/material/legacy-dialog'; -import { IconType } from '@guardian/interfaces'; -import { IPFSService } from 'src/app/services/ipfs.service'; +import {Component, Inject} from '@angular/core'; +// import { MatLegacyDialogRef as MatDialogRef, MAT_LEGACY_DIALOG_DATA as MAT_DIALOG_DATA } from '@angular/material/legacy-dialog'; +import {IconType} from '@guardian/interfaces'; +import {IPFSService} from 'src/app/services/ipfs.service'; +import {DynamicDialogConfig, DynamicDialogRef} from 'primeng/dynamicdialog'; /** * Dialog for icon preview. @@ -17,24 +18,29 @@ export class IconPreviewDialog { loading: boolean = false; constructor( - public dialogRef: MatDialogRef, + // public dialogRef: MatDialogRef, + // @Inject(MAT_DIALOG_DATA) public data: any + private dialogRef: DynamicDialogRef, + private config: DynamicDialogConfig, private ipfs: IPFSService, - @Inject(MAT_DIALOG_DATA) public data: any) { - this.iconType = data.iconType; - if (this.iconType == IconType.CUSTOM) { - this.loading = true; - this.ipfs - .getImageByLink(data.icon) - .then((res) => { - this.icon = res; - }) - .finally(() => (this.loading = false)); - } else { - this.icon = data.icon; - } + ) { + const data = this.config.data + + this.iconType = data.iconType; + if (this.iconType == IconType.CUSTOM) { + this.loading = true; + this.ipfs + .getImageByLink(data.icon) + .then((res) => { + this.icon = res; + }) + .finally(() => (this.loading = false)); + } else { + this.icon = data.icon; + } } onClose(): void { this.dialogRef.close(null); } -} \ No newline at end of file +} diff --git a/frontend/src/app/modules/common/material.module.ts b/frontend/src/app/modules/common/material.module.ts index 589335e898..561840be8e 100644 --- a/frontend/src/app/modules/common/material.module.ts +++ b/frontend/src/app/modules/common/material.module.ts @@ -2,13 +2,13 @@ import {NgModule} from '@angular/core'; import {CommonModule} from '@angular/common'; // import { MatLegacyTabsModule as MatTabsModule } from '@angular/material/legacy-tabs'; import {MatStepperModule} from '@angular/material/stepper'; -import {MatExpansionModule} from '@angular/material/expansion'; -import {MatIconModule} from '@angular/material/icon'; +// import {MatExpansionModule} from '@angular/material/expansion'; +// import {MatIconModule} from '@angular/material/icon'; import {ReactiveFormsModule} from '@angular/forms'; -import {MatLegacyInputModule as MatInputModule} from '@angular/material/legacy-input'; -import {MatLegacyButtonModule as MatButtonModule} from '@angular/material/legacy-button'; -import {MatLegacyTableModule as MatTableModule} from '@angular/material/legacy-table'; -import {MatLegacyDialogModule as MatDialogModule} from '@angular/material/legacy-dialog'; +// import {MatLegacyInputModule as MatInputModule} from '@angular/material/legacy-input'; +// import {MatLegacyButtonModule as MatButtonModule} from '@angular/material/legacy-button'; +// import {MatLegacyTableModule as MatTableModule} from '@angular/material/legacy-table'; +// import {MatLegacyDialogModule as MatDialogModule} from '@angular/material/legacy-dialog'; import {MatLegacyProgressSpinnerModule as MatProgressSpinnerModule} from '@angular/material/legacy-progress-spinner'; import {MatToolbarModule} from '@angular/material/toolbar'; import {MatLegacyMenuModule as MatMenuModule} from '@angular/material/legacy-menu'; @@ -28,7 +28,7 @@ import {MatLegacyPaginatorModule as MatPaginatorModule} from '@angular/material/ import {MatSortModule} from '@angular/material/sort'; import {MatLegacyChipsModule as MatChipsModule} from '@angular/material/legacy-chips'; import {MatLegacyAutocompleteModule as MatAutocompleteModule} from '@angular/material/legacy-autocomplete'; -import {MatButtonToggleModule} from '@angular/material/button-toggle'; +// import {MatButtonToggleModule} from '@angular/material/button-toggle'; import {DragDropModule} from '@angular/cdk/drag-drop'; import {CdkTableModule} from '@angular/cdk/table'; import {MatLegacySliderModule as MatSliderModule} from '@angular/material/legacy-slider'; @@ -63,7 +63,7 @@ import {SelectButtonModule} from 'primeng/selectbutton'; // MatButtonToggleModule, SelectButtonModule, - MatDialogModule, + // MatDialogModule, MatDatepickerModule, MatRadioModule, @@ -107,7 +107,7 @@ import {SelectButtonModule} from 'primeng/selectbutton'; // MatButtonToggleModule, SelectButtonModule, - MatDialogModule, + // MatDialogModule, MatDatepickerModule, MatRadioModule, diff --git a/frontend/src/app/modules/common/selector-dialog/selector-dialog.component.css b/frontend/src/app/modules/common/selector-dialog/selector-dialog.component.css index f341db14eb..cf6b2c01c0 100644 --- a/frontend/src/app/modules/common/selector-dialog/selector-dialog.component.css +++ b/frontend/src/app/modules/common/selector-dialog/selector-dialog.component.css @@ -1,4 +1,60 @@ .options-form-field { margin-top: 10px; width: 100%; -} \ No newline at end of file +} + +.modal-header { + color: #000; + font-family: Poppins, sans-serif; + font-size: 24px; + font-style: normal; + font-weight: 600; + line-height: 32px; +} + +:host ::ng-deep .p-dialog { + width: 720px; + border-radius: 16px !important; + display: grid; + transform: none; + max-height: none; + padding: 32px; + background: var(--color-grey-white, #FFF); +} + +:host ::ng-deep .p-dialog .p-dialog-header { + padding: 0; + font: 400 24px / 32px Roboto, "Helvetica Neue", sans-serif; +} + +:host ::ng-deep .p-dialog .p-dialog-content { + padding: 18px 0 0 0; +} + +.dialog-actions { + display: flex; + justify-content: flex-start; + gap: 10px; + margin-top: 20px; +} + +:host ::ng-deep .p-dialog .p-button { + background-color: var(--color-grey-white, #FFF); + color: var(--primary-color); + border-radius: 20px; + padding: 8px 24px; + font-weight: bold; +} + +:host ::ng-deep .p-dialog .p-button-ok { + background-color: var(--primary-color); + color: var(--color-grey-white, #FFF); +} + +:host ::ng-deep .p-dialog .p-button:hover { + background-color: var(--blue-100); +} + +:host ::ng-deep .p-dialog .p-button-ok:hover { + background-color: var(--blue-700); +} diff --git a/frontend/src/app/modules/common/selector-dialog/selector-dialog.component.html b/frontend/src/app/modules/common/selector-dialog/selector-dialog.component.html index 93f4672992..cb84345ebc 100644 --- a/frontend/src/app/modules/common/selector-dialog/selector-dialog.component.html +++ b/frontend/src/app/modules/common/selector-dialog/selector-dialog.component.html @@ -1,17 +1,36 @@ -

{{title}}

-
-
{{description}}
- - {{label}} - - {{option.name}} - - -
-
- - -
\ No newline at end of file + + + + + + + + + + + + + + + + + + + +
+

{{ title }}

+ +
{{ description }}
+ +
+ + + +
+ +
+ + +
+
+
diff --git a/frontend/src/app/modules/common/selector-dialog/selector-dialog.component.ts b/frontend/src/app/modules/common/selector-dialog/selector-dialog.component.ts index 3fe1c90dc4..0ccc3129ea 100644 --- a/frontend/src/app/modules/common/selector-dialog/selector-dialog.component.ts +++ b/frontend/src/app/modules/common/selector-dialog/selector-dialog.component.ts @@ -1,5 +1,7 @@ -import { Component, Inject, OnInit } from '@angular/core'; -import { MAT_LEGACY_DIALOG_DATA as MAT_DIALOG_DATA } from '@angular/material/legacy-dialog'; +import {Component, Inject, OnInit} from '@angular/core'; +// import { MAT_LEGACY_DIALOG_DATA as MAT_DIALOG_DATA } from '@angular/material/legacy-dialog'; + +import {DynamicDialogConfig, DynamicDialogRef} from 'primeng/dynamicdialog'; export interface SelectorDialogOptions { name: string; @@ -20,16 +22,22 @@ export class SelectorDialogComponent implements OnInit { result: any; + isVisible: boolean = true; + constructor( - @Inject(MAT_DIALOG_DATA) - public data: { - title: string; - description: string; - label?: string; - options: SelectorDialogOptions[]; - multiple?: boolean; - } + // @Inject(MAT_DIALOG_DATA) + // public data: { + // title: string; + // description: string; + // label?: string; + // options: SelectorDialogOptions[]; + // multiple?: boolean; + // } + public dialogRef: DynamicDialogRef, + public config: DynamicDialogConfig ) { + const data = config.data; + this.title = data?.title; this.description = data?.description; this.multiple = !!data?.multiple; @@ -39,5 +47,14 @@ export class SelectorDialogComponent implements OnInit { } } - ngOnInit(): void {} + ngOnInit(): void { + } + + onConfirm(): void { + this.dialogRef.close({ok: true, result: this.result}); + } + + onCancel(): void { + this.dialogRef.close({ok: false}); + } } diff --git a/frontend/src/app/modules/contract-engine/configs/contract-config/contract-config.component.ts b/frontend/src/app/modules/contract-engine/configs/contract-config/contract-config.component.ts index b814d62789..c885f35ef1 100644 --- a/frontend/src/app/modules/contract-engine/configs/contract-config/contract-config.component.ts +++ b/frontend/src/app/modules/contract-engine/configs/contract-config/contract-config.component.ts @@ -1,5 +1,5 @@ import { Component, OnDestroy, OnInit } from '@angular/core'; -import { MatLegacyDialog as MatDialog } from '@angular/material/legacy-dialog'; +// import { MatLegacyDialog as MatDialog } from '@angular/material/legacy-dialog'; import { ContractType, IUser, SchemaHelper, TagType, Token, UserPermissions, } from '@guardian/interfaces'; import { ProfileService } from 'src/app/services/profile.service'; import { TokenService } from 'src/app/services/token.service'; @@ -13,6 +13,7 @@ import { WipeRequestsDialogComponent } from '../../dialogs/wipe-requests-dialog/ import { RetirePoolsDialogComponent } from '../../dialogs/retire-pools-dialog/retire-pools-dialog.component'; import { RetireRequestsDialogComponent } from '../../dialogs/retire-requests-dialog/retire-requests-dialog.component'; import { Validators } from '@angular/forms'; +import {DialogService} from 'primeng/dynamicdialog'; /** * Component for operating with Contracts @@ -195,7 +196,8 @@ export class ContractConfigComponent implements OnInit, OnDestroy { private profileService: ProfileService, private contractsService: ContractService, private tokenService: TokenService, - private dialog: MatDialog, + // private dialog: MatDialog, + private dialog: DialogService, private router: Router, private route: ActivatedRoute ) { @@ -315,8 +317,10 @@ export class ContractConfigComponent implements OnInit, OnDestroy { importContract() { const dialogRef = this.dialog.open(DataInputDialogComponent, { width: '700px', - autoFocus: false, - disableClose: true, + // autoFocus: false, + // disableClose: true, + modal: true, + closable: false, data: { fieldsConfig: [ { @@ -337,7 +341,7 @@ export class ContractConfigComponent implements OnInit, OnDestroy { title: 'Import Contract', }, }); - dialogRef.afterClosed().subscribe(async (result) => { + dialogRef.onClose.subscribe(async (result) => { if (result) { this.loading = true; this.contractsService @@ -360,8 +364,10 @@ export class ContractConfigComponent implements OnInit, OnDestroy { createContract() { const dialogRef = this.dialog.open(DataInputDialogComponent, { width: '700px', - autoFocus: false, - disableClose: true, + // autoFocus: false, + // disableClose: true, + modal: true, + closable: false, data: { fieldsConfig: [ { @@ -373,7 +379,7 @@ export class ContractConfigComponent implements OnInit, OnDestroy { title: 'Create Contract', }, }); - dialogRef.afterClosed().subscribe(async (result) => { + dialogRef.onClose.subscribe(async (result) => { if (!result) { return; } @@ -393,8 +399,10 @@ export class ContractConfigComponent implements OnInit, OnDestroy { inputHederaIdentifier(callback: (result: string) => void) { const dialogRef = this.dialog.open(DataInputDialogComponent, { width: '700px', - autoFocus: false, - disableClose: true, + // autoFocus: false, + // disableClose: true, + modal: true, + closable: false, data: { fieldsConfig: [ { @@ -410,7 +418,7 @@ export class ContractConfigComponent implements OnInit, OnDestroy { title: 'Enter Hedera Identifier', }, }); - dialogRef.afterClosed().subscribe(async (result) => { + dialogRef.onClose.subscribe(async (result) => { if (!result) { return; } @@ -421,8 +429,10 @@ export class ContractConfigComponent implements OnInit, OnDestroy { inputHederaAndTokenIdentifier(callback: (hederaId: string, tokenId: string) => void) { const dialogRef = this.dialog.open(DataInputDialogComponent, { width: '700px', - autoFocus: false, - disableClose: true, + // autoFocus: false, + // disableClose: true, + modal: true, + closable: false, data: { fieldsConfig: [ { @@ -447,7 +457,7 @@ export class ContractConfigComponent implements OnInit, OnDestroy { title: 'Enter Hedera and Token identifiers', }, }); - dialogRef.afterClosed().subscribe(async (result) => { + dialogRef.onClose.subscribe(async (result) => { if (!result) { return; } @@ -642,11 +652,14 @@ export class ContractConfigComponent implements OnInit, OnDestroy { .filter((token: Token) => !token.draftToken); const dialogRef = this.dialog.open(SetPoolDialogComponent, { width: '750px', - panelClass: 'g-dialog', - disableClose: true, - autoFocus: false, + // panelClass: 'g-dialog', + // disableClose: true, + // autoFocus: false, + styleClass: 'g-dialog', + modal: true, + closable: false, }); - dialogRef.afterClosed().subscribe(async (result) => { + dialogRef.onClose.subscribe(async (result) => { if (result) { result.tokens = result.tokens.map((item: any) => { const token = tokens.find( @@ -688,9 +701,12 @@ export class ContractConfigComponent implements OnInit, OnDestroy { openWipeRequests(contract: any) { this.dialog.open(WipeRequestsDialogComponent, { width: contract.version === '1.0.0' ? '650px' : '850px', - panelClass: 'g-dialog', - disableClose: true, - autoFocus: false, + // panelClass: 'g-dialog', + // disableClose: true, + // autoFocus: false, + styleClass: 'g-dialog', + modal: true, + closable: false, data: contract, }); } @@ -698,9 +714,12 @@ export class ContractConfigComponent implements OnInit, OnDestroy { openPools(contract: any) { this.dialog.open(RetirePoolsDialogComponent, { width: '800px', - panelClass: 'g-dialog', - disableClose: true, - autoFocus: false, + // panelClass: 'g-dialog', + // disableClose: true, + // autoFocus: false, + styleClass: 'g-dialog', + modal: true, + closable: false, data: contract, }); } @@ -708,9 +727,12 @@ export class ContractConfigComponent implements OnInit, OnDestroy { openRetireRequests(contract: any) { this.dialog.open(RetireRequestsDialogComponent, { width: '800px', - panelClass: 'g-dialog', - disableClose: true, - autoFocus: false, + // panelClass: 'g-dialog', + // disableClose: true, + // autoFocus: false, + styleClass: 'g-dialog', + modal: true, + closable: false, data: contract, }); } diff --git a/frontend/src/app/modules/contract-engine/configs/user-contract-config/user-contract-config.component.ts b/frontend/src/app/modules/contract-engine/configs/user-contract-config/user-contract-config.component.ts index 89efed548e..e0bab0a9b0 100644 --- a/frontend/src/app/modules/contract-engine/configs/user-contract-config/user-contract-config.component.ts +++ b/frontend/src/app/modules/contract-engine/configs/user-contract-config/user-contract-config.component.ts @@ -1,5 +1,5 @@ import { Component, OnInit } from '@angular/core'; -import { MatLegacyDialog as MatDialog } from '@angular/material/legacy-dialog'; +// import { MatLegacyDialog as MatDialog } from '@angular/material/legacy-dialog'; import { IUser } from '@guardian/interfaces'; import { ProfileService } from 'src/app/services/profile.service'; import { TokenService } from 'src/app/services/token.service'; @@ -40,7 +40,7 @@ export class UserContractConfigComponent implements OnInit { private profileService: ProfileService, private contractService: ContractService, private tokenService: TokenService, - private dialog: MatDialog, + private dialog: DialogService, private dialogService: DialogService, private router: Router, private route: ActivatedRoute @@ -120,11 +120,14 @@ export class UserContractConfigComponent implements OnInit { openRetirePoolsDialog() { const dialogRef = this.dialog.open(UserRetirePoolsDialogComponent, { width: '800px', - panelClass: 'g-dialog', - disableClose: true, - autoFocus: false, + // panelClass: 'g-dialog', + // disableClose: true, + // autoFocus: false, + styleClass: 'g-dialog', + modal: true, + closable: false, }); - dialogRef.afterClosed().subscribe((result) => { + dialogRef.onClose.subscribe((result) => { if (!result) { return; } @@ -145,9 +148,12 @@ export class UserContractConfigComponent implements OnInit { openRetireRequestsDialog() { this.dialog.open(UserRetireRequestsDialogComponent, { width: '800px', - panelClass: 'g-dialog', - disableClose: true, - autoFocus: false, + // panelClass: 'g-dialog', + // disableClose: true, + // autoFocus: false, + styleClass: 'g-dialog', + modal: true, + closable: false, }); } diff --git a/frontend/src/app/modules/contract-engine/dialogs/retire-pools-dialog/retire-pools-dialog.component.ts b/frontend/src/app/modules/contract-engine/dialogs/retire-pools-dialog/retire-pools-dialog.component.ts index bfbd5a71ef..896ecb841b 100644 --- a/frontend/src/app/modules/contract-engine/dialogs/retire-pools-dialog/retire-pools-dialog.component.ts +++ b/frontend/src/app/modules/contract-engine/dialogs/retire-pools-dialog/retire-pools-dialog.component.ts @@ -1,8 +1,9 @@ -import { Component, Inject, OnInit } from '@angular/core'; -import { MatLegacyDialogRef as MatDialogRef, MAT_LEGACY_DIALOG_DATA as MAT_DIALOG_DATA } from '@angular/material/legacy-dialog'; -import { RetireTokenPool, Token } from '@guardian/interfaces'; -import { ContractService } from 'src/app/services/contract.service'; -import { TokenService } from 'src/app/services/token.service'; +import {Component, Inject, OnInit} from '@angular/core'; +// import { MatLegacyDialogRef as MatDialogRef, MAT_LEGACY_DIALOG_DATA as MAT_DIALOG_DATA } from '@angular/material/legacy-dialog'; +import {RetireTokenPool, Token} from '@guardian/interfaces'; +import {ContractService} from 'src/app/services/contract.service'; +import {TokenService} from 'src/app/services/token.service'; +import {DynamicDialogConfig, DynamicDialogRef} from 'primeng/dynamicdialog'; @Component({ selector: 'app-retire-pools-dialog', @@ -20,14 +21,20 @@ export class RetirePoolsDialogComponent implements OnInit { tokens: Token[] = []; selectedTokens: any = []; + contract: any + constructor( - public dialogRef: MatDialogRef, + // public dialogRef: MatDialogRef, public contractService: ContractService, public tokenService: TokenService, - @Inject(MAT_DIALOG_DATA) public contract: any + // @Inject(MAT_DIALOG_DATA) public contract: any + public dialogRef: DynamicDialogRef, + public config: DynamicDialogConfig, ) { - if (contract) { - this.syncDate = contract.syncPoolsDate; + this.contract = this.config.data.contract; + + if (this.contract) { + this.syncDate = this.contract.syncPoolsDate; } } diff --git a/frontend/src/app/modules/contract-engine/dialogs/retire-requests-dialog/retire-requests-dialog.component.ts b/frontend/src/app/modules/contract-engine/dialogs/retire-requests-dialog/retire-requests-dialog.component.ts index 5c8680ddbf..06d2c9d2e3 100644 --- a/frontend/src/app/modules/contract-engine/dialogs/retire-requests-dialog/retire-requests-dialog.component.ts +++ b/frontend/src/app/modules/contract-engine/dialogs/retire-requests-dialog/retire-requests-dialog.component.ts @@ -1,8 +1,9 @@ import { Component, Inject, OnInit } from '@angular/core'; -import { MatLegacyDialogRef as MatDialogRef, MAT_LEGACY_DIALOG_DATA as MAT_DIALOG_DATA } from '@angular/material/legacy-dialog'; +// import { MatLegacyDialogRef as MatDialogRef, MAT_LEGACY_DIALOG_DATA as MAT_DIALOG_DATA } from '@angular/material/legacy-dialog'; import { Token } from '@guardian/interfaces'; import { ContractService } from 'src/app/services/contract.service'; import { TokenService } from 'src/app/services/token.service'; +import {DynamicDialogConfig, DynamicDialogRef} from 'primeng/dynamicdialog'; @Component({ selector: 'app-retire-requests-dialog', @@ -21,14 +22,20 @@ export class RetireRequestsDialogComponent implements OnInit { tokens: Token[] = []; selectedTokens: any = []; + contract: any + constructor( - public dialogRef: MatDialogRef, + // public dialogRef: MatDialogRef, public contractService: ContractService, public tokenService: TokenService, - @Inject(MAT_DIALOG_DATA) public contract: any + // @Inject(MAT_DIALOG_DATA) public contract: any, + private dialogRef: DynamicDialogRef, + private config: DynamicDialogConfig, ) { - this.syncDate = contract.syncRequestsDate; - this.contractId = contract.contractId; + this.contract = this.config.data.contract; + + this.syncDate = this.contract.syncRequestsDate; + this.contractId = this.contract.contractId; } ngOnInit(): void { diff --git a/frontend/src/app/modules/contract-engine/dialogs/set-pool-dialog/set-pool-dialog.component.ts b/frontend/src/app/modules/contract-engine/dialogs/set-pool-dialog/set-pool-dialog.component.ts index 15354c2825..b9570e1311 100644 --- a/frontend/src/app/modules/contract-engine/dialogs/set-pool-dialog/set-pool-dialog.component.ts +++ b/frontend/src/app/modules/contract-engine/dialogs/set-pool-dialog/set-pool-dialog.component.ts @@ -1,5 +1,5 @@ import { Component, Inject } from '@angular/core'; -import { MatLegacyDialogRef as MatDialogRef, MAT_LEGACY_DIALOG_DATA as MAT_DIALOG_DATA } from '@angular/material/legacy-dialog'; +// import { MatLegacyDialogRef as MatDialogRef, MAT_LEGACY_DIALOG_DATA as MAT_DIALOG_DATA } from '@angular/material/legacy-dialog'; import { AbstractControl, UntypedFormArray, @@ -13,6 +13,7 @@ import { moreThanZeroValidator } from 'src/app/validators/more-than-zero.validat import { MAT_LEGACY_RADIO_DEFAULT_OPTIONS as MAT_RADIO_DEFAULT_OPTIONS } from '@angular/material/legacy-radio'; import { Token } from '@guardian/interfaces'; import { TokenService } from 'src/app/services/token.service'; +import { DynamicDialogRef } from 'primeng/dynamicdialog'; /** * Dialog for creating pair. */ @@ -40,9 +41,10 @@ export class SetPoolDialogComponent { } constructor( - public dialogRef: MatDialogRef, + // public dialogRef: MatDialogRef, public tokenService: TokenService, - @Inject(MAT_DIALOG_DATA) public data: any + // @Inject(MAT_DIALOG_DATA) public data: any, + private dialogRef: DynamicDialogRef, ) {} ngOnInit() { diff --git a/frontend/src/app/modules/contract-engine/dialogs/user-retire-pools-dialog/user-retire-pools-dialog.component.ts b/frontend/src/app/modules/contract-engine/dialogs/user-retire-pools-dialog/user-retire-pools-dialog.component.ts index d73c15c1f2..a95de34686 100644 --- a/frontend/src/app/modules/contract-engine/dialogs/user-retire-pools-dialog/user-retire-pools-dialog.component.ts +++ b/frontend/src/app/modules/contract-engine/dialogs/user-retire-pools-dialog/user-retire-pools-dialog.component.ts @@ -9,10 +9,11 @@ import { ValidatorFn, Validators, } from '@angular/forms'; -import { MatLegacyDialogRef as MatDialogRef, MAT_LEGACY_DIALOG_DATA as MAT_DIALOG_DATA } from '@angular/material/legacy-dialog'; +// import { MatLegacyDialogRef as MatDialogRef, MAT_LEGACY_DIALOG_DATA as MAT_DIALOG_DATA } from '@angular/material/legacy-dialog'; import { RetireTokenPool, Token, TokenType } from '@guardian/interfaces'; import { ContractService } from 'src/app/services/contract.service'; import { TokenService } from 'src/app/services/token.service'; +import {DynamicDialogRef} from 'primeng/dynamicdialog'; @Component({ selector: 'app-user-retire-pools-dialog', @@ -39,7 +40,8 @@ export class UserRetirePoolsDialogComponent implements OnInit { ); constructor( - public dialogRef: MatDialogRef, + // public dialogRef: MatDialogRef, + private dialogRef: DynamicDialogRef, public contractService: ContractService, public tokenService: TokenService ) {} diff --git a/frontend/src/app/modules/contract-engine/dialogs/user-retire-requests-dialog/user-retire-requests-dialog.component.ts b/frontend/src/app/modules/contract-engine/dialogs/user-retire-requests-dialog/user-retire-requests-dialog.component.ts index c71a92601e..023a477b5a 100644 --- a/frontend/src/app/modules/contract-engine/dialogs/user-retire-requests-dialog/user-retire-requests-dialog.component.ts +++ b/frontend/src/app/modules/contract-engine/dialogs/user-retire-requests-dialog/user-retire-requests-dialog.component.ts @@ -1,8 +1,9 @@ -import { Component, Inject, OnInit } from '@angular/core'; -import { MatLegacyDialogRef as MatDialogRef, MAT_LEGACY_DIALOG_DATA as MAT_DIALOG_DATA } from '@angular/material/legacy-dialog'; -import { Token } from '@guardian/interfaces'; -import { ContractService } from 'src/app/services/contract.service'; -import { TokenService } from 'src/app/services/token.service'; +import {Component, Inject, OnInit} from '@angular/core'; +// import { MatLegacyDialogRef as MatDialogRef, MAT_LEGACY_DIALOG_DATA as MAT_DIALOG_DATA } from '@angular/material/legacy-dialog'; +import {Token} from '@guardian/interfaces'; +import {ContractService} from 'src/app/services/contract.service'; +import {TokenService} from 'src/app/services/token.service'; +import {DynamicDialogRef} from 'primeng/dynamicdialog'; @Component({ selector: 'app-user-retire-requests-dialog', @@ -20,10 +21,11 @@ export class UserRetireRequestsDialogComponent implements OnInit { selectedTokens: any = []; constructor( - public dialogRef: MatDialogRef, + // public dialogRef: MatDialogRef, public contractService: ContractService, public tokenService: TokenService, - @Inject(MAT_DIALOG_DATA) public contract: any + // @Inject(MAT_DIALOG_DATA) public contract: any + private dialogRef: DynamicDialogRef, ) { } diff --git a/frontend/src/app/modules/contract-engine/dialogs/wipe-requests-dialog/wipe-requests-dialog.component.ts b/frontend/src/app/modules/contract-engine/dialogs/wipe-requests-dialog/wipe-requests-dialog.component.ts index bfe035329b..49b0fea06f 100644 --- a/frontend/src/app/modules/contract-engine/dialogs/wipe-requests-dialog/wipe-requests-dialog.component.ts +++ b/frontend/src/app/modules/contract-engine/dialogs/wipe-requests-dialog/wipe-requests-dialog.component.ts @@ -1,6 +1,7 @@ -import { Component, OnInit, Inject } from '@angular/core'; -import { MAT_LEGACY_DIALOG_DATA as MAT_DIALOG_DATA, MatLegacyDialogRef as MatDialogRef } from '@angular/material/legacy-dialog'; -import { ContractService } from 'src/app/services/contract.service'; +import {Component, OnInit, Inject} from '@angular/core'; +// import { MAT_LEGACY_DIALOG_DATA as MAT_DIALOG_DATA, MatLegacyDialogRef as MatDialogRef } from '@angular/material/legacy-dialog'; +import {ContractService} from 'src/app/services/contract.service'; +import {DynamicDialogConfig, DynamicDialogRef} from 'primeng/dynamicdialog'; @Component({ selector: 'app-wipe-requests-dialog', @@ -20,13 +21,19 @@ export class WipeRequestsDialogComponent implements OnInit { length = 0; version!: string + contract: any + constructor( - public dialogRef: MatDialogRef, + // public dialogRef: MatDialogRef, public contractService: ContractService, - @Inject(MAT_DIALOG_DATA) public contract: any + // @Inject(MAT_DIALOG_DATA) public contract: any + private dialogRef: DynamicDialogRef, + private config: DynamicDialogConfig, ) { - this.contractId = contract.contractId; - this.version = contract.version; + this.contract = this.config.data.contract; + + this.contractId = this.contract.contractId; + this.version = this.contract.version; } ngOnInit(): void { diff --git a/frontend/src/app/modules/policy-engine/dialogs/code-editor-dialog/code-editor-dialog.component.ts b/frontend/src/app/modules/policy-engine/dialogs/code-editor-dialog/code-editor-dialog.component.ts index 1d2de61700..cbdcc200df 100644 --- a/frontend/src/app/modules/policy-engine/dialogs/code-editor-dialog/code-editor-dialog.component.ts +++ b/frontend/src/app/modules/policy-engine/dialogs/code-editor-dialog/code-editor-dialog.component.ts @@ -1,5 +1,7 @@ -import { AfterContentInit, Component, Inject, OnInit } from '@angular/core'; -import { MatLegacyDialogRef as MatDialogRef, MAT_LEGACY_DIALOG_DATA as MAT_DIALOG_DATA } from '@angular/material/legacy-dialog'; +import {AfterContentInit, Component, Inject, OnInit} from '@angular/core'; +import {DynamicDialogConfig, DynamicDialogRef} from 'primeng/dynamicdialog'; + +// import { MatLegacyDialogRef as MatDialogRef, MAT_LEGACY_DIALOG_DATA as MAT_DIALOG_DATA } from '@angular/material/legacy-dialog'; /** * Export schema dialog. @@ -31,10 +33,15 @@ export class CodeEditorDialogComponent implements OnInit, AfterContentInit { initDialog = false; + data: any + constructor( - public dialogRef: MatDialogRef, - @Inject(MAT_DIALOG_DATA) public data: any + // public dialogRef: MatDialogRef, + // @Inject(MAT_DIALOG_DATA) public data: any + private dialogRef: DynamicDialogRef, + private config: DynamicDialogConfig, ) { + this.data = this.config.data } ngOnInit() { diff --git a/frontend/src/app/modules/policy-engine/dialogs/cron-config-dialog/cron-config-dialog.component.ts b/frontend/src/app/modules/policy-engine/dialogs/cron-config-dialog/cron-config-dialog.component.ts index 7d3a4f2dbc..b0792836f6 100644 --- a/frontend/src/app/modules/policy-engine/dialogs/cron-config-dialog/cron-config-dialog.component.ts +++ b/frontend/src/app/modules/policy-engine/dialogs/cron-config-dialog/cron-config-dialog.component.ts @@ -1,8 +1,9 @@ import { Component, Inject } from '@angular/core'; -import { MatLegacyDialogRef as MatDialogRef, MAT_LEGACY_DIALOG_DATA as MAT_DIALOG_DATA } from '@angular/material/legacy-dialog'; +// import { MatLegacyDialogRef as MatDialogRef, MAT_LEGACY_DIALOG_DATA as MAT_DIALOG_DATA } from '@angular/material/legacy-dialog'; import { UntypedFormBuilder, Validators } from '@angular/forms'; import * as moment from 'moment'; import cronstrue from 'cronstrue'; +import {DynamicDialogConfig, DynamicDialogRef} from 'primeng/dynamicdialog'; /** * Dialog for creating policy. @@ -50,9 +51,14 @@ export class CronConfigDialog { sd_local: moment.Moment; constructor( - public dialogRef: MatDialogRef, + // public dialogRef: MatDialogRef, private fb: UntypedFormBuilder, - @Inject(MAT_DIALOG_DATA) public data: any) { + // @Inject(MAT_DIALOG_DATA) public data: any, + private dialogRef: DynamicDialogRef, + private config: DynamicDialogConfig, + ) { + const data = this.config.data + this.period = 'week'; this.startDate = data.startDate || (new Date).toISOString(); this.sd = moment(this.startDate).utc(); diff --git a/frontend/src/app/modules/policy-engine/dialogs/invite-dialog/invite-dialog.component.ts b/frontend/src/app/modules/policy-engine/dialogs/invite-dialog/invite-dialog.component.ts index 2d5350ebef..513c382774 100644 --- a/frontend/src/app/modules/policy-engine/dialogs/invite-dialog/invite-dialog.component.ts +++ b/frontend/src/app/modules/policy-engine/dialogs/invite-dialog/invite-dialog.component.ts @@ -7,8 +7,9 @@ import { OnInit, ViewChild } from '@angular/core'; -import { MatLegacyDialogRef as MatDialogRef, MAT_LEGACY_DIALOG_DATA as MAT_DIALOG_DATA } from '@angular/material/legacy-dialog'; +// import { MatLegacyDialogRef as MatDialogRef, MAT_LEGACY_DIALOG_DATA as MAT_DIALOG_DATA } from '@angular/material/legacy-dialog'; import { PolicyEngineService } from 'src/app/services/policy-engine.service'; +import {DynamicDialogConfig, DynamicDialogRef} from 'primeng/dynamicdialog'; /** * Export schema dialog. */ @@ -30,10 +31,14 @@ export class InviteDialogComponent implements OnInit, AfterContentInit { role: string; constructor( - public dialogRef: MatDialogRef, + // public dialogRef: MatDialogRef, private policyEngineService: PolicyEngineService, - @Inject(MAT_DIALOG_DATA) public data: any + // @Inject(MAT_DIALOG_DATA) public data: any + private dialogRef: DynamicDialogRef, + private config: DynamicDialogConfig, ) { + const data = this.config.data + this.blockId = data.blockId; this.policyId = data.policyId; this.group = data.group; diff --git a/frontend/src/app/modules/policy-engine/dialogs/multi-policy-dialog/multi-policy-dialog.component.ts b/frontend/src/app/modules/policy-engine/dialogs/multi-policy-dialog/multi-policy-dialog.component.ts index 7e0f113b08..97598925fd 100644 --- a/frontend/src/app/modules/policy-engine/dialogs/multi-policy-dialog/multi-policy-dialog.component.ts +++ b/frontend/src/app/modules/policy-engine/dialogs/multi-policy-dialog/multi-policy-dialog.component.ts @@ -1,6 +1,7 @@ import { AfterContentInit, Component, Inject, OnInit } from '@angular/core'; -import { MAT_LEGACY_DIALOG_DATA as MAT_DIALOG_DATA, MatLegacyDialogRef as MatDialogRef } from '@angular/material/legacy-dialog'; +// import { MAT_LEGACY_DIALOG_DATA as MAT_DIALOG_DATA, MatLegacyDialogRef as MatDialogRef } from '@angular/material/legacy-dialog'; import { PolicyEngineService } from 'src/app/services/policy-engine.service'; +import {DynamicDialogConfig, DynamicDialogRef} from 'primeng/dynamicdialog'; /** * Export schema dialog. @@ -27,10 +28,14 @@ export class MultiPolicyDialogComponent implements OnInit, AfterContentInit { instanceTopicId: any; constructor( - public dialogRef: MatDialogRef, + // public dialogRef: MatDialogRef, private policyEngineService: PolicyEngineService, - @Inject(MAT_DIALOG_DATA) public data: any + // @Inject(MAT_DIALOG_DATA) public data: any + private dialogRef: DynamicDialogRef, + private config: DynamicDialogConfig, ) { + const data = this.config.data + this.policyId = data.policyId; } diff --git a/frontend/src/app/modules/policy-engine/dialogs/new-theme-dialog/new-theme-dialog.component.ts b/frontend/src/app/modules/policy-engine/dialogs/new-theme-dialog/new-theme-dialog.component.ts index 074e0a21d2..ad9755ae14 100644 --- a/frontend/src/app/modules/policy-engine/dialogs/new-theme-dialog/new-theme-dialog.component.ts +++ b/frontend/src/app/modules/policy-engine/dialogs/new-theme-dialog/new-theme-dialog.component.ts @@ -1,6 +1,7 @@ import { Component, Inject } from '@angular/core'; -import { MatLegacyDialogRef as MatDialogRef, MAT_LEGACY_DIALOG_DATA as MAT_DIALOG_DATA } from '@angular/material/legacy-dialog'; +// import { MatLegacyDialogRef as MatDialogRef, MAT_LEGACY_DIALOG_DATA as MAT_DIALOG_DATA } from '@angular/material/legacy-dialog'; import { UntypedFormBuilder, Validators } from '@angular/forms'; +import {DynamicDialogConfig, DynamicDialogRef} from 'primeng/dynamicdialog'; /** * Dialog for creating theme. @@ -20,9 +21,13 @@ export class NewThemeDialog { theme: any; constructor( - public dialogRef: MatDialogRef, + // public dialogRef: MatDialogRef, private fb: UntypedFormBuilder, - @Inject(MAT_DIALOG_DATA) public data: any) { + // @Inject(MAT_DIALOG_DATA) public data: any + private dialogRef: DynamicDialogRef, + private config: DynamicDialogConfig, + ) { + const data = this.config.data if (data && data.theme) { this.theme = data.theme; diff --git a/frontend/src/app/modules/policy-engine/dialogs/save-before-dialog/save-before-dialog.component.ts b/frontend/src/app/modules/policy-engine/dialogs/save-before-dialog/save-before-dialog.component.ts index c0da0c8988..60d82bf746 100644 --- a/frontend/src/app/modules/policy-engine/dialogs/save-before-dialog/save-before-dialog.component.ts +++ b/frontend/src/app/modules/policy-engine/dialogs/save-before-dialog/save-before-dialog.component.ts @@ -1,5 +1,6 @@ import { Component, OnInit } from '@angular/core'; -import { MatLegacyDialogRef as MatDialogRef } from '@angular/material/legacy-dialog'; +import {DynamicDialogRef} from 'primeng/dynamicdialog'; +// import { MatLegacyDialogRef as MatDialogRef } from '@angular/material/legacy-dialog'; @Component({ selector: 'app-save-before-dialog', @@ -8,7 +9,10 @@ import { MatLegacyDialogRef as MatDialogRef } from '@angular/material/legacy-dia }) export class SaveBeforeDialogComponent implements OnInit { - constructor(public dialogRef: MatDialogRef) { + constructor( + // public dialogRef: MatDialogRef + private dialogRef: DynamicDialogRef, + ) { } ngOnInit(): void { diff --git a/frontend/src/app/modules/policy-engine/dialogs/save-policy-dialog/save-policy-dialog.component.html b/frontend/src/app/modules/policy-engine/dialogs/save-policy-dialog/save-policy-dialog.component.html index 91b6527d84..399d88db70 100644 --- a/frontend/src/app/modules/policy-engine/dialogs/save-policy-dialog/save-policy-dialog.component.html +++ b/frontend/src/app/modules/policy-engine/dialogs/save-policy-dialog/save-policy-dialog.component.html @@ -1,51 +1,101 @@ -
-
-

{{ getTitle() }}

-
- - * NAME: - - + + + + + + + + - - * TAG: - - + + + + - - TOPIC DESCRIPTION: - - + + + + + - - DESCRIPTION: - - + + + + -
- - -
-
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ +
+
+ + +
+
+ + +
+
+ + +
+
+ + +
+
+ + +
+
+
- - - +
- - -
+ diff --git a/frontend/src/app/modules/policy-engine/dialogs/save-policy-dialog/save-policy-dialog.component.scss b/frontend/src/app/modules/policy-engine/dialogs/save-policy-dialog/save-policy-dialog.component.scss index 83acc76348..b2d625c8f0 100644 --- a/frontend/src/app/modules/policy-engine/dialogs/save-policy-dialog/save-policy-dialog.component.scss +++ b/frontend/src/app/modules/policy-engine/dialogs/save-policy-dialog/save-policy-dialog.component.scss @@ -48,4 +48,76 @@ form { .close-button:hover { opacity: 1; -} \ No newline at end of file +} + +.modal-header { + color: #000; + font-family: Poppins, sans-serif; + font-size: 24px; + font-style: normal; + font-weight: 600; + line-height: 32px; +} + +:host ::ng-deep .p-dialog { + width: 720px; + border-radius: 16px !important; + display: grid; + transform: none; + max-height: none; + padding: 32px; + background: var(--color-grey-white, #FFF); +} + +:host ::ng-deep .p-dialog .p-dialog-header { + padding: 0; + font: 400 24px / 32px Roboto, "Helvetica Neue", sans-serif; +} + +:host ::ng-deep .p-dialog .p-dialog-content { + padding: 18px 0 0 0; +} + +.form-field { + margin-bottom: 1em; +} + +.custom-form-field { + position: relative; + padding: 0.5em; + border: 1px solid var(--color-grey-2); + border-radius: 4px; + transition: border-color 0.3s; +} + +.custom-form-field:focus-within { + border: 2px solid var(--primary-color); +} + +.dialog-actions { + display: flex; + justify-content: flex-start; + gap: 10px; + margin-top: 20px; +} + +:host ::ng-deep .p-dialog .p-button { + background-color: var(--color-grey-white, #FFF); + color: var(--primary-color); + border-radius: 20px; + padding: 8px 24px; + font-weight: bold; +} + +:host ::ng-deep .p-dialog .p-button-ok { + background-color: var(--primary-color); + color: var(--color-grey-white, #FFF); +} + +:host ::ng-deep .p-dialog .p-button:hover { + background-color: var(--blue-100); +} + +:host ::ng-deep .p-dialog .p-button-ok:hover { + background-color: var(--blue-700); +} diff --git a/frontend/src/app/modules/policy-engine/dialogs/save-policy-dialog/save-policy-dialog.component.ts b/frontend/src/app/modules/policy-engine/dialogs/save-policy-dialog/save-policy-dialog.component.ts index 5ecb12617a..921aea2618 100644 --- a/frontend/src/app/modules/policy-engine/dialogs/save-policy-dialog/save-policy-dialog.component.ts +++ b/frontend/src/app/modules/policy-engine/dialogs/save-policy-dialog/save-policy-dialog.component.ts @@ -1,7 +1,9 @@ import { Component, Inject } from '@angular/core'; -import { MatLegacyDialogRef as MatDialogRef, MAT_LEGACY_DIALOG_DATA as MAT_DIALOG_DATA } from '@angular/material/legacy-dialog'; +// import { MatLegacyDialogRef as MatDialogRef, MAT_LEGACY_DIALOG_DATA as MAT_DIALOG_DATA } from '@angular/material/legacy-dialog'; import { UntypedFormBuilder, Validators } from '@angular/forms'; + import { Observable, ReplaySubject } from 'rxjs'; +import { DynamicDialogRef, DynamicDialogConfig } from 'primeng/dynamicdialog'; export enum PolicyAction { CREATE_NEW_POLICY = 1, @@ -21,19 +23,27 @@ export class SavePolicyDialog { dataForm = this.fb.group({}); isNewVersionDisabled: boolean = false; + isVisible: boolean = true; + data: any; + private _isActionSelected$ = new ReplaySubject(1); constructor( - public dialogRef: MatDialogRef, + public dialogRef: DynamicDialogRef, + public config: DynamicDialogConfig, private fb: UntypedFormBuilder, - @Inject(MAT_DIALOG_DATA) public data: any) { + // public dialogRef: MatDialogRef, + // @Inject(MAT_DIALOG_DATA) public data: any + ) { + this.data = config.data; + if (this.data.action) { this.setAction(this.data.action); } else { this._isActionSelected$.next(false); } - this.isNewVersionDisabled = data.policy.owner !== data.policy.creator; + this.isNewVersionDisabled = this.data.policy.owner !== this.data.policy.creator; } public get isActionSelected$(): Observable { diff --git a/frontend/src/app/modules/policy-engine/dialogs/viewer-dialog/viewer-dialog.component.ts b/frontend/src/app/modules/policy-engine/dialogs/viewer-dialog/viewer-dialog.component.ts index 530eeed71d..7f09e4d82f 100644 --- a/frontend/src/app/modules/policy-engine/dialogs/viewer-dialog/viewer-dialog.component.ts +++ b/frontend/src/app/modules/policy-engine/dialogs/viewer-dialog/viewer-dialog.component.ts @@ -1,5 +1,6 @@ -import { Component, Inject, Input } from '@angular/core'; -import { MatLegacyDialogRef as MatDialogRef, MAT_LEGACY_DIALOG_DATA as MAT_DIALOG_DATA } from '@angular/material/legacy-dialog'; +import {Component, Inject, Input} from '@angular/core'; +// import {MatLegacyDialogRef as MatDialogRef, MAT_LEGACY_DIALOG_DATA as MAT_DIALOG_DATA} from '@angular/material/legacy-dialog'; +import {DynamicDialogConfig, DynamicDialogRef} from 'primeng/dynamicdialog'; /** * Dialog for display json @@ -16,13 +17,19 @@ export class ViewerDialog { public json: any = ''; public links: any = []; + public data: any + constructor( - public dialogRef: MatDialogRef, - @Inject(MAT_DIALOG_DATA) public data: { - title: string, - value: any, - type: 'LINK' | 'TEXT' | 'JSON' - }) { + // public dialogRef: MatDialogRef, + // @Inject(MAT_DIALOG_DATA) public data: { + // title: string, + // value: any, + // type: 'LINK' | 'TEXT' | 'JSON' + // } + public dialogRef: DynamicDialogRef, + public config: DynamicDialogConfig + ) { + this.data = this.config.data; } ngOnInit() { diff --git a/frontend/src/app/modules/policy-engine/modules-list/modules-list.component.ts b/frontend/src/app/modules/policy-engine/modules-list/modules-list.component.ts index 233238d3e7..d3427d2d3c 100644 --- a/frontend/src/app/modules/policy-engine/modules-list/modules-list.component.ts +++ b/frontend/src/app/modules/policy-engine/modules-list/modules-list.component.ts @@ -1,5 +1,5 @@ import { Component, OnDestroy, OnInit, Inject } from '@angular/core'; -import { MatLegacyDialog as MatDialog } from '@angular/material/legacy-dialog'; +// import { MatLegacyDialog as MatDialog } from '@angular/material/legacy-dialog'; import { Router } from '@angular/router'; import { IUser, SchemaHelper, TagType, UserPermissions } from '@guardian/interfaces'; import { ProfileService } from 'src/app/services/profile.service'; diff --git a/frontend/src/app/modules/policy-engine/policies/policies.component.ts b/frontend/src/app/modules/policy-engine/policies/policies.component.ts index 3741bd7fec..6bee79ab26 100644 --- a/frontend/src/app/modules/policy-engine/policies/policies.component.ts +++ b/frontend/src/app/modules/policy-engine/policies/policies.component.ts @@ -1,5 +1,5 @@ import { Component, Inject, OnInit } from '@angular/core'; -import { MatLegacyDialog as MatDialog } from '@angular/material/legacy-dialog'; +// import { MatLegacyDialog as MatDialog } from '@angular/material/legacy-dialog'; import { Router } from '@angular/router'; import { ContractType, IUser, PolicyHelper, PolicyType, Schema, SchemaHelper, TagType, Token, UserPermissions } from '@guardian/interfaces'; import { PolicyEngineService } from 'src/app/services/policy-engine.service'; @@ -145,9 +145,6 @@ const columns = [{ } }]; - - - /** * Component for choosing a policy and * display blocks of the selected policy @@ -512,7 +509,7 @@ export class PoliciesComponent implements OnInit { private profileService: ProfileService, private policyEngineService: PolicyEngineService, private router: Router, - private dialog: MatDialog, + private dialog: DialogService, private dialogService: DialogService, private taskService: TasksService, private informService: InformService, @@ -1093,16 +1090,27 @@ export class PoliciesComponent implements OnInit { } public createMultiPolicy(element: any) { - const dialogRef = this.dialog.open(MultiPolicyDialogComponent, mobileDialog({ + // const dialogRef = this.dialog.open(MultiPolicyDialogComponent, mobileDialog({ + // width: '650px', + // panelClass: 'g-dialog', + // disableClose: true, + // autoFocus: false, + // autoZIndex: true, + // data: { + // policyId: element.id + // } + // })); + + const dialogRef = this.dialogService.open(MultiPolicyDialogComponent, { width: '650px', - panelClass: 'g-dialog', - disableClose: true, - autoFocus: false, + styleClass: 'g-dialog', + closable: false, + autoZIndex: true, data: { policyId: element.id } - })); - dialogRef.afterClosed().subscribe(async (result) => { + }); + dialogRef.onClose.subscribe(async (result) => { if (result) { this.importPolicyDetails(result); } diff --git a/frontend/src/app/modules/policy-engine/policy-configuration/blocks/calculate/custom-logic-config/custom-logic-config.component.ts b/frontend/src/app/modules/policy-engine/policy-configuration/blocks/calculate/custom-logic-config/custom-logic-config.component.ts index 457dcdbc50..6c05829725 100644 --- a/frontend/src/app/modules/policy-engine/policy-configuration/blocks/calculate/custom-logic-config/custom-logic-config.component.ts +++ b/frontend/src/app/modules/policy-engine/policy-configuration/blocks/calculate/custom-logic-config/custom-logic-config.component.ts @@ -1,7 +1,8 @@ import { Component, EventEmitter, Inject, Input, OnInit, Output, ViewEncapsulation } from '@angular/core'; -import { MatLegacyDialog as MatDialog } from '@angular/material/legacy-dialog'; +// import { MatLegacyDialog as MatDialog } from '@angular/material/legacy-dialog'; import { CodeEditorDialogComponent } from '../../../../dialogs/code-editor-dialog/code-editor-dialog.component'; import { IModuleVariables, PolicyBlock, SchemaVariables } from '../../../../structures'; +import {DialogService} from 'primeng/dynamicdialog'; @Component({ selector: 'app-custom-logic-config', @@ -24,9 +25,10 @@ export class CustomLogicConfigComponent implements OnInit { schemas!: SchemaVariables[]; constructor( - private dialog: MatDialog - ) { - + // private dialog: MatDialog + private dialog: DialogService, + ) { + } ngOnInit(): void { @@ -49,15 +51,18 @@ export class CustomLogicConfigComponent implements OnInit { editExpression($event: MouseEvent) { const dialogRef = this.dialog.open(CodeEditorDialogComponent, { width: '80%', - panelClass: 'g-dialog', + // panelClass: 'g-dialog', data: { expression: this.properties.expression, readonly: this.readonly }, - autoFocus: true, - disableClose: true + // autoFocus: true, + // disableClose: true, + styleClass: 'g-dialog', + modal: true, + closable: false, }) - dialogRef.afterClosed().subscribe(result => { + dialogRef.onClose.subscribe(result => { if(result) { this.properties.expression = result.expression; } diff --git a/frontend/src/app/modules/policy-engine/policy-configuration/blocks/documents/aggregate-config/aggregate-config.component.ts b/frontend/src/app/modules/policy-engine/policy-configuration/blocks/documents/aggregate-config/aggregate-config.component.ts index c4b7c151e1..609f56da47 100644 --- a/frontend/src/app/modules/policy-engine/policy-configuration/blocks/documents/aggregate-config/aggregate-config.component.ts +++ b/frontend/src/app/modules/policy-engine/policy-configuration/blocks/documents/aggregate-config/aggregate-config.component.ts @@ -1,5 +1,5 @@ import { Component, EventEmitter, Input, OnInit, Output, SimpleChanges, ViewEncapsulation } from '@angular/core'; -import { MatLegacyDialog as MatDialog } from '@angular/material/legacy-dialog'; +// import { MatLegacyDialog as MatDialog } from '@angular/material/legacy-dialog'; import { IModuleVariables, PolicyBlock } from '../../../../structures'; /** @@ -29,7 +29,9 @@ export class AggregateConfigComponent implements OnInit { properties!: any; allTimer!: PolicyBlock[]; - constructor(private dialog: MatDialog) { + constructor( + // private dialog: MatDialog + ) { } ngOnInit(): void { diff --git a/frontend/src/app/modules/policy-engine/policy-configuration/blocks/documents/timer-config/timer-config.component.ts b/frontend/src/app/modules/policy-engine/policy-configuration/blocks/documents/timer-config/timer-config.component.ts index 3fb47346cc..3d8c26be62 100644 --- a/frontend/src/app/modules/policy-engine/policy-configuration/blocks/documents/timer-config/timer-config.component.ts +++ b/frontend/src/app/modules/policy-engine/policy-configuration/blocks/documents/timer-config/timer-config.component.ts @@ -1,7 +1,8 @@ import { Component, EventEmitter, Input, OnInit, Output, SimpleChanges, ViewEncapsulation } from '@angular/core'; -import { MatLegacyDialog as MatDialog } from '@angular/material/legacy-dialog'; +// import { MatLegacyDialog as MatDialog } from '@angular/material/legacy-dialog'; import { CronConfigDialog } from '../../../../dialogs/cron-config-dialog/cron-config-dialog.component'; import { IModuleVariables, PolicyBlock } from '../../../../structures'; +import {DialogService} from 'primeng/dynamicdialog'; /** * Settings for block of 'timer' type. @@ -29,7 +30,10 @@ export class TimerConfigComponent implements OnInit { properties!: any; - constructor(private dialog: MatDialog) { + constructor( + // private dialog: MatDialog + private dialog: DialogService, + ) { } ngOnInit(): void { @@ -55,13 +59,15 @@ export class TimerConfigComponent implements OnInit { if (this.properties.period == 'custom') { const dialogRef = this.dialog.open(CronConfigDialog, { width: '550px', - disableClose: true, + // disableClose: true, data: { startDate: this.properties.startDate }, - autoFocus: false + // autoFocus: false + modal: true, + closable: false, }); - dialogRef.afterClosed().subscribe(async (result) => { + dialogRef.onClose.subscribe(async (result) => { if (result) { this.properties.periodMask = result.mask; this.properties.periodInterval = result.interval; diff --git a/frontend/src/app/modules/policy-engine/policy-configuration/blocks/main/http-request-config/http-request-config.component.ts b/frontend/src/app/modules/policy-engine/policy-configuration/blocks/main/http-request-config/http-request-config.component.ts index 6cfd961b16..19b0529726 100644 --- a/frontend/src/app/modules/policy-engine/policy-configuration/blocks/main/http-request-config/http-request-config.component.ts +++ b/frontend/src/app/modules/policy-engine/policy-configuration/blocks/main/http-request-config/http-request-config.component.ts @@ -1,7 +1,8 @@ -import { Component, EventEmitter, Input, OnInit, Output, SimpleChanges, ViewEncapsulation } from '@angular/core'; -import { CodeEditorDialogComponent } from '../../../../dialogs/code-editor-dialog/code-editor-dialog.component'; -import { MatLegacyDialog as MatDialog } from '@angular/material/legacy-dialog'; -import { IModuleVariables, PolicyBlock } from '../../../../structures'; +import {Component, EventEmitter, Input, OnInit, Output, SimpleChanges, ViewEncapsulation} from '@angular/core'; +import {CodeEditorDialogComponent} from '../../../../dialogs/code-editor-dialog/code-editor-dialog.component'; +// import { MatLegacyDialog as MatDialog } from '@angular/material/legacy-dialog'; +import {IModuleVariables, PolicyBlock} from '../../../../structures'; +import {DialogService} from 'primeng/dynamicdialog'; /** * Settings for block of 'switch' and 'interfaceStepBlock' types. @@ -30,7 +31,8 @@ export class HttpRequestConfigComponent implements OnInit { properties!: any; constructor( - private dialog: MatDialog + // private dialog: MatDialog + private dialog: DialogService, ) { } @@ -70,16 +72,19 @@ export class HttpRequestConfigComponent implements OnInit { editBody($event: MouseEvent) { const dialogRef = this.dialog.open(CodeEditorDialogComponent, { width: '80%', - panelClass: 'g-dialog', + // panelClass: 'g-dialog', data: { mode: 'json', expression: this.properties.messageBody, readonly: this.readonly }, - autoFocus: true, - disableClose: true + // autoFocus: true, + // disableClose: true + styleClass: 'g-dialog', + modal: true, + closable: false, }) - dialogRef.afterClosed().subscribe(result => { + dialogRef.onClose.subscribe(result => { if (result) { this.properties.messageBody = result.expression; } diff --git a/frontend/src/app/modules/policy-engine/policy-configuration/blocks/report/report-item-config/report-item-config.component.ts b/frontend/src/app/modules/policy-engine/policy-configuration/blocks/report/report-item-config/report-item-config.component.ts index 08030d30be..0747c24efe 100644 --- a/frontend/src/app/modules/policy-engine/policy-configuration/blocks/report/report-item-config/report-item-config.component.ts +++ b/frontend/src/app/modules/policy-engine/policy-configuration/blocks/report/report-item-config/report-item-config.component.ts @@ -1,9 +1,10 @@ import { Component, EventEmitter, Input, OnInit, Output, SimpleChanges, ViewEncapsulation } from '@angular/core'; -import { MatLegacyDialog as MatDialog } from '@angular/material/legacy-dialog'; +// import { MatLegacyDialog as MatDialog } from '@angular/material/legacy-dialog'; import { IconPreviewDialog } from 'src/app/modules/common/icon-preview-dialog/icon-preview-dialog.component'; import { IPFS_SCHEMA } from 'src/app/services/api'; import { IPFSService } from 'src/app/services/ipfs.service'; import { IModuleVariables, PolicyBlock } from '../../../../structures'; +import {DialogService} from 'primeng/dynamicdialog'; /** * Settings for block of 'reportItemBlock' type. @@ -40,7 +41,8 @@ export class ReportItemConfigComponent implements OnInit { constructor( private ipfs: IPFSService, - public dialog: MatDialog + // public dialog: MatDialog + private dialog: DialogService, ) { } ngOnInit(): void { diff --git a/frontend/src/app/modules/policy-engine/policy-configuration/policy-configuration/policy-configuration.component.ts b/frontend/src/app/modules/policy-engine/policy-configuration/policy-configuration/policy-configuration.component.ts index fafff20bbc..04741c4566 100644 --- a/frontend/src/app/modules/policy-engine/policy-configuration/policy-configuration/policy-configuration.component.ts +++ b/frontend/src/app/modules/policy-engine/policy-configuration/policy-configuration/policy-configuration.component.ts @@ -1,6 +1,6 @@ import { CdkDragDrop, CdkDropList, moveItemInArray } from '@angular/cdk/drag-drop'; import { ChangeDetectorRef, Component, HostListener, Inject, OnInit, ViewChild } from '@angular/core'; -import { MatLegacyDialog as MatDialog } from '@angular/material/legacy-dialog'; +// import { MatLegacyDialog as MatDialog } from '@angular/material/legacy-dialog'; import { ActivatedRoute, Router } from '@angular/router'; import { ContractType, @@ -208,7 +208,7 @@ export class PolicyConfigurationComponent implements OnInit { constructor( private route: ActivatedRoute, private router: Router, - private dialog: MatDialog, + private dialog: DialogService, private dialogService: DialogService, private changeDetector: ChangeDetectorRef, private informService: InformService, @@ -746,9 +746,11 @@ export class PolicyConfigurationComponent implements OnInit { dialogTitle: 'Apply latest changes', dialogText: 'Do you want to apply latest changes?' }, - disableClose: true + // disableClose: true + modal: true, + closable: false, }) - applyChangesDialog.afterClosed().subscribe((result) => { + applyChangesDialog.onClose.subscribe((result) => { if (result) { this.loadState(this.storage.current); } else { @@ -1273,10 +1275,12 @@ export class PolicyConfigurationComponent implements OnInit { ? PolicyAction.CREATE_NEW_POLICY : null }, - autoFocus: false, - disableClose: true + // autoFocus: false, + // disableClose: true + modal: true, + closable: false, }); - dialogRef.afterClosed().subscribe(async (result) => { + dialogRef.onClose.subscribe(async (result) => { if (result && this.policyTemplate) { this.loading = true; const json = this.policyTemplate.getJSON(); @@ -1409,10 +1413,12 @@ export class PolicyConfigurationComponent implements OnInit { if (this.hasChanges) { const dialogRef = this.dialog.open(SaveBeforeDialogComponent, { width: '500px', - autoFocus: false, - disableClose: true, + // autoFocus: false, + // disableClose: true, + modal: true, + closable: false, }); - dialogRef.afterClosed().subscribe((result) => { + dialogRef.onClose.subscribe((result) => { if (result) { this.asyncUpdatePolicy().subscribe(() => { this.setVersion(); @@ -1428,10 +1434,12 @@ export class PolicyConfigurationComponent implements OnInit { if (this.hasChanges) { const dialogRef = this.dialog.open(SaveBeforeDialogComponent, { width: '500px', - autoFocus: false, - disableClose: true, + // autoFocus: false, + // disableClose: true, + modal: true, + closable: false, }); - dialogRef.afterClosed().subscribe((result) => { + dialogRef.onClose.subscribe((result) => { if (result) { this.asyncUpdatePolicy().subscribe(() => { this.dryRunPolicy(); diff --git a/frontend/src/app/modules/policy-engine/policy-configuration/policy-settings/policy-settings.component.ts b/frontend/src/app/modules/policy-engine/policy-configuration/policy-settings/policy-settings.component.ts index 1d01b5ca5d..a062f49b19 100644 --- a/frontend/src/app/modules/policy-engine/policy-configuration/policy-settings/policy-settings.component.ts +++ b/frontend/src/app/modules/policy-engine/policy-configuration/policy-settings/policy-settings.component.ts @@ -3,7 +3,7 @@ import { ThemeService } from '../../../../services/theme.service'; import { Theme } from '../../structures/storage/theme'; import { ThemeRule } from '../../structures/storage/theme-rule'; import { RegisteredService } from '../../services/registered.service'; -import { MatLegacyDialog as MatDialog } from '@angular/material/legacy-dialog'; +// import { MatLegacyDialog as MatDialog } from '@angular/material/legacy-dialog'; import { NewThemeDialog } from '../../dialogs/new-theme-dialog/new-theme-dialog.component'; import { ConfirmDialog } from 'src/app/modules/common/confirm-dialog/confirm-dialog.component'; import { IImportEntityResult, ImportEntityDialog, ImportEntityType } from 'src/app/modules/common/import-entity-dialog/import-entity-dialog.component'; @@ -57,7 +57,7 @@ export class PolicySettingsComponent implements OnInit { private registeredService: RegisteredService, private themeService: ThemeService, private dialogService: DialogService, - private dialog: MatDialog + private dialog: DialogService ) { this.roles = []; for (let i = 0; i < 20; i++) { @@ -157,14 +157,17 @@ export class PolicySettingsComponent implements OnInit { } const dialogRef = this.dialog.open(NewThemeDialog, { width: '650px', - panelClass: 'g-dialog', + // panelClass: 'g-dialog', data: { type, theme: newTheme }, - disableClose: true, + // disableClose: true, + styleClass: 'g-dialog', + modal: true, + closable: false, }); - dialogRef.afterClosed().subscribe(async (r) => { + dialogRef.onClose.subscribe(async (r) => { if (r) { if (r.name) { newTheme.name = r.name; @@ -190,9 +193,11 @@ export class PolicySettingsComponent implements OnInit { title: 'Delete theme', description: 'Are you sure you want to delete this theme?' }, - disableClose: true, + // disableClose: true, + modal: true, + closable: false, }); - dialogRef.afterClosed().subscribe(result => { + dialogRef.onClose.subscribe(result => { if (result) { this.loading = true; this.themeService.delete(theme).subscribe((result: any) => { @@ -268,14 +273,17 @@ export class PolicySettingsComponent implements OnInit { public editTheme(theme: Theme) { const dialogRef = this.dialog.open(NewThemeDialog, { width: '650px', - panelClass: 'g-dialog', + // panelClass: 'g-dialog', data: { type: 'edit', theme: theme }, - disableClose: true, + // disableClose: true, + styleClass: 'g-dialog', + modal: true, + closable: false, }); - dialogRef.afterClosed().subscribe(async (result) => { + dialogRef.onClose.subscribe(async (result) => { if (result) { theme.name = result.name; this.themeService.update(theme).subscribe((result: any) => { diff --git a/frontend/src/app/modules/policy-engine/policy-viewer/blocks/button-block/button-block.component.ts b/frontend/src/app/modules/policy-engine/policy-viewer/blocks/button-block/button-block.component.ts index 0be4e8e900..b64bd5c15e 100644 --- a/frontend/src/app/modules/policy-engine/policy-viewer/blocks/button-block/button-block.component.ts +++ b/frontend/src/app/modules/policy-engine/policy-viewer/blocks/button-block/button-block.component.ts @@ -1,5 +1,5 @@ import { AfterContentChecked, ChangeDetectionStrategy, ChangeDetectorRef, Component, Input, OnInit, } from '@angular/core'; -import { MatLegacyDialog as MatDialog } from '@angular/material/legacy-dialog'; +// import { MatLegacyDialog as MatDialog } from '@angular/material/legacy-dialog'; import { PolicyEngineService } from 'src/app/services/policy-engine.service'; import { PolicyHelper } from 'src/app/services/policy-helper.service'; import { WebSocketService } from 'src/app/services/web-socket.service'; @@ -34,7 +34,7 @@ export class ButtonBlockComponent implements OnInit, AfterContentChecked { private policyEngineService: PolicyEngineService, private wsService: WebSocketService, private policyHelper: PolicyHelper, - public dialog: MatDialog, + // public dialog: MatDialog, private dialogService: DialogService, private cdref: ChangeDetectorRef ) { diff --git a/frontend/src/app/modules/policy-engine/policy-viewer/blocks/document-dialog-block/document-dialog-block.component.ts b/frontend/src/app/modules/policy-engine/policy-viewer/blocks/document-dialog-block/document-dialog-block.component.ts index 2a69dcf98c..4b0106d062 100644 --- a/frontend/src/app/modules/policy-engine/policy-viewer/blocks/document-dialog-block/document-dialog-block.component.ts +++ b/frontend/src/app/modules/policy-engine/policy-viewer/blocks/document-dialog-block/document-dialog-block.component.ts @@ -1,5 +1,7 @@ -import { Component, OnInit, Inject } from '@angular/core'; -import { MatLegacyDialogRef as MatDialogRef, MAT_LEGACY_DIALOG_DATA as MAT_DIALOG_DATA } from '@angular/material/legacy-dialog'; +import {Component, OnInit, Inject} from '@angular/core'; +import {DynamicDialogConfig, DynamicDialogRef} from 'primeng/dynamicdialog'; + +// import { MatLegacyDialogRef as MatDialogRef, MAT_LEGACY_DIALOG_DATA as MAT_DIALOG_DATA } from '@angular/material/legacy-dialog'; /** * Dialog for display json @@ -10,12 +12,18 @@ import { MatLegacyDialogRef as MatDialogRef, MAT_LEGACY_DIALOG_DATA as MAT_DIALO styleUrls: ['./document-dialog-block.component.scss'] }) export class DocumentDialogBlock implements OnInit { - title: string = ""; - json: string = ""; + title: string = ''; + json: string = ''; + + public data: any constructor( - public dialogRef: MatDialogRef, - @Inject(MAT_DIALOG_DATA) public data: any) { + // public dialogRef: MatDialogRef, + // @Inject(MAT_DIALOG_DATA) public data: any + public dialogRef: DynamicDialogRef, + public config: DynamicDialogConfig + ) { + this.data = this.config.data; } ngOnInit() { @@ -33,4 +41,4 @@ export class DocumentDialogBlock implements OnInit { onClick(): void { this.dialogRef.close(null); } -} \ No newline at end of file +} diff --git a/frontend/src/app/modules/policy-engine/policy-viewer/blocks/documents-source-block/documents-source-block.component.ts b/frontend/src/app/modules/policy-engine/policy-viewer/blocks/documents-source-block/documents-source-block.component.ts index d0882526a1..040a32842a 100644 --- a/frontend/src/app/modules/policy-engine/policy-viewer/blocks/documents-source-block/documents-source-block.component.ts +++ b/frontend/src/app/modules/policy-engine/policy-viewer/blocks/documents-source-block/documents-source-block.component.ts @@ -1,5 +1,5 @@ import { Component, Input, OnInit } from '@angular/core'; -import { MatLegacyDialog as MatDialog } from '@angular/material/legacy-dialog'; +// import { MatLegacyDialog as MatDialog } from '@angular/material/legacy-dialog'; import { PolicyEngineService } from 'src/app/services/policy-engine.service'; import { PolicyHelper } from 'src/app/services/policy-helper.service'; import { DialogBlock } from '../../dialog-block/dialog-block.component'; @@ -56,7 +56,7 @@ export class DocumentsSourceBlockComponent implements OnInit { private policyEngineService: PolicyEngineService, private wsService: WebSocketService, private policyHelper: PolicyHelper, - private dialog: MatDialog, + private dialog: DialogService, private dialogService: DialogService, ) { this.fields = []; @@ -230,7 +230,7 @@ export class DocumentsSourceBlockComponent implements OnInit { dryRun: this.dryRun } }); - dialogRef.afterClosed().subscribe(async (result) => { }); + dialogRef.onClose.subscribe(async (result) => { }); } else { const dialogRef = this.dialogService.open(VCViewerDialog, { showHeader: false, @@ -421,7 +421,7 @@ export class DocumentsSourceBlockComponent implements OnInit { value: links, } }); - dialogRef.afterClosed().subscribe(async (result) => { }); + dialogRef.onClose.subscribe(async (result) => { }); } onButton(event: MouseEvent, row: any, field: any) { diff --git a/frontend/src/app/modules/policy-engine/policy-viewer/blocks/group-manager-block/group-manager-block.component.ts b/frontend/src/app/modules/policy-engine/policy-viewer/blocks/group-manager-block/group-manager-block.component.ts index 5ecbaf5879..3dee09b328 100644 --- a/frontend/src/app/modules/policy-engine/policy-viewer/blocks/group-manager-block/group-manager-block.component.ts +++ b/frontend/src/app/modules/policy-engine/policy-viewer/blocks/group-manager-block/group-manager-block.component.ts @@ -3,10 +3,11 @@ import { PolicyEngineService } from 'src/app/services/policy-engine.service'; import { UntypedFormBuilder } from '@angular/forms'; import { PolicyHelper } from 'src/app/services/policy-helper.service'; import { WebSocketService } from 'src/app/services/web-socket.service'; -import { MatLegacyDialog as MatDialog } from '@angular/material/legacy-dialog'; +// import { MatLegacyDialog as MatDialog } from '@angular/material/legacy-dialog'; import { ConfirmationDialog } from '../confirmation-dialog/confirmation-dialog.component'; import { InviteDialogComponent } from '../../../dialogs/invite-dialog/invite-dialog.component'; import { HttpErrorResponse } from '@angular/common/http'; +import {DialogService} from 'primeng/dynamicdialog'; /** * Component for display block of 'policyRolesBlock' types. @@ -51,7 +52,8 @@ export class GroupManagerBlockComponent implements OnInit { private wsService: WebSocketService, private policyHelper: PolicyHelper, private fb: UntypedFormBuilder, - private dialog: MatDialog + // private dialog: MatDialog + private dialog: DialogService, ) { } @@ -148,8 +150,8 @@ export class GroupManagerBlockComponent implements OnInit { onInvite(group: any) { const dialogRef = this.dialog.open(InviteDialogComponent, { width: '500px', - panelClass: 'g-dialog', - disableClose: true, + // panelClass: 'g-dialog', + // disableClose: true, data: { header: 'Invitation', blockId: this.id, @@ -157,8 +159,11 @@ export class GroupManagerBlockComponent implements OnInit { group: group.id, roles: group.roles, }, + styleClass: 'g-dialog', + modal: true, + closable: false, }); - dialogRef.afterClosed().subscribe(async () => { + dialogRef.onClose.subscribe(async () => { }); } @@ -173,11 +178,13 @@ export class GroupManagerBlockComponent implements OnInit { ]; const dialogRef = this.dialog.open(ConfirmationDialog, { width: '550px', - disableClose: true, + // disableClose: true, data: { title, description }, + modal: true, + closable: false, }); - dialogRef.afterClosed().subscribe((result) => { + dialogRef.onClose.subscribe((result) => { if (result) { this.delete(user, result); } diff --git a/frontend/src/app/modules/policy-engine/policy-viewer/blocks/messages-report-block/messages-report-block.component.ts b/frontend/src/app/modules/policy-engine/policy-viewer/blocks/messages-report-block/messages-report-block.component.ts index b7b6fa89d3..0616320cf8 100644 --- a/frontend/src/app/modules/policy-engine/policy-viewer/blocks/messages-report-block/messages-report-block.component.ts +++ b/frontend/src/app/modules/policy-engine/policy-viewer/blocks/messages-report-block/messages-report-block.component.ts @@ -1,6 +1,6 @@ import { Component, ElementRef, HostListener, Input, OnInit } from '@angular/core'; import { UntypedFormBuilder, Validators } from '@angular/forms'; -import { MatLegacyDialog as MatDialog } from '@angular/material/legacy-dialog'; +// import { MatLegacyDialog as MatDialog } from '@angular/material/legacy-dialog'; import { MatIconRegistry } from '@angular/material/icon'; import { DomSanitizer } from '@angular/platform-browser'; import * as moment from 'moment'; @@ -265,7 +265,7 @@ export class MessagesReportBlockComponent implements OnInit { private policyEngineService: PolicyEngineService, private wsService: WebSocketService, private policyHelper: PolicyHelper, - private dialog: MatDialog, + // private dialog: DialogService, private dialogService: DialogService, private iconRegistry: MatIconRegistry, private sanitizer: DomSanitizer diff --git a/frontend/src/app/modules/policy-engine/policy-viewer/blocks/report-block/report-block.component.ts b/frontend/src/app/modules/policy-engine/policy-viewer/blocks/report-block/report-block.component.ts index 7fec338c9c..d6eb5fad7f 100644 --- a/frontend/src/app/modules/policy-engine/policy-viewer/blocks/report-block/report-block.component.ts +++ b/frontend/src/app/modules/policy-engine/policy-viewer/blocks/report-block/report-block.component.ts @@ -1,6 +1,6 @@ import { Component, Input, OnInit } from '@angular/core'; import { UntypedFormBuilder, Validators } from '@angular/forms'; -import { MatLegacyDialog as MatDialog } from '@angular/material/legacy-dialog'; +// import { MatLegacyDialog as MatDialog } from '@angular/material/legacy-dialog'; import { MatIconRegistry } from '@angular/material/icon'; import { DomSanitizer } from '@angular/platform-browser'; import { @@ -59,7 +59,7 @@ export class ReportBlockComponent implements OnInit { private policyEngineService: PolicyEngineService, private wsService: WebSocketService, private fb: UntypedFormBuilder, - public dialog: MatDialog, + // public dialog: MatDialog, private dialogService: DialogService, iconRegistry: MatIconRegistry, sanitizer: DomSanitizer, diff --git a/frontend/src/app/modules/policy-engine/policy-viewer/blocks/request-document-block-addon/request-document-block-addon.component.ts b/frontend/src/app/modules/policy-engine/policy-viewer/blocks/request-document-block-addon/request-document-block-addon.component.ts index 763054bda0..89f3befb35 100644 --- a/frontend/src/app/modules/policy-engine/policy-viewer/blocks/request-document-block-addon/request-document-block-addon.component.ts +++ b/frontend/src/app/modules/policy-engine/policy-viewer/blocks/request-document-block-addon/request-document-block-addon.component.ts @@ -7,7 +7,7 @@ import { ViewChild, } from '@angular/core'; import { UntypedFormBuilder, UntypedFormGroup } from '@angular/forms'; -import { MatLegacyDialog as MatDialog } from '@angular/material/legacy-dialog'; +// import { MatLegacyDialog as MatDialog } from '@angular/material/legacy-dialog'; import { DocumentGenerator, ISchema, IUser, Schema } from '@guardian/interfaces'; import { PolicyEngineService } from 'src/app/services/policy-engine.service'; import { PolicyHelper } from 'src/app/services/policy-helper.service'; @@ -76,7 +76,7 @@ export class RequestDocumentBlockAddonComponent policyHelper: PolicyHelper, private schemaRulesService: SchemaRulesService, private fb: UntypedFormBuilder, - private dialog: MatDialog, + // private dialog: MatDialog, private dialogService: DialogService, private router: Router, private changeDetectorRef: ChangeDetectorRef diff --git a/frontend/src/app/modules/policy-engine/policy-viewer/blocks/upload-document-block/upload-document-block.component.ts b/frontend/src/app/modules/policy-engine/policy-viewer/blocks/upload-document-block/upload-document-block.component.ts index 144290d8d3..f8d8de6995 100644 --- a/frontend/src/app/modules/policy-engine/policy-viewer/blocks/upload-document-block/upload-document-block.component.ts +++ b/frontend/src/app/modules/policy-engine/policy-viewer/blocks/upload-document-block/upload-document-block.component.ts @@ -1,10 +1,11 @@ import { Component, Input, OnInit, TemplateRef, ViewChild } from '@angular/core'; -import { MatLegacyDialog as MatDialog } from '@angular/material/legacy-dialog'; +// import { MatLegacyDialog as MatDialog } from '@angular/material/legacy-dialog'; import { PolicyEngineService } from 'src/app/services/policy-engine.service'; import { PolicyHelper } from 'src/app/services/policy-helper.service'; import { ProfileService } from 'src/app/services/profile.service'; import { WebSocketService } from 'src/app/services/web-socket.service'; import { HttpErrorResponse } from '@angular/common/http'; +import {DialogService} from 'primeng/dynamicdialog'; /** * Component for display block of 'requestVcDocument' types. @@ -12,13 +13,14 @@ import { HttpErrorResponse } from '@angular/common/http'; @Component({ selector: 'request-document-block', templateUrl: './upload-document-block.component.html', - styleUrls: ['./upload-document-block.component.scss'] + styleUrls: ['./upload-document-block.component.scss'], + providers: [DialogService] }) export class UploadDocumentBlockComponent implements OnInit { @Input('id') id!: string; @Input('policyId') policyId!: string; @Input('static') static!: any; - @ViewChild("dialogTemplate") dialogTemplate!: TemplateRef; + @ViewChild("dialogTemplate") dialogTemplate!: any; isExist = false; disabled = false; @@ -42,7 +44,8 @@ export class UploadDocumentBlockComponent implements OnInit { private wsService: WebSocketService, private profile: ProfileService, private policyHelper: PolicyHelper, - private dialog: MatDialog, + // private dialog: MatDialog, + private dialog: DialogService, ) { } @@ -151,22 +154,26 @@ export class UploadDocumentBlockComponent implements OnInit { const headerHeight: number = parseInt(bodyStyles.getPropertyValue('--header-height')); this.dialogRef = this.dialog.open(this.dialogTemplate, { width: `100vw`, - maxWidth: '100vw', + // maxWidth: '100vw', height: `${window.innerHeight - headerHeight}px`, - position: { - 'bottom': '0' - }, - panelClass: 'g-dialog', - hasBackdrop: true, // Shadows beyond the dialog - closeOnNavigation: true, - autoFocus: false, - disableClose: true, + // bottom: '0', + // 'bottom': '0' + // }, + // panelClass: 'g-dialog', + // hasBackdrop: true, // Shadows beyond the dialog + // closeOnNavigation: true, + // autoFocus: false, + // disableClose: true, + styleClass: 'g-dialog', + closable: true, data: this }); } else { this.dialogRef = this.dialog.open(this.dialogTemplate, { width: '850px', - disableClose: true, + // disableClose: true, + modal: true, + closable: false, data: this }); } diff --git a/frontend/src/app/modules/policy-engine/policy-viewer/dialog-block/dialog-block.component.ts b/frontend/src/app/modules/policy-engine/policy-viewer/dialog-block/dialog-block.component.ts index b7d587c8b3..186a795de1 100644 --- a/frontend/src/app/modules/policy-engine/policy-viewer/dialog-block/dialog-block.component.ts +++ b/frontend/src/app/modules/policy-engine/policy-viewer/dialog-block/dialog-block.component.ts @@ -1,5 +1,7 @@ -import { Component, OnInit, Inject } from '@angular/core'; -import { MatLegacyDialogRef as MatDialogRef, MAT_LEGACY_DIALOG_DATA as MAT_DIALOG_DATA } from '@angular/material/legacy-dialog'; +import {Component, OnInit, Inject} from '@angular/core'; +import {DynamicDialogConfig, DynamicDialogRef} from 'primeng/dynamicdialog'; + +// import { MatLegacyDialogRef as MatDialogRef, MAT_LEGACY_DIALOG_DATA as MAT_DIALOG_DATA } from '@angular/material/legacy-dialog'; /** * Component for display a block inside a dialog. @@ -10,15 +12,21 @@ import { MatLegacyDialogRef as MatDialogRef, MAT_LEGACY_DIALOG_DATA as MAT_DIALO styleUrls: ['./dialog-block.component.scss'] }) export class DialogBlock { - title: string = ""; + title: string = ''; block: any = null; static: any = null; policyId: any = null; dryRun: any = null; + public data: any + constructor( - public dialogRef: MatDialogRef, - @Inject(MAT_DIALOG_DATA) public data: any) { + // public dialogRef: MatDialogRef, + // @Inject(MAT_DIALOG_DATA) public data: any + public dialogRef: DynamicDialogRef, + public config: DynamicDialogConfig + ) { + this.data = this.config.data; } ngOnInit() { @@ -32,4 +40,4 @@ export class DialogBlock { onClose(): void { this.dialogRef.close(null); } -} \ No newline at end of file +} diff --git a/frontend/src/app/modules/policy-engine/record/record-controller/record-controller.component.ts b/frontend/src/app/modules/policy-engine/record/record-controller/record-controller.component.ts index 6bd0e34552..8524b5f8ec 100644 --- a/frontend/src/app/modules/policy-engine/record/record-controller/record-controller.component.ts +++ b/frontend/src/app/modules/policy-engine/record/record-controller/record-controller.component.ts @@ -7,7 +7,7 @@ import { Router } from '@angular/router'; import { ConfirmDialog } from 'src/app/modules/common/confirm-dialog/confirm-dialog.component'; import { DialogService } from 'primeng/dynamicdialog'; import { IImportEntityResult, ImportEntityDialog, ImportEntityType } from 'src/app/modules/common/import-entity-dialog/import-entity-dialog.component'; -import { MatLegacyDialog as MatDialog } from '@angular/material/legacy-dialog'; +// import { MatLegacyDialog as MatDialog } from '@angular/material/legacy-dialog'; @Component({ selector: 'app-record-controller', @@ -42,8 +42,8 @@ export class RecordControllerComponent implements OnInit { private dialogService: DialogService, private recordService: RecordService, private router: Router, - private dialog: MatDialog - + // private dialog: MatDialog + private dialog: DialogService, ) { this._showActions = (localStorage.getItem('SHOW_RECORD_ACTIONS') || 'true') === 'true'; this._overlay = localStorage.getItem('HIDE_RECORD_OVERLAY'); @@ -400,15 +400,18 @@ export class RecordControllerComponent implements OnInit { public showResult() { this._resultDialog = this.dialog.open(RecordResultDialog, { width: '700px', - panelClass: 'g-dialog', - autoFocus: false, - disableClose: true, + // panelClass: 'g-dialog', + // autoFocus: false, + // disableClose: true, + styleClass: 'g-dialog', + modal: true, + closable: false, data: { recordId: this.recordId, policyId: this.policyId } }); - this._resultDialog.afterClosed().subscribe(async (result: any) => { + this._resultDialog.onClose.subscribe(async (result: any) => { if (result === 'Details') { this.router.navigate(['/record-results'], { queryParams: { @@ -433,9 +436,11 @@ export class RecordControllerComponent implements OnInit { submitButton: 'Continue', cancelButton: 'Cancel' }, - disableClose: true, + // disableClose: true, + modal: true, + closable: false, }); - dialogRef.afterClosed().subscribe(result => { + dialogRef.onClose.subscribe(result => { if (result) { this.overlay = this.recordId; } diff --git a/frontend/src/app/modules/policy-engine/record/record-result-dialog/record-result-dialog.component.ts b/frontend/src/app/modules/policy-engine/record/record-result-dialog/record-result-dialog.component.ts index 0dc6a7bb7a..2908c820ee 100644 --- a/frontend/src/app/modules/policy-engine/record/record-result-dialog/record-result-dialog.component.ts +++ b/frontend/src/app/modules/policy-engine/record/record-result-dialog/record-result-dialog.component.ts @@ -1,8 +1,8 @@ -import { Component, Inject } from '@angular/core'; -import { MatLegacyDialogRef as MatDialogRef, MAT_LEGACY_DIALOG_DATA as MAT_DIALOG_DATA, MatLegacyDialog as MatDialog } from '@angular/material/legacy-dialog'; -import { VCViewerDialog } from 'src/app/modules/schema-engine/vc-dialog/vc-dialog.component'; -import { RecordService } from 'src/app/services/record.service'; -import { DialogService } from 'primeng/dynamicdialog'; +import {Component, Inject} from '@angular/core'; +// import { MatLegacyDialogRef as MatDialogRef, MAT_LEGACY_DIALOG_DATA as MAT_DIALOG_DATA, MatLegacyDialog as MatDialog } from '@angular/material/legacy-dialog'; +import {VCViewerDialog} from 'src/app/modules/schema-engine/vc-dialog/vc-dialog.component'; +import {RecordService} from 'src/app/services/record.service'; +import {DialogService, DynamicDialogConfig, DynamicDialogRef} from 'primeng/dynamicdialog'; /** * Dialog for creating theme. @@ -24,11 +24,15 @@ export class RecordResultDialog { public info: any; constructor( - public dialog: MatDialog, - public dialogRef: MatDialogRef, - private dialogService: DialogService, + // public dialog: MatDialog, + // public dialogRef: MatDialogRef, private recordService: RecordService, - @Inject(MAT_DIALOG_DATA) public data: any) { + // @Inject(MAT_DIALOG_DATA) public data: any + public dialogService: DialogService, + public dialogRef: DynamicDialogRef, + public config: DynamicDialogConfig + ) { + const data = this.config.data this.title = 'Playback completed'; this.text = 'Playback completed'; @@ -83,7 +87,8 @@ export class RecordResultDialog { type: 'JSON', } }); - dialogRef.onClose.subscribe(async (result) => {}); + dialogRef.onClose.subscribe(async (result) => { + }); } onDetails(): void { diff --git a/frontend/src/app/modules/policy-engine/services/wizard.service.ts b/frontend/src/app/modules/policy-engine/services/wizard.service.ts index bcc1b34656..e5727fbc48 100644 --- a/frontend/src/app/modules/policy-engine/services/wizard.service.ts +++ b/frontend/src/app/modules/policy-engine/services/wizard.service.ts @@ -1,13 +1,13 @@ -import { Injectable } from '@angular/core'; -import { HttpClient } from '@angular/common/http'; -import { Observable } from 'rxjs'; -import { API_BASE_URL } from '../../../services/api'; -import { IWizardConfig, Schema, Token } from '@guardian/interfaces'; -import { SelectorDialogComponent } from '../../common/selector-dialog/selector-dialog.component'; -import { MatLegacyDialog as MatDialog } from '@angular/material/legacy-dialog'; -import { ConfirmationDialogComponent } from '../../common/confirmation-dialog/confirmation-dialog.component'; -import { PolicyWizardDialogComponent } from '../dialogs/policy-wizard-dialog/policy-wizard-dialog.component'; -import { DialogService } from 'primeng/dynamicdialog'; +import {Injectable} from '@angular/core'; +import {HttpClient} from '@angular/common/http'; +import {Observable} from 'rxjs'; +import {API_BASE_URL} from '../../../services/api'; +import {IWizardConfig, Schema, Token} from '@guardian/interfaces'; +import {SelectorDialogComponent} from '../../common/selector-dialog/selector-dialog.component'; +// import { MatLegacyDialog as MatDialog } from '@angular/material/legacy-dialog'; +import {ConfirmationDialogComponent} from '../../common/confirmation-dialog/confirmation-dialog.component'; +import {PolicyWizardDialogComponent} from '../dialogs/policy-wizard-dialog/policy-wizard-dialog.component'; +import {DialogService} from 'primeng/dynamicdialog'; export enum WizardMode { CREATE = 'CREATE', @@ -21,7 +21,11 @@ export enum WizardMode { export class WizardService { private readonly url: string = `${API_BASE_URL}/wizard`; - constructor(private http: HttpClient, private dialog: MatDialog, private dialogService: DialogService,) { + constructor( + private http: HttpClient, + private dialog: DialogService, + private dialogService: DialogService + ) { } public createPolicyAsync( @@ -89,10 +93,12 @@ export class WizardService { dialogTitle: 'Save progress', dialogText: 'Do you want to save progress?', }, - disableClose: true, + // disableClose: true, + modal: true, + closable: false, }); - dialogRef.afterClosed().subscribe((saveState) => { - callback(Object.assign(value, { saveState })); + dialogRef.onClose.subscribe((saveState) => { + callback(Object.assign(value, {saveState})); }); } @@ -199,9 +205,11 @@ export class WizardService { }, ].concat(options), }, - disableClose: true, + // disableClose: true, + modal: true, + closable: false, }); - selectorDialog.afterClosed().subscribe((value) => { + selectorDialog.onClose.subscribe((value) => { if (!value?.ok) { return; } diff --git a/frontend/src/app/modules/policy-engine/tools-list/tools-list.component.ts b/frontend/src/app/modules/policy-engine/tools-list/tools-list.component.ts index 9ab0c5ea43..2b1824ee73 100644 --- a/frontend/src/app/modules/policy-engine/tools-list/tools-list.component.ts +++ b/frontend/src/app/modules/policy-engine/tools-list/tools-list.component.ts @@ -1,5 +1,5 @@ import { Component, OnDestroy, OnInit } from '@angular/core'; -import { MatLegacyDialog as MatDialog } from '@angular/material/legacy-dialog'; +// import { MatLegacyDialog as MatDialog } from '@angular/material/legacy-dialog'; import { Router } from '@angular/router'; import { GenerateUUIDv4, IUser, SchemaHelper, TagType, UserPermissions } from '@guardian/interfaces'; import { forkJoin } from 'rxjs'; @@ -62,7 +62,7 @@ export class ToolsListComponent implements OnInit, OnDestroy { public tagsService: TagsService, private profileService: ProfileService, private toolsService: ToolsService, - private dialog: MatDialog, + private dialog: DialogService, private dialogService: DialogService, private informService: InformService, private router: Router, @@ -301,10 +301,12 @@ export class ToolsListComponent implements OnInit, OnDestroy { dialogTitle: 'Delete tool', dialogText: 'Are you sure to delete tool?' }, - disableClose: true, - autoFocus: false + // disableClose: true, + // autoFocus: false + modal: true, + closable: false, }); - dialogRef.afterClosed().subscribe((result) => { + dialogRef.onClose.subscribe((result) => { if (!result) { return; } diff --git a/frontend/src/app/modules/schema-engine/copy-schema-dialog/copy-schema-dialog.ts b/frontend/src/app/modules/schema-engine/copy-schema-dialog/copy-schema-dialog.ts index 5dd86f864f..e009378925 100644 --- a/frontend/src/app/modules/schema-engine/copy-schema-dialog/copy-schema-dialog.ts +++ b/frontend/src/app/modules/schema-engine/copy-schema-dialog/copy-schema-dialog.ts @@ -1,10 +1,11 @@ import { ChangeDetectorRef, Component, Inject, ViewChild } from '@angular/core'; -import { MAT_LEGACY_DIALOG_DATA as MAT_DIALOG_DATA, MatLegacyDialogRef as MatDialogRef } from '@angular/material/legacy-dialog'; +// import { MAT_LEGACY_DIALOG_DATA as MAT_DIALOG_DATA, MatLegacyDialogRef as MatDialogRef } from '@angular/material/legacy-dialog'; import { SchemaConfigurationComponent } from '../schema-configuration/schema-configuration.component'; import { Schema } from '@guardian/interfaces'; import { CdkDragDrop, moveItemInArray } from '@angular/cdk/drag-drop'; import { UntypedFormBuilder, UntypedFormGroup } from '@angular/forms'; -import { SchemaService } from '../../../services/schema.service'; +import {DynamicDialogConfig, DynamicDialogRef} from 'primeng/dynamicdialog'; +// import { SchemaService } from '../../../services/schema.service'; enum SchemaType { System = 'system', @@ -42,11 +43,15 @@ export class CopySchemaDialog { public dataForm!: UntypedFormGroup; constructor( - public dialogRef: MatDialogRef, + // public dialogRef: MatDialogRef, private cdr: ChangeDetectorRef, private fb: UntypedFormBuilder, - @Inject(MAT_DIALOG_DATA) public data: any + // @Inject(MAT_DIALOG_DATA) public data: any + public dialogRef: DynamicDialogRef, + public config: DynamicDialogConfig ) { + const data = this.config.data + this.scheme = data.scheme || null; this.type = data.type || null; this.topicId = data.topicId || null; diff --git a/frontend/src/app/modules/schema-engine/schema-field-configuration/schema-field-configuration.component.ts b/frontend/src/app/modules/schema-engine/schema-field-configuration/schema-field-configuration.component.ts index 71c2f6e2d6..94e2adf15b 100644 --- a/frontend/src/app/modules/schema-engine/schema-field-configuration/schema-field-configuration.component.ts +++ b/frontend/src/app/modules/schema-engine/schema-field-configuration/schema-field-configuration.component.ts @@ -1,6 +1,6 @@ import { ChangeDetectorRef, Component, EventEmitter, Input, OnDestroy, OnInit, Output, SimpleChanges } from '@angular/core'; import { AbstractControl, UntypedFormControl, UntypedFormGroup, Validators, } from '@angular/forms'; -import { MatLegacyDialog as MatDialog } from '@angular/material/legacy-dialog'; +// import { MatLegacyDialog as MatDialog } from '@angular/material/legacy-dialog'; import { SchemaField, UnitSystem } from '@guardian/interfaces'; import { ToastrService } from 'ngx-toastr'; import { IPFS_SCHEMA } from 'src/app/services/api'; @@ -83,7 +83,7 @@ export class SchemaFieldConfigurationComponent implements OnInit, OnDestroy { private _sd?: any; constructor( - public dialog: MatDialog, + public dialog: DialogService, private dialogService: DialogService, private ipfs: IPFSService, private toastr: ToastrService, @@ -447,16 +447,19 @@ export class SchemaFieldConfigurationComponent implements OnInit, OnDestroy { onEditExpression() { const dialogRef = this.dialog.open(CodeEditorDialogComponent, { width: '80%', - panelClass: 'g-dialog', + // panelClass: 'g-dialog', data: { mode: 'json', expression: this.field.expression.value, readonly: this.readonly }, - autoFocus: true, - disableClose: true + // autoFocus: true, + // disableClose: true + styleClass: 'g-dialog', + modal: true, + closable: false, }) - dialogRef.afterClosed().subscribe(result => { + dialogRef.onClose.subscribe(result => { if (result) { this.field.expression.patchValue(result.expression); } diff --git a/frontend/src/app/modules/schema-engine/schema-form-dialog/schema-form-dialog.component.ts b/frontend/src/app/modules/schema-engine/schema-form-dialog/schema-form-dialog.component.ts index 32aa8de856..4811a94404 100644 --- a/frontend/src/app/modules/schema-engine/schema-form-dialog/schema-form-dialog.component.ts +++ b/frontend/src/app/modules/schema-engine/schema-form-dialog/schema-form-dialog.component.ts @@ -1,8 +1,10 @@ import { Component, Inject } from '@angular/core'; -import { MAT_LEGACY_DIALOG_DATA as MAT_DIALOG_DATA, MatLegacyDialogRef as MatDialogRef } from '@angular/material/legacy-dialog'; +// import { MAT_LEGACY_DIALOG_DATA as MAT_DIALOG_DATA, MatLegacyDialogRef as MatDialogRef } from '@angular/material/legacy-dialog'; import { DocumentGenerator, Schema } from '@guardian/interfaces'; import { UntypedFormBuilder, UntypedFormGroup } from '@angular/forms'; import { SchemaService } from '../../../services/schema.service'; +import {DynamicDialogConfig, DynamicDialogRef} from 'primeng/dynamicdialog'; + /** * Dialog for creating and editing schemas. @@ -23,11 +25,15 @@ export class SchemaFormDialog { public category: string; constructor( - public dialogRef: MatDialogRef, + // public dialogRef: MatDialogRef, + // @Inject(MAT_DIALOG_DATA) public data: any, + private dialogRef: DynamicDialogRef, + private config: DynamicDialogConfig, private fb: UntypedFormBuilder, private schemaService: SchemaService, - @Inject(MAT_DIALOG_DATA) public data: any ) { + const data = this.config.data + this.schema = data.schema || null; this.example = data.example || false; this.dataForm = fb.group({}); diff --git a/frontend/src/app/modules/schema-engine/schema-tree/schema-tree.component.ts b/frontend/src/app/modules/schema-engine/schema-tree/schema-tree.component.ts index 0c52216e2d..584f34303b 100644 --- a/frontend/src/app/modules/schema-engine/schema-tree/schema-tree.component.ts +++ b/frontend/src/app/modules/schema-engine/schema-tree/schema-tree.component.ts @@ -6,8 +6,9 @@ import { ElementRef, HostListener, } from '@angular/core'; -import { MAT_LEGACY_DIALOG_DATA as MAT_DIALOG_DATA, MatLegacyDialogRef as MatDialogRef } from '@angular/material/legacy-dialog'; +// import { MAT_LEGACY_DIALOG_DATA as MAT_DIALOG_DATA, MatLegacyDialogRef as MatDialogRef } from '@angular/material/legacy-dialog'; import { SchemaService } from 'src/app/services/schema.service'; +import {DynamicDialogConfig, DynamicDialogRef} from 'primeng/dynamicdialog'; @Component({ selector: 'app-schema-tree', @@ -34,15 +35,21 @@ export class SchemaTreeComponent implements OnInit { loading = false; isMoving: boolean = false; + schema: { id: string; name: string } + constructor( - public dialogRef: MatDialogRef, - @Inject(MAT_DIALOG_DATA) - public schema: { - id: string; - name: string; - }, + // public dialogRef: MatDialogRef, + // @Inject(MAT_DIALOG_DATA) + public dialogRef: DynamicDialogRef, + public config: DynamicDialogConfig, + // public schema: { + // id: string; + // name: string; + // }, private schemaService: SchemaService - ) {} + ) { + this.schema = this.config.data.schema; + } ngOnInit(): void { this._ctx = this.canvas.nativeElement.getContext('2d') as any; diff --git a/frontend/src/app/modules/schema-engine/schema-view-dialog/schema-view-dialog.component.ts b/frontend/src/app/modules/schema-engine/schema-view-dialog/schema-view-dialog.component.ts index 16e4c99bf8..b6a29ea526 100644 --- a/frontend/src/app/modules/schema-engine/schema-view-dialog/schema-view-dialog.component.ts +++ b/frontend/src/app/modules/schema-engine/schema-view-dialog/schema-view-dialog.component.ts @@ -1,5 +1,7 @@ -import { Component, Inject } from '@angular/core'; -import { MatLegacyDialogRef as MatDialogRef, MAT_LEGACY_DIALOG_DATA as MAT_DIALOG_DATA } from '@angular/material/legacy-dialog'; +import {Component, Inject} from '@angular/core'; +import {DynamicDialogConfig, DynamicDialogRef} from 'primeng/dynamicdialog'; + +// import { MatLegacyDialogRef as MatDialogRef, MAT_LEGACY_DIALOG_DATA as MAT_DIALOG_DATA } from '@angular/material/legacy-dialog'; /** * Dialog for preview schema. @@ -20,11 +22,16 @@ export class SchemaViewDialog { schemaType: string; constructor( - public dialogRef: MatDialogRef, - @Inject(MAT_DIALOG_DATA) public data: any) { - this.schemas = this.data.schemas || []; - this.topicId = this.data.topicId || null; - this.errors = this.data.errors || []; + // public dialogRef: MatDialogRef, + // @Inject(MAT_DIALOG_DATA) public data: any + private dialogRef: DynamicDialogRef, + private config: DynamicDialogConfig, + ) { + const data = this.config.data + + this.schemas = data.schemas || []; + this.topicId = data.topicId || null; + this.errors = data.errors || []; this.schemaType = data.schemaType || 'policy'; this.policies = data.policies || []; @@ -41,10 +48,10 @@ export class SchemaViewDialog { } onImport() { - this.dialogRef.close({ topicId: this.topicId }); + this.dialogRef.close({topicId: this.topicId}); } onNewVersionClick(messageId: string) { - this.dialogRef.close({ messageId }); + this.dialogRef.close({messageId}); } } diff --git a/frontend/src/app/modules/schema-engine/set-version-dialog/set-version-dialog.component.ts b/frontend/src/app/modules/schema-engine/set-version-dialog/set-version-dialog.component.ts index 61349901b8..3650114dad 100644 --- a/frontend/src/app/modules/schema-engine/set-version-dialog/set-version-dialog.component.ts +++ b/frontend/src/app/modules/schema-engine/set-version-dialog/set-version-dialog.component.ts @@ -1,6 +1,7 @@ import { Component, Inject } from '@angular/core'; import { UntypedFormControl, Validators } from '@angular/forms'; -import { MatLegacyDialogRef as MatDialogRef, MAT_LEGACY_DIALOG_DATA as MAT_DIALOG_DATA } from '@angular/material/legacy-dialog'; +import {DynamicDialogConfig, DynamicDialogRef} from 'primeng/dynamicdialog'; +// import { MatLegacyDialogRef as MatDialogRef, MAT_LEGACY_DIALOG_DATA as MAT_DIALOG_DATA } from '@angular/material/legacy-dialog'; /** * Dialog allowing you to select a file and load schemas. @@ -17,8 +18,10 @@ export class SetVersionDialog { ]); constructor( - public dialogRef: MatDialogRef, - @Inject(MAT_DIALOG_DATA) public data: any + // public dialogRef: MatDialogRef, + // @Inject(MAT_DIALOG_DATA) public data: any + public dialogRef: DynamicDialogRef, + public config: DynamicDialogConfig ) { console.log(3); } diff --git a/frontend/src/app/modules/tag-engine/tags-explorer/tags-explorer.component.ts b/frontend/src/app/modules/tag-engine/tags-explorer/tags-explorer.component.ts index 71711cc3b1..06ea8fb939 100644 --- a/frontend/src/app/modules/tag-engine/tags-explorer/tags-explorer.component.ts +++ b/frontend/src/app/modules/tag-engine/tags-explorer/tags-explorer.component.ts @@ -1,5 +1,5 @@ import { Component, Input, SimpleChanges } from '@angular/core'; -import { MatLegacyDialog as MatDialog } from '@angular/material/legacy-dialog'; +// import { MatLegacyDialog as MatDialog } from '@angular/material/legacy-dialog'; import { TagsService } from 'src/app/services/tag.service'; import { TagCreateDialog } from '../tags-create-dialog/tags-create-dialog.component'; import { TagsExplorerDialog } from '../tags-explorer-dialog/tags-explorer-dialog.component'; diff --git a/frontend/src/app/utils/mobile-utils.ts b/frontend/src/app/utils/mobile-utils.ts index 3dcbe672f4..5c9b0d755b 100644 --- a/frontend/src/app/utils/mobile-utils.ts +++ b/frontend/src/app/utils/mobile-utils.ts @@ -1,6 +1,9 @@ -import { MatLegacyDialogConfig as MatDialogConfig } from "@angular/material/legacy-dialog"; +// import { MatLegacyDialogConfig as MatDialogConfig } from "@angular/material/legacy-dialog"; +import { DynamicDialogConfig } from 'primeng/dynamicdialog'; -export function mobileDialog(config: MatDialogConfig): MatDialogConfig { +export function mobileDialog( + config: DynamicDialogConfig +): DynamicDialogConfig { const innerWidth = window.innerWidth; const innerHeight = window.innerHeight; if (innerWidth <= 810) { @@ -19,4 +22,4 @@ export function mobileDialog(config: MatDialogConfig): MatDialogConfig }); } return config; -} \ No newline at end of file +} diff --git a/frontend/src/app/views/audit/audit.component.ts b/frontend/src/app/views/audit/audit.component.ts index c798d13d43..022e28b8fa 100644 --- a/frontend/src/app/views/audit/audit.component.ts +++ b/frontend/src/app/views/audit/audit.component.ts @@ -1,5 +1,5 @@ import { Component, OnInit } from '@angular/core'; -import { MatLegacyDialog as MatDialog } from '@angular/material/legacy-dialog'; +// import { MatLegacyDialog as MatDialog } from '@angular/material/legacy-dialog'; import { ActivatedRoute, Router } from '@angular/router'; import { AuditService } from '../../services/audit.service'; import { AuthService } from '../../services/auth.service'; @@ -45,7 +45,7 @@ export class AuditComponent implements OnInit { private route: ActivatedRoute, private router: Router, private policyEngineService: PolicyEngineService, - public dialog: MatDialog, + // public dialog: MatDialog, private dialogService: DialogService, ) { this.dataCount = 0; diff --git a/frontend/src/app/views/branding/branding.component.ts b/frontend/src/app/views/branding/branding.component.ts index 7465f9824f..f9b906294f 100644 --- a/frontend/src/app/views/branding/branding.component.ts +++ b/frontend/src/app/views/branding/branding.component.ts @@ -4,7 +4,7 @@ import { Router } from '@angular/router'; import { HttpClient } from '@angular/common/http'; import { InformService } from 'src/app/services/inform.service'; import { BrandingPayload, BrandingService } from 'src/app/services/branding.service'; -import { MatLegacyDialog as MatDialog } from '@angular/material/legacy-dialog'; +// import { MatLegacyDialog as MatDialog } from '@angular/material/legacy-dialog'; import { colorToGradient } from '../../static/color-remoter.function'; import { Subscription } from 'rxjs'; @@ -65,7 +65,6 @@ export class BrandingComponent implements OnInit, OnDestroy{ private http: HttpClient, private informService: InformService, private brandingService: BrandingService, - private dialog: MatDialog ) { this.fontControl.valueChanges.subscribe((value) => { this.selectedFont = this.fonts.find(font => font.value === value); diff --git a/frontend/src/app/views/header/header.component.ts b/frontend/src/app/views/header/header.component.ts index 3fc3e3d897..716d99d758 100644 --- a/frontend/src/app/views/header/header.component.ts +++ b/frontend/src/app/views/header/header.component.ts @@ -1,5 +1,5 @@ import { Component, OnInit } from '@angular/core'; -import { MatLegacyDialog as MatDialog } from '@angular/material/legacy-dialog'; +// import { MatLegacyDialog as MatDialog } from '@angular/material/legacy-dialog'; import { NavigationEnd, Router } from '@angular/router'; import { IUser } from '@guardian/interfaces'; import { Observable } from 'rxjs'; @@ -45,7 +45,7 @@ export class HeaderComponent implements OnInit { public auth: AuthService, public otherService: DemoService, public router: Router, - public dialog: MatDialog, + // public dialog: MatDialog, public profileService: ProfileService, public webSocketService: WebSocketService, public headerProps: HeaderPropsService diff --git a/frontend/src/app/views/login/login.component.ts b/frontend/src/app/views/login/login.component.ts index 7d2b147c8c..2f24d36635 100644 --- a/frontend/src/app/views/login/login.component.ts +++ b/frontend/src/app/views/login/login.component.ts @@ -7,13 +7,13 @@ import { AuthStateService } from 'src/app/services/auth-state.service'; import { Observable, Subject, Subscription } from 'rxjs'; import { noWhitespaceValidator } from 'src/app/validators/no-whitespace-validator'; import { WebSocketService } from 'src/app/services/web-socket.service'; -import { MatLegacyDialog as MatDialog, MatLegacyDialogRef as MatDialogRef } from '@angular/material/legacy-dialog'; +// import { MatLegacyDialog as MatDialog, MatLegacyDialogRef as MatDialogRef } from '@angular/material/legacy-dialog'; import { QrCodeDialogComponent } from 'src/app/components/qr-code-dialog/qr-code-dialog.component'; import { MeecoVCSubmitDialogComponent } from 'src/app/components/meeco-vc-submit-dialog/meeco-vc-submit-dialog.component'; import { environment } from 'src/environments/environment'; import { takeUntil } from 'rxjs/operators'; import { BrandingService } from '../../services/branding.service'; -import { DialogService } from 'primeng/dynamicdialog'; +import {DialogService, DynamicDialogRef} from 'primeng/dynamicdialog'; import { AccountTypeSelectorDialogComponent } from './register-dialogs/account-type-selector-dialog/account-type-selector-dialog.component'; import { ForgotPasswordDialogComponent } from './forgot-password-dialog/forgot-password-dialog.component'; import { RegisterDialogComponent } from './register-dialogs/register-dialog/register-dialog.component'; @@ -46,8 +46,10 @@ export class LoginComponent implements OnInit, OnDestroy { }); initialMeecoBtnTitle: string = 'Meeco Login'; meecoBtnTitle: string = this.initialMeecoBtnTitle; - qrCodeDialogRef: MatDialogRef | null = null; - vcSubmitDialogRef: MatDialogRef | null = null; + // qrCodeDialogRef: MatDialogRef | null = null; + // vcSubmitDialogRef: MatDialogRef | null = null; + qrCodeDialogRef: DynamicDialogRef | null = null; + vcSubmitDialogRef: DynamicDialogRef | null = null; currentMeecoRequestId: string | null = null; private _subscriptions: Subscription[] = []; @@ -65,7 +67,7 @@ export class LoginComponent implements OnInit, OnDestroy { private auth: AuthService, private router: Router, private wsService: WebSocketService, - private dialog: MatDialog, + private dialog: DialogService, private brandingService: BrandingService, private dialogService: DialogService, ) { @@ -305,7 +307,6 @@ export class LoginComponent implements OnInit, OnDestroy { }); } - private handleMeecoVPVerification(): void { this.wsService.meecoVerifyVP$.pipe(takeUntil(this.destroy$)).subscribe((event) => { this.qrCodeDialogRef?.close(); @@ -319,8 +320,10 @@ export class LoginComponent implements OnInit, OnDestroy { MeecoVCSubmitDialogComponent, { width: '750px', - disableClose: true, - autoFocus: false, + // disableClose: true, + // autoFocus: false, + modal: true, + closable: false, data: { document: event.vc, presentationRequestId: @@ -331,9 +334,13 @@ export class LoginComponent implements OnInit, OnDestroy { } ); - this.vcSubmitDialogRef - .afterClosed() - .subscribe(() => (this.vcSubmitDialogRef = null)); + // this.vcSubmitDialogRef + // .afterClosed() + // .subscribe(() => (this.vcSubmitDialogRef = null)); + + this.vcSubmitDialogRef.onClose.subscribe(() => { + this.vcSubmitDialogRef = null; + }); } }); } @@ -342,16 +349,24 @@ export class LoginComponent implements OnInit, OnDestroy { this.wsService.meecoPresentVP$.pipe(takeUntil(this.destroy$)).subscribe((event) => { if (!this.qrCodeDialogRef) { this.qrCodeDialogRef = this.dialog.open(QrCodeDialogComponent, { - panelClass: 'g-dialog', - disableClose: true, - autoFocus: false, + // panelClass: 'g-dialog', + // disableClose: true, + // autoFocus: false, + styleClass: 'g-dialog', + modal: true, + closable: false, data: { qrCodeData: event.redirectUri, }, }); } - this.qrCodeDialogRef.beforeClosed().subscribe(() => { + // this.qrCodeDialogRef.beforeClosed().subscribe(() => { + // this.qrCodeDialogRef = null; + // this.meecoBtnTitle = this.initialMeecoBtnTitle; + // }); + + this.qrCodeDialogRef.onClose.subscribe(() => { this.qrCodeDialogRef = null; this.meecoBtnTitle = this.initialMeecoBtnTitle; }); diff --git a/frontend/src/app/views/new-header/new-header.component.ts b/frontend/src/app/views/new-header/new-header.component.ts index 7d6eeaa247..0409ef2bd2 100644 --- a/frontend/src/app/views/new-header/new-header.component.ts +++ b/frontend/src/app/views/new-header/new-header.component.ts @@ -5,7 +5,7 @@ import { AuthStateService } from '../../services/auth-state.service'; import { AuthService } from '../../services/auth.service'; import { DemoService } from '../../services/demo.service'; import { NavigationEnd, Router } from '@angular/router'; -import { MatLegacyDialog as MatDialog } from '@angular/material/legacy-dialog'; +// import { MatLegacyDialog as MatDialog } from '@angular/material/legacy-dialog'; import { ProfileService } from '../../services/profile.service'; import { WebSocketService } from '../../services/web-socket.service'; import { HeaderPropsService } from '../../services/header-props.service'; @@ -39,7 +39,7 @@ export class NewHeaderComponent implements OnInit { public auth: AuthService, public otherService: DemoService, public router: Router, - public dialog: MatDialog, + // public dialog: MatDialog, public profileService: ProfileService, public webSocketService: WebSocketService, public headerProps: HeaderPropsService, diff --git a/frontend/src/app/views/notifications/notifications.component.ts b/frontend/src/app/views/notifications/notifications.component.ts index 4d6fc0034d..163f04c0d7 100644 --- a/frontend/src/app/views/notifications/notifications.component.ts +++ b/frontend/src/app/views/notifications/notifications.component.ts @@ -1,5 +1,5 @@ import { Component, OnInit } from '@angular/core'; -import { MatLegacyDialog as MatDialog } from '@angular/material/legacy-dialog'; +// import { MatLegacyDialog as MatDialog } from '@angular/material/legacy-dialog'; import { HttpResponse } from '@angular/common/http'; import { NotificationService } from 'src/app/services/notify.service'; @@ -24,7 +24,7 @@ export class NotificationsComponent implements OnInit { constructor( private notificationService: NotificationService, - public dialog: MatDialog, + // public dialog: MatDialog, ) { this.pageIndex = 0; this.pageSize = 10; diff --git a/frontend/src/app/views/policy-search/policy-guided-search/policy-guided-search.component.ts b/frontend/src/app/views/policy-search/policy-guided-search/policy-guided-search.component.ts index 8e11a48580..0337d01bcd 100644 --- a/frontend/src/app/views/policy-search/policy-guided-search/policy-guided-search.component.ts +++ b/frontend/src/app/views/policy-search/policy-guided-search/policy-guided-search.component.ts @@ -1,6 +1,6 @@ import { Component, OnInit } from '@angular/core'; import { UntypedFormControl } from '@angular/forms'; -import { MatLegacyDialog as MatDialog } from '@angular/material/legacy-dialog'; +// import { MatLegacyDialog as MatDialog } from '@angular/material/legacy-dialog'; import { PolicyCategoryType } from '@guardian/interfaces'; import { debounceTime, distinctUntilChanged } from 'rxjs/operators'; import { IPolicyCategory } from 'src/app/modules/policy-engine/structures'; @@ -40,7 +40,7 @@ export class PolicyGuidedSearchComponent implements OnInit { constructor( public tagsService: TagsService, - public dialog: MatDialog, + // public dialog: MatDialog, private policyEngineService: PolicyEngineService ) { } diff --git a/frontend/src/app/views/policy-search/policy-search.component.ts b/frontend/src/app/views/policy-search/policy-search.component.ts index 6a11b9664c..19ba0610df 100644 --- a/frontend/src/app/views/policy-search/policy-search.component.ts +++ b/frontend/src/app/views/policy-search/policy-search.component.ts @@ -1,5 +1,5 @@ import { Component, OnInit } from '@angular/core'; -import { MatLegacyDialog as MatDialog } from '@angular/material/legacy-dialog'; +// import { MatLegacyDialog as MatDialog } from '@angular/material/legacy-dialog'; import { ActivatedRoute, Router } from '@angular/router'; import { Subscription } from 'rxjs'; import { AuthService } from 'src/app/services/auth.service'; @@ -29,7 +29,7 @@ export class PolicySearchComponent implements OnInit { private auth: AuthService, private route: ActivatedRoute, private router: Router, - public dialog: MatDialog, + // public dialog: MatDialog, private headerProps: HeaderPropsService, private profileService: ProfileService, ) { diff --git a/frontend/src/app/views/roles/roles-view.component.ts b/frontend/src/app/views/roles/roles-view.component.ts index 4ca83d1bdd..7dedd1338c 100644 --- a/frontend/src/app/views/roles/roles-view.component.ts +++ b/frontend/src/app/views/roles/roles-view.component.ts @@ -1,14 +1,16 @@ -import { Component, OnDestroy, OnInit } from '@angular/core'; -import { PermissionsService } from '../../services/permissions.service'; -import { ProfileService } from '../../services/profile.service'; -import { UserPermissions } from '@guardian/interfaces'; -import { forkJoin } from 'rxjs'; -import { ActivatedRoute, Router } from '@angular/router'; -import { UntypedFormBuilder, UntypedFormControl, UntypedFormGroup, Validators } from '@angular/forms'; -import { CategoryGroup, EntityGroup, PermissionsGroup } from 'src/app/utils/index'; -import { ICategory, IEntity } from 'src/app/utils/permissions-interface'; -import { ConfirmationDialogComponent } from 'src/app/modules/common/confirmation-dialog/confirmation-dialog.component'; -import { MatLegacyDialog as MatDialog } from '@angular/material/legacy-dialog'; +import {Component, OnDestroy, OnInit} from '@angular/core'; +import {PermissionsService} from '../../services/permissions.service'; +import {ProfileService} from '../../services/profile.service'; +import {UserPermissions} from '@guardian/interfaces'; +import {forkJoin} from 'rxjs'; +import {ActivatedRoute, Router} from '@angular/router'; +import {UntypedFormBuilder, UntypedFormControl, UntypedFormGroup, Validators} from '@angular/forms'; +import {CategoryGroup, EntityGroup, PermissionsGroup} from 'src/app/utils/index'; +import {ICategory, IEntity} from 'src/app/utils/permissions-interface'; +import {ConfirmationDialogComponent} from 'src/app/modules/common/confirmation-dialog/confirmation-dialog.component'; +import {DialogService} from 'primeng/dynamicdialog'; + +// import { MatLegacyDialog as MatDialog } from '@angular/material/legacy-dialog'; @Component({ selector: 'app-roles-view', @@ -36,7 +38,8 @@ export class RolesViewComponent implements OnInit, OnDestroy { private route: ActivatedRoute, private router: Router, private fb: UntypedFormBuilder, - private dialog: MatDialog + // private dialog: MatDialog + private dialog: DialogService, ) { } @@ -129,10 +132,12 @@ export class RolesViewComponent implements OnInit, OnDestroy { dialogTitle: 'Delete role', dialogText: 'Are you sure to delete role?' }, - disableClose: true, - autoFocus: false + // disableClose: true, + // autoFocus: false + modal: true, + closable: false, }); - dialogRef.afterClosed().subscribe((result) => { + dialogRef.onClose.subscribe((result) => { if (!result) { return; } diff --git a/frontend/src/app/views/schemas/schemas.component.ts b/frontend/src/app/views/schemas/schemas.component.ts index bd1f52f0fd..7a26a1fcdd 100644 --- a/frontend/src/app/views/schemas/schemas.component.ts +++ b/frontend/src/app/views/schemas/schemas.component.ts @@ -1,5 +1,5 @@ import { Component, OnInit } from '@angular/core'; -import { MatLegacyDialog as MatDialog } from '@angular/material/legacy-dialog'; +// import { MatLegacyDialog as MatDialog } from '@angular/material/legacy-dialog'; import { HttpResponse } from '@angular/common/http'; import { ActivatedRoute, Router } from '@angular/router'; import { ISchema, IUser, Schema, SchemaCategory, SchemaHelper, SchemaStatus, TagType, UserPermissions } from '@guardian/interfaces'; @@ -133,7 +133,7 @@ export class SchemaConfigComponent implements OnInit { private projectComparisonService: ProjectComparisonService, private route: ActivatedRoute, private router: Router, - private dialog: MatDialog, + private dialog: DialogService, private dialogService: DialogService ) { this.readonlyByTopic = {}; @@ -952,11 +952,14 @@ export class SchemaConfigComponent implements OnInit { public onOpenForm(schema: Schema, example: boolean): void { const dialogRef = this.dialog.open(SchemaFormDialog, { width: '950px', - panelClass: 'g-dialog', - disableClose: true, + // panelClass: 'g-dialog', + // disableClose: true, data: { schema, example, category: this.getCategory() }, + styleClass: 'g-dialog', + modal: true, + closable: false, }); - dialogRef.afterClosed().subscribe(async ({ exampleDate, currentSchema }: { exampleDate: any, currentSchema: Schema }) => { + dialogRef.onClose.subscribe(async ({ exampleDate, currentSchema }: { exampleDate: any, currentSchema: Schema }) => { if (exampleDate && currentSchema) { schema.setExample(exampleDate); this.updateSchema(currentSchema.id, currentSchema); @@ -1044,10 +1047,12 @@ export class SchemaConfigComponent implements OnInit { dialogTitle: 'Delete schema', dialogText: 'Are you sure to delete schema?' }, - disableClose: true, - autoFocus: false + // disableClose: true, + // autoFocus: false + modal: true, + closable: false, }); - dialogRef.afterClosed().subscribe((result) => { + dialogRef.onClose.subscribe((result) => { if (!result) { return; } @@ -1132,8 +1137,11 @@ export class SchemaConfigComponent implements OnInit { delete newDocument.previousVersion; const dialogRef = this.dialog.open(CopySchemaDialog, { width: '950px', - panelClass: 'g-dialog', - disableClose: true, + // panelClass: 'g-dialog', + // disableClose: true, + styleClass: 'g-dialog', + modal: true, + closable: false, data: { type: 'new', topicId: this.currentTopic, @@ -1145,7 +1153,7 @@ export class SchemaConfigComponent implements OnInit { scheme: newDocument, } }); - dialogRef.afterClosed().subscribe(async (copyInfo: any | null) => { + dialogRef.onClose.subscribe(async (copyInfo: any | null) => { if (copyInfo) { this.schemaService.copySchema(copyInfo).subscribe((result) => { const { taskId } = result; @@ -1164,9 +1172,11 @@ export class SchemaConfigComponent implements OnInit { public onPublish(element: Schema): void { const dialogRef = this.dialog.open(SetVersionDialog, { width: '350px', - disableClose: true + // disableClose: true + modal: true, + closable: false, }); - dialogRef.afterClosed().subscribe(async (version) => { + dialogRef.onClose.subscribe(async (version) => { if (version) { this.publishSchema(element.id, version); } @@ -1198,8 +1208,11 @@ export class SchemaConfigComponent implements OnInit { const { type, data, schemas, errors } = result; const dialogRef = this.dialog.open(SchemaViewDialog, { width: '950px', - panelClass: 'g-dialog', - disableClose: true, + // panelClass: 'g-dialog', + // disableClose: true, + styleClass: 'g-dialog', + modal: true, + closable: false, data: { schemas: schemas, errors: errors, @@ -1210,7 +1223,7 @@ export class SchemaConfigComponent implements OnInit { tools: this.draftTools } }); - dialogRef.afterClosed().subscribe(async (result) => { + dialogRef.onClose.subscribe(async (result) => { if (result && result.messageId) { this.onImportSchemas(result.messageId); return; @@ -1290,7 +1303,7 @@ export class SchemaConfigComponent implements OnInit { public onViewSchemaTree(element: Schema): void { this.dialog.open(SchemaTreeComponent, { data: element, - autoFocus: false + // autoFocus: false }) } diff --git a/frontend/src/app/views/trust-chain/trust-chain.component.ts b/frontend/src/app/views/trust-chain/trust-chain.component.ts index cb701783da..95cc3be8a9 100644 --- a/frontend/src/app/views/trust-chain/trust-chain.component.ts +++ b/frontend/src/app/views/trust-chain/trust-chain.component.ts @@ -1,6 +1,6 @@ import { Component, OnInit } from '@angular/core'; import { UntypedFormBuilder, Validators } from '@angular/forms'; -import { MatLegacyDialog as MatDialog } from '@angular/material/legacy-dialog'; +// import { MatLegacyDialog as MatDialog } from '@angular/material/legacy-dialog'; import { MatIconRegistry } from '@angular/material/icon'; import { DomSanitizer } from '@angular/platform-browser'; import { ActivatedRoute, Router } from '@angular/router'; @@ -38,7 +38,7 @@ export class TrustChainComponent implements OnInit { private route: ActivatedRoute, private router: Router, private fb: UntypedFormBuilder, - public dialog: MatDialog, + // public dialog: MatDialog, private dialogService: DialogService, iconRegistry: MatIconRegistry, sanitizer: DomSanitizer diff --git a/frontend/src/app/views/user-profile/user-profile.component.ts b/frontend/src/app/views/user-profile/user-profile.component.ts index 05f89df85e..789fb2a22b 100644 --- a/frontend/src/app/views/user-profile/user-profile.component.ts +++ b/frontend/src/app/views/user-profile/user-profile.component.ts @@ -1,6 +1,6 @@ import { ChangeDetectorRef, Component, OnInit } from '@angular/core'; import { UntypedFormControl, UntypedFormGroup, Validators, } from '@angular/forms'; -import { MatLegacyDialog as MatDialog } from '@angular/material/legacy-dialog'; +// import { MatLegacyDialog as MatDialog } from '@angular/material/legacy-dialog'; import { forkJoin } from 'rxjs'; import { IPolicy, IStandardRegistryResponse, IUser, Schema, SchemaEntity, } from '@guardian/interfaces'; import { ActivatedRoute, Router } from '@angular/router'; @@ -116,7 +116,7 @@ export class UserProfileComponent implements OnInit { private taskService: TasksService, private route: ActivatedRoute, private router: Router, - public dialog: MatDialog, + // public dialog: MatDialog, public dialogService: DialogService, private headerProps: HeaderPropsService, private cdRef: ChangeDetectorRef diff --git a/frontend/src/app/views/worker-tasks/worker-tasks.component.ts b/frontend/src/app/views/worker-tasks/worker-tasks.component.ts index d0696aee31..887ccae491 100644 --- a/frontend/src/app/views/worker-tasks/worker-tasks.component.ts +++ b/frontend/src/app/views/worker-tasks/worker-tasks.component.ts @@ -1,5 +1,5 @@ import { Component, OnInit } from '@angular/core'; -import { MatLegacyDialog as MatDialog } from '@angular/material/legacy-dialog'; +// import { MatLegacyDialog as MatDialog } from '@angular/material/legacy-dialog'; import { HttpResponse } from '@angular/common/http'; import { WorkerTasksService } from '../../services/worker-tasks.service'; @@ -21,7 +21,7 @@ export class WorkerTasksComponent implements OnInit{ constructor( private tasksService: WorkerTasksService, - public dialog: MatDialog, + // public dialog: MatDialog, ) { this.pageIndex = 0; this.pageSize = 10; From bc4f360609a61c9a6e6c495758bab786dae45d22 Mon Sep 17 00:00:00 2001 From: Ihar Date: Fri, 15 Nov 2024 00:03:50 +0500 Subject: [PATCH 09/48] feat: move datepicker to calendar primeNg[3141] --- .../datetime-picker.component.html | 30 ++++++-- .../datetime-picker.component.ts | 34 +++++---- .../src/app/modules/common/material.module.ts | 7 +- .../cron-config-dialog.component.ts | 12 ++- .../schema-configuration.component.html | 73 +++++++++++++------ .../schema-configuration.component.ts | 15 ++-- .../sentinel-hub-type.component.html | 56 ++++++++++---- .../sentinel-hub-type.component.ts | 26 +++++-- 8 files changed, 180 insertions(+), 73 deletions(-) diff --git a/frontend/src/app/modules/common/datetime-picker/datetime-picker.component.html b/frontend/src/app/modules/common/datetime-picker/datetime-picker.component.html index 9ea35d951c..66f1ba4ec7 100644 --- a/frontend/src/app/modules/common/datetime-picker/datetime-picker.component.html +++ b/frontend/src/app/modules/common/datetime-picker/datetime-picker.component.html @@ -1,8 +1,24 @@ + + + + + + + + +
- - - -
\ No newline at end of file + + +
diff --git a/frontend/src/app/modules/common/datetime-picker/datetime-picker.component.ts b/frontend/src/app/modules/common/datetime-picker/datetime-picker.component.ts index 77c6c6a4af..08186f915a 100644 --- a/frontend/src/app/modules/common/datetime-picker/datetime-picker.component.ts +++ b/frontend/src/app/modules/common/datetime-picker/datetime-picker.component.ts @@ -1,8 +1,8 @@ import { Component, EventEmitter, Input, Output } from '@angular/core'; import * as moment from 'moment'; -import { NGX_MAT_DATE_FORMATS, NgxMatDateAdapter } from '@angular-material-components/datetime-picker'; -import { NgxMatMomentAdapter } from '@angular-material-components/moment-adapter'; -import { GUARDIAN_DATETIME_FORMAT } from '../../../utils/datetime-format'; +// import { NGX_MAT_DATE_FORMATS, NgxMatDateAdapter } from '@angular-material-components/datetime-picker'; +// import { NgxMatMomentAdapter } from '@angular-material-components/moment-adapter'; +// import { GUARDIAN_DATETIME_FORMAT } from '../../../utils/datetime-format'; /** * Dialog for icon preview. @@ -11,15 +11,16 @@ import { GUARDIAN_DATETIME_FORMAT } from '../../../utils/datetime-format'; selector: 'datetime-picker', templateUrl: './datetime-picker.component.html', styleUrls: ['./datetime-picker.component.css'], - providers: [ - { provide: NgxMatDateAdapter, useClass: NgxMatMomentAdapter }, - {provide: NGX_MAT_DATE_FORMATS, useValue: GUARDIAN_DATETIME_FORMAT} - ] + // providers: [ + // { provide: NgxMatDateAdapter, useClass: NgxMatMomentAdapter }, + // {provide: NGX_MAT_DATE_FORMATS, useValue: GUARDIAN_DATETIME_FORMAT} + // ] }) export class DatetimePicker { @Input() placeholder!: string; @Input() readonly!: boolean; - @Input() value!: string; + // @Input() value!: string; + @Input() value!: Date; @Input() format!: any; @Output() valueChange = new EventEmitter(); @@ -42,11 +43,18 @@ export class DatetimePicker { this.placeholder = this.placeholder || 'Choose a date & time'; } - onValue(event: any) { - this._currentValue = moment(event.value).utc().toISOString(); - if (this.value != this._currentValue) { - this.value = this._currentValue; - this.valueChange.emit(this._currentValue); + // onValue(event: any) { + // this._currentValue = moment(event.value).utc().toISOString(); + // if (this.value != this._currentValue) { + // this.value = this._currentValue; + // this.valueChange.emit(this._currentValue); + // } + // } + + onValue(event: Date) { + const utcValue = moment(event).utc().toISOString(); + if (this.value !== event) { + this.valueChange.emit(utcValue); } } } diff --git a/frontend/src/app/modules/common/material.module.ts b/frontend/src/app/modules/common/material.module.ts index 561840be8e..56bc57942d 100644 --- a/frontend/src/app/modules/common/material.module.ts +++ b/frontend/src/app/modules/common/material.module.ts @@ -38,6 +38,7 @@ import {AccordionModule} from 'primeng/accordion'; import {TableModule} from 'primeng/table'; import {ButtonModule} from 'primeng/button'; import {SelectButtonModule} from 'primeng/selectbutton'; +import {CalendarModule} from 'primeng/calendar'; @NgModule({ declarations: [], @@ -66,6 +67,8 @@ import {SelectButtonModule} from 'primeng/selectbutton'; // MatDialogModule, MatDatepickerModule, + CalendarModule, + MatRadioModule, MatNativeDateModule, MatProgressSpinnerModule, @@ -109,7 +112,9 @@ import {SelectButtonModule} from 'primeng/selectbutton'; // MatDialogModule, - MatDatepickerModule, + // MatDatepickerModule, + CalendarModule, + MatRadioModule, MatNativeDateModule, MatProgressSpinnerModule, diff --git a/frontend/src/app/modules/policy-engine/dialogs/cron-config-dialog/cron-config-dialog.component.ts b/frontend/src/app/modules/policy-engine/dialogs/cron-config-dialog/cron-config-dialog.component.ts index b0792836f6..83f29cb641 100644 --- a/frontend/src/app/modules/policy-engine/dialogs/cron-config-dialog/cron-config-dialog.component.ts +++ b/frontend/src/app/modules/policy-engine/dialogs/cron-config-dialog/cron-config-dialog.component.ts @@ -16,7 +16,8 @@ import {DynamicDialogConfig, DynamicDialogRef} from 'primeng/dynamicdialog'; export class CronConfigDialog { started = false; period: string; - startDate: string; + // startDate: string; + startDate: any; dataForm = this.fb.group({ mask: ['* * * * *', Validators.required], @@ -59,8 +60,15 @@ export class CronConfigDialog { ) { const data = this.config.data + if (data.startDate) { + this.startDate = new Date(data.startDate) as Date; + } else { + this.startDate =new Date() as Date; + } + this.period = 'week'; - this.startDate = data.startDate || (new Date).toISOString(); + // this.startDate = data.startDate || (new Date).toISOString(); + // this.startDate = this.startDate || new Date(); this.sd = moment(this.startDate).utc(); this.sd_local = this.sd.clone().local(); switch (this.sd.day()) { diff --git a/frontend/src/app/modules/schema-engine/schema-configuration/schema-configuration.component.html b/frontend/src/app/modules/schema-engine/schema-configuration/schema-configuration.component.html index 6f75694214..b8b000185f 100644 --- a/frontend/src/app/modules/schema-engine/schema-configuration/schema-configuration.component.html +++ b/frontend/src/app/modules/schema-engine/schema-configuration/schema-configuration.component.html @@ -204,43 +204,74 @@ />
+ + + + + + + + + + + + + + + + + + + + + Choose a date & time - - - + [showTime]="true" + [hourFormat]="'12'" + inputId="dateTimePicker" + placeholder="Choose a date & time" + appendTo="body" + > + + + + + + + + + + + + + + + + + + Choose a date - - - + inputId="dateTimePicker" + [showTime]="false" + placeholder="Choose a date" + appendTo="body" + >
diff --git a/frontend/src/app/modules/schema-engine/schema-configuration/schema-configuration.component.ts b/frontend/src/app/modules/schema-engine/schema-configuration/schema-configuration.component.ts index f010f7d60d..a4ed969062 100644 --- a/frontend/src/app/modules/schema-engine/schema-configuration/schema-configuration.component.ts +++ b/frontend/src/app/modules/schema-engine/schema-configuration/schema-configuration.component.ts @@ -1,5 +1,5 @@ -import { NGX_MAT_DATE_FORMATS, NgxMatDateAdapter } from '@angular-material-components/datetime-picker'; -import { NgxMatMomentAdapter } from '@angular-material-components/moment-adapter'; +// import { NGX_MAT_DATE_FORMATS, NgxMatDateAdapter } from '@angular-material-components/datetime-picker'; +// import { NgxMatMomentAdapter } from '@angular-material-components/moment-adapter'; import { Component, EventEmitter, Input, OnInit, Output, SimpleChanges, } from '@angular/core'; import { AbstractControl, UntypedFormBuilder, UntypedFormControl, UntypedFormGroup, ValidationErrors, ValidatorFn, Validators, } from '@angular/forms'; import { FieldTypesDictionary, Schema, SchemaCategory, SchemaCondition, SchemaEntity, SchemaField, UnitSystem, } from '@guardian/interfaces'; @@ -10,7 +10,7 @@ import { ConditionControl } from '../condition-control'; import { FieldControl } from '../field-control'; import { CdkDragDrop, moveItemInArray } from '@angular/cdk/drag-drop'; import { SchemaService } from 'src/app/services/schema.service'; -import { GUARDIAN_DATETIME_FORMAT } from '../../../utils/datetime-format'; +// import { GUARDIAN_DATETIME_FORMAT } from '../../../utils/datetime-format'; enum SchemaType { System = 'system', @@ -31,10 +31,10 @@ function NoBindingValidator(control: UntypedFormControl): ValidationErrors | nul selector: 'app-schema-configuration', templateUrl: './schema-configuration.component.html', styleUrls: ['./schema-configuration.component.scss'], - providers: [ - { provide: NgxMatDateAdapter, useClass: NgxMatMomentAdapter }, - {provide: NGX_MAT_DATE_FORMATS, useValue: GUARDIAN_DATETIME_FORMAT} - ] + // providers: [ + // { provide: NgxMatDateAdapter, useClass: NgxMatMomentAdapter }, + // {provide: NGX_MAT_DATE_FORMATS, useValue: GUARDIAN_DATETIME_FORMAT} + // ] }) export class SchemaConfigurationComponent implements OnInit { @Input('value') value!: Schema; @@ -68,6 +68,7 @@ export class SchemaConfigurationComponent implements OnInit { public schemaTypeMap!: any; public buildField!: (fieldConfig: FieldControl, data: any) => SchemaField; public destroy$: Subject = new Subject(); + public selectedDate: Date | null = null; private _patternByNumberType: any = { duration: /^[0-9]+$/, number: /^-?\d*(\.\d+)?$/, diff --git a/frontend/src/app/modules/schema-engine/sentinel-hub-type/sentinel-hub-type.component.html b/frontend/src/app/modules/schema-engine/sentinel-hub-type/sentinel-hub-type.component.html index b2172c88ca..5087945eed 100644 --- a/frontend/src/app/modules/schema-engine/sentinel-hub-type/sentinel-hub-type.component.html +++ b/frontend/src/app/modules/schema-engine/sentinel-hub-type/sentinel-hub-type.component.html @@ -25,18 +25,46 @@ - - From - - - - - - To - - - - + + + + + + + + + + + + + + + +
+ + From + + + +
+ +
+ + To + + + +
diff --git a/frontend/src/app/modules/schema-engine/sentinel-hub-type/sentinel-hub-type.component.ts b/frontend/src/app/modules/schema-engine/sentinel-hub-type/sentinel-hub-type.component.ts index dbfd753e59..5f6958062d 100644 --- a/frontend/src/app/modules/schema-engine/sentinel-hub-type/sentinel-hub-type.component.ts +++ b/frontend/src/app/modules/schema-engine/sentinel-hub-type/sentinel-hub-type.component.ts @@ -1,7 +1,7 @@ import { AfterViewInit, ChangeDetectorRef, Component, Input, OnChanges, OnInit, SimpleChanges } from '@angular/core'; import { UntypedFormControl, UntypedFormGroup, Validators } from '@angular/forms'; -import { NGX_MAT_DATE_FORMATS, NgxMatDateAdapter } from '@angular-material-components/datetime-picker'; -import { NgxMatMomentAdapter } from '@angular-material-components/moment-adapter'; +// import { NGX_MAT_DATE_FORMATS, NgxMatDateAdapter } from '@angular-material-components/datetime-picker'; +// import { NgxMatMomentAdapter } from '@angular-material-components/moment-adapter'; import { Subscription } from 'rxjs'; import { MapService } from '../../../services/map.service'; @@ -21,10 +21,10 @@ const MY_FORMATS = { selector: 'app-sentinel-hub-type', templateUrl: './sentinel-hub-type.component.html', styleUrls: ['./sentinel-hub-type.component.scss'], - providers: [ - {provide: NgxMatDateAdapter, useClass: NgxMatMomentAdapter}, - {provide: NGX_MAT_DATE_FORMATS, useValue: MY_FORMATS}, - ], + // providers: [ + // {provide: NgxMatDateAdapter, useClass: NgxMatMomentAdapter}, + // {provide: NGX_MAT_DATE_FORMATS, useValue: MY_FORMATS}, + // ], }) export class SentinelHubTypeComponent implements OnInit, OnChanges, AfterViewInit { public key: string; @@ -34,8 +34,10 @@ export class SentinelHubTypeComponent implements OnInit, OnChanges, AfterViewIni @Input('preset') presetDocument: any = null; @Input('disabled') isDisabled: boolean = false; public datePicker = new UntypedFormGroup({ - from: new UntypedFormControl(), - to: new UntypedFormControl() + // from: new UntypedFormControl(), + // to: new UntypedFormControl() + from: new UntypedFormControl(null, Validators.required), + to: new UntypedFormControl(null, Validators.required) }); protected readonly FormControl = UntypedFormControl; @@ -112,4 +114,12 @@ export class SentinelHubTypeComponent implements OnInit, OnChanges, AfterViewIni this.formattedImageLink = `https://services.sentinel-hub.com/ogc/wms/${this.key}?REQUEST=GetMap&BBOX=${value.bbox}&FORMAT=${value.format}&LAYERS=${value.layers}&MAXCC=${value.maxcc}&WIDTH=${value.width}&HEIGHT=${value.height}&TIME=${value.time}` } } + + get fromControl(): UntypedFormControl { + return this.datePicker.get('from') as UntypedFormControl; + } + + get toControl(): UntypedFormControl { + return this.datePicker.get('to') as UntypedFormControl; + } } From 3350b1bd56cc9c666ca46b4d3a8aed858b54a283 Mon Sep 17 00:00:00 2001 From: Ihar Date: Fri, 15 Nov 2024 14:04:39 +0500 Subject: [PATCH 10/48] feat: move radio buttons to prime ng[3141] --- .../src/app/modules/common/material.module.ts | 19 +- .../multi-policy-dialog.component.html | 132 +++++++++++--- .../external-topic-block.component.html | 29 ++- .../roles-block/roles-block.component.html | 99 ++++++++--- .../schema-configuration.component.html | 167 ++++++++++-------- .../app/views/roles/roles-view.component.html | 94 ++++++---- .../root-profile/root-profile.component.html | 35 +++- .../user-profile/user-profile.component.html | 38 +++- 8 files changed, 428 insertions(+), 185 deletions(-) diff --git a/frontend/src/app/modules/common/material.module.ts b/frontend/src/app/modules/common/material.module.ts index 56bc57942d..4df6fe03f6 100644 --- a/frontend/src/app/modules/common/material.module.ts +++ b/frontend/src/app/modules/common/material.module.ts @@ -39,6 +39,7 @@ import {TableModule} from 'primeng/table'; import {ButtonModule} from 'primeng/button'; import {SelectButtonModule} from 'primeng/selectbutton'; import {CalendarModule} from 'primeng/calendar'; +import {RadioButtonModule} from 'primeng/radiobutton'; @NgModule({ declarations: [], @@ -69,9 +70,14 @@ import {CalendarModule} from 'primeng/calendar'; MatDatepickerModule, CalendarModule, - MatRadioModule, - MatNativeDateModule, + // MatRadioModule, + RadioButtonModule, + + // MatNativeDateModule, + MatProgressSpinnerModule, + + MatToolbarModule, MatMenuModule, MatDividerModule, @@ -115,9 +121,14 @@ import {CalendarModule} from 'primeng/calendar'; // MatDatepickerModule, CalendarModule, - MatRadioModule, - MatNativeDateModule, + // MatRadioModule, + RadioButtonModule, + + // MatNativeDateModule, + MatProgressSpinnerModule, + + MatToolbarModule, MatMenuModule, MatDividerModule, diff --git a/frontend/src/app/modules/policy-engine/dialogs/multi-policy-dialog/multi-policy-dialog.component.html b/frontend/src/app/modules/policy-engine/dialogs/multi-policy-dialog/multi-policy-dialog.component.html index 38235f43b9..33f2919bd0 100644 --- a/frontend/src/app/modules/policy-engine/dialogs/multi-policy-dialog/multi-policy-dialog.component.html +++ b/frontend/src/app/modules/policy-engine/dialogs/multi-policy-dialog/multi-policy-dialog.component.html @@ -14,58 +14,132 @@
- + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
- - Create new multi policy - + + +
-
+
Type: Main Policy
Main Policy: - {{mainPolicyTopicId1}} + {{ mainPolicyTopicId1 }}
Topic for synchronization: - {{synchronizationTopicId1}} + {{ synchronizationTopicId1 }} +
+
+
- - Link - -
+
- - Join an existing policy - + + +
-
+
Type: Sub Policy
Main Policy: - {{mainPolicyTopicId2}} + {{ mainPolicyTopicId2 }}
Topic for synchronization: - {{synchronizationTopicId2}} + {{ synchronizationTopicId2 }} +
+
+
- - Link - -
- +
@@ -76,19 +150,19 @@
Type: - {{policyType}} Policy + {{ policyType }} Policy
Main Policy: - {{mainPolicyTopicId1}} + {{ mainPolicyTopicId1 }}
Topic for synchronization: - {{synchronizationTopicId1}} + {{ synchronizationTopicId1 }}
Current Policy: - {{instanceTopicId}} + {{ instanceTopicId }}
Link @@ -102,9 +176,9 @@
diff --git a/frontend/src/app/modules/policy-engine/policy-viewer/blocks/external-topic-block/external-topic-block.component.html b/frontend/src/app/modules/policy-engine/policy-viewer/blocks/external-topic-block/external-topic-block.component.html index 3ac696a5c2..6c29164bf0 100644 --- a/frontend/src/app/modules/policy-engine/policy-viewer/blocks/external-topic-block/external-topic-block.component.html +++ b/frontend/src/app/modules/policy-engine/policy-viewer/blocks/external-topic-block/external-topic-block.component.html @@ -74,11 +74,31 @@
Only documents conforming to the schema would be accepted into the system.
- + + + + + + + + + + + + + + + + +
- + +
{{ s.name }}
Need @@ -88,7 +108,8 @@
Verified
- +
+
diff --git a/frontend/src/app/modules/policy-engine/policy-viewer/blocks/roles-block/roles-block.component.html b/frontend/src/app/modules/policy-engine/policy-viewer/blocks/roles-block/roles-block.component.html index 5074795bf7..584b7cef13 100644 --- a/frontend/src/app/modules/policy-engine/policy-viewer/blocks/roles-block/roles-block.component.html +++ b/frontend/src/app/modules/policy-engine/policy-viewer/blocks/roles-block/roles-block.component.html @@ -17,17 +17,72 @@

{{ description }}

- + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
- Create new group - + + +
-
+
Group Template - {{group}} + {{ group }} @@ -38,26 +93,30 @@

{{ description }}

- - Accept invitation - + + +
-
+
Policy: - {{policyName}} + {{ policyName }}
Group: - {{groupName}} + {{ groupName }}
Label: - {{groupLabel}} + {{ groupLabel }}
Role: - {{inviteRole}} + {{ inviteRole }}
Invite @@ -65,7 +124,7 @@

{{ description }}

- +
@@ -78,12 +137,12 @@

{{ description }}

diff --git a/frontend/src/app/modules/schema-engine/schema-configuration/schema-configuration.component.html b/frontend/src/app/modules/schema-engine/schema-configuration/schema-configuration.component.html index b8b000185f..6cfccae002 100644 --- a/frontend/src/app/modules/schema-engine/schema-configuration/schema-configuration.component.html +++ b/frontend/src/app/modules/schema-engine/schema-configuration/schema-configuration.component.html @@ -104,25 +104,25 @@
@@ -130,7 +130,7 @@
- + Add Field
@@ -204,26 +204,26 @@ />
- - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
- - + True - - + + +
+
+ False - - + [formControl]="condition.fieldValue" + class="boolean-option"> + + +
@@ -328,7 +349,7 @@ (click)="onConditionFieldAdd(condition, 'then')" class="add-btn" > - + Add THEN Field
@@ -366,14 +387,14 @@
- + Add ELSE Field
- + Remove Condition
@@ -381,7 +402,7 @@
- + Add Condition
diff --git a/frontend/src/app/views/roles/roles-view.component.html b/frontend/src/app/views/roles/roles-view.component.html index 67df191532..89ee005c24 100644 --- a/frontend/src/app/views/roles/roles-view.component.html +++ b/frontend/src/app/views/roles/roles-view.component.html @@ -51,8 +51,8 @@ {{ row.name }} -
+
@@ -122,10 +122,10 @@
-
+
-
{{category.name}}
-
({{category.count}})
+
{{ category.name }}
+
({{ category.count }})
-
{{selectedCategory.name}}
+
{{ selectedCategory.name }}
@@ -154,7 +154,8 @@
- Role description is invalid + Role description is + invalid
@@ -163,23 +164,25 @@
ACTIONS
-
{{action}}
+
{{ action }} +
-
- {{entity.name}} + {{ entity.name }}
-
-
@@ -205,20 +208,33 @@
ACTIONS
-
{{action}}
+
{{ action }} +
- {{entity.name}} + {{ entity.name }}
+ + + + + + + +
- -
- -
-
+
+ + +
@@ -227,16 +243,16 @@
-
\ No newline at end of file +
diff --git a/frontend/src/app/views/root-profile/root-profile.component.html b/frontend/src/app/views/root-profile/root-profile.component.html index 72fff89048..d6658e190b 100644 --- a/frontend/src/app/views/root-profile/root-profile.component.html +++ b/frontend/src/app/views/root-profile/root-profile.component.html @@ -233,14 +233,33 @@

Profile

- - - Generate new DID document. - - - Custom DID document. - - + + + + + + + + + +
+ + + +
+
+ + + +
DID Document: diff --git a/frontend/src/app/views/user-profile/user-profile.component.html b/frontend/src/app/views/user-profile/user-profile.component.html index 743aabee7b..a531e7cdc9 100644 --- a/frontend/src/app/views/user-profile/user-profile.component.html +++ b/frontend/src/app/views/user-profile/user-profile.component.html @@ -293,14 +293,36 @@

Profile

- - - Generate new DID document. - - - Custom DID document. - - + + + + + + + + + +
+
+ + + +
+
+ + + +
+
+ DID Document: - + + + + +
+ +
diff --git a/frontend/src/app/modules/policy-engine/policy-viewer/blocks/messages-report-block/messages-report-block.component.html b/frontend/src/app/modules/policy-engine/policy-viewer/blocks/messages-report-block/messages-report-block.component.html index 84a2336702..1ed8d3033b 100644 --- a/frontend/src/app/modules/policy-engine/policy-viewer/blocks/messages-report-block/messages-report-block.component.html +++ b/frontend/src/app/modules/policy-engine/policy-viewer/blocks/messages-report-block/messages-report-block.component.html @@ -30,15 +30,36 @@
- - HASH/Message ID: - - - + + + + + + + + + + +
+
+ + HASH/Message ID: + + + +
+
@@ -46,14 +67,14 @@
Selected document:
-
{{target}}
+
{{ target }}
Clear
+ (valueChange)="onDashboardType($event)">
@@ -64,26 +85,26 @@
+ [style.paddingLeft.px]="topic.__offset">
+ [attr.selected]="topic.message && topic.message === selected" + [attr.readonly]="!topic.message">
- + - {{getTopicHeader(topic.message)}} + {{ getTopicHeader(topic.message) }}
- {{getTopicName(topic)}} + {{ getTopicName(topic) }}
-
{{topic.topicId}}
+
{{ topic.topicId }}
+ [style.height.px]="topic.__height" [style.left.px]="topic.__offset">
@@ -95,137 +116,140 @@
+ [style.gridTemplateColumns]="gridTemplateColumns">
+ [style.gridColumn]="message.__order">
+ [attr.selected]="message === selected">
- + - + Create policy
-
{{message.name}}
-
{{message.owner}}
+
{{ message.name }}
+
{{ message.owner }}
- + - + Publish policy
-
{{message.name}}
-
Version: {{message.version}}
+
{{ message.name }}
+
Version: {{ message.version }}
- + Registration
- {{message.__role}} + {{ message.__role }}
-
{{message.did}}
+
{{ message.did }}
- + - {{message.__status}} + {{ message.__status }}
- {{message.__schemaLabel}} + {{ message.__schemaLabel }}
-
{{message.__userName}}
+
{{ message.__userName }}
- + Mint token
-
{{message.__tokenName}} +
{{ message.__tokenName }}
-
{{message.__userName}}
+
{{ message.__userName }}
- + - + Mint confirmation
- Amount: {{message.__amount}} {{message.__token.symbol}} + Amount: {{ message.__amount }} {{ message.__token.symbol }}
-
{{message.__userName}}
+
{{ message.__userName }}
- + Roles & Groups
- Role: {{message.role}} + Role: {{ message.role }}
- Group: {{message.group}} + Group: {{ message.group }}
-
{{message.__issuer}}
+
{{ message.__issuer }}
+ [style.gridTemplateColumns]="gridTemplateColumns">
- {{message.__timestamp}} + [style.gridColumn]="message.__order"> + {{ message.__timestamp }}
- {{selected.topicId}} + {{ selected.topicId }} - {{selected.id}} + {{ selected.id }}
- +
@@ -233,7 +257,7 @@
- + Policy @@ -243,15 +267,15 @@
Policy name:
-
{{selected.name}}
+
{{ selected.name }}
Policy description:
-
{{selected.description}}
+
{{ selected.description }}
Policy creator:
-
{{selected.owner}}
+
{{ selected.owner }}
@@ -260,28 +284,31 @@
Topic ID:
{{selected.topicId}} + [params]="selected.topicId">{{ selected.topicId }} +
Message ID:
{{selected.id}} + [subParams]="selected.index">{{ selected.id }} +
Sender:
{{selected.payer}} + [params]="selected.payer">{{ selected.payer }} +
- + Instance policy @@ -291,19 +318,19 @@
Policy name:
-
{{selected.name}}
+
{{ selected.name }}
Policy description:
-
{{selected.description}}
+
{{ selected.description }}
Policy creator:
-
{{selected.owner}}
+
{{ selected.owner }}
Policy version:
-
{{selected.version}}
+
{{ selected.version }}
@@ -312,28 +339,31 @@
Topic ID:
{{selected.topicId}} + [params]="selected.topicId">{{ selected.topicId }} +
Message ID:
{{selected.id}} + [subParams]="selected.index">{{ selected.id }} +
Sender:
{{selected.payer}} + [params]="selected.payer">{{ selected.payer }} +
- + User registration @@ -343,7 +373,7 @@
DID:
-
{{selected.did}}
+
{{ selected.did }}
DID document:
@@ -358,28 +388,31 @@
Topic ID:
{{selected.topicId}} + [params]="selected.topicId">{{ selected.topicId }} +
Message ID:
{{selected.id}} + [subParams]="selected.index">{{ selected.id }} +
Sender:
{{selected.payer}} + [params]="selected.payer">{{ selected.payer }} +
- + Roles & Groups @@ -389,17 +422,17 @@
DID:
-
{{selected.__user.did}}
+
{{ selected.__user.did }}
Role:
-
{{selected.role}}
+
{{ selected.role }}
Groups:
-
{{selected.group}}
+
{{ selected.group }}
@@ -415,28 +448,31 @@
Topic ID:
{{selected.topicId}} + [params]="selected.topicId">{{ selected.topicId }} +
Message ID:
{{selected.id}} + [subParams]="selected.index">{{ selected.id }} +
Sender:
{{selected.payer}} + [params]="selected.payer">{{ selected.payer }} +
- + Document @@ -446,11 +482,11 @@
Schema:
-
{{selected.__schemaLabel}}
+
{{ selected.__schemaLabel }}
Document status:
-
{{selected.__status}}
+
{{ selected.__status }}
Document artifact:
@@ -463,15 +499,15 @@
DID:
-
{{selected.__user.did}}
+
{{ selected.__user.did }}
Group:
-
{{selected.__user.group}}
+
{{ selected.__user.group }}
Role:
-
{{selected.__user.role}}
+
{{ selected.__user.role }}
@@ -480,21 +516,24 @@
Topic ID:
{{selected.topicId}} + [params]="selected.topicId">{{ selected.topicId }} +
Message ID:
{{selected.id}} + [subParams]="selected.index">{{ selected.id }} +
Sender:
{{selected.payer}} + [params]="selected.payer">{{ selected.payer }} +
@@ -503,10 +542,10 @@
- + - {{relationship.name}} + {{ relationship.name }}
@@ -515,7 +554,7 @@
- + Mint token @@ -526,17 +565,17 @@
Token name:
-
{{selected.__token.name}}
+
{{ selected.__token.name }}
Token ID:
-
{{selected.__token.tokenId}}
+
{{ selected.__token.tokenId }}
Amount:
-
{{selected.__amount}}
+
{{ selected.__amount }}
@@ -553,15 +592,15 @@
DID:
-
{{selected.__user.did}}
+
{{ selected.__user.did }}
Group:
-
{{selected.__user.group}}
+
{{ selected.__user.group }}
Role:
-
{{selected.__user.role}}
+
{{ selected.__user.role }}
@@ -571,21 +610,24 @@
Topic ID:
{{selected.topicId}} + [params]="selected.topicId">{{ selected.topicId }} +
Message ID:
{{selected.id}} + [subParams]="selected.index">{{ selected.id }} +
Sender:
{{selected.payer}} + [params]="selected.payer">{{ selected.payer }} +
@@ -594,10 +636,10 @@
- + - {{relationship.name}} + {{ relationship.name }}
@@ -606,7 +648,7 @@
- + Mint confirmation @@ -618,7 +660,8 @@
Documents:
+ (click)="onOpenDocument(item)">{{ item.__name }} +
@@ -626,15 +669,15 @@
Token name:
-
{{selected.__token.name}}
+
{{ selected.__token.name }}
Token ID:
-
{{selected.__token.tokenId}}
+
{{ selected.__token.tokenId }}
Amount:
-
{{selected.__amount}}
+
{{ selected.__amount }}
@@ -642,15 +685,15 @@
DID:
-
{{selected.__user.did}}
+
{{ selected.__user.did }}
Group:
-
{{selected.__user.group}}
+
{{ selected.__user.group }}
Role:
-
{{selected.__user.role}}
+
{{ selected.__user.role }}
@@ -659,21 +702,24 @@
Topic ID:
{{selected.topicId}} + [params]="selected.topicId">{{ selected.topicId }} +
Message ID:
{{selected.id}} + [subParams]="selected.index">{{ selected.id }} +
Sender:
{{selected.payer}} + [params]="selected.payer">{{ selected.payer }} +
@@ -682,10 +728,10 @@
- + - {{relationship.name}} + {{ relationship.name }}
@@ -694,7 +740,7 @@
- + Catalog @@ -704,21 +750,21 @@
Topic name:
-
{{selected.name}}
+
{{ selected.name }}
Topic description:
-
{{selected.description}}
+
{{ selected.description }}
Topic type:
- {{getTopicHeader(selected)}} catalog + {{ getTopicHeader(selected) }} catalog
Topic creator:
-
{{selected.owner}}
+
{{ selected.owner }}
@@ -726,11 +772,11 @@
Policy name:
-
{{selected.__rationale.name}}
+
{{ selected.__rationale.name }}
Policy description:
-
{{selected.__rationale.description}}
+
{{ selected.__rationale.description }}
@@ -739,15 +785,15 @@
Policy name:
-
{{selected.__rationale.name}}
+
{{ selected.__rationale.name }}
Policy description:
-
{{selected.__rationale.description}}
+
{{ selected.__rationale.description }}
Policy version:
-
{{selected.__rationale.version}}
+
{{ selected.__rationale.version }}
@@ -757,21 +803,24 @@
Topic ID:
{{selected.topicId}} + [params]="selected.topicId">{{ selected.topicId }} +
Message ID:
{{selected.id}} + [subParams]="selected.index">{{ selected.id }} +
Sender:
{{selected.payer}} + [params]="selected.payer">{{ selected.payer }} +
diff --git a/frontend/src/app/modules/policy-engine/policy-viewer/blocks/report-block/report-block.component.html b/frontend/src/app/modules/policy-engine/policy-viewer/blocks/report-block/report-block.component.html index 736584b0c8..2e1a6ea644 100644 --- a/frontend/src/app/modules/policy-engine/policy-viewer/blocks/report-block/report-block.component.html +++ b/frontend/src/app/modules/policy-engine/policy-viewer/blocks/report-block/report-block.component.html @@ -7,25 +7,46 @@ [formGroup]="searchForm" class="filters" > - - HASH/ID - - - +
+
+ + HASH/ID + + + +
+
@@ -304,16 +325,16 @@

Policy Overview

-<<<<<<< HEAD + <<<<<<< HEAD -======= + ======= + src="/assets/images/icons/left-arrow.svg" + svgClass="icon-color-font"> ->>>>>>> develop + >>>>>>> develop
Policy Overview - + {{ item.activeDocumentIndex }} in {{ item.document.length }} - +
@@ -494,16 +517,16 @@

Policy Overview

(click)="onScrollButtonPress(scrollContainer, 150)" class="scroll-right" > -<<<<<<< HEAD + <<<<<<< HEAD -======= + ======= + src="/assets/images/icons/right-arrow.svg" + svgClass="icon-color-font"> ->>>>>>> develop + >>>>>>> develop
diff --git a/frontend/src/app/modules/policy-engine/policy-viewer/blocks/roles-block/roles-block.component.html b/frontend/src/app/modules/policy-engine/policy-viewer/blocks/roles-block/roles-block.component.html index 584b7cef13..d22c36b651 100644 --- a/frontend/src/app/modules/policy-engine/policy-viewer/blocks/roles-block/roles-block.component.html +++ b/frontend/src/app/modules/policy-engine/policy-viewer/blocks/roles-block/roles-block.component.html @@ -79,16 +79,40 @@

{{ description }}

- - Group Template - - {{ group }} - - - - Group Label - - + + + + + + + +
+ + + +
+ + + + + + +
+ + +
@@ -118,10 +142,21 @@

{{ description }}

Role: {{ inviteRole }}
- - Invite - - + + + + + +
+ + +
diff --git a/frontend/src/app/modules/policy-engine/policy-viewer/blocks/token-confirmation-block/token-confirmation-block.component.html b/frontend/src/app/modules/policy-engine/policy-viewer/blocks/token-confirmation-block/token-confirmation-block.component.html index 8cb28688c8..b7899c081b 100644 --- a/frontend/src/app/modules/policy-engine/policy-viewer/blocks/token-confirmation-block/token-confirmation-block.component.html +++ b/frontend/src/app/modules/policy-engine/policy-viewer/blocks/token-confirmation-block/token-confirmation-block.component.html @@ -12,25 +12,48 @@ )
- - * Private Key - - +
+
- -
{ }, + () => { + }, (e) => { console.error(e.error); this.loading = false; @@ -151,4 +152,8 @@ export class TokenConfirmationBlockComponent implements OnInit { } ); } + + togglePasswordVisibility(inputElement: HTMLInputElement): void { + inputElement.type = inputElement.type === 'password' ? 'text' : 'password'; + } } diff --git a/frontend/src/app/modules/schema-engine/copy-schema-dialog/copy-schema-dialog.html b/frontend/src/app/modules/schema-engine/copy-schema-dialog/copy-schema-dialog.html index e05e17c155..f569a4e609 100644 --- a/frontend/src/app/modules/schema-engine/copy-schema-dialog/copy-schema-dialog.html +++ b/frontend/src/app/modules/schema-engine/copy-schema-dialog/copy-schema-dialog.html @@ -21,10 +21,21 @@
- - * Schema Name - - + + + + + +
+ + +
@@ -36,33 +47,76 @@ - - * Policy - - No binding - - {{ policy.name }} - - - + + + + + + + + + + + < +
+ + + +
- - * Tool - - No binding - - {{ tool.name }} - - - + + + + + + + + + + +
+ + + +
+ + + + + + + + + - - For (Entity) - - STANDARD REGISTRY - USER - - +
+ + + +
diff --git a/frontend/src/app/modules/schema-engine/copy-schema-dialog/copy-schema-dialog.ts b/frontend/src/app/modules/schema-engine/copy-schema-dialog/copy-schema-dialog.ts index e009378925..a50ef22354 100644 --- a/frontend/src/app/modules/schema-engine/copy-schema-dialog/copy-schema-dialog.ts +++ b/frontend/src/app/modules/schema-engine/copy-schema-dialog/copy-schema-dialog.ts @@ -1,10 +1,11 @@ -import { ChangeDetectorRef, Component, Inject, ViewChild } from '@angular/core'; +import {ChangeDetectorRef, Component, Inject, ViewChild} from '@angular/core'; // import { MAT_LEGACY_DIALOG_DATA as MAT_DIALOG_DATA, MatLegacyDialogRef as MatDialogRef } from '@angular/material/legacy-dialog'; -import { SchemaConfigurationComponent } from '../schema-configuration/schema-configuration.component'; -import { Schema } from '@guardian/interfaces'; -import { CdkDragDrop, moveItemInArray } from '@angular/cdk/drag-drop'; -import { UntypedFormBuilder, UntypedFormGroup } from '@angular/forms'; +import {SchemaConfigurationComponent} from '../schema-configuration/schema-configuration.component'; +import {Schema} from '@guardian/interfaces'; +import {CdkDragDrop, moveItemInArray} from '@angular/cdk/drag-drop'; +import {UntypedFormBuilder, UntypedFormGroup} from '@angular/forms'; import {DynamicDialogConfig, DynamicDialogRef} from 'primeng/dynamicdialog'; + // import { SchemaService } from '../../../services/schema.service'; enum SchemaType { @@ -42,6 +43,14 @@ export class CopySchemaDialog { public dataForm!: UntypedFormGroup; + public defaultPolicyOption = {topicId: 'draft', name: 'No binding'}; + public defaultToolOption = {topicId: 'draft', name: 'No binding'}; + public defaultEntityOption = {value: '', label: 'No binding'}; + public entities = [ + {value: 'STANDARD_REGISTRY', label: 'STANDARD REGISTRY'}, + {value: 'USER', label: 'USER'} + ]; + constructor( // public dialogRef: MatDialogRef, private cdr: ChangeDetectorRef, @@ -138,4 +147,16 @@ export class CopySchemaDialog { this.scheme = this.restoreData; this.restoreData = null; } + + getPoliciesWithDefault(): Record[] { + return [this.defaultPolicyOption, ...this.policies]; + } + + getToolsWithDefault(): Record[] { + return [this.defaultToolOption, ...this.tools]; + } + + getEntitiesWithDefault(): Record[] { + return [this.defaultEntityOption, ...this.entities]; + } } diff --git a/frontend/src/app/modules/schema-engine/enum-editor-dialog/enum-editor-dialog.component.html b/frontend/src/app/modules/schema-engine/enum-editor-dialog/enum-editor-dialog.component.html index bacbbd990a..07f2294a60 100644 --- a/frontend/src/app/modules/schema-engine/enum-editor-dialog/enum-editor-dialog.component.html +++ b/frontend/src/app/modules/schema-engine/enum-editor-dialog/enum-editor-dialog.component.html @@ -1,51 +1,74 @@
- - URL + + + + + + + + + +
+ - + pInputText + id="urlInput" + [formControl]="urlControl" + placeholder="example.com" + class="full-width"> +
+
Enum
- + + + + + + + + + +
+ - Will data be loaded to IPFS? (There are more than 5 options) - + [binary]="true" + inputId="ipfsCheckbox" + class="p-checkbox-primary"> + + +
- +
@@ -55,9 +78,9 @@
diff --git a/frontend/src/app/modules/schema-engine/geojson-type/geojson-type.component.html b/frontend/src/app/modules/schema-engine/geojson-type/geojson-type.component.html index db69907da9..492e6fe851 100644 --- a/frontend/src/app/modules/schema-engine/geojson-type/geojson-type.component.html +++ b/frontend/src/app/modules/schema-engine/geojson-type/geojson-type.component.html @@ -1,38 +1,67 @@
+ (valueChange)="onViewTypeChange(!isDisabled && this.control?.value)">
- - GeoJSON - - + + + + + + +
+ + +
- - Type - - None - Point - Polygon - LineString - MultiPoint - MultiPolygon - MultiLineString - - + + + + + + + + + + + + + +
+ + + + This field is required. +
- + + [options]="pointMarkerOptions"> @@ -46,9 +75,24 @@
- - Coordinates - - -
\ No newline at end of file + + + + + + +
+ + + Coordinates are required. +
+ diff --git a/frontend/src/app/modules/schema-engine/geojson-type/geojson-type.component.ts b/frontend/src/app/modules/schema-engine/geojson-type/geojson-type.component.ts index 368450d141..af99b6c748 100644 --- a/frontend/src/app/modules/schema-engine/geojson-type/geojson-type.component.ts +++ b/frontend/src/app/modules/schema-engine/geojson-type/geojson-type.component.ts @@ -56,6 +56,15 @@ export class GeojsonTypeComponent implements OnInit, OnChanges { isJSON: boolean = false; jsonInput: string = ''; + typeOptions = [ + { label: 'Point', value: 'Point' }, + { label: 'Polygon', value: 'Polygon' }, + { label: 'LineString', value: 'LineString' }, + { label: 'MultiPoint', value: 'MultiPoint' }, + { label: 'MultiPolygon', value: 'MultiPolygon' }, + { label: 'MultiLineString', value: 'MultiLineString' } + ]; + constructor( public mapService: MapService, private cdkRef: ChangeDetectorRef diff --git a/frontend/src/app/modules/schema-engine/schema-configuration/schema-configuration.component.html b/frontend/src/app/modules/schema-engine/schema-configuration/schema-configuration.component.html index 6cfccae002..1980cc5793 100644 --- a/frontend/src/app/modules/schema-engine/schema-configuration/schema-configuration.component.html +++ b/frontend/src/app/modules/schema-engine/schema-configuration/schema-configuration.component.html @@ -225,21 +225,36 @@ - + + + + + + + + + + + + + + + +
- Choose a date & time + class="form-group example-full-width required-form-field"> + - + class="full-width"> + +
@@ -259,20 +274,34 @@ - + + + + + + + + + + + + + + +
- Choose a date + class="form-group example-full-width required-form-field"> + - + class="full-width"> + +
diff --git a/frontend/src/app/modules/schema-engine/schema-field-configuration/schema-field-configuration.component.html b/frontend/src/app/modules/schema-engine/schema-field-configuration/schema-field-configuration.component.html index c5bd71dc24..bbb01d3bd6 100644 --- a/frontend/src/app/modules/schema-engine/schema-field-configuration/schema-field-configuration.component.html +++ b/frontend/src/app/modules/schema-engine/schema-field-configuration/schema-field-configuration.component.html @@ -215,26 +215,42 @@
- - Enum data - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+
- +
Policy
- - * Policy - - {{policy.name}} - - + + + + + + + +
+ + + +
Tool
- - * Tool - - {{tool.name}} - - + + + + + + + +
+ + + +
Schemas
-
{{schema.name}}
+
{{ schema.name }}
@@ -57,7 +85,7 @@
Description
-
{{schema.description}}
+
{{ schema.description }}
@@ -66,9 +94,9 @@
Warning & Errors
-
{{error.worksheet}}
-
{{error.__path}}
-
{{error.text}}
+
{{ error.worksheet }}
+
{{ error.__path }}
+
{{ error.text }}
@@ -77,9 +105,9 @@
diff --git a/frontend/src/app/modules/schema-engine/sentinel-hub-type/sentinel-hub-type.component.html b/frontend/src/app/modules/schema-engine/sentinel-hub-type/sentinel-hub-type.component.html index 5087945eed..fe9ed84db5 100644 --- a/frontend/src/app/modules/schema-engine/sentinel-hub-type/sentinel-hub-type.component.html +++ b/frontend/src/app/modules/schema-engine/sentinel-hub-type/sentinel-hub-type.component.html @@ -8,23 +8,76 @@ - - Maxcc - - - - Width - - - - Height - - - - BBox - - + + + + + +
+ + +
+ + + + + + +
+ + +
+ + + + + + +
+ + +
+ + + + + + + +
+ + +
+ @@ -41,30 +94,56 @@
- - From + + + + + + + + + + + + +
+ + placeholder="Select date" + class="full-width"> - +
- - To + + + + + + + + + + + + +
+ + placeholder="Select date" + class="full-width"> - +
diff --git a/frontend/src/app/modules/tag-engine/tags-create-dialog/tags-create-dialog.component.html b/frontend/src/app/modules/tag-engine/tags-create-dialog/tags-create-dialog.component.html index 135697f08e..a85cb38dd5 100644 --- a/frontend/src/app/modules/tag-engine/tags-create-dialog/tags-create-dialog.component.html +++ b/frontend/src/app/modules/tag-engine/tags-create-dialog/tags-create-dialog.component.html @@ -67,15 +67,37 @@
- - * Label - - + + + + - - Description - - +
+ + +
+ + + + + + +
+ + +
@@ -88,11 +110,21 @@
- - - {{ schema.name }} - - + + + + + + + + + + + + + + + + + +
+ + + +
- - Policy - - All policies - - {{ policy.name }} - ({{ policy.id }}) - - - + + + + + + + + + + + +
+ + + +
+ {{ policy.name }} + ({{ policy.id }}) +
+
+
+
diff --git a/frontend/src/app/views/register/register.component.html b/frontend/src/app/views/register/register.component.html index 5a3e99cfbd..0fe589e00e 100644 --- a/frontend/src/app/views/register/register.component.html +++ b/frontend/src/app/views/register/register.component.html @@ -13,25 +13,52 @@
diff --git a/frontend/src/app/modules/contract-engine/dialogs/dialog-wrapper/dialog-wrapper.component.ts b/frontend/src/app/modules/contract-engine/dialogs/dialog-wrapper/dialog-wrapper.component.ts index 68a3229971..83ee5a84e2 100644 --- a/frontend/src/app/modules/contract-engine/dialogs/dialog-wrapper/dialog-wrapper.component.ts +++ b/frontend/src/app/modules/contract-engine/dialogs/dialog-wrapper/dialog-wrapper.component.ts @@ -1,6 +1,5 @@ import { Component, EventEmitter, Input, OnInit, Output } from '@angular/core'; - @Component({ selector: 'app-dialog-wrapper', templateUrl: './dialog-wrapper.component.html', diff --git a/frontend/src/app/modules/contract-engine/dialogs/wipe-requests-dialog/wipe-requests-dialog.component.html b/frontend/src/app/modules/contract-engine/dialogs/wipe-requests-dialog/wipe-requests-dialog.component.html index 9660f43a51..a28ce23765 100644 --- a/frontend/src/app/modules/contract-engine/dialogs/wipe-requests-dialog/wipe-requests-dialog.component.html +++ b/frontend/src/app/modules/contract-engine/dialogs/wipe-requests-dialog/wipe-requests-dialog.component.html @@ -32,8 +32,16 @@
- + + + + + + diff --git a/frontend/src/app/modules/policy-engine/policy-viewer/blocks/pagination-addon-block/pagination-addon-block.component.html b/frontend/src/app/modules/policy-engine/policy-viewer/blocks/pagination-addon-block/pagination-addon-block.component.html index 3aad3a5ec1..2e2dd6314a 100644 --- a/frontend/src/app/modules/policy-engine/policy-viewer/blocks/pagination-addon-block/pagination-addon-block.component.html +++ b/frontend/src/app/modules/policy-engine/policy-viewer/blocks/pagination-addon-block/pagination-addon-block.component.html @@ -1,7 +1,14 @@ - - + + + + + + + + + + diff --git a/frontend/src/app/views/audit/audit.component.html b/frontend/src/app/views/audit/audit.component.html index 4f29207776..241780f914 100644 --- a/frontend/src/app/views/audit/audit.component.html +++ b/frontend/src/app/views/audit/audit.component.html @@ -143,9 +143,16 @@
- - + + + + + +
From b5d9fad4c18e25052b17dd8f165fa56290a5549b Mon Sep 17 00:00:00 2001 From: Ihar Date: Thu, 21 Nov 2024 17:48:22 +0500 Subject: [PATCH 20/48] feat: move tooltip module to prime ng[3141] --- .../src/app/modules/common/material.module.ts | 11 ++- .../user-contract-config.component.html | 74 +++++++------- .../retire-pools-dialog.component.html | 22 +++-- .../retire-requests-dialog.component.html | 37 +++++-- .../wipe-requests-dialog.component.html | 54 +++++++--- .../document-path.component.html | 29 ++++-- .../help-icon/help-icon.component.html | 11 ++- .../policy-tree/policy-tree.component.html | 98 ++++++++++++------- .../record-controller.component.html | 19 +++- .../app/views/header/header.component.html | 13 ++- .../src/app/views/login/login.component.html | 11 ++- 11 files changed, 260 insertions(+), 119 deletions(-) diff --git a/frontend/src/app/modules/common/material.module.ts b/frontend/src/app/modules/common/material.module.ts index 5734c6e395..978c207c89 100644 --- a/frontend/src/app/modules/common/material.module.ts +++ b/frontend/src/app/modules/common/material.module.ts @@ -21,7 +21,7 @@ import {MatTreeModule} from '@angular/material/tree'; // import {MatDatepickerModule} from '@angular/material/datepicker'; // import {MatLegacyRadioModule as MatRadioModule} from '@angular/material/legacy-radio'; // import {MatNativeDateModule} from '@angular/material/core'; -import {MatLegacyTooltipModule as MatTooltipModule} from '@angular/material/legacy-tooltip'; +// import {MatLegacyTooltipModule as MatTooltipModule} from '@angular/material/legacy-tooltip'; // import {MatLegacySlideToggleModule as MatSlideToggleModule} from '@angular/material/legacy-slide-toggle'; // import {ClipboardModule} from '@angular/cdk/clipboard'; // import {MatLegacyPaginatorModule as MatPaginatorModule} from '@angular/material/legacy-paginator'; @@ -54,6 +54,7 @@ import {StepsModule} from 'primeng/steps'; import {DropdownModule} from 'primeng/dropdown'; import {MultiSelectModule} from 'primeng/multiselect'; import {InputNumberModule} from 'primeng/inputnumber'; +import {TooltipModule} from 'primeng/tooltip'; @NgModule({ declarations: [], @@ -114,8 +115,8 @@ import {InputNumberModule} from 'primeng/inputnumber'; MatTreeModule, - MatTooltipModule, - // TooltipModule, + // MatTooltipModule, + TooltipModule, // MatSlideToggleModule, @@ -186,8 +187,8 @@ import {InputNumberModule} from 'primeng/inputnumber'; MatTreeModule, - MatTooltipModule, - //TooltipModule + // MatTooltipModule, + TooltipModule, // MatSlideToggleModule, diff --git a/frontend/src/app/modules/contract-engine/configs/user-contract-config/user-contract-config.component.html b/frontend/src/app/modules/contract-engine/configs/user-contract-config/user-contract-config.component.html index a8d4955113..0508577e29 100644 --- a/frontend/src/app/modules/contract-engine/configs/user-contract-config/user-contract-config.component.html +++ b/frontend/src/app/modules/contract-engine/configs/user-contract-config/user-contract-config.component.html @@ -1,7 +1,7 @@
- - - + + +
@@ -64,37 +64,37 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -131,9 +131,9 @@
- - - + + +
-
diff --git a/frontend/src/app/modules/contract-engine/dialogs/retire-requests-dialog/retire-requests-dialog.component.html b/frontend/src/app/modules/contract-engine/dialogs/retire-requests-dialog/retire-requests-dialog.component.html index 3789f9f061..5aa34c49b5 100644 --- a/frontend/src/app/modules/contract-engine/dialogs/retire-requests-dialog/retire-requests-dialog.component.html +++ b/frontend/src/app/modules/contract-engine/dialogs/retire-requests-dialog/retire-requests-dialog.component.html @@ -39,15 +39,36 @@
- -
diff --git a/frontend/src/app/modules/contract-engine/dialogs/wipe-requests-dialog/wipe-requests-dialog.component.html b/frontend/src/app/modules/contract-engine/dialogs/wipe-requests-dialog/wipe-requests-dialog.component.html index a28ce23765..86cf6a9974 100644 --- a/frontend/src/app/modules/contract-engine/dialogs/wipe-requests-dialog/wipe-requests-dialog.component.html +++ b/frontend/src/app/modules/contract-engine/dialogs/wipe-requests-dialog/wipe-requests-dialog.component.html @@ -15,20 +15,50 @@ {{ request.token }}
- - -
diff --git a/frontend/src/app/modules/policy-engine/helpers/document-path/document-path.component.html b/frontend/src/app/modules/policy-engine/helpers/document-path/document-path.component.html index 1224ce0f04..0cd19aaf62 100644 --- a/frontend/src/app/modules/policy-engine/helpers/document-path/document-path.component.html +++ b/frontend/src/app/modules/policy-engine/helpers/document-path/document-path.component.html @@ -3,14 +3,29 @@ - - - - - + + + + +
- more_horiz -
\ No newline at end of file + + + + + +
diff --git a/frontend/src/app/modules/policy-engine/helpers/help-icon/help-icon.component.html b/frontend/src/app/modules/policy-engine/helpers/help-icon/help-icon.component.html index 0ed0d67776..ce063e5d5e 100644 --- a/frontend/src/app/modules/policy-engine/helpers/help-icon/help-icon.component.html +++ b/frontend/src/app/modules/policy-engine/helpers/help-icon/help-icon.component.html @@ -1,3 +1,10 @@ + + + +
- help_outline -
\ No newline at end of file + +
diff --git a/frontend/src/app/modules/policy-engine/policy-configuration/policy-tree/policy-tree.component.html b/frontend/src/app/modules/policy-engine/policy-configuration/policy-tree/policy-tree.component.html index d4c43cdc65..1d55692e75 100644 --- a/frontend/src/app/modules/policy-engine/policy-configuration/policy-tree/policy-tree.component.html +++ b/frontend/src/app/modules/policy-engine/policy-configuration/policy-tree/policy-tree.component.html @@ -15,7 +15,7 @@ >
- + @@ -41,7 +41,7 @@ [attr.deprecated]="item.deprecated" >
- +
@@ -51,7 +51,8 @@
-
@@ -275,16 +276,31 @@ [attr.block-type]="nestedBlock.type" [style.paddingLeft]="getNestedOffset(item.level+1)" (click)="nested.emit(nestedBlock.type)"> -
- - -
-
+ + + + + + + + + + + + + + + + + + +
-
@@ -292,34 +308,48 @@
-
-
-
- - -
-
-
-
- - -
-
- {{ nextBlock.name }} +
+
+ + +
+ + + + + + + + + + + + + +
+
+
+ +
+
+ {{ nextBlock.name }} +
-
diff --git a/frontend/src/app/modules/policy-engine/record/record-controller/record-controller.component.html b/frontend/src/app/modules/policy-engine/record/record-controller/record-controller.component.html index 7c610da4eb..b397d4525b 100644 --- a/frontend/src/app/modules/policy-engine/record/record-controller/record-controller.component.html +++ b/frontend/src/app/modules/policy-engine/record/record-controller/record-controller.component.html @@ -96,13 +96,26 @@
{{ this.recordError }}
+ + + + + + + + + + + + +
{{ item._index }}
{{ item._title }}
diff --git a/frontend/src/app/views/header/header.component.html b/frontend/src/app/views/header/header.component.html index e287690b55..49419cf840 100644 --- a/frontend/src/app/views/header/header.component.html +++ b/frontend/src/app/views/header/header.component.html @@ -975,9 +975,16 @@ [ngClass]="{ 'current-user-first' : isFirst, 'current-user-last': i === users.length - 1 }">
{{ user.username }} ({{ user.role }})
-
+ + + + + + +
User participates in {{ user.policyRoles.length }} policies
diff --git a/frontend/src/app/views/login/login.component.html b/frontend/src/app/views/login/login.component.html index e578df8fa0..84cdcbba51 100644 --- a/frontend/src/app/views/login/login.component.html +++ b/frontend/src/app/views/login/login.component.html @@ -75,10 +75,17 @@ {{ user.username }} ({{ user.role }})
+ + + + + + +
+ [pTooltip]="getPoliciesRolesTooltip(user.policyRoles)" + tooltipStyleClass="policy-roles-tooltip"> User participates in {{ user.policyRoles.length }} policies
From 38480768232747d5ced11a9867cc8e5e31d53e10 Mon Sep 17 00:00:00 2001 From: Ihar Date: Thu, 21 Nov 2024 20:40:23 +0500 Subject: [PATCH 21/48] feat: move tree module to prime ng[3141] --- .../src/app/modules/common/material.module.ts | 9 ++-- .../common/step-tree/step-tree.component.html | 44 ++++++++++++------- .../common/step-tree/step-tree.component.scss | 24 ++++++++-- 3 files changed, 55 insertions(+), 22 deletions(-) diff --git a/frontend/src/app/modules/common/material.module.ts b/frontend/src/app/modules/common/material.module.ts index 978c207c89..d9d2bf986b 100644 --- a/frontend/src/app/modules/common/material.module.ts +++ b/frontend/src/app/modules/common/material.module.ts @@ -17,7 +17,7 @@ import {ReactiveFormsModule} from '@angular/forms'; // import {MatLegacyProgressBarModule as MatProgressBarModule} from '@angular/material/legacy-progress-bar'; // import {MatLegacySelectModule as MatSelectModule} from '@angular/material/legacy-select'; // import {MatLegacyCheckboxModule as MatCheckboxModule} from '@angular/material/legacy-checkbox'; -import {MatTreeModule} from '@angular/material/tree'; +// import {MatTreeModule} from '@angular/material/tree'; // import {MatDatepickerModule} from '@angular/material/datepicker'; // import {MatLegacyRadioModule as MatRadioModule} from '@angular/material/legacy-radio'; // import {MatNativeDateModule} from '@angular/material/core'; @@ -55,6 +55,7 @@ import {DropdownModule} from 'primeng/dropdown'; import {MultiSelectModule} from 'primeng/multiselect'; import {InputNumberModule} from 'primeng/inputnumber'; import {TooltipModule} from 'primeng/tooltip'; +import {TreeModule} from 'primeng/tree'; @NgModule({ declarations: [], @@ -113,7 +114,8 @@ import {TooltipModule} from 'primeng/tooltip'; // MatCheckboxModule, CheckboxModule, - MatTreeModule, + // MatTreeModule, + TreeModule, // MatTooltipModule, TooltipModule, @@ -185,7 +187,8 @@ import {TooltipModule} from 'primeng/tooltip'; // MatCheckboxModule, CheckboxModule, - MatTreeModule, + // MatTreeModule, + TreeModule, // MatTooltipModule, TooltipModule, diff --git a/frontend/src/app/modules/common/step-tree/step-tree.component.html b/frontend/src/app/modules/common/step-tree/step-tree.component.html index 58a3985f10..e4de544dbf 100644 --- a/frontend/src/app/modules/common/step-tree/step-tree.component.html +++ b/frontend/src/app/modules/common/step-tree/step-tree.component.html @@ -1,21 +1,33 @@ - - - - - -
- - - - - + + + + + + + + + + + + + + + + + + + + + +
-
- -
- - +
+
= 0.10" } }, "node_modules/clean-stack": { @@ -6154,9 +5309,9 @@ "dev": true }, "node_modules/complex.js": { - "version": "2.4.1", - "resolved": "https://registry.npmjs.org/complex.js/-/complex.js-2.4.1.tgz", - "integrity": "sha512-QNaQnI+uI5mp3vm+i0M7Fkc1eCHAFzbsNJIhIeybP1ZVQquBhW6jx28jFbDCyOlykjDjtfgDMJjus0mbsukrig==", + "version": "2.4.2", + "resolved": "https://registry.npmjs.org/complex.js/-/complex.js-2.4.2.tgz", + "integrity": "sha512-qtx7HRhPGSCBtGiST4/WGHuW+zeaND/6Ld+db6PbrulIB1i2Ev/2UPiqcmpQNPSyfBKraC0EOvOKCB5dGZKt3g==", "engines": { "node": "*" }, @@ -6178,32 +5333,23 @@ } }, "node_modules/compression": { - "version": "1.7.4", - "resolved": "https://registry.npmjs.org/compression/-/compression-1.7.4.tgz", - "integrity": "sha512-jaSIDzP9pZVS4ZfQ+TzvtiWhdpFhE2RDHz8QJkpX9SIpLq88VueF5jJw6t+6CUQcAoA6t+x89MLrWAqpfDE8iQ==", + "version": "1.7.5", + "resolved": "https://registry.npmjs.org/compression/-/compression-1.7.5.tgz", + "integrity": "sha512-bQJ0YRck5ak3LgtnpKkiabX5pNF7tMUh1BSy2ZBOTh0Dim0BUu6aPPwByIns6/A5Prh8PufSPerMDUklpzes2Q==", "dev": true, "dependencies": { - "accepts": "~1.3.5", - "bytes": "3.0.0", - "compressible": "~2.0.16", + "bytes": "3.1.2", + "compressible": "~2.0.18", "debug": "2.6.9", + "negotiator": "~0.6.4", "on-headers": "~1.0.2", - "safe-buffer": "5.1.2", + "safe-buffer": "5.2.1", "vary": "~1.1.2" }, "engines": { "node": ">= 0.8.0" } }, - "node_modules/compression/node_modules/bytes": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/bytes/-/bytes-3.0.0.tgz", - "integrity": "sha512-pMhOfFDPiv9t5jjIXkHosWmkSyQbvsgEVNkz0ERHbuLh2T/7j4Mqqpz523Fe8MVY89KC6Sh/QfS2sM+SjgFDcw==", - "dev": true, - "engines": { - "node": ">= 0.8" - } - }, "node_modules/compression/node_modules/debug": { "version": "2.6.9", "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz", @@ -6219,12 +5365,6 @@ "integrity": "sha512-Tpp60P6IUJDTuOq/5Z8cdskzJujfwqfOTkrwIwj7IRISpnkJnT6SyJ4PCPnGMoFjC9ddhal5KVIYtAt97ix05A==", "dev": true }, - "node_modules/compression/node_modules/safe-buffer": { - "version": "5.1.2", - "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.2.tgz", - "integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==", - "dev": true - }, "node_modules/concat-map": { "version": "0.0.1", "resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz", @@ -6433,9 +5573,9 @@ } }, "node_modules/create-ecdh/node_modules/bn.js": { - "version": "4.12.0", - "resolved": "https://registry.npmjs.org/bn.js/-/bn.js-4.12.0.tgz", - "integrity": "sha512-c98Bf3tPniI+scsdk237ku1Dc3ujXQTSgyiPUDEOe7tRkhrqridvh8klBv0HCEso1OLOYcHuCv/cS6DNxKH+ZA==" + "version": "4.12.1", + "resolved": "https://registry.npmjs.org/bn.js/-/bn.js-4.12.1.tgz", + "integrity": "sha512-k8TVBiPkPJT9uHLdOKfFpqcfprwBFOAAXXozRubr7R7PfIuKvQlzcI4M0pALeqXN09vdaMbUdUj+pass+uULAg==" }, "node_modules/create-hash": { "version": "1.2.0", @@ -6478,17 +5618,17 @@ } }, "node_modules/cronstrue": { - "version": "2.51.0", - "resolved": "https://registry.npmjs.org/cronstrue/-/cronstrue-2.51.0.tgz", - "integrity": "sha512-7EG9VaZZ5SRbZ7m25dmP6xaS0qe9ay6wywMskFOU/lMDKa+3gZr2oeT5OUfXwRP/Bcj8wxdYJ65AHU70CI3tsw==", + "version": "2.52.0", + "resolved": "https://registry.npmjs.org/cronstrue/-/cronstrue-2.52.0.tgz", + "integrity": "sha512-NKgHbWkSZXJUcaBHSsyzC8eegD6bBd4O0oCI6XMIJ+y4Bq3v4w7sY3wfWoKPuVlq9pQHRB6od0lmKpIqi8TlKA==", "bin": { "cronstrue": "bin/cli.js" } }, "node_modules/cross-spawn": { - "version": "7.0.3", - "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-7.0.3.tgz", - "integrity": "sha512-iRDPJKUPVEND7dHPO8rkbOnPpyDygcDFtWjpeWNCgy8WP2rXcxXL8TskReQl6OrB2G7+UJrags1q15Fudc7G6w==", + "version": "7.0.6", + "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-7.0.6.tgz", + "integrity": "sha512-uV2QOWP2nWzsy2aMp8aRibhi9dlzF5Hgh5SHaB9OiTGEyDTiJJyx0uy51QXdyWbtAHNua4XJzUKca3OzKUd3vA==", "dev": true, "dependencies": { "path-key": "^3.1.0", @@ -6804,9 +5944,9 @@ } }, "node_modules/diffie-hellman/node_modules/bn.js": { - "version": "4.12.0", - "resolved": "https://registry.npmjs.org/bn.js/-/bn.js-4.12.0.tgz", - "integrity": "sha512-c98Bf3tPniI+scsdk237ku1Dc3ujXQTSgyiPUDEOe7tRkhrqridvh8klBv0HCEso1OLOYcHuCv/cS6DNxKH+ZA==" + "version": "4.12.1", + "resolved": "https://registry.npmjs.org/bn.js/-/bn.js-4.12.1.tgz", + "integrity": "sha512-k8TVBiPkPJT9uHLdOKfFpqcfprwBFOAAXXozRubr7R7PfIuKvQlzcI4M0pALeqXN09vdaMbUdUj+pass+uULAg==" }, "node_modules/dijkstrajs": { "version": "1.0.3", @@ -6939,15 +6079,15 @@ "dev": true }, "node_modules/electron-to-chromium": { - "version": "1.5.49", - "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.5.49.tgz", - "integrity": "sha512-ZXfs1Of8fDb6z7WEYZjXpgIRF6MEu8JdeGA0A40aZq6OQbS+eJpnnV49epZRna2DU/YsEjSQuGtQPPtvt6J65A==", + "version": "1.5.63", + "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.5.63.tgz", + "integrity": "sha512-ddeXKuY9BHo/mw145axlyWjlJ1UBt4WK3AlvkT7W2AbqfRQoacVoRUCF6wL3uIx/8wT9oLKXzI+rFqHHscByaA==", "dev": true }, "node_modules/elliptic": { - "version": "6.6.0", - "resolved": "https://registry.npmjs.org/elliptic/-/elliptic-6.6.0.tgz", - "integrity": "sha512-dpwoQcLc/2WLQvJvLRHKZ+f9FgOdjnq11rurqwekGQygGPsYSK29OMMD2WalatiqQ+XGFDglTNixpPfI+lpaAA==", + "version": "6.6.1", + "resolved": "https://registry.npmjs.org/elliptic/-/elliptic-6.6.1.tgz", + "integrity": "sha512-RaddvvMatK2LJHqFJ+YA4WysVN5Ita9E35botqIYspQ4TkRAlCicdzKOjlyv/1Za5RyTNn7di//eEV0uTAfe3g==", "dependencies": { "bn.js": "^4.11.9", "brorand": "^1.1.0", @@ -6959,9 +6099,9 @@ } }, "node_modules/elliptic/node_modules/bn.js": { - "version": "4.12.0", - "resolved": "https://registry.npmjs.org/bn.js/-/bn.js-4.12.0.tgz", - "integrity": "sha512-c98Bf3tPniI+scsdk237ku1Dc3ujXQTSgyiPUDEOe7tRkhrqridvh8klBv0HCEso1OLOYcHuCv/cS6DNxKH+ZA==" + "version": "4.12.1", + "resolved": "https://registry.npmjs.org/bn.js/-/bn.js-4.12.1.tgz", + "integrity": "sha512-k8TVBiPkPJT9uHLdOKfFpqcfprwBFOAAXXozRubr7R7PfIuKvQlzcI4M0pALeqXN09vdaMbUdUj+pass+uULAg==" }, "node_modules/emoji-regex": { "version": "8.0.0", @@ -7689,9 +6829,9 @@ } }, "node_modules/flatted": { - "version": "3.3.1", - "resolved": "https://registry.npmjs.org/flatted/-/flatted-3.3.1.tgz", - "integrity": "sha512-X8cqMLLie7KsNUDSdzeN8FYK9rEt4Dt67OsG/DNGnYTSDBG4uFAJFBnUeiV+zCVAvwFy56IjM9sH51jVaEhNxw==", + "version": "3.3.2", + "resolved": "https://registry.npmjs.org/flatted/-/flatted-3.3.2.tgz", + "integrity": "sha512-AiwGJM8YcNOaobumgtng+6NHuOqC3A7MixFeDafM3X9cIUM+xUXoS5Vfgf+OihAYe20fxqNM9yPBXJzRtZ/4eA==", "dev": true }, "node_modules/follow-redirects": { @@ -9748,12 +8888,12 @@ "dev": true }, "node_modules/mathjs": { - "version": "13.2.0", - "resolved": "https://registry.npmjs.org/mathjs/-/mathjs-13.2.0.tgz", - "integrity": "sha512-P5PZoiUX2Tkghkv3tsSqlK0B9My/ErKapv1j6wdxd0MOrYQ30cnGE4LH/kzYB2gA5rN46Njqc4cFgJjaxgijoQ==", + "version": "13.2.3", + "resolved": "https://registry.npmjs.org/mathjs/-/mathjs-13.2.3.tgz", + "integrity": "sha512-I67Op0JU7gGykFK64bJexkSAmX498x0oybxfVXn1rroEMZTmfxppORhnk8mEUnPrbTfabDKCqvm18vJKMk2UJQ==", "dependencies": { - "@babel/runtime": "^7.25.6", - "complex.js": "^2.1.1", + "@babel/runtime": "^7.25.7", + "complex.js": "^2.2.5", "decimal.js": "^10.4.3", "escape-latex": "^1.2.0", "fraction.js": "^4.3.7", @@ -9875,9 +9015,9 @@ } }, "node_modules/miller-rabin/node_modules/bn.js": { - "version": "4.12.0", - "resolved": "https://registry.npmjs.org/bn.js/-/bn.js-4.12.0.tgz", - "integrity": "sha512-c98Bf3tPniI+scsdk237ku1Dc3ujXQTSgyiPUDEOe7tRkhrqridvh8klBv0HCEso1OLOYcHuCv/cS6DNxKH+ZA==" + "version": "4.12.1", + "resolved": "https://registry.npmjs.org/bn.js/-/bn.js-4.12.1.tgz", + "integrity": "sha512-k8TVBiPkPJT9uHLdOKfFpqcfprwBFOAAXXozRubr7R7PfIuKvQlzcI4M0pALeqXN09vdaMbUdUj+pass+uULAg==" }, "node_modules/mime": { "version": "2.6.0", @@ -10447,9 +9587,9 @@ } }, "node_modules/node-gyp-build": { - "version": "4.8.2", - "resolved": "https://registry.npmjs.org/node-gyp-build/-/node-gyp-build-4.8.2.tgz", - "integrity": "sha512-IRUxE4BVsHWXkV/SFOut4qTlagw2aM8T5/vnTsmrHJvVoKueJHRc/JaFND7QDDc61kLYUJ6qlZM3sqTSyx2dTw==", + "version": "4.8.4", + "resolved": "https://registry.npmjs.org/node-gyp-build/-/node-gyp-build-4.8.4.tgz", + "integrity": "sha512-LA4ZjwlnUblHVgq0oBF3Jl/6h/Nvs5fzBLwdEF4nuxnFdsfajde4WfxtJr3CaiH+F6ewcIB/q4jQ4UzPyid+CQ==", "dev": true, "optional": true, "bin": { @@ -10760,9 +9900,9 @@ } }, "node_modules/object-inspect": { - "version": "1.13.2", - "resolved": "https://registry.npmjs.org/object-inspect/-/object-inspect-1.13.2.tgz", - "integrity": "sha512-IRZSRuzJiynemAXPYtPe5BoI/RESNYR7TYm50MC5Mqbd3Jmw5y790sErYw3V6SryFJD64b74qQQs9wn5Bg/k3g==", + "version": "1.13.3", + "resolved": "https://registry.npmjs.org/object-inspect/-/object-inspect-1.13.3.tgz", + "integrity": "sha512-kDCGIbxkDSXE3euJZZXzc6to7fCrKHNI/hSRQnRuQ+BWjFNzZwiFF8fj/6o2t2G9/jTj8PSIYTfCLelLZEeRpA==", "dev": true, "engines": { "node": ">= 0.4" @@ -11378,13 +10518,13 @@ } }, "node_modules/postcss-modules-local-by-default": { - "version": "4.0.5", - "resolved": "https://registry.npmjs.org/postcss-modules-local-by-default/-/postcss-modules-local-by-default-4.0.5.tgz", - "integrity": "sha512-6MieY7sIfTK0hYfafw1OMEG+2bg8Q1ocHCpoWLqOKj3JXlKu4G7btkmM/B7lFubYkYWmRSPLZi5chid63ZaZYw==", + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/postcss-modules-local-by-default/-/postcss-modules-local-by-default-4.1.0.tgz", + "integrity": "sha512-rm0bdSv4jC3BDma3s9H19ZddW0aHX6EoqwDYU2IfZhRN+53QrufTRo2IdkAbRqLx4R2IYbZnbjKKxg4VN5oU9Q==", "dev": true, "dependencies": { "icss-utils": "^5.0.0", - "postcss-selector-parser": "^6.0.2", + "postcss-selector-parser": "^7.0.0", "postcss-value-parser": "^4.1.0" }, "engines": { @@ -11395,12 +10535,12 @@ } }, "node_modules/postcss-modules-scope": { - "version": "3.2.0", - "resolved": "https://registry.npmjs.org/postcss-modules-scope/-/postcss-modules-scope-3.2.0.tgz", - "integrity": "sha512-oq+g1ssrsZOsx9M96c5w8laRmvEu9C3adDSjI8oTcbfkrTE8hx/zfyobUoWIxaKPO8bt6S62kxpw5GqypEw1QQ==", + "version": "3.2.1", + "resolved": "https://registry.npmjs.org/postcss-modules-scope/-/postcss-modules-scope-3.2.1.tgz", + "integrity": "sha512-m9jZstCVaqGjTAuny8MdgE88scJnCiQSlSrOWcTQgM2t32UBe+MUmFSO5t7VMSfAf/FJKImAxBav8ooCHJXCJA==", "dev": true, "dependencies": { - "postcss-selector-parser": "^6.0.4" + "postcss-selector-parser": "^7.0.0" }, "engines": { "node": "^10 || ^12 || >= 14" @@ -11425,9 +10565,9 @@ } }, "node_modules/postcss-selector-parser": { - "version": "6.1.2", - "resolved": "https://registry.npmjs.org/postcss-selector-parser/-/postcss-selector-parser-6.1.2.tgz", - "integrity": "sha512-Q8qQfPiZ+THO/3ZrOrO0cJJKfpYCagtMUkXbnEfmgUjwXg6z/WBeOyS9APBBPCTSiDV+s4SwQGu8yFsiMRIudg==", + "version": "7.0.0", + "resolved": "https://registry.npmjs.org/postcss-selector-parser/-/postcss-selector-parser-7.0.0.tgz", + "integrity": "sha512-9RbEr1Y7FFfptd/1eEdntyjMwLeghW1bHX9GWjXo19vx4ytPQhANltvVxDggzJl7mnWM+dX28kb6cyS/4iQjlQ==", "dev": true, "dependencies": { "cssesc": "^3.0.0", @@ -11561,10 +10701,22 @@ "optional": true }, "node_modules/psl": { - "version": "1.9.0", - "resolved": "https://registry.npmjs.org/psl/-/psl-1.9.0.tgz", - "integrity": "sha512-E/ZsdU4HLs/68gYzgGTkMicWTLPdAftJLfJFlLUAAKZGkStNU72sZjT66SnMDVOfOWY/YAoiD7Jxa9iHvngcag==", - "dev": true + "version": "1.11.0", + "resolved": "https://registry.npmjs.org/psl/-/psl-1.11.0.tgz", + "integrity": "sha512-pjFdcBXT4g061k/SQkzNCRnav+1RdIOgrcX8hs5eL3CEQcFZP9qT8T1RWYxGKT11rH1DdIW+kJRfCYykBJuerQ==", + "dev": true, + "dependencies": { + "punycode": "^2.3.1" + } + }, + "node_modules/psl/node_modules/punycode": { + "version": "2.3.1", + "resolved": "https://registry.npmjs.org/punycode/-/punycode-2.3.1.tgz", + "integrity": "sha512-vYt7UD1U9Wg6138shLtLOvdAu+8DsC/ilFtEVHcH+wydcSpNE20AfSOduf6MkRFahL5FY7X1oU7nKVZFtfq8Fg==", + "dev": true, + "engines": { + "node": ">=6" + } }, "node_modules/public-encrypt": { "version": "4.0.3", @@ -11580,9 +10732,9 @@ } }, "node_modules/public-encrypt/node_modules/bn.js": { - "version": "4.12.0", - "resolved": "https://registry.npmjs.org/bn.js/-/bn.js-4.12.0.tgz", - "integrity": "sha512-c98Bf3tPniI+scsdk237ku1Dc3ujXQTSgyiPUDEOe7tRkhrqridvh8klBv0HCEso1OLOYcHuCv/cS6DNxKH+ZA==" + "version": "4.12.1", + "resolved": "https://registry.npmjs.org/bn.js/-/bn.js-4.12.1.tgz", + "integrity": "sha512-k8TVBiPkPJT9uHLdOKfFpqcfprwBFOAAXXozRubr7R7PfIuKvQlzcI4M0pALeqXN09vdaMbUdUj+pass+uULAg==" }, "node_modules/punycode": { "version": "1.4.1", @@ -12226,11 +11378,6 @@ "integrity": "sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg==", "dev": true }, - "node_modules/safevalues": { - "version": "0.3.4", - "resolved": "https://registry.npmjs.org/safevalues/-/safevalues-0.3.4.tgz", - "integrity": "sha512-LRneZZRXNgjzwG4bDQdOTSbze3fHm1EAKN/8bePxnlEZiBmkYEDggaHbuvHI9/hoqHbGfsEA7tWS9GhYHZBBsw==" - }, "node_modules/sass": { "version": "1.64.1", "resolved": "https://registry.npmjs.org/sass/-/sass-1.64.1.tgz", @@ -13543,9 +12690,9 @@ } }, "node_modules/tslib": { - "version": "2.8.0", - "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.8.0.tgz", - "integrity": "sha512-jWVzBLplnCmoaTr13V9dYbiQ99wvZRd0vNWaDRg+aVYRcjDF3nDksxFDE/+fkXnKhpnUUkmx5pK/v8mCtLVqZA==" + "version": "2.8.1", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.8.1.tgz", + "integrity": "sha512-oJFu94HQb+KVduSUQL7wnpmqnfmLsOA/nAh6b6EH0wCEoK0/mPeXU6c3wKDV83MkOuHPRHtSXKKU99IBazS/2w==" }, "node_modules/tuf-js": { "version": "1.1.7", diff --git a/frontend/package.json b/frontend/package.json index 4e12b17e00..7138227bca 100644 --- a/frontend/package.json +++ b/frontend/package.json @@ -1,8 +1,6 @@ { "author": "Envision Blockchain Solutions ", "dependencies": { - "@angular-material-components/datetime-picker": "^16.0.0", - "@angular-material-components/moment-adapter": "^16.0.0", "@angular/animations": "^16.2.12", "@angular/cdk": "^16.2.14", "@angular/common": "^16.2.12", @@ -10,7 +8,6 @@ "@angular/core": "^16.2.12", "@angular/forms": "^16.2.12", "@angular/google-maps": "^16.2.14", - "@angular/material": "^16.2.14", "@angular/platform-browser": "^16.2.12", "@angular/platform-browser-dynamic": "^16.2.12", "@angular/router": "^16.2.12", diff --git a/frontend/src/app/app.component.ts b/frontend/src/app/app.component.ts index d875b0e39e..ce0ac93f5c 100644 --- a/frontend/src/app/app.component.ts +++ b/frontend/src/app/app.component.ts @@ -8,7 +8,7 @@ import './modules/common/models/lang-modes/formula-lang.mode'; import './modules/common/models/lang-modes/single-line'; import { globalLoaderActive } from './static/global-loader.function'; import { ActivatedRoute } from '@angular/router'; -import { MatIconRegistry } from '@angular/material/icon'; +// import { MatIconRegistry } from '@angular/material/icon'; import { DomSanitizer } from '@angular/platform-browser'; @Component({ @@ -37,22 +37,22 @@ export class AppComponent implements OnInit { private brandingService: BrandingService, private activatedRoute: ActivatedRoute, private domSanitizer: DomSanitizer, - private matIconRegistry: MatIconRegistry + // private matIconRegistry: MatIconRegistry ) { - this.matIconRegistry.addSvgIconLiteral('policy-module', this.domSanitizer.bypassSecurityTrustHtml(` - - - - - - `)); - this.matIconRegistry.addSvgIconLiteral('policy-tool', this.domSanitizer.bypassSecurityTrustHtml(` - - - - - - `)); + // this.matIconRegistry.addSvgIconLiteral('policy-module', this.domSanitizer.bypassSecurityTrustHtml(` + // + // + // + // + // + // `)); + // this.matIconRegistry.addSvgIconLiteral('policy-tool', this.domSanitizer.bypassSecurityTrustHtml(` + // + // + // + // + // + // `)); activatedRoute.url.subscribe(segs => { this.url = segs.pop()!.path; }) diff --git a/frontend/src/app/components/standard-registry-card/standard-registry-card.component.ts b/frontend/src/app/components/standard-registry-card/standard-registry-card.component.ts index 5a290259bb..72225cf72b 100644 --- a/frontend/src/app/components/standard-registry-card/standard-registry-card.component.ts +++ b/frontend/src/app/components/standard-registry-card/standard-registry-card.component.ts @@ -1,7 +1,7 @@ import {Component, EventEmitter, Input, Output, SimpleChanges, ViewChild} from '@angular/core'; -import {MatIconRegistry} from '@angular/material/icon'; +// import {MatIconRegistry} from '@angular/material/icon'; // import { MatLegacyMenuTrigger as MatMenuTrigger } from '@angular/material/legacy-menu'; -import {DomSanitizer} from '@angular/platform-browser'; +// import {DomSanitizer} from '@angular/platform-browser'; import {IStandardRegistryResponse} from '@guardian/interfaces'; import {OverlayPanel} from 'primeng/overlaypanel'; @@ -21,15 +21,18 @@ export class StandardRegistryCardComponent { private ignoreFields: string[] = ['@context', 'id', 'type']; - constructor(private matIconRegistry: MatIconRegistry, private domSanitizer: DomSanitizer) { - this.matIconRegistry.addSvgIconLiteral( - 'chevron_down', - this.domSanitizer.bypassSecurityTrustHtml(` - - - - `) - ); + constructor( + // private matIconRegistry: MatIconRegistry, + // private domSanitizer: DomSanitizer + ) { + // this.matIconRegistry.addSvgIconLiteral( + // 'chevron_down', + // this.domSanitizer.bypassSecurityTrustHtml(` + // + // + // + // `) + // ); } ngOnChanges(changes: SimpleChanges) { diff --git a/frontend/src/app/modules/common/common-components.module.ts b/frontend/src/app/modules/common/common-components.module.ts index 4903a2d0c0..56a2a207d5 100644 --- a/frontend/src/app/modules/common/common-components.module.ts +++ b/frontend/src/app/modules/common/common-components.module.ts @@ -1,7 +1,7 @@ import { NgModule } from '@angular/core'; import { CommonModule } from '@angular/common'; import { FormsModule } from '@angular/forms'; -import { NgxMatDatetimePickerModule } from '@angular-material-components/datetime-picker'; +// import { NgxMatDatetimePickerModule } from '@angular-material-components/datetime-picker'; import { MaterialModule } from './material.module'; import { DatetimePicker } from './datetime-picker/datetime-picker.component'; import { HederaExplorer } from './hedera-explorer/hedera-explorer.component'; @@ -73,7 +73,7 @@ import {TooltipModule} from 'primeng/tooltip'; CommonModule, FormsModule, MaterialModule, - NgxMatDatetimePickerModule, + // NgxMatDatetimePickerModule, NgxFileDropModule, NgxColorsModule, NgxMaskDirective, diff --git a/frontend/src/app/modules/common/compare-viewer/compare-viewer.component.ts b/frontend/src/app/modules/common/compare-viewer/compare-viewer.component.ts index 6896ab8868..129d12da5b 100644 --- a/frontend/src/app/modules/common/compare-viewer/compare-viewer.component.ts +++ b/frontend/src/app/modules/common/compare-viewer/compare-viewer.component.ts @@ -2,7 +2,7 @@ import { Component, Input, OnInit, ViewChild } from '@angular/core'; import { CompareStorage } from '../../../services/compare-storage.service'; import { Subscription } from 'rxjs'; import { Router } from '@angular/router'; -import { MatLegacyMenuTrigger as MatMenuTrigger } from '@angular/material/legacy-menu'; +// import { MatLegacyMenuTrigger as MatMenuTrigger } from '@angular/material/legacy-menu'; @Component({ selector: 'app-compare-viewer', @@ -13,7 +13,7 @@ export class CompareViewerComponent implements OnInit { @Input() active: boolean = false; @Input() collapsed: boolean = false; - @ViewChild(MatMenuTrigger) compareMenu: MatMenuTrigger; + // @ViewChild(MatMenuTrigger) compareMenu: MatMenuTrigger; public count: number = 0; public ids: string[]; @@ -74,9 +74,9 @@ export class CompareViewerComponent implements OnInit { } public onCompare(): void { - if (this.compareMenu) { - this.compareMenu.closeMenu(); - } + // if (this.compareMenu) { + // this.compareMenu.closeMenu(); + // } if (this.selectedCount > 1) { const ids = this.ids.filter(id => this.selected[id]); const items = btoa(JSON.stringify({ diff --git a/frontend/src/app/modules/common/step-tree/step-tree.component.ts b/frontend/src/app/modules/common/step-tree/step-tree.component.ts index fe1b5d7c42..0790bf2fb9 100644 --- a/frontend/src/app/modules/common/step-tree/step-tree.component.ts +++ b/frontend/src/app/modules/common/step-tree/step-tree.component.ts @@ -6,7 +6,7 @@ import { Output, SimpleChanges, } from '@angular/core'; -import { MatTreeNestedDataSource } from '@angular/material/tree'; +// import { MatTreeNestedDataSource } from '@angular/material/tree'; interface TreeNode { name: string; @@ -20,7 +20,8 @@ interface TreeNode { }) export class StepTreeComponent { treeControl = new NestedTreeControl((node) => node.children); - dataSource = new MatTreeNestedDataSource(); + // dataSource = new MatTreeNestedDataSource(); + dataSource: any @Input('treeData') treeData!: any; @Input('currentNode') currentNode!: any; diff --git a/frontend/src/app/modules/contract-engine/dialogs/set-pool-dialog/set-pool-dialog.component.ts b/frontend/src/app/modules/contract-engine/dialogs/set-pool-dialog/set-pool-dialog.component.ts index 030a8c3e75..a302fd73b9 100644 --- a/frontend/src/app/modules/contract-engine/dialogs/set-pool-dialog/set-pool-dialog.component.ts +++ b/frontend/src/app/modules/contract-engine/dialogs/set-pool-dialog/set-pool-dialog.component.ts @@ -10,7 +10,7 @@ import { Validators, } from '@angular/forms'; import {moreThanZeroValidator} from 'src/app/validators/more-than-zero.validator'; -import {MAT_LEGACY_RADIO_DEFAULT_OPTIONS as MAT_RADIO_DEFAULT_OPTIONS} from '@angular/material/legacy-radio'; +// import {MAT_LEGACY_RADIO_DEFAULT_OPTIONS as MAT_RADIO_DEFAULT_OPTIONS} from '@angular/material/legacy-radio'; import {Token} from '@guardian/interfaces'; import {TokenService} from 'src/app/services/token.service'; import {DynamicDialogRef} from 'primeng/dynamicdialog'; @@ -23,10 +23,10 @@ import {DynamicDialogRef} from 'primeng/dynamicdialog'; templateUrl: './set-pool-dialog.component.html', styleUrls: ['./set-pool-dialog.component.scss'], providers: [ - { - provide: MAT_RADIO_DEFAULT_OPTIONS, - useValue: {color: 'primary'}, - }, + // { + // provide: MAT_RADIO_DEFAULT_OPTIONS, + // useValue: {color: 'primary'}, + // }, ], }) export class SetPoolDialogComponent { diff --git a/frontend/src/app/modules/policy-engine/policy-viewer/blocks/messages-report-block/messages-report-block.component.ts b/frontend/src/app/modules/policy-engine/policy-viewer/blocks/messages-report-block/messages-report-block.component.ts index 0616320cf8..d9e56700d0 100644 --- a/frontend/src/app/modules/policy-engine/policy-viewer/blocks/messages-report-block/messages-report-block.component.ts +++ b/frontend/src/app/modules/policy-engine/policy-viewer/blocks/messages-report-block/messages-report-block.component.ts @@ -1,7 +1,7 @@ import { Component, ElementRef, HostListener, Input, OnInit } from '@angular/core'; import { UntypedFormBuilder, Validators } from '@angular/forms'; // import { MatLegacyDialog as MatDialog } from '@angular/material/legacy-dialog'; -import { MatIconRegistry } from '@angular/material/icon'; +// import { MatIconRegistry } from '@angular/material/icon'; import { DomSanitizer } from '@angular/platform-browser'; import * as moment from 'moment'; import { DialogService } from 'primeng/dynamicdialog'; @@ -267,14 +267,14 @@ export class MessagesReportBlockComponent implements OnInit { private policyHelper: PolicyHelper, // private dialog: DialogService, private dialogService: DialogService, - private iconRegistry: MatIconRegistry, + // private iconRegistry: MatIconRegistry, private sanitizer: DomSanitizer ) { - iconRegistry.addSvgIconLiteral('token', sanitizer.bypassSecurityTrustHtml(` - - - - `)); + // iconRegistry.addSvgIconLiteral('token', sanitizer.bypassSecurityTrustHtml(` + // + // + // + // `)); } public ngOnInit(): void { diff --git a/frontend/src/app/modules/policy-engine/policy-viewer/blocks/report-block/report-block.component.html b/frontend/src/app/modules/policy-engine/policy-viewer/blocks/report-block/report-block.component.html index 2e1a6ea644..53bcc97ea2 100644 --- a/frontend/src/app/modules/policy-engine/policy-viewer/blocks/report-block/report-block.component.html +++ b/frontend/src/app/modules/policy-engine/policy-viewer/blocks/report-block/report-block.component.html @@ -517,16 +517,10 @@

Policy Overview

(click)="onScrollButtonPress(scrollContainer, 150)" class="scroll-right" > - <<<<<<< HEAD - - - - ======= - >>>>>>> develop
diff --git a/frontend/src/app/modules/policy-engine/policy-viewer/blocks/report-block/report-block.component.ts b/frontend/src/app/modules/policy-engine/policy-viewer/blocks/report-block/report-block.component.ts index d6eb5fad7f..a0ba70487e 100644 --- a/frontend/src/app/modules/policy-engine/policy-viewer/blocks/report-block/report-block.component.ts +++ b/frontend/src/app/modules/policy-engine/policy-viewer/blocks/report-block/report-block.component.ts @@ -1,8 +1,8 @@ -import { Component, Input, OnInit } from '@angular/core'; -import { UntypedFormBuilder, Validators } from '@angular/forms'; +import {Component, Input, OnInit} from '@angular/core'; +import {UntypedFormBuilder, Validators} from '@angular/forms'; // import { MatLegacyDialog as MatDialog } from '@angular/material/legacy-dialog'; -import { MatIconRegistry } from '@angular/material/icon'; -import { DomSanitizer } from '@angular/platform-browser'; +// import { MatIconRegistry } from '@angular/material/icon'; +// import { DomSanitizer } from '@angular/platform-browser'; import { IImpactReport, IconType, @@ -13,13 +13,13 @@ import { IVCReport, IVPReport, } from '@guardian/interfaces'; -import { VCViewerDialog } from 'src/app/modules/schema-engine/vc-dialog/vc-dialog.component'; -import { IPFSService } from 'src/app/services/ipfs.service'; -import { PolicyEngineService } from 'src/app/services/policy-engine.service'; -import { WebSocketService } from 'src/app/services/web-socket.service'; -import { IconsArray } from './iconsArray'; -import { DialogService } from 'primeng/dynamicdialog'; -import { HttpErrorResponse } from '@angular/common/http'; +import {VCViewerDialog} from 'src/app/modules/schema-engine/vc-dialog/vc-dialog.component'; +import {IPFSService} from 'src/app/services/ipfs.service'; +import {PolicyEngineService} from 'src/app/services/policy-engine.service'; +import {WebSocketService} from 'src/app/services/web-socket.service'; +import {IconsArray} from './iconsArray'; +import {DialogService} from 'primeng/dynamicdialog'; +import {HttpErrorResponse} from '@angular/common/http'; interface IAdditionalDocument { vpDocument?: IVPReport | undefined; @@ -61,17 +61,17 @@ export class ReportBlockComponent implements OnInit { private fb: UntypedFormBuilder, // public dialog: MatDialog, private dialogService: DialogService, - iconRegistry: MatIconRegistry, - sanitizer: DomSanitizer, + // iconRegistry: MatIconRegistry, + // sanitizer: DomSanitizer, private ipfs: IPFSService ) { - for (let i = 0; i < IconsArray.length; i++) { - const element = IconsArray[i]; - iconRegistry.addSvgIconLiteral( - element.name, - sanitizer.bypassSecurityTrustHtml(element.icon) - ); - } + // for (let i = 0; i < IconsArray.length; i++) { + // const element = IconsArray[i]; + // iconRegistry.addSvgIconLiteral( + // element.name, + // sanitizer.bypassSecurityTrustHtml(element.icon) + // ); + // } } ngOnInit(): void { @@ -249,7 +249,8 @@ export class ReportBlockComponent implements OnInit { type: 'VC', } }); - dialogRef.onClose.subscribe(async (result) => {}); + dialogRef.onClose.subscribe(async (result) => { + }); } openVPDocument(item: any) { @@ -268,7 +269,8 @@ export class ReportBlockComponent implements OnInit { type: 'VP', } }); - dialogRef.onClose.subscribe(async (result) => {}); + dialogRef.onClose.subscribe(async (result) => { + }); } openJsonDocument(item: ITokenReport) { @@ -284,7 +286,8 @@ export class ReportBlockComponent implements OnInit { type: 'JSON', } }); - dialogRef.onClose.subscribe(async (result) => {}); + dialogRef.onClose.subscribe(async (result) => { + }); } mapData(data: any[]) { @@ -324,7 +327,7 @@ export class ReportBlockComponent implements OnInit { onBackClick() { this.loading = true; this.policyEngineService - .setBlockData(this.id, this.policyId, { filterValue: null }) + .setBlockData(this.id, this.policyId, {filterValue: null}) .subscribe( () => { this.loadData(); diff --git a/frontend/src/app/modules/schema-engine/document-view/document-view.component.ts b/frontend/src/app/modules/schema-engine/document-view/document-view.component.ts index 89ce741a8b..3e2bd78ec3 100644 --- a/frontend/src/app/modules/schema-engine/document-view/document-view.component.ts +++ b/frontend/src/app/modules/schema-engine/document-view/document-view.component.ts @@ -1,5 +1,5 @@ import { ChangeDetectionStrategy, ChangeDetectorRef, Component, Input, OnInit, } from '@angular/core'; -import { LegacyPageEvent as PageEvent } from '@angular/material/legacy-paginator'; +// import { LegacyPageEvent as PageEvent } from '@angular/material/legacy-paginator'; import { Schema } from '@guardian/interfaces'; import { forkJoin, Subject } from 'rxjs'; import { takeUntil } from 'rxjs/operators'; diff --git a/frontend/src/app/modules/schema-engine/schema-engine.module.ts b/frontend/src/app/modules/schema-engine/schema-engine.module.ts index 6b4dbd9985..5bf4f452e1 100644 --- a/frontend/src/app/modules/schema-engine/schema-engine.module.ts +++ b/frontend/src/app/modules/schema-engine/schema-engine.module.ts @@ -1,7 +1,7 @@ import { NgModule } from '@angular/core'; import { CommonModule } from '@angular/common'; import { FormsModule } from '@angular/forms'; -import { NgxMatDatetimePickerModule, NgxMatNativeDateModule, NgxMatTimepickerModule, } from '@angular-material-components/datetime-picker'; +// import { NgxMatDatetimePickerModule, NgxMatNativeDateModule, NgxMatTimepickerModule, } from '@angular-material-components/datetime-picker'; import { ClipboardModule } from '@angular/cdk/clipboard'; import { CodemirrorModule } from '@ctrl/ngx-codemirror'; import { GoogleMapsModule } from '@angular/google-maps'; @@ -71,9 +71,9 @@ import { AccordionModule } from 'primeng/accordion'; FormsModule, CommonComponentsModule, MaterialModule, - NgxMatDatetimePickerModule, - NgxMatNativeDateModule, - NgxMatTimepickerModule, + // NgxMatDatetimePickerModule, + // NgxMatNativeDateModule, + // NgxMatTimepickerModule, ClipboardModule, CodemirrorModule, ArtifactEngineModule, diff --git a/frontend/src/app/modules/schema-engine/schema-form-view/schema-form-view.component.ts b/frontend/src/app/modules/schema-engine/schema-form-view/schema-form-view.component.ts index 9c294558c8..121e560db6 100644 --- a/frontend/src/app/modules/schema-engine/schema-form-view/schema-form-view.component.ts +++ b/frontend/src/app/modules/schema-engine/schema-form-view/schema-form-view.component.ts @@ -1,5 +1,5 @@ -import { NGX_MAT_DATE_FORMATS, NgxMatDateAdapter } from '@angular-material-components/datetime-picker'; -import { NgxMatMomentAdapter } from '@angular-material-components/moment-adapter'; +// import { NGX_MAT_DATE_FORMATS, NgxMatDateAdapter } from '@angular-material-components/datetime-picker'; +// import { NgxMatMomentAdapter } from '@angular-material-components/moment-adapter'; import { ChangeDetectionStrategy, ChangeDetectorRef, Component, Input, OnInit, SimpleChanges } from '@angular/core'; import { Schema, SchemaField, UnitSystem } from '@guardian/interfaces'; import { IPFSService } from 'src/app/services/ipfs.service'; @@ -33,8 +33,8 @@ interface IFieldIndexControl { templateUrl: './schema-form-view.component.html', styleUrls: ['./schema-form-view.component.scss'], providers: [ - { provide: NgxMatDateAdapter, useClass: NgxMatMomentAdapter }, - { provide: NGX_MAT_DATE_FORMATS, useValue: GUARDIAN_DATETIME_FORMAT } + // { provide: NgxMatDateAdapter, useClass: NgxMatMomentAdapter }, + // { provide: NGX_MAT_DATE_FORMATS, useValue: GUARDIAN_DATETIME_FORMAT } ], changeDetection: ChangeDetectionStrategy.OnPush }) diff --git a/frontend/src/app/modules/schema-engine/schema-form/schema-form.component.ts b/frontend/src/app/modules/schema-engine/schema-form/schema-form.component.ts index 924662d05e..e6e6dd6e86 100644 --- a/frontend/src/app/modules/schema-engine/schema-form/schema-form.component.ts +++ b/frontend/src/app/modules/schema-engine/schema-form/schema-form.component.ts @@ -1,5 +1,5 @@ -import { NGX_MAT_DATE_FORMATS, NgxMatDateAdapter } from '@angular-material-components/datetime-picker'; -import { NgxMatMomentAdapter } from '@angular-material-components/moment-adapter'; +// import { NGX_MAT_DATE_FORMATS, NgxMatDateAdapter } from '@angular-material-components/datetime-picker'; +// import { NgxMatMomentAdapter } from '@angular-material-components/moment-adapter'; import { ChangeDetectorRef, Component, EventEmitter, Input, OnInit, Output, SimpleChanges } from '@angular/core'; import { AbstractControl, UntypedFormArray, UntypedFormControl, UntypedFormGroup, ValidationErrors, ValidatorFn, Validators } from '@angular/forms'; import { GenerateUUIDv4, Schema, SchemaField, UnitSystem } from '@guardian/interfaces'; @@ -94,8 +94,8 @@ interface IFieldIndexControl { templateUrl: './schema-form.component.html', styleUrls: ['./schema-form.component.scss'], providers: [ - { provide: NgxMatDateAdapter, useClass: NgxMatMomentAdapter }, - { provide: NGX_MAT_DATE_FORMATS, useValue: GUARDIAN_DATETIME_FORMAT } + // { provide: NgxMatDateAdapter, useClass: NgxMatMomentAdapter }, + // { provide: NGX_MAT_DATE_FORMATS, useValue: GUARDIAN_DATETIME_FORMAT } ] }) export class SchemaFormComponent implements OnInit { diff --git a/frontend/src/app/views/admin/logs-view/logs-view.component.ts b/frontend/src/app/views/admin/logs-view/logs-view.component.ts index 4eeeb16da4..3360df26b5 100644 --- a/frontend/src/app/views/admin/logs-view/logs-view.component.ts +++ b/frontend/src/app/views/admin/logs-view/logs-view.component.ts @@ -1,7 +1,7 @@ import { Component, ElementRef, EventEmitter, OnDestroy, OnInit, ViewChild } from '@angular/core'; import { UntypedFormBuilder, UntypedFormControl } from '@angular/forms'; -import { MatLegacyAutocompleteSelectedEvent as MatAutocompleteSelectedEvent, MatLegacyAutocompleteTrigger as MatAutocompleteTrigger } from '@angular/material/legacy-autocomplete'; -import { MatLegacyChipInputEvent as MatChipInputEvent } from '@angular/material/legacy-chips'; +// import { MatLegacyAutocompleteSelectedEvent as MatAutocompleteSelectedEvent, MatLegacyAutocompleteTrigger as MatAutocompleteTrigger } from '@angular/material/legacy-autocomplete'; +// import { MatLegacyChipInputEvent as MatChipInputEvent } from '@angular/material/legacy-chips'; import { saveAs } from 'file-saver'; import { ILog } from '@guardian/interfaces'; import * as moment from 'moment'; @@ -56,7 +56,7 @@ export class LogsViewComponent implements OnInit, OnDestroy { { id: 'INFO', label: 'Info' }, ]; - @ViewChild(MatAutocompleteTrigger) autocomplete: MatAutocompleteTrigger; + // @ViewChild(MatAutocompleteTrigger) autocomplete: MatAutocompleteTrigger; onSearch: EventEmitter = new EventEmitter(); pageSize: number = 10; pageIndex: number = 0; @@ -192,27 +192,27 @@ export class LogsViewComponent implements OnInit, OnDestroy { this.onApply(); } - add(event: MatChipInputEvent, auto: any): void { - const value = (event.value || '').trim(); - const attributes = this.searchForm.get('attributes')!.value; - - if (value) { - const attrList = this.logService.getAttributes(value, this.searchForm?.get('attributes')?.value).subscribe(attrs => { - const firstAttr = attrs[0]; - if (firstAttr) { - attributes.push(firstAttr); - } - event.chipInput!.clear(); - this.autocomplete.closePanel(); - this.autoCompleteControl.patchValue(''); - this.onApply(); - attrList.unsubscribe(); - }) - } else { - event.chipInput!.clear(); - this.onApply(); - } - } + // add(event: MatChipInputEvent, auto: any): void { + // const value = (event.value || '').trim(); + // const attributes = this.searchForm.get('attributes')!.value; + // + // if (value) { + // const attrList = this.logService.getAttributes(value, this.searchForm?.get('attributes')?.value).subscribe(attrs => { + // const firstAttr = attrs[0]; + // if (firstAttr) { + // attributes.push(firstAttr); + // } + // event.chipInput!.clear(); + // this.autocomplete.closePanel(); + // this.autoCompleteControl.patchValue(''); + // this.onApply(); + // attrList.unsubscribe(); + // }) + // } else { + // event.chipInput!.clear(); + // this.onApply(); + // } + // } onApply() { const value = this.searchForm.value; @@ -263,7 +263,8 @@ export class LogsViewComponent implements OnInit, OnDestroy { ); } - selected(event: MatAutocompleteSelectedEvent): void { + selected(event: any): void { + // MatAutocompleteSelectedEvent const value = (event.option.viewValue || '').trim(); const attributes = this.searchForm.get('attributes')!.value; diff --git a/frontend/src/app/views/trust-chain/trust-chain.component.ts b/frontend/src/app/views/trust-chain/trust-chain.component.ts index 95cc3be8a9..9b0a426b57 100644 --- a/frontend/src/app/views/trust-chain/trust-chain.component.ts +++ b/frontend/src/app/views/trust-chain/trust-chain.component.ts @@ -1,15 +1,15 @@ -import { Component, OnInit } from '@angular/core'; -import { UntypedFormBuilder, Validators } from '@angular/forms'; +import {Component, OnInit} from '@angular/core'; +import {UntypedFormBuilder, Validators} from '@angular/forms'; // import { MatLegacyDialog as MatDialog } from '@angular/material/legacy-dialog'; -import { MatIconRegistry } from '@angular/material/icon'; -import { DomSanitizer } from '@angular/platform-browser'; -import { ActivatedRoute, Router } from '@angular/router'; -import { IVC } from '@guardian/interfaces'; -import { AuditService } from '../../services/audit.service'; -import { AuthService } from '../../services/auth.service'; -import { forkJoin } from 'rxjs'; -import { VCViewerDialog } from '../../modules/schema-engine/vc-dialog/vc-dialog.component'; -import { DialogService } from 'primeng/dynamicdialog'; +// import { MatIconRegistry } from '@angular/material/icon'; +import {DomSanitizer} from '@angular/platform-browser'; +import {ActivatedRoute, Router} from '@angular/router'; +import {IVC} from '@guardian/interfaces'; +import {AuditService} from '../../services/audit.service'; +import {AuthService} from '../../services/auth.service'; +import {forkJoin} from 'rxjs'; +import {VCViewerDialog} from '../../modules/schema-engine/vc-dialog/vc-dialog.component'; +import {DialogService} from 'primeng/dynamicdialog'; /** * Page to find VP Documents and display Trust Chain. @@ -40,23 +40,23 @@ export class TrustChainComponent implements OnInit { private fb: UntypedFormBuilder, // public dialog: MatDialog, private dialogService: DialogService, - iconRegistry: MatIconRegistry, + // iconRegistry: MatIconRegistry, sanitizer: DomSanitizer ) { - iconRegistry.addSvgIconLiteral('iot', sanitizer.bypassSecurityTrustHtml(` - - `)); - iconRegistry.addSvgIconLiteral('mrv', sanitizer.bypassSecurityTrustHtml(` - - - - `)); - iconRegistry.addSvgIconLiteral('token', sanitizer.bypassSecurityTrustHtml(` - - - - `)); +// iconRegistry.addSvgIconLiteral('iot', sanitizer.bypassSecurityTrustHtml(` +// +// `)); +// iconRegistry.addSvgIconLiteral('mrv', sanitizer.bypassSecurityTrustHtml(` +// +// +// +// `)); +// iconRegistry.addSvgIconLiteral('token', sanitizer.bypassSecurityTrustHtml(` +// +// +// +// `)); } ngOnInit() { @@ -91,7 +91,7 @@ export class TrustChainComponent implements OnInit { ]).subscribe((value) => { const documents: any = value[0]; - const { chain, userMap } = documents; + const {chain, userMap} = documents; this.userMap = {}; userMap.forEach((user: any) => { this.userMap[user.did] = user.username; @@ -131,7 +131,7 @@ export class TrustChainComponent implements OnInit { } this.loading = false; - }, ({ message }) => { + }, ({message}) => { this.loading = false; console.error(message); }); @@ -140,7 +140,6 @@ export class TrustChainComponent implements OnInit { } } - openVCDocument(item: any) { const title = `${item.type?.toUpperCase()} Document`; const dialogRef = this.dialogService.open(VCViewerDialog, { @@ -157,7 +156,8 @@ export class TrustChainComponent implements OnInit { type: 'VC' } }); - dialogRef.onClose.subscribe(async (result) => { }); + dialogRef.onClose.subscribe(async (result) => { + }); } openVPDocument(item: any) { @@ -176,7 +176,8 @@ export class TrustChainComponent implements OnInit { type: 'VP' } }); - dialogRef.onClose.subscribe(async (result) => { }); + dialogRef.onClose.subscribe(async (result) => { + }); } openJsonDocument(item: any) { @@ -194,7 +195,8 @@ export class TrustChainComponent implements OnInit { type: 'JSON', } }); - dialogRef.onClose.subscribe(async (result) => { }); + dialogRef.onClose.subscribe(async (result) => { + }); } mapData(data: any[]) { From 74e5c34b36e80c12d0be5cf38c56c57c6811e30f Mon Sep 17 00:00:00 2001 From: envision-ci-agent Date: Thu, 21 Nov 2024 17:20:29 +0000 Subject: [PATCH 23/48] [skip ci] Add swagger.yaml --- swagger-analytics.yaml | 2 +- swagger-indexer.yaml | 2 +- swagger.yaml | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/swagger-analytics.yaml b/swagger-analytics.yaml index a3c2ecb53a..0bafe2aceb 100644 --- a/swagger-analytics.yaml +++ b/swagger-analytics.yaml @@ -208,7 +208,7 @@ info: the heart of the Guardian solution is a sophisticated Policy Workflow Engine (PWE) that enables applications to offer a requirements-based tokenization implementation. - version: 2.27.1 + version: 3.0.0 contact: name: API developer url: https://envisionblockchain.com diff --git a/swagger-indexer.yaml b/swagger-indexer.yaml index 04a6e2775e..34b4b755d2 100644 --- a/swagger-indexer.yaml +++ b/swagger-indexer.yaml @@ -1875,7 +1875,7 @@ info: the heart of the Guardian solution is a sophisticated Policy Workflow Engine (PWE) that enables applications to offer a requirements-based tokenization implementation. - version: 2.27.1 + version: 3.0.0 contact: name: API developer url: https://envisionblockchain.com diff --git a/swagger.yaml b/swagger.yaml index eb910980a2..865dd23339 100644 --- a/swagger.yaml +++ b/swagger.yaml @@ -13142,7 +13142,7 @@ info: the heart of the Guardian solution is a sophisticated Policy Workflow Engine (PWE) that enables applications to offer a requirements-based tokenization implementation. - version: 2.27.1 + version: 3.0.0 contact: name: API developer url: https://envisionblockchain.com From 8e88b6b3a9b281fa7eabb4c2f965fafadc98b207 Mon Sep 17 00:00:00 2001 From: Ihar Date: Mon, 25 Nov 2024 22:18:53 +0500 Subject: [PATCH 24/48] feat: move to 17 vertion of angular[4194] --- frontend/package.json | 44 +++++++++---------- .../button-block/button-block.component.ts | 1 + .../geojson-type/geojson-type.component.ts | 2 +- .../src/app/services/policy-helper.service.ts | 2 +- 4 files changed, 25 insertions(+), 24 deletions(-) diff --git a/frontend/package.json b/frontend/package.json index 7138227bca..28b865c8da 100644 --- a/frontend/package.json +++ b/frontend/package.json @@ -1,24 +1,24 @@ { "author": "Envision Blockchain Solutions ", "dependencies": { - "@angular/animations": "^16.2.12", - "@angular/cdk": "^16.2.14", - "@angular/common": "^16.2.12", - "@angular/compiler": "^16.2.12", - "@angular/core": "^16.2.12", - "@angular/forms": "^16.2.12", - "@angular/google-maps": "^16.2.14", - "@angular/platform-browser": "^16.2.12", - "@angular/platform-browser-dynamic": "^16.2.12", - "@angular/router": "^16.2.12", + "@angular/animations": "^17.3.12", + "@angular/cdk": "^17.3.10", + "@angular/common": "^17.3.12", + "@angular/compiler": "^17.3.12", + "@angular/core": "^17.3.12", + "@angular/forms": "^17.3.12", + "@angular/google-maps": "^17.3.10", + "@angular/platform-browser": "^17.3.12", + "@angular/platform-browser-dynamic": "^17.3.12", + "@angular/router": "^17.3.12", "@ctrl/ngx-codemirror": "^5.1.1", "@enonic/global-polyfill": "^1.0.0", "@formulajs/formulajs": "^4.4.6", "@guardian/interfaces": "file:../interfaces", "ajv": "^8.17.1", "ajv-formats": "^3.0.1", - "angular-svg-icon": "^16.0.0", - "angularx-qrcode": "^16.0.0", + "angular-svg-icon": "^16.1.0", + "angularx-qrcode": "^17.0.1", "codemirror": "^5.65.0", "cronstrue": "^2.4.0", "crypto-browserify": "^3.12.0", @@ -29,22 +29,22 @@ "moment": "^2.29.2", "moment-timezone": "^0.5.43", "ngx-colors": "3.1.4", - "ngx-drag-drop": "^16.0.0", + "ngx-drag-drop": "^17.0.0", "ngx-file-drop": "^16.0.0", - "ngx-mask": "^16.4.2", - "ngx-toastr": "^16.2.0", + "ngx-mask": "^17.1.8", + "ngx-toastr": "^17.0.2", "primeicons": "^7.0.0", - "primeng": "^16.9.1", + "primeng": "^17.18.12", "process": "^0.11.10", - "rxjs": "~6.6.0", + "rxjs": "~7.8.1", "stream-browserify": "^3.0.0", "tslib": "^2.2.0", - "zone.js": "~0.13.3" + "zone.js": "~0.14.10" }, "devDependencies": { - "@angular-devkit/build-angular": "^16.2.16", - "@angular/cli": "^16.2.16", - "@angular/compiler-cli": "^16.2.12", + "@angular-devkit/build-angular": "^17.3.11", + "@angular/cli": "^17.3.11", + "@angular/compiler-cli": "^17.3.12", "@types/file-saver": "^2.0.5", "@types/jasmine": "~3.6.0", "@types/js-yaml": "^4.0.5", @@ -57,7 +57,7 @@ "karma-jasmine": "~4.0.0", "karma-jasmine-html-reporter": "^1.7.0", "prettier": "3.0.2", - "typescript": "^4.9.5" + "typescript": "^5.4.5" }, "license": "Apache-2.0", "name": "guardian", diff --git a/frontend/src/app/modules/policy-engine/policy-viewer/blocks/button-block/button-block.component.ts b/frontend/src/app/modules/policy-engine/policy-viewer/blocks/button-block/button-block.component.ts index b64bd5c15e..807ff0a6e6 100644 --- a/frontend/src/app/modules/policy-engine/policy-viewer/blocks/button-block/button-block.component.ts +++ b/frontend/src/app/modules/policy-engine/policy-viewer/blocks/button-block/button-block.component.ts @@ -89,6 +89,7 @@ export class ButtonBlockComponent implements OnInit, AfterContentChecked { this.setData(this.static); setTimeout(() => { this.loading = false; + this.cdref.detectChanges(); }, 500); } else { this.policyEngineService diff --git a/frontend/src/app/modules/schema-engine/geojson-type/geojson-type.component.ts b/frontend/src/app/modules/schema-engine/geojson-type/geojson-type.component.ts index af99b6c748..db2a8ead08 100644 --- a/frontend/src/app/modules/schema-engine/geojson-type/geojson-type.component.ts +++ b/frontend/src/app/modules/schema-engine/geojson-type/geojson-type.component.ts @@ -39,7 +39,7 @@ export class GeojsonTypeComponent implements OnInit, OnChanges { commonOptions: google.maps.MarkerOptions & google.maps.PolygonOptions & google.maps.PolylineOptions = { - animation: 2, + animation: google.maps.Animation.DROP, clickable: false, }; type: GeoJsonType = GeoJsonType.POINT; diff --git a/frontend/src/app/services/policy-helper.service.ts b/frontend/src/app/services/policy-helper.service.ts index f9a42eb321..97a02ab9e6 100644 --- a/frontend/src/app/services/policy-helper.service.ts +++ b/frontend/src/app/services/policy-helper.service.ts @@ -43,7 +43,7 @@ export class PolicyHelper { } } } - this.subject.next(); + this.subject.next(null); } } catch (error) { this.policyId = null; From 1c9cdc20a621b67382891be91c5a46a8f4a55649 Mon Sep 17 00:00:00 2001 From: Ihar Date: Wed, 27 Nov 2024 18:58:53 +0500 Subject: [PATCH 25/48] feat: migration to angular 18[4194] --- frontend/angular.json | 20 ++++++----- frontend/package.json | 36 +++++++++---------- frontend/src/app/app.module.ts | 23 +++++------- .../datetime-picker.component.ts | 2 +- .../cron-config-dialog.component.ts | 2 +- .../policy-properties.component.html | 4 +-- .../external-topic-block.component.ts | 2 +- .../messages-report-block.component.ts | 2 +- .../report-block/report-block.component.ts | 2 +- .../token-confirmation-block.component.ts | 2 +- .../policy-engine/services/wizard.service.ts | 2 +- .../project-comparison.module.ts | 22 +++++------- .../schema-configuration.component.ts | 2 +- .../schema-form/schema-form.component.ts | 2 +- .../modules/tag-engine/models/tags-history.ts | 2 +- .../tags-explorer-dialog.component.ts | 2 +- .../admin/logs-view/logs-view.component.ts | 2 +- frontend/tsconfig.json | 3 +- 18 files changed, 60 insertions(+), 72 deletions(-) diff --git a/frontend/angular.json b/frontend/angular.json index e3f47721fb..6ed42b33da 100644 --- a/frontend/angular.json +++ b/frontend/angular.json @@ -8,15 +8,13 @@ "guardian": { "architect": { "build": { - "builder": "@angular-devkit/build-angular:browser", + "builder": "@angular-devkit/build-angular:application", "configurations": { "development": { - "buildOptimizer": false, - "extractLicenses": false, + "extractLicenses": false, "namedChunks": true, "optimization": false, - "sourceMap": true, - "vendorChunk": true + "sourceMap": true }, "production": { "budgets": [ @@ -99,9 +97,12 @@ ], "index": "src/index.html", "inlineStyleLanguage": "scss", - "main": "src/main.ts", - "outputPath": "dist/guardian", - "polyfills": "src/polyfills.ts", + "outputPath": { + "base": "dist/guardian" + }, + "polyfills": [ + "src/polyfills.ts" + ], "scripts": [ "./node_modules/leader-line/leader-line.min.js" ], @@ -112,7 +113,8 @@ "./node_modules/primeicons/primeicons.css", "src/styles.scss" ], - "tsConfig": "tsconfig.app.json" + "tsConfig": "tsconfig.app.json", + "browser": "src/main.ts" } }, "extract-i18n": { diff --git a/frontend/package.json b/frontend/package.json index 28b865c8da..a973453aab 100644 --- a/frontend/package.json +++ b/frontend/package.json @@ -1,24 +1,24 @@ { "author": "Envision Blockchain Solutions ", "dependencies": { - "@angular/animations": "^17.3.12", - "@angular/cdk": "^17.3.10", - "@angular/common": "^17.3.12", - "@angular/compiler": "^17.3.12", - "@angular/core": "^17.3.12", - "@angular/forms": "^17.3.12", - "@angular/google-maps": "^17.3.10", - "@angular/platform-browser": "^17.3.12", - "@angular/platform-browser-dynamic": "^17.3.12", - "@angular/router": "^17.3.12", + "@angular/animations": "^18.2.12", + "@angular/cdk": "^18.2.14", + "@angular/common": "^18.2.12", + "@angular/compiler": "^18.2.12", + "@angular/core": "^18.2.12", + "@angular/forms": "^18.2.12", + "@angular/google-maps": "^18.2.14", + "@angular/platform-browser": "^18.2.12", + "@angular/platform-browser-dynamic": "^18.2.12", + "@angular/router": "^18.2.12", "@ctrl/ngx-codemirror": "^5.1.1", "@enonic/global-polyfill": "^1.0.0", "@formulajs/formulajs": "^4.4.6", "@guardian/interfaces": "file:../interfaces", "ajv": "^8.17.1", "ajv-formats": "^3.0.1", - "angular-svg-icon": "^16.1.0", - "angularx-qrcode": "^17.0.1", + "angular-svg-icon": "^18.0.2", + "angularx-qrcode": "^18.0.2", "codemirror": "^5.65.0", "cronstrue": "^2.4.0", "crypto-browserify": "^3.12.0", @@ -29,10 +29,10 @@ "moment": "^2.29.2", "moment-timezone": "^0.5.43", "ngx-colors": "3.1.4", - "ngx-drag-drop": "^17.0.0", + "ngx-drag-drop": "^18.0.2", "ngx-file-drop": "^16.0.0", - "ngx-mask": "^17.1.8", - "ngx-toastr": "^17.0.2", + "ngx-mask": "^18.0.4", + "ngx-toastr": "^18.0.0", "primeicons": "^7.0.0", "primeng": "^17.18.12", "process": "^0.11.10", @@ -42,9 +42,9 @@ "zone.js": "~0.14.10" }, "devDependencies": { - "@angular-devkit/build-angular": "^17.3.11", - "@angular/cli": "^17.3.11", - "@angular/compiler-cli": "^17.3.12", + "@angular-devkit/build-angular": "^18.2.12", + "@angular/cli": "^18.2.12", + "@angular/compiler-cli": "^18.2.12", "@types/file-saver": "^2.0.5", "@types/jasmine": "~3.6.0", "@types/js-yaml": "^4.0.5", diff --git a/frontend/src/app/app.module.ts b/frontend/src/app/app.module.ts index 5a56be02d2..42d0f7e62f 100644 --- a/frontend/src/app/app.module.ts +++ b/frontend/src/app/app.module.ts @@ -2,7 +2,7 @@ import { NgModule } from '@angular/core'; import { FormsModule } from '@angular/forms'; import { BrowserModule } from '@angular/platform-browser'; import { BrowserAnimationsModule } from '@angular/platform-browser/animations'; -import { HTTP_INTERCEPTORS, HttpClientJsonpModule, HttpClientModule } from '@angular/common/http'; +import { HTTP_INTERCEPTORS, provideHttpClient, withInterceptorsFromDi, withJsonpSupport } from '@angular/common/http'; import { CommonModule } from '@angular/common'; import { ToastrModule } from 'ngx-toastr'; import { AppRoutingModule, PermissionsGuard } from './app-routing.module'; @@ -130,8 +130,7 @@ import { OnlyForDemoDirective } from './directives/onlyfordemo.directive'; import { UseWithServiceDirective } from './directives/use-with-service.directive'; import { WorkerTasksComponent } from './views/worker-tasks/worker-tasks.component'; -@NgModule({ - declarations: [ +@NgModule({ declarations: [ AppComponent, UserProfileComponent, LoginComponent, @@ -177,14 +176,13 @@ import { WorkerTasksComponent } from './views/worker-tasks/worker-tasks.componen UsersManagementDetailComponent, WorkerTasksComponent ], - imports: [ - BrowserModule, + exports: [], + bootstrap: [AppComponent], imports: [BrowserModule, CommonModule, CommonComponentsModule, MaterialModule, AppRoutingModule, BrowserAnimationsModule, - HttpClientModule, FormsModule, SchemaEngineModule, PolicyEngineModule, @@ -193,7 +191,6 @@ import { WorkerTasksComponent } from './views/worker-tasks/worker-tasks.componen TagEngineModule, CompareModule, ToastrModule.forRoot(), - HttpClientJsonpModule, QRCodeModule, ButtonModule, InputTextModule, @@ -219,10 +216,7 @@ import { WorkerTasksComponent } from './views/worker-tasks/worker-tasks.componen ProjectComparisonModule, DndModule, CheckboxModule, - AngularSvgIconModule.forRoot() - ], - exports: [], - providers: [ + AngularSvgIconModule.forRoot()], providers: [ WebSocketService, AuthService, ProfileService, @@ -274,8 +268,7 @@ import { WorkerTasksComponent } from './views/worker-tasks/worker-tasks.componen provide: HTTP_INTERCEPTORS, useClass: AuthInterceptor, multi: true, - } - ], - bootstrap: [AppComponent], -}) + }, + provideHttpClient(withInterceptorsFromDi(), withJsonpSupport()) + ] }) export class AppModule { } diff --git a/frontend/src/app/modules/common/datetime-picker/datetime-picker.component.ts b/frontend/src/app/modules/common/datetime-picker/datetime-picker.component.ts index 08186f915a..71fe3fbee5 100644 --- a/frontend/src/app/modules/common/datetime-picker/datetime-picker.component.ts +++ b/frontend/src/app/modules/common/datetime-picker/datetime-picker.component.ts @@ -1,5 +1,5 @@ import { Component, EventEmitter, Input, Output } from '@angular/core'; -import * as moment from 'moment'; +import moment from 'moment'; // import { NGX_MAT_DATE_FORMATS, NgxMatDateAdapter } from '@angular-material-components/datetime-picker'; // import { NgxMatMomentAdapter } from '@angular-material-components/moment-adapter'; // import { GUARDIAN_DATETIME_FORMAT } from '../../../utils/datetime-format'; diff --git a/frontend/src/app/modules/policy-engine/dialogs/cron-config-dialog/cron-config-dialog.component.ts b/frontend/src/app/modules/policy-engine/dialogs/cron-config-dialog/cron-config-dialog.component.ts index 0ffa040958..4777ce5007 100644 --- a/frontend/src/app/modules/policy-engine/dialogs/cron-config-dialog/cron-config-dialog.component.ts +++ b/frontend/src/app/modules/policy-engine/dialogs/cron-config-dialog/cron-config-dialog.component.ts @@ -1,7 +1,7 @@ import {Component, Inject} from '@angular/core'; // import { MatLegacyDialogRef as MatDialogRef, MAT_LEGACY_DIALOG_DATA as MAT_DIALOG_DATA } from '@angular/material/legacy-dialog'; import {UntypedFormBuilder, Validators} from '@angular/forms'; -import * as moment from 'moment'; +import moment from 'moment'; import cronstrue from 'cronstrue'; import {DynamicDialogConfig, DynamicDialogRef} from 'primeng/dynamicdialog'; diff --git a/frontend/src/app/modules/policy-engine/policy-configuration/policy-properties/policy-properties.component.html b/frontend/src/app/modules/policy-engine/policy-configuration/policy-properties/policy-properties.component.html index f8e9aebf55..d2f015c405 100644 --- a/frontend/src/app/modules/policy-engine/policy-configuration/policy-properties/policy-properties.component.html +++ b/frontend/src/app/modules/policy-engine/policy-configuration/policy-properties/policy-properties.component.html @@ -412,7 +412,7 @@ Date: Wed, 27 Nov 2024 14:23:22 +0000 Subject: [PATCH 26/48] [skip ci] Add swagger.yaml --- swagger.yaml | 1 - 1 file changed, 1 deletion(-) diff --git a/swagger.yaml b/swagger.yaml index 865dd23339..c3bbcec0cf 100644 --- a/swagger.yaml +++ b/swagger.yaml @@ -16150,7 +16150,6 @@ components: - ARTIFACTS_FILE_DELETE - CONTRACTS_CONTRACT_READ - CONTRACTS_CONTRACT_EXECUTE - - CONTRACTS_CONTRACT_MANAGE - MODULES_MODULE_READ - MODULES_MODULE_CREATE - MODULES_MODULE_UPDATE From b15abc9fb89857bb4e4dcc7d971f1d23cac37826 Mon Sep 17 00:00:00 2001 From: Ihar Date: Wed, 4 Dec 2024 18:34:02 +0500 Subject: [PATCH 27/48] fix: overlay panel content[3141] --- .../policies/policies.component.html | 210 ++++++++--------- .../policies/policies.component.scss | 19 ++ .../policies/policies.component.ts | 211 ++++++++++-------- .../src/app/views/login/login.component.html | 110 ++++++--- .../src/app/views/login/login.component.scss | 76 ++++--- .../app/views/schemas/schemas.component.html | 141 ++++++++---- .../app/views/schemas/schemas.component.scss | 33 +++ .../app/views/schemas/schemas.component.ts | 8 + 8 files changed, 522 insertions(+), 286 deletions(-) diff --git a/frontend/src/app/modules/policy-engine/policies/policies.component.html b/frontend/src/app/modules/policy-engine/policies/policies.component.html index 2b1d87d2d1..f545aa3f59 100644 --- a/frontend/src/app/modules/policy-engine/policies/policies.component.html +++ b/frontend/src/app/modules/policy-engine/policies/policies.component.html @@ -19,7 +19,7 @@ formControlName="policyName" pInputText placeholder="Search by Policy name" - type="text" /> + type="text"/> + class="button ml-8" + label="Apply Filters" + pButton> + [disabled]="!filtersForm.dirty" + class="button secondary ml-8" + label="Clear filters" + pButton>
@@ -121,46 +121,59 @@ Name + pFrozenColumn>Name + Instance + pFrozenColumn>Instance + Operations + pFrozenColumn>Operations + Description + class="header-cell-text cell-description">Description + Status + class="header-cell-text cell-150">Status + Roles + class="header-cell-text cell-140">Roles + Topic + class="header-cell-text cell-140">Topic + Version + class="header-cell-text cell-140">Version + Tests + class="header-cell-text cell-190">Tests + Tags + class="header-cell-text cell-190">Tags + Tokens + class="header-cell-text cell-140">Tokens + Schemas + class="header-cell-text cell-170">Schemas + Multi Policy + class="header-cell-text cell-210">Multi Policy + @@ -225,31 +238,28 @@ matTooltipPosition="above" matTooltipShowDelay="500" > - +
- - - - - - - - - - + + + + + + + + + +
- +
@@ -258,17 +268,19 @@ class="text-truncate cell-description" pTooltip="{{ policy.description }}" tooltipPosition="top" - >{{ policy.description }} + >{{ policy.description }} +
{{ getLabelStatus(policy.status, !!policy.discontinuedDate) }}
+ [pTooltip]="getDiscontinuedTooltip(policy.discontinuedDate)" + tooltipPosition="bottom" + [tooltipDisabled]="!policy.discontinuedDate" + class="chip chip-color-{{getColor(policy.status, !!policy.discontinuedDate)}}" + >{{ getLabelStatus(policy.status, !!policy.discontinuedDate) }} +
@@ -286,11 +298,12 @@ (onChange)="onChangeStatus($event, policy)">
- @@ -301,7 +314,7 @@ class="{{policy.status}}-status disabled-status" [pTooltip]="getDiscontinuedTooltip(policy.discontinuedDate)" tooltipPosition="bottom"> - {{getStatusName(policy)}} + {{ getStatusName(policy) }}
@@ -309,19 +322,22 @@ {{ policy.userRoles?.join(", ") }} + >{{ policy.userRoles?.join(", ") }} + - {{ policy.topicId }} + {{ policy.topicId }} {{ policy.version }} + >{{ policy.version }} + + [queryParams]="{ policy: policy.id }" + [routerLink]="['/tokens']"> @@ -401,58 +417,52 @@
- - - - - - - - - + + + + + + + + - --> - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -525,8 +525,8 @@
- - + +
@@ -550,8 +550,13 @@ + + + + +
- {{ context.blockIcon }} +
{{ context.blockName }}
@@ -565,8 +570,10 @@
- - + +
diff --git a/frontend/src/app/modules/analytics/multi-compare-policy/multi-compare-policy.component.scss b/frontend/src/app/modules/analytics/multi-compare-policy/multi-compare-policy.component.scss index 9b45dcbae6..047bf0fff8 100644 --- a/frontend/src/app/modules/analytics/multi-compare-policy/multi-compare-policy.component.scss +++ b/frontend/src/app/modules/analytics/multi-compare-policy/multi-compare-policy.component.scss @@ -780,3 +780,30 @@ } } +.middle-tree { + display: flex; + align-items: center; + justify-content: center; + width: 35px; + height: 100%; + position: relative; + background-color: white; +} + +.compare-btn i, +.compare-btn svg { + font-size: 16px; + position: absolute; + left: 4px; + top: 4px; +} + +.report-collapse i, +.report-collapse svg { + position: absolute; + pointer-events: none; + top: 2px; + font-size: 10px; + display: none; + left: 2px; +} From 701ae321c5f1c6ecf6449a91d7bde2283d404cd1 Mon Sep 17 00:00:00 2001 From: Ihar Date: Tue, 10 Dec 2024 17:39:55 +0500 Subject: [PATCH 34/48] fix: logic for remove have chosen token in set pool[3141] --- .../set-pool-dialog/set-pool-dialog.component.html | 2 +- .../set-pool-dialog/set-pool-dialog.component.ts | 10 ++++++---- 2 files changed, 7 insertions(+), 5 deletions(-) diff --git a/frontend/src/app/modules/contract-engine/dialogs/set-pool-dialog/set-pool-dialog.component.html b/frontend/src/app/modules/contract-engine/dialogs/set-pool-dialog/set-pool-dialog.component.html index e009106609..bd6afc3213 100644 --- a/frontend/src/app/modules/contract-engine/dialogs/set-pool-dialog/set-pool-dialog.component.html +++ b/frontend/src/app/modules/contract-engine/dialogs/set-pool-dialog/set-pool-dialog.component.html @@ -23,7 +23,7 @@ ({ ...item, @@ -112,11 +112,13 @@ export class SetPoolDialogComponent { } getTokenList(tokenId: string) { - const tokens = + const chosenTokens = this.tokens.value ?.filter((item: { token: string }) => item.token !== tokenId) .map((item: { token: any }) => item.token) || []; - return this._tokenList.filter((item) => !tokens.includes(item.tokenId)); + + return this._tokenList.filter((tokenFromList) => + !chosenTokens.find((chosenToken: Token) => chosenToken.tokenId === tokenFromList.tokenId)) } moreThanTokensZeroValidator(): ValidatorFn { @@ -143,7 +145,7 @@ export class SetPoolDialogComponent { }; } - get selectedToken(): string | null { + get selectedTokenId(): string | null { return this.form.get('token')?.value || null; } } From 6fa4ec0823fcdc385c67d5df5d17135cf5fa0e14 Mon Sep 17 00:00:00 2001 From: Ihar Date: Tue, 10 Dec 2024 19:48:32 +0500 Subject: [PATCH 35/48] fix: add step drobdawns in navigation policy[3141] --- .../select-block/select-block.component.html | 81 ++++++++++++++++++- .../select-block/select-block.component.scss | 23 +++++- 2 files changed, 102 insertions(+), 2 deletions(-) diff --git a/frontend/src/app/modules/policy-engine/helpers/select-block/select-block.component.html b/frontend/src/app/modules/policy-engine/helpers/select-block/select-block.component.html index 44353ebf1d..3e1078db52 100644 --- a/frontend/src/app/modules/policy-engine/helpers/select-block/select-block.component.html +++ b/frontend/src/app/modules/policy-engine/helpers/select-block/select-block.component.html @@ -23,13 +23,92 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + {{ item ? item.name : 'Select' }} + + + + + +
+
+ +
+
+ +
+ {{ item.name || '' }} +
+
+
+ + placeholder="Select" + (onChange)="onChange()" + [appendTo]="'body'" +> -
- +
+ @@ -223,15 +223,15 @@
- - - - + + + + -
+
@@ -355,17 +355,20 @@ - + -
+
- + - + Tree JSON YAML @@ -390,11 +393,11 @@ - - + + -
+
- + -
+
@@ -1414,7 +1418,7 @@
@@ -1422,7 +1426,7 @@ Publish
-
@@ -1433,7 +1437,7 @@
@@ -1444,7 +1448,7 @@
@@ -1453,14 +1457,15 @@ -
Publish
-
+
Stop @@ -1468,13 +1473,13 @@ -
+
Show All Events
-
+
@@ -1483,7 +1488,7 @@
Show Action Events
-
+
@@ -1492,7 +1497,7 @@
Show Refresh Events
-
+
@@ -1501,19 +1506,19 @@ -
+
Tree
-
+
JSON
-
+
YAML @@ -1521,7 +1526,7 @@ -
+
{{ t.name }} diff --git a/frontend/src/app/modules/policy-engine/policy-configuration/policy-properties/policy-properties.component.html b/frontend/src/app/modules/policy-engine/policy-configuration/policy-properties/policy-properties.component.html index 62a9f01460..ba1279790b 100644 --- a/frontend/src/app/modules/policy-engine/policy-configuration/policy-properties/policy-properties.component.html +++ b/frontend/src/app/modules/policy-engine/policy-configuration/policy-properties/policy-properties.component.html @@ -13,7 +13,6 @@ Policy - ID diff --git a/frontend/src/app/modules/policy-engine/policy-configuration/policy-properties/policy-properties.component.scss b/frontend/src/app/modules/policy-engine/policy-configuration/policy-properties/policy-properties.component.scss index fa8a3950d8..aed5196b20 100644 --- a/frontend/src/app/modules/policy-engine/policy-configuration/policy-properties/policy-properties.component.scss +++ b/frontend/src/app/modules/policy-engine/policy-configuration/policy-properties/policy-properties.component.scss @@ -55,4 +55,7 @@ textarea[readonly] { ::ng-deep input { height: 38px !important; + font-size: 1rem !important; + color: var(--color-grey-6); + font-family: 'Roboto', sans-serif; } diff --git a/frontend/src/variables.scss b/frontend/src/variables.scss index 48a79607de..c95c18a8c1 100644 --- a/frontend/src/variables.scss +++ b/frontend/src/variables.scss @@ -13,6 +13,7 @@ --color-grey-3: #E1E7EF; --color-grey-4: #B0B5BA; --color-grey-5: #848FA9; + --color-grey-6: #495057; --color-grey-white: #FFFFFF; --color-accent-red-1: #FF432A; @@ -59,4 +60,4 @@ :root { --header-height: 0px; } -} \ No newline at end of file +} From 213343f21cb95a5293e0ae1ef65a1710ade16615 Mon Sep 17 00:00:00 2001 From: Ihar Date: Wed, 11 Dec 2024 18:50:48 +0500 Subject: [PATCH 38/48] fix: registration page did doc[3141] --- .../refresh-btn/refresh-btn.component.html | 2 +- .../contract-config.component.css | 5 +++++ .../policy-properties.component.scss | 4 ++++ .../root-profile/root-profile.component.html | 6 ++++-- .../root-profile/root-profile.component.scss | 19 +++++++++++++++++++ .../user-profile/user-profile.component.html | 3 ++- .../user-profile/user-profile.component.scss | 19 +++++++++++++++++++ 7 files changed, 54 insertions(+), 4 deletions(-) diff --git a/frontend/src/app/modules/contract-engine/components/refresh-btn/refresh-btn.component.html b/frontend/src/app/modules/contract-engine/components/refresh-btn/refresh-btn.component.html index 58301fb2d6..9709537bfb 100644 --- a/frontend/src/app/modules/contract-engine/components/refresh-btn/refresh-btn.component.html +++ b/frontend/src/app/modules/contract-engine/components/refresh-btn/refresh-btn.component.html @@ -1,4 +1,4 @@ - + + + + + + + + + + + @@ -418,14 +425,20 @@

Important parameters

- + + + + + + + + + + @@ -746,13 +759,21 @@

Important parameters

{{ title }}
- + styleClass="p-button-rounded p-button-primary" + [disabled]="!helpSrc" + (click)="someHelpGif.toggle($event)"> + diff --git a/frontend/src/app/modules/policy-engine/dialogs/policy-wizard-dialog/policy-wizard-dialog.component.ts b/frontend/src/app/modules/policy-engine/dialogs/policy-wizard-dialog/policy-wizard-dialog.component.ts index c583ca8e76..781874ec75 100644 --- a/frontend/src/app/modules/policy-engine/dialogs/policy-wizard-dialog/policy-wizard-dialog.component.ts +++ b/frontend/src/app/modules/policy-engine/dialogs/policy-wizard-dialog/policy-wizard-dialog.component.ts @@ -272,7 +272,12 @@ export class PolicyWizardDialogComponent implements OnInit, AfterViewInit { }, {}); } - ngOnInit() {} + ngOnInit() { + setTimeout(() => { + this.setParents(this.treeData) + this.cdRef.detectChanges(); + }, 50) + } ngAfterViewInit() { const schemasNode = { From 090e75e8b2af7783ca8baa4d5c054d0189f2f9be Mon Sep 17 00:00:00 2001 From: Ihar Date: Wed, 18 Dec 2024 17:29:31 +0500 Subject: [PATCH 42/48] fix: schemas and geolocation[3141] --- .../analytics/compare/compare.component.ts | 48 +++++++++---------- .../geojson-type/geojson-type.component.html | 24 ++++++++-- .../geojson-type/geojson-type.component.scss | 28 ++++++++++- .../geojson-type/geojson-type.component.ts | 6 ++- .../schema-field-configuration.component.html | 2 +- .../schema-tree/schema-tree.component.html | 22 +++++---- .../schema-tree/schema-tree.component.scss | 33 ++++++++++++- .../schema-tree/schema-tree.component.ts | 3 +- .../user-management-detail.component.html | 15 +++--- .../user-management-detail.component.ts | 7 +-- 10 files changed, 138 insertions(+), 50 deletions(-) diff --git a/frontend/src/app/modules/analytics/compare/compare.component.ts b/frontend/src/app/modules/analytics/compare/compare.component.ts index 1d766706e0..803036d083 100644 --- a/frontend/src/app/modules/analytics/compare/compare.component.ts +++ b/frontend/src/app/modules/analytics/compare/compare.component.ts @@ -187,7 +187,7 @@ export class CompareComponent implements OnInit { eventsLvl: this.eventsLvl, propLvl: this.propLvl, childrenLvl: this.childrenLvl, - idLvl: this.idLvl, + idLvl: this.idLvl.value, documentIds: this.getIds() } if (!options.documentIds || options.documentIds.length < 2) { @@ -213,7 +213,7 @@ export class CompareComponent implements OnInit { eventsLvl: this.eventsLvl, propLvl: this.propLvl, childrenLvl: this.childrenLvl, - idLvl: this.idLvl, + idLvl: this.idLvl.value, documentIds: this.getIds() } if (!options.documentIds || options.documentIds.length < 2) { @@ -261,10 +261,10 @@ export class CompareComponent implements OnInit { private downloadPolicy() { this.error = null; const options = { - eventsLvl: this.eventsLvl, - propLvl: this.propLvl, - childrenLvl: this.childrenLvl, - idLvl: this.idLvl, + eventsLvl: this.eventsLvl.value, + propLvl: this.propLvl.value, + childrenLvl: this.childrenLvl.value, + idLvl: this.idLvl.value, policies: this.getItems() } if (!options.policies || options.policies.length < 2) { @@ -292,7 +292,7 @@ export class CompareComponent implements OnInit { return; } const options = { - idLvl: this.idLvl, + idLvl: this.idLvl.value, schemas: ids } this.analyticsService.compareSchema(options).subscribe((value) => { @@ -316,7 +316,7 @@ export class CompareComponent implements OnInit { return; } const options = { - idLvl: this.idLvl, + idLvl: this.idLvl.value, schemas: ids } this.analyticsService.compareSchemaFile(options, 'csv').subscribe((data) => { @@ -339,10 +339,10 @@ export class CompareComponent implements OnInit { return; } const options = { - eventsLvl: this.eventsLvl, - propLvl: this.propLvl, - childrenLvl: this.childrenLvl, - idLvl: this.idLvl, + eventsLvl: this.eventsLvl.value, + propLvl: this.propLvl.value, + childrenLvl: this.childrenLvl.value, + idLvl: this.idLvl.value.value, moduleId1: ids[0], moduleId2: ids[1] } @@ -367,10 +367,10 @@ export class CompareComponent implements OnInit { return; } const options = { - eventsLvl: this.eventsLvl, - propLvl: this.propLvl, - childrenLvl: this.childrenLvl, - idLvl: this.idLvl, + eventsLvl: this.eventsLvl.value, + propLvl: this.propLvl.value, + childrenLvl: this.childrenLvl.value, + idLvl: this.idLvl.value, moduleId1: ids[0], moduleId2: ids[1] } @@ -388,10 +388,10 @@ export class CompareComponent implements OnInit { private loadTool() { this.error = null; const options = { - eventsLvl: this.eventsLvl, - propLvl: this.propLvl, - childrenLvl: this.childrenLvl, - idLvl: this.idLvl, + eventsLvl: this.eventsLvl.value, + propLvl: this.propLvl.value, + childrenLvl: this.childrenLvl.value, + idLvl: this.idLvl.value, toolIds: this.getIds() } if (!options.toolIds || options.toolIds.length < 2) { @@ -414,10 +414,10 @@ export class CompareComponent implements OnInit { private downloadTools() { this.error = null; const options = { - eventsLvl: this.eventsLvl, - propLvl: this.propLvl, - childrenLvl: this.childrenLvl, - idLvl: this.idLvl, + eventsLvl: this.eventsLvl.value, + propLvl: this.propLvl.value, + childrenLvl: this.childrenLvl.value, + idLvl: this.idLvl.value, toolIds: this.getIds() } if (!options.toolIds || options.toolIds.length < 2) { diff --git a/frontend/src/app/modules/schema-engine/geojson-type/geojson-type.component.html b/frontend/src/app/modules/schema-engine/geojson-type/geojson-type.component.html index 492e6fe851..9c5a13a149 100644 --- a/frontend/src/app/modules/schema-engine/geojson-type/geojson-type.component.html +++ b/frontend/src/app/modules/schema-engine/geojson-type/geojson-type.component.html @@ -81,8 +81,23 @@ + + + + + + + + + + + + + + +
- + - Coordinates are required. + class="full-width" + > +
+ diff --git a/frontend/src/app/modules/schema-engine/geojson-type/geojson-type.component.scss b/frontend/src/app/modules/schema-engine/geojson-type/geojson-type.component.scss index f1b9b4073f..2e42348743 100644 --- a/frontend/src/app/modules/schema-engine/geojson-type/geojson-type.component.scss +++ b/frontend/src/app/modules/schema-engine/geojson-type/geojson-type.component.scss @@ -17,4 +17,30 @@ width: 180px; height: 32px; margin-bottom: 15px; -} \ No newline at end of file +} + +.form-group { + width: 100%; + position: relative; +} + +.form-group textarea { + height: 90px !important; + margin-top: 20px; + width: 100%; +} + +.form-group label { + position: absolute; + font-size: 12px; + background: var(--color-background); + top: 14px; + left: 14px; +} + +::ng-deep p-dropdown { + width: 100%; + & > div { + width: 100%; + } +} diff --git a/frontend/src/app/modules/schema-engine/geojson-type/geojson-type.component.ts b/frontend/src/app/modules/schema-engine/geojson-type/geojson-type.component.ts index db2a8ead08..1257d5bd9f 100644 --- a/frontend/src/app/modules/schema-engine/geojson-type/geojson-type.component.ts +++ b/frontend/src/app/modules/schema-engine/geojson-type/geojson-type.component.ts @@ -39,7 +39,7 @@ export class GeojsonTypeComponent implements OnInit, OnChanges { commonOptions: google.maps.MarkerOptions & google.maps.PolygonOptions & google.maps.PolylineOptions = { - animation: google.maps.Animation.DROP, + animation: null, clickable: false, }; type: GeoJsonType = GeoJsonType.POINT; @@ -85,6 +85,10 @@ export class GeojsonTypeComponent implements OnInit, OnChanges { } ngOnInit(): void { + this.commonOptions = { + + } + this.onTypeChange(false); this.control?.setValidators( ajvSchemaValidator(new ajv().compile(GeoJsonSchema)) diff --git a/frontend/src/app/modules/schema-engine/schema-field-configuration/schema-field-configuration.component.html b/frontend/src/app/modules/schema-engine/schema-field-configuration/schema-field-configuration.component.html index bbb01d3bd6..970e2f91d9 100644 --- a/frontend/src/app/modules/schema-engine/schema-field-configuration/schema-field-configuration.component.html +++ b/frontend/src/app/modules/schema-engine/schema-field-configuration/schema-field-configuration.component.html @@ -195,7 +195,7 @@
- +
diff --git a/frontend/src/app/modules/schema-engine/schema-tree/schema-tree.component.html b/frontend/src/app/modules/schema-engine/schema-tree/schema-tree.component.html index 1982aa8be9..43e8cb7e24 100644 --- a/frontend/src/app/modules/schema-engine/schema-tree/schema-tree.component.html +++ b/frontend/src/app/modules/schema-engine/schema-tree/schema-tree.component.html @@ -2,14 +2,20 @@

{{ schema.name }}

- - + + + + + + + + + +
diff --git a/frontend/src/app/modules/schema-engine/schema-tree/schema-tree.component.scss b/frontend/src/app/modules/schema-engine/schema-tree/schema-tree.component.scss index 42582a14dd..ed15cd8d37 100644 --- a/frontend/src/app/modules/schema-engine/schema-tree/schema-tree.component.scss +++ b/frontend/src/app/modules/schema-engine/schema-tree/schema-tree.component.scss @@ -27,4 +27,35 @@ width: 80px; justify-content: space-between; align-items: center; -} \ No newline at end of file +} + +.dialog-header { + margin: 0 0 20px 20px; +} + +.dialog-header h1 { + margin-right: 20px; +} + +::ng-deep .custom-download-button { + width: 30px; + height: 30px; +} + +::ng-deep .custom-download-button button { + background-color: transparent; + color: black; + border: none; + box-shadow: none; + width: 30px; + height: 30px; +} + +::ng-deep .custom-download-button:hover button { + border: none; + background-color: var(--color-grey-3); +} + +::ng-deep .custom-download-button .pi { + font-size: 1rem; +} diff --git a/frontend/src/app/modules/schema-engine/schema-tree/schema-tree.component.ts b/frontend/src/app/modules/schema-engine/schema-tree/schema-tree.component.ts index 584f34303b..c43ade23ad 100644 --- a/frontend/src/app/modules/schema-engine/schema-tree/schema-tree.component.ts +++ b/frontend/src/app/modules/schema-engine/schema-tree/schema-tree.component.ts @@ -48,12 +48,13 @@ export class SchemaTreeComponent implements OnInit { // }, private schemaService: SchemaService ) { - this.schema = this.config.data.schema; + this.schema = this.config.data; } ngOnInit(): void { this._ctx = this.canvas.nativeElement.getContext('2d') as any; this.loading = true; + console.log('this.schema',this.schema) this.schemaService .getSchemaTree(this.schema.id) .subscribe((result: any) => { diff --git a/frontend/src/app/views/user-management-detail/user-management-detail.component.html b/frontend/src/app/views/user-management-detail/user-management-detail.component.html index 781c004d72..3f05447bcb 100644 --- a/frontend/src/app/views/user-management-detail/user-management-detail.component.html +++ b/frontend/src/app/views/user-management-detail/user-management-detail.component.html @@ -392,10 +392,14 @@ Status Version - - + @@ -412,8 +416,7 @@ + (onChange)="assignPolicy(row, $event.checked)"> diff --git a/frontend/src/app/views/user-management-detail/user-management-detail.component.ts b/frontend/src/app/views/user-management-detail/user-management-detail.component.ts index 87293654c5..8f57a039b5 100644 --- a/frontend/src/app/views/user-management-detail/user-management-detail.component.ts +++ b/frontend/src/app/views/user-management-detail/user-management-detail.component.ts @@ -324,9 +324,10 @@ export class UsersManagementDetailComponent implements OnInit, OnDestroy { this.loadData(); } - public assignPolicy(policy: any) { + public assignPolicy(policy: any, checked: boolean) { const ids = [policy.id]; - const assign = !policy.assigned; + // const assign = !policy.assigned; + const assign = checked; if (this.user.PERMISSIONS_ROLE_MANAGE) { this.loading = true; this.permissionsService.assignPolicy(this.username, ids, assign).subscribe((response) => { @@ -394,7 +395,7 @@ export class UsersManagementDetailComponent implements OnInit, OnDestroy { public assignAllPolicy() { const ids: string[] = []; - const assign = !this.allPolicy; + const assign = this.allPolicy; for (const policy of this.policyPage) { if (policy.assigned !== assign && policy._canAssign) { ids.push(policy.id); From 4da6fb4dc19e89c495cdd4511d13a78b57c8c476 Mon Sep 17 00:00:00 2001 From: Ihar Date: Sat, 21 Dec 2024 01:55:04 +0500 Subject: [PATCH 43/48] fix: policy dry run bugs[3141] --- .../compare-viewer.component.html | 2 +- .../wipe-requests-dialog.component.ts | 2 +- .../action-block/action-block.component.html | 4 +++- .../action-block/action-block.component.scss | 4 ++++ .../action-block/action-block.component.ts | 11 ++++++---- .../dropdown-block-addon.component.html | 3 ++- .../filters-addon-block.component.html | 3 ++- .../filters-addon-block.component.scss | 21 ++++++++++++++----- .../filters-addon-block.component.ts | 5 +++-- 9 files changed, 39 insertions(+), 16 deletions(-) diff --git a/frontend/src/app/modules/common/compare-viewer/compare-viewer.component.html b/frontend/src/app/modules/common/compare-viewer/compare-viewer.component.html index b79432927d..accf68a216 100644 --- a/frontend/src/app/modules/common/compare-viewer/compare-viewer.component.html +++ b/frontend/src/app/modules/common/compare-viewer/compare-viewer.component.html @@ -23,7 +23,7 @@
+ (click)="compareMenu.toggle($event); onMenuOpened($event)" > Documents diff --git a/frontend/src/app/modules/contract-engine/dialogs/wipe-requests-dialog/wipe-requests-dialog.component.ts b/frontend/src/app/modules/contract-engine/dialogs/wipe-requests-dialog/wipe-requests-dialog.component.ts index 49b0fea06f..42c9c55c3f 100644 --- a/frontend/src/app/modules/contract-engine/dialogs/wipe-requests-dialog/wipe-requests-dialog.component.ts +++ b/frontend/src/app/modules/contract-engine/dialogs/wipe-requests-dialog/wipe-requests-dialog.component.ts @@ -30,7 +30,7 @@ export class WipeRequestsDialogComponent implements OnInit { private dialogRef: DynamicDialogRef, private config: DynamicDialogConfig, ) { - this.contract = this.config.data.contract; + this.contract = this.config.data ?? {}; this.contractId = this.contract.contractId; this.version = this.contract.version; diff --git a/frontend/src/app/modules/policy-engine/policy-viewer/blocks/action-block/action-block.component.html b/frontend/src/app/modules/policy-engine/policy-viewer/blocks/action-block/action-block.component.html index 0a9ff36395..69debe67f9 100644 --- a/frontend/src/app/modules/policy-engine/policy-viewer/blocks/action-block/action-block.component.html +++ b/frontend/src/app/modules/policy-engine/policy-viewer/blocks/action-block/action-block.component.html @@ -20,7 +20,9 @@ [options]="options" optionLabel="name" (onChange)="onDropdown()" - placeholder="Выберите значение"> + placeholder="Select" + [appendTo]="'body'" + >
diff --git a/frontend/src/app/modules/policy-engine/policy-viewer/blocks/action-block/action-block.component.scss b/frontend/src/app/modules/policy-engine/policy-viewer/blocks/action-block/action-block.component.scss index 6776ae16fe..4b4c437c14 100644 --- a/frontend/src/app/modules/policy-engine/policy-viewer/blocks/action-block/action-block.component.scss +++ b/frontend/src/app/modules/policy-engine/policy-viewer/blocks/action-block/action-block.component.scss @@ -88,3 +88,7 @@ border-radius: 4px; padding: 1px; } + +.content-dropdown ::ng-deep p-dropdown .p-dropdown { + width: 146px; +} diff --git a/frontend/src/app/modules/policy-engine/policy-viewer/blocks/action-block/action-block.component.ts b/frontend/src/app/modules/policy-engine/policy-viewer/blocks/action-block/action-block.component.ts index e8de6a2eab..6dfe749cb7 100644 --- a/frontend/src/app/modules/policy-engine/policy-viewer/blocks/action-block/action-block.component.ts +++ b/frontend/src/app/modules/policy-engine/policy-viewer/blocks/action-block/action-block.component.ts @@ -105,7 +105,9 @@ export class ActionBlockComponent implements OnInit { if (this.type == 'dropdown') { this.field = data.field; this.options = data.options || []; - this.currentValue = this.getObjectValue(this.data, this.field); + const currentValue = this.getObjectValue(this.data, this.field); + this.currentValue = this.options.find((option: {name: string, value: string}) => + option.value === currentValue); } } else { this.data = null; @@ -200,14 +202,15 @@ export class ActionBlockComponent implements OnInit { } onDropdown() { - if (this.getObjectValue(this.data, this.field) == this.currentValue) { + if (this.getObjectValue(this.data, this.field) == this.currentValue.value) { return; } - this.setObjectValue(this.data, this.field, this.currentValue); + + this.setObjectValue(this.data, this.field, this.currentValue.value); + this.policyEngineService .setBlockData(this.id, this.policyId, this.data) .subscribe(() => { - }, (e) => { console.error(e.error); this.loading = false; diff --git a/frontend/src/app/modules/policy-engine/policy-viewer/blocks/dropdown-block-addon/dropdown-block-addon.component.html b/frontend/src/app/modules/policy-engine/policy-viewer/blocks/dropdown-block-addon/dropdown-block-addon.component.html index afd0c88f3b..e7a0e6cda4 100644 --- a/frontend/src/app/modules/policy-engine/policy-viewer/blocks/dropdown-block-addon/dropdown-block-addon.component.html +++ b/frontend/src/app/modules/policy-engine/policy-viewer/blocks/dropdown-block-addon/dropdown-block-addon.component.html @@ -9,7 +9,8 @@ [options]="documents" optionLabel="name" (onChange)="onDropdown($event.value)" - placeholder="Выберите значение"> + placeholder="Select" + >
diff --git a/frontend/src/app/modules/policy-engine/policy-viewer/blocks/filters-addon-block/filters-addon-block.component.html b/frontend/src/app/modules/policy-engine/policy-viewer/blocks/filters-addon-block/filters-addon-block.component.html index 52dbc85a53..d66c45944b 100644 --- a/frontend/src/app/modules/policy-engine/policy-viewer/blocks/filters-addon-block/filters-addon-block.component.html +++ b/frontend/src/app/modules/policy-engine/policy-viewer/blocks/filters-addon-block/filters-addon-block.component.html @@ -16,7 +16,8 @@ [options]="options" optionLabel="name" (onChange)="onFilters()" - placeholder="Выберите значение"> + placeholder="Select" + >
diff --git a/frontend/src/app/modules/policy-engine/policy-viewer/blocks/filters-addon-block/filters-addon-block.component.scss b/frontend/src/app/modules/policy-engine/policy-viewer/blocks/filters-addon-block/filters-addon-block.component.scss index 9fb8bf6ede..833920a234 100644 --- a/frontend/src/app/modules/policy-engine/policy-viewer/blocks/filters-addon-block/filters-addon-block.component.scss +++ b/frontend/src/app/modules/policy-engine/policy-viewer/blocks/filters-addon-block/filters-addon-block.component.scss @@ -26,17 +26,28 @@ .content { box-shadow: 0px 3px 6px #00000020; background: #e5e5e5; - display: inline-block; + display: grid; + grid-template-columns: 1fr auto; + align-content: center; margin: 7px; - padding: 10px 10px 6px 10px; + padding: 6px 10px 6px 10px; + height: 48px; + width: 270px } .content-name { - display: inline-block; + display: grid; margin-right: 10px; + align-content: center; } .content-select { - display: inline-block; + display: grid; width: 190px; -} \ No newline at end of file + align-content: center; + + ::ng-deep .p-dropdown { + height: 36px; + width: 190px; + } +} diff --git a/frontend/src/app/modules/policy-engine/policy-viewer/blocks/filters-addon-block/filters-addon-block.component.ts b/frontend/src/app/modules/policy-engine/policy-viewer/blocks/filters-addon-block/filters-addon-block.component.ts index 1004912b67..6c81d8fa2f 100644 --- a/frontend/src/app/modules/policy-engine/policy-viewer/blocks/filters-addon-block/filters-addon-block.component.ts +++ b/frontend/src/app/modules/policy-engine/policy-viewer/blocks/filters-addon-block/filters-addon-block.component.ts @@ -92,7 +92,6 @@ export class FiltersAddonBlockComponent implements OnInit { this.target = data.targetBlock; this.content = data.uiMetaData.content; this.filters = data.filters; - this.currentValue = data.filterValue; if (this.type == 'unelected') { } @@ -113,6 +112,8 @@ export class FiltersAddonBlockComponent implements OnInit { } } } + this.currentValue = this.options.find((option: {value: string, name: string}) => + option.value === data.filterValue) } else { this.data = null; } @@ -121,7 +122,7 @@ export class FiltersAddonBlockComponent implements OnInit { onFilters() { this.loading = true; this.policyEngineService - .setBlockData(this.id, this.policyId, { filterValue: this.currentValue }) + .setBlockData(this.id, this.policyId, { filterValue: this.currentValue.value }) .subscribe(() => { this.loading = false; }, (e) => { From f783ee956d20df16e48172689d48302ca5eda691 Mon Sep 17 00:00:00 2001 From: Ihar Date: Sat, 21 Dec 2024 23:18:19 +0500 Subject: [PATCH 44/48] refactor: remove comments[3141] --- frontend/src/app/app.component.ts | 30 +- frontend/src/app/app.module.ts | 263 ++++---- .../branding-dialog.component.css | 22 - .../branding-dialog.component.html | 6 - .../branding-dialog.component.ts | 18 - .../meeco-vc-submit-dialog.component.html | 9 - .../meeco-vc-submit-dialog.component.ts | 3 - .../notification/notification.component.html | 5 - .../notification/notification.component.ts | 13 +- .../qr-code-dialog.component.html | 1 - .../qr-code-dialog.component.ts | 3 - .../standard-registry-card.component.html | 20 - .../standard-registry-card.component.ts | 21 +- .../compare-document.component.html | 174 ------ .../compare-module.component.html | 287 +-------- .../compare-module.component.ts | 50 +- .../compare-policy.component.html | 310 +-------- .../compare-record.component.html | 199 +----- .../compare-schema.component.html | 166 ----- .../compare-tool/compare-tool.component.html | 309 +-------- .../analytics/compare/compare.component.html | 46 -- .../multi-compare-policy.component.html | 337 ---------- .../search-policies.component.html | 124 ---- .../artifact-config.component.html | 95 +-- .../artifact-config.component.ts | 23 +- .../artifact-import-dialog.component.html | 20 +- .../artifact-import-dialog.component.ts | 4 - .../artifact-properties.component.html | 6 - .../modules/common/alert/alert.component.html | 21 +- .../modules/common/alert/alert.component.ts | 16 - .../common/common-components.module.ts | 85 ++- .../compare-viewer.component.html | 22 +- .../compare-viewer.component.ts | 14 +- .../confirm-dialog.component.html | 54 -- .../confirm-dialog.component.ts | 4 - .../confirmation-dialog.component.ts | 3 - .../data-input-dialog.component.html | 37 -- .../data-input-dialog.component.ts | 3 - .../datetime-picker.component.html | 9 - .../datetime-picker.component.ts | 18 +- .../file-drag-n-drop.component.html | 2 - .../icon-preview-dialog.component.html | 6 - .../icon-preview-dialog.component.ts | 3 - .../src/app/modules/common/material.module.ts | 143 ----- .../new-versions/new-versions.component.html | 32 - .../select-menu/select-menu.component.html | 6 +- .../selector-dialog.component.html | 30 +- .../selector-dialog.component.ts | 10 - .../separate-stepper.component.html | 1 - .../common/step-tree/step-tree.component.html | 50 +- .../common/step-tree/step-tree.component.scss | 2 - .../common/step-tree/step-tree.component.ts | 30 +- .../refresh-btn/refresh-btn.component.html | 2 - .../contract-config.component.css | 16 - .../contract-config.component.html | 100 --- .../contract-config.component.ts | 55 +- .../user-contract-config.component.html | 75 --- .../user-contract-config.component.ts | 37 +- .../dialog-wrapper.component.html | 13 - .../retire-pools-dialog.component.html | 24 - .../retire-pools-dialog.component.ts | 3 - .../retire-requests-dialog.component.html | 25 +- .../retire-requests-dialog.component.ts | 11 +- .../set-pool-dialog.component.html | 49 -- .../set-pool-dialog.component.ts | 13 +- .../user-retire-pools-dialog.component.html | 43 -- .../user-retire-pools-dialog.component.ts | 2 - ...user-retire-requests-dialog.component.html | 10 +- .../user-retire-requests-dialog.component.ts | 3 - .../wipe-requests-dialog.component.html | 25 - .../wipe-requests-dialog.component.ts | 3 - .../code-editor-dialog.component.html | 2 - .../code-editor-dialog.component.ts | 4 - .../cron-config-dialog.component.html | 42 -- .../cron-config-dialog.component.ts | 6 - .../invite-dialog.component.html | 15 - .../invite-dialog/invite-dialog.component.ts | 7 +- .../multi-policy-dialog.component.html | 59 -- .../multi-policy-dialog.component.ts | 3 - .../new-theme-dialog.component.html | 7 - .../new-theme-dialog.component.ts | 3 - .../policy-wizard-dialog.component.html | 519 ++++----------- .../save-before-dialog.component.ts | 4 +- .../save-policy-dialog.component.html | 52 -- .../save-policy-dialog.component.ts | 6 +- .../viewer-dialog/viewer-dialog.component.ts | 7 - .../document-path.component.html | 3 - .../help-icon/help-icon.component.html | 4 - .../search-blocks.component.html | 10 - .../select-block/select-block.component.html | 61 -- .../select-schema.component.html | 20 - .../modules-list/modules-list.component.html | 126 ---- .../modules-list/modules-list.component.ts | 40 +- .../policies/policies.component.html | 17 - .../policies/policies.component.ts | 16 +- .../calculate-config.component.html | 9 - .../calculate-math-config.component.html | 9 - .../custom-logic-config.component.html | 14 - .../custom-logic-config.component.ts | 5 - .../aggregate-config.component.html | 17 +- .../aggregate-config.component.ts | 6 - .../document-validator-config.component.html | 22 - .../document-viewer-config.component.html | 48 -- .../filters-addon-config.component.html | 8 - .../reassigning-config.component.html | 12 - .../request-addon-config.component.html | 17 - .../request-config.component.html | 24 - .../send-config/send-config.component.html | 46 -- .../source-addon-config.component.html | 28 - .../timer-config/timer-config.component.html | 10 - .../timer-config/timer-config.component.ts | 4 - .../action-config.component.html | 23 - .../button-config.component.html | 28 - .../container-config.component.html | 6 - .../group-manager-config.component.html | 10 - .../http-request-config.component.html | 18 - .../http-request-config.component.ts | 5 - .../information-config.component.html | 6 - .../roles-config/roles-config.component.html | 9 - .../switch-config.component.html | 27 - .../blocks/module/module.component.html | 38 -- .../report-item-config.component.html | 60 -- .../report-item-config.component.ts | 2 - .../create-token-config.component.html | 8 - .../mint-config/mint-config.component.html | 20 - .../token-action-config.component.html | 33 - .../token-confirmation-config.component.html | 22 - .../blocks/tool/tool.component.html | 41 -- .../common-properties.component.html | 52 -- .../common-property.component.html | 78 --- .../json-properties.component.html | 2 - .../module-properties.component.html | 22 - .../policy-configuration.component.html | 281 +-------- .../policy-configuration.component.scss | 9 - .../policy-configuration.component.ts | 146 +++-- .../policy-properties.component.html | 191 +----- .../policy-settings.component.html | 136 ---- .../policy-settings.component.ts | 112 ++-- .../policy-tree/policy-tree.component.html | 73 +-- .../policy-tree/policy-tree.component.scss | 1 - .../action-block/action-block.component.html | 4 - .../button-block/button-block.component.ts | 2 - .../confirmation-dialog.component.html | 4 - .../container-block.component.html | 55 +- .../document-dialog-block.component.ts | 4 - .../documents-source-block.component.html | 176 ------ .../documents-source-block.component.ts | 43 +- .../dropdown-block-addon.component.html | 4 - .../external-topic-block.component.html | 162 ----- .../filters-addon-block.component.html | 8 - .../group-manager-block.component.html | 191 +----- .../group-manager-block.component.ts | 23 +- .../messages-report-block.component.html | 53 -- .../messages-report-block.component.ts | 88 +-- .../multi-sign-block.component.html | 10 - .../pagination-addon-block.component.html | 8 - .../report-block/report-block.component.html | 55 -- .../report-block/report-block.component.ts | 15 +- .../request-document-block-addon.component.ts | 2 - .../roles-block/roles-block.component.html | 69 -- .../token-confirmation-block.component.html | 21 - .../upload-document-block.component.ts | 46 +- .../dialog-block/dialog-block.component.html | 1 - .../dialog-block/dialog-block.component.ts | 4 - .../policy-viewer.component.html | 78 +-- .../record-controller.component.html | 37 -- .../record-controller.component.ts | 28 +- .../record-result-dialog.component.html | 10 - .../record-result-dialog.component.ts | 6 - .../record-results.component.html | 4 - .../test-results/test-results.component.html | 4 - .../policy-engine/services/block-icons.ts | 52 +- .../policy-engine/services/wizard.service.ts | 5 +- .../tools-list/tools-list.component.html | 230 ++----- .../tools-list/tools-list.component.ts | 3 - .../copy-schema-dialog.html | 50 -- .../copy-schema-dialog/copy-schema-dialog.ts | 5 - .../document-view/document-view.component.ts | 1 - .../enum-editor-dialog.component.html | 21 - .../geojson-type/geojson-type.component.html | 42 -- .../schema-configuration.component.html | 95 --- .../schema-configuration.component.ts | 58 +- .../schema-dialog.component.html | 13 - .../schema-engine/schema-engine.module.ts | 89 ++- .../schema-field-configuration.component.html | 54 -- .../schema-field-configuration.component.ts | 57 +- .../schema-form-dialog.component.html | 1 - .../schema-form-dialog.component.ts | 3 - .../schema-form-view.component.ts | 7 - .../schema-form/schema-form.component.html | 6 - .../schema-form/schema-form.component.ts | 46 +- .../schema-tree/schema-tree.component.html | 11 - .../schema-tree/schema-tree.component.ts | 7 - .../schema-view-dialog.component.html | 14 - .../schema-view-dialog.component.ts | 4 - .../sentinel-hub-type.component.html | 70 --- .../sentinel-hub-type.component.ts | 16 +- .../set-version-dialog.component.ts | 7 +- .../tags-create-dialog.component.html | 37 -- .../tags-explorer-dialog.component.html | 1 - .../tags-explorer.component.html | 2 - .../tags-explorer/tags-explorer.component.ts | 1 - frontend/src/app/utils/mobile-utils.ts | 3 +- .../about-view/about-view.component.html | 6 +- .../service-status.component.html | 21 - .../settings-view.component.html | 4 - .../src/app/views/audit/audit.component.html | 68 -- .../src/app/views/audit/audit.component.ts | 31 +- .../app/views/branding/branding.component.ts | 19 +- .../app/views/header/header.component.html | 589 ------------------ .../src/app/views/header/header.component.ts | 30 +- .../src/app/views/login/login.component.html | 61 -- .../src/app/views/login/login.component.ts | 64 +- .../views/new-header/new-header.component.ts | 31 +- .../notifications/notifications.component.ts | 8 +- .../policy-guided-search.component.ts | 18 +- .../policy-search.component.html | 33 - .../policy-search/policy-search.component.ts | 18 +- .../views/register/register.component.html | 59 -- .../views/register/register.component.scss | 1 - .../app/views/roles/roles-view.component.html | 27 - .../app/views/roles/roles-view.component.ts | 5 - .../root-profile/root-profile.component.html | 58 -- .../app/views/schemas/schemas.component.html | 309 ++------- .../app/views/schemas/schemas.component.ts | 115 ++-- .../suggestions-configuration.component.html | 9 - .../trust-chain/trust-chain.component.html | 25 - .../trust-chain/trust-chain.component.ts | 18 - .../user-management-detail.component.html | 225 +------ .../user-management-detail.component.ts | 1 - .../user-profile/user-profile.component.html | 38 -- .../user-profile/user-profile.component.ts | 210 +++---- .../worker-tasks/worker-tasks.component.ts | 10 +- 233 files changed, 1296 insertions(+), 9486 deletions(-) delete mode 100644 frontend/src/app/components/branding-dialog/branding-dialog.component.css delete mode 100644 frontend/src/app/components/branding-dialog/branding-dialog.component.html delete mode 100644 frontend/src/app/components/branding-dialog/branding-dialog.component.ts diff --git a/frontend/src/app/app.component.ts b/frontend/src/app/app.component.ts index ce0ac93f5c..1a0797c106 100644 --- a/frontend/src/app/app.component.ts +++ b/frontend/src/app/app.component.ts @@ -1,15 +1,14 @@ -import { Component, ElementRef, HostListener, OnInit, ViewChild } from '@angular/core'; -import { AuthStateService } from './services/auth-state.service'; -import { WebSocketService } from './services/web-socket.service'; -import { BrandingService } from './services/branding.service'; +import {Component, ElementRef, HostListener, OnInit, ViewChild} from '@angular/core'; +import {AuthStateService} from './services/auth-state.service'; +import {WebSocketService} from './services/web-socket.service'; +import {BrandingService} from './services/branding.service'; import './modules/policy-engine/policy-lang-modes/policy-json-lang.mode'; import './modules/policy-engine/policy-lang-modes/policy-yaml-lang.mode'; import './modules/common/models/lang-modes/formula-lang.mode'; import './modules/common/models/lang-modes/single-line'; -import { globalLoaderActive } from './static/global-loader.function'; -import { ActivatedRoute } from '@angular/router'; -// import { MatIconRegistry } from '@angular/material/icon'; -import { DomSanitizer } from '@angular/platform-browser'; +import {globalLoaderActive} from './static/global-loader.function'; +import {ActivatedRoute} from '@angular/router'; +import {DomSanitizer} from '@angular/platform-browser'; @Component({ selector: 'app-root', @@ -37,22 +36,7 @@ export class AppComponent implements OnInit { private brandingService: BrandingService, private activatedRoute: ActivatedRoute, private domSanitizer: DomSanitizer, - // private matIconRegistry: MatIconRegistry ) { - // this.matIconRegistry.addSvgIconLiteral('policy-module', this.domSanitizer.bypassSecurityTrustHtml(` - // - // - // - // - // - // `)); - // this.matIconRegistry.addSvgIconLiteral('policy-tool', this.domSanitizer.bypassSecurityTrustHtml(` - // - // - // - // - // - // `)); activatedRoute.url.subscribe(segs => { this.url = segs.pop()!.path; }) diff --git a/frontend/src/app/app.module.ts b/frontend/src/app/app.module.ts index 42d0f7e62f..a3c73c04a2 100644 --- a/frontend/src/app/app.module.ts +++ b/frontend/src/app/app.module.ts @@ -1,136 +1,140 @@ -import { NgModule } from '@angular/core'; -import { FormsModule } from '@angular/forms'; -import { BrowserModule } from '@angular/platform-browser'; -import { BrowserAnimationsModule } from '@angular/platform-browser/animations'; -import { HTTP_INTERCEPTORS, provideHttpClient, withInterceptorsFromDi, withJsonpSupport } from '@angular/common/http'; -import { CommonModule } from '@angular/common'; -import { ToastrModule } from 'ngx-toastr'; -import { AppRoutingModule, PermissionsGuard } from './app-routing.module'; -import { AppComponent } from './app.component'; -import { SchemaHelper } from '@guardian/interfaces'; -import { CheckboxModule } from 'primeng/checkbox'; +import {NgModule} from '@angular/core'; +import {FormsModule} from '@angular/forms'; +import {BrowserModule} from '@angular/platform-browser'; +import {BrowserAnimationsModule} from '@angular/platform-browser/animations'; +import {HTTP_INTERCEPTORS, provideHttpClient, withInterceptorsFromDi, withJsonpSupport} from '@angular/common/http'; +import {CommonModule} from '@angular/common'; +import {ToastrModule} from 'ngx-toastr'; +import {AppRoutingModule, PermissionsGuard} from './app-routing.module'; +import {AppComponent} from './app.component'; +import {SchemaHelper} from '@guardian/interfaces'; +import {CheckboxModule} from 'primeng/checkbox'; //Services -import { AuthInterceptor, AuthService } from './services/auth.service'; -import { ProfileService } from './services/profile.service'; -import { TokenService } from './services/token.service'; -import { SchemaService } from './services/schema.service'; -import { HandleErrorsService } from './services/handle-errors.service'; -import { AuditService } from './services/audit.service'; -import { PolicyEngineService } from './services/policy-engine.service'; -import { PolicyStatisticsService } from './services/policy-statistics.service'; -import { DemoService } from './services/demo.service'; -import { PolicyHelper } from './services/policy-helper.service'; -import { IPFSService } from './services/ipfs.service'; -import { SettingsService } from './services/settings.service'; -import { LoggerService } from './services/logger.service'; -import { TasksService } from './services/tasks.service'; -import { ArtifactService } from './services/artifact.service'; -import { ContractService } from './services/contract.service'; -import { WebSocketService } from './services/web-socket.service'; -import { MessageTranslationService } from './services/message-translation-service/message-translation-service'; -import { AnalyticsService } from './services/analytics.service'; -import { ModulesService } from './services/modules.service'; -import { TagsService } from './services/tag.service'; -import { MapService } from './services/map.service'; -import { WizardService } from './modules/policy-engine/services/wizard.service'; -import { NotificationService } from './services/notify.service'; -import { PermissionsService } from './services/permissions.service'; -import { WorkerTasksService } from './services/worker-tasks.service'; -import { SchemaRulesService } from './services/schema-rules.service'; +import {AuthInterceptor, AuthService} from './services/auth.service'; +import {ProfileService} from './services/profile.service'; +import {TokenService} from './services/token.service'; +import {SchemaService} from './services/schema.service'; +import {HandleErrorsService} from './services/handle-errors.service'; +import {AuditService} from './services/audit.service'; +import {PolicyEngineService} from './services/policy-engine.service'; +import {PolicyStatisticsService} from './services/policy-statistics.service'; +import {DemoService} from './services/demo.service'; +import {PolicyHelper} from './services/policy-helper.service'; +import {IPFSService} from './services/ipfs.service'; +import {SettingsService} from './services/settings.service'; +import {LoggerService} from './services/logger.service'; +import {TasksService} from './services/tasks.service'; +import {ArtifactService} from './services/artifact.service'; +import {ContractService} from './services/contract.service'; +import {WebSocketService} from './services/web-socket.service'; +import {MessageTranslationService} from './services/message-translation-service/message-translation-service'; +import {AnalyticsService} from './services/analytics.service'; +import {ModulesService} from './services/modules.service'; +import {TagsService} from './services/tag.service'; +import {MapService} from './services/map.service'; +import {WizardService} from './modules/policy-engine/services/wizard.service'; +import {NotificationService} from './services/notify.service'; +import {PermissionsService} from './services/permissions.service'; +import {WorkerTasksService} from './services/worker-tasks.service'; +import {SchemaRulesService} from './services/schema-rules.service'; //Views -import { UserProfileComponent } from './views/user-profile/user-profile.component'; -import { LoginComponent } from './views/login/login.component'; -import { ChangePasswordComponent } from './views/login/change-password/change-password.component'; -import { HomeComponent } from './views/home/home.component'; -import { HeaderComponent } from './views/header/header.component'; -import { RegisterComponent } from './views/register/register.component'; -import { RootProfileComponent } from './views/root-profile/root-profile.component'; -import { TokenConfigComponent } from './views/token-config/token-config.component'; -import { AuditComponent } from './views/audit/audit.component'; -import { TrustChainComponent } from './views/trust-chain/trust-chain.component'; -import { AdminHeaderComponent } from './views/admin/admin-header/admin-panel.component'; -import { LogsViewComponent } from './views/admin/logs-view/logs-view.component'; -import { SettingsViewComponent } from './views/admin/settings-view/settings-view.component'; -import { DetailsLogDialog } from './views/admin/details-log-dialog/details-log-dialog.component'; -import { ServiceStatusComponent } from './views/admin/service-status/service-status.component'; -import { SchemaConfigComponent } from './views/schemas/schemas.component'; -// import { BrandingDialogComponent } from './components/branding-dialog/branding-dialog.component'; -import { NotificationsComponent } from './views/notifications/notifications.component'; -import { RolesViewComponent } from './views/roles/roles-view.component'; -import { UsersManagementComponent } from './views/user-management/user-management.component'; -import { UsersManagementDetailComponent } from './views/user-management-detail/user-management-detail.component'; +import {UserProfileComponent} from './views/user-profile/user-profile.component'; +import {LoginComponent} from './views/login/login.component'; +import {ChangePasswordComponent} from './views/login/change-password/change-password.component'; +import {HomeComponent} from './views/home/home.component'; +import {HeaderComponent} from './views/header/header.component'; +import {RegisterComponent} from './views/register/register.component'; +import {RootProfileComponent} from './views/root-profile/root-profile.component'; +import {TokenConfigComponent} from './views/token-config/token-config.component'; +import {AuditComponent} from './views/audit/audit.component'; +import {TrustChainComponent} from './views/trust-chain/trust-chain.component'; +import {AdminHeaderComponent} from './views/admin/admin-header/admin-panel.component'; +import {LogsViewComponent} from './views/admin/logs-view/logs-view.component'; +import {SettingsViewComponent} from './views/admin/settings-view/settings-view.component'; +import {DetailsLogDialog} from './views/admin/details-log-dialog/details-log-dialog.component'; +import {ServiceStatusComponent} from './views/admin/service-status/service-status.component'; +import {SchemaConfigComponent} from './views/schemas/schemas.component'; +import {NotificationsComponent} from './views/notifications/notifications.component'; +import {RolesViewComponent} from './views/roles/roles-view.component'; +import {UsersManagementComponent} from './views/user-management/user-management.component'; +import {UsersManagementDetailComponent} from './views/user-management-detail/user-management-detail.component'; //Components -import { InfoComponent } from './components/info/info/info.component'; -import { BrandingComponent } from './views/branding/branding.component'; -import { StandardRegistryCardComponent } from './components/standard-registry-card/standard-registry-card.component'; -import { SuggestionsConfigurationComponent } from './views/suggestions-configuration/suggestions-configuration.component'; -import { NotificationComponent } from './components/notification/notification.component'; -import { TokenDialogComponent } from './components/token-dialog/token-dialog.component'; +import {InfoComponent} from './components/info/info/info.component'; +import {BrandingComponent} from './views/branding/branding.component'; +import {StandardRegistryCardComponent} from './components/standard-registry-card/standard-registry-card.component'; +import {SuggestionsConfigurationComponent} from './views/suggestions-configuration/suggestions-configuration.component'; +import {NotificationComponent} from './components/notification/notification.component'; +import {TokenDialogComponent} from './components/token-dialog/token-dialog.component'; //Modules -import { MaterialModule } from './modules/common/material.module'; -import { PolicyEngineModule } from './modules/policy-engine/policy-engine.module'; -import { CompareModule } from './modules/analytics/analytics.module'; -import { CommonComponentsModule } from './modules/common/common-components.module'; -import { TagEngineModule } from './modules/tag-engine/tag-engine.module'; -import { SchemaEngineModule } from './modules/schema-engine/schema-engine.module' -import { ThemeService } from './services/theme.service'; -import { RecordService } from './services/record.service'; -import { PolicyStatisticsModule } from './modules/policy-statistics/policy-statistics.module'; -import { SchemaRulesModule } from './modules/schema-rules/schema-rules.module'; +import {MaterialModule} from './modules/common/material.module'; +import {PolicyEngineModule} from './modules/policy-engine/policy-engine.module'; +import {CompareModule} from './modules/analytics/analytics.module'; +import {CommonComponentsModule} from './modules/common/common-components.module'; +import {TagEngineModule} from './modules/tag-engine/tag-engine.module'; +import {SchemaEngineModule} from './modules/schema-engine/schema-engine.module' +import {ThemeService} from './services/theme.service'; +import {RecordService} from './services/record.service'; +import {PolicyStatisticsModule} from './modules/policy-statistics/policy-statistics.module'; +import {SchemaRulesModule} from './modules/schema-rules/schema-rules.module'; // Injectors -import { GET_SCHEMA_NAME } from './injectors/get-schema-name.injector'; -import { BLOCK_TYPE_TIPS, BLOCK_TYPE_TIPS_VALUE, } from './injectors/block-type-tips.injector'; -import { SuggestionsService } from './services/suggestions.service'; -import { QrCodeDialogComponent } from './components/qr-code-dialog/qr-code-dialog.component'; -import { QRCodeModule } from 'angularx-qrcode'; -import { MeecoVCSubmitDialogComponent } from './components/meeco-vc-submit-dialog/meeco-vc-submit-dialog.component'; -import { AboutViewComponent } from './views/admin/about-view/about-view.component'; -import { CompareStorage } from './services/compare-storage.service'; -import { ToolsService } from './services/tools.service'; -import { NewHeaderComponent } from './views/new-header/new-header.component'; -import { SearchResultCardComponent } from './components/search-result-card/search-result-card.component'; -import { PolicyAISearchComponent } from './views/policy-search/policy-ai-search/policy-ai-search.component'; -import { PolicyGuidedSearchComponent } from './views/policy-search/policy-guided-search/policy-guided-search.component'; -import { PolicySearchComponent } from './views/policy-search/policy-search.component'; -import { ListOfTokensUserComponent } from './views/list-of-tokens-user/list-of-tokens-user.component'; +import {GET_SCHEMA_NAME} from './injectors/get-schema-name.injector'; +import {BLOCK_TYPE_TIPS, BLOCK_TYPE_TIPS_VALUE,} from './injectors/block-type-tips.injector'; +import {SuggestionsService} from './services/suggestions.service'; +import {QrCodeDialogComponent} from './components/qr-code-dialog/qr-code-dialog.component'; +import {QRCodeModule} from 'angularx-qrcode'; +import {MeecoVCSubmitDialogComponent} from './components/meeco-vc-submit-dialog/meeco-vc-submit-dialog.component'; +import {AboutViewComponent} from './views/admin/about-view/about-view.component'; +import {CompareStorage} from './services/compare-storage.service'; +import {ToolsService} from './services/tools.service'; +import {NewHeaderComponent} from './views/new-header/new-header.component'; +import {SearchResultCardComponent} from './components/search-result-card/search-result-card.component'; +import {PolicyAISearchComponent} from './views/policy-search/policy-ai-search/policy-ai-search.component'; +import {PolicyGuidedSearchComponent} from './views/policy-search/policy-guided-search/policy-guided-search.component'; +import {PolicySearchComponent} from './views/policy-search/policy-search.component'; +import {ListOfTokensUserComponent} from './views/list-of-tokens-user/list-of-tokens-user.component'; // PrimeNG -import { InputTextModule } from 'primeng/inputtext'; -import { SelectButtonModule } from 'primeng/selectbutton'; -import { DropdownModule } from 'primeng/dropdown'; -import { TableModule } from 'primeng/table'; -import { DialogModule } from 'primeng/dialog'; -import { TagModule } from 'primeng/tag'; -import { ButtonModule } from 'primeng/button'; -import { TooltipModule } from 'primeng/tooltip'; -import { StepsModule } from 'primeng/steps'; -import { ProgressBarModule } from 'primeng/progressbar'; -import { TabViewModule } from 'primeng/tabview'; -import { DynamicDialogModule } from 'primeng/dynamicdialog'; -import { ColorPickerModule } from 'primeng/colorpicker'; -import { ProgressSpinnerModule } from 'primeng/progressspinner'; -import { AISearchService } from './services/ai-search.service'; -import { DndModule } from 'ngx-drag-drop'; -import { PasswordModule } from 'primeng/password'; -import { RegisterDialogComponent } from './views/login/register-dialogs/register-dialog/register-dialog.component'; -import { TermsConditionsComponent } from './views/login/register-dialogs/terms-conditions-dialog/terms-conditions.component'; -import { AccountTypeSelectorDialogComponent } from './views/login/register-dialogs/account-type-selector-dialog/account-type-selector-dialog.component'; -import { ForgotPasswordDialogComponent } from './views/login/forgot-password-dialog/forgot-password-dialog.component'; -import { MultiSelectModule } from 'primeng/multiselect'; -import { RadioButtonModule } from 'primeng/radiobutton'; -import { CalendarModule } from 'primeng/calendar'; -import { InputTextareaModule } from 'primeng/inputtextarea'; -import { ContractEngineModule } from './modules/contract-engine/contract-engine.module'; -import { ProjectComparisonService } from './services/project-comparison.service'; -import { ProjectComparisonModule } from './modules/project-comparison/project-comparison.module'; -import { AngularSvgIconModule } from 'angular-svg-icon'; +import {InputTextModule} from 'primeng/inputtext'; +import {SelectButtonModule} from 'primeng/selectbutton'; +import {DropdownModule} from 'primeng/dropdown'; +import {TableModule} from 'primeng/table'; +import {DialogModule} from 'primeng/dialog'; +import {TagModule} from 'primeng/tag'; +import {ButtonModule} from 'primeng/button'; +import {TooltipModule} from 'primeng/tooltip'; +import {StepsModule} from 'primeng/steps'; +import {ProgressBarModule} from 'primeng/progressbar'; +import {TabViewModule} from 'primeng/tabview'; +import {DynamicDialogModule} from 'primeng/dynamicdialog'; +import {ColorPickerModule} from 'primeng/colorpicker'; +import {ProgressSpinnerModule} from 'primeng/progressspinner'; +import {AISearchService} from './services/ai-search.service'; +import {DndModule} from 'ngx-drag-drop'; +import {PasswordModule} from 'primeng/password'; +import {RegisterDialogComponent} from './views/login/register-dialogs/register-dialog/register-dialog.component'; +import { + TermsConditionsComponent +} from './views/login/register-dialogs/terms-conditions-dialog/terms-conditions.component'; +import { + AccountTypeSelectorDialogComponent +} from './views/login/register-dialogs/account-type-selector-dialog/account-type-selector-dialog.component'; +import {ForgotPasswordDialogComponent} from './views/login/forgot-password-dialog/forgot-password-dialog.component'; +import {MultiSelectModule} from 'primeng/multiselect'; +import {RadioButtonModule} from 'primeng/radiobutton'; +import {CalendarModule} from 'primeng/calendar'; +import {InputTextareaModule} from 'primeng/inputtextarea'; +import {ContractEngineModule} from './modules/contract-engine/contract-engine.module'; +import {ProjectComparisonService} from './services/project-comparison.service'; +import {ProjectComparisonModule} from './modules/project-comparison/project-comparison.module'; +import {AngularSvgIconModule} from 'angular-svg-icon'; // Prototypes import '../prototypes/date-prototype'; -import { OnlyForDemoDirective } from './directives/onlyfordemo.directive'; -import { UseWithServiceDirective } from './directives/use-with-service.directive'; -import { WorkerTasksComponent } from './views/worker-tasks/worker-tasks.component'; +import {OnlyForDemoDirective} from './directives/onlyfordemo.directive'; +import {UseWithServiceDirective} from './directives/use-with-service.directive'; +import {WorkerTasksComponent} from './views/worker-tasks/worker-tasks.component'; -@NgModule({ declarations: [ +@NgModule({ + declarations: [ AppComponent, UserProfileComponent, LoginComponent, @@ -151,7 +155,6 @@ import { WorkerTasksComponent } from './views/worker-tasks/worker-tasks.componen InfoComponent, SchemaConfigComponent, BrandingComponent, - // BrandingDialogComponent, SuggestionsConfigurationComponent, StandardRegistryCardComponent, NotificationComponent, @@ -177,7 +180,8 @@ import { WorkerTasksComponent } from './views/worker-tasks/worker-tasks.componen WorkerTasksComponent ], exports: [], - bootstrap: [AppComponent], imports: [BrowserModule, + bootstrap: [AppComponent], + imports: [BrowserModule, CommonModule, CommonComponentsModule, MaterialModule, @@ -216,7 +220,8 @@ import { WorkerTasksComponent } from './views/worker-tasks/worker-tasks.componen ProjectComparisonModule, DndModule, CheckboxModule, - AngularSvgIconModule.forRoot()], providers: [ + AngularSvgIconModule.forRoot()], + providers: [ WebSocketService, AuthService, ProfileService, @@ -270,5 +275,7 @@ import { WorkerTasksComponent } from './views/worker-tasks/worker-tasks.componen multi: true, }, provideHttpClient(withInterceptorsFromDi(), withJsonpSupport()) - ] }) -export class AppModule { } + ] +}) +export class AppModule { +} diff --git a/frontend/src/app/components/branding-dialog/branding-dialog.component.css b/frontend/src/app/components/branding-dialog/branding-dialog.component.css deleted file mode 100644 index 2b6adf9da9..0000000000 --- a/frontend/src/app/components/branding-dialog/branding-dialog.component.css +++ /dev/null @@ -1,22 +0,0 @@ -/*.page-btns {*/ -/* width: 100%;*/ -/* display: grid;*/ -/* grid-template-columns: 1fr 1fr;*/ -/* column-gap:15px;*/ -/* justify-items: center;*/ -/* background-color: white;*/ -/* padding: 20px 0;*/ -/*}*/ - -/*#cancel-btn {*/ -/* width: 100%;*/ -/* border: 1px solid var(--primary-color);*/ -/* background: none !important;*/ -/* color: var(--primary-color);*/ -/* grid-column: 2;*/ -/*}*/ - -/*#reset-btn {*/ -/* width: 100%;*/ -/* grid-column: 1;*/ -/*}*/ diff --git a/frontend/src/app/components/branding-dialog/branding-dialog.component.html b/frontend/src/app/components/branding-dialog/branding-dialog.component.html deleted file mode 100644 index 00c4a226de..0000000000 --- a/frontend/src/app/components/branding-dialog/branding-dialog.component.html +++ /dev/null @@ -1,6 +0,0 @@ - - - - - - diff --git a/frontend/src/app/components/branding-dialog/branding-dialog.component.ts b/frontend/src/app/components/branding-dialog/branding-dialog.component.ts deleted file mode 100644 index 0ebf8c03aa..0000000000 --- a/frontend/src/app/components/branding-dialog/branding-dialog.component.ts +++ /dev/null @@ -1,18 +0,0 @@ -// import { Component, Inject } from '@angular/core'; -// import { MAT_LEGACY_DIALOG_DATA as MAT_DIALOG_DATA, MatLegacyDialogRef as MatDialogRef } from '@angular/material/legacy-dialog'; -// -// @Component({ -// selector: 'app-branding-dialog', -// templateUrl: './branding-dialog.component.html', -// styleUrls: ['./branding-dialog.component.css'] -// }) -// export class BrandingDialogComponent { -// constructor( -// public dialogRef: MatDialogRef, -// @Inject(MAT_DIALOG_DATA) public data: any -// ) {} -// -// onProceed(): void { -// this.dialogRef.close('proceed'); -// } -// } diff --git a/frontend/src/app/components/meeco-vc-submit-dialog/meeco-vc-submit-dialog.component.html b/frontend/src/app/components/meeco-vc-submit-dialog/meeco-vc-submit-dialog.component.html index 64e8ace05f..5d22647cf5 100644 --- a/frontend/src/app/components/meeco-vc-submit-dialog/meeco-vc-submit-dialog.component.html +++ b/frontend/src/app/components/meeco-vc-submit-dialog/meeco-vc-submit-dialog.component.html @@ -13,15 +13,6 @@

VC Subject Submission

- - - - - - - - -
, private dialogRef: DynamicDialogRef, private config: DynamicDialogConfig, private wsService: WebSocketService diff --git a/frontend/src/app/components/notification/notification.component.html b/frontend/src/app/components/notification/notification.component.html index e361dcf6f0..cbdbcd010f 100644 --- a/frontend/src/app/components/notification/notification.component.html +++ b/frontend/src/app/components/notification/notification.component.html @@ -8,11 +8,6 @@ {{ unreadNotifications }}
- - - - -
Please scan the QR code with Meeco Wallet application -
diff --git a/frontend/src/app/components/qr-code-dialog/qr-code-dialog.component.ts b/frontend/src/app/components/qr-code-dialog/qr-code-dialog.component.ts index 5c6d218a17..1a40019cd3 100644 --- a/frontend/src/app/components/qr-code-dialog/qr-code-dialog.component.ts +++ b/frontend/src/app/components/qr-code-dialog/qr-code-dialog.component.ts @@ -1,5 +1,4 @@ import { Component, Inject, OnDestroy } from '@angular/core'; -// import { MAT_LEGACY_DIALOG_DATA as MAT_DIALOG_DATA, MatLegacyDialogRef as MatDialogRef } from '@angular/material/legacy-dialog'; import { ToastrService } from 'ngx-toastr'; import { Subject } from 'rxjs'; import { takeUntil } from 'rxjs/operators'; @@ -18,8 +17,6 @@ export class QrCodeDialogComponent implements OnDestroy { isMobile: boolean = window.innerWidth <= 810; constructor( - // @Inject(MAT_DIALOG_DATA) private data: any, - // private dialogRef: MatDialogRef, private dialogRef: DynamicDialogRef, private config: DynamicDialogConfig, private toastr: ToastrService, diff --git a/frontend/src/app/components/standard-registry-card/standard-registry-card.component.html b/frontend/src/app/components/standard-registry-card/standard-registry-card.component.html index feda13b1e5..4b834d01b0 100644 --- a/frontend/src/app/components/standard-registry-card/standard-registry-card.component.html +++ b/frontend/src/app/components/standard-registry-card/standard-registry-card.component.html @@ -7,12 +7,6 @@
- - - - - -
{{ registry.policies.length }} {{ getPoliciesLabel(registry.policies.length) }} - - - - -
- - - - - - - - -
  • diff --git a/frontend/src/app/components/standard-registry-card/standard-registry-card.component.ts b/frontend/src/app/components/standard-registry-card/standard-registry-card.component.ts index 72225cf72b..9171f22e82 100644 --- a/frontend/src/app/components/standard-registry-card/standard-registry-card.component.ts +++ b/frontend/src/app/components/standard-registry-card/standard-registry-card.component.ts @@ -1,7 +1,4 @@ import {Component, EventEmitter, Input, Output, SimpleChanges, ViewChild} from '@angular/core'; -// import {MatIconRegistry} from '@angular/material/icon'; -// import { MatLegacyMenuTrigger as MatMenuTrigger } from '@angular/material/legacy-menu'; -// import {DomSanitizer} from '@angular/platform-browser'; import {IStandardRegistryResponse} from '@guardian/interfaces'; import {OverlayPanel} from 'primeng/overlaypanel'; @@ -11,7 +8,6 @@ import {OverlayPanel} from 'primeng/overlaypanel'; styleUrls: ['./standard-registry-card.component.scss'], }) export class StandardRegistryCardComponent { - // @ViewChild(MatMenuTrigger) policiesMenuTrigger!: MatMenuTrigger; @ViewChild('policiesOverlay') policiesOverlay!: OverlayPanel; @Input() registry!: IStandardRegistryResponse; @Input() isRegistrySelected!: boolean; @@ -21,18 +17,7 @@ export class StandardRegistryCardComponent { private ignoreFields: string[] = ['@context', 'id', 'type']; - constructor( - // private matIconRegistry: MatIconRegistry, - // private domSanitizer: DomSanitizer - ) { - // this.matIconRegistry.addSvgIconLiteral( - // 'chevron_down', - // this.domSanitizer.bypassSecurityTrustHtml(` - // - // - // - // `) - // ); + constructor() { } ngOnChanges(changes: SimpleChanges) { @@ -69,10 +54,6 @@ export class StandardRegistryCardComponent { return policiesArrLength === 1 ? 'policy' : 'policies'; } - // get isPoliciesMenuOpened(): boolean { - // return this.policiesMenuTrigger?.menuOpen || false; - // } - get isPoliciesMenuOpened(): boolean { return this.policiesOverlay?.overlayVisible || false; } diff --git a/frontend/src/app/modules/analytics/compare-document/compare-document.component.html b/frontend/src/app/modules/analytics/compare-document/compare-document.component.html index 20b4fe0f50..ed68ae1763 100644 --- a/frontend/src/app/modules/analytics/compare-document/compare-document.component.html +++ b/frontend/src/app/modules/analytics/compare-document/compare-document.component.html @@ -10,173 +10,6 @@
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
@@ -319,11 +152,6 @@
Documents: - - - - -
@@ -343,8 +171,6 @@
- -
diff --git a/frontend/src/app/modules/analytics/compare-module/compare-module.component.html b/frontend/src/app/modules/analytics/compare-module/compare-module.component.html index d8729e4919..453711ae95 100644 --- a/frontend/src/app/modules/analytics/compare-module/compare-module.component.html +++ b/frontend/src/app/modules/analytics/compare-module/compare-module.component.html @@ -1,248 +1,3 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
@@ -342,17 +97,6 @@
- - - - - - - - - - -
@@ -360,13 +104,6 @@ [attr.type]="item.type" [attr.rate]="item.total_rate" [attr.hidden]="item._hidden">
{{ i + 1 }}
- - - - - - -
@@ -378,8 +115,6 @@ {{ item.left_index }}
- -
{{ item.left_tag || item.left_type }}
@@ -393,8 +128,6 @@ {{ item.left_index }}
- -
{{ item.left_tag || item.left_type }}
@@ -410,8 +143,6 @@ {{ item.right_index }}
- -
{{ item.right_tag || item.right_type }}
@@ -425,28 +156,18 @@ {{ item.right_index }}
- -
{{ item.right_tag || item.right_type }}
- - - - - - - -
- - - - + +
diff --git a/frontend/src/app/modules/analytics/compare-module/compare-module.component.ts b/frontend/src/app/modules/analytics/compare-module/compare-module.component.ts index 3ae92a165c..c0965a915c 100644 --- a/frontend/src/app/modules/analytics/compare-module/compare-module.component.ts +++ b/frontend/src/app/modules/analytics/compare-module/compare-module.component.ts @@ -1,4 +1,4 @@ -import { Component, EventEmitter, Input, OnInit, Output, SimpleChanges } from '@angular/core'; +import {Component, EventEmitter, Input, OnInit, Output, SimpleChanges} from '@angular/core'; @Component({ selector: 'app-compare-module', @@ -31,48 +31,6 @@ export class CompareModuleComponent implements OnInit { displayedColumns: string[] = []; columns: any[] = []; - // icons: any = { - // 'interfaceContainerBlock': 'tab', - // 'interfaceStepBlock': 'vertical_split', - // 'policyRolesBlock': 'manage_accounts', - // 'groupManagerBlock': 'groups', - // 'informationBlock': 'info', - // 'interfaceActionBlock': 'flash_on', - // 'buttonBlock': 'radio_button_checked', - // 'switchBlock': 'rule', - // 'interfaceDocumentsSourceBlock': 'table_view', - // 'requestVcDocumentBlock': 'dynamic_form', - // 'multiSignBlock': 'done_all', - // 'sendToGuardianBlock': 'send', - // 'externalDataBlock': 'cloud', - // 'aggregateDocumentBlock': 'calendar_month', - // 'reassigningBlock': 'content_copy', - // 'revokeBlock': 'restart_alt', - // 'revocationBlock': 'restart_alt', - // 'setRelationshipsBlock': 'settings', - // 'splitBlock': 'content_cut', - // 'filtersAddon': 'filter_alt', - // 'documentsSourceAddon': 'source', - // 'paginationAddon': 'pages', - // 'timerBlock': 'schedule', - // 'documentValidatorBlock': 'task_alt', - // 'createTokenBlock': 'token', - // 'mintDocumentBlock': 'paid', - // 'retirementDocumentBlock': 'delete', - // 'tokenActionBlock': 'generating_tokens', - // 'tokenConfirmationBlock': 'key', - // 'impactAddon': 'receipt', - // 'calculateContainerBlock': 'bar_chart', - // 'customLogicBlock': 'bar_chart', - // 'calculateMathAddon': 'calculate', - // 'calculateMathVariables': '123', - // 'reportBlock': 'addchart', - // 'reportItemBlock': 'list_alt', - // 'messagesReportBlock': 'addchart', - // 'externalTopicBlock': 'cloud', - // 'notificationBlock': 'notifications', - // } - icons: any = { 'interfaceContainerBlock': 'pi-folder', 'interfaceStepBlock': 'pi-sort-amount-down-alt', @@ -164,10 +122,10 @@ export class CompareModuleComponent implements OnInit { item1._index = i; max = Math.max(max, item1.lvl); } - if(max > 10) { + if (max > 10) { this._pOffset = 20; } - if(max > 15) { + if (max > 15) { this._pOffset = 15; } @@ -214,7 +172,7 @@ export class CompareModuleComponent implements OnInit { } } - onScroll(event:any) { + onScroll(event: any) { document.querySelectorAll('.left-tree').forEach(el => { el.scrollLeft = event.target.scrollLeft; }) diff --git a/frontend/src/app/modules/analytics/compare-policy/compare-policy.component.html b/frontend/src/app/modules/analytics/compare-policy/compare-policy.component.html index edc4085754..74ed40e181 100644 --- a/frontend/src/app/modules/analytics/compare-policy/compare-policy.component.html +++ b/frontend/src/app/modules/analytics/compare-policy/compare-policy.component.html @@ -4,275 +4,6 @@
Policies are {{ total }}% the same.
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
@@ -385,15 +116,7 @@
{{ i + 1 }}
- - - - -
- - -
@@ -404,9 +127,6 @@
{{ item.left_index }}
- - -
@@ -420,9 +140,6 @@
{{ item.left_index }}
- - -
@@ -438,9 +155,6 @@
{{ item.right_index }}
- - -
@@ -454,9 +168,6 @@
{{ item.right_index }}
- - -
@@ -464,18 +175,12 @@
- - - - - - - -
- - + +
@@ -604,10 +309,6 @@ [attr.offset]="prop.lvl" [attr.index]="index">
{{ prop.name }}:
- - - -
@@ -719,9 +420,6 @@ [attr.offset]="prop.lvl" [attr.index]="index">
{{ prop.name }}:
- - -
diff --git a/frontend/src/app/modules/analytics/compare-record/compare-record.component.html b/frontend/src/app/modules/analytics/compare-record/compare-record.component.html index d6b1c25ed4..80ec9c8bde 100644 --- a/frontend/src/app/modules/analytics/compare-record/compare-record.component.html +++ b/frontend/src/app/modules/analytics/compare-record/compare-record.component.html @@ -15,171 +15,6 @@
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
@@ -249,10 +84,6 @@ [style.grid-template-columns]="_gridStyle">
{{ row.number }}
- - - -
@@ -275,12 +106,8 @@
{{ treeItemContext.data.docIndex }}
- - -
-
{{ treeItemContext.data.docName }}
@@ -289,16 +116,12 @@
- - - -
- - - - + +
@@ -424,19 +247,9 @@
Documents: - - - - - - - - - -
- +
@@ -453,8 +266,6 @@
- -
diff --git a/frontend/src/app/modules/analytics/compare-schema/compare-schema.component.html b/frontend/src/app/modules/analytics/compare-schema/compare-schema.component.html index 6a0f4a687e..cdcd568246 100644 --- a/frontend/src/app/modules/analytics/compare-schema/compare-schema.component.html +++ b/frontend/src/app/modules/analytics/compare-schema/compare-schema.component.html @@ -1,152 +1,3 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
@@ -196,18 +47,8 @@
{{ i + 1 }}
- - - - - - - - - -
- - - - - - -
diff --git a/frontend/src/app/modules/analytics/compare-tool/compare-tool.component.html b/frontend/src/app/modules/analytics/compare-tool/compare-tool.component.html index b87ceebe38..06cf22b035 100644 --- a/frontend/src/app/modules/analytics/compare-tool/compare-tool.component.html +++ b/frontend/src/app/modules/analytics/compare-tool/compare-tool.component.html @@ -11,271 +11,6 @@
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
@@ -431,15 +166,7 @@ [style.grid-template-columns]="_gridStyle">
{{ row.number }}
- - - - -
- - -
@@ -462,10 +189,6 @@ [attr.index-rate]="treeItemContext.data.indexRate"> {{ treeItemContext.data.blockIndex }}
- - - -
@@ -475,14 +198,10 @@
- - - - -
- - + +
@@ -513,24 +232,6 @@
- - - - - - - - - - - - - - - - - - @@ -651,10 +352,6 @@ {{ prop.name }}:
- - - -
diff --git a/frontend/src/app/modules/analytics/compare/compare.component.html b/frontend/src/app/modules/analytics/compare/compare.component.html index cfe333c1a7..a1fa2bded1 100644 --- a/frontend/src/app/modules/analytics/compare/compare.component.html +++ b/frontend/src/app/modules/analytics/compare/compare.component.html @@ -10,22 +10,12 @@
- - Back
- - - - - - - -
- - - - - - - - -
- - - - - - - - -
- - - - - - - -
- - Export
- - - - - - - -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
@@ -517,16 +209,9 @@ [style.grid-template-columns]="_gridStyle">
{{ row.number }}
- - - - -
- -
@@ -546,15 +231,6 @@
{{ context.blockIndex }}
- - - - - - - - -
@@ -564,11 +240,6 @@
- - - - -
@@ -726,10 +397,6 @@ {{ prop.name }}:
- - - -
@@ -901,10 +568,6 @@ {{ prop.name }}:
- - - -
diff --git a/frontend/src/app/modules/analytics/search-policies/search-policies.component.html b/frontend/src/app/modules/analytics/search-policies/search-policies.component.html index 2d2d5b681c..e0938bcce5 100644 --- a/frontend/src/app/modules/analytics/search-policies/search-policies.component.html +++ b/frontend/src/app/modules/analytics/search-policies/search-policies.component.html @@ -19,10 +19,6 @@ Filter by
- - - -
- - - - - - - - - - -
@@ -69,110 +52,6 @@
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
@@ -190,7 +69,6 @@ - - - diff --git a/frontend/src/app/modules/artifact-engine/artifact-config/artifact-config.component.html b/frontend/src/app/modules/artifact-engine/artifact-config/artifact-config.component.html index 31cc932ddc..155d565339 100644 --- a/frontend/src/app/modules/artifact-engine/artifact-config/artifact-config.component.html +++ b/frontend/src/app/modules/artifact-engine/artifact-config/artifact-config.component.html @@ -22,7 +22,7 @@

Artifacts

- Policy + Policy {{ currentPolicy.name }}
@@ -34,12 +34,12 @@

Artifacts

-
@@ -68,10 +68,10 @@

Artifacts

Rate
@@ -237,8 +115,6 @@
-
@@ -80,9 +80,9 @@

Artifacts

- @@ -106,79 +106,6 @@

Artifacts

- - Delete Artifact diff --git a/frontend/src/app/modules/artifact-engine/artifact-config/artifact-config.component.ts b/frontend/src/app/modules/artifact-engine/artifact-config/artifact-config.component.ts index 8ee702612c..61ea7bf72f 100644 --- a/frontend/src/app/modules/artifact-engine/artifact-config/artifact-config.component.ts +++ b/frontend/src/app/modules/artifact-engine/artifact-config/artifact-config.component.ts @@ -1,13 +1,12 @@ -import { Component, OnInit } from '@angular/core'; -// import { MatLegacyDialog as MatDialog } from '@angular/material/legacy-dialog'; -import { ActivatedRoute, Router } from '@angular/router'; -import { IUser, PolicyType, UserPermissions } from '@guardian/interfaces'; -import { HttpResponse } from '@angular/common/http'; -import { forkJoin } from 'rxjs'; -import { PolicyEngineService } from 'src/app/services/policy-engine.service'; -import { ProfileService } from 'src/app/services/profile.service'; -import { ArtifactService } from 'src/app/services/artifact.service'; -import { ArtifactImportDialog } from '../artifact-import-dialog/artifact-import-dialog.component'; +import {Component, OnInit} from '@angular/core'; +import {ActivatedRoute, Router} from '@angular/router'; +import {IUser, PolicyType, UserPermissions} from '@guardian/interfaces'; +import {HttpResponse} from '@angular/common/http'; +import {forkJoin} from 'rxjs'; +import {PolicyEngineService} from 'src/app/services/policy-engine.service'; +import {ProfileService} from 'src/app/services/profile.service'; +import {ArtifactService} from 'src/app/services/artifact.service'; +import {ArtifactImportDialog} from '../artifact-import-dialog/artifact-import-dialog.component'; import {DialogService} from 'primeng/dynamicdialog'; /** @@ -47,7 +46,6 @@ export class ArtifactConfigComponent implements OnInit { private policyEngineService: PolicyEngineService, private route: ActivatedRoute, private router: Router, - // public dialog: MatDialog, private dialog: DialogService, private artifact: ArtifactService) { this.policies = []; @@ -96,7 +94,7 @@ export class ArtifactConfigComponent implements OnInit { this.pageIndex = 0; this.pageSize = 10; this.loadArtifacts(); - }, ({ message }) => { + }, ({message}) => { this.loading = false; console.error(message); }); @@ -159,7 +157,6 @@ export class ArtifactConfigComponent implements OnInit { policyId: this.currentPolicy?.id, policies: this.policies }, - // disableClose: true, modal: true, closable: false, }); diff --git a/frontend/src/app/modules/artifact-engine/artifact-import-dialog/artifact-import-dialog.component.html b/frontend/src/app/modules/artifact-engine/artifact-import-dialog/artifact-import-dialog.component.html index 5132e3060a..a092153d46 100644 --- a/frontend/src/app/modules/artifact-engine/artifact-import-dialog/artifact-import-dialog.component.html +++ b/frontend/src/app/modules/artifact-engine/artifact-import-dialog/artifact-import-dialog.component.html @@ -4,14 +4,6 @@

- - - - - - - -
@@ -23,14 +15,16 @@

placeholder="Select a Policy">

- +
diff --git a/frontend/src/app/modules/artifact-engine/artifact-import-dialog/artifact-import-dialog.component.ts b/frontend/src/app/modules/artifact-engine/artifact-import-dialog/artifact-import-dialog.component.ts index 579293d1ff..3e5c382973 100644 --- a/frontend/src/app/modules/artifact-engine/artifact-import-dialog/artifact-import-dialog.component.ts +++ b/frontend/src/app/modules/artifact-engine/artifact-import-dialog/artifact-import-dialog.component.ts @@ -1,6 +1,5 @@ import { Component, Inject } from '@angular/core'; import { UntypedFormBuilder, Validators } from '@angular/forms'; -// import { MAT_LEGACY_DIALOG_DATA as MAT_DIALOG_DATA, MatLegacyDialogRef as MatDialogRef } from '@angular/material/legacy-dialog'; import { PolicyType } from '@guardian/interfaces'; import {DynamicDialogConfig, DynamicDialogRef} from 'primeng/dynamicdialog'; @@ -17,8 +16,6 @@ export class ArtifactImportDialog { public policies: any = []; constructor( - // public dialogRef: MatDialogRef, - // @Inject(MAT_DIALOG_DATA) public data: any private dialogRef: DynamicDialogRef, private config: DynamicDialogConfig, private fb: UntypedFormBuilder @@ -28,7 +25,6 @@ export class ArtifactImportDialog { if (data) { this.policies = data.policies?.filter((policy: any) => policy.status === PolicyType.DRAFT) || []; const current = this.policies.find((policy: any) => policy.id === data.policyId); - // this.policyId.patchValue(current?.id || ''); this.policyId.patchValue(current ? { label: current.name, value: current.id } : null); } } diff --git a/frontend/src/app/modules/artifact-engine/artifact-properties/artifact-properties.component.html b/frontend/src/app/modules/artifact-engine/artifact-properties/artifact-properties.component.html index 885caa94d8..fe9a27fd4c 100644 --- a/frontend/src/app/modules/artifact-engine/artifact-properties/artifact-properties.component.html +++ b/frontend/src/app/modules/artifact-engine/artifact-properties/artifact-properties.component.html @@ -4,20 +4,14 @@ cdkDropList class="artifact-list" [cdkDropListDisabled]="readonly">
- - {{ artifact.name }} ({{ artifact.type }}) - -
diff --git a/frontend/src/app/modules/common/alert/alert.component.html b/frontend/src/app/modules/common/alert/alert.component.html index 9cdac241b0..8641740b45 100644 --- a/frontend/src/app/modules/common/alert/alert.component.html +++ b/frontend/src/app/modules/common/alert/alert.component.html @@ -1,18 +1,3 @@ - - - - - - - - - - - - - - -
{{ text }}
- +
diff --git a/frontend/src/app/modules/common/alert/alert.component.ts b/frontend/src/app/modules/common/alert/alert.component.ts index 8f3dcca644..f3c3f1c0ca 100644 --- a/frontend/src/app/modules/common/alert/alert.component.ts +++ b/frontend/src/app/modules/common/alert/alert.component.ts @@ -1,5 +1,4 @@ import { Component, Inject, OnInit } from '@angular/core'; -// import { MAT_LEGACY_DIALOG_DATA as MAT_DIALOG_DATA, MatLegacyDialogRef as MatDialogRef } from '@angular/material/legacy-dialog'; import { DynamicDialogRef, DynamicDialogConfig } from 'primeng/dynamicdialog'; @@ -21,8 +20,6 @@ export class AlertComponent implements OnInit { isVisible: boolean = true; constructor( - // public dialogRef: MatDialogRef, - // @Inject(MAT_DIALOG_DATA) public data: any public dialogRef: DynamicDialogRef, public config: DynamicDialogConfig ) { @@ -35,19 +32,6 @@ export class AlertComponent implements OnInit { ngOnInit(): void {} - // private getIconByType(type?: AlertType) { - // switch (type) { - // case AlertType.ERROR: - // return 'error'; - // case AlertType.WARN: - // return 'warning'; - // case AlertType.INFO: - // return 'info'; - // default: - // return; - // } - // } - private getIconByType(type?: AlertType) { switch (type) { case AlertType.ERROR: diff --git a/frontend/src/app/modules/common/common-components.module.ts b/frontend/src/app/modules/common/common-components.module.ts index 56a2a207d5..87af9348d8 100644 --- a/frontend/src/app/modules/common/common-components.module.ts +++ b/frontend/src/app/modules/common/common-components.module.ts @@ -1,44 +1,43 @@ -import { NgModule } from '@angular/core'; -import { CommonModule } from '@angular/common'; -import { FormsModule } from '@angular/forms'; -// import { NgxMatDatetimePickerModule } from '@angular-material-components/datetime-picker'; -import { MaterialModule } from './material.module'; -import { DatetimePicker } from './datetime-picker/datetime-picker.component'; -import { HederaExplorer } from './hedera-explorer/hedera-explorer.component'; -import { SelectMenuButton } from './select-menu/select-menu.component'; -import { AsyncProgressComponent } from './async-progress/async-progress.component'; -import { SwitchButton } from './switch-button/switch-button.component'; -import { ConfirmationDialogComponent } from './confirmation-dialog/confirmation-dialog.component'; -import { FileDragNDropComponent } from './file-drag-n-drop/file-drag-n-drop.component'; -import { IconPreviewDialog } from './icon-preview-dialog/icon-preview-dialog.component'; -import { TokenConfigurationComponent } from './token-configuration/token-configuration.component'; -import { NgxFileDropModule } from 'ngx-file-drop'; -import { FileExplorer } from './file-explorer/file-explorer.component'; -import { NgxColorsModule } from 'ngx-colors'; -import { ConfirmDialog } from './confirm-dialog/confirm-dialog.component'; -import { SelectorDialogComponent } from './selector-dialog/selector-dialog.component'; -import { StepTreeComponent } from './step-tree/step-tree.component'; -import { SeparateStepperComponent } from './separate-stepper/separate-stepper.component'; -import { NgxMaskDirective, provideNgxMask } from 'ngx-mask'; -import { NewVersionsComponent } from './new-versions/new-versions.component'; -import { DataInputDialogComponent } from './data-input-dialog/data-input-dialog.component'; -import { CompareBtnComponent } from './compare-btn/compare-btn.component'; -import { CompareViewerComponent } from './compare-viewer/compare-viewer.component'; -import { AlertComponent } from './alert/alert.component'; -import { DialogModule } from 'primeng/dialog'; -import { InputTextModule } from 'primeng/inputtext'; -import { DropdownModule } from 'primeng/dropdown'; -import { ProgressBarModule } from 'primeng/progressbar'; -import { ButtonModule } from 'primeng/button'; -import { PaginatorComponent } from './paginator/paginator.component'; -import { AngularSvgIconModule } from 'angular-svg-icon'; -import { StatusDropdown } from './status-dropdown/status-dropdown.component'; -import { CustomCustomDialogComponent } from './custom-confirm-dialog/custom-confirm-dialog.component'; -import { TreeGraphComponent } from './tree-graph/tree-graph.component'; -import { GuardianSwitchButton } from './guardian-switch-button/guardian-switch-button.component'; -import { ImportEntityDialog } from './import-entity-dialog/import-entity-dialog.component'; -import { DialogService, DynamicDialogModule } from 'primeng/dynamicdialog'; -import { TabViewModule } from 'primeng/tabview'; +import {NgModule} from '@angular/core'; +import {CommonModule} from '@angular/common'; +import {FormsModule} from '@angular/forms'; +import {MaterialModule} from './material.module'; +import {DatetimePicker} from './datetime-picker/datetime-picker.component'; +import {HederaExplorer} from './hedera-explorer/hedera-explorer.component'; +import {SelectMenuButton} from './select-menu/select-menu.component'; +import {AsyncProgressComponent} from './async-progress/async-progress.component'; +import {SwitchButton} from './switch-button/switch-button.component'; +import {ConfirmationDialogComponent} from './confirmation-dialog/confirmation-dialog.component'; +import {FileDragNDropComponent} from './file-drag-n-drop/file-drag-n-drop.component'; +import {IconPreviewDialog} from './icon-preview-dialog/icon-preview-dialog.component'; +import {TokenConfigurationComponent} from './token-configuration/token-configuration.component'; +import {NgxFileDropModule} from 'ngx-file-drop'; +import {FileExplorer} from './file-explorer/file-explorer.component'; +import {NgxColorsModule} from 'ngx-colors'; +import {ConfirmDialog} from './confirm-dialog/confirm-dialog.component'; +import {SelectorDialogComponent} from './selector-dialog/selector-dialog.component'; +import {StepTreeComponent} from './step-tree/step-tree.component'; +import {SeparateStepperComponent} from './separate-stepper/separate-stepper.component'; +import {NgxMaskDirective, provideNgxMask} from 'ngx-mask'; +import {NewVersionsComponent} from './new-versions/new-versions.component'; +import {DataInputDialogComponent} from './data-input-dialog/data-input-dialog.component'; +import {CompareBtnComponent} from './compare-btn/compare-btn.component'; +import {CompareViewerComponent} from './compare-viewer/compare-viewer.component'; +import {AlertComponent} from './alert/alert.component'; +import {DialogModule} from 'primeng/dialog'; +import {InputTextModule} from 'primeng/inputtext'; +import {DropdownModule} from 'primeng/dropdown'; +import {ProgressBarModule} from 'primeng/progressbar'; +import {ButtonModule} from 'primeng/button'; +import {PaginatorComponent} from './paginator/paginator.component'; +import {AngularSvgIconModule} from 'angular-svg-icon'; +import {StatusDropdown} from './status-dropdown/status-dropdown.component'; +import {CustomCustomDialogComponent} from './custom-confirm-dialog/custom-confirm-dialog.component'; +import {TreeGraphComponent} from './tree-graph/tree-graph.component'; +import {GuardianSwitchButton} from './guardian-switch-button/guardian-switch-button.component'; +import {ImportEntityDialog} from './import-entity-dialog/import-entity-dialog.component'; +import {DialogService, DynamicDialogModule} from 'primeng/dynamicdialog'; +import {TabViewModule} from 'primeng/tabview'; import {TooltipModule} from 'primeng/tooltip'; @NgModule({ @@ -73,7 +72,6 @@ import {TooltipModule} from 'primeng/tooltip'; CommonModule, FormsModule, MaterialModule, - // NgxMatDatetimePickerModule, NgxFileDropModule, NgxColorsModule, NgxMaskDirective, @@ -119,4 +117,5 @@ import {TooltipModule} from 'primeng/tooltip'; ImportEntityDialog ] }) -export class CommonComponentsModule { } +export class CommonComponentsModule { +} diff --git a/frontend/src/app/modules/common/compare-viewer/compare-viewer.component.html b/frontend/src/app/modules/common/compare-viewer/compare-viewer.component.html index accf68a216..0e69f515b2 100644 --- a/frontend/src/app/modules/common/compare-viewer/compare-viewer.component.html +++ b/frontend/src/app/modules/common/compare-viewer/compare-viewer.component.html @@ -1,5 +1,4 @@
-
- - - - - - - - -
+
Documents
@@ -35,7 +26,6 @@
-
@@ -52,8 +42,6 @@ {{ item }}
- -
diff --git a/frontend/src/app/modules/common/compare-viewer/compare-viewer.component.ts b/frontend/src/app/modules/common/compare-viewer/compare-viewer.component.ts index 129d12da5b..3dc84c9678 100644 --- a/frontend/src/app/modules/common/compare-viewer/compare-viewer.component.ts +++ b/frontend/src/app/modules/common/compare-viewer/compare-viewer.component.ts @@ -1,8 +1,7 @@ -import { Component, Input, OnInit, ViewChild } from '@angular/core'; -import { CompareStorage } from '../../../services/compare-storage.service'; -import { Subscription } from 'rxjs'; -import { Router } from '@angular/router'; -// import { MatLegacyMenuTrigger as MatMenuTrigger } from '@angular/material/legacy-menu'; +import {Component, Input, OnInit, ViewChild} from '@angular/core'; +import {CompareStorage} from '../../../services/compare-storage.service'; +import {Subscription} from 'rxjs'; +import {Router} from '@angular/router'; @Component({ selector: 'app-compare-viewer', @@ -13,8 +12,6 @@ export class CompareViewerComponent implements OnInit { @Input() active: boolean = false; @Input() collapsed: boolean = false; - // @ViewChild(MatMenuTrigger) compareMenu: MatMenuTrigger; - public count: number = 0; public ids: string[]; public menuOpened: boolean = false; @@ -74,9 +71,6 @@ export class CompareViewerComponent implements OnInit { } public onCompare(): void { - // if (this.compareMenu) { - // this.compareMenu.closeMenu(); - // } if (this.selectedCount > 1) { const ids = this.ids.filter(id => this.selected[id]); const items = btoa(JSON.stringify({ diff --git a/frontend/src/app/modules/common/confirm-dialog/confirm-dialog.component.html b/frontend/src/app/modules/common/confirm-dialog/confirm-dialog.component.html index 67d3fde560..fb5c35a485 100644 --- a/frontend/src/app/modules/common/confirm-dialog/confirm-dialog.component.html +++ b/frontend/src/app/modules/common/confirm-dialog/confirm-dialog.component.html @@ -1,57 +1,3 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
{{ title }} diff --git a/frontend/src/app/modules/common/confirm-dialog/confirm-dialog.component.ts b/frontend/src/app/modules/common/confirm-dialog/confirm-dialog.component.ts index d0d23b8f24..b5d6de8fb3 100644 --- a/frontend/src/app/modules/common/confirm-dialog/confirm-dialog.component.ts +++ b/frontend/src/app/modules/common/confirm-dialog/confirm-dialog.component.ts @@ -1,8 +1,6 @@ import {Component, Inject} from '@angular/core'; import {DynamicDialogConfig, DynamicDialogRef} from 'primeng/dynamicdialog'; -// import { MatLegacyDialogRef as MatDialogRef, MAT_LEGACY_DIALOG_DATA as MAT_DIALOG_DATA } from '@angular/material/legacy-dialog'; - /** * Dialog allowing you to select a file and load schemes. */ @@ -18,8 +16,6 @@ export class ConfirmDialog { public cancelButton: string = 'Cancel'; constructor( - // public dialogRef: MatDialogRef, - // @Inject(MAT_DIALOG_DATA) public data: any private dialogRef: DynamicDialogRef, private config: DynamicDialogConfig, ) { diff --git a/frontend/src/app/modules/common/confirmation-dialog/confirmation-dialog.component.ts b/frontend/src/app/modules/common/confirmation-dialog/confirmation-dialog.component.ts index 45ba3e3e30..d19f369c47 100644 --- a/frontend/src/app/modules/common/confirmation-dialog/confirmation-dialog.component.ts +++ b/frontend/src/app/modules/common/confirmation-dialog/confirmation-dialog.component.ts @@ -1,5 +1,4 @@ import {Component, Inject, OnInit} from '@angular/core'; -// import { MAT_LEGACY_DIALOG_DATA as MAT_DIALOG_DATA, MatLegacyDialogRef as MatDialogRef } from '@angular/material/legacy-dialog'; import {DynamicDialogConfig, DynamicDialogRef} from 'primeng/dynamicdialog'; @Component({ @@ -13,8 +12,6 @@ export class ConfirmationDialogComponent implements OnInit { public dialogText!: string; constructor( - // public dialogRef: MatDialogRef, - // @Inject(MAT_DIALOG_DATA) public data: any, private dialogRef: DynamicDialogRef, private config: DynamicDialogConfig, ) { diff --git a/frontend/src/app/modules/common/data-input-dialog/data-input-dialog.component.html b/frontend/src/app/modules/common/data-input-dialog/data-input-dialog.component.html index e47309d96b..d66bb9ddf7 100644 --- a/frontend/src/app/modules/common/data-input-dialog/data-input-dialog.component.html +++ b/frontend/src/app/modules/common/data-input-dialog/data-input-dialog.component.html @@ -1,28 +1,3 @@ - - - - - - - - - - - - - - - - - - - - - - - - - @@ -33,19 +8,12 @@
- - - - -
- -
@@ -54,11 +22,6 @@
- - - - -
diff --git a/frontend/src/app/modules/common/data-input-dialog/data-input-dialog.component.ts b/frontend/src/app/modules/common/data-input-dialog/data-input-dialog.component.ts index a0ca7814d8..ca2f955108 100644 --- a/frontend/src/app/modules/common/data-input-dialog/data-input-dialog.component.ts +++ b/frontend/src/app/modules/common/data-input-dialog/data-input-dialog.component.ts @@ -1,5 +1,4 @@ import { Component, Inject } from '@angular/core'; -// import { MatLegacyDialogRef as MatDialogRef, MAT_LEGACY_DIALOG_DATA as MAT_DIALOG_DATA } from '@angular/material/legacy-dialog'; import { UntypedFormControl, UntypedFormGroup } from '@angular/forms'; import { DynamicDialogRef, DynamicDialogConfig } from 'primeng/dynamicdialog'; @@ -22,8 +21,6 @@ export class DataInputDialogComponent { isVisible: boolean = true; constructor( - // public dialogRef: MatDialogRef, - // @Inject(MAT_DIALOG_DATA) public data: any public dialogRef: DynamicDialogRef, public config: DynamicDialogConfig ) { diff --git a/frontend/src/app/modules/common/datetime-picker/datetime-picker.component.html b/frontend/src/app/modules/common/datetime-picker/datetime-picker.component.html index 66f1ba4ec7..ec19a6feef 100644 --- a/frontend/src/app/modules/common/datetime-picker/datetime-picker.component.html +++ b/frontend/src/app/modules/common/datetime-picker/datetime-picker.component.html @@ -1,12 +1,3 @@ - - - - - - - - -
(); @@ -43,14 +35,6 @@ export class DatetimePicker { this.placeholder = this.placeholder || 'Choose a date & time'; } - // onValue(event: any) { - // this._currentValue = moment(event.value).utc().toISOString(); - // if (this.value != this._currentValue) { - // this.value = this._currentValue; - // this.valueChange.emit(this._currentValue); - // } - // } - onValue(event: Date) { const utcValue = moment(event).utc().toISOString(); if (this.value !== event) { diff --git a/frontend/src/app/modules/common/file-drag-n-drop/file-drag-n-drop.component.html b/frontend/src/app/modules/common/file-drag-n-drop/file-drag-n-drop.component.html index 52c2be7109..b72418147f 100644 --- a/frontend/src/app/modules/common/file-drag-n-drop/file-drag-n-drop.component.html +++ b/frontend/src/app/modules/common/file-drag-n-drop/file-drag-n-drop.component.html @@ -6,8 +6,6 @@ (onFileDrop)="droppedFile($event)">
- - {{ dropZoneLabel }}
diff --git a/frontend/src/app/modules/common/icon-preview-dialog/icon-preview-dialog.component.html b/frontend/src/app/modules/common/icon-preview-dialog/icon-preview-dialog.component.html index 6b8a122546..c3f11307b4 100644 --- a/frontend/src/app/modules/common/icon-preview-dialog/icon-preview-dialog.component.html +++ b/frontend/src/app/modules/common/icon-preview-dialog/icon-preview-dialog.component.html @@ -1,22 +1,16 @@
Icon Preview - -
- -
Icon not found
- -
diff --git a/frontend/src/app/modules/common/icon-preview-dialog/icon-preview-dialog.component.ts b/frontend/src/app/modules/common/icon-preview-dialog/icon-preview-dialog.component.ts index 563821822f..90836709ae 100644 --- a/frontend/src/app/modules/common/icon-preview-dialog/icon-preview-dialog.component.ts +++ b/frontend/src/app/modules/common/icon-preview-dialog/icon-preview-dialog.component.ts @@ -1,5 +1,4 @@ import {Component, Inject} from '@angular/core'; -// import { MatLegacyDialogRef as MatDialogRef, MAT_LEGACY_DIALOG_DATA as MAT_DIALOG_DATA } from '@angular/material/legacy-dialog'; import {IconType} from '@guardian/interfaces'; import {IPFSService} from 'src/app/services/ipfs.service'; import {DynamicDialogConfig, DynamicDialogRef} from 'primeng/dynamicdialog'; @@ -18,8 +17,6 @@ export class IconPreviewDialog { loading: boolean = false; constructor( - // public dialogRef: MatDialogRef, - // @Inject(MAT_DIALOG_DATA) public data: any private dialogRef: DynamicDialogRef, private config: DynamicDialogConfig, private ipfs: IPFSService, diff --git a/frontend/src/app/modules/common/material.module.ts b/frontend/src/app/modules/common/material.module.ts index d9d2bf986b..75c34de15b 100644 --- a/frontend/src/app/modules/common/material.module.ts +++ b/frontend/src/app/modules/common/material.module.ts @@ -1,38 +1,8 @@ import {NgModule} from '@angular/core'; import {CommonModule} from '@angular/common'; -// import { MatLegacyTabsModule as MatTabsModule } from '@angular/material/legacy-tabs'; -// import {MatStepperModule} from '@angular/material/stepper'; -// import {MatExpansionModule} from '@angular/material/expansion'; -// import {MatIconModule} from '@angular/material/icon'; import {ReactiveFormsModule} from '@angular/forms'; -// import {MatLegacyInputModule as MatInputModule} from '@angular/material/legacy-input'; -// import {MatLegacyButtonModule as MatButtonModule} from '@angular/material/legacy-button'; -// import {MatLegacyTableModule as MatTableModule} from '@angular/material/legacy-table'; -// import {MatLegacyDialogModule as MatDialogModule} from '@angular/material/legacy-dialog'; -// import {MatLegacyProgressSpinnerModule as MatProgressSpinnerModule} from '@angular/material/legacy-progress-spinner'; -// import {MatToolbarModule} from '@angular/material/toolbar'; -// import {MatLegacyMenuModule as MatMenuModule} from '@angular/material/legacy-menu'; -// import {MatDividerModule} from '@angular/material/divider'; -// import {MatLegacyListModule as MatListModule} from '@angular/material/legacy-list'; -// import {MatLegacyProgressBarModule as MatProgressBarModule} from '@angular/material/legacy-progress-bar'; -// import {MatLegacySelectModule as MatSelectModule} from '@angular/material/legacy-select'; -// import {MatLegacyCheckboxModule as MatCheckboxModule} from '@angular/material/legacy-checkbox'; -// import {MatTreeModule} from '@angular/material/tree'; -// import {MatDatepickerModule} from '@angular/material/datepicker'; -// import {MatLegacyRadioModule as MatRadioModule} from '@angular/material/legacy-radio'; -// import {MatNativeDateModule} from '@angular/material/core'; -// import {MatLegacyTooltipModule as MatTooltipModule} from '@angular/material/legacy-tooltip'; -// import {MatLegacySlideToggleModule as MatSlideToggleModule} from '@angular/material/legacy-slide-toggle'; -// import {ClipboardModule} from '@angular/cdk/clipboard'; -// import {MatLegacyPaginatorModule as MatPaginatorModule} from '@angular/material/legacy-paginator'; -// import {MatSortModule} from '@angular/material/sort'; -// import {MatLegacyChipsModule as MatChipsModule} from '@angular/material/legacy-chips'; -// import {MatLegacyAutocompleteModule as MatAutocompleteModule} from '@angular/material/legacy-autocomplete'; -// // import {MatButtonToggleModule} from '@angular/material/button-toggle'; import {DragDropModule} from '@angular/cdk/drag-drop'; import {CdkTableModule} from '@angular/cdk/table'; -// import {MatLegacySliderModule as MatSliderModule} from '@angular/material/legacy-slider'; -// import {MatBadgeModule} from '@angular/material/badge'; import {TabViewModule} from 'primeng/tabview'; import {AccordionModule} from 'primeng/accordion'; import {TableModule} from 'primeng/table'; @@ -43,12 +13,8 @@ import {RadioButtonModule} from 'primeng/radiobutton'; import {ProgressSpinnerModule} from 'primeng/progressspinner'; import {ToolbarModule} from 'primeng/toolbar'; import {OverlayPanelModule} from 'primeng/overlaypanel'; -// import {MatButtonModule} from '@angular/material/button'; -// import {DividerModule} from 'primeng/divider'; import {ProgressBarModule} from 'primeng/progressbar'; import {CheckboxModule} from 'primeng/checkbox'; -// import {TooltipModule} from 'primeng/tooltip'; -// import {InputTextModule} from 'primeng/inputtext'; import {ChipsModule} from 'primeng/chips'; import {StepsModule} from 'primeng/steps'; import {DropdownModule} from 'primeng/dropdown'; @@ -61,158 +27,49 @@ import {TreeModule} from 'primeng/tree'; declarations: [], imports: [ CommonModule, - // MatTabsModule, TabViewModule, - - // MatStepperModule, StepsModule, - - // MatExpansionModule, AccordionModule, - // MatTableModule, TableModule, - - // MatIconModule, - ReactiveFormsModule, - - // MatInputModule, - // MatButtonModule, ButtonModule, - // MatButtonToggleModule, SelectButtonModule, - - // MatDialogModule, - - // MatDatepickerModule, CalendarModule, - - // MatRadioModule, RadioButtonModule, - - // MatNativeDateModule, - - // MatProgressSpinnerModule, ProgressSpinnerModule, - - // MatToolbarModule, ToolbarModule, - - // MatMenuModule, OverlayPanelModule, - - // MatDividerModule - - // MatListModule, - - // MatProgressBarModule, ProgressBarModule, - - // MatSelectModule, DropdownModule, - - // MatCheckboxModule, CheckboxModule, - - // MatTreeModule, TreeModule, - - // MatTooltipModule, TooltipModule, - - // MatSlideToggleModule, - - // MatPaginatorModule, - DragDropModule, - // MatSliderModule, - CdkTableModule, - - // MatBadgeModule ], exports: [ - // MatTabsModule, TabViewModule, - - // MatStepperModule, StepsModule, - - // MatExpansionModule, - // MatTableModule, AccordionModule, TableModule, - - // MatIconModule, - ReactiveFormsModule, - - // MatInputModule, - // MatButtonModule, ButtonModule, - // MatButtonToggleModule, SelectButtonModule, - - // MatDialogModule, - - // MatDatepickerModule, CalendarModule, - - // MatRadioModule, RadioButtonModule, - - // MatNativeDateModule, - - // MatProgressSpinnerModule, ProgressSpinnerModule, - - // MatToolbarModule, ToolbarModule, - - // MatMenuModule, OverlayPanelModule, - - // MatDividerModule, - - // MatListModule, - - // MatProgressBarModule, ProgressBarModule, - - // MatSelectModule, DropdownModule, MultiSelectModule, InputNumberModule, - - // MatCheckboxModule, CheckboxModule, - - // MatTreeModule, TreeModule, - - // MatTooltipModule, TooltipModule, - - // MatSlideToggleModule, - - // ClipboardModule, - - // MatPaginatorModule, - - // MatSortModule, - - // MatChipsModule, ChipsModule, - - // MatAutocompleteModule, - DragDropModule, - - // MatSliderModule, - CdkTableModule, - - // MatBadgeModule ] }) export class MaterialModule { diff --git a/frontend/src/app/modules/common/new-versions/new-versions.component.html b/frontend/src/app/modules/common/new-versions/new-versions.component.html index 46dc28c129..ffe31dcd66 100644 --- a/frontend/src/app/modules/common/new-versions/new-versions.component.html +++ b/frontend/src/app/modules/common/new-versions/new-versions.component.html @@ -1,6 +1,4 @@
- - New versions of {{ type }} exist
diff --git a/frontend/src/app/modules/common/select-menu/select-menu.component.html b/frontend/src/app/modules/common/select-menu/select-menu.component.html index 1ae2ecae36..4486e37634 100644 --- a/frontend/src/app/modules/common/select-menu/select-menu.component.html +++ b/frontend/src/app/modules/common/select-menu/select-menu.component.html @@ -1,10 +1,6 @@ - - -
+
- -
diff --git a/frontend/src/app/modules/common/selector-dialog/selector-dialog.component.html b/frontend/src/app/modules/common/selector-dialog/selector-dialog.component.html index cb84345ebc..1d807a6d49 100644 --- a/frontend/src/app/modules/common/selector-dialog/selector-dialog.component.html +++ b/frontend/src/app/modules/common/selector-dialog/selector-dialog.component.html @@ -1,22 +1,5 @@ - - - - - - - - - - - - - - - - - - - +

{{ title }}

@@ -24,13 +7,16 @@

{{ title }}

- +
- - + +
diff --git a/frontend/src/app/modules/common/selector-dialog/selector-dialog.component.ts b/frontend/src/app/modules/common/selector-dialog/selector-dialog.component.ts index 0ccc3129ea..17150c32a2 100644 --- a/frontend/src/app/modules/common/selector-dialog/selector-dialog.component.ts +++ b/frontend/src/app/modules/common/selector-dialog/selector-dialog.component.ts @@ -1,6 +1,4 @@ import {Component, Inject, OnInit} from '@angular/core'; -// import { MAT_LEGACY_DIALOG_DATA as MAT_DIALOG_DATA } from '@angular/material/legacy-dialog'; - import {DynamicDialogConfig, DynamicDialogRef} from 'primeng/dynamicdialog'; export interface SelectorDialogOptions { @@ -25,14 +23,6 @@ export class SelectorDialogComponent implements OnInit { isVisible: boolean = true; constructor( - // @Inject(MAT_DIALOG_DATA) - // public data: { - // title: string; - // description: string; - // label?: string; - // options: SelectorDialogOptions[]; - // multiple?: boolean; - // } public dialogRef: DynamicDialogRef, public config: DynamicDialogConfig ) { diff --git a/frontend/src/app/modules/common/separate-stepper/separate-stepper.component.html b/frontend/src/app/modules/common/separate-stepper/separate-stepper.component.html index 9e473ce5a6..7743a2975c 100644 --- a/frontend/src/app/modules/common/separate-stepper/separate-stepper.component.html +++ b/frontend/src/app/modules/common/separate-stepper/separate-stepper.component.html @@ -14,7 +14,6 @@
-
{{ currentNode.name }}
diff --git a/frontend/src/app/modules/common/step-tree/step-tree.component.html b/frontend/src/app/modules/common/step-tree/step-tree.component.html index 0f3a5f2be1..f11c400d49 100644 --- a/frontend/src/app/modules/common/step-tree/step-tree.component.html +++ b/frontend/src/app/modules/common/step-tree/step-tree.component.html @@ -1,50 +1,3 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
  • @@ -54,7 +7,8 @@