@gloww/gloww 20.0.0-beta.52 → 20.0.0-beta.53
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/fesm2022/gloww-gloww.mjs +18 -21
- package/fesm2022/gloww-gloww.mjs.map +1 -1
- package/index.d.ts +4 -3
- package/package.json +1 -1
package/fesm2022/gloww-gloww.mjs
CHANGED
|
@@ -16,15 +16,15 @@ import * as i1$1 from '@angular/platform-browser';
|
|
|
16
16
|
import * as i5 from '@kolkov/angular-editor';
|
|
17
17
|
import { AngularEditorModule } from '@kolkov/angular-editor';
|
|
18
18
|
import { switchMap, map, tap, filter, catchError, take, mergeMap, retryWhen, scan, delay, first, distinctUntilChanged, debounceTime, finalize } from 'rxjs/operators';
|
|
19
|
-
import * as
|
|
19
|
+
import * as i8$1 from '@angular/material/sort';
|
|
20
20
|
import { MatSort, MatSortModule } from '@angular/material/sort';
|
|
21
|
-
import * as
|
|
21
|
+
import * as i6$1 from '@angular/material/paginator';
|
|
22
22
|
import { MatPaginator, MatPaginatorIntl, MatPaginatorModule } from '@angular/material/paginator';
|
|
23
|
-
import * as
|
|
23
|
+
import * as i9$1 from '@angular/material/table';
|
|
24
24
|
import { MatColumnDef, MatTableDataSource, MatTable, MatHeaderCellDef, MatHeaderCell, MatCellDef, MatCell, MatHeaderRowDef, MatHeaderRow, MatRowDef, MatRow, MatTableModule } from '@angular/material/table';
|
|
25
|
-
import * as
|
|
25
|
+
import * as i7$1 from '@angular/material/progress-spinner';
|
|
26
26
|
import { MatProgressSpinner, MatProgressSpinnerModule } from '@angular/material/progress-spinner';
|
|
27
|
-
import * as
|
|
27
|
+
import * as i4$2 from '@angular/material/card';
|
|
28
28
|
import { MatCard, MatCardContent, MatCardActions, MatCardHeader, MatCardTitle, MatCardModule } from '@angular/material/card';
|
|
29
29
|
import * as i7 from '@angular/material/icon';
|
|
30
30
|
import { MatIcon, MatIconModule } from '@angular/material/icon';
|
|
@@ -129,8 +129,15 @@ class GlowwService {
|
|
|
129
129
|
async noRestSecurity() {
|
|
130
130
|
return await firstValueFrom(this.http.get(`/admin/ORMS/${this.InternalBasePath.replace(/_mgmt/, "")}/noRestSecurity`));
|
|
131
131
|
}
|
|
132
|
+
flowMgmtUrl(path) {
|
|
133
|
+
const normalizedPath = path.replace(/^\/+/, '');
|
|
134
|
+
return `${this.baseUrl}FlowMgmt/${normalizedPath}`;
|
|
135
|
+
}
|
|
136
|
+
myUserTasks(args) {
|
|
137
|
+
return this.http.post(this.flowMgmtUrl('UserTask/MyUserTasks'), args ?? {});
|
|
138
|
+
}
|
|
132
139
|
commitUserTask(userTaskId, args) {
|
|
133
|
-
return this.http.post(
|
|
140
|
+
return this.http.post(this.flowMgmtUrl(`UserTask/Commit/${userTaskId}`), args ?? {}, {
|
|
134
141
|
responseType: 'text'
|
|
135
142
|
});
|
|
136
143
|
}
|
|
@@ -4328,9 +4335,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.18", ngImpo
|
|
|
4328
4335
|
}] }, { type: i1$1.DomSanitizer }] });
|
|
4329
4336
|
|
|
4330
4337
|
class AssignedUserTasksComponent {
|
|
4331
|
-
constructor(glowwService,
|
|
4338
|
+
constructor(glowwService, i18n, dialog) {
|
|
4332
4339
|
this.glowwService = glowwService;
|
|
4333
|
-
this.authenticationService = authenticationService;
|
|
4334
4340
|
this.i18n = i18n;
|
|
4335
4341
|
this.dialog = dialog;
|
|
4336
4342
|
this.displayedColumns = ['action', 'task', 'definition', 'status', 'message', 'assignment'];
|
|
@@ -4353,7 +4359,7 @@ class AssignedUserTasksComponent {
|
|
|
4353
4359
|
const query = this.buildQuery();
|
|
4354
4360
|
this.loading = true;
|
|
4355
4361
|
this.errorMessage = '';
|
|
4356
|
-
this.glowwService.
|
|
4362
|
+
this.glowwService.myUserTasks(query).pipe(catchError(error => {
|
|
4357
4363
|
this.errorMessage = error?.error?.message || error?.message || `${error}`;
|
|
4358
4364
|
return of([]);
|
|
4359
4365
|
}), finalize(() => {
|
|
@@ -4386,11 +4392,9 @@ class AssignedUserTasksComponent {
|
|
|
4386
4392
|
if (!result?.payload) {
|
|
4387
4393
|
return;
|
|
4388
4394
|
}
|
|
4389
|
-
const currentUser = this.authenticationService.currentUserValue;
|
|
4390
4395
|
const payload = {
|
|
4391
4396
|
...this.parseVariables(task.VARIABLES),
|
|
4392
4397
|
...result.payload,
|
|
4393
|
-
__Username: currentUser?.username ?? '',
|
|
4394
4398
|
__UserTaskId: userTaskId
|
|
4395
4399
|
};
|
|
4396
4400
|
await firstValueFrom(this.glowwService.commitUserTask(userTaskId, payload));
|
|
@@ -4433,14 +4437,7 @@ class AssignedUserTasksComponent {
|
|
|
4433
4437
|
&& this.isPendingTask(taskAssignment);
|
|
4434
4438
|
}
|
|
4435
4439
|
buildQuery() {
|
|
4436
|
-
const currentUser = this.authenticationService.currentUserValue;
|
|
4437
4440
|
const query = {};
|
|
4438
|
-
if (currentUser?.username) {
|
|
4439
|
-
query.Username = currentUser.username;
|
|
4440
|
-
}
|
|
4441
|
-
if (currentUser?.domain) {
|
|
4442
|
-
query.Domain = currentUser.domain;
|
|
4443
|
-
}
|
|
4444
4441
|
query.STATUT = 'WAITING';
|
|
4445
4442
|
return query;
|
|
4446
4443
|
}
|
|
@@ -4671,8 +4668,8 @@ class AssignedUserTasksComponent {
|
|
|
4671
4668
|
looksLikeUrl(value) {
|
|
4672
4669
|
return !!value && /^(https?:\/\/|\/)/i.test(value.trim());
|
|
4673
4670
|
}
|
|
4674
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.18", ngImport: i0, type: AssignedUserTasksComponent, deps: [{ token: 'glowwService' }, { token:
|
|
4675
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.18", type: AssignedUserTasksComponent, isStandalone: true, selector: "glw-assigned-user-tasks", viewQueries: [{ propertyName: "sort", first: true, predicate: MatSort, descendants: true, static: true }, { propertyName: "paginator", first: true, predicate: MatPaginator, descendants: true }], ngImport: i0, template: "<mat-card class=\"assigned-user-tasks-card\" appearance=\"outlined\">\n <mat-card-header class=\"assigned-user-tasks-header\">\n <mat-card-title>{{ t('GLOWW.MY_ASSIGNED_TASKS', 'My assigned tasks') }}</mat-card-title>\n <button mat-stroked-button color=\"primary\" type=\"button\" (click)=\"loadAssignments()\">\n <mat-icon>refresh</mat-icon>\n {{ t('COMMON.REFRESH', 'Refresh') }}\n </button>\n </mat-card-header>\n\n <mat-card-content>\n @if (errorMessage) {\n <div class=\"assigned-user-tasks-error\">\n {{ t('GLOWW.UNABLE_TO_QUERY', 'Unable to query') }}: {{ errorMessage }}\n </div>\n }\n\n @if (loading) {\n <div class=\"assigned-user-tasks-loading\">\n <mat-spinner diameter=\"36\"></mat-spinner>\n </div>\n }\n\n @if (!loading) {\n <div class=\"assigned-user-tasks-table-wrapper\">\n <table mat-table [dataSource]=\"dataSource\" matSort>\n <ng-container matColumnDef=\"action\">\n <th mat-header-cell *matHeaderCellDef></th>\n <td mat-cell *matCellDef=\"let obj\">\n <button\n mat-stroked-button\n color=\"primary\"\n type=\"button\"\n (click)=\"respondToTask(obj)\"\n [disabled]=\"!canRespond(obj) || respondingTaskId === (obj.UserTaskId ?? obj.IsCandidate?.USERTASKID)\">\n <i class=\"fal fa-reply\"></i>\n {{ t('GLOWW.RESPOND', 'Respond') }}\n </button>\n </td>\n </ng-container>\n\n <ng-container matColumnDef=\"task\">\n <th mat-header-cell *matHeaderCellDef mat-sort-header=\"task\">{{ t('LISTS.TASK', 'Task') }}</th>\n <td mat-cell *matCellDef=\"let obj\">{{ getTaskLabel(obj) }}</td>\n </ng-container>\n\n <ng-container matColumnDef=\"definition\">\n <th mat-header-cell *matHeaderCellDef mat-sort-header=\"definition\">{{ t('LISTS.DEFINITION_ID', 'Definition ID') }}</th>\n <td mat-cell *matCellDef=\"let obj\">{{ getDefinitionLabel(obj) }}</td>\n </ng-container>\n\n <ng-container matColumnDef=\"status\">\n <th mat-header-cell *matHeaderCellDef mat-sort-header=\"status\">{{ t('LISTS.STATUS', 'Status') }}</th>\n <td mat-cell *matCellDef=\"let obj\">{{ getStatusLabel(obj) }}</td>\n </ng-container>\n\n <ng-container matColumnDef=\"message\">\n <th mat-header-cell *matHeaderCellDef mat-sort-header=\"message\">{{ t('LISTS.MESSAGE', 'Message') }}</th>\n <td mat-cell *matCellDef=\"let obj\">{{ obj.IsCandidate?.MESSAGE }}</td>\n </ng-container>\n\n <ng-container matColumnDef=\"assignment\">\n <th mat-header-cell *matHeaderCellDef mat-sort-header=\"assignment\">{{ t('LISTS.ASSIGNED_TO', 'Assigned to') }}</th>\n <td mat-cell *matCellDef=\"let obj\">{{ getAssignmentLabel(obj) }}</td>\n </ng-container>\n\n <tr mat-header-row *matHeaderRowDef=\"displayedColumns\"></tr>\n <tr mat-row *matRowDef=\"let row; columns: displayedColumns\"></tr>\n </table>\n </div>\n\n @if (!dataSource.data.length) {\n <div class=\"assigned-user-tasks-empty\">\n {{ t('GLOWW.NO_ASSIGNED_TASKS', 'No task is currently assigned to you.') }}\n </div>\n }\n }\n </mat-card-content>\n\n <mat-card-actions>\n <mat-paginator [pageSize]=\"10\" [pageSizeOptions]=\"[10, 20, 50, 100]\" [showFirstLastButtons]=\"true\"></mat-paginator>\n </mat-card-actions>\n</mat-card>\n", styles: [":host{display:block}.assigned-user-tasks-card{margin:16px}.assigned-user-tasks-header{display:flex;align-items:center;justify-content:space-between;gap:12px;padding-bottom:12px}.assigned-user-tasks-loading,.assigned-user-tasks-empty,.assigned-user-tasks-error{padding:16px 0}.assigned-user-tasks-table-wrapper{overflow:auto}table{width:100%}th:first-child,td:first-child{width:140px;white-space:nowrap}button[mat-stroked-button]{min-width:110px}\n"], dependencies: [{ kind: "ngmodule", type: MatButtonModule }, { kind: "component", type: i4$1.MatButton, selector: " button[matButton], a[matButton], button[mat-button], button[mat-raised-button], button[mat-flat-button], button[mat-stroked-button], a[mat-button], a[mat-raised-button], a[mat-flat-button], a[mat-stroked-button] ", inputs: ["matButton"], exportAs: ["matButton", "matAnchor"] }, { kind: "ngmodule", type: MatCardModule }, { kind: "component", type:
|
|
4671
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.18", ngImport: i0, type: AssignedUserTasksComponent, deps: [{ token: 'glowwService' }, { token: GlowwI18nService }, { token: i1$2.MatDialog }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
4672
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.18", type: AssignedUserTasksComponent, isStandalone: true, selector: "glw-assigned-user-tasks", viewQueries: [{ propertyName: "sort", first: true, predicate: MatSort, descendants: true, static: true }, { propertyName: "paginator", first: true, predicate: MatPaginator, descendants: true }], ngImport: i0, template: "<mat-card class=\"assigned-user-tasks-card\" appearance=\"outlined\">\n <mat-card-header class=\"assigned-user-tasks-header\">\n <mat-card-title>{{ t('GLOWW.MY_ASSIGNED_TASKS', 'My assigned tasks') }}</mat-card-title>\n <button mat-stroked-button color=\"primary\" type=\"button\" (click)=\"loadAssignments()\">\n <mat-icon>refresh</mat-icon>\n {{ t('COMMON.REFRESH', 'Refresh') }}\n </button>\n </mat-card-header>\n\n <mat-card-content>\n @if (errorMessage) {\n <div class=\"assigned-user-tasks-error\">\n {{ t('GLOWW.UNABLE_TO_QUERY', 'Unable to query') }}: {{ errorMessage }}\n </div>\n }\n\n @if (loading) {\n <div class=\"assigned-user-tasks-loading\">\n <mat-spinner diameter=\"36\"></mat-spinner>\n </div>\n }\n\n @if (!loading) {\n <div class=\"assigned-user-tasks-table-wrapper\">\n <table mat-table [dataSource]=\"dataSource\" matSort>\n <ng-container matColumnDef=\"action\">\n <th mat-header-cell *matHeaderCellDef></th>\n <td mat-cell *matCellDef=\"let obj\">\n <button\n mat-stroked-button\n color=\"primary\"\n type=\"button\"\n (click)=\"respondToTask(obj)\"\n [disabled]=\"!canRespond(obj) || respondingTaskId === (obj.UserTaskId ?? obj.IsCandidate?.USERTASKID)\">\n <i class=\"fal fa-reply\"></i>\n {{ t('GLOWW.RESPOND', 'Respond') }}\n </button>\n </td>\n </ng-container>\n\n <ng-container matColumnDef=\"task\">\n <th mat-header-cell *matHeaderCellDef mat-sort-header=\"task\">{{ t('LISTS.TASK', 'Task') }}</th>\n <td mat-cell *matCellDef=\"let obj\">{{ getTaskLabel(obj) }}</td>\n </ng-container>\n\n <ng-container matColumnDef=\"definition\">\n <th mat-header-cell *matHeaderCellDef mat-sort-header=\"definition\">{{ t('LISTS.DEFINITION_ID', 'Definition ID') }}</th>\n <td mat-cell *matCellDef=\"let obj\">{{ getDefinitionLabel(obj) }}</td>\n </ng-container>\n\n <ng-container matColumnDef=\"status\">\n <th mat-header-cell *matHeaderCellDef mat-sort-header=\"status\">{{ t('LISTS.STATUS', 'Status') }}</th>\n <td mat-cell *matCellDef=\"let obj\">{{ getStatusLabel(obj) }}</td>\n </ng-container>\n\n <ng-container matColumnDef=\"message\">\n <th mat-header-cell *matHeaderCellDef mat-sort-header=\"message\">{{ t('LISTS.MESSAGE', 'Message') }}</th>\n <td mat-cell *matCellDef=\"let obj\">{{ obj.IsCandidate?.MESSAGE }}</td>\n </ng-container>\n\n <ng-container matColumnDef=\"assignment\">\n <th mat-header-cell *matHeaderCellDef mat-sort-header=\"assignment\">{{ t('LISTS.ASSIGNED_TO', 'Assigned to') }}</th>\n <td mat-cell *matCellDef=\"let obj\">{{ getAssignmentLabel(obj) }}</td>\n </ng-container>\n\n <tr mat-header-row *matHeaderRowDef=\"displayedColumns\"></tr>\n <tr mat-row *matRowDef=\"let row; columns: displayedColumns\"></tr>\n </table>\n </div>\n\n @if (!dataSource.data.length) {\n <div class=\"assigned-user-tasks-empty\">\n {{ t('GLOWW.NO_ASSIGNED_TASKS', 'No task is currently assigned to you.') }}\n </div>\n }\n }\n </mat-card-content>\n\n <mat-card-actions>\n <mat-paginator [pageSize]=\"10\" [pageSizeOptions]=\"[10, 20, 50, 100]\" [showFirstLastButtons]=\"true\"></mat-paginator>\n </mat-card-actions>\n</mat-card>\n", styles: [":host{display:block}.assigned-user-tasks-card{margin:16px}.assigned-user-tasks-header{display:flex;align-items:center;justify-content:space-between;gap:12px;padding-bottom:12px}.assigned-user-tasks-loading,.assigned-user-tasks-empty,.assigned-user-tasks-error{padding:16px 0}.assigned-user-tasks-table-wrapper{overflow:auto}table{width:100%}th:first-child,td:first-child{width:140px;white-space:nowrap}button[mat-stroked-button]{min-width:110px}\n"], dependencies: [{ kind: "ngmodule", type: MatButtonModule }, { kind: "component", type: i4$1.MatButton, selector: " button[matButton], a[matButton], button[mat-button], button[mat-raised-button], button[mat-flat-button], button[mat-stroked-button], a[mat-button], a[mat-raised-button], a[mat-flat-button], a[mat-stroked-button] ", inputs: ["matButton"], exportAs: ["matButton", "matAnchor"] }, { kind: "ngmodule", type: MatCardModule }, { kind: "component", type: i4$2.MatCard, selector: "mat-card", inputs: ["appearance"], exportAs: ["matCard"] }, { kind: "directive", type: i4$2.MatCardActions, selector: "mat-card-actions", inputs: ["align"], exportAs: ["matCardActions"] }, { kind: "directive", type: i4$2.MatCardContent, selector: "mat-card-content" }, { kind: "component", type: i4$2.MatCardHeader, selector: "mat-card-header" }, { kind: "directive", type: i4$2.MatCardTitle, selector: "mat-card-title, [mat-card-title], [matCardTitle]" }, { kind: "ngmodule", type: MatIconModule }, { kind: "component", type: i7.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "ngmodule", type: MatDialogModule }, { kind: "ngmodule", type: MatPaginatorModule }, { kind: "component", type: i6$1.MatPaginator, selector: "mat-paginator", inputs: ["color", "pageIndex", "length", "pageSize", "pageSizeOptions", "hidePageSize", "showFirstLastButtons", "selectConfig", "disabled"], outputs: ["page"], exportAs: ["matPaginator"] }, { kind: "ngmodule", type: MatProgressSpinnerModule }, { kind: "component", type: i7$1.MatProgressSpinner, selector: "mat-progress-spinner, mat-spinner", inputs: ["color", "mode", "value", "diameter", "strokeWidth"], exportAs: ["matProgressSpinner"] }, { kind: "ngmodule", type: MatSortModule }, { kind: "directive", type: i8$1.MatSort, selector: "[matSort]", inputs: ["matSortActive", "matSortStart", "matSortDirection", "matSortDisableClear", "matSortDisabled"], outputs: ["matSortChange"], exportAs: ["matSort"] }, { kind: "component", type: i8$1.MatSortHeader, selector: "[mat-sort-header]", inputs: ["mat-sort-header", "arrowPosition", "start", "disabled", "sortActionDescription", "disableClear"], exportAs: ["matSortHeader"] }, { kind: "ngmodule", type: MatTableModule }, { kind: "component", type: i9$1.MatTable, selector: "mat-table, table[mat-table]", exportAs: ["matTable"] }, { kind: "directive", type: i9$1.MatHeaderCellDef, selector: "[matHeaderCellDef]" }, { kind: "directive", type: i9$1.MatHeaderRowDef, selector: "[matHeaderRowDef]", inputs: ["matHeaderRowDef", "matHeaderRowDefSticky"] }, { kind: "directive", type: i9$1.MatColumnDef, selector: "[matColumnDef]", inputs: ["matColumnDef"] }, { kind: "directive", type: i9$1.MatCellDef, selector: "[matCellDef]" }, { kind: "directive", type: i9$1.MatRowDef, selector: "[matRowDef]", inputs: ["matRowDefColumns", "matRowDefWhen"] }, { kind: "directive", type: i9$1.MatHeaderCell, selector: "mat-header-cell, th[mat-header-cell]" }, { kind: "directive", type: i9$1.MatCell, selector: "mat-cell, td[mat-cell]" }, { kind: "component", type: i9$1.MatHeaderRow, selector: "mat-header-row, tr[mat-header-row]", exportAs: ["matHeaderRow"] }, { kind: "component", type: i9$1.MatRow, selector: "mat-row, tr[mat-row]", exportAs: ["matRow"] }] }); }
|
|
4676
4673
|
}
|
|
4677
4674
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.18", ngImport: i0, type: AssignedUserTasksComponent, decorators: [{
|
|
4678
4675
|
type: Component,
|
|
@@ -4689,7 +4686,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.18", ngImpo
|
|
|
4689
4686
|
}], ctorParameters: () => [{ type: undefined, decorators: [{
|
|
4690
4687
|
type: Inject,
|
|
4691
4688
|
args: ['glowwService']
|
|
4692
|
-
}] }, { type:
|
|
4689
|
+
}] }, { type: GlowwI18nService }, { type: i1$2.MatDialog }], propDecorators: { sort: [{
|
|
4693
4690
|
type: ViewChild,
|
|
4694
4691
|
args: [MatSort, { static: true }]
|
|
4695
4692
|
}], paginator: [{
|