@c8y/tutorial 1023.53.0 → 1023.55.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@c8y/tutorial",
|
|
3
|
-
"version": "1023.
|
|
3
|
+
"version": "1023.55.5",
|
|
4
4
|
"description": "This package is used to scaffold a tutorial for Cumulocity IoT Web SDK which explains a lot of concepts.",
|
|
5
5
|
"dependencies": {
|
|
6
|
-
"@c8y/style": "1023.
|
|
7
|
-
"@c8y/ngx-components": "1023.
|
|
8
|
-
"@c8y/client": "1023.
|
|
9
|
-
"@c8y/bootstrap": "1023.
|
|
6
|
+
"@c8y/style": "1023.55.5",
|
|
7
|
+
"@c8y/ngx-components": "1023.55.5",
|
|
8
|
+
"@c8y/client": "1023.55.5",
|
|
9
|
+
"@c8y/bootstrap": "1023.55.5",
|
|
10
10
|
"@angular/cdk": "^20.2.14",
|
|
11
11
|
"monaco-editor": "~0.53.0",
|
|
12
12
|
"ngx-bootstrap": "20.0.2",
|
|
@@ -14,8 +14,8 @@
|
|
|
14
14
|
"rxjs": "7.8.2"
|
|
15
15
|
},
|
|
16
16
|
"devDependencies": {
|
|
17
|
-
"@c8y/options": "1023.
|
|
18
|
-
"@c8y/devkit": "1023.
|
|
17
|
+
"@c8y/options": "1023.55.5",
|
|
18
|
+
"@c8y/devkit": "1023.55.5"
|
|
19
19
|
},
|
|
20
20
|
"peerDependencies": {
|
|
21
21
|
"@angular/common": ">=20 <21"
|
|
@@ -17,6 +17,11 @@ import { DeleteModalExampleComponent } from './delete-modal-example.component';
|
|
|
17
17
|
Confirm modal using <code>c8y-confirm-modal</code> component
|
|
18
18
|
</button>
|
|
19
19
|
</div>
|
|
20
|
+
<div class="p-b-24 text-center">
|
|
21
|
+
<button class="btn btn-default" (click)="deleteTenantWithCodeVerification()">
|
|
22
|
+
Confirm modal with code verification
|
|
23
|
+
</button>
|
|
24
|
+
</div>
|
|
20
25
|
</div>`,
|
|
21
26
|
standalone: true,
|
|
22
27
|
imports: [ModalModule, FormsModule, CoreModule]
|
|
@@ -69,4 +74,25 @@ export class ConfirmModalExampleComponent {
|
|
|
69
74
|
console.log('Cancel clicked');
|
|
70
75
|
}
|
|
71
76
|
}
|
|
77
|
+
|
|
78
|
+
async deleteTenantWithCodeVerification() {
|
|
79
|
+
try {
|
|
80
|
+
await this.modalService.confirm(
|
|
81
|
+
'Confirm delete?',
|
|
82
|
+
'You are about to delete the tenant. This action will immediately affect all users.<br><br>For security reasons, enter the following code to continue:',
|
|
83
|
+
Status.DANGER,
|
|
84
|
+
{
|
|
85
|
+
ok: 'Delete'
|
|
86
|
+
},
|
|
87
|
+
{},
|
|
88
|
+
undefined,
|
|
89
|
+
true // requireCodeVerification
|
|
90
|
+
);
|
|
91
|
+
// eslint-disable-next-line no-console
|
|
92
|
+
console.log('Delete confirmed with code verification');
|
|
93
|
+
} catch (e) {
|
|
94
|
+
// eslint-disable-next-line no-console
|
|
95
|
+
console.log('Cancel clicked or code verification failed');
|
|
96
|
+
}
|
|
97
|
+
}
|
|
72
98
|
}
|