@syndew/oluso-workspace-ui 0.0.0-stage → 0.0.1
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/README.md +2 -2
- package/fesm2022/syndew-oluso-workspace-ui-hosted-document-page.component-BmifVN4H.mjs +884 -0
- package/fesm2022/syndew-oluso-workspace-ui-hosted-document-page.component-BmifVN4H.mjs.map +1 -0
- package/fesm2022/syndew-oluso-workspace-ui-magic-link-page.component-CBohrM7h.mjs +331 -0
- package/fesm2022/syndew-oluso-workspace-ui-magic-link-page.component-CBohrM7h.mjs.map +1 -0
- package/fesm2022/syndew-oluso-workspace-ui-notification-preferences-page.component-BaPXBEmc.mjs +346 -0
- package/fesm2022/syndew-oluso-workspace-ui-notification-preferences-page.component-BaPXBEmc.mjs.map +1 -0
- package/fesm2022/syndew-oluso-workspace-ui-unauthorized-page.component-CWYFN6mp.mjs +73 -0
- package/fesm2022/syndew-oluso-workspace-ui-unauthorized-page.component-CWYFN6mp.mjs.map +1 -0
- package/fesm2022/syndew-oluso-workspace-ui.mjs +5091 -0
- package/fesm2022/syndew-oluso-workspace-ui.mjs.map +1 -0
- package/help/en/workspace.dashboard.md +25 -0
- package/help/en/workspace.my-files.md +43 -0
- package/help/en/workspace.notifications.md +37 -0
- package/help/en/workspace.profile.md +26 -0
- package/package.json +32 -3
- package/types/syndew-oluso-workspace-ui.d.ts +922 -0
package/fesm2022/syndew-oluso-workspace-ui-notification-preferences-page.component-BaPXBEmc.mjs
ADDED
|
@@ -0,0 +1,346 @@
|
|
|
1
|
+
import * as i0 from '@angular/core';
|
|
2
|
+
import { inject, signal, computed, Component } from '@angular/core';
|
|
3
|
+
import { CommonModule } from '@angular/common';
|
|
4
|
+
import { FormsModule } from '@angular/forms';
|
|
5
|
+
import { HttpClient } from '@angular/common/http';
|
|
6
|
+
import { Subject, takeUntil } from 'rxjs';
|
|
7
|
+
import { apiUrl } from './syndew-oluso-workspace-ui.mjs';
|
|
8
|
+
|
|
9
|
+
class NotificationPreferencesPageComponent {
|
|
10
|
+
http = inject(HttpClient);
|
|
11
|
+
destroy$ = new Subject();
|
|
12
|
+
baseUrl = `${apiUrl}/api/workspace/notifications/preferences`;
|
|
13
|
+
loading = signal(true, ...(ngDevMode ? [{ debugName: "loading" }] : /* istanbul ignore next */ []));
|
|
14
|
+
preferences = signal([], ...(ngDevMode ? [{ debugName: "preferences" }] : /* istanbul ignore next */ []));
|
|
15
|
+
channels = signal({ email: true, sms: true, whatsApp: true, push: false }, ...(ngDevMode ? [{ debugName: "channels" }] : /* istanbul ignore next */ []));
|
|
16
|
+
groups = computed(() => {
|
|
17
|
+
const prefs = this.preferences();
|
|
18
|
+
const map = new Map();
|
|
19
|
+
for (const pref of prefs) {
|
|
20
|
+
const existing = map.get(pref.workflowName);
|
|
21
|
+
if (existing) {
|
|
22
|
+
existing.push(pref);
|
|
23
|
+
}
|
|
24
|
+
else {
|
|
25
|
+
map.set(pref.workflowName, [pref]);
|
|
26
|
+
}
|
|
27
|
+
}
|
|
28
|
+
return Array.from(map.entries()).map(([workflowName, preferences]) => ({
|
|
29
|
+
workflowName,
|
|
30
|
+
preferences,
|
|
31
|
+
}));
|
|
32
|
+
}, ...(ngDevMode ? [{ debugName: "groups" }] : /* istanbul ignore next */ []));
|
|
33
|
+
ngOnInit() {
|
|
34
|
+
this.loadChannels();
|
|
35
|
+
this.loadPreferences();
|
|
36
|
+
}
|
|
37
|
+
loadChannels() {
|
|
38
|
+
this.http
|
|
39
|
+
.get(`${apiUrl}/api/workspace/notifications/channels`)
|
|
40
|
+
.pipe(takeUntil(this.destroy$))
|
|
41
|
+
.subscribe({
|
|
42
|
+
next: (c) => this.channels.set(c),
|
|
43
|
+
// Older servers have no channels endpoint: keep every toggle visible.
|
|
44
|
+
error: () => this.channels.set({ email: true, sms: true, whatsApp: true, push: false }),
|
|
45
|
+
});
|
|
46
|
+
}
|
|
47
|
+
ngOnDestroy() {
|
|
48
|
+
this.destroy$.next();
|
|
49
|
+
this.destroy$.complete();
|
|
50
|
+
}
|
|
51
|
+
toggleEmail(pref) {
|
|
52
|
+
pref.emailEnabled = !pref.emailEnabled;
|
|
53
|
+
this.savePreference(pref);
|
|
54
|
+
}
|
|
55
|
+
toggleSms(pref) {
|
|
56
|
+
pref.smsEnabled = !pref.smsEnabled;
|
|
57
|
+
this.savePreference(pref);
|
|
58
|
+
}
|
|
59
|
+
toggleWhatsApp(pref) {
|
|
60
|
+
pref.whatsAppEnabled = !pref.whatsAppEnabled;
|
|
61
|
+
this.savePreference(pref);
|
|
62
|
+
}
|
|
63
|
+
formatDate(dateString) {
|
|
64
|
+
return new Date(dateString).toLocaleDateString();
|
|
65
|
+
}
|
|
66
|
+
loadPreferences() {
|
|
67
|
+
this.loading.set(true);
|
|
68
|
+
this.http
|
|
69
|
+
.get(this.baseUrl)
|
|
70
|
+
.pipe(takeUntil(this.destroy$))
|
|
71
|
+
.subscribe({
|
|
72
|
+
next: (prefs) => {
|
|
73
|
+
this.preferences.set(prefs);
|
|
74
|
+
this.loading.set(false);
|
|
75
|
+
},
|
|
76
|
+
error: () => {
|
|
77
|
+
this.preferences.set([]);
|
|
78
|
+
this.loading.set(false);
|
|
79
|
+
},
|
|
80
|
+
});
|
|
81
|
+
}
|
|
82
|
+
savePreference(pref) {
|
|
83
|
+
this.http
|
|
84
|
+
.put(`${this.baseUrl}/${pref.workflowStepId}`, {
|
|
85
|
+
emailEnabled: pref.emailEnabled,
|
|
86
|
+
smsEnabled: pref.smsEnabled,
|
|
87
|
+
whatsAppEnabled: pref.whatsAppEnabled,
|
|
88
|
+
})
|
|
89
|
+
.pipe(takeUntil(this.destroy$))
|
|
90
|
+
.subscribe();
|
|
91
|
+
}
|
|
92
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.25", ngImport: i0, type: NotificationPreferencesPageComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
93
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.25", type: NotificationPreferencesPageComponent, isStandalone: true, selector: "workspace-notification-preferences-page", ngImport: i0, template: `
|
|
94
|
+
<div class="space-y-6">
|
|
95
|
+
<!-- Header -->
|
|
96
|
+
<div>
|
|
97
|
+
<h1 class="text-2xl font-bold text-gray-900">Notification Preferences</h1>
|
|
98
|
+
<p class="mt-1 text-sm text-gray-500">
|
|
99
|
+
Choose how you want to be notified for each automation step
|
|
100
|
+
</p>
|
|
101
|
+
</div>
|
|
102
|
+
|
|
103
|
+
@if (loading()) {
|
|
104
|
+
<div class="flex items-center justify-center h-32">
|
|
105
|
+
<div class="animate-spin rounded-full h-8 w-8 border-b-2 border-primary-600"></div>
|
|
106
|
+
</div>
|
|
107
|
+
} @else if (groups().length === 0) {
|
|
108
|
+
<div class="bg-white rounded-lg shadow p-12 text-center">
|
|
109
|
+
<svg class="mx-auto h-12 w-12 text-gray-300" fill="none" viewBox="0 0 24 24" stroke-width="1" stroke="currentColor">
|
|
110
|
+
<path stroke-linecap="round" stroke-linejoin="round" d="M14.857 17.082a23.848 23.848 0 005.454-1.31A8.967 8.967 0 0118 9.75v-.7V9A6 6 0 006 9v.75a8.967 8.967 0 01-2.312 6.022c1.733.64 3.56 1.085 5.455 1.31m5.714 0a24.255 24.255 0 01-5.714 0m5.714 0a3 3 0 11-5.714 0" />
|
|
111
|
+
</svg>
|
|
112
|
+
<h3 class="mt-4 text-lg font-medium text-gray-900">No notification preferences available</h3>
|
|
113
|
+
<p class="mt-2 text-sm text-gray-500">
|
|
114
|
+
You'll see options here once you start receiving notifications from automations.
|
|
115
|
+
</p>
|
|
116
|
+
</div>
|
|
117
|
+
} @else {
|
|
118
|
+
@for (group of groups(); track group.workflowName) {
|
|
119
|
+
<div class="bg-white rounded-lg shadow overflow-hidden">
|
|
120
|
+
<!-- Group header -->
|
|
121
|
+
<div class="px-6 py-4 bg-gray-50 border-b border-gray-200">
|
|
122
|
+
<h2 class="text-sm font-semibold text-gray-700">{{ group.workflowName }}</h2>
|
|
123
|
+
</div>
|
|
124
|
+
|
|
125
|
+
<!-- Preference rows -->
|
|
126
|
+
<div class="divide-y divide-gray-100">
|
|
127
|
+
@for (pref of group.preferences; track pref.workflowStepId) {
|
|
128
|
+
<div class="px-6 py-4 flex items-center justify-between gap-4">
|
|
129
|
+
<!-- Step info -->
|
|
130
|
+
<div class="min-w-0 flex-1">
|
|
131
|
+
<p class="text-sm font-medium text-gray-900">{{ pref.stepName }}</p>
|
|
132
|
+
@if (pref.lastReceivedAt) {
|
|
133
|
+
<p class="text-xs text-gray-500 mt-0.5">
|
|
134
|
+
Last received: {{ formatDate(pref.lastReceivedAt) }}
|
|
135
|
+
</p>
|
|
136
|
+
}
|
|
137
|
+
</div>
|
|
138
|
+
|
|
139
|
+
<!-- Toggles -->
|
|
140
|
+
<div class="flex items-center gap-6 shrink-0">
|
|
141
|
+
<!-- Email toggle -->
|
|
142
|
+
<label class="flex items-center gap-2 cursor-pointer">
|
|
143
|
+
<span class="text-xs font-medium text-gray-500">Email</span>
|
|
144
|
+
<button
|
|
145
|
+
type="button"
|
|
146
|
+
role="switch"
|
|
147
|
+
[attr.aria-checked]="pref.emailEnabled"
|
|
148
|
+
class="relative inline-flex h-5 w-9 shrink-0 rounded-full border-2 border-transparent transition-colors duration-200 ease-in-out focus:outline-none focus:ring-2 focus:ring-primary-500 focus:ring-offset-2"
|
|
149
|
+
[class.bg-primary-600]="pref.emailEnabled"
|
|
150
|
+
[class.bg-gray-200]="!pref.emailEnabled"
|
|
151
|
+
(click)="toggleEmail(pref)"
|
|
152
|
+
>
|
|
153
|
+
<span
|
|
154
|
+
class="pointer-events-none inline-block h-4 w-4 transform rounded-full bg-white shadow ring-0 transition duration-200 ease-in-out"
|
|
155
|
+
[class.translate-x-4]="pref.emailEnabled"
|
|
156
|
+
[class.translate-x-0]="!pref.emailEnabled"
|
|
157
|
+
></span>
|
|
158
|
+
</button>
|
|
159
|
+
</label>
|
|
160
|
+
|
|
161
|
+
<!-- SMS toggle -->
|
|
162
|
+
@if (channels().sms) {
|
|
163
|
+
<label class="flex items-center gap-2 cursor-pointer">
|
|
164
|
+
<span class="text-xs font-medium text-gray-500">SMS</span>
|
|
165
|
+
<button
|
|
166
|
+
type="button"
|
|
167
|
+
role="switch"
|
|
168
|
+
[attr.aria-checked]="pref.smsEnabled"
|
|
169
|
+
class="relative inline-flex h-5 w-9 shrink-0 rounded-full border-2 border-transparent transition-colors duration-200 ease-in-out focus:outline-none focus:ring-2 focus:ring-primary-500 focus:ring-offset-2"
|
|
170
|
+
[class.bg-primary-600]="pref.smsEnabled"
|
|
171
|
+
[class.bg-gray-200]="!pref.smsEnabled"
|
|
172
|
+
(click)="toggleSms(pref)"
|
|
173
|
+
>
|
|
174
|
+
<span
|
|
175
|
+
class="pointer-events-none inline-block h-4 w-4 transform rounded-full bg-white shadow ring-0 transition duration-200 ease-in-out"
|
|
176
|
+
[class.translate-x-4]="pref.smsEnabled"
|
|
177
|
+
[class.translate-x-0]="!pref.smsEnabled"
|
|
178
|
+
></span>
|
|
179
|
+
</button>
|
|
180
|
+
</label>
|
|
181
|
+
|
|
182
|
+
}
|
|
183
|
+
|
|
184
|
+
<!-- WhatsApp toggle -->
|
|
185
|
+
@if (channels().whatsApp) {
|
|
186
|
+
<label class="flex items-center gap-2 cursor-pointer">
|
|
187
|
+
<span class="text-xs font-medium text-gray-500">WhatsApp</span>
|
|
188
|
+
<button
|
|
189
|
+
type="button"
|
|
190
|
+
role="switch"
|
|
191
|
+
[attr.aria-checked]="pref.whatsAppEnabled"
|
|
192
|
+
class="relative inline-flex h-5 w-9 shrink-0 rounded-full border-2 border-transparent transition-colors duration-200 ease-in-out focus:outline-none focus:ring-2 focus:ring-primary-500 focus:ring-offset-2"
|
|
193
|
+
[class.bg-primary-600]="pref.whatsAppEnabled"
|
|
194
|
+
[class.bg-gray-200]="!pref.whatsAppEnabled"
|
|
195
|
+
(click)="toggleWhatsApp(pref)"
|
|
196
|
+
>
|
|
197
|
+
<span
|
|
198
|
+
class="pointer-events-none inline-block h-4 w-4 transform rounded-full bg-white shadow ring-0 transition duration-200 ease-in-out"
|
|
199
|
+
[class.translate-x-4]="pref.whatsAppEnabled"
|
|
200
|
+
[class.translate-x-0]="!pref.whatsAppEnabled"
|
|
201
|
+
></span>
|
|
202
|
+
</button>
|
|
203
|
+
</label>
|
|
204
|
+
}
|
|
205
|
+
</div>
|
|
206
|
+
</div>
|
|
207
|
+
}
|
|
208
|
+
</div>
|
|
209
|
+
</div>
|
|
210
|
+
}
|
|
211
|
+
}
|
|
212
|
+
</div>
|
|
213
|
+
`, isInline: true, dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "ngmodule", type: FormsModule }] });
|
|
214
|
+
}
|
|
215
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.25", ngImport: i0, type: NotificationPreferencesPageComponent, decorators: [{
|
|
216
|
+
type: Component,
|
|
217
|
+
args: [{
|
|
218
|
+
selector: 'workspace-notification-preferences-page',
|
|
219
|
+
standalone: true,
|
|
220
|
+
imports: [CommonModule, FormsModule],
|
|
221
|
+
template: `
|
|
222
|
+
<div class="space-y-6">
|
|
223
|
+
<!-- Header -->
|
|
224
|
+
<div>
|
|
225
|
+
<h1 class="text-2xl font-bold text-gray-900">Notification Preferences</h1>
|
|
226
|
+
<p class="mt-1 text-sm text-gray-500">
|
|
227
|
+
Choose how you want to be notified for each automation step
|
|
228
|
+
</p>
|
|
229
|
+
</div>
|
|
230
|
+
|
|
231
|
+
@if (loading()) {
|
|
232
|
+
<div class="flex items-center justify-center h-32">
|
|
233
|
+
<div class="animate-spin rounded-full h-8 w-8 border-b-2 border-primary-600"></div>
|
|
234
|
+
</div>
|
|
235
|
+
} @else if (groups().length === 0) {
|
|
236
|
+
<div class="bg-white rounded-lg shadow p-12 text-center">
|
|
237
|
+
<svg class="mx-auto h-12 w-12 text-gray-300" fill="none" viewBox="0 0 24 24" stroke-width="1" stroke="currentColor">
|
|
238
|
+
<path stroke-linecap="round" stroke-linejoin="round" d="M14.857 17.082a23.848 23.848 0 005.454-1.31A8.967 8.967 0 0118 9.75v-.7V9A6 6 0 006 9v.75a8.967 8.967 0 01-2.312 6.022c1.733.64 3.56 1.085 5.455 1.31m5.714 0a24.255 24.255 0 01-5.714 0m5.714 0a3 3 0 11-5.714 0" />
|
|
239
|
+
</svg>
|
|
240
|
+
<h3 class="mt-4 text-lg font-medium text-gray-900">No notification preferences available</h3>
|
|
241
|
+
<p class="mt-2 text-sm text-gray-500">
|
|
242
|
+
You'll see options here once you start receiving notifications from automations.
|
|
243
|
+
</p>
|
|
244
|
+
</div>
|
|
245
|
+
} @else {
|
|
246
|
+
@for (group of groups(); track group.workflowName) {
|
|
247
|
+
<div class="bg-white rounded-lg shadow overflow-hidden">
|
|
248
|
+
<!-- Group header -->
|
|
249
|
+
<div class="px-6 py-4 bg-gray-50 border-b border-gray-200">
|
|
250
|
+
<h2 class="text-sm font-semibold text-gray-700">{{ group.workflowName }}</h2>
|
|
251
|
+
</div>
|
|
252
|
+
|
|
253
|
+
<!-- Preference rows -->
|
|
254
|
+
<div class="divide-y divide-gray-100">
|
|
255
|
+
@for (pref of group.preferences; track pref.workflowStepId) {
|
|
256
|
+
<div class="px-6 py-4 flex items-center justify-between gap-4">
|
|
257
|
+
<!-- Step info -->
|
|
258
|
+
<div class="min-w-0 flex-1">
|
|
259
|
+
<p class="text-sm font-medium text-gray-900">{{ pref.stepName }}</p>
|
|
260
|
+
@if (pref.lastReceivedAt) {
|
|
261
|
+
<p class="text-xs text-gray-500 mt-0.5">
|
|
262
|
+
Last received: {{ formatDate(pref.lastReceivedAt) }}
|
|
263
|
+
</p>
|
|
264
|
+
}
|
|
265
|
+
</div>
|
|
266
|
+
|
|
267
|
+
<!-- Toggles -->
|
|
268
|
+
<div class="flex items-center gap-6 shrink-0">
|
|
269
|
+
<!-- Email toggle -->
|
|
270
|
+
<label class="flex items-center gap-2 cursor-pointer">
|
|
271
|
+
<span class="text-xs font-medium text-gray-500">Email</span>
|
|
272
|
+
<button
|
|
273
|
+
type="button"
|
|
274
|
+
role="switch"
|
|
275
|
+
[attr.aria-checked]="pref.emailEnabled"
|
|
276
|
+
class="relative inline-flex h-5 w-9 shrink-0 rounded-full border-2 border-transparent transition-colors duration-200 ease-in-out focus:outline-none focus:ring-2 focus:ring-primary-500 focus:ring-offset-2"
|
|
277
|
+
[class.bg-primary-600]="pref.emailEnabled"
|
|
278
|
+
[class.bg-gray-200]="!pref.emailEnabled"
|
|
279
|
+
(click)="toggleEmail(pref)"
|
|
280
|
+
>
|
|
281
|
+
<span
|
|
282
|
+
class="pointer-events-none inline-block h-4 w-4 transform rounded-full bg-white shadow ring-0 transition duration-200 ease-in-out"
|
|
283
|
+
[class.translate-x-4]="pref.emailEnabled"
|
|
284
|
+
[class.translate-x-0]="!pref.emailEnabled"
|
|
285
|
+
></span>
|
|
286
|
+
</button>
|
|
287
|
+
</label>
|
|
288
|
+
|
|
289
|
+
<!-- SMS toggle -->
|
|
290
|
+
@if (channels().sms) {
|
|
291
|
+
<label class="flex items-center gap-2 cursor-pointer">
|
|
292
|
+
<span class="text-xs font-medium text-gray-500">SMS</span>
|
|
293
|
+
<button
|
|
294
|
+
type="button"
|
|
295
|
+
role="switch"
|
|
296
|
+
[attr.aria-checked]="pref.smsEnabled"
|
|
297
|
+
class="relative inline-flex h-5 w-9 shrink-0 rounded-full border-2 border-transparent transition-colors duration-200 ease-in-out focus:outline-none focus:ring-2 focus:ring-primary-500 focus:ring-offset-2"
|
|
298
|
+
[class.bg-primary-600]="pref.smsEnabled"
|
|
299
|
+
[class.bg-gray-200]="!pref.smsEnabled"
|
|
300
|
+
(click)="toggleSms(pref)"
|
|
301
|
+
>
|
|
302
|
+
<span
|
|
303
|
+
class="pointer-events-none inline-block h-4 w-4 transform rounded-full bg-white shadow ring-0 transition duration-200 ease-in-out"
|
|
304
|
+
[class.translate-x-4]="pref.smsEnabled"
|
|
305
|
+
[class.translate-x-0]="!pref.smsEnabled"
|
|
306
|
+
></span>
|
|
307
|
+
</button>
|
|
308
|
+
</label>
|
|
309
|
+
|
|
310
|
+
}
|
|
311
|
+
|
|
312
|
+
<!-- WhatsApp toggle -->
|
|
313
|
+
@if (channels().whatsApp) {
|
|
314
|
+
<label class="flex items-center gap-2 cursor-pointer">
|
|
315
|
+
<span class="text-xs font-medium text-gray-500">WhatsApp</span>
|
|
316
|
+
<button
|
|
317
|
+
type="button"
|
|
318
|
+
role="switch"
|
|
319
|
+
[attr.aria-checked]="pref.whatsAppEnabled"
|
|
320
|
+
class="relative inline-flex h-5 w-9 shrink-0 rounded-full border-2 border-transparent transition-colors duration-200 ease-in-out focus:outline-none focus:ring-2 focus:ring-primary-500 focus:ring-offset-2"
|
|
321
|
+
[class.bg-primary-600]="pref.whatsAppEnabled"
|
|
322
|
+
[class.bg-gray-200]="!pref.whatsAppEnabled"
|
|
323
|
+
(click)="toggleWhatsApp(pref)"
|
|
324
|
+
>
|
|
325
|
+
<span
|
|
326
|
+
class="pointer-events-none inline-block h-4 w-4 transform rounded-full bg-white shadow ring-0 transition duration-200 ease-in-out"
|
|
327
|
+
[class.translate-x-4]="pref.whatsAppEnabled"
|
|
328
|
+
[class.translate-x-0]="!pref.whatsAppEnabled"
|
|
329
|
+
></span>
|
|
330
|
+
</button>
|
|
331
|
+
</label>
|
|
332
|
+
}
|
|
333
|
+
</div>
|
|
334
|
+
</div>
|
|
335
|
+
}
|
|
336
|
+
</div>
|
|
337
|
+
</div>
|
|
338
|
+
}
|
|
339
|
+
}
|
|
340
|
+
</div>
|
|
341
|
+
`,
|
|
342
|
+
}]
|
|
343
|
+
}] });
|
|
344
|
+
|
|
345
|
+
export { NotificationPreferencesPageComponent };
|
|
346
|
+
//# sourceMappingURL=syndew-oluso-workspace-ui-notification-preferences-page.component-BaPXBEmc.mjs.map
|
package/fesm2022/syndew-oluso-workspace-ui-notification-preferences-page.component-BaPXBEmc.mjs.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"syndew-oluso-workspace-ui-notification-preferences-page.component-BaPXBEmc.mjs","sources":["../../../../libs/workspace-ui/src/lib/pages/notifications/notification-preferences-page.component.ts"],"sourcesContent":["import { Component, inject, signal, computed, OnInit, OnDestroy } from '@angular/core';\nimport { CommonModule } from '@angular/common';\nimport { FormsModule } from '@angular/forms';\nimport { HttpClient } from '@angular/common/http';\nimport { Subject, takeUntil } from 'rxjs';\nimport { apiUrl } from '../../auth/oidc.config';\n\ninterface NotificationPreferenceDto {\n workflowStepId: string;\n stepName: string;\n workflowName: string;\n lastReceivedAt: string;\n emailEnabled: boolean;\n smsEnabled: boolean;\n whatsAppEnabled: boolean;\n}\n\ninterface PreferenceGroup {\n workflowName: string;\n preferences: NotificationPreferenceDto[];\n}\n\n/** Which channels the tenant can actually deliver on; toggles for the rest are hidden. */\ninterface ChannelAvailability {\n email: boolean;\n sms: boolean;\n whatsApp: boolean;\n push: boolean;\n}\n\n@Component({\n selector: 'workspace-notification-preferences-page',\n standalone: true,\n imports: [CommonModule, FormsModule],\n template: `\n <div class=\"space-y-6\">\n <!-- Header -->\n <div>\n <h1 class=\"text-2xl font-bold text-gray-900\">Notification Preferences</h1>\n <p class=\"mt-1 text-sm text-gray-500\">\n Choose how you want to be notified for each automation step\n </p>\n </div>\n\n @if (loading()) {\n <div class=\"flex items-center justify-center h-32\">\n <div class=\"animate-spin rounded-full h-8 w-8 border-b-2 border-primary-600\"></div>\n </div>\n } @else if (groups().length === 0) {\n <div class=\"bg-white rounded-lg shadow p-12 text-center\">\n <svg class=\"mx-auto h-12 w-12 text-gray-300\" fill=\"none\" viewBox=\"0 0 24 24\" stroke-width=\"1\" stroke=\"currentColor\">\n <path stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M14.857 17.082a23.848 23.848 0 005.454-1.31A8.967 8.967 0 0118 9.75v-.7V9A6 6 0 006 9v.75a8.967 8.967 0 01-2.312 6.022c1.733.64 3.56 1.085 5.455 1.31m5.714 0a24.255 24.255 0 01-5.714 0m5.714 0a3 3 0 11-5.714 0\" />\n </svg>\n <h3 class=\"mt-4 text-lg font-medium text-gray-900\">No notification preferences available</h3>\n <p class=\"mt-2 text-sm text-gray-500\">\n You'll see options here once you start receiving notifications from automations.\n </p>\n </div>\n } @else {\n @for (group of groups(); track group.workflowName) {\n <div class=\"bg-white rounded-lg shadow overflow-hidden\">\n <!-- Group header -->\n <div class=\"px-6 py-4 bg-gray-50 border-b border-gray-200\">\n <h2 class=\"text-sm font-semibold text-gray-700\">{{ group.workflowName }}</h2>\n </div>\n\n <!-- Preference rows -->\n <div class=\"divide-y divide-gray-100\">\n @for (pref of group.preferences; track pref.workflowStepId) {\n <div class=\"px-6 py-4 flex items-center justify-between gap-4\">\n <!-- Step info -->\n <div class=\"min-w-0 flex-1\">\n <p class=\"text-sm font-medium text-gray-900\">{{ pref.stepName }}</p>\n @if (pref.lastReceivedAt) {\n <p class=\"text-xs text-gray-500 mt-0.5\">\n Last received: {{ formatDate(pref.lastReceivedAt) }}\n </p>\n }\n </div>\n\n <!-- Toggles -->\n <div class=\"flex items-center gap-6 shrink-0\">\n <!-- Email toggle -->\n <label class=\"flex items-center gap-2 cursor-pointer\">\n <span class=\"text-xs font-medium text-gray-500\">Email</span>\n <button\n type=\"button\"\n role=\"switch\"\n [attr.aria-checked]=\"pref.emailEnabled\"\n class=\"relative inline-flex h-5 w-9 shrink-0 rounded-full border-2 border-transparent transition-colors duration-200 ease-in-out focus:outline-none focus:ring-2 focus:ring-primary-500 focus:ring-offset-2\"\n [class.bg-primary-600]=\"pref.emailEnabled\"\n [class.bg-gray-200]=\"!pref.emailEnabled\"\n (click)=\"toggleEmail(pref)\"\n >\n <span\n class=\"pointer-events-none inline-block h-4 w-4 transform rounded-full bg-white shadow ring-0 transition duration-200 ease-in-out\"\n [class.translate-x-4]=\"pref.emailEnabled\"\n [class.translate-x-0]=\"!pref.emailEnabled\"\n ></span>\n </button>\n </label>\n\n <!-- SMS toggle -->\n @if (channels().sms) {\n <label class=\"flex items-center gap-2 cursor-pointer\">\n <span class=\"text-xs font-medium text-gray-500\">SMS</span>\n <button\n type=\"button\"\n role=\"switch\"\n [attr.aria-checked]=\"pref.smsEnabled\"\n class=\"relative inline-flex h-5 w-9 shrink-0 rounded-full border-2 border-transparent transition-colors duration-200 ease-in-out focus:outline-none focus:ring-2 focus:ring-primary-500 focus:ring-offset-2\"\n [class.bg-primary-600]=\"pref.smsEnabled\"\n [class.bg-gray-200]=\"!pref.smsEnabled\"\n (click)=\"toggleSms(pref)\"\n >\n <span\n class=\"pointer-events-none inline-block h-4 w-4 transform rounded-full bg-white shadow ring-0 transition duration-200 ease-in-out\"\n [class.translate-x-4]=\"pref.smsEnabled\"\n [class.translate-x-0]=\"!pref.smsEnabled\"\n ></span>\n </button>\n </label>\n\n }\n\n <!-- WhatsApp toggle -->\n @if (channels().whatsApp) {\n <label class=\"flex items-center gap-2 cursor-pointer\">\n <span class=\"text-xs font-medium text-gray-500\">WhatsApp</span>\n <button\n type=\"button\"\n role=\"switch\"\n [attr.aria-checked]=\"pref.whatsAppEnabled\"\n class=\"relative inline-flex h-5 w-9 shrink-0 rounded-full border-2 border-transparent transition-colors duration-200 ease-in-out focus:outline-none focus:ring-2 focus:ring-primary-500 focus:ring-offset-2\"\n [class.bg-primary-600]=\"pref.whatsAppEnabled\"\n [class.bg-gray-200]=\"!pref.whatsAppEnabled\"\n (click)=\"toggleWhatsApp(pref)\"\n >\n <span\n class=\"pointer-events-none inline-block h-4 w-4 transform rounded-full bg-white shadow ring-0 transition duration-200 ease-in-out\"\n [class.translate-x-4]=\"pref.whatsAppEnabled\"\n [class.translate-x-0]=\"!pref.whatsAppEnabled\"\n ></span>\n </button>\n </label>\n }\n </div>\n </div>\n }\n </div>\n </div>\n }\n }\n </div>\n `,\n})\nexport class NotificationPreferencesPageComponent implements OnInit, OnDestroy {\n private readonly http = inject(HttpClient);\n private readonly destroy$ = new Subject<void>();\n private readonly baseUrl = `${apiUrl}/api/workspace/notifications/preferences`;\n\n loading = signal(true);\n preferences = signal<NotificationPreferenceDto[]>([]);\n channels = signal<ChannelAvailability>({ email: true, sms: true, whatsApp: true, push: false });\n\n groups = computed<PreferenceGroup[]>(() => {\n const prefs = this.preferences();\n const map = new Map<string, NotificationPreferenceDto[]>();\n\n for (const pref of prefs) {\n const existing = map.get(pref.workflowName);\n if (existing) {\n existing.push(pref);\n } else {\n map.set(pref.workflowName, [pref]);\n }\n }\n\n return Array.from(map.entries()).map(([workflowName, preferences]) => ({\n workflowName,\n preferences,\n }));\n });\n\n ngOnInit(): void {\n this.loadChannels();\n this.loadPreferences();\n }\n\n private loadChannels(): void {\n this.http\n .get<ChannelAvailability>(`${apiUrl}/api/workspace/notifications/channels`)\n .pipe(takeUntil(this.destroy$))\n .subscribe({\n next: (c) => this.channels.set(c),\n // Older servers have no channels endpoint: keep every toggle visible.\n error: () => this.channels.set({ email: true, sms: true, whatsApp: true, push: false }),\n });\n }\n\n ngOnDestroy(): void {\n this.destroy$.next();\n this.destroy$.complete();\n }\n\n toggleEmail(pref: NotificationPreferenceDto): void {\n pref.emailEnabled = !pref.emailEnabled;\n this.savePreference(pref);\n }\n\n toggleSms(pref: NotificationPreferenceDto): void {\n pref.smsEnabled = !pref.smsEnabled;\n this.savePreference(pref);\n }\n\n toggleWhatsApp(pref: NotificationPreferenceDto): void {\n pref.whatsAppEnabled = !pref.whatsAppEnabled;\n this.savePreference(pref);\n }\n\n formatDate(dateString: string): string {\n return new Date(dateString).toLocaleDateString();\n }\n\n private loadPreferences(): void {\n this.loading.set(true);\n this.http\n .get<NotificationPreferenceDto[]>(this.baseUrl)\n .pipe(takeUntil(this.destroy$))\n .subscribe({\n next: (prefs) => {\n this.preferences.set(prefs);\n this.loading.set(false);\n },\n error: () => {\n this.preferences.set([]);\n this.loading.set(false);\n },\n });\n }\n\n private savePreference(pref: NotificationPreferenceDto): void {\n this.http\n .put(`${this.baseUrl}/${pref.workflowStepId}`, {\n emailEnab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A,SAAA,EAAA,IAAA,EAAA,oCAAoC,EAAA,YAAA,EAAA,IAAA,EAAA,QAAA,EAAA,yCAAA,EAAA,QAAA,EAAA,EAAA,EAAA,QAAA,EA1HrC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAwHT,EAAA,QAAA,EAAA,IAAA,EAAA,YAAA,EAAA,CAAA,EAAA,IAAA,EAAA,UAAA,EAAA,IAAA,EAzHS,YAAY,8BAAE,WAAW,EAAA,CAAA,EAAA,CAAA;;4FA2HxB,oCAAoC,EAAA,UAAA,EAAA,CAAA;kBA9HhD,SAAS;AAAC,YAAA,IAAA,EAAA,CAAA;AACT,oBAAA,QAAQ,EAAE,yCAAyC;AACnD,oBAAA,UAAU,EAAE,IAAI;AAChB,oBAAA,OAAO,EAAE,CAAC,YAAY,EAAE,WAAW,CAAC;AACpC,oBAAA,QAAQ,EAAE;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAwHT,EAAA,CAAA;AACF,iBAAA;;;;;"}
|
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
import * as i0 from '@angular/core';
|
|
2
|
+
import { inject, Component } from '@angular/core';
|
|
3
|
+
import { RouterLink } from '@angular/router';
|
|
4
|
+
import { OidcSecurityService } from 'angular-auth-oidc-client';
|
|
5
|
+
|
|
6
|
+
class UnauthorizedPageComponent {
|
|
7
|
+
oidcService = inject(OidcSecurityService);
|
|
8
|
+
logout() {
|
|
9
|
+
this.oidcService.logoff().subscribe();
|
|
10
|
+
}
|
|
11
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.25", ngImport: i0, type: UnauthorizedPageComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
12
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "21.2.25", type: UnauthorizedPageComponent, isStandalone: true, selector: "app-unauthorized-page", ngImport: i0, template: `
|
|
13
|
+
<div class="min-h-screen flex items-center justify-center bg-gray-50">
|
|
14
|
+
<div class="max-w-md w-full text-center p-8">
|
|
15
|
+
<div class="mx-auto h-16 w-16 rounded-full bg-red-100 flex items-center justify-center mb-6">
|
|
16
|
+
<svg class="h-8 w-8 text-red-600" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor">
|
|
17
|
+
<path stroke-linecap="round" stroke-linejoin="round" d="M18.364 18.364A9 9 0 0 0 5.636 5.636m12.728 12.728A9 9 0 0 1 5.636 5.636m12.728 12.728L5.636 5.636" />
|
|
18
|
+
</svg>
|
|
19
|
+
</div>
|
|
20
|
+
<h1 class="text-2xl font-bold text-gray-900 mb-2">Access Denied</h1>
|
|
21
|
+
<p class="text-gray-600 mb-6">You don't have permission to access this page. Contact your administrator if you believe this is an error, or sign out and try with a different account.</p>
|
|
22
|
+
<div class="flex items-center justify-center gap-3">
|
|
23
|
+
<a routerLink="/dashboard" class="inline-flex items-center px-4 py-2 text-sm font-medium text-white bg-primary-600 rounded-md hover:bg-primary-700">
|
|
24
|
+
Go to Dashboard
|
|
25
|
+
</a>
|
|
26
|
+
<button
|
|
27
|
+
type="button"
|
|
28
|
+
(click)="logout()"
|
|
29
|
+
class="inline-flex items-center px-4 py-2 text-sm font-medium text-gray-700 bg-white border border-gray-300 rounded-md hover:bg-gray-50"
|
|
30
|
+
>
|
|
31
|
+
Sign out
|
|
32
|
+
</button>
|
|
33
|
+
</div>
|
|
34
|
+
</div>
|
|
35
|
+
</div>
|
|
36
|
+
`, isInline: true, dependencies: [{ kind: "directive", type: RouterLink, selector: "[routerLink]", inputs: ["target", "queryParams", "fragment", "queryParamsHandling", "state", "info", "relativeTo", "preserveFragment", "skipLocationChange", "replaceUrl", "routerLink"] }] });
|
|
37
|
+
}
|
|
38
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.25", ngImport: i0, type: UnauthorizedPageComponent, decorators: [{
|
|
39
|
+
type: Component,
|
|
40
|
+
args: [{
|
|
41
|
+
selector: 'app-unauthorized-page',
|
|
42
|
+
standalone: true,
|
|
43
|
+
imports: [RouterLink],
|
|
44
|
+
template: `
|
|
45
|
+
<div class="min-h-screen flex items-center justify-center bg-gray-50">
|
|
46
|
+
<div class="max-w-md w-full text-center p-8">
|
|
47
|
+
<div class="mx-auto h-16 w-16 rounded-full bg-red-100 flex items-center justify-center mb-6">
|
|
48
|
+
<svg class="h-8 w-8 text-red-600" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor">
|
|
49
|
+
<path stroke-linecap="round" stroke-linejoin="round" d="M18.364 18.364A9 9 0 0 0 5.636 5.636m12.728 12.728A9 9 0 0 1 5.636 5.636m12.728 12.728L5.636 5.636" />
|
|
50
|
+
</svg>
|
|
51
|
+
</div>
|
|
52
|
+
<h1 class="text-2xl font-bold text-gray-900 mb-2">Access Denied</h1>
|
|
53
|
+
<p class="text-gray-600 mb-6">You don't have permission to access this page. Contact your administrator if you believe this is an error, or sign out and try with a different account.</p>
|
|
54
|
+
<div class="flex items-center justify-center gap-3">
|
|
55
|
+
<a routerLink="/dashboard" class="inline-flex items-center px-4 py-2 text-sm font-medium text-white bg-primary-600 rounded-md hover:bg-primary-700">
|
|
56
|
+
Go to Dashboard
|
|
57
|
+
</a>
|
|
58
|
+
<button
|
|
59
|
+
type="button"
|
|
60
|
+
(click)="logout()"
|
|
61
|
+
class="inline-flex items-center px-4 py-2 text-sm font-medium text-gray-700 bg-white border border-gray-300 rounded-md hover:bg-gray-50"
|
|
62
|
+
>
|
|
63
|
+
Sign out
|
|
64
|
+
</button>
|
|
65
|
+
</div>
|
|
66
|
+
</div>
|
|
67
|
+
</div>
|
|
68
|
+
`,
|
|
69
|
+
}]
|
|
70
|
+
}] });
|
|
71
|
+
|
|
72
|
+
export { UnauthorizedPageComponent };
|
|
73
|
+
//# sourceMappingURL=syndew-oluso-workspace-ui-unauthorized-page.component-CWYFN6mp.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"syndew-oluso-workspace-ui-unauthorized-page.component-CWYFN6mp.mjs","sources":["../../../../libs/workspace-ui/src/lib/pages/unauthorized/unauthorized-page.component.ts"],"sourcesContent":["import { Component, inject } from '@angular/core';\nimport { RouterLink } from '@angular/router';\nimport { OidcSecurityService } from 'angular-auth-oidc-client';\n\n@Component({\n selector: 'app-unauthorized-page',\n standalone: true,\n imports: [RouterLink],\n template: `\n <div class=\"min-h-screen flex items-center justify-center bg-gray-50\">\n <div class=\"max-w-md w-full text-center p-8\">\n <div class=\"mx-auto h-16 w-16 rounded-full bg-red-100 flex items-center justify-center mb-6\">\n <svg class=\"h-8 w-8 text-red-600\" fill=\"none\" viewBox=\"0 0 24 24\" stroke-width=\"1.5\" stroke=\"currentColor\">\n <path stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M18.364 18.364A9 9 0 0 0 5.636 5.636m12.728 12.728A9 9 0 0 1 5.636 5.636m12.728 12.728L5.636 5.636\" />\n </svg>\n </div>\n <h1 class=\"text-2xl font-bold text-gray-900 mb-2\">Access Denied</h1>\n <p class=\"text-gray-600 mb-6\">You don't have permission to access this page. Contact your administrator if you believe this is an error, or sign out and try with a different account.</p>\n <div class=\"flex items-center justify-center gap-3\">\n <a routerLink=\"/dashboard\" class=\"inline-flex items-center px-4 py-2 text-sm font-medium text-white bg-primary-600 rounded-md hover:bg-primary-700\">\n Go to Dashboard\n </a>\n <button\n type=\"button\"\n (click)=\"logout()\"\n class=\"inline-flex items-center px-4 py-2 text-sm font-medium text-gray-700 bg-white border border-gray-300 rounded-md hover:bg-gray-50\"\n >\n Sign out\n </button>\n </div>\n </div>\n </div>\n `,\n})\nexport class UnauthorizedPageComponent {\n private readonly oidcService = inject(OidcSecurityService);\n\n logout(): void {\n this.oidcService.logoff().subscribe();\n }\n}\n"],"names":[],"mappings":";;;;;MAkCa,yBAAyB,CAAA;AACnB,IAAA,WAAW,GAAG,MAAM,CAAC,mBAAmB,CAAC;IAE1D,MAAM,GAAA;QACJ,IAAI,CAAC,WAAW,CAAC,MAAM,EAAE,CAAC,SAAS,EAAE;IACvC;wGALW,yBAAyB,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,SAAA,EAAA,CAAA;AAAzB,IAAA,OAAA,IAAA,GAAA,EAAA,CAAA,oBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,SAAA,EAAA,IAAA,EAAA,yBAAyB,EAAA,YAAA,EAAA,IAAA,EAAA,QAAA,EAAA,uBAAA,EAAA,QAAA,EAAA,EAAA,EAAA,QAAA,EA1B1B;;;;;;;;;;;;;;;;;;;;;;;;AAwBT,EAAA,CAAA,EAAA,QAAA,EAAA,IAAA,EAAA,YAAA,EAAA,CAAA,EAAA,IAAA,EAAA,WAAA,EAAA,IAAA,EAzBS,UAAU,EAAA,QAAA,EAAA,cAAA,EAAA,MAAA,EAAA,CAAA,QAAA,EAAA,aAAA,EAAA,UAAA,EAAA,qBAAA,EAAA,OAAA,EAAA,MAAA,EAAA,YAAA,EAAA,kBAAA,EAAA,oBAAA,EAAA,YAAA,EAAA,YAAA,CAAA,EAAA,CAAA,EAAA,CAAA;;4FA2BT,yBAAyB,EAAA,UAAA,EAAA,CAAA;kBA9BrC,SAAS;AAAC,YAAA,IAAA,EAAA,CAAA;AACT,oBAAA,QAAQ,EAAE,uBAAuB;AACjC,oBAAA,UAAU,EAAE,IAAI;oBAChB,OAAO,EAAE,CAAC,UAAU,CAAC;AACrB,oBAAA,QAAQ,EAAE;;;;;;;;;;;;;;;;;;;;;;;;AAwBT,EAAA,CAAA;AACF,iBAAA;;;;;"}
|